예제 #1
0
 public static function breadcrumb($elements = null, $options = array())
 {
     if (method_exists('dcPage', 'breadcrumb')) {
         return dcPage::breadcrumb($elements, $options);
     } else {
         $with_home_link = isset($options['home_link']) ? $options['home_link'] : true;
         $hl = isset($options['hl']) ? $options['hl'] : true;
         $hl_pos = isset($options['hl_pos']) ? $options['hl_pos'] : -1;
         // First item of array elements should be blog's name, System or Plugins
         $res = '<h2>';
         $index = 0;
         if ($hl_pos < 0) {
             $hl_pos = count($elements) + $hl_pos;
         }
         foreach ($elements as $element => $url) {
             if ($hl && $index == $hl_pos) {
                 $element = sprintf('<span class="page-title">%s</span>', $element);
             }
             $res .= ($index == 0 ? ' ' : ' &rsaquo; ') . ($url ? '<a href="' . $url . '">' : '') . $element . ($url ? '</a>' : '');
             $index++;
         }
         $res .= '</h2>';
         return $res;
     }
 }
예제 #2
0
 public function gui()
 {
     if ($this->status) {
         dcPage::success(__('Content successfully imported.'));
     }
     echo '<form action="' . $this->getURL(true) . '" method="post">' . '<p>' . sprintf(__('Add a feed content to the current blog: <strong>%s</strong>.'), html::escapeHTML($this->core->blog->name)) . '</p>' . '<p><label for="feed_url">' . __('Feed URL:') . '</label>' . form::field('feed_url', 50, 300, html::escapeHTML($this->feed_url)) . '</p>' . '<p>' . $this->core->formNonce() . form::hidden(array('do'), 1) . '<input type="submit" value="' . __('Import') . '" /></p>' . '</form>';
 }
예제 #3
0
 public static function adminPopupPosts($editor = '')
 {
     if (empty($editor) || $editor != 'dcCKEditor') {
         return;
     }
     return dcPage::jsLoad(self::$p_url . '/js/popup_posts.js');
 }
 protected static function jsToolBar()
 {
     $res = dcPage::cssLoad(dcPage::getPF('dcLegacyEditor/css/jsToolBar/jsToolBar.css')) . dcPage::jsLoad(dcPage::getPF('dcLegacyEditor/js/jsToolBar/jsToolBar.js'));
     if (isset($GLOBALS['core']->auth) && $GLOBALS['core']->auth->getOption('enable_wysiwyg')) {
         $res .= dcPage::jsLoad(dcPage::getPF('dcLegacyEditor/js/jsToolBar/jsToolBar.wysiwyg.js'));
     }
     $res .= dcPage::jsLoad(dcPage::getPF('dcLegacyEditor/js/jsToolBar/jsToolBar.dotclear.js')) . '<script type="text/javascript">' . "\n" . "//<![CDATA[\n" . "jsToolBar.prototype.dialog_url = 'popup.php'; " . "jsToolBar.prototype.iframe_css = '" . 'body{' . 'font: 12px "DejaVu Sans","Lucida Grande","Lucida Sans Unicode",Arial,sans-serif;' . 'color : #000;' . 'background: #f9f9f9;' . 'margin: 0;' . 'padding : 2px;' . 'border: none;' . (l10n::getTextDirection($GLOBALS['_lang']) == 'rtl' ? 'direction:rtl;' : '') . '}' . 'pre, code, kbd, samp {' . 'font-family:"Courier New",Courier,monospace;' . 'font-size : 1.1em;' . '}' . 'code {' . 'color : #666;' . 'font-weight : bold;' . '}' . 'body > p:first-child {' . 'margin-top: 0;' . '}' . "'; " . "jsToolBar.prototype.base_url = '" . html::escapeJS($GLOBALS['core']->blog->host) . "'; " . "jsToolBar.prototype.switcher_visual_title = '" . html::escapeJS(__('visual')) . "'; " . "jsToolBar.prototype.switcher_source_title = '" . html::escapeJS(__('source')) . "'; " . "jsToolBar.prototype.legend_msg = '" . html::escapeJS(__('You can use the following shortcuts to format your text.')) . "'; " . "jsToolBar.prototype.elements.blocks.options.none = '" . html::escapeJS(__('-- none --')) . "'; " . "jsToolBar.prototype.elements.blocks.options.nonebis = '" . html::escapeJS(__('-- block format --')) . "'; " . "jsToolBar.prototype.elements.blocks.options.p = '" . html::escapeJS(__('Paragraph')) . "'; " . "jsToolBar.prototype.elements.blocks.options.h1 = '" . html::escapeJS(__('Level 1 header')) . "'; " . "jsToolBar.prototype.elements.blocks.options.h2 = '" . html::escapeJS(__('Level 2 header')) . "'; " . "jsToolBar.prototype.elements.blocks.options.h3 = '" . html::escapeJS(__('Level 3 header')) . "'; " . "jsToolBar.prototype.elements.blocks.options.h4 = '" . html::escapeJS(__('Level 4 header')) . "'; " . "jsToolBar.prototype.elements.blocks.options.h5 = '" . html::escapeJS(__('Level 5 header')) . "'; " . "jsToolBar.prototype.elements.blocks.options.h6 = '" . html::escapeJS(__('Level 6 header')) . "'; " . "jsToolBar.prototype.elements.strong.title = '" . html::escapeJS(__('Strong emphasis')) . "'; " . "jsToolBar.prototype.elements.em.title = '" . html::escapeJS(__('Emphasis')) . "'; " . "jsToolBar.prototype.elements.ins.title = '" . html::escapeJS(__('Inserted')) . "'; " . "jsToolBar.prototype.elements.del.title = '" . html::escapeJS(__('Deleted')) . "'; " . "jsToolBar.prototype.elements.quote.title = '" . html::escapeJS(__('Inline quote')) . "'; " . "jsToolBar.prototype.elements.code.title = '" . html::escapeJS(__('Code')) . "'; " . "jsToolBar.prototype.elements.br.title = '" . html::escapeJS(__('Line break')) . "'; " . "jsToolBar.prototype.elements.blockquote.title = '" . html::escapeJS(__('Blockquote')) . "'; " . "jsToolBar.prototype.elements.pre.title = '" . html::escapeJS(__('Preformated text')) . "'; " . "jsToolBar.prototype.elements.ul.title = '" . html::escapeJS(__('Unordered list')) . "'; " . "jsToolBar.prototype.elements.ol.title = '" . html::escapeJS(__('Ordered list')) . "'; " . "jsToolBar.prototype.elements.link.title = '" . html::escapeJS(__('Link')) . "'; " . "jsToolBar.prototype.elements.link.href_prompt = '" . html::escapeJS(__('URL?')) . "'; " . "jsToolBar.prototype.elements.link.hreflang_prompt = '" . html::escapeJS(__('Language?')) . "'; " . "jsToolBar.prototype.elements.img.title = '" . html::escapeJS(__('External image')) . "'; " . "jsToolBar.prototype.elements.img.src_prompt = '" . html::escapeJS(__('URL?')) . "'; " . "jsToolBar.prototype.elements.img_select.title = '" . html::escapeJS(__('Media chooser')) . "'; " . "jsToolBar.prototype.elements.post_link.title = '" . html::escapeJS(__('Link to an entry')) . "'; " . "jsToolBar.prototype.elements.removeFormat = jsToolBar.prototype.elements.removeFormat || {}; " . "jsToolBar.prototype.elements.removeFormat.title = '" . html::escapeJS(__('Remove text formating')) . "'; ";
     if (!$GLOBALS['core']->auth->check('media,media_admin', $GLOBALS['core']->blog->id)) {
         $res .= "jsToolBar.prototype.elements.img_select.disabled = true;\n";
     }
     $res .= "jsToolBar.prototype.toolbar_bottom = " . (isset($GLOBALS['core']->auth) && $GLOBALS['core']->auth->getOption('toolbar_bottom') ? 'true' : 'false') . ";\n";
     $res .= "\n//]]>\n" . "</script>\n";
     return $res;
 }
예제 #5
0
 public function gui($url)
 {
     $bls = $this->getServers();
     if (isset($_POST['bls'])) {
         try {
             $this->core->blog->settings->addNamespace('antispam');
             $this->core->blog->settings->antispam->put('antispam_dnsbls', $_POST['bls'], 'string', 'Antispam DNSBL servers', true, false);
             dcPage::addSuccessNotice(__('The list of DNSBL servers has been succesfully updated.'));
             http::redirect($url);
         } catch (Exception $e) {
             $core->error->add($e->getMessage());
         }
     }
     /* DISPLAY
     		---------------------------------------------- */
     $res = dcPage::notices();
     $res .= '<form action="' . html::escapeURL($url) . '" method="post" class="fieldset">' . '<h3>' . __('IP Lookup servers') . '</h3>' . '<p><label for="bls">' . __('Add here a coma separated list of servers.') . '</label>' . form::textarea('bls', 40, 3, html::escapeHTML($bls), 'maximal') . '</p>' . '<p><input type="submit" value="' . __('Save') . '" />' . $this->core->formNonce() . '</p>' . '</form>';
     return $res;
 }
예제 #6
0
 public static function doReorderPages($core, dcPostsActionsPage $ap, $post)
 {
     foreach ($post['order'] as $post_id => $value) {
         if (!$core->auth->check('publish,contentadmin', $core->blog->id)) {
             throw new Exception(__('You are not allowed to change this entry status'));
         }
         $strReq = "WHERE blog_id = '" . $core->con->escape($core->blog->id) . "' " . "AND post_id " . $core->con->in($post_id);
         #If user can only publish, we need to check the post's owner
         if (!$core->auth->check('contentadmin', $core->blog->id)) {
             $strReq .= "AND user_id = '" . $core->con->escape($core->auth->userID()) . "' ";
         }
         $cur = $core->con->openCursor($core->prefix . 'post');
         $cur->post_position = (int) $value - 1;
         $cur->post_upddt = date('Y-m-d H:i:s');
         $cur->update($strReq);
         $core->blog->triggerBlog();
     }
     dcPage::addSuccessNotice(__('Selected pages have been successfully reordered.'));
     $ap->redirect(false);
 }
예제 #7
0
 public function gui($url)
 {
     global $default_tab;
     $core =& $this->core;
     # Set current type and tab
     $ip_type = 'black';
     if (!empty($_REQUEST['ip_type']) && $_REQUEST['ip_type'] == 'white') {
         $ip_type = 'white';
     }
     $default_tab = 'tab_' . $ip_type;
     # Add IP to list
     if (!empty($_POST['addip'])) {
         try {
             $global = !empty($_POST['globalip']) && $core->auth->isSuperAdmin();
             $this->addIP($ip_type, $_POST['addip'], $global);
             dcPage::addSuccessNotice(__('IP address has been successfully added.'));
             http::redirect($url . '&ip_type=' . $ip_type);
         } catch (Exception $e) {
             $core->error->add($e->getMessage());
         }
     }
     # Remove IP from list
     if (!empty($_POST['delip']) && is_array($_POST['delip'])) {
         try {
             $this->removeRule($_POST['delip']);
             dcPage::addSuccessNotice(__('IP addresses have been successfully removed.'));
             http::redirect($url . '&ip_type=' . $ip_type);
         } catch (Exception $e) {
             $core->error->add($e->getMessage());
         }
     }
     /* DISPLAY
     		---------------------------------------------- */
     $res = dcPage::notices();
     $res .= $this->displayForms($url, 'black', __('Blacklist')) . $this->displayForms($url, 'white', __('Whitelist'));
     return $res;
 }
예제 #8
0
    public static function adminPageHTMLHead()
    {
        global $core;
        if ($core->blog->settings->system->theme != 'ductile') {
            return;
        }
        echo "\n" . '<!-- Header directives for Ductile configuration -->' . "\n";
        $core->auth->user_prefs->addWorkspace('accessibility');
        if (!$core->auth->user_prefs->accessibility->nodragdrop) {
            echo dcPage::jsLoad('js/jquery/jquery-ui.custom.js') . dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js');
            echo <<<EOT
<script type="text/javascript">
//<![CDATA[
\$(function() {
\t\$("#stickerslist").sortable({'cursor':'move'});
\t\$("#stickerslist tr").hover(function () {
\t\t\$(this).css({'cursor':'move'});
\t}, function () {
\t\t\$(this).css({'cursor':'auto'});
\t});
\t\$('#theme_config').submit(function() {
\t\tvar order=[];
\t\t\$("#stickerslist tr td input.position").each(function() {
\t\t\torder.push(this.name.replace(/^order\\[([^\\]]+)\\]\$/,'\$1'));
\t\t});
\t\t\$("input[name=ds_order]")[0].value = order.join(',');
\t\treturn true;
\t});
\t\$("#stickerslist tr td input.position").hide();
\t\$("#stickerslist tr td.handle").addClass('handler');
});
//]]>
</script>
EOT;
        }
    }
예제 #9
0
파일: _admin.php 프로젝트: nikrou/dotclear
 public static function pagesDashboardFavs($core, $favs)
 {
     $favs->register('pages', array('title' => __('Pages'), 'url' => $core->adminurl->get('admin.plugin.pages'), 'small-icon' => dcPage::getPF('pages/icon.png'), 'large-icon' => dcPage::getPF('pages/icon-big.png'), 'permissions' => 'contentadmin,pages', 'dashboard_cb' => array('pagesDashboard', 'pagesDashboardCB'), 'active_cb' => array('pagesDashboard', 'pagesActiveCB')));
     $favs->register('newpage', array('title' => __('New page'), 'url' => $core->adminurl->get('admin.plugin.pages', array('act' => 'page')), 'small-icon' => dcPage::getPF('pages/icon-np.png'), 'large-icon' => dcPage::getPF('pages/icon-np-big.png'), 'permissions' => 'contentadmin,pages', 'active_cb' => array('pagesDashboard', 'newPageActiveCB')));
 }
예제 #10
0
파일: index.php 프로젝트: nikrou/dotclear
                    }
                }
                $res_task .= '</p>';
            }
            if (!empty($res_task)) {
                $res_group .= '<div class="fieldset">' . '<h4 id="' . $group_obj->id() . '">' . $group_obj->name() . '</h4>' . $res_task . '</div>';
            }
        }
        if (!empty($res_group)) {
            echo '<div id="' . $tab_obj->id() . '" class="multi-part" title="' . $tab_obj->name() . '">' . '<h3>' . $tab_obj->name() . '</h3>' . '<form action="' . $p_url . '" method="post">' . $res_group . '<p><input type="submit" value="' . __('Execute task') . '" /> ' . form::hidden(array('tab'), $tab_obj->id()) . $core->formNonce() . '</p>' . '<p class="form-note info">' . __('This may take a very long time.') . '</p>' . '</form>' . '</div>';
        }
    }
    // Advanced tasks (that required a tab)
    foreach ($tasks as $t) {
        if (!$t->id() || $t->group() !== null) {
            continue;
        }
        echo '<div id="' . $t->id() . '" class="multi-part" title="' . $t->name() . '">' . '<h3>' . $t->name() . '</h3>' . '<form action="' . $p_url . '" method="post">' . $t->content() . '<p><input type="submit" value="' . __('Execute task') . '" /> ' . form::hidden(array('task'), $t->id()) . form::hidden(array('tab'), $t->id()) . $core->formNonce() . '</p>' . '</form>' . '</div>';
    }
    // Settings
    echo '<div id="settings" class="multi-part" title="' . __('Alert settings') . '">' . '<h3>' . __('Alert settings') . '</h3>' . '<form action="' . $p_url . '" method="post">' . '<h4 class="pretty-title">' . __('Activation') . '</h4>' . '<p><label for="settings_plugin_message" class="classic">' . form::checkbox('settings_plugin_message', 1, $core->blog->settings->maintenance->plugin_message) . __('Display alert messages on late tasks') . '</label></p>' . '<p class="info">' . sprintf(__('You can place list of late tasks on your %s.'), '<a href="' . $core->adminurl->get('admin.user.preferences') . '#user-favorites">' . __('Dashboard') . '</a>') . '</p>' . '<h4 class="pretty-title vertical-separator">' . __('Frequency') . '</h4>' . '<p class="vertical-separator">' . form::radio(array('settings_recall_type', 'settings_recall_all'), 'all') . ' ' . '<label class="classic" for="settings_recall_all">' . '<strong>' . __('Use one recall time for all tasks') . '</strong></label></p>' . '<p class="field wide vertical-separator"><label for="settings_recall_time">' . __('Recall time for all tasks:') . '</label>' . form::combo('settings_recall_time', $combo_ts, 'seperate', 'recall-for-all') . '</p>' . '<p class="vertical-separator">' . form::radio(array('settings_recall_type', 'settings_recall_separate'), 'separate', 1) . ' ' . '<label class="classic" for="settings_recall_separate">' . '<strong>' . __('Use one recall time per task') . '</strong></label></p>';
    foreach ($tasks as $t) {
        if (!$t->id()) {
            continue;
        }
        echo '<div class="two-boxes">' . '<p class="field wide"><label for="settings_ts_' . $t->id() . '">' . $t->task() . '</label>' . form::combo('settings_ts_' . $t->id(), $combo_ts, $t->ts(), 'recall-per-task') . '</p>' . '</div>';
    }
    echo '<p class="field wide"><input type="submit" value="' . __('Save') . '" /> ' . form::hidden(array('tab'), 'settings') . form::hidden(array('save_settings'), 1) . $core->formNonce() . '</p>' . '</form>' . '</div>';
}
dcPage::helpBlock('maintenance', 'maintenancetasks');
echo '</body></html>';
예제 #11
0
파일: _config.php 프로젝트: nikrou/dotclear
echo '</div>';
echo '<h4 class="clear border-top pretty-title">' . __('Titles') . '</h4>';
echo '<div class="two-cols">';
echo '<div class="col">';
echo '<h5>' . __('Blog title') . '</h5>' . '<p class="field"><label for="blog_title_w">' . __('In bold:') . '</label> ' . form::checkbox('blog_title_w', 1, $ductile_user['blog_title_w']) . '</p>' . '<p class="field"><label for="blog_title_s">' . __('Font size (in em by default):') . '</label> ' . form::field('blog_title_s', 7, 7, $ductile_user['blog_title_s']) . '</p>' . '<p class="field picker"><label for="blog_title_c">' . __('Color:') . '</label> ' . form::field('blog_title_c', 7, 7, $ductile_user['blog_title_c'], 'colorpicker') . dcThemeConfig::contrastRatio($ductile_user['blog_title_c'], '#ffffff', !empty($ductile_user['blog_title_s']) ? $ductile_user['blog_title_s'] : '2em', $ductile_user['blog_title_w']) . '</p>';
echo '</div>';
echo '<div class="col">';
echo '<h5>' . __('Post title') . '</h5>' . '<p class="field"><label for="post_title_w">' . __('In bold:') . '</label> ' . form::checkbox('post_title_w', 1, $ductile_user['post_title_w']) . '</p>' . '<p class="field"><label for="post_title_s">' . __('Font size (in em by default):') . '</label> ' . form::field('post_title_s', 7, 7, $ductile_user['post_title_s']) . '</p>' . '<p class="field picker"><label for="post_title_c">' . __('Color:') . '</label> ' . form::field('post_title_c', 7, 7, $ductile_user['post_title_c'], 'colorpicker') . dcThemeConfig::contrastRatio($ductile_user['post_title_c'], '#ffffff', !empty($ductile_user['post_title_s']) ? $ductile_user['post_title_s'] : '2.5em', $ductile_user['post_title_w']) . '</p>';
echo '</div>';
echo '</div>';
echo '<h5>' . __('Titles without link') . '</h5>' . '<p class="field picker"><label for="post_simple_title_c">' . __('Color:') . '</label> ' . form::field('post_simple_title_c', 7, 7, $ductile_user['post_simple_title_c'], 'colorpicker') . dcThemeConfig::contrastRatio($ductile_user['post_simple_title_c'], '#ffffff', '1.1em', false) . '</p>';
echo '<h4 class="border-top pretty-title">' . __('Inside posts links') . '</h4>' . '<p class="field"><label for="post_link_w">' . __('In bold:') . '</label> ' . form::checkbox('post_link_w', 1, $ductile_user['post_link_w']) . '</p>' . '<p class="field picker"><label for="post_link_v_c">' . __('Normal and visited links color:') . '</label> ' . form::field('post_link_v_c', 7, 7, $ductile_user['post_link_v_c'], 'colorpicker') . dcThemeConfig::contrastRatio($ductile_user['post_link_v_c'], '#ffffff', '1em', $ductile_user['post_link_w']) . '</p>' . '<p class="field picker"><label for="post_link_f_c">' . __('Active, hover and focus links color:') . '</label> ' . form::field('post_link_f_c', 7, 7, $ductile_user['post_link_f_c'], 'colorpicker') . dcThemeConfig::contrastRatio($ductile_user['post_link_f_c'], '#ebebee', '1em', $ductile_user['post_link_w']) . '</p>';
echo '<h3 class="border-top">' . __('Mobile specific settings') . '</h3>';
echo '<div class="two-cols">';
echo '<div class="col">';
echo '<h4 class="pretty-title">' . __('Blog title') . '</h4>' . '<p class="field"><label for="blog_title_w_m">' . __('In bold:') . '</label> ' . form::checkbox('blog_title_w_m', 1, $ductile_user['blog_title_w_m']) . '</p>' . '<p class="field"><label for="blog_title_s_m">' . __('Font size (in em by default):') . '</label> ' . form::field('blog_title_s_m', 7, 7, $ductile_user['blog_title_s_m']) . '</p>' . '<p class="field picker"><label for="blog_title_c_m">' . __('Color:') . '</label> ' . form::field('blog_title_c_m', 7, 7, $ductile_user['blog_title_c_m'], 'colorpicker') . dcThemeConfig::contrastRatio($ductile_user['blog_title_c_m'], '#d7d7dc', !empty($ductile_user['blog_title_s_m']) ? $ductile_user['blog_title_s_m'] : '1.8em', $ductile_user['blog_title_w_m']) . '</p>';
echo '</div>';
echo '<div class="col">';
echo '<h4 class="pretty-title">' . __('Post title') . '</h4>' . '<p class="field"><label for="post_title_w_m">' . __('In bold:') . '</label> ' . form::checkbox('post_title_w_m', 1, $ductile_user['post_title_w_m']) . '</p>' . '<p class="field"><label for="post_title_s_m">' . __('Font size (in em by default):') . '</label> ' . form::field('post_title_s_m', 7, 7, $ductile_user['post_title_s_m']) . '</p>' . '<p class="field picker"><label for="post_title_c_m">' . __('Color:') . '</label> ' . form::field('post_title_c_m', 7, 7, $ductile_user['post_title_c_m'], 'colorpicker') . dcThemeConfig::contrastRatio($ductile_user['post_title_c_m'], '#ffffff', !empty($ductile_user['post_title_s_m']) ? $ductile_user['post_title_s_m'] : '1.5em', $ductile_user['post_title_w_m']) . '</p>';
echo '</div>';
echo '</div>';
echo '<p><input type="hidden" name="conf_tab" value="css" /></p>';
echo '<p class="clear border-top"><input type="submit" value="' . __('Save') . '" />' . $core->formNonce() . '</p>';
echo '</form>';
echo '</div>';
// Close tab
dcPage::helpBlock('ductile');
// Legacy mode
if (!$standalone_config) {
    echo '<form style="display:none">';
}
예제 #12
0
파일: index.php 프로젝트: nikrou/dotclear
    }
    echo '<h5 class="pretty-title">' . __('Top image') . '</h5>' . '<p class="field"><label for="top_image">' . __('Top image') . '</label> ' . form::combo('top_image', $top_images, $blowup_user['top_image'] ? $blowup_user['top_image'] : 'default') . '</p>' . '<p>' . __('Choose "Custom..." to upload your own image.') . '</p>' . '<p id="uploader"><label for="upfile">' . __('Add your image:') . '</label> ' . ' (' . sprintf(__('JPEG or PNG file, 800 pixels wide, maximum size %s'), files::size(DC_MAX_UPLOAD_SIZE)) . ')' . '<input type="file" name="upfile" id="upfile" size="35" />' . '</p>' . '<h5>' . __('Preview') . '</h5>' . '<div class="grid" style="width:800px;border:1px solid #ccc;">' . '<img style="display:block;" src="' . $preview_image . '" alt="" id="image-preview" />' . '</div>';
}
echo '<h4 class="border-top">' . __('Sidebar') . '</h4>' . '<p class="field"><label for="sidebar_position">' . __('Sidebar position:') . '</label> ' . form::combo('sidebar_position', array(__('right') => 'right', __('left') => 'left'), $blowup_user['sidebar_position']) . '</p>' . '<p class="field"><label for="sidebar_text_f">' . __('Sidebar text font:') . '</label> ' . form::combo('sidebar_text_f', blowupConfig::fontsList(), $blowup_user['sidebar_text_f']) . '</p>' . '<p class="field"><label for="sidebar_text_s">' . __('Sidebar text font size:') . '</label> ' . form::field('sidebar_text_s', 7, 7, $blowup_user['sidebar_text_s']) . '</p>' . '<p class="field"><label for="sidebar_text_c">' . __('Sidebar text color:') . '</label> ' . form::field('sidebar_text_c', 7, 7, $blowup_user['sidebar_text_c'], 'colorpicker') . '</p>' . '<p class="field"><label for="sidebar_title_f">' . __('Sidebar titles font:') . '</label> ' . form::combo('sidebar_title_f', blowupConfig::fontsList(), $blowup_user['sidebar_title_f']) . '</p>' . '<p class="field"><label for="sidebar_title_s">' . __('Sidebar titles font size:') . '</label> ' . form::field('sidebar_title_s', 7, 7, $blowup_user['sidebar_title_s']) . '</p>' . '<p class="field"><label for="sidebar_title_c">' . __('Sidebar titles color:') . '</label> ' . form::field('sidebar_title_c', 7, 7, $blowup_user['sidebar_title_c'], 'colorpicker') . '</p>' . '<p class="field"><label for="sidebar_title2_f">' . __('Sidebar 2nd level titles font:') . '</label> ' . form::combo('sidebar_title2_f', blowupConfig::fontsList(), $blowup_user['sidebar_title2_f']) . '</p>' . '<p class="field"><label for="sidebar_title2_s">' . __('Sidebar 2nd level titles font size:') . '</label> ' . form::field('sidebar_title2_s', 7, 7, $blowup_user['sidebar_title2_s']) . '</p>' . '<p class="field"><label for="sidebar_title2_c">' . __('Sidebar 2nd level titles color:') . '</label> ' . form::field('sidebar_title2_c', 7, 7, $blowup_user['sidebar_title2_c'], 'colorpicker') . '</p>' . '<p class="field"><label for="sidebar_line_c">' . __('Sidebar lines color:') . '</label> ' . form::field('sidebar_line_c', 7, 7, $blowup_user['sidebar_line_c'], 'colorpicker') . '</p>' . '<p class="field"><label for="sidebar_link_c">' . __('Sidebar links color:') . '</label> ' . form::field('sidebar_link_c', 7, 7, $blowup_user['sidebar_link_c'], 'colorpicker') . '</p>' . '<p class="field"><label for="sidebar_link_v_c">' . __('Sidebar visited links color:') . '</label> ' . form::field('sidebar_link_v_c', 7, 7, $blowup_user['sidebar_link_v_c'], 'colorpicker') . '</p>' . '<p class="field"><label for="sidebar_link_f_c">' . __('Sidebar focus links color:') . '</label> ' . form::field('sidebar_link_f_c', 7, 7, $blowup_user['sidebar_link_f_c'], 'colorpicker') . '</p>' . '<h4 class="border-top">' . __('Entries') . '</h4>' . '<p class="field"><label for="date_title_f">' . __('Date title font:') . '</label> ' . form::combo('date_title_f', blowupConfig::fontsList(), $blowup_user['date_title_f']) . '</p>' . '<p class="field"><label for="date_title_s">' . __('Date title font size:') . '</label> ' . form::field('date_title_s', 7, 7, $blowup_user['date_title_s']) . '</p>' . '<p class="field"><label for="date_title_c">' . __('Date title color:') . '</label> ' . form::field('date_title_c', 7, 7, $blowup_user['date_title_c'], 'colorpicker') . '</p>' . '<p class="field"><label for="post_title_f">' . __('Entry title font:') . '</label> ' . form::combo('post_title_f', blowupConfig::fontsList(), $blowup_user['post_title_f']) . '</p>' . '<p class="field"><label for="post_title_s">' . __('Entry title font size:') . '</label> ' . form::field('post_title_s', 7, 7, $blowup_user['post_title_s']) . '</p>' . '<p class="field"><label for="post_title_c">' . __('Entry title color:') . '</label> ' . form::field('post_title_c', 7, 7, $blowup_user['post_title_c'], 'colorpicker') . '</p>';
if ($can_write_images) {
    echo '<p class="field"><label for="post_comment_bg_c">' . __('Comment background color:') . '</label> ' . form::field('post_comment_bg_c', 7, 7, $blowup_user['post_comment_bg_c'], 'colorpicker') . '</p>';
}
echo '<p class="field"><label for="post_comment_c">' . __('Comment text color:') . '</label> ' . form::field('post_comment_c', 7, 7, $blowup_user['post_comment_c'], 'colorpicker') . '</p>';
if ($can_write_images) {
    echo '<p class="field"><label for="post_commentmy_bg_c">' . __('My comment background color:') . '</label> ' . form::field('post_commentmy_bg_c', 7, 7, $blowup_user['post_commentmy_bg_c'], 'colorpicker') . '</p>';
}
echo '<p class="field"><label for="post_commentmy_c">' . __('My comment text color:') . '</label> ' . form::field('post_commentmy_c', 7, 7, $blowup_user['post_commentmy_c'], 'colorpicker') . '</p>' . '<h4 class="border-top">' . __('Footer') . '</h4>' . '<p class="field"><label for="footer_f">' . __('Footer font:') . '</label> ' . form::combo('footer_f', blowupConfig::fontsList(), $blowup_user['footer_f']) . '</p>' . '<p class="field"><label for="footer_s">' . __('Footer font size:') . '</label> ' . form::field('footer_s', 7, 7, $blowup_user['footer_s']) . '</p>' . '<p class="field"><label for="footer_c">' . __('Footer color:') . '</label> ' . form::field('footer_c', 7, 7, $blowup_user['footer_c'], 'colorpicker') . '</p>' . '<p class="field"><label for="footer_l_c">' . __('Footer links color:') . '</label> ' . form::field('footer_l_c', 7, 7, $blowup_user['footer_l_c'], 'colorpicker') . '</p>' . '<p class="field"><label for="footer_bg_c">' . __('Footer background color:') . '</label> ' . form::field('footer_bg_c', 7, 7, $blowup_user['footer_bg_c'], 'colorpicker') . '</p>';
echo '<h4 class="border-top">' . __('Additional CSS') . '</h4>' . '<p><label for="extra_css">' . __('Any additional CSS styles (must be written using the CSS syntax):') . '</label> ' . form::textarea('extra_css', 72, 5, html::escapeHTML($blowup_user['extra_css']), 'maximal', '', false, 'title="' . __('Additional CSS') . '"') . '</p>' . '</div>';
// Import / Export configuration
$tmp_array = array();
$tmp_exclude = array('uploaded', 'top_height');
if ($blowup_user['top_image'] == 'custom') {
    $tmp_exclude[] = 'top_image';
}
foreach ($blowup_user as $k => $v) {
    if (!in_array($k, $tmp_exclude)) {
        $tmp_array[] = $k . ':' . '"' . $v . '"';
    }
}
echo '<div class="fieldset">' . '<h3 id="bu_export">' . __('Configuration import / export') . '</h3>' . '<div id="bu_export_content">' . '<p>' . __('You can share your configuration using the following code. To apply a configuration, paste the code, click on "Apply code" and save.') . '</p>' . '<p>' . form::textarea('export_code', 72, 5, implode('; ', $tmp_array), 'maximal', '', false, 'title="' . __('Copy this code:') . '"') . '</p>' . '</div>' . '</div>';
echo '<p class="clear"><input type="submit" value="' . __('Save') . '" />' . $core->formNonce() . '</p>' . '</form>';
dcPage::helpBlock('blowupConfig');
?>
</body>
</html>
예제 #13
0
파일: _admin.php 프로젝트: nikrou/dotclear
 /**
  * Add javascript for plugin configuration.
  *
  * @param	$core	<b>dcCore</b>	dcCore instance
  * @param	$module	<b>mixed</b>	Module ID or false if none
  * @return	<b>string</b>	Header code for js inclusion
  */
 public static function pluginsToolsHeaders($core, $module)
 {
     if ($module == 'maintenance') {
         return dcPage::jsLoad(dcPage::getPF('maintenance/js/settings.js'));
     }
 }
예제 #14
0
 public static function postHeaders()
 {
     global $core;
     return '<script type="text/javascript" src="index.php?pf=dotsphere/js/post.min.js"></script>' . '<script type="text/javascript">' . "\n" . "//<![CDATA[\n" . dcPage::jsVar('jsToolBar.prototype.elements.dotsphere.title', __('Display as a PhotoSphere')) . dcPage::jsVar('jsToolBar.prototype.elements.dotsphere.selectImageError', __('Select an image to display as a PhotoSphere.')) . dcPage::jsVar('jsToolBar.prototype.elements.dotsphere.pluginUrl', html::stripHostURL($core->blog->getQmarkURL() . 'pf=dotsphere/')) . "\n//]]>\n" . "</script>\n";
 }
예제 #15
0
 /**
  * Checks all modules dependencies, and disable unmet dependencies
  * @param  string $redir_url URL to redirect if modules are to disable
  * @return boolean, true if a redirection has been performed
  */
 public function disableDepModules($redir_url)
 {
     if (isset($_GET['dep'])) {
         // Avoid infinite redirects
         return false;
     }
     $reason = array();
     foreach ($this->to_disable as $module) {
         try {
             $this->deactivateModule($module['name']);
             $reason[] = sprintf("<li>%s : %s</li>", $module['name'], join(',', $module['reason']));
         } catch (Exception $e) {
         }
     }
     if (count($reason)) {
         $message = sprintf("<p>%s</p><ul>%s</ul>", __('The following extensions have been disabled :'), join('', $reason));
         dcPage::addWarningNotice($message, array('divtag' => true, 'with_ts' => false));
         $url = $redir_url . (strpos($redir_url, "?") ? '&' : '?') . 'dep=1';
         http::redirect($url);
         return true;
     }
     return false;
 }
예제 #16
0
파일: index.php 프로젝트: nikrou/dotclear
</head>

<body>
<?php 
echo dcPage::breadcrumb(array(__('Plugins') => '', __('Pings configuration') => ''));
echo '<form action="' . $p_url . '" method="post">' . '<p><label for="pings_active" class="classic">' . form::checkbox('pings_active', 1, $core->blog->settings->pings->pings_active) . __('Activate pings extension') . '</label></p>';
$i = 0;
foreach ($pings_uris as $n => $u) {
    echo '<p><label for="pings_srv_name-' . $i . '" class="classic">' . __('Service name:') . '</label> ' . form::field(array('pings_srv_name[]', 'pings_srv_name-' . $i), 20, 128, html::escapeHTML($n)) . ' ' . '<label for="pings_srv_uri-' . $i . '" class="classic">' . __('Service URI:') . '</label> ' . form::field(array('pings_srv_uri[]', 'pings_srv_uri-' . $i), 40, 255, html::escapeHTML($u));
    if (!empty($_GET['test'])) {
        try {
            pingsAPI::doPings($u, 'Example site', 'http://example.com');
            echo ' <img src="images/check-on.png" alt="OK" />';
        } catch (Exception $e) {
            echo ' <img src="images/check-off.png" alt="' . __('Error') . '" /> ' . $e->getMessage();
        }
    }
    echo '</p>';
    $i++;
}
echo '<p><label for="pings_srv_name2" class="classic">' . __('Service name:') . '</label> ' . form::field(array('pings_srv_name[]', 'pings_srv_name2'), 20, 128) . ' ' . '<label for="pings_srv_uri2" class="classic">' . __('Service URI:') . '</label> ' . form::field(array('pings_srv_uri[]', 'pings_srv_uri2'), 40, 255) . '</p>' . '<p><input type="submit" value="' . __('Save') . '" />' . $core->formNonce() . '</p>' . '</form>';
echo '<p><a class="button" href="' . $p_url . '&amp;test=1">' . __('Test ping services') . '</a></p>';
?>

<?php 
dcPage::helpBlock('pings');
?>

</body>
</html>
예제 #17
0
<?php

# -- BEGIN LICENSE BLOCK ---------------------------------------
#
# This file is part of Dotclear 2.
#
# Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear
# Licensed under the GPL version 2.0 license.
# See LICENSE file or
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
# -- END LICENSE BLOCK -----------------------------------------
/* ### THIS FILE IS DEPRECATED 					### */
/* ### IT IS ONLY USED FOR PLUGINS COMPATIBILITY ### */
require dirname(__FILE__) . '/../inc/admin/prepend.php';
dcPage::check('usage,contentadmin');
if (isset($_REQUEST['redir'])) {
    $u = explode('?', $_REQUEST['redir']);
    $uri = $u[0];
    if (isset($u[1])) {
        parse_str($u[1], $args);
    }
    $args['redir'] = $_REQUEST['redir'];
} else {
    $uri = $core->adminurl->get("admin.posts");
    $args = array();
}
$posts_actions_page = new dcPostsActionsPage($core, $uri, $args);
$posts_actions_page->setEnableRedirSelection(false);
$posts_actions_page->process();
예제 #18
0
파일: list.php 프로젝트: HackerMajor/root
# --BEHAVIOR-- adminPagesActionsCombo
$core->callBehavior('adminPagesActionsCombo', array(&$combo_action));
/* Display
-------------------------------------------------------- */
?>
<html>
<head>
  <title><?php 
echo __('Pages');
?>
</title>
  <script type="text/javascript" src="js/_posts_list.js"></script>
  <script type="text/javascript">
  //<![CDATA[
  <?php 
echo dcPage::jsVar('dotclear.msg.confirm_delete_posts', __("Are you sure you want to delete selected pages?"));
?>
  //]]>
  </script>
</head>

<body>
<?php 
echo '<h2>' . html::escapeHTML($core->blog->name) . ' &rsaquo; ' . __('Pages') . ' - <a class="button" href="' . $p_url . '&amp;act=page">' . __('New page') . '</a></h2>';
if (!$core->error->flag()) {
    # Show pages
    $post_list->display($page, $nb_per_page, '<form action="posts_actions.php" method="post" id="form-entries">' . '%s' . '<div class="two-cols">' . '<p class="col checkboxes-helpers"></p>' . '<p class="col right">' . __('Selected pages action:') . ' ' . form::combo('action', $combo_action) . '<input type="submit" value="' . __('ok') . '" /></p>' . form::hidden(array('post_type'), 'page') . form::hidden(array('redir'), html::escapeHTML($_SERVER['REQUEST_URI'])) . $core->formNonce() . '</div>' . '</form>');
}
?>
</body>
</html>
예제 #19
0
 public static function pingJS()
 {
     return dcPage::jsLoad('index.php?pf=pings/post.js');
 }
예제 #20
0
파일: index.php 프로젝트: HackerMajor/root
function settingLine($id, $s, $ns, $field_name, $strong_label)
{
    if ($s['type'] == 'boolean') {
        $field = form::combo(array($field_name . '[' . $ns . '][' . $id . ']', $field_name . '_' . $id), array(__('yes') => 1, __('no') => 0), $s['value']);
    } else {
        $field = form::field(array($field_name . '[' . $ns . '][' . $id . ']', $field_name . '_' . $id), 40, null, html::escapeHTML($s['value']));
    }
    $slabel = $strong_label ? '<strong>%s</strong>' : '%s';
    return '<tr>' . '<td><label for="s_' . $id . '">' . sprintf($slabel, html::escapeHTML($id)) . '</label></td>' . '<td>' . $field . '</td>' . '<td>' . $s['type'] . '</td>' . '<td>' . html::escapeHTML($s['label']) . '</td>' . '</tr>';
}
?>
<html>
<head>
  <title>about:config</title>
  <?php 
echo dcPage::jsPageTabs($part);
?>
  <style type="text/css">
  .ns-name { background: #ccc; color: #000; padding-top: 0.3em; padding-bottom: 0.3em; font-size: 1.1em; }
  </style>
</head>

<body>
<?php 
if (!empty($_GET['upd'])) {
    echo '<p class="message">' . __('Configuration successfully updated') . '</p>';
}
if (!empty($_GET['upda'])) {
    echo '<p class="message">' . __('Settings definition successfully updated') . '</p>';
}
?>
예제 #21
0
}
// POST ACTIONS
if (!empty($_POST)) {
    try {
        $core->blog->settings->addNamespace('themes');
        # About
        if (!empty($_POST['qrazytimes2_about'])) {
            $my_about = $_POST['qrazytimes2_about'];
        } elseif (empty($_POST['qrazytimes2_about'])) {
            $my_about = $default_about;
        }
        $core->blog->settings->themes->put('qrazytimes2_about', $my_about, 'boolean', 'Display About', true);
        if (isset($_POST['about'])) {
            @($fp = fopen($html_fileabout, 'wb'));
            fwrite($fp, $_POST['about']);
            fclose($fp);
        }
        // Blog refresh
        $core->blog->triggerBlog();
        // Template cache reset
        $core->emptyTemplatesCache();
        dcPage::success(__('Theme configuration has been successfully updated.'), true, true);
    } catch (Exception $e) {
        $core->error->add($e->getMessage());
    }
}
$html_contentabout = is_file($html_fileabout) ? file_get_contents($html_fileabout) : '';
// DISPLAY
# About
echo '<div class="fieldset"><h4>' . __('About') . '</h4>' . '<p>' . form::checkbox('qrazytimes2_about', 1, $my_about) . '<label class="classic" for="qrazytimes2_about">' . __('Display About') . '</label>' . '</p>';
echo '<p class="area"><label for="about">' . __('Code:') . ' ' . form::textarea('about', 60, 10, html::escapeHTML($html_contentabout)) . '</label></p>' . '</div>';
예제 #22
0
파일: index.php 프로젝트: HackerMajor/root
<?php

# -- BEGIN LICENSE BLOCK ----------------------------------
#
# This file is part of Dotclear 2.
#
# Copyright (c) 2003-2009 Olivier Meunier and contributors
# Licensed under the GPL version 2.0 license.
# See LICENSE file or
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
# -- END LICENSE BLOCK ------------------------------------
if (!defined('DC_CONTEXT_ADMIN')) {
    return;
}
dcPage::checkSuper();
try {
    # Create settings if they don't exist
    if ($core->blog->settings->pings_active === null) {
        $default_pings_uris = array('Ping-o-Matic!' => 'http://rpc.pingomatic.com/', 'Google Blog Search' => 'http://blogsearch.google.com/ping/RPC2');
        $core->blog->settings->setNameSpace('pings');
        $core->blog->settings->put('pings_active', 1, 'boolean', 'Activate pings plugin', true, true);
        $core->blog->settings->put('pings_uris', serialize($default_pings_uris), 'string', 'Pings services URIs', true, true);
        http::redirect($p_url);
    }
    $pings_uris = @unserialize($core->blog->settings->pings_uris);
    if (!$pings_uris) {
        $pings_uris = array();
    }
    if (isset($_POST['pings_srv_name'])) {
        $pings_srv_name = is_array($_POST['pings_srv_name']) ? $_POST['pings_srv_name'] : array();
예제 #23
0
파일: _admin.php 프로젝트: nikrou/dotclear
function blogroll_users_actions_headers()
{
    global $core;
    return dcPage::jsLoad(dcPage::getPF('blogroll/_users_actions.js'));
}
예제 #24
0
파일: auth.php 프로젝트: nikrou/dotclear
?>
" />
  <meta name="ROBOTS" content="NOARCHIVE,NOINDEX,NOFOLLOW" />
  <meta name="GOOGLEBOT" content="NOSNIPPET" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title><?php 
echo html::escapeHTML(DC_VENDOR_NAME);
?>
</title>
  <link rel="icon" type="image/png" href="images/favicon96-logout.png" />
  <link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />


<?php 
echo dcPage::jsLoadIE7();
echo dcPage::jsCommon();
?>

	<link rel="stylesheet" href="style/default.css" type="text/css" media="screen" />

  <?php 
# --BEHAVIOR-- loginPageHTMLHead
$core->callBehavior('loginPageHTMLHead');
?>

  <script type="text/javascript">
  //<![CDATA[
  $(window).load(function() {
    var uid = $('input[name=user_id]');
    var upw = $('input[name=user_pwd]');
    uid.focus();
예제 #25
0
 public function gui()
 {
     if ($this->status == 'single') {
         echo '<p class="message">' . __('Single blog successfully imported.') . '</p>';
         return;
     }
     if ($this->status == 'full') {
         echo '<p class="message">' . __('Content successfully imported.') . '</p>';
         return;
     }
     echo '<script type="text/javascript">' . "\n" . "//<![CDATA[\n" . dcPage::jsVar('dotclear.msg.confirm_full_import', __('Are you sure you want to import a full backup file?')) . "\$(function() {" . "\$('#up_single_file').change(function() { " . "if (this.value != '') { \$('#public_single_file').val(''); } " . "}); " . "\$('#public_single_file').change(function() { " . "if (this.value != '') { \$('#up_single_file').val(''); } " . "}); " . "\$('#up_full_file').change(function() { " . "if (this.value != '') { \$('#public_full_file').val(''); } " . "}); " . "\$('#public_full_file').change(function() { " . "if (this.value != '') { \$('#up_full_file').val(''); } " . "}); " . "\$('#formfull').submit(function() { " . "return window.confirm(dotclear.msg.confirm_full_import); " . "}); " . "});\n" . "//]]>\n" . "</script>\n";
     echo '<h3>' . __('Import a single blog') . '</h3>' . '<p>' . sprintf(__('This will import a single blog backup as new content in the current blog: %s.'), '<strong>' . html::escapeHTML($this->core->blog->name) . '</strong>') . '</p>' . '<form action="' . $this->getURL(true) . '" method="post" enctype="multipart/form-data">' . '<fieldset>' . $this->core->formNonce() . form::hidden(array('do'), 1) . form::hidden(array('MAX_FILE_SIZE'), DC_MAX_UPLOAD_SIZE) . '<p><label>' . __('Upload a backup file') . ' ' . '<input type="file" id="up_single_file" name="up_single_file" size="20" />' . '</label></p>';
     $public_files = $this->getPublicFiles();
     $empty = empty($public_files);
     $public_files = array_merge(array('-' => ''), $public_files);
     echo '<p><label>' . __('or pick up a local file in your public directory') . ' ' . form::combo('public_single_file', $public_files, '', '', '', $empty) . '</label></p>';
     echo '<p><input type="submit" value="' . __('Send') . '" /></p>' . '</fieldset>' . '</form>';
     if ($this->core->auth->isSuperAdmin()) {
         echo '<h3>' . __('Import a full backup file') . '</h3>' . '<form action="' . $this->getURL(true) . '" method="post" enctype="multipart/form-data" id="formfull">' . '<div>' . form::hidden(array('MAX_FILE_SIZE'), DC_MAX_UPLOAD_SIZE) . '</div>' . '<fieldset>' . $this->core->formNonce() . form::hidden(array('do'), 1) . form::hidden(array('MAX_FILE_SIZE'), DC_MAX_UPLOAD_SIZE) . '<p><label>' . __('Upload a backup file') . ' ' . '<input type="file" id="up_full_file" name="up_full_file" size="20" />' . '</label></p>';
         echo '<p><label>' . __('or pick up a local file in your public directory') . ' ' . form::combo('public_full_file', $public_files, '', '', '', $empty) . '</label></p>';
         echo '<p><strong>' . __('Warning: This will reset all the content of your database, except users.') . '</strong></p>' . '<p><label>' . __('Your password:'******'your_pwd', 20, 255) . '</label></p>' . '<p><input type="submit" value="' . __('Send') . '" /></p>' . '</fieldset>' . '</form>';
     }
 }
예제 #26
0
파일: index.php 프로젝트: mrbidon/menu
<p class="col"><?php 
echo form::hidden('links_order', '');
echo form::hidden('links_levels', '');
echo form::hidden(array('p'), 'menu');
echo $core->formNonce();
?>
<input type="submit" name="updateitems" value="<?php 
echo __('Update menu');
?>
" /></p>

<p class="col right"><input class="delete" type="submit" name="removeaction"
value="<?php 
echo __('Delete selected menu items');
?>
"
onclick="return window.confirm('<?php 
echo html::escapeJS(__('Are you sure you want to remove selected menu items?'));
?>
');" /></p>
</div>

</form>
</div>

<?php 
echo '<div class="multi-part" id="add-link" title="' . __('Add an item') . '">' . '<form action="plugin.php" method="post" id="add-link-form">' . '<div class="fieldset two-cols"><h4>' . __('New item') . '</h4>' . '<p class="field"><label class="classic required" for="link_title"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Label of item menu:') . ' </label>' . form::field('link_title', 50, 255, $link_title, '', 1) . '</p>' . '<p class="field"><label class="classic required" for="link_href"><abbr title="' . __('Required field') . '">*</abbr> ' . __('URL of item menu:') . ' </label>' . form::field('link_href', 50, 255, $link_href, '', 2) . '</p>' . '<p class="field"><label class="classic" for="link_desc">' . __('Description:') . ' </label>' . form::field('link_desc', 50, 255, $link_desc, '', 3) . '</p>' . '<p class="field"><label class="classic" for="link_level">' . __('Level:') . ' </label>' . form::field('link_level', 5, 255, $link_level, '', 5) . '</p>' . '<p class="info">' . __('Note: 0 = hide menu item; 1 = level of item 1; 2 = item level 2; etc.') . '</p>' . '<p class="field"><label class="classic" for="link_lang">' . __('Language:') . ' </label>' . form::field('link_lang', 5, 5, $link_lang, '', 4) . '</p>' . '<p class="field"><label class="classic" for="link_class">' . __('Class:') . ' </label>' . form::field('link_class', 50, 32, $link_class, '', 6) . '</p>' . '</div>' . '<p>' . form::hidden(array('p'), 'menu') . $core->formNonce() . '<input type="submit" name="add_link" value="' . __('Save') . '" tabindex="7" /></p>' . '</form>' . '</div>';
dcPage::helpBlock('menu');
?>
</body>
</html>
예제 #27
0
파일: _admin.php 프로젝트: nikrou/dotclear
<?php

# -- BEGIN LICENSE BLOCK ---------------------------------------
#
# This file is part of Dotclear 2.
#
# Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear
# Licensed under the GPL version 2.0 license.
# See LICENSE file or
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
# -- END LICENSE BLOCK -----------------------------------------
if (!defined('DC_CONTEXT_ADMIN')) {
    return;
}
$_menu['Plugins']->addItem('dcCKEditor', $core->adminurl->get('admin.plugin.dcCKEditor'), dcPage::getPF('dcCKEditor/imgs/icon.png'), preg_match('/' . preg_quote($core->adminurl->get('admin.plugin.dcCKEditor')) . '(&.*)?$/', $_SERVER['REQUEST_URI']), $core->auth->check('admin,contentadmin', $core->blog->id));
$self_ns = $core->blog->settings->addNamespace('dcckeditor');
if ($self_ns->active) {
    $core->addEditorFormater('dcCKEditor', 'xhtml', create_function('$s', 'return $s;'));
    $core->addBehavior('adminPostEditor', array('dcCKEditorBehaviors', 'adminPostEditor'));
    $core->addBehavior('adminPopupMedia', array('dcCKEditorBehaviors', 'adminPopupMedia'));
    $core->addBehavior('adminPopupLink', array('dcCKEditorBehaviors', 'adminPopupLink'));
    $core->addBehavior('adminPopupPosts', array('dcCKEditorBehaviors', 'adminPopupPosts'));
    $core->addBehavior('adminMediaURL', array('dcCKEditorBehaviors', 'adminMediaURL'));
}
예제 #28
0
파일: _admin.php 프로젝트: nikrou/dotclear
function simpleMenu_dashboard_favs($core, $favs)
{
    $favs->register('simpleMenu', array('title' => __('Simple menu'), 'url' => $core->adminurl->get('admin.plugin.simpleMenu'), 'small-icon' => dcPage::getPF('simpleMenu/icon-small.png'), 'large-icon' => dcPage::getPF('simpleMenu/icon.png'), 'permissions' => 'usage,contentadmin'));
}
예제 #29
0
    dcPage::success(__('Selected comments have been successfully updated.'));
} elseif (!empty($_GET['del'])) {
    dcPage::success(__('Selected comments have been successfully deleted.'));
}
if (!$core->error->flag()) {
    if (isset($_SESSION['comments_del_spam'])) {
        dcPage::message(__('Spam comments have been successfully deleted.'));
        unset($_SESSION['comments_del_spam']);
    }
    $spam_count = $core->blog->getComments(array('comment_status' => -2), true)->f(0);
    if ($spam_count > 0) {
        echo '<form action="' . $core->adminurl->get("admin.comments") . '" method="post" class="fieldset">';
        if (!$with_spam || $status != -2) {
            if ($spam_count == 1) {
                echo '<p>' . sprintf(__('You have one spam comment.'), '<strong>' . $spam_count . '</strong>') . ' ' . '<a href="' . $core->adminurl->get("admin.comments", array('status' => -2)) . '">' . __('Show it.') . '</a></p>';
            } elseif ($spam_count > 1) {
                echo '<p>' . sprintf(__('You have %s spam comments.'), '<strong>' . $spam_count . '</strong>') . ' ' . '<a href="' . $core->adminurl->get("admin.comments", array('status' => -2)) . '">' . __('Show them.') . '</a></p>';
            }
        }
        echo '<p>' . $core->formNonce() . '<input name="delete_all_spam" class="delete" type="submit" value="' . __('Delete all spams') . '" /></p>';
        # --BEHAVIOR-- adminCommentsSpamForm
        $core->callBehavior('adminCommentsSpamForm', $core);
        echo '</form>';
    }
    echo '<form action="' . $core->adminurl->get("admin.comments") . '" method="get" id="filters-form">' . '<h3 class="hidden">' . __('Filter comments and trackbacks list') . '</h3>' . '<div class="table">' . '<div class="cell">' . '<h4>' . __('Filters') . '</h4>' . '<p><label for="type" class="ib">' . __('Type:') . '</label> ' . form::combo('type', $type_combo, $type) . '</p> ' . '<p><label for="status" class="ib">' . __('Status:') . '</label> ' . form::combo('status', $status_combo, $status) . '</p>' . '</div>' . '<div class="cell filters-sibling-cell">' . '<p><label for="author" class="ib">' . __('Author:') . '</label> ' . form::field('author', 20, 255, html::escapeHTML($author)) . '</p>' . '<p><label for="ip" class="ib">' . __('IP address:') . '</label> ' . form::field('ip', 20, 39, html::escapeHTML($ip)) . '</p>' . '</div>' . '<div class="cell filters-options">' . '<h4>' . __('Display options') . '</h4>' . '<p><label for="sortby" class="ib">' . __('Order by:') . '</label> ' . form::combo('sortby', $sortby_combo, $sortby) . '</p>' . '<p><label for="order" class="ib">' . __('Sort:') . '</label> ' . form::combo('order', $order_combo, $order) . '</p>' . '<p><span class="label ib">' . __('Show') . '</span> <label for="nb" class="classic">' . form::field('nb', 3, 3, $nb_per_page) . ' ' . __('comments per page') . '</label></p>' . '</div>' . '</div>' . '<p><input type="submit" value="' . __('Apply filters and display options') . '" />' . '<br class="clear" /></p>' . '</form>';
    # Show comments
    $comment_list->display($page, $nb_per_page, '<form action="' . $core->adminurl->get("admin.comments") . '" method="post" id="form-comments">' . '%s' . '<div class="two-cols">' . '<p class="col checkboxes-helpers"></p>' . '<p class="col right"><label for="action" class="classic">' . __('Selected comments action:') . '</label> ' . form::combo('action', $comments_actions_page->getCombo(), $default, '', '', '', 'title="' . __('Actions') . '"') . $core->formNonce() . '<input type="submit" value="' . __('ok') . '" /></p>' . form::hidden(array('type'), $type) . form::hidden(array('sortby'), $sortby) . form::hidden(array('order'), $order) . form::hidden(array('author'), html::escapeHTML(preg_replace('/%/', '%%', $author))) . form::hidden(array('status'), $status) . form::hidden(array('ip'), preg_replace('/%/', '%%', $ip)) . form::hidden(array('page'), $page) . form::hidden(array('nb'), $nb_per_page) . '</div>' . '</form>', $show_filters, $with_spam || $status == -2);
}
dcPage::helpBlock('core_comments');
dcPage::close();
예제 #30
0
파일: _admin.php 프로젝트: nikrou/dotclear
 public static function onActionLegacy($core, dcPagesActionsPage $as, $post)
 {
     $core->callBehavior('adminPostsActions', $core, $as->getRS(), $as->getAction(), $as->getRedirection());
     $as->beginPage('', dcPage::jsLoad('js/jquery/jquery.autocomplete.js') . dcPage::jsMetaEditor() . $core->callBehavior('adminPostsActionsHeaders'), '');
     ob_start();
     $core->callBehavior('adminPostsActionsContent', $core, $as->getAction(), $as->getHiddenFields(true));
     $res = ob_get_contents();
     ob_end_clean();
     $res = str_replace("posts_actions.php", "plugin.php", $res);
     echo $res;
     $as->endPage();
 }