xajax写的留言本

时间:2021-05-25

<?
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=newcreatedb;
$con->createconn();
$con->mysql="insertintocontent(webid,tallname,txtconntent)values('$_SESSION[wid]','$_POST[tallnane]','$_POST[content_4]')";
$con->getresule();
}
@define(mun_2,3);//定义每页显示几条记
functiontt($form_mm)
{
if($_SESSION["code"]==$form_mm['chetxt'])//用xajax来取得验证码,不同以前的那种看验证码对不对
{
$erro_msg="谢谢你的支持";
$jjs="";
}
else
{
$erro_msg="验证码不对,请重新在写";
$jjs="true";
}
$obj=newxajaxResponse();
$obj->addAssign("check_msg","innerHTML",$erro_msg);
$obj->addAssign("btn","disabled",$jjs);
return$obj->getXML();
}
functioncallmsg()
{
$obj=newxajaxResponse();
$obj->addScript("xajax_tt(xajax.getFormValues('form_d'));");
return$obj->getXML();
}
functionxx($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=newcreatedb;
$pp->createconn();
$pp->mysql="selectcount(*)fromcontentwherewebid=$_SESSION[wid]";
$pp->getresule();
$pp->getrow();
$u=$pp->row[0];
$t=$u;
$pp->mysql="select*fromcontentwherewebid=$_SESSION[wid]groupbyiddesclimit$start,$bb";
$pp->getresule();
$start=$start+1;
while($pp->getrow())
{
$ad="<divclass='ad_95'>倪称".$pp->row["tallname"]."</div><divclass='ad_93'>广告:".$pp->row["tellall"]."</div><divclass='ad_91'>".$start."楼</div><divclass='ad_90'>内容:".$pp->row["txtconntent"]."</div>";
$ad_2=$ad_2.$ad;
@$qqaa="<spanonclick='xajax_xx($II)'style='cursor:pointer'>上一页</span>&nbsp<spanonclick='xajax_xx($I)'style='cursor:pointer'>下一页</span>&nbsp";
$start++;
}
$obj=newxajaxResponse();
$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!='password'))||
((event.ctrlKey)&&((event.keyCode==78)||(event.keyCode==82)))||
(event.keyCode==116)){
event.keyCode=0;
event.returnValue=false;
}
");
return$obj->getXML();
}
$ax=newxajax();
$ax->registerFunction("xx");
$ax->registerFunction("tt");
$ax->registerFunction("callmsg");
$ax->processRequests();
?>
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://ment_input"></textarea>
&nbsp;&nbsp;
&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<inputname="btn"type="submit"id="btn"value="提交留言"class="submit_type"disabled="true"/>
</form>
</div>
</body>
</html>

声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。

相关文章