function print_Confirm($chips, $url, $printType) { global $_W, $_GPC; disableWebCache(); $templates = biz_getPrintTemplates($_W['project']['projguid'], $printType, 'id'); if (empty($templates) || count($templates) == 0) { echo '无可用的打印模板,请找管理配置模板!'; exit; } $prints = biz_getAllPrinter($_W['project']['projguid']); if (empty($prints) || count($prints) == 0) { echo '无可用的打印机,请找管理员确认打印机配置!'; exit; } $maxcopy = 3; $copy = $printType == 4 ? 3 : 1; //读取上次使用的打印机 if (!empty($_GPC['__print'])) { $lastPrintId = intval($_GPC['__print']); } else { $lastPrintId = $prints[0]['id']; } $titles = biz_getDictionary('printtype'); $printTitle = $titles[$printType]; if (empty($printTitle)) { echo '无效的打印调用!'; exit; } //处理是否已打印过的提示 $showMsg = biz_checkChipsStatus($chips, $printType, 'printstatus'); //诚意金可多份(订金?) if ($showMsg && in_array($printType, array(2, 3))) { $bill = biz_getBill($chips['qrcode'], $printType - 1, false); $showMsg = empty($bill); unset($bill); } include template('common/print', TEMPLATE_INCLUDEPATH); }
<?php //增加接口调用 define('IN_SYS', true); error_reporting(E_ALL ^ ~E_NOTICE ^ E_WARNING); require './framework/bootstrap.inc.php'; load()->web('business'); load()->web('app'); disableWebCache(); $func = strtolower($_GPC['func']); $params = $_GPC['params']; if (is_array($params)) { $params = array_change_key_case($params, CASE_LOWER); } $res = array('result' => false, 'msg' => '无效的功能调用'); //检查调用IP? //cache()->flush(); if ($func == 'calllnum') { $res['msg'] = ''; $res['result'] = true; $num = memcached_get('callnum'); $res['data'] = sprintf('%03d', intval($num)); returnJson($res); } if ($func == 'login') { $user = biz_login($params['usercode'], $params['password']); if (!empty($user)) { unset($user['Password']); $res['msg'] = '登录成功'; $res['result'] = true; $res['data']['user'] = $user;