本文整理汇总了PHP中Pcv函数的典型用法代码示例。如果您正苦于以下问题:PHP Pcv函数的具体用法?PHP Pcv怎么用?PHP Pcv使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Pcv函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: checkCssPath
function checkCssPath($dir, $imgdir)
{
$dir = Pcv($dir);
!$dir && ($dir = 'default');
$imgdir = Pcv($imgdir);
return is_dir(R_P . 'mode/area/themes/' . $dir . '/images/' . $imgdir);
}
示例2: load
function load($model)
{
if (empty($this->models[$model])) {
require_once Pcv(UC_CLIENT_ROOT . "model/{$model}.php");
print '$this->models[$model] = new ' . $model . 'model($this);';
}
return $this->models[$model];
}
示例3: getThemeConfigFile
function getThemeConfigFile($theme)
{
$filedir = Pcv($this->config['dir'] . '/' . $theme . '/' . $this->config['configfile']);
if (file_exists($filedir)) {
return $filedir;
}
return false;
}
示例4: getLayoutString
function getLayoutString($layout)
{
if (!isset($this->layoutStrings[$layout])) {
if ($layout && file_exists(Pcv(A_P . 'data/layout/' . $layout . '/layout.htm'))) {
$this->layoutStrings[$layout] = readover(Pcv(A_P . 'data/layout/' . $layout . '/layout.htm'));
} else {
$this->layoutStrings[$layout] = '';
}
}
return $this->layoutStrings[$layout];
}
示例5: FileArray
function FileArray($hackdir, $base = 'hack')
{
if (!in_array($base, array('hack', 'mode'))) {
$base = 'hack';
}
if (function_exists('file_get_contents')) {
$filedata = @file_get_contents(Pcv(R_P . "{$base}/{$hackdir}/sql.txt"));
} else {
$filedata = readover(R_P . "{$base}/{$hackdir}/sql.txt");
}
$filedata = trim(str_replace(array("\t", "\r", "\n\n", ';'), array('', '', '', ";\n"), $filedata));
$sqlarray = $filedata ? explode("\n", $filedata) : array();
return $sqlarray;
}
示例6: update_index_forum
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?>");
}
示例7: pwEscape
$aid = $attach['aid'];
$tid = $attach['tid'];
$pid = $attach['pid'];
$fid = $db->get_value('SELECT fid FROM pw_threads WHERE tid=' . pwEscape($tid, false));
$fid || wap_msg('data_error', $basename);
if (!$windid && GetCookie('winduser') && $ol_offset) {
$userdb = explode("\t", getuserdb(D_P . "data/bbscache/online.php", $ol_offset));
if ($userdb && $userdb[2] == $onlineip) {
$winddb = $db->get_one("SELECT m.uid,m.username,m.groupid,m.memberid,m.groups,md.money,md.rvrc FROM pw_members m LEFT JOIN pw_memberdata md USING(uid) WHERE m.uid=" . pwEscape($userdb['8']));
$winduid = $winddb['uid'];
$groupid = $winddb['groupid'];
$groupid == '-1' && ($groupid = $winddb['memberid']);
$userrvrc = round($winddb['rvrc'] / 10, 1);
$windid = $winddb['username'];
if (file_exists(D_P . "data/groupdb/group_{$groupid}.php")) {
require_once Pcv(D_P . "data/groupdb/group_{$groupid}.php");
} else {
require_once D_P . "data/groupdb/group_1.php";
}
}
define('FX', 1);
}
if (!($foruminfo = L::forum($fid))) {
$foruminfo = $db->get_one("SELECT f.*,fe.creditset,fe.forumset,fe.commend FROM pw_forums f LEFT JOIN pw_forumsextra fe ON f.fid=fe.fid WHERE f.fid=" . pwEscape($fid));
if ($foruminfo) {
$foruminfo['creditset'] = unserialize($foruminfo['creditset']);
$foruminfo['forumset'] = unserialize($foruminfo['forumset']);
$foruminfo['commend'] = unserialize($foruminfo['commend']);
}
}
!$foruminfo && wap_msg('data_error', $basename);
示例8: getTidsCache
function getTidsCache($type, $start, $per)
{
global $timestamp, $_filename;
if (is_file($_filename) && $type != 'hot') {
include Pcv($_filename);
$tids = $tidsCache[$type]['tids'];
$uptime = $tidsCache[$type]['uptime'];
}
$overtime = $timestamp - 60 * 2;
//3分钟更新一次
if (!$tids || !$uptime || $uptime <= $overtime) {
$tids = setTidsCache($type);
}
$tids = explode(',', trim($tids, ','));
$tids = array_splice($tids, $start, $per);
return $tids;
}
示例9: InitGP
if ($rt['ifuser']) {
$userinbbs = $rt['count'];
} else {
$guestinbbs = $rt['count'];
}
}
}
if ($db_indexonline) {
InitGP(array('online'));
empty($online) && ($online = GetCookie('online'));
if ($online == 'yes') {
if ($guestinbbs + $userinbbs > 2000 && !CkInArray($windid, $manager)) {
$online = 'no';
} else {
$db_online = intval($db_online);
include_once Pcv(R_P . "require/online_{$db_online}.php");
}
}
Cookie('online', $online);
}
$usertotal = $guestinbbs + $userinbbs;
$showgroup = $db_showgroup ? explode(',', $db_showgroup) : array();
// Share union
if ($db_indexmqshare && $sharelink[1]) {
$sharelink[1] = "<marquee scrolldelay=\"100\" scrollamount=\"4\" onmouseout=\"if (document.all!=null){this.start()}\" onmouseover=\"if (document.all!=null){this.stop()}\" behavior=\"alternate\">{$sharelink['1']}</marquee>";
}
//update pw_feed
if ($winduid && PwStrtoTime(get_date($lastvisit, 'Y-m-d')) < $tdtime && $db_hostweb == 1 && !$cateid && $groupid != 'guest' && !defined('M_P')) {
$_flag = $db->get_value("SELECT id FROM pw_feed WHERE uid = " . pwEscape($winduid) . " ORDER BY id DESC LIMIT 29,1");
$_flag && $db->update("DELETE FROM pw_feed WHERE uid = " . pwEscape($winduid) . " AND id < " . pwEscape($_flag));
}
示例10: PrintWAP
function PrintWAP($template)
{
#require_once PrintEot('wap_'.$template,'htm');
return Pcv(W_P . 'template/' . $template . '.htm');
}
示例11: callback
function callback($mode, $method, $params)
{
if (!isset($this->classdb[$mode])) {
if (!file_exists(R_P . 'api/class_' . $mode . '.php')) {
return new ErrorMsg(API_MODE_NOT_EXISTS, "Class({$mode}) Not Exists");
}
require_once Pcv(R_P . 'api/class_' . $mode . '.php');
$this->classdb[$mode] = new $mode($this);
}
if (!method_exists($this->classdb[$mode], $method)) {
return new ErrorMsg(API_METHOD_NOT_EXISTS, "Method({$method} of {$mode}) Not Exists");
}
!is_array($params) && ($params = array());
return @call_user_func_array(array(&$this->classdb[$mode], $method), $params);
}
示例12: Pcv
require_once Pcv(M_P . 'admin/' . $adminjob . '.php');
} elseif ($adminjob == 'apps' && $admintype && $rightset[$admintype] == 1) {
//基础性app管理
list(, $adminname) = explode('_', $admintype);
if (!is_dir(R_P . "apps/{$adminname}") || !file_exists(R_P . "apps/{$adminname}/admin.php")) {
adminmsg('app_admin_error');
}
define('A_P', R_P . "apps/{$adminname}/");
$appdir = $adminname;
$pwAppImg = "mode/{$adminname}/images";
$basename = "{$admin_file}?adminjob=apps&admintype={$admintype}";
require_once Pcv(A_P . 'admin.php');
} elseif ($adminjob == 'content' && ($rightset['tpccheck'] && $type == 'tpc' || $rightset['postcheck'] && $type == 'post' || (int) $rightset['message'] == 1 && $type == 'message')) {
require_once R_P . 'admin/content.php';
} elseif (managerRight($adminjob) || adminRight($adminjob, $admintype)) {
require_once Pcv(R_P . 'admin/' . $adminjob . '.php');
} else {
adminmsg('undefine_action');
}
function managerRight($adminjob)
{
return If_manager && in_array($adminjob, array('rightset', 'manager', 'ystats', 'diyoption', 'optimize', 'modepage', 'sphinx', 'app', 'ajaxhandler'));
}
function adminRight($adminjob, $admintype)
{
$temp = $admintype ? $admintype : $adminjob;
return adminRightCheck($temp);
}
function getdirname($path = null)
{
if (!empty($path)) {
示例13: exit
<?php
!function_exists('readover') && exit('Forbidden');
@set_time_limit(600);
@ignore_user_abort(TRUE);
$query = $db->query("SELECT * FROM pw_plan WHERE ifopen='1' AND nexttime<" . pwEscape($timestamp));
while ($plan = $db->fetch_array($query)) {
if (file_exists(R_P . 'require/plan/' . $plan['filename'] . '.php')) {
$nexttime = nexttime($plan);
require_once Pcv(R_P . 'require/plan/' . $plan['filename'] . '.php');
$db->update("UPDATE pw_plan SET" . pwSqlSingle(array('usetime' => $timestamp, 'nexttime' => $nexttime), false) . "WHERE id=" . pwEscape($plan['id'], false));
}
}
$db->free_result($query);
unset($plan);
require_once R_P . 'admin/cache.php';
updatecache_plan();
function nexttime($plan)
{
global $timestamp, $db_timedf;
$t = gmdate('G', $timestamp + $db_timedf * 3600);
$timenow = (int) (floor($timestamp / 3600) - $t) * 3600;
$minute = (int) get_date($timestamp, 'i');
$hour = get_date($timestamp, 'G');
$day = get_date($timestamp, 'j');
$month = get_date($timestamp, 'n');
$year = get_date($timestamp, 'Y');
$week = get_date($timestamp, 'w');
$week == 0 && ($week = 7);
if (is_numeric($plan['month'])) {
$timenow += (min($plan['month'], DaysInMouth($month)) - $day) * 86400;
示例14: list
$pwModeImg = "{$imgpath}/apps";
list($app, $route) = app_specialRoute($q);
$appdir = $app;
list($basePath, $baseFile) = app_router($app);
@(include_once D_P . 'data/bbscache/o_config.php');
if ($groupid != 3 && $o_share_groups && strpos($o_share_groups, ",{$groupid},") === false) {
$shareGM = 1;
}
extract(L::style(null, 'wind'));
if ($space == 1 && !in_array($q, array('group', 'galbum'))) {
$pwModeCss = $imgpath . '/apps/browse-style.css';
} else {
$pwModeCss = $imgpath . '/apps/app-style.css';
}
list($_Navbar, $_LoginInfo) = pwNavBar();
require_once Pcv($baseFile);
if ($m == "o") {
$isheader && (require_once PrintEot('header'));
$isleft && (include_once PrintEot('m_appleft'));
$tplname && (include_once PrintEot($tplname));
$isfooter && footer();
} else {
$cssForum = TRUE;
unset($pwModeCss);
$isheader && (require_once R_P . 'require/header.php');
$tplname && (include_once PrintEot($tplname));
$isfooter && footer();
}
unset($_Navbar, $pwModeCss);
function app_router($app)
{
示例15: pwEscape
$db->update("UPDATE pw_members SET shortcut=" . pwEscape($shortcut) . " WHERE uid=" . pwEscape($winduid));
Showmsg("shortcutno");
} else {
count($myshortcut) >= 6 && Showmsg('shortcut_numlimit');
require_once D_P . 'data/bbscache/forum_cache.php';
$forumkeys = array_keys($forum);
!in_array($fid, $forumkeys) && Showmsg('undefined_action');
$myshortcut[] = $fid;
$shortcut = ',' . implode(',', $myshortcut) . ',';
$shortcut .= $shortcut . "\t" . $winddb['appshortcut'];
$db->update("UPDATE pw_members SET shortcut=" . pwEscape($shortcut) . " WHERE uid=" . pwEscape($winduid));
Showmsg("shortcutok");
}
} elseif ($action == 'pushto') {
InitGP(array('fid', 'seltid'));
@(include_once Pcv(D_P . 'data/bbscache/mode_push_config.php'));
$pushs = array();
if ($groupid == '3' || $groupid == '4' || CkInArray($windid, $manager)) {
$pushs = $PUSH;
} elseif ($groupid == '5') {
foreach ($PUSH as $key => $value) {
if (in_array($value['scr'], array('thread', 'cate'))) {
$pushs[] = $value;
}
}
}
if (!$pushs) {
Showmsg('no_aim_to_push');
}
require_once PrintEot('ajax');
ajax_footer();