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
         $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');
     $collect_form->addElement(new JieqiFormLabel($jieqiLang['article']['collect_siteid'], $jieqiCollect['sitename']));
     $collectname = new JieqiFormSelect($jieqiLang['article']['collect_name'], 'collectname', '0');
     if (is_array($jieqiCollect['listcollect'])) {
         foreach ($jieqiCollect['listcollect'] as $k => $v) {
             $collectname->addOption($k, $v['title']);
         }
     }
     $collect_form->addElement($collectname);
     $startpageid = new JieqiFormText($jieqiLang['article']['collect_start_pageid'], 'startpageid', 30, 11);
     $startpageid->setDescription($jieqiLang['article']['collect_page_emptynote']);
     $collect_form->addElement($startpageid);
     $maxpagenum = new JieqiFormText($jieqiLang['article']['collect_max_pagenum'], 'maxpagenum', 30, 11);
     $maxpagenum->setDescription($jieqiLang['article']['collect_page_note']);
     $collect_form->addElement($maxpagenum);
     $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_not_addnew'], $jieqiLang['article']['collect_page_note']));
     $collect_form->addElement(new JieqiFormHidden('siteid', $_REQUEST['siteid']));
Exemplo n.º 3
0
 $autoclear->addOption('1', LANG_YES);
 $autoclear->addOption('0', LANG_NO);
 $collect_form->addElement($autoclear);
 $defaultfull = new JieqiFormRadio($jieqiLang['article']['rule_default_full'], 'defaultfull', $jieqiCollect['defaultfull']);
 $defaultfull->addOption('1', LANG_YES);
 $defaultfull->addOption('0', LANG_NO);
 $collect_form->addElement($defaultfull);
 $referer = new JieqiFormRadio($jieqiLang['article']['rule_send_referer'], 'referer', $jieqiCollect['referer']);
 $referer->addOption('1', LANG_YES);
 $referer->addOption('0', LANG_NO);
 $collect_form->addElement($referer);
 if (empty($jieqiCollect['pagecharset'])) {
     $jieqiCollect['pagecharset'] = 'auto';
 }
 $pagecharset = new JieqiFormSelect($jieqiLang['article']['rule_page_charset'], 'pagecharset', $jieqiCollect['pagecharset']);
 $pagecharset->addOption('auto', $jieqiLang['article']['rule_charset_auto']);
 $pagecharset->addOption('gbk', $jieqiLang['article']['rule_charset_gb']);
 $pagecharset->addOption('utf8', $jieqiLang['article']['rule_charset_utf8']);
 $pagecharset->addOption('big5', $jieqiLang['article']['rule_charset_big5']);
 $pagecharset->setDescription($jieqiLang['article']['rule_charset_note']);
 $collect_form->addElement($pagecharset);
 $collect_form->addElement(new JieqiFormLabel('', $jieqiLang['article']['collect_rule_articleinfo']));
 $collect_form->addElement(new JieqiFormText($jieqiLang['article']['rule_articleinfo_url'], 'urlarticle', 60, 250, htmlspecialchars($jieqiCollect['urlarticle'], ENT_QUOTES)), true);
 $collect_form->addElement(new JieqiFormTextArea($jieqiLang['article']['rule_article_title'], 'articletitle', htmlspecialchars(jieqi_collectstop($jieqiCollect['articletitle']), ENT_QUOTES), 5, 60), true);
 $collect_form->addElement(new JieqiFormTextArea($jieqiLang['article']['rule_article_author'], 'author', htmlspecialchars(jieqi_collectstop($jieqiCollect['author']), ENT_QUOTES), 5, 60));
 $collect_form->addElement(new JieqiFormTextArea($jieqiLang['article']['rule_article_sort'], 'sort', htmlspecialchars(jieqi_collectstop($jieqiCollect['sort']), ENT_QUOTES), 5, 60));
 if (!is_array($jieqiCollect['sortid'])) {
     $jieqiCollect['sortid'] = array();
 }
 $tmpstr = '';
 foreach ($jieqiCollect['sortid'] as $k => $v) {
Exemplo n.º 4
0
     $tmpstr = '';
     if ($val['layer'] > 0) {
         for ($i = 0; $i < $val['layer']; $i++) {
             $tmpstr .= '&nbsp;&nbsp;';
         }
         $tmpstr .= '├';
     }
     $tmpstr .= $val['caption'];
     $sort_select->addOption($key, $tmpstr);
 }
 $obook_form->addElement($sort_select, true);
 jieqi_getconfigs(JIEQI_MODULE_NAME, 'publisher');
 if (isset($jieqiPublisher) && count($jieqiPublisher) > 1) {
     $publisher_select = new JieqiFormSelect($jieqiLang['obook']['table_obook_publishid'], 'publishid', $obook->getVar('publishid', 'e'));
     foreach ($jieqiPublisher as $key => $val) {
         $publisher_select->addOption($key, $val['name']);
     }
     $obook_form->addElement($publisher_select, false);
 }
 $_POST['obookname'] = new JieqiFormText($jieqiLang['obook']['table_obook_keywords'], 'keywords', 30, 50, $obook->getVar('keywords', 'e'));
 $_POST['obookname']->setDescription($jieqiLang['obook']['keywords_note']);
 $obook_form->addElement($_POST['obookname']);
 if (jieqi_checkpower($jieqiPower['obook']['transobook'], $jieqiUsersStatus, $jieqiUsersGroup, true)) {
     $authorname = new JieqiFormText($jieqiLang['obook']['table_obook_author'], 'author', 30, 30, $obook->getVar('author', 'e'));
     //$authorname->setDescription('发表自己作品请留空');
     $obook_form->addElement($authorname);
     if ($obook->getVar('authorid') > 0) {
         $tmpvar = '1';
     } else {
         $tmpvar = '0';
     }
Exemplo n.º 5
0
     }
     break;
 case 'edit':
 default:
     include_once JIEQI_ROOT_PATH . '/admin/header.php';
     include_once JIEQI_ROOT_PATH . '/lib/html/formloader.php';
     $edit_form = new JieqiThemeForm($jieqiLang['system']['user_manage'], 'usermanage', JIEQI_URL . '/admin/usermanage.php');
     $edit_form->addElement(new JieqiFormLabel($jieqiLang['system']['table_users_uname'], $user->getVar('uname')));
     $pass = new JieqiFormPassword($jieqiLang['system']['table_users_pass'], 'pass', 25, 20);
     $pass->setDescription($jieqiLang['system']['not_change_password']);
     $edit_form->addElement($pass);
     $edit_form->addElement(new JieqiFormPassword($jieqiLang['system']['confirm_password'], 'repass', 25, 20));
     if ($adminlevel >= 2) {
         $group_select = new JieqiFormSelect($jieqiLang['system']['table_users_groupid'], 'groupid', $user->getVar('groupid', 'e'));
         foreach ($jieqiGroups as $key => $val) {
             $group_select->addOption($key, $val);
         }
         $edit_form->addElement($group_select, true);
     }
     $edit_form->addElement(new JieqiFormText($jieqiLang['system']['table_users_experience'], 'experience', 25, 11, $user->getVar('experience', 'e')));
     $edit_form->addElement(new JieqiFormText($jieqiLang['system']['table_users_score'], 'score', 25, 11, $user->getVar('score', 'e')));
     if ($adminlevel >= 3) {
         $edit_form->addElement(new JieqiFormText(JIEQI_EGOLD_NAME, 'egold', 25, 11, $user->getVar('egold', 'e')));
         $edit_form->addElement(new JieqiFormText($jieqiLang['system']['table_users_esilver'], 'esilver', 25, 11, $user->getVar('esilver', 'e')));
         $isvip = new JieqiFormRadio($jieqiLang['system']['table_users_isvip'], 'isvip', $user->getVar('isvip', 'e'));
         $isvip->addOption(0, $jieqiLang['system']['user_no_vip']);
         $isvip->addOption(1, $jieqiLang['system']['user_is_vip']);
         $isvip->addOption(2, $jieqiLang['system']['user_super_vip']);
         $edit_form->addElement($isvip);
     }
     if ($adminlevel >= 4) {
Exemplo n.º 6
0
    $stoptime = new JieqiFormText($jieqiLang['article']['replace_end_time'], 'stoptime', 20, 20, date('Y-m-d H:i:s'));
    $stoptime->setDescription($jieqiLang['article']['replace_time_format']);
    $timereplace_form->addElement($stoptime);
    $timereplace_form->addElement(new JieqiFormTextArea($jieqiLang['article']['replace_search_string'], 'txtsearch', '', 5, 60), true);
    $timereplace_form->addElement(new JieqiFormTextArea($jieqiLang['article']['replace_to'], 'txtreplace', '', 5, 60), false);
    $radio = new JieqiFormRadio($jieqiLang['article']['replace_type'], 'replacetype', 0);
    $radio->addOption('0', $jieqiLang['article']['replace_as_block']);
    $radio->addOption('1', $jieqiLang['article']['replace_as_line']);
    $timereplace_form->addElement($radio, false);
    $checkbox = new JieqiFormCheckBox($jieqiLang['article']['replace_filetype'], 'replaceflag');
    $checkbox->addOption('filetxt', $jieqiLang['article']['replace_file_txt']);
    $checkbox->addOption('filehtml', $jieqiLang['article']['replace_file_html']);
    $checkbox->addOption('filefull', $jieqiLang['article']['replace_file_full']);
    $timereplace_form->addElement($checkbox, false);
    $sizebox = new JieqiFormSelect($jieqiLang['article']['replace_filesize'], 'filesize');
    $sizebox->addOption('sizeunlimit', $jieqiLang['article']['replace_size_nolimit']);
    $sizebox->addOption('sizeless', $jieqiLang['article']['replace_size_less']);
    $sizebox->addOption('sizemore', $jieqiLang['article']['replace_size_more']);
    $timereplace_form->addElement($sizebox, false);
    $timereplace_form->addElement(new JieqiFormHidden('action', 'replacewithtime'));
    $timereplace_form->addElement(new JieqiFormButton('&nbsp;', 'submit', $jieqiLang['article']['replace_start_button'], 'submit'));
    $jieqiTpl->assign('replace_form', $replace_form->render(JIEQI_FORM_MIDDLE) . '<br /><br />' . $timereplace_form->render(JIEQI_FORM_MIDDLE));
    $jieqiTpl->setCaching(0);
    $jieqiTset['jieqi_contents_template'] = $jieqiModules['article']['path'] . '/templates/admin/batchreplace.html';
    include_once JIEQI_ROOT_PATH . '/admin/footer.php';
}
function replace_path($articleid, $dirtype, $filetype, $idisdir = true)
{
    global $showinfo;
    global $fromary;
    global $toary;
Exemplo n.º 7
0
    }
}
if ($i > 0) {
    for ($j = $i; $j < $cols; $j++) {
        $obook_table .= '<td width="' . $tdwidth . '%" class="odd">&nbsp;</td>';
    }
    $obook_table .= '</tr>';
}
$obook_table .= '</table>';
$jieqiTpl->assign('obook_table', $obook_table);
//章节排序
include_once JIEQI_ROOT_PATH . '/lib/html/formloader.php';
$sort_form = new JieqiThemeForm($jieqiLang['obook']['chapter_sort'], 'chaptersort', $obook_static_url . '/chaptersort.php');
$from_select = new JieqiFormSelect($jieqiLang['obook']['choose_chapter'], 'fromid');
$to_select = new JieqiFormSelect($jieqiLang['obook']['chapter_move_to'], 'toid');
$to_select->addOption('0', $jieqiLang['obook']['chapter_top_sort']);
$to_select->setDescription($jieqiLang['obook']['chapter_after_sort']);
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']));
Exemplo n.º 8
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;
}