View file wapirate/wml/linksites.php

File size: 6.34Kb
<?php



include("captainsafeconfig.php");



include("captainsafecore.php");



header("Cache-Control: no-cache, must-revalidate");	        // Prevent caching, HTTP/1.1



header("Pragma: no-cache");



//header('Content-type: application/vnd.wap.xhtml+xml'); 



echo "<?xml version=\"1.0\"?>";



echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";



?>



<html xmlns="http://www.w3.org/1999/xhtml">



<?php



$bcon = connectdb();



if (!$bcon)



{



    echo "<head>";



    echo "<title>Error!!!</title>";



    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">";



    echo "</head>";



    echo "<body>";



    echo "<p align=\"center\">";



    echo "<img src=\"../images/notok.gif\" alt=\"!\"/><br/>";



    echo "<b><strong>Error! Cannot Connect To Database...</strong></b><br/><br/>";



    echo "This error happens usually when backing up the database, please be patient...";



    echo "</p>";



    echo "</body>";



    echo "</html>";



    exit();



}



$brws = explode("/",$HTTP_USER_AGENT);



$ubr = $brws[0];



$uip = getip();



$action = $_GET["action"];



$sid = $_GET["sid"];



$page = $_GET["page"];



$who = $_GET["who"];



$sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'"));



$sitename = $sitename[0];



$uid = getuid_sid($sid);



$theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));



cleardata();







if(isipbanned($uip,$ubr))



    {



      if(!isshield(getuid_sid($sid)))



      {



      echo "<head>";



      echo "<title>Error</title>";



      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";



      echo "</head>";



      echo "<body>";



      echo "<p align=\"center\">";



      echo "<img src=\"../images/notok.gif\" alt=\"x\"/><br/>";



      echo "This IP address is blocked<br/>";



      echo "<br/>";



      echo "How ever we grant a shield against IP-Ban for our great users, you can try to see if you are shielded by trying to log-in, if you kept coming to this page that means you are not shielded, so come back when the ip-ban period is over<br/><br/>";



      $banto = mysql_fetch_array(mysql_query("SELECT  timeto FROM ibwf_penalties WHERE  penalty='2' AND ipadd='".$uip."' AND browserm='".$ubr."' LIMIT 1 "));



      //echo mysql_error();



      $remain =  $banto[0] - time();



      $rmsg = gettimemsg($remain);



      echo " IP: $rmsg<br/><br/>";



      



      echo "</p>";



      echo "<p>";



      echo "<form action=\"login.php\" method=\"get\">";



      echo "<b>Username: </b><br/><input name=\"loguid\" format=\"*x\" size=\"12\" maxlength=\"12\"/><br/>";



      echo "<b>Password: </b><br/><input type=\"password\" name=\"logpwd\" size=\"10\" maxlength=\"10\"/><br/>";



      echo "<br/><input name=\"Login\" type=\"submit\" value=\"Login\"></form>";



  echo "</p>";



      echo "</body>";



      echo "</html>";



      exit();



      }



    }



if(($action != "") && ($action!="terms"))



{



    $uid = getuid_sid($sid);



    if((islogged($sid)==false)||($uid==0))



    {



      echo "<head>";



      echo "<title>Error</title>";



      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">";



      echo "</head>";



      echo "<body>";



      echo "<p align=\"center\">";



      echo "You are not logged in<br/>";



      echo "Or Your session has been expired<br/><br/>";



      echo "<a href=\"index.php\">Login</a>";



      echo "</p>";



      echo "</body>";



      echo "</html>";



      exit();



    }



}



if(isbanned($uid))



    {



      echo "<head>";



      echo "<title>Error!!!</title>";



      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";



      echo "</head>";



      echo "<body>";



      echo "<p align=\"center\">";



      echo "<img src=\"../images/notok.gif\" alt=\"x\"/><br/>";



      echo "<b>You are Banned</b><br/><br/>";



      $banto = mysql_fetch_array(mysql_query("SELECT timeto, pnreas, exid FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1' OR uid='".$uid."' AND penalty='2'"));



	$banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'"));



      $remain = $banto[0]- time();



      $rmsg = gettimemsg($remain);



      echo "<b>Time Left: </b>$rmsg<br/>";



      $nick = getnick_uid($banto[2]);



	echo "<b>By: </b>$nick<br/>";



	echo "<b>Reason: </b>$banto[1]";



      //echo "<a href=\"index.php\">Login</a>";



      echo "</p>";



      echo "</body>";



      echo "</html>";



      exit();



    }



$res = mysql_query("UPDATE ibwf_users SET browserm='".$ubr."', ipadd='".$uip."' WHERE id='".getuid_sid($sid)."'");







////////////////////////////////////////MAIN PAGE



  echo "<head>";



  echo "<title>Site Links</title>";



  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";



  echo "</head>";



  echo "<body>";



  addonline(getuid_sid($sid),"Site Links","");



  $nick = getnick_uid(1);



  echo "<p align=\"center\"><b>If u have a site and want a link placed here inbox $nick</b></p>";



  echo "<p align=\"center\"><img src=\"images/advert.gif\" alt=\"$stitle\"/><br/>";



    echo "<p>";



      $query = mysql_query("SELECT url, title FROM ibwf_links");



while ($links = mysql_fetch_array($query)) 



{



   $link = "<a href=\"$links[0]\">$links[1]</a>";



if(isowner(getuid_sid($sid)))



   {



   $del = "<a href=\"admproc.php?action=linkdel&amp;sid=$sid&amp;link=$links[0]\">[X]</a>";



   }



   echo "$link $del<br/>";



}



    echo "</p>";



    echo "<p>";



if(isadmin(getuid_sid($sid)))



  {



  echo "<b>1 </b><a accesskey=\"1\" href=\"admincp.php?action=addlink&amp;sid=$sid\">Add Link</a><br/>";



  }



  echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";



  echo "</p>";



  echo "</body>";



?>



</html>