一、新建新流程
css样式
@charset "utf-8";/* CSS Document */*{ margin:0px auto; padding:0px; } #wai{ width:40%; } #xj{ text-align:center; color:#fff; background-color:#060; height:60px; font-size:30px; font-weight:bold; vertical-align:bottom; line-height:85px; } #nm,#tt{ height:40px; border:#00F inset 1px; line-height:40px; vertical-align:middle; color:#060; font-weight:bold; } #user{ width:80px; height:30px; background-color:#060; color:#CFF; } .user{ background-color:#060; color:#FFF; font-weight:bold; text-align:center; } .bt{ height:40px; border:#00F inset 1px; text-align:center; vertical-align:middle; line-height:40px; } #add{ width:200px; background-color:#060; color:#fff; height:30px; font-size:18px; font-weight:bold; } #lcname { width:70%; height:25px; } #chuangjian{ width:120px; height:35px; background-color:#060; color:#FFF; font-size:20px; font-weight:bold; } .del{ width:60px; height:25px; background-color:#9F6; }
引入文件
主页面
新 建 流 程请选择用户名:请输入流程名称:
处理页面
query($sql,1)){ foreach($arr as $k=>$v){ $sql = "insert into flowpath values(0,'{$code}','{$v}','{$k}')"; $db->query($sql,1); } }
DBDA.class.php
host,$this->uid,$this->pwd,$this->dbname); $result = $db->query($sql); if($type){ return $result; }else{ return $result->fetch_all(); } } public function strquery($sql,$type=0){ $db = new MySQLi($this->host,$this->uid,$this->pwd,$this->dbname); $result = $db->query($sql); if($type){ return $result; }else{ $arr = $result->fetch_all(); $str = ""; foreach($arr as $v){ $str .= implode("^",$v)."|"; } $str = substr($str,0,strlen($str)-1); return $str; } } //返回json数据的方法 public function jsonquery($sql,$type=0){ $db = new MySQLi($this->host,$this->uid,$this->pwd,$this->dbname); $result = $db->query($sql); if($type){ return $result; }else{ $arr = $result->fetch_all(MYSQLI_ASSOC);//关联数组 return json_encode($arr);//转换json //json_decode()分解json } }}