public function mail() { $post = $_POST; if ($post['submit']) { unset($post['submit']); mod_config::set_configs($post); mod_login::message('更新邮箱发送配置成功'); } else { $configs = mod_config::get_configs(array('fl_sendemail', 'fl_sendemailtype', 'fl_fromemail', 'fl_smtpserver', 'fl_smtpport', 'fl_smtpssl', 'fl_smtpauth', 'fl_smtpid', 'fl_smtppass')); $action_link = array('href' => '?c=config&a=index', 'text' => '返回系统配置'); pm_tpl::assign('action_link', $action_link); pm_tpl::assign('ur_here', '配置SMTP发送'); pm_tpl::assign('config', $configs); pm_tpl::display('config_mail'); } }
function getAnswerList() { $tlist = mod_crmmanage::getqtype(); foreach ($tlist as $key => $value) { $newtype[$key + 1] = $value; } $newtype = genTree($newtype); //$answer_id=mod_crmtest::getAnswerId(); //debug($alist['answer_id']); $alist = mod_crmtest::getanswerlist(); //debug($alist); //$a=mb_substr($alist['3']['content'],0,2); pm_tpl::assign("ser_tlist", $newtype); pm_tpl::assign("alist", $alist); pm_tpl::display('crmtest_getanswerlist'); }
public function getpwd() { $post = $_POST; if ($post['submit']) { try { $username = $post['name']; $email = $post['mail']; mod_member::getpwd($username, $email); mod_login::message('密码已发至您的邮箱,敬请查收', '?c=login'); } catch (Exception $e) { mod_login::message($e->getMessage()); } } else { pm_tpl::display('getpwd'); } }
public static function message_login($url = null, $timeout = 2000) { if ($url == null) { $url = $_SERVER['HTTP_REFERER']; } pm_tpl::assign('url_page', $url); pm_tpl::assign('timeout', $timeout); pm_tpl::display('init'); exit; }
public function menu() { $menulist = mod_menu::menulistbypandr(); pm_tpl::assign('menus', $menulist); pm_tpl::display('cphome_menu'); }
public function upload() { pm_tpl::display('test_upload'); }
public function sendmsgtouser() { $username = $_GET['username']; if (!$username) { mod_login::message('请选择要发送的对象'); } $uinfo = mod_member::get_oneamdinbyusername($username); if ($_POST['submit']) { $post = $_POST; $data = array(); $data['content'] = $post['content']; $data['touser'] = $post['username']; $data['addtime'] = time(); mod_pmsys::sendmsg($data); mod_login::message('发送消息成功', '?c=member&a=member_list'); } else { pm_tpl::assign('user', $uinfo); pm_tpl::assign('ur_here', '权限管理 - 发送消息'); pm_tpl::display('pmsys_sendmsgtouser'); } }
public function charts() { pm_tpl::assign('ur_here', '曲线图演示'); pm_tpl::display('demo_charts'); }
public function welcome() { $data = array(); $tmp = explode('/', dirname($_SERVER['PHP_SELF'])); $data['safe_notice'] = is_array($tmp) && !empty($tmp[count($tmp) - 1]) && $tmp[count($tmp) - 1] == 'admin' ? 1 : 0; $adminmsg = mod_pmsys::get_adminmsg(); $Threadsconnected = mod_misc::mysqlstatus(3); $viewer = array('wangjiang', 'songkun'); if (in_array(USERNAME, $viewer)) { pm_tpl::assign('allowview', 1); } pm_tpl::assign('curver', CUR_VERSION); pm_tpl::assign('adminmsg', $adminmsg); pm_tpl::assign('data', $data); pm_tpl::assign('wt', $w); pm_tpl::assign('ur_here', '欢迎页'); pm_tpl::assign('Threads_connected', $Threadsconnected['Value']); pm_tpl::display('start'); }
public function editright() { if (!in_array(ADMINUSERID, $this->rightuserallow)) { mod_login::message('抱歉,您无权编辑权限记录'); } $action_id = $_GET['id']; if (!$action_id) { mod_login::message('请选择要编辑的权限记录'); } if ($_POST['submit']) { $params = $_POST; unset($params['submit']); mod_menu::editright($params, $action_id); mod_login::message('编辑权限记录成功', '?c=menu&a=rightlist'); } else { $info = mod_menu::get_one_right($action_id); $prl = mod_menu::get_parent_right(); $action_link = array('href' => '?c=menu&a=rightlist', 'text' => '返回列表'); pm_tpl::assign('action_link', $action_link); pm_tpl::assign('prl', $prl); pm_tpl::assign('info', $info); pm_tpl::assign('ur_here', '编辑权限'); pm_tpl::display('menu_editright'); } }
public function answerlist() { if ($_POST['rquestion']) { $data['qid'] = $_POST['qid']; $data['content'] = $_POST['reply']; $data['create_time'] = time(); $data['creater_id'] = ADMINUSERID; $data['reply_type'] = 'operation'; pm_db::tran_query("BEGIN"); $id = pm_db::insert('crm_answer', $data, 'tran'); $reply['operation'] = 2; //运营已回复 $status = pm_db::update('crm_question', $reply, "question_id = '{$_POST['qid']}'", 'tran'); if ($id && $status) { pm_db::tran_query("COMMIT"); mod_login::message('回复成功'); } else { pm_db::tran_query("ROLLBACK"); mod_login::message('回复失败'); } pm_db::tran_query("END"); exit; } $qid = $_GET['qid']; $info = mod_crmmanage::getqbyid($qid); $memberinfo = mod_member::get_oneamdinbyuser_id($info['create_id']); $proinfo = mod_product::get_one_product($info['game_id']); $serinfo = mod_crmmanage::getserverbyid($info['server_id']); $info['truename'] = $memberinfo['truename']; $info['pname'] = $proinfo['pname']; $info['server_name'] = $serinfo['server_name']; $tlist = mod_crmmanage::getqtype(); $alist = mod_crmmanage::getanswerlist($qid); $userlist = mod_crmmanage::getusername(); if ($alist) { foreach ($alist as &$value) { if ($value['reply_type'] != 'customer') { foreach ($userlist as $val) { if ($val['user_id'] == $value['creater_id']) { $value['username'] = $val['user_name']; } } } } } pm_tpl::assign("tlist", $tlist); pm_tpl::assign("alist", $alist); pm_tpl::assign("info", $info); pm_tpl::assign("ur_here", "回复列表"); pm_tpl::assign('action_link', array('href' => '?c=crmoper&a=index', 'text' => '问题列表')); pm_tpl::display('crmoper_answerlist'); }
public function addserver() { if ($_POST) { unset($_POST['submit']); $id = pm_db::insert('crm_serverlist', $_POST, true); if ($id) { mod_login::message('添加成功', "?c=crmmanage&a=serverlist"); } else { mod_login::message('添加失败'); } exit; } $plist = mod_product::getcrmproduct(); pm_tpl::assign('plist', $plist); pm_tpl::display('crmmanage_addserver'); }
public function menu() { $menus = mod_menu::getmenulist(); pm_tpl::assign('menus', $menus); pm_tpl::display('cphome_menu'); }
public function logsmgdb() { $get = $_GET; $col = mongoinit('productmanage', 'oplogs'); $start = empty($_GET['start']) ? 0 : (int) $_GET['start']; $username = $get['username'] ? $get['username'] : ''; $ctr = $get['ctr'] ? $get['ctr'] : ''; $act = $get['act'] ? $get['act'] : ''; $start_date = $get['start_date'] ? $get['start_date'] : ''; $start_dategsh = $get['start_date'] ? date('Ymd', strtotime($get['start_date'])) : ''; $end_date = $get['end_date'] ? $get['end_date'] : ''; $end_dategsh = $get['end_date'] ? date('Ymd', strtotime($get['end_date'])) : ''; $logslist = mod_member::get_logslistmgdb($start, $username, $ctr, $act, $start_dategsh, $end_dategsh, $col, 20); //debug($logslist); if ($logslist) { pm_tpl::assign('logslist', $logslist['data']); pm_tpl::assign('page_url', "?c=member&a=logsmgdb&username={$username}&ctr={$ctr}&act={$act}&start_date={$start_date}&end_date={$end_date}"); pm_tpl::assign('pages', mod_pager::get_page_number_list($logslist['total'], $start, 20)); } pm_tpl::assign('ur_here', ' 权限系统 - 用户操作历史【Mongodb版】 '); pm_tpl::assign('username', $username); pm_tpl::assign('ctr', $ctr); pm_tpl::assign('act', $act); pm_tpl::assign('start_date', $start_date); pm_tpl::assign('end_date', $end_date); pm_tpl::display('member_logsmgdb'); }