Detailed explanation of simple process management using PHP and ajax (pictures and text)

黄舟
Release: 2023-03-06 21:08:02
Original
1313 people have browsed it

This article mainly introduces ajax andPHPto implement simple process management in detail, which has certain reference value. Interested friends can refer to the examples of

I have shared with you ajax and PHP to implement simple process management for your reference. The specific content is as follows

First, you must have a page for creating a new process xinjian.php

    新建  

新建流程

请选择节点人员:


$v) //索引为$k,取值为$v { $sname = "select name from users where uid='{$v}'"; //取出名称 $name = $db->StrQuery($sname); echo "

{$k}--{$name}--

"; //向处理页面传的是key的值 } } ?>


请输入流程名称:


Copy after login

Detailed explanation of simple process management using PHP and ajax (pictures and text)

Database picture:

Detailed explanation of simple process management using PHP and ajax (pictures and text)

Detailed explanation of simple process management using PHP and ajax (pictures and text)

Detailed explanation of simple process management using PHP and ajax (pictures and text)

Detailed explanation of simple process management using PHP and ajax (pictures and text)

##Processing Page chuli.php

Query($sql,0); //添加流程节点 $arr = $_SESSION["user"]; foreach($arr as $k=>$v) { $sql = "insert into flowpath values('','{$code}','{$v}','{$k}')"; $db->Query($sql,0); } break; case 3: //用户发起流程 $code = $_POST["code"]; $nr = $_POST["content"]; $uid = $_SESSION["uid"]; $time = date("Y-m-d H:i:s"); $sql = "insert into userflow values('','{$code}','{$uid}','{$nr}',0,'{$time}',0)"; $db->Query($sql,0); break; }
Copy after login

Initiate process page faqi.php

    发起流程

发起流程

请选择发起的流程:


请输入内容:


Copy after login

Detailed explanation of simple process management using PHP and ajax (pictures and text)

AuditPage shenhe.php


    审核 

审核页面

Query($sql); //显示 foreach($arr as $v) { //判断该流程走到登录者 $lcdh = $v[1]; //流程代号 $towhere = $v[6];//流程走到哪 $sql = "select orders from flowpath where code='{$lcdh}' and uids='{$uid}'"; $order = $db->StrQuery($sql);//该人员在流程中的次序 if($towhere>=$order) { $caozuo = ""; if($towhere==$order) { $caozuo="通过"; } else { $caozuo="已通过"; } echo ""; } } ?>
流程代号 发起者 发起内容 是否结束 发起时间 操作
{$v[1]} {$v[2]} {$v[3]} {$v[4]} {$v[5]} {$caozuo}
Copy after login

Detailed explanation of simple process management using PHP and ajax (pictures and text)

Detailed explanation of simple process management using PHP and ajax (pictures and text)

Detailed explanation of simple process management using PHP and ajax (pictures and text)

Detailed explanation of simple process management using PHP and ajax (pictures and text)

Detailed explanation of simple process management using PHP and ajax (pictures and text)

Detailed explanation of simple process management using PHP and ajax (pictures and text)##tongguo.php

Query($sql,0); //判断流程是否结束 $sql = "select * from userflow where ids='{$code}'"; $arr = $db->Query($sql); $lcdh = $arr[0][1]; //流程代号 $tw = $arr[0][6]; //流程走到哪 $sql = "select count(*) from flowpath where code='{$lcdh}'"; $count = $db->StrQuery($sql); //该流程节点人数 if($tw>=$count) { $sql = "update userflow set isok=1 where ids='{$code}'"; //如果结束了流程,将isok项改为结束。 $db->Query($sql,0); } header("location:shenhe.php");
Copy after login

The above is the detailed content of Detailed explanation of simple process management using PHP and ajax (pictures and text). For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!