本文整理汇总了PHP中PrintMode函数的典型用法代码示例。如果您正苦于以下问题:PHP PrintMode函数的具体用法?PHP PrintMode怎么用?PHP PrintMode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PrintMode函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: exit
<?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("修改成功!");
}
示例2: trim
$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>';
}
示例3: exit
<?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';
}
示例4: Showmsg
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;
示例5: array_diff
$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;
示例6: 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;
示例7: exit
!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');
示例8: setConfig
}
//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'];
示例9: adminmsg
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;
示例10: adminmsg
}
$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);
示例11: Showmsg
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;
示例12: array
$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 '无';
示例13: Showmsg
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;
示例14: adminmsg
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') {
示例15: ajax_footer
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;
}