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


PHP dcPage::jsToolBar方法代码示例

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


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

示例1: catch

    }
    if (!empty($_POST['delete']) && $can_delete) {
        try {
            $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>';
开发者ID:HackerMajor,项目名称:root,代码行数:31,代码来源:comment.php

示例2: catch

            $core->callBehavior('adminAfterCategoryUpdate', $cur, $cat_id);
            http::redirect('category.php?id=' . $_POST['id'] . '&upd=1');
        } else {
            # --BEHAVIOR-- adminBeforeCategoryCreate
            $core->callBehavior('adminBeforeCategoryCreate', $cur);
            $id = $core->blog->addCategory($cur, (int) $_POST['new_cat_parent']);
            # --BEHAVIOR-- adminAfterCategoryCreate
            $core->callBehavior('adminAfterCategoryCreate', $cur, $id);
            http::redirect('categories.php?add=1');
        }
    } catch (Exception $e) {
        $core->error->add($e->getMessage());
    }
}
$title = $cat_id ? html::escapeHTML($cat_title) : __('New category');
dcPage::open($title, dcPage::jsConfirmClose('category-form') . dcPage::jsToolBar() . dcPage::jsLoad('js/_category.js'));
if (!empty($_GET['upd'])) {
    echo '<p class="message">' . __('Category has been successfully updated.') . '</p>';
}
echo '<h2>' . html::escapeHTML($core->blog->name) . ' &rsaquo; <a href="categories.php">' . __('Categories') . '</a> &rsaquo; ';
if ($cat_id) {
    while ($parents->fetch()) {
        echo '<a href="category.php?id=' . $parents->cat_id . '">' . html::escapeHTML($parents->cat_title) . '</a>';
        echo " &rsaquo; ";
    }
}
echo $title . '</h2>';
echo '<form action="category.php" method="post" id="category-form">' . '<fieldset><legend>' . __('Category information') . '</legend>' . '<p><label class="required" title="' . __('Required field') . '">' . __('Title:') . ' ' . form::field('cat_title', 40, 255, html::escapeHTML($cat_title), '', 2) . '</label></p>';
if (!$cat_id) {
    $rs = $core->blog->getCategories(array('post_type' => 'post'));
    echo '<p><label>' . __('Parent:') . ' ' . '<select id="new_cat_parent" name="new_cat_parent" tabindex="3">' . '<option value="0">' . __('Top level') . '</option>';
开发者ID:HackerMajor,项目名称:root,代码行数:31,代码来源:category.php

示例3: catch

        $core->blog->delPost($post_id);
        http::redirect('posts.php');
    } catch (Exception $e) {
        $core->error->add($e->getMessage());
    }
}
/* DISPLAY
-------------------------------------------------------- */
$default_tab = 'edit-entry';
if (!$can_edit_post) {
    $default_tab = '';
}
if (!empty($_GET['co'])) {
    $default_tab = 'comments';
}
dcPage::open($page_title, dcPage::jsDatePicker() . dcPage::jsToolBar() . dcPage::jsModal() . dcPage::jsLoad('js/_post.js') . dcPage::jsConfirmClose('entry-form', 'comment-form') . $core->callBehavior('adminPostHeaders') . dcPage::jsPageTabs($default_tab) . $next_headlink . "\n" . $prev_headlink);
if (!empty($_GET['upd'])) {
    echo '<p class="message">' . __('Entry has been successfully updated.') . '</p>';
} elseif (!empty($_GET['crea'])) {
    echo '<p class="message">' . __('Entry has been successfully created.') . '</p>';
} elseif (!empty($_GET['attached'])) {
    echo '<p class="message">' . __('File has been successfully attached.') . '</p>';
} elseif (!empty($_GET['rmattach'])) {
    echo '<p class="message">' . __('Attachment has been successfully removed.') . '</p>';
}
if (!empty($_GET['creaco'])) {
    echo '<p class="message">' . __('Comment has been successfully created.') . '</p>';
}
# XHTML conversion
if (!empty($_GET['xconv'])) {
    $post_excerpt = $post_excerpt_xhtml;
开发者ID:HackerMajor,项目名称:root,代码行数:31,代码来源:post.php

示例4: catch

                $latest_news .= '<dt>' . $dt . '</dt>' . '<dd>' . dt::dt2str('%d %B %Y', $item->pubdate, 'Europe/Paris') . '</dd>';
            }
            $i++;
            if ($i > 7) {
                break;
            }
        }
        $latest_news .= '</dl>';
        $__dashboard_items[1][] = $latest_news;
    }
} catch (Exception $e) {
}
$core->callBehavior('adminDashboardItems', $core, $__dashboard_items);
/* DISPLAY
-------------------------------------------------------- */
dcPage::open(__('Dashboard'), dcPage::jsToolBar() . dcPage::jsLoad('js/_index.js') . $core->callBehavior('adminDashboardHeaders'));
echo '<h2>' . html::escapeHTML($core->blog->name) . ' &rsaquo; ' . __('Dashboard');
if ($core->auth->getInfo('user_default_blog') != $core->blog->id && $core->auth->blog_count > 1) {
    echo ' - <a href="index.php?default_blog=1" class="button">' . __('Make this blog my default blog') . '</a>';
}
echo '</h2>';
if ($core->blog->status == 0) {
    echo '<p class="static-msg">' . __('This blog is offline') . '</p>';
} elseif ($core->blog->status == -1) {
    echo '<p class="static-msg">' . __('This blog is removed') . '</p>';
}
if (!DC_ADMIN_URL) {
    echo '<p class="static-msg">' . __('DC_ADMIN_URL is not defined, you should edit your configuration file.') . '</p>';
}
# Plugins install messages
if (!empty($plugins_install['success'])) {
开发者ID:HackerMajor,项目名称:root,代码行数:31,代码来源:index.php


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