Ejemplo n.º 1
0
?>
<html>
<head>
  <title><?php 
echo $page_title . ' - ' . __('Pages');
?>
</title>
  <script type="text/javascript">
  //<![CDATA[
  <?php 
echo dcPage::jsVar('dotclear.msg.confirm_delete_post', __("Are you sure you want to delete this page?"));
?>
  //]]>
  </script>
  <?php 
echo dcPage::jsDatePicker() . dcPage::jsModal() . dcPage::jsLoad('js/_post.js') . $admin_post_behavior . dcPage::jsConfirmClose('entry-form', 'comment-form') . $core->callBehavior('adminPageHeaders') . dcPage::jsPageTabs($default_tab) . $next_headlink . "\n" . $prev_headlink;
?>
</head>

<body>

<?php 
if ($post_id) {
    switch ($post_status) {
        case 1:
            $img_status = sprintf($img_status_pattern, __('Published'), 'check-on.png');
            break;
        case 0:
            $img_status = sprintf($img_status_pattern, __('Unpublished'), 'check-off.png');
            break;
        case -1:
Ejemplo n.º 2
0
        $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;
Ejemplo n.º 3
0
if ($post_editor) {
    $p_edit = $c_edit = '';
    if (!empty($post_editor[$post_format])) {
        $p_edit = $post_editor[$post_format];
    }
    if (!empty($post_editor['xhtml'])) {
        $c_edit = $post_editor['xhtml'];
    }
    if ($p_edit == $c_edit) {
        $admin_post_behavior .= $core->callBehavior('adminPostEditor', $p_edit, 'post', array('#post_excerpt', '#post_content', '#comment_content'), $post_format);
    } else {
        $admin_post_behavior .= $core->callBehavior('adminPostEditor', $p_edit, 'post', array('#post_excerpt', '#post_content'), $post_format);
        $admin_post_behavior .= $core->callBehavior('adminPostEditor', $c_edit, 'comment', array('#comment_content'), 'xhtml');
    }
}
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.'));
}