Commit c80a683c by terryshi

update

1 parent ec33b501
Showing 1000 changed files with 3094 additions and 0 deletions

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: admin.php 34285 2013-12-13 03:39:35Z hypowang $
*/
define('IN_ADMINCP', TRUE);
define('NOROBOT', TRUE);
define('ADMINSCRIPT', basename(__FILE__));
define('CURSCRIPT', 'admin');
define('HOOKTYPE', 'hookscript');
define('APPTYPEID', 0);
require './source/class/class_core.php';
require './source/function/function_misc.php';
require './source/function/function_forum.php';
require './source/function/function_admincp.php';
require './source/function/function_cache.php';
$discuz = C::app();
$discuz->init();
$admincp = new discuz_admincp();
$admincp->core = & $discuz;
$admincp->init();
$admincp_actions_founder = array('templates', 'db', 'founder', 'postsplit', 'threadsplit', 'cloudaddons', 'upgrade', 'patch', 'optimizer');
$admincp_actions_normal = array('index', 'setting', 'members', 'admingroup', 'usergroups', 'usertag',
'forums', 'threadtypes', 'threads', 'moderate', 'attach', 'smilies', 'recyclebin', 'recyclebinpost', 'prune', 'grid',
'styles', 'addons', 'plugins', 'tasks', 'magics', 'medals', 'google', 'announce', 'faq', 'ec',
'tradelog', 'jswizard', 'project', 'counter', 'misc', 'adv', 'logs', 'tools', 'portalperm', 'blogrecyclebin',
'checktools', 'search', 'article', 'block', 'blockstyle', 'blockxml', 'portalcategory', 'blogcategory', 'albumcategory', 'topic', 'credits',
'doing', 'group', 'blog', 'feed', 'album', 'pic', 'comment', 'share', 'click', 'specialuser', 'postsplit', 'threadsplit', 'report',
'district', 'diytemplate', 'verify', 'nav', 'domain', 'postcomment', 'tag', 'connect', 'card', 'portalpermission', 'collection', 'membersplit', 'makehtml');
$action = preg_replace('/[^\[A-Za-z0-9_\]]/', '', getgpc('action'));
$operation = preg_replace('/[^\[A-Za-z0-9_\]]/', '', getgpc('operation'));
$do = preg_replace('/[^\[A-Za-z0-9_\]]/', '', getgpc('do'));
$frames = preg_replace('/[^\[A-Za-z0-9_\]]/', '', getgpc('frames'));
lang('admincp');
$lang = & $_G['lang']['admincp'];
$page = max(1, intval(getgpc('page')));
$isfounder = $admincp->isfounder;
if(empty($action) || $frames != null) {
$admincp->show_admincp_main();
} elseif($action == 'logout') {
$admincp->do_admin_logout();
dheader("Location: ./index.php");
} elseif(in_array($action, $admincp_actions_normal) || ($admincp->isfounder && in_array($action, $admincp_actions_founder))) {
if($admincp->allow($action, $operation, $do) || $action == 'index') {
require $admincp->admincpfile($action);
} else {
cpheader();
cpmsg('action_noaccess', '', 'error');
}
} else {
cpheader();
cpmsg('action_noaccess', '', 'error');
}
?>
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: api.php 33591 2013-07-12 06:39:49Z andyzheng $
*/
define('IN_API', true);
define('CURSCRIPT', 'api');
$modarray = array('js' => 'javascript/javascript', 'ad' => 'javascript/advertisement');
$mod = !empty($_GET['mod']) ? $_GET['mod'] : '';
if(empty($mod) || !in_array($mod, array('js', 'ad'))) {
exit('Access Denied');
}
require_once './api/'.$modarray[$mod].'.php';
function loadcore() {
global $_G;
require_once './source/class/class_core.php';
$discuz = C::app();
$discuz->init_cron = false;
$discuz->init_session = false;
$discuz->init();
}
?>
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=gbk" />
<script type="text/javascript">
var querystring = location.search.substr(1);
if(querystring.indexOf('/') != -1) {
var e = querystring.split('/');
var url = '../../admin.php?frames=yes&action=cloudaddons&operation=download&addonids=' + e[0] + '&md5hash=' + e[1] + '&timestamp=' + e[2];
try {
top.location.href = url;
} catch(e) {}
}
</script>
</head>
<body>
</body>
</html>
<?php
if(phpversion() >= '5.3') {
include 'zendcheck53.php';
} else {
include 'zendcheck52.php';
}
?>
\ No newline at end of file
<?php @Zend;
4123;
/*
\ No newline at end of file
<?php @Zend;
3074;
/*
\ No newline at end of file
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: like.php 25510 2011-11-14 02:22:26Z yexinhao $
*/
define('IN_API', true);
define('CURSCRIPT', 'api');
require_once '../../source/class/class_core.php';
$cachelist = array();
$discuz = C::app();
$discuz->init_setting = true;
$discuz->init();
$body = '';
$style = 'body { background: transparent; color: '.$_G['style']['tabletext'].'; font: '.$_G['style']['fontsize'].' '.$_G['style']['font'].'; margin:0; }'.
'a { color: '.$_G['style']['link'].'; text-decoration: none; } a:hover { text-decoration: underline; }';
if($_G['setting']['connect']['like_allow'] && $_G['setting']['connect']['like_url']) {
$style .= '#txQZ { border: medium none; float: left; height:21px; margin-top: 4px; overflow: hidden; width: 110px; }'.
'.vm { vertical-align: middle; }';
$body .= '<iframe id="txQZ" src="'.$_G['setting']['connect']['like_url'].'" class="vm" allowtransparency="true" scrolling="no" border="0" frameborder="0"></iframe>';
}
if($_G['setting']['connect']['turl_allow'] && $_G['setting']['connect']['turl_code']) {
$style .= '#txWB_W1 { background: url("../../static/image/common/weibo.png") no-repeat scroll 0 50% transparent; float: left; line-height: 28px; padding: 0 5px 0 20px; }'.
'#txWB_W1 img { display: none; }'.
'#txWB_W1 b { font-weight: 400; }'.
'#txWB_W1 a { color: '.$_G['style']['highlightlink'].'; }';
$body .= $_G['setting']['connect']['turl_code'];
}
if($style && $body) {
echo '<style>'.$style.'</style><body>'.$body.'</body>';
}
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: google.php 34713 2014-07-14 02:33:03Z hypowang $
*/
@define('IN_API', true);
@define('CURSCRIPT', 'api');
require_once('../../source/class/class_core.php');
require_once('../../source/function/function_home.php');
$cachelist = array();
$discuz = C::app();
$discuz->cachelist = $cachelist;
$discuz->init_cron = false;
$discuz->init_setting = true;
$discuz->init_user = false;
$discuz->init_session = false;
$discuz->init();
$google = new GoogleAPI($discuz);
$google->run();
class GoogleAPI
{
var $core;
var $version = '2.0.0';
function GoogleAPI(&$core) {
$this->core = &$core;
}
function run() {
$this->authcheck();
$method = 'on_'.getgpc('a');
if(method_exists($this, $method)) {
$this->xmlheader();
$this->$method();
$this->xmlfooter();
} else {
$this->error('Unknow command');
}
}
function authcheck() {
$siteuniqueid = C::t('common_setting')->fetch('siteuniqueid');
$auth = md5($siteuniqueid.'DISCUZ*COMSENZ*GOOGLE*API'.substr(time(), 0, 6));
if($auth != getgpc('s')) {
$this->error('Access error');
}
}
function error($message) {
$this->xmlheader();
echo "<error>".$message."</error>";
$this->xmlfooter();
}
function result($message = 'success') {
$this->xmlheader();
echo "<result>".$message."</result>";
$this->xmlfooter();
}
function xmlheader() {
static $isshowed;
if(!$isshowed) {
@header("Content-type: application/xml");
echo "<?xml version=\"1.0\" encoding=\"".CHARSET."\"?>\n<document>\n";
echo "<description>Discuz! API For Google Function</description>\n";
echo "<version>{$this->version}</version>\n";
$isshowed = true;
}
return true;
}
function xmlfooter($halt = true) {
echo "\n</document>\n";
$halt && exit();
}
function on_on() {
C::t('common_setting')->update('google', 1);
$this->result();
}
function on_off() {
C::t('common_setting')->update('google', 0);
$this->result();
}
function on_gtt() {
global $_G;
$tids = explode(',', getgpc('t'));
$msg = getgpc('msg') ? true : false;
$att = getgpc('att') ? true : false;
$posts = getgpc('post') ? explode(',', getgpc('post')) : array();
if($posts) {
$posts[0] = intval($posts[0]);
$posts[1] = intval($posts[1]);
$posts = sprintf('%s , %s', $posts[0], $posts[1]);
}
$xmlcontent .= "<threadsdata>\n";
if(is_array($tids) && !empty($tids)) {
$ftid = $threadlist = $postlist = $attachlist = $pattachlist = array();
foreach ($tids as $tid) {
if(is_numeric($tid)) {
$ftid[] = $tid;
}
}
if($ftid) {
$threads = C::t('forum_thread')->fetch_all_by_tid($ftid);
foreach($threads as $thread) {
$thread['message'] = '';
if($msg) {
if($thread['posttableid']) {
$tablenamelist['forum_post_'.intval($thread['posttableid'])][] = $thread['tid'];
} else {
$tablenamelist['forum_post'][] = $thread['tid'];
}
}
$threadlist[$thread['tid']] = $thread;
}
if($msg) {
foreach($tablenamelist AS $tablename => $tids) {
$pquery = DB::query("SELECT tid, message, pid FROM ".DB::table($tablename)." WHERE tid IN (".dimplode($tids).") AND first=1", 'SILENT');
while($pquery && $post = DB::fetch($pquery)) {
$threadlist[$post['tid']]['message'] = dhtmlspecialchars($post['message']);
if($att) {
$_tid = (string)$post['tid'];
$attachtablename = 'forum_attachment_'.intval($_tid{strlen($_tid)-1});
$aquery = DB::query("SELECT dateline, filename, filesize, attachment, remote, description, readperm, price, isimage, width FROM ".DB::table($attachtablename)." WHERE pid='$post[pid]'");
$attachs = '';
while($aquery && $attach = DB::fetch($aquery)) {
$attach['url'] = (($attach['remote'] ? $_G['setting']['ftp']['attachurl'] : $_G['setting']['attachurl']).'forum/').$attach['attachment'];
unset($attach['attachment'], $attach['remote']);
$attachs .= '<attach>';
foreach($attach as $_k => $_v) {
$attachs .= '<'.$_k.'>'.$_v.'</'.$_k.'>';
}
$attachs .= '</attach>';
$attachlist[$_tid] = $attachs;
}
}
}
if($posts) {
$pquery = DB::query("SELECT tid, pid, authorid, message FROM ".DB::table($tablename)." WHERE tid IN (".dimplode($tids).") AND first=0 LIMIT $posts", 'SILENT');
while($pquery && $post = DB::fetch($pquery)) {
if($att) {
$_tid = (string)$post['tid'];
$attachtablename = 'forum_attachment_'.intval($_tid{strlen($_tid)-1});
$aquery = DB::query("SELECT dateline, filename, filesize, attachment, remote, description, readperm, price, isimage, width FROM ".DB::table($attachtablename)." WHERE pid='$post[pid]'", 'SILENT');
$attachs = '';
while($aquery && $attach = DB::fetch($aquery)) {
$attach['url'] = (($attach['remote'] ? $_G['setting']['ftp']['attachurl'] : $_G['setting']['attachurl']).'forum/').$attach['attachment'];
unset($attach['attachment'], $attach['remote']);
$attachs .= '<attach>';
foreach($attach as $_k => $_v) {
$attachs .= '<'.$_k.'>'.$_v.'</'.$_k.'>';
}
$attachs .= '</attach>';
}
}
$postlist[$post['tid']] .= "<post>\n".
" <pid>".$post['pid']."</pid>\n".
" <authorid>".$post['authorid']."</authorid>\n".
" <message>".dhtmlspecialchars($post['message'])."</message>\n".
($attachs ? " <attachments>$attachs</attachments>\n" : '').
"</post>\n";
}
}
}
unset($tablenamelist);
}
foreach($threadlist AS $tid => $thread) {
$xmlcontent .=
" <thread>\n".
" <tid>$thread[tid]</tid>\n".
" <fid>$thread[fid]</fid>\n".
" <authorid>$thread[authorid]</authorid>\n".
" <subject>$thread[subject]</subject>\n".
" <views>$thread[views]</views>\n".
" <replies>$thread[replies]</replies>\n".
" <special>$thread[replies]</special>\n".
" <posttableid>$thread[posttableid]</posttableid>\n".
" <dateline>$thread[dateline]</dateline>\n".
" <lastpost>$thread[lastpost]</lastpost>\n".
($msg ? " <message>$thread[message]</message>\n" : '').
($attachlist[$tid] ? " <attachments>$attachlist[$tid]</attachments>\n" : '').
" </thread>\n".
($postlist[$tid] ? " <posts>$postlist[$tid]</posts>\n" : '');
}
}
}
$xmlcontent .= "</threadsdata>";
echo $xmlcontent;
}
function on_gts() {
$xmlcontent = '';
$threads = C::t('forum_thread')->count();
$posts = 0;
loadcache('posttableids');
if($_G['cache']['posttableids']) {
foreach($_G['cache']['posttableids'] AS $tableid) {
$posts += DB::result_first("SELECT COUNT(*) FROM ".DB::table(getposttable($tableid))." LIMIT 1");
}
}
$members = C::t('common_member')->count();
$settings = C::t('common_setting')->fetch_all(array('bbname', 'historyposts'));
$bbname = $settings['bbname'];
$yesterdayposts = $settings['historyposts'];
if(!empty($yesterdayposts)) {
$yesterdayposts = explode("\t", $yesterdayposts);
$yestoday = intval($yesterdayposts[0]);
$mostpost = intval($yesterdayposts[1]);
} else {
$yestoday = $mostpost = 0;
}
$xmlcontent .= "<sitedata>\n".
" <bbname>".dhtmlspecialchars($bbname)."</bbname>\n".
" <threads>$threads</threads>\n".
" <posts>$posts</posts>\n".
" <members>$members</members>\n".
" <yesterdayposts>$yestoday</yesterdayposts>\n".
" <mostposts>$mostpost</mostposts>\n".
"</sitedata>\n";
echo $xmlcontent;
echo "<forumdata>\n";
$query = C::t('forum_forum')->fetch_all_forum_ignore_access();
foreach($query as $forum) {
echo " <$forum[type]>\n".
" <fid>$forum[fid]</fid>\n".
" <fup>$forum[fup]</fup>\n".
" <name>".dhtmlspecialchars($forum['name'])."</name>\n".
" <description>".dhtmlspecialchars($forum['description'])."</description>\n".
" <threads>$forum[threads]</threads>\n".
" <posts>$forum[posts]</posts>\n".
" <todayposts>$forum[todayposts]</todayposts>\n".
" </$forum[type]>\n";
}
echo "</forumdata>";
}
}
?>
\ No newline at end of file
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: advertisement.php 25246 2011-11-02 03:34:53Z zhangguosheng $
*/
header('Expires: '.gmdate('D, d M Y H:i:s', time() + 60).' GMT');
if(!defined('IN_API')) {
exit('document.write(\'Access Denied\')');
}
loadcore();
$adid = $_GET['adid'];
$data = adshow($adid);
echo 'document.write(\''.preg_replace("/\r\n|\n|\r/", '\n', addcslashes($data, "'\\")).'\');';
?>
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: javascript.php 25246 2011-11-02 03:34:53Z zhangguosheng $
*/
header('Expires: '.gmdate('D, d M Y H:i:s', time() + 60).' GMT');
if(!defined('IN_API')) {
exit('document.write(\'Access Denied\')');
}
loadcore();
include_once libfile('function/block');
loadcache('blockclass');
$bid = intval($_GET['bid']);
block_get_batch($bid);
$data = block_fetch_content($bid, true);
$search = "/(href|src)\=(\"|')(?![fhtps]+\:)(.*?)\\2/i";
$replace = "\\1=\\2$_G[siteurl]\\3\\2";
$data = preg_replace($search, $replace, $data);
echo 'document.write(\''.preg_replace("/\r\n|\n|\r/", '\n', addcslashes($data, "'\\")).'\');';
?>
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=gbk" />
<script language="javascript" type="text/javascript" src="http://static.manyou.com/scripts/my_iframe.js"></script>
<script language="javascript">
var channel = new MyXD.Channel();
</script>
</head>
<body>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<script language="javascript" type="text/javascript" src="http://discuz.gtimg.cn/cloud/scripts/discuz_channel.js" defer="defer" charset="utf-8"></script>
</head>
<body>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=GBK">
<script type="text/javascript" src="http://widgets.manyou.com/misc/scripts/ab.js" charset="UTF-8"></script>
</head>
<body onload="MYABC.onCBPageLoad()">
</body>
</html>
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: my.php 34170 2013-10-28 02:58:29Z nemohou $
*/
define('IN_API', true);
define('CURSCRIPT', 'api');
define('DISABLEDEFENSE', true);
define('DISABLEXSSCHECK', true);
require_once('../../source/class/class_core.php');
require_once('../../source/function/function_home.php');
$cachelist = array();
$discuz = C::app();
$discuz->cachelist = $cachelist;
$discuz->init_cron = false;
$discuz->init_setting = true;
$discuz->init_user = false;
$discuz->init_session = false;
$discuz->init();
$siteId = $_G['setting']['my_siteid'];
$siteKey = $_G['setting']['my_sitekey'];
$timezone = $_G['setting']['timeoffset'];
$language = $_SC['language'] ? $_SC['language'] : 'zh_CN';
$version = $_G['setting']['version'];
$myAppStatus = $_G['setting']['my_app_status'];
$mySearchStatus = $_G['setting']['my_search_status'];
$my = Cloud::loadClass('Service_Server_My', array($siteId, $siteKey, $timezone, $version, CHARSET, $language, $myAppStatus, $mySearchStatus));
$my->run();
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: index.php 33969 2013-09-10 08:32:14Z nemohou $
*/
if(!empty($_SERVER['QUERY_STRING'])) {
$plugin = !empty($_GET['oem']) ? 'mobileoem' : 'mobile';
$dir = '../../source/plugin/'.$plugin.'/';
chdir($dir);
if((isset($_GET['check']) && $_GET['check'] == 'check' || $_SERVER['QUERY_STRING'] == 'check') && is_file('check.php')) {
require_once 'check.php';
} elseif(is_file('mobile.php')) {
require_once 'mobile.php';
}
}
?>
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: index.php 23508 2011-07-21 06:34:40Z cnteacher $
*/
define('IN_API', true);
define('CURSCRIPT', 'api_mserver');
define('APPTYPEID', 200);
$_ENV['remote'] = new discuz_remote();
$_ENV['remote']->init();
$_ENV['remote']->loadservice();
class discuz_remote {
var $mod;
var $modobj;
var $core;
function init() {
require_once('../../source/class/class_core.php');
$cachelist = array();
$this->core = C::app();
$this->core->cachelist = $cachelist;
$this->core->init_setting = true;
$this->core->init_cron = false;
$this->core->init_user = false;
$this->core->init_session = false;
$this->core->init_misc = false;
$this->core->init_mobile = false;
$this->core->init();
define('SERVICE_DIR', getglobal('config/remote/dir') ? getglobal('config/remote/dir') : 'remote');
$this->core->reject_robot();
if (empty($_GET['mod']) || preg_match('/[^0-9a-z]/i', $_GET['mod'])) {
$this->mod = 'index';
} else {
$this->mod = $_GET['mod'];
}
}
function loadservice() {
if(!$this->core->config['remote']['on']) {
remote_service::error(1, 'remote service is down');
}
if(!$this->core->config['remote']['appkey']) {
remote_service::error(1, 'remote service need a appkey, please edit you config.global.php');
}
if ($this->mod != 'index') {
$sign = $_GET['sign'];
unset($_GET['sign']);
if (empty($sign) || $sign != $this->sign($_GET)) {
}
}
if(!$this->check_timestamp()) {
remote_service::error(5, 'your request is time out');
}
$modfile = DISCUZ_ROOT . './api/' . SERVICE_DIR . '/mod/mod_' . $this->mod . '.php';
if (!is_file($modfile)) {
remote_service::error(3, 'mod file is missing');
}
require $modfile;
$classname = 'mod_'.$this->mod;
if(class_exists($classname)) {
$service = new $classname;
$service->run();
}
}
function check_timestamp()
{
if(empty($_GET['timestamp'])) {
return 1;
}
$ttl = abs(empty($_GET['ttl']) ? 600 : $_GET['ttl']);
$check = abs(TIMESTAMP - $_GET['timestamp']);
return $check > $ttl ? 0 : 1;
}
function sign($arg) {
$str = '';
foreach ($arg as $k => $v) {
$str .= $k . '=' . $v . '&';
}
return md5($str . getglobal('config/remote/appkey'));
}
}
class remote_service {
var $version = '1.0.0';
var $config;
function remote_service() {
$this->config = getglobal('config/remote');
}
function run() {
remote_service::success('service is done.');
}
function error($code, $msg) {
$code = sprintf("%04d", $code);
echo $code.':'.ucfirst($msg);
exit();
}
function success($msg) {
remote_service::error(0, $msg);
}
}
?>
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: mod_cron.php 30364 2012-05-24 07:43:27Z zhangguosheng $
*/
if(!defined('IN_DISCUZ')) {
exit('Access Denied');
}
class mod_cron extends remote_service
{
function run() {
if(!$this->config['cron']) {
$this->error(100, 'cron service is off. Please check "config.global.php" on your webserver folder.');
}
$discuz = C::app();
$discuz->initated = false;
$discuz->init_db = false;
$discuz->init_setting = true;
$discuz->init_user = false;
$discuz->init_session = false;
$discuz->init_misc = false;
$discuz->init_mobile = false;
$discuz->init_cron = true;
$discuz->init();
$this->success('Cron work is done');
}
}
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: mod_index.php 30462 2012-05-30 03:27:10Z zhangguosheng $
*/
if(!defined('IN_DISCUZ')) {
exit('Access Denied');
}
class mod_index extends remote_service {
var $config;
function mod_index() {
parent::remote_service();
}
function run() {
$this->success('Discuz! Remote Service API '.$this->version);
}
}
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: notify_credit.php 34251 2013-11-25 03:10:11Z nemohou $
*/
define('IN_API', true);
define('CURSCRIPT', 'api');
define('DISABLEXSSCHECK', true);
require '../../source/class/class_core.php';
require '../../source/function/function_forum.php';
$discuz = C::app();
$discuz->init();
$apitype = empty($_GET['attach']) || !preg_match('/^[a-z0-9]+$/i', $_GET['attach']) ? 'alipay' : $_GET['attach'];
require_once DISCUZ_ROOT.'./api/trade/api_'.$apitype.'.php';
$PHP_SELF = $_SERVER['PHP_SELF'];
$_G['siteurl'] = dhtmlspecialchars('http://'.$_SERVER['HTTP_HOST'].preg_replace("/\/+(api\/trade)?\/*$/i", '', substr($PHP_SELF, 0, strrpos($PHP_SELF, '/'))).'/');
$notifydata = trade_notifycheck('credit');
if($notifydata['validator']) {
$orderid = $notifydata['order_no'];
$postprice = $notifydata['price'];
$order = C::t('forum_order')->fetch($orderid);
$order = array_merge($order, C::t('common_member')->fetch_by_username($order['uid']));
if($order && floatval($postprice) == floatval($order['price']) && ($apitype == 'tenpay' || strtolower($_G['setting']['ec_account']) == strtolower($_REQUEST['seller_email']))) {
if($order['status'] == 1) {
C::t('forum_order')->update($orderid, array('status' => '2', 'buyer' => "$notifydata[trade_no]\t$apitype", 'confirmdate' => $_G['timestamp']));
updatemembercount($order['uid'], array($_G['setting']['creditstrans'] => $order['amount']), 1, 'AFD', $order['uid']);
updatecreditbyaction($action, $uid = 0, $extrasql = array(), $needle = '', $coef = 1, $update = 1, $fid = 0);
C::t('forum_order')->delete_by_submitdate($_G['timestamp']-60*86400);
$submitdate = dgmdate($order['submitdate']);
$confirmdate = dgmdate(TIMESTAMP);
notification_add($order['uid'], 'credit', 'addfunds', array(
'orderid' => $order['orderid'],
'price' => $order['price'],
'value' => $_G['setting']['extcredits'][$_G['setting']['creditstrans']]['title'].' '.$order['amount'].' '.$_G['setting']['extcredits'][$_G['setting']['creditstrans']]['unit']
), 1);
}
}
}
if($notifydata['location']) {
$url = rawurlencode('home.php?mod=spacecp&ac=credit');
if($apitype == 'tenpay') {
echo <<<EOS
<meta name="TENCENT_ONLINE_PAYMENT" content="China TENCENT">
<html>
<body>
<script language="javascript" type="text/javascript">
window.location.href='$_G[siteurl]forum.php?mod=misc&action=paysucceed';
</script>
</body>
</html>
EOS;
} else {
dheader('location: '.$_G['siteurl'].'forum.php?mod=misc&action=paysucceed');
}
} else {
exit($notifydata['notify']);
}
?>
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: notify_invite.php 34251 2013-11-25 03:10:11Z nemohou $
*/
define('IN_API', true);
define('CURSCRIPT', 'api');
define('DISABLEXSSCHECK', true);
require '../../source/class/class_core.php';
require '../../source/function/function_forum.php';
$discuz = C::app();
$discuz->init();
$apitype = empty($_GET['attach']) || !preg_match('/^[a-z0-9]+$/i', $_GET['attach']) ? 'alipay' : $_GET['attach'];
require_once DISCUZ_ROOT.'./api/trade/api_'.$apitype.'.php';
$PHP_SELF = $_SERVER['PHP_SELF'];
$_G['siteurl'] = dhtmlspecialchars('http://'.$_SERVER['HTTP_HOST'].preg_replace("/\/+(api\/trade)?\/*$/i", '', substr($PHP_SELF, 0, strrpos($PHP_SELF, '/'))).'/');
$notifydata = trade_notifycheck('invite');
if($notifydata['validator']) {
$orderid = $notifydata['order_no'];
$postprice = $notifydata['price'];
$order = C::t('forum_order')->fetch($orderid);
if($order && floatval($postprice) == floatval($order['price']) && ($apitype == 'tenpay' || $_G['setting']['ec_account'] == $_REQUEST['seller_email'])) {
if($order['status'] == 1) {
C::t('forum_order')->update($orderid, array('status' => '2', 'buyer' => "$notifydata[trade_no]\t$apitype", 'confirmdate' => $_G['timestamp']));
$codes = $codetext = array();
$dateline = TIMESTAMP;
for($i=0; $i<$order['amount']; $i++) {
$code = strtolower(random(6));
$codetext[] = $code;
$codes[] = "('0', '$code', '$dateline', '".($_G['group']['maxinviteday']?($_G['timestamp']+$_G['group']['maxinviteday']*24*3600):$_G['timestamp']+86400*10)."', '$order[email]', '$_G[clientip]', '$orderid')";
$invitedata = array(
'uid' => 0,
'code' => $code,
'dateline' => $dateline,
'endtime' => $_G['group']['maxinviteday'] ? ($_G['timestamp']+$_G['group']['maxinviteday']*24*3600) : $_G['timestamp']+86400*10,
'email' => $order['email'],
'inviteip' => $_G['clientip'],
'orderid' => $orderid
);
C::t('common_invite')->insert($invitedata);
}
C::t('forum_order')->delete_by_submitdate($_G['timestamp']-60*86400);
$submitdate = dgmdate($order['submitdate']);
$confirmdate = dgmdate(TIMESTAMP);
if(!function_exists('sendmail')) {
include libfile('function/mail');
}
$add_member_subject = $_G['setting']['bbname'].' - '.lang('forum/misc', 'invite_payment');
$add_member_message = lang('email', 'invite_payment_email_message', array(
'orderid' => $order['orderid'],
'codetext' => implode('<br />', $codetext),
'siteurl' => $_G['siteurl'],
'bbname' => $_G['setting']['bbname'],
));
if(!sendmail($order['email'], $add_member_subject, $add_member_message)) {
runlog('sendmail', "$order[email] sendmail failed.");
}
}
}
}
if($notifydata['location']) {
if($apitype == 'tenpay') {
echo <<<EOS
<meta name="TENCENT_ONLINE_PAYMENT" content="China TENCENT">
<html>
<body>
<script language="javascript" type="text/javascript">
window.location.href='$_G[siteurl]misc.php?mod=buyinvitecode&action=paysucceed&orderid=$orderid';
</script>
</body>
</html>
EOS;
} else {
dheader('location: '.$_G['siteurl'].'misc.php?mod=buyinvitecode&action=paysucceed&orderid='.$orderid);
}
} else {
exit($notifydata['notify']);
}
?>
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: notify_trade.php 34251 2013-11-25 03:10:11Z nemohou $
*/
define('IN_API', true);
define('CURSCRIPT', 'api');
define('DISABLEXSSCHECK', true);
require '../../source/class/class_core.php';
require '../../source/function/function_forum.php';
$discuz = C::app();
$discuz->init();
$apitype = empty($_GET['attach']) || !preg_match('/^[a-z0-9]+$/i', $_GET['attach']) ? 'alipay' : $_GET['attach'];
require_once DISCUZ_ROOT.'./api/trade/api_' . $apitype . '.php';
$PHP_SELF = $_SERVER['PHP_SELF'];
$_G['siteurl'] = dhtmlspecialchars('http://'.$_SERVER['HTTP_HOST'].preg_replace("/\/+(api\/trade)?\/*$/i", '', substr($PHP_SELF, 0, strrpos($PHP_SELF, '/'))).'/');
$notifydata = trade_notifycheck('trade');
if($notifydata['validator']) {
$orderid = $notifydata['order_no'];
if($orderid) {
$tradelog = C::t('forum_tradelog')->fetch($orderid);
if($tradelog && $tradelog['status'] != STATUS_TRADE_SUCCESS && $tradelog['status'] != STATUS_REFUND_CLOSE && ($apitype == 'tenpay' || $tradelog['selleraccount'] == $_REQUEST['seller_email'])) {
$status = $notifydata['status'];
C::t('forum_tradelog')->update($orderid, array(
'status' => $status,
'lastupdate' => $_G['timestamp'],
'tradeno' => $notifydata['trade_no']
));
if($status != $tradelog['status']) {
if($status == STATUS_SELLER_SEND) {
notification_add($tradelog['sellerid'], 'goods', 'trade_seller_send', array(
'buyerid' => $tradelog['buyerid'],
'buyer' => $tradelog['buyer'],
'orderid' => $orderid,
'subject' => $tradelog['subject']
));
} elseif($status == STATUS_WAIT_BUYER) {
notification_add($tradelog['buyerid'], 'goods', 'trade_buyer_confirm', array(
'sellerid' => $tradelog['sellerid'],
'seller' => $tradelog['seller'],
'orderid' => $orderid,
'subject' => $tradelog['subject']
));
} elseif($status == STATUS_TRADE_SUCCESS) {
if($_G['setting']['creditstransextra'][5] != -1 && $tradelog['basecredit']) {
$netcredit = round($tradelog['number'] * $tradelog['basecredit'] * (1 - $_G['setting']['creditstax']));
updatemembercount($tradelog['sellerid'], array($_G['setting']['creditstransextra'][5] => $netcredit));
} else {
$netcredit = 0;
}
C::t('forum_trade')->update($tradelog['tid'], $tradelog['pid'], array('lastbuyer' => $tradelog['buyer'], 'lastupdate' => $_G['timestamp']));
C::t('forum_trade')->update_counter($tradelog['tid'], $tradelog['pid'], $tradelog['number'], $tradelog['price'], $netcredit);
updatecreditbyaction('tradefinished', $tradelog['sellerid']);
updatecreditbyaction('tradefinished', $tradelog['buyerid']);
notification_add($tradelog['sellerid'], 'goods', 'trade_success', array(
'orderid' => $orderid,
'subject' => $tradelog['subject']
));
notification_add($tradelog['buyerid'], 'goods', 'trade_success', array(
'orderid' => $orderid,
'subject' => $tradelog['subject']
));
} elseif($status == STATUS_REFUND_CLOSE) {
C::t('forum_trade')->update_counter($tradelog['tid'], $tradelog['pid'], 0, 0, 0, $tradelog['number']);
notification_add($tradelog['sellerid'], 'goods', 'trade_fefund_success', array(
'orderid' => $orderid,
'subject' => $tradelog['subject']
));
notification_add($tradelog['buyerid'], 'goods', 'trade_fefund_success', array(
'orderid' => $orderid,
'subject' => $tradelog['subject']
));
if($_G['setting']['creditstrans'] && $tradelog['buyerid']) {
updatemembercount($tradelog['buyerid'], array($_G['setting']['creditstrans'] => $tradelog['buyercredits']));
}
if($_G['setting']['creditstransextra'][5] != -1 && $tradelog['basecredit'] && $tradelog['buyerid']) {
$credit = $tradelog['number'] * $tradelog['basecredit'];
updatemembercount($tradelog['buyerid'], array($_G['setting']['creditstransextra'][5] => $credit));
}
}
}
}
}
}
if($notifydata['location']) {
dheader('location: '.$_G['siteurl'].'forum.php?mod=misc&action=paysucceed&orderid='.$orderid);
} else {
exit($notifydata['notify']);
}
?>
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: index.php 17587 2010-10-25 01:25:10Z monkey $
*/
define('IN_ARCHIVER', 1);
chdir('../');
$querystring = $_SERVER['QUERY_STRING'];
if(!empty($_GET['action'])) {
$querystring = $_GET['action'].'-'.$_GET['value'];
}
if(substr($querystring, 0, 3) == 'fid') {
$_GET['mod'] = 'forumdisplay';
$_GET['fid'] = intval(substr($querystring, 4));
} elseif(substr($querystring, 0, 3) == 'tid') {
$_GET['mod'] = 'viewthread';
$_GET['tid'] = intval(substr($querystring, 4));
}
include 'forum.php';
?>
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: config_global_default.php 34020 2013-09-22 05:48:16Z nemohou $
*/
$_config = array();
// ---------------------------- CONFIG DB ----------------------------- //
// ---------------------------- 数据库相关设置---------------------------- //
/**
* 数据库主服务器设置, 支持多组服务器设置, 当设置多组服务器时, 则会根据分布式策略使用某个服务器
* @example
* $_config['db']['1']['dbhost'] = 'localhost'; // 服务器地址
* $_config['db']['1']['dbuser'] = 'root'; // 用户
* $_config['db']['1']['dbpw'] = 'root';// 密码
* $_config['db']['1']['dbcharset'] = 'gbk';// 字符集
* $_config['db']['1']['pconnect'] = '0';// 是否持续连接
* $_config['db']['1']['dbname'] = 'x1';// 数据库
* $_config['db']['1']['tablepre'] = 'pre_';// 表名前缀
*
* $_config['db']['2']['dbhost'] = 'localhost';
* ...
*
*/
$_config['db'][1]['dbhost'] = 'localhost';
$_config['db'][1]['dbuser'] = 'root';
$_config['db'][1]['dbpw'] = 'root';
$_config['db'][1]['dbcharset'] = 'gbk';
$_config['db'][1]['pconnect'] = 0;
$_config['db'][1]['dbname'] = 'ultrax';
$_config['db'][1]['tablepre'] = 'pre_';
/**
* 数据库从服务器设置( slave, 只读 ), 支持多组服务器设置, 当设置多组服务器时, 系统根据每次随机使用
* @example
* $_config['db']['1']['slave']['1']['dbhost'] = 'localhost';
* $_config['db']['1']['slave']['1']['dbuser'] = 'root';
* $_config['db']['1']['slave']['1']['dbpw'] = 'root';
* $_config['db']['1']['slave']['1']['dbcharset'] = 'gbk';
* $_config['db']['1']['slave']['1']['pconnect'] = '0';
* $_config['db']['1']['slave']['1']['dbname'] = 'x1';
* $_config['db']['1']['slave']['1']['tablepre'] = 'pre_';
* $_config['db']['1']['slave']['1']['weight'] = '0'; //权重:数据越大权重越高
*
* $_config['db']['1']['slave']['2']['dbhost'] = 'localhost';
* ...
*
*/
$_config['db']['1']['slave'] = array();
//启用从服务器的开关
$_config['db']['slave'] = false;
/**
* 数据库 分布部署策略设置
*
* @example 将 common_member 部署到第二服务器, common_session 部署在第三服务器, 则设置为
* $_config['db']['map']['common_member'] = 2;
* $_config['db']['map']['common_session'] = 3;
*
* 对于没有明确声明服务器的表, 则一律默认部署在第一服务器上
*
*/
$_config['db']['map'] = array();
/**
* 数据库 公共设置, 此类设置通常对针对每个部署的服务器
*/
$_config['db']['common'] = array();
/**
* 禁用从数据库的数据表, 表名字之间使用逗号分割
*
* @example common_session, common_member 这两个表仅从主服务器读写, 不使用从服务器
* $_config['db']['common']['slave_except_table'] = 'common_session, common_member';
*
*/
$_config['db']['common']['slave_except_table'] = '';
/**
* 内存服务器优化设置
* 以下设置需要PHP扩展组件支持,其中 memcache 优先于其他设置,
* 当 memcache 无法启用时,会自动开启另外的两种优化模式
*/
//内存变量前缀, 可更改,避免同服务器中的程序引用错乱
$_config['memory']['prefix'] = 'discuz_';
/* reids设置, 需要PHP扩展组件支持, timeout参数的作用没有查证 */
$_config['memory']['redis']['server'] = '';
$_config['memory']['redis']['port'] = 6379;
$_config['memory']['redis']['pconnect'] = 1;
$_config['memory']['redis']['timeout'] = 0;
$_config['memory']['redis']['requirepass'] = '';
/**
* 是否使用 Redis::SERIALIZER_IGBINARY选项,需要igbinary支持,windows下测试时请关闭,否则会出>现错误Reading from client: Connection reset by peer
* 支持以下选项,默认使用PHP的serializer
* [重要] 该选项已经取代原来的 $_config['memory']['redis']['igbinary'] 选项
* Redis::SERIALIZER_IGBINARY =2
* Redis::SERIALIZER_PHP =1
* Redis::SERIALIZER_NONE =0 //则不使用serialize,即无法保存array
*/
$_config['memory']['redis']['serializer'] = 1;
$_config['memory']['memcache']['server'] = ''; // memcache 服务器地址
$_config['memory']['memcache']['port'] = 11211; // memcache 服务器端口
$_config['memory']['memcache']['pconnect'] = 1; // memcache 是否长久连接
$_config['memory']['memcache']['timeout'] = 1; // memcache 服务器连接超时
$_config['memory']['apc'] = 1; // 启动对 apc 的支持
$_config['memory']['xcache'] = 1; // 启动对 xcache 的支持
$_config['memory']['eaccelerator'] = 1; // 启动对 eaccelerator 的支持
$_config['memory']['wincache'] = 1; // 启动对 wincache 的支持
// 服务器相关设置
$_config['server']['id'] = 1; // 服务器编号,多webserver的时候,用于标识当前服务器的ID
// 附件下载相关
//
// 本地文件读取模式; 模式2为最节省内存方式,但不支持多线程下载
// 1=fread 2=readfile 3=fpassthru 4=fpassthru+multiple
$_config['download']['readmod'] = 2;
// 是否启用 X-Sendfile 功能(需要服务器支持)0=close 1=nginx 2=lighttpd 3=apache
$_config['download']['xsendfile']['type'] = 0;
// 启用 nginx X-sendfile 时,论坛附件目录的虚拟映射路径,请使用 / 结尾
$_config['download']['xsendfile']['dir'] = '/down/';
// 页面输出设置
$_config['output']['charset'] = 'gbk'; // 页面字符集
$_config['output']['forceheader'] = 1; // 强制输出页面字符集,用于避免某些环境乱码
$_config['output']['gzip'] = 0; // 是否采用 Gzip 压缩输出
$_config['output']['tplrefresh'] = 1; // 模板自动刷新开关 0=关闭, 1=打开
$_config['output']['language'] = 'zh_cn'; // 页面语言 zh_cn/zh_tw
$_config['output']['staticurl'] = 'static/'; // 站点静态文件路径,“/”结尾
$_config['output']['ajaxvalidate'] = 0; // 是否严格验证 Ajax 页面的真实性 0=关闭,1=打开
$_config['output']['iecompatible'] = 0; // 页面 IE 兼容模式
// COOKIE 设置
$_config['cookie']['cookiepre'] = 'discuz_'; // COOKIE前缀
$_config['cookie']['cookiedomain'] = ''; // COOKIE作用域
$_config['cookie']['cookiepath'] = '/'; // COOKIE作用路径
// 站点安全设置
$_config['security']['authkey'] = 'asdfasfas'; // 站点加密密钥
$_config['security']['urlxssdefend'] = true; // 自身 URL XSS 防御
$_config['security']['attackevasive'] = 0; // CC 攻击防御 1|2|4|8
$_config['security']['querysafe']['status'] = 1; // 是否开启SQL安全检测,可自动预防SQL注入攻击
$_config['security']['querysafe']['dfunction'] = array('load_file','hex','substring','if','ord','char');
$_config['security']['querysafe']['daction'] = array('@','intooutfile','intodumpfile','unionselect','(select', 'unionall', 'uniondistinct');
$_config['security']['querysafe']['dnote'] = array('/*','*/','#','--','"');
$_config['security']['querysafe']['dlikehex'] = 1;
$_config['security']['querysafe']['afullnote'] = 0;
$_config['admincp']['founder'] = '1'; // 站点创始人:拥有站点管理后台的最高权限,每个站点可以设置 1名或多名创始人
// 可以使用uid,也可以使用用户名;多个创始人之间请使用逗号“,”分开;
$_config['admincp']['forcesecques'] = 0; // 管理人员必须设置安全提问才能进入系统设置 0=否, 1=是[安全]
$_config['admincp']['checkip'] = 1; // 后台管理操作是否验证管理员的 IP, 1=是[安全], 0=否。仅在管理员无法登陆后台时设置 0。
$_config['admincp']['runquery'] = 0; // 是否允许后台运行 SQL 语句 1=是 0=否[安全]
$_config['admincp']['dbimport'] = 1; // 是否允许后台恢复论坛数据 1=是 0=否[安全]
/**
* 系统远程调用功能模块
*/
// 远程调用: 总开关 0=关 1=开
$_config['remote']['on'] = 0;
// 远程调用: 程序目录名. 出于安全考虑,您可以更改这个目录名, 修改完毕, 请手工修改程序的实际目录
$_config['remote']['dir'] = 'remote';
// 远程调用: 通信密钥. 用于客户端和本服务端的通信加密. 长度不少于 32 位
// 默认值是 $_config['security']['authkey'] 的 md5, 您也可以手工指定
$_config['remote']['appkey'] = md5($_config['security']['authkey']);
// 远程调用: 开启外部 cron 任务. 系统内部不再执行cron, cron任务由外部程序激活
$_config['remote']['cron'] = 0;
// $_GET|$_POST的兼容处理,0为关闭,1为开启;开启后即可使用$_G['gp_xx'](xx为变量名,$_GET和$_POST集合的所有变量名),值为已经addslashes()处理过
$_config['input']['compatible'] = 1;
?>
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: config_ucenter_default.php 11023 2010-05-20 02:23:09Z monkey $
*/
// ============================================================================
define('UC_CONNECT', 'mysql'); // 连接 UCenter 的方式: mysql/NULL, 默认为空时为 fscoketopen(), mysql 是直接连接的数据库, 为了效率, 建议采用 mysql
// 数据库相关 (mysql 连接时)
define('UC_DBHOST', 'localhost'); // UCenter 数据库主机
define('UC_DBUSER', 'root'); // UCenter 数据库用户名
define('UC_DBPW', 'root'); // UCenter 数据库密码
define('UC_DBNAME', 'ucenter'); // UCenter 数据库名称
define('UC_DBCHARSET', 'gbk'); // UCenter 数据库字符集
define('UC_DBTABLEPRE', '`ucenter`.uc_'); // UCenter 数据库表前缀
define('UC_DBCONNECT', '0'); // UCenter 数据库持久连接 0=关闭, 1=打开
// 通信相关
define('UC_KEY', 'yeN3g9EbNfiaYfodV63dI1j8Fbk5HaL7W4yaW4y7u2j4Mf45mfg2v899g451k576'); // 与 UCenter 的通信密钥, 要与 UCenter 保持一致
define('UC_API', 'http://localhost/ucenter/branches/1.5.0/server'); // UCenter 的 URL 地址, 在调用头像时依赖此常量
define('UC_CHARSET', 'gbk'); // UCenter 的字符集
define('UC_IP', '127.0.0.1'); // UCenter 的 IP, 当 UC_CONNECT 为非 mysql 方式时, 并且当前应用服务器解析域名有问题时, 请设置此值
define('UC_APPID', '1'); // 当前应用的 ID
// ============================================================================
define('UC_PPP', '20');
?>
\ No newline at end of file
\ No newline at end of file
<?php
/*
[Discuz!] (C)2001-2009 Comsenz Inc.
This is NOT a freeware, use is subject to license terms
$Id: connect.php 26424 2011-12-13 03:02:20Z zhouxiaobo $
*/
if($_GET['mod'] == 'register') {
$_GET['mod'] = 'connect';
$_GET['action'] = 'register';
require_once 'member.php';
exit;
}
define('APPTYPEID', 126);
define('CURSCRIPT', 'connect');
require_once './source/class/class_core.php';
require_once './source/function/function_home.php';
$discuz = C::app();
$mod = $discuz->var['mod'];
$discuz->init();
if(!in_array($mod, array('config', 'login', 'feed', 'check', 'user'))) {
showmessage('undefined_action');
}
if(!$_G['setting']['connect']['allow']) {
showmessage('qqconnect:qqconnect_closed');
}
define('CURMODULE', $mod);
runhooks();
$connectService = Cloud::loadClass('Service_Connect');
require_once libfile('connect/'.$mod, 'plugin/qqconnect');
?>
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: cp.php 9379 2010-04-28 07:30:09Z zhengqingpeng $
*/
$_GET['mod'] = 'manage';
require_once 'userapp.php';
?>
\ No newline at end of file
<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>
\ No newline at end of file
No preview for this file type
<settings>
<font>Tahoma</font>
<plot_area>
<margins><left>60</left><top>10</top><right>20</right><bottom>60</bottom></margins>
</plot_area>
<values>
<x>
<enabled>true</enabled>
</x>
<y_left><enabled>true</enabled><min>0</min></y_left>
</values>
<grid>
<x>
<color>#000000</color>
<dashed>false</dashed>
<dash_length>5</dash_length>
<approx_count>7</approx_count>
</x>
<y_left>
<approx_count>5</approx_count>
</y_left>
</grid>
<legend>
<enabled>true</enabled>
<key><size>12</size></key>
</legend>
<indicator>
<enabled>true</enabled>
<x_balloon_enabled>true</x_balloon_enabled>
<y_balloon_on_off>true</y_balloon_on_off>
</indicator>
</settings>
\ No newline at end of file
No preview for this file type
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: forum.php 33828 2013-08-20 02:29:32Z nemohou $
*/
define('APPTYPEID', 2);
define('CURSCRIPT', 'forum');
require './source/class/class_core.php';
require './source/function/function_forum.php';
$modarray = array('ajax','announcement','attachment','forumdisplay',
'group','image','index','medal','misc','modcp','notice','post','redirect',
'relatekw','relatethread','rss','topicadmin','trade','viewthread','tag','collection','guide'
);
$modcachelist = array(
'index' => array('announcements', 'onlinelist', 'forumlinks',
'heats', 'historyposts', 'onlinerecord', 'userstats', 'diytemplatenameforum'),
'forumdisplay' => array('smilies', 'announcements_forum', 'globalstick', 'forums',
'onlinelist', 'forumstick', 'threadtable_info', 'threadtableids', 'stamps', 'diytemplatenameforum'),
'viewthread' => array('smilies', 'smileytypes', 'forums', 'usergroups',
'stamps', 'bbcodes', 'smilies', 'custominfo', 'groupicon', 'stamps',
'threadtableids', 'threadtable_info', 'posttable_info', 'diytemplatenameforum'),
'redirect' => array('threadtableids', 'threadtable_info', 'posttable_info'),
'post' => array('bbcodes_display', 'bbcodes', 'smileycodes', 'smilies', 'smileytypes',
'domainwhitelist', 'albumcategory'),
'space' => array('fields_required', 'fields_optional', 'custominfo'),
'group' => array('grouptype', 'diytemplatenamegroup'),
);
$mod = !in_array(C::app()->var['mod'], $modarray) ? 'index' : C::app()->var['mod'];
define('CURMODULE', $mod);
$cachelist = array();
if(isset($modcachelist[CURMODULE])) {
$cachelist = $modcachelist[CURMODULE];
$cachelist[] = 'plugin';
$cachelist[] = 'pluginlanguage_system';
}
if(C::app()->var['mod'] == 'group') {
$_G['basescript'] = 'group';
}
C::app()->cachelist = $cachelist;
C::app()->init();
loadforum();
set_rssauth();
runhooks();
$navtitle = str_replace('{bbname}', $_G['setting']['bbname'], $_G['setting']['seotitle']['forum']);
$_G['setting']['threadhidethreshold'] = 1;
require DISCUZ_ROOT.'./source/module/forum/forum_'.$mod.'.php';
?>
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: group.php 31307 2012-08-10 02:10:56Z zhengqingpeng $
*/
define('APPTYPEID', 3);
define('CURSCRIPT', 'group');
require './source/class/class_core.php';
$discuz = C::app();
$cachelist = array('grouptype', 'groupindex', 'diytemplatenamegroup');
$discuz->cachelist = $cachelist;
$discuz->init();
$_G['disabledwidthauto'] = 0;
$modarray = array('index', 'my', 'attentiongroup');
$mod = !in_array($_G['mod'], $modarray) ? 'index' : $_G['mod'];
define('CURMODULE', $mod);
runhooks();
$navtitle = str_replace('{bbname}', $_G['setting']['bbname'], $_G['setting']['seotitle']['group']);
require DISCUZ_ROOT.'./source/module/group/group_'.$mod.'.php';
?>
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: home.php 32932 2013-03-25 06:53:01Z zhangguosheng $
*/
define('APPTYPEID', 1);
define('CURSCRIPT', 'home');
if(!empty($_GET['mod']) && ($_GET['mod'] == 'misc' || $_GET['mod'] == 'invite')) {
define('ALLOWGUEST', 1);
}
require_once './source/class/class_core.php';
require_once './source/function/function_home.php';
$discuz = C::app();
$cachelist = array('magic','userapp','usergroups', 'diytemplatenamehome');
$discuz->cachelist = $cachelist;
$discuz->init();
$space = array();
$mod = getgpc('mod');
if(!in_array($mod, array('space', 'spacecp', 'misc', 'magic', 'editor', 'invite', 'task', 'medal', 'rss', 'follow'))) {
$mod = 'space';
$_GET['do'] = 'home';
}
if($mod == 'space' && ((empty($_GET['do']) || $_GET['do'] == 'index') && ($_G['inajax']))) {
$_GET['do'] = 'profile';
}
$curmod = !empty($_G['setting']['followstatus']) && (empty($_GET['diy']) && empty($_GET['do']) && $mod == 'space' || $_GET['do'] == 'follow') ? 'follow' : $mod;
define('CURMODULE', $curmod);
runhooks($_GET['do'] == 'profile' && $_G['inajax'] ? 'card' : $_GET['do']);
require_once libfile('home/'.$mod, 'module');
?>
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: index.php 34524 2014-05-15 04:42:23Z nemohou $
*/
if(!empty($_SERVER['QUERY_STRING']) && is_numeric($_SERVER['QUERY_STRING'])) {
$_ENV['curapp'] = 'home';
$_GET = array('mod'=>'space', 'uid'=>$_SERVER['QUERY_STRING']);
} else {
$url = '';
$domain = $_ENV = array();
$jump = false;
@include_once './data/sysdata/cache_domain.php';
$_ENV['domain'] = $domain;
if(empty($_ENV['domain'])) {
$_ENV['curapp'] = 'forum';
} else {
$_ENV['defaultapp'] = array('portal.php' => 'portal', 'forum.php' => 'forum', 'group.php' => 'group', 'home.php' => 'home');
$_ENV['hostarr'] = explode('.', $_SERVER['HTTP_HOST']);
$_ENV['domainroot'] = substr($_SERVER['HTTP_HOST'], strpos($_SERVER['HTTP_HOST'], '.')+1);
if(!empty($_ENV['domain']['app']) && is_array($_ENV['domain']['app']) && in_array($_SERVER['HTTP_HOST'], $_ENV['domain']['app'])) {
$_ENV['curapp'] = array_search($_SERVER['HTTP_HOST'], $_ENV['domain']['app']);
if($_ENV['curapp'] == 'mobile') {
$_ENV['curapp'] = 'forum';
if(!isset($_GET['mobile'])) {
@$_GET['mobile'] = '2';
}
}
if($_ENV['curapp'] == 'default' || !isset($_ENV['defaultapp'][$_ENV['curapp'].'.php'])) {
$_ENV['curapp'] = '';
}
} elseif(!empty($_ENV['domain']['root']) && is_array($_ENV['domain']['root']) && in_array($_ENV['domainroot'], $_ENV['domain']['root'])) {
$_G['setting']['holddomain'] = $_ENV['domain']['holddomain'] ? $_ENV['domain']['holddomain'] : array('www');
$list = $_ENV['domain']['list'];
if(isset($list[$_SERVER['HTTP_HOST']])) {
$domain = $list[$_SERVER['HTTP_HOST']];
switch($domain['idtype']) {
case 'subarea':
$_ENV['curapp'] = 'forum';
$_GET['gid'] = intval($domain['id']);
break;
case 'forum':
$_ENV['curapp'] = 'forum';
$_GET['mod'] = 'forumdisplay';
$_GET['fid'] = intval($domain['id']);
break;
case 'topic':
$_ENV['curapp'] = 'portal';
$_GET['mod'] = 'topic';
$_GET['topicid'] = intval($domain['id']);
break;
case 'channel':
$_ENV['curapp'] = 'portal';
$_GET['mod'] = 'list';
$_GET['catid'] = intval($domain['id']);
break;
case 'plugin':
$_ENV['curapp'] = 'plugin';
$_GET['id'] = $domain['id'];
$_GET['fromapp'] = 'index';
break;
}
} elseif(count($_ENV['hostarr']) > 2 && $_ENV['hostarr'][0] != 'www' && !checkholddomain($_ENV['hostarr'][0])) {
$_ENV['prefixdomain'] = addslashes($_ENV['hostarr'][0]);
$_ENV['domainroot'] = addslashes($_ENV['domainroot']);
require_once './source/class/class_core.php';
C::app()->init_setting = true;
C::app()->init_user = false;
C::app()->init_session = false;
C::app()->init_cron = false;
C::app()->init_misc = false;
C::app()->init();
$jump = true;
$domain = C::t('common_domain')->fetch_by_domain_domainroot($_ENV['prefixdomain'], $_ENV['domainroot']);
$apphost = $_ENV['domain']['app'][$domain['idtype']] ? $_ENV['domain']['app'][$domain['idtype']] : $_ENV['domain']['app']['default'];
$apphost = $apphost ? 'http://'.$apphost.'/' : '';
switch($domain['idtype']) {
case 'home':
if($_G['setting']['rewritestatus'] && in_array('home_space', $_G['setting']['rewritestatus'])) {
$url = rewriteoutput('home_space', 1, $apphost, $domain['id']);
} else {
$url = $apphost.'home.php?mod=space&uid='.$domain['id'];
}
break;
case 'group':
if($_G['setting']['rewritestatus'] && in_array('group_group', $_G['setting']['rewritestatus'])) {
$url = rewriteoutput('group_group', 1, $apphost, $domain['id']);
} else {
$url = $apphost.'forum.php?mod=group&fid='.$domain['id'].'&page=1';
}
break;
}
}
} else {
$jump = true;
}
if(empty($url) && empty($_ENV['curapp'])) {
if(!empty($_ENV['domain']['defaultindex']) && !$jump) {
if($_ENV['defaultapp'][$_ENV['domain']['defaultindex']]) {
$_ENV['curapp'] = $_ENV['defaultapp'][$_ENV['domain']['defaultindex']];
} else {
$url = $_ENV['domain']['defaultindex'];
}
} else {
if($jump) {
$url = empty($_ENV['domain']['app']['default']) ? (!empty($_ENV['domain']['defaultindex']) ? $_ENV['domain']['defaultindex'] : 'forum.php') : 'http://'.$_ENV['domain']['app']['default'];
} else {
$_ENV['curapp'] = 'forum';
}
}
}
}
}
if(!empty($url)) {
$delimiter = strrpos($url, '?') ? '&' : '?';
if(isset($_GET['fromuid']) && $_GET['fromuid']) {
$url .= sprintf('%sfromuid=%d', $delimiter, $_GET['fromuid']);
} elseif(isset($_GET['fromuser']) && $_GET['fromuser']) {
$url .= sprintf('%sfromuser=%s', $delimiter, rawurlencode($_GET['fromuser']));
}
header("HTTP/1.1 301 Moved Permanently");
header("location: $url");
} else {
require './'.$_ENV['curapp'].'.php';
}
function checkholddomain($domain) {
global $_G;
$domain = strtolower($domain);
if(preg_match("/^[^a-z]/i", $domain)) return true;
$holdmainarr = empty($_G['setting']['holddomain']) ? array('www') : explode('|', $_G['setting']['holddomain']);
$ishold = false;
foreach ($holdmainarr as $value) {
if(strpos($value, '*') === false) {
if(strtolower($value) == $domain) {
$ishold = true;
break;
}
} else {
$value = str_replace('*', '.*?', $value);
if(@preg_match("/$value/i", $domain)) {
$ishold = true;
break;
}
}
}
return $ishold;
}
?>
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
<?xml version="1.0" encoding="ISO-8859-1"?>
<root>
<item id="spacecss"><![CDATA[#portal_block_1 .dxb_bc {margin-left:0px !important;}#portal_block_2 .dxb_bc {font-size:14px !important;margin-left:10px !important;}]]></item>
<item id="layoutdata">
<item id="diy1"><![CDATA[]]></item>
<item id="diycontenttop"><![CDATA[]]></item>
<item id="diy5">
<item id="frame`framez4HEbL">
<item id="attr">
<item id="name"><![CDATA[framez4HEbL]]></item>
<item id="moveable"><![CDATA[true]]></item>
<item id="className"><![CDATA[frame move-span cl frame-1-1]]></item>
<item id="titles"><![CDATA[]]></item>
</item>
<item id="column`framez4HEbL_left">
<item id="attr">
<item id="name"><![CDATA[framez4HEbL_left]]></item>
<item id="className"><![CDATA[column frame-1-1-l]]></item>
</item>
<item id="block`portal_block_1">
<item id="attr">
<item id="name"><![CDATA[portal_block_1]]></item>
<item id="className"><![CDATA[block move-span]]></item>
<item id="titles"><![CDATA[]]></item>
</item>
</item>
</item>
<item id="column`framez4HEbL_center">
<item id="attr">
<item id="name"><![CDATA[framez4HEbL_center]]></item>
<item id="className"><![CDATA[column frame-1-1-r]]></item>
</item>
<item id="block`portal_block_2">
<item id="attr">
<item id="name"><![CDATA[portal_block_2]]></item>
<item id="className"><![CDATA[block move-span]]></item>
<item id="titles"><![CDATA[]]></item>
</item>
</item>
</item>
</item>
</item>
<item id="diycommendtop"><![CDATA[]]></item>
<item id="diycategorytop"><![CDATA[]]></item>
<item id="diycontentbottom"><![CDATA[]]></item>
<item id="diysidetop"><![CDATA[]]></item>
<item id="diysidemiddle"><![CDATA[]]></item>
<item id="diysidebottom"><![CDATA[]]></item>
<item id="diy4"><![CDATA[]]></item>
</item>
<item id="style"><![CDATA[]]></item>
<item id="blockdata">
<item id="block">
<item id="1">
<item id="bid"><![CDATA[1]]></item>
<item id="blockclass"><![CDATA[group_thread]]></item>
<item id="blocktype"><![CDATA[0]]></item>
<item id="name"><![CDATA[]]></item>
<item id="title"><![CDATA[]]></item>
<item id="classname"><![CDATA[]]></item>
<item id="summary"><![CDATA[]]></item>
<item id="uid"><![CDATA[1]]></item>
<item id="username"><![CDATA[admin]]></item>
<item id="styleid"><![CDATA[0]]></item>
<item id="blockstyle">
<item id="name"><![CDATA[]]></item>
<item id="blockclass"><![CDATA[group_thread]]></item>
<item id="makethumb"><![CDATA[1]]></item>
<item id="getpic"><![CDATA[1]]></item>
<item id="getsummary"><![CDATA[0]]></item>
<item id="settarget"><![CDATA[1]]></item>
<item id="fields">
<item id="0"><![CDATA[url]]></item>
<item id="1"><![CDATA[pic]]></item>
<item id="2"><![CDATA[title]]></item>
</item>
<item id="template">
<item id="raw"><![CDATA[<div class="module cl slidebox">
<ul class="slideshow">
[loop]
<li style="width: {picwidth}px; height: {picheight}px;"><a href="{url}"{target}><img src="{pic}" width="{picwidth}" height="{picheight}" /></a><span class="title">{title}</span></li>
[/loop]
</ul>
</div>
<script type="text/javascript">
runslideshow();
</script>]]></item>
<item id="footer"><![CDATA[]]></item>
<item id="header"><![CDATA[]]></item>
<item id="indexplus">
</item>
<item id="index">
</item>
<item id="orderplus">
</item>
<item id="order">
</item>
<item id="loopplus">
</item>
<item id="loop"><![CDATA[<li style="width: {picwidth}px; height: {picheight}px;"><a href="{url}"{target}><img src="{pic}" width="{picwidth}" height="{picheight}" /></a><span class="title">{title}</span></li>]]></item>
</item>
<item id="hash"><![CDATA[7af6727c]]></item>
</item>
<item id="picwidth"><![CDATA[339]]></item>
<item id="picheight"><![CDATA[215]]></item>
<item id="target"><![CDATA[blank]]></item>
<item id="dateformat"><![CDATA[Y-m-d]]></item>
<item id="dateuformat"><![CDATA[0]]></item>
<item id="script"><![CDATA[groupthread]]></item>
<item id="param">
<item id="gtids">
<item id="0"><![CDATA[0]]></item>
</item>
<item id="rewardstatus"><![CDATA[0]]></item>
<item id="titlelength"><![CDATA[40]]></item>
<item id="summarylength"><![CDATA[80]]></item>
<item id="startrow"><![CDATA[0]]></item>
<item id="items"><![CDATA[4]]></item>
<item id="special">
<item id="0"><![CDATA[0]]></item>
</item>
<item id="picrequired"><![CDATA[1]]></item>
</item>
<item id="shownum"><![CDATA[4]]></item>
<item id="cachetime"><![CDATA[0]]></item>
<item id="punctualupdate"><![CDATA[0]]></item>
<item id="hidedisplay"><![CDATA[0]]></item>
<item id="dateline"><![CDATA[1308275841]]></item>
<item id="notinherited"><![CDATA[0]]></item>
<item id="isblank"><![CDATA[0]]></item>
</item>
<item id="2">
<item id="bid"><![CDATA[2]]></item>
<item id="blockclass"><![CDATA[group_thread]]></item>
<item id="blocktype"><![CDATA[0]]></item>
<item id="name"><![CDATA[]]></item>
<item id="title"><![CDATA[]]></item>
<item id="classname"><![CDATA[]]></item>
<item id="summary"><![CDATA[]]></item>
<item id="uid"><![CDATA[1]]></item>
<item id="username"><![CDATA[admin]]></item>
<item id="styleid"><![CDATA[24]]></item>
<item id="blockstyle"><![CDATA[]]></item>
<item id="picwidth"><![CDATA[0]]></item>
<item id="picheight"><![CDATA[0]]></item>
<item id="target"><![CDATA[blank]]></item>
<item id="dateformat"><![CDATA[Y-m-d]]></item>
<item id="dateuformat"><![CDATA[0]]></item>
<item id="script"><![CDATA[groupthreadspecial]]></item>
<item id="param">
<item id="gtids">
<item id="0"><![CDATA[0]]></item>
</item>
<item id="rewardstatus"><![CDATA[0]]></item>
<item id="picrequired"><![CDATA[0]]></item>
<item id="titlelength"><![CDATA[40]]></item>
<item id="summarylength"><![CDATA[80]]></item>
<item id="items"><![CDATA[10]]></item>
</item>
<item id="shownum"><![CDATA[10]]></item>
<item id="cachetime"><![CDATA[3600]]></item>
<item id="punctualupdate"><![CDATA[0]]></item>
<item id="hidedisplay"><![CDATA[0]]></item>
<item id="dateline"><![CDATA[1308275761]]></item>
<item id="notinherited"><![CDATA[0]]></item>
<item id="isblank"><![CDATA[0]]></item>
</item>
</item>
<item id="style">
<item id="24">
<item id="styleid"><![CDATA[24]]></item>
<item id="blockclass"><![CDATA[group_thread]]></item>
<item id="name"><![CDATA[[]ӱ]]></item>
<item id="template">
<item id="raw"><![CDATA[<div class="module cl xl xl1">
<ul>
[loop]
<li><a href="{url}" title="{title}"{target}>{title}</a></li>
[/loop]
</ul>
</div>]]></item>
<item id="footer"><![CDATA[]]></item>
<item id="header"><![CDATA[]]></item>
<item id="indexplus">
</item>
<item id="index">
</item>
<item id="orderplus">
</item>
<item id="order">
</item>
<item id="loopplus">
</item>
<item id="loop"><![CDATA[<li><a href="{url}" title="{title}"{target}>{title}</a></li>]]></item>
</item>
<item id="hash"><![CDATA[176fcc68]]></item>
<item id="getpic"><![CDATA[0]]></item>
<item id="getsummary"><![CDATA[0]]></item>
<item id="makethumb"><![CDATA[0]]></item>
<item id="settarget"><![CDATA[1]]></item>
<item id="fields">
<item id="0"><![CDATA[url]]></item>
<item id="1"><![CDATA[title]]></item>
</item>
</item>
</item>
</item>
</root>
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
/*
(C) 2001-2009 Comsenz Inc.
*/
/* common */
*{ word-wrap:break-word; }
body{ padding:5px 0; background:#FFF; text-align:center; }
body, td, input, textarea, select, button{ color:#666; font:12px/1.5 Verdana, Tahoma, Arial, 'Microsoft Yahei', 'Simsun', sans-serif; }
ul, dl, dd, p, h1, h2, h3, h4, h5, h6, form, fieldset { margin:0; padding:0; }
h1, h2, h3, h4, h5, h6{ font-size:12px; }
a{ color:#2366A8; text-decoration:none; }
a:hover { text-decoration:underline; }
a img{ border:none; }
em, cite, strong, th{ font-style:normal; font-weight:normal; }
table{ border-collapse:collapse; }
th{ text-align:left; }
/* box */
.container{ overflow:hidden; margin:0 auto; width:700px; height:auto !important;text-align:left; border:1px solid #B5CFD9; }
.header{ *overflow:hidden; height:194px; background:url(bg_repx.gif) repeat-x; }
.header h1{ text-indent:-9999px; width:270px; height:48px; background:url(bg_repno.gif) no-repeat 26px 22px; }
.header span { float: right; padding-right: 10px; }
.main{ padding:20px 20px 0; background:#F7FBFE url(bg_repx.gif) repeat-x 0 -194px; }
.main h3{ margin:10px auto; width:75%; color:#6CA1B4; font-weight:700; }
.desc{ margin:0 auto; width:537px; line-height:180%; clear:both; }
.desc ul{ margin-left:20px; }
.desc1{ margin:10px 0; width:100%; }
.desc1 ul{ margin-left:25px; }
.desc1 li{ margin:3px 0; }
.tb, .tb2{ margin:15px 0 15px 67px; }
.tb th{ padding:5px; color:#6CA1B4; font-weight:700; }
.tb td{ padding:3px 5px; }
.tb .w, .tb .nw, .tb .padleft{ padding-left:45px; }
.tb .pdleft1{ padding-left:67px; }
.tb2{}
.tb2 th, .tb2 td{ padding:3px 5px; }
.tbopt{ width:130px; }
.btnbox{ text-align:center; }
.btnbox input{ margin:0 2px; }
.btnbox textarea{ margin-bottom:10px; height:150px; }
.btn{ margin-top:10px; }
.footer{ line-height:40px; text-align:center; background:url(bg_footer.gif) repeat-x; font-size:11px; }
/* form */
.txt{ width:200px; }
/* step num */
.setup{ margin:46px 0 0 200px; padding-left:70px; }
.setup h2{ padding-top:0; *padding-top:6px; line-height:1.2; color:#6CA1B4; font-size:36px; }
.setup p{ margin:0 0 10px 6px; color:#999; }
.step1{ background:url(stepnum.gif) no-repeat 0 8px; }
.step2{ background:url(stepnum.gif) no-repeat 0 -92px; }
.step3{ background:url(stepnum.gif) no-repeat 0 -192px; }
.step4{ background:url(stepnum.gif) no-repeat 0 -292px; }
/* step status */
.stepstat{ position:relative; bottom:-5px; *bottom:0; left:80px; *width:593px; height:30px; }
.stepstatbg{ position:absolute; top:18px; z-index:90; width:535px; height:9px; overflow:hidden; background:#81C6F0 url(bg_stepstatus.gif) no-repeat; }
.stepstat ul{ position:absolute; top:3px; left:-2px; z-index:100; list-style:none; width:600px; white-space:nowrap; overflow:hidden; }
.stepstat li{ float:left; text-indent:20px; width:175px; height:30px; line-height:14px; font-size:12px; background:url(bg_repno.gif) no-repeat 0 -38px; }
.stepstat .current{ background:url(bg_repno.gif) no-repeat 0 -71px; font-weight:700; }
.stepstat .unactivated{ background:url(bg_repno.gif) no-repeat 0 -103px; }
.stepstat .last{ width:50px; }
.stepstat1{ background-position:-750px 0; }
.stepstat2{ background-position:-570px 0; }
.stepstat3{ background-position:-390px 0; }
.stepstat4{ background-position:-210px 0; }
/* file status */
.w{ background:url(bg_repno.gif) no-repeat 45px -148px; }
.nw{ background:url(bg_repno.gif) no-repeat 45px -197px; }
/* space */
.marginbot{ margin-bottom:20px; }
.margintop{ margin-top:20px; }
.red{ color:red; }
.licenseblock{ margin-bottom:15px; padding:8px; height:280px; border:1px solid #EEE; background:#FFF; overflow:scroll; overflow-x:hidden; }
.license{}
.license h1{ padding-bottom:10px; font-size:14px; text-align:center; }
.license h3{ margin:0; color:#666; }
.license p{ line-height:150%; margin:10px 0; text-indent:25px; }
.license li{ line-height:150%; margin:5px 0; }
.title{ margin:5px 0 -15px 60px; }
#notice { overflow: hidden; margin: 20px; padding: 5px; height: 300px; border: 1px solid #B5CFD9; text-align: left; }
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: install_extvar.php 31245 2012-07-31 02:54:24Z liulanbo $
*/
if(!defined('IN_COMSENZ')) {
exit('Access Denied');
}
$settings = array(
'extcredits' => array(
1 => array('title' => $lang['init_credits_money'], 'ratio' => 0, 'available' => 1),
2 => array('title' => $lang['init_credits_karma'], 'ratio' => 0, 'available' => 1),
),
'postnocustom' => array(
0 => $lang['init_postno0'], 1 => $lang['init_postno1'], 2 => $lang['init_postno2'], 3 => $lang['init_postno3']
),
'recommendthread' => array(
'status' => '1',
'addtext' => $lang['init_support'],
'subtracttext' => $lang['init_opposition'],
'defaultshow' => '1',
'daycount' => '0',
'ownthread' => '0',
'iconlevels' => '0,100,200',
),
'tasktypes' => array(
'promotion' => array(
'name' => $lang['init_promotion_task'],
'version' => '1.0',
),
'gift' => array(
'name' => $lang['init_gift_task'],
'version' => '1.0',
),
'avatar' => array(
'name' => $lang['init_avatar_task'],
'version' => '1.0',
),
),
);
?>
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: install_mysql.php 33334 2013-05-28 09:51:11Z kamichen $
*/
if(!defined('IN_COMSENZ')) {
exit('Access Denied');
}
class dbstuff {
var $querynum = 0;
var $link;
var $histories;
var $time;
var $tablepre;
function connect($dbhost, $dbuser, $dbpw, $dbname = '', $dbcharset, $pconnect = 0, $tablepre='', $time = 0) {
$this->time = $time;
$this->tablepre = $tablepre;
if($pconnect) {
if(!$this->link = mysql_pconnect($dbhost, $dbuser, $dbpw)) {
$this->halt('Can not connect to MySQL server');
}
} else {
if(!$this->link = mysql_connect($dbhost, $dbuser, $dbpw, 1)) {
$this->halt('Can not connect to MySQL server');
}
}
if($this->version() > '4.1') {
if($dbcharset) {
mysql_query("SET character_set_connection=".$dbcharset.", character_set_results=".$dbcharset.", character_set_client=binary", $this->link);
}
if($this->version() > '5.0.1') {
mysql_query("SET sql_mode=''", $this->link);
}
}
if($dbname) {
mysql_select_db($dbname, $this->link);
}
}
function fetch_array($query, $result_type = MYSQL_ASSOC) {
return mysql_fetch_array($query, $result_type);
}
function result_first($sql, &$data) {
$query = $this->query($sql);
$data = $this->result($query, 0);
}
function fetch_first($sql, &$arr) {
$query = $this->query($sql);
$arr = $this->fetch_array($query);
}
function fetch_all($sql, &$arr) {
$query = $this->query($sql);
while($data = $this->fetch_array($query)) {
$arr[] = $data;
}
}
function cache_gc() {
$this->query("DELETE FROM {$this->tablepre}sqlcaches WHERE expiry<$this->time");
}
function query($sql, $type = '', $cachetime = FALSE) {
$func = $type == 'UNBUFFERED' && @function_exists('mysql_unbuffered_query') ? 'mysql_unbuffered_query' : 'mysql_query';
if(!($query = $func($sql, $this->link)) && $type != 'SILENT') {
$this->halt('SQL:', $sql);
}
$this->querynum++;
$this->histories[] = $sql;
return $query;
}
function affected_rows() {
return mysql_affected_rows($this->link);
}
function error() {
return (($this->link) ? mysql_error($this->link) : mysql_error());
}
function errno() {
return intval(($this->link) ? mysql_errno($this->link) : mysql_errno());
}
function result($query, $row) {
$query = @mysql_result($query, $row);
return $query;
}
function num_rows($query) {
$query = mysql_num_rows($query);
return $query;
}
function num_fields($query) {
return mysql_num_fields($query);
}
function free_result($query) {
return mysql_free_result($query);
}
function insert_id() {
return ($id = mysql_insert_id($this->link)) >= 0 ? $id : $this->result($this->query("SELECT last_insert_id()"), 0);
}
function fetch_row($query) {
$query = mysql_fetch_row($query);
return $query;
}
function fetch_fields($query) {
return mysql_fetch_field($query);
}
function version() {
return mysql_get_server_info($this->link);
}
function escape_string($str) {
return mysql_escape_string($str);
}
function close() {
return mysql_close($this->link);
}
function halt($message = '', $sql = '') {
show_error('run_sql_error', $message.$sql.'<br /> Error:'.$this->error().'<br />Errno:'.$this->errno(), 0);
}
}
?>
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: install_mysql.php 6758 2010-03-25 09:05:10Z cnteacher $
*/
if(!defined('IN_COMSENZ')) {
exit('Access Denied');
}
class dbstuff {
var $querynum = 0;
var $link;
var $histories;
var $time;
var $tablepre;
function connect($dbhost, $dbuser, $dbpw, $dbname = '', $dbcharset, $pconnect = 0, $tablepre='', $time = 0) {
$this->time = $time;
$this->tablepre = $tablepre;
$this->link = new mysqli();
if(!$this->link->real_connect($dbhost, $dbuser, $dbpw, $dbname, null, null, MYSQLI_CLIENT_COMPRESS)) {
$this->halt('Can not connect to MySQL server');
}
if($this->version() > '4.1') {
if($dbcharset) {
$this->link->set_charset($dbcharset);
}
if($this->version() > '5.0.1') {
$this->query("SET sql_mode=''");
}
}
}
function fetch_array($query, $result_type = MYSQLI_ASSOC) {
return $query ? $query->fetch_array($result_type) : null;
}
function result_first($sql, &$data) {
$query = $this->query($sql);
$data = $this->result($query, 0);
}
function fetch_first($sql, &$arr) {
$query = $this->query($sql);
$arr = $this->fetch_array($query);
}
function fetch_all($sql, &$arr) {
$query = $this->query($sql);
while($data = $this->fetch_array($query)) {
$arr[] = $data;
}
}
function cache_gc() {
$this->query("DELETE FROM {$this->tablepre}sqlcaches WHERE expiry<$this->time");
}
function query($sql, $type = '', $cachetime = FALSE) {
$resultmode = $type == 'UNBUFFERED' ? MYSQLI_USE_RESULT : MYSQLI_STORE_RESULT;
if(!($query = $this->link->query($sql, $resultmode)) && $type != 'SILENT') {
$this->halt('SQL:', $sql);
}
$this->querynum++;
$this->histories[] = $sql;
return $query;
}
function affected_rows() {
return $this->link->affected_rows;
}
function error() {
return (($this->link) ? $this->link->error : mysqli_error());
}
function errno() {
return intval(($this->link) ? $this->link->errno : mysqli_errno());
}
function result($query, $row) {
if(!$query || $query->num_rows == 0) {
return null;
}
$query->data_seek($row);
$assocs = $query->fetch_row();
return $assocs[0];
}
function num_rows($query) {
$query = $query ? $query->num_rows : 0;
return $query;
}
function num_fields($query) {
return $query ? $query->field_count : 0;
}
function free_result($query) {
return $query ? $query->free() : false;
}
function insert_id() {
return ($id = $this->link->insert_id) >= 0 ? $id : $this->result($this->query("SELECT last_insert_id()"), 0);
}
function fetch_row($query) {
$query = $query ? $query->fetch_row() : null;
return $query;
}
function fetch_fields($query) {
return $query ? $query->fetch_field() : null;
}
function version() {
return $this->link->server_info;
}
function escape_string($str) {
return $this->link->escape_string($str);
}
function close() {
return $this->link->close();
}
function halt($message = '', $sql = '') {
show_error('run_sql_error', $message.$sql.'<br /> Error:'.$this->error().'<br />Errno:'.$this->errno(), 0);
}
}
?>
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: install_plugin.php 32877 2013-03-19 03:48:10Z liulanbo $
*/
define('IN_COMSENZ', TRUE);
define('IN_ADMINCP', TRUE);
chdir('../../');
require_once './source/class/class_core.php';
$discuz = C::app();
$discuz->init_cron = false;
$discuz->init_session = false;
$discuz->init();
if($_GET['key'] !== md5($_G['setting']['authkey'].$_SERVER['REMOTE_ADDR'])) {
exit;
}
$plugins = array('qqconnect', 'cloudstat', 'soso_smilies', 'cloudsearch', 'qqgroup', 'security', 'xf_storage', 'pcmgr_url_safeguard');
require_once libfile('function/plugin');
require_once libfile('function/admincp');
require_once libfile('function/cache');
foreach($plugins as $pluginid) {
$importfile = DISCUZ_ROOT.'./source/plugin/'.$pluginid.'/discuz_plugin_'.$pluginid.'.xml';
$importtxt = @implode('', file($importfile));
$pluginarray = getimportdata('Discuz! Plugin', $importtxt);
if(plugininstall($pluginarray)) {
if(!empty($pluginarray['installfile']) && file_exists(DISCUZ_ROOT.'./source/plugin/'.$pluginid.'/'.$pluginarray['installfile'])) {
@include_once DISCUZ_ROOT.'./source/plugin/'.$pluginid.'/'.$pluginarray['installfile'];
}
}
}
?>
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: member.php 34253 2013-11-25 03:36:23Z nemohou $
*/
define('APPTYPEID', 0);
define('CURSCRIPT', 'member');
require './source/class/class_core.php';
$discuz = C::app();
$modarray = array('activate', 'emailverify', 'getpasswd',
'groupexpiry', 'logging', 'lostpasswd',
'register', 'regverify', 'switchstatus');
$mod = !in_array($discuz->var['mod'], $modarray) && (!preg_match('/^\w+$/', $discuz->var['mod']) || !file_exists(DISCUZ_ROOT.'./source/module/member/member_'.$discuz->var['mod'].'.php')) ? 'register' : $discuz->var['mod'];
define('CURMODULE', $mod);
$discuz->init();
if($mod == 'register' && $discuz->var['mod'] != $_G['setting']['regname']) {
showmessage('undefined_action');
}
require libfile('function/member');
require libfile('class/member');
runhooks();
require DISCUZ_ROOT.'./source/module/member/member_'.$mod.'.php';
?>
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: misc.php 34264 2013-11-27 03:14:58Z nemohou $
*/
if(isset($_GET['css'])) {
$css = explode('|', $_GET['css']);
$string = '';
$size = 0;
foreach($css as $file) {
if(preg_match('/^\w+$/', $file)) {
$file = './data/cache/style_'.$file.'.css';
$string .= @implode('', file($file));
}
}
ob_start('ob_gzhandler');
header('Content-Type: text/css');
header('Expires: '.gmdate('D, d M Y H:i:s', time() + 2592000).' GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s', time()).' GMT');
echo $string;
exit;
}
if(isset($_GET['js'])) {
$js = explode('|', $_GET['js']);
$string = '';
$size = 0;
foreach($js as $file) {
$file = substr($file, 0, strpos($file, '.'));
if(preg_match('/^\w+$/', $file)) {
$file = './data/cache/'.$file.'.js';
$string .= @implode('', file($file));
}
}
ob_start('ob_gzhandler');
header('Content-Type: text/javascript');
header('Expires: '.gmdate('D, d M Y H:i:s', time() + 2592000).' GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s', time()).' GMT');
echo $string;
exit;
}
define('APPTYPEID', 100);
define('CURSCRIPT', 'misc');
require './source/class/class_core.php';
$discuz = C::app();
$discuz->reject_robot();
$modarray = array('seccode', 'secqaa', 'initsys', 'invite', 'faq', 'report',
'swfupload', 'manyou', 'stat', 'ranklist', 'buyinvitecode',
'tag', 'diyhelp', 'mobile', 'patch', 'getatuser', 'imgcropper',
'userstatus', 'signin');
$modcachelist = array(
'ranklist' => array('forums', 'diytemplatename'),
);
$mod = getgpc('mod');
$mod = (empty($mod) || !in_array($mod, $modarray)) ? 'error' : $mod;
if(in_array($mod, array('seccode', 'secqaa', 'initsys', 'faq', 'swfupload', 'mobile'))) {
define('ALLOWGUEST', 1);
}
$cachelist = array();
if(isset($modcachelist[$mod])) {
$cachelist = $modcachelist[$mod];
}
$discuz->cachelist = $cachelist;
switch ($mod) {
case 'secqaa':
case 'manyou':
case 'userstatus':
case 'seccode':
$discuz->init_cron = false;
$discuz->init_session = false;
break;
case 'updatecache':
$discuz->init_cron = false;
$discuz->init_session = false;
default:
break;
}
$discuz->init();
define('CURMODULE', $mod);
runhooks();
require DISCUZ_ROOT.'./source/module/misc/misc_'.$mod.'.php';
?>
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: plugin.php 27335 2012-01-16 10:15:37Z monkey $
*/
define('APPTYPEID', 127);
define('CURSCRIPT', 'plugin');
require './source/class/class_core.php';
$discuz = C::app();
$cachelist = array('plugin', 'diytemplatename');
$discuz->cachelist = $cachelist;
$discuz->init();
if(!empty($_GET['id'])) {
list($identifier, $module) = explode(':', $_GET['id']);
$module = $module !== NULL ? $module : $identifier;
} else {
showmessage('plugin_nonexistence');
}
$mnid = 'plugin_'.$identifier.'_'.$module;
$pluginmodule = isset($_G['setting']['pluginlinks'][$identifier][$module]) ? $_G['setting']['pluginlinks'][$identifier][$module] : (isset($_G['setting']['plugins']['script'][$identifier][$module]) ? $_G['setting']['plugins']['script'][$identifier][$module] : array('adminid' => 0, 'directory' => preg_match("/^[a-z]+[a-z0-9_]*$/i", $identifier) ? $identifier.'/' : ''));
if(!preg_match('/^[\w\_]+$/', $identifier)) {
showmessage('plugin_nonexistence');
}
if(empty($identifier) || !preg_match("/^[a-z0-9_\-]+$/i", $module) || !in_array($identifier, $_G['setting']['plugins']['available'])) {
showmessage('plugin_nonexistence');
} elseif($pluginmodule['adminid'] && ($_G['adminid'] < 1 || ($_G['adminid'] > 0 && $pluginmodule['adminid'] < $_G['adminid']))) {
showmessage('plugin_nopermission');
} elseif(@!file_exists(DISCUZ_ROOT.($modfile = './source/plugin/'.$pluginmodule['directory'].$module.'.inc.php'))) {
showmessage('plugin_module_nonexistence', '', array('mod' => $modfile));
}
define('CURMODULE', $identifier);
runhooks();
include DISCUZ_ROOT.$modfile;
?>
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: portal.php 33234 2013-05-08 04:13:19Z andyzheng $
*/
define('APPTYPEID', 4);
define('CURSCRIPT', 'portal');
require './source/class/class_core.php';
$discuz = C::app();
$cachelist = array('userapp', 'portalcategory', 'diytemplatenameportal');
$discuz->cachelist = $cachelist;
$discuz->init();
require DISCUZ_ROOT.'./source/function/function_home.php';
require DISCUZ_ROOT.'./source/function/function_portal.php';
if(empty($_GET['mod']) || !in_array($_GET['mod'], array('list', 'view', 'comment', 'portalcp', 'topic', 'attachment', 'rss', 'block'))) $_GET['mod'] = 'index';
define('CURMODULE', $_GET['mod']);
runhooks();
$navtitle = str_replace('{bbname}', $_G['setting']['bbname'], $_G['setting']['seotitle']['portal']);
$_G['disabledwidthauto'] = 1;
require_once libfile('portal/'.$_GET['mod'], 'module');
?>
\ No newline at end of file
#
# robots.txt for Discuz! X3
#
User-agent: *
Disallow: /api/
Disallow: /data/
Disallow: /source/
Disallow: /install/
Disallow: /template/
Disallow: /config/
Disallow: /uc_client/
Disallow: /uc_server/
Disallow: /static/
Disallow: /admin.php
Disallow: /search.php
Disallow: /member.php
Disallow: /api.php
Disallow: /misc.php
Disallow: /connect.php
Disallow: /forum.php?mod=redirect*
Disallow: /forum.php?mod=post*
Disallow: /home.php?mod=spacecp*
Disallow: /userapp.php?mod=app&*
Disallow: /*?mod=misc*
Disallow: /*?mod=attachment*
Disallow: /*mobile=yes*
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: search.php 34131 2013-10-17 03:54:09Z andyzheng $
*/
define('APPTYPEID', 0);
define('CURSCRIPT', 'search');
require './source/class/class_core.php';
$discuz = C::app();
$modarray = array('my', 'user', 'curforum', 'newthread');
$cachelist = $slist = array();
$mod = '';
$discuz->cachelist = $cachelist;
$discuz->init();
if(in_array($discuz->var['mod'], $modarray) || !empty($_G['setting']['search'][$discuz->var['mod']]['status'])) {
$mod = $discuz->var['mod'];
} else {
foreach($_G['setting']['search'] as $mod => $value) {
if(!empty($value['status'])) {
break;
}
}
}
if(empty($mod)) {
showmessage('search_closed');
}
define('CURMODULE', $mod);
runhooks();
require_once libfile('function/search');
$navtitle = lang('core', 'title_search');
if($mod == 'curforum') {
$mod = 'forum';
$_GET['srchfid'] = array($_GET['srhfid']);
} elseif($mod == 'forum') {
$_GET['srhfid'] = 0;
}
require DISCUZ_ROOT.'./source/module/search/search_'.$mod.'.php';
?>
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: admincp_albumcategory.php 24658 2011-09-29 09:39:40Z chenmengshu $
*/
if(!defined('IN_DISCUZ') || !defined('IN_DISCUZ')) {
exit('Access Denied');
}
cpheader();
$operation = $operation == 'delete' ? 'delete' : 'list';
loadcache('albumcategory');
$category = $_G['cache']['albumcategory'];
if($operation == 'list') {
if(!submitcheck('editsubmit')) {
shownav('portal', 'albumcategory');
showsubmenu('albumcategory', array(
array('list', 'albumcategory', 1)
));
showformheader('albumcategory');
showtableheader();
showsetting('system_category_stat', 'settingnew[albumcategorystat]', $_G['setting']['albumcategorystat'], 'radio', '', 1);
showsetting('system_category_required', 'settingnew[albumcategoryrequired]', $_G['setting']['albumcategoryrequired'], 'radio', '');
echo '<tr><td colspan="2">';
showtableheader();
showsubtitle(array('order', 'albumcategory_name', 'albumcategory_num', 'operation'));
foreach ($category as $key=>$value) {
if($value['level'] == 0) {
echo showcategoryrow($key, 0, '');
}
}
echo '<tr><td class="td25">&nbsp;</td><td colspan="3"><div><a class="addtr" onclick="addrow(this, 0, 0)" href="###">'.cplang('albumcategory_addcategory').'</a></div></td></tr>';
showtablefooter();
echo '</td></tr>';
showtableheader('', 'notop');
showsubmit('editsubmit');
showtablefooter();
showformfooter();
$langs = array();
$keys = array('albumcategory_addcategory', 'albumcategory_addsubcategory', 'albumcategory_addthirdcategory');
foreach ($keys as $key) {
$langs[$key] = cplang($key);
}
echo <<<SCRIPT
<script type="text/Javascript">
var rowtypedata = [
[[1,'<input type="text" class="txt" name="neworder[{1}][]" value="0" />', 'td25'], [3, '<div class="parentboard"><input type="text" class="txt" value="$lang[albumcategory_addcategory]" name="newname[{1}][]"/></div>']],
[[1,'<input type="text" class="txt" name="neworder[{1}][]" value="0" />', 'td25'], [3, '<div class="board"><input type="text" class="txt" value="$lang[albumcategory_addsubcategory]" name="newname[{1}][]"/></div>']],
[[1,'<input type="text" class="txt" name="neworder[{1}][]" value="0" />', 'td25'], [3, '<div class="childboard"><input type="text" class="txt" value="$lang[albumcategory_addthirdcategory]" name="newname[{1}][]"/></div>']],
];
</script>
SCRIPT;
} else {
if($_POST['name']) {
foreach($_POST['name'] as $key=>$value) {
$sets = array();
$value = trim($value);
if($category[$key] && $category[$key]['catname'] != $value) {
$sets['catname'] = $value;
}
if($category[$key] && $category[$key]['displayorder'] != $_POST['order'][$key]) {
$sets['displayorder'] = $_POST['order'][$key] ? $_POST['order'][$key] : '0';
}
if($sets) {
C::t('home_album_category')->update($key, $sets);
}
}
}
if($_POST['newname']) {
foreach ($_POST['newname'] as $upid=>$names) {
foreach ($names as $nameid=>$name) {
C::t('home_album_category')->insert(array('upid' => $upid, 'catname' => trim($name), 'displayorder'=>intval($_POST['neworder'][$upid][$nameid])));
}
}
}
if($_POST['settingnew']) {
$_POST['settingnew'] = array_map('intval', $_POST['settingnew']);
C::t('common_setting')->update_batch($_POST['settingnew']);
updatecache('setting');
}
include_once libfile('function/cache');
updatecache('albumcategory');
cpmsg('albumcategory_update_succeed', 'action=albumcategory', 'succeed');
}
} elseif($operation == 'delete') {
if(!$_GET['catid'] || !$category[$_GET['catid']]) {
cpmsg('albumcategory_catgory_not_found', '', 'error');
}
if(!submitcheck('deletesubmit')) {
$a_count = C::t('home_album')->count_by_catid($_GET['catid']);
if(!$a_count && empty($category[$_GET['catid']]['children'])) {
C::t('home_album_category')->delete($_GET['catid']);
include_once libfile('function/cache');
updatecache('albumcategory');
cpmsg('albumcategory_delete_succeed', 'action=albumcategory', 'succeed');
}
shownav('portal', 'albumcategory');
showsubmenu('albumcategory', array(
array('list', 'albumcategory', 0),
array('delete', 'albumcategory&operation=delete&catid='.$_GET['catid'], 1)
));
showformheader('albumcategory&operation=delete&catid='.$_GET['catid']);
showtableheader();
if($category[$_GET[catid]]['children']) {
showsetting('albumcategory_subcategory_moveto', '', '',
'<input type="radio" name="subcat_op" value="trash" id="subcat_op_trash" checked="checked" />'.
'<label for="subcat_op_trash" />'.cplang('albumcategory_subcategory_moveto_trash').'</label>'.
'<input type="radio" name="subcat_op" value="parent" id="subcat_op_parent" checked="checked" />'.
'<label for="subcat_op_parent" />'.cplang('albumcategory_subcategory_moveto_parent').'</label>'
);
}
include_once libfile('function/portalcp');
showsetting('albumcategory_article_moveto', '', '', category_showselect('album', 'tocatid', false, $category[$_GET['catid']]['upid']));
showsubmit('deletesubmit');
showtablefooter();
showformfooter();
} else {
if($_POST['tocatid'] == $_GET['catid']) {
cpmsg('albumcategory_move_category_failed', 'action=albumcategory', 'error');
}
$delids = array($_GET['catid']);
if($category[$_GET['catid']]['children']) {
if($_POST['subcat_op'] == 'parent') {
$upid = intval($category[$_GET['catid']]['upid']);
C::t('home_album_category')->update($category[$_GET['catid']]['children'], array('upid'=>$upid));
} else {
$delids = array_merge($delids, $category[$_GET['catid']]['children']);
foreach ($category[$_GET['catid']]['children'] as $id) {
$value = $category[$id];
if($value['children']) {
$delids = array_merge($delids, $value['children']);
}
}
if(!$category[$_POST['tocatid']] || in_array($_POST['tocatid'], $delids)) {
cpmsg('albumcategory_move_category_failed', 'action=albumcategory', 'error');
}
}
}
if($delids) {
C::t('home_album')->update_by_catid($delids, array('catid' => $_POST['tocatid']));
C::t('home_album_category')->delete($delids);
$num =C::t('home_album')->count_by_catid($_GET['tocatid']);
C::t('home_album_category')->update($_POST['tocatid'], array('num'=>$num));
}
include_once libfile('function/cache');
updatecache('albumcategory');
cpmsg('albumcategory_delete_succeed', 'action=albumcategory', 'succeed');
}
}
function showcategoryrow($key, $level = 0, $last = '') {
global $_G;
loadcache('albumcategory');
$value = $_G['cache']['albumcategory'][$key];
$return = '';
include_once libfile('function/portalcp');
$value['num'] = category_get_num('album', $key);
if($level == 2) {
$class = $last ? 'lastchildboard' : 'childboard';
$return = '<tr class="hover"><td class="td25"><input type="text" class="txt" name="order['.$value['catid'].']" value="'.$value['displayorder'].'" /></td><td><div class="'.$class.'">'.
'<input type="text" name="name['.$value['catid'].']" value="'.$value['catname'].'" class="txt" />'.
'</div>'.
'</td><td>'.$value[num].'</td><td><a href="'.ADMINSCRIPT.'?action=albumcategory&operation=delete&catid='.$value['catid'].'">'.cplang('delete').'</a></td></tr>';
} elseif($level == 1) {
$return = '<tr class="hover"><td class="td25"><input type="text" class="txt" name="order['.$value['catid'].']" value="'.$value['displayorder'].'" /></td><td><div class="board">'.
'<input type="text" name="name['.$value['catid'].']" value="'.$value['catname'].'" class="txt" />'.
'<a class="addchildboard" onclick="addrowdirect = 1;addrow(this, 2, '.$value['catid'].')" href="###">'.cplang('albumcategory_addthirdcategory').'</a></div>'.
'</td><td>'.$value[num].'</td><td><a href="'.ADMINSCRIPT.'?action=albumcategory&operation=delete&catid='.$value['catid'].'">'.cplang('delete').'</a></td></tr>';
for($i=0,$L=count($value['children']); $i<$L; $i++) {
$return .= showcategoryrow($value['children'][$i], 2, $i==$L-1);
}
} else {
$return = '<tr class="hover"><td class="td25"><input type="text" class="txt" name="order['.$value['catid'].']" value="'.$value['displayorder'].'" /></td><td><div class="parentboard">'.
'<input type="text" name="name['.$value['catid'].']" value="'.$value['catname'].'" class="txt" />'.
'</div>'.
'</td><td>'.$value[num].'</td><td><a href="'.ADMINSCRIPT.'?action=albumcategory&operation=delete&catid='.$value['catid'].'">'.cplang('delete').'</a></td></tr>';
for($i=0,$L=count($value['children']); $i<$L; $i++) {
$return .= showcategoryrow($value['children'][$i], 1, '');
}
$return .= '<tr><td class="td25"></td><td colspan="3"><div class="lastboard"><a class="addtr" onclick="addrow(this, 1, '.$value['catid'].')" href="###">'.cplang('albumcategory_addsubcategory').'</a></div>';
}
return $return;
}
?>
\ No newline at end of file
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: admincp_announce.php 33271 2013-05-13 08:16:21Z kamichen $
*/
if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
exit('Access Denied');
}
cpheader();
if(empty($operation)) {
if(!submitcheck('announcesubmit')) {
shownav('extended', 'announce', 'admin');
showsubmenu('announce', array(
array('admin', 'announce', 1),
array('add', 'announce&operation=add', 0)
));
showtips('announce_tips');
showformheader('announce');
showtableheader();
showsubtitle(array('del', 'display_order', 'author', 'subject', 'message', 'announce_type', 'start_time', 'end_time', ''));
$announce_type = array(0=>$lang['announce_words'], 1=>$lang['announce_url']);
$annlist = C::t('forum_announcement')->fetch_all_by_displayorder();
foreach ($annlist as $announce) {
$disabled = $_G['adminid'] != 1 && $announce['author'] != $_G['member']['username'] ? 'disabled' : NULL;
$announce['starttime'] = $announce['starttime'] ? dgmdate($announce['starttime'], 'Y-n-j H:i') : $lang['unlimited'];
$announce['endtime'] = $announce['endtime'] ? dgmdate($announce['endtime'], 'Y-n-j H:i') : $lang['unlimited'];
showtablerow('', array('class="td25"', 'class="td28"'), array(
"<input class=\"checkbox\" type=\"checkbox\" name=\"delete[]\" value=\"$announce[id]\" $disabled>",
"<input type=\"text\" class=\"txt\" name=\"displayordernew[{$announce[id]}]\" value=\"$announce[displayorder]\" size=\"2\" $disabled>",
"<a href=\"./home.php?mod=space&username=".rawurlencode($announce['author'])."\" target=\"_blank\">$announce[author]</a>",
$announce['subject'],
cutstr(strip_tags($announce['message']), 20),
$announce_type[$announce['type']],
$announce['starttime'],
$announce['endtime'],
"<a href=\"".ADMINSCRIPT."?action=announce&operation=edit&announceid=$announce[id]\" $disabled>$lang[edit]</a>"
));
}
showsubmit('announcesubmit', 'submit', 'select_all');
showtablefooter();
showformfooter();
} else {
if(is_array($_GET['delete'])) {
C::t('forum_announcement')->delete_by_id_username($_GET['delete'], $_G['username'], $_G['adminid']);
}
if(is_array($_GET['displayordernew'])) {
foreach($_GET['displayordernew'] as $id => $displayorder) {
C::t('forum_announcement')->update_displayorder_by_id_username($id, $displayorder, $_G['username'], $_G['adminid']);
}
}
updatecache(array('announcements', 'announcements_forum'));
cpmsg('announce_update_succeed', 'action=announce', 'succeed');
}
} elseif($operation == 'add') {
if(!submitcheck('addsubmit')) {
$newstarttime = dgmdate(TIMESTAMP, 'Y-n-j H:i');
$newendtime = dgmdate(TIMESTAMP + 86400* 7, 'Y-n-j H:i');
shownav('extended', 'announce', 'add');
showsubmenu('announce', array(
array('admin', 'announce', 0),
array('add', 'announce&operation=add', 1)
));
showformheader('announce&operation=add');
showtableheader('announce_add');
showsetting($lang[subject], 'newsubject', '', 'htmltext');
showsetting($lang['start_time'], 'newstarttime', $newstarttime, 'calendar', '', 0, '', 1);
showsetting($lang['end_time'], 'newendtime', $newendtime, 'calendar', '', 0, '', 1);
showsetting('announce_type', array('newtype', array(
array(0, $lang['announce_words']),
array(1, $lang['announce_url']))), 0, 'mradio');
showsetting('announce_message', 'newmessage', '', 'textarea');
showsubmit('addsubmit');
showtablefooter();
showformfooter();
} else {
$newstarttime = $_GET['newstarttime'] ? strtotime($_GET['newstarttime']) : 0;
$newendtime = $_GET['newendtime'] ? strtotime($_GET['newendtime']) : 0;
if($newendtime && $newstarttime > $newendtime) {
cpmsg('announce_time_invalid', '', 'error');
}
$newsubject = trim($_GET['newsubject']);
$newmessage = trim($_GET['newmessage']);
if(!$newstarttime) {
cpmsg('announce_time_invalid', '', 'error');
} elseif(!$newsubject || !$newmessage) {
cpmsg('announce_invalid', '', 'error');
} else {
$newmessage = $_GET['newtype'] == 1 ? explode("\n", $_GET['newmessage']) : array(0 => $_GET['newmessage']);
$data = array(
'author' => $_G['username'],
'subject' => strip_tags($newsubject, '<u><i><b><font>'),
'type' => $_GET['newtype'],
'starttime' => $newstarttime,
'endtime' => $newendtime,
'message' => $newmessage[0],
);
C::t('forum_announcement')->insert($data);
updatecache(array('announcements', 'announcements_forum'));
cpmsg('announce_succeed', 'action=announce', 'succeed');
}
}
} elseif($operation == 'edit' && $_GET['announceid']) {
$announce = C::t('forum_announcement')->fetch_by_id_username($_GET['announceid'], $_G['username'], $_G['adminid']);
if(!$announce) {
cpmsg('announce_nonexistence', '', 'error');
}
if(!submitcheck('editsubmit')) {
$announce['starttime'] = $announce['starttime'] ? dgmdate($announce['starttime'], 'Y-n-j H:i') : "";
$announce['endtime'] = $announce['endtime'] ? dgmdate($announce['endtime'], 'Y-n-j H:i') : "";
$b = $i = $u = $colorselect = $colorcheck = '';
if(preg_match('/<b>(.*?)<\/b>/i', $announce['subject'])) {
$b = 'class="a"';
}
if(preg_match('/<i>(.*?)<\/i>/i', $announce['subject'])) {
$i = 'class="a"';
}
if(preg_match('/<u>(.*?)<\/u>/i', $announce['subject'])) {
$u = 'class="a"';
}
$colorselect = preg_replace('/<font color=(.*?)>(.*?)<\/font>/i', '$1', $announce['subject']);
$colorselect = strip_tags($colorselect);
$_G['forum_colorarray'] = array(1=>'#EE1B2E', 2=>'#EE5023', 3=>'#996600', 4=>'#3C9D40', 5=>'#2897C5', 6=>'#2B65B7', 7=>'#8F2A90', 8=>'#EC1282');
if(in_array($colorselect, $_G['forum_colorarray'])) {
$colorcheck = "style=\"background: $colorselect\"";
}
shownav('extended', 'announce');
showsubmenu('announce', array(
array('admin', 'announce', 0),
array('add', 'announce&operation=add', 0)
));
showformheader("announce&operation=edit&announceid={$_GET['announceid']}");
showtableheader();
showtitle('announce_edit');
showsetting($lang['subject'], 'newsubject', $announce[subject], 'htmltext');
showsetting('start_time', 'starttimenew', $announce['starttime'], 'calendar', '', 0, '', 1);
showsetting('end_time', 'endtimenew', $announce['endtime'], 'calendar', '', 0, '', 1);
showsetting('announce_type', array('typenew', array(
array(0, $lang['announce_words']),
array(1, $lang['announce_url'])
)), $announce['type'], 'mradio');
showsetting('announce_message', 'messagenew', $announce['message'], 'textarea');
showsubmit('editsubmit');
showtablefooter();
showformfooter();
} else {
if(strpos($_GET['starttimenew'], '-')) {
$starttimenew = strtotime($_GET['starttimenew']);
} else {
$starttimenew = 0;
}
if(strpos($_GET['endtimenew'], '-')) {
$endtimenew = strtotime($_GET['endtimenew']);
} else {
$endtimenew = 0;
}
$subjectnew = trim($_GET['newsubject']);
$messagenew = trim($_GET['messagenew']);
if(!$starttimenew || ($endtimenew && $endtimenew <= TIMESTAMP) || $endtimenew && $starttimenew > $endtimenew) {
cpmsg('announce_time_invalid', '', 'error');
} elseif(!$subjectnew || !$messagenew) {
cpmsg('announce_invalid', '', 'error');
} else {
$messagenew = $_GET['typenew'] == 1 ? explode("\n", $messagenew) : array(0 => $messagenew);
C::t('forum_announcement')->update_by_id_username($_GET['announceid'], array(
'subject' => strip_tags($subjectnew, '<u><i><b><font>'),
'type' => $_GET['typenew'],
'starttime' => $starttimenew,
'endtime' => $endtimenew,
'message' => $messagenew[0],
), $_G['username'], $_G['adminid']);
updatecache(array('announcements', 'announcements_forum'));
cpmsg('announce_succeed', 'action=announce', 'succeed');
}
}
}
echo '<script type="text/javascript" src="static/js/calendar.js"></script>';
?>
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
No preview for this file type
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!