Changing Perm

Started on the old forum in December 2007 · view the original in the archive · old links redirect here

34 replies · 1,672 views · started 18 years ago · 1 min read

7 participants
wizard Senior · 493 posts #21

wizard bro ur code gives this syntax error, unexpected T_ELSE in /modproc.php on line 624

learner im positive that code works. i copied it from funmobile mod which alot of ppl use n can attest to the fact that it works. kenny u did not use if-else iteration or exit(); function so urs will show both cards if sum1 is trying to ban admin.

learner Lead · 587 posts #22

wizard bro henestly it is giving me error here it is

Parse error: syntax error, unexpected T_ELSE in /home/public_html/wap/modproc.php on line 626 External image (may be gone)

here is my modproc codes bro

else if($action=="pun")
{
    $pid = $_POST["pid"];
    $who = $_POST["who"];
    $pres = $_POST["pres"];
    $pds = $_POST["pds"];
    $phr = $_POST["phr"];
    $pmn = $_POST["pmn"];
    $psc = $_POST["psc"];
    echo "<card id=\"main\" title=\"Mod CP\">";
  echo "<p align=\"center\">";

$getulvl = mysql_fetch_array(mysql_query("SELECT perms FROM ibwf_users WHERE id='".$who."'"));
if($getulvl[0]>0) 
{
echo "You cannot punish another staff member doofus!";
}else{  

  $uip = "";
  $ubr = "";
  $pmsg[0]="Trashed";
  $pmsg[1]="Banned";
  $pmsg[2]="IP-Banned";
  if($pid=='2')
  {
    //ip ban
    $uip = getip_uid($who);
    $ubr = getbr_uid($who);
  }
  if(trim($pres)=="")
  {
    echo "<img src=\"images/notok.gif\" alt=\"X\"/>You must Specify a reson for punishing the user";
  }else{
    $timeto = $pds*24*60*60;
    $timeto += $phr*60*60;
    $timeto += $pmn*60;
    $timeto += $psc;
    $ptime = $timeto + time();
    $unick = getnick_uid($who);
    $res = mysql_query("INSERT INTO ibwf_penalties SET uid='".$who."', penalty='".$pid."', exid='".getuid_sid($sid)."', timeto='".$ptime."', pnreas='".mysql_escape_string($pres)."', ipadd='".$uip."', browserm='".$ubr."'");
    if($res)
          {
            mysql_query("UPDATE ibwf_users SET lastpnreas='".$pmsg[$pid].": ".mysql_escape_string($pres)."' WHERE id='".$who."'");
            mysql_query("INSERT INTO ibwf_mlog SET action='penalties', details='[b]".getnick_uid(getuid_sid($sid))."[/b] $pmsg[$pid] The user [b]".$unick."[/b] For ".$timeto." Seconds', actdt='".time()."'");
            
            echo "<img src=\"images/ok.gif\" alt=\"O\"/>$unick is $pmsg[$pid] for $timeto Seconds";
          }else{
            echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
          }
  }
    echo "

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

where am i going wrong?

Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

BEST MOBILE ADVERTISER

External image (may be gone)

mcKeny Developer · 130 posts #23

try adding a next }at tha end

R.M.C

PHP Adovocate B)

mcKeny Developer · 130 posts #25

CODE

else if($action=="pun")

{ $pid = $_POST["pid"];

$who = $_POST["who"];

$pres = $_POST["pres"];

$pds = $_POST["pds"];

$phr = $_POST["phr"];

$pmn = $_POST["pmn"];

$psc = $_POST["psc"];

echo "<card id="main" title="Mod CP">";

echo " ";

$getulvl = mysql_fetch_array(my sql_query("SELECT perms FROM ibwf_users WHERE id='".$who."'"));

if($getulvl[0 ]>0)

{ echo "You cannot punish another staff member doofus!";

}else{

$uip = "";

$ubr = "";

$pmsg[0]="Trashed";

$pmsg[1]="Banned";

$pmsg[2]="IP-Banned";

if($pid=='2')

{//ip ban

$uip = getip_uid($who);

$ubr = getbr_uid($who);

} if(trim($pres)=="")

{ echo "<img src="images/notok.gi f" alt="X"/>You must Specify a reson for punishing the user";

}else{

$timeto = $pds*24 *60 *60;

$timeto + = $phr*60 *60;

$timeto + = $pmn*60;

$timeto += $psc;

$ptime = $timeto + time();

$unick = getnick_uid($who);

$res = mysql_query("INSERT INTO ibwf_penalties SET uid='".$who."', penalty='".$pid."', exid='".getuid_sid ($sid)."', timeto='".$ptime."', pnreas='".mysql_escap e_string($pres)."', ipadd='".$uip."', browserm='".$ubr."'");

if($res)

{ mysql_query("UPDATE ibwf_users SET lastpnreas='".$pmsg[$p id].": ".mysql_escape_string ($pres)."' WHERE id='".$who."'");

mysql_query("INSERT INTO ibwf_mlog SET action='penalties', details='".getnick_uid (getuid_sid($sid))." $pmsg[$pid] The user ".$unick." For ".$timeto." Seconds', actdt='".time()."'");

echo "<img src="images/ok.gif" alt="O"/>$unick is $ pmsg[$pid] for $timeto Seconds";

}else{

echo "<img src="images/notok.gi f" alt="X"/>Database Error";

} } <-- add a next } there

echo "

<a href="index.php?acti on=main&sid=$sid "><img src="images/home.gif" alt="*"/>";

echo "Home</a>";

echo " </card>";

}

R.M.C

PHP Adovocate B)

alesh Lead · 604 posts #27

learner im positive that code works. i copied it from funmobile mod which alot of ppl use n can attest to the fact that it works. kenny u did not use if-else iteration or exit(); function so urs will show both cards if sum1 is trying to ban admin.

ur right, tht code works... i copied 2 my script nd it works... the only problem is tht admin cnt ban mod also....

which is lil iritating lol... u have 2 remove mod permision 1st and then ban

eeeeerrr....

mcKeny Developer · 130 posts #28

well you wouldn't be able to band any staff at all to solve this you would put if($getulvl[0 ]=='2')

{ echo "you cant band a admin you fool";

}

R.M.C

PHP Adovocate B)

mcKeny Developer · 130 posts #32

hmmm let us ave a look on the coding

R.M.C

PHP Adovocate B)

learner Lead · 587 posts #33

here bro

<?php
/*
IrisBlaze wap forum
by Ra'ed Shabana
*/
//» »
//« «
include("config.php");
include("core.php");
//session_start();
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=\"lol\">";
      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=\"lol\">";   
      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='".$uid."' AND penalty='1'"));
      $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=\"lol\">";
echo "<p align=\"center\">";
echo "send your pics 
";
echo "If you have problem uploading and pictures will be added within 2 days after being sent!";
echo "</p>

";
$males = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid) FROM fun_gallery WHERE sex='M'"));
echo "<a href=\"gallery.php?action=male&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='F'"));
echo "<a href=\"gallery.php?action=female&sid=$sid\"><img src=\"images/female.gif\" alt=\"\"/>Female Gallery($females[0])</a>
";
echo "
";
echo "<a href=\"gallery.php?action=gallery&sid=$sid\">+Upload Photo+</a>
";
  echo "<a href=\"index.php?action=main&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=\"lol\">";
  echo "<p align=\"center\">";

echo "If you have a url to ur photo u may add it to the gallery below
Please note that only .jpeg/.jpg files will show in gallery.
All other file formats will be removed my staff

";

echo "[size="1"]Image URL:[/size] <input name=\"itemurl\" maxlength=\"100\" value=\"http://\"/>
";
echo "<anchor>Add Photo";
echo "<go href=\"genproc.php?action=addgal&sid=$sid\" method=\"post\">";
echo "<postfield name=\"itemurl\" value=\"$(itemurl)\"/>";
echo "</go></anchor>";

  echo "

";
echo "<a href=\"gallery.php?action=main&sid=$sid\">User Gallery</a>
";
  echo "<a href=\"index.php?action=main&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=\"lol\">";
    $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='M'"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid) FROM fun_gallery WHERE sex='M'"));
    }

    $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='M' 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='".$who."'"));
        $lnk = "<a href=\"gallery.php?action=viewuser&who=$who&sid=$sid\">$user($countpics[0])</a>
";
       echo "$lnk"; 
    }
    }

    echo "[/size]</p>";
echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"gallery.php?action=$action&page=$ppage&sid=$sid\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"gallery.php?action=$action&page=$npage&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&sid=$sid\">User Gallery</a>
";
echo "<a href=\"index.php?action=main&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=\"lol\">";
    $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='F'"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid) FROM fun_gallery WHERE sex='F'"));
    }

    $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='F' 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='".$who."'"));
        $lnk = "<a href=\"gallery.php?action=viewuser&who=$who&sid=$sid\">$user($countpics[0])</a>
";
        
echo "$lnk";

    }
    }else{
echo "female gallery is empty";
}
    echo "[/size]</p>";
echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"gallery.php?action=$action&page=$ppage&sid=$sid\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"gallery.php?action=$action&page=$npage&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&sid=$sid\">User Gallery</a>
";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
    echo "</p>";
echo "</card>";

}
else if($action=="viewuser")
{
      $who = $_GET["who"];
    addonline(getuid_sid($sid),"Viewing user Photos","");
         echo "<card id=\"main\" title=\"lol\">";
    $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='".$who."'"));
    }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='".$who."' 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\">";
    $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='".$id."'"));
$counts = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM fun_prate WHERE pid='".$id."'"));
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='".$id."'"));
$me = getuid_sid($sid);
if($who=="$me") {
$use = "<a href=\"genproc.php?action=useav&sid=$sid&gid=$item[0]\">Use as Avatar</a> | ";
}else{
$use = "";
}
      if(candelgal($uid, $item[0]))
      {
        $delnk = "<a href=\"genproc.php?action=delgal&sid=$sid&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&action=comments&sid=$sid&gid=$item[0]\">Comments($gall[0])</a>
";
      

    }
    }
    echo "</p>";
echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"gallery.php?action=$action&page=$ppage&sid=$sid&who=$who\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"gallery.php?action=$action&page=$npage&sid=$sid&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&sid=$sid\">User Gallery</a>
";
  echo "<a href=\"index.php?action=main&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=\"lol\">";
    $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='".$gid."'"));
    $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='".$gid."' 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&who=$item[3]&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&sid=$sid&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&page=$ppage&sid=$sid&who=$who&gid=$gid\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"gallery.php?action=$action&page=$npage&sid=$sid&who=$who&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&sid=$sid&who=$who&gid=$gid\">Add Comment</a>
";
}
echo "<a href=\"gallery.php?action=main&sid=$sid\">User Gallery</a>
";
    echo "<a href=\"index.php?action=main&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=\"lol\">";
    $uid = getuid_sid($sid);
    $sql = "SELECT itemurl FROM fun_gallery  WHERE id='".$gid."'";

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&sid=$sid&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='".$uid."' AND pid='".$gid."'"));
  if($vb[0]==0)
  {
  
  echo "Rate Photo: <select name=\"prate\">";
  echo "<option value=\"1\">1</option>";
  echo "<option value=\"2\">2</option>";
  echo "<option value=\"3\">3</option>";
  echo "<option value=\"4\">4</option>";
  echo "<option value=\"5\">5</option>";
  echo "<option value=\"6\">6</option>";
  echo "<option value=\"7\">7</option>";
  echo "<option value=\"8\">8</option>";
  echo "<option value=\"9\">9</option>";
  echo "<option value=\"10\">10</option>";
  echo "</select>
";

  }else{
$rinfo = mysql_fetch_array(mysql_query("SELECT COUNT(*) as nofr, SUM(prate) as nofp FROM fun_prate WHERE pid='".$gid."'"));
$counts = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM fun_prate WHERE pid='".$gid."'"));
if($counts[0]>0) {
    $ther = $rinfo[1]/$rinfo[0];
    $rating = "Rating: $ther/$rinfo[1] (votes$counts[0])
";
}else{
$rating = "";
}
    echo "$rating";
  }

echo "Comment:
";
echo "<input name=\"text\" maxlength=\"150\"/>
";
echo "<anchor>Add";
echo "<go href=\"genproc.php?action=commentadd&sid=$sid&gid=$gid\" method=\"post\">";
echo "<postfield name=\"text\" value=\"$(text)\"/>";
echo "</go></anchor>
";
    }
    }
    echo "<a href=\"gallery.php?action=main&sid=$sid\">User Gallery</a>
";

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

}else{
      addonline(getuid_sid($sid),"Lost in user gallery lol","");
    
        echo "<card id=\"main\" title=\"lol\">";
  echo "<p align=\"center\">";
  echo "I don't know how did you get into here, but there's nothing to show

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

?>

</wml>

Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

BEST MOBILE ADVERTISER

External image (may be gone)

thunderwap Developer · 169 posts #35

ur right, tht code works... i copied 2 my script nd it works... the only problem is tht admin cnt ban mod also....

which is lil iritating lol... u have 2 remove mod permision 1st and then ban

this both codes not working even keny codes giving errors and also wizards codings working that no other staff can bann other but a staff also cant bann a normal user as it giving errors in wizard codings lol. can any 1 plz post a perfect codings.

WANT GOOD CHEAP HOSTING WITH 99% UPTIME? THEN PM ME FOR DETAILS!!

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close