session_start();
require_once("../conn/mysqlconn.php");
require_once('xajax.inc.php');
if(!isset($_SESSION['wid']))
{
$_SESSION['wid']=$_GET["wid"];
}
if(isset($_POST['content_4']))
{
$con = new createdb;
$con->createconn();
$con->mysql="insert into content(webid,tallname,txtconntent) values('$_SESSION[wid]','$_POST[tallnane]','$_POST[content_4]')";
$con->getresule();
}
@define(mun_2,3); //定义每页显示几条记
function tt($form_mm)
{
if($_SESSION["code"]==$form_mm['chetxt']) //用xajax来取得验证码,不同以前的那种看验证码对不对
{
$erro_msg="谢谢你的支持";
$jjs="";
}
else
{
$erro_msg="验证码不对,请重新在写";
$jjs="true";
}
$obj= new xajaxResponse();
$obj->addAssign("check_msg","innerHTML",$erro_msg);
$obj->addAssign("btn","disabled",$jjs);
return $obj->getXML();
}
function callmsg()
{
$obj= new xajaxResponse();
$obj->addScript("xajax_tt(xajax.getFormValues('form_d'));");
return $obj->getXML();
}
function xx($uu)
{
$ad_2="";
$bb=mun_2;
$start=$uu*mun_2 - mun_2;
$II=$uu-1;
if($uu==1)
{
$II=$uu;
}
$I=$uu+1;
if($I>@$_SESSION['$mun_5'])
{
$I=$uu;
}
$pp = new createdb;
$pp->createconn();
$pp->mysql="select count(*) from content where webid=$_SESSION[wid]";
$pp->getresule();
$pp->getrow();
$u=$pp->row[0];
$t=$u;
$pp->mysql="select * from content where webid=$_SESSION[wid] group by id desc limit $start,$bb";
$pp->getresule();
$start=$start+1;
while($pp->getrow())
{
$ad="
倪称".$pp->row["tallname"]."
广告:".$pp->row["tellall"]."
".$start."楼
内容:".$pp->row["txtconntent"]."
";
$ad_2=$ad_2.$ad;
@$qqaa="
上一页 < span onclick='xajax_xx($I)' style='cursor:pointer'>下一页 ";
$start++;
}
$obj= new xajaxResponse();
$obj-> ;addAssign("div","innerHTML",$ad_2);
$obj->addAssign("ren","innerHTML",@$qqaa);
$obj->addscript("if ( (event. altKey) || ((event.keyCode == 8) &&
(event.srcElement.type != 'text' &&
event.srcElement.type != 'textarea' &&
event.srcElement.type != 'パスワード' ))||
((event.ctrlKey) &&((event.keyCode == 78) || (event.keyCode == 82)) ) ||
(event.keyCode == 116) ) {
event.keyCode = 0;
event.returnValue = false;
}
");
return $obj->getXML();
}
$ax = new xajax();
$ax->registerFunction("xx") ;
$ax->registerFunction("tt");
$ax->processRequests();
無标题文档 $ax->printJavascript();?>
頭>
<スクリプト言語="javascript">
function ansum()
{
if(document.getElementById("content_4").value.length==0 || document.getElementById("content_4").value.length>600)
{
alert("不过超过) 300个汉字,和は空");
falseを返します。
}
}
//禁止刷新,逆退
function onKeyDown()
{
if ( (event.altKey) || ((event.keyCode == 8) &&
(event.srcElement.type != "text" &&
event .srcElement.type != "textarea" &&
event.srcElement.type != "パスワード")) ||
((event.ctrlKey) && ((event.keyCode == 78) || (event.keyCode ==) 82))) ||
(event.keyCode == 116) ) {
event.keyCode = 0;
event.returnValue = false;
}
}
document.onkeydown = onKeyDown;
関数 stopy(){ //これは禁用ネズミ标右键
return false;
}
document.oncontextmenu=stopy;
スクリプト>
$pp = 新規作成b;
$pp->createconn();
$pp->mysql="select count(*) from content where webid=$_SESSION[wid]";
$pp->getresule();
$pp->getrow();
$lunnum=$pp->行[0]; //总记录数
$mun_5="";
$mun_3="";
$mun_3=$lunnum % mun_2; //看是否整除/然后算出总页数
if($mun_3)
{
$mun_3=$lunnum / mun_2 + 1;
}
else
{
$mun_3=$lunnum / mun_2;
}
$_SESSION['$mun_5']=$mun_3;
?>
总评论数: echo($lunnum);?>
页码:
for($i=1;$i<=$mun_3;$i++)
{
if($i<10)
{
$mun_4 = "$i ";
エコー($mun_4);
}
}
if($i>10)
{
echo("..");
}
?>
現在の在回線人数:
http://www.bkjia.com/PHPjc/317223.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/317223.html技術記事 ?セッション開始(); require_once("../conn/mysqlconn.php"); require_once('xajax.inc.php'); if(!isset($_SESSION['wid'])) { $_SESSION['wid']=$_GET["wid"]; if(isset($_POST['content_4']...