Exemplo n.º 1
0
 public static function open($title = '', $head = '')
 {
     global $core;
     # List of user's blogs
     if ($core->auth->blog_count == 1 || $core->auth->blog_count > 20) {
         $blog_box = __('Blog:') . ' <strong title="' . html::escapeHTML($core->blog->url) . '">' . html::escapeHTML($core->blog->name) . '</strong>';
         if ($core->auth->blog_count > 20) {
             $blog_box .= ' - <a href="blogs.php">' . __('Change blog') . '</a>';
         }
     } else {
         $rs_blogs = $core->getBlogs(array('order' => 'LOWER(blog_name)', 'limit' => 20));
         $blogs = array();
         while ($rs_blogs->fetch()) {
             $blogs[html::escapeHTML($rs_blogs->blog_name . ' - ' . $rs_blogs->blog_url)] = $rs_blogs->blog_id;
         }
         $blog_box = __('Blogs:') . ' ' . $core->formNonce() . form::combo('switchblog', $blogs, $core->blog->id, '', 1) . '<noscript><div><input type="submit" value="' . __('ok') . '" /></div></noscript>';
     }
     # Display
     header('Content-Type: text/html; charset=UTF-8');
     echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" ' . ' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n" . '<html xmlns="http://www.w3.org/1999/xhtml" ' . 'xml:lang="' . $core->auth->getInfo('user_lang') . '" ' . 'lang="' . $core->auth->getInfo('user_lang') . '">' . "\n" . "<head>\n" . '  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />' . "\n" . '  <title>' . $title . ' - ' . html::escapeHTML($core->blog->name) . ' - ' . html::escapeHTML(DC_VENDOR_NAME) . ' - ' . DC_VERSION . '</title>' . "\n" . '  <meta name="MSSmartTagsPreventParsing" content="TRUE" />' . "\n" . '  <meta name="ROBOTS" content="NOARCHIVE,NOINDEX,NOFOLLOW" />' . "\n" . '  <meta name="GOOGLEBOT" content="NOSNIPPET" />' . "\n" . self::jsLoadIE7() . '  <style type="text/css">' . "\n" . '  @import "style/default.css";' . "\n" . "  </style>\n";
     if (l10n::getTextDirection($GLOBALS['_lang']) == 'rtl') {
         echo '  <style type="text/css">' . "\n" . '  @import "style/default-rtl.css";' . "\n" . "  </style>\n";
     }
     echo self::jsCommon() . $head;
     # --BEHAVIOR-- adminPageHTMLHead
     $core->callBehavior('adminPageHTMLHead');
     echo "</head>\n" . '<body id="dotclear-admin">' . "\n" . '<div id="top"><h1><a href="index.php">' . DC_VENDOR_NAME . '</a></h1></div>' . "\n";
     echo '<div id="info-box">' . '<form action="index.php" method="post"><div>' . $blog_box . ' - <a href="' . $core->blog->url . '" class="button">' . __('View site') . '</a>' . ' - ' . __('User:'******' <strong>' . $core->auth->userID() . '</strong>' . ' - <a href="index.php?logout=1" class="logout">' . __('Logout') . '</a>' . '</div></form>' . '</div>';
     echo '<div id="wrapper">' . "\n" . '<div id="main">' . "\n" . '<div id="content">' . "\n";
     if ($core->error->flag()) {
         echo '<div class="error"><strong>' . __('Errors:') . '</strong>' . $core->error->toHTML() . '</div>';
     }
 }
Exemplo n.º 2
0
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>';
}
Exemplo n.º 3
0
 public static function adminBlogPreferencesForm(&$core, &$settings)
 {
     $themes = array('' => '');
     foreach (new DirectoryIterator(dirname(__FILE__) . '/../../themes/') as $dir) {
         if ($dir->isDir() && !$dir->isDot()) {
             $themes[$dir->getFilename()] = $dir->getFilename();
         }
     }
     echo '<fieldset><legend>Mobile Theme Switcher</legend>' . '<div class="two-cols"><div class="col">' . '<p><label>Mobile theme</label>' . form::combo('mobilethemeswitcher_theme', $themes, $settings->mobilethemeswitcher_theme) . '</p></div></div></fieldset>';
 }
Exemplo n.º 4
0
 public static function open($title = '', $head = '', $breadcrumb = '', $options = array())
 {
     global $core;
     # List of user's blogs
     if ($core->auth->getBlogCount() == 1 || $core->auth->getBlogCount() > 20) {
         $blog_box = '<p>' . __('Blog:') . ' <strong title="' . html::escapeHTML($core->blog->url) . '">' . html::escapeHTML($core->blog->name) . '</strong>';
         if ($core->auth->getBlogCount() > 20) {
             $blog_box .= ' - <a href="' . $core->adminurl->get("admin.blogs") . '">' . __('Change blog') . '</a>';
         }
         $blog_box .= '</p>';
     } else {
         $rs_blogs = $core->getBlogs(array('order' => 'LOWER(blog_name)', 'limit' => 20));
         $blogs = array();
         while ($rs_blogs->fetch()) {
             $blogs[html::escapeHTML($rs_blogs->blog_name . ' - ' . $rs_blogs->blog_url)] = $rs_blogs->blog_id;
         }
         $blog_box = '<p><label for="switchblog" class="classic">' . __('Blogs:') . '</label> ' . $core->formNonce() . form::combo('switchblog', $blogs, $core->blog->id) . '<input type="submit" value="' . __('ok') . '" class="hidden-if-js" /></p>';
     }
     $safe_mode = isset($_SESSION['sess_safe_mode']) && $_SESSION['sess_safe_mode'];
     # Display
     header('Content-Type: text/html; charset=UTF-8');
     // Prevents Clickjacking as far as possible
     if (isset($options['x-frame-allow'])) {
         self::setXFrameOptions($options['x-frame-allow']);
     } else {
         self::setXFrameOptions();
     }
     echo '<!DOCTYPE html>' . '<html lang="' . $core->auth->getInfo('user_lang') . '">' . "\n" . "<head>\n" . '  <meta charset="UTF-8" />' . "\n" . '  <meta name="ROBOTS" content="NOARCHIVE,NOINDEX,NOFOLLOW" />' . "\n" . '  <meta name="GOOGLEBOT" content="NOSNIPPET" />' . "\n" . '  <meta name="viewport" content="width=device-width, initial-scale=1.0" />' . "\n" . '  <title>' . $title . ' - ' . html::escapeHTML($core->blog->name) . ' - ' . html::escapeHTML(DC_VENDOR_NAME) . ' - ' . DC_VERSION . '</title>' . "\n" . self::jsLoadIE7() . self::cssLoad('style/default.css');
     if (l10n::getTextDirection($GLOBALS['_lang']) == 'rtl') {
         echo self::cssLoad('style/default-rtl.css');
     }
     $core->auth->user_prefs->addWorkspace('interface');
     $user_ui_hide_std_favicon = $core->auth->user_prefs->interface->hide_std_favicon;
     if (!$user_ui_hide_std_favicon) {
         echo '<link rel="icon" type="image/png" href="images/favicon96-login.png" />' . "\n" . '<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />' . "\n";
     }
     echo self::jsCommon() . self::jsToggles() . $head;
     # --BEHAVIOR-- adminPageHTMLHead
     $core->callBehavior('adminPageHTMLHead');
     echo "</head>\n" . '<body id="dotclear-admin' . ($safe_mode ? ' safe-mode' : '') . '" class="no-js">' . "\n" . '<ul id="prelude">' . '<li><a href="#content">' . __('Go to the content') . '</a></li>' . '<li><a href="#main-menu">' . __('Go to the menu') . '</a></li>' . '<li><a href="#qx">' . __('Go to search') . '</a></li>' . '<li><a href="#help">' . __('Go to help') . '</a></li>' . '</ul>' . "\n" . '<div id="header" role="banner">' . '<h1><a href="' . $core->adminurl->get("admin.home") . '"><span class="hidden">' . DC_VENDOR_NAME . '</span></a></h1>' . "\n";
     echo '<form action="' . $core->adminurl->get("admin.home") . '" method="post" id="top-info-blog">' . $blog_box . '<p><a href="' . $core->blog->url . '" class="outgoing" title="' . __('Go to site') . '">' . __('Go to site') . '<img src="images/outgoing.png" alt="" /></a>' . '</p></form>' . '<ul id="top-info-user">' . '<li><a class="' . (preg_match('/' . preg_quote($core->adminurl->get('admin.home')) . '$/', $_SERVER['REQUEST_URI']) ? ' active' : '') . '" href="' . $core->adminurl->get("admin.home") . '">' . __('My dashboard') . '</a></li>' . '<li><a class="smallscreen' . (preg_match('/' . preg_quote($core->adminurl->get('admin.user.preferences')) . '(\\?.*)?$/', $_SERVER['REQUEST_URI']) ? ' active' : '') . '" href="' . $core->adminurl->get("admin.user.preferences") . '">' . __('My preferences') . '</a></li>' . '<li><a href="' . $core->adminurl->get("admin.home", array('logout' => 1)) . '" class="logout"><span class="nomobile">' . sprintf(__('Logout %s'), $core->auth->userID()) . '</span><img src="images/logout.png" alt="" /></a></li>' . '</ul>' . '</div>';
     // end header
     echo '<div id="wrapper" class="clearfix">' . "\n" . '<div class="hidden-if-no-js collapser-box"><a href="#" id="collapser">' . '<img class="collapse-mm" src="images/collapser-hide.png" alt="' . __('Hide main menu') . '" />' . '<img class="expand-mm" src="images/collapser-show.png" alt="' . __('Show main menu') . '" />' . '</a></div>' . '<div id="main" role="main">' . "\n" . '<div id="content" class="clearfix">' . "\n";
     # Safe mode
     if ($safe_mode) {
         echo '<div class="warning" role="alert"><h3>' . __('Safe mode') . '</h3>' . '<p>' . __('You are in safe mode. All plugins have been temporarily disabled. Remind to log out then log in again normally to get back all functionalities') . '</p>' . '</div>';
     }
     // Display breadcrumb (if given) before any error messages
     echo $breadcrumb;
     // Display notices and errors
     echo self::notices();
 }
Exemplo n.º 5
0
        echo '</td></tr>';
    }
    echo '</table>';
}
echo '<h3>' . __('Install or upgrade languages') . '</h3>';
if (!$is_writable) {
    echo '<p>' . sprintf(__('You can install or remove a language by adding or ' . 'removing the relevant directory in your %s folder.'), '<strong>locales</strong>') . '</p>';
}
if (!empty($dc_langs) && $is_writable) {
    $dc_langs_combo = array();
    foreach ($dc_langs as $k => $v) {
        if ($v->link && isset($iso_codes[$v->title])) {
            $dc_langs_combo[html::escapeHTML('(' . $v->title . ') ' . $iso_codes[$v->title])] = html::escapeHTML($v->link);
        }
    }
    echo '<form method="post" action="langs.php" enctype="multipart/form-data">' . '<fieldset>' . '<legend>' . __('Available languages') . '</legend>' . '<p>' . sprintf(__('You can download and install a additional language directly from Dotclear.net. ' . 'Proposed languages are based on your version: %s.'), '<strong>' . DC_VERSION . '</strong>') . '</p>' . '<p class="field"><label class="classic">' . __('Language:') . ' ' . form::combo(array('pkg_url'), $dc_langs_combo) . '</label></p>' . '<p class="field"><label class="classic required" title="' . __('Required field') . '">' . __('Your password:'******' ' . form::password(array('your_pwd'), 20, 255) . '</label></p>' . '<input type="submit" value="' . __('Install language') . '" />' . $core->formNonce() . '</fieldset>' . '</form>';
}
if ($is_writable) {
    # 'Upload language pack' form
    echo '<form method="post" action="langs.php" enctype="multipart/form-data">' . '<fieldset>' . '<legend>' . __('Upload a zip file') . '</legend>' . '<p>' . __('You can install languages by uploading zip files.') . '</p>' . '<p class="field"><label class="classic required" title="' . __('Required field') . '">' . __('Language zip file:') . ' ' . '<input type="file" name="pkg_file" /></label></p>' . '<p class="field"><label class="classic required" title="' . __('Required field') . '">' . __('Your password:'******' ' . form::password(array('your_pwd'), 20, 255) . '</label></p>' . '<input type="submit" name="upload_pkg" value="' . __('Upload language') . '" />' . $core->formNonce() . '</fieldset>' . '</form>';
}
dcPage::close();
# Language installation function
function dc_lang_install($file)
{
    $zip = new fileUnzip($file);
    $zip->getList(false, '#(^|/)(__MACOSX|\\.svn|\\.DS_Store|Thumbs\\.db)(/|$)#');
    if (!preg_match('/^[a-z]{2,3}(-[a-z]{2})?$/', $zip->getRootDir())) {
        throw new Exception(__('Invalid language zip file.'));
    }
    if ($zip->isEmpty() || !$zip->hasFile($zip->getRootDir() . '/main.po')) {
Exemplo n.º 6
0
    ?>
Imagemagick
		</p>
		<p><label for="graphic_lib">Taille des miniatures:</label><br/>
		<?php 
    echo form::field('thumb_width', 3, 3, $params['km_thumbwidth']);
    ?>
 *
		<?php 
    echo form::field('thumb_height', 3, 3, $params['km_thumbheight']);
    ?>
 pixels
		</p>
		<p><label for="graphic_thumbtype">Type de miniatures:</label><br/>
		<?php 
    echo form::combo('graphic_thumbtype', array('Echantillon' => 'crop', 'Redimensionnement' => 'redim'), $params['km_graphicthumbtype']);
    ?>
</p>
	</fieldset><br/>
	<fieldset>
		<legend>Actions</legend>
		<? echo form::hidden('op','params');?>
		<? echo form::hidden('posted',1);?>
		<input type="submit" value="Enregistrer"/>&nbsp;<input type="reset" value="Annuler"/>
	</fieldset>
</form>
<?php 
} elseif ($op == 'themes') {
}
?>
</p>
Exemplo n.º 7
0
     echo '<p class="message">' . __('Blog has been successfully updated.') . '</p>';
 }
 echo '<div class="multi-part" id="params" title="' . __('Parameters') . '">' . '<h3>' . __('Parameters') . '</h3>' . '<form action="' . $action . '" method="post" id="blog-form">';
 echo '<fieldset><legend>' . __('Blog details') . '</legend>' . $core->formNonce();
 if ($core->auth->isSuperAdmin()) {
     echo '<p><label class="required" title="' . __('Required field') . '">' . __('Blog ID:') . form::field('blog_id', 30, 32, html::escapeHTML($blog_id)) . '</label></p>' . '<p class="form-note">' . __('At least 2 characters using letters, numbers or symbols.') . ' ' . __('Please note that changing your blog ID may require changes in your public index.php file.') . '</p>';
 }
 echo '<p><label class="required" title="' . __('Required field') . '">' . __('Blog name:') . form::field('blog_name', 30, 255, html::escapeHTML($blog_name)) . '</label></p>';
 if ($core->auth->isSuperAdmin()) {
     echo '<p><label class="required" title="' . __('Required field') . '">' . __('Blog URL:') . form::field('blog_url', 30, 255, html::escapeHTML($blog_url)) . '</label></p>' . '<p><label>' . __('URL scan method:') . form::combo('url_scan', $url_scan_combo, $blog_settings->url_scan) . '</label></p>' . '<p><label>' . __('Blog status:') . form::combo('blog_status', $status_combo, $blog_status) . '</label></p>';
 }
 echo '<p class="area"><label for="blog_desc">' . __('Blog description:') . '</label>' . form::textarea('blog_desc', 60, 5, html::escapeHTML($blog_desc)) . '</p>' . '</fieldset>';
 echo '<fieldset><legend>' . __('Blog configuration') . '</legend>' . '<div class="two-cols">' . '<div class="col">' . '<p><label>' . __('Blog editor name:') . form::field('editor', 30, 255, html::escapeHTML($blog_settings->editor)) . '</label></p>' . '<p><label>' . __('Default language:') . form::combo('lang', $lang_combo, $blog_settings->lang, 'l10n') . '</label></p>' . '<p><label>' . __('Blog timezone:') . form::combo('blog_timezone', dt::getZones(true, true), html::escapeHTML($blog_settings->blog_timezone)) . '</label></p>' . '</div>' . '<div class="col">' . '<p><label>' . __('Copyright notice:') . form::field('copyright_notice', 30, 255, html::escapeHTML($blog_settings->copyright_notice)) . '</label></p>' . '<p><label>' . __('New post URL format:') . form::combo('post_url_format', $post_url_combo, html::escapeHTML($blog_settings->post_url_format)) . '</label></p>' . '<p><label class="classic">' . form::checkbox('enable_xmlrpc', '1', $blog_settings->enable_xmlrpc) . __('Enable XML/RPC interface') . '</label>' . ' - <a href="#xmlrpc">' . __('more information') . '</a></p>' . '</div>' . '</div>' . '<br class="clear" />' . '</fieldset>';
 echo '<fieldset><legend>' . __('Comments and trackbacks') . '</legend>' . '<div class="two-cols">' . '<div class="col">' . '<p><label class="classic">' . form::checkbox('allow_comments', '1', $blog_settings->allow_comments) . __('Accept comments') . '</label></p>' . '<p><label class="classic">' . form::checkbox('comments_pub', '1', !$blog_settings->comments_pub) . __('Moderate comments') . '</label></p>' . '<p><label class="classic">' . sprintf(__('Leave comments open for %s days'), form::field('comments_ttl', 2, 3, $blog_settings->comments_ttl)) . '</label></p>' . '<p class="form-note">' . __('Leave blank to disable this feature.') . '</p>' . '<p><label class="classic">' . form::checkbox('wiki_comments', '1', $blog_settings->wiki_comments) . __('Wiki syntax for comments') . '</label></p>' . '</div>' . '<div class="col">' . '<p><label class="classic">' . form::checkbox('allow_trackbacks', '1', $blog_settings->allow_trackbacks) . __('Accept trackbacks') . '</label></p>' . '<p><label class="classic">' . form::checkbox('trackbacks_pub', '1', !$blog_settings->trackbacks_pub) . __('Moderate trackbacks') . '</label></p>' . '<p><label class="classic">' . sprintf(__('Leave trackbacks open for %s days'), form::field('trackbacks_ttl', 2, 3, $blog_settings->trackbacks_ttl)) . '</label></p>' . '<p class="form-note">' . __('Leave blank to disable this feature.') . '</p>' . '<p><label class="classic">' . form::checkbox('comments_nofollow', '1', $blog_settings->comments_nofollow) . __('Add "nofollow" relation on comments and trackbacks links') . '</label></p>' . '</div>' . '</div>' . '<br class="clear" />' . '</fieldset>';
 echo '<fieldset><legend>' . __('Blog presentation') . '</legend>' . '<div class="two-cols">' . '<div class="col">' . '<p><label>' . __('Date format:') . form::field('date_format', 30, 255, html::escapeHTML($blog_settings->date_format)) . '</label></p>' . '<p><label>' . __('Time format:') . form::field('time_format', 30, 255, html::escapeHTML($blog_settings->time_format)) . '</label></p>' . '<p><label class="classic">' . form::checkbox('use_smilies', '1', $blog_settings->use_smilies) . __('Display smilies on entries and comments') . '</label></p>' . '</div>' . '<div class="col">' . '<p><label class="classic">' . sprintf(__('Display %s entries per page'), form::field('nb_post_per_page', 2, 3, $blog_settings->nb_post_per_page)) . '</label></p>' . '<p><label class="classic">' . sprintf(__('Display %s entries per feed'), form::field('nb_post_per_feed', 2, 3, $blog_settings->nb_post_per_feed)) . '</label></p>' . '<p><label class="classic">' . sprintf(__('Display %s comments per feed'), form::field('nb_comment_per_feed', 2, 3, $blog_settings->nb_comment_per_feed)) . '</label></p>' . '<p><label class="classic">' . form::checkbox('short_feed_items', '1', $blog_settings->short_feed_items) . __('Truncate feeds') . '</label></p>' . '</div>' . '</div>' . '<br class="clear" />' . '</fieldset>';
 echo '<fieldset><legend>' . __('Media and images') . '</legend>' . '<div class="two-cols">' . '<div class="col">' . '<h4>' . __('Generated image sizes (in pixels)') . '</h4>' . '<p class="field"><label>' . __('Thumbnails:') . ' ' . form::field('media_img_t_size', 3, 3, $blog_settings->media_img_t_size) . '</label></p>' . '<p class="field"><label>' . __('Small:') . ' ' . form::field('media_img_s_size', 3, 3, $blog_settings->media_img_s_size) . '</label></p>' . '<p class="field"><label>' . __('Medium:') . ' ' . form::field('media_img_m_size', 3, 3, $blog_settings->media_img_m_size) . '</label></p>' . '</div>' . '<div class="col">' . '<h4><label for="media_img_title_pattern">' . __('Inserted image title') . '</label></h4>' . '<p>' . __('This defines image tag title when you insert it in a post from the media manager. It is retrieved from the picture\'s metadata.') . '</p>' . '<p>' . form::combo('media_img_title_pattern', $img_title_combo, html::escapeHTML($blog_settings->media_img_title_pattern)) . '</p>' . '</div>' . '</div>' . '</fieldset>';
 echo '<fieldset><legend>' . __('Search engines robots policy') . '</legend>';
 foreach ($robots_policy_options as $k => $v) {
     echo '<p><label class="classic">' . form::radio(array('robots_policy'), $k, $blog_settings->robots_policy == $k) . ' ' . $v . '</label></p>';
 }
 echo '</fieldset>';
 # --BEHAVIOR-- adminBlogPreferencesForm
 $core->callBehavior('adminBlogPreferencesForm', $core, $blog_settings);
 echo '<p><input type="submit" accesskey="s" value="' . __('save') . '" />' . (!$standalone ? form::hidden('id', $blog_id) : '') . '</p>' . '</form>';
 if ($core->auth->isSuperAdmin() && $blog_id != $core->blog->id) {
     echo '<form action="blog_del.php" method="post">' . '<p><input type="submit" value="' . __('Delete this blog') . '" />' . form::hidden(array('blog_id'), $blog_id) . $core->formNonce() . '</p>' . '</form>';
 }
 # XML/RPC information
 echo '<h3 id="xmlrpc">' . __('XML/RPC interface') . '</h3>';
 echo '<p>' . __('XML/RPC interface allows you to edit your blog with an external client.') . '</p>';
 if (!$blog_settings->enable_xmlrpc) {
Exemplo n.º 8
0
                throw new Exception(__("Passwords don't match"));
            }
            $cur->user_pwd = $_POST['new_pwd'];
        }
        # --BEHAVIOR-- adminBeforeUserUpdate
        $core->callBehavior('adminBeforeUserUpdate', $cur, $core->auth->userID());
        # Udate user
        $core->updUser($core->auth->userID(), $cur);
        # --BEHAVIOR-- adminAfterUserUpdate
        $core->callBehavior('adminAfterUserUpdate', $cur, $core->auth->userID());
        http::redirect('preferences.php?upd=1');
    } catch (Exception $e) {
        $core->error->add($e->getMessage());
    }
}
/* DISPLAY
-------------------------------------------------------- */
dcPage::open($page_title, dcPage::jsLoad('js/_preferences.js') . dcPage::jsConfirmClose('user-form') . $core->callBehavior('adminPreferencesHeaders'));
if (!empty($_GET['upd'])) {
    echo '<p class="message">' . __('Personal information has been successfully updated.') . '</p>';
}
echo '<h2>' . $page_title . '</h2>';
echo '<form action="preferences.php" method="post" id="user-form">' . '<fieldset><legend>' . __('User preferences') . '</legend>' . '<div class="two-cols">' . '<div class="col">' . '<p><label>' . __('Last Name:') . form::field('user_name', 20, 255, html::escapeHTML($user_name), '', 2) . '</label></p>' . '<p><label>' . __('First Name:') . form::field('user_firstname', 20, 255, html::escapeHTML($user_firstname), '', 3) . '</label></p>' . '<p><label>' . __('Display name:') . form::field('user_displayname', 20, 255, html::escapeHTML($user_displayname), '', 4) . '</label></p>' . '<p><label>' . __('Email:') . form::field('user_email', 20, 255, html::escapeHTML($user_email), '', 5) . '</label></p>' . '<p><label>' . __('URL:') . form::field('user_url', 30, 255, html::escapeHTML($user_url), '', 6) . '</label></p>' . '</div>' . '<div class="col">' . '<p><label>' . __('Preferred format:') . form::combo('user_post_format', $formaters_combo, $user_options['post_format'], '', 7) . '</label></p>' . '<p><label>' . __('Default entry status:') . form::combo('user_post_status', $status_combo, $user_post_status, '', 8) . '</label></p>' . '<p><label>' . __('Entry edit field height:') . form::field('user_edit_size', 5, 4, (int) $user_options['edit_size'], '', 9) . '</label></p>' . '<p><label>' . __('User language:') . form::combo('user_lang', $lang_combo, $user_lang, 'l10n', 10) . '</label></p>' . '<p><label>' . __('User timezone:') . form::combo('user_tz', dt::getZones(true, true), $user_tz, '', 11) . '</label></p>' . '<p><label class="classic">' . form::checkbox('user_wysiwyg', 1, $user_options['enable_wysiwyg'], '', 12) . ' ' . __('Enable WYSIWYG mode') . '</label></p>' . '</div>' . '</div>' . '<br class="clear" />' . '</fieldset>';
# --BEHAVIOR-- adminPreferencesForm
$core->callBehavior('adminPreferencesForm', $core);
if ($core->auth->allowPassChange()) {
    echo '<fieldset>' . '<legend>' . __('Change your password') . '</legend>' . '<p><label>' . __('New password:'******'new_pwd', 20, 255, '', '', 30) . '</label></p>' . '<p><label>' . __('Confirm password:'******'new_pwd_c', 20, 255, '', '', 31) . '</label></p>' . '</fieldset>' . '<fieldset>' . '<p>' . __('If you want to change your email or password you must provide your current password.') . '</p>' . '<p><label>' . __('Your password:'******'cur_pwd', 20, 255, '', '', 32) . '</label></p>' . '</fieldset>';
}
echo '<p class="clear">' . $core->formNonce() . '<input type="submit" accesskey="s" value="' . __('Save') . '" tabindex="33" /></p>' . '</form>';
dcPage::helpBlock('core_user_pref');
dcPage::close();
Exemplo n.º 9
0
echo '</div>';
echo '<div class="col">' . '<form action="category.php" method="post">' . '<fieldset><legend>' . __('Add a new category') . '</legend>' . '<p><label>' . __('Title:') . ' ' . form::field('cat_title', 30, 255) . '</label></p>' . '<p><label>' . __('Parent:') . ' ' . '<select id="new_cat_parent" name="new_cat_parent">' . '<option value="0">' . __('Top level') . '</option>';
while ($rs->fetch()) {
    echo '<option value="' . $rs->cat_id . '">' . str_repeat('&nbsp;&nbsp;', $rs->level) . '&bull; ' . html::escapeHTML($rs->cat_title) . '</option>';
}
echo '</select></label></p>' . '<p><input type="submit" value="' . __('Save') . '" /></p>' . $core->formNonce() . '</fieldset>' . '</form>';
if (!$rs->isEmpty()) {
    $deletable = array();
    $l = $rs->level;
    $full_name = array($rs->cat_title);
    while ($rs->fetch()) {
        if ($rs->level < $l) {
            $full_name = array();
        } elseif ($rs->level == $l) {
            array_pop($full_name);
        }
        $full_name[] = html::escapeHTML($rs->cat_title);
        if ($rs->nb_post == 0) {
            $deletable[implode(' / ', $full_name)] = $rs->cat_id;
        }
        $l = $rs->level;
    }
    if (count($deletable) > 0) {
        echo '<form action="categories.php" method="post" id="delete-category">' . '<fieldset><legend>' . __('Remove a category') . '</legend>' . '<p><label>' . __('Choose a category to remove:') . ' ' . form::combo('del_cat', $deletable) . '</label></p> ' . '<p><input type="submit" value="' . __('ok') . '" /></p>' . $core->formNonce() . '</fieldset>' . '</form>';
    }
    echo '<form action="categories.php" method="post" id="reset-order">' . '<fieldset><legend>' . __('Reorder categories') . '</legend>' . '<p>' . __('This will relocate all categories on the top level') . '</p> ' . '<p><input type="submit" value="' . __('Reorder') . '" /></p>' . form::hidden(array('reset'), 1) . $core->formNonce() . '</fieldset>' . '</form>';
}
echo '</div>';
echo '</div>';
dcPage::helpBlock('core_categories');
dcPage::close();
Exemplo n.º 10
0
    if ($blowup_user['top_image'] == 'custom' && $blowup_user['uploaded']) {
        $preview_image = http::concatURL($core->blog->url, blowupConfig::imagesURL() . '/page-t.png');
    } else {
        $preview_image = dcPage::getPF('blowupConfig/alpha-img/page-t/' . $blowup_user['top_image'] . '.png');
    }
    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');
Exemplo n.º 11
0
# Téléchargement ou sauvegarde d'un plugin
if (!empty($_POST['p_theme'])) {
    $fname = 'theme-' . $_POST['p_theme'];
    if (!empty($themes_list[$_POST['p_theme']]['version'])) {
        $fname .= '-' . $themes_list[$_POST['p_theme']]['version'];
    }
    $fname .= '.pkg.gz';
    dcPackager::packIt($_POST['p_theme'], $themes_root, $fname, !empty($_POST['p_save']) && is_writable(DC_SHARE_DIR), $tool_url . '&t_ok=1', __('An error occured while creating the theme.'), $err);
}
/* Affichage
-------------------------------------------------------- */
buffer::str('<h2>' . __('Themes and plugins packing') . '</h2>');
if ($err != '') {
    buffer::str('<div class="erreur"><p><strong>' . __('Error(s)') . ' :</strong></p>' . $err . '</div>');
}
if (!empty($_GET['p_ok'])) {
    buffer::str('<p class="message">' . __('Plugin saved.') . '</p>');
}
if (!empty($_GET['t_ok'])) {
    buffer::str('<p class="message">' . __('Theme saved.') . '</p>');
}
buffer::str('<form action="' . $tool_url . '" method="post">' . '<fieldset class="clear"><legend>' . __('Pack a plugin') . '</legend>' . '<p class="field"><label class="float" for="p_plugin">' . __('Plugin name') . ' :</label>' . form::combo('p_plugin', $p_list) . '</p>' . '<p><input class="submit" type="submit" name="p_dl" value="' . __('Download this plugin') . '" />');
if (is_writable(DC_SHARE_DIR)) {
    buffer::str(' <input class="submit" type="submit" name="p_save" value="' . __('Save this plugin in share folder') . '" /></p>');
}
buffer::str('</p>' . '</fieldset></form>');
buffer::str('<form action="' . $tool_url . '" method="post">' . '<fieldset class="clear"><legend>' . __('Pack a theme') . '</legend>' . '<p class="field"><label class="float" for="p_theme">' . __('Theme name') . ' :</label>' . form::combo('p_theme', $t_list) . '</p>' . '<p><input class="submit" type="submit" name="p_dl" value="' . __('Download this theme') . '" />');
if (is_writable(DC_SHARE_DIR)) {
    buffer::str(' <input class="submit" type="submit" name="p_save" value="' . __('Save this theme in share folder') . '" /></p>');
}
buffer::str('</p>' . '</fieldset></form>');
Exemplo n.º 12
0
    }
}
foreach ($avail_fav as $k => $fav) {
    if ($count == 0) {
        echo '<ul class="fav-list">';
    }
    $count++;
    echo '<li id="fa-' . $k . '">' . '<label for="fak-' . $k . '">' . '<img src="' . dc_admin_icon_url($fav['small-icon']) . '" alt="" /> ' . '<span class="zoom"><img src="' . dc_admin_icon_url($fav['large-icon']) . '" alt="" /></span>' . form::checkbox(array('append[]', 'fak-' . $k), $k) . $fav['title'] . '</label>' . (isset($default_fav_ids[$k]) ? ' <span class="default-fav"><img src="images/selected.png" alt="' . __('(default favorite)') . '" /></span>' : '') . '</li>';
}
if ($count > 0) {
    echo '</ul>';
}
echo '<p>' . $core->formNonce() . '<input type="submit" name="appendaction" value="' . __('Add to my favorites') . '" /></p>';
echo '</div>';
# /available favorites
echo '</form>';
echo '<form action="' . $core->adminurl->get("admin.user.preferences") . '" method="post" id="db-forms" class="two-boxes even">' . '<div class="fieldset">' . '<h4>' . __('Menu') . '</h4>' . '<p><label for="user_ui_nofavmenu" class="classic">' . form::checkbox('user_ui_nofavmenu', 1, !$user_ui_nofavmenu) . ' ' . __('Display favorites at the top of the menu') . '</label></p></div>';
if (count($iconsets_combo) > 1) {
    echo '<div class="fieldset">' . '<h4>' . __('Dashboard icons') . '</h4>' . '<p><label for="user_ui_iconset" class="classic">' . __('Iconset:') . '</label> ' . form::combo('user_ui_iconset', $iconsets_combo, $user_ui_iconset) . '</p>' . '</div>';
} else {
    echo '<p class="hidden">' . form::hidden('user_ui_iconset', '') . '</p>';
}
echo '<div class="fieldset">' . '<h4>' . __('Dashboard modules') . '</h4>' . '<p><label for="user_dm_doclinks" class="classic">' . form::checkbox('user_dm_doclinks', 1, $user_dm_doclinks) . ' ' . __('Display documentation links') . '</label></p>' . '<p><label for="user_dm_dcnews" class="classic">' . form::checkbox('user_dm_dcnews', 1, $user_dm_dcnews) . ' ' . __('Display Dotclear news') . '</label></p>' . '<p><label for="user_dm_quickentry" class="classic">' . form::checkbox('user_dm_quickentry', 1, $user_dm_quickentry) . ' ' . __('Display quick entry form') . '</label><br class="clear" />' . '</p>';
echo '</div>';
# --BEHAVIOR-- adminDashboardOptionsForm
$core->callBehavior('adminDashboardOptionsForm', $core);
echo '<p>' . form::hidden('db-options', '-') . $core->formNonce() . '<input type="submit" accesskey="s" value="' . __('Save my dashboard options') . '" /></p>' . '</form>';
echo '</div>';
# /multipart-user-favorites
dcPage::helpBlock('core_user_pref');
dcPage::close();
Exemplo n.º 13
0
 $ref_level = $level = $rs->level - 1;
 while ($rs->fetch()) {
     $attr = 'id="cat_' . $rs->cat_id . '" class="cat-line clearfix"';
     if ($rs->level > $level) {
         echo str_repeat('<ul><li ' . $attr . '>', $rs->level - $level);
     } elseif ($rs->level < $level) {
         echo str_repeat('</li></ul>', -($rs->level - $level));
     }
     if ($rs->level <= $level) {
         echo '</li><li ' . $attr . '>';
     }
     echo '<p class="cat-title"><label class="classic" for="cat_' . $rs->cat_id . '"><a href="' . $core->adminurl->get("admin.category", array('id' => $rs->cat_id)) . '">' . html::escapeHTML($rs->cat_title) . '</a></label> </p>' . '<p class="cat-nb-posts">(<a href="' . $core->adminurl->get("admin.posts", array('cat_id' => $rs->cat_id)) . '">' . sprintf($rs->nb_post > 1 ? __('%d entries') : __('%d entry'), $rs->nb_post) . '</a>' . ', ' . __('total:') . ' ' . $rs->nb_total . ')</p>' . '<p class="cat-url">' . __('URL:') . ' <code>' . html::escapeHTML($rs->cat_url) . '</code></p>';
     echo '<p class="cat-buttons">';
     if ($rs->nb_total > 0) {
         // remove current category
         echo '<label for="mov_cat_' . $rs->cat_id . '">' . __('Move entries to') . '</label> ' . form::combo(array('mov_cat[' . $rs->cat_id . ']', 'mov_cat_' . $rs->cat_id), array_filter($categories_combo, create_function('$cat', 'return $cat->value!=$GLOBALS[\'rs\']->cat_id;')), '', '') . ' <input type="submit" class="reset" name="mov[' . $rs->cat_id . ']" value="' . __('OK') . '"/>';
         $attr_disabled = ' disabled="disabled"';
         $input_class = 'disabled ';
     } else {
         $attr_disabled = '';
         $input_class = '';
     }
     echo ' <input type="submit"' . $attr_disabled . ' class="' . $input_class . 'delete" name="delete[' . $rs->cat_id . ']" value="' . __('Delete category') . '"/>' . '</p>';
     $level = $rs->level;
 }
 if ($ref_level - $level < 0) {
     echo str_repeat('</li></ul>', -($ref_level - $level));
 }
 echo '</div>';
 echo '<div class="clear">';
 if ($core->auth->check('categories', $core->blog->id) && $rs->count() > 1) {
Exemplo n.º 14
0
 public function gui()
 {
     try {
         $this->guiprocess($this->action);
     } catch (Exception $e) {
         $this->error($e);
     }
     switch ($this->step) {
         case 1:
             echo '<p>' . sprintf(__('This will import your WordPress content as new content in the current blog: %s.'), '<strong>' . html::escapeHTML($this->core->blog->name) . '</strong>') . '</p>' . '<p class="static-msg">' . __('Please note that this process ' . 'will empty your categories, blogroll, entries and comments on the current blog.') . '</p>' . '<p>' . __('Depending on the size of your blog, it could take a few minutes.') . '</p>';
             printf($this->imForm(1, __('General information'), __('Import my blog now')), '<h3>' . __('We first need some information about your old WordPress installation.') . '</h3>' . '<p><label>' . __('Database Host Name:') . ' ' . form::field('db_host', 30, 255, html::escapeHTML($this->vars['db_host'])) . '</label></p>' . '<p><label>' . __('Database Name:', html::escapeHTML($this->vars['db_name'])) . ' ' . form::field('db_name', 30, 255, html::escapeHTML($this->vars['db_name'])) . '</label></p>' . '<p><label>' . __('Database User Name:') . ' ' . form::field('db_user', 30, 255, html::escapeHTML($this->vars['db_user'])) . '</label></p>' . '<p><label>' . __('Database Password:'******' ' . form::password('db_pwd', 30, 255) . '</label></p>' . '<p><label>' . __('Database Tables Prefix:') . ' ' . form::field('db_prefix', 30, 255, html::escapeHTML($this->vars['db_prefix'])) . '</label></p>' . '<h3>' . __('Entries import options') . '</h3>' . '<p>' . __('WordPress and Dotclear\'s handling of categories are quite different. ' . 'You can assign several categories to a single post in WordPress. In the Dotclear world, ' . 'we see it more like "One category, several tags." Therefore Dotclear can only import one ' . 'category per post and will chose the lowest numbered one. If you want to keep a trace of ' . 'every category, you can import them as tags, with an optional prefix.') . '</p>' . '<p>' . __('On the other hand, in WordPress, a post can not be uncategorized, and a default ' . 'installation has a first category labelised <i>"Uncategorized"</i>. If you did not change that ' . 'category, you can just ignore it while importing your blog, as Dotclear allows you to ' . 'actually keep your posts uncategorized.') . '</p>' . '<p><label class="classic">' . form::checkbox('ignore_first_cat', 1, $this->vars['ignore_first_cat']) . ' ' . __('Ignore the first category:') . '</label></p>' . '<p><label class="classic">' . form::checkbox('cat_import', 1, $this->vars['cat_import']) . ' ' . __('Import lowest numbered category on posts:') . '</label></p>' . '<p><label class="classic">' . form::checkbox('cat_as_tags', 1, $this->vars['cat_as_tags']) . ' ' . __('Import all categories as tags:') . '</label></p>' . '<p><label>' . __('Prefix such tags with:') . ' ' . form::field('cat_tags_prefix', 10, 20, html::escapeHTML($this->vars['cat_tags_prefix'])) . '</label></p>' . '<p><label>' . __('Number of entries to import at once:') . ' ' . form::field('post_limit', 3, 3, html::escapeHTML($this->vars['post_limit'])) . '</label></p>' . '<h3>' . __('Content filters') . '</h3>' . '<p>' . __('You may want to process your post and/or comment content with the following filters.') . '</p>' . '<p><label>' . __('Post content formatter:') . ' ' . form::combo('post_formater', $this->formaters, $this->vars['post_formater']) . '</label></p>' . '<p><label>' . __('Comment content formatter:') . ' ' . form::combo('comment_formater', $this->formaters, $this->vars['comment_formater']) . '</label></p>');
             break;
         case 2:
             printf($this->imForm(2, __('Importing users')), $this->autoSubmit());
             break;
         case 3:
             printf($this->imForm(3, __('Importing categories')), $this->autoSubmit());
             break;
         case 4:
             printf($this->imForm(4, __('Importing blogroll')), $this->autoSubmit());
             break;
         case 5:
             $t = sprintf(__('Importing entries from %d to %d / %d'), $this->post_offset, min(array($this->post_offset + $this->post_limit, $this->post_count)), $this->post_count);
             printf($this->imForm(5, $t), form::hidden(array('offset'), $this->post_offset) . $this->autoSubmit());
             break;
         case 6:
             echo '<p class="message">' . __('Every newly imported user has received a random password ' . 'and will need to ask for a new one by following the "I forgot my password" link on the login page ' . '(Their registered email address has to be valid.)') . '</p>' . $this->congratMessage();
             break;
     }
 }
Exemplo n.º 15
0
    if ($blowup_user['top_image'] == 'custom' && $blowup_user['uploaded']) {
        $preview_image = http::concatURL($core->blog->url, blowupConfig::imagesURL() . '/page-t.png');
    } else {
        $preview_image = 'index.php?pf=blowupConfig/alpha-img/page-t/' . $blowup_user['top_image'] . '.png';
    }
    echo '<fieldset><legend>' . __('Top image') . '</legend>' . '<p class="field"><label>' . __('Top image') . form::combo('top_image', $top_images, $blowup_user['top_image'] ? $blowup_user['top_image'] : 'default') . '</label></p>' . '<p>' . __('Choose "Custom..." to upload your own image.') . '</p>' . '<p id="uploader"><label>' . __('Add your image:') . ' (' . sprintf(__('JPEG or PNG file, 800 pixels wide, maximum size %s'), files::size(DC_MAX_UPLOAD_SIZE)) . ')' . '<input type="file" name="upfile" size="35" />' . '</label></p>' . '<h3>' . __('Preview') . '</h3>' . '<div class="grid" style="width:800px;border:1px solid #ccc;">' . '<img style="display:block;" src="' . $preview_image . '" alt="" id="image-preview" />' . '</div>' . '</fieldset>';
}
echo '<fieldset><legend>' . __('Sidebar') . '</legend>' . '<p class="field"><label>' . __('Sidebar position:') . ' ' . form::combo('sidebar_position', array(__('right') => 'right', __('left') => 'left'), $blowup_user['sidebar_position']) . '</label></p>' . '<p class="field"><label>' . __('Sidebar text font:') . ' ' . form::combo('sidebar_text_f', blowupConfig::fontsList(), $blowup_user['sidebar_text_f']) . '</label></p>' . '<p class="field"><label>' . __('Sidebar text font size:') . ' ' . form::field('sidebar_text_s', 7, 7, $blowup_user['sidebar_text_s']) . '</label></p>' . '<p class="field"><label>' . __('Sidebar text color:') . ' ' . form::field('sidebar_text_c', 7, 7, $blowup_user['sidebar_text_c'], 'colorpicker') . '</label></p>' . '<p class="field"><label>' . __('Sidebar titles font:') . ' ' . form::combo('sidebar_title_f', blowupConfig::fontsList(), $blowup_user['sidebar_title_f']) . '</label></p>' . '<p class="field"><label>' . __('Sidebar titles font size:') . ' ' . form::field('sidebar_title_s', 7, 7, $blowup_user['sidebar_title_s']) . '</label></p>' . '<p class="field"><label>' . __('Sidebar titles color:') . ' ' . form::field('sidebar_title_c', 7, 7, $blowup_user['sidebar_title_c'], 'colorpicker') . '</label></p>' . '<p class="field"><label>' . __('Sidebar 2nd level titles font:') . ' ' . form::combo('sidebar_title2_f', blowupConfig::fontsList(), $blowup_user['sidebar_title2_f']) . '</label></p>' . '<p class="field"><label>' . __('Sidebar 2nd level titles font size:') . ' ' . form::field('sidebar_title2_s', 7, 7, $blowup_user['sidebar_title2_s']) . '</label></p>' . '<p class="field"><label>' . __('Sidebar 2nd level titles color:') . ' ' . form::field('sidebar_title2_c', 7, 7, $blowup_user['sidebar_title2_c'], 'colorpicker') . '</label></p>' . '<p class="field"><label>' . __('Sidebar lines color:') . ' ' . form::field('sidebar_line_c', 7, 7, $blowup_user['sidebar_line_c'], 'colorpicker') . '</label></p>' . '<p class="field"><label>' . __('Sidebar links color:') . ' ' . form::field('sidebar_link_c', 7, 7, $blowup_user['sidebar_link_c'], 'colorpicker') . '</label></p>' . '<p class="field"><label>' . __('Sidebar visited links color:') . ' ' . form::field('sidebar_link_v_c', 7, 7, $blowup_user['sidebar_link_v_c'], 'colorpicker') . '</label></p>' . '<p class="field"><label>' . __('Sidebar focus links color:') . ' ' . form::field('sidebar_link_f_c', 7, 7, $blowup_user['sidebar_link_f_c'], 'colorpicker') . '</label></p>' . '</fieldset>' . '<fieldset><legend>' . __('Entries') . '</legend>' . '<p class="field"><label>' . __('Date title font:') . ' ' . form::combo('date_title_f', blowupConfig::fontsList(), $blowup_user['date_title_f']) . '</label></p>' . '<p class="field"><label>' . __('Date title font size:') . ' ' . form::field('date_title_s', 7, 7, $blowup_user['date_title_s']) . '</label></p>' . '<p class="field"><label>' . __('Date title color:') . ' ' . form::field('date_title_c', 7, 7, $blowup_user['date_title_c'], 'colorpicker') . '</label></p>' . '<p class="field"><label>' . __('Entry title font:') . ' ' . form::combo('post_title_f', blowupConfig::fontsList(), $blowup_user['post_title_f']) . '</label></p>' . '<p class="field"><label>' . __('Entry title font size:') . ' ' . form::field('post_title_s', 7, 7, $blowup_user['post_title_s']) . '</label></p>' . '<p class="field"><label>' . __('Entry title color:') . ' ' . form::field('post_title_c', 7, 7, $blowup_user['post_title_c'], 'colorpicker') . '</label></p>';
if ($can_write_images) {
    echo '<p class="field"><label>' . __('Comment background color:') . ' ' . form::field('post_comment_bg_c', 7, 7, $blowup_user['post_comment_bg_c'], 'colorpicker') . '</label></p>';
}
echo '<p class="field"><label>' . __('Comment text color:') . ' ' . form::field('post_comment_c', 7, 7, $blowup_user['post_comment_c'], 'colorpicker') . '</label></p>';
if ($can_write_images) {
    echo '<p class="field"><label>' . __('My comment background color:') . ' ' . form::field('post_commentmy_bg_c', 7, 7, $blowup_user['post_commentmy_bg_c'], 'colorpicker') . '</label></p>';
}
echo '<p class="field"><label>' . __('My comment text color:') . ' ' . form::field('post_commentmy_c', 7, 7, $blowup_user['post_commentmy_c'], 'colorpicker') . '</label></p>' . '</fieldset>' . '<fieldset><legend>' . __('Footer') . '</legend>' . '<p class="field"><label>' . __('Footer font:') . ' ' . form::combo('footer_f', blowupConfig::fontsList(), $blowup_user['footer_f']) . '</label></p>' . '<p class="field"><label>' . __('Footer font size:') . ' ' . form::field('footer_s', 7, 7, $blowup_user['footer_s']) . '</label></p>' . '<p class="field"><label>' . __('Footer color:') . ' ' . form::field('footer_c', 7, 7, $blowup_user['footer_c'], 'colorpicker') . '</label></p>' . '<p class="field"><label>' . __('Footer links color:') . ' ' . form::field('footer_l_c', 7, 7, $blowup_user['footer_l_c'], 'colorpicker') . '</label></p>' . '<p class="field"><label>' . __('Footer background color:') . ' ' . form::field('footer_bg_c', 7, 7, $blowup_user['footer_bg_c'], 'colorpicker') . '</label></p>' . '</fieldset>';
// 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 '<h3 id="bu_export">' . __('Configuration import / export') . '</h3><fieldset>' . '<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') . '</p>' . '</fieldset>';
echo '<p class="clear"><input type="submit" value="' . __('save') . '" />' . $core->formNonce() . '</p>' . '</form>';
dcPage::helpBlock('blowupConfig');
?>
Exemplo n.º 16
0
        $dashboardItems .= '';
    }
}
# Dashboard elements
echo '<div id="dashboard-main">';
# Dashboard icons
echo '<div id="icons">';
foreach ($__dashboard_icons as $i) {
    echo '<p><a href="' . $i[1] . '"><img src="' . dc_admin_icon_url($i[2]) . '" alt="" />' . '<br /><span>' . $i[0] . '</span></a></p>';
}
echo '</div>';
if ($core->auth->user_prefs->dashboard->quickentry) {
    if ($core->auth->check('usage,contentadmin', $core->blog->id)) {
        # Getting categories
        $categories_combo = dcAdminCombos::getCategoriesCombo($core->blog->getCategories(array('post_type' => 'post')));
        echo '<div id="quick">' . '<h3>' . __('Quick entry') . sprintf(' &rsaquo; %s', $core->auth->getOption('post_format')) . '</h3>' . '<form id="quick-entry" action="' . $core->adminurl->get('admin.post') . '" method="post" class="fieldset">' . '<h4>' . __('New entry') . '</h4>' . '<p class="col"><label for="post_title" class="required"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Title:') . '</label>' . form::field('post_title', 20, 255, '', 'maximal') . '</p>' . '<p class="area"><label class="required" ' . 'for="post_content"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Content:') . '</label> ' . form::textarea('post_content', 50, 10) . '</p>' . '<p><label for="cat_id" class="classic">' . __('Category:') . '</label> ' . form::combo('cat_id', $categories_combo) . '</p>' . ($core->auth->check('categories', $core->blog->id) ? '<div>' . '<p id="new_cat" class="q-cat">' . __('Add a new category') . '</p>' . '<p class="q-cat"><label for="new_cat_title">' . __('Title:') . '</label> ' . form::field('new_cat_title', 30, 255, '', '') . '</p>' . '<p class="q-cat"><label for="new_cat_parent">' . __('Parent:') . '</label> ' . form::combo('new_cat_parent', $categories_combo, '', '') . '</p>' . '<p class="form-note info clear">' . __('This category will be created when you will save your post.') . '</p>' . '</div>' : '') . '<p><input type="submit" value="' . __('Save') . '" name="save" /> ' . ($core->auth->check('publish', $core->blog->id) ? '<input type="hidden" value="' . __('Save and publish') . '" name="save-publish" />' : '') . $core->formNonce() . form::hidden('post_status', -2) . form::hidden('post_format', $core->auth->getOption('post_format')) . form::hidden('post_excerpt', '') . form::hidden('post_lang', $core->auth->getInfo('user_lang')) . form::hidden('post_notes', '') . '</p>' . '</form>' . '</div>';
    }
}
foreach ($__dashboard_contents as $i) {
    if ($i->count() > 0) {
        $dashboardContents .= '';
        foreach ($i as $v) {
            $dashboardContents .= $v;
        }
        $dashboardContents .= '';
    }
}
if ($dashboardContents != '' || $dashboardItems != '') {
    echo '<div id="dashboard-boxes">' . '<div class="db-items">' . $dashboardItems . $dashboardContents . '</div>' . '</div>';
}
echo '</div>';
Exemplo n.º 17
0
if ($qtype == 'p') {
    $posts_actions_page = new dcPostsActionsPage($core, $core->adminurl->get("admin.search"), array('q' => $q, 'qtype' => $qtype));
    if ($posts_actions_page->process()) {
        return;
    }
} else {
    $comments_actions_page = new dcCommentsActionsPage($core, $core->adminurl->get("admin.search"), array('q' => $q, 'qtype' => $qtype));
    if ($comments_actions_page->process()) {
        return;
    }
}
dcPage::open(__('Search'), $starting_scripts, dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', __('Search') => '')));
echo '<form action="' . $core->adminurl->get("admin.search") . '" method="get" role="search">' . '<div class="fieldset"><h3>' . __('Search options') . '</h3>' . '<p><label for="q">' . __('Query:') . ' </label>' . form::field('q', 30, 255, $q) . '</p>' . '<p><label for="qtype1" class="classic">' . form::radio(array('qtype', 'qtype1'), 'p', $qtype == 'p') . ' ' . __('Search in entries') . '</label> ' . '<label for="qtype2" class="classic">' . form::radio(array('qtype', 'qtype2'), 'c', $qtype == 'c') . ' ' . __('Search in comments') . '</label></p>' . '<p><input type="submit" value="' . __('Search') . '" /></p>' . '</div>' . '</form>';
if ($q && !$core->error->flag()) {
    $redir = html::escapeHTML($_SERVER['REQUEST_URI']);
    # Show posts
    if ($qtype == 'p') {
        if ($counter->f(0) > 0) {
            printf('<h3>' . ($counter->f(0) == 1 ? __('%d entry found') : __('%d entries found')) . '</h3>', $counter->f(0));
        }
        $post_list->display($page, $nb_per_page, '<form action="' . $core->adminurl->get("admin.search") . '" method="post" id="form-entries">' . '%s' . '<div class="two-cols">' . '<p class="col checkboxes-helpers"></p>' . '<p class="col right"><label for="action1" class="classic">' . __('Selected entries action:') . '</label> ' . form::combo(array('action', 'action1'), $posts_actions_page->getCombo()) . '<input type="submit" value="' . __('ok') . '" /></p>' . $core->formNonce() . $posts_actions_page->getHiddenFields() . '</div>' . '</form>');
    } elseif ($qtype == 'c') {
        # Actions combo box
        if ($counter->f(0) > 0) {
            printf('<h3>' . ($counter->f(0) == 1 ? __('%d comment found') : __('%d comments found')) . '</h3>', $counter->f(0));
        }
        $comment_list->display($page, $nb_per_page, '<form action="' . $core->adminurl->get("admin.search") . '" method="post" id="form-comments">' . '%s' . '<div class="two-cols">' . '<p class="col checkboxes-helpers"></p>' . '<p class="col right"><label for="action2" class="classic">' . __('Selected comments action:') . '</label> ' . form::combo(array('action', 'action2'), $comments_actions_page->getCombo()) . '<input type="submit" value="' . __('ok') . '" /></p>' . $core->formNonce() . $comments_actions_page->getHiddenFields() . '</div>' . '</form>');
    }
}
dcPage::helpBlock('core_search');
dcPage::close();
Exemplo n.º 18
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>
Exemplo n.º 19
0
} else {
    $sortby = 'post_dt';
    $order = 'desc';
}
# Get posts
try {
    $posts = $core->blog->getPosts($params);
    $counter = $core->blog->getPosts($params, true);
    $post_list = new adminPostList($core, $posts, $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/_posts_list.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(__('Entries'), $starting_script, dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', __('Entries') => '')));
if (!empty($_GET['upd'])) {
    dcPage::success(__('Selected entries have been successfully updated.'));
} elseif (!empty($_GET['del'])) {
    dcPage::success(__('Selected entries have been successfully deleted.'));
}
if (!$core->error->flag()) {
    echo '<p class="top-add"><a class="button add" href="' . $core->adminurl->get("admin.post") . '">' . __('New entry') . '</a></p>' . '<form action="' . $core->adminurl->get("admin.posts") . '" method="get" id="filters-form">' . '<h3 class="out-of-screen-if-js">' . $form_filter_title . '</h3>' . '<div class="table">' . '<div class="cell">' . '<h4>' . __('Filters') . '</h4>' . '<p><label for="user_id" class="ib">' . __('Author:') . '</label> ' . form::combo('user_id', $users_combo, $user_id) . '</p>' . '<p><label for="cat_id" class="ib">' . __('Category:') . '</label> ' . form::combo('cat_id', $categories_combo, $cat_id) . '</p>' . '<p><label for="status" class="ib">' . __('Status:') . '</label> ' . form::combo('status', $status_combo, $status) . '</p> ' . '<p><label for="format" class="ib">' . __('Format:') . '</label> ' . form::combo('format', $format_combo, $format) . '</p>' . '<p><label for="password" class="ib">' . __('Password:'******'</label> ' . form::combo('password', $password_combo, $password) . '</p>' . '</div>' . '<div class="cell filters-sibling-cell">' . '<p><label for="selected" class="ib">' . __('Selected:') . '</label> ' . form::combo('selected', $selected_combo, $selected) . '</p>' . '<p><label for="attachment" class="ib">' . __('Attachments:') . '</label> ' . form::combo('attachment', $attachment_combo, $attachment) . '</p>' . '<p><label for="month" class="ib">' . __('Month:') . '</label> ' . form::combo('month', $dt_m_combo, $month) . '</p>' . '<p><label for="lang" class="ib">' . __('Lang:') . '</label> ' . form::combo('lang', $lang_combo, $lang) . '</p> ' . '<p><label for="comment" class="ib">' . __('Comments:') . '</label> ' . form::combo('comment', $comment_combo, $comment) . '</p>' . '<p><label for="trackback" class="ib">' . __('Trackbacks:') . '</label> ' . form::combo('trackback', $trackback_combo, $trackback) . '</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) . ' ' . __('entries per page') . '</label></p>' . '</div>' . '</div>' . '<p><input type="submit" value="' . __('Apply filters and display options') . '" />' . '<br class="clear" /></p>' . '</form>';
    # Show posts
    $post_list->display($page, $nb_per_page, '<form action="' . $core->adminurl->get("admin.posts") . '" method="post" id="form-entries">' . '%s' . '<div class="two-cols">' . '<p class="col checkboxes-helpers"></p>' . '<p class="col right"><label for="action" class="classic">' . __('Selected entries action:') . '</label> ' . form::combo('action', $posts_actions_page->getCombo()) . '<input type="submit" value="' . __('ok') . '" /></p>' . form::hidden(array('user_id'), $user_id) . form::hidden(array('cat_id'), $cat_id) . form::hidden(array('status'), $status) . form::hidden(array('password'), $password) . form::hidden(array('selected'), $selected) . form::hidden(array('comment'), $comment) . form::hidden(array('trackback'), $trackback) . form::hidden(array('attachment'), $attachment) . form::hidden(array('month'), $month) . form::hidden(array('lang'), $lang) . form::hidden(array('sortby'), $sortby) . form::hidden(array('order'), $order) . form::hidden(array('page'), $page) . form::hidden(array('nb'), $nb_per_page) . $core->formNonce() . '</div>' . '</form>', $show_filters);
}
dcPage::helpBlock('core_posts');
dcPage::close();
Exemplo n.º 20
0
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <meta http-equiv="Content-Style-Type" content="text/css" />
  <meta http-equiv="Content-Language" content="en" />
  <meta name="ROBOTS" content="NOARCHIVE,NOINDEX,NOFOLLOW" />
  <meta name="GOOGLEBOT" content="NOSNIPPET" />
  <title><?php 
echo __('Dotclear installation wizard');
?>
</title>
	<link rel="stylesheet" href="../style/install.css" type="text/css" media="screen" />
</head>

<body id="dotclear-admin" class="install">
<div id="content">
<?php 
echo '<h1>' . __('Dotclear installation wizard') . '</h1>' . '<div id="main">';
if (!empty($err)) {
    echo '<div class="error" role="alert"><p><strong>' . __('Errors:') . '</strong></p>' . $err . '</div>';
} else {
    echo '<h2>' . __('Welcome') . '</h2>' . '<p>' . __('To complete your Dotclear installation and start writing on your blog, ' . 'we just need to know how to access your database and who you are. ' . 'Just fill this two steps wizard with this information and we will be done.') . '</p>' . '<p class="message"><strong>' . __('Attention:') . '</strong> ' . __('this wizard may not function on every host. If it does not work for you, ' . 'please refer to <a href="http://dotclear.org/documentation/2.0/admin/install">' . 'the documentation</a> to learn how to create the <strong>config.php</strong> ' . 'file manually.') . '</p>';
}
echo '<h2>' . __('System information') . '</h2>' . '<p>' . __('Please provide the following information needed to create your configuration file.') . '</p>' . '<form action="wizard.php" method="post">' . '<p><label class="required" for="DBDRIVER"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Database type:') . '</label> ' . form::combo('DBDRIVER', array(__('MySQL (deprecated)') => 'mysql', __('MySQLi') => 'mysqli', __('PostgreSQL') => 'pgsql', __('SQLite') => 'sqlite'), $DBDRIVER) . '</p>' . '<p><label for="DBHOST">' . __('Database Host Name:') . '</label> ' . form::field('DBHOST', 30, 255, html::escapeHTML($DBHOST)) . '</p>' . '<p><label for="DBNAME">' . __('Database Name:') . '</label> ' . form::field('DBNAME', 30, 255, html::escapeHTML($DBNAME)) . '</p>' . '<p><label for="DBUSER">' . __('Database User Name:') . '</label> ' . form::field('DBUSER', 30, 255, html::escapeHTML($DBUSER)) . '</p>' . '<p><label for="DBPASSWORD">' . __('Database Password:'******'</label> ' . form::password('DBPASSWORD', 30, 255) . '</p>' . '<p><label for="DBPREFIX" class="required"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Database Tables Prefix:') . '</label> ' . form::field('DBPREFIX', 30, 255, html::escapeHTML($DBPREFIX)) . '</p>' . '<p><input type="submit" value="' . __('Continue') . '" /></p>' . '</form>';
?>
</div>
</div>
</body>
</html>
Exemplo n.º 21
0
echo '<p><input type="hidden" name="conf_tab" value="html" /></p>';
echo '<p class="clear">' . form::hidden('ds_order', '') . '<input type="submit" value="' . __('Save') . '" />' . $core->formNonce() . '</p>';
echo '</form>';
echo '</div>';
// Close tab
# CSS tab
echo '<div class="multi-part" id="themes-list' . ($conf_tab == 'css' ? '' : '-css') . '" title="' . __('Presentation') . '">';
echo '<form id="theme_config" action="' . $core->adminurl->get('admin.blog.theme', array('conf' => '1')) . '" method="post" enctype="multipart/form-data">';
echo '<h3>' . __('General settings') . '</h3>';
echo '<h4 class="pretty-title">' . __('Fonts') . '</h4>';
echo '<div class="two-cols">';
echo '<div class="col">';
echo '<h5>' . __('Main text') . '</h5>' . '<p class="field"><label for="body_font">' . __('Main font:') . '</label> ' . form::combo('body_font', $fonts, $ductile_user['body_font']) . (!empty($ductile_user['body_font']) ? ' ' . fontDef($ductile_user['body_font']) : '') . ' <span class="form-note">' . __('Set to Default to use a webfont.') . '</span>' . '</p>' . '<p class="field"><label for="body_webfont_family">' . __('Webfont family:') . '</label> ' . form::field('body_webfont_family', 25, 255, $ductile_user['body_webfont_family']) . '</p>' . '<p class="field"><label for="body_webfont_url">' . __('Webfont URL:') . '</label> ' . form::field('body_webfont_url', 50, 255, $ductile_user['body_webfont_url']) . '</p>' . '<p class="field"><label for="body_webfont_url">' . __('Webfont API:') . '</label> ' . form::combo('body_webfont_api', $webfont_apis, $ductile_user['body_webfont_api']) . '</p>';
echo '</div>';
echo '<div class="col">';
echo '<h5>' . __('Secondary text') . '</h5>' . '<p class="field"><label for="alternate_font">' . __('Secondary font:') . '</label> ' . form::combo('alternate_font', $fonts, $ductile_user['alternate_font']) . (!empty($ductile_user['alternate_font']) ? ' ' . fontDef($ductile_user['alternate_font']) : '') . ' <span class="form-note">' . __('Set to Default to use a webfont.') . '</span>' . '</p>' . '<p class="field"><label for="alternate_webfont_family">' . __('Webfont family:') . '</label> ' . form::field('alternate_webfont_family', 25, 255, $ductile_user['alternate_webfont_family']) . '</p>' . '<p class="field"><label for="alternate_webfont_url">' . __('Webfont URL:') . '</label> ' . form::field('alternate_webfont_url', 50, 255, $ductile_user['alternate_webfont_url']) . '</p>' . '<p class="field"><label for="alternate_webfont_api">' . __('Webfont API:') . '</label> ' . form::combo('alternate_webfont_api', $webfont_apis, $ductile_user['alternate_webfont_api']) . '</p>';
echo '</div>';
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">';
Exemplo n.º 22
0
        echo '<form action="comments_actions.php" method="post">';
    }
    echo '<h3>' . __('Trackbacks') . '</h3>';
    if (!$trackbacks->isEmpty()) {
        showComments($trackbacks, $has_action);
    } else {
        echo '<p>' . __('No trackback') . '</p>';
    }
    echo '<h3>' . __('Comments') . '</h3>';
    if (!$comments->isEmpty()) {
        showComments($comments, $has_action);
    } else {
        echo '<p>' . __('No comment') . '</p>';
    }
    if ($has_action) {
        echo '<div class="two-cols">' . '<p class="col checkboxes-helpers"></p>' . '<p class="col right">' . __('Selected comments action:') . ' ' . form::combo('action', $combo_action) . form::hidden('redir', 'post.php?id=' . $post_id . '&amp;co=1') . $core->formNonce() . '<input type="submit" value="' . __('ok') . '" /></p>' . '</div>' . '</form>';
    }
    echo '</div>';
}
/* Add a comment
-------------------------------------------------------- */
if ($post_id) {
    echo '<div class="multi-part" id="add-comment" title="' . __('Add a comment') . '">' . '<h3>' . __('Add a comment') . '</h3>' . '<form action="comment.php" method="post" id="comment-form">' . '<fieldset class="constrained">' . '<p><label class="required" title="' . __('Required field') . '">' . __('Name:') . form::field('comment_author', 30, 255, html::escapeHTML($core->auth->getInfo('user_cn'))) . '</label></p>' . '<p><label>' . __('Email:') . form::field('comment_email', 30, 255, html::escapeHTML($core->auth->getInfo('user_email'))) . '</label></p>' . '<p><label>' . __('Web site:') . form::field('comment_site', 30, 255, html::escapeHTML($core->auth->getInfo('user_url'))) . '</label></p>' . '<p class="area"><label for="comment_content" class="required" title="' . __('Required field') . '">' . __('Comment:') . '</label> ' . form::textarea('comment_content', 50, 8, html::escapeHTML('')) . '</p>' . '<p>' . form::hidden('post_id', $post_id) . $core->formNonce() . '<input type="submit" name="add" value="' . __('save') . '" /></p>' . '</fieldset>' . '</form>' . '</div>';
}
# Show comments or trackbacks
function showComments(&$rs, $has_action)
{
    echo '<table class="comments-list"><tr>' . '<th colspan="2">' . __('Author') . '</th>' . '<th>' . __('Date') . '</th>' . '<th class="nowrap">' . __('IP address') . '</th>' . '<th>' . __('Status') . '</th>' . '<th>&nbsp;</th>' . '</tr>';
    while ($rs->fetch()) {
        $comment_url = 'comment.php?id=' . $rs->comment_id;
        $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />';
Exemplo n.º 23
0
                    }
                }
                $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>';
Exemplo n.º 24
0
 public function formSettings($pr = '')
 {
     $res = '';
     foreach ($this->settings as $id => $s) {
         $iname = $pr ? $pr . '[' . $id . ']' : $id;
         switch ($s['type']) {
             case 'text':
                 $res .= '<p><label>' . $s['title'] . ' ' . form::field(array($iname), 20, 255, html::escapeHTML($s['value']), 'maximal') . '</label></p>';
                 break;
             case 'textarea':
                 $res .= '<p><label>' . $s['title'] . ' ' . form::textarea(array($iname), 30, 5, html::escapeHTML($s['value']), 'maximal') . '</label></p>';
                 break;
             case 'check':
                 $res .= '<p>' . form::hidden(array($iname), '0') . '<label class="classic">' . form::checkbox(array($iname), '1', $s['value']) . ' ' . $s['title'] . '</label></p>';
                 break;
             case 'combo':
                 $res .= '<p><label>' . $s['title'] . ' ' . form::combo(array($iname), $s['options'], $s['value']) . '</label></p>';
                 break;
         }
     }
     return $res;
 }
Exemplo n.º 25
0
            $core->blog->delComment($comment_id);
            http::redirect($core->getPostAdminURL($rs->post_type, $rs->post_id) . '&co=1#c' . $comment_id, false);
        } catch (Exception $e) {
            $core->error->add($e->getMessage());
        }
    }
    if (!$can_edit) {
        $core->error->add(__("You can't edit this comment."));
    }
}
/* DISPLAY
-------------------------------------------------------- */
dcPage::open(__('Edit comment'), dcPage::jsConfirmClose('comment-form') . dcPage::jsToolBar() . dcPage::jsLoad('js/_comment.js'));
if ($comment_id) {
    if (!empty($_GET['upd'])) {
        echo '<p class="message">' . __('Comment has been successfully updated.') . '</p>';
    }
    $comment_mailto = '';
    if ($comment_email) {
        $comment_mailto = '<a href="mailto:' . html::escapeHTML($comment_email) . '?subject=' . rawurlencode(sprintf(__('Your comment on my blog %s'), $core->blog->name)) . '&body=' . rawurlencode(sprintf(__("Hi!\n\nYou wrote a comment on:\n%s\n\n\n"), $rs->getPostURL())) . '">' . __('Send an e-mail') . '</a>';
    }
    echo '<h2>' . html::escapeHTML($core->blog->name) . ' &rsaquo; ' . __('Edit comment') . '</h2>';
    echo '<p><a class="back" href="' . $core->getPostAdminURL($post_type, $post_id) . '&amp;co=1#c' . $comment_id . '"> ' . sprintf(__('Back to "%s"'), $post_title) . '</a></p>';
    echo '<form action="comment.php" method="post" id="comment-form">' . '<p><label>' . __('IP address:') . '</label> ' . '<a href="comments.php?ip=' . $comment_ip . '">' . $comment_ip . '</a></p>' . '<p><label>' . __('Date:') . '</label> ' . dt::dt2str(__('%Y-%m-%d %H:%M'), $comment_dt) . '</p>' . '<p><label class="required" title="' . __('Required field') . '">' . __('Author:') . form::field('comment_author', 30, 255, html::escapeHTML($comment_author)) . '</label></p>' . '<p><label>' . __('Email:') . form::field('comment_email', 30, 255, html::escapeHTML($comment_email)) . $comment_mailto . '</label></p>' . '<p><label>' . __('Web site:') . form::field('comment_site', 30, 255, html::escapeHTML($comment_site)) . '</label></p>' . '<p><label>' . __('Status:') . form::combo('comment_status', $status_combo, $comment_status, '', '', !$can_publish) . '</label></p>' . $core->callBehavior('adminAfterCommentDesc', $rs) . '<p class="area"><label for="comment_content">' . __('Comment:') . '</label> ' . form::textarea('comment_content', 50, 10, html::escapeHTML($comment_content)) . '</p>' . '<p>' . form::hidden('id', $comment_id) . $core->formNonce() . '<input type="submit" accesskey="s" name="update" value="' . __('save') . '" /> ';
    if ($can_delete) {
        echo '<input type="submit" name="delete" value="' . __('delete') . '" />';
    }
    echo '</p>' . '</form>';
}
dcPage::helpBlock('core_comments');
dcPage::close();
Exemplo n.º 26
0
		user_fullname,
		lower(user_fullname) AS user_fullname_lower
	FROM ' . $core->prefix . 'user, ' . $core->prefix . 'site
	WHERE ' . $core->prefix . 'site.user_id = ' . $core->prefix . 'user.user_id
	ORDER BY lower(user_fullname) ASC;');
    $users = array();
    $users[T_('-- Choose an user --')] = '';
    while ($rs->fetch()) {
        $users["{$rs->user_fullname}"] = urlencode($rs->user_id);
    }
    echo '<form id="addfeed_form">' . '<label class="required" for="user_id">' . T_('User id') . ' : ' . form::combo('user_id', $users, '', 'input', '', '', "onchange=\"javascript:updateSiteCombo()\"") . '</label><br /><br />' . '<label class="required" for="site_id">' . T_('Site id') . ' : ' . form::combo('site_id', array(T_('-- Choose an user id --') => ''), '', 'input') . '</label>
<span class="description">' . T_('Choose the website of the feed') . '</span><br />' . '<label class="required" for="feed_url">' . T_('Full feed URL') . ' : ' . form::field('feed_url', 30, 255, html::escapeHTML(""), 'input') . '</label>
<span class="description">' . T_('ex: http://www.bilboplanet.com/feed/atom/') . '</span><br />' . '<label class="required" for="feed_name">' . T_('Feed name') . ' : ' . form::field('feed_name', 30, 255, html::escapeHTML(""), 'input') . '</label>
<span class="description">' . T_('ex: gnu/Linux posts') . '</span><br />';
    if ($blog_settings->get('planet_moderation')) {
        echo '<label class="required" for="feed_trust">' . T_('Trusted URL') . ' : ' . form::combo('feed_trust', array('true' => '1', 'false' => '0'), 'true', 'input') . '</label><br /><br />';
    }
    echo '<div class="button br3px"><input type="reset" class="reset" name="reset" value="' . T_('Reset') . '"></div>&nbsp;&nbsp;' . '<div class="button br3px"><input type="submit" name="add_feed" class="valide" value="' . T_('Add') . '" /></div>' . '<div class="button br3px close-button"><a class="close" onclick="javascript:closeAdd()">' . T_('Close') . '</a></div>' . '</form>';
    ?>
</fieldset>

<fieldset><legend><?php 
    echo T_('Manage feeds');
    ?>
</legend>
	<div class="message">
		<p><?php 
    echo T_('Manage member feed.');
    ?>
</p>
	</div>
Exemplo n.º 27
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>';
     }
 }
Exemplo n.º 28
0
        if ($core->auth->check('admin', $core->blog->id)) {
            $combo_action[__('change author')] = 'author';
        }
        if ($core->auth->check('delete,contentadmin', $core->blog->id)) {
            $combo_action[__('delete')] = 'delete';
        }
        # --BEHAVIOR-- adminPostsActionsCombo
        $core->callBehavior('adminPostsActionsCombo', array(&$combo_action));
        if ($counter->f(0) > 0) {
            printf('<h3>' . ($counter->f(0) == 1 ? __('%d entry found') : __('%d entries found')) . '</h3>', $counter->f(0));
        }
        $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 entries action:') . form::combo('action', $combo_action) . '<input type="submit" value="' . __('ok') . '" /></p>' . form::hidden('redir', preg_replace('/%/', '%%', $redir)) . $core->formNonce() . '</div>' . '</form>');
    } elseif ($qtype == 'c') {
        # Actions combo box
        $combo_action = array();
        if ($core->auth->check('publish,contentadmin', $core->blog->id)) {
            $combo_action[__('publish')] = 'publish';
            $combo_action[__('unpublish')] = 'unpublish';
            $combo_action[__('mark as pending')] = 'pending';
            $combo_action[__('mark as junk')] = 'junk';
        }
        if ($core->auth->check('delete,contentadmin', $core->blog->id)) {
            $combo_action[__('delete')] = 'delete';
        }
        if ($counter->f(0) > 0) {
            printf('<h3>' . ($counter->f(0) == 1 ? __('%d comment found') : __('%d comments found')) . '</h3>', $counter->f(0));
        }
        $comment_list->display($page, $nb_per_page, '<form action="comments_actions.php" method="post" id="form-comments">' . '%s' . '<div class="two-cols">' . '<p class="col checkboxes-helpers"></p>' . '<p class="col right">' . __('Selected comments action:') . ' ' . form::combo('action', $combo_action) . '<input type="submit" value="' . __('ok') . '" /></p>' . form::hidden('redir', preg_replace('/%/', '%%', $redir)) . $core->formNonce() . '</div>' . '</form>');
    }
}
dcPage::close();
Exemplo n.º 29
0
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) {
            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();
Exemplo n.º 30
0
if (!empty($_GET['upd'])) {
    dcPage::success(__('User has been successfully updated.'));
}
if (!empty($_GET['add'])) {
    dcPage::success(__('User has been successfully created.'));
}
echo '<form action="' . $core->adminurl->get("admin.user") . '" method="post" id="user-form">' . '<div class="two-cols">' . '<div class="col">' . '<h3>' . __('User profile') . '</h3>' . '<p><label for="user_id" class="required"><abbr title="' . __('Required field') . '">*</abbr> ' . __('User ID:') . '</label> ' . form::field('user_id', 20, 255, html::escapeHTML($user_id)) . '</p>' . '<p class="form-note">' . __('At least 2 characters using letters, numbers or symbols.') . '</p>';
if ($user_id == $core->auth->userID()) {
    echo '<p class="warning">' . __('Warning:') . ' ' . __('If you change your username, you will have to log in again.') . '</p>';
}
echo '<div class="pw-table">' . '<p class="pw-cell">' . '<label for="new_pwd" ' . ($user_id != '' ? '' : 'class="required"') . '>' . ($user_id != '' ? '' : '<abbr title="' . __('Required field') . '">*</abbr> ') . ($user_id != '' ? __('New password:'******'Password:'******'</label>' . form::password('new_pwd', 20, 255, '', '', '', false, ' data-indicator="pwindicator" ') . '</p>' . '<div id="pwindicator">' . '    <div class="bar"></div>' . '    <p class="label no-margin"></p>' . '</div>' . '</div>' . '<p class="form-note">' . __('Password must contain at least 6 characters.') . '</p>' . '<p><label for="new_pwd_c" ' . ($user_id != '' ? '' : 'class="required"') . '>' . ($user_id != '' ? '' : '<abbr title="' . __('Required field') . '">*</abbr> ') . __('Confirm password:'******'</label> ' . form::password('new_pwd_c', 20, 255) . '</p>';
if ($core->auth->allowPassChange()) {
    echo '<p><label for="user_change_pwd" class="classic">' . form::checkbox('user_change_pwd', '1', $user_change_pwd) . ' ' . __('Password change required to connect') . '</label></p>';
}
$super_disabled = $user_super && $user_id == $core->auth->userID();
echo '<p><label for="user_super" class="classic">' . form::checkbox('user_super', '1', $user_super, '', '', $super_disabled) . ' ' . __('Super administrator') . '</label></p>' . '<p><label for="user_name">' . __('Last Name:') . '</label> ' . form::field('user_name', 20, 255, html::escapeHTML($user_name)) . '</p>' . '<p><label for="user_firstname">' . __('First Name:') . '</label> ' . form::field('user_firstname', 20, 255, html::escapeHTML($user_firstname)) . '</p>' . '<p><label for="user_displayname">' . __('Display name:') . '</label> ' . form::field('user_displayname', 20, 255, html::escapeHTML($user_displayname)) . '</p>' . '<p><label for="user_email">' . __('Email:') . '</label> ' . form::field('user_email', 20, 255, html::escapeHTML($user_email)) . '</p>' . '<p class="form-note">' . __('Mandatory for password recovering procedure.') . '</p>' . '<p><label for="user_url">' . __('URL:') . '</label> ' . form::field('user_url', 30, 255, html::escapeHTML($user_url)) . '</p>' . '</div>' . '<div class="col">' . '<h3>' . __('Options') . '</h3>' . '<h4>' . __('Interface') . '</h4>' . '<p><label for="user_lang">' . __('Language:') . '</label> ' . form::combo('user_lang', $lang_combo, $user_lang, 'l10n') . '</p>' . '<p><label for="user_tz">' . __('Timezone:') . '</label> ' . form::combo('user_tz', dt::getZones(true, true), $user_tz) . '</p>' . '<h4>' . __('Edition') . '</h4>' . '<p><label for="user_post_format">' . __('Preferred format:') . '</label> ' . form::combo('user_post_format', $formaters_combo, $user_options['post_format']) . '</p>' . '<p><label for="user_post_status">' . __('Default entry status:') . '</label> ' . form::combo('user_post_status', $status_combo, $user_post_status) . '</p>' . '<p><label for="user_edit_size">' . __('Entry edit field height:') . '</label> ' . form::field('user_edit_size', 5, 4, (int) $user_options['edit_size']) . '</p>';
# --BEHAVIOR-- adminUserForm
$core->callBehavior('adminUserForm', isset($rs) ? $rs : null);
echo '</div>' . '</div>';
echo '<p class="clear vertical-separator"><label for="your_pwd" class="required">' . '<abbr title="' . __('Required field') . '">*</abbr> ' . __('Your password:'******'</label>' . form::password('your_pwd', 20, 255) . '</p>' . '<p class="clear"><input type="submit" name="save" accesskey="s" value="' . __('Save') . '" />' . ($user_id != '' ? '' : ' <input type="submit" name="saveplus" value="' . __('Save and create another') . '" />') . ($user_id != '' ? form::hidden('id', $user_id) : '') . $core->formNonce() . '</p>' . '</form>';
if ($user_id) {
    echo '<div class="clear fieldset">' . '<h3>' . __('Permissions') . '</h3>';
    if (!$user_super) {
        echo '<form action="' . $core->adminurl->get("admin.user.actions") . '" method="post">' . '<p><input type="submit" value="' . __('Add new permissions') . '" />' . form::hidden(array('redir'), $core->adminurl->get("admin.user", array('id' => $user_id))) . form::hidden(array('action'), 'blogs') . form::hidden(array('users[]'), $user_id) . $core->formNonce() . '</p>' . '</form>';
        $permissions = $core->getUserPermissions($user_id);
        $perm_types = $core->auth->getPermissionsTypes();
        if (count($permissions) == 0) {
            echo '<p>' . __('No permissions so far.') . '</p>';
        } else {
            foreach ($permissions as $k => $v) {
                if (count($v['p']) > 0) {