<?php
/**
* @name XERCMS
* @author Arno <[email protected]> [QQ:1328013]
* @version 1.0.0
* @link http://www.XerCMS.com
*/
!defined('XERCMS') && exit('Access Denied');
libs('#XerCMS_base');
class Service_admin_index extends admin
{
function xercms() {
$this->index();
}
function domains() {
Act('domains')->parent = $this;
Act('domains')->load();
}
function vote() {
Act('vote')->parent = $this;
Act('vote')->load();
}
function logout() {
session_destroy();
$this->tips('退出成功',X::$G['urlpath'].'index.php?s=admin');
}
function sql() {
$sql = p('sql');X::$G['do'] = g('d');
if(X::$G['do'] == 'query') {
$sql = stripcslashes($sql);
$sql = explode(";\r\n",$sql);$result = '';
foreach($sql as $val) {
if(empty($val)) {
continue;
}
DB::$debug = true;
$res = DB::query($val);
$result .= '语句:'.$val.'<br/>执行结果:'.($res ? 'OK (影响了 <font style="color:red;font-weight:800">'.DB::affected_rows().'</font> 行)' : mysql_error()).'<br>';
$resultSet = DB::fetch($res);
if(is_array($resultSet)) {
$result .= '<table cellspacing="1" cellpadding="0" class="tab" style="color:#666" ><tbody>';
$result .= '<tr>';
foreach($resultSet as $k=>$v) {
$result .= '<th>'.$k.'</th>';
}
$result .= '</tr>';
$result .= '<tr>';
foreach($resultSet as $k=>$v) {
$result .= '<td>'.$v.'</td>';
}
$result .= '</tr>';$max = 15;$count = 1;
while($res && $resultSet = DB::fetch($res)) {
$result .= '<tr>';
foreach($resultSet as $k=>$v) {
$result .= '<td>'.$v.'</td>';
}
$result .= '</tr>'; $count++;
if($count >= $max)break;
}
$result .= '</tbody></table>';
$result .= '注:最多显示15条结果数。';
}
}
$sql = implode(";\r\n",$sql);X::$G['do'] = '';
}
include_once($this->tpl('xercms.htm'));
}
function player() {
X::$G['do'] = g('d');
if(X::$G['do'] == 'update') {
$id = g('id');
$data[$id] = p('player');
if(!is_numeric($data[$id][2]) || !is_numeric($data[$id][3])) {
$this->tips('请正确填写宽高!');
}
ini('player',$data);
$script = dfile('Assets/player/'.$id.'.default.js');
$player = '';
foreach($data[$id] as $k=>$v) {
$player .= 'xercmsplayer['.$k.'] = \''.strtr($v,array('\\'=>'\\\\','\''=>'\\\'')).'\';'."\r\n";
}
dfile('Assets/player/'.$id.'.config.js',strtr($script,array('{xercms$player}'=>$player)));
$this->tips(11,'?s=admin&a=player&player='.$id);
} else {
$player = g('player','video');
$data = ini('player');
include_once($this->tpl('xercms.htm'));
}
}
function slides() {
$page = (int)g('page');$number = (int)g('number');
$page = $page < 1 ? 1 : $page;$number = ($number < 1 || $number > 30) ? 20 : $number;
$slides = DB::fetch_all('SELECT * FROM xercms_slides ORDER BY mtime DESC LIMIT '.(($page - 1)*$number).','.$number);
include_once($this->tpl('xercms.htm'));
}
function insertSlides() {
$data = p('data');
$data['title'] = strfilter($data['title']);
$data['img'] = strfilter($data['img']);
$data['sign'] = strfilter($data['sign']);
$data['url'] = strtr($data['url'],array('\''=>''));
DB::insert('xercms_slides',array('uid'=>X::$G['uid'],'ctime'=>X::$G['time'],'mtime'=>X::$G['time'],'title'=>$data['title'],'url'=>$data['url'],'img'=>$data['img'],'sign'=>$data['sign']));
$this->tips('操作成功',dreferer());
}
function delSlides() {
$id = (int)g('id');
if($id) {
DB::delete('xercms_slides',array('id'=>$id));
$this->tips('操作成功',dreferer());
} else $this->tips('错误的ID!');
}
function updateSlides() {
$id = (int)g('id');$data = p('data');
$data['title'] = strfilter($data['title']);
$data['img'] = strfilter($data['img']);
$data['extra'] = strfilter($data['extra']);
$data['mtime'] = X::$G['time'];
$data['url'] = strtr($data['url'],array('\''=>''));
DB::update('xercms_slides',$data,'id = '.$id);
$this->tips('操作成功',dreferer());
}
function bakloading() {
$tables = BAK::tables();
$total = 0;
foreach($tables as $v) {
$total += $v['count'];
}
foreach($_POST['bak'] as $k=>$v) {
$bak[] = array('name'=>$k,'count'=>$v);
}
$bak = json_encode($bak);
$time = time();
include_once($this->tpl('xercms.htm'));
}
function bakrestoring() {
$tables = BAK::tables();
$time = (int)$_GET['time'];
$total = 0;
$log = BAK::log($time);
foreach($log as $k=>$v) {
$bak[] = array('name'=>$k,'count'=>$v);
$total += $v;
}
$total += count($bak);
$bak = json_encode($bak);
include_once($this->tpl('xercms.htm'));
}
function bakrestore() {
$name = g('name');$id = g('start');
$dir = (int)$_GET['time'];
$result['msg'] = BAK::restore($name,$id,$dir)? 'OK' : DB::$error;
$result['state'] = 1;
exit(json_encode($result));
}
function bakdel() {
$dir = (int)$_GET['time'];
DIR::del('XerCMS/Data/backup/'.$dir.'/');
$this->tips(11,'?s=admin&a=baklist');
}
function bakload() {
$name = g('name');$start = g('start');
$dir = (int)$_GET['time'];
$result['count'] = BAK::table($name,$start,$dir);
$result['state'] = 1;
exit(json_encode($result));
}
function bak() {
$tables = BAK::tables();
include_once($this->tpl('xercms.htm'));
}
function baklist() {
$baklist = DIR::read('XerCMS/Data/backup');
include_once($this->tpl('xercms.htm'));
}
function nav(){
$act = g('act');
$page = g('page',0);
switch($act) {
case 'del':
$id = (int)g('id');
$nav = DB::result('SELECT * FROM xercms_nav WHERE id = '.$id);
if($nav['parent']) {
$nav['son'] = $nav['son'] < 1 ? 0 : $nav['son'] - 1;
DB::update('xercms_nav',array('son'=>$nav['son']),array('id'=>$nav['parent']));
}
DB::query('DELETE FROM xercms_nav WHERE id = '.$id);
$this->tips(11,'?s=admin&a=nav');
break;
case 'editnavname':
$nav = p('nav');
foreach($nav as $k=>$v) {
if(!empty($v['name'])) {
DB::update('xercms_nav',array('name'=>$v['name'],'order'=>$v['order'],'url'=>$v['url']),'id = '.$k);
}
}
$this->tips(11,'?s=admin&a=nav&parent='.$nav['parent']);
break;
case 'editnav':
$id = (int)g('id');
$parent_nav = DB::select('xercms_nav',array('parent'=>'0'));
$nav = DB::select_first('xercms_nav',array('id'=>$id));
break;
case 'hidenav':
$id = g('id');
DB::update('xercms_nav',array('display'=>0),'id = '.$id);
$this->tips(11);
break;
case 'shownav':
$id = g('id');
DB::update('xercms_nav',array('display'=>1),'id = '.$id);
$this->tips(11);
break;
case 'editsave':
$id = g('id');
$nav = p('nav');
if($id) {
DB::update('xercms_nav',$nav,'id = '.$id);
} else {
DB::insert('xercms_nav',$nav);
if($nav['parent']) {
DB::query('UPDATE xercms_nav SET son = son + 1 WHERE id = \''.$nav['parent'].'\'');
}
}
$this->tips(11,'?s=admin&a=nav&parent='.$nav['parent']);
break;
default:
$parent = (int)g('parent');$parentParent = 0;
if($parent) {
没有合适的资源?快使用搜索试试~ 我知道了~
XerCMS.rar_4 3 2 1_qiye
共749个文件
php:242个
png:113个
gif:101个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 63 浏览量
2022-09-20
09:29:39
上传
评论
收藏 3.53MB RAR 举报
温馨提示
Carry cloud CMS (XerCMS) the enterprise class website that develops for an PHP 1. code concise, two development well 2. template tagging 3. custom model 4., members and forums combine
资源推荐
资源详情
资源评论
收起资源包目录
XerCMS.rar_4 3 2 1_qiye (749个子文件)
127.0.0.1.config 0B
localhost.config 0B
ueditor.css 44KB
ueditor.min.css 34KB
video-js.css 21KB
image.css 19KB
video.css 15KB
attachment.css 15KB
video-js.min.css 11KB
admin.css 9KB
forum.css 8KB
shCoreDefault.css 7KB
default.css 4KB
scrawl.css 4KB
index.v2.css 4KB
install.css 3KB
codemirror.css 3KB
common.css 3KB
charts.css 3KB
background.css 2KB
member.css 2KB
model.css 2KB
forms.css 2KB
archives.css 2KB
emotion.css 2KB
dialogbase.css 2KB
music.css 2KB
base.css 1KB
product.css 1KB
login.css 1KB
edittable.css 1KB
template.css 1KB
index.css 900B
special.css 880B
extends.css 857B
form.css 852B
mobile.css 721B
tips.css 678B
webuploader.css 515B
help.css 395B
mobile.css 380B
iframe.css 42B
Thumbs.db 4KB
vjs.eot 3KB
UEditorSnapscreen.exe 508KB
wface.gif 49KB
jxface2.gif 40KB
yface.gif 28KB
bface.gif 27KB
icons.gif 20KB
file-icons.gif 20KB
file-icons.gif 20KB
tface.gif 19KB
fface.gif 18KB
cface.gif 8KB
loading.gif 5KB
logo.gif 4KB
icons-all.gif 4KB
bg.gif 2KB
videologo.gif 2KB
logo.gif 1KB
loading!150x150.gif 1KB
cancelbutton.gif 1KB
39.gif 1KB
45.gif 1KB
button-bg.gif 1KB
42.gif 1KB
lock.gif 1KB
alignicon.gif 1KB
word.gif 1019B
icon_doc.gif 1012B
icon_psd.gif 1009B
icon_rar.gif 1007B
icon_xls.gif 1005B
icon_mv.gif 1001B
icon_ppt.gif 1001B
icon_pdf.gif 996B
icon_mp3.gif 986B
icon_txt.gif 970B
icon_jpg.gif 950B
icon_exe.gif 949B
icon_chm.gif 923B
40.gif 918B
28.gif 914B
35.gif 889B
31.gif 874B
33.gif 854B
37.gif 853B
29.gif 853B
36.gif 840B
30.gif 836B
27.gif 834B
26.gif 833B
34.gif 832B
41.gif 826B
32.gif 820B
44.gif 809B
48.gif 808B
50.gif 787B
38.gif 787B
共 749 条
- 1
- 2
- 3
- 4
- 5
- 6
- 8
资源评论
御道御小黑
- 粉丝: 61
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功