@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
|
||||
//管理入口
|
||||
|
||||
if(is_file('app/'.$app.'/action/admin/'.$mg.'.php')){
|
||||
include_once 'app/'.$app.'/action/admin/'.$mg.'.php';
|
||||
}else{
|
||||
qiMsg('sorry:no index!');
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
|
||||
switch($ts){
|
||||
|
||||
//列表
|
||||
case "list":
|
||||
|
||||
$arrInfo = $new['home']->findAll('home_info',null,'orderid asc');
|
||||
|
||||
include template('admin/info_list');
|
||||
break;
|
||||
|
||||
//添加
|
||||
case "add":
|
||||
|
||||
include template('admin/info_add');
|
||||
break;
|
||||
|
||||
case "adddo":
|
||||
|
||||
$title = tsTrim($_POST['title']);
|
||||
$content = tsClean($_POST['content']);
|
||||
|
||||
$orderid = tsIntval($_POST['orderid']);
|
||||
|
||||
$new['home']->create('home_info',array(
|
||||
|
||||
'title'=>$title,
|
||||
'content'=>$content,
|
||||
'orderid'=>$orderid,
|
||||
|
||||
));
|
||||
|
||||
header('Location: '.SITE_URL.'index.php?app=home&ac=admin&mg=info&ts=list');
|
||||
|
||||
break;
|
||||
|
||||
//编辑
|
||||
case "edit":
|
||||
|
||||
$infoid = tsIntval($_GET['infoid']);
|
||||
|
||||
$strInfo = $new['home']->find('home_info',array(
|
||||
'infoid'=>$infoid,
|
||||
));
|
||||
|
||||
//$strInfo['content'] = tsDecode($strInfo['content']);
|
||||
|
||||
|
||||
include template('admin/info_edit');
|
||||
|
||||
break;
|
||||
|
||||
case "editdo":
|
||||
|
||||
$infoid = tsIntval($_POST['infoid']);
|
||||
|
||||
$title = tsTrim($_POST['title']);
|
||||
|
||||
$content = tsClean($_POST['content']);
|
||||
|
||||
$orderid = tsIntval($_POST['orderid']);
|
||||
|
||||
$new['home']->update('home_info',array(
|
||||
|
||||
'infoid'=>$infoid,
|
||||
|
||||
),array(
|
||||
|
||||
'title'=>$title,
|
||||
'content'=>$content,
|
||||
'orderid'=>$orderid,
|
||||
|
||||
));
|
||||
|
||||
header('Location: '.SITE_URL.'index.php?app=home&ac=admin&mg=info&ts=list');
|
||||
|
||||
break;
|
||||
|
||||
//删除
|
||||
case "delete":
|
||||
|
||||
$infoid = tsIntval($_GET['infoid']);
|
||||
|
||||
$new['home']->delete('home_info',array(
|
||||
'infoid'=>$infoid,
|
||||
));
|
||||
|
||||
qiMsg('删除成功!');
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
|
||||
switch($ts){
|
||||
//基本配置
|
||||
case "":
|
||||
|
||||
include template("admin/options");
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
|
||||
$title = $TS_SITE['site_subtitle'];
|
||||
include template("index");
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
|
||||
$infoid = tsIntval($_GET['id']);
|
||||
|
||||
if($infoid==0){
|
||||
ts404();
|
||||
}
|
||||
|
||||
$strInfo = $new['home']->find('home_info',array(
|
||||
'infoid'=>$infoid,
|
||||
));
|
||||
|
||||
if($strInfo==''){
|
||||
ts404();
|
||||
}
|
||||
|
||||
$strInfo['title'] = tsTitle($strInfo['title']);
|
||||
$strInfo['content'] = nl2br(tsDecode($strInfo['content']));
|
||||
|
||||
$arrInfo = $new['home']->findAll('home_info',null,'orderid asc');
|
||||
|
||||
$title = $strInfo['title'];
|
||||
include template('info');
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
//插件条件入口
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
|
||||
if(is_file('plugins/'.$app.'/'.$plugin.'/'.$in.'.php')){
|
||||
require_once('plugins/'.$app.'/'.$plugin.'/'.$in.'.php');
|
||||
}else{
|
||||
qiMsg('sorry:no plugin!');
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Administrator
|
||||
* Date: 2017/12/3
|
||||
* Time: 22:10
|
||||
*/
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
|
||||
switch ($ts){
|
||||
case "":
|
||||
|
||||
|
||||
$title = '举报中心';
|
||||
include template('report');
|
||||
break;
|
||||
|
||||
case "do":
|
||||
|
||||
$url = tsTrim($_POST['url']);
|
||||
$content = t($_POST['content']);
|
||||
|
||||
if($url==''){
|
||||
tsNotice('举报链接不能为空');
|
||||
}
|
||||
|
||||
$arrUrl = explode('/',$url);
|
||||
|
||||
$mainUrl = $arrUrl['0'].'/';
|
||||
|
||||
if($mainUrl!=$GLOBALS['TS_SITE']['link_url']){
|
||||
tsNotice('非法操作');
|
||||
}
|
||||
|
||||
|
||||
$new['home']->create('anti_report',array(
|
||||
'url'=>$url,
|
||||
'content'=>$content,
|
||||
'addtime'=>date('Y-m-d H:i:s')
|
||||
));
|
||||
|
||||
tsNotice('举报提交成功!','点击返回',$url);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
|
||||
switch($ts){
|
||||
|
||||
case "":
|
||||
|
||||
$title = '更换主题';
|
||||
|
||||
$arrTheme = tsScanDir('theme');
|
||||
|
||||
include template("theme");
|
||||
|
||||
break;
|
||||
}
|
||||
Reference in New Issue
Block a user