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

📄 variable.php

📁 php做的wap论坛 有详细说明在readme中
💻 PHP
字号:
<?php
require_once("config.php");
ob_start();
$mobiletypearray = array("siemens","sony","hp","tcl","nokia","samsung","panasonic","motorola","mot-","compal","sie-","sec-","wap","ericsson","nec-","lg/","sharp","philips");
reset($mobiletypearray);
$is = 0;
while(list(,$mobiletype)=each($mobiletypearray)){
	if(substr_count(strtolower($_SERVER[HTTP_USER_AGENT]), $mobiletype)>0){
		$is++;
	}
}
if($is==0){
	//die("Access Denied!");
}
$connect = mysql_connect($dbHost, $dbUser, $dbPswd);
mysql_select_db($dbName, $connect);
header("Content-type: text/vnd.wap.wml");
$session = $_GET[session];
if($session!=""){
	$row = mysql_fetch_array(mysql_query("select * from ".$dbTablePx."members where md5id='$session' limit 1"));
	if(!$row[uid]){
		header("Location: index.php?session=$session&amp;Rand=".microtime());
		exit;
	}else{
		$oip = $_SERVER[REMOTE_ADDR]."|".time()."|100";
		$uid = $row[uid];
		$username = $row[username];
		$session = $row[md5id];
		mysql_query("update ".$dbTablePx."memberdata set onlineip='$oip' where uid='$row[uid]'");
	}
}else{
	$username = "游客";
	$session = "";
}

$WmlDeclare = '<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">';
$nodiscount = count($nodisforum);
reset($nodisforum);
for($i=0;$i < $nodiscount;$i++){
	list($AAAA, $BBBB[$i]) = each($nodisforum);
	$nodisstr .= "and fid!='".$BBBB[$i]."' ";
}

function LangFlush($contents){
	$showcontents = iconv("GB18030","UTF-8",$contents);
	ob_end_clean();
	echo $showcontents;
}
function listForums($session){
	global $nodisstr,$session,$dbTablePx;
	$query_category = mysql_query("select fid, name, f_type from ".$dbTablePx."forums where type='category' and fup=0 and password='' $nodisstr order by vieworder asc");
	while($row_category = mysql_fetch_array($query_category)){
		echo "<img src='images/next.png' alt='' />".str_replace("『","",str_replace("』","",$row_category[name]))."<br/>";
		$query_forum = mysql_query("select fid, name, f_type from ".$dbTablePx."forums where fup='$row_category[fid]' and password='' and type='forum' $nodisstr order by vieworder asc");
		while($row_forum = mysql_fetch_array($query_forum)){
			if($row_forum[f_type]=="forum"){
				echo "&nbsp;<a href='thread.php?fid=$row_forum[fid]&amp;session=$session'>".str_replace("『","",str_replace("』","",$row_forum[name]))."</a><br/>";
			}else{
				echo "&nbsp;".str_replace("『","",str_replace("』","",$row_forum[name]))."<br/>";
			}
			$query_sub = mysql_query("select fid, name, f_type from ".$dbTablePx."forums where fup='$row_forum[fid]' and password='' and type='sub' $nodisstr order by vieworder asc");
			while($row_sub = mysql_fetch_array($query_sub)){
				if($row_sub[f_type]=="forum"){
					echo "&nbsp;&nbsp;<img src='images/man.png' alt='' /><a href='thread.php?fid=$row_sub[fid]&amp;session=$session'>".str_replace("『","",str_replace("』","",$row_sub[name]))."</a><br/>";
				}else{
					echo "&nbsp;&nbsp;<img src='images/man.png' alt='' />".str_replace("『","",str_replace("』","",$row_sub[name]))."<br/>";
				}
			}
		}
	}
}
function onlineuser(){
	require_once("../data/bbscache/olcache.php");
	return "<img src='images/man.png' alt=''/>在线人数:".($userinbbs+$guestinbbs)."<br/><img src='images/reg.png' alt=''/>其中游客:".$guestinbbs;
}
?>

⌨️ 快捷键说明

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