<?php !defined('P_W') && exit('Forbidden'); $portalPageService = L::loadClass('portalpageservice', 'area'); $actionUrl = $admin_file . "?adminjob=mode&admintype=area_page_manage"; $ajaxActionUrl = EncodeUrl($actionUrl); if (!$action) { $portalPages = $portalPageService->getPortalPagesFromDB(); include PrintMode('page_manage'); exit; } elseif ($action == 'update') { S::gp(array('sign')); if (!$sign) { echo '数据有误'; ajax_footer(); exit; } $staticPath = S::escapePath(PORTAL_PATH . $sign . '/index.html'); touch($staticPath, strtotime('1970')); echo getLangInfo('msg', 'operate_success'); ajax_footer(); exit; } elseif ($action == 'clear') { S::gp(array('sign')); if (!$sign) { Showmsg('数据有误'); } $portalPageService->deletePortalPage($sign); updatePortalTemplate($sign); Showmsg("修改成功!"); }
$seo['seotitle'] = trim(strip_tags($value['seotitle'])); $seo['seodesc'] = trim(strip_tags($value['seodesc'])); $seo['seokeywords'] = trim(strip_tags($value['seokeywords'])); $columnService->updateColumnSEO($seo); } foreach ($seoset as $key => $value) { foreach ($value as $k => $var) { $seoset[$key][$k] = S::escapeChar(strip_tags($var)); } } setConfig('cms_seoset', $seoset, null, true); updatecache_conf('cms', true); adminmsg('operate_success', "{$basename}&mode={$db_mode}"); } else { $channles = $columnService->getAllOrderColumns(); include PrintMode('seoset'); } /** * @param unknown_type $level */ function getColumnLevelHtml($level) { if ($level == 0) { return '<i class="expand expand_b"></i>'; } else { $html .= ''; for ($i = 1; $i < $level; $i++) { $html .= '<i id="" class="lower lower_a"></i>'; } $html .= '<i id="" class="lower"></i>'; }
<?php !defined('P_W') && exit('Forbidden'); $tplLib = array(); $tplPath = R_P . 'mode/area/themes/'; if ($fp1 = opendir($tplPath)) { while ($tpldir = readdir($fp1)) { if (in_array($tpldir, array('.', '..', 'admin', 'bbsindex', 'default'))) { continue; } if ($fp2 = opendir($tplPath . $tpldir)) { while ($file = readdir($fp2)) { if ($file == "." && $file == "..") { continue; } if ($file == 'main.htm') { $tplLib[] = array('dir' => $tpldir, 'preview' => getPreviewImage($tpldir)); } } } } closedir($fp); } include PrintMode('selecttpl'); function getPreviewImage($dir) { global $tplPath; $imagePath = S::escapePath($tplPath . $dir . '/images/preview/demo.jpg'); return file_exists($imagePath) ? 'mode/area/themes/' . $dir . '/images/preview/demo.jpg' : 'images/100.jpg'; }
if (empty($aids) || !is_array($aids)) { Showmsg('ÇëÑ¡ÔñÒª»¹ÔµÄÎÄÕÂ', $basename); } if (!$articleService->revertArticleFromRecycle($aids)) { Showmsg('»¹Ô²Ù×÷ʧ°Ü', $basename); } Showmsg('²Ù×÷³É¹¦!', $basename); } elseif ($action == 'cleanRecycle') { if (!$articleService->cleanRecycle()) { Showmsg('Çå¿Õ»ØÊÕÕ¾²Ù×÷ʧ°Ü', $basename); } Showmsg('Çå¿Õ²Ù×÷³É¹¦!', $basename); } function getColumnSelectHtml($columns, $cid, $columnSelect, $l = 1) { foreach ($columns as $c) { if ($c['parent_id'] == $cid) { $_tag = '|'; for ($i = 0; $i < $l; $i++) { $_tag .= '--'; } $columnSelect .= "<option value='" . $c['column_id'] . "'>" . $_tag . $c['name'] . "</option>"; getColumnSelectHtml($columns, $c['column_id'], &$columnSelect, $l + 1); } } } include PrintMode('article'); if (defined('AJAX')) { ajax_footer(); } exit;
$fiddb = array_diff($fiddb, array(0)); $config[$value] = $fiddb; } krsort($config); //update_index_forum($config); writeover(D_P . 'data/bbscache/mode_index_forum_' . $m . '_config.php', "<?php\r\n\$index_forum_config = " . pw_var_export($config) . "\r\n?>"); P_unlink(D_P . 'data/bbscache/mode_' . $m . '_index_forum.php'); $config = serialize($config); $db->pw_update("SELECT * FROM pw_cache WHERE name='areaindexforumconfig'", "UPDATE pw_cache SET cache=" . pwEscape($config, false) . "WHERE name='areaindexforumconfig'", "INSERT INTO pw_cache SET name='areaindexforumconfig',cache=" . pwEscape($config, false)); adminmsg('operate_success'); } function update_index_forum($config) { global $m; @(include_once D_P . 'data/bbscache/mode_' . $m . '_index_forum.php'); foreach ($index_forum as $key => $value) { $config_fids = array_keys($config); if (!in_array($key, $config_fids)) { unset($index_forum[$key]); continue; } foreach ($value as $k => $v) { if (!in_array($k, $config[$key])) { unset($index_forum[$key][$k]); } } } writeover(Pcv(D_P . 'data/bbscache/mode_' . $m . '_index_forum.php'), "<?php\r\n\$index_forum=" . pw_var_export($index_forum) . ";\r\n?>"); } include PrintMode('indexforum'); exit;
<?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('step'), 'P'); if (!$step) { ifcheck($o_ifcommend, 'ifcommend'); ifcheck($o_commendtype, 'commendtype'); require_once PrintMode('commend'); } else { if ($step == '2') { S::gp(array('config'), 'P'); require_once D_P . 'require/showimg.php'; $userService = L::loadClass('UserService', 'user'); /* @var $userService PW_UserService */ $UserInfo = $userService->get(intval($config['senderid'])); $face = showfacedesign($UserInfo['icon'], true, 'm'); $config['sender_face'] = $face[0]; $config['sender_uid'] = $UserInfo['uid']; $config['sender_username'] = $UserInfo['username']; setoParams($config); $updatecache && updatecache_conf('o', true); adminmsg('operate_success'); } } function setoParams($config) { global $db;
!function_exists('adminmsg') && exit('Forbidden'); $nav = array("{$action}" => "class='current'"); $memberTagsService = L::loadClass('MemberTagsService', 'user'); S::gp(array('action', 'tagid', 'tagname', 'ifhot', 'startnum', 'endnum', 'page'), 'GP'); $perpage = $perpage ? $perpage : 20; $jumpUrl = "{$basename}&tagname=" . rawurlencode($tagname) . "&ifhot={$ifhot}&startnum={$startnum}&endnum={$endnum}&page={$page}&"; if (empty($action)) { ${'sel_' . $ifhot} = 'selected'; $page = max((int) $page, 1); list($count, $tags) = $memberTagsService->getTagsByCondition($tagname, $ifhot, $startnum, $endnum, ($page - 1) * $perpage, $perpage); $numofpage = ceil($count / $perpage); if ($numofpage && $page > $numofpage) { $page = $numofpage; } $pages = numofpage($count, $page, $numofpage, $jumpUrl); require_once PrintMode('tags'); exit; } elseif ($action == 'deltags') { if (!$tagid) { adminmsg('operate_error'); } $userIds = $memberTagsService->getUidsByTagids($tagid); if ($memberTagsService->deleteTagsByTagIds($tagid)) { $userCache = L::loadClass('UserCache', 'user'); $userCache->delete($userIds, 'tags'); $memberTagsService->setTopCache(100, 1); } adminmsg('operate_success', $jumpUrl); } elseif ($action == 'sethot') { if (!$tagid) { adminmsg('operate_error');
} //url静态 设置到全局 setConfig('db_userurlopen', $configa['userurlopen'], null, false); updatecache_c(); updatecache_openforum(); if ($config['browseopen'] != '0') { updateLastPostUser(); updateFansSort(); } setoParams($config); adminmsg('operate_success'); } } } else { if ($action == 'topnav') { require_once PrintMode('global'); /*}else if( $action == 'commend' ){ if( ! $step ){ ifcheck($o_ifcommend,'ifcommend'); ifcheck($o_commendtype,'commendtype'); require_once PrintMode('global'); }else if($step == '2'){ S::gp(array('config'),'P'); require_once D_P . 'require/showimg.php'; $userService = L::loadClass('UserService', 'user'); /* @var $userService PW_UserService $UserInfo = $userService->get(intval($config['senderid'])); $face = showfacedesign($UserInfo['icon'], true, 'm'); $config['sender_face'] = $face[0]; $config['sender_uid'] = $UserInfo['uid'];
if ($area_static['ifon'] && !$area_static['step']) { adminmsg('请填写正确的静态页面刷新时间'); } $update = array('area_static_ifon', 'string', $area_static['ifon'], ''); $db->update("REPLACE INTO pw_hack VALUES (" . pwImplode($update) . ')'); $update = array('area_static_step', 'string', $area_static['step'], ''); $db->update("REPLACE INTO pw_hack VALUES (" . pwImplode($update) . ')'); updatecache_conf('area', true); $fp = opendir(D_P . 'data/tplcache/'); while ($filename = readdir($fp)) { if ($filename == '..' || $filename == '.' || strpos($filename, '.htm') === false) { continue; } if (strpos($filename, 'area_') === 0) { P_unlink(Pcv(D_P . 'data/tplcache/' . $filename)); } } closedir($fp); adminmsg('operate_success'); } elseif ($action == 'dorefresh') { if (!$area_static_ifon) { adminmsg('还没有开启门户首页静态化,无需刷新'); } updateAreaStaticRefreshTime(); adminmsg('operate_success'); } else { $if_on_checked = $area_static_ifon ? "checked" : ""; $if_noton_checked = $area_static_ifon ? "" : "checked"; } include PrintMode('configarea'); exit;
} $portalPageService->updateModuleCode($alias, $invokename, $tagcode); adminmsg('operate_success', $basename . '&alias=' . $alias . '&keyword=' . $keyword . '&page=' . $page); } } elseif ($action == 'editconfig') { S::gp(array('alias', 'invokename', 'step', 'keyword', 'page')); $beginUrl = $basename . '&alias=' . $alias . '&keyword=' . $keyword . '&page=' . $page; $portalPageService = L::loadClass('portalpageservice', 'area'); if (!$step) { $aliasType = $portalPageService->getSignType($alias); $invokedata = $invokeService->getInvokeByName($invokename); ifcheck($invokedata['ifverify'], 'ifverify'); ifcheck($invokedata['ifapi'], 'ifapi'); $invokepieces = $invokeService->getInvokePieceForSetConfig($invokename); $ajax_basename = EncodeUrl($basename); include PrintMode('module'); exit; } else { S::gp(array('p_action', 'config', 'num', 'param', 'cachetime', 'ifpushonly', 'invokename', 'title', 'ifapi'), 'P'); S::gp(array('ifverify', 'pageinvokeid'), 'P'); $invokeService->updateInvokeByName($invokename, array('ifapi' => (int) $ifapi, 'ifverify' => (int) $ifverify)); $pieces = array(); foreach ($num as $key => $value) { $temp = array(); $temp['num'] = (int) $value; $temp['action'] = $p_action[$key]; $temp['config'] = $config[$key]; $temp['param'] = $param[$key]; $temp['cachetime'] = $cachetime[$key]; $temp['ifpushonly'] = (int) $ifpushonly[$key]; $piece = $invokeService->getInvokePieceByInvokeId($key);
if (!$columnService->updateColumnOrders($orders)) { Showmsg('操作失败'); } Showmsg('操作成功!', $basename); } /** * @param unknown_type $level */ function getColumnLevelHtml($level, $cid) { global $columnService; if ($level == 0) { $subcolumns = $columnService->getSubColumnsById($cid); if (empty($subcolumns)) { return '<i class="expand expand_d"></i>'; } return '<i id="column_' . $cid . '" class="expand expand_b" onclick="closeAllSubColumns(' . $cid . ')"></i>'; } else { $html .= ''; for ($i = 1; $i < $level; $i++) { $html .= '<i id="" class="lower lower_a"></i>'; } $html .= '<i id="" class="lower"></i>'; } return $html; } include PrintMode('column'); if (defined('AJAX')) { ajax_footer(); } exit;
$haystack = array('name' => "增加", "action" => "add"); } elseif ("delete" == $action) { !$uid && adminmsg($levelService->language('uid_empty')); list($bool, $message) = $levelService->deleteAreaUser($uid); adminmsg($message); } elseif ("find" == $action) { !$username && adminmsg($levelService->language('username_empty')); list($bool, $message, $areaUser) = $levelService->getAreaUserByUserName($username); $areaUsers = array(); if ($areaUser) { $areaUser['hasedit'] = $areaUser['hasedit'] == 1 ? '开启' : '关闭'; $areaUser['hasattr'] = $areaUser['hasattr'] == 1 ? '开启' : '关闭'; $areaUsers[] = $areaUser; } } include PrintMode('level_manage'); exit; function buildCheck($v) { $check = array(); $check[1] = $v == 1 ? "checked=checked" : ""; $check[0] = $v == 0 ? "checked=checked" : ""; return $check; } function buildChannel($super, $channels) { if ($super == 1) { return '所有'; } if (!$channels) { return '无';
if (empty($pid)) { Showmsg('非法操作'); } if (!$purviewService->deletePruviewById($pid)) { Showmsg('删除操作失败'); } $purviewService->updatePurviewCache(); Showmsg('操作成功!'); } function pwGetPager($count, $page, $perpage, $url) { $page = intval($page) < 1 ? 1 : intval($page); $perpage = $perpage ? $perpage : 20; $numofpage = ceil($count / $perpage); return numofpage($count, $page, $numofpage, $baseUrl); } function getColumnLevelHtml($level, $cid) { if ($level == 0) { return '<i id="column_' . $cid . '" class="expand expand_b" onclick="closeAllSubColumns(' . $cid . ')"></i>'; } else { $html .= ''; for ($i = 1; $i < $level; $i++) { $html .= '<i id="" class="lower lower_a"></i>'; } $html .= '<i id="" class="lower"></i>'; } return $html; } include PrintMode('purview'); exit;
adminmsg('operate_success', $baseUrl); } } elseif ($action == "fetch") { $dataSourceService = L::loadClass('datasourceservice', 'area'); define('AJAX', 1); S::gp(array('pushdataid', 'invokepieceid')); if (!$invokepieceid) { ajax_footer(); } $invokepiece = $invokeService->getInvokePieceByInvokeId($invokepieceid); $default = array(); $pushdataService = L::loadClass('pushdataservice', 'area'); $push = $pushdataService->getPushData($pushdataid); $default = $push['data']; $stylename = $pushdataService->getTitleCss($push); require_once PrintMode('ajax_pushdata'); ajax_footer(); } elseif ($action == 'dels') { S::gp(array('selid'), '', 2); if (!$selid) { Showmsg('ÇëÑ¡ÔñҪɾ³ýµÄÍÆËÍÄÚÈÝ'); } $pushdataService->deletePushdatas($selid); adminmsg('operate_success'); } elseif ($action == 'del') { S::gp(array('id'), '', 2); define('AJAX', 1); $pushdataService->deletePushdata($id); echo getLangInfo('msg', 'operate_success') . "\treload"; ajax_footer(); } elseif ($action == 'verify') {
ajax_footer(); } elseif ($action == 'delpushs') { define('AJAX', 1); InitGP(array('invokepieceid', 'fid', 'loopid')); $invokeService->deleteOverduePushData($invokepieceid, $fid, $loopid); echo getLangInfo('msg', 'operate_success') . "\treload"; ajax_footer(); } elseif ($action == 'updatecache') { define('AJAX', 1); InitGP(array('scr', 'fid')); $fid = (int) $fid; $config = $invokeService->getMPageConfig('area', $scr, $fid); foreach ($config as $key => $value) { if ($value == 1) { $invokeService->updateCacheDataPiece($key, $fid, 0, $fid); } else { $invokeService->updateCacheDataPiece($key, 0, 0, $fid); } } echo getLangInfo('msg', 'operate_success') . "\treload"; ajax_footer(); } include PrintMode('tplcontent'); exit; function miniChar_cv($mixed) { $mixed = str_replace(array("", "%00", "\r"), '', $mixed); $mixed = preg_replace(array('/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F]/', '/&(?!(#[0-9]+|[a-z]+);)/is'), array('', '&'), $mixed); $mixed = stripslashes($mixed); return $mixed; }
exit; } else { S::gp(array('default_step', 'channels', 'defaultalias')); if ($default_step == 1) { $channelService->updateChannels($channels); $channelService->updateDefaultAlias($defaultalias); Showmsg("operate_success"); } else { //* include_once pwCache::getPath(D_P.'data/bbscache/area_config.php'); pwCache::getData(D_P . 'data/bbscache/area_config.php'); $addUrl = $admin_file . "?adminjob=mode&admintype=area_channel_manage&action=add&ajax=1"; $editUrl = $admin_file . "?adminjob=mode&admintype=area_channel_manage&action=edit&ajax=1"; $delUrl = $admin_file . "?adminjob=mode&admintype=area_channel_manage&action=del"; $channel_list = $channelService->getChannels(); $actionUrl = EncodeUrl($actionUrl . "&ajax=1"); include PrintMode('channel_manage'); } } //验证提交表单 function checkChannelPost($channel_name, $channel_alias = 'alias', $id) { global $channel_db; if ($channel_name == '') { Showmsg('频道名称不能为空'); } elseif ($channel_alias == '') { Showmsg('英文别名不能为空'); } elseif (strlen($channel_name) > 20) { Showmsg('频道名称不能超过20个字符'); } elseif (strlen($channel_alias) > 20) { Showmsg('英文别名不能超过20个字符'); } elseif (!preg_match("/^[a-zA-Z0-9]+\$/", $channel_alias)) {
<?php !defined('P_W') && exit('Forbidden'); S::gp(array('action', 'step')); if (!$action) { if (!$step) { //* include_once pwCache::getPath(D_P.'data/bbscache/area_config.php'); pwCache::getData(D_P . 'data/bbscache/area_config.php'); include PrintMode('static_manage'); exit; } else { S::gp(array('statictime', 'portalstatictime'), 'P', 2); $statictime = (int) $statictime > 0 ? (int) $statictime : 0; $ChannelService = L::loadClass('channelService', 'area'); $ChannelService->updateStaticTime($statictime); setConfig('db_portalstatictime', $portalstatictime); updatecache_c(); adminmsg('operate_success'); } }
<?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($_POST['step'])) { $skindb = array(); $dir = R_P . 'u/themes/'; $fp = opendir($dir); while ($skinfile = readdir($fp)) { if (!in_array($skinfile, array('.', '..', '.svn')) && is_dir($dir . $skinfile)) { $skindb[] = $skinfile; } } require_once PrintMode('skin'); } else { S::gp(array('style_name')); $array = array(); foreach ($style_name as $key => $value) { // !$value && $value = $key; $array[$key] = $value; } setConfig('o_uskin', $array, null, true); updatecache_conf('o', true); adminmsg('operate_success'); }
if (isset($area_cateinfo[$fid]) && isset($area_cateinfo[$fid]['css'])) { return $area_cateinfo[$fid]['css']; } return 'default'; } function getCssPaths($dir) { $dir = Pcv($dir); !$dir && ($dir = 'default'); $imgPath = R_P . 'mode/area/themes/' . $dir . '/images'; $temp = array(); if ($fp1 = opendir($imgPath)) { while ($imgdir = readdir($fp1)) { if (strpos($imgdir, '.') !== false) { continue; } $temp[] = $imgdir; } closedir($fp1); } return $temp; } function checkCssPath($dir, $imgdir) { $dir = Pcv($dir); !$dir && ($dir = 'default'); $imgdir = Pcv($imgdir); return is_dir(R_P . 'mode/area/themes/' . $dir . '/images/' . $imgdir); } include PrintMode('edittpl'); exit;