Gallery Errors

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Gallery Errors

    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>else if($action=="male")
    {
    addonline(getuid_sid($sid),"Viewing Male Gallery","");
    echo "<card id=\"main\" title=\"Kranic Wap\">";
    $uid = getuid_sid($sid);



    //////ALL gallery SCRIPT <<

    if($page=="" || $page<=0)$page=1;


    if($who!="")
    {
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid) FROM fun_gallery WHERE sex=&#39;M&#39;"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid) FROM fun_gallery WHERE sex=&#39;M&#39;"));
    }

    $num_items = $noi[0]; //changable
    $items_per_page= 5;
    $num_pages = ceil($num_items/$items_per_page);
    if(($page>$num_pages)&&$page!=1)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

    $sql = "SELECT DISTINCT uid FROM fun_gallery WHERE sex=&#39;M&#39; ORDER BY uid ASC LIMIT $limit_start, $items_per_page";

    echo "

    ";
    $items = mysql_query($sql);
    echo mysql_error();

    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
    $who = $item[0];
    $user=getnick_uid($who);

    $countpics = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM fun_gallery WHERE uid=&#39;".$who."&#39;"));
    $lnk = "<a href=\"gallery.php?action=viewuser&amp;who=$who&am p;sid=$sid\">$user</a>($countpics[0])
    ";
    echo "$lnk";
    }
    }

    echo "
    </p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
    $ppage = $page-1;
    echo "<a href=\"gallery.php?action=$action&amp;page=$ppage& amp;sid=$sid\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
    $npage = $page+1;
    echo "<a href=\"gallery.php?action=$action&amp;page=$npage& amp;sid=$sid\">Next»</a>";
    }
    echo "

    $page/$num_pages";
    if($num_pages>2)
    {
    $rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
    $rets .= "<anchor>[GO]";
    $rets .= "<go href=\"gallery.php\" method=\"get\">";
    $rets .= "<postfield name=\"action\" value=\"$action\"/>";
    $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
    $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
    $rets .= "</go></anchor>

    ";

    echo $rets;
    }

    echo "<a href=\"gallery.php?action=main&amp;sid=$sid\">Gall ery Main</a>
    ";
    echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
    echo "Home</a>
    ";
    echo "</p>";
    echo "</card>";


    }
    else if($action=="female")
    {
    addonline(getuid_sid($sid),"Viewing Female Gallery","");
    echo "<card id=\"main\" title=\"Kranic Wap\">";
    $uid = getuid_sid($sid);


    //////ALL gallery SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    if($who!="")
    {
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid) FROM fun_gallery WHERE sex=&#39;F&#39;"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid) FROM fun_gallery WHERE sex=&#39;F&#39;"));
    }

    $num_items = $noi[0]; //changable
    $items_per_page= 5;
    $num_pages = ceil($num_items/$items_per_page);
    if(($page>$num_pages)&&$page!=1)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

    $sql = "SELECT DISTINCT uid FROM fun_gallery WHERE sex=&#39;F&#39; ORDER BY uid ASC LIMIT $limit_start, $items_per_page";

    echo "

    ";
    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
    $who = $item[0];
    $user=getnick_uid($who);
    $countpics = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM fun_gallery WHERE uid=&#39;".$who."&#39;"));
    $lnk = "<a href=\"gallery.php?action=viewuser&amp;who=$who&am p;sid=$sid\">.$user.</a>($countpics[0])
    ";

    echo "$lnk";

    }
    }else{
    echo "female gallery is empty";
    }
    echo "
    </p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
    $ppage = $page-1;
    echo "<a href=\"gallery.php?action=$action&amp;page=$ppage& amp;sid=$sid\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
    $npage = $page+1;
    echo "<a href=\"gallery.php?action=$action&amp;page=$npage& amp;sid=$sid\">Next»</a>";
    }
    echo "

    $page/$num_pages";
    if($num_pages>2)
    {
    $rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
    $rets .= "<anchor>[GO]";
    $rets .= "<go href=\"gallery.php\" method=\"get\">";
    $rets .= "<postfield name=\"action\" value=\"$action\"/>";
    $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
    $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
    $rets .= "</go></anchor>

    ";

    echo $rets;
    }

    echo "<a href=\"gallery.php?action=main&amp;sid=$sid\">Gall ery Main</a>
    ";
    echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
    echo "Home</a>
    ";
    echo "</p>";
    echo "</card>";

    }</div>


    am getting this error when i vallidate Failed validation and this Sorry, I am unable to validate this document because on line 3 it contained one or more bytes that I cannot interpret as utf-8 (in other words, the bytes found are not valid values in the specified Character Encoding). Please check both the content of the file and the character encoding indication. who can help fix it

    #2
    that error isnt caused by your gallery

    Comment


      #3
      that error isnt caused by your gallery[/b]
      whats it cause by then ?

      Comment


        #4
        post ur page ere

        Comment


          #5
          Code:
          <?php
          
          include("config.php");
          include("core.php");
          
          header("Content-type: text/vnd.wap.wml");
          header("Cache-Control: no-store, no-cache, must-revalidate");
          echo("<?xml version=\"1.0\"?>");
          echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
          
          ?>
          <wml>
          
          <?php
          connectdb();
          $action = $_GET["action"];
          $sid = $_GET["sid"];
          $page = $_GET["page"];
          $who = $_GET["who"];
          
          if(islogged($sid)==false)
          {
              echo "<card id=\"main\" title=\"Kranic Wap\">";
                echo "<p align=\"center\">";
                echo "You are not logged in
          ";
                echo "Or Your session has been expired
          
          ";
                echo "<a href=\"index.php\">Login</a>";
                echo "</p>";
                echo "</card>";
                echo "</wml>";
                exit();
          }
          $uid = getuid_sid($sid);
          if(isbanned($uid))
              {
                  echo "<card id=\"main\" title=\"Kranic Wap\">";   
                echo "<p align=\"center\">";
                echo "<img src=\"images/notok.gif\" alt=\"x\"/>
          ";
                echo "You are [b]Banned[/b]
          ";
                $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM fun_penalties WHERE uid=&#39;".$uid."&#39; AND penalty=&#39;1&#39;"));
                $remain = $banto[0]- time();
                $rmsg = gettimemsg($remain);
                echo "Time to finish your penalty: $rmsg
          
          ";
                //echo "<a href=\"index.php\">Login</a>";
                echo "</p>";
          echo "</card>";
                echo "</wml>";
                exit();
              }
          
          if($action=="main")
          {
            addonline(getuid_sid($sid),"user gallery","");
               echo "<card id=\"main\" title=\"Kranic Wap\">";
          echo "<p align=\"center\">";
          echo "[size="1"][b][u]Send Your Photos To  kipo3kx@hotmail.com
           Along With Your Username[/u][/b][/size]
          ";
             echo "</p>";
            echo "
          
          ";
           echo "[size="1"]";
           $males = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid) FROM fun_gallery WHERE sex=&#39;M&#39;"));
          echo "<a href=\"gallery.php?action=male&amp;sid=$sid\"><img src=\"images/male.gif\" alt=\"\"/>Male Gallery($males[0])</a>
          ";
          echo "
          ";
          $females = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid) FROM fun_gallery WHERE sex=&#39;F&#39;"));
          echo "<a href=\"gallery.php?action=female&amp;sid=$sid\"><img src=\"images/female.gif\" alt=\"\"/>Female Gallery($females[0])</a>
          ";
          echo "[/size]";
          echo "
          ";
          echo "[size="1"][b]";
          echo "<small>--------[/b][/size][b]
          ";
          echo "<a href=\"gallery.php?action=gallery&amp;sid=$sid\">Add A Photo Now!</a>
          ";
          echo "[/b]</small>";
          echo "</p>";
          echo "<p align=\"center\">";
            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
          echo "Home</a>";
            echo "</p>";
            echo "</card>";
            
          
          }
          else if($action=="gallery")
          {
            addonline(getuid_sid($sid),"Adding Photo","");
               echo "<card id=\"main\" title=\"Kranic Wap\">";
            echo "<p align=\"center\">";
           echo "[size="1"]";
          echo "If you have a url to ur photo u may add it to the gallery below
          [b]Please NOTE that only .jpeg/.jpg files will show in gallery.[/b]
          All other file formats will be removed my staff
          
          ";
          echo "[/size]";
          echo "[size="1"]Image URL:[/size] <input name=\"itemurl\" maxlength=\"100\" value=\"http://\"/>
          ";
          echo "<anchor>Add Photo";
          echo "<go href=\"genproc.php?action=addgal&amp;sid=$sid\" method=\"post\">";
          echo "<postfield name=\"itemurl\" value=\"$(itemurl)\"/>";
          echo "</go></anchor>";
          
            echo "
          
          ";
          echo "<a href=\"gallery.php?action=main&amp;sid=$sid\">User Gallery</a>
          ";
            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
          echo "Home</a>";
            echo "</p>";
             echo "</card>";
          
          
          }
          else if($action=="male")
          {
                addonline(getuid_sid($sid),"Viewing Male Gallery","");
                echo "<card id=\"main\" title=\"Kranic Wap\">";
              $uid = getuid_sid($sid);
          
          
          
              //////ALL gallery SCRIPT <<
          
              if($page=="" || $page<=0)$page=1;
          
          
              if($who!="")
              {
              $noi = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid) FROM fun_gallery WHERE sex=&#39;M&#39;"));
              }else{
              $noi = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid) FROM fun_gallery WHERE sex=&#39;M&#39;"));
              }
          
              $num_items = $noi[0]; //changable
              $items_per_page= 5;
              $num_pages = ceil($num_items/$items_per_page);
              if(($page>$num_pages)&&$page!=1)$page= $num_pages;
              $limit_start = ($page-1)*$items_per_page;
          
          $sql = "SELECT DISTINCT uid FROM fun_gallery WHERE sex=&#39;M&#39; ORDER BY uid ASC LIMIT $limit_start, $items_per_page";
          
          echo "
          
          [size="1"]";
              $items = mysql_query($sql);
              echo mysql_error();
              
              if(mysql_num_rows($items)>0)
              {
              while ($item = mysql_fetch_array($items))
              {
          $who = $item[0];
          $user=getnick_uid($who);
          
          $countpics = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM fun_gallery WHERE uid=&#39;".$who."&#39;"));
                  $lnk = "<a href=\"gallery.php?action=viewuser&amp;who=$who&amp;sid=$sid\">$user</a>($countpics[0])
          ";
                 echo "$lnk"; 
              }
              }
          
              echo "[/size]</p>";
          echo "<p align=\"center\">[size="1"]";
              if($page>1)
              {
                $ppage = $page-1;
                echo "<a href=\"gallery.php?action=$action&amp;page=$ppage&amp;sid=$sid\">«PREV</a> ";
              }
              if($page<$num_pages)
              {
                $npage = $page+1;
                echo "<a href=\"gallery.php?action=$action&amp;page=$npage&amp;sid=$sid\">Next»</a>";
              }
              echo "
          
          $page/$num_pages";
              if($num_pages>2)
              {
                $rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
                  $rets .= "<anchor>[GO]";
                  $rets .= "<go href=\"gallery.php\" method=\"get\">";
                  $rets .= "<postfield name=\"action\" value=\"$action\"/>";
                  $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
                  $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
                  $rets .= "</go></anchor>[/size]
          [size="1"]";
          
                  echo $rets;
              }
          
          echo "<a href=\"gallery.php?action=main&amp;sid=$sid\">Gallery Main</a>
          ";
          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
          echo "Home</a>[/size]";
              echo "</p>";
               echo "</card>";
          
          
          }
          else if($action=="female")
          {
               addonline(getuid_sid($sid),"Viewing Female Gallery","");
                 echo "<card id=\"main\" title=\"Kranic Wap\">";
              $uid = getuid_sid($sid);
          
          
              //////ALL gallery SCRIPT <<
          
              if($page=="" || $page<=0)$page=1;
              if($who!="")
              {
              $noi = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid) FROM fun_gallery WHERE sex=&#39;F&#39;"));
              }else{
              $noi = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid) FROM fun_gallery WHERE sex=&#39;F&#39;"));
              }
          
              $num_items = $noi[0]; //changable
              $items_per_page= 5;
              $num_pages = ceil($num_items/$items_per_page);
              if(($page>$num_pages)&&$page!=1)$page= $num_pages;
              $limit_start = ($page-1)*$items_per_page;
          
          $sql = "SELECT DISTINCT uid FROM fun_gallery WHERE sex=&#39;F&#39; ORDER BY uid ASC LIMIT $limit_start, $items_per_page";
          
          echo "
          
          [size="1"]";
              $items = mysql_query($sql);
              echo mysql_error();
              if(mysql_num_rows($items)>0)
              {
              while ($item = mysql_fetch_array($items))
              {
          $who = $item[0];
          $user=getnick_uid($who);
          $countpics = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM fun_gallery WHERE uid=&#39;".$who."&#39;"));
                  $lnk = "<a href=\"gallery.php?action=viewuser&amp;who=$who&amp;sid=$sid\">.$user.</a>($countpics[0])
          ";
                  
          echo "$lnk";
          
              }
              }else{
          echo "female gallery is empty";
          }
              echo "[/size]</p>";
          echo "<p align=\"center\">[size="1"]";
              if($page>1)
              {
                $ppage = $page-1;
                echo "<a href=\"gallery.php?action=$action&amp;page=$ppage&amp;sid=$sid\">«PREV</a> ";
              }
              if($page<$num_pages)
              {
                $npage = $page+1;
                echo "<a href=\"gallery.php?action=$action&amp;page=$npage&amp;sid=$sid\">Next»</a>";
              }
              echo "
          
          $page/$num_pages";
              if($num_pages>2)
              {
                $rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
                  $rets .= "<anchor>[GO]";
                  $rets .= "<go href=\"gallery.php\" method=\"get\">";
                  $rets .= "<postfield name=\"action\" value=\"$action\"/>";
                  $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
                  $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
                  $rets .= "</go></anchor>[/size]
          [size="1"]";
          
                  echo $rets;
              }
          
          echo "<a href=\"gallery.php?action=main&amp;sid=$sid\">Gallery Main</a>
          ";
          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
          echo "Home</a>[/size]";
              echo "</p>";
          echo "</card>";
          
          }
          else if($action=="viewuser")
          {
          
          
                $who = $_GET["who"];
              addonline(getuid_sid($sid),"Viewing user Photos","");
                   echo "<card id=\"main\" title=\"User Photo\">";
              $uid = getuid_sid($sid);
          
          
          
              //////ALL gallery SCRIPT <<
          
              if($page=="" || $page<=0)$page=1;
              if($who!="")
              {
              $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM fun_gallery WHERE uid=&#39;".$who."&#39;"));
              }else{
              $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM fun_gallery"));
              }
              $num_items = $noi[0]; //changable
              $items_per_page= 1;
              $num_pages = ceil($num_items/$items_per_page);
              if(($page>$num_pages)&&$page!=1)$page= $num_pages;
              $limit_start = ($page-1)*$items_per_page;
          
              if($who!="")
              {
                  $sql = "SELECT id, sex, itemurl FROM fun_gallery WHERE uid=&#39;".$who."&#39; ORDER BY id DESC LIMIT $limit_start, $items_per_page";
                  }else{
          $sql = "SELECT id, sex, itemurl, uid FROM fun_gallery  ORDER BY id DESC LIMIT $limit_start, $items_per_page";
                  }
          
          echo "<p align=\"center\">[size="1"]";
              $items = mysql_query($sql);
              echo mysql_error();
              if(mysql_num_rows($items)>0)
              {
              while ($item = mysql_fetch_array($items))
              {
                $id = $item[0];
              $img = $item[2];
              
                
                  $lnk = "<img src=\"max.php?filename=$img\" alt=\"$id\"/>
          ";
              $rinfo = mysql_fetch_array(mysql_query("SELECT COUNT(*) as nofr, SUM(prate) as nofp FROM fun_prate WHERE pid=&#39;".$id."&#39;"));
          $counts = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM fun_prate WHERE pid=&#39;".$id."&#39;"));
          if($counts[0]>0) {
              $ther = $rinfo[1]/$rinfo[0];
              $rating = "Rating: $ther/$rinfo[1] (votes($counts[0]))
          ";
          }else{
          $rating = "";
          }
          
                   $gall = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM fun_galcomments WHERE pid=&#39;".$id."&#39;"));
          $me = getuid_sid($sid);
          if($who=="$me") {
          $use = "<a href=\"genproc.php?action=useav&amp;sid=$sid&amp;gid=$item[0]\">Use as Avatar</a> | ";
          }else{
          $use = "";
          }
                if(candelgal($uid, $item[0]))
                {
                  $delnk = "<a href=\"genproc.php?action=delgal&amp;sid=$sid&amp;gid=$item[0]\">Remove Photo</a>";
                }else{
                  $delnk = "";
                }
                echo "$lnk$rating<a href=\"$img\">Download Photo</a>
           $use$delnk
          <a href=\"gallery.php?who=$who&amp;action=comments&amp;sid=$sid&amp;gid=$item[0]\">Comments($gall[0])</a>
          [/size]";
                
          
              }
              }
              echo "</p>";
          echo "<p align=\"center\">";
              if($page>1)
              {
                $ppage = $page-1;
                echo "<a href=\"gallery.php?action=$action&amp;page=$ppage&amp;sid=$sid&amp;who=$who\">«PREV</a> ";
              }
              if($page<$num_pages)
              {
                $npage = $page+1;
                echo "<a href=\"gallery.php?action=$action&amp;page=$npage&amp;sid=$sid&amp;who=$who\">Next»</a>";
              }
              echo "
          $page/$num_pages
          ";
              if($num_pages>2)
              {
                 $rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
                  $rets .= "<anchor>[GO]";
                  $rets .= "<go href=\"gallery.php\" method=\"get\">";
                  $rets .= "<postfield name=\"action\" value=\"$action\"/>";
                  $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
                  $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
                  $rets .= "</go></anchor>";
          
                  echo $rets;
              }
          echo "
          <a href=\"gallery.php?action=main&amp;sid=$sid\">User Gallery</a>
          ";
            echo "<a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
          
              echo "</p>";
               echo "</card>";
            
          
          }
          else if($action=="comments")
          {
              $who = $_GET["who"];
          $gid = $_GET["gid"];
              addonline(getuid_sid($sid),"Viewing Photo Comments","");
                      echo "<card id=\"main\" title=\"Kranic Wap\">";
              $uid = getuid_sid($sid);
              
              //////ALL LISTS SCRIPT <<
          
              if($page=="" || $page<=0)$page=1;
              $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM fun_galcomments WHERE pid=&#39;".$gid."&#39;"));
              $num_items = $noi[0]; //changable
              $items_per_page= 5;
              $num_pages = ceil($num_items/$items_per_page);
              if(($page>$num_pages)&&$page!=1)$page= $num_pages;
              $limit_start = ($page-1)*$items_per_page;
          
              
                 $sql = "SELECT id, pid, text, byuser, time FROM fun_galcomments WHERE pid=&#39;".$gid."&#39; ORDER BY id DESC LIMIT $limit_start, $items_per_page";
          
          
              echo "
          
          ";
              $items = mysql_query($sql);
              echo mysql_error();
              if(mysql_num_rows($items)>0)
              {
              while ($item = mysql_fetch_array($items))
              {
                  
                    if(isonline($item[3]))
            {
              $iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";
              
            }else{
              $iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
            }
              $snick = getnick_uid($item[3]);
                $lnk = "<a href=\"index.php?action=viewuser&amp;who=$item[3]&amp;sid=$sid\">$iml$snick</a>:";
                $bs = date("d m y-H:i:s",$item[4]);
                echo "$lnk
          [size="1"]";
                
          $me = getuid_sid($sid);
          if($who=="$me") {
          $can = "a";
          }else{
          $can = "b";
          }
            if(ismod($uid)||$can=="a")
            {
             $delnk = "<a href=\"modproc.php?action=delcmt&amp;sid=$sid&amp;id=$item[0]\">[x]</a>";
                }else{
                  $delnk = "";
                }
                $text = parsepm($item[2], $sid);
                echo "$text $delnk
          ";
          echo "$bs";
          echo "
          ";
                echo "[/size]";
          
              }
              }
              echo "</p>";
              echo "<p align=\"center\">";
              if($page>1)
              {
                $ppage = $page-1;
                echo "<a href=\"gallery.php?action=$action&amp;page=$ppage&amp;sid=$sid&amp;who=$who&amp;gid=$gid\">«PREV</a> ";
              }
              if($page<$num_pages)
              {
                $npage = $page+1;
                echo "<a href=\"gallery.php?action=$action&amp;page=$npage&amp;sid=$sid&amp;who=$who&amp;gid=$gid\">Next»</a>";
              }
              echo "
          $page/$num_pages
          ";
              if($num_pages>2)
              {
                 $rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
                  $rets .= "<anchor>[GO]";
                  $rets .= "<go href=\"gallery.php\" method=\"get\">";
                  $rets .= "<postfield name=\"action\" value=\"$action\"/>";
                  $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
                  $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
                  $rets .= "</go></anchor>";
          
                  echo $rets;
              }
          
              echo "</p>";
            ////// UNTILL HERE >>
              echo "<p align=\"center\">";
             $me = getuid_sid($sid);
          if($me!="$who") {
              echo "<a href=\"gallery.php?action=addcomment&amp;sid=$sid&amp;who=$who&amp;gid=$gid\">Add Comment</a>
          ";
          }
          echo "<a href=\"gallery.php?action=main&amp;sid=$sid\">User Gallery</a>
          ";
              echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
          echo "Home</a>";
            echo "</p>";
            echo "</card>";
          
          }
          else if($action=="addcomment")
          {
              $who = $_GET["who"];
          $gid = $_GET["gid"];
              addonline(getuid_sid($sid),"Adding Photo Comments","");
               echo "<card id=\"main\" title=\"Kranic Wap\">";
              $uid = getuid_sid($sid);
              $sql = "SELECT itemurl FROM fun_gallery  WHERE id=&#39;".$gid."&#39;";
          
          echo "<p align=\"center\">";
          $items = mysql_query($sql);
              echo mysql_error();
              if(mysql_num_rows($items)>0)
              {
              while ($item = mysql_fetch_array($items))
              {
                
              $img = $item[0];
              
                $lnk = "<img src=\"max.php?filename=$img\" alt=\"$id\"/>
          ";
                  
                echo "$lnk";
          echo "<go href=\"genproc.php?action=commentadd&amp;sid=$sid&amp;gid=$gid\" method=\"post\">";
          echo "<postfield name=\"text\" value=\"$(text)\"/>";
          echo "</go>";
          
          
            $vb = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM fun_prate WHERE uid=&#39;".$uid."&#39; AND pid=&#39;".$gid."&#39;"));
            if($vb[0]==0)
            {
            
          
          
            }else{
          $rinfo = mysql_fetch_array(mysql_query("SELECT COUNT(*) as nofr, SUM(prate) as nofp FROM fun_prate WHERE pid=&#39;".$gid."&#39;"));
          $counts = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM fun_prate WHERE pid=&#39;".$gid."&#39;"));
          if($counts[0]>0) {
              $ther = $rinfo[1]/$rinfo[0];
              $rating = "Rating: $ther/$rinfo[1] (votes$counts[0])
          ";
          }else{
          $rating = "";
          }
              echo "$rating";
            }
          
          
          echo "[size="1"]Comment:[/size]
          ";
          echo "<input name=\"text\" maxlength=\"150\"/>
          ";
          echo "[size="1"]<anchor>Add Comment!";
          echo "<go href=\"genproc.php?action=commentadd&amp;sid=$sid&amp;gid=$gid\" method=\"post\">";
          echo "<postfield name=\"text\" value=\"$(text)\"/>";
          echo "</go></anchor>[/size]
          
          [size="1"]";
              }
              }
              echo "<a href=\"gallery.php?action=main&amp;sid=$sid\">Gallery Main</a>
          ";
          
              echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
          echo "Home</a>[/size]";
            echo "</p>";
          echo "</card>";
            
          
          }else{
                addonline(getuid_sid($sid),"Lost in user gallery lol","");
              
                  echo "<card id=\"main\" title=\"Kranic Wap\">";
            echo "<p align=\"center\">";
            echo "I don&#39;t know how did you get into here, but there&#39;s nothing to show
          
          ";
          echo "<a href=\"gallery.php?action=main&amp;sid=$sid\">User Gallery</a>
          ";
            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
          echo "Home</a>";
            echo "</p>";
          echo "</card>";
          }
             
          
          
          ?>
          
          </wml>

          post edited by wizard. use this file

          Comment


            #6
            kwl ,

            Comment


              #7
              i got the same error in male and female gallery

              Comment


                #8
                i just found the best package ever

                http://amplehosting.co.za/web-hosting/

                look at the diamond hosting package , its kwl

                Comment


                  #9
                  wait rong topic lol my bad

                  Comment


                    #10
                    i got the same error in male and female gallery[/b]

                    wats ur site link. i want to see it

                    Comment


                      #11
                      search hear you will find 1 good gallery

                      Comment


                        #12
                        search hear you will find 1 good gallery[/b]
                        hmm good gesture, but i dont need a new gallery... wizard here is the link bro kranicwap

                        Comment

                        Working...
                        X