AJax技术

用ajax跟PHP实现简单的流程管理(2)

字号+ 作者:H5之家 来源:H5之家 2017-04-04 15:00 我要评论( )

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"html xmlns="http://www.w3.org/1999/xhtml"headmeta http-equiv="Content-Type" cont

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>发起流程</title><br /> <script src="../FENGZHUANG/jquery-3.1.1.min.js"></script> </head> <body> <h1>发起流程</h1> <div> 请选择发起的流程: <select> <?php session_start(); include("../FENGZHUANG/DBDA.class.php"); $db = new DBDA(); $sql = "select * from liucheng"; $arr = $db->Query($sql); ) { echo "<option value='{$v[0]}'>{$v[1]}</option>"; } ?> </select> </div> <br /> <div> 请输入内容: <textarea></textarea> </div> <br /> <input type="button" value="发起" /> </body> <script type="text/javascript"> $("#btn").click(function(){ var code = $("#liucheng").val(); var content = $("#nr").val(); $.ajax({ url:"chuli.php", data:{code:code,content:content,type:3}, type:"POST", dataType:"TEXT", success: function(data){ alert("发起成功!"); } }); }) </script> </html>

 

审核页面shenhe.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>审核</title> </head> <body> <h1>审核页面</h1> <table cellpadding="0" cellspacing="0"> <tr> <td>流程代号</td> <td>发起者</td> <td>发起内容</td> <td>是否结束</td> <td>发起时间</td> <td>操作</td> </tr> <?php session_start(); include("../FENGZHUANG/DBDA.class.php"); $db = new DBDA(); $uid = $_SESSION["uid"]; echo $uid; = "select * from userflow where code in(select code from flowpath where uids='{$uid}')"; $arr = $db->Query($sql); () { = = = "select orders from flowpath where code='{$lcdh}' and uids='{$uid}'"; ($towhere>=$order) { $caozuo = ""; if($towhere==$order) { $caozuo="<a href='tongguo.php?code={$v[0]}'>通过</a>"; } else { $caozuo="<span>已通过</span>"; } echo "<tr> <td>{$v[1]}</td> <td>{$v[2]}</td> <td>{$v[3]}</td> <td>{$v[4]}</td> <td>{$v[5]}</td> <td>{$caozuo}</td> </tr>"; } } ?> </table> </body> </html>

tongguo.php

 

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

相关文章
网友点评
a