当前位置: 首页>>代码示例>>PHP>>正文


PHP serverlog函数代码示例

本文整理汇总了PHP中serverlog函数的典型用法代码示例。如果您正苦于以下问题:PHP serverlog函数的具体用法?PHP serverlog怎么用?PHP serverlog使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了serverlog函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: cooperation_search

function cooperation_search()
{
    $page = max(1, MooGetGPC('page', 'integer', 'G'));
    $limit = 20;
    $offset = ($page - 1) * $limit;
    $where = array();
    $where['sid'] = MooGetGPC('sid', 'integer', 'P');
    $where['activities'] = MooGetGPC('activities', 'string', 'P');
    $where['cooperation'] = MooGetGPC('cooperation', 'integer', 'P');
    if (!empty($where)) {
        foreach ($where as $key => $value) {
            if (!empty($value)) {
                $where[$key] = '`' . $key . '`=\'' . $value . '\'';
            } else {
                unset($where[$key]);
            }
        }
    }
    $where = empty($where) ? '' : 'where ' . implode(' and ', $where);
    $count = $GLOBALS['_MooClass']['MooMySQL']->getOne('SELECT COUNT(`id`) AS num FROM ' . $GLOBALS['dbTablePre'] . 'cooperation ' . $where);
    $data = $GLOBALS['_MooClass']['MooMySQL']->getAll('SELECT * FROM ' . $GLOBALS['dbTablePre'] . 'cooperation ' . $where . ' ORDER BY id DESC LIMIT  ' . $offset . ',' . $limit);
    $currenturl = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
    $currenturl2 = preg_replace("/(&page=\\d+)/", "", $currenturl);
    $total['num'] = isset($total['num']) && $total['num'] ? $total['num'] : 0;
    $pages = multipage($total['num'], $limit, $page, $currenturl);
    $page_num = ceil($total['num'] / $limit);
    $cooperation_config = $GLOBALS['cooperation_config'];
    $activities = $GLOBALS['activities'];
    $activitie = MooGetGPC('activities', 'string', 'P');
    $sids = MooGetGPC('sid', 'integer', 'P');
    serverlog(1, $GLOBALS['dbTablePre'] . 'cooperation', "{$GLOBALS['username']}查看志愿者合作列表", $GLOBALS['adminid']);
    require adminTemplate('active_cooperation_list');
    exit;
}
开发者ID:noikiy,项目名称:zays,代码行数:34,代码来源:active_cooperation.php

示例2: system_adminaction_edit

function system_adminaction_edit()
{
    global $menu_nav_arr, $dbTablePre;
    $actionid = MooGetGPC('actionid', 'integer');
    $ispost = MooGetGPC('ispost', 'integer');
    if (empty($actionid)) {
        MooMessageAdmin('参数错误', 'index.php?action=adminaction&h=list', 1);
    }
    if ($ispost) {
        $actiondesc = MooGetGPC('actiondesc', 'string');
        $actioncode = MooGetGPC('actioncode', 'string');
        $navcode = MooGetGPC('navcode', 'string');
        $navname = MooGetGPC('navname', 'string');
        if (empty($actiondesc) || empty($actioncode) || empty($navcode) || empty($navname)) {
            $admin->showMessage('请将信息填写完整', 'index.php?action=adminaction&h=add', 1);
        }
        $sql = "UPDATE {$GLOBALS['dbTablePre']}admin_action SET navname='{$navname}',navcode='{$navcode}',actioncode='{$actioncode}',actiondesc='{$actiondesc}' WHERE id='{$actionid}'";
        $result = $GLOBALS['_MooClass']['MooMySQL']->query($sql);
        if ($result) {
            //note 插入日志
            serverlog(2, $GLOBALS['dbTablePre'] . 'admin_action', "{$GLOBALS['username']}修改操作{$actionid}", $GLOBALS['adminid']);
            salert('修改成功', 'index.php?action=system_adminaction&h=list');
            //MooMessageAdmin('修改成功','index.php?action=system_adminaction&h=list',1);
        } else {
            salert('修改失败', 'index.php?action=system_adminaction&h=list');
            //MooMessageAdmin('修改失败','index.php?action=system_adminaction&h=list',1);
        }
    }
    $sql = "SELECT * FROM {$GLOBALS['dbTablePre']}admin_action WHERE id='{$actionid}'";
    $adminaction = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
    require_once adminTemplate('adminaction_edit');
}
开发者ID:noikiy,项目名称:zays,代码行数:32,代码来源:system_adminaction.php

示例3: site_media_edit

function site_media_edit()
{
    $ispost = MooGetGPC('ispost', 'integer', 'P');
    if ($ispost) {
        $id = MooGetGPC('id', 'integer', 'P');
        $title = MooGetGPC('title', 'string', 'P');
        $type = MooGetGPC('type', 'string', 'P');
        $addtime = strtotime(MooGetGPC('addtime', 'string', 'P'));
        $source = MooGetGPC('source', 'string', 'P');
        $content = MooGetGPC('content', 'string', 'P');
        if (empty($content)) {
            salert("内容不能为空");
        }
        $sql = "UPDATE {$GLOBALS['dbTablePre']}media SET sid = {$GLOBALS['adminid']},type = '{$type}', title = '{$title}', content = '{$content}', addtime = '{$addtime}', source = '{$source}' WHERE id={$id}";
        $GLOBALS['_MooClass']['MooMySQL']->query($sql);
        //note 插入日志
        serverlog(2, $GLOBALS['dbTablePre'] . 'media', "{$GLOBALS['username']}编辑媒体报道", $GLOBALS['adminid']);
        salert("编辑成功", "index.php?action=site_media&h=edit&id=" . $id);
    }
    $isedit = 1;
    $id = MooGetGPC('id', 'integer', 'G');
    $sql = "SELECT * FROM {$GLOBALS['dbTablePre']}media WHERE id = {$id}";
    $news = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
    require adminTemplate('site_media_add');
}
开发者ID:noikiy,项目名称:zays,代码行数:25,代码来源:site_media.php

示例4: system_adminlog_del

function system_adminlog_del()
{
    $logid_list = MooGetGPC('checkboxes', 'string');
    $day = MooGetGPC('day', 'integer');
    $time = time() - $day * 24 * 60 * 60;
    if (empty($logid_list) && empty($day)) {
        MooMessageAdmin('参数错误', 'index.php?action=system_adminlog&h=list', 1);
    }
    if (!empty($logid_list)) {
        $logid_string = implode(',', $logid_list);
        $sql = "DELETE FROM {$GLOBALS['dbTablePre']}server_log WHERE slid IN ({$logid_string})";
        $result = $GLOBALS['_MooClass']['MooMySQL']->query($sql);
        $note = "ID:({$logid_string})";
    } else {
        $sql = "DELETE FROM {$GLOBALS['dbTablePre']}server_log WHERE time<{$time}";
        $result = $GLOBALS['_MooClass']['MooMySQL']->query($sql);
        $note = "时间早于" . date('Y-m-d H:i:s', $time);
    }
    //note 插入日志
    serverlog(4, $GLOBALS['dbTablePre'] . 'server_log', "删除日志{$note}", $GLOBALS['adminid']);
    if ($result) {
        MooMessageAdmin('删除日志成功', 'index.php?action=system_adminlog&h=list', 1);
    } else {
        MooMessageAdmin('删除日志失败', 'index.php?action=system_adminlog&h=list', 1);
    }
}
开发者ID:noikiy,项目名称:zays,代码行数:26,代码来源:system_adminlog.php

示例5: site_recommendget

function site_recommendget()
{
    global $_MooClass, $dbTablePre;
    $ispost = MooGetGPC('ispost', 'integer', 'G');
    if ($ispost == '1') {
        $str = $_SERVER['REQUEST_URI'];
        preg_match_all('/uidlist=(\\d*)/i', $str, $uid);
        $uidarr = $uid[1];
        $uidlist = implode(',', $uidarr);
        //		echo $uidlist;
        $diamond_filename = "../data/cache/diamond_intro.php";
        if (!file_exists($diamond_filename)) {
            echo "钻石会员推荐列表没有生成!";
            exit;
        } else {
            if (!file_put_contents($diamond_filename, $uidlist)) {
                echo "写入不成功";
                exit;
            }
        }
        //添加操作日志
        serverlog(4, $GLOBALS['dbTablePre'] . "members_backinfo", "钻石会员推荐成功", $GLOBALS['adminid'], $GLOBALS['adminid']);
        salert("钻石会员推荐成功!", "index.php?action=site_recommend_diamond&h=list");
        exit;
    }
}
开发者ID:noikiy,项目名称:zays,代码行数:26,代码来源:site_recommend_diamond.php

示例6: financial_rewardpunish_list

function financial_rewardpunish_list()
{
    /*//note 处理搜索会员聊天
        if($_GET['action'] == 'active_chat') {
        	$choose = MooGetGPC('choose','string');
        	$keyword = MooGetGPC('keyword','string');
        	$where = '';
        	if(!empty($choose) && !empty($keyword)) {
        		if($choose == 's_content') {
        			$where = " WHERE $choose like '%$keyword%'";
        		}else{
        			$where = " WHERE $choose = '$keyword'";
        		}
        	}
        }
        
        //note 登陆系统后客服显示自己范围内的, 主管显示全部    
        $return_arr = active_chat_loginlist($where,$keyword);
        $where = $return_arr['where'];
        $member_arr = $return_arr['members'];
    	
        //note 分页处理
    	$page = max(1,MooGetGPC('page','integer'));
        $limit = 15;
        $offset = ($page-1)*$limit;
        
        //note 查询语句
        if($where != '1') { //note 只查询属于该客服下的用户
    	    //note 数据库查询
    	    $sql = "SELECT COUNT(*) num FROM {$GLOBALS['dbTablePre']}service_chat $where";
    		$total = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
    	    
    		$sql = "SELECT * FROM {$GLOBALS['dbTablePre']}service_chat $where ORDER BY s_id DESC LIMIT {$offset},{$limit}";
    		$user_arr = $GLOBALS['_MooClass']['MooMySQL']->getAll($sql);
        }
        
    	//note 搜索分页处理
    	if(!empty($choose) && !empty($keyword)) {
    		$currenturl = "index.php?action=active_chat&h=list&choose=$choose&keyword=".urlencode($keyword);
    	}else {
    		$currenturl = "index.php?action=active_chat&h=list";
    	}
       	$pages = multipage( $total['num'], $limit, $page, $currenturl );
    
    	   	
       	//note 跳转到某一页
       	$page_num = ceil($total['num']/$limit);
    */
    $sql = "SELECT * FROM {$GLOBALS['dbTablePre']}financial_rewardpunish";
    $user_arr = $GLOBALS['_MooClass']['MooMySQL']->getAll($sql);
    foreach ($user_arr as $k => $v) {
        $sql = "SELECT * FROM {$GLOBALS['dbTablePre']}admin_user WHERE uid='{$v['uid']}'";
        $user = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
        $user_arr[$k]['name'] = $user['name'];
    }
    //note 插入日志
    serverlog(1, $GLOBALS['dbTablePre'] . 'financial_rewardpunish', "{$GLOBALS['username']}查看奖惩订单列表", $GLOBALS['adminid']);
    //note 调用模板
    require adminTemplate('financial_rewardpunish_list');
}
开发者ID:noikiy,项目名称:zays,代码行数:60,代码来源:financial_rewardpunish.php

示例7: site_lovetype_del

function site_lovetype_del()
{
    $id = MooGetGPC('id', 'integer', 'G');
    $sql = "DELETE FROM {$GLOBALS['dbTablePre']}love_type WHERE id = {$id}";
    $GLOBALS['_MooClass']['MooMySQL']->query($sql);
    //note 插入日志
    serverlog(4, $GLOBALS['dbTablePre'] . 'love_type', '删除测试评分结果', $GLOBALS['adminid']);
    salert("删除成功", 'index.php?action=site_lovetype&h=list');
}
开发者ID:noikiy,项目名称:zays,代码行数:9,代码来源:site_lovetype.php

示例8: site_lovequestion_del

function site_lovequestion_del()
{
    $tid = MooGetGPC('tid', 'integer', 'G');
    $sql = "DELETE FROM {$GLOBALS['dbTablePre']}love_question WHERE lid = {$tid}";
    $GLOBALS['_MooClass']['MooMySQL']->query($sql);
    //note 插入日志
    serverlog(4, $GLOBALS['dbTablePre'] . 'love_question', '删除爱情测试题目', $GLOBALS['adminid']);
    salert("删除成功", 'index.php?action=site_lovequestion&h=list');
}
开发者ID:noikiy,项目名称:zays,代码行数:9,代码来源:site_lovequestion.php

示例9: login_login

function login_login()
{
    global $_MooClass, $dbTablePre, $memcached;
    /*
    $seccode1 = strtolower(MooGetGPC('vertify_code','string','P'));
    $seccode2 = MooGetGPC('seccode','string','C');
    $session_seccode = $memcached->get($seccode2);
    
    if($seccode1 != $session_seccode){
    	MooMessageAdmin("验证码填写不正确,请确认。", "index.php?action=login",'','',3);
    }
    */
    $username = MooGetGPC('username', 'string', 'P');
    $password = MooGetGPC('password', 'string', 'P');
    $password = md5($password);
    //判断用户名和密码是否为空
    if ($username == '' || $password == '') {
        MooMessageAdmin('用户名或密码不能为空', 'index.php?n=login', 1);
    }
    $userinfo = $_MooClass['MooMySQL']->getOne("SELECT * FROM {$dbTablePre}admin_user WHERE `username`='{$username}' LIMIT 1 ", true);
    if ($userinfo['uid'] && $userinfo['password'] == $password) {
        MooSetCookie('admin', MooAuthCode("{$userinfo['uid']}\t{$userinfo['password']}", 'ENCODE'), 86400);
        //note 写入session表需要的字段值
        $online_ip = GetIP();
        $lastactive = $GLOBALS['timestamp'];
        //note 提取快到期的高级用户并加入备注中
        $nowtime = time();
        $endtime = $nowtime + 8 * 24 * 60 * 60;
        $_MooClass['MooMySQL']->query("DELETE FROM {$dbTablePre}custom_remark WHERE `keyword`='会员到期' AND `cid`='{$userinfo['uid']}'");
        $remark = $_MooClass['MooMySQL']->getAll("SELECT `uid`,`endtime` FROM {$dbTablePre}members_search WHERE `sid`={$userinfo['uid']} AND `s_cid`=30 AND `endtime`<{$endtime}", 0, 0, 0, true);
        for ($i = 0; $i < count($remark); $i++) {
            $content = "尊敬的客服,您的红娘号为" . $remark[$i]['uid'] . "的会员将于" . date('Y-m-d', $remark[$i]['endtime']) . "到期,请尽快与该会员联系";
            $_MooClass['MooMySQL']->query("INSERT INTO {$dbTablePre}custom_remark SET `cid`={$userinfo['uid']},`keyword`='会员到期',`content`='{$content}',`awoketime`='{$remark[$i]['endtime']}'");
        }
        //更新最后登录相关记录
        $sql = "UPDATE {$dbTablePre}admin_user SET lastlogin='{$nowtime}',lastip='{$online_ip}' WHERE uid='{$userinfo['uid']}'";
        $GLOBALS['_MooClass']['MooMySQL']->query($sql);
        $sid_list = '';
        //得到我所管理的客服id列表
        $sid_list = get_mymanage_serviceid_list($userinfo['uid'], $userinfo['groupid']);
        $time = time();
        $sql = "REPLACE INTO {$GLOBALS['dbTablePre']}admin_usersession SET uid='{$userinfo['uid']}',groupid='{$userinfo['groupid']}',dateline='{$time}',sid_list='{$sid_list}'";
        $GLOBALS['_MooClass']['MooMySQL']->query($sql);
        //添加操作日志
        serverlog(3, $dbTablePre . "admin_usersession", "{$userinfo['uid']}成功登陆后台", $userinfo['uid']);
        MooMessageAdmin('登陆成功', 'index.php?n=main', 1);
    } else {
        MooMessageAdmin('用户名或密码错误', 'index.php?n=login', 1);
    }
}
开发者ID:noikiy,项目名称:zays,代码行数:50,代码来源:login.php

示例10: active_activity_list

function active_activity_list()
{
    $type = MooGetGPC('type', 'integer', 'G');
    $page = max(1, MooGetGPC('page', 'integer', 'G'));
    $limit = 20;
    $offset = ($page - 1) * $limit;
    $where = empty($type) ? '' : 'where `type`=' . $type;
    $sql = 'select `id`,`type`,`title`,`price`,`province`,`city`,`regtime` from `' . $GLOBALS['dbTablePre'] . 'activity` ' . $where . ' limit ' . $offset . ',' . $limit;
    $count = $GLOBALS['_MooClass']['MooMySQL']->getOne('select count(`id`) as total from `' . $GLOBALS['dbTablePre'] . 'activity` ' . $where);
    $count = empty($count) ? 0 : $count['total'];
    $data = empty($count) ? array() : $GLOBALS['_MooClass']['MooMySQL']->getAll($sql);
    serverlog(1, $GLOBALS['dbTablePre'] . 'activity', "{$GLOBALS['username']}查看活动列表", $GLOBALS['adminid']);
    require adminTemplate('active_activity_list');
}
开发者ID:noikiy,项目名称:zays,代码行数:14,代码来源:active_activity.php

示例11: financial_telphonetime_list

function financial_telphonetime_list()
{
    $sid_get = 1;
    $sid = $sid_get + 800;
    //note 查询出所有的客服
    $sql = "SELECT * FROM {$GLOBALS['dbTablePre']}admin_user";
    $user_arr = $GLOBALS['_MooClass']['MooMySQL']->getAll($sql);
    /*
    $sql = "SELECT * FROM {$GLOBALS['dbTablePre']}admin_user WHERE uid='$v[uid]'";
    
    $sql = "SELECT * FROM {$GLOBALS['dbTablePre']}financial_telphonetime";
    $user_arr = $GLOBALS['_MooClass']['MooMySQL']->getAll($sql);
    foreach($user_arr as $k => $v){
    	$sql = "
    	SELECT * FROM {$GLOBALS['dbTablePre']}admin_user WHERE uid='$v[uid]'";
    	$user = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
    	$user_arr[$k]['name'] = $user['name'];
    }
    */
    /*
    //note 处理导出功能
    if($_GET['export']) {
    	ob_clean();
    	if(empty($user_arr)){
    		echo '没有找到符合条件的财务报表';
    		exit;
    	}
    	
    	$today = date("Y-m-d");
    	header("Content-type:application/vnd.ms-excel; charset=gbk"); 
    	header("Content-Disposition:attachment; filename={$today}.xls");
    	
    	echo iconv('utf-8','gbk','客服')."\t";
    	echo iconv('utf-8','gbk','电话时间')."\t";
    	echo iconv('utf-8','gbk','日期')."\t\n";
    
    	foreach($user_arr as $k => $v){
    		echo iconv('utf-8','gbk',$v['name'])."\t";
    		echo iconv('utf-8','gbk',$v['telphonetime'])."\t";
    		echo iconv('utf-8','gbk',date("Y-m-d",$v['dateline']))."\t\n";
    	}
    	exit;			
    }
    */
    //note 插入日志
    serverlog(1, $GLOBALS['dbTablePre'] . 'financial_telphonetime', "{$GLOBALS['username']}查看个人电话时间", $GLOBALS['adminid']);
    //note 调用模板
    require adminTemplate('financial_telphonetime_list');
}
开发者ID:noikiy,项目名称:zays,代码行数:49,代码来源:financial_telphonetime.php

示例12: financial_ordertotal_list

function financial_ordertotal_list()
{
    //note 处理搜索会员聊天
    if ($_GET['action'] == 'financial_ordertotal') {
        $bgtime = MooGetGPC('bgtime', 'string');
        $endtime = MooGetGPC('endtime', 'string');
        $where = ' WHERE 1=1 ';
        if (!empty($bgtime) && !empty($endtime)) {
            $bgtime_arr = explode("-", $bgtime);
            $bgtime_mk = mktime(0, 0, 0, $bgtime_arr[1], $bgtime_arr[2], $bgtime_arr[0]);
            $endtime_arr = explode("-", $endtime);
            $endtime_mk = mktime(0, 0, 0, $endtime_arr[1], $endtime_arr[2], $endtime_arr[0]);
            if ($endtime < $bgtime) {
                echo "<script>alert('结束日期不能小于开始日期');window.location.href='index.php?action=financial_ordertotal&h=list'</script>";
                exit;
            }
            $where .= " AND dateline >= '{$bgtime_mk}' AND dateline <= '{$endtime_mk}'";
        }
    }
    //note 处理导出功能
    $export = MooGetGPC('export', 'string', 'G');
    //if($_GET['export']) {
    if ($export) {
        ob_clean();
        if (empty($user_arr)) {
            echo '没有找到符合条件的财务报表';
            exit;
        }
        $today = date("Y-m-d");
        header("Content-type:application/vnd.ms-excel; charset=gbk");
        header("Content-Disposition:attachment; filename={$today}.xls");
        echo iconv('utf-8', 'gbk', '成功订单总数') . "\t";
        echo iconv('utf-8', 'gbk', '日期') . "\t\n";
        foreach ($user_arr as $k => $v) {
            echo iconv('utf-8', 'gbk', $v['name']) . "\t";
            echo iconv('utf-8', 'gbk', date("Y-m-d", $v['dateline'])) . "\t\n";
        }
        exit;
    }
    //note 数据库查询
    $sql = "SELECT COUNT(*) num FROM {$GLOBALS['dbTablePre']}financial_orderok {$where}";
    $total = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
    //note 插入日志
    serverlog(1, $GLOBALS['dbTablePre'] . 'financial_orderok', "{$GLOBALS['username']}查看成功订单总数记录列表", $GLOBALS['adminid']);
    //note 调用模板
    require adminTemplate('financial_ordertotal_list');
}
开发者ID:noikiy,项目名称:zays,代码行数:47,代码来源:financial_ordertotal.php

示例13: system_adminmembers_move

function system_adminmembers_move()
{
    global $dbTablePre, $_MooClass;
    $kefu_list = get_kefulist();
    $is_post = MooGetGPC('ispost', 'integer', 'G');
    $fromuser = MooGetGPC('fromuser', 'integer', 'G');
    if ($is_post && $fromuser) {
        $grade = MooGetGPC('grade', 'integer', 'G');
        $getuser = MooGetGPC('getuser', 'integer', 'G');
        $move_num = MooGetGPC('move_num', 'integer', 'G');
        if ($move_num) {
            $limit = "limit {$move_num}";
        }
        if ($grade) {
            $sql = "update {$dbTablePre}members_search m left join {$dbTablePre}member_admininfo a on m.uid=a.uid set m.sid={$getuser}  where m.sid={$fromuser} and a.effect_grade={$grade} {$limit}";
            $sql2 = "select m.uid as uid from {$dbTablePre}members_search m left join {$dbTablePre}member_admininfo a on m.uid=a.uid where m.sid={$fromuser} and a.effect_grade={$grade} {$limit}";
        } else {
            $sql = "update {$dbTablePre}members_search  set sid={$getuser}  where sid={$fromuser} {$limit}";
            $sql2 = "select uid from {$dbTablePre}members_search where sid={$fromuser} {$limit}";
        }
        $rs = $_MooClass['MooMySQL']->getAll($sql2);
        if (isset($rs) && $rs) {
            foreach ($rs as $k => $v) {
                $str_arr[$v] = array($getuser);
            }
            searchApi('members_man members_women')->updateAttr(array('sid'), $str_arr);
        }
        $_MooClass['MooMySQL']->query($sql);
        $num = $_MooClass['MooMySQL']->affectedRows();
        if ($num) {
            $sql = "update {$dbTablePre}admin_user set member_count=member_count-'{$num}' where uid={$fromuser}";
            $_MooClass['MooMySQL']->query($sql);
            $sql = "update {$dbTablePre}admin_user set member_count=member_count+'{$num}' where uid={$getuser}";
            $_MooClass['MooMySQL']->query($sql);
            serverlog(4, $GLOBALS['dbTablePre'] . "members_search", "{$GLOBALS['username']}将{$fromuser}号客服的{$num}个会员转出", $GLOBALS['adminid'], $uid);
        }
        salert("成功转移" . $num . "名会员", "index.php?action=system_adminmembers&h=move");
    }
    require_once adminTemplate('system_adminmembers_move');
}
开发者ID:noikiy,项目名称:zays,代码行数:40,代码来源:system_adminmembers.php

示例14: system_admingroup_edit

function system_admingroup_edit()
{
    global $menu_nav_arr;
    $groupid = MooGetGPC('groupid', 'integer');
    if (MooGetGPC('ispost', 'integer')) {
        $groupname = MooGetGPC('groupname', 'string', 'P');
        $groupdesc = MooGetGPC('groupdesc', 'string', 'P');
        $action_code = MooGetGPC('action_code', 'string', 'P');
        $admin_nav = MooGetGPC('adminnav', 'string', 'P');
        $login_type = MooGetGPC('login_type', 'string', 'P');
        //$type = MooGetGPC('type','integer','P');
        if (empty($groupname) || empty($groupdesc) || empty($action_code)) {
            MooMessageAdmin('请将信息填写完整', 'index.php?action=system_admingroup&h=add', 1);
        }
        $action = implode(",", $action_code);
        $admin_nav = @implode(",", $admin_nav);
        $sql = "UPDATE {$GLOBALS['dbTablePre']}admin_group SET groupname='{$groupname}', groupdesc='{$groupdesc}',nav='{$admin_nav}',action='{$action}' WHERE groupid='{$groupid}'";
        $result = $GLOBALS['_MooClass']['MooMySQL']->query($sql);
        //note 插入日志
        serverlog(3, $GLOBALS['dbTablePre'] . 'admin_group', $GLOBALS['username'] . "编辑{$groupname}权限", $GLOBALS['adminid']);
        if ($result) {
            salert('编辑成功');
        } else {
            salert('编辑失败');
        }
    }
    foreach ($menu_nav_arr as $key => $navcode) {
        $sql = "SELECT * FROM {$GLOBALS['dbTablePre']}admin_action WHERE navcode = '{$key}'";
        $var = "action_list_{$key}";
        ${$var} = $GLOBALS['_MooClass']['MooMySQL']->getAll($sql);
    }
    $sql = "SELECT * FROM {$GLOBALS['dbTablePre']}admin_group WHERE groupid='{$groupid}'";
    $group = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
    $action = explode(",", $group['action']);
    $nav = explode(",", $group['nav']);
    $sql = "SELECT * FROM {$GLOBALS['dbTablePre']}admin_group ORDER BY groupid ASC";
    $group_list = $GLOBALS['_MooClass']['MooMySQL']->getAll($sql);
    require_once adminTemplate('admingroup_edit');
}
开发者ID:noikiy,项目名称:zays,代码行数:39,代码来源:system_admingroup.php

示例15: system_adminuser_add

function system_adminuser_add()
{
    if (MooGetGPC('ispost', 'integer')) {
        $userid = trim(MooGetGPC('aid', 'string', 'P'));
        $usercode = trim(MooGetGPC('usercode', 'string', 'P'));
        $username = trim(MooGetGPC('username', 'string', 'P'));
        $name = trim(MooGetGPC('name', 'string', 'P'));
        $groupid = trim(MooGetGPC('groupid', 'string', 'P'));
        $password = trim(MooGetGPC('password', 'string', 'P'));
        $desc = MooGetGPC('desc', 'string', 'P');
        $isedit = MooGetGPC('isedit', 'string', 'P');
        $is_allot = MooGetGPC('is_allot', 'integer', 'P');
        // 是否自动分配客服
        $sale_commission = MooGetGPC('sale_commission', 'integer', 'P');
        $ccid = MooGetGPC('ccid', 'integer', 'P');
        $addtime = time();
        if (empty($username) || empty($groupid) || empty($name)) {
            salert('请将信息填写完整');
        }
        if (empty($password) && !$isedit) {
            salert('请填写密码');
        }
        $sql = "SELECT username FROM {$GLOBALS['dbTablePre']}admin_user WHERE username='{$username}'";
        $admin_user = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
        $password = md5($password);
        $sql = "";
        if (empty($userid)) {
            if (!empty($admin_user)) {
                salert('此用户名已经存在!');
                exit;
            }
            $sql = "INSERT INTO {$GLOBALS['dbTablePre']}admin_user SET `usercode`='{$usercode}',username='{$username}',name='{$name}',groupid='{$groupid}',password='{$password}',userdesc='{$desc}',is_allot='{$is_allot}',sale_commission='{$sale_commission}',dateline='{$addtime}'";
            $note = '添加管理员成功';
            $errors = '添加管理员失败';
            serverlog(1, $GLOBALS['dbTablePre'] . 'members', "{$GLOBALS['adminid']}号客服{$GLOBALS['username']}创建客服", $GLOBALS['adminid']);
        } else {
            if (empty($_POST['password'])) {
                $sql = "UPDATE {$GLOBALS['dbTablePre']}admin_user SET `usercode`='{$usercode}',username='{$username}',name='{$name}',groupid='{$groupid}',userdesc='{$desc}',is_allot='{$is_allot}',sale_commission='{$sale_commission}',ccid = '{$ccid}' WHERE uid='{$userid}'";
            } else {
                $sql = "UPDATE {$GLOBALS['dbTablePre']}admin_user SET `usercode`='{$usercode}',username='{$username}',name='{$name}',groupid='{$groupid}',password='{$password}',userdesc='{$desc}',is_allot='{$is_allot}',sale_commission='{$sale_commission}',ccid = '{$ccid}' WHERE uid='{$userid}'";
            }
            $note = '修改管理员成功';
            $errors = '修改管理员失败';
            serverlog(1, $GLOBALS['dbTablePre'] . 'members', "{$GLOBALS['adminid']}号客服{$GLOBALS['username']}修改{$userid}号客服信息", $GLOBALS['adminid']);
        }
        $result = $GLOBALS['_MooClass']['MooMySQL']->query($sql);
        if ($result) {
            salert($note);
        } else {
            salert($errors);
        }
    }
    if ($GLOBALS['groupid'] == 60) {
        $sql = "SELECT groupid,groupname FROM {$GLOBALS['dbTablePre']}admin_group ";
    } else {
        $sql = "SELECT groupid,groupname FROM {$GLOBALS['dbTablePre']}admin_group where groupid in (62,63,64,65,66,67,68,69,70,71)";
    }
    $group_list = $GLOBALS['_MooClass']['MooMySQL']->getAll($sql);
    // print_r($group_list);
    require_once adminTemplate('adminuser_add');
}
开发者ID:noikiy,项目名称:zays,代码行数:61,代码来源:system_adminuser.php


注:本文中的serverlog函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。