include_once S_ROOT . "source/function_cache.php"; eventclass_cache(); cpmessage("do_success", "admincp.php?ac=eventclass", 2); } if ("delete" == $_GET['op']) { // delete event category if (empty($thevalue)) { cpmessage("there_is_no_designated_users_columns", "admincp?ac=eventclass", 2); } if (!@(include_once S_ROOT . "data/data_eventclass.php")) { include_once S_ROOT . "source/function_cache.php"; eventclass_cache(); } $list = $_SGLOBAL['eventclass']; if (sizeof($list) == 1) { // Can not delete a single category cpmessage("have_no_eventclass", "admincp.php?ac=eventclass", 2); // delete Failed, leave at least one event category } $list[$thevalue['classid']] = null; // Remove the deleted entry } elseif ("add" == $_GET['op']) { //$thevalue['poster'] = "image/event/default.jpg"; } else { if (!@(include_once S_ROOT . './data/data_eventclass.php')) { include_once S_ROOT . 'source/function_cache.php'; eventclass_cache(); } $list = $_SGLOBAL['eventclass']; $actives = array('view' => ' class="active"'); }
if (!defined('iBUAA') || !defined('IN_ADMINCP')) { exit('Access Denied'); } //权限 if (!($allowmanage = checkperm('manageshare'))) { $_GET['uid'] = $_SGLOBAL['supe_uid']; //只能操作本人的 $_GET['username'] = ''; } if (submitcheck('batchsubmit')) { include_once S_ROOT . './source/function_delete.php'; if (!empty($_POST['ids']) && deleteshares($_POST['ids'])) { cpmessage('do_success', $_POST['mpurl']); } else { cpmessage('please_delete_the_correct_choice_to_share', $_POST['mpurl']); } } $mpurl = 'admincp.php?ac=share'; //处理搜索 $intkeys = array('uid', 'sid'); $strkeys = array('username', 'type'); $randkeys = array(array('sstrtotime', 'dateline'), array('intval', 'hot')); $likekeys = array(); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys); $wherearr = $results['wherearr']; $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $mpurl .= '&' . implode('&', $results['urls']); //排序 $orders = getorders(array('dateline', 'hot'), 'sid'); $ordersql = $orders['sql'];
if ($_SERVER['REQUEST_METHOD'] == 'GET') { ssetcookie('_refer', rawurlencode($_SERVER['REQUEST_URI'])); } else { ssetcookie('_refer', rawurlencode('admincp.php?ac=' . $_GET['ac'])); } $actives = array('advance' => ' class="active"'); include template('cp_advance'); exit; } break; case '2': //登录成功 break; default: //尝试次数太多禁止登录 cpmessage('excessive_number_of_attempts_to_sign'); break; } if ($ac == 'defaultuser') { $acfile = 'hotuser'; } else { $acfile = $ac; } //取消翻页限制 $_SCONFIG['maxpage'] = 0; //log if ($needlogin) { admincp_log(); } //去掉广告 $_SGLOBAL['ad'] = array();
$setarr = array('tagname' => $_POST['newtagname'], 'uid' => $_SGLOBAL['supe_uid'], 'dateline' => $_SGLOBAL['timestamp']); $newtagid = inserttable('tag', $setarr, 1); } //ʼϲ include_once S_ROOT . './source/function_op.php'; if (!empty($_POST['ids']) && mergetag($_POST['ids'], $newtagid)) { cpmessage('do_success', $_POST['mpurl']); } else { cpmessage('the_tag_choose_to_merge', $_POST['mpurl']); } } elseif ($_POST['optype'] == 'close' || $_POST['optype'] == 'open') { include_once S_ROOT . './source/function_op.php'; if (!empty($_POST['ids']) && closetag($_POST['ids'], $_POST['optype'])) { cpmessage('do_success', $_POST['mpurl']); } else { cpmessage('choose_to_operate_tag', $_POST['mpurl']); } } } $mpurl = 'admincp.php?ac=tag'; // Search Processing $intkeys = array('close'); $strkeys = array(); $randkeys = array(array('sstrtotime', 'dateline'), array('intval', 'blognum')); $likekeys = array('tagname'); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys); $wherearr = $results['wherearr']; $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $mpurl .= '&' . implode('&', $results['urls']); // sort $orders = getorders(array('dateline', 'blognum'), 'tagid');
cpmessage("do_success", "admincp.php?ac=jifen_lp", 2); } if ("delete" == $_GET['op']) { // 删除礼品 if (!$_GET['id']) { cpmessage("请至少正确选择一个要删除的礼品", "admincp.php?ac=jifen_lp", 2); //请至少正确选择一个要删除的礼品 } $_GET['id '] = intval($_GET['id']); $_SGLOBAL['db']->query("DELETE FROM " . tname("jifen_lp") . " WHERE id = '{$_GET['id']}'"); $count = $_SGLOBAL['db']->result($_SGLOBAL['db']->query("SELECT COUNT(*) FROM " . tname('jifen_lp') . " where lbid=" . intval($_GET['lbid']) . " group by lbid"), 0); updatetable('jifen_lb', array('nums' => $count), array('id' => intval($_GET['lbid']))); // 更新缓存 include_once S_ROOT . "source/function_cache.php"; jifen_lb_cache(); cpmessage("do_success", "admincp.php?ac=jifen_lp", 2); } elseif ("add" == $_GET['op']) { //$thevalue['poster'] = "image/event/default.jpg"; } else { $mpurl = 'admincp.php?ac=' . $ac; $orderby = array($_GET['orderby'] => ' selected'); $ordersc = array($_GET['ordersc'] => ' selected'); $wheresql = ' id > 0'; if ($_GET['name']) { $wheresql .= " and name like '%" . $_GET['name'] . "%'"; } if ($_GET['des']) { $wheresql .= " and des like '%" . $_GET['des'] . "%'"; } $ordersql = ''; if ($_GET['orderby']) {
$_SGLOBAL['db']->query("DELETE FROM ".tname('usergroup')." WHERE gid='$_GET[gid]'"); groupcredit_update(); } elseif($thevalue['system'] == '1') { //删除 $_SGLOBAL['db']->query("DELETE FROM ".tname('usergroup')." WHERE gid='$_GET[gid]'"); } else { cpmessage('system_user_group_could_not_be_deleted'); } //更新用户权限 updatetable('space', array('groupid'=>0), array('groupid'=>$_GET['gid'])); //更新缓存 include_once(S_ROOT.'./source/function_cache.php'); usergroup_cache(); cpmessage('do_success', 'admincp.php?ac=usergroup'); } function groupcredit_update() { global $_SGLOBAL; //起始为-999999999 $lowergid = $_SGLOBAL['db']->result($_SGLOBAL['db']->query("SELECT gid FROM ".tname('usergroup')." WHERE system='0' ORDER BY explower LIMIT 1"), 0); if($lowergid) updatetable('usergroup', array('explower'=>'-999999999'), array('gid'=>$lowergid)); } ?>
//添加 $thevalue = array('filedid' => 0, 'formtype' => 'text'); $formtypearr = array(); } elseif ($_GET['op'] == 'edit') { $formtypearr = array($thevalue['formtype'] => ' selected'); } elseif ($_GET['op'] == 'delete') { $_GET['fieldid'] = intval($_GET['fieldid']); //至少保留一个栏目 if (count($_SGLOBAL['profield']) < 2) { cpmessage('have_one_mtag'); } if (submitcheck('deletesubmit')) { $newfieldid = intval($_POST['newfieldid']); if (empty($_SGLOBAL['profield'][$newfieldid])) { cpmessage('there_is_no_designated_users_columns'); } include_once S_ROOT . './source/function_delete.php'; if ($_GET['fieldid'] && deleteprofield(array($_GET['fieldid']), $newfieldid)) { //更新缓存 include_once S_ROOT . './source/function_cache.php'; profield_cache(); cpmessage('do_success', 'admincp.php?ac=profield'); } else { cpmessage('choose_to_delete_the_columns', 'admincp.php?ac=profield'); } } $newfield = $_SGLOBAL['profield']; if (isset($newfield[$_GET['fieldid']])) { unset($newfield[$_GET['fieldid']]); } }
<?php if (!defined('iBUAA') || !defined('IN_ADMINCP')) { exit('Access Denied'); } $tagid = empty($_GET['tagid']) ? 0 : intval($_GET['tagid']); if (submitcheck('deletesubmit')) { include_once S_ROOT . './source/function_delete.php'; if (!empty($_POST['ids']) && deleteposts($tagid, $_POST['ids'])) { cpmessage('do_success', $_POST['mpurl']); } else { cpmessage('choose_to_delete_the_topic', $_POST['mpurl']); } } //权限 $managebatch = checkperm('managebatch'); $allowbatch = true; $allowmanage = 0; if (checkperm('managethread')) { $allowmanage = 1; } else { //群主 if ($tagid) { $grade = getcount('tagspace', array('tagid' => $tagid, 'uid' => $_SGLOBAL['supe_uid']), 'grade'); if ($grade >= 8) { //是否成员 $allowmanage = 1; $managebatch = 1; } } }
$datas['question'][] = $value; $datas['answer'][] = $a_value; } } if (empty($datas['question']) && $_POST['config']['questionmode']) { $_POST['config']['questionmode'] = 0; } data_set('spam', $datas); $setarr = array(); foreach ($_POST['config'] as $var => $value) { $value = trim($value); $setarr[] = "('{$var}', '{$value}')"; } if ($setarr) { $_SGLOBAL['db']->query("REPLACE INTO " . tname('config') . " (var, datavalue) VALUES " . implode(',', $setarr)); } //更新缓存 include_once S_ROOT . './source/function_cache.php'; config_cache(); cpmessage('do_success', 'admincp.php?ac=spam'); } $configs = array(); $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('config')); while ($value = $_SGLOBAL['db']->fetch_array($query)) { $configs[$value['var']] = shtmlspecialchars($value['datavalue']); } $datas = data_get('spam'); if ($datas) { $datas = unserialize($datas); } $onlineip = getonlineip();
function verifyevents($eventids, $grade) { global $_SGLOBAL; $allowmanage = checkperm('manageevent'); $managebatch = checkperm('managebatch'); $opnum = 0; $eventarr = array(); $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname("event") . " WHERE eventid IN (" . simplode($eventids) . ")"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { if ($allowmanage && !$managebatch) { $opnum++; } } if (!$allowmanage || !$managebatch && $opnum > 1) { return array(); } $grade = intval($grade); if (!in_array($grade, array(-2, -1, 1, 2))) { cpmessage('bad_event_grade'); // 错误的活动状态 } $newids = $events = $actions = array(); $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('event') . " WHERE eventid IN (" . simplode($eventids) . ")"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { if ($grade == $value['grade']) { continue; } $newids[] = $value['eventid']; $events[$value['eventid']] = $value; if ($grade == -1) { $actions[$value['eventid']] = "unverify"; //未通过审核 } elseif ($grade == 1) { if ($value['grade'] == -2) { $actions[$value['eventid']] = "open"; // 开启 } elseif ($value['grade'] < 1) { $actions[$value['eventid']] = "verify"; // 通过审核 } elseif ($value['grade'] == 2) { $actions[$value['eventid']] = "unrecommend"; // 取消推荐 } } elseif ($grade == 2) { //推荐奖励积分 getreward('recommendevent', 1, $value['uid'], '', 0); $actions[$value['eventid']] = "recommend"; //推荐 } elseif ($grade == -2) { $actions[$value['eventid']] = "close"; //关闭 } } if (empty($newids)) { return array(); } @(include_once S_ROOT . './data/data_eventclass.php'); $noteids = $note_inserts = array(); $feed_inserts = array(); foreach ($newids as $id) { $event = $events[$id]; if ($grade >= 1 && $events[$id]['grade'] < 1 && $events[$id]['grade'] >= -1) { // feed:发布活动 $poster = ""; if (empty($event['poster'])) { $poster = $_SGLOBAL['eventclass'][$event['classid']]['poster']; } else { $poster = pic_get($event['poster'], $event['thumb'], $event['remote']); } $feedarr = array('appid' => UC_APPID, 'icon' => 'event', 'uid' => $event['uid'], 'username' => $event['username'], 'dateline' => $_SGLOBAL['timestamp'], 'title_template' => cplang('event_add'), 'title_data' => array('eventid' => $id, 'title' => $event['title']), 'body_template' => cplang('event_feed_info'), 'body_data' => array("eventid" => $id, "title" => $event['title'], "username" => $event['username'], 'starttime' => sgmdate('m-d H:i', $event['starttime']), 'endtime' => sgmdate('m-d H:i', $event['endtime']), 'province' => $event['province'], 'city' => $event['city'], 'location' => $event['location']), 'body_general' => '', 'image_1' => $poster, 'image_1_link' => 'space.php?do=event&id=' . $id, 'image_2' => '', 'image_2_link' => '', 'image_3' => '', 'image_3_link' => '', 'image_4' => '', 'image_4_link' => '', 'target_ids' => '', 'friend' => ''); $feedarr = sstripslashes($feedarr); //去掉转义 $feedarr['title_data'] = serialize(sstripslashes($feedarr['title_data'])); //数组转化 $feedarr['body_data'] = serialize(sstripslashes($feedarr['body_data'])); //数组转化 $feedarr['hash_template'] = md5($feedarr['title_template'] . "\t" . $feedarr['body_template']); //喜好hash $feedarr['hash_data'] = md5($feedarr['title_template'] . "\t" . $feedarr['title_data'] . "\t" . $feedarr['body_template'] . "\t" . $feedarr['body_data']); //合并hash $feedarr = saddslashes($feedarr); //增加转义 $feed_inserts[] = "('{$feedarr['appid']}', 'event', '{$feedarr['uid']}', '{$feedarr['username']}', '{$feedarr['dateline']}', '0', '{$feedarr['hash_template']}', '{$feedarr['hash_data']}', '{$feedarr['title_template']}', '{$feedarr['title_data']}', '{$feedarr['body_template']}', '{$feedarr['body_data']}', '{$feedarr['body_general']}', '{$feedarr['image_1']}', '{$feedarr['image_1_link']}', '{$feedarr['image_2']}', '{$feedarr['image_2_link']}', '{$feedarr['image_3']}', '{$feedarr['image_3_link']}', '{$feedarr['image_4']}', '{$feedarr['image_4_link']}', '', '{$id}', 'eventid')"; } if ($event['uid'] != $_SGLOBAL['supe_uid']) { // 自己的不发送通知 $noteids[] = $event[uid]; $note_msg = cplang('event_set_' . $actions[$id], array("space.php?do=event&id=" . $event['eventid'], $event['title'])); $note_inserts[] = "('{$event['uid']}', 'system', '1', '0', '', '" . addslashes($note_msg) . "', '{$_SGLOBAL['timestamp']}')"; } } unset($events); //修改状态 if ($grade == 2) { // 需要同时修改推荐时间 $_SGLOBAL['db']->query("UPDATE " . tname("event") . " SET grade='{$grade}', recommendtime='{$_SGLOBAL['timestamp']}' WHERE eventid IN (" . simplode($newids) . ")"); } else { $_SGLOBAL['db']->query("UPDATE " . tname("event") . " SET grade='{$grade}' WHERE eventid IN (" . simplode($newids) . ")"); } //通知 if ($note_inserts) { $_SGLOBAL['db']->query("INSERT INTO " . tname('notification') . " (`uid`, `type`, `new`, `authorid`, `author`, `note`, `dateline`) VALUES " . implode(',', $note_inserts)); $_SGLOBAL['db']->query("UPDATE " . tname('space') . " SET notenum=notenum+1 WHERE uid IN (" . simplode($noteids) . ")"); } //Feed if ($feed_inserts) { $_SGLOBAL['db']->query("INSERT INTO " . tname('feed') . " (`appid` ,`icon` ,`uid` ,`username` ,`dateline` ,`friend` ,`hash_template` ,`hash_data` ,`title_template` ,`title_data` ,`body_template` ,`body_data` ,`body_general` ,`image_1` ,`image_1_link` ,`image_2` ,`image_2_link` ,`image_3` ,`image_3_link` ,`image_4` ,`image_4_link` ,`target_ids` ,`id` ,`idtype`) VALUES " . implode(',', $feed_inserts)); } return $newids; }
cpmessage('do_success', 'admincp.php?ac=task'); } if ($_GET['op'] == 'edit') { $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('task') . " WHERE taskid='{$taskid}'"); if ($thevalue = $_SGLOBAL['db']->fetch_array($query)) { $thevalue['starttime'] = $thevalue['starttime'] ? sgmdate('Y-m-d H:i:s', $thevalue['starttime']) : ''; $thevalue['endtime'] = $thevalue['endtime'] ? sgmdate('Y-m-d H:i:s', $thevalue['endtime']) : ''; } } elseif ($_GET['op'] == 'add') { $thevalue = array('taskid' => 0, 'available' => 1, 'nexttime' => 0, 'credit' => 0); } elseif ($_GET['op'] == 'delete') { $_SGLOBAL['db']->query("DELETE FROM " . tname('task') . " WHERE taskid='{$taskid}'"); $_SGLOBAL['db']->query("DELETE FROM " . tname('usertask') . " WHERE taskid='{$taskid}'"); // Update Cache include_once S_ROOT . './source/function_cache.php'; task_cache(); cpmessage('do_success', 'admincp.php?ac=task'); } else { // list $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('task') . " ORDER BY displayorder"); while ($task = $_SGLOBAL['db']->fetch_array($query)) { $task['starttime'] = $task['starttime'] ? sgmdate("Y-m-d H:i:s", $task['starttime']) : 'N/A'; $task['endtime'] = $task['endtime'] ? sgmdate("Y-m-d H:i:s", $task['endtime']) : 'N/A'; $task['image'] = empty($task['image']) ? 'image/task.gif' : $task['image']; $list[] = $task; } $actives = array('view' => ' class="active"'); } $nexttypearr = array($thevalue['nexttype'] => ' selected'); $nextimestyle = $thevalue['nexttype'] == 'time' ? '' : 'none'; $availables = array($thevalue['available'] => ' checked');
/* [UCenter Home] (C) 2007-2008 Comsenz Inc. $Id: admincp_credit.php 8390 2008-08-06 05:50:42Z liguode $ */ if (!defined('IN_UCHOME') || !defined('IN_ADMINCP')) { exit('Access Denied'); } //х╗оч if (!checkperm('managecredit')) { cpmessage('no_authority_management_operation'); } if (submitcheck('creditsubmit')) { $ins = array(); foreach ($_POST['get'] as $key => $value) { $ins['get'][$key] = abs(intval($value)); } foreach ($_POST['pay'] as $key => $value) { $ins['pay'][$key] = abs(intval($value)); } data_set('creditrule', $ins); include_once S_ROOT . './source/function_cache.php'; creditrule_cache(); cpmessage('do_success', 'admincp.php?ac=credit'); } @(include_once S_ROOT . './data/data_creditrule.php'); if (empty($_SGLOBAL['creditrule'])) { $get = $pay = array(); } else { $get = $_SGLOBAL['creditrule']['get']; $pay = $_SGLOBAL['creditrule']['pay']; }
$Id: admincp_pic.php 12568 2009-07-08 07:38:01Z zhengqingpeng $ */ if (!defined('IN_UCHOME') || !defined('IN_ADMINCP')) { exit('Access Denied'); } // Check Permissions if (!($allowmanage = checkperm('managealbum'))) { $_GET['uid'] = $_SGLOBAL['supe_uid']; // For Admin Only } if (submitcheck('batchsubmit')) { include_once S_ROOT . './source/function_delete.php'; if (!empty($_POST['ids']) && deletepics($_POST['ids'])) { cpmessage('do_success', $_POST['mpurl']); } else { cpmessage('choose_to_delete_pictures', $_POST['mpurl']); } } $mpurl = 'admincp.php?ac=pic'; // process the user name if ($_GET['username']) { $query = $_SGLOBAL['db']->query("SELECT uid FROM " . tname('space') . " WHERE username='******'username']}'"); if ($value = $_SGLOBAL['db']->fetch_array($query)) { $_GET['uid'] = $value['uid']; } } // Search Processing $intkeys = array('albumid', 'uid', 'picid'); $strkeys = array('postip'); $randkeys = array(array('sstrtotime', 'dateline'), array('intval', 'hot')); $likekeys = array('filename', 'title');
$setarr['image_2_link'] = trim($_POST['image_2_link']); $setarr['image_3'] = trim($_POST['image_3']); $setarr['image_3_link'] = trim($_POST['image_3_link']); $setarr['image_4'] = trim($_POST['image_4']); $setarr['image_4_link'] = trim($_POST['image_4_link']); $setarr['dateline'] = $_SGLOBAL['timestamp']; updatetable('feed', $setarr, array('feedid' => $feedid, 'uid' => 0)); } cpmessage('do_success', 'admincp.php?ac=sitefeed', 0); } elseif (submitcheck('deletesubmit')) { if ($_POST['ids']) { $_SGLOBAL['usergroup'][$space['groupid']]['managefeed'] = 1; include_once S_ROOT . './source/function_delete.php'; deletefeeds($_POST['ids']); } cpmessage('do_success', 'admincp.php?ac=sitefeed', 0); } if ($_GET['op'] == 'add') { $feed = array(); $feed['dateline'] = sgmdate('Y-m-d H:i', $_SGLOBAL['timestamp']); } elseif ($_GET['op'] == 'edit') { $_GET['feedid'] = intval($_GET['feedid']); $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('feed') . " WHERE uid='0' AND feedid='{$_GET['feedid']}'"); $feed = $_SGLOBAL['db']->fetch_array($query); $feed = shtmlspecialchars($feed); if ($feed['dateline'] < $_SGLOBAL['timestamp']) { $feed['dateline'] = $_SGLOBAL['timestamp']; } $feed['dateline'] = sgmdate('Y-m-d H:i', $feed['dateline']); } else { //浏览
while ($value = $_SGLOBAL['db']->fetch_array($query)) { $list[] = $value; } } elseif ($_GET['op'] == 'add') { $click = array(); } elseif ($_GET['op'] == 'delete') { //ɾ³ý if ($click) { //ɾ³ý×ֶΠ//Ôö¼Ó×ֶΠswitch ($click['idtype']) { case 'picid': $tablename = tname('pic'); break; case 'tid': $tablename = tname('thread'); break; default: $tablename = tname('blog'); break; } $_SGLOBAL['db']->query("ALTER TABLE {$tablename} DROP click_{$clickid}", 'SILENT'); $_SGLOBAL['db']->query("DELETE FROM " . tname('click') . " WHERE clickid='{$clickid}'"); $_SGLOBAL['db']->query("DELETE FROM " . tname('clickuser') . " WHERE clickid='{$clickid}'"); //¸üлº´æ include_once S_ROOT . './source/function_cache.php'; click_cache(); } cpmessage('do_success', 'admincp.php?ac=click'); } $idtypearr = $click ? array($click['idtype'] => ' selected') : array();
} elseif ($_POST['optype'] == 'digest') { include_once S_ROOT . './source/function_op.php'; if (!empty($_POST['ids']) && digestthreads($tagid, $_POST['ids'], $_POST['digestv'])) { cpmessage('do_success', $_POST['mpurl']); } else { cpmessage('choosing_to_operate_the_topic', $_POST['mpurl']); } } elseif ($_POST['optype'] == 'top') { include_once S_ROOT . './source/function_op.php'; if (!empty($_POST['ids']) && topthreads($tagid, $_POST['ids'], $_POST['topv'])) { cpmessage('do_success', $_POST['mpurl']); } else { cpmessage('choosing_to_operate_the_topic', $_POST['mpurl']); } } else { cpmessage('choice_batch_action'); } } // Check Permissions $managebatch = checkperm('managebatch'); $allowbatch = true; $allowdt = 1; $allowmanage = 0; if (checkperm('managethread')) { $allowmanage = 1; } else { // Main group if ($tagid) { $grade = getcount('tagspace', array('tagid' => $tagid, 'uid' => $_SGLOBAL['supe_uid']), 'grade'); if ($grade >= 8) { //Whether enable manage members
cpmessage("do_success", "admincp.php?ac=eventclass", 2); } if("delete" == $_GET['op']) {// 删除活动分类 if(empty($thevalue)){ cpmessage("there_is_no_designated_users_columns", "admincp?ac=eventclass", 2); } if (! @include_once(S_ROOT . "data/data_eventclass.php")) { include_once(S_ROOT . "source/function_cache.php"); eventclass_cache(); } $list = $_SGLOBAL['eventclass']; if(sizeof($list) == 1){// 最后一项不能删除 cpmessage("have_no_eventclass", "admincp.php?ac=eventclass", 2); // 删除失败,请保留至少一个活动分类 } $list[$thevalue['classid']] = null; // 移除删除项 } elseif("add" == $_GET['op']) { //$thevalue['poster'] = "image/event/default.jpg"; } else { if (!@include_once(S_ROOT.'./data/data_eventclass.php')) { include_once(S_ROOT.'source/function_cache.php'); eventclass_cache(); } $list = $_SGLOBAL['eventclass']; $actives = array('view' => ' class="active"');
if (strexists($value, ',')) { $narr = array(); $arr = explode(',', $value); foreach ($arr as $v) { $v = trim($v); $v = intval($v); if ($v) { $narr[$v] = $v; } } $value = implode(',', $narr); } elseif (preg_match("/[^a-z]/i", $value)) { $value = intval($value); } $values[$key] = $value; } $_POST['network'][$type] = $values; } data_set('network', $_POST['network']); // Update Cache include_once S_ROOT . './source/function_cache.php'; network_cache(); cpmessage('do_success', 'admincp.php?ac=network'); } $network = $_SGLOBAL['network']; // sort $orders = $scs = array(); foreach (array('blog', 'pic', 'thread', 'poll', 'event') as $value) { $orders[$value] = array($network[$value]['order'] => ' selected'); $scs[$value] = array($network[$value]['sc'] => ' selected'); }
//dataÉèÖà $datas = array(); foreach ($_POST['data'] as $var => $value) { $datas[$var] = trim(stripslashes($value)); } data_set('setting', $datas); //·¢ËÍÓʼþÉèÖà $mails = array(); foreach ($_POST['mail'] as $var => $value) { $mails[$var] = trim(stripslashes($value)); } data_set('mail', $mails); // Update Cache include_once S_ROOT . './source/function_cache.php'; config_cache(); cpmessage('do_success', 'admincp.php?ac=config'); } $configs = array(); $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('config')); while ($value = $_SGLOBAL['db']->fetch_array($query)) { $configs[$value['var']] = shtmlspecialchars($value['datavalue']); } if (empty($configs['feedfilternum']) || $configs['feedfilternum'] < 1) { $configs['feedfilternum'] = 1; } $datasets = $datas = $mails = array(); $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('data')); while ($value = $_SGLOBAL['db']->fetch_array($query)) { if ($value['var'] == 'setting' || $value['var'] == 'mail') { $datasets[$value['var']] = empty($value['datavalue']) ? array() : unserialize($value['datavalue']); } else {
<?php if (!defined('iBUAA') || !defined('IN_ADMINCP')) { exit('Access Denied'); } //权限 if (!checkperm('manageapp')) { cpmessage('no_authority_management_operation'); } if (submitcheck('appsubmit')) { include_once S_ROOT . './source/function_cache.php'; data_set('relatedtag', $_POST['relatedtag']); tagtpl_cache(); app_cache(); //应用列表缓存 cpmessage('do_success', 'admincp.php?ac=app'); } if (empty($_GET['op'])) { include_once S_ROOT . './uc_client/client.php'; $applist = uc_app_ls(); $relatedtag = data_get('relatedtag'); $relatedtag = unserialize($relatedtag); if (empty($relatedtag)) { $relatedtag = array(); } } //更新tag模板文件 function tagtpl_cache() { $relatedtag = unserialize(data_get('relatedtag')); if (empty($relatedtag)) {
exit; } elseif (isset($_GET['autoimport'])) { cpmessage('data_files_into_success', "admincp.php?ac=backup&op=import&do=import&datafile={$datafile_next}&autoimport=yes" . (isset($unzip) ? '&delunzip=yes' : ''), 1, array($identify[4])); } else { cpmessage('the_volumes_of_data_into_databases_success', 'admincp.php?ac=backup'); } } elseif ($identify[3] == 'shell') { list($dbhost, $dbport) = explode(':', $dbhost); $query = $_SGLOBAL['db']->query("SHOW VARIABLES LIKE 'basedir'"); list(, $mysql_base) = $_SGLOBAL['db']->fetch_array($query, MYSQL_NUM); $mysqlbin = $mysql_base == '/' ? '' : addslashes($mysql_base) . 'bin/'; $dbcharset = empty($_SC['dbcharset']) ? $_SC['charset'] : $_SC['dbcharset']; @shell_exec('"' . $mysqlbin . 'mysql" --default-character-set=' . $dbcharset . ' -h ' . $dbhost . ($dbport ? is_numeric($dbport) ? ' -P' . $dbport : ' -S' . $dbport . '' : '') . ' -u' . $dbuser . ' -p' . $dbpw . ' ' . $dbname . ' < ' . $_GET['datafile']); cpmessage('the_volumes_of_data_into_databases_success', 'admincp.php?ac=backup'); } else { cpmessage('data_file_format_is_wrong_not_into'); } } } function fetchtablelist($tablepre = '') { global $_SGLOBAL, $_SC; !$tablepre && ($tablepre = '*'); $tables = $table = array(); $query = $_SGLOBAL['db']->query("SHOW TABLE STATUS LIKE '{$_SC['tablepre']}%'"); while ($table = $_SGLOBAL['db']->fetch_array($query)) { if (!strexists($table['Name'], 'cache')) { $tables[] = $table; } } return $tables;
if (!$rid) { cpmessage('the_right_to_report_the_specified_id', 'admincp.php?ac=report'); } if ($_GET['subop'] == 'delinfo') { deleteinfo(array($rid)); } //删除举报 $_SGLOBAL['db']->query("DELETE FROM " . tname('report') . " WHERE rid='{$rid}'"); cpmessage('do_success', 'admincp.php?ac=report'); } elseif ($_GET['op'] == 'ignore') { $rid = isset($_GET['rid']) ? intval($_GET['rid']) : 0; if (!$rid) { cpmessage('the_right_to_report_the_specified_id', 'admincp.php?ac=report'); } $_SGLOBAL['db']->query("UPDATE " . tname('report') . " SET num='0' WHERE rid='{$rid}'"); cpmessage('do_success', 'admincp.php?ac=report'); } //处理搜索 $intkeys = array(); if (!isset($_GET['status']) || $_GET['status'] == 1) { $_GET['num1'] = 1; $_GET['status'] = 1; } elseif ($_GET['status'] == 0) { $_GET['num'] = 0; $intkeys = array('num'); } $strkeys = array('idtype'); $randkeys = array(array('intval', 'num')); $likekeys = array(); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys); $wherearr = $results['wherearr'];
*/ if (!defined('IN_UCHOME') || !defined('IN_ADMINCP')) { exit('Access Denied'); } //权限 if (!($allowmanage = checkperm('managebwzt'))) { $_GET['uid'] = $_SGLOBAL['supe_uid']; //只能操作本人的 $_GET['username'] = ''; } if (submitcheck('batchsubmit')) { include_once S_ROOT . './source/function_delete.php'; if (!empty($_POST['ids']) && deletebwzts($_POST['ids'])) { cpmessage('do_success', $_POST['mpurl']); } else { cpmessage('the_correct_choice_to_delete_the_log'); } } $mpurl = 'admincp.php?ac=bwzt'; //处理搜索 $intkeys = array('uid', 'friend', 'bwztid'); $strkeys = array('username'); $randkeys = array(array('sstrtotime', 'dateline'), array('intval', 'viewnum'), array('intval', 'replynum'), array('intval', 'hot')); $likekeys = array('subject'); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys, 'b.'); $wherearr = $results['wherearr']; $mpurl .= '&' . implode('&', $results['urls']); //限制条件2 $intkeys = array(); $strkeys = array('postip'); $randkeys = array();
*/ if (!defined('IN_UCHOME') || !defined('IN_ADMINCP')) { exit('Access Denied'); } // Check Permissions if (!($allowmanage = checkperm('managealbum'))) { $_GET['uid'] = $_SGLOBAL['supe_uid']; // For Admin Only $_GET['username'] = ''; } if (submitcheck('deletesubmit')) { include_once S_ROOT . './source/function_delete.php'; if (!empty($_POST['ids']) && deletealbums($_POST['ids'])) { cpmessage('do_success', $_POST['mpurl']); } else { cpmessage('at_least_one_option_to_delete_albums', $_POST['mpurl']); } } $mpurl = 'admincp.php?ac=album'; // Search Processing $intkeys = array('uid', 'friend', 'albumid'); $strkeys = array('username'); $randkeys = array(array('sstrtotime', 'dateline')); $likekeys = array('albumname'); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys); $wherearr = $results['wherearr']; $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $mpurl .= '&' . implode('&', $results['urls']); // Order $orders = getorders(array('dateline', 'updatetime', 'picnum'), 'albumid'); $ordersql = $orders['sql'];
function checkfilename($filename) { global $tpldir; $isedit = false; if (!empty($filename)) { $filename = str_replace(array('..', '/', '\\'), array('', '', ''), $filename); if (!empty($filename) && fileext($filename) == 'htm') { if (is_writeable($tpldir . $filename)) { $isedit = true; } } } if (!$isedit) { cpmessage('template_files_editing_failure_check_directory_competence'); } return $filename; }
$_GET['username'] = ''; } if (submitcheck('deletesubmit')) { include_once S_ROOT . './source/function_delete.php'; if (!empty($_POST['ids']) && deletepolls($_POST['ids'])) { cpmessage('do_success', $_POST['mpurl']); } else { cpmessage('the_correct_choice_to_delete_the_poll', $_POST['mpurl']); } } $mpurl = 'admincp.php?ac=poll'; $op = empty($_GET['op']) ? '' : trim($_GET['op']); if ($op == 'delete') { include_once S_ROOT . './source/function_delete.php'; deletepolls(array($_GET['pid'])); cpmessage('do_success', $mpurl); } else { //处理搜索 if ($_GET['expiration']) { $val = $_GET['expiration'] == 1 ? 1 : 2; $_GET['expiration' . $val] = $_SGLOBAL['timestamp']; } $intkeys = array('uid', 'noreply', 'pid', 'sex'); $strkeys = array('username'); $randkeys = array(array('sstrtotime', 'dateline'), array('intval', 'voternum'), array('intval', 'replynum'), array('intval', 'percredit'), array('intval', 'expiration'), array('intval', 'hot')); $likekeys = array('subject'); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys, ''); $wherearr = $results['wherearr']; $mpurl .= '&' . implode('&', $results['urls']); $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); //排序
profilefield_cache(); profield_cache(); censor_cache(); block_cache(); eventclass_cache(); magic_cache(); click_cache(); task_cache(); ad_cache(); creditrule_cache(); userapp_cache(); app_cache(); network_cache(); } //ģ����뻺�� if (empty($_POST['cachetype']) || in_array('tpl', $_POST['cachetype'])) { tpl_cache(); } //ģ�黺�� if (empty($_POST['cachetype']) || in_array('block', $_POST['cachetype'])) { block_data_cache(); } //��㿴������ if (empty($_POST['cachetype']) || in_array('network', $_POST['cachetype'])) { $fiels = sreaddir(S_ROOT . './data', array('txt')); foreach ($fiels as $value) { @unlink(S_ROOT . './data/' . $value); } } cpmessage('do_success', $turl); }
if (!defined('iBUAA') || !defined('IN_ADMINCP')) { exit('Access Denied'); } //权限 if (!($allowmanage = checkperm('managedoing'))) { $_GET['uid'] = $_SGLOBAL['supe_uid']; //只能操作本人的 $_GET['username'] = ''; } if (submitcheck('batchsubmit')) { include_once S_ROOT . './source/function_delete.php'; if (!empty($_POST['ids']) && deletedoings($_POST['ids'])) { cpmessage('do_success', $_POST['mpurl']); } else { cpmessage('choose_to_delete_events', $_POST['mpurl']); } } $mpurl = 'admincp.php?ac=doing'; //处理搜索 $intkeys = array('uid'); $strkeys = array('ip', 'username'); $randkeys = array(array('sstrtotime', 'dateline')); $likekeys = array('message'); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys); $wherearr = $results['wherearr']; $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $mpurl .= '&' . implode('&', $results['urls']); //排序 $orders = getorders(array('dateline', 'lastpost'), 'doid'); $ordersql = $orders['sql'];
<?php if (!defined('iBUAA') || !defined('IN_ADMINCP')) { exit('Access Denied'); } if (!checkperm('managerecommendpublic')) { cpmessage('no_authority_management_operation'); } //1为学院、2为部处、3为名人、4为学生组织、5为兴趣社团、6为学生党组织、7为活动主页、8为品牌主页、20为班级主页、100为航路研语、默认0为其他 if ($_GET['op'] == 'query') { $query_str = $_POST['query']; $sql = 'SELECT * FROM ' . tname('space') . ' WHERE uid="' . $query_str . '" and groupid=3 or name="' . $query_str . '" and groupid=3'; $query = $_SGLOBAL['db']->query($sql); $query_value = array(); while ($res = $_SGLOBAL['db']->fetch_array($query)) { $query1 = $_SGLOBAL['db']->query("SELECT * FROM " . tname("rec_public") . " WHERE uid=" . $res['uid']); if ($_SGLOBAL['db']->fetch_array($query1)) { $res['recommend_or_not'] = '已推荐'; } else { $res['recommend_or_not'] = '推荐'; } $query_value[] = $res; } } if ($_GET['op'] == 'add') { $add_item = $_POST['uid']; $name = $_POST['username']; $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname("rec_public") . " WHERE uid=" . $add_item); if ($_SGLOBAL['db']->fetch_array($query)) { showmessage("该公共主页已经存在推荐列表,请不要重复添加"); } else {
function sub_getblock($bid) { global $_SGLOBAL; $bid = intval($bid); $block = array(); if($bid) { $query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('block')." WHERE bid='$bid'"); $block = $_SGLOBAL['db']->fetch_array($query); } if(empty($block)) { cpmessage('designated_data_transfer_module_does_not_exist'); } return $block; }