plez some one tel me hw to block site url in retrivewap script and hw to do manual validate option
i want tp knw abut hw to block site url(retrivewap)
Collapse
X
-
in your main include file (i dont use these wap scripts so i dont know the common one, i think its core.php) add
Code:$bansite = array("google.com", "34.67.42.123"); foreach($bansite as $b) { if(strpos($b, $_SERVER['HTTP_REFERER']) !== false && strpos($b,$_SERVER['REMOTE_ADDR']) !== false) die("Bugger Off!"); }
validate.php
Code:<?php if(isset($_GET['u'])) { $username=$_GET['u']; mysql_query("UPDATE users SET validated=1 WHERE username='".$username."'"); echo "$username validated!<BR><BR>"; } ?> <form method=post action=validate.php> <input type='text' name='u' /> <input type='submit' value='validate' /> </form>
-
rokzwapzcp
PHP Code:<?php
include("config.php");
include("core.php");
if($mime== WEB)
{
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>";
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
}else{
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
}
$bcon = connectdb();
if (!$bcon)
{
echo dberror($mime);
}
$getuthm = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));
$uth = $getuthm[0];
if(!$uth=="")
{
$uthm = "$uth";
$uthm = utheme($uthm);
}else{
$uthm = "default.css";
}
$action = $_GET["action"];
$page = $_GET["page"];
$who = $_GET["who"];
$brws = explode(" ",$HTTP_USER_AGENT);
$ubr = $brws[0];
$uip = getip();
if((islogged($ses)==false)||($uid==0))
{
echo notlogged($mime);
}
if(!isrokz(getuid_ses($ses)))
{
echo notrokz($mime);
}
if(isipbanned($uip,$ubr))
{
if(!isshield(getuid_ses($ses)))
{
echo useripbanned($mime,$uip,$ubr);
}
}
//echo isbanned($uid);
if(isbanned($uid))
{
echo userbanned($mime,$uid);
}
addonline(getuid_ses($ses),"Rokz CP","");
if($action=="general")
{
if($mime== WEB)
{
echo webhead($uthm,$stitle);
$postaf = getpostaf();
$topicaf = gettopicaf();
$maxbuds = getmaxbuds();
$shoutcredits = getshoutcredits();
$clubcredits = getclubcredits();
$xtm = getsxtm();
$pmaf = getpmaf();
$fvw = getfview();
$fmsg = htmlspecialchars(getfmsg());
if(canreg())
{
$arv = "e";
}else{
$arv= "d";
}
echo "<div class=\"center\">";
echo "<b>General Settings</b><br/>";
echo "</div>";
}else if($action=="blockedsites")
{
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p>";
echo "<a href=\"rokzcp.php?action=addsite&ses=$ses\">»Add Site</a><br/>";
echo "<a href=\"rokzcp.php?action=viewsite&ses=$ses\">»View Sites</a><br/>";
//echo "<a href=\"rokzcp.php?action=delsite&ses=$ses\">»Delete Site</a><br/>";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "rokzcp CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p>";
echo "<a href=\"rokzcp.php?action=addsite&ses=$ses\">»Add Site</a><br/>";
echo "<a href=\"rokzcp.php?action=viewsite&ses=$ses\">»View Sites</a><br/>";
//echo "<a href=\"rokzcp.php?action=delsite&ses=$ses\">»Delete Site</a><br/>";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "ROKZ CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}else if($action=="addsite")
{
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p>";
echo "Please Enter The Address Of the Site To Block<br/>";
echo "<form action=\"admproc.php?action=addsite&ses=$ses\" method=\"post\">";
echo "<input type=\"text\" name=\"site\"/>";
echo "<br/>";
echo "<input type=\"submit\" value=\"Add\"/>";
echo "</form>";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "ROKZ CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p>";
echo "Please Enter The Address Of the Site To Block<br/>";
echo "<input name=\"site\"/>";
echo "<br/><anchor>Add Site";
echo "<go href=\"admproc.php?action=addsite&ses=$ses\" method=\"post\">";
echo "<postfield name=\"site\" value=\"$(site)\"/>";
echo "</go>";
echo "</anchor>";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "ROLZ CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}else if($action=="viewsite")
{
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p>";
echo "Currently Blocked Sites Are Listed Below";
echo "</p><p>";
$countblocked = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_blockedsite"));
if($page=="" || $page<=0)$page=1;
$num_items = $countblocked[0]; //changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$res = mysql_query("SELECT * FROM ibwf_blockedsite ORDER BY id LIMIT $limit_start, $items_per_page");
while ($row = mysql_fetch_array($res))
{
echo $row[1];
echo " <a href=\"admproc.php?action=delsite&ses=$ses&id=$row[0]\">[X]</a>";
echo "<br/>";
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"rokzcp.php?action=$action&page=$ppage&ses=$ses\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"rokzcp.php?action=$action&page=$npage&ses=$ses\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "<form action=\"rokzcp.php\" method=\"get\">";
$rets .= "Jump to page<input name=\"page\" format=\"*N\" size=\"3\"/>";
$rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
$rets .= "<input type=\"hidden\" name=\"ses\" value=\"$ses\"/>";
$rets .= "</form>";
echo $rets;
}
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "ROKZ CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p>";
echo "Currently Blocked Sites Are Listed Below";
echo "</p><p>";
$countblocked = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_blockedsite"));
if($page=="" || $page<=0)$page=1;
$num_items = $countblocked[0]; //changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$res = mysql_query("SELECT * FROM ibwf_blockedsite ORDER BY id LIMIT $limit_start, $items_per_page");
while ($row = mysql_fetch_array($res))
{
echo $row[1];
echo " <a href=\"admproc.php?action=delsite&ses=$ses&id=$row[0]\">[X]</a>";
echo "<br/>";
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"rokzcp.php?action=$action&page=$ppage&ses=$ses\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"rokzcp.php?action=$action&page=$npage&ses=$ses\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"rokzcp.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "<postfield name=\"ses\" value=\"$ses\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "Rokz CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}else if($action=="spamwords")
{
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p>";
echo "<a href=\"rokzcp.php?action=addword&ses=$ses\">»Add Word</a><br/>";
echo "<a href=\"rokzcp.php?action=viewwords&ses=$ses\">»View Word</a><br/>";
//echo "<a href=\"rokzcp.php?action=delword&ses=$ses\">»Delete Word</a><br/>";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "ROKZ CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p>";
echo "<a href=\"rokzcp.php?action=addword&ses=$ses\">»Add Word</a><br/>";
echo "<a href=\"rokzcp.php?action=viewwords&ses=$ses\">»View Word</a><br/>";
//echo "<a href=\"rokzcp.php?action=delword&ses=$ses\">»Delete Word</a><br/>";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "ROKZCP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}else if($action=="addword")
{
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p>";
echo "Please Enter The word To Block<br/>";
echo "<form action=\"admproc.php?action=addword&ses=$ses\" method=\"post\">";
echo "<input type=\"text\" name=\"word\"/>";
echo "<br/>";
echo "<input type=\"submit\" value=\"Add\"/>";
echo "</form>";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "ROKZ CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p>";
echo "Please Enter The word To Block<br/>";
echo "<input name=\"word\"/>";
echo "<br/><anchor>Add Word";
echo "<go href=\"admproc.php?action=addword&ses=$ses\" method=\"post\">";
echo "<postfield name=\"word\" value=\"$(word)\"/>";
echo "</go>";
echo "</anchor>";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "ROKZCP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}else if($action=="viewwords")
{
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p>";
echo "Currently Blocked Words Are Listed Below";
echo "</p><p>";
$countblocked = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_spam"));
if($page=="" || $page<=0)$page=1;
$num_items = $countblocked[0]; //changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$res = mysql_query("SELECT * FROM ibwf_spam ORDER BY id LIMIT $limit_start, $items_per_page");
while ($row = mysql_fetch_array($res))
{
echo $row[1];
echo " <a href=\"admproc.php?action=delword&ses=$ses&id=$row[0]\">[X]</a>";
echo "<br/>";
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"rokzcp.php?action=$action&page=$ppage&ses=$ses\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"rokzcp.php?action=$action&page=$npage&ses=$ses\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "<form action=\"rokzcp.php\" method=\"get\">";
$rets .= "Jump to page<input name=\"page\" format=\"*N\" size=\"3\"/>";
$rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
$rets .= "<input type=\"hidden\" name=\"ses\" value=\"$ses\"/>";
$rets .= "</form>";
echo $rets;
}
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "ROKZ CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p>";
echo "Currently Blocked Words Are Listed Below";
echo "</p><p>";
$countblocked = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_spam"));
if($page=="" || $page<=0)$page=1;
$num_items = $countblocked[0]; //changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$res = mysql_query("SELECT * FROM ibwf_spam ORDER BY id LIMIT $limit_start, $items_per_page");
while ($row = mysql_fetch_array($res))
{
echo $row[1];
echo " <a href=\"admproc.php?action=delword&ses=$ses&id=$row[0]\">[X]</a>";
echo "<br/>";
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"rokzcp.php?action=$action&page=$ppage&ses=$ses\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"rokzcp.php?action=$action&page=$npage&ses=$ses\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"rokzcp.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "<postfield name=\"ses\" value=\"$ses\"/>";
$rets .= "</go></anchor><br/>";
echo $rets;
}
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "ROKZ CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}else if($action=="nicks")
{
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p>";
echo "<a href=\"rokzcp.php?action=rnicks&ses=$ses\">»Reserved Names</a><br/>";
echo "<a href=\"rokzcp.php?action=bnicks&ses=$ses\">»Blocked Names</a><br/>";
echo "<a href=\"rokzcp.php?action=addnicks&ses=$ses\">»Add Names</a><br/>";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "ROKZCP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p>";
echo "<a href=\"rokzcp.php?action=rnicks&ses=$ses\">»Reserved Names</a><br/>";
echo "<a href=\"rokzcp.php?action=bnicks&ses=$ses\">»Blocked Names</a><br/>";
echo "<a href=\"admincp.php?action=addnicks&ses=$ses\">»Add Names</a><br/>";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=admincp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "ADMIN CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}else if($action=="rnicks")
{
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p>";
$countnicks = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_nicks WHERE nicklvl='1'"));
if($page=="" || $page<=0)$page=1;
$num_items = $countnicks[0]; //changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$getnicks = mysql_query("SELECT id, name FROM ibwf_nicks WHERE nicklvl='1' ORDER BY id LIMIT $limit_start, $items_per_page");
while ($getnick = mysql_fetch_array($getnicks)) {
echo $getnick[1];
echo " <a href=\"admproc.php?action=delnick&ses=$ses&id=$getnick[0]\">[X]</a>";
echo "<br/>";
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"rokzcp.php?action=$action&page=$ppage&ses=$ses\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"rokzcp.php?action=$action&page=$npage&ses=$ses\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "<form action=\"rokzcp.php\" method=\"get\">";
$rets .= "Jump to page<input name=\"page\" format=\"*N\" size=\"3\"/>";
$rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
$rets .= "<input type=\"hidden\" name=\"ses\" value=\"$ses\"/>";
$rets .= "</form>";
echo $rets;
}
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "ROKZ CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p>";
$countnicks = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_nicks WHERE nicklvl='1'"));
if($page=="" || $page<=0)$page=1;
$num_items = $countnicks[0]; //changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$getnicks = mysql_query("SELECT id, name FROM ibwf_nicks WHERE nicklvl='1' ORDER BY id LIMIT $limit_start, $items_per_page");
while ($getnick = mysql_fetch_array($getnicks)) {
echo $getnick[1];
echo " <a href=\"admproc.php?action=delnick&ses=$ses&id=$getnick[0]\">[X]</a>";
echo "<br/>";
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"rokzcp.php?action=$action&page=$ppage&ses=$ses\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"rokzcp.php?action=$action&page=$npage&ses=$ses\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"rokzcp.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "<postfield name=\"ses\" value=\"$ses\"/>";
$rets .= "</go></anchor><br/>";
echo $rets;
}
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "ROKZCP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}else if($action=="bnicks")
{
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p>";
$countnicks = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_nicks WHERE nicklvl='2'"));
if($page=="" || $page<=0)$page=1;
$num_items = $countnicks[0]; //changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$getnicks = mysql_query("SELECT id, name FROM ibwf_nicks WHERE nicklvl='2' ORDER BY id LIMIT $limit_start, $items_per_page");
while ($getnick = mysql_fetch_array($getnicks)) {
echo $getnick[1];
echo " <a href=\"admproc.php?action=delnick&ses=$ses&id=$getnick[0]\">[X]</a>";
echo "<br/>";
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"rokzcp.php?action=$action&page=$ppage&ses=$ses\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"rokzcp.php?action=$action&page=$npage&ses=$ses\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "<form action=\"rokzcp.php\" method=\"get\">";
$rets .= "Jump to page<input name=\"page\" format=\"*N\" size=\"3\"/>";
$rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
$rets .= "<input type=\"hidden\" name=\"ses\" value=\"$ses\"/>";
$rets .= "</form>";
echo $rets;
}
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "ROKZ CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p>";
$countnicks = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_nicks WHERE nicklvl='2'"));
if($page=="" || $page<=0)$page=1;
$num_items = $countnicks[0]; //changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$getnicks = mysql_query("SELECT id, name FROM ibwf_nicks WHERE nicklvl='2' ORDER BY id LIMIT $limit_start, $items_per_page");
while ($getnick = mysql_fetch_array($getnicks)) {
echo $getnick[1];
echo " <a href=\"admproc.php?action=delnick&ses=$ses&id=$getnick[0]\">[X]</a>";
echo "<br/>";
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"rokzcp.php?action=$action&page=$ppage&ses=$ses\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"rokzcp.php?action=$action&page=$npage&ses=$ses\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"rokzcp.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "<postfield name=\"ses\" value=\"$ses\"/>";
$rets .= "</go></anchor><br/>";
echo $rets;
}
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "ROKZ CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}else if($action=="addnicks")
{
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p>";
echo "<form action=\"admproc.php?action=addnick&ses=$ses\" method=\"post\">";
echo "Enter Name:<br/>";
echo "<input type=\"text\" name=\"nick\" maxlength=\"15\"/><br/>";
echo "Status:<br/>";
echo "<select name=\"level\">";
echo "<option value=\"1\">Reserved</option>";
echo "<option value=\"2\">Blocked</option>";
echo "</select>";
echo "<br/>";
echo "<input type=\"submit\" value=\"Add\"/>";
echo "</form>";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=admincp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "ADMIN CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p>";
echo "Enter Name:<br/>";
echo "<input type=\"text\" name=\"nick\" maxlength=\"15\"/><br/>";
echo "Status:<br/>";
echo "<select name=\"level\">";
echo "<option value=\"1\">Reserved</option>";
echo "<option value=\"2\">Blocked</option>";
echo "</select>";
echo "<br/>";
echo "<anchor>Add Name<go href=\"admproc.php?action=addnick&ses=$ses\" method=\"post\">";
echo "<postfield name=\"nick\" value=\"$(nick)\"/>";
echo "<postfield name=\"level\" value=\"$(level)\"/>";
echo "</go></anchor>";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "ROKZ CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}else{
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
echo "I don't know how did you get into here, but there's nothing to show<br/><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
echo "I don't know how did you get into here, but there's nothing to show<br/><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}
?>
rokzproc
PHP Code:<?php
include("config.php");
include("core.php");
if($mime== WEB)
{
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>";
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
}else{
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
}
$bcon = connectdb();
if (!$bcon)
{
echo dberror($mime);
}
$getuthm = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));
$uth = $getuthm[0];
if(!$uth=="")
{
$uthm = "$uth";
$uthm = utheme($uthm);
}else{
$uthm = "default.css";
}
$action = $_GET["action"];
$page = $_GET["page"];
$who = $_GET["who"];
$brws = explode(" ",$HTTP_USER_AGENT);
$ubr = $brws[0];
$uip = getip();
if((islogged($ses)==false)||($uid==0))
{
echo notlogged($mime);
}
if(!isrokz(getuid_ses($ses)))
{
echo notrokz($mime);
}
if(isipbanned($uip,$ubr))
{
if(!isshield(getuid_ses($ses)))
{
echo useripbanned($mime,$uip,$ubr);
}
}
//echo isbanned($uid);
if(isbanned($uid))
{
echo userbanned($mime,$uid);
}
addonline(getuid_ses($ses),"rokz CP","");
if($action=="general")
{
$postaf = $_POST["postaf"];
$topicaf = $_POST["topicaf"];
$maxbuds = $_POST["maxbuds"];
$xtm = $_POST["xtm"];
$fmsg = $_POST["fmsg"];
$arv = $_POST["arv"];
$pmaf = $_POST["pmaf"];
$fvw = $_POST["fvw"];
$shoutcredits = $_POST["shoutcredits"];
$clubcredits = $_POST["clubcredits"];
if($arv=="d")
{
$arv = 0;
}else{
$arv = 1;
}
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
$res = mysql_query("INSERT INTO ibwf_blockedsite SET site='".$site."'");
if($res)
{
echo mysql_error();
echo "<img src=\"images/ok.gif\" alt=\"O\"/>Site $site Added Successfully to Blocked List<br/>";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error Adding Site<br/>";
}
echo "<br/>";
echo "<a href=\"rokzcp.php?action=blockedsites&ses=$ses\">";
echo "Blocked Sites List</a><br/>";
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "rokz CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
$site = $_POST["site"];
echo $site;
echo "<br/>";
$res = mysql_query("INSERT INTO ibwf_blockedsite SET site='".$site."'");
if($res)
{
echo mysql_error();
echo "<img src=\"images/ok.gif\" alt=\"O\"/>Site $site Added Successfully to Blocked List<br/>";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error Adding Site<br/>";
}
echo "<br/>";
echo "<a href=\"rokzcp.php?action=blockedsites&ses=$ses\">";
echo "Blocked Sites List</a><br/>";
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "rokz CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}else if($action=="delsite")
{
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
$id=$_GET["id"];
$sitena = mysql_query("SELECT site FROM ibwf_blockedsite WHERE id='".$id."'");
$site = mysql_fetch_array($sitena);
$site=$site[0];
$res = mysql_query("DELETE FROM ibwf_blockedsite WHERE id='".$id."'");
if($res)
{
echo "<img src=\"images/ok.gif\" alt=\"O\"/>Site $site Removed Successfully from Blocked List<br/>";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error Removing $site <br/>";
}
echo "<br/>";
echo "<a href=\"rokzcp.php?action=blockedsites&ses=$ses\">";
echo "Blocked Sites List</a><br/>";
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "rokz CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
$id=$_GET["id"];
$sitena = mysql_query("SELECT site FROM ibwf_blockedsite WHERE id='".$id."'");
$site = mysql_fetch_array($sitena);
$site=$site[0];
$res = mysql_query("DELETE FROM ibwf_blockedsite WHERE id='".$id."'");
if($res)
{
echo "<img src=\"images/ok.gif\" alt=\"O\"/>Site $site Removed Successfully from Blocked List<br/>";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error Removing $site <br/>";
}
echo "<br/>";
echo "<a href=\"rokzcp.php?action=blockedsites&ses=$ses\">";
echo "Blocked Sites List</a><br/>";
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "rokz CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}else if($action=="addword")
{
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
$word = $_POST["word"];
echo $word;
echo "<br/>";
$res = mysql_query("INSERT INTO ibwf_spam SET word='".$word."'");
if($res)
{
echo mysql_error();
echo "<img src=\"images/ok.gif\" alt=\"O\"/>$word Added Successfully to Spam List<br/>";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error Adding Spam Word<br/>";
}
echo "<br/>";
echo "<a href=\"rokzcp.php?action=spamwords&ses=$ses\">";
echo "Blocked Word List</a><br/>";
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "rokz CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
$word = $_POST["word"];
echo $word;
echo "<br/>";
$res = mysql_query("INSERT INTO ibwf_spam SET word='".$word."'");
if($res)
{
echo mysql_error();
echo "<img src=\"images/ok.gif\" alt=\"O\"/>$word Added Successfully to Spam List<br/>";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error Adding Spam Word<br/>";
}
echo "<br/>";
echo "<a href=\"rokzcp.php?action=spamwords&ses=$ses\">";
echo "Blocked Word List</a><br/>";
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "rokz CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}else if($action=="delword")
{
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
$id=$_GET["id"];
$sitena = mysql_query("SELECT word FROM ibwf_spam WHERE id='".$id."'");
$site = mysql_fetch_array($sitena);
$word=$site[0];
$res = mysql_query("DELETE FROM ibwf_spam WHERE id='".$id."'");
if($res)
{
echo "<img src=\"images/ok.gif\" alt=\"O\"/>$word Removed Successfully from Spam words List<br/>";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error Removing $word <br/>";
}
echo "<br/>";
echo "<a href=\"rokzcp.php?action=spamwords&ses=$ses\">";
echo "Blocked Word List</a><br/>";
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "rokz CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
$id=$_GET["id"];
$sitena = mysql_query("SELECT word FROM ibwf_spam WHERE id='".$id."'");
$site = mysql_fetch_array($sitena);
$word=$site[0];
$res = mysql_query("DELETE FROM ibwf_spam WHERE id='".$id."'");
if($res)
{
echo "<img src=\"images/ok.gif\" alt=\"O\"/>$word Removed Successfully from Spam words List<br/>";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error Removing $word <br/>";
}
echo "<br/>";
echo "<a href=\"rokzcp.php?action=spamwords&ses=$ses\">";
echo "Blocked Word List</a><br/>";
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "rokz CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}else if($action=="addnick")
{
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
$nick = $_POST["nick"];
$level = $_POST["level"];
if($level=='1') {
$status ="Reserved";
}else{
$status = "Blocked";
}
echo "$nick - $status";
echo "<br/>";
$res = mysql_query("INSERT INTO ibwf_nicks SET name='".$nick."', nicklvl='".$level."'");
if($res)
{
echo mysql_error();
echo "<img src=\"images/ok.gif\" alt=\"O\"/>$nick Added Successfully to $status List<br/>";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error Adding $nick to $status List<br/>";
}
echo "<br/>";
echo "<a href=\"rokzcp.php?action=nicks&ses=$ses\">";
echo "Manage Nicknames</a><br/>";
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "rokz CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
$nick = $_POST["nick"];
$level = $_POST["level"];
if($level=='1') {
$status ="Reserved";
}else{
$status = "Blocked";
}
echo "$nick - $status";
echo "<br/>";
$res = mysql_query("INSERT INTO ibwf_nicks SET name='".$nick."', nicklvl='".$level."'");
if($res)
{
echo mysql_error();
echo "<img src=\"images/ok.gif\" alt=\"O\"/>$nick Added Successfully to $status List<br/>";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error Adding $nick to $status List<br/>";
}
echo "<br/>";
echo "<a href=\"rokzcp.php?action=nicks&ses=$ses\">";
echo "Manage Nicknames</a><br/>";
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "rokz CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}else if($action=="delnick")
{
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
$id=$_GET["id"];
$sitena = mysql_query("SELECT name, nicklvl FROM ibwf_nicks WHERE id='".$id."'");
$site = mysql_fetch_array($sitena);
$nick=$site[0];
if($site[1]=='1') {
$status ="Reserved";
}else{
$status = "Blocked";
}
$res = mysql_query("DELETE FROM ibwf_nicks WHERE id='".$id."'");
if($res)
{
echo "<img src=\"images/ok.gif\" alt=\"O\"/> $nick Removed Successfully from $status List<br/>";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error Removing $nick <br/>";
}
echo "<br/>";
echo "<a href=\"rokzcp.php?action=nicks&ses=$ses\">";
echo "Manage Nicknames</a><br/>";
echo "<a href=\"index.php?action=rokzcp&ses=$ses\"><img src=\"images/admn.gif\" alt=\"*\"/>";
echo "rokz CP</a><br/>";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
$id=$_GET["id"];
$sitena = mysql_query("SELECT name, nicklvl FROM ibwf_nicks WHERE id='".$id."'");
$site = mysql_fetch_array($sitena);
$nick=$site[0];
if($site[1]=='1') {
$status ="Reserved";
}else{
$status = "Blocked";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}
?>
Comment
-
Guest
Comment