<?php //公共文件 include_once "../global.php"; //包含底层模型 include_once 'xjt_model.php'; //校捷通公共文件 include_once "xjt_global.php"; $soap = new Soap_xjt(); //创建接口对象 $soapData = array(); $act = request_var('act', ''); $cur_buss = request_var('buss', ''); // 联接FTP服务器 $conn = ftp_connect($ftp_url, 21, 30); $result = ftp_login($conn, $ftp_name, $ftp_pwd); if (!$conn || !$result) { message_box("连接FTP服务器失败,请稍后再试该功能。如果您失败过多次,请与管理员联系!", XJT_ADMIN, go_to(array('/xjt_admin/home.php' => '返回'))); exit; } else { // ftp_close($conn);//关闭ftp if ($act == 'upload') { $excelfile = !empty($HTTP_POST_FILES['ufile']['name']) ? $HTTP_POST_FILES['ufile'] : ''; if ($excelfile) { if ($excelfile['size'] > 20 * 1024 * 1024) { message_box("您选择要上传的文件太大,请重新上传!", XJT_ADMIN, go_to(array('/xjt_admin/replacement.php' => '返回'))); } if (preg_match('/.*\\.xls$/', $excelfile['name'])) { //得到学校信息 $schoolData = array(); $soap->admSchInfo($userData['m_account'], $schoolData);
if (!$bussCode || !$bussSort) { message_box('参数出错,请重试', XJT, go_to(array('/xjt/payonline.php' => '返回'))); exit; } else { $soap = new Soap_xjt(); //创建接口对象 $soapData = array(); $result = $soap->getAccBusInfo($userData['m_account'], $soapData); foreach ($soapData['data'] as $v) { if ($v['bussCode'] == $bussCode && $v['bussSort'] == $bussSort) { $bussInfo = $v; } } } if (!$bussInfo) { message_box('参数出错,请重试', XJT, go_to(array('/xjt/payonline.php' => '返回'))); } $smarty->assign('msg', $msg); $smarty->assign('bussInfo', $bussInfo); $smarty->assign('userData', $_SESSION['userData']); $smarty->display('xjt/dopayonline.tpl'); } else { $soap = new Soap_xjt(); //创建接口对象 $soapData = array(); $result = $soap->getAccBusInfo($userData['m_account'], $soapData); $smarty->assign('soapData', $soapData['data']); $smarty->assign('userData', $_SESSION['userData']); $smarty->assign('account', $userData['m_account']); $smarty->display('xjt/payonline.tpl'); }
$_SESSION['userData']['AdmSex'] = $adminsex; $_SESSION['userData']['AdmTel'] = $adminconn; message_box('修改管理员信息成功', XJT_ADMIN, go_to(array('/xjt_admin/userinfo.php' => '返回'))); exit; } else { $msg = ''; } } $smarty->assign('adminInfo', $_SESSION['userData']); $smarty->assign('msg', $msg); $smarty->display('xjt_admin/changeinfo.tpl'); } else { if ($mod == 'modifypassword') { $msg = ''; if ($act == 'submit') { $soap = new Soap_xjt(); //创建接口对象 $oldpwd = request_var('oldpwd', ''); $newpwd = request_var('newpwd', ''); $newpwd2 = request_var('newpwd2', ''); $soapData = array(); //$result = $soap->admLogIn($userData['m_account'], $oldpwd); $result = true; if ($result) { if ($newpwd == $newpwd2) { $result = $soap->admModifyPwd($userData['m_account'], $oldpwd, $newpwd); if ($result) { if (isset($_SESSION['userData'])) { unset($_SESSION['userData']); } //删除session
//学号 $AccName = request_var('AccName', ''); //姓名 $Account = request_var('Account', ''); //校捷通帐号 $Remark = request_var('Remark', ''); //搜索条件 $sort_code = request_var('sort_code', 'up'); //学号排序 $sort_school = request_var('sort_school', 'up'); //学校排序 $sort_state = request_var('sort_state', 'up'); //是否缴费排序 $sort_first = request_var('sort_first', 'sort_code'); //按哪个排 $soap = new Soap_xjt(); //创建接口对象 $buss = array(); $result = $soap->getForTransBuss($userData['m_account'], $buss); //业务数据 $smarty->assign('buss', $buss); if (!$cur_buss) { $cur_buss_tmp = current($buss); $cur_buss = $cur_buss_tmp['bussId']; } //得到学校信息 $schoolData = array(); $soap->admSchInfo($userData['m_account'], $schoolData); //得到学校信息 //如果没有校区编号,就默认自已所在的校 //if (!$cur_scharea) {
if ($soapData) { $soapData = array_slice($soapData['data'], ($page - 1) * $per_page_num, $per_page_num, true); } $smarty->assign('soapData', $soapData); $smarty->assign('fromdate', $fromdate); $smarty->assign('todate', $todate); $smarty->assign('userData', $_SESSION['userData']); $smarty->assign('account', $userData['m_account']); $smarty->assign('mod', 'stat'); $smarty->display('xjt/transwasteliststat.tpl'); } else { $fromdate = request_var('from', ''); $todate = request_var('to', ''); $soapData = array(); if ($fromdate && $todate) { $soap = new Soap_xjt(); //创建接口对象 $result = $soap->getAccTranWaste($userData['m_account'], $fromdate, $todate, $soapData); } //分页 $page_arr = array('total_item' => $soapData['sum'], 'per_page_num' => $per_page_num, 'cur_item_str' => ''); $pager_class = new pager_str($page_arr); $page_str = $pager_class->page_str; //分页内容 $page = $pager_class->get_cur_page(); //得到当前页码 $smarty->assign('page_str', $page_str); //分页 end if ($soapData) { $soapData = array_slice($soapData['data'], ($page - 1) * $per_page_num, $per_page_num, true); }
<?php include_once '../global.php'; //包含底层模型 include_once 'xjt_model.php'; //校捷通公共文件 include_once "xjt_global.php"; $soap = new Soap_xjt(); //创建接口对象 $soapData = array(); $soap->admSchInfo($userData['m_account'], $soapData); //得到学校信息 $smarty->assign('schoolData', $soapData); $smarty->assign('userData', $_SESSION['userData']); $smarty->display('xjt_admin/home.tpl');
if ($_SERVER['HTTP_REFERER'] !== 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) { header('location: http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']); } $param = array(); $param['m_account'] = $account; if (!empty($code)) { $auth_code = new AuthCode(); if (!$auth_code->validate($code)) { $param['msg'] = '校验码错误,请重新输入'; $param['codeNum'] = FAILURE_NUM; showTpl($smarty, $param); exit; } } $soapData = array(); $soap = new Soap_xjt(); $result = $soap->login($account, $pwd, $soapData); if ($result) { $_SESSION['login_failure'] = 0; //修改失败次数为0 $_SESSION['userData'] = $soapData; $u_ary = array('login_failure' => 0); if (!checkuser($account)) { $u_ary['m_account'] = $account; $u_ary['m_pwd'] = ''; $u_ary['m_name'] = $soapData['AccName']; $u_ary['m_school'] = $soapData['schName']; $u_ary['m_group'] = 2; //普通用户 $db->insert(TABLE_CZECH_MEMBER, $u_ary); }
include_once "../global.php"; //包含底层模型 include_once 'xjt_model.php'; //校捷通公共文件 include_once "xjt_global.php"; $per_page_num = 30; //每页30条 $cur_buss = request_var('buss', ''); //业务名称 $fromdate = request_var('from', ''); $todate = request_var('to', ''); $PerCode = request_var('PerCode', ''); //学号 $AccName = request_var('AccName', ''); //姓名 $soap = new Soap_xjt(); //创建接口对象 //得到学校信息 $schoolData = array(); $soap->admSchInfo($userData['m_account'], $schoolData); //得到学校信息 $buss = array(); $result = $soap->getSchOpenBuss($schoolData['SchNum'], $buss); $smarty->assign('buss', $buss); $soapData = array(); if ($fromdate && $todate) { $result = $soap->getTranWasteStat($cur_buss, $PerCode, $AccName, $fromdate, $todate, $soapData); } //分页 $page_arr = array('total_item' => count($soapData), 'per_page_num' => $per_page_num, 'cur_item_str' => ''); $pager_class = new pager_str($page_arr);
exit; } $C2bossRecid = request_var('C2bossRecid', ''); $bussInfo = array(); $soap = new Soap_xjt(); //创建接口对象 $soapData = array(); $result = $soap->getAccPendBook($userData['m_account'], $soapData); foreach ($soapData['data'] as $v) { if ($v['id'] == $C2bossRecid) { $bussInfo = $v; } } $bussInfo['money'] = abs($bussInfo['money']); if (!$bussInfo) { message_box('参数出错,请重试', XJT, go_to(array('/xjt/affirm.php' => '返回'))); exit; } $smarty->assign('bussInfo', $bussInfo); $smarty->assign('userData', $_SESSION['userData']); $smarty->display('xjt/doaffirm.tpl'); } else { $soap = new Soap_xjt(); //创建接口对象 $soapData = array(); $result = $soap->getAccPendBook($userData['m_account'], $soapData); $smarty->assign('soapData', $soapData['data']); $smarty->assign('userData', $_SESSION['userData']); $smarty->assign('account', $userData['m_account']); $smarty->display('xjt/affirm.tpl'); }
// 登出 返回首页 if ($do_act == 'logout') { unset($do_act); if (isset($_SESSION['userData'])) { unset($_SESSION['userData']); } //删除session $db->delete(TABLE_CZECH_SESSION, 'session_id = "' . $_COOKIE['session_id'] . '"'); setcookie('m_account', '', time() - $system_data['cookie_time'], '/'); setcookie('session_id', '', time() - $system_data['cookie_time'], '/'); header('location: /'); exit; } //登录 if ($do_act == 'login') { $soap = new Soap_xjt(); unset($do_act); if ($_SERVER['HTTP_REFERER'] !== 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) { header('location: http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']); } $param = array(); $param['m_account'] = $account; if (!empty($code)) { $auth_code = new AuthCode(); if (!$auth_code->validate($code)) { $param['msg'] = '校验码错误,请重新输入'; $param['codeNum'] = FAILURE_NUM; showTpl($smarty, $param); exit; } }