本文整理汇总了PHP中dcPage::success方法的典型用法代码示例。如果您正苦于以下问题:PHP dcPage::success方法的具体用法?PHP dcPage::success怎么用?PHP dcPage::success使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dcPage
的用法示例。
在下文中一共展示了dcPage::success方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: gui
public function gui()
{
if ($this->status) {
dcPage::success(__('Content successfully imported.'));
}
echo '<form action="' . $this->getURL(true) . '" method="post">' . '<p>' . sprintf(__('Add a feed content to the current blog: <strong>%s</strong>.'), html::escapeHTML($this->core->blog->name)) . '</p>' . '<p><label for="feed_url">' . __('Feed URL:') . '</label>' . form::field('feed_url', 50, 300, html::escapeHTML($this->feed_url)) . '</p>' . '<p>' . $this->core->formNonce() . form::hidden(array('do'), 1) . '<input type="submit" value="' . __('Import') . '" /></p>' . '</form>';
}
示例2: catch
//$link_auto = $_POST['link_auto'];
try {
$menu->updateLink($id, $link_title, $link_href, $link_level, $link_auto, $link_desc, $link_lang, $link_class);
http::redirect($p_url . '&edit=1&id=' . $id . '&upd=1');
} catch (Exception $e) {
$core->error->add($e->getMessage());
}
}
?>
<html>
<head>
<title><?php
echo $page_title;
?>
</title>
</head>
<body>
<?php
echo dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', $page_title => $p_url, __('Changing the item') => ''));
if (isset($rs)) {
if (!empty($_GET['upd'])) {
dcPage::success(__('Items has been successfully updated'));
}
echo '<p><a class="back" href="' . $p_url . '">' . __('Return to menu') . '</a></p>';
echo '<form action="plugin.php" method="post">' . '<div class="fieldset two-cols"><h4>' . __('Changing the item') . '</h4>' . '<p class="field"><label class="classic required" for="link_title"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Label of item menu:') . ' </label>' . form::field('link_title', 50, 255, html::escapeHTML($link_title)) . '</p>' . '<p class="field"><label class="classic required" for="link_href"><abbr title="' . __('Required field') . '">*</abbr> ' . __('URL of item menu:') . ' </label>' . form::field('link_href', 50, 255, html::escapeHTML($link_href)) . '</p>' . '<p class="field"><label class="classic" for="link_desc">' . __('Description:') . ' </label>' . form::field('link_desc', 50, 255, html::escapeHTML($link_desc)) . '</p>' . '<p class="field"><label class="classic" for="link_level">' . __('Level:') . ' </label>' . form::field('link_level', 5, 255, html::escapeHTML($link_level)) . '</p>' . '<p class="info">' . __('Note: 0 = hide menu item; 1 = level of item 1; 2 = item level 2; etc.') . '</p>' . '<p class="field"><label class="classic" for="link_lang">' . __('Language:') . ' </label>' . form::field('link_lang', 5, 5, html::escapeHTML($link_lang)) . '</p>' . '<p class="field"><label class="classic" for="link_class">' . __('Class:') . ' </label>' . form::field('link_class', 50, 32, html::escapeHTML($link_class)) . '</p>' . '</div>' . '<p>' . form::hidden('p', 'menu') . form::hidden('edit', 1) . form::hidden('id', $id) . $core->formNonce() . '<input type="submit" name="edit_link" class="submit" value="' . __('Save') . '"/></p>' . '</form>';
}
dcPage::helpBlock('menu');
?>
</body>
</html>
示例3: elseif
} elseif ($e->getCode() == dcUpdate::ERR_FILES_UNWRITALBE) {
$msg = __('The following files of your Dotclear installation cannot be written. ' . 'Please fix this or try to <a href="http://dotclear.org/download">update manually</a>.');
}
if (isset($e->bad_files)) {
$msg .= '<ul><li><strong>' . implode('</strong></li><li><strong>', $e->bad_files) . '</strong></li></ul>';
}
$core->error->add($msg);
$core->callBehavior('adminDCUpdateException', $e);
}
}
/* DISPLAY Main page
-------------------------------------------------------- */
dcPage::open(__('Dotclear update'), !$step ? dcPage::jsPageTabs($default_tab) . dcPage::jsLoad('js/_update.js') : '', dcPage::breadcrumb(array(__('System') => '', __('Dotclear update') => '')));
if (!$core->error->flag()) {
if (!empty($_GET['nocache'])) {
dcPage::success(__('Manual checking of update done successfully.'));
}
}
if (!$step) {
echo '<div class="multi-part" id="update" title="' . __('Dotclear update') . '">';
if (empty($new_v)) {
echo '<p><strong>' . __('No newer Dotclear version available.') . '</strong></p>' . '<form action="' . $p_url . '" method="get">' . '<p><input type="hidden" name="nocache" value="1" />' . '<input type="submit" value="' . __('Force checking update Dotclear') . '" /></p>' . '</form>';
} else {
echo '<p class="static-msg">' . sprintf(__('Dotclear %s is available.'), $new_v) . ($version_info ? ' <a href="' . $version_info . '" class="outgoing" title="' . __('Information about this version') . '">(' . __('Information about this version') . ') <img src="images/outgoing.png" alt=""/></a>' : '') . '</p>' . '<p>' . __('To upgrade your Dotclear installation simply click on the following button. ' . 'A backup file of your current installation will be created in your root directory.') . '</p>' . '<form action="' . $p_url . '" method="get">' . '<p><input type="hidden" name="step" value="check" />' . '<input type="submit" value="' . __('Update Dotclear') . '" /></p>' . '</form>';
}
echo '</div>';
if (!empty($archives)) {
echo '<div class="multi-part" id="files" title="' . __('Manage backup files') . '">';
echo '<h3>' . __('Update backup files') . '</h3>' . '<p>' . __('The following files are backups of previously updates. ' . 'You can revert your previous installation or delete theses files.') . '</p>';
echo '<form action="' . $p_url . '" method="post">';
foreach ($archives as $v) {
示例4: catch
} catch (Exception $e) {
$core->error->add($e->getMessage());
}
}
$title = $cat_id ? html::escapeHTML($cat_title) : __('New category');
$elements = array(html::escapeHTML($core->blog->name) => '', __('Categories') => $core->adminurl->get("admin.categories"));
if ($cat_id) {
while ($parents->fetch()) {
$elements[html::escapeHTML($parents->cat_title)] = $core->adminurl->get("admin.category", array('id' => $parents->cat_id));
}
}
$elements[$title] = '';
$category_editor = $core->auth->getOption('editor');
dcPage::open($title, dcPage::jsConfirmClose('category-form') . dcPage::jsLoad('js/_category.js') . $core->callBehavior('adminPostEditor', $category_editor['xhtml'], 'category', array('#cat_desc'), 'xhtml'), dcPage::breadcrumb($elements));
if (!empty($_GET['upd'])) {
dcPage::success(__('Category has been successfully updated.'));
}
echo '<form action="' . $core->adminurl->get("admin.category") . '" method="post" id="category-form">' . '<h3>' . __('Category information') . '</h3>' . '<p><label class="required" for="cat_title"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Name:') . '</label> ' . form::field('cat_title', 40, 255, html::escapeHTML($cat_title)) . '</p>';
if (!$cat_id) {
$rs = $core->blog->getCategories(array('post_type' => 'post'));
echo '<p><label for="new_cat_parent">' . __('Parent:') . ' ' . '<select id="new_cat_parent" name="new_cat_parent" >' . '<option value="0">' . __('(none)') . '</option>';
while ($rs->fetch()) {
echo '<option value="' . $rs->cat_id . '" ' . (!empty($_POST['new_cat_parent']) && $_POST['new_cat_parent'] == $rs->cat_id ? 'selected="selected"' : '') . '>' . str_repeat(' ', $rs->level - 1) . ($rs->level - 1 == 0 ? '' : '• ') . html::escapeHTML($rs->cat_title) . '</option>';
}
echo '</select></label></p>';
unset($rs);
}
echo '<div class="lockable">' . '<p><label for="cat_url">' . __('URL:') . '</label> ' . form::field('cat_url', 40, 255, html::escapeHTML($cat_url)) . '</p>' . '<p class="form-note warn" id="note-cat-url">' . __('Warning: If you set the URL manually, it may conflict with another category.') . '</p>' . '</div>' . '<p class="area"><label for="cat_desc">' . __('Description:') . '</label> ' . form::textarea('cat_desc', 50, 8, html::escapeHTML($cat_desc)) . '</p>' . '<p><input type="submit" accesskey="s" value="' . __('Save') . '" />' . ($cat_id ? form::hidden('id', $cat_id) : '') . $core->formNonce() . '</p>' . '</form>';
if ($cat_id) {
echo '<h3 class="border-top">' . __('Move this category') . '</h3>' . '<div class="two-cols">' . '<div class="col">' . '<form action="' . $core->adminurl->get("admin.category") . '" method="post" class="fieldset">' . '<h4>' . __('Category parent') . '</h4>' . '<p><label for="cat_parent" class="classic">' . __('Parent:') . '</label> ' . form::combo('cat_parent', $allowed_parents, $cat_parent) . '</p>' . '<p><input type="submit" accesskey="s" value="' . __('Save') . '" />' . form::hidden(array('id'), $cat_id) . $core->formNonce() . '</p>' . '</form>' . '</div>';
if (count($siblings) > 0) {
示例5: __
$spam_count = dcAntispam::countSpam($core);
$published_count = dcAntispam::countPublishedComments($core);
$moderationTTL = $core->blog->settings->antispam->antispam_moderation_ttl;
echo '<form action="' . $p_url . '" method="post" class="fieldset">' . '<h3>' . __('Information') . '</h3>';
echo '<ul class="spaminfo">' . '<li class="spamcount"><a href="' . $core->adminurl->get('admin.comments', array('status' => '-2')) . '">' . __('Junk comments:') . '</a> ' . '<strong>' . $spam_count . '</strong></li>' . '<li class="hamcount"><a href="' . $core->adminurl->get('admin.comments', array('status' => '1')) . '">' . __('Published comments:') . '</a> ' . $published_count . '</li>' . '</ul>';
if ($spam_count > 0) {
echo '<p>' . $core->formNonce() . form::hidden('ts', time()) . '<input name="delete_all" class="delete" type="submit" value="' . __('Delete all spams') . '" /></p>';
}
if ($moderationTTL != null && $moderationTTL >= 0) {
echo '<p>' . sprintf(__('All spam comments older than %s day(s) will be automatically deleted.'), $moderationTTL) . ' ' . sprintf(__('You can modify this duration in the %s'), '<a href="' . $core->adminurl->get('admin.blog.pref') . '#antispam_moderation_ttl"> ' . __('Blog settings') . '</a>') . '.</p>';
}
echo '</form>';
# Filters
echo '<form action="' . $p_url . '" method="post" id="filters-list-form">';
if (!empty($_GET['upd'])) {
dcPage::success(__('Filters configuration has been successfully saved.'));
}
echo '<div class="table-outer">' . '<table class="dragable">' . '<caption class="as_h3">' . __('Available spam filters') . '</caption>' . '<thead><tr>' . '<th>' . __('Order') . '</th>' . '<th>' . __('Active') . '</th>' . '<th>' . __('Auto Del.') . '</th>' . '<th class="nowrap">' . __('Filter name') . '</th>' . '<th colspan="2">' . __('Description') . '</th>' . '</tr></thead>' . '<tbody id="filters-list" >';
$i = 0;
foreach ($filters as $fid => $f) {
$gui_link = ' ';
if ($f->hasGUI()) {
$gui_link = '<a href="' . html::escapeHTML($f->guiURL()) . '">' . '<img src="images/edit-mini.png" alt="' . __('Filter configuration') . '" ' . 'title="' . __('Filter configuration') . '" /></a>';
}
echo '<tr class="line' . ($f->active ? '' : ' offline') . '" id="f_' . $fid . '">' . '<td class="handle">' . form::field(array('f_order[' . $fid . ']'), 2, 5, (string) $i, 'position', '', false, 'title="' . __('position') . '"') . '</td>' . '<td class="nowrap">' . form::checkbox(array('filters_active[]'), $fid, $f->active, '', '', false, 'title="' . __('Active') . '"') . '</td>' . '<td class="nowrap">' . form::checkbox(array('filters_auto_del[]'), $fid, $f->auto_delete, '', '', false, 'title="' . __('Auto Del.') . '"') . '</td>' . '<td class="nowrap" scope="row">' . $f->name . '</td>' . '<td class="maximal">' . $f->description . '</td>' . '<td class="status">' . $gui_link . '</td>' . '</tr>';
$i++;
}
echo '</tbody></table></div>' . '<p>' . form::hidden('filters_order', '') . $core->formNonce() . '<input type="submit" name="filters_upd" value="' . __('Save') . '" /></p>' . '</form>';
# Syndication
if (DC_ADMIN_URL) {
$ham_feed = $core->blog->url . $core->url->getURLFor('hamfeed', $code = dcAntispam::getUserCode($core));
示例6: __
}
dcPage::open($page_title . ' - ' . __('Entries'), dcPage::jsDatePicker() . dcPage::jsModal() . dcPage::jsMetaEditor() . $admin_post_behavior . dcPage::jsLoad('js/_post.js') . dcPage::jsConfirmClose('entry-form', 'comment-form') . $core->callBehavior('adminPostHeaders') . dcPage::jsPageTabs($default_tab) . $next_headlink . "\n" . $prev_headlink, dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', __('Entries') => $core->adminurl->get("admin.posts"), $post_id ? $page_title_edit : $page_title => '')), array('x-frame-allow' => $core->blog->url));
if (!empty($_GET['upd'])) {
dcPage::success(__('Entry has been successfully updated.'));
} elseif (!empty($_GET['crea'])) {
dcPage::success(__('Entry has been successfully created.'));
} elseif (!empty($_GET['attached'])) {
dcPage::success(__('File has been successfully attached.'));
} elseif (!empty($_GET['rmattach'])) {
dcPage::success(__('Attachment has been successfully removed.'));
}
if (!empty($_GET['creaco'])) {
dcPage::success(__('Comment has been successfully created.'));
}
if (!empty($_GET['tbsent'])) {
dcPage::success(__('All pings sent.'));
}
# XHTML conversion
if (!empty($_GET['xconv'])) {
$post_excerpt = $post_excerpt_xhtml;
$post_content = $post_content_xhtml;
$post_format = 'xhtml';
dcPage::message(__('Don\'t forget to validate your XHTML conversion by saving your post.'));
}
if ($post_id && $post->post_status == 1) {
echo '<p><a class="onblog_link outgoing" href="' . $post->getURL() . '" title="' . html::escapeHTML($post_title) . '">' . __('Go to this entry on the site') . ' <img src="images/outgoing-blue.png" alt="" /></a></p>';
}
if ($post_id) {
echo '<p class="nav_prevnext">';
if ($prev_link) {
echo $prev_link;
示例7: elseif
}
// POST ACTIONS
if (!empty($_POST)) {
try {
$core->blog->settings->addNamespace('themes');
# About
if (!empty($_POST['qrazytimes2_about'])) {
$my_about = $_POST['qrazytimes2_about'];
} elseif (empty($_POST['qrazytimes2_about'])) {
$my_about = $default_about;
}
$core->blog->settings->themes->put('qrazytimes2_about', $my_about, 'boolean', 'Display About', true);
if (isset($_POST['about'])) {
@($fp = fopen($html_fileabout, 'wb'));
fwrite($fp, $_POST['about']);
fclose($fp);
}
// Blog refresh
$core->blog->triggerBlog();
// Template cache reset
$core->emptyTemplatesCache();
dcPage::success(__('Theme configuration has been successfully updated.'), true, true);
} catch (Exception $e) {
$core->error->add($e->getMessage());
}
}
$html_contentabout = is_file($html_fileabout) ? file_get_contents($html_fileabout) : '';
// DISPLAY
# About
echo '<div class="fieldset"><h4>' . __('About') . '</h4>' . '<p>' . form::checkbox('qrazytimes2_about', 1, $my_about) . '<label class="classic" for="qrazytimes2_about">' . __('Display About') . '</label>' . '</p>';
echo '<p class="area"><label for="about">' . __('Code:') . ' ' . form::textarea('about', 60, 10, html::escapeHTML($html_contentabout)) . '</label></p>' . '</div>';
示例8: array
} else {
$core->adminurl->redirect("admin.user", array('id' => $new_id));
}
}
} catch (Exception $e) {
$core->error->add($e->getMessage());
}
}
/* DISPLAY
-------------------------------------------------------- */
dcPage::open($page_title, dcPage::jsConfirmClose('user-form') . dcPage::jsLoad('js/jquery/jquery.pwstrength.js') . '<script type="text/javascript">' . "\n" . "//<![CDATA[\n" . "\$(function() {\n" . "\t\$('#new_pwd').pwstrength({texts: ['" . sprintf(__('Password strength: %s'), __('very weak')) . "', '" . sprintf(__('Password strength: %s'), __('weak')) . "', '" . sprintf(__('Password strength: %s'), __('mediocre')) . "', '" . sprintf(__('Password strength: %s'), __('strong')) . "', '" . sprintf(__('Password strength: %s'), __('very strong')) . "']});\n" . "});\n" . "\n//]]>\n" . "</script>\n" . $core->callBehavior('adminUserHeaders'), dcPage::breadcrumb(array(__('System') => '', __('Users') => $core->adminurl->get("admin.users"), $page_title => '')));
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>';
示例9: __
$core->error->add($e->getMessage());
}
}
if (!$can_edit) {
$core->error->add(__("You can't edit this comment."));
}
}
/* DISPLAY
-------------------------------------------------------- */
if ($comment_id) {
$breadcrumb = dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', html::escapeHTML($post_title) => $core->getPostAdminURL($post_type, $post_id) . '&co=1#c' . $comment_id, __('Edit comment') => ''));
} else {
$breadcrumb = dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', html::escapeHTML($post_title) => $core->getPostAdminURL($post_type, $post_id), __('Edit comment') => ''));
}
dcPage::open(__('Edit comment'), dcPage::jsConfirmClose('comment-form') . dcPage::jsLoad('js/_comment.js') . $core->callBehavior('adminPostEditor', $comment_editor['xhtml'], 'comment', array('#comment_content'), 'xhtml') . $core->callBehavior('adminCommentHeaders'), $breadcrumb);
if ($comment_id) {
if (!empty($_GET['upd'])) {
dcPage::success(__('Comment has been successfully updated.'));
}
$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 '<form action="' . $core->adminurl->get("admin.comment") . '" method="post" id="comment-form">' . '<div class="fieldset">' . '<h3>' . __('Information collected') . '</h3>' . '<p>' . __('IP address:') . ' ' . '<a href="' . $core->adminurl->get("admin.comments", array('ip' => $comment_ip)) . '">' . $comment_ip . '</a></p>' . '<p>' . __('Date:') . ' ' . dt::dt2str(__('%Y-%m-%d %H:%M'), $comment_dt) . '</p>' . '</div>' . '<h3>' . __('Comment submitted') . '</h3>' . '<p><label for="comment_author" class="required"><abbr title="' . __('Required field') . '">*</abbr>' . __('Author:') . '</label>' . form::field('comment_author', 30, 255, html::escapeHTML($comment_author)) . '</p>' . '<p><label for="comment_email">' . __('Email:') . '</label>' . form::field('comment_email', 30, 255, html::escapeHTML($comment_email)) . '<span>' . $comment_mailto . '</span>' . '</p>' . '<p><label for="comment_site">' . __('Web site:') . '</label>' . form::field('comment_site', 30, 255, html::escapeHTML($comment_site)) . '</p>' . '<p><label for="comment_status">' . __('Status:') . '</label>' . form::combo('comment_status', $status_combo, $comment_status, '', '', !$can_publish) . '</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" class="delete" name="delete" value="' . __('Delete') . '" />';
}
echo '</p>' . '</form>';
}
dcPage::helpBlock('core_comments');
dcPage::close();
示例10: __
default:
$img_status = '';
}
$edit_entry_title = '“' . html::escapeHTML($post_title) . '”' . ' ' . $img_status;
} else {
$edit_entry_title = $page_title;
}
echo dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', __('Pages') => $p_url, $edit_entry_title => ''));
if (!empty($_GET['upd'])) {
dcPage::success(__('Page has been successfully updated.'));
} elseif (!empty($_GET['crea'])) {
dcPage::success(__('Page has been successfully created.'));
} elseif (!empty($_GET['attached'])) {
dcPage::success(__('File has been successfully attached.'));
} elseif (!empty($_GET['rmattach'])) {
dcPage::success(__('Attachment has been successfully removed.'));
}
# XHTML conversion
if (!empty($_GET['xconv'])) {
$post_excerpt = $post_excerpt_xhtml;
$post_content = $post_content_xhtml;
$post_format = 'xhtml';
dcPage::message(__('Don\'t forget to validate your XHTML conversion by saving your post.'));
}
if ($post_id && $post->post_status == 1) {
echo '<p><a class="onblog_link outgoing" href="' . $post->getURL() . '" title="' . html::escapeHTML($post_title) . '">' . __('Go to this page on the site') . ' <img src="images/outgoing-blue.png" alt="" /></a></p>';
}
echo '';
if ($post_id) {
echo '<p class="nav_prevnext">';
if ($prev_link) {
示例11: catch
} else {
dcPage::addSuccessNotice(__('Language has been successfully installed.'));
}
$core->adminurl->redirect("admin.langs");
} catch (Exception $e) {
$core->error->add($e->getMessage());
}
}
/* DISPLAY Main page
-------------------------------------------------------- */
dcPage::open(__('Languages management'), dcPage::jsLoad('js/_langs.js'), dcPage::breadcrumb(array(__('System') => '', __('Languages management') => '')));
if (!empty($_GET['removed'])) {
dcPage::success(__('Language has been successfully deleted.'));
}
if (!empty($_GET['added'])) {
dcPage::success($_GET['added'] == 2 ? __('Language has been successfully upgraded') : __('Language has been successfully installed.'));
}
echo '<p>' . __('Here you can install, upgrade or remove languages for your Dotclear ' . 'installation.') . '</p>' . '<p>' . sprintf(__('You can change your user language in your <a href="%1$s">preferences</a> or ' . 'change your blog\'s main language in your <a href="%2$s">blog settings</a>.'), $core->adminurl->get("admin.user.preferences"), $core->adminurl->get("admin.blog.pref")) . '</p>';
echo '<h3>' . __('Installed languages') . '</h3>';
$locales_content = scandir(DC_L10N_ROOT);
$tmp = array();
foreach ($locales_content as $v) {
$c = $v == '.' || $v == '..' || $v == 'en' || !is_dir(DC_L10N_ROOT . '/' . $v) || !isset($iso_codes[$v]);
if (!$c) {
$tmp[$v] = DC_L10N_ROOT . '/' . $v;
}
}
$locales_content = $tmp;
if (empty($locales_content)) {
echo '<p><strong>' . __('No additional language is installed.') . '</strong></p>';
} else {
示例12: sprintf
dcPage::success(__('Directory has been successfully created.'));
}
if (!empty($_GET['upok'])) {
dcPage::success(__('Files have been successfully uploaded.'));
}
if (!empty($_GET['rmfok'])) {
dcPage::success(__('File has been successfully removed.'));
}
if (!empty($_GET['rmdok'])) {
dcPage::success(__('Directory has been successfully removed.'));
}
if (!empty($_GET['rebuildok'])) {
dcPage::success(__('Directory has been successfully rebuilt.'));
}
if (!empty($_GET['unzipok'])) {
dcPage::success(__('Zip file has been successfully extracted.'));
}
if (!$dir) {
call_user_func($close_f);
exit;
}
if ($select) {
// Select mode (popup or not)
echo '<div class="' . ($popup ? 'form-note ' : '') . 'info"><p>';
if ($select == 1) {
echo sprintf(__('Select a file by clicking on %s'), '<img src="images/plus.png" alt="' . __('Select this file') . '" />');
} else {
echo sprintf(__('Select files and click on <strong>%s</strong> button'), __('Choose selected medias'));
}
if ($core_media_writable) {
echo ' ' . __('or') . ' ' . sprintf('<a href="#fileupload">%s</a>', __('upload a new file'));
示例13: catch
} catch (Exception $e) {
$core->error->add($e->getMessage());
}
}
if ($standalone) {
$breadcrumb = dcPage::breadcrumb(array(html::escapeHTML($blog_name) => '', __('Blog settings') => ''));
} else {
$breadcrumb = dcPage::breadcrumb(array(__('System') => '', __('Blogs') => $core->adminurl->get("admin.blogs"), __('Blog settings') . ' : ' . html::escapeHTML($blog_name) => ''));
}
dcPage::open(__('Blog settings'), '<script type="text/javascript">' . "\n" . "//<![CDATA[" . "\n" . dcPage::jsVar('dotclear.msg.warning_path_info', __('Warning: except for special configurations, it is generally advised to have a trailing "/" in your blog URL in PATH_INFO mode.')) . "\n" . dcPage::jsVar('dotclear.msg.warning_query_string', __('Warning: except for special configurations, it is generally advised to have a trailing "?" in your blog URL in QUERY_STRING mode.')) . "\n" . "//]]>" . "</script>" . dcPage::jsConfirmClose('blog-form') . $core->callBehavior('adminPostEditor') . dcPage::jsLoad('js/_blog_pref.js') . $core->callBehavior('adminBlogPreferencesHeaders') . dcPage::jsPageTabs(), $breadcrumb);
if ($blog_id) {
if (!empty($_GET['add'])) {
dcPage::success(__('Blog has been successfully created.'));
}
if (!empty($_GET['upd'])) {
dcPage::success(__('Blog has been successfully updated.'));
}
echo '<div class="multi-part" id="params" title="' . __('Parameters') . '">' . '<h3 class="out-of-screen-if-js">' . __('Parameters') . '</h3>' . '<form action="' . $action . '" method="post" id="blog-form">';
echo '<div class="fieldset"><h4>' . __('Blog details') . '</h4>' . $core->formNonce();
if ($core->auth->isSuperAdmin()) {
echo '<p><label for="blog_id" class="required"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Blog ID:') . '</label>' . form::field('blog_id', 30, 32, html::escapeHTML($blog_id)) . '</p>' . '<p class="form-note">' . __('At least 2 characters using letters, numbers or symbols.') . '</p> ' . '<p class="form-note warn">' . __('Please note that changing your blog ID may require changes in your public index.php file.') . '</p>';
} else {
/*
Only super admins can change the blog ID and URL, but we need to pass
their values to the POST request via hidden html input values so as
to allow admins to update other settings.
Otherwise dcCore::getBlogCursor() throws an exception.
*/
echo form::field('blog_id', 30, 32, html::escapeHTML($blog_id), '', '', false, 'hidden="hidden"');
echo form::field('blog_url', 50, 255, html::escapeHTML($blog_url), '', '', false, 'hidden="hidden"');
}
示例14: __
if (!$core->auth->user_prefs->accessibility->nodragdrop && $core->auth->check('categories', $core->blog->id) && $rs->count() > 1) {
$starting_script .= dcPage::jsLoad('js/jquery/jquery-ui.custom.js');
$starting_script .= dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js');
$starting_script .= dcPage::jsLoad('js/jquery/jquery.mjs.nestedSortable.js');
}
$starting_script .= dcPage::jsConfirmClose('form-categories');
$starting_script .= dcPage::jsLoad('js/_categories.js');
dcPage::open(__('Categories'), $starting_script, dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', __('Categories') => '')));
if (!empty($_GET['del'])) {
dcPage::success(__('The category has been successfully removed.'));
}
if (!empty($_GET['reord'])) {
dcPage::success(__('Categories have been successfully reordered.'));
}
if (!empty($_GET['move'])) {
dcPage::success(__('Entries have been successfully moved to the category you choose.'));
}
$categories_combo = dcAdminCombos::getCategoriesCombo($rs);
echo '<p class="top-add"><a class="button add" href="' . $core->adminurl->get("admin.category") . '">' . __('New category') . '</a></p>';
echo '<div class="col">';
if ($rs->isEmpty()) {
echo '<p>' . __('No category so far.') . '</p>';
} else {
echo '<form action="' . $core->adminurl->get("admin.categories") . '" method="post" id="form-categories">' . '<div id="categories">';
$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));
示例15: gui
public function gui()
{
if ($this->status == 'single') {
dcPage::success(__('Single blog successfully imported.'));
return;
}
if ($this->status == 'full') {
dcPage::success(__('Content successfully imported.'));
return;
}
$public_files = array_merge(array('-' => ''), $this->getPublicFiles());
$has_files = (bool) (count($public_files) - 1);
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 '<form action="' . $this->getURL(true) . '" method="post" enctype="multipart/form-data" class="fieldset">' . '<h3>' . __('Single blog') . '</h3>' . '<p>' . sprintf(__('This will import a single blog backup as new content in the current blog: <strong>%s</strong>.'), html::escapeHTML($this->core->blog->name)) . '</p>' . '<p><label for="up_single_file">' . __('Upload a backup file') . ' (' . sprintf(__('maximum size %s'), files::size(DC_MAX_UPLOAD_SIZE)) . ')' . ' </label>' . ' <input type="file" id="up_single_file" name="up_single_file" size="20" />' . '</p>';
if ($has_files) {
echo '<p><label for="public_single_file" class="">' . __('or pick up a local file in your public directory') . ' </label> ' . form::combo('public_single_file', $public_files) . '</p>';
}
echo '<p>' . $this->core->formNonce() . form::hidden(array('do'), 1) . form::hidden(array('MAX_FILE_SIZE'), DC_MAX_UPLOAD_SIZE) . '<input type="submit" value="' . __('Import') . '" /></p>' . '</form>';
if ($this->core->auth->isSuperAdmin()) {
echo '<form action="' . $this->getURL(true) . '" method="post" enctype="multipart/form-data" id="formfull" class="fieldset">' . '<h3>' . __('Multiple blogs') . '</h3>' . '<p class="warning">' . __('This will reset all the content of your database, except users.') . '</p>' . '<p><label for="up_full_file">' . __('Upload a backup file') . ' ' . ' (' . sprintf(__('maximum size %s'), files::size(DC_MAX_UPLOAD_SIZE)) . ')' . ' </label>' . '<input type="file" id="up_full_file" name="up_full_file" size="20" />' . '</p>';
if ($has_files) {
echo '<p><label for="public_full_file">' . __('or pick up a local file in your public directory') . ' </label>' . form::combo('public_full_file', $public_files) . '</p>';
}
echo '<p><label for="your_pwd" class="required"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Your password:') . '</label>' . form::password('your_pwd', 20, 255) . '</p>' . '<p>' . $this->core->formNonce() . form::hidden(array('do'), 1) . form::hidden(array('MAX_FILE_SIZE'), DC_MAX_UPLOAD_SIZE) . '<input type="submit" value="' . __('Import') . '" /></p>' . '</form>';
}
}