function active_rightbottom_sitemail() { if ($_POST) { $sid = MooGetGPC('msg_sid', 'integer', 'P'); if (empty($_POST['msg_sid']) && !empty($_POST['msg_username'])) { $username = MooGetGPC('msg_username', 'string', 'P'); $sql = "SELECT uid FROM {$GLOBALS['dbTablePre']}admin_user WHERE username='******'"; $admin_user = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql); if (empty($admin_user)) { salert('此用户不存在'); exit; } $sid = $admin_user['uid']; } $data['sid'] = $sid; $data['title'] = "{$GLOBALS['adminid']}号客服:" . MooGetGPC('msg_title', 'string', 'P'); $data['content'] = MooGetGPC('msg_content', 'string', 'P'); $data['awoketime'] = time() + 120; $data['dateline'] = time(); $data['send_id'] = $GLOBALS['adminid']; inserttable('admin_remark', $data); salert('发送成功'); exit; } $group_list = get_group_type(); require adminTemplate('other_rightbottom_sitemail'); }
function ajax_get_groupmember() { global $kefu_arr; $id = MooGetGPC('id', 'integer', 'G'); $groupmember = get_group_type($id); if (empty($groupmember[0]['manage_list'])) { echo 'no'; exit; } $arr = explode(',', $groupmember[0]['manage_list']); foreach ($arr as $v) { $str .= "<option value='{$v}'>{$kefu_arr[$v]}</option>"; } echo $str; }
function groups(&$sqlc) { global $output, $lang_group, $itemperpage; $start = isset($_GET['start']) ? $sqlw->quote_smart($_GET['start']) : 0; if (is_numeric($start)) { } else { $start = 0; } $order_by = isset($_GET['order_by']) ? $sqlw->quote_smart($_GET['order_by']) : 'groupId'; if (preg_match('/^[_[:lower:]]{1,11}$/', $order_by)) { } else { $order_by = 'groupId'; } $dir = isset($_GET['dir']) ? $sqlw->quote_smart($_GET['dir']) : 1; if (preg_match('/^[01]{1}$/', $dir)) { } else { $dir = 1; } $order_dir = $dir ? 'ASC' : 'DESC'; $dir = $dir ? 0 : 1; // for multipage support $all_record = $sqlc->result($sqlc->query('SELECT count(*) FROM groups'), 0); // main data that we need for this page, instances $result = $sqlc->query(' SELECT groupId, leaderGuid, mainTank, mainAssistant, lootMethod, groupType, difficulty, raiddifficulty FROM groups ORDER BY ' . $order_by . ' ' . $order_dir . ' LIMIT ' . $start . ', ' . $itemperpage . ';'); $output .= ' <center> <table class="top_hidden"> <tr> <td width="25%" align="right">'; // multi page links $output .= ' ' . $lang_group['tot_group'] . ': ' . $all_record . '<br /><br />' . generate_pagination('groups.php?order_by=' . $order_by . '&dir=' . ($dir ? 0 : 1), $all_record, $itemperpage, $start); // column headers, with links for sorting $output .= ' </td> </tr> </table> <table class="lined"> <tr> <th width="1%"><a href="groups.php?order_by=groupId&start=' . $start . '&dir=' . $dir . '"' . ($order_by === 'groupId' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_group['id'] . '</a></th> <th width="10%"><a href="groups.php?order_by=leaderGuid&start=' . $start . '&dir=' . $dir . '"' . ($order_by === 'leaderGuid' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_group['leader'] . '</a></th> <th width="10%"><a href="groups.php?order_by=mainTank&start=' . $start . '&dir=' . $dir . '"' . ($order_by === 'mainTank' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_group['mtank'] . '</a></th> <th width="10%"><a href="groups.php?order_by=mainAssistant&start=' . $start . '&dir=' . $dir . '"' . ($order_by === 'mainAssistant' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_group['massistant'] . '</a></th> <th width="10%"><a href="groups.php?order_by=lootMethod&start=' . $start . '&dir=' . $dir . '"' . ($order_by === 'lootMethod' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_group['loot'] . '</a></th> <th width="10%"><a href="groups.php?order_by=groupType&start=' . $start . '&dir=' . $dir . '"' . ($order_by === 'groupType' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_group['type'] . '</a></th> </tr>'; while ($groups = $sqlc->fetch_assoc($result)) { $output .= ' <tr valign="top"> <td><a href="groups.php?action=party&id=' . $groups['groupId'] . '">' . $groups['groupId'] . '</td> <td>' . get_char_name($groups['leaderGuid']) . '</td> <td>' . get_char_name($groups['mainTank']) . '</td> <td>' . get_char_name($groups['mainAssistant']) . '</td> <td>' . get_loot_method($groups['lootMethod']) . '</td> <td>' . get_group_type($groups['groupType']) . '</td> </tr>'; } unset($groups); unset($result); $output .= ' <tr> </table> <table class="top_hidden"> <tr> <td width="25%" align="right">'; // multi page links $output .= ' ' . $lang_group['tot_group'] . ': ' . $all_record . '<br /><br />' . generate_pagination('groups.php?order_by=' . $order_by . '&dir=' . ($dir ? 0 : 1), $all_record, $itemperpage, $start); unset($start); // column headers, with links for sorting $output .= ' </td> </tr> </table> </center>'; }
function vipuser_pay_other() { global $bankarr, $kefu_arr, $tel_bankarr; $url = ''; $condition = array(); $where = ''; $page_per = 20; if (MooGetGPC('page', 'integer', 'R')) { $page = MooGetGPC('page', 'integer', 'R'); $url .= '&page=' . $page; } else { $page = '1'; $url .= '&page=1'; } $limit = 20; $offset = ($page - 1) * $limit; $condition[] = " status=1 "; $apply_time1 = MooGetGPC('apply_time1', 'string', 'P'); if (!empty($apply_time1)) { $startTime = strtotime($apply_time1); $condition[] = " apply_time>='{$startTime}' "; $url .= '&apply_time1=' . $apply_time1; } $apply_time2 = MooGetGPC('apply_time2', 'string', 'P'); if (!empty($apply_time2)) { $endTime = strtotime($apply_time2); $condition[] = " apply_time<'{$endTime}' "; $url .= '$apply_time2=' . $apply_time2; } $sid = $workgroup = $manage_list = $groupid = ''; $sid = MooGetGPC('sid', 'integer', 'P'); $groupid = MooGetGPC('group', 'integer', 'P'); if ($sid) { $condition[] = " apply_sid='{$sid}'"; $url .= '&sid=' . $sid; } elseif ($groupid) { $workgroup = get_group_type($groupid); $manage_list = $workgroup[0]['manage_list']; $condition[] = " apply_sid IN({$manage_list})"; $url .= '&group=' . $groupid; } $uid = ''; $uid = MooGetGPC('uid', 'integer', 'P'); if ($uid) { $condition[] = " uid='{$uid}'"; $url .= '&uid=' . $uid; } if (!empty($condition)) { $where = ' WHERE ' . implode('AND', $condition); } $total = getcount('payment_other', $where); $sql = "SELECT apply_sid, apply_time, uid, pay_service, plus_time, give_city_star, pay_money, pay_time, pay_type, pay_bank, check_order_sid, check_sid, check_time, contact, pay_info, apply_note, status, id,note FROM {$GLOBALS['dbTablePre']}payment_other {$where} ORDER BY id DESC LIMIT {$offset},{$limit}"; // updated file $payment_list = $GLOBALS['_MooClass']['MooMySQL']->getAll($sql, 0, 0, 0, true); //note 获得当前的url 去除多余的参数page= $currenturl = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"] . $url; //$currenturl = preg_replace("/(&page=\d+)/","",$currenturl); $url2 = "apply_time1={$apply_time1}&apply_time2={$apply_time2}&sid={$apply_sid}&uid={$uid}&group={$_GET['group']}"; $currenturl = "index.php?action=vipuser&h=pay_other&" . $url2; $page_links = multipage($total, $page_per, $page, $currenturl); $group_list = get_group_type(); require adminTemplate('vipuser_pay_other'); }
/** * 红娘币奖赏查询 * @param integer $my */ function reward_log($my = 0) { global $str_; $sid_user = "******"; $mange_list = array(); $page_per = 15; $page = max(1, MooGetGPC('page', 'integer')); $limit = 15; $offset = ($page - 1) * $limit; $start = MooGetGPC('start', 'string', 'G'); $end = MooGetGPC('end', 'string', 'G'); $uid = MooGetGPC('sid', 'integer', 'G'); $groupid = MooGetGPC('groupid', 'string', 'G'); if ($uid != "") { $sql_s = "SELECT *FROM {$GLOBALS['dbTablePre']}admin_user WHERE uid=" . $uid; $sid_u = $GLOBALS['_MooClass']['MooMySQL']->getAll($sql_s); $sid_user = $sid_u[0]['username']; } $where = $data = $ref = array(); $total = 0; if ($groupid) { //$mange_list=array(); $sql_ = "SELECT *FROM {$GLOBALS['dbTablePre']}admin_manage where id=" . $groupid; //这个查询出用户的manage_list $mange_list = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql_); $man_id = $mange_list['manage_list']; //查询到这组的id $sql_user = "******" . $man_id . ")"; //这个查询用户的id名字 $mang_list = $GLOBALS['_MooClass']['MooMySQL']->getAll($sql_user); $group = get_group_type($groupid); $where[] = "uid in (" . $man_id . ")"; $ref[] = 'groupid=' . $groupid; } $group_list = get_group_type(); $ins = rtrim($str_, ","); if (!empty($start) || !empty($end)) { if (!empty($start)) { $ref[] = 'start=' . $start; } if (!empty($end)) { $ref[] = 'end=' . $end; } if (!empty($start) && !empty($end)) { $where[] = '`time` BETWEEN ' . strtotime($start) . ' AND ' . strtotime($end); } else { $time = empty($start) ? $end : $start; $where[] = '`time` BETWEEN ' . strtotime($time) . ' AND ' . strtotime($time . ' 23:59:59'); } } if (!empty($uid)) { $where[] = '`uid`=' . $uid; $ref[] = 'sid=' . $uid; } $wheres = empty($where) ? '' : 'where ' . implode(' and ', $where); $total = getcount('reward_log', $wheres); $sql = 'SELECT `id`,`uid`,`adminid`,`amount`,`time`,`type` ,`rewardid` FROM `' . $GLOBALS['dbTablePre'] . 'reward_log` ' . $wheres . ' LIMIT ' . $offset . ',' . $limit; $data = $GLOBALS['_MooClass']['MooMySQL']->getAll($sql); $myservice = get_myservice_idlist(); $myservices = $myservice == 'all' ? $GLOBALS['kefu_arr'] : explode(',', $myservice); $currenturl = "index.php?action=matchmaker&h=" . $GLOBALS['h'] . (empty($ref) ? '' : '&' . implode('&', $ref)) . "&groupid=" . $groupid; $pages = multipage($total, $limit, $page, $currenturl); $page_num = ceil($total / $limit); require_once adminTemplate('matchmaker_reward_log_list'); }
function myuser_remark() { $sid = $groupid = ''; $condition = array(); $manage_list = $link = ''; //提交删除 if (isset($_POST['submit']) ? $_POST['submit'] : '') { $id = $_POST['changesid']; foreach ($id as $v) { $sql = "delete from {$GLOBALS['dbTablePre']}member_effectgrade where id='{$v}'"; $GLOBALS['_MooClass']['MooMySQL']->query($sql); } } //客服访问权限 $myservice_idlist = get_myservice_idlist(); if (empty($myservice_idlist)) { $condition[] = " sid IN({$GLOBALS['adminid']}) "; } elseif ($myservice_idlist == 'all') { //if(isset($_GET['usersid'])){$condition .=" g.sid='$usersid'";} //all为客服主管能查看所有的 $adminUser = $GLOBALS['_MooClass']['MooMySQL']->getAll("select uid,username from web_admin_user", 0, 0, 0, true); } else { $condition[] = " sid IN({$myservice_idlist}) "; // if(isset($_GET['usersid'])){$condition .=" g.sid='$usersid'";} $adminUser = $GLOBALS['_MooClass']['MooMySQL']->getAll("select uid,username from web_admin_user where uid in ({$myservice_idlist}) ", 0, 0, 0, true); } $sid = MooGetGPC('sid', 'integer', 'G'); $groupid = MooGetGPC('groupid', 'string', 'G'); if ($groupid) { $group = get_group_type($groupid); $manage_list = $group[0]['manage_list']; $condition[] = " sid IN({$manage_list})"; } elseif ($groupid && $sid) { $condition[] = " sid='{$sid}'"; } $group_list = get_group_type(); if ($manage_list) { $manage_arr = explode(',', $manage_list); foreach ($manage_arr as $value) { $adminUser = $GLOBALS['_MooClass']['MooMySQL']->getOne("select uid,username from web_admin_user where uid={$value}", true); $manage_uid = $adminUser['uid']; $manage_username = $adminUser['username']; $manage[] = array("uid" => $manage_uid, "username" => $manage_username); } } //选择条件 $sid = trim(MooGetGPC('sid', 'string', 'G')); if (!empty($sid)) { unset($condition); $condition[] = " sid ={$sid} "; } // print_r($condition); /*$startTime=MooGetGPC('startTime','string','G'); if(!empty($startTime)){ $starttimestamp=strtotime($startTime); $condition[] = " dateline>='{$starttimestamp}'"; }*/ $endTime = MooGetGPC('endTime', 'string', 'G'); if (!empty($endTime)) { $endtimestamp = strtotime($endTime . "+1 day"); $condition[] = " dateline<'{$endtimestamp}'"; } $where = " where 1 "; if (!empty($condition)) { $condition_sql = implode(' and ', $condition); $where .= " and {$condition_sql}"; } else { $where .= ""; } $sql = "SELECT count(id) AS c FROM {$GLOBALS['dbTablePre']}member_effectgrade {$where} "; $remark_total = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql, true); $total = $remark_total['c']; $limit = 6; $page = intval(MooGetGPC('page', 'integer', 'G')); if ($page <= 0) { $page = 1; } $page_total = max(1, ceil($total / $limit)); $page = min($page, $page_total); $offset = ($page - 1) * $limit; $sql = "SELECT id,sid,gid,remark,dateline FROM {$GLOBALS['dbTablePre']}member_effectgrade {$where} order by dateline desc LIMIT {$offset},{$limit}"; $remark_list = $GLOBALS['_MooClass']['MooMySQL']->getAll($sql, 0, 0, 0, true); if (!empty($sid)) { $title = "查看客服{$sid}的评语"; } else { $title = '客服盘库评语'; } $currenturl = "index.php?action=myuser&h=remark&sid={$sid}&groupid={$groupid}"; $page_links = multipage($total, $limit, $page, $currenturl); if (in_array($GLOBALS['groupid'], $GLOBALS['admin_service_arr'])) { $isAdmin = 1; } require_once adminTemplate('myuser_remark'); }