<?php /** * 会员单位管理 * @copyright (c) Emlog All Rights Reserved */ require_once '../init.php'; require_once '../include/lib/class.phpmailer.php'; require_once '../include/lib/class.smtp.php'; define('TEMPLATE_PATH', TPLS_PATH . Option::get('mobile_templet') . '/'); //前台模板路径 $Viporg_model = new Viporg_Model(); $action = isset($_GET['action']) ? addslashes($_GET['action']) : ''; //加载会员单位管理页面 if ($action == '') { $ckcode = "<span>验证码</span>\n <div class=\"val\" ><input name=\"imgcode\" id=\"imgcode\" type=\"text\" class=\"souo_textbox_small\" />\n <img src=\"../include/lib/checkcode.php\" align=\"absmiddle\"></div>"; $errorcode = isset($_GET['errorcode']) ? addslashes($_GET['errorcode']) : ''; include View::getView('header'); require_once View::getView('viporgRegist'); include View::getView('footer'); View::output(); } if ($action == 'doadd') { $img_code = isset($_POST['imgcode']) ? addslashes(trim(strtoupper($_POST['imgcode']))) : ''; session_start(); $sessionCode = isset($_SESSION['code']) ? $_SESSION['code'] : ''; if (empty($img_code) || $img_code != $sessionCode) { emDirect('./viporgRegist.php?errorcode=1'); } $userData = array(); $userData['name'] = isset($_POST['name']) ? addslashes(trim($_POST['name'])) : '';
$condition = ' where duty=' . $duty; } $Viporg_Model = new Viporg_Model(); $page = isset($_GET['page']) ? intval($_GET['page']) : 1; $users = $Viporg_Model->getUsers($page, $condition); $usernum = $Viporg_Model->getUserNum(); $pageurl = pagination($usernum, Option::get('admin_perpage_num'), $page, "./viporg.php?page="); include View::getView('header'); require_once View::getView('viporg'); View::output(); } if ($action == 'detail') { $uid = intval($_GET['uid']); $options_cache = Option::getAll(); extract($options_cache); $Viporg_Model = new Viporg_Model(); $user = $Viporg_Model->getUserDetail($uid); if ($user['duty'] == 1) { $user['duty'] = '理事单位'; } if ($user['duty'] == 2) { $user['duty'] = '常务理事单位'; } if ($user['duty'] == 3) { $user['duty'] = '会员单位'; } if (empty($user['avatar'])) { $user['avatar'] = './admin/views/images/avatar.jpg'; } else { $user['avatar'] = str_replace("../", '', $user['avatar']); }
<?php /** * 会员单位管理 * @copyright (c) Emlog All Rights Reserved */ require_once 'globals.php'; $Viporg_model = new Viporg_Model(); //加载会员单位管理页面 if ($action == '') { $page = isset($_GET['page']) ? intval($_GET['page']) : 1; $users = $Viporg_model->getUsers($page); $usernum = $Viporg_model->getUserNum(); $pageurl = pagination($usernum, Option::get('admin_perpage_num'), $page, "./viporg.php?page="); include View::getView('header'); require_once View::getView('viporg'); include View::getView('footer'); View::output(); } if ($action == 'getRegist') { $page = isset($_GET['page']) ? intval($_GET['page']) : 1; $regist = isset($_POST['regist']) ? intval($_POST['regist']) : -1; if ($regist == -1) { $users = $Viporg_model->getUsers($page); $usernum = $Viporg_model->getUserNum(); } else { $users = $Viporg_model->getUsers($page, ' where regist=' . $regist); $usernum = $Viporg_model->getUserNumByCondition(' where regist=' . $regist); } $pageurl = pagination($usernum, Option::get('admin_perpage_num'), $page, "./viporg.php?page="); include View::getView('header');