<?php /** * 云搜索后台管理 * @author L.IuHu.I@2011 developer.liuhui@gmail.com */ require_once R_P . 'lib/cloudwind/cloudwind.class.php'; $_service = CloudWind::getPlatformCheckServerService(); if ($_service->checkCloudWind() < 9) { ObHeader($admin_file . '?adminjob=yunbasic'); } if (!$_service->getSiteScale()) { Showmsg('亲,您的站点现在没有搜索负载压力,过段时间再开启云搜索吧亲~'); } if (!$db_yunsearch_search) { if ($_POST['step'] == 2) { CLOUDWIND_SECURITY_SERVICE::gp(array('db_yunsearch_search'), 'P', 2); setConfig('db_yunsearch_search', $db_yunsearch_search); updatecache_c(); Showmsg('云搜索设置成功 '); } ifcheck($db_yunsearch_search, 'yunsearch_search'); } $yunManageUrl = $_service->getYunSearchManageUrl(); include PrintEot('yunsearch');
<?php !function_exists('adminmsg') && exit('Forbidden'); $basename = "{$admin_file}?adminjob=ipban&job=ipstates"; if ($action != 'submit' && $action != 'ipIndex') { ifcheck($db_ipstates, 'ipstates'); include PrintEot('ipstates'); } elseif ($_POST['action'] == "submit") { S::gp(array('ipstates'), 'P'); setConfig('db_ipstates', $ipstates); updatecache_c(); $navConfigService = L::loadClass('navconfig', 'site'); $navConfigService->controlShowByKey('sort_ipstate', $ipstates); adminmsg('operate_success'); } elseif ($action == "ipIndex") { $ipTable = L::loadClass('IPTable', 'utility'); $ipTable->createIpIndex(); adminmsg('operate_success'); }
while ($rt = $db->fetch_array($query)) { $rt['keyword'] = str_replace($keyword, '<em class="s1">' . $keyword . '</em>', $rt['keyword']); $rt['endtime'] = get_date($rt['endtime'], 'Y-m-d'); $adverts[$rt['id']] = $rt; } } elseif ($job == 'add') { $advert = array('starttime' => get_date($timestamp, 'Y-m-d'), 'endtime' => get_date($timestamp + 31536000, 'Y-m-d')); $ifshow_Y = 'checked'; $advert['orderby'] = 0; $showddate = ''; } elseif ($job == 'edit') { s::gp(array('id')); $advert = $db->get_one("SELECT * FROM pw_searchadvert WHERE id=" . s::sqlEscape($id)); !$advert && adminmsg('advert_id_error'); $advert['skey'] = $advert['keyword']; ifcheck($advert['ifshow'], 'ifshow'); $advert['starttime'] = get_date($advert['starttime'], 'Y-m-d'); $advert['endtime'] = get_date($advert['endtime'], 'Y-m-d'); $config = unserialize($advert['config']); $config['ddate'] = $config['ddate'] ? str_replace(',', ':true,', $config['ddate']) . ':true' : ''; $config['dweek'] = $config['dweek'] ? str_replace(',', ':true,', $config['dweek']) . ':true' : ''; $config['dtime'] = $config['dtime'] ? str_replace(',', ':true,', $config['dtime']) . ':true' : ''; if ($config['ddate'] || $config['dweek'] || $config['dtime']) { $showddate = "{days:{" . $config['ddate'] . "},weeks:{" . $config['dweek'] . "},hours:{" . $config['dtime'] . "}}"; } else { $showddate = ''; } } elseif ($job == 'save') { s::gp(array('id', 'advert', 'ddate', 'dweek', 'dtime')); $id = intval($id); $basename .= $id ? "&job=edit&id={$id}" : "";
$isDefault = ''; if ($id) { $cate = $db->get_one("SELECT * FROM pw_advert WHERE type=0 AND id=" . S::sqlEscape($id)); empty($cate) && adminmsg('advert_id_error', "{$basename}&action={$action}"); $cate['id'] < 100 && ($isDefault = 'disabled'); list($cate['name'], $cate['descrip']) = explode("~\t~", $cate['descrip']); $cate['config'] = unserialize($cate['config']); $cate['ifhire'] = $cate['uid']; } if ($cate['config']['display']) { ${'display_' . $cate['config']['display']} = 'checked'; } else { $display_rand = 'checked'; } ifcheck($cate['ifshow'], 'ifshow'); ifcheck($cate['ifhire'], 'ifhire'); } elseif ($_POST['step'] == 2) { S::gp(array('config', 'id')); $id = (int) $id; if ((!$id || $id >= 100) && !preg_match('/^([a-zA-Z0-9_.]{1,32})$/i', $config['ckey'])) { adminmsg('advert_ckey_error', "{$basename}&action={$action}&job=edit"); } if ($config['ifhire'] && !$credit->check($config['creditype'])) { adminmsg('advert_creditype_error'); } if ($id) { $rt = $db->get_one("SELECT id,ckey FROM pw_advert WHERE type=0 AND id=" . S::sqlEscape($id)); empty($rt) && adminmsg('advert_id_error', "{$basename}&action={$action}"); if ($rt['id'] < 100 && strtolower($rt['ckey']) != strtolower($config['ckey'])) { $rt = $db->get_one("SELECT id,ckey FROM pw_advert WHERE type=0 AND ckey=" . S::sqlEscape($config['ckey'])); !empty($rt) && adminmsg('advert_ckey_exists', "{$basename}&action={$action}");
$replayorder_asc = $replayorder_desc = ''; if ($forumset['replayorder'] == '1') { $replayorder_asc = 'selected'; } elseif ($forumset['replayorder'] == '2') { $replayorder_desc = 'selected'; } else { $replayorder_asc = 'selected'; } $name = str_replace(array('<', '>', '"', "'"), array("<", ">", """, "'"), $name); $descrip = str_replace(array('<', '>'), array("<", ">"), $descrip); ifcheck($viewsub, 'viewsub'); ifcheck($allowhide, 'allowhide'); ifcheck($allowsell, 'allowsell'); ifcheck($copyctrl, 'copyctrl'); ifcheck($showsub, 'showsub'); ifcheck($ifhide, 'ifhide'); $logotype = !empty($logo) && strpos($logo, 'http://') === false && file_exists($attachdir . '/' . $logo) ? 'upload' : 'url'; $logotype == 'upload' ? $logotype_upload = 'checked' : ($logotype_url = 'checked'); $logotype == 'upload' && ($logo = ''); ${'check_' . $f_check} = 'checked'; $ftype[$f_type] = 'selected'; $fup_forumcache = str_replace("<option value=\"{$fup}\">", "<option value=\"{$fup}\" selected>", $fup_forumcache); $usergroup = "<table cellspacing='0' cellpadding='0' border='0' width='100%' align='center'><tr>"; foreach ($ltitle as $key => $value) { if ($key == 1 || $key == 2) { continue; } $htm_tr = ''; $num++; $num % 5 == 0 ? $htm_tr = '</tr><tr>' : ''; $usergroup .= "<td><input type='checkbox' name='permit[]' value='{$key}' _{$key}_>{$value}</td>{$htm_tr}";
} } elseif ($action == 'edittopic') { define('AJAX', 1); if (empty($_POST['step'])) { $ajax_basename_add = EncodeUrl($basename . "&action=edittopic&"); $selectmodel = ''; $topic = $db->get_one("SELECT cateid,name,ifable,vieworder,ifdel FROM pw_topiccate WHERE cateid=" . S::sqlEscape($cateid)); $query = $db->query("SELECT name,modelid,cateid,ifable FROM pw_topicmodel WHERE cateid=" . S::sqlEscape($cateid)); while ($rt = $db->fetch_array($query)) { $checked = ''; if ($rt['ifable']) { $checked = 'checked'; } $selectmodel .= "<span class=\"mr15 w fl\"><input style=\"vertical-align:middle;\" type=\"checkbox\" name=\"modelid[{$rt['modelid']}]\" value=\"{$rt['ifable']}\" {$checked}>{$rt['name']}</span>"; } ifcheck($topic['ifable'], 'ifable'); include PrintEot('topiccate'); ajax_footer(); } elseif ($_POST['step'] == 2) { S::gp(array('name')); S::gp(array('ifable', 'vieworder'), 'P', 2); $name = trim(ieconvert($name)); if (!$name || strlen($name) > 14) { adminmsg('topic_name'); } $rt = $db->get_one("SELECT cateid FROM pw_topiccate WHERE name=" . S::sqlEscape($name)); $rt['cateid'] != $cateid && $rt['cateid'] && adminmsg('topic_name_exist'); $db->update("UPDATE pw_topiccate" . " SET " . S::sqlSingle(array('name' => $name, 'ifable' => $ifable, 'vieworder' => $vieworder)) . " WHERE cateid=" . S::sqlEscape($cateid)); !is_array($modelid) && ($modelid = array()); $updatedb = array(); foreach ($modelid as $key => $value) {
$_service = CloudWind::getPlatformCheckServerService(); if ($_service->checkCloudWind() < 9) { ObHeader($admin_file . '?adminjob=yunbasic'); } CLOUDWIND_SECURITY_SERVICE::gp(array('action')); if (empty($action)) { if ($_POST['step'] == 2) { CLOUDWIND_SECURITY_SERVICE::gp(array('db_yundefend_shield', 'db_yundefend_shieldpost', 'db_yundefend_shielduser'), 'P', 2); setConfig('db_yundefend_shield', $db_yundefend_shield); setConfig('db_yundefend_shieldpost', $db_yundefend_shieldpost); setConfig('db_yundefend_shielduser', $db_yundefend_shielduser); updatecache_c(); Showmsg('云盾设置成功 '); } ifcheck($db_yundefend_shield, 'yundefend_shield'); ifcheck($db_yundefend_shieldpost, 'yundefend_shieldpost'); ${'yundefend_shielduser_' . intval($db_yundefend_shielduser)} = 'checked="checked"'; $dundescribe = $_service->getDunDescribe(); $current['config'] = 'current'; } elseif ($action == 'verify') { CLOUDWIND_SECURITY_SERVICE::gp(array('page')); $page = $page > 1 ? intval($page) : 1; $postVerifyService = CloudWind::getDefendPostVerifyService(); if ($_POST['step'] == 2) { CLOUDWIND_SECURITY_SERVICE::gp(array('ids')); foreach ($ids as $key => $operate) { list($tid, $pid) = explode("_", $key); $postVerifyService->verify($operate, $tid, $pid); } Showmsg('云盾审核成功 ', $basename . "&action=verify&page=" . $page); }
if (empty($_POST['step'])) { require_once R_P . 'require/credit.php'; !is_array($creditset = unserialize($o_weibo_creditset)) && ($creditset = array()); $creditlog = array(); !is_array($weibo_creditlog = unserialize($o_weibo_creditlog)) && ($weibo_creditlog = array()); foreach ($weibo_creditlog as $key => $value) { foreach ($value as $k => $v) { $creditlog[$key][$k] = 'CHECKED'; } } ifcheck($o_weibopost, 'weibopost'); ifcheck($o_weibophoto, 'weibophoto'); ifcheck($o_weibourl, 'weibourl'); ifcheck($o_weibo_hottopicdays, 'weibo_hottopicdays'); ifcheck($o_weibo_hotcommentdays, 'weibo_hotcommentdays'); ifcheck($o_weibo_hottransmitdays, 'weibo_hottransmitdays'); $creategroup = ''; $num = 0; foreach ($ltitle as $key => $value) { if ($key != 1 && $key != 2 && $key != '6' && $key != '7' && $key != '3') { $num++; $htm_tr = $num % 4 == 0 ? '' : ''; $g_checked = strpos($o_weibo_groups, ",{$key},") !== false ? 'checked' : ''; $creategroup .= "<li><input type=\"checkbox\" name=\"groups[]\" value=\"{$key}\" {$g_checked}>{$value}</li>{$htm_tr}"; } } $creategroup && ($creategroup = "<ul class=\"list_A list_120 cc\">{$creategroup}</ul>"); require_once PrintApp('admin'); } else { S::gp(array('creditset', 'creditlog', 'weibophoto', 'weibopost', 'weibourl', 'weibotip', 'weibo_hottopicdays', 'weibo_hotcommentdays', 'weibo_hotfansdays', 'weibo_hottransmitdays'), 'GP'); S::gp(array('groups'), 'GP', 2);
<?php !function_exists('adminmsg') && exit('Forbidden'); if (!$action) { ifcheck($db_pptifopen, 'ifopen'); ifcheck($db_pptcmode, 'cmode'); ${'type_' . $db_ppttype} = 'checked'; if ($db_ppttype == 'server') { $style_server = ""; $style_client = "display:none;"; } else { $style_server = "display:none;"; $style_client = ""; } $credit = array('rvrc' => $db_rvrcname, 'money' => $db_moneyname, 'credit' => $db_creditname, 'currency' => $db_currencyname); include PrintHack('admin'); exit; } else { S::gp(array('config', 'ppt_credit', 'ppturls'), 'P'); $config['db_pptcredit'] = implode(',', $ppt_credit); foreach ($config as $key => $value) { setConfig($key, $value); } updatecache_c(); adminmsg("operate_success"); }
include D_P . 'data/sql_config.php'; !is_array($manager) && ($manager = array()); !is_array($manager_pwd) && ($manager_pwd = array()); $newmanager = $newmngpwd = array(); foreach ($manager as $key => $value) { if (!empty($value) && !is_array($value)) { $newmanager[$key] = $value; $newmngpwd[$key] = $manager_pwd[$key]; } } $manager = $newmanager; $manager_pwd = $newmngpwd; unset($newmanager, $newmngpwd); InitGP(array('oldname', 'username', 'password')); if (!$action) { ifcheck($db_adminrecord, 'adminrecord'); include PrintEot('manager'); exit; } elseif ($action == 'add') { if (!$username || !$password) { adminmsg('manager_empty'); } if (GetGP('check_pwd') != $password) { adminmsg('password_confirm'); } if (str_replace(array('\\', '&', ' ', "'", '"', '/', '*', ',', '<', '>', "\r", "\t", "\n", '#'), '', $username) != $username) { adminmsg('manager_errorusername'); } if (str_replace(array('\\', '&', ' ', "'", '"', '/', '*', ',', '<', '>', "\r", "\t", "\n", '#'), '', $password) != $password) { adminmsg('manager_errorpassword'); }
} $cacheFlag && updatecache_conf('o', true); adminmsg('operate_success'); } else { $hot_userGroup = ''; $num = ''; foreach ($ltitle as $key => $value) { if (!in_array($key, array(1, 2, 6, 7))) { $num++; $tr = $num % 4 == 0 ? '</tr><tr>' : ''; $checked = strpos($o_hot_groups, "," . $key . ",") !== false ? 'checked' : ''; $hot_userGroup .= "<td><input type=\"checkbox\" name=\"hot_userGroup[]\" value=\"{$key}\" " . $checked . " /> {$value} </td>" . $tr; } } $hot_userGroup && ($hot_userGroup = "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\" align=\"center\"><tr>{$hot_userGroup}</tr></table>"); ifcheck($o_hot_open, "hot_open"); } } elseif ($action == "hotTypeSet") { InitGP(array('updateAll'), 'GP'); if ($updateAll == "updateAll") { InitGP(array('fTime', 'fType', 'active', 'sort', 'type_name', 'display')); $query = $db->query("SELECT * FROM pw_modehot ORDER BY id"); $num = 0; while ($rt = $db->fetch_array($query)) { $num++; $sql = ""; $flag = false; $filterTypeData = (array) unserialize($rt["filter_type"]); $filterTimeData = (array) unserialize($rt["filter_time"]); if ($sort[$rt["id"]] != "" && !is_numeric($sort[$rt["id"]])) { $basename = "javascript:history.go(-1);";
$db_sitemsg['reply'] = implode("\n", $db_sitemsg['reply']); } if ($admintype == 'wap' || $settingdb['wap']) { $showforums = ''; $num = 0; $query = $db->query("SELECT fid,name FROM pw_forums WHERE type<>'category' AND allowvisit='' AND f_type!='hidden' AND cms='0'"); while ($rt = $db->fetch_array($query, MYSQL_NUM)) { $num++; $htm_tr = $num % 2 == 0 ? '</tr><tr>' : ''; $forumscked = strpos(',' . $db_wapfids . ',', ',' . $rt[0] . ',') !== false ? 'CHECKED' : ''; $showforums .= '<td><input type="checkbox" name="wapfids[]" value="' . $rt[0] . '" ' . $forumscked . '>' . $rt[1] . '</td>' . $htm_tr; } $showforums && ($showforums = '<table cellspacing="0" cellpadding="0" border="0" width="100%" align="center"><tr>' . $showforums . '</tr></table>'); $db_waplimit = (int) $db_waplimit; ifcheck($db_wapifopen, 'wapifopen'); ifcheck($db_wapcharset, 'wapcharset'); } $display = ''; if ($action) { ${'cls_' . $action} = 'class="two"'; $display = 'none'; } //checkemail if ($ml_mailifopen == 1) { $ajax_basename = EncodeUrl($basename); } include PrintEot('setting'); exit; } else { InitGP(array('config'), 'P', 0); if (!pwWritable(D_P . 'data/bbscache/config.php') && !chmod(D_P . 'data/bbscache/config.php', 0777)) {
<?php !function_exists('adminmsg') && exit('Forbidden'); @(include_once D_P . 'data/bbscache/o_config.php'); if (empty($_POST['step'])) { ifcheck($o_invite, 'invite'); ifcheck($o_browseopen, 'browseopen'); for ($i = 0; $i < 10; $i++) { ${'browse_' . $i} = $o_browse & pow(2, $i) ? 'CHECKED' : ''; ${'indexset_' . $i} = $o_indexset & pow(2, $i) ? 'CHECKED' : ''; } require_once PrintMode('global'); } else { InitGP(array('config', 'browse', 'indexset'), 'GP', 2); $config['browse'] = !empty($browse) ? intval(array_sum($browse)) : 0; $config['indexset'] = !empty($indexset) ? intval(array_sum($indexset)) : 0; $updatecache = false; foreach ($config as $key => $value) { if (${'o_' . $key} != $value) { $db->pw_update('SELECT hk_name FROM pw_hack WHERE hk_name=' . pwEscape("o_{$key}"), 'UPDATE pw_hack SET ' . pwSqlSingle(array('hk_value' => $value, 'vtype' => 'string')) . ' WHERE hk_name=' . pwEscape("o_{$key}"), 'INSERT INTO pw_hack SET ' . pwSqlSingle(array('hk_name' => "o_{$key}", 'vtype' => 'string', 'hk_value' => $value))); $updatecache = true; } } $updatecache && updatecache_conf('o', true); adminmsg('operate_success'); }
updatecache_conf('nf', false, 'newinfo_config.php'); adminmsg('operate_success', "{$basename}&action=rebang"); } elseif ($_POST['job'] == 'config') { InitGP(array('newinfoifopen', 'position', 'titlelen', 'shownum'), 'P'); $newinfoifopen = $newinfoifopen ? '1' : '0'; $nf_config['position'] = (int) $position ? (int) $position : '1'; $nf_config['titlelen'] = (int) $titlelen ? (int) $titlelen : '25'; $nf_config['shownum'] = (int) $shownum ? (int) $shownum : '7'; setConfig('db_newinfoifopen', $newinfoifopen); setConfig('nf_config', $nf_config); updatecache_c(); updatecache_conf('nf', false, 'newinfo_config.php'); adminmsg('operate_success', "{$basename}&action=rebang"); } else { uasort($nf_order, 'orderCmp'); ifcheck($db_newinfoifopen, 'newinfoifopen'); $nf_config['position'] ? ${'position_' . $nf_config['position']} = 'checked' : ($position_1 = 'checked'); !$nf_config['titlelen'] && ($nf_config['titlelen'] = '25'); !$nf_config['shownum'] && ($nf_config['shownum'] = '7'); include PrintEot('rebang'); exit; } } elseif ($action == 'update') { !$nf_config['shownum'] && ($nf_config['shownum'] = '7'); !$nf_config['titlelen'] && ($nf_config['titlelen'] = '24'); $t = array('hours' => gmdate('G', $timestamp + $db_timedf * 3600)); $tdtime = PwStrtoTime(get_date($timestamp, 'Y-m-d')); $montime = PwStrtoTime(get_date($timestamp, 'Y-m') . "-1"); $element = L::loadClass('element'); $element->setDefaultNum($nf_config['shownum']); foreach ($nf_order as $key => $val) {
<?php !function_exists('adminmsg') && exit('Forbidden'); //* @include_once pwCache::getPath(D_P.'data/bbscache/o_config.php'); pwCache::getData(D_P . 'data/bbscache/o_config.php'); if (empty($action)) { if (empty($_POST['step'])) { require_once R_P . 'require/credit.php'; !in_array($o_mkdir, array(1, 2, 3)) && ($o_mkdir = 1); ${'mkdir' . $o_mkdir} = 'checked'; ifcheck($db_phopen, 'phopen'); ifcheck($o_photos_gdcheck, 'photos_gdcheck'); ifcheck($o_photos_qcheck, 'photos_qcheck'); $maxuploadsize = @ini_get('upload_max_filesize'); $creategroup = ''; $num = 0; foreach ($ltitle as $key => $value) { if ($key != 1 && $key != 2 && $key != '6' && $key != '7' && $key != '3') { $num++; $htm_tr = $num % 4 == 0 ? '' : ''; $g_checked = strpos($o_photos_groups, ",{$key},") !== false ? 'checked' : ''; $creategroup .= "<li><input type=\"checkbox\" name=\"groups[]\" value=\"{$key}\" {$g_checked}>{$value}</li>{$htm_tr}"; } } $creategroup && ($creategroup = "<ul class=\"list_A list_120 cc\">{$creategroup}</ul>"); !is_array($creditset = unserialize($o_photos_creditset)) && ($creditset = array()); $creditlog = array(); !is_array($photos_creditlog = unserialize($o_photos_creditlog)) && ($photos_creditlog = array()); foreach ($photos_creditlog as $key => $value) { foreach ($value as $k => $v) { $creditlog[$key][$k] = 'CHECKED';
<?php !function_exists('adminmsg') && exit('Forbidden'); //* include_once pwCache::getPath(D_P.'data/bbscache/o_config.php'); pwCache::getData(D_P . 'data/bbscache/o_config.php'); require_once R_P . 'require/app_core.php'; if (empty($action)) { if (empty($_POST['step'])) { require_once R_P . 'require/credit.php'; ifcheck($db_dopen, 'dopen'); ifcheck($o_diary_gdcheck, 'diary_gdcheck'); ifcheck($o_diary_qcheck, 'diary_qcheck'); $maxuploadsize = @ini_get('upload_max_filesize'); $creategroup = ''; $num = 0; foreach ($ltitle as $key => $value) { if ($key != 1 && $key != 2 && $key != '6' && $key != '7' && $key != '3') { $num++; $htm_tr = $num % 4 == 0 ? '' : ''; $g_checked = strpos($o_diary_groups, ",{$key},") !== false ? 'checked' : ''; $creategroup .= "<li><input type=\"checkbox\" name=\"groups[]\" value=\"{$key}\" {$g_checked}>{$value}</li>{$htm_tr}"; } } $creategroup && ($creategroup = "<ul class=\"list_A list_120 cc\">{$creategroup}</ul>"); $uploadsize = unserialize($o_uploadsize); $attachdir_ck[(int) $o_attachdir] = 'selected'; !is_array($creditset = unserialize($o_diary_creditset)) && ($creditset = array()); $creditlog = array(); !is_array($diary_creditlog = unserialize($o_diary_creditlog)) && ($diary_creditlog = array()); foreach ($diary_creditlog as $key => $value) { foreach ($value as $k => $v) {
} adminmsg('operate_success'); } elseif ($action == 'edit' || $action == 'add') { if (!$_POST['step']) { if ($action == 'edit') { InitGP(array('id')); $rt = $db->get_one("SELECT * FROM pw_tools WHERE id=" . pwEscape($id)); !$rt && adminmsg('operate_fail'); } else { $rt = array(); } !$rt['creditype'] && ($rt['creditype'] = 'currency'); $condition = unserialize($rt['conditions']); $groupids = $condition['group']; $fids = $condition['forum']; ifcheck($rt['state'], 'state'); ${'type_' . $rt['type']} = 'checked'; foreach ($condition['credit'] as $key => $value) { $key == 'rvrc' && ($value /= 10); $condition['credit'][$key] = (int) $value; } $CreditList = ''; foreach ($credit->cType as $key => $value) { $CreditList .= "<option value=\"{$key}\"" . ($rt['creditype'] == $key ? ' selected' : '') . ">{$value}</option>"; } $CreditLuck = ''; foreach ($credit->cType as $key => $value) { $CreditLuck .= "<option value=\"{$key}\"" . ($condition['luck']['lucktype'] == $key ? ' selected' : '') . ">{$value}</option>"; } $usergroup = "<table cellspacing='0' cellpadding='0' border='0' width='100%' align='center'><tr>"; foreach ($ltitle as $key => $value) {
} $db_imglen = $db_imglen > 120 ? 120 : (int) $db_imglen; $db_imgsize = (int) $db_imgsize; $db_imgwidth = $db_imgwidth > 120 ? 120 : (int) $db_imgwidth; $db_signmoney = (int) $db_signmoney; $db_signheight = (int) $db_signheight; //$db_fthumbwidth = (int) $db_fthumbwidth; //$db_fthumbheight = (int) $db_fthumbheight; $db_windpic['size'] = (int) $db_windpic['size']; $db_windpic['picwidth'] = (int) $db_windpic['picwidth']; $db_windpic['picheight'] = (int) $db_windpic['picheight']; ifcheck($db_upload, 'upload'); // ifcheck($db_iffthumb, 'iffthumb'); ifcheck($db_signwindcode, 'signwindcode'); ifcheck($db_windpic['pic'], 'windpic_pic'); ifcheck($db_windpic['flash'], 'windpic_flash'); include PrintEot('member'); exit; } else { S::gp(array('sellset', 'enhideset', 'config'), 'P'); S::gp(array('windpost', 'upload', 'signgroup', 'logintype', 'windpic'), 'P', 2); $config['windpost'] = is_array($db_windpost) ? $db_windpost : array(); //post $config['sellset'] = is_array($sellset) ? $sellset : array(); $config['windpic'] = is_array($windpic) ? $windpic : array(); is_array($windpost) && ($config['windpost'] = array_merge($config['windpost'], $windpost)); $config['enhideset'] = is_array($enhideset) ? $enhideset : array(); $config['titlemax'] = (int) $config['titlemax']; $config['postmax'] = (int) $config['postmax']; $config['postmax'] < 1 && ($config['postmax'] = 50000); $config['postmin'] = (int) $config['postmin'];
$delarticle = L::loadClass('DelArticle'); $readdb = $delarticle->getTopicDb('tid ' . $delarticle->sqlFormatByIds($delids)); $delarticle->delTopic($readdb, $db_recycle); if ($db_ifpwcache ^ 1) { $db->update("DELETE FROM pw_elements WHERE type !='usersort' AND id IN(" . pwImplode($delids) . ')'); } # $db->update("DELETE FROM pw_threads WHERE tid IN ($selids)"); # ThreadManager $threadManager = L::loadClass("threadmanager"); $threadManager->deleteByThreadIds($fid, $selids); P_unlink(D_P . 'data/bbscache/c_cache.php'); adminmsg('operate_success', "{$basename}&action=postcate&pcid={$pcid}"); } elseif ($action == 'editpostcate') { if (empty($_POST['step'])) { extract($db->get_one("SELECT pcid,name,ifable,vieworder FROM pw_postcate WHERE pcid=" . pwEscape($pcid))); ifcheck($ifable, 'ifable'); include PrintEot('postcate'); exit; } elseif ($_POST['step'] == 2) { InitGP(array('name')); InitGP(array('ifable', 'vieworder'), 'P', 2); $name = trim(ieconvert($name)); if (!$name || strlen($name) > 14) { adminmsg('topic_name'); } $db->update("UPDATE pw_postcate" . " SET " . pwSqlSingle(array('name' => $name, 'ifable' => $ifable, 'vieworder' => $vieworder)) . " WHERE pcid=" . pwEscape($pcid)); updatecache_postcate(); adminmsg('operate_success', $basename); } } elseif ($action == 'postcatelist') { InitGP(array('selid', 'vieworder'));
if (!($push = $pushdataService->getPushDataById($pushdataid))) { adminmsg('±§Ç¸,±à¼Êý¾ÝÓÐÎó', $baseUrl); } $temp_invokepiece = $invokepiece; $invokepiece = $invokeService->getInvokePieceByInvokeId($push['invokepieceid']); $invokepieceid = $invokepiece['id']; $invokename = $invokepiece['invokename']; $invokeInfo = $invokeService->getInvokeByName($invokename); $channelAlias = $invokeInfo['sign']; $portalPageService = L::loadClass('portalpageservice', 'area'); $portalPages = $portalPageService->getPortalPages(); $invokes = $portalPageService->getPageInvokesForSelect($channelAlias); $offsets = array(0 => "", 1 => "", 2 => "", 3 => "", 4 => "", 5 => ""); $offsets[$push['vieworder']] = 'checked="checked"'; $stylename = $pushdataService->getTitleCss($push); ifcheck($push['ifbusiness'], 'ifbusiness'); $push['starttime'] = $push['starttime'] ? get_date($push['starttime'], 'Y-m-d H:i') : ''; if ($invokes && $invokename) { $invokepieces = $invokes[$invokename]['pieces']; } $invokesForJs = pwJsonEncode($invokes); $ajax_basename = EncodeUrl($basename); include PrintMode('pushdata'); exit; } else { S::gp(array('param', 'offset', 'starttime', 'css', 'ifbusiness', 'invokepieceid'), 'GP'); $pushdataService = L::loadClass('pushdataservice', 'area'); $pushdataService->editPushdata($pushdataid, array('invokepieceid' => $invokepieceid, 'editor' => $admin_name, 'starttime' => $starttime, 'vieworder' => $offset, 'data' => $param, 'titlecss' => $css, 'ifbusiness' => $ifbusiness, 'ifverify' => 0)); $baseUrl = "{$basename}&page={$page}&alias={$alias}&invoke={$invoke}&invokepiece={$invokepiece}"; adminmsg('operate_success', $baseUrl); }
$sql = "SELECT rkey,rvalue FROM pw_permission WHERE uid='0' AND fid=" . S::sqlEscape($sfid) . " AND gid=" . S::sqlEscape($sgid) . "AND type='systemforum'"; } if ($sql) { $query = $db->query($sql); while ($rs = $db->fetch_array($query)) { switch ($rs['rkey']) { case 'banuser': case 'topped': ${$rs['rkey'] . '_0'} = ${$rs['rkey'] . '_1'} = ${$rs['rkey'] . '_2'} = ${$rs['rkey'] . '_3'} = ''; ${$rs['rkey'] . '_' . $rs['rvalue']} = 'checked'; break; case 'banmax': ${$rs}['rkey'] = $rs['rvalue']; break; default: ifcheck($rs['rvalue'], $rs['rkey']); } } } require GetLang('right'); include PrintEot('singleright'); exit; } elseif ($_POST['step'] == 2) { $pwSQL = $sel = array(); if (empty($all)) { S::gp(array('group', 'othergroup')); empty($selid) && adminmsg('operate_error', $jumpurl); settype($selid, 'array'); foreach ($selid as $key => $value) { list($uid, $fid, $gid) = explode('_', $value); $uid = (int) $uid;
} $tagdb = checkTags($tags); foreach ($tagdb as $tag) { if ($tag = trim($tag)) { $rt = $db->get_one("SELECT tagid FROM pw_tags WHERE tagname=" . S::sqlEscape($tag)); if (!$rt) { $db->update("INSERT INTO pw_tags SET tagname=" . S::sqlEscape($tag) . ",num=0"); } } } updatetags(); adminmsg('operate_success'); } } elseif ($action == 'setting') { ifcheck($db_iftag, 'iftag'); ifcheck($db_readtag, 'readtag'); include PrintEot('tagset'); exit; } elseif ($_POST['action'] == 'set') { S::gp(array('config')); foreach ($config as $key => $value) { setConfig("db_{$key}", $value); } $navConfigService = L::loadClass('navconfig', 'site'); /* @var $navConfigService PW_NavConfig */ $navConfigService->controlShowByKey('sort_taglist', $config['iftag']); updatecache_c(); adminmsg('operate_success', $basename . "&action=setting"); } elseif ($_POST['action'] == 'deltag') { S::gp(array('selid')); if (!($selid = checkselid($selid))) {
} updatecache_i(); adminmsg('operate_success'); } } elseif ($action == "edit") { S::gp(array('sid', 'state'), null, 2); if (!$_POST['step']) { $typeCates = $stids = array(); $typeService = L::loadClass('SharelinksTypeService', 'site'); $typeCates = $typeService->getAllTypes(); $relationService = L::loadClass('SharelinksRelationService', 'site'); $stids = $relationService->findStidBySid($sid); @extract($db->get_one("SELECT * FROM pw_sharelinks WHERE sid=" . S::sqlEscape($sid))); $name = str_replace(array('"', "'"), array('"', '''), $name); $descrip = str_replace(array('"', "'"), array('"', '''), $descrip); ifcheck($ifcheck, 'ifcheck'); include PrintEot('sharelink'); exit; } else { S::gp(array('name', 'url', 'descrip', 'logo', 'threadorder', 'username', 'ifcheck', 'stid'), 'P', 1); $descrip = str_replace(array('"', "'"), array('"', '''), $descrip); $threadorder = (int) $threadorder; $ifcheck = (int) $ifcheck; if ($ifcheck) { $temp = $db->get_value("SELECT ifcheck FROM pw_sharelinks WHERE sid=" . S::sqlEscape($sid)); if (!$temp) { M::sendNotice(array($username), array('title' => getLangInfo('writemsg', 'sharelink_pass_title'), 'content' => getLangInfo('writemsg', 'sharelink_pass_content'))); } } $url && substr($url, 0, 4) != 'http' && ($url = "http://" . $url); $result = $db->update("UPDATE pw_sharelinks" . " SET " . S::sqlSingle(array('threadorder' => $threadorder, 'name' => $name, 'url' => $url, 'descrip' => $descrip, 'logo' => $logo, 'username' => $username, 'ifcheck' => $ifcheck)) . " WHERE sid=" . S::sqlEscape($sid));
} saveConfig(); adminmsg('operate_success'); } elseif ($step == 3) { //删除套餐 define('AJAX', 1); S::gp(array('sid'), 'gp', 2); if ($sid < 1) { adminmsg('operate_error'); } $kmdService->deleteSpreadById($sid); echo "success\t" . $sid; ajax_footer(); } else { pwCache::getData(D_P . 'data/bbscache/ol_config.php'); ifcheck($db_kmd_ifkmd, 'ifkmd'); $spreads = $kmdService->getSpreads(); ${'deducttime_' . $db_kmd_deducttime} = 'selected'; require_once PrintApp('set'); } } else { if ($adminitem == 'paylog') { //购买记录 if ($step == 2) { S::gp(array('operater', 'payid'), 'gp', 2); S::gp(array('payids')); $payid > 0 && ($payids = array($payid)); if (!S::isArray($payids)) { adminmsg('operate_error'); } if ($operater == 1) {
is_array($creditset = unserialize($colony['creditset'])) || ($creditset = array()); list($colony['cnimg']) = PwColony::getColonyCnimg($colony['cnimg']); $filetype = is_array($db_uploadfiletype) ? $db_uploadfiletype : unserialize($db_uploadfiletype); $default_type = array('gif', 'jpg', 'jpeg', 'bmp', 'png'); foreach ($default_type as $value) { $cnimg_1[$value] = $o_imgsize ? $o_imgsize : $filetype[$value]; $cnimg_2[$value] = 2048; } !$colony['colonystyle'] && ($colony['colonystyle'] = 'skin_default'); $colony['banner'] && (list($colony['banner']) = geturl("cn_img/{$colony['banner']}", 'lf')); $set_banner = $colony['banner'] ? $colony['banner'] : $imgpath . '/g/' . $colony['colonystyle'] . '/preview.jpg'; $options = '<option value="0"' . ($colony['classid'] ? '' : ' selected') . '>不关联</option>'; foreach ($o_classdb as $key => $value) { $options .= "<option value=\"{$key}\"" . ($key == $colony['classid'] ? ' selected' : '') . ">{$value}</option>"; } ifcheck($colony['iftopicshowinforum'], 'iftopicshowinforum'); $ifcheck_0 = $ifcheck_1 = $ifcheck_2 = $ifopen_Y = $ifopen_N = $albumopen_Y = $albumopen_N = ''; $colony['ifcheck'] = $colony['ifcheck'] ? $colony['ifcheck'] : '2'; ${'ifcheck_' . $colony['ifcheck']} = 'selected'; $leveloptions = ''; foreach ($o_groups_level as $key => $value) { if (!isset($o_groups_levelneed[$key])) { $leveloptions .= "<option value=\"{$key}\"" . ($key == $colony['speciallevel'] ? ' selected' : '') . ">{$value}</option>"; } } $jsStyle = pwJsonEncode($o_styledb); $jsStyleRelation = pwJsonEncode($o_style_relation); $cnclass['fid'] = $db->get_value("SELECT fid FROM pw_cnclass WHERE fid=" . S::sqlEscape($colony['classid']) . " AND ifopen=1"); if (!$cnclass['fid']) { $cidDisplay = "display:none"; $viewtype_2 = 'checked';
<?php !function_exists('adminmsg') && exit('Forbidden'); //* @include_once pwCache::getPath(D_P.'data/bbscache/o_config.php'); //* @include_once pwCache::getPath(D_P.'data/bbscache/config.php'); pwCache::getData(D_P . 'data/bbscache/o_config.php'); pwCache::getData(D_P . 'data/bbscache/config.php'); S::gp(array('action')); S::gp(array('step'), 'P'); !$action && ($action = 'setucenter'); if ($action == 'setucenter') { if (!$step) { ifcheck($o_browseopen, 'browseopen'); ifcheck($db_userurlopen, 'userurlopen'); //每日打卡功能 开始 ifcheck($o_punchopen, 'punchopen'); $jobService = L::loadclass("job", 'job'); $reward = $o_punch_reward ? unserialize($o_punch_reward) : array(); $creditSelect = $jobService->getCreditSelect($reward['type'], 'reward[credit][type]', 'reward_credit'); $usergroups = $o_punch_usergroup ? explode(",", $o_punch_usergroup) : array(); $levelCheckBox = $jobService->getLevelCheckbox($usergroups); //每日打卡功能 结束 require_once PrintMode('global'); } else { if ($step == '2') { S::gp(array('reward', 'usergroup')); S::gp(array('config', 'configa'), 'P', 2); $reward['credit']['min'] = intval($reward['credit']['min']); $reward['credit']['max'] = intval($reward['credit']['max']); $reward['credit']['step'] = intval($reward['credit']['step']); $config['cachetimemin'] = intval($config['cachetimemin']);
$functionName = $passid == 1 ? 'adoptApplyMedal' : 'refuseApplyMedal'; foreach ($selid as $v) { $v = (int) $v; if ($v < 1) { continue; } $medalService->{$functionName}($v); } adminmsg('operate_success', "{$basename}&action=verify"); } /* 勋章设置 */ } elseif ($action == 'set') { S::gp(array('step'), 'P'); if (!$step) { ifcheck($db_md_ifopen, 'ifopen'); ifcheck($db_md_ifapply, 'ifapply'); require_once PrintApp('admin_set'); } else { S::gp(array('config'), 'P'); foreach ($config as $key => $value) { setConfig($key, $value); } updatecache_c(); adminmsg('operate_success', "{$basename}&action=set"); } } /** * JSON处理 * * @return Ambigous <multitype:, string> */
if (empty($action)) { if (empty($_POST['step'])) { $creategroup = ''; $num = 0; foreach ($ltitle as $key => $value) { if ($key != 1 && $key != 2 && $key != '6' && $key != '7' && $key != '3') { $num++; $htm_tr = $num % 4 == 0 ? '</tr><tr>' : ''; $g_checked = strpos($o_share_groups, ",{$key},") !== false ? 'checked' : ''; $creategroup .= "<td><input type=\"checkbox\" name=\"groups[]\" value=\"{$key}\" {$g_checked}>{$value}</td>{$htm_tr}"; } } $creategroup && ($creategroup = "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\" align=\"center\"><tr>{$creategroup}</tr></table>"); ifcheck($db_share_open, 'share_open'); ifcheck($o_share_gdcheck, 'share_gdcheck'); ifcheck($o_share_qcheck, 'share_qcheck'); require_once R_P . 'require/credit.php'; !is_array($creditset = unserialize($o_share_creditset)) && ($creditset = array()); $creditlog = array(); !is_array($share_creditlog = unserialize($o_share_creditlog)) && ($share_creditlog = array()); foreach ($share_creditlog as $key => $value) { foreach ($value as $k => $v) { $creditlog[$key][$k] = 'CHECKED'; } } require_once PrintApp('share'); } else { InitGP(array('config', 'groups', 'share_open', 'creditset', 'creditlog'), 'GP', 2); require_once R_P . 'admin/cache.php'; setConfig('db_share_open', $share_open); updatecache_c();
<?php !function_exists('adminmsg') && exit('Forbidden'); $basename = "{$admin_file}?adminjob=userpay"; if (!$_POST['action']) { include_once D_P . 'data/bbscache/ol_config.php'; !$ol_paypalcode && ($ol_paypalcode = RandString('40')); ifcheck($ol_onlinepay, 'onlinepay'); include PrintEot('userpay'); exit; } else { InitGP(array('userpay'), 'P'); !$userpay['ol_paypalcode'] && ($userpay['ol_paypalcode'] = RandString('40')); foreach ($userpay as $key => $value) { setConfig($key, $value); } updatecache_ol(); adminmsg('operate_success'); } function RandString($len) { $rand = '1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM'; mt_srand((double) microtime() * 1000000); for ($i = 0; $i < $len; $i++) { $code .= $rand[mt_rand(0, strlen($rand))]; } return $code; }
$htm_tr = $num % 2 == 0 ? '' : ''; $forumscked = strpos(',' . $db_wapfids . ',', ',' . $rt[0] . ',') !== false ? 'CHECKED' : ''; $forumName = trim(preg_replace('([\\s| ]+)', ' ', $rt[1])); $showforums .= '<li><input type="checkbox" name="wapfids[]" value="' . $rt[0] . '" ' . $forumscked . '>' . $forumName . '</li>' . $htm_tr; } $showforums && ($showforums = '<ul class="list_A list_120 cc">' . $showforums . '</ul>'); $db_waplimit = (int) $db_waplimit; ifcheck($db_wapifopen, 'wapifopen'); ifcheck($db_wapcharset, 'wapcharset'); // ifcheck($db_waprecord,'waprecord'); ifcheck($db_wapregist, 'wapregist'); ifcheck($db_waphottopicweek, 'waphottopicweek'); ifcheck($db_waphottopictoday, 'waphottopictoday'); ifcheck($db_waprecommend, 'waprecommend'); ifcheck($db_wapifathumb, 'wapifathumb'); ifcheck($db_wapifathumbgif, 'wapifathumbgif'); list($db_wapathumbwidth, $db_wapathumbheight) = explode("\t", $db_wapathumbsize); include PrintEot('wapconfig'); exit; } else { InitGP(array('config', 'wapathumbsize', 'wapfids')); $config['wapathumbsize'] = $wapathumbsize['wapathumbwidth'] . "\t" . $wapathumbsize['wapathumbheight']; $config['wapfids'] = implode(',', $wapfids); $configdb = array(); $temppre = array('config' => 'db_'); foreach ($config as $k => $value) { $var = 'db_' . $k; $vtype = 'string'; if (is_array($value)) { $vtype = 'array'; $value = serialize($value);