⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.php

📁 wap 程序 手器电脑通用
💻 PHP
📖 第 1 页 / 共 5 页
字号:
<?php
/** 
*
* @package wappyCULT: wap community script
* @version 1.00 2006/09/12 21:53:27 wappy
* @copyright (c) 2004-2006 wappyCULT 
* @license http://opensource.org/licenses/gpl-license.php GNU Public License 
*
*/

/**
*/
include("direct.php");
include("config.php");
include("core.php");
include("function_dskspace.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

$bcon = connectdb();
if (!$bcon)
{
    echo "<card id=\"main\" title=\"wappyCULT (ERROR!)\">";
    echo "<p align=\"center\">";
    echo "<img src=\"images/exit.gif\" alt=\"*\"/><br/>";
    echo "ERROR! cannot connect to database<br/><br/>";
    echo "This error happens usually when backing up the database, please be patient, The site will be up any minute<br/><br/>";
    echo "Soon, we will offer services that doesn't depend on MySQL databse to let you enjoy our site, while the database is not connected<br/>";
    echo "<b>THANK YOU VERY MUCH</b>";
    echo "</p>";
    echo "</card>";
    echo "</wml>";
    exit();
}
$brws = explode(" ",$HTTP_USER_AGENT);
$ubr = $brws[0];
$uip = getip();
$action = $_GET["action"];
$sid = $_GET["sid"];
$page = $_GET["page"];
$who = $_GET["who"];

$uid = getuid_sid($sid);

cleardata();
if(isipbanned($uip,$ubr))
    {
      if(!isshield(getuid_sid($sid)))
      {
        echo "<card id=\"main\" title=\"wappyCULT\">";
      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 "Time to unblock the IP: $rmsg<br/><br/>";
      
      echo "</p>";
      echo "<p>";
  echo "UserID: <input name=\"loguid\" format=\"*x\" maxlength=\"30\"/><br/>";
  echo "Password: <input type=\"password\" name=\"logpwd\"  maxlength=\"30\"/><br/>";
  echo "<anchor>LOGIN<go href=\"login.php\" method=\"get\">";
  echo "<postfield name=\"loguid\" value=\"$(loguid)\"/>";
  echo "<postfield name=\"logpwd\" value=\"$(logpwd)\"/>";
  echo "</go></anchor>";
  echo "</p>";
      echo "</card>";
      echo "</wml>";
      exit();
      }
    }
if(($action != "") && ($action!="terms"))
{
    $uid = getuid_sid($sid);
    if((islogged($sid)==false)||($uid==0))
    {
        echo "<card id=\"main\" title=\"wappyCULT\">";
      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 "</card>";
      echo "</wml>";
      exit();
    }
    
    
    
}
//echo isbanned($uid);
if(isbanned($uid))
    {
        echo "<card id=\"main\" title=\"wappyCULT\">";
      echo "<p align=\"center\">";
      echo "<img src=\"images/notok.gif\" alt=\"x\"/><br/>";
      echo "You are <b>Banned</b><br/>";
      $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1'"));
	  $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'"));
	  
      $remain = $banto[0]- time();
      $rmsg = gettimemsg($remain);
      echo "Time to finish your penalty: $rmsg<br/><br/>";
	  echo "Ban Reason: $banres[0]";
      //echo "<a href=\"index.php\">Login</a>";
      echo "</p>";
      echo "</card>";
      echo "</wml>";
      exit();
    }
$res = mysql_query("UPDATE ibwf_users SET browserm='".$ubr."', ipadd='".$uip."' WHERE id='".getuid_sid($sid)."'");

////////////////////////////////////////MAIN PAGE
if($action=="main")
{
  addvisitor();
  addonline(getuid_sid($sid),"Forum Index","index.php?action=$action");
  //saveuinfo($sid);
  
      echo "<card id=\"main\" title=\"wappyCULT\">";
  echo "<p align=\"center\">";
  //echo "<small>".date("D d M y-H:i:s")."</small><br/>";
  echo "<b><big><img src=\"images/logo.jpg\" alt=\"$siteurl\"/></big></b><br/><small>";
  $nick = getnick_sid($sid);
  echo "logged in as: <i>$nick</i><br/>";
 
  $fmsg = htmlspecialchars(getfmsg());

$tmsg = getpmcount(getuid_sid($sid));
  $umsg = getunreadpm(getuid_sid($sid));
  //$new_gm = getnewgml(getuid_sid($sid));
  echo "<a href=\"inbox.php?action=main&amp;sid=$sid\">PMs($umsg|$tmsg)</a><a href=\"index.php?action=main&amp;sid=$sid\">[r]</a><br/>";

  echo "$fmsg</small>";
  echo "</p><p><small>";
  
 /////inbox data

  $chs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline"));
  echo "<a href=\"index.php?action=chat&amp;sid=$sid\">&#187;Chatrooms($chs[0])</a><br/>";
  $chs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs"));
  echo "<a href=\"index.php?action=clmenu&amp;sid=$sid\">&#187;Clubs($chs[0])</a><br/>";
  $uid = getuid_sid($sid);
  $mybuds = getnbuds($uid);
  $onbuds = getonbuds($uid);
  echo "<a href=\"lists.php?action=buds&amp;sid=$sid\">&#187;Buddies($onbuds|$mybuds)</a>";
  $reqs = getnreqs($uid);
  if($reqs>0)
  {

    echo ": <a href=\"lists.php?action=reqs&amp;sid=$sid\">$reqs</a>";
  }
  echo "<br/>";
  echo "<a href=\"index.php?action=funm&amp;sid=$sid\">&#187;Fun/Extra</a><br/>";
  echo "<a href=\"index.php?action=cpanel&amp;sid=$sid\">&#187;CPanel</a><br/>";
$mb = "mb";
$folder = "scripts";
 if(!($dp = opendir("$folder"))) die ("Cannot open ./");
$file_array = array(); 
while ($file = readdir ($dp))
	{
	if(substr($file,0,1) != '.' and $file != "index.php")
		{
		$file_array[] =  $file;
		}
	}
				
$file_count1 = count ($file_array);

$ds1 = dskspace ($folder);
$ds1 = round ($ds1/1024000,1);
echo "<a href=\"scripts/index.php?sid=$sid\">&#187;Scripts($file_count1|$ds1$mb)</a><br/>";

  echo "</small></p>";
  //////
echo "<p align=\"center\">";
    echo getshoutbox($sid);
echo "</p>";
  echo "<p><small>";
echo "<br/>";
include ('mods/lastpost_wappyMOD.php');
  $fcats = mysql_query("SELECT id, name FROM ibwf_fcats ORDER BY position, id");

  $iml = "<img src=\"images/1.gif\" alt=\"*\"/>";
  while($fcat=mysql_fetch_array($fcats))
  {

    $catlink = "<a href=\"index.php?action=viewcat&amp;sid=$sid&amp;cid=$fcat[0]\">$iml$fcat[1]</a>";

    echo "<br/>$catlink";
    $forums = mysql_query("SELECT id, name FROM ibwf_forums WHERE cid='".$fcat[0]."' AND clubid='0' ORDER BY position, id, name");
    if(getfview()==0)
    {
    echo "<br/><small>";
    while($forum=mysql_fetch_array($forums))
        {
      if(canaccess(getuid_sid($sid),$forum[0]))
      {
        
      echo "<a href=\"index.php?action=viewfrm&amp;sid=$sid&amp;fid=$forum[0]\">$forum[1]</a>, ";
      }
    }
    echo "</small>";
    }else if(getfview()==20)
    {
      echo "<br/>Forums: <select name=\"fid\">";
      while($forum=mysql_fetch_array($forums))
        {
      if(canaccess(getuid_sid($sid),$forum[0]))
      {
        $notp = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE fid='".$forum[0]."'"));
      echo "<option value=\"$forum[0]\">$forum[1]($notp[0])</option>";
      }
      }
      echo "</select>";
      echo "<anchor>[GO]";
      echo "<go href=\"index.php\" method=\"get\">";
      echo "<postfield name=\"action\" value=\"viewfrm\"/>";
      echo "<postfield name=\"sid\" value=\"$sid\"/>";
      echo "<postfield name=\"fid\" value=\"$(fid)\"/>";
      echo "</go>";
      echo "</anchor>";
    }
    
  }
  echo "</small></p>";
  echo "<p align=\"center\">";
  
  
  
  echo "<small>";
  echo "<br/>Members Online: <a href=\"index.php?action=online&amp;sid=$sid\">".getnumonline()."</a><br/>";
  $timeout = 180;
  $timeon = time()-$timeout;
  $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE perm>'0' AND lastact>'".$timeon."'"));
  include ('mods/newestmember_wappyMOD.php');
  echo "Staff Online: <a href=\"index.php?action=stfol&amp;sid=$sid\">".$noi[0]."</a><br/>";
  echo "<br/><a href=\"index.php?action=stats&amp;sid=$sid\">STATISTICS</a><br/>";
  echo "<a href=\"index.php?action=search&amp;sid=$sid\">SEARCH</a><br/>";
  echo "<a href=\"index.php?action=terms&amp;sid=$sid\">TERMS OF USE</a><br/>";
echo "<a href=\"help.php?sid=$sid\">*HELP*</a><br/>";
  if (isadmin(getuid_sid($sid)))
  {
    echo "<a href=\"index.php?action=admincp&amp;sid=$sid\">ADMIN CP</a><br/>";
echo "<a href=\"adminx/index.php?sid=$sid\">ADMIN X</a>";
  }
  if(ismod($uid))
  {
    $tnor = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE reported='1'"));
    $tot = $tnor[0];
    $tnor = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE reported='1'"));
    $tot += $tnor[0];
    $tnor = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE reported='1'"));
    $tot += $tnor[0];
    $tnol = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_mlog"));
    $tol = $tnol[0];
    if($tol+$tot>0)
    {
      echo "<br/><a href=\"modcp.php?action=main&amp;sid=$sid\">MOD R/L($tot|$tol)</a>";
      }
  $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault"));
    echo "<br/><a href=\"lists.php?action=vault&amp;sid=$sid\">VAULT($noi[0])</a>";
echo "<br/><a href=\"staffhelp.php?sid=$sid\">*STAFF GUIDE*</a>";
  }
  echo "<br/><br/>";

//disk space
  if (isadmin(getuid_sid($sid)))
  {
$diskspace = dskspace ('./');
$diskspace = round ($diskspace/1024000,1);
echo "Disk Used: $diskspace$mb<br/>";
}
  echo "Created By: <i><a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=1\">wappy</a></i><br/>";
echo "Powered By: <i><a href=\"http://$host\">SADHU</a></i><br/>";
echo "&#169;2004-2006 wappyCULT";

  echo "</small></p>";
  echo "</card>";
}

else if($action=="clmop")
{
    $clid = $_GET["clid"];
    $who = $_GET["who"];

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -