<style= "font-size:16px"><br></ Span><style= "font-size:16px"> Main Page:< br></span>
<script src= ". /fzl/jquery-1.11.2.min.js "></script><script src=". /tanchuang/tanchuang.js "></script><script src=" Fenye.js "></script><title> Untitled document </ Title><style type= "text/css" >*{margin:0px auto; padding:0px}#dh{margin-top:50px; width:100%; text-align:center; height:30px}. dh_1{float: Left; width:150px; Margin-left:30px;}#tb{Text-align:center;}. qd{line-height:30px; vertical-align:middle; font-size:20px; width:65px; height:30px; margin-top:-20px; Background-color:#ff712d; border-radius:5px; box-shadow:3px 3px 3px #999}</style><link href= ". /tanchuang/tanchuang.css "rel=" stylesheet "type=" Text/css "/><spanstyle= "font-size:16px"><BR></span><spanstyle= "font-size:16px">Operation Log Database table:<BR><imgsrc= "Http://images2015.cnblogs.com/blog/1020591/201612/1020591-20161202214141771-899475105.png"alt=""><BR><BR>Js:</span>
//JavaScript Document$ (document). Ready (function(e) {$ ("#dh_f5"). CSS ("Box-shadow", "0 2px 1px #535353"); $("#dh_f5"). CSS ("Color", "#0198A9"); ZYS (10); Fenye (); Qingkong (); //Click on the user name query to start$ ("#cxname"). KeyUp (function(){ varv = $ ("#cxname").Val (); varLX = $ ("#cxsplx").Val (); //alert (v);ZYS (10); Fenye (); }) //Click on the user Name query end//click on the Product Name query to start$ ("#cxsplx"). KeyUp (function(){ varv = $ ("#cxname").Val (); varLX = $ ("#cxsplx").Val (); ZYS (10); Fenye (); })//Click on the Product Name query start//Skip page start$ ("#dq"). KeyUp (function(){ varv = $ ("#cxname").Val (); varLX = $ ("#cxsplx").Val (); Fenye (); ZYS (10,v,LX); }) //Skip Page End$ ("#shang"). Click (function(){ varDQ = parseint ($ ("#dq").Val ()); if(dq>1) { $("#dq"). Val (dq-1); } Else { $("#dq"). Val (1); } fenye (); }) $("#xia"). Click (function(){ varDQ = parseint ($ ("#dq").Val ()); if(dq<$ ("#zys").text ()) { $("#dq"). Val (dq+1); } Else { $("#dq"). Val ($ ("#zys").text ()); } fenye (); }) });//implement pagination method start, built-in pop-up windowfunctionFenye (V,LX) { varv = $ ("#cxname").Val (); varLX = $ ("#cxsplx").Val (); if(typeof (V) = = "undefined")//if V is not found, an empty string is defined for V{v=""; } if(typeof (lx) = = "Undefined") {lx=""; } varDQ = $ ("#dq").Val (); //Show Table$.Ajax ({URL: "Shipinxiazai.php",Data: {PAGE:DQ,V:V,LX:LX},type: "GET",DataType: "TEXT",Success:function(data) {if(data== "") { $("#tb"). HTML ("<tr><td> serial number </td><td> operator </td><td> action content </td><td> operating time </td></tr> "); } Else { varstr = "<tr><td> serial number </td><td> operator </td><td> action content </td><td> operating time </td ></tr> "; varHang = data.Split("|"); for(vari=0;i) { varLie =hang[i].Split("^"); STR+ = "<tr><td>" +lie[0]+ "</td><td>" +lie[1]+ "</td><td><span class = ' ck ' bs= '" + lie[0]+ "' > View details </span></td><td>" +lie[3]+ "</td></tr>"; } $("#tb").html (str); //start the pop -up window$ (". CK"). Click (function(){ varCode =$ (This). attr ("BS"); $.Ajax ({URL: "Tc.php",Data: {Code:code},type: "POST",DataType: "TEXT",Success:function(data) {varstr = "<div>" +data+ "</div>";//core content of pop -up window varBTN1 = "<div class= ' qd ' > Close </div>"; varTC =NewWindow ({title: "More Information",content: STR,Buttons:btn1}); $(". QD"). Click (function(){ $(". Zhuti"). Remove ();//Click the OK button to remove the pop-up window$ ("#zz"). Remove ();//Click the OK button, and the mask is removed }) } }); }) //end of pop -up window } } }); }//implement pagination method end, built-in pop-up window//Request Total page startfunctionZYS (N,v,LX) { varv = $ ("#cxname").Val (); varLX = $ ("#cxsplx").Val (); if(typeof (V) = = "undefined")//if V is not found, an empty string is defined for V{v=""; } if(typeof (lx) = = "Undefined") {lx=""; } $.Ajax ({URL: "Spxiazai.php",Data:{List: N,v:v,lx:lx},type: "POST",DataType: "TEXT",Success:function(data) {$ ("#zys").text (data); //Judging the jump page dq start if($ ("#dq"). Val () >data) { $("#dq").val (data); varv = $ ("#cxname").Val (); varLX = $ ("#cxsplx").Val (); Fenye (v,LX); } //determine the paged DQ end//Determine the current number of DQ pages not starting at 0 if($ ("#dq"). Val () ==0 | | $ ("#dq"). val () = = "") { $("#dq"). Val (1); } //Determine DQ Current page does not end with 0//Judge Zys Total number of pages does not start at 0 if($ ("#zys"). Text () ==0 | | $ ("#zys"). Text () = = "") { $("#zys"). Text (1); } //determine the total number of Zys pages does not end 0 } });}//Total pages End//empty V,LX startfunctionQingkong () {$ ("#qk"). Click (function(){ $("#cxname"). Val (""); $("#cxsplx"). Val (""); ZYS (10); Fenye (); })}//Empty V,LX End
Pagination processing
<?PHPinclude(".. /fzl/czy.class.php ");$db=NewCzy ();$v=$_get["V"];$LX=$_get["LX"];$szs= "SELECT count (*) from Caozuorizhi where UID like '%{$v}% ' and nr like '%{$LX}%‘ ";$azs=$db->strquery ($szs);include(".. /public/page.class.php ");$page=NewPage ($azs, 10);$sql= "SELECT * from Caozuorizhi where UID like '%{$v}% ' and nr like '%{$LX}%‘ ".$page-limit;Echo $SJ=$db->strquery ($sql);//Var_dump ($AZS);
Total number of pages processed
<?PHPinclude(".. /fzl/czy.class.php ");$db=NewCzy ();$v=$_post["V"];$LX=$_post["LX"];$sql= "SELECT count (*) from Caozuorizhi where UID like '%{$v}% ' and nr like '%{$LX}%‘ ";$SJ=$db->strquery ($sql);$list=$_post["List"];$zys= 0;if($SJ%$list==0){ $zys=$SJ/$list;}Else{ $zys= Floor($SJ/$list) +1;}Echo $zys;
AJXA Paging + multi-criteria Query