Example #1
0
 $collect_form->addElement($indexelement);
 $fullelement = new JieqiFormTextArea($jieqiLang['article']['rule_article_full'], 'fullarticle', htmlspecialchars(jieqi_collectstop($jieqiCollect['fullarticle']), ENT_QUOTES), 5, 60);
 $fullelement->setIntro($jieqiLang['article']['rule_articlefull_note']);
 $collect_form->addElement($fullelement);
 $collect_form->addElement(new JieqiFormLabel('', $jieqiLang['article']['collect_rule_index']));
 $collect_form->addElement(new JieqiFormText($jieqiLang['article']['rule_index_url'], 'urlindex', 60, 250, htmlspecialchars($jieqiCollect['urlindex'], ENT_QUOTES)), true);
 $collect_form->addElement(new JieqiFormTextArea($jieqiLang['article']['rule_volume_name'], 'volume', htmlspecialchars(jieqi_collectstop($jieqiCollect['volume']), ENT_QUOTES), 5, 60));
 $collect_form->addElement(new JieqiFormTextArea($jieqiLang['article']['rule_chapter_name'], 'chapter', htmlspecialchars(jieqi_collectstop($jieqiCollect['chapter']), ENT_QUOTES), 5, 60), true);
 $collect_form->addElement(new JieqiFormTextArea($jieqiLang['article']['rule_chapter_id'], 'chapterid', htmlspecialchars(jieqi_collectstop($jieqiCollect['chapterid']), ENT_QUOTES), 5, 60), true);
 $collect_form->addElement(new JieqiFormLabel('', $jieqiLang['article']['collect_rule_chapter']));
 $collect_form->addElement(new JieqiFormText($jieqiLang['article']['rule_chapter_url'], 'urlchapter', 60, 250, htmlspecialchars($jieqiCollect['urlchapter'], ENT_QUOTES)), true);
 $collect_form->addElement(new JieqiFormTextArea($jieqiLang['article']['rule_chapter_content'], 'content', htmlspecialchars(jieqi_collectstop($jieqiCollect['content']), ENT_QUOTES), 5, 60), true);
 $filterelement = new JieqiFormTextArea($jieqiLang['article']['rule_chapter_filter'], 'contentfilter', htmlspecialchars(jieqi_collectstop($jieqiCollect['contentfilter']), ENT_QUOTES), 5, 60);
 $filterelement->setIntro($jieqiLang['article']['rule_chapterfilter_note']);
 $collect_form->addElement($filterelement);
 $replaceelement = new JieqiFormTextArea($jieqiLang['article']['rule_chapter_replace'], 'contentreplace', htmlspecialchars(jieqi_collectstop($jieqiCollect['contentreplace']), ENT_QUOTES), 5, 60);
 $replaceelement->setIntro($jieqiLang['article']['rule_chapterreplace_note']);
 $collect_form->addElement($replaceelement);
 $collectimage = new JieqiFormRadio($jieqiLang['article']['rule_or_articleimage'], 'collectimage', $jieqiCollect['collectimage']);
 $collectimage->addOption('1', LANG_YES);
 $collectimage->addOption('0', LANG_NO);
 $collect_form->addElement($collectimage);
 //图片处理
 $collect_form->addElement(new JieqiFormLabel('', $jieqiLang['article']['collect_rule_imagetranslate']));
 $imagetranslate = new JieqiFormRadio($jieqiLang['article']['rule_or_imagetranslate'], 'imagetranslate', intval($jieqiCollect['imagetranslate']));
 $imagetranslate->addOption('1', LANG_YES);
 $imagetranslate->addOption('0', LANG_NO);
 $imagetranslate->setDescription($jieqiLang['article']['rule_or_imagetranslatedec']);
 $collect_form->addElement($imagetranslate);
 $addimagewater = new JieqiFormRadio($jieqiLang['article']['rule_or_imagewater'], 'addimagewater', intval($jieqiCollect['addimagewater']));
 $addimagewater->addOption('1', LANG_YES);
Example #2
0
        }
        $jieqiCollect['listcollect'][$_REQUEST['cid']] = $tmpary;
        $configstr = "<?php\n" . jieqi_extractvars('jieqiCollect', $jieqiCollect) . "\n?>";
        jieqi_writefile(JIEQI_ROOT_PATH . '/configs/article/site_' . $_REQUEST['config'] . '.php', $configstr);
        jieqi_jumppage($jieqiModules['article']['url'] . '/admin/collectpage.php?config=' . $_REQUEST['config'], LANG_DO_SUCCESS, $jieqiLang['article']['batchcollect_edit_success']);
        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']['batchcollect_edit'], 'collectedit', $article_static_url . '/admin/collectpedit.php');
        $collect_form->addElement(new JieqiFormLabel($jieqiLang['article']['collect_rule_note'], $jieqiLang['article']['collect_rule_description']));
        $collect_form->addElement(new JieqiFormLabel($jieqiLang['article']['collect_siteid'], $jieqiCollect['sitename']));
        $collect_form->addElement(new JieqiFormText($jieqiLang['article']['collect_rule_name'], 'title', 60, 60, htmlspecialchars($jieqiCollect['listcollect'][$_REQUEST['cid']]['title'], ENT_QUOTES)), true);
        $collect_form->addElement(new JieqiFormText($jieqiLang['article']['collect_rule_url'], 'urlpage', 60, 250, htmlspecialchars($jieqiCollect['listcollect'][$_REQUEST['cid']]['urlpage'], ENT_QUOTES)), true);
        $collect_form->addElement(new JieqiFormTextArea($jieqiLang['article']['collect_rule_articleid'], 'articleid', htmlspecialchars(jieqi_collectstop($jieqiCollect['listcollect'][$_REQUEST['cid']]['articleid']), ENT_QUOTES), 5, 60), true);
        $nextpageid = new JieqiFormTextArea($jieqiLang['article']['rule_next_pageid'], 'nextpageid', htmlspecialchars(jieqi_collectstop($jieqiCollect['listcollect'][$_REQUEST['cid']]['nextpageid']), ENT_QUOTES), 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, htmlspecialchars($jieqiCollect['listcollect'][$_REQUEST['cid']]['startpageid'], ENT_QUOTES)));
        $collect_form->addElement(new JieqiFormText($jieqiLang['article']['rule_max_pagenum'], 'maxpagenum', 60, 10, htmlspecialchars($jieqiCollect['listcollect'][$_REQUEST['cid']]['maxpagenum'], ENT_QUOTES)));
        $collect_form->addElement(new JieqiFormHidden('config', htmlspecialchars($_REQUEST['config'], ENT_QUOTES)));
        $collect_form->addElement(new JieqiFormHidden('cid', htmlspecialchars($_REQUEST['cid'], ENT_QUOTES)));
        $collect_form->addElement(new JieqiFormHidden('action', 'edit'));
        $collect_form->addElement(new JieqiFormButton('&nbsp;', 'submit', $jieqiLang['article']['rule_save_edit'], 'submit'));
        $jieqiTpl->assign('jieqi_contents', '<br />' . $collect_form->render(JIEQI_FORM_MIDDLE) . '<br />');
        include_once JIEQI_ROOT_PATH . '/admin/footer.php';
        break;
}