コード例 #1
0
ファイル: vnetonereturn.php プロジェクト: thu0ng91/jmc
        if ($payflag == 0) {
            include_once JIEQI_ROOT_PATH . '/class/users.php';
            $users_handler =& JieqiUsersHandler::getInstance('JieqiUsersHandler');
            $uservip = 1;
            //默认的vip等级
            $ret = $users_handler->income($buyid, $egold, $jieqiPayset[JIEQI_PAY_TYPE]['paysilver'], $jieqiPayset[JIEQI_PAY_TYPE]['payscore'][$egold], $uservip);
            if ($ret) {
                $note = sprintf($jieqiLang['pay']['add_egold_success'], $buyname, JIEQI_EGOLD_NAME, $egold);
            } else {
                $note = sprintf($jieqiLang['pay']['add_egold_failure'], $buyid, $buyname, JIEQI_EGOLD_NAME, $egold);
            }
            $paylog->setVar('rettime', JIEQI_NOW_TIME);
            $paylog->setVar('retserialno', $rtoid);
            $paylog->setVar('retaccount', $trka);
            $paylog->setVar('retinfo', $rtmi);
            $paylog->setVar('egold', $egold);
            $paylog->setVar('money', $rtmz);
            $paylog->setVar('note', $note);
            $paylog->setVar('payflag', 1);
            if (!$paylog_handler->insert($paylog)) {
                jieqi_printfail($jieqiLang['pay']['save_paylog_failure']);
            } else {
                jieqi_msgwin(LANG_DO_SUCCESS, sprintf($jieqiLang['pay']['buy_egold_success'], $buyname, JIEQI_EGOLD_NAME, $egold));
            }
        } else {
            jieqi_msgwin(LANG_DO_SUCCESS, sprintf($jieqiLang['pay']['buy_egold_success'], $buyname, JIEQI_EGOLD_NAME, $egold));
        }
    } else {
        jieqi_printfail($jieqiLang['pay']['no_buy_record']);
    }
}
コード例 #2
0
ファイル: power.php プロジェクト: thu0ng91/jmc
        include_once JIEQI_ROOT_PATH . '/class/groups.php';
        $groups_handler =& JieqiGroupsHandler::getInstance('JieqiGroupsHandler');
        $criteria = new CriteriaCompo();
        $criteria->setSort('groupid');
        $criteria->setOrder('ASC');
        $groups_handler->queryObjects($criteria);
        while ($v = $groups_handler->getObject()) {
            if ($v->getVar('groupid') != JIEQI_GROUP_ADMIN) {
                $groups[] = array('groupid' => $v->getVar('groupid'), 'name' => $v->getVar('name'));
            }
        }
        unset($criteria);
        $power_form = new JieqiThemeForm($jieqiLang['system']['edit_power'], 'power', JIEQI_URL . '/admin/power.php');
        foreach ($jieqiPower[$_REQUEST['mod']] as $k => $v) {
            $_POST[$k] = new JieqiFormCheckBox($v['caption'], $k, $v['groups']);
            //$_POST[$k]->setDescription($v['description']);
            foreach ($groups as $group) {
                $_POST[$k]->addOption($group['groupid'], $group['name']);
            }
            $power_form->addElement($_POST[$k], false);
        }
        $power_form->addElement(new JieqiFormHidden('mod', $_REQUEST['mod']));
        $power_form->addElement(new JieqiFormHidden('action', 'update'));
        $power_form->addElement(new JieqiFormButton(' ', 'submit', $jieqiLang['system']['save_power'], 'submit'));
        $jieqiTpl->setCaching(0);
        $jieqiTpl->assign('jieqi_contents', '<br />' . $power_form->render(JIEQI_FORM_MIDDLE) . '<br />');
        include_once JIEQI_ROOT_PATH . '/admin/footer.php';
    }
} else {
    jieqi_msgwin(LANG_NOTICE, $jieqiLang['system']['no_usage_power']);
}
コード例 #3
0
ファイル: changegroup.php プロジェクト: thu0ng91/jmc
}
if ($user->getVar('groupid') == JIEQI_GROUP_ADMIN && $jieqiUsersGroup != JIEQI_GROUP_ADMIN) {
    jieqi_printfail($jieqiLang['system']['manage_admin_deny']);
}
$chglog = array();
$chginfo = '';
$chglog['groupid']['from'] = $user->getVar('groupid');
$chglog['groupid']['to'] = $_REQUEST['gid'];
$user->setVar('groupid', $_REQUEST['gid']);
$chginfo .= sprintf($jieqiLang['system']['change_group_log'], $jieqiGroups[$chglog['groupid']['from']], $jieqiGroups[$chglog['groupid']['to']]);
if (!$users_handler->insert($user)) {
    jieqi_printfail($jieqiLang['system']['change_group_failure']);
} else {
    include_once JIEQI_ROOT_PATH . '/class/userlog.php';
    //记录日志
    $userlog_handler = JieqiUserlogHandler::getInstance('JieqiUserlogHandler');
    $newlog = $userlog_handler->create();
    $newlog->setVar('siteid', JIEQI_SITE_ID);
    $newlog->setVar('logtime', JIEQI_NOW_TIME);
    $newlog->setVar('fromid', $_SESSION['jieqiUserId']);
    $newlog->setVar('fromname', $_SESSION['jieqiUserName']);
    $newlog->setVar('toid', $user->getVar('uid', 'n'));
    $newlog->setVar('toname', $user->getVar('uname', 'n'));
    $newlog->setVar('reason', $jieqiLang['system']['change_group_reason']);
    $newlog->setVar('chginfo', $chginfo);
    $newlog->setVar('chglog', serialize($chglog));
    $newlog->setVar('isdel', '0');
    $newlog->setVar('userlog', '');
    $userlog_handler->insert($newlog);
    jieqi_msgwin(LANG_DO_SUCCESS, $jieqiLang['system']['change_group_success']);
}
コード例 #4
0
ファイル: ovote.php プロジェクト: thu0ng91/jmc
//增加投票值(每日、每周、每月、合计)
$lastdate = date('Y-m-d', $article->getVar('lastovote', 'n'));
$nowdate = date('Y-m-d', JIEQI_NOW_TIME);
$criteria = new CriteriaCompo(new Criteria('articleid', $_REQUEST['id']));
if (substr($nowdate, 0, 7) == substr($lastdate, 0, 7)) {
    $monthovote = $article->getVar('monthovote', 'n') + $addnum;
    $article_handler->updatefields(array('lastovote' => JIEQI_NOW_TIME, 'monthovote' => $monthvote), $criteria);
} else {
    $oldovote = $article->getVar('monthovote', 'n');
    $monthovote = $addnum;
    $article_handler->updatefields(array('lastovote' => JIEQI_NOW_TIME, 'monthovote' => $monthvote, 'oldovote' => $oldovote), $criteria);
}
//记录已经投票标志
if (isset($userset['ovotedate']) && $userset['ovotedate'] == $today) {
    $userset['ovotenum'] = (int) $userset['ovotenum'] + 1;
} else {
    $userset['ovotedate'] = $today;
    $userset['ovotenum'] = 1;
}
$jieqiUsers->setVar('setting', serialize($userset));
$jieqiUsers->saveToSession();
$users_handler->insert($jieqiUsers);
if ($voteneedscore) {
    //扣积分
    $users_handler->changeScore($_SESSION['jieqiUserId'], $jieqiConfigs['article']['ovotescore'], false, false);
} elseif ($jieqiConfigs['article']['scoreovote'] > 0) {
    //加积分
    $users_handler->changeScore($_SESSION['jieqiUserId'], $jieqiConfigs['article']['scoreovote'], true);
}
jieqi_msgwin(LANG_DO_SUCCESS, sprintf($jieqiLang['article']['ovote_success'], $maxvote, $userset['ovotenum']));
コード例 #5
0
ファイル: cleancache.php プロジェクト: thu0ng91/jmc
    jieqi_clean_pagecache();
    jieqi_msgwin(LANG_DO_SUCCESS, $jieqiLang['system']['cache_clean_success']);
} elseif ($_REQUEST['target'] == 'blockcache') {
    echo '                                                                                                                                                                                                                                                                ';
    echo $jieqiLang['system']['start_clean_blockcache'];
    ob_flush();
    flush();
    jieqi_clean_blockcache();
    jieqi_msgwin(LANG_DO_SUCCESS, $jieqiLang['system']['cache_clean_success']);
} elseif ($_REQUEST['target'] == 'compiled') {
    echo '                                                                                                                                                                                                                                                                ';
    echo $jieqiLang['system']['start_clean_compiled'];
    ob_flush();
    flush();
    jieqi_clean_compiled();
    jieqi_msgwin(LANG_DO_SUCCESS, $jieqiLang['system']['cache_clean_success']);
} else {
    jieqi_printfail(LANG_ERROR_PARAMETER);
}
function jieqi_clean_compiled()
{
    jieqi_delfolder(JIEQI_COMPILED_PATH, false);
}
function jieqi_clean_cache()
{
    global $jieqiCache;
    $jieqiCache->clear(JIEQI_CACHE_PATH);
}
function jieqi_clean_blockcache()
{
    global $jieqiCache;
コード例 #6
0
ファイル: setgood.php プロジェクト: thu0ng91/jmc
 * @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);
if ($_REQUEST['action'] == 'no') {
    jieqi_msgwin(LANG_DO_SUCCESS, $jieqiLang['article']['article_notgood_success']);
} else {
    jieqi_msgwin(LANG_DO_SUCCESS, $jieqiLang['article']['article_setgood_success']);
}
コード例 #7
0
ファイル: blockupdate.php プロジェクト: thu0ng91/jmc
    jieqi_includedb();
    $query = JieqiQueryHandler::getInstance('JieqiQueryHandler');
    $_REQUEST['configid'] = intval($_REQUEST['configid']);
    $sql = 'select * from ' . jieqi_dbprefix('system_blockconfigs') . ' where id = \'' . jieqi_dbslashes($_REQUEST['configid']) . '\'';
    $res = $query->execute($sql);
    $modconfig = $query->getObject($res);
    if (!is_object($modconfig)) {
        jieqi_printfail($jieqiLang['system']['block_config_notexists']);
    }
    unset($jieqiBlocks);
    jieqi_getconfigs($modconfig->getVar('modules', 'n'), $modconfig->getVar('file', 'n'), 'jieqiBlocks');
    if (!isset($jieqiBlocks[$_REQUEST['key']])) {
        jieqi_printfail($jieqiLang['system']['block_not_exists']);
    }
    $blockSet = $jieqiBlocks[$_REQUEST['key']];
} else {
    jieqi_printfail(LANG_ERROR_PARAMETER);
}
$modname = $blockSet['module'];
if ($modname == 'system') {
    include JIEQI_ROOT_PATH . '/blocks/' . $blockSet['filename'] . '.php';
} else {
    include $jieqiModules[$modname]['path'] . '/blocks/' . $blockSet['filename'] . '.php';
}
$classname = $blockSet['classname'];
include_once JIEQI_ROOT_PATH . '/lib/template/template.php';
$jieqiTpl =& JieqiTpl::getInstance();
$cblock = new $classname($blockSet);
$cblock->updateContent();
jieqi_msgwin(LANG_DO_SUCCESS, sprintf($jieqiLang['system']['block_edit_success'], jieqi_htmlstr($blockSet['blockname'])));
コード例 #8
0
ファイル: sndacardshow.php プロジェクト: thu0ng91/jmc
 * ����ģ�壺��
 * 
 * @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']);
        break;
    case -101:
        jieqi_printfail($jieqiLang['pay']['errmsg_customer']);
コード例 #9
0
ファイル: nationmerr.php プロジェクト: thu0ng91/jmc
/**
 * 梦联支付-错误处理
 *
 * 梦联支付-错误处理 (http://www.nationm.com.cn)
 * 
 * 调用模板:/modules/pay/templates/nationmerr.html
 * 
 * @category   jieqicms
 * @package    pay
 * @copyright  Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * @author     $Author: juny $
 * @version    $Id: nationmerr.php 326 2009-02-04 00:26:22Z juny $
 */
define('JIEQI_MODULE_NAME', 'pay');
define('JIEQI_PAY_TYPE', 'nationm');
require_once '../../global.php';
jieqi_loadlang('pay', JIEQI_MODULE_NAME);
$template = $jieqiModules['pay']['path'] . '/templates/nationmerr.html';
if (file_exists($template)) {
    include_once JIEQI_ROOT_PATH . '/header.php';
    $jieqiTpl->assign('egoldname', JIEQI_EGOLD_NAME);
    if (JIEQI_USE_CACHE) {
        $jieqiTpl->setCaching(0);
    }
    $jieqiTset['jieqi_contents_template'] = $template;
    include_once JIEQI_ROOT_PATH . '/footer.php';
} else {
    jieqi_loadlang('nationm', JIEQI_MODULE_NAME);
    jieqi_msgwin($jieqiLang['pay']['submit_failure_title'], $jieqiLang['pay']['submit_failure']);
}
コード例 #10
0
ファイル: configs.php プロジェクト: thu0ng91/jmc
                case JIEQI_TYPE_LABEL:
                    $tmpvar = $v->getVar('cname');
                    ${$tmpvar} = new JieqiFormLabel($v->getVar('ctitle'), $v->getVar('cvalue'));
                    ${$tmpvar}->setDescription($v->getVar('cdescription'));
                    $config_form->addElement(${$tmpvar}, false);
                    break;
                case JIEQI_TYPE_PASSWORD:
                    $tmpvar = $v->getVar('cname');
                    ${$tmpvar} = new JieqiFormPassword($v->getVar('ctitle'), $v->getVar('cname'), 25, 30, '');
                    ${$tmpvar}->setDescription($v->getVar('cdescription'));
                    $config_form->addElement(${$tmpvar}, false);
                    break;
                case JIEQI_TYPE_TXTBOX:
                default:
                    $tmpvar = $v->getVar('cname');
                    ${$tmpvar} = new JieqiFormText($v->getVar('ctitle'), $v->getVar('cname'), 25, 100, $v->getVar('cvalue', 'e'));
                    ${$tmpvar}->setDescription($v->getVar('cdescription'));
                    $config_form->addElement(${$tmpvar}, false);
                    break;
            }
        } while ($v = $configs_handler->getObject());
        $config_form->addElement(new JieqiFormHidden('mod', $_REQUEST['mod']));
        $config_form->addElement(new JieqiFormHidden('define', $_REQUEST['define']));
        $config_form->addElement(new JieqiFormHidden('action', 'update'));
        $config_form->addElement(new JieqiFormButton('&nbsp;', 'submit', $jieqiLang['system']['save_config'], 'submit'));
        $jieqiTpl->assign('jieqi_contents', '<div style="text-align:center;"><span style="line-height:200%">' . $catlink . '</span></div>' . $config_form->render(JIEQI_FORM_MIDDLE) . '<br />');
        include_once JIEQI_ROOT_PATH . '/admin/footer.php';
    }
} else {
    jieqi_msgwin(LANG_NOTICE, $jieqiLang['system']['no_usage_config']);
}
コード例 #11
0
ファイル: addbookcase.php プロジェクト: thu0ng91/jmc
            } else {
                jieqi_printfail(sprintf($jieqiLang['article']['bookcase_is_full'], $maxnum));
            }
        }
        //没有在书架
        //增加文章的收藏量
        $article_handler->db->query('UPDATE ' . jieqi_dbprefix('article_article') . ' SET goodnum=goodnum+1 WHERE articleid=' . $_REQUEST['bid']);
        $bookcase = $bookcase_handler->create();
        $bookcase->setVar('joindate', JIEQI_NOW_TIME);
        $bookcase->setVar('lastvisit', JIEQI_NOW_TIME);
        $bookcase->setVar('flag', 0);
    }
    $bookcase->setVar('articleid', $article->getVar('articleid', 'n'));
    $bookcase->setVar('articlename', $article->getVar('articlename', 'n'));
    $bookcase->setVar('userid', $jieqiUsers->getVar('uid', 'n'));
    $bookcase->setVar('username', $jieqiUsers->getVar('uname', 'n'));
    $bookcase->setVar('chapterid', 0);
    $bookcase->setVar('chaptername', '');
    $bookcase->setVar('chapterorder', 0);
    if (!$bookcase_handler->insert($bookcase)) {
        jieqi_printfail($jieqiLang['article']['add_articlemark_failure']);
    } else {
        if ($voteneedscore) {
            //扣积分
            $users_handler->changeScore($_SESSION['jieqiUserId'], $jieqiConfigs['article']['addcasescore'], false, false);
        }
        jieqi_msgwin(LANG_DO_SUCCESS, $jieqiLang['article']['add_articlemark_success']);
    }
} else {
    jieqi_printfail($jieqiLang['article']['article_not_exists']);
}
コード例 #12
0
ファイル: dbquery.php プロジェクト: thu0ng91/jmc
                $sqlerr[] = array('sql' => $v, 'error' => $db_query->db->error());
                if ($_POST['errorstop']) {
                    jieqi_printfail(sprintf($jieqiLang['system']['print_sql_error'], jieqi_htmlstr($v), jieqi_htmlstr($db_query->db->error())));
                    break;
                }
            }
        }
    }
    if (!empty($sqlerr) && $_POST['showerror']) {
        $errorinfo = '';
        foreach ($sqlerr as $v) {
            $errorinfo .= sprintf($jieqiLang['system']['show_error_format'], jieqi_htmlstr($v['sql']), jieqi_htmlstr($v['error']));
        }
        jieqi_msgwin(LANG_DO_SUCCESS, sprintf($jieqiLang['system']['sql_some_error'], $errorinfo));
    } else {
        jieqi_msgwin(LANG_DO_SUCCESS, $jieqiLang['system']['execute_sql_success']);
    }
} else {
    $jieqiTpl->setCaching(0);
    $jieqiTset['jieqi_contents_template'] = JIEQI_ROOT_PATH . '/templates/admin/dbquery.html';
}
include_once JIEQI_ROOT_PATH . '/admin/footer.php';
function jieqi_splitsqlfile(&$ret, $sql, $release = 32270)
{
    //$sql          = trim($sql);
    $sql = rtrim($sql, "\n\r");
    $sql_len = strlen($sql);
    $char = '';
    $string_start = '';
    $in_string = FALSE;
    for ($i = 0; $i < $sql_len; ++$i) {
コード例 #13
0
ファイル: getpass.php プロジェクト: thu0ng91/jmc
             }
             if (isset($jieqiConfigs['system']['mailauth'])) {
                 $params['mailauth'] = $jieqiConfigs['system']['mailauth'];
             }
             if (isset($jieqiConfigs['system']['mailuser'])) {
                 $params['mailuser'] = $jieqiConfigs['system']['mailuser'];
             }
             if (isset($jieqiConfigs['system']['mailpassword'])) {
                 $params['mailpassword'] = $jieqiConfigs['system']['mailpassword'];
             }
             $jieqimail = new JieqiMail($to, $title, $content, $params);
             $jieqimail->sendmail();
             if ($jieqimail->isError(JIEQI_ERROR_RETURN)) {
                 jieqi_printfail(sprintf($jieqiLang['system']['email_send_failure'], implode('<br />', $jieqimail->getErrors(JIEQI_ERROR_RETURN))));
             } else {
                 jieqi_msgwin(LANG_DO_SUCCESS, $jieqiLang['system']['send_password_success']);
             }
         } else {
             jieqi_printfail($jieqiLang['system']['email_not_users']);
         }
     } else {
         jieqi_printfail(LANG_NO_USER);
     }
     break;
 case 'getpass':
 default:
     include_once JIEQI_ROOT_PATH . '/header.php';
     $jieqiTpl->assign('url_getpass', JIEQI_USER_URL . '/getpass.php?do=submit');
     $jieqiTpl->setCaching(0);
     $jieqiTset['jieqi_contents_template'] = JIEQI_ROOT_PATH . '/templates/getpass.html';
     include_once JIEQI_ROOT_PATH . '/footer.php';
コード例 #14
0
ファイル: batchrepack.php プロジェクト: thu0ng91/jmc
    $article = $article_handler->getObject();
    if (is_object($article)) {
        $articlename = $article->getVar('articlename');
        include_once $jieqiModules['article']['path'] . '/include/repack.php';
        $ptypes = array();
        foreach ($_REQUEST['flagary'] as $v) {
            $ptypes[$v] = 1;
        }
        echo '                                                                                                                                                                                                                                                                ';
        echo sprintf($jieqiLang['article']['batch_repack_doing'], $articlename, date('Y-m-d H:i:s', $starttime), date('Y-m-d H:i:s', $stoptime), date('Y-m-d H:i:s', $article->getVar('lastupdate')), $article->getVar('articleid'));
        ob_flush();
        flush();
        article_repack($article->getVar('articleid'), $ptypes, 1);
        $showinfo = $jieqiLang['article']['repack_success_next'];
    } else {
        jieqi_msgwin(LANG_DO_SUCCESS, sprintf($jieqiLang['article']['batch_repack_success'], $article_static_url . '/admin/batchrepack.php'));
        exit;
    }
    $startlimit++;
    $url = $article_static_url . '/admin/batchrepack.php?action=packwithtime&starttime=' . $starttime . '&stoptime=' . $stoptime . '&startlimit=' . $startlimit;
    foreach ($_REQUEST['packflag'] as $k => $v) {
        $url .= '&packflag[' . $k . ']=' . $v;
    }
    echo sprintf($jieqiLang['article']['repack_next_html'], JIEQI_CHAR_SET, $showinfo, $url, $url);
} else {
    include_once JIEQI_ROOT_PATH . '/admin/header.php';
    $jieqiTpl->assign('article_static_url', $article_static_url);
    $jieqiTpl->assign('article_dynamic_url', $article_dynamic_url);
    //重新生成
    include_once JIEQI_ROOT_PATH . '/lib/html/formloader.php';
    $repack_form = new JieqiThemeForm($jieqiLang['article']['repack_use_id'], 'batchrepack', $article_static_url . '/admin/batchrepack.php');
コード例 #15
0
ファイル: addbookcase.php プロジェクト: thu0ng91/jmc
    if ($obookcase) {
        //已经在书架
        jieqi_printfail($jieqiLang['obook']['obook_has_incase']);
    } else {
        //没有在书架
        if ($cot >= $maxnum) {
            jieqi_printfail(sprintf($jieqiLang['obook']['bookcase_is_full'], $maxnum));
        }
        //增加文章的收藏量
        $obook_handler->db->query('UPDATE ' . jieqi_dbprefix('obook_obook') . ' SET goodnum=goodnum+1 WHERE obookid=' . $_REQUEST['oid']);
        $obookcase = $obookcase_handler->create();
        $obookcase->setVar('joindate', JIEQI_NOW_TIME);
        $obookcase->setVar('lastvisit', JIEQI_NOW_TIME);
        $obookcase->setVar('flag', 0);
    }
    $obookcase->setVar('obookid', $obook->getVar('obookid', 'n'));
    $obookcase->setVar('articleid', $obook->getVar('articleid', 'n'));
    $obookcase->setVar('obookname', $obook->getVar('obookname', 'n'));
    $obookcase->setVar('userid', $jieqiUsers->getVar('uid', 'n'));
    $obookcase->setVar('username', $jieqiUsers->getVar('uname', 'n'));
    $obookcase->setVar('ochapterid', 0);
    $obookcase->setVar('chaptername', '');
    $obookcase->setVar('chapterorder', 0);
    if (!$obookcase_handler->insert($obookcase)) {
        jieqi_printfail($jieqiLang['obook']['add_obookmark_failure']);
    } else {
        jieqi_msgwin(LANG_DO_SUCCESS, $jieqiLang['obook']['add_obookmark_success']);
    }
} else {
    jieqi_printfail($jieqiLang['obook']['obook_not_exists']);
}
コード例 #16
0
ファイル: setgood.php プロジェクト: thu0ng91/jmc
 * @category   jieqicms
 * @package    obook
 * @copyright  Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * @author     $Author: juny $
 * @version    $Id: setgood.php 231 2008-11-27 08:46:26Z juny $
 */
define('JIEQI_MODULE_NAME', 'obook');
require_once '../../../global.php';
jieqi_getconfigs(JIEQI_MODULE_NAME, 'power');
jieqi_checkpower($jieqiPower['obook']['manageallobook'], $jieqiUsersStatus, $jieqiUsersGroup, false, true);
jieqi_loadlang('manage', JIEQI_MODULE_NAME);
if (empty($_REQUEST['id'])) {
    jieqi_printfail($jieqiLang['obook']['obook_not_exists']);
}
include_once $jieqiModules['obook']['path'] . '/class/obook.php';
$obook_handler =& JieqiObookHandler::getInstance('JieqiObookHandler');
$obook = $obook_handler->get($_REQUEST['id']);
if (!is_object($obook)) {
    jieqi_printfail($jieqiLang['obook']['obook_not_exists']);
}
if ($_REQUEST['action'] == 'no') {
    $obook->setVar('toptime', 0);
} else {
    $obook->setVar('toptime', JIEQI_NOW_TIME);
}
$obook_handler->insert($obook);
if ($_REQUEST['action'] == 'no') {
    jieqi_msgwin(LANG_DO_SUCCESS, $jieqiLang['obook']['obook_notgood_success']);
} else {
    jieqi_msgwin(LANG_DO_SUCCESS, $jieqiLang['obook']['obook_setgood_success']);
}
コード例 #17
0
ファイル: createstatic.php プロジェクト: thu0ng91/jmc
        include_once $jieqiModules['article']['path'] . '/include/staticmaketoplist.php';
        foreach ($topary as $k => $v) {
            echo sprintf($jieqiLang['article']['create_toplist_info'], $v);
            ob_flush();
            flush();
            $i = 1;
            $pagenum = 1;
            while ($i <= $pagenum) {
                $pagenum = makestatictoplist($k, '', $i, $_REQUEST['maxtoppage']);
                echo $i . '..';
                ob_flush();
                flush();
                $i++;
            }
        }
        jieqi_msgwin(LANG_DO_SUCCESS, $jieqiLang['article']['create_toplist_success']);
        break;
    default:
        jieqi_printfail($jieqiLang['article']['create_para_error']);
}
//取得文件保存目录
function getsubdir($dirname, $id)
{
    global $jieqiConfigs;
    $retdir = '';
    if (!empty($dirname) && is_numeric($id)) {
        $retdir .= jieqi_getsubdir($id);
        if (!file_exists($retdir)) {
            jieqi_createdir($retdir);
        }
    }
コード例 #18
0
ファイル: pagecollect.php プロジェクト: thu0ng91/jmc
         ob_flush();
         flush();
         $cpoint++;
         include $jieqiModules['article']['path'] . '/include/updateone.php';
     }
     //采集下一页
     if ($nextpageid == '' || $_REQUEST['collectpagenum'] >= $maxpagenum) {
         jieqi_getcachevars('article', 'articleuplog');
         if (!is_array($jieqiArticleuplog)) {
             $jieqiArticleuplog = array('articleuptime' => 0, 'chapteruptime' => 0);
         }
         $now_time = time();
         $jieqiArticleuplog['articleuptime'] = $now_time;
         $jieqiArticleuplog['chapteruptime'] = $now_time;
         jieqi_setcachevars('articleuplog', 'jieqiArticleuplog', $jieqiArticleuplog, 'article');
         jieqi_msgwin(LANG_DO_SUCCESS, $jieqiLang['article']['batch_collect_success']);
         exit;
     } else {
         $_REQUEST['startid']++;
         $url = 'pagecollect.php?action=collect&siteid=' . $_REQUEST['siteid'] . '&collectname=' . $_REQUEST['collectname'] . '&startpageid=' . urlencode($nextpageid) . '&maxpagenum=' . $maxpagenum . '&collectpagenum=' . ($_REQUEST['collectpagenum'] + 1) . '&notaddnew=' . urlencode($_REQUEST['notaddnew']);
         $showinfo = sprintf($jieqiLang['article']['page_collect_next'], $_REQUEST['collectpagenum'], $maxpagenum);
         echo sprintf($jieqiLang['article']['page_collect_html'], JIEQI_CHAR_SET, $showinfo, $url, $url);
     }
     break;
 case 'show':
 default:
     include_once JIEQI_ROOT_PATH . '/admin/header.php';
     $jieqiTpl->assign('article_static_url', $article_static_url);
     $jieqiTpl->assign('article_dynamic_url', $article_dynamic_url);
     include_once JIEQI_ROOT_PATH . '/lib/html/formloader.php';
     $collect_form = new JieqiThemeForm($jieqiLang['article']['batch_collect_usepage'], 'frmcollect', $article_static_url . '/admin/pagecollect.php');
コード例 #19
0
ファイル: right.php プロジェクト: thu0ng91/jmc
        include_once JIEQI_ROOT_PATH . '/class/honors.php';
        $honors_handler =& JieqiHonorsHandler::getInstance('JieqiHonorsHandler');
        $criteria = new CriteriaCompo();
        $criteria->setSort('minscore');
        $criteria->setOrder('ASC');
        $honors_handler->queryObjects($criteria);
        while ($v = $honors_handler->getObject()) {
            $tmpvar = $v->getVar('caption');
            $tmpary = explode(' ', $tmpvar);
            $honors[] = array('honorid' => $v->getVar('honorid'), 'caption' => $tmpary[0]);
        }
        unset($criteria);
        $right_form = new JieqiThemeForm($jieqiLang['system']['edit_right'], 'right', JIEQI_URL . '/admin/right.php');
        foreach ($jieqiRight[$_REQUEST['mod']] as $k => $v) {
            $tmpvar = '';
            foreach ($honors as $honor) {
                $right_text = new JieqiFormText($honor['caption'], $k . '[' . $honor['honorid'] . ']', 20, 60, $v['honors'][$honor['honorid']]);
                $tmpvar .= $right_text->getCaption() . ' ' . $right_text->render() . '<br />';
            }
            $right_form->addElement(new JieqiFormLabel($v['caption'], $tmpvar));
        }
        $right_form->addElement(new JieqiFormHidden('mod', $_REQUEST['mod']));
        $right_form->addElement(new JieqiFormHidden('action', 'update'));
        $right_form->addElement(new JieqiFormButton('&nbsp;', 'submit', $jieqiLang['system']['save_right'], 'submit'));
        $jieqiTpl->setCaching(0);
        $jieqiTpl->assign('jieqi_contents', '<br />' . $right_form->render(JIEQI_FORM_MIDDLE) . '<br />');
        include_once JIEQI_ROOT_PATH . '/admin/footer.php';
    }
} else {
    jieqi_msgwin(LANG_NOTICE, $jieqiLang['system']['no_usage_right']);
}
コード例 #20
0
ファイル: indexs.php プロジェクト: thu0ng91/jmc
    echo $out_var;
    exit;
}
$tmpvar = explode(' ', microtime());
$jieqiTpl->assign('jieqi_exetime', round($tmpvar[1] + $tmpvar[0] - JIEQI_START_TIME, 6));
$jieqiTpl->setCaching(0);
$pagecontent =& $jieqiTpl->fetch($jieqiTset['jieqi_page_template']);
if (empty($_REQUEST['refresh'])) {
    echo $pagecontent;
    if (JIEQI_ENABLE_CACHE && JIEQI_CHAR_SET == JIEQI_SYSTEM_CHARSET) {
        jieqi_writefile(JIEQI_ROOT_PATH . '/' . $_REQUEST['target'], $pagecontent);
    }
} else {
    if (JIEQI_ENABLE_CACHE && JIEQI_CHAR_SET == JIEQI_SYSTEM_CHARSET) {
        $ret = jieqi_writefile(JIEQI_ROOT_PATH . '/' . $_REQUEST['target'], $pagecontent);
        //if($ret) jieqi_jumppage(JIEQI_URL.'/'.$_REQUEST['target'], LANG_DO_SUCCESS, $jieqiLang['system']['make_sindex_success']);
        if ($ret) {
            jieqi_msgwin(LANG_DO_SUCCESS, sprintf($jieqiLang['system']['make_static_success'], JIEQI_URL . '/' . $_REQUEST['target']));
        } else {
            jieqi_printfail(sprintf($jieqiLang['system']['make_static_failure'], $_REQUEST['target']));
        }
    } else {
        if (!JIEQI_ENABLE_CACHE) {
            jieqi_printfail($jieqiLang['system']['sindex_need_cache']);
        } else {
            jieqi_printfail(sprintf($jieqiLang['system']['sindex_need_charset'], JIEQI_CHAR_SET));
        }
    }
}
//结束数据库连接
jieqi_freeresource();
コード例 #21
0
ファイル: addfriends.php プロジェクト: thu0ng91/jmc
    }
    unset($criteria);
    $criteria = new CriteriaCompo(new Criteria('myid', $_SESSION['jieqiUserId']));
    $criteria->add(new Criteria('yourid', $userobj->getVar('uid', 'n')));
    $isexist = $friends_handler->getCount($criteria);
    if ($isexist > 0) {
        jieqi_printfail($jieqiLang['system']['has_been_friends']);
    }
    $newFriends = $friends_handler->create();
    $newFriends->setVar('adddate', JIEQI_NOW_TIME);
    $newFriends->setVar('myid', $_SESSION['jieqiUserId']);
    $newFriends->setVar('myname', $_SESSION['jieqiUserName']);
    $newFriends->setVar('yourid', $userobj->getVar('uid', 'n'));
    if (strlen($userobj->getVar('name', 'n')) > 0) {
        $newFriends->setVar('yourname', $userobj->getVar('name', 'n'));
    } else {
        $newFriends->setVar('yourname', $userobj->getVar('uname', 'n'));
    }
    $newFriends->setVar('teamid', 0);
    $newFriends->setVar('team', '');
    $newFriends->setVar('fset', '');
    $newFriends->setVar('state', 0);
    $newFriends->setVar('flag', 0);
    if (!$friends_handler->insert($newFriends)) {
        jieqi_printfail($jieqiLang['system']['add_friends_failure']);
    } else {
        jieqi_msgwin(LANG_DO_SUCCESS, $jieqiLang['system']['add_friends_success']);
    }
} else {
    jieqi_printfail(LANG_NO_USER);
}
コード例 #22
0
ファイル: ivancallconfirm.php プロジェクト: thu0ng91/jmc
if (count($payary) > 0) {
    $money = 0;
    $egold = 0;
    $pids = '';
    foreach ($payary as $v) {
        $money += $v['money'];
        $egold += $v['egold'];
        if (!empty($pids)) {
            $pids .= ', ';
        }
        $pids .= $v['payid'];
    }
    $buyname = $_SESSION['jieqiUserName'];
    $buyid = $_SESSION['jieqiUserId'];
    include_once JIEQI_ROOT_PATH . '/class/users.php';
    $users_handler =& JieqiUsersHandler::getInstance('JieqiUsersHandler');
    if (isset($jieqiPayset[JIEQI_PAY_TYPE]['scorerate'])) {
        $addscore = ceil($egold * $jieqiPayset[JIEQI_PAY_TYPE]['scorerate']);
    } else {
        $addscore = 0;
    }
    $ret = $users_handler->income($buyid, $egold, $jieqiPayset[JIEQI_PAY_TYPE]['paysilver'], $addscore);
    $sql = "UPDATE " . jieqi_dbprefix('pay_paylog') . " SET buyid='" . intval($buyid) . "', buyname='" . jieqi_dbslashes($buyname) . "', rettime='" . intval(JIEQI_NOW_TIME) . "', payflag='1' WHERE payid IN (" . $pids . ')';
    $ret = $paylog_handler->db->query($sql);
    if (!$ret) {
        jieqi_printfail($jieqiLang['pay']['save_paylog_failure']);
    }
    jieqi_msgwin(LANG_DO_SUCCESS, sprintf($jieqiLang['pay']['call_cinfirm_success'], jieqi_htmlstr($buyname), sprintf('%0.2f', $money / 100), $egold, JIEQI_EGOLD_NAME));
} else {
    jieqi_printfail($jieqiLang['pay']['no_buy_record']);
}
コード例 #23
0
ファイル: nationmsuc.php プロジェクト: thu0ng91/jmc
<?php

/**
 * JIEQI CMS
 * Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * $Id: nationmsuc.php 326 2009-02-04 00:26:22Z juny $
 */
define('JIEQI_MODULE_NAME', 'pay');
define('JIEQI_PAY_TYPE', 'nationm');
require_once '../../global.php';
$template = $jieqiModules['pay']['path'] . '/templates/nationmsuc.html';
if (file_exists($template)) {
    include_once JIEQI_ROOT_PATH . '/header.php';
    $jieqiTpl->assign('egoldname', JIEQI_EGOLD_NAME);
    if (JIEQI_USE_CACHE) {
        $jieqiTpl->setCaching(0);
    }
    $jieqiTset['jieqi_contents_template'] = $template;
    include_once JIEQI_ROOT_PATH . '/footer.php';
} else {
    jieqi_loadlang('nationm', JIEQI_MODULE_NAME);
    jieqi_msgwin($jieqiLang['pay']['submit_success_title'], $jieqiLang['pay']['submit_success']);
}