本文整理匯總了PHP中MooMessageAdmin函數的典型用法代碼示例。如果您正苦於以下問題:PHP MooMessageAdmin函數的具體用法?PHP MooMessageAdmin怎麽用?PHP MooMessageAdmin使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了MooMessageAdmin函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: 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');
}
示例2: activite_sub
function activite_sub()
{
$db = $GLOBALS['db'];
$href = 'http://www.7651.com/index.php?n=activity&h=' . $_REQUEST['href'];
$address = 'module/activity/templates/default/images/activity_new/' . $_REQUEST['address'];
$group = $_REQUEST['group'];
$sort = $_REQUEST['sort'];
if ($_REQUEST['mid']) {
$mid = $_REQUEST['mid'];
$sql = "update web_activity_img SET `group` = '{$group}',`address` = '{$address}',`href` = '{$href}',`sort` = '{$sort}' where mid = '{$mid}'";
$db->query($sql);
MooMessageAdmin('編輯成功', 'activity_img.php', 2);
exit;
} else {
$sql = "select mid from web_activity_img where `href` = '{$href}' or `address` = '{$address}' or (`group` = '{$group}' and `sort` = '{$sort}')";
if ($db->getOne($sql)) {
MooMessageAdmin('信息有錯誤', 'activity_img.php?act=add', 2);
exit;
} else {
$sql = "insert into web_activity_img (`group`,`address`,`href`,`sort`) values ('{$group}','{$address}','{$href}','{$sort}')";
$db->query($sql);
MooMessageAdmin('添加成功', 'activity_img.php', 2);
exit;
}
}
}
示例3: 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);
}
}
示例4: site_skin_check
function site_skin_check()
{
global $dbTablePre, $_MooClass;
$uid = MooGetGPC('uid', 'string');
$sql = "select * from {$dbTablePre}members_skin where uid = '{$uid}'";
$uid_skin = $_MooClass['MooMySQL']->getOne($sql);
if ($_POST) {
$image = MooGetGPC('image', 'string', 'P');
$skiname = MooGetGPC('skiname', 'string', 'P');
$skin_style = MooGetGPC('skin_style', 'string', 'P');
$imgs = $_FILES['imgs'];
$maxfilesize = 1024 * 1024;
$time = time();
$type = array('jpg', 'jpeg', 'gif', 'png', 'bmp');
if (!empty($imgs['size'])) {
foreach ($type as $v) {
if (eregi($v, $imgs['type'])) {
$flag = 1;
}
}
if ($flag != 1) {
$notice = "照片必須為BMP,JPG,PNG或GIF格式";
MooMessageAdmin($notice, 'index.php?action=site_story&h=check&uid={$uid}', 0);
exit;
}
if ($imgs['size'] >= $maxfilesize) {
$notice = "上傳圖片大小不得超過1M";
MooMessageAdmin($notice, 'index.php?action=site_skin&h=check&uid={$uid}', 0);
exit;
}
//刪除之前上傳的圖片
unlink('../' . $image);
//note 上傳到指定目錄,並且獲得上傳後的文件描述
$new_path = 'data/upload/images_skin/';
$file_url = $new_path . $imgs['name'];
if (file_exists('../' . $file_url)) {
unlink('../' . $file_url);
}
if (!move_uploaded_file(str_replace('\\\\', '\\', $imgs['tmp_name']), '../' . $file_url)) {
echo '<script>沒有上傳成功!;window.history.go(-1);</script>';
exit;
}
$sql = "update {$dbTablePre}members_skin set skiname='{$skiname}',skin_style='{$skin_style}',image='{$file_url}',date='{$time}' where uid='{$uid}'";
if ($_MooClass['MooMySQL']->query($sql)) {
//note 插入日誌
serverlog(1, $GLOBALS['dbTablePre'] . 'members_skin', '修改皮膚成功', $GLOBALS['adminid']);
salert("修改皮膚成功", "index.php?action=site_skin&h=check&uid={$uid}");
}
} else {
$sql = "update {$dbTablePre}members_skin set skiname='{$skiname}',skin_style='{$skin_style}',image='{$image}',date='{$time}' where uid='{$uid}'";
if ($_MooClass['MooMySQL']->query($sql)) {
serverlog(1, $GLOBALS['dbTablePre'] . 'members_skin', '修改皮膚成功', $GLOBALS['adminid']);
salert("修改皮膚成功", "index.php?action=site_skin&h=check&uid={$uid}");
}
}
}
require adminTemplate('site_skin_check');
}
示例5: multipage
$url2 = "apply_time1={$apply_time1}&apply_time2={$apply_time2}&sid={$apply_sid}&uid={$uid}";
$currenturl = "index.php?action=vipuser&h=pay_query&" . $url2;
$page_links = multipage($total, $page_per, $page, $currenturl);
require adminTemplate('vipuser_pay_query');
}
/***********************************************控製層(C)*****************************************/
$h = MooGetGPC('h', 'string', 'G') == '' ? 'pay' : MooGetGPC('h', 'string', 'G');
//note 動作列表
$hlist = array('pay', 'nopay', 'downline', 'upgrade_apply', 'pay_other', 'apply_list', 'high', 'diamond', 'city_star', 'vip_summary', 'viped', 'hurryhigh', 'hurrydiamond', 'getvip_group', 'pay_query');
//note 判斷頁麵是否存在
if (!in_array($h, $hlist)) {
MooMessageAdmin('您要打開的頁麵不存在', 'index.php?action=vipuser');
}
//note 判斷是否有權限
if (!checkGroup('vipuser', $h)) {
MooMessageAdmin('您沒有此操作的權限', 'index.php?action=vipuser');
}
switch ($h) {
case 'pay':
//note 已支付列表
vipuser_pay();
break;
case 'nopay':
//note 未支付列表
vipuser_nopay();
break;
case 'downline':
//note 線下支付
vipuser_downline();
break;
case 'upgrade_apply':
示例6: site_story_edit
function site_story_edit()
{
global $story_sweet_process, $_MooClass, $dbTablePre, $memcached;
$ispost = MooGetGPC('ispost', 'integer', 'P');
$imgpost = MooGetGPC('imgpost', 'integer', 'P');
//$MooImage = MooAutoLoad('MooImage');
if ($imgpost == '1') {
$story_picname = MooGetGPC('imgUrl', 'string', 'P');
$sid = MooGetGPC('sid', 'integer', 'P');
$mid = MooGetGPC('mid', 'integer', 'P');
//重新生成小圖 覆蓋原來的首頁照
$src = IMG_ROOT . $story_picname;
$sidmd5 = $sid * 3;
$size = getimagesize($src, $info);
$width = $size['0'];
$height = $size['1'];
$sizearray = array(0 => array('width' => 280, 'height' => 168), 1 => array('width' => 252, 'height' => 151), 2 => array('width' => 150, 'height' => 90));
$namearray = array(0 => 'big', 1 => 'medium', 2 => 'small');
$newimages = changesize($src, '../data/upload/story', 0, 0, $width, $height, $sid, $sizearray, $namearray);
$sql = "UPDATE {$GLOBALS['dbTablePre']}story SET is_index='{$mid}' WHERE sid='{$sid}'";
$res = $GLOBALS['_MooClass']['MooMySQL']->query($sql);
if ($res) {
echo 1;
}
exit;
}
if ($ispost == '1') {
$sid = trim(MooGetGPC('sid', 'integer', 'P'));
$title = htmlspecialchars(trim(MooGetGPC('title', 'string', 'P')));
$content = htmlspecialchars(trim(MooGetGPC('content', 'string', 'P')));
$confirmtime = htmlspecialchars(MooGetGPC('confirmtime', 'string', 'P'));
$story_date = '';
if ($confirmtime) {
$story_date1 = htmlspecialchars(MooGetGPC('confirmtime', 'string', 'P'));
$story_date = strtotime($story_date1);
} else {
$story_date1 = trim(MooGetGPC('date', 'string', 'P'));
$story_date = strtotime($story_date1);
}
$name1 = trim(MooGetGPC('name1', 'string', 'P'));
$name1 = htmlspecialchars($name1);
$name2 = trim(MooGetGPC('name2', 'string', 'P'));
$name2 = htmlspecialchars($name2);
$state = trim(MooGetGPC('state', 'integer', 'P'));
$syscheck = trim(MooGetGPC('pass', 'integer', 'P'));
$recommand = trim(MooGetGPC('recommand', 'integer', 'P'));
$hot = trim(MooGetGPC('clicknum', 'integer', 'P'));
date_default_timezone_set('Asia/Shanghai');
$submit_date = time();
$imgtitle = trim(MooGetGPC('imgtitle', 'string', 'P'));
$imgtitle = htmlspecialchars($imgtitle);
//note 上傳新圖片
//note 判斷上傳的文件類型
$flag = '';
$images = array('jpg', 'jpeg', 'gif', 'png', 'bmp');
$maxfilesize = 1024 * 1024;
$filesize = $_FILES['img']['size'];
if (!empty($filesize)) {
foreach ($images as $v) {
if (strpos($_FILES['img']['type'], $v) == true) {
$flag = 1;
}
}
if ($flag != 1) {
$notice = "照片必須為BMP,JPG,PNG或GIF格式";
MooMessageAdmin($notice, 'index.php?action=site_story&h=edit&id=' . $sid, 0);
exit;
}
if ($filesize > $maxfilesize) {
$notice = "上傳圖片大小不得超過1M";
MooMessageAdmin($notice, 'index.php?action=site_story&h=edit&id=' . $sid, 0);
exit;
}
//note 上傳到指定目錄,並且獲得上傳後的文件描述
global $upload;
$upload = MooAutoLoad('MooUpload');
$upload->config(array('targetDir' => IMG_ROOT, 'saveType' => '0'));
$files = $upload->saveFiles('img');
$story_picname = $files[0]['name'] . "." . $files[0]['extension'];
$filetype = explode('.', $story_picname);
$filetype = array_pop($filetype);
//生成小圖
/*
$src = IMG_ROOT.$story_picname;
$sidmd5=$sid*3;
$size = getimagesize($src,$info);
$width = $size['0'];
$height = $size['1'];
$sizearray=array(0=>array('width'=>280,'height'=>168),1=>array('width'=>252,'height'=>151),2=>array('width'=>150,'height'=>90));
$namearray=array(0=>'big',1=>'medium',2=>'small');
$newimages=changesize($src,'../data/upload/story',0,0,$width,$height,$sid,$sizearray,$namearray);
*/
$res_in_pic = '';
if ($story_picname) {
//note 插入story_pic表
$sql_in_spic = "INSERT INTO {$GLOBALS['dbTablePre']}story_pic SET sid='{$sid}',img='{$story_picname}',title='{$imgtitle}',submit_date='{$submit_date}',syscheck='{$syscheck}'";
$res_in_pic = $GLOBALS['_MooClass']['MooMySQL']->query($sql_in_spic);
}
}
$sql = "UPDATE {$GLOBALS['dbTablePre']}story SET title='{$title}',content='{$content}',story_date='{$story_date}',name1='{$name1}',name2='{$name2}',state='{$state}',syscheck='{$syscheck}',recommand='{$recommand}',hot='{$hot}' WHERE sid='{$sid}' ";
//.........這裏部分代碼省略.........
示例7: active_activity_edit
function active_activity_edit()
{
$id = MooGetGPC('id', 'integer', 'G');
$id = empty($id) ? MooGetGPC('id', 'integer', 'P') : $id;
$data = array();
if ($_POST) {
$where['id'] = $id;
$data['title'] = trim(MooGetGPC('title', 'string', 'P'));
if (empty($data['title'])) {
MooMessageAdmin('請活動主題', 'index.php?action=active_activity&h=add');
exit;
}
$data['type'] = MooGetGPC('type', 'integer', 'P');
$data['price'] = MooGetGPC('price', 'integer', 'P');
$data['price_online'] = MooGetGPC('price_online', 'integer', 'P');
$data['starttime'] = MooGetGPC('starttime', 'string', 'P');
if (empty($data['starttime'])) {
MooMessageAdmin('請填寫活動的報名開始時間', 'index.php?action=active_activity&h=add');
exit;
}
$data['starttime'] = strtotime($data['starttime'] . ' 0:0:0');
$data['endtime'] = MooGetGPC('endtime', 'string', 'P');
if (empty($data['endtime'])) {
MooMessageAdmin('請填寫活動的報名結束時間', 'index.php?action=active_activity&h=add');
exit;
}
$data['endtime'] = strtotime($data['endtime'] . ' 23:59:59');
$data['opentime'] = MooGetGPC('opentime', 'array', 'P');
if (empty($data['opentime']['day'])) {
$data['opentime'] = 0;
} else {
$data['opentime'] = strtotime($data['opentime']['day'] . ' ' . $data['opentime']['hour'] . ':' . $data['opentime']['mintue'] . ':0');
}
$data['closetime'] = MooGetGPC('closetime', 'array', 'P');
if (empty($data['closetime']['day'])) {
$data['closetime'] = 0;
} else {
$data['closetime'] = strtotime($data['closetime']['day'] . ' ' . $data['closetime']['hour'] . ':' . $data['closetime']['mintue'] . ':0');
}
$data['issex'] = MooGetGPC('issex', 'string', 'P');
$data['issex'] = $data['issex'] < 1 ? 100 : ($data['issex'] > 100 ? 100 : $data['issex']);
$data['province'] = MooGetGPC('province', 'integer', 'P');
$data['activity_img'] = 'module/activity/templates/default/images/activity_new/' . MooGetGPC('img', 'string', 'P');
$data['href'] = 'index.php?n=activity&h=' . MooGetGPC('href', 'string', 'P');
$data['city'] = MooGetGPC('city', 'integer', 'P');
$data['place'] = htmlspecialchars(trim(MooGetGPC('place', 'string', 'P')));
$data['profile'] = htmlspecialchars(trim(MooGetGPC('profile', 'string', 'P')));
$data['introduction'] = htmlspecialchars(trim(MooGetGPC('introduction', 'string', 'P')));
updatetable('activity', $data, $where);
MooMessageAdmin('活動修改成功', 'index.php?action=active_activity&h=edit&id=' . $id);
}
$sql = 'SELECT `type`,`title`,`price`,`price_online`,`starttime`,`endtime`,`opentime`,`closetime`,`issex`,`province`,`city`,`place`,`profile`,`introduction` from `' . $GLOBALS['dbTablePre'] . 'activity` where `id`=' . $id;
$data = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
require adminTemplate('active_activity_detail');
}
示例8: adminTemplate
}
}
}
require_once adminTemplate('vote_member_one');
}
} else {
if ($act == 'delect') {
if (empty($_REQUEST['uid'])) {
header("location:vote_member.php?act=list");
} else {
$uid = $_REQUEST['uid'];
$sql = "DELETE FROM vote_member WHERE uid = {$uid}";
$db->query($sql);
$sql = "DELETE FROM vote_sub WHERE uid = {$uid}";
$db->query($sql);
MooMessageAdmin('刪除成功', 'vote_member.php?act=list', 1);
}
} else {
if ($act == 'edit') {
if (empty($_REQUEST['uid'])) {
header("location:vote_member.php?act=list");
} else {
$uid = $_REQUEST['uid'];
$sql = "select t1.*,t2.vote_title,t3.sub_time,t3.vote_result,t3.vid from vote_member as t1 left join vote_sub as t3 on t1.uid=t3.uid left join vote as t2 on t3.vid = t2.vid where t1.uid = '{$uid}'";
$result = $db->getAll($sql);
foreach ($result as $k => $v) {
if ($k == '0') {
$arr[] = $v;
}
$arr['vote'][$v[vid]][] = $v['vote_title'];
$str = str_replace(':1', "", $v['vote_result']);
示例9: kefu_all
function kefu_all()
{
global $_MooClass;
$channel = 1;
$sid = $GLOBALS['adminid'];
$page_per = 15;
$reguser = array();
if (!empty($_REQUEST['submit'])) {
$page = 1;
} else {
$page = max(1, MooGetGPC('page', 'integer'));
}
$limit = 15;
$offset = ($page - 1) * $limit;
$group = $GLOBALS['groupid'];
$sid = $GLOBALS['adminid'];
$username = $GLOBALS['username'];
if ($group == '78' || $group == '70' || $group == '67') {
MooMessageAdmin('權限不足', 'index.php?action=activity&h=activity_member', 1);
exit;
} else {
$uid = $_REQUEST['uid'];
$channel = $_REQUEST['channel'];
$purpose = $_REQUEST['purpose'];
if ($purpose == '0' && $channel == '0') {
$sql = "SELECT COUNT(id) AS COUNT FROM web_ahtv_reguser where sid ='" . $uid . "'";
} else {
if ($purpose != '0' && $channel == '0') {
$sql = "SELECT COUNT(id) AS COUNT FROM web_ahtv_reguser where purpose='" . $purpose . "' and sid ='" . $uid . "'";
} else {
if ($purpose == '0' && $channel != '0') {
$sql = "SELECT COUNT(id) AS COUNT FROM web_ahtv_reguser where channel='" . $channel . "' and sid ='" . $uid . "'";
} else {
$sql = "SELECT COUNT(id) AS COUNT FROM web_ahtv_reguser where channel='" . $channel . "' and purpose='" . $purpose . "' and sid ='" . $uid . "'";
}
}
}
$a = $_MooClass['MooMySQL']->getOne($sql);
$total = $a['COUNT'];
if ($purpose == '0' && $channel == '0') {
$sql = "SELECT a.id,a.uid,a.edit_time,a.next_time,a.username,a.gender,a.birthday,a.province,a.city,a.mobile,a.regtime,a.isattend,a.channel,a.purpose,a.income,a.note,a.sid FROM web_ahtv_reguser as a where a.sid ='" . $uid . "' order by a.edit_time desc LIMIT {$offset},{$limit}";
} else {
if ($purpose != '0' && $channel == '0') {
$sql = "SELECT a.id,a.uid,a.edit_time,a.next_time,a.username,a.gender,a.birthday,a.province,a.city,a.mobile,a.regtime,a.isattend,a.channel,a.purpose,a.income,a.note,a.sid FROM web_ahtv_reguser as a where a.purpose='" . $purpose . "' and a.sid ='" . $uid . "' order by a.edit_time desc LIMIT {$offset},{$limit}";
} else {
if ($purpose == '0' && $channel != '0') {
$sql = "SELECT a.id,a.uid,a.edit_time,a.next_time,a.username,a.gender,a.birthday,a.province,a.city,a.mobile,a.regtime,a.isattend,a.channel,a.purpose,a.income,a.note,a.sid FROM web_ahtv_reguser as a where a.channel='" . $channel . "' and a.sid ='" . $uid . "' order by a.edit_time desc LIMIT {$offset},{$limit}";
} else {
$sql = "SELECT a.id,a.uid,a.edit_time,a.next_time,a.username,a.gender,a.birthday,a.province,a.city,a.mobile,a.regtime,a.isattend,a.channel,a.purpose,a.income,a.note,a.sid FROM web_ahtv_reguser as a where a.channel='" . $channel . "' and a.purpose='" . $purpose . "' and a.sid ='" . $uid . "' order by a.edit_time desc LIMIT {$offset},{$limit}";
}
}
}
$currenturl = "index.php?action=activity&h=kefu_all&channel={$channel}&uid={$uid}&purpose={$purpose}";
$pages = multipage($total, $page_per, $page, $currenturl);
$page_num = ceil($total / $limit);
$result = $_MooClass['MooMySQL']->getAll($sql);
$purs = $purpose;
foreach ($result as $key => $value) {
$id = $value['id'];
$uid = $value['uid'];
$username = $value['username'];
$gender = $value['gender'];
$birthday = explode('-', $value['birthday']);
$birthday = $birthday[0] . '年' . $birthday[1] . '月';
$province = $value['province'];
$city = $value['city'];
$mobile = $value['mobile'];
$regtime = $value['regtime'];
$isattend = $value['isattend'];
$channel = $value['channel'];
$pur = $value['purpose'];
if ($pur == 2) {
$purpose = '不能參加';
} else {
if ($pur == 3) {
$purpose = '要考慮';
} else {
if ($pur == 4) {
$purpose = '有意向';
} else {
if ($pur == 5) {
$purpose = '確定參加';
} else {
if ($pur == 6) {
$purpose = '支付環節';
} else {
$purpose = '未處理';
}
}
}
}
}
$income = $value['income'];
$sid = $value['sid'];
$note = $value['note'];
$edit_time = $value['edit_time'];
$next_time = $value['next_time'];
$reguser[] = array('k' => $key + 1, 'id' => $id, 'uid' => $uid, 'username' => $username, 'gender' => $gender, 'birthday' => $birthday, 'province' => $province, 'city' => $city, 'mobile' => $mobile, 'regtime' => $regtime, 'isattend' => $isattend, 'channel' => $channel, 'sid' => $sid, 'note' => $note, 'income' => $income, 'purpose' => $purpose, 'edit_time' => $edit_time, 'next_time' => $next_time);
}
require_once adminTemplate('activity_kf_list');
//.........這裏部分代碼省略.........
示例10: preg_replace
$currenturl = preg_replace("/(&type=undealed)/", "", $currenturl);
$currenturl = preg_replace("/(&type=dealed)/", "", $currenturl);
$currenturl = preg_replace("/(&type=all)/", "", $currenturl);
$currenturl2 = $currenturl;
$currenturl = $currenturl . "&type={$type}";
$pages = multipage($total['num'], $limit, $page, $currenturl);
//note 跳轉到某一頁
$page_num = ceil($total['num'] / $limit);
//note 插入日誌
serverlog(1, $GLOBALS['dbTablePre'] . 'service_chat', "{$GLOBALS['username']}查看聊天記錄列表", $GLOBALS['adminid']);
//note 調用模板
require adminTemplate('active_chat_list');
}
/***********************************************控製層(C)*****************************************/
$h = MooGetGPC('h', 'string', 'G') == '' ? 'list' : MooGetGPC('h', 'string', 'G');
//note 動作列表
$hlist = array('list');
//note 判斷頁麵是否存在
if (!in_array($h, $hlist)) {
MooMessageAdmin('您要打開的頁麵不存在', 'index.php?n=main');
}
//note 判斷是否有權限
if (!checkGroup('active_chat', $h)) {
MooMessageAdmin('您沒有此操作的權限', 'index.php?n=main');
}
switch ($h) {
//note 委托列表
case 'list':
active_chat_list();
break;
}
示例11: hntest_class_del
function hntest_class_del()
{
$tc_id = MooGetGPC('tc_id', 'integer', 'G');
$parent = MooGetGPC('parent', 'integer', 'G');
$table = $GLOBALS['dbTablePre'] . 'test_class';
if ($parent == 0) {
$sql = "DELETE FROM {$table} WHERE parent={$tc_id}";
$GLOBALS['_MooClass']['MooMySQL']->query($sql);
}
$sql = "DELETE FROM {$table} WHERE tc_id={$tc_id}";
$GLOBALS['_MooClass']['MooMySQL']->query($sql);
MooMessageAdmin('刪除成功', 'index.php?action=hntest&h=class_list', 1);
}
示例12: carrelaxbargameedit
function carrelaxbargameedit()
{
$href = MooGetGPC("href", "string", "P");
$introduce = MooGetGPC("introduce", "string", "P");
$id = MooGetGPC("id", "string", "P");
if (empty($href)) {
$notice = "遊戲的鏈接地址不能為空";
MooMessageAdmin($notice, 'index.php?n=lovestation&h=carrelaxbargame');
exit;
}
if (empty($introduce)) {
$notice = "遊戲介紹說明必須填寫";
MooMessageAdmin($notice, 'index.php?n=lovestation&h=carrelaxbargame');
exit;
}
/*
if($_FILES['imgfile']['error']==UPLOAD_ERR_OK){
$minfilesize = 100;
$maxfilesize = 1024000;
$filesize = $_FILES['imgfile']['size'];
if($filesize > $maxfilesize ) {
$notice = "請上傳小於1000KB的照片。";
MooMessageAdmin($notice,'index.php?action=lovestation&h=carrelaxbargame');
exit();
}
if($filesize < $minfilesize) {
$notice = "請上傳大於100b的照片。";
MooMessageAdmin($notice,'index.php?action=lovestation&h=carrelaxbargame');
exit();
}
$true_type = file_type($_FILES['imgfile']['tmp_name']);
$extname = strtolower(substr($_FILES['imgfile']['name'],(strrpos($_FILES['imgfile']['name'],'.')+1)));
$images = array('/jpg/', '/jpeg/', '/gif/', '/png/', '/JPG/', '/JPEG/', '/GIF/', '/PNG/');
if(in_array('/'.$extname.'/',$images)){
foreach($images as $v) {
//note http://ask.wangmeng.cn/question/76
if(preg_match($v,$_FILES['imgfile']['type'])
&& ('image/'.$true_type == $_FILES['imgfile']['type']
|| 'image/p'.$true_type == $_FILES['imgfile']['type']
|| 'image/x-'.$true_type == $_FILES['imgfile']['type']) ) {
$file_content = file_get_contents($_FILES['imgfile']['tmp_name']);
$low_file_content = strtolower($file_content);
$pos = strpos($low_file_content, '<?php');
if($pos){
$notice = "照片中含有不安全信息請重新上傳";
MooMessageAdmin($notice,'index.php?n=lovestation&h=carrelaxbargame');
exit();
}else{
$flag = 1;
}
}
}
}
if($flag != 1) {
$notice = "請上傳JPEG,JPG,PNG或GIF格式";
MooMessageAdmin($notice,'index.php?action=lovestation&h=carrelaxbargame');
exit();
}
*/
if ($_FILES['imgfile']['error'] == UPLOAD_ERR_OK) {
$filename = "module/lovestation/templates/default/images/carrelaxbargame/" . $_FILES['imgfile']['name'];
$data['imgfile'] = $filename;
//上傳圖片處理結束
}
$data['href'] = $href;
$data['introduce'] = $introduce;
$data['dateline'] = time();
$whearr['id'] = $id;
updatetable("cargames", $data, $whearr);
MooMessageAdmin("更新成功", 'index.php?action=lovestation&h=carrelaxbargame');
exit;
}
示例13: text_show_dele
function text_show_dele()
{
global $_MooClass;
$id = $_REQUEST['id'];
$sql = "DELETE FROM {$GLOBALS['dbTablePre']}text_show WHERE id = {$id}";
$_MooClass['MooMySQL']->query($sql);
MooMessageAdmin('刪除成功', 'index.php?action=other&h=text_show', 1);
}
示例14: date
$value['bgtime'] = date('Y-m-d', $value['bgtime']);
$value['endtime'] = date('Y-m-d', $value['endtime']);
$value['k'] = $key + 1;
$comment[] = $value;
}
$pages = multipage($total, $page_per, $page, $currenturl);
$page_num = ceil($total / $limit);
require_once adminTemplate('site_recommend_diamond_district');
}
/***********************************************控製層(C)*****************************************/
$h = MooGetGPC('h', 'string') == '' ? 'list' : MooGetGPC('h', 'string');
//note 動作列表
$hlist = array('list', 'recommendget', 'district');
//note 判斷頁麵是否存在
if (!in_array($h, $hlist)) {
MooMessageAdmin('您要打開的頁麵不存在', 'index.php?action=system_admingroup&h=list');
}
switch ($h) {
//note 鑽石會員推薦列表
case 'list':
site_recommend_diamond_list();
break;
//note 提交鑽石會員推薦列表
//note 提交鑽石會員推薦列表
case 'recommendget':
site_recommendget();
break;
//NOTE 鑽石會員首頁推薦(地區)
//NOTE 鑽石會員首頁推薦(地區)
case 'district':
site_recommend_diamond_district();
示例15: logout_change_identify
function logout_change_identify()
{
MooSetCookie('change_identity', '', -86400 * 365);
$GLOBALS['change_adminid'] = 0;
MooMessageAdmin('成功返回', 'index.php', 1);
}