public function getIdTaskByWf($wfid) { $sql = "SELECT `id` FROM {$this->_tbl} WHERE `wf_id`={$wfid} "; $objmysql = new CLS_MYSQL(); $objmysql->Query($sql); $ar = array(); while ($r = $objmysql->Fetch_Assoc()) { $ar[] = $r['id']; } return $ar; }
function listTableGmem($strwhere = "", $page, $parid, $level) { $star = ($page - 1) * MAX_ROWS; $leng = MAX_ROWS; $sql = "SELECT * FROM `tbl_gmember` WHERE `par_id`=\"{$parid}\" " . $strwhere . " LIMIT {$star},{$leng}"; $objdata = new CLS_MYSQL(); $objdata->Query($sql); $str_space = ""; if ($level != 0) { for ($i = 1; $i < $level; $i++) { $str_space .= " "; } $str_space .= "|--- "; } while ($rows = $objdata->Fetch_Assoc()) { $id = $rows['gmem_id']; $parid = $rows['par_id']; $name = $rows['name']; $intro = stripslashes(uncodeHTML($rows['intro'])); echo "<tr name=\"trow\">"; echo "<td width=\"30\" align=\"center\"><label>"; echo "<input type=\"checkbox\" name=\"chk\" id=\"chk\" onclick=\"docheckonce('chk');\" value=\"{$id}\" />"; echo "</label></td>"; echo "<td width=\"50\" align=\"center\">{$parid}</td>"; echo "<td nowrap=\"nowrap\">\n\t\t\t\t<a href=\"index.php?com=" . COMS . "&task=edit&id={$id}\">{$str_space}{$name}</a>\n\t\t\t</td>"; echo "<td nowrap=\"nowrap\">{$intro} </td>"; echo "<td width=\"50\" align=\"center\">"; echo "<a href=\"index.php?com=" . COMS . "&task=active&id={$id}\">"; showIconFun('publish', $rows["isactive"]); echo "</a>"; echo "</td>"; echo "<td width=\"50\" align=\"center\">"; echo "<a href=\"index.php?com=" . COMS . "&task=edit&id={$id}\">"; showIconFun('edit', ''); echo "</a>"; echo "</td>"; echo "<td width=\"50\" align=\"center\">"; echo "<a href=\"javascript:detele_field('index.php?com=" . COMS . "&task=delete&id={$id}')\">"; showIconFun('delete', ''); echo "</a>"; echo "</td>"; echo "</tr>"; $this->listTableGmem($strwhere, $page, $id, $level + 1); } }
function getMemberByID($memid) { $sql = "SELECT * FROM `tbl_member` WHERE `mem_id`=\"{$memid}\" "; $objdata = new CLS_MYSQL(); $objdata->Query($sql); if ($objdata->Num_rows() > 0) { $rows = $objdata->Fetch_Assoc(); $this->pro['ID'] = $rows['mem_id']; $this->pro['UserName'] = $rows['username']; $this->pro['Password'] = $rows['password']; $this->pro['FirstName'] = $rows['firstname']; $this->pro['LastName'] = $rows['lastname']; $this->pro['Birthday'] = $rows['birthday']; $this->pro['Gender'] = $rows['gender']; $this->pro['Address'] = $rows['address']; $this->pro['Phone'] = $rows['phone']; $this->pro['Mobile'] = $rows['mobile']; $this->pro['Email'] = $rows['email']; $this->pro['Joindate'] = $rows['joindate']; $this->pro['LastLogin'] = $rows['lastlogin']; $this->pro['Gmember'] = $rows['gmem_id']; $this->pro['isActive'] = $rows['isactive']; } }
<html> <head> <title>Workflow Display</title> <link rel="stylesheet" href="../common/css/style.css"> <script src="../common/js/jquery-1.9.1.js"></script> <script src="../common/utils.js"></script> <script src="../common/js/base64.js"></script> <script src="js/wfshow.js?8"></script> <?php $sql = "SELECT * FROM tm_workflow WHERE isrun='YES' AND id in(SELECT wf_id FROM tm_workflow_task WHERE isrun in (2,3) AND (user LIKE '%,{$username},%' OR user LIKE '{$username},%'))"; $mysql_task = new CLS_MYSQL(); $objmysql = new CLS_MYSQL(); $objmysql->Query($sql); $wfs = ""; $c = 0; while ($r = $objmysql->Fetch_Assoc()) { $data = $r['data']; if (!($wf_id > 0)) { $wf_id = $r['id']; } $selected = $r['id'] == $wf_id ? "selected" : ""; $wfs .= "<option value='{$r['id']}' {$selected}>{$r['name']}</option>"; $sql = "SELECT id FROM tm_workflow_task WHERE isrun=2 AND (user LIKE '%,{$username},%' OR user LIKE '{$username},%')"; $mysql_task->Query($sql); $c++; } if ($c === 0) { $wf_id = 0; } if ($wf_id > 0) { $sql = "select data from tm_workflow where id='{$wf_id}'";