<?php if (!in_array($op, array('qrcode', 'query', 'change', 'print', 'disp', 'dispfee'))) { $op = 'qrcode'; } if (in_array($op, array('qrcode', 'query'))) { $keyword = trim($_GPC['keyword']); if (checksubmit()) { if ($_GPC['submit'] == 'pay') { $keyword = getInputGUID($keyword); if (empty($keyword)) { message('请输入有效的认筹单号!', $this->createWebUrl($do), 'warning'); } $chips = biz_getChipsByQrcode($keyword); if (empty($chips)) { message('无效的认筹单!', $this->createWebUrl($do), 'error'); } else { $confirmed = biz_checkChipsStatus($chips, 8); if (!$confirmed) { header('location:' . $this->createWebUrl($do, array('id' => $chips['id'], 'op' => 'disp'))); } else { header('location:' . $this->createWebUrl($do, array('id' => $chips['id'], 'op' => 'dispfee'))); } } } } $status = array(1 => '需补定', 2 => '已足定'); $condition = " `projguid`=:projguid and roomstatus>0 "; $pars = array(':projguid' => $_W['project']['projguid']); if (!$_W['isfounder']) { $condition .= ' and deleted=0 ';
} $pindex = max(1, intval($_GPC['page'])); $psize = 15; $start = ($pindex - 1) * $psize; $sql = "SELECT COUNT(*) FROM " . tablename('chips') . " WHERE {$condition}"; $total = pdo_fetchcolumn($sql, $pars); // $sql = "SELECT * FROM " . tablename('chips') . " WHERE {$condition} ORDER BY signed desc,lucky desc, `createtime` DESC LIMIT {$start}, {$psize}"; $pager = pagination($total, $pindex, $psize); $list = pdo_fetchall($sql, $pars); $status = biz_getDictionary('chipstatus'); include $this->template('chips_signed'); } if ($op == 'disp') { disableWebCache(); $keyword = getInputGUID($_GPC['qrcode']); if (empty($keyword)) { message('请输入有效的认筹单号!', $this->createWebUrl($do), 'warning'); } $chips = biz_getChipsByQrcode($keyword); if (empty($chips)) { message('无效的认筹单!', $this->createWebUrl($do), 'error'); } $url = $this->createWebUrl($do, array('op' => 'disp', 'qrcode' => $keyword)); $ok = empty($chips['lucky']); if ($ok) { //未中签处理,1、未签处理,2已签到,未叫号、已叫号 if (empty($chips['signed'])) { $message = '此单未签到、未中签,是否确认中签?'; $ok = false; } else {
if ($op == 'list') { // 添加组员 $groups = biz_getAllSignGroup($pid); $keys = array_keys($groups); if (count($keys) > 0 && !in_array($sid, $keys)) { $sid = $keys[0]; } $sel_group = $groups[$sid]; unset($keys); $signs = biz_getSignsByGroup($sid, $pid); include $this->template('group_list'); exit; } if ($op == 'addrc') { if ($_W['isajax'] && $_W['ispost']) { $qrcode = getInputGUID($_GPC['qrcode']); if (empty($qrcode)) { exit('请填写有效的认筹单号!'); } $chips = biz_getChipsByQrcode($qrcode); if (empty($chips) || $chips['projguid'] != $_W['project']['projguid']) { exit('无效的认筹单!'); } $num = intval($_GPC['sel_code']); $group = biz_getSignGroupByNum($num, $pid); if (empty($group)) { exit('组数据不存在,请刷新页面!'); } $presign = biz_getSignInfoByQrcode($qrcode, $pid); if (!empty($presign)) { exit("认筹单已在{$presign['gid']}组,不能再次预设!");
<?php if (!in_array($op, array('qrcode', 'query', 'pay', 'print'))) { $op = 'qrcode'; } if (in_array($op, array('qrcode', 'query'))) { if (checksubmit() && $_GPC['submit'] == 'pay') { $keyword = getInputGUID($_GPC['keyword']); if (empty($keyword)) { message('请输入有效的认筹单号!' . "[{$_GPC['keyword']}]", $this->createWebUrl($do), 'warning'); } $chips = biz_getChipsByQrcode($keyword, 'id'); if (empty($chips)) { message("无效的认筹单![{$keyword}]", $this->createWebUrl($do), 'error'); } else { header('location:' . $this->createWebUrl($do, array('op' => 'pay', 'id' => $chips['id']))); exit; } } $status = array(1 => '需补定', 2 => '已足定'); $condition = " `projguid`=:projguid and roomstatus>0 "; $pars = array(':projguid' => $_W['project']['projguid']); if (!$_W['isfounder']) { $condition .= ' and deleted=0 '; $condition .= ' and StationCode Like :code '; $pars[':code'] = "%{$_W['rights']['StationCode']}%"; } if ($op == 'query') { $keyword = trim($_GPC['keyword']); if (!empty($keyword)) { $types = array('cname', 'cardid', 'mobile');
<?php defined('IN_IA') or exit('Access Denied'); $op = trim($_GPC['op']); if (!in_array($op, array('delete', 'import', 'update'))) { message('无效的功能调用!', url('project/display/')); } if (!$_W['isfounder']) { message('非管理员,无权限操作!', url('project/display/')); } $guid = getInputGUID($_GPC['guid']); if (empty($guid)) { message('请填写有效项目GUID!', url('project/display/')); } $project = db_getProject($guid, true, false); if ($op == 'delete') { if (!empty($project)) { if ($project['status'] == 9) { biz_deleteProject($project); message('项目已删除!', url('project/display/')); } else { message('项目非关闭状态,禁止删除!', url('project/display/')); } } else { message('无效的参数!', url('project/display/')); } exit; } load()->web('progress'); if ($op == 'import') { if (empty($project)) {