Exemplo n.º 1
0
        include_once JIEQI_ROOT_PATH . '/lib/html/formloader.php';
        $draft_form = new JieqiThemeForm($jieqiLang['article']['draft_edit'], 'newchapter', $article_dynamic_url . '/draftedit.php');
        $aid = $draft->getVar('articleid');
        if (empty($aid)) {
            $aid = NULL;
        }
        $article_list = new JieqiFormSelect($jieqiLang['article']['table_draft_articleid'], 'articleid', $aid);
        include_once $jieqiModules['article']['path'] . '/class/article.php';
        $article_handler =& JieqiArticleHandler::getInstance('JieqiArticleHandler');
        $criteria = new CriteriaCompo(new Criteria('authorid', $_SESSION['jieqiUserId']));
        //if(jieqi_checkpower($jieqiPower['article']['transarticle'], $jieqiUsersStatus, $jieqiUsersGroup, true)){
        //	$criteria->add(new Criteria('posterid', $_SESSION['jieqiUserId']), 'OR');
        //}
        $criteria->setLimit(100);
        //$criteria->setSort('lastupdate');
        //$criteria->setOrder('DESC');
        $article_handler->queryObjects($criteria);
        while ($v = $article_handler->getObject()) {
            $article_list->addOption($v->getVar('articleid'), $v->getVar('articlename'));
        }
        $draft_form->addElement($article_list);
        $draft_form->addElement(new JieqiFormText($jieqiLang['article']['table_draft_chaptername'], 'chaptername', 50, 50, $draft->getVar('draftname', 'e')), true);
        $draft_form->addElement(new JieqiFormTextArea($jieqiLang['article']['table_draft_chaptercontent'], 'chaptercontent', $draft->getVar('content', 'e'), 15, 60));
        $draft_form->addElement(new JieqiFormHidden('action', 'update'));
        $draft_form->addElement(new JieqiFormHidden('id', $_REQUEST['id']));
        $draft_form->addElement(new JieqiFormButton(' ', 'submit', LANG_SUBMIT, 'submit'));
        $jieqiTpl->assign('authorarea', 1);
        $jieqiTpl->assign('jieqi_contents', '<br />' . $draft_form->render(JIEQI_FORM_MIDDLE) . '<br />');
        include_once JIEQI_ROOT_PATH . '/footer.php';
        break;
}
Exemplo n.º 2
0
$criteria->setSort('minscore');
$criteria->setOrder('ASC');
$honors_handler->queryObjects($criteria);
$honors = array();
$honorary = array();
$i = 0;
while ($v = $honors_handler->getObject()) {
    $nameary = explode(' ', $v->getVar('caption'));
    $honorary[$v->getVar('honorid')] = array('caption' => $nameary[0], 'name' => $nameary, 'minscore' => $v->getVar('minscore'), 'maxscore' => $v->getVar('maxscore'));
    $honors[$i]['honorid'] = $v->getVar('honorid');
    $honors[$i]['caption'] = implode('<br />', $nameary);
    $honors[$i]['minscore'] = $v->getVar('minscore');
    $honors[$i]['maxscore'] = $v->getVar('maxscore');
    $honors[$i]['honortype'] = $v->getVar('honortype');
    $i++;
}
$jieqiTpl->assign_by_ref('honors', $honors);
$honors_form = new JieqiThemeForm($jieqiLang['system']['add_honor'], 'honorsnew', JIEQI_URL . '/admin/honors.php');
$honors_form->addElement(new JieqiFormText($jieqiLang['system']['table_honors_caption'], 'caption', 30, 250, ''), true);
$honors_form->addElement(new JieqiFormText($jieqiLang['system']['table_honors_minscore'], 'minscore', 30, 50, ''), true);
$honors_form->addElement(new JieqiFormText($jieqiLang['system']['table_honors_maxscore'], 'maxscore', 30, 50, ''), true);
$honors_form->addElement(new JieqiFormHidden("action", "new"));
$honors_form->addElement(new JieqiFormButton('&nbsp;', 'submit', $jieqiLang['system']['add_honor'], 'submit'));
$jieqiTpl->assign('form_addhonor', "<br />" . $honors_form->render(JIEQI_FORM_MIDDLE) . "<br />");
$jieqiTpl->setCaching(0);
$jieqiTset['jieqi_contents_template'] = JIEQI_ROOT_PATH . '/templates/admin/honors.html';
include_once JIEQI_ROOT_PATH . '/admin/footer.php';
//数据有变动。更新文件
if ((!empty($_REQUEST['id']) || !empty($_POST['caption'])) && count($honorary) > 0) {
    jieqi_setconfigs('honors', 'jieqiHonors', $honorary, 'system');
}
Exemplo n.º 3
0
    $checkbox->addOption('makezip', $jieqiLang['article']['repack_zip']);
    $checkbox->addOption('makefull', $jieqiLang['article']['repack_fullpage']);
    $checkbox->addOption('maketxtfull', $jieqiLang['article']['repack_txtfullpage']);
    $checkbox->addOption('makeumd', $jieqiLang['article']['repack_umdpage']);
    $checkbox->addOption('makejar', $jieqiLang['article']['repack_jarpage']);
    $repack_form->addElement($checkbox, false);
    $repack_form->addElement(new JieqiFormHidden('action', 'packwithid'));
    $repack_form->addElement(new JieqiFormButton('&nbsp;', 'submit', $jieqiLang['article']['repack_start_button'], 'submit'));
    $timepack_form = new JieqiThemeForm($jieqiLang['article']['repack_use_time'], 'timerepack', $article_static_url . '/admin/batchrepack.php');
    $starttime = new JieqiFormText($jieqiLang['article']['repack_start_time'], 'starttime', 20, 20, date('Y-m-d 00:00:00'));
    $starttime->setDescription($jieqiLang['article']['repack_time_format']);
    $timepack_form->addElement($starttime, true);
    $stoptime = new JieqiFormText($jieqiLang['article']['repack_end_time'], 'stoptime', 20, 20, date('Y-m-d H:i:s'));
    $stoptime->setDescription($jieqiLang['article']['repack_time_format']);
    $timepack_form->addElement($stoptime);
    $checkbox1 = new JieqiFormCheckBox($jieqiLang['article']['repack_select'], 'packflag');
    $checkbox1->addOption('makeopf', $jieqiLang['article']['repack_opf']);
    $checkbox1->addOption('makehtml', $jieqiLang['article']['repack_html']);
    $checkbox1->addOption('makezip', $jieqiLang['article']['repack_zip']);
    $checkbox1->addOption('makefull', $jieqiLang['article']['repack_fullpage']);
    $checkbox1->addOption('maketxtfull', $jieqiLang['article']['repack_txtfullpage']);
    $checkbox1->addOption('makeumd', $jieqiLang['article']['repack_umdpage']);
    $checkbox1->addOption('makejar', $jieqiLang['article']['repack_jarpage']);
    $timepack_form->addElement($checkbox1, false);
    $timepack_form->addElement(new JieqiFormHidden('action', 'packwithtime'));
    $timepack_form->addElement(new JieqiFormButton('&nbsp;', 'submit', $jieqiLang['article']['repack_start_button'], 'submit'));
    $jieqiTpl->assign('repack_form', $repack_form->render(JIEQI_FORM_MIDDLE) . '<br /><br />' . $timepack_form->render(JIEQI_FORM_MIDDLE));
    $jieqiTpl->setCaching(0);
    $jieqiTset['jieqi_contents_template'] = $jieqiModules['article']['path'] . '/templates/admin/batchrepack.html';
    include_once JIEQI_ROOT_PATH . '/admin/footer.php';
}
Exemplo n.º 4
0
    case 'edit':
    default:
        //包含区块参数(定制区块)
        jieqi_getconfigs('article', 'authorblocks', 'jieqiBlocks');
        include_once JIEQI_ROOT_PATH . '/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';
        $vote_form = new JieqiThemeForm($jieqiLang['article']['article_vote_edit'], 'editvote', $article_static_url . '/voteedit.php');
        $vote_form->addElement(new JieqiFormText($jieqiLang['article']['table_avote_title'], 'title', 50, 100, $avote->getVar('title', 'e')), true);
        for ($i = 1; $i <= $jieqiConfigs['article']['articlevote']; $i++) {
            $vote_form->addElement(new JieqiFormText(sprintf($jieqiLang['article']['article_vote_item'], $i), 'item' . $i, 50, 100, $avote->getVar('item' . $i, 'e')));
        }
        $mulselect = new JieqiFormRadio($jieqiLang['article']['article_vote_mulselect'], 'mulselect', $avote->getVar('mulselect', 'e'));
        $mulselect->addOption('0', $jieqiLang['article']['article_vote_single']);
        $mulselect->addOption('1', $jieqiLang['article']['article_vote_multiterm']);
        $vote_form->addElement($mulselect);
        $ispublish = new JieqiFormRadio($jieqiLang['article']['article_vote_publish'], 'ispublish', $avote->getVar('ispublish', 'e'));
        $ispublish->addOption('1', $jieqiLang['article']['article_votepub_yes']);
        $ispublish->addOption('0', $jieqiLang['article']['article_votepub_no']);
        $vote_form->addElement($ispublish);
        $vote_form->addElement(new JieqiFormHidden('action', 'update'));
        $vote_form->addElement(new JieqiFormHidden('id', $_REQUEST['id']));
        $vote_form->addElement(new JieqiFormHidden('aid', $_REQUEST['aid']));
        $vote_form->addElement(new JieqiFormButton('&nbsp;', 'submit', LANG_SUBMIT, 'submit'));
        $jieqiTpl->assign('authorarea', 1);
        $jieqiTpl->setCaching(1);
        $jieqiTpl->assign('jieqi_contents', $vote_form->render(JIEQI_FORM_MIDDLE));
        include_once JIEQI_ROOT_PATH . '/footer.php';
        break;
}
Exemplo n.º 5
0
        }
        break;
}
include_once JIEQI_ROOT_PATH . '/admin/header.php';
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'];
$jieqiTpl->assign('article_static_url', $article_static_url);
$jieqiTpl->assign('article_dynamic_url', $article_dynamic_url);
$jieqiTpl->assign('sitename', $jieqiCollect['sitename']);
$jieqiTpl->assign('config', $_REQUEST['config']);
$jieqiTpl->assign_by_ref('collectrows', $jieqiCollect['listcollect']);
//增加规则的表
include_once JIEQI_ROOT_PATH . '/lib/html/formloader.php';
$collect_form = new JieqiThemeForm($jieqiLang['article']['add_batch_collectrule'], 'collectnew', $article_static_url . '/admin/collectpage.php');
$collect_form->addElement(new JieqiFormLabel($jieqiLang['article']['collect_rule_note'], $jieqiLang['article']['collect_rule_description']));
$collect_form->addElement(new JieqiFormText($jieqiLang['article']['collect_rule_name'], 'title', 60, 60, ''), true);
$collect_form->addElement(new JieqiFormText($jieqiLang['article']['collect_rule_url'], 'urlpage', 60, 250, ''), true);
$collect_form->addElement(new JieqiFormTextArea($jieqiLang['article']['collect_rule_articleid'], 'articleid', '', 5, 60), true);
$nextpageid = new JieqiFormTextArea($jieqiLang['article']['rule_next_pageid'], 'nextpageid', '', 5, 60);
$nextpageid->setDescription($jieqiLang['article']['rule_nextpage_note']);
$collect_form->addElement($nextpageid);
$collect_form->addElement(new JieqiFormText($jieqiLang['article']['rule_start_pageid'], 'startpageid', 60, 60, ''));
$collect_form->addElement(new JieqiFormText($jieqiLang['article']['rule_max_pagenum'], 'maxpagenum', 60, 10, ''));
$collect_form->addElement(new JieqiFormHidden('config', htmlspecialchars($_REQUEST['config'], ENT_QUOTES)));
$collect_form->addElement(new JieqiFormHidden('action', 'new'));
$collect_form->addElement(new JieqiFormButton('&nbsp;', 'submit', $jieqiLang['article']['rule_add_new'], 'submit'));
$jieqiTpl->assign('addnewtable', $collect_form->render(JIEQI_FORM_MIDDLE));
$jieqiTpl->setCaching(0);
$jieqiTset['jieqi_contents_template'] = $jieqiModules['article']['path'] . '/templates/admin/collectpage.html';
include_once JIEQI_ROOT_PATH . '/admin/footer.php';
Exemplo n.º 6
0
         }
     } else {
         jieqi_printfail($errtext);
     }
 } else {
     $jieqiTpl->assign('option', 2);
     $import_form = new JieqiThemeForm($jieqiLang[JIEQI_MODULE_NAME]['db_import'], 'dbimport', $jieqiModules[JIEQI_MODULE_NAME]['url'] . '/admin/dbmanage.php');
     $import_file = new JieqiFormText($jieqiLang[JIEQI_MODULE_NAME]['import_file'], 'importfile', 20, 250);
     $import_file->setDescription($jieqiLang[JIEQI_MODULE_NAME]['import_file_format']);
     $import_form->addElement($import_file, TRUE);
     $import_form->addElement(new JieqiFormHidden('method', 'cover'));
     $import_form->addElement(new JieqiFormHidden('option', 'import'));
     $on_submit = new JieqiFormButton('&nbsp;', 'submit', LANG_SUBMIT, 'submit');
     $on_submit->setExtra('onclick=""');
     $import_form->addElement($on_submit);
     $jieqiTpl->assign('dbmanage_form', $import_form->render(JIEQI_FORM_MAX));
     //处理批量删除记录
     if (isset($_POST['checkaction']) && $_POST['checkaction'] == 1 && is_array($_POST['checkid']) && count($_POST['checkid']) > 0) {
         foreach ($_POST['checkid'] as $v) {
             jieqi_getconfigs(JIEQI_MODULE_NAME, 'backuplog');
             //删除原始文件
             $backfile = MYSQL_BACKUP_PATH . '/' . $jieqiBackuplog[$v]['name'];
             if (@file_exists($backfile)) {
                 jieqi_delfile($backfile);
             }
             //删除数据纪录
             unset($jieqiBackuplog[$v]);
             jieqi_setconfigs('backuplog', 'jieqiBackuplog', $jieqiBackuplog, JIEQI_MODULE_NAME);
         }
         jieqi_jumppage('dbmanage.php?option=import', LANG_DO_SUCCESS, $jieqiLang[JIEQI_MODULE_NAME]['log_del_success']);
     }
Exemplo n.º 7
0
include_once JIEQI_ROOT_PATH . '/lib/html/formloader.php';
$blocks_form = new JieqiThemeForm($jieqiLang['system']['add_custom_block'], 'blocksnew', JIEQI_URL . '/admin/blocks.php');
$blocks_form->addElement(new JieqiFormText($jieqiLang['system']['table_blocks_blockname'], 'blockname', 30, 50, ''), true);
//模块选择
$modselect = new JieqiFormSelect($jieqiLang['system']['table_blocks_modname'], 'modname');
$modselect->addOptionArray($modules);
$blocks_form->addElement($modselect);
//显示位置
$sideary = $blocks_handler->getSideary();
$sideselect = new JieqiFormSelect($jieqiLang['system']['table_blocks_side'], 'side');
$sideselect->addOptionArray($sideary);
$blocks_form->addElement($sideselect);
//排列序号
$blocks_form->addElement(new JieqiFormText($jieqiLang['system']['table_blocks_weight'], 'weight', 8, 8, '0'));
//是否显示
$showradio = new JieqiFormRadio($jieqiLang['system']['table_blocks_publish'], 'publish', 3);
$showradio->addOption(0, $jieqiLang['system']['block_show_no']);
$showradio->addOption(1, $jieqiLang['system']['block_show_logout']);
$showradio->addOption(2, $jieqiLang['system']['block_show_login']);
$showradio->addOption(3, $jieqiLang['system']['block_show_both']);
$blocks_form->addElement($showradio);
//区块标题
$blocks_form->addElement(new JieqiFormTextArea($jieqiLang['system']['table_blocks_title'] . '(HTML)', 'title', '', 3, 60));
//区块内容
$blocks_form->addElement(new JieqiFormTextArea($jieqiLang['system']['table_blocks_content'] . '(HTML格式)', 'content', '', 10, 60));
$blocks_form->addElement(new JieqiFormHidden('action', 'new'));
$blocks_form->addElement(new JieqiFormButton('&nbsp;', 'submit', $jieqiLang['system']['add_block'], 'submit'));
$jieqiTpl->assign('form_addblock', '<br />' . $blocks_form->render(JIEQI_FORM_MIDDLE) . '<br />');
$jieqiTpl->setCaching(0);
$jieqiTset['jieqi_contents_template'] = JIEQI_ROOT_PATH . '/templates/admin/blocks.html';
include_once JIEQI_ROOT_PATH . '/admin/footer.php';
Exemplo n.º 8
0
include_once JIEQI_ROOT_PATH . '/lib/html/formloader.php';
$showstr = '';
if (is_numeric($_REQUEST['checkchapterid']) && !empty($_REQUEST['checkstring'])) {
    include_once $jieqiModules['obook']['path'] . '/class/obuyinfo.php';
    $buyinfo_handler =& JieqiObuyinfoHandler::getInstance('JieqiObuyinfoHandler');
    $criteria = new CriteriaCompo(new Criteria('ochapterid', $_REQUEST['checkchapterid']));
    $criteria->add(new Criteria('checkcode', $_REQUEST['checkstring']));
    $criteria->setSort('obuyinfoid');
    $criteria->setOrder('DESC');
    $criteria->setLimit(100);
    $buyinfo_handler->queryObjects($criteria);
    $resnum = 0;
    $showstr .= $jieqiLang['obook']['check_search_result'] . '<br />';
    while ($buyinfo = $buyinfo_handler->getObject()) {
        if ($resnum == 0) {
            $showstr .= $jieqiLang['obook']['check_obook_id'] . $buyinfo->getVar('ochapterid') . ' | ' . $jieqiLang['obook']['check_obook_name'] . $buyinfo->getVar('obookname') . ' ' . $buyinfo->getVar('chaptername') . ' | ' . $jieqiLang['obook']['check_check_code'] . $buyinfo->getVar('checkcode') . '<br />';
        }
        $showstr .= $jieqiLang['obook']['check_buy_time'] . date(JIEQI_DATE_FORMAT . ' ' . JIEQI_TIME_FORMAT, $buyinfo->getVar('buytime', 'n')) . ' | ' . $jieqiLang['obook']['check_buy_name'] . '<a href="' . jieqi_geturl('system', 'user', $buyinfo->getVar('userid'), 'info') . '" target="_blank">' . $buyinfo->getVar('username') . '</a> | ' . $jieqiLang['obook']['check_sale_id'] . $buyinfo->getVar('osaleid') . '<br />';
        $resnum++;
    }
}
if (!empty($showstr)) {
    $showstr = '<div style="text-align:left">' . $showstr . '</div>';
}
$check_form = new JieqiThemeForm($jieqiLang['obook']['check_form_title'], 'frmcheckcode', $obook_dynamic_url . '/admin/checkcode.php');
$check_form->addElement(new JieqiFormText($jieqiLang['obook']['check_chapter_id'], 'checkchapterid', 30, 50, ''), true);
$check_form->addElement(new JieqiFormText($jieqiLang['obook']['check_check_string'], 'checkstring', 30, 50, ''), true);
$check_form->addElement(new JieqiFormHidden('action', 'checkcode'));
$check_form->addElement(new JieqiFormButton('&nbsp;', 'submit', $jieqiLang['obook']['check_search_button'], 'submit'));
$jieqiTpl->assign('jieqi_contents', $showstr . '<br />' . $check_form->render(JIEQI_FORM_MIDDLE) . '<br />');
include_once JIEQI_ROOT_PATH . '/admin/footer.php';
Exemplo n.º 9
0
                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']);
}
Exemplo n.º 10
0
foreach ($chapterary as $k => $v) {
    $key = $k + 1;
    if ($v['chaptertype'] == 1) {
        $tmpstr = '';
    } else {
        $tmpstr = '|-';
    }
    $tmpstr .= htmlspecialchars($v['chaptername'], ENT_QUOTES);
    $from_select->addOption($v['chapterorder'], $tmpstr);
    $to_select->addOption($v['chapterorder'], $tmpstr);
}
$sort_form->addElement($from_select);
$sort_form->addElement($to_select);
$sort_form->addElement(new JieqiFormHidden('aid', $_REQUEST['id']));
$sort_form->addElement(new JieqiFormButton('&nbsp;', 'submit', $jieqiLang['obook']['sort_confirm'], 'submit'));
$jieqiTpl->assign('sort_form', $sort_form->render(JIEQI_FORM_MIDDLE));
$jieqiTpl->setCaching(0);
$jieqiTset['jieqi_contents_template'] = $jieqiModules['obook']['path'] . '/templates/obookmanage.html';
include_once JIEQI_ROOT_PATH . '/footer.php';
//如果关联文章,则生成文章的vip章节目录,更新阅读目录index.html
if (count($chapterary) > 0 && is_dir($jieqiModules['obook']['path'] . '/')) {
    $updatearticle = false;
    $articleid = $obook->getVar('articleid', 'n');
    if ($articleid > 0) {
        //有关联文章
        $linkfile = JIEQI_ROOT_PATH . '/files/obook/articlelink';
        if (!file_exists($linkfile)) {
            jieqi_createdir($linkfile);
        }
        $linkfile .= jieqi_getsubdir($articleid);
        if (!file_exists($linkfile)) {
Exemplo n.º 11
0
$criteria = new CriteriaCompo();
$criteria->setSort('groupid');
$criteria->setOrder('ASC');
$groups_handler->queryObjects($criteria);
$groups = array();
$groupary = array();
$i = 0;
while ($v = $groups_handler->getObject()) {
    $groupary[$v->getVar('groupid')] = $v->getVar('name');
    $groups[$i]['groupid'] = $v->getVar('groupid');
    $groups[$i]['name'] = $v->getVar('name');
    $groups[$i]['description'] = $v->getVar('description');
    $groups[$i]['grouptype'] = $v->getVar('grouptype');
    $i++;
}
$jieqiTpl->assign_by_ref('groups', $groups);
$groups_form = new JieqiThemeForm($jieqiLang['system']['add_group'], 'groupsnew', JIEQI_URL . '/admin/groups.php');
$groups_form->addElement(new JieqiFormText($jieqiLang['system']['table_groups_groupname'], 'groupname', 30, 50, ''), true);
$groups_form->addElement(new JieqiFormTextArea($jieqiLang['system']['table_groups_description'], 'description', '', 5, 50));
$groups_form->addElement(new JieqiFormHidden("action", "new"));
$groups_form->addElement(new JieqiFormButton('&nbsp;', 'submit', $jieqiLang['system']['add_group'], 'submit'));
$jieqiTpl->assign('form_addgroup', "<br />" . $groups_form->render(JIEQI_FORM_MIDDLE) . "<br />");
$jieqiTpl->setCaching(0);
$jieqiTset['jieqi_contents_template'] = JIEQI_ROOT_PATH . '/templates/admin/groups.html';
include_once JIEQI_ROOT_PATH . '/admin/footer.php';
//数据有变动。更新文件
if ((!empty($_REQUEST['id']) || !empty($_POST['groupname'])) && count($groupary) > 0) {
    jieqi_setconfigs('groups', 'jieqiGroups', $groupary, 'system');
    $publicdata = str_replace('?><?php', '', jieqi_readfile(JIEQI_ROOT_PATH . '/configs/system.php') . jieqi_readfile(JIEQI_ROOT_PATH . '/lang/lang_system.php') . jieqi_readfile(JIEQI_ROOT_PATH . '/configs/groups.php'));
    jieqi_writefile(JIEQI_ROOT_PATH . '/configs/define.php', $publicdata);
}
Exemplo n.º 12
0
        $collect_form->addElement(new JieqiFormText($jieqiLang['article']['collect_end_id'], 'endid', 30, 11), true);
        $notaddnew = new JieqiFormRadio($jieqiLang['article']['collect_or_addnew'], 'notaddnew', 0);
        $notaddnew->addOption(0, $jieqiLang['article']['collect_is_addnew']);
        $notaddnew->addOption(1, $jieqiLang['article']['collect_not_addnew']);
        $collect_form->addElement($notaddnew);
        $collect_form->addElement(new JieqiFormLabel($jieqiLang['article']['collect_note'], $jieqiLang['article']['collect_addnew_note']));
        $collect_form->addElement(new JieqiFormHidden('action', 'collect'));
        $collect_form->addElement(new JieqiFormButton('&nbsp;', 'submit', '开始采集', 'submit'));
        $page_form = new JieqiThemeForm($jieqiLang['article']['batch_collect_usepage'], 'frmpcollect', $article_static_url . '/admin/pagecollect.php');
        $siteid = new JieqiFormSelect($jieqiLang['article']['collect_siteid'], 'siteid', '1');
        foreach ($jieqiCollectsite as $k => $v) {
            $siteid->addOption($k, $v['name']);
        }
        $page_form->addElement($siteid);
        $page_form->addElement(new JieqiFormLabel($jieqiLang['article']['collect_note'], $jieqiLang['article']['collect_page_note']));
        $page_form->addElement(new JieqiFormButton('&nbsp;', 'psubmit', $jieqiLang['article']['collect_next_button'], 'submit'));
        $batchid_form = new JieqiThemeForm($jieqiLang['article']['batch_collect_uselist'], 'frmbcollect', $article_static_url . '/admin/' . $self_filename);
        $siteid = new JieqiFormSelect($jieqiLang['article']['collect_siteid'], 'siteid', '1');
        foreach ($jieqiCollectsite as $k => $v) {
            $siteid->addOption($k, $v['name']);
        }
        $batchid_form->addElement($siteid);
        $batchids = new JieqiFormTextArea($jieqiLang['article']['collect_batch_id'], 'batchids', "", 5, 60);
        $batchid_form->addElement($batchids, true);
        $batchid_form->addElement(new JieqiFormLabel($jieqiLang['article']['collect_note'], $jieqiLang['article']['collect_batchid_note']));
        $batchid_form->addElement(new JieqiFormHidden('action', 'bcollect'));
        $batchid_form->addElement(new JieqiFormButton('&nbsp;', 'bsubmit', $jieqiLang['article']['collect_start_button'], 'submit'));
        $jieqiTpl->assign('jieqi_contents', '<br />' . $collect_form->render(JIEQI_FORM_MIDDLE) . '<br />' . $page_form->render(JIEQI_FORM_MIDDLE) . '<br />' . $batchid_form->render(JIEQI_FORM_MIDDLE) . '<br />');
        include_once JIEQI_ROOT_PATH . '/admin/footer.php';
        break;
}