Ejemplo n.º 1
0
 /**
  * adminPostEditor add javascript to the DOM to load ckeditor depending on context
  *
  * @param editor   <b>string</b> wanted editor
  * @param context  <b>string</b> page context (post,page,comment,event,...)
  * @param tags     <b>array</b>  array of ids to inject editor
  * @param syntax   <b>string</b> wanted syntax (wiki,markdown,...)
  */
 public static function adminPostEditor($editor = '', $context = '', array $tags = array(), $syntax = '')
 {
     if (empty($editor) || $editor != 'dcLegacyEditor') {
         return;
     }
     return self::jsToolBar() . dcPage::jsLoad(dcPage::getPF('dcLegacyEditor/js/_post_editor.js')) . '<script type="text/javascript">' . "\n" . "//<![CDATA[\n" . dcPage::jsVar('dotclear.legacy_editor_context', $context) . dcPage::jsVar('dotclear.legacy_editor_syntax', $syntax) . 'dotclear.legacy_editor_tags_context = ' . sprintf('{%s:["%s"]};' . "\n", $context, implode('","', $tags)) . "\n//]]>\n" . "</script>\n";
 }
Ejemplo n.º 2
0
    /**
     * adminPostEditor add javascript to the DOM to load ckeditor depending on context
     *
     * @param editor   <b>string</b> wanted editor
     * @param context  <b>string</b> page context (post,page,comment,event,...)
     * @param tags     <b>array</b>  array of ids into inject editor
     * @param syntax   <b>string</b> wanted syntax (xhtml)
     */
    public static function adminPostEditor($editor = '', $context = '', array $tags = array(), $syntax = 'xhtml')
    {
        if (empty($editor) || $editor != 'dcCKEditor' || $syntax != 'xhtml') {
            return;
        }
        $config_js = self::$config_url;
        if (!empty($context)) {
            $config_js .= '&context=' . $context;
        }
        return '<script type="text/javascript">' . "\n" . "//<![CDATA[\n" . dcPage::jsVar('dotclear.ckeditor_context', $context) . 'dotclear.ckeditor_tags_context = ' . sprintf('{%s:["%s"]};' . "\n", $context, implode('","', $tags)) . 'var CKEDITOR_BASEPATH = "' . DC_ADMIN_URL . self::$p_url . '/js/ckeditor/";' . "\n" . dcPage::jsVar('dotclear.admin_base_url', DC_ADMIN_URL) . dcPage::jsVar('dotclear.base_url', $GLOBALS['core']->blog->host) . dcPage::jsVar('dotclear.dcckeditor_plugin_url', DC_ADMIN_URL . self::$p_url) . 'CKEDITOR_GETURL = function(resource) {
	            // If this is not a full or absolute path.
	            if ( resource.indexOf(":/") == -1 && resource.indexOf("/") !== 0 ) {
		            resource = this.basePath + resource;
	            }
	            return resource;
             };' . "dotclear.msg.img_select_title = '" . html::escapeJS(__('Media chooser')) . "'; " . "dotclear.msg.post_link_title = '" . html::escapeJS(__('Link to an entry')) . "'; " . "dotclear.msg.link_title = '" . html::escapeJS(__('Link')) . "'; " . "dotclear.msg.img_title = '" . html::escapeJS(__('External image')) . "'; " . "dotclear.msg.url_cannot_be_empty = '" . html::escapeJS(__('URL field cannot be empty.')) . "';" . "\n//]]>\n" . "</script>\n" . dcPage::jsLoad(self::$p_url . '/js/ckeditor/ckeditor.js') . dcPage::jsLoad(self::$p_url . '/js/ckeditor/adapters/jquery.js') . dcPage::jsLoad($config_js);
    }
Ejemplo n.º 3
0
echo __('Blowup configuration');
?>
</title>
  <?php 
echo dcPage::jsLoad(dcPage::getPF('blowupConfig/config.js'));
?>
  <?php 
echo dcPage::jsColorPicker();
?>
  <script type="text/javascript">
  //<![CDATA[
  <?php 
echo dcPage::jsVar('dotclear.blowup_public_url', blowupConfig::imagesURL());
echo dcPage::jsVar('dotclear.msg.predefined_styles', __('Predefined styles'));
echo dcPage::jsVar('dotclear.msg.apply_code', __('Apply code'));
echo dcPage::jsVar('dotclear.msg.predefined_style_title', __('Choose a predefined style'));
?>
  //]]>
  </script>
</head>

<body>
<?php 
echo dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', __('Blog appearance') => $core->adminurl->get('admin.blog.theme'), __('Blowup configuration') => '')) . dcPage::notices();
echo '<p><a class="back" href="' . $core->adminurl->get('admin.blog.theme') . '">' . __('Back to Blog appearance') . '</a></p>';
if (!$can_write_images) {
    dcPage::message(__('For the following reasons, images cannot be created. You won\'t be able to change some background properties.') . $notices, false, true);
}
echo '<form id="theme_config" action="' . $p_url . '" method="post" enctype="multipart/form-data">';
echo '<div class="fieldset"><h3>' . __('Customization') . '</h3>' . '<h4>' . __('General') . '</h4>';
if ($can_write_images) {
Ejemplo n.º 4
0
# --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>
Ejemplo n.º 5
0
 public static function pingJS()
 {
     global $core;
     $res = "<script type=\"text/javascript\">\n//<![CDATA[\n" . dcPage::jsVar('dotclear.msg.check_all', __('Check all')) . "\n" . "</script>\n" . dcPage::jsLoad(dcPage::getPF('pings/post.js'));
     return $res;
 }
Ejemplo n.º 6
0
  <title><?php 
echo __('Blowup configuration');
?>
</title>
  <?php 
echo dcPage::jsLoad('index.php?pf=blowupConfig/config.js');
?>
  <?php 
echo dcPage::jsColorPicker();
?>
  <script type="text/javascript">
  //<![CDATA[
  <?php 
echo dcPage::jsVar('dotclear.blowup_public_url', blowupConfig::imagesURL());
echo dcPage::jsVar('dotclear.msg.predefined_styles', __('Predefined styles'));
echo dcPage::jsVar('dotclear.msg.apply_code', __('Apply code'));
?>
  //]]>
  </script>
</head>

<body>
<?php 
echo '<h2>' . html::escapeHTML($core->blog->name) . ' &rsaquo; <a href="blog_theme.php">' . __('Blog aspect') . '</a> &rsaquo; ' . __('Blowup configuration') . '</h2>' . '<p><a class="back" href="blog_theme.php">' . __('back') . '</a></p>';
if (!$can_write_images) {
    echo '<p class="message">' . __('As images cannot be created, you won\'t be able to change some background properties.') . '</p>';
}
if (!empty($_GET['upd'])) {
    echo '<p class="message">' . __('Theme configuration has been successfully updated.') . '</p>';
}
echo '<form id="theme_config" action="' . $p_url . '" method="post" enctype="multipart/form-data">';
Ejemplo n.º 7
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";
 }
Ejemplo n.º 8
0
        http::redirect($p_url);
    }
} catch (Exception $e) {
    $core->error->add($e->getMessage());
}
?>
<html>
<head>
  <title><?php 
echo ($filter_gui !== false ? sprintf(__('%s configuration'), $filter->name) . ' - ' : '') . $page_name;
?>
</title>
  <script type="text/javascript">
  //<![CDATA[
  <?php 
echo dcPage::jsVar('dotclear.msg.confirm_spam_delete', __('Are you sure you want to delete all spams?'));
?>
  //]]>
  </script>
  <?php 
echo dcPage::jsPageTabs($default_tab);
$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') . dcPage::jsLoad(dcPage::getPF('antispam/antispam.js'));
}
echo dcPage::cssLoad(dcPage::getPF('antispam/style.css'));
?>
</head>
<body>
<?php 
if ($filter_gui !== false) {
Ejemplo n.º 9
0
<head>
  <title><?php 
echo __('Theme Editor');
?>
</title>
  <link rel="stylesheet" type="text/css" href="index.php?pf=themeEditor/style.css" />
  <script type="text/javascript">
  //<![CDATA[
  <?php 
echo dcPage::jsVar('dotclear.msg.saving_document', __("Saving document..."));
?>
  <?php 
echo dcPage::jsVar('dotclear.msg.document_saved', __("Document saved"));
?>
  <?php 
echo dcPage::jsVar('dotclear.msg.error_occurred', __("An error occurred:"));
?>
  //]]>
  </script>
  <script type="text/javascript" src="index.php?pf=themeEditor/script.js"></script>
</head>

<body>
<?php 
echo '<h2>' . html::escapeHTML($core->blog->name) . ' &rsaquo; <a href="blog_theme.php">' . __('Blog aspect') . '</a> &rsaquo; ' . __('Theme Editor') . '</h2>';
?>

<p><strong><?php 
echo sprintf(__('Your current theme on this blog is "%s".'), html::escapeHTML($T['name']));
?>
</strong></p>
Ejemplo n.º 10
0
# Actions combo box
$pages_actions_page = new dcPagesActionsPage($core, 'plugin.php', array('p' => 'pages'));
if (!$pages_actions_page->process()) {
    # --BEHAVIOR-- adminPagesActionsCombo
    $core->callBehavior('adminPagesActionsCombo', array(&$combo_action));
    /* Display
    -------------------------------------------------------- */
    ?>
<html>
<head>
  <title><?php 
    echo __('Pages');
    ?>
</title>
  <?php 
    echo dcPage::jsLoad('js/jquery/jquery-ui.custom.js') . dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js') . dcPage::jsLoad(dcPage::getPF('pages/list.js')) . '<script type="text/javascript">' . "\n" . '//<![CDATA[' . "\n" . dcPage::jsVar('dotclear.msg.confirm_delete_posts', __("Are you sure you want to delete selected pages?")) . "\n" . '//]]>' . "\n" . '</script>';
    ?>
</head>

<body>
<?php 
    echo dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', __('Pages') => '')) . dcPage::notices();
    if (!empty($_GET['upd'])) {
        dcPage::success(__('Selected pages have been successfully updated.'));
    } elseif (!empty($_GET['del'])) {
        dcPage::success(__('Selected pages have been successfully deleted.'));
    } elseif (!empty($_GET['reo'])) {
        dcPage::success(__('Selected pages have been successfully reordered.'));
    }
    echo '<p class="top-add"><a class="button add" href="' . $p_url . '&amp;act=page">' . __('New page') . '</a></p>';
    if (!$core->error->flag()) {
Ejemplo n.º 11
0
            $res[] = dt::dt2str($m[1], (string) $file->media_meta->DateTimeOriginal);
            $items++;
            $dates++;
        } elseif (preg_match('/^separator\\((.*?)\\)$/u', $v, $m)) {
            $sep = $m[1];
        }
    }
    if ($no_date_alone && $dates == count($res) && $dates < $items) {
        // On ne laisse pas les dates seules, sauf si ce sont les seuls items du pattern (hors séparateur)
        return '';
    }
    return implode($sep, $res);
}
/* DISPLAY Main page
-------------------------------------------------------- */
$starting_scripts = '<script type="text/javascript">' . "\n" . "//<![CDATA[" . "\n" . dcPage::jsVar('dotclear.msg.confirm_delete_media', __('Are you sure to delete this media?')) . "\n" . "//]]>" . "</script>" . dcPage::jsLoad('js/_media_item.js');
if ($popup && !empty($plugin_id)) {
    $starting_scripts .= $core->callBehavior('adminPopupMedia', $plugin_id);
}
$temp_params = $media_page_url_params;
$temp_params['d'] = '%s';
$bc_template = $core->adminurl->get('admin.media', $temp_params, '&amp;', true);
$temp_params['d'] = '';
$home_url = $core->adminurl->get('admin.media', $temp_params);
call_user_func($open_f, __('Media manager'), $starting_scripts . dcPage::jsDatePicker() . ($popup ? dcPage::jsPageTabs($tab) : ''), dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', __('Media manager') => $home_url, $core->media->breadCrumb($bc_template) . '<span class="page-title">' . $file->basename . '</span>' => ''), array('home_link' => !$popup, 'hl' => false)));
if ($popup) {
    // Display notices
    echo dcPage::notices();
}
if ($file === null) {
    call_user_func($close_f);
Ejemplo n.º 12
0
  <script type="text/javascript">
  //<![CDATA[
  <?php 
echo dcPage::jsVar('dotclear.msg.saving_document', __("Saving document..."));
?>
  <?php 
echo dcPage::jsVar('dotclear.msg.document_saved', __("Document saved"));
?>
  <?php 
echo dcPage::jsVar('dotclear.msg.error_occurred', __("An error occurred:"));
?>
  <?php 
echo dcPage::jsVar('dotclear.msg.confirm_reset_file', __("Are you sure you want to reset this file?"));
?>
  <?php 
echo dcPage::jsVar('dotclear.colorsyntax', $user_ui_colorsyntax);
?>
  //]]>
  </script>
  <?php 
echo dcPage::jsConfirmClose('file-form');
?>
  <script type="text/javascript" src="<?php 
echo dcPage::getPF('themeEditor/script.js');
?>
"></script>
<?php 
if ($user_ui_colorsyntax) {
    ?>
  <?php 
    echo dcPage::cssLoad(dcPage::getPF('themeEditor/codemirror/codemirror.css'));
Ejemplo n.º 13
0
        $core->callBehavior('adminBeforeBlogSettingsUpdate', $blog_settings);
        if ($core->auth->isSuperAdmin() && in_array($_POST['url_scan'], $url_scan_combo)) {
            $blog_settings->system->put('url_scan', $_POST['url_scan']);
        }
        dcPage::addSuccessNotice(__('Blog has been successfully updated.'));
        http::redirect(sprintf($redir, $blog_id));
    } catch (Exception $e) {
        $core->error->add($e->getMessage());
    }
}
if ($standalone) {
    $breadcrumb = dcPage::breadcrumb(array(html::escapeHTML($blog_name) => '', __('Blog settings') => ''));
} else {
    $breadcrumb = dcPage::breadcrumb(array(__('System') => '', __('Blogs') => $core->adminurl->get("admin.blogs"), __('Blog settings') . ' : ' . html::escapeHTML($blog_name) => ''));
}
dcPage::open(__('Blog settings'), '<script type="text/javascript">' . "\n" . "//<![CDATA[" . "\n" . dcPage::jsVar('dotclear.msg.warning_path_info', __('Warning: except for special configurations, it is generally advised to have a trailing "/" in your blog URL in PATH_INFO mode.')) . "\n" . dcPage::jsVar('dotclear.msg.warning_query_string', __('Warning: except for special configurations, it is generally advised to have a trailing "?" in your blog URL in QUERY_STRING mode.')) . "\n" . "//]]>" . "</script>" . dcPage::jsConfirmClose('blog-form') . $core->callBehavior('adminPostEditor') . dcPage::jsLoad('js/_blog_pref.js') . $core->callBehavior('adminBlogPreferencesHeaders') . dcPage::jsPageTabs(), $breadcrumb);
if ($blog_id) {
    if (!empty($_GET['add'])) {
        dcPage::success(__('Blog has been successfully created.'));
    }
    if (!empty($_GET['upd'])) {
        dcPage::success(__('Blog has been successfully updated.'));
    }
    echo '<div class="multi-part" id="params" title="' . __('Parameters') . '">' . '<h3 class="out-of-screen-if-js">' . __('Parameters') . '</h3>' . '<form action="' . $action . '" method="post" id="blog-form">';
    echo '<div class="fieldset"><h4>' . __('Blog details') . '</h4>' . $core->formNonce();
    if ($core->auth->isSuperAdmin()) {
        echo '<p><label for="blog_id" class="required"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Blog ID:') . '</label>' . form::field('blog_id', 30, 32, html::escapeHTML($blog_id)) . '</p>' . '<p class="form-note">' . __('At least 2 characters using letters, numbers or symbols.') . '</p> ' . '<p class="form-note warn">' . __('Please note that changing your blog ID may require changes in your public index.php file.') . '</p>';
    } else {
        /*
        Only super admins can change the blog ID and URL, but we need to pass
        their values to the POST request via hidden html input values  so as
Ejemplo n.º 14
0
 public static function jsLoad()
 {
     return '<script type="text/javascript" src="index.php?pf=externalMedia/post.js"></script>' . '<script type="text/javascript">' . "\n" . "//<![CDATA[\n" . dcPage::jsVar('jsToolBar.prototype.elements.extmedia.title', __('External media')) . "\n//]]>\n" . "</script>\n";
 }
Ejemplo n.º 15
0
            }
            $core->blog->settings->maintenance->put('ts_' . $t->id(), abs((int) $ts), 'integer', sprintf('Recall time for task %s', $t->id()), true, $t->blog());
        }
        dcPage::addSuccessNotice(__('Maintenance plugin has been successfully configured.'));
        http::redirect($p_url . '&tab=' . $tab . '#' . $tab);
    } catch (Exception $e) {
        $core->error->add($e->getMessage());
    }
}
// Combos
$combo_ts = array(__('Never') => 0, __('Every week') => 604800, __('Every two weeks') => 1209600, __('Every month') => 2592000, __('Every two months') => 5184000);
// Display page
echo '<html><head>
<title>' . __('Maintenance') . '</title>' . dcPage::jsPageTabs($tab) . dcPage::jsLoad(dcPage::getPF('maintenance/js/settings.js'));
if ($task && $task->ajax()) {
    echo '<script type="text/javascript">' . "\n" . "//<![CDATA[\n" . dcPage::jsVar('dotclear.msg.wait', __('Please wait...')) . "//]]>\n" . '</script>' . dcPage::jsLoad(dcPage::getPF('maintenance/js/dc.maintenance.js'));
}
echo $maintenance->getHeaders() . '
</head>
<body>';
// Check if there is somthing to display according to user permissions
if (empty($tasks)) {
    echo dcPage::breadcrumb(array(__('Plugins') => '', __('Maintenance') => '')) . '<p class="warn">' . __('You have not sufficient permissions to view this page.') . '</p>' . '</body></html>';
    return null;
}
if ($task && ($res = $task->step()) !== null) {
    // Page title
    echo dcPage::breadcrumb(array(__('Plugins') => '', '<a href="' . $p_url . '">' . __('Maintenance') . '</a>' => '', html::escapeHTML($task->name()) => '')) . dcPage::notices();
    // content
    if (substr($res, 0, 1) != '<') {
        $res = sprintf('<p class="step-msg">%s</p>', $res);
Ejemplo n.º 16
0
  <style type="text/css">
  <?php 
echo file_get_contents(dirname(__FILE__) . '/style.css');
?>
  </style>
  <script type="text/javascript" src="js/tool-man/core.js"></script>
  <script type="text/javascript" src="js/tool-man/events.js"></script>
  <script type="text/javascript" src="js/tool-man/css.js"></script>
  <script type="text/javascript" src="js/tool-man/coordinates.js"></script>
  <script type="text/javascript" src="js/tool-man/drag.js"></script>
  <script type="text/javascript" src="index.php?pf=widgets/dragdrop.js"></script>
  <script type="text/javascript" src="index.php?pf=widgets/widgets.js"></script>
  <script type="text/javascript">
  //<![CDATA[
  <?php 
echo dcPage::jsVar('dotclear.msg.confirm_widgets_reset', __('Are you sure you want to reset sidebars?'));
?>
  //]]>
  </script>
</head>
<body>
<?php 
echo '<h2>' . html::escapeHTML($core->blog->name) . ' &rsaquo; ' . __('Widgets') . '</h2>';
# All widgets
echo '<form id="listWidgets" action="' . $p_url . '" method="post"  class="widgets">' . '<fieldset><legend>' . __('Available widgets') . '</legend>' . '<div id="widgets">';
foreach ($__widgets->elements() as $w) {
    echo '<div>' . form::hidden(array('w[void][0][id]'), html::escapeHTML($w->id())) . '<p class="widget-name">' . form::field(array('w[void][0][order]'), 2, 3, 0, 'hideControl') . ' ' . $w->name() . '</p>' . '<p class="js-remove"><label class="classic">' . __('Append to:') . ' ' . form::combo(array('addw[' . $w->id() . ']'), $append_combo) . '</label></p>' . '<div class="widgetSettings">' . $w->formSettings('w[void][0]') . '</div>' . '</div>';
}
echo '</div>' . '</fieldset>' . '<p><input type="submit" class="js-remove" name="append" value="' . __('add widgets to sidebars') . '" />' . $core->formNonce() . '</p>' . '</form>';
echo '<form id="sidebarsWidgets" action="' . $p_url . '" method="post">';
# Nav sidebar
Ejemplo n.º 17
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>';
     }
 }
Ejemplo n.º 18
0
    $default_tab = '';
}
if (!empty($_GET['co'])) {
    $default_tab = 'comments';
}
?>
<html>
<head>
  <title><?php 
echo $page_title . ' - ' . __('Pages');
?>
</title>
  <script type="text/javascript">
  //<![CDATA[
  <?php 
echo dcPage::jsVar('dotclear.msg.confirm_delete_post', __("Are you sure you want to delete this page?"));
?>
  //]]>
  </script>
  <?php 
echo dcPage::jsDatePicker() . dcPage::jsToolBar() . dcPage::jsModal() . dcPage::jsLoad('js/_post.js') . dcPage::jsConfirmClose('entry-form', 'comment-form') . $core->callBehavior('adminPageHeaders') . dcPage::jsPageTabs($default_tab) . $next_headlink . "\n" . $prev_headlink;
?>
</head>

<body>

<?php 
if (!empty($_GET['upd'])) {
    echo '<p class="message">' . __('Page has been successfully updated.') . '</p>';
} elseif (!empty($_GET['crea'])) {
    echo '<p class="message">' . __('Page has been successfully created.') . '</p>';
Ejemplo n.º 19
0
}
/* Get comments
-------------------------------------------------------- */
try {
    $comments = $core->blog->getComments($params);
    $counter = $core->blog->getComments($params, true);
    $comment_list = new adminCommentList($core, $comments, $counter->f(0));
} catch (Exception $e) {
    $core->error->add($e->getMessage());
}
/* DISPLAY
-------------------------------------------------------- */
$form_filter_title = __('Show filters and display options');
$starting_script = dcPage::jsLoad('js/_comments.js');
$starting_script .= dcPage::jsLoad('js/filter-controls.js');
$starting_script .= '<script type="text/javascript">' . "\n" . "//<![CDATA[" . "\n" . dcPage::jsVar('dotclear.msg.show_filters', $show_filters ? 'true' : 'false') . "\n" . dcPage::jsVar('dotclear.msg.filter_posts_list', $form_filter_title) . "\n" . dcPage::jsVar('dotclear.msg.cancel_the_filter', __('Cancel filters and display options')) . "\n" . "//]]>" . "</script>";
dcPage::open(__('Comments and trackbacks'), $starting_script, dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', __('Comments and trackbacks') => '')));
if (!empty($_GET['upd'])) {
    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) {
Ejemplo n.º 20
0
    }
}
if ($type && $module !== null && !empty($_REQUEST['do'])) {
    try {
        $module->process($_REQUEST['do']);
    } catch (Exception $e) {
        $core->error->add($e->getMessage());
    }
}
$title = __('Import/Export');
echo '
<html>
<head>
	<title>' . $title . '</title>' . dcPage::cssLoad(dcPage::getPF('importExport/style.css')) . dcPage::jsLoad(dcPage::getPF('importExport/js/script.js')) . '<script type="text/javascript">
	//<![CDATA[
	' . dcPage::jsVar('dotclear.msg.please_wait', __('Please wait...')) . '
	//]]>
	</script>
</head>
<body>';
if ($type && $module !== null) {
    echo dcPage::breadcrumb(array(__('Plugins') => '', $title => $p_url, html::escapeHTML($module->name) => '')) . dcPage::notices();
    echo '<div id="ie-gui">';
    $module->gui();
    echo '</div>';
} else {
    echo dcPage::breadcrumb(array(__('Plugins') => '', $title => '')) . dcPage::notices();
    echo '<h3>' . __('Import') . '</h3>' . listImportExportModules($core, $modules['import']);
    echo '<h3>' . __('Export') . '</h3>' . '<p class="info">' . sprintf(__('Export functions are in the page %s.'), '<a href="' . $core->adminurl->get('admin.plugin.maintenance', array('tab' => 'backup')) . '#backup">' . __('Maintenance') . '</a>') . '</p>';
}
dcPage::helpBlock('import');