📄 wiki.php
字号:
<?
/*
百科全书插件 for UCH 1.5
版权所有: www.carqi.com 卡奇网——最互动、最娱乐的车友会
作者:Cody service@carqi.com
QQ:779626052
*/
//类别
$gEumsType = array(2=>'发动机', 3=>'汽车底盘', 4=>'车身内饰', 5=>'电子电气', 8=>'汽车概述', 9=>'汽车文化', 10=>'汽车品牌', 11=> '其他' );
include_once('./common.php');
//是否关闭站点
checkclose();
//获取当前用户的空间信息
$space = getspace($_SGLOBAL['supe_uid']);
//允许动作
$dos = array('wiki', 'cp');
//允许的方法
$acs = array(
'wiki' => array('index', 'post', 'view', 'cp','upload'),
'cp' => array('post', 'update', 'del')
);
$do = (!empty($_GET['do']) && in_array($_GET['do'], $dos))? $_GET['do'] : 'wiki';
$ac = (!empty($_GET['ac']) && in_array($_GET['ac'], $acs[$do])) ? $_GET['ac'] : 'index';
if (empty($do)) {
showmessage('no_app_do' );
}
//是否公开
checklogin();//需要登录
//获取空间
if(empty($_SGLOBAL['supe_uid'])) {
ssetcookie('_refer', rawurlencode($_SERVER['REQUEST_URI']));
showmessage('to_login', 'do.php?ac=login', 0);
}
$uid = $_SGLOBAL['supe_uid'];
//更新积分
function updatecredit($uid, $credit, $method='+')
{
global $_SGLOBAL;
$credit = intval($credit);
if (empty($credit)) {
return;
}
$sqlcredit = ($credit > 0) ? " {$method} {$credit} " : " {$method} {$credit} ";
$newcredit = $num * $credit;
$_SGLOBAL['db']->query("UPDATE ".tname('space')." SET credit=credit {$sqlcredit} WHERE uid = $uid ");
//$_SGLOBAL['db']->query("UPDATE ".tname('session')." SET credit=credit {$sqlcredit} WHERE uid = $uid ");
}
//处理
include_once(S_ROOT."./wiki/{$do}_{$ac}.php");
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -