当前位置: 首页>>代码示例>>PHP>>正文


PHP form::combo方法代码示例

本文整理汇总了PHP中form::combo方法的典型用法代码示例。如果您正苦于以下问题:PHP form::combo方法的具体用法?PHP form::combo怎么用?PHP form::combo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在form的用法示例。


在下文中一共展示了form::combo方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: open

 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>';
     }
 }
开发者ID:HackerMajor,项目名称:root,代码行数:33,代码来源:lib.dc.page.php

示例2: settingLine

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>';
}
开发者ID:HackerMajor,项目名称:root,代码行数:10,代码来源:index.php

示例3: adminBlogPreferencesForm

 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>';
 }
开发者ID:noelg,项目名称:mobilethemeswitcher,代码行数:10,代码来源:_admin.php

示例4: open

 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();
 }
开发者ID:nikrou,项目名称:dotclear,代码行数:52,代码来源:lib.dc.page.php

示例5: __

        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')) {
开发者ID:HackerMajor,项目名称:root,代码行数:31,代码来源:langs.php

示例6: array

    ?>
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>
开发者ID:BackupTheBerlios,项目名称:kermert-svn,代码行数:31,代码来源:config.php

示例7: __

     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) {
开发者ID:HackerMajor,项目名称:root,代码行数:31,代码来源:blog_pref.php

示例8: Exception

                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:') . form::password('new_pwd', 20, 255, '', '', 30) . '</label></p>' . '<p><label>' . __('Confirm password:') . form::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:') . form::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();
开发者ID:HackerMajor,项目名称:root,代码行数:31,代码来源:preferences.php

示例9: __

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();
开发者ID:HackerMajor,项目名称:root,代码行数:31,代码来源:categories.php

示例10: __

    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');
开发者ID:nikrou,项目名称:dotclear,代码行数:31,代码来源:index.php

示例11: is_writable

# 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>');
开发者ID:BackupTheBerlios,项目名称:wikiplug,代码行数:31,代码来源:index.php

示例12: foreach

    }
}
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();
开发者ID:nikrou,项目名称:dotclear,代码行数:31,代码来源:preferences.php

示例13: while

 $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) {
开发者ID:nikrou,项目名称:dotclear,代码行数:31,代码来源:categories.php

示例14: gui

 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;
     }
 }
开发者ID:HackerMajor,项目名称:root,代码行数:30,代码来源:class.dc.import.wp.php

示例15: __

    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');
?>
开发者ID:HackerMajor,项目名称:root,代码行数:31,代码来源:index.php


注:本文中的form::combo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。