Beispiel #1
0
 function getSalestatus($display = '')
 {
     global $jieqiLang;
     jieqi_loadlang('obook', 'obook');
     if ($display == '') {
         $display = $this->getVar('display', 'n');
     }
     switch ($display) {
         case 1:
             return $jieqiLang['obook']['obook_status_noauth'];
         case 2:
             return $jieqiLang['obook']['obook_status_unsale'];
         case 0:
         default:
             return $jieqiLang['obook']['obook_status_sale'];
     }
 }
Beispiel #2
0
 * 数据库优化
 *
 * 优化和修复数据表
 * 
 * 调用模板:/templates/admin/dboptimize.html
 * 
 * @category   jieqicms
 * @package    system
 * @copyright  Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * @author     $Author: juny $
 * @version    $Id: dboptimize.php 326 2009-02-04 00:26:22Z juny $
 */
define('JIEQI_MODULE_NAME', 'system');
require_once '../global.php';
jieqi_checklogin();
jieqi_loadlang('database', JIEQI_MODULE_NAME);
if ($jieqiUsersStatus != JIEQI_GROUP_ADMIN) {
    jieqi_printfail(LANG_NEED_ADMIN);
}
@set_time_limit(3600);
@session_write_close();
jieqi_includedb();
$db_query = JieqiQueryHandler::getInstance('JieqiQueryHandler');
include_once JIEQI_ROOT_PATH . '/admin/header.php';
if ($_POST['action'] == 'optimize' || $_POST['action'] == 'repair') {
    if (empty($_POST['checkid'])) {
        jieqi_printfail($jieqiLang['system']['need_select_table']);
    }
    $sql = "SHOW TABLE STATUS LIKE '" . JIEQI_DB_PREFIX . "%'";
    $res = $db_query->execute($sql);
    $alltables = array();
Beispiel #3
0
 *
 * 设置文章的本站推荐标志
 * 
 * 调用模板:无
 * 
 * @category   jieqicms
 * @package    article
 * @copyright  Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * @author     $Author: juny $
 * @version    $Id: setgood.php 228 2008-11-27 06:44:31Z juny $
 */
define('JIEQI_MODULE_NAME', 'article');
require_once '../../../global.php';
jieqi_getconfigs(JIEQI_MODULE_NAME, 'power');
jieqi_checkpower($jieqiPower['article']['manageallarticle'], $jieqiUsersStatus, $jieqiUsersGroup, false, true);
jieqi_loadlang('manage', JIEQI_MODULE_NAME);
if (empty($_REQUEST['id'])) {
    jieqi_printfail($jieqiLang['article']['article_not_exists']);
}
include_once $jieqiModules['article']['path'] . '/class/article.php';
$article_handler =& JieqiArticleHandler::getInstance('JieqiArticleHandler');
$article = $article_handler->get($_REQUEST['id']);
if (!is_object($article)) {
    jieqi_printfail($jieqiLang['article']['article_not_exists']);
}
if ($_REQUEST['action'] == 'no') {
    $article->setVar('toptime', 0);
} else {
    $article->setVar('toptime', JIEQI_NOW_TIME);
}
$article_handler->insert($article);
Beispiel #4
0
 * 我的链接
 *
 * 我的友情链接列表,含友情链接增加、编辑、删除、置顶功能
 * 
 * 调用模板:/templates/mylink.html
 * 
 * @category   jieqicms
 * @package    system
 * @copyright  Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * @author     $Author: juny $
 * @version    $Id: mylink.php 332 2009-02-23 09:15:08Z juny $
 */
define('JIEQI_MODULE_NAME', 'system');
require_once 'global.php';
jieqi_checklogin();
jieqi_loadlang('userlink', JIEQI_MODULE_NAME);
jieqi_getconfigs('system', 'configs');
if (empty($_REQUEST['page']) || !is_numeric($_REQUEST['page'])) {
    $_REQUEST['page'] = 1;
}
//页码
//获得允许链接数和现有链接数
jieqi_getconfigs('system', 'honors');
jieqi_getconfigs(JIEQI_MODULE_NAME, 'right');
$maxuserlink = isset($jieqiConfigs['system']['maxuserlink']) ? intval($jieqiConfigs['system']['maxuserlink']) : 0;
$honorid = jieqi_gethonorid($_SESSION['jieqiUserScore'], $jieqiHonors);
if ($honorid && isset($jieqiRight['system']['maxuserlink']['honors'][$honorid]) && is_numeric($jieqiRight['system']['maxuserlink']['honors'][$honorid])) {
    $maxuserlink = intval($jieqiRight['system']['maxuserlink']['honors'][$honorid]);
}
//根据头衔设置的消息数
include_once JIEQI_ROOT_PATH . '/class/userlink.php';
Beispiel #5
0
 * 调用模板:/templates/admin/managemodules.html
 * 
 * @category   jieqicms
 * @package    system
 * @copyright  Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * @author     $Author: juny $
 * @version    $Id: managemodules.php 332 2009-02-23 09:15:08Z juny $
 */
define('JIEQI_MODULE_NAME', 'system');
require_once '../global.php';
jieqi_checklogin();
if ($jieqiUsersStatus != JIEQI_GROUP_ADMIN) {
    jieqi_printfail(LANG_NEED_ADMIN);
}
//jieqi_getconfigs(JIEQI_MODULE_NAME, 'modules','jieqiModules'); //系统已经载入
jieqi_loadlang('modules', JIEQI_MODULE_NAME);
if (!empty($_REQUEST['dosubmit'])) {
    foreach ($_REQUEST['jieqiModules'] as $k => $v) {
        $jieqiModules[$k] = $v;
    }
    $jieqiModules = $_REQUEST['jieqiModules'];
    //jieqi_setconfigs('modules','jieqiModules',$jieqiModules, JIEQI_MODULE_NAME);
    jieqi_save_modconfig($jieqiModules);
    jieqi_jumppage(JIEQI_URL . '/admin/managemodules.php', LANG_DO_SUCCESS, $jieqiLang['system']['modules_config_saved']);
}
include_once JIEQI_ROOT_PATH . '/admin/header.php';
if (!isset($jieqiModules)) {
    $jieqiModules = array();
}
$fileroot = JIEQI_ROOT_PATH . '/modules';
$handle = opendir($fileroot);
Beispiel #6
0
 * SMS支付-返回处理
 *
 * SMS支付-返回处理
 * 
 * 调用模板:无
 * 
 * @category   jieqicms
 * @package    pay
 * @copyright  Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * @author     $Author: juny $
 * @version    $Id: smsreturn.php 234 2008-11-28 01:53:06Z juny $
 */
define('JIEQI_MODULE_NAME', 'pay');
define('JIEQI_PAY_TYPE', 'sms');
require_once '../../global.php';
jieqi_loadlang('pay', JIEQI_MODULE_NAME);
jieqi_getconfigs(JIEQI_MODULE_NAME, JIEQI_PAY_TYPE, 'jieqiPayset');
$mycorpid = $jieqiPayset[JIEQI_PAY_TYPE]['payid'];
//企业编码
$mydest = $jieqiPayset[JIEQI_PAY_TYPE]['mydest'];
//短信特服号
$emoney = $jieqiPayset[JIEQI_PAY_TYPE]['emoney'];
//扣取的钱(分)
$egold = $jieqiPayset[JIEQI_PAY_TYPE]['egold'];
//默认虚拟货币
$ptype = $jieqiPayset[JIEQI_PAY_TYPE]['ptype'];
//接收方手机类型。1=移动手机,2=联通手机
$sid = $jieqiPayset[JIEQI_PAY_TYPE]['sid'];
//1315 小说点播阅读 1000 免费帮助
$mtype = $jieqiPayset[JIEQI_PAY_TYPE]['mtype'];
//0=免费信息,1=按条收费短信,2=正常包月短信,3=包月话单
Beispiel #7
0
    if (JIEQI_USE_CACHE) {
        header('Location: ' . JIEQI_URL . '/' . $_REQUEST['target']);
        exit;
    } else {
        ob_start();
        include_once JIEQI_ROOT_PATH . '/' . $_REQUEST['target'];
        $content = ob_get_contents();
        ob_end_clean();
        echo preg_replace('/\\<meta[^\\<\\>]*content[\\s]*=[\\s]*(\'|")?[^\\/;]*\\/[^\\/;]*;[\\s]*charset[\\s]*=[\\s]*(gb2312|gbk)(\'|")?[^\\<\\>]*\\>/is', '<meta http-equiv="Content-Type" content="text/html; charset=big5" />', $content);
        exit;
    }
}
//包含页头页尾
include_once JIEQI_ROOT_PATH . '/header.php';
//载入语言
jieqi_loadlang('index', JIEQI_MODULE_NAME);
if (!empty($_REQUEST['refresh']) && empty($_REQUEST['confirm'])) {
    jieqi_msgwin(LANG_NOTICE, sprintf($jieqiLang['system']['sindex_confirm_notice'], jieqi_addurlvars(array('confirm' => 1))));
}
//包含区块参数
if (empty($_REQUEST['blocks']) || strlen($_REQUEST['blocks']) > 30 || !preg_match('/^\\w+$/', $_REQUEST['blocks'])) {
    $_REQUEST['blocks'] = 'blocks';
}
jieqi_getconfigs('system', $_REQUEST['blocks'], 'jieqiBlocks');
//设置该页面的模板文件
if (!empty($_REQUEST['template']) && strlen($_REQUEST['template']) <= 30 && preg_match('/^\\w+\\.html?$/', $_REQUEST['template'])) {
    $jieqiTset['jieqi_page_template'] = JIEQI_ROOT_PATH . '/templates/' . trim($_REQUEST['template']);
} else {
    $jieqiTset['jieqi_page_template'] = '';
}
if (empty($jieqiTset['jieqi_page_template']) || !is_file($jieqiTset['jieqi_page_template'])) {
Beispiel #8
0
 * 调用模板:/modules/obook/templates/share/sharelogin.html
 * 
 * @category   jieqicms
 * @package    obook
 * @copyright  Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * @author     $Author: juny $
 * @version    $Id: sharelogin.php 326 2009-02-04 00:26:22Z juny $
 */
define('JIEQI_MODULE_NAME', 'obook');
define('JIEQI_ADMIN_LOGIN', 1);
//if(JIEQI_LOCAL_URL != JIEQI_USER_URL) header('Location: '.JIEQI_USER_URL.jieqi_addurlvars(array()));
if ($_REQUEST['action'] == 'login') {
    define('JIEQI_NEED_SESSION', 1);
}
require_once '../../../global.php';
jieqi_loadlang('share', JIEQI_MODULE_NAME);
jieqi_getconfigs(JIEQI_MODULE_NAME, 'publisher');
jieqi_getconfigs(JIEQI_MODULE_NAME, 'configs');
if (!isset($_REQUEST['action'])) {
    $_REQUEST['action'] = '';
}
if ($_REQUEST['action'] == 'login' && isset($_REQUEST['publishid'])) {
    $_REQUEST['publishid'] = intval($_REQUEST['publishid']);
    if (isset($jieqiPublisher[$_REQUEST['publishid']]) && $jieqiPublisher[$_REQUEST['publishid']]['password'] == $_REQUEST['password'] && !empty($_REQUEST['password'])) {
        $_SESSION['jieqiPublishid'] = $_REQUEST['publishid'];
        if (empty($_REQUEST['jumpurl'])) {
            $_REQUEST['jumpurl'] = $jieqiModules['obook']['url'] . '/share/sharestat.php';
        }
        jieqi_jumppage($_REQUEST['jumpurl'], LANG_DO_SUCCESS, $jieqiLang['obook']['share_login_success']);
    } else {
        jieqi_printfail($jieqiLang['obook']['share_login_error']);
Beispiel #9
0
//检查权限
jieqi_getconfigs('system', 'power');
if (!jieqi_checkpower($jieqiPower['system']['deluser'], $jieqiUsersStatus, $jieqiUsersGroup, true, true) || !jieqi_checkpower($jieqiPower['system']['adminvip'], $jieqiUsersStatus, $jieqiUsersGroup, true, true)) {
    jieqi_printfail(LANG_NO_PERMISSION);
}
if (empty($_REQUEST['uid']) || !is_numeric($_REQUEST['uid'])) {
    jieqi_printfail(LANG_ERROR_PARAMETER);
}
$_REQUEST['uid'] = intval($_REQUEST['uid']);
include_once JIEQI_ROOT_PATH . '/class/users.php';
$users_handler =& JieqiUsersHandler::getInstance('JieqiUsersHandler');
$user = $users_handler->get($_REQUEST['uid']);
if (!is_object($user)) {
    jieqi_printfail(LANG_NO_USER);
}
jieqi_loadlang('egold', JIEQI_MODULE_NAME);
//LANG_ERROR_PARAMETER
if (!isset($_REQUEST['action'])) {
    $_REQUEST['action'] = 'show';
}
$uid = $user->getVar('uid');
$uname = $user->getVar('name');
if (strlen($uname) == 0) {
    $uname = $user->getVar('uname');
}
$uname_n = $user->getVar('name', 'n');
if (strlen($uname_n) == 0) {
    $uname_n = $user->getVar('uname', 'n');
}
switch ($_REQUEST['action']) {
    case 'update':
Beispiel #10
0
/**
 * 编辑章节
 *
 * 编辑章节
 * 
 * 调用模板:无
 * 
 * @category   jieqicms
 * @package    obook
 * @copyright  Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * @author     $Author: juny $
 * @version    $Id: chapteredit.php 231 2008-11-27 08:46:26Z juny $
 */
define('JIEQI_MODULE_NAME', 'obook');
require_once '../../global.php';
jieqi_loadlang('obook', JIEQI_MODULE_NAME);
if ($_POST['chaptertype'] == 1) {
    $typename = $jieqiLang['obook']['volume_name'];
} else {
    $typename = $jieqiLang['obook']['chapter_name'];
}
if (empty($_REQUEST['id'])) {
    jieqi_printfail(sprintf($jieqiLang['obook']['chapter_volume_notexists'], $typename));
}
include_once $jieqiModules['obook']['path'] . '/class/ochapter.php';
$chapter_handler =& JieqiOchapterHandler::getInstance('JieqiOchapterHandler');
$chapter = $chapter_handler->get($_REQUEST['id']);
if (!$chapter) {
    jieqi_printfail(sprintf($jieqiLang['obook']['chapter_volume_notexists'], $typename));
}
if ($chapter->getVar('chaptertype') == 1) {
Beispiel #11
0
/**
 * 用户接口,编辑处理
 * 
 * @param      array       $params 参数数组
 * 必须参数: $params['username'] - 用户名,$params['password'] - 密码,$params['email'] - 邮箱
 * @access     public
 * @return     int    
 */
function jieqi_uedit_iprocess(&$params)
{
    global $jieqiLang;
    if (!isset($jieqiLang['system'])) {
        jieqi_loadlang('users', 'system');
    }
    $lang_success = empty($_REQUEST['lang_success']) ? $jieqiLang['system']['change_user_success'] : $_REQUEST['lang_success'];
    if (defined('JIEQI_WAP_PAGE')) {
        jieqi_wapgourl($params['jumpurl']);
    } elseif ($_REQUEST['jumphide']) {
        header('Location: ' . $params['jumpurl']);
    } else {
        jieqi_jumppage($params['jumpurl'], LANG_DO_SUCCESS, $lang_success);
    }
    return true;
}
Beispiel #12
0
 * 网盈一号通-充值确认 (http://www.vnetone.com)
 * 
 * 调用模板:/modules/pay/templates/vnetone.html
 * 
 * @category   jieqicms
 * @package    pay
 * @copyright  Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * @author     $Author: juny $
 * @version    $Id: vnetoneconfirm.php 312 2008-12-29 05:30:54Z juny $
 */
define('JIEQI_MODULE_NAME', 'pay');
define('JIEQI_PAY_TYPE', 'vnetone');
require_once '../../global.php';
jieqi_checklogin();
jieqi_loadlang('pay', JIEQI_MODULE_NAME);
jieqi_loadlang('vnetone', JIEQI_MODULE_NAME);
jieqi_getconfigs(JIEQI_MODULE_NAME, JIEQI_PAY_TYPE, 'jieqiPayset');
if (isset($_REQUEST['egold']) && is_numeric($_REQUEST['egold']) && $_REQUEST['egold'] > 0) {
    $_REQUEST['egold'] = intval($_REQUEST['egold']);
    if (!empty($jieqiPayset[JIEQI_PAY_TYPE]['paylimit'])) {
        if (!empty($jieqiPayset[JIEQI_PAY_TYPE]['paylimit'][$_REQUEST['egold']])) {
            $money = intval($jieqiPayset[JIEQI_PAY_TYPE]['paylimit'][$_REQUEST['egold']]);
        } else {
            jieqi_printfail($jieqiLang['pay']['buy_type_error']);
        }
    } else {
        $money = round(intval($_REQUEST['egold']) / 100);
    }
    include_once $jieqiModules['pay']['path'] . '/class/paylog.php';
    $paylog_handler = JieqiPaylogHandler::getInstance('JieqiPaylogHandler');
    $paylog = $paylog_handler->create();
Beispiel #13
0
 *
 * 九州网联116电话支付-返回处理 (http://www.116.com.cn)
 * 
 * 调用模板:无
 * 
 * @category   jieqicms
 * @package    pay
 * @copyright  Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * @author     $Author: juny $
 * @version    $Id: 9zfeereturn.php 234 2008-11-28 01:53:06Z juny $
 */
define('JIEQI_MODULE_NAME', 'pay');
define('JIEQI_PAY_TYPE', '9zfee');
require_once '../../global.php';
jieqi_loadlang('pay', JIEQI_MODULE_NAME);
jieqi_loadlang('9zfee', JIEQI_MODULE_NAME);
jieqi_getconfigs(JIEQI_MODULE_NAME, JIEQI_PAY_TYPE, 'jieqiPayset');
$mycpid = $jieqiPayset[JIEQI_PAY_TYPE]['payid'];
//CP编号
$key = $jieqiPayset[JIEQI_PAY_TYPE]['paykey'];
//密钥
//1-----------接收回的信息--------------------------------------------------------------------
$cp_id = trim($_REQUEST['cp_id']);
$prod_id = trim($_REQUEST['prod_id']);
$rand_id = trim($_REQUEST['rand_id']);
$pay_id = trim($_REQUEST['pay_id']);
$valid_time = trim($_REQUEST['valid_time']);
$money_type = trim($_REQUEST['money_type']);
$price = trim($_REQUEST['price']);
$result = trim($_REQUEST['result']);
$md5 = substr(trim($_REQUEST['md5']), 0, 32);
Beispiel #14
0
 * @copyright  Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * @author     $Author: juny $
 * @version    $Id: blockedit.php 344 2009-06-23 03:06:07Z juny $
 */
if (empty($_GET['mod'])) {
    $_GET['mod'] = 'system';
}
define('JIEQI_MODULE_NAME', $_GET['mod']);
require_once '../global.php';
//检查权限
include_once JIEQI_ROOT_PATH . '/class/power.php';
$power_handler =& JieqiPowerHandler::getInstance('JieqiPowerHandler');
$power_handler->getSavedVars($_GET['mod']);
jieqi_checkpower($jieqiPower[$_GET['mod']]['adminblock'], $jieqiUsersStatus, $jieqiUsersGroup, false, true);
//载入语言
jieqi_loadlang('blocks', JIEQI_MODULE_NAME);
//取得设置
if (empty($_REQUEST['id'])) {
    jieqi_printfail($jieqiLang['system']['block_not_exists']);
}
include_once JIEQI_ROOT_PATH . '/class/blocks.php';
$blocks_handler =& JieqiBlocksHandler::getInstance('JieqiBlocksHandler');
$block = $blocks_handler->get($_REQUEST['id']);
if (!is_object($block)) {
    jieqi_printfail($jieqiLang['system']['block_not_exists']);
}
include_once JIEQI_ROOT_PATH . '/admin/header.php';
//区块名称
include_once JIEQI_ROOT_PATH . '/class/modules.php';
$modules_handler =& JieqiModulesHandler::getInstance('JieqiModulesHandler');
$criteria = new CriteriaCompo(new Criteria('publish', 1, '='));
Beispiel #15
0
 * 
 * @category   jieqicms
 * @package    article
 * @copyright  Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * @author     $Author: juny $
 * @version    $Id: packshow.php 339 2009-06-23 03:03:24Z juny $
 */
define('JIEQI_MODULE_NAME', 'article');
if (!defined('JIEQI_GLOBAL_INCLUDE')) {
    include_once '../../global.php';
}
$_REQUEST['id'] = intval($_REQUEST['id']);
if (empty($_REQUEST['id']) && empty($_REQUEST['name'])) {
    jieqi_printfail(LANG_ERROR_PARAMETER);
}
jieqi_loadlang('down', JIEQI_MODULE_NAME);
if (empty($_REQUEST['id']) && !empty($_REQUEST['name'])) {
    include_once $jieqiModules['article']['path'] . '/class/article.php';
    $article_handler =& JieqiArticleHandler::getInstance('JieqiArticleHandler');
    $criteria = new CriteriaCompo(new Criteria('articlename', $_REQUEST['name'], '='));
    $article_handler->queryObjects($criteria);
    $article = $article_handler->getObject();
    if (is_object($article)) {
        $_REQUEST['id'] = intval($article->getVar('articleid', 'n'));
    } else {
        jieqi_printfail($jieqiLang['article']['article_not_exists']);
    }
}
if (empty($_REQUEST['id'])) {
    jieqi_printfail(LANG_ERROR_PARAMETER);
}
Beispiel #16
0
 * @copyright  Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * @author     $Author: juny $
 * @version    $Id: power.php 344 2009-06-23 03:06:07Z juny $
 */
if (empty($_REQUEST['mod'])) {
    $_REQUEST['mod'] = 'system';
}
define('JIEQI_MODULE_NAME', 'system');
require_once '../global.php';
//检查权限
include_once JIEQI_ROOT_PATH . '/class/power.php';
$power_handler =& JieqiPowerHandler::getInstance('JieqiPowerHandler');
$power_handler->getSavedVars($_REQUEST['mod']);
jieqi_checkpower($jieqiPower[$_REQUEST['mod']]['adminpower'], $jieqiUsersStatus, $jieqiUsersGroup, false, true);
//载入语言
jieqi_loadlang('power', JIEQI_MODULE_NAME);
if (count($jieqiPower[$_REQUEST['mod']]) > 0) {
    if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'update') {
        foreach ($jieqiPower[$_REQUEST['mod']] as $k => $v) {
            if (!isset($_POST[$k])) {
                $_POST[$k] = '';
            }
            if ($v['groups'] != $_POST[$k]) {
                $jieqiPower[$_REQUEST['mod']][$k]['groups'] = $_POST[$k];
                $power_handler->db->query("UPDATE " . jieqi_dbprefix('system_power') . " SET pgroups='" . jieqi_dbslashes(serialize($_POST[$k])) . "' WHERE modname='" . jieqi_dbslashes($_REQUEST['mod']) . "' AND pname='" . jieqi_dbslashes($k) . "'");
            }
        }
        jieqi_setconfigs('power', 'jieqiPower', $jieqiPower, $_REQUEST['mod']);
        //记录日志
        include_once JIEQI_ROOT_PATH . '/class/logs.php';
        $logs_handler = JieqiLogsHandler::getInstance('JieqiLogsHandler');
Beispiel #17
0
 * 显示作家申请信息
 * 
 * 调用模板:/modules/article/templates/admin/applyinfo.html
 * 
 * @category   jieqicms
 * @package    article
 * @copyright  Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * @author     $Author: juny $
 * @version    $Id: applyinfo.php 326 2009-02-04 00:26:22Z juny $
 */
define('JIEQI_MODULE_NAME', 'article');
require_once '../../../global.php';
if (empty($_REQUEST['id'])) {
    jieqi_printfail(LANG_ERROR_PARAMETER);
}
jieqi_loadlang('applywriter', JIEQI_MODULE_NAME);
include_once $jieqiModules['article']['path'] . '/class/applywriter.php';
$apply_handler =& JieqiApplywriterHandler::getInstance('JieqiApplywriterHandler');
$applywriter = $apply_handler->get($_REQUEST['id']);
if (!is_object($applywriter)) {
    jieqi_printfail($jieqiLang['article']['applywriter_not_exists']);
}
//jieqi_getconfigs(JIEQI_MODULE_NAME, 'configs');
//包含页头处理
include_once JIEQI_ROOT_PATH . '/header.php';
$jieqiTpl->setCaching(0);
$jieqiTpl->assign('applyid', $applywriter->getVar('applyid'));
$jieqiTpl->assign('applytime', date(JIEQI_DATE_FORMAT . ' ' . JIEQI_TIME_FORMAT, $applywriter->getVar('applytime')));
$jieqiTpl->assign('applyuid', $applywriter->getVar('applyuid'));
$jieqiTpl->assign('applyname', $applywriter->getVar('applyname'));
$jieqiTpl->assign('applytitle', $applywriter->getVar('applytitle'));
Beispiel #18
0
 *
 * 显示作家自己的文章
 * 
 * 调用模板:/modules/article/templates/masterpage.html
 * 
 * @category   jieqicms
 * @package    article
 * @copyright  Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * @author     $Author: juny $
 * @version    $Id: masterpage.php 332 2009-02-23 09:15:08Z juny $
 */
define('JIEQI_MODULE_NAME', 'article');
require_once '../../global.php';
jieqi_getconfigs('article', 'power');
jieqi_checkpower($jieqiPower['article']['authorpanel'], $jieqiUsersStatus, $jieqiUsersGroup, false);
jieqi_loadlang('list', JIEQI_MODULE_NAME);
include_once JIEQI_ROOT_PATH . '/header.php';
include_once $jieqiModules['article']['path'] . '/class/article.php';
$article_handler =& JieqiArticleHandler::getInstance('JieqiArticleHandler');
jieqi_getconfigs(JIEQI_MODULE_NAME, 'sort');
jieqi_getconfigs(JIEQI_MODULE_NAME, 'configs');
$article_static_url = empty($jieqiConfigs['article']['staticurl']) ? $jieqiModules['article']['url'] : $jieqiConfigs['article']['staticurl'];
$article_dynamic_url = empty($jieqiConfigs['article']['dynamicurl']) ? $jieqiModules['article']['url'] : $jieqiConfigs['article']['dynamicurl'];
//载入相关处理函数
include_once $jieqiModules['article']['path'] . '/include/funarticle.php';
$jieqiTpl->assign('article_static_url', $article_static_url);
$jieqiTpl->assign('article_dynamic_url', $article_dynamic_url);
//页码
if (empty($_REQUEST['page']) || !is_numeric($_REQUEST['page'])) {
    $_REQUEST['page'] = 1;
}
Beispiel #19
0
 * µ÷ÓÃÄ£°å£ºÎÞ
 * 
 * @category   jieqicms
 * @package    article
 * @copyright  Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * @author     $Author: juny $
 * @version    $Id: draftedit.php 300 2008-12-26 04:36:06Z juny $
 */
define('JIEQI_MODULE_NAME', 'article');
require_once '../../global.php';
if (empty($_REQUEST['id'])) {
    jieqi_printfail(LANG_ERROR_PARAMETER);
}
jieqi_getconfigs(JIEQI_MODULE_NAME, 'power');
jieqi_checkpower($jieqiPower['article']['newdraft'], $jieqiUsersStatus, $jieqiUsersGroup, false);
jieqi_loadlang('draft', JIEQI_MODULE_NAME);
include_once $jieqiModules['article']['path'] . '/class/draft.php';
$draft_handler =& JieqiDraftHandler::getInstance('JieqiDraftHandler');
$draft = $draft_handler->get($_REQUEST['id']);
if (!$draft) {
    jieqi_printfail($jieqiLang['article']['draft_not_exists']);
}
if ($draft->getVar('posterid') != $_SESSION['jieqiUserId']) {
    jieqi_printfail($jieqiLang['article']['noper_manage_draft']);
}
jieqi_getconfigs(JIEQI_MODULE_NAME, 'configs');
$article_static_url = empty($jieqiConfigs['article']['staticurl']) ? $jieqiModules['article']['url'] : $jieqiConfigs['article']['staticurl'];
$article_dynamic_url = empty($jieqiConfigs['article']['dynamicurl']) ? $jieqiModules['article']['url'] : $jieqiConfigs['article']['dynamicurl'];
if (!isset($_REQUEST['action'])) {
    $_REQUEST['action'] = 'edit';
}
Beispiel #20
0
 * 
 * @category   jieqicms
 * @package    system
 * @copyright  Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * @author     $Author: juny $
 * @version    $Id: honors.php 332 2009-02-23 09:15:08Z juny $
 */
define('JIEQI_MODULE_NAME', 'system');
require_once '../global.php';
//检查权限
include_once JIEQI_ROOT_PATH . '/class/power.php';
$power_handler =& JieqiPowerHandler::getInstance('JieqiPowerHandler');
$power_handler->getSavedVars('system');
jieqi_checkpower($jieqiPower['system']['adminconfig'], $jieqiUsersStatus, $jieqiUsersGroup, false, true);
//载入语言
jieqi_loadlang('honors', JIEQI_MODULE_NAME);
include_once JIEQI_ROOT_PATH . '/lib/html/formloader.php';
include_once JIEQI_ROOT_PATH . '/class/honors.php';
$honors_handler =& JieqihonorsHandler::getInstance('JieqihonorsHandler');
if (empty($_REQUEST['action'])) {
    $_REQUEST['action'] = 'show';
}
switch ($_REQUEST['action']) {
    case 'new':
        $errtext = '';
        if (empty($_POST['caption'])) {
            $errtext .= $jieqiLang['system']['need_honor_caption'] . '<br />';
        }
        if (!is_numeric($_POST['minscore'])) {
            $errtext .= $jieqiLang['system']['need_minscore_num'] . '<br />';
        }
Beispiel #21
0
/**
 * 发帖提交后的附件校验
 * 
 * @param      array       $post_set 附件信息设置
 * @param      array       $configs 检查相关参数设置
 * @param      array       $check_errors 错误信息数组
 * @param      array       $attachary 处理后的附件信息数组
 * @access     public
 * @return     void
 */
function jieqi_post_checkattach(&$post_set, $configs, &$check_errors, &$attachary)
{
    global $jieqiLang;
    if (!isset($jieqiLang['system']['post'])) {
        jieqi_loadlang('post', 'system');
    }
    $attachary = array();
    $attachnum = 0;
    if (!is_array($check_errors)) {
        $check_errors = array();
    }
    $num_errors = count($check_errors);
    //检查上传文件
    if (is_numeric($configs['maxattachnum']) && $configs['maxattachnum'] > 0 && empty($check_errors)) {
        $maxfilenum = intval($configs['maxattachnum']);
        $typeary = explode(' ', trim($configs['attachtype']));
        if (!empty($post_set['attachfile']['name'])) {
            foreach ($post_set['attachfile']['name'] as $k => $v) {
                if (!empty($v)) {
                    $tmpary = explode('.', $v);
                    $tmpint = count($tmpary) - 1;
                    $tmpary[$tmpint] = strtolower(trim($tmpary[$tmpint]));
                    $denyary = array('htm', 'html', 'shtml', 'php', 'asp', 'aspx', 'jsp', 'pl', 'cgi');
                    if (empty($tmpary[$tmpint]) || !in_array($tmpary[$tmpint], $typeary)) {
                        $check_errors[] = sprintf($jieqiLang['system']['post_uptype_error'], $v);
                    } elseif (in_array($tmpary[$tmpint], $denyary)) {
                        $check_errors[] = sprintf($jieqiLang['system']['post_uptype_safe'], $tmpary[$tmpint]);
                    }
                    if (eregi("\\.(gif|jpg|jpeg|png|bmp)\$", $v)) {
                        $fclass = 'image';
                        if ($post_set['attachfile']['size'][$k] > intval($configs['maximagesize']) * 1024) {
                            $check_errors[] = sprintf($jieqiLang['system']['post_upsize_over'], $v, intval($configs['maximagesize']));
                        }
                    } else {
                        $fclass = 'file';
                        if ($post_set['attachfile']['size'][$k] > intval($configs['maxfilesize']) * 1024) {
                            $check_errors[] = sprintf($jieqiLang['system']['post_upsize_over'], $v, intval($configs['maxfilesize']));
                        }
                    }
                    $attachary[$attachnum] = array('name' => $v, 'class' => $fclass, 'postfix' => $tmpary[$tmpint], 'size' => $post_set['attachfile']['size'][$k], 'order' => $k);
                    $attachnum++;
                }
            }
        }
    }
    //验证有错误的话删除附件临时文件
    if (!empty($check_errors) && !empty($post_set['attachfile']['name'])) {
        foreach ($post_set['attachfile']['name'] as $k => $v) {
            jieqi_delfile($post_set['attachfile']['tmp_name'][$k]);
        }
    }
    return count($check_errors) > $num_errors ? false : true;
}
Beispiel #22
0
 *
 * ʢ��֧��-����״̬ (http://www.snda.com.cn)
 * 
 * ����ģ�壺��
 * 
 * @category   jieqicms
 * @package    pay
 * @copyright  Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * @author     $Author: juny $
 * @version    $Id: sndacardshow.php 234 2008-11-28 01:53:06Z juny $
 */
define('JIEQI_MODULE_NAME', 'pay');
define('JIEQI_PAY_TYPE', 'sndacard');
require_once '../../global.php';
jieqi_loadlang('pay', JIEQI_MODULE_NAME);
jieqi_loadlang('snda', JIEQI_MODULE_NAME);
switch ($_REQUEST['retcode']) {
    case 1:
        jieqi_msgwin(LANG_DO_SUCCESS, sprintf($jieqiLang['pay']['buy_egold_success'], jieqi_htmlstr($_REQUEST['buyname']), JIEQI_EGOLD_NAME, jieqi_htmlstr($_REQUEST['egold'])));
        break;
    case -1002:
        jieqi_printfail($jieqiLang['pay']['errmsg_card_password']);
        break;
    case -1003:
        jieqi_printfail($jieqiLang['pay']['errmsg_card_used']);
        break;
    case -2004:
        jieqi_printfail($jieqiLang['pay']['errmsg_card_cant']);
        break;
    case -1:
        jieqi_printfail($jieqiLang['pay']['errmsg_syatem']);
Beispiel #23
0
 * 显示文章投票调查结果
 * 
 * 调用模板:无
 * 
 * @category   jieqicms
 * @package    article
 * @copyright  Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * @author     $Author: juny $
 * @version    $Id: voteresult.php 332 2009-02-23 09:15:08Z juny $
 */
define('JIEQI_MODULE_NAME', 'article');
require_once '../../global.php';
if (empty($_REQUEST['id'])) {
    jieqi_printfail(LANG_ERROR_PARAMETER);
}
jieqi_loadlang('avote', JIEQI_MODULE_NAME);
$_REQUEST['id'] = intval($_REQUEST['id']);
jieqi_includedb();
$query = JieqiQueryHandler::getInstance('JieqiQueryHandler');
$criteria = new CriteriaCompo();
$criteria->setTables(jieqi_dbprefix('article_avote') . " AS v LEFT JOIN " . jieqi_dbprefix('article_avstat') . " AS s ON v.voteid=s.voteid");
$criteria->add(new Criteria('v.voteid', $_REQUEST['id'], '='));
$criteria->setLimit(1);
$criteria->setSort('v.voteid');
$criteria->setOrder('DESC');
$query->queryObjects($criteria);
$voteres = $query->getObject();
if (!$voteres) {
    jieqi_printfail($jieqiLang['article']['avote_not_exists']);
}
//包含区块参数
Beispiel #24
0
 * ÇåÀí±àÒ뻺´æ¡¢ÍøÒ³»º´æºÍÇø¿é»º´æ
 * 
 * µ÷ÓÃÄ£°å£ºÎÞ
 * 
 * @category   jieqicms
 * @package    system
 * @copyright  Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * @author     $Author: juny $
 * @version    $Id: cleancache.php 320 2009-01-13 05:51:02Z juny $
 */
define('JIEQI_MODULE_NAME', 'system');
require_once '../global.php';
jieqi_checklogin();
@set_time_limit(600);
@session_write_close();
jieqi_loadlang('cache', JIEQI_MODULE_NAME);
if ($jieqiUsersStatus != JIEQI_GROUP_ADMIN) {
    jieqi_printfail(LANG_NEED_ADMIN);
}
if (empty($_REQUEST['target'])) {
    jieqi_printfail(LANG_ERROR_PARAMETER);
} elseif ($_REQUEST['confirm'] != 1) {
    jieqi_msgwin(LANG_NOTICE, sprintf($jieqiLang['system']['cache_clean_notice'], jieqi_addurlvars(array('confirm' => 1))));
}
if ($_REQUEST['target'] == 'all') {
    echo '                                                                                                                                                                                                                                                                ';
    echo $jieqiLang['system']['start_clean_cache'];
    ob_flush();
    flush();
    jieqi_clean_pagecache();
    echo $jieqiLang['system']['start_clean_blockcache'];
Beispiel #25
0
 //检查标题
 if (strlen($_POST['chaptername']) == 0) {
     $errtext .= $typename . $jieqiLang['article']['need_chapter_title'] . '<br />';
 }
 //检查标题和内容有没有违禁单词
 if (!isset($jieqiConfigs['system'])) {
     jieqi_getconfigs('system', 'configs');
 }
 if (!empty($jieqiConfigs['system']['postdenywords'])) {
     include_once JIEQI_ROOT_PATH . '/include/checker.php';
     $checker = new JieqiChecker();
     $matchwords1 = $checker->deny_words($_POST['chaptername'], $jieqiConfigs['system']['postdenywords'], true);
     $matchwords2 = $checker->deny_words($_POST['chaptercontent'], $jieqiConfigs['system']['postdenywords'], true);
     if (is_array($matchwords1) || is_array($matchwords2)) {
         if (!isset($jieqiLang['system']['post'])) {
             jieqi_loadlang('post', 'system');
         }
         $matchwords = array();
         if (is_array($matchwords1)) {
             $matchwords = array_merge($matchwords, $matchwords1);
         }
         if (is_array($matchwords2)) {
             $matchwords = array_merge($matchwords, $matchwords2);
         }
         $errtext .= sprintf($jieqiLang['system']['post_words_deny'], implode(' ', jieqi_funtoarray('htmlspecialchars', $matchwords)));
     }
 }
 //检查附件
 $attachary = array();
 $infoary = array();
 $attachnum = 0;
Beispiel #26
0
function article_make_atoplist($fid = 1, $tid = 0, $static = true, $output = false)
{
    global $jieqiLang;
    jieqi_loadlang('manage', 'article');
    $topary = array('allvisit' => $jieqiLang['article']['top_allvisit'], 'monthvisit' => $jieqiLang['article']['top_monthvisit'], 'weekvisit' => $jieqiLang['article']['top_weekvisit'], 'dayvisit' => $jieqiLang['article']['top_dayvisit'], 'allauthorvisit' => $jieqiLang['article']['top_avall'], 'monthauthorvisit' => $jieqiLang['article']['top_avmonth'], 'weekauthorvisit' => $jieqiLang['article']['top_avweek'], 'dayauthorvisit' => $jieqiLang['article']['top_avday'], 'allvote' => $jieqiLang['article']['top_voteall'], 'monthvote' => $jieqiLang['article']['top_votemonth'], 'weekvote' => $jieqiLang['article']['top_voteweek'], 'dayvote' => $jieqiLang['article']['top_voteday_titile'], 'postdate' => $jieqiLang['article']['top_postdate'], 'toptime' => $jieqiLang['article']['top_toptime'], 'goodnum' => $jieqiLang['article']['top_goodnum'], 'size' => $jieqiLang['article']['top_size'], 'authorupdate' => $jieqiLang['article']['top_authorupdate'], 'masterupdate' => $jieqiLang['article']['top_masterupdate'], 'lastupdate' => $jieqiLang['article']['top_lastupdate']);
    foreach ($topary as $k => $v) {
        if ($output) {
            echo '<br />' . $v . '<br />';
            ob_flush();
            flush();
        }
        article_make_stoplist($k, $fid, $tid, $static, $output);
    }
}
Beispiel #27
0
<?php

/**
 * ÏÔʾ·Ö¾íÔĶÁ
 *
 * ÏÔʾ·Ö¾íÔĶÁ
 * 
 * µ÷ÓÃÄ£°å£ºÎÞ
 * 
 * @category   jieqicms
 * @package    article
 * @copyright  Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * @author     $Author: juny $
 * @version    $Id: showvolume.php 228 2008-11-27 06:44:31Z juny $
 */
define('JIEQI_MODULE_NAME', 'article');
require_once '../../global.php';
if (empty($_REQUEST['aid']) || empty($_REQUEST['vid'])) {
    jieqi_printfail(LANG_ERROR_PARAMETER);
}
include_once $jieqiModules['article']['path'] . '/class/package.php';
$package = new JieqiPackage($_REQUEST['aid']);
if ($package->loadOPF()) {
    $package->showVolume($_REQUEST['vid']);
} else {
    jieqi_loadlang('article', JIEQI_MODULE_NAME);
    jieqi_printfail($jieqiLang['article']['article_not_exists']);
}
Beispiel #28
0
 * 编辑采集规则
 * 
 * 调用模板:无
 * 
 * @category   jieqicms
 * @package    article
 * @copyright  Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * @author     $Author: juny $
 * @version    $Id: collectedit.php 228 2008-11-27 06:44:31Z juny $
 */
define('JIEQI_MODULE_NAME', 'article');
require_once '../../../global.php';
jieqi_getconfigs(JIEQI_MODULE_NAME, 'power');
//发表文章权限
jieqi_checkpower($jieqiPower['article']['adminconfig'], $jieqiUsersStatus, $jieqiUsersGroup, false);
jieqi_loadlang('collect', JIEQI_MODULE_NAME);
jieqi_getconfigs(JIEQI_MODULE_NAME, 'collectsite');
jieqi_getconfigs(JIEQI_MODULE_NAME, 'configs');
$article_static_url = empty($jieqiConfigs['article']['staticurl']) ? $jieqiModules['article']['url'] : $jieqiConfigs['article']['staticurl'];
$article_dynamic_url = empty($jieqiConfigs['article']['dynamicurl']) ? $jieqiModules['article']['url'] : $jieqiConfigs['article']['dynamicurl'];
if (empty($_REQUEST['config']) || !file_exists(JIEQI_ROOT_PATH . '/configs/article/site_' . $_REQUEST['config'] . '.php')) {
    jieqi_printfail($jieqiLang['article']['rule_not_exists']);
}
include_once JIEQI_ROOT_PATH . '/configs/article/site_' . $_REQUEST['config'] . '.php';
include_once $jieqiModules['article']['path'] . '/include/collectfunction.php';
if (!isset($_REQUEST['action'])) {
    $_REQUEST['action'] = 'show';
}
switch ($_REQUEST['action']) {
    case 'edit':
        $editCollect = array();
Beispiel #29
0
 *
 * 埃文手机声讯-充值码确认 (http://www.ivansms.com)
 * 
 * 调用模板:无
 * 
 * @category   jieqicms
 * @package    pay
 * @copyright  Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * @author     $Author: juny $
 * @version    $Id: ivancallconfirm.php 234 2008-11-28 01:53:06Z juny $
 */
define('JIEQI_MODULE_NAME', 'pay');
define('JIEQI_PAY_TYPE', 'ivancall');
require_once '../../global.php';
jieqi_loadlang('pay', JIEQI_MODULE_NAME);
jieqi_loadlang(JIEQI_PAY_TYPE, JIEQI_MODULE_NAME);
jieqi_checklogin();
jieqi_getconfigs(JIEQI_MODULE_NAME, JIEQI_PAY_TYPE, 'jieqiPayset');
$phone = trim($_POST['phone']);
include_once $jieqiModules['pay']['path'] . '/class/paylog.php';
$paylog_handler = JieqiPaylogHandler::getInstance('JieqiPaylogHandler');
$criteria = new CriteriaCompo();
$criteria->add(new Criteria('buyinfo', $phone));
$criteria->add(new Criteria('payflag', -2));
$paylog_handler->queryObjects($criteria);
$payary = array();
$i = 0;
while ($paylog = $paylog_handler->getObject()) {
    $payary[$i]['payid'] = $paylog->getVar('payid');
    $payary[$i]['money'] = $paylog->getVar('money');
    $payary[$i]['egold'] = $paylog->getVar('egold');
Beispiel #30
0
/**
 * 电子书搜索
 *
 * 电子书搜索
 * 
 * 调用模板:/modules/obook/templates/searchresult.html
 * 
 * @category   jieqicms
 * @package    obook
 * @copyright  Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * @author     $Author: juny $
 * @version    $Id: search.php 326 2009-02-04 00:26:22Z juny $
 */
define('JIEQI_MODULE_NAME', 'obook');
require_once '../../global.php';
jieqi_loadlang('search', JIEQI_MODULE_NAME);
if (empty($_REQUEST['searchkey'])) {
    jieqi_printfail($jieqiLang['obook']['need_search_keywords']);
}
//包含配置参数
jieqi_getconfigs(JIEQI_MODULE_NAME, 'configs');
//关键字长度
if (!empty($jieqiConfigs['obook']['minsearchlen']) && strlen($_REQUEST['searchkey']) < intval($jieqiConfigs['obook']['minsearchlen'])) {
    jieqi_printfail(sprintf($jieqiLang['obook']['search_minsize_limit'], $jieqiConfigs['obook']['minsearchlen']));
}
//检查时间,是否允许搜索
if (!empty($jieqiConfigs['obook']['minsearchtime']) && empty($_REQUEST['page'])) {
    $jieqi_visit_time = jieqi_strtosary($_COOKIE['jieqiVisitTime']);
    if (!empty($_SESSION['jieqiObooksearchTime'])) {
        $logtime = $_SESSION['jieqiObooksearchTime'];
    } elseif (!empty($jieqi_visit_time['jieqiObooksearchTime'])) {