'审批中', 'checked' => '完成', 'checkno' => '不通过'), $colorArray = array('checking' => 'colOrange', 'checked' => 'colGreen', 'checkno' => 'colRed'); public function beforeRun($resource, $action) { if (!isset($_SESSION['auid'])) { return Doo::conf()->APP_URL . 'manage'; } } public function __construct() { $this->users = new AUsers(); $this->user = new AUser(); $this->userz = new Users(); $this->profile = new Profile(); $this->mailer = new Mailer(); $this->ph = new PasswordHash(8, FALSE); $this->am = new Ameasure(); $this->ama = new AmeasureAudit(); $this->af = new Afileup(); $this->an = new Anumofper(); $this->project = new Project(); $this->cc = new Contractact(); $this->data['rootUrl'] = Doo::conf()->APP_URL; } function addUser() { $params = NULL; if (isset($_POST['email'])) { if (filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) { $postArray = $_POST; $passwdStr = $this->randomPassword(); $postArray['userid'] = $this->users->createUser($_POST['email'], $passwdStr); if (isset($postArray['userid'])) { $this->profile->insertProfile($postArray); $this->mailer->setEmails($_POST['email']); $this->mailer->seteTitle('新账号开通'); $this->mailer->setClientName($postArray['realname']); $signupConfigStr = '
开通了计量支付云版的帐号:
登录帐号(邮箱):' . $_POST['email'] . '
登录密码:' . $passwdStr . '
请及时登录并修改您的个人信息及密码。
登录云端,下载桌面软件:
'.Doo::conf()->APP_URL.'
重置了计量支付云版的帐号密码:
登录帐号(邮箱):' . $userzArray['uemail'] . '
登录密码:' . $passwdStr . '
请及时登录并修改您的新密码。
'; $this->mailer->setContent($signupConfigStr); $this->mailer->send_mail(); echo $userzArray['uemail']; } } } function userList() { if (isset($_SESSION['passwd'])) { echo '添加用户的密码是:' . $_SESSION['passwd']; } $this->data['userlist'] = $this->users->getRowAll(); foreach ($this->data['userlist'] as $key => $value) { $proArray = $this->profile->getProWithUid($value['uid']); if (isset($proArray)) { $this->data['userlist'][$key]['name'] = $proArray['name']; $this->data['userlist'][$key]['company'] = $proArray['company']; $this->data['userlist'][$key]['jobs'] = $proArray['jobs']; $this->data['userlist'][$key]['phone'] = $proArray['phone']; $this->data['userlist'][$key]['mobile'] = $proArray['mobile']; $this->data['userlist'][$key]['isstop'] = $value['isstop']; } unset($proArray); $this->data['userlist'][$key]['email'] = $value['uemail']; } $this->data['menu'] = 2; $this->render('admin-userlist', $this->data, TRUE); } function itemList() { // TODO:增加判断审批人期数和上报最新期数比较来显示是否需要显示删除审批人操作 // TODO:提示信息:可能显示的是瞬时状态,需要与客户经过确认之后方可删除。 // TODO:审批人状态和标段状态暂未加入审批人与标段是否一直的判断 if ($this->params['pid'] > 0) { $mArray = $this->am->getRowAll($this->params['pid']); $this->data['pid'] = $this->params['pid']; } foreach ($mArray as $key => $value) { $mArray[$key]['contracttotal'] = number_format($value['contracttotal'], 2, '.', ','); $mArray[$key]['stname'] = $this->cc->getRowByStid($value['stid'])['stname']; $tmp = $this->an->getOne(array('where' => 'pmid=?', 'param' => array($value['pmid']), 'groupby' => 'numpname', 'desc' => 'numpname', 'asArray' => TRUE)); if ($tmp) {// 没有标段数据 $mArray[$key]['has'] = 1; $mArray[$key]['status'] = $this->statusArray[$tmp['currstatus']]; $mArray[$key]['color'] = $this->colorArray[$tmp['currstatus']]; $mArray[$key]['numpname'] = $tmp['numpname']; $intTimes = $this->ama->getOne(array('where' => 'pmid=? and numpname=?', 'param' => array($value['pmid'], $tmp['numpname']), 'groupby' => 'times', 'desc' => 'times', 'asArray' => TRUE))['times']; $auditArray = $this->ama->find(array('where' => 'pmid=? and numpname=? and times=?', 'param' => array($value['pmid'], $tmp['numpname'], $intTimes), 'asArray' => TRUE)); foreach ($auditArray as $k => $v) { if (($v['last'] == 1) && ($v['mastatus'] != 'uncheck')) { $mArray[$key]['auditor'] = $this->profile->getProWithUid($v['auditoruid'])['name']; $mArray[$key]['auditor'] = '终审-' . $mArray[$key]['auditor']; $mArray[$key]['auditstatus'] = $this->statusArray[$v['mastatus']]; break; } elseif (($v['last'] == 2) && ($v['mastatus'] != 'uncheck')) { $mArray[$key]['auditor'] = $this->profile->getProWithUid($v['auditoruid'])['name']; $mArray[$key]['auditstatus'] = $this->statusArray[$v['mastatus']]; $mArray[$key]['auditnum'] = $k . '审'; } } } else { $mArray[$key]['has'] = 0; } } $pArray = $this->project->getAll(); $this->data['userlist'] = $mArray; $this->data['pArray'] = $pArray; $this->data['menu'] = 4; $this->render('admin-item', $this->data, TRUE); } function itemDel() { $this->am->delete(array('where' => 'pmid=?', 'param' => array($this->params['pmid']))); $this->ama->delete(array('where' => 'pmid=?', 'param' => array($this->params['pmid']))); $this->af->delete(array('where' => 'pmid=?', 'param' => array($this->params['pmid']))); $this->an->delete(array('where' => 'pmid=?', 'param' => array($this->params['pmid']))); return Doo::conf()->APP_URL . 'manage/item/list'; } }