Exemplo n.º 1
0
 private function postLine()
 {
     $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />';
     switch ($this->rs->post_status) {
         case 1:
             $img_status = sprintf($img, __('published'), 'check-on.png');
             break;
         case 0:
             $img_status = sprintf($img, __('unpublished'), 'check-off.png');
             break;
         case -1:
             $img_status = sprintf($img, __('scheduled'), 'scheduled.png');
             break;
         case -2:
             $img_status = sprintf($img, __('pending'), 'check-wrn.png');
             break;
     }
     $protected = '';
     if ($this->rs->post_password) {
         $protected = sprintf($img, __('protected'), 'locker.png');
     }
     $selected = '';
     if ($this->rs->post_selected) {
         $selected = sprintf($img, __('selected'), 'selected.png');
     }
     $attach = '';
     $nb_media = $this->rs->countMedia();
     if ($nb_media > 0) {
         $attach_str = $nb_media == 1 ? __('%d attachment') : __('%d attachments');
         $attach = sprintf($img, sprintf($attach_str, $nb_media), 'attach.png');
     }
     $res = '<tr class="line' . ($this->rs->post_status != 1 ? ' offline' : '') . '"' . ' id="p' . $this->rs->post_id . '">';
     $res .= '<td class="nowrap">' . form::checkbox(array('entries[]'), $this->rs->post_id, '', '', '', !$this->rs->isEditable()) . '</td>' . '<td class="maximal"><a href="' . $this->core->getPostAdminURL($this->rs->post_type, $this->rs->post_id) . '">' . html::escapeHTML($this->rs->post_title) . '</a></td>' . '<td class="nowrap">' . dt::dt2str(__('%Y-%m-%d %H:%M'), $this->rs->post_dt) . '</td>' . '<td class="nowrap">' . $this->rs->user_id . '</td>' . '<td class="nowrap">' . $this->rs->nb_comment . '</td>' . '<td class="nowrap">' . $this->rs->nb_trackback . '</td>' . '<td class="nowrap status">' . $img_status . ' ' . $selected . ' ' . $protected . ' ' . $attach . '</td>' . '</tr>';
     return $res;
 }
Exemplo n.º 2
0
 private function postLine($count, $checked)
 {
     $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />';
     $sts_class = '';
     switch ($this->rs->post_status) {
         case 1:
             $img_status = sprintf($img, __('Published'), 'check-on.png');
             $sts_class = 'sts-online';
             break;
         case 0:
             $img_status = sprintf($img, __('Unpublished'), 'check-off.png');
             $sts_class = 'sts-offline';
             break;
         case -1:
             $img_status = sprintf($img, __('Scheduled'), 'scheduled.png');
             $sts_class = 'sts-scheduled';
             break;
         case -2:
             $img_status = sprintf($img, __('Pending'), 'check-wrn.png');
             $sts_class = 'sts-pending';
             break;
     }
     $protected = '';
     if ($this->rs->post_password) {
         $protected = sprintf($img, __('Protected'), 'locker.png');
     }
     $selected = '';
     if ($this->rs->post_selected) {
         $selected = sprintf($img, __('Hidden'), 'hidden.png');
     }
     $attach = '';
     $nb_media = $this->rs->countMedia();
     if ($nb_media > 0) {
         $attach_str = $nb_media == 1 ? __('%d attachment') : __('%d attachments');
         $attach = sprintf($img, sprintf($attach_str, $nb_media), 'attach.png');
     }
     $res = '<tr class="line ' . ($this->rs->post_status != 1 ? 'offline ' : '') . $sts_class . '"' . ' id="p' . $this->rs->post_id . '">';
     $cols = array('position' => '<td class="nowrap handle minimal">' . form::field(array('order[' . $this->rs->post_id . ']'), 2, 3, $count + 1, 'position', '', false, 'title="' . sprintf(__('position of %s'), html::escapeHTML($this->rs->post_title)) . '"') . '</td>', 'check' => '<td class="nowrap">' . form::checkbox(array('entries[]'), $this->rs->post_id, $checked, '', '', !$this->rs->isEditable(), 'title="' . __('Select this page') . '"') . '</td>', 'title' => '<td class="maximal" scope="row"><a href="' . $this->core->getPostAdminURL($this->rs->post_type, $this->rs->post_id) . '">' . html::escapeHTML($this->rs->post_title) . '</a></td>', 'date' => '<td class="nowrap">' . dt::dt2str(__('%Y-%m-%d %H:%M'), $this->rs->post_dt) . '</td>', 'author' => '<td class="nowrap">' . $this->rs->user_id . '</td>', 'comments' => '<td class="nowrap count">' . $this->rs->nb_comment . '</td>', 'trackbacks' => '<td class="nowrap count">' . $this->rs->nb_trackback . '</td>', 'status' => '<td class="nowrap status">' . $img_status . ' ' . $selected . ' ' . $protected . ' ' . $attach . '</td>');
     $cols = new ArrayObject($cols);
     $this->core->callBehavior('adminPagesListValue', $this->core, $this->rs, $cols);
     $res .= implode(iterator_to_array($cols));
     $res .= '</tr>';
     return $res;
 }
Exemplo n.º 3
0
 private function commentLine($checked = false, $spam = false, $filters = array())
 {
     global $core, $author, $status, $sortby, $order, $nb_per_page;
     $author_url = $this->core->adminurl->get('admin.comments', array('n' => $nb_per_page, 'status' => $status, 'sortby' => $sortby, 'order' => $order, 'author' => $this->rs->comment_author));
     $post_url = $this->core->getPostAdminURL($this->rs->post_type, $this->rs->post_id);
     $comment_url = $this->core->adminurl->get('admin.comment', array('id' => $this->rs->comment_id));
     $comment_dt = dt::dt2str($this->core->blog->settings->system->date_format . ' - ' . $this->core->blog->settings->system->time_format, $this->rs->comment_dt);
     $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />';
     $sts_class = '';
     switch ($this->rs->comment_status) {
         case 1:
             $img_status = sprintf($img, __('Published'), 'check-on.png');
             $sts_class = 'sts-online';
             break;
         case 0:
             $img_status = sprintf($img, __('Unpublished'), 'check-off.png');
             $sts_class = 'sts-offline';
             break;
         case -1:
             $img_status = sprintf($img, __('Pending'), 'check-wrn.png');
             $sts_class = 'sts-pending';
             break;
         case -2:
             $img_status = sprintf($img, __('Junk'), 'junk.png');
             $sts_class = 'sts-junk';
             break;
     }
     $post_title = html::escapeHTML($this->rs->post_title);
     if (mb_strlen($post_title) > 70) {
         $post_title = mb_strcut($post_title, 0, 67) . '...';
     }
     $comment_title = sprintf(__('Edit the %1$s from %2$s'), $this->rs->comment_trackback ? __('trackback') : __('comment'), html::escapeHTML($this->rs->comment_author));
     $res = '<tr class="line ' . ($this->rs->comment_status != 1 ? 'offline ' : '') . $sts_class . '"' . ' id="c' . $this->rs->comment_id . '">';
     $cols = array('check' => '<td class="nowrap">' . form::checkbox(array('comments[]'), $this->rs->comment_id, $checked, '', '', 0) . '</td>', 'type' => '<td class="nowrap" abbr="' . __('Type and author') . '" scope="row">' . '<a href="' . $comment_url . '" title="' . $comment_title . '">' . '<img src="images/edit-mini.png" alt="' . __('Edit') . '"/> ' . ($this->rs->comment_trackback ? __('trackback') : __('comment')) . ' ' . '</a></td>', 'author' => '<td class="nowrap maximal"><a href="' . $author_url . '">' . html::escapeHTML($this->rs->comment_author) . '</a></td>', 'date' => '<td class="nowrap count">' . dt::dt2str(__('%Y-%m-%d %H:%M'), $this->rs->comment_dt) . '</td>', 'status' => '<td class="nowrap status txt-center">' . $img_status . '</td>');
     if ($spam) {
         $filter_name = '';
         if ($this->rs->comment_spam_filter) {
             if (isset($filters[$this->rs->comment_spam_filter])) {
                 $filter_name = $filters[$this->rs->comment_spam_filter];
             } else {
                 $filter_name = $this->rs->comment_spam_filter;
             }
         }
         $cols['ip'] = '<td class="nowrap"><a href="' . $core->adminurl->get("admin.comments", array('ip' => $this->rs->comment_ip)) . '">' . $this->rs->comment_ip . '</a></td>';
         $cols['spam_filter'] = '<td class="nowrap">' . $filter_name . '</td>';
     }
     $cols['entry'] = '<td class="nowrap discrete"><a href="' . $post_url . '">' . $post_title . '</a>' . ($this->rs->post_type != 'post' ? ' (' . html::escapeHTML($this->rs->post_type) . ')' : '') . '</td>';
     $cols = new ArrayObject($cols);
     $this->core->callBehavior('adminCommentListValue', $this->core, $this->rs, $cols);
     $res .= implode(iterator_to_array($cols));
     $res .= '</tr>';
     return $res;
 }
Exemplo n.º 4
0
function dcGetImageTitle($file, $pattern)
{
    return $file->media_title;
    $res = array();
    $pattern = preg_split('/\\s*;;\\s*/', $pattern);
    $sep = ', ';
    foreach ($pattern as $v) {
        if ($v == 'Title') {
            $res[] = $file->media_title;
        } elseif ($file->media_meta->{$v}) {
            $res[] = (string) $file->media_meta->{$v};
        } elseif (preg_match('/^Date\\((.+?)\\)$/u', $v, $m)) {
            $res[] = dt::str($m[1], $file->media_dt);
        } elseif (preg_match('/^DateTimeOriginal\\((.+?)\\)$/u', $v, $m) && $file->media_meta->DateTimeOriginal) {
            $res[] = dt::dt2str($m[1], (string) $file->media_meta->DateTimeOriginal);
        } elseif (preg_match('/^separator\\((.*?)\\)$/u', $v, $m)) {
            $sep = $m[1];
        }
    }
    return implode($sep, $res);
}
Exemplo n.º 5
0
/* DISPLAY
-------------------------------------------------------- */
dcPage::open($page_title, dcPage::jsLoad('js/_trackbacks.js'));
# Exit if we cannot view page
if (!$can_view_page) {
    dcPage::close();
    exit;
}
if (!empty($_GET['sent'])) {
    echo '<p class="message">' . __('All pings sent.') . '</p>';
}
echo '<h2>' . html::escapeHTML($core->blog->name) . ' &rsaquo; ' . $page_title . '</h2>';
echo '<p><a href="' . $core->getPostAdminURL($post->post_type, $id) . '">&#171; ' . sprintf(__('Back to "%s"'), html::escapeHTML($post->post_title)) . '</a></p>';
echo '<h3 id="entry-preview-title">' . html::escapeHTML($post->post_title) . '</h3>' . '<div class="frame-shrink" id="entry-preview">' . ($post->post_excerpt_xhtml ? $post->post_excerpt_xhtml . '<hr />' : '') . $post->post_content_xhtml . '</div>';
if (!empty($_GET['auto'])) {
    flush();
    $tb_urls = implode("\n", $TB->discover($post->post_excerpt_xhtml . ' ' . $post->post_content_xhtml));
} else {
    $auto_link = '<strong><a href="trackbacks.php?id=' . $id . '&amp;auto=1">' . __('Auto discover ping URLs') . '</a></strong>';
}
echo '<h3>' . __('Ping blogs') . '</h3>' . '<form action="trackbacks.php" id="trackback-form" method="post">' . '<p><label class="area">' . __('URLs to ping:') . form::textarea('tb_urls', 60, 5, $tb_urls) . '</label></p>' . '<p><label class="area">' . __('Send excerpt:') . form::textarea('tb_excerpt', 60, 3, $tb_excerpt) . '</label></p>' . '<p>' . form::hidden('id', $id) . $core->formNonce() . '<input type="submit" value="' . __('Ping blogs') . '" />&nbsp;&nbsp;' . $auto_link . '</p>' . '</form>';
$pings = $TB->getPostPings($id);
if (!$pings->isEmpty()) {
    echo '<h3>' . __('Previously sent pings') . '</h3>';
    echo '<ul class="nice">';
    while ($pings->fetch()) {
        echo '<li>' . dt::dt2str(__('%Y-%m-%d %H:%M'), $pings->ping_dt) . ' - ' . $pings->ping_url . '</li>';
    }
    echo '</ul>';
}
dcPage::close();
Exemplo n.º 6
0
            throw new Exception();
        }
        $feed_reader = new feedReader();
        $feed_reader->setCacheDir(DC_TPL_CACHE);
        $feed_reader->setTimeout(2);
        $feed_reader->setUserAgent('Dotclear - http://www.dotclear.org/');
        $feed = $feed_reader->parse($__resources['rss_news']);
        if ($feed) {
            $latest_news = '<div class="box medium dc-box"><h3>' . __('Dotclear news') . '</h3><dl id="news">';
            $i = 1;
            foreach ($feed->items as $item) {
                $dt = isset($item->link) ? '<a href="' . $item->link . '" class="outgoing" title="' . $item->title . '">' . $item->title . ' <img src="images/outgoing-blue.png" alt="" /></a>' : $item->title;
                if ($i < 3) {
                    $latest_news .= '<dt>' . $dt . '</dt>' . '<dd><p><strong>' . dt::dt2str(__('%d %B %Y:'), $item->pubdate, 'Europe/Paris') . '</strong> ' . '<em>' . text::cutString(html::clean($item->content), 120) . '...</em></p></dd>';
                } else {
                    $latest_news .= '<dt>' . $dt . '</dt>' . '<dd>' . dt::dt2str(__('%d %B %Y:'), $item->pubdate, 'Europe/Paris') . '</dd>';
                }
                $i++;
                if ($i > 2) {
                    break;
                }
            }
            $latest_news .= '</dl></div>';
            $__dashboard_items[$dashboardItem][] = $latest_news;
            $dashboardItem++;
        }
    } catch (Exception $e) {
    }
}
# Documentation links
if ($core->auth->user_prefs->dashboard->doclinks) {
Exemplo n.º 7
0
function showComments(&$rs, $has_action)
{
    echo '<table class="comments-list"><tr>' . '<th colspan="2">' . __('Author') . '</th>' . '<th>' . __('Date') . '</th>' . '<th class="nowrap">' . __('IP address') . '</th>' . '<th>' . __('Status') . '</th>' . '<th>&nbsp;</th>' . '</tr>';
    while ($rs->fetch()) {
        $comment_url = 'comment.php?id=' . $rs->comment_id;
        $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />';
        switch ($rs->comment_status) {
            case 1:
                $img_status = sprintf($img, __('published'), 'check-on.png');
                break;
            case 0:
                $img_status = sprintf($img, __('unpublished'), 'check-off.png');
                break;
            case -1:
                $img_status = sprintf($img, __('pending'), 'check-wrn.png');
                break;
            case -2:
                $img_status = sprintf($img, __('junk'), 'junk.png');
                break;
        }
        echo '<tr class="line' . ($rs->comment_status != 1 ? ' offline' : '') . '"' . ' id="c' . $rs->comment_id . '">' . '<td class="nowrap">' . ($has_action ? form::checkbox(array('comments[]'), $rs->comment_id, '', '', '', 0) : '') . '</td>' . '<td class="maximal">' . html::escapeHTML($rs->comment_author) . '</td>' . '<td class="nowrap">' . dt::dt2str(__('%Y-%m-%d %H:%M'), $rs->comment_dt) . '</td>' . '<td class="nowrap"><a href="comments.php?ip=' . $rs->comment_ip . '">' . $rs->comment_ip . '</a></td>' . '<td class="nowrap status">' . $img_status . '</td>' . '<td class="nowrap status"><a href="' . $comment_url . '">' . '<img src="images/edit-mini.png" alt="" title="' . __('Edit this comment') . '" /></a></td>' . '</tr>';
    }
    echo '</table>';
}
Exemplo n.º 8
0
	<div class="col">
		<h2>Dates prévisionnelles</h2>

		<?php 
if (empty($aEstimateData['end_date']) || $aEstimateData['start_date'] == $aEstimateData['end_date']) {
    ?>
		<p><?php 
    printf(__('On %s'), dt::dt2str(__('%A, %B %d, %Y'), html::escapeHTML($aEstimateData['start_date'])));
    ?>
</p>

		<?php 
} else {
    ?>
		<p><?php 
    printf(__('From %s to %s'), dt::dt2str(__('%A, %B %d, %Y'), html::escapeHTML($aEstimateData['start_date'])), dt::dt2str(__('%A, %B %d, %Y'), html::escapeHTML($aEstimateData['end_date'])));
    ?>
</p>

		<?php 
}
?>
	</div>
</div>

<?php 
if ($okt->estimate->config->enable_accessories) {
    ?>
<h2>Produits et accessoires</h2>
<?php 
} else {
Exemplo n.º 9
0
<?php 
echo $okt->page->getButtonSet('galleriesGaleryBtSt');
?>

<?php 
if (!empty($iGalleryId)) {
    ?>
<p><?php 
    printf(__('m_galleries_gallery_added_on'), '<em>' . dt::dt2str(__('%A, %B %d, %Y, %H:%M'), $aGalleryData['db']['created_at']) . '</em>');
    ?>

<?php 
    if ($aGalleryData['db']['updated_at'] > $aGalleryData['db']['created_at']) {
        ?>
<span class="note"><?php 
        printf(__('m_galleries_gallery_last_edit'), '<em>' . dt::dt2str(__('%A, %B %d, %Y, %H:%M'), $aGalleryData['db']['updated_at']) . '</em>');
        ?>
</span>
<?php 
    }
    ?>
</p>
<?php 
}
?>

<form action="module.php" method="post" enctype="multipart/form-data">

	<div id="tabered">
		<ul>
			<li><a href="#tab_gallery"><span><?php 
Exemplo n.º 10
0
        if ($rsPosts->active == 3) {
            ?>
				<p><?php 
            printf(__('m_news_list_sheduled_%s'), dt::dt2str(__('%Y-%m-%d %H:%M'), $rsPosts->created_at));
            ?>
			<?php 
        } else {
            ?>
				<p><?php 
            printf($rsPosts->active == 2 ? __('m_news_list_added_%s') : __('m_news_list_published_%s'), dt::dt2str(__('%Y-%m-%d %H:%M'), $rsPosts->created_at));
            ?>
				<?php 
            if ($rsPosts->updated_at > $rsPosts->created_at) {
                ?>
				<span class="note"><?php 
                printf(__('m_news_list_edited_%s'), dt::dt2str(__('%Y-%m-%d %H:%M'), $rsPosts->updated_at));
                ?>
</span>
				<?php 
            }
            ?>
				</p>
			<?php 
        }
        ?>
			</td>

			<td class="<?php 
        echo $rsPosts->odd_even;
        ?>
">
Exemplo n.º 11
0
            $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) . '&amp;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)) . '&amp;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();
Exemplo n.º 12
0
function showComments($rs, $has_action)
{
    global $core;
    echo '<table class="comments-list"><tr>' . '<th colspan="2" class="nowrap first">' . __('Author') . '</th>' . '<th>' . __('Date') . '</th>' . '<th class="nowrap">' . __('IP address') . '</th>' . '<th>' . __('Status') . '</th>' . '<th>' . __('Edit') . '</th>' . '</tr>';
    while ($rs->fetch()) {
        $comment_url = $core->adminurl->get('admin.comment', array('id' => $rs->comment_id));
        $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />';
        switch ($rs->comment_status) {
            case 1:
                $img_status = sprintf($img, __('Published'), 'check-on.png');
                break;
            case 0:
                $img_status = sprintf($img, __('Unpublished'), 'check-off.png');
                break;
            case -1:
                $img_status = sprintf($img, __('Pending'), 'check-wrn.png');
                break;
            case -2:
                $img_status = sprintf($img, __('Junk'), 'junk.png');
                break;
        }
        echo '<tr class="line' . ($rs->comment_status != 1 ? ' offline' : '') . '"' . ' id="c' . $rs->comment_id . '">' . '<td class="nowrap">' . ($has_action ? form::checkbox(array('comments[]'), $rs->comment_id, '', '', '', 0, 'title="' . __('Select this comment') . '"') : '') . '</td>' . '<td class="maximal">' . $rs->comment_author . '</td>' . '<td class="nowrap">' . dt::dt2str(__('%Y-%m-%d %H:%M'), $rs->comment_dt) . '</td>' . '<td class="nowrap"><a href="' . $core->adminurl->get('admin.comment', array('ip' => $rs->comment_ip)) . '">' . $rs->comment_ip . '</a></td>' . '<td class="nowrap status">' . $img_status . '</td>' . '<td class="nowrap status"><a href="' . $comment_url . '">' . '<img src="images/edit-mini.png" alt="" title="' . __('Edit this comment') . '" /> ' . __('Edit') . '</a></td>' . '</tr>';
    }
    echo '</table>';
}
Exemplo n.º 13
0
	<?php 
# fin Okatea : affichage du titre de l'évènement
?>


	<?php 
# début Okatea : affichage de la date de l'évènement
?>
	<p><?php 
echo dt::dt2str(__('%A, %B %d, %Y'), $rsEvent->date);
?>
	<?php 
if (!empty($rsEvent->date_end)) {
    ?>
 au <?php 
    echo dt::dt2str(__('%A, %B %d, %Y'), $rsEvent->date_end);
}
?>
</p>
	<?php 
# fin Okatea : affichage de la date de l'évènement
?>


	<?php 
# début Okatea : si les images sont activées
if ($okt->diary->config->images['enable'] && !empty($rsEvent->images)) {
    ?>
	<p id="diary-images" class="modal-box">

		<?php 
Exemplo n.º 14
0
function blogLine(&$rs)
{
    global $core;
    $blog_id = html::escapeHTML($rs->blog_id);
    $edit_link = '';
    if ($GLOBALS['core']->auth->isSuperAdmin()) {
        $edit_link = '<a href="blog.php?id=' . $blog_id . '" ' . 'title="' . sprintf(__('Edit blog %s'), $blog_id) . '">' . __('edit') . '</a>';
    }
    $img_status = $rs->blog_status == 1 ? 'check-on' : 'check-off';
    $txt_status = $GLOBALS['core']->getBlogStatus($rs->blog_status);
    $img_status = sprintf('<img src="images/%1$s.png" alt="%2$s" title="%2$s" />', $img_status, $txt_status);
    return '<tr class="line">' . '<td class="maximal"><a href="index.php?switchblog=' . $rs->blog_id . '" ' . 'title="' . sprintf(__('Switch to blog %s'), $rs->blog_id) . '">' . html::escapeHTML($rs->blog_name) . '</a></td>' . '<td class="nowrap">' . dt::dt2str(__('%Y-%m-%d %H:%M'), $rs->blog_upddt) . '</td>' . '<td class="nowrap">' . $core->countBlogPosts($rs->blog_id) . '</td>' . '<td class="nowrap">' . $blog_id . '</td>' . '<td>' . $edit_link . '</td>' . '<td class="status">' . $img_status . '</td>' . '</tr>';
}
Exemplo n.º 15
0
 private function commentLine()
 {
     global $author, $status, $sortby, $order, $nb_per_page;
     $author_url = 'comments.php?n=' . $nb_per_page . '&amp;status=' . $status . '&amp;sortby=' . $sortby . '&amp;order=' . $order . '&amp;author=' . rawurlencode($this->rs->comment_author);
     $post_url = $this->core->getPostAdminURL($this->rs->post_type, $this->rs->post_id);
     $comment_url = 'comment.php?id=' . $this->rs->comment_id;
     $comment_dt = dt::dt2str($this->core->blog->settings->date_format . ' - ' . $this->core->blog->settings->time_format, $this->rs->comment_dt);
     $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />';
     switch ($this->rs->comment_status) {
         case 1:
             $img_status = sprintf($img, __('published'), 'check-on.png');
             break;
         case 0:
             $img_status = sprintf($img, __('unpublished'), 'check-off.png');
             break;
         case -1:
             $img_status = sprintf($img, __('pending'), 'check-wrn.png');
             break;
         case -2:
             $img_status = sprintf($img, __('junk'), 'junk.png');
             break;
     }
     $comment_author = html::escapeHTML($this->rs->comment_author);
     if (mb_strlen($comment_author) > 20) {
         $comment_author = mb_strcut($comment_author, 0, 17) . '...';
     }
     $res = '<tr class="line' . ($this->rs->comment_status != 1 ? ' offline' : '') . '"' . ' id="c' . $this->rs->comment_id . '">';
     $res .= '<td class="nowrap">' . form::checkbox(array('comments[]'), $this->rs->comment_id, '', '', '', 0) . '</td>' . '<td class="maximal"><a href="' . $post_url . '">' . html::escapeHTML($this->rs->post_title) . '</a>' . ($this->rs->post_type != 'post' ? ' (' . html::escapeHTML($this->rs->post_type) . ')' : '') . '</td>' . '<td class="nowrap">' . dt::dt2str(__('%Y-%m-%d %H:%M'), $this->rs->comment_dt) . '</td>' . '<td class="nowrap"><a href="' . $author_url . '">' . $comment_author . '</a></td>' . '<td class="nowrap">' . ($this->rs->comment_trackback ? __('trackback') : __('comment')) . '</td>' . '<td class="nowrap status">' . $img_status . '</td>' . '<td class="nowrap status"><a href="' . $comment_url . '">' . '<img src="images/edit-mini.png" alt="" title="' . __('Edit this comment') . '" /></a></td>';
     $res .= '</tr>';
     return $res;
 }
Exemplo n.º 16
0
function dcGetImageTitle($file, $pattern, $dto_first = false, $no_date_alone = false)
{
    $res = array();
    $pattern = preg_split('/\\s*;;\\s*/', $pattern);
    $sep = ', ';
    $dates = 0;
    $items = 0;
    foreach ($pattern as $v) {
        if ($v == 'Title') {
            if ($file->media_title != '') {
                $res[] = $file->media_title;
            }
            $items++;
        } elseif ($file->media_meta->{$v}) {
            if ((string) $file->media_meta->{$v} != '') {
                $res[] = (string) $file->media_meta->{$v};
            }
            $items++;
        } elseif (preg_match('/^Date\\((.+?)\\)$/u', $v, $m)) {
            if ($dto_first && $file->media_meta->DateTimeOriginal != 0) {
                $res[] = dt::dt2str($m[1], (string) $file->media_meta->DateTimeOriginal);
            } else {
                $res[] = dt::str($m[1], $file->media_dt);
            }
            $items++;
            $dates++;
        } elseif (preg_match('/^DateTimeOriginal\\((.+?)\\)$/u', $v, $m) && $file->media_meta->DateTimeOriginal) {
            $res[] = dt::dt2str($m[1], (string) $file->media_meta->DateTimeOriginal);
            $items++;
            $dates++;
        } elseif (preg_match('/^separator\\((.*?)\\)$/u', $v, $m)) {
            $sep = $m[1];
        }
    }
    if ($no_date_alone && $dates == count($res) && $dates < $items) {
        // On ne laisse pas les dates seules, sauf si ce sont les seuls items du pattern (hors séparateur)
        return '';
    }
    return implode($sep, $res);
}
Exemplo n.º 17
0
        ?>
</a></th>
		<td class="<?php 
        echo $td_class;
        ?>
">
			<?php 
        echo dt::dt2str(__('%Y-%m-%d'), $rsEvents->date);
        ?>
		</td>
		<td class="<?php 
        echo $td_class;
        ?>
">
			<?php 
        echo !empty($rsEvents->date_end) ? dt::dt2str(__('%Y-%m-%d'), $rsEvents->date_end) : '';
        ?>
		</td>
		<td class="<?php 
        echo $td_class;
        ?>
 small">
			<ul class="actions">
			<li>
			<?php 
        if ($rsEvents->visibility) {
            ?>
			<a href="module.php?m=diary&amp;action=index&amp;switch_status=<?php 
            echo $rsEvents->id;
            ?>
"
Exemplo n.º 18
0
        ?>
				<p class="col field"><label for="p_favo_start"><?php 
        _e('m_catalog_tab_status_start_favo');
        ?>
</label>
				<?php 
        echo form::text('p_favo_start', 20, 255, $product_data['favo_start'] ? dt::dt2str('%d-%m-%Y', $product_data['favo_start']) : '', 'datepicker');
        ?>
</p>

				<p class="col field"><label for="p_favo_end"><?php 
        _e('m_catalog_tab_status_end_favo');
        ?>
</label>
				<?php 
        echo form::text('p_favo_end', 20, 255, $product_data['favo_end'] ? dt::dt2str('%d-%m-%Y', $product_data['favo_end']) : '', 'datepicker');
        ?>
</p>
				<?php 
    }
    ?>
			</div>
			<?php 
}
?>

		</div><!-- #tab-options -->

		<?php 
if ($okt->catalog->config->images['enable']) {
    ?>
Exemplo n.º 19
0
        echo oktLogAdmin::getHtmlType($rsLogAdmin->type);
        ?>
</td>
		<td><?php 
        echo $rsLogAdmin->user_id;
        ?>
 - <?php 
        echo $rsLogAdmin->username;
        ?>
</td>
		<td><?php 
        echo $rsLogAdmin->ip;
        ?>
</td>
		<td><?php 
        echo dt::dt2str(__('%A, %B %d, %Y, %H:%M'), $rsLogAdmin->date);
        ?>
</td>
		<td><?php 
        echo $rsLogAdmin->component;
        ?>
</td>
		<td><?php 
        echo $rsLogAdmin->code . ' - ' . $aLogAdminCodes[$rsLogAdmin->code];
        ?>
</td>
		<td><?php 
        echo $rsLogAdmin->message;
        ?>
</td>
	</tr>
Exemplo n.º 20
0
    } else {
        ?>
		<?php 
        printf(__('m_guestbook_sign_num_%s'), $signaturesList->number);
        ?>
	<?php 
    }
    ?>
	</h3>

	<ul class="infos">
		<?php 
    /* date */
    ?>
		<li class="date"><?php 
    printf(__('m_guestbook_on_%s'), dt::dt2str(__('%A, %B %d, %Y, %H:%M'), $signaturesList->date_sign));
    ?>
</li>

		<?php 
    /* email */
    if ($okt->guestbook->config->chp_mail && $signaturesList->email != '') {
        ?>
		<li class="email"><a href="mailto:<?php 
        echo util::escapeAttrHTML(util::emailEncode($signaturesList->email));
        ?>
"><img src="<?php 
        echo OKT_THEME;
        ?>
/modules/guestbook/email.png" alt="<?php 
        echo util::escapeAttrHTML(__('m_guestbook_email'));
Exemplo n.º 21
0
<?php 
echo $okt->page->getButtonSet('galleriesBtSt');
?>

<?php 
if (!empty($aItemData['item']['id'])) {
    ?>
<p><?php 
    printf(__('m_galleries_item_added_on'), '<em>' . dt::dt2str(__('%A, %B %d, %Y, %H:%M'), $aItemData['item']['created_at']) . '</em>');
    ?>

<?php 
    if ($aItemData['item']['updated_at'] > $aItemData['item']['created_at']) {
        ?>
<span class="note"><?php 
        printf(__('m_galleries_item_last_edit'), '<em>' . dt::dt2str(__('%A, %B %d, %Y, %H:%M'), $aItemData['item']['updated_at']) . '</em>');
        ?>
</span>
<?php 
    }
    ?>
</p>
<?php 
}
?>


<?php 
# Construction des onglets
$aItemData['tabs'] = new ArrayObject();
# onglet contenu
Exemplo n.º 22
0
 /**
 Returns comment time with <var>$format</var> as formatting pattern. If
 format is empty, uses <var>time_format</var> blog setting.
 
 @param	rs	Invisible parameter
 @param	format	<b>string</b>		Date format pattern
 @param	type	<b>string</b>		(dt|upddt) defaults to comment_dt
 @return	<b>string</b>
 */
 public static function getTime($rs, $format, $type = '')
 {
     if (!$format) {
         $format = $rs->core->blog->settings->system->time_format;
     }
     if ($type == 'upddt') {
         return dt::dt2str($format, $rs->comment_updt, $rs->comment_tz);
     } else {
         return dt::dt2str($format, $rs->comment_dt);
     }
 }
Exemplo n.º 23
0
		<?php 
# début Okatea : affichage des infos
if ($okt->news->config->public_display_date || $okt->news->config->public_display_author || $okt->news->config->categories['enable']) {
    ?>
		<p id="post-infos">
			<?php 
    _e('m_news_published');
    ?>

			<?php 
    # début Okatea : affichage date de l'article
    if ($okt->news->config->public_display_date) {
        ?>
			<?php 
        printf(__('m_news_on_%s'), dt::dt2str(__('%A, %B %d, %Y, %H:%M'), $rsPost->created_at));
        ?>
			<?php 
    }
    # fin Okatea : affichage date de l'article
    ?>

			<?php 
    # début Okatea : affichage l'auteur de l'article
    if ($okt->news->config->public_display_author) {
        ?>
			<?php 
        printf(__('m_news_by_%s'), html::escapeHTML($rsPost->author));
        ?>
			<?php 
    }
Exemplo n.º 24
0
?>
</h3>

			<p>
				<?php 
if ($rsEstimate->start_at == $rsEstimate->end_at) {
    ?>
				<?php 
    printf(__('On %s'), dt::dt2str(__('%A, %B %d, %Y'), html::escapeHTML($rsEstimate->start_at)));
    ?>

				<?php 
} else {
    ?>
				<?php 
    printf(__('From %s to %s'), dt::dt2str(__('%A, %B %d, %Y'), html::escapeHTML($rsEstimate->start_at)), dt::dt2str(__('%A, %B %d, %Y'), html::escapeHTML($rsEstimate->end_at)));
    ?>
				<?php 
}
?>
			</p>
	</div>
</div>


<?php 
if ($okt->estimate->config->enable_accessories) {
    ?>
<h3><?php 
    _e('m_estimate_details_products_accessories');
    ?>
Exemplo n.º 25
0
 */
# Accès direct interdit
if (!defined('ON_GUESTBOOK_MODULE')) {
    die;
}
if (!empty($_REQUEST['id'])) {
    $sig_id = intval($_REQUEST['id']);
} else {
    $okt->redirect('index.php?' . $url_params);
}
# récupération des infos de la signature
$signature = $okt->guestbook->getSig(array('id' => $sig_id));
$aSigData = array('id' => $sig_id, 'language' => $signature->language, 'message' => $signature->message, 'nom' => $signature->nom, 'email' => $signature->email, 'url' => $signature->url, 'note' => $signature->note, 'visible' => $signature->visible, 'date' => dt::dt2str(__('%A, %B %d, %Y, %H:%M'), $signature->date_sign));
# formulaire envoyé
if (!empty($_POST['edit_form_sent'])) {
    $aSigData = array('id' => $sig_id, 'language' => isset($_POST['language']) ? $_POST['language'] : null, 'message' => isset($_POST['msg']) ? $_POST['msg'] : null, 'nom' => isset($_POST['nom']) ? $_POST['nom'] : null, 'email' => isset($_POST['email']) ? $_POST['email'] : null, 'url' => isset($_POST['url']) ? $_POST['url'] : null, 'note' => isset($_POST['note']) ? intval($_POST['note']) : null, 'visible' => isset($_POST['visible']) ? intval($_POST['visible']) : 1, 'date' => dt::dt2str(__('%A, %B %d, %Y, %H:%M'), $signature->date_sign));
    $aSigData = $okt->guestbook->handleUserData($aSigData);
    if (!$okt->error->hasError()) {
        if ($okt->guestbook->updSig($aSigData)) {
            $okt->page->flashMessages->addSuccess(__('m_guestbook_Signature_was_updated'));
            $okt->redirect('module.php?m=guestbook&amp;action=edit&id=' . $sig_id . $url_params);
        }
    }
}
/* Affichage
----------------------------------------------------------*/
# Titre de la page
$okt->page->addGlobalTitle(__('m_guestbook_Edit_a_signature'));
# En-tête
include OKT_ADMIN_HEADER_FILE;
?>
Exemplo n.º 26
0
 /**
 Returns comment time with <var>$format</var> as formatting pattern. If
 format is empty, uses <var>time_format</var> blog setting.
 
 @param	rs	Invisible parameter
 @param	format	<b>string</b>		Date format pattern
 @return	<b>string</b>
 */
 public static function getTime(&$rs, $format)
 {
     if ($format) {
         return dt::dt2str($format, $rs->comment_dt);
     } else {
         return dt::dt2str($rs->core->blog->settings->time_format, $rs->comment_dt);
     }
 }
Exemplo n.º 27
0
            $core->blog->delComment($comment_id);
            http::redirect($core->getPostAdminURL($rs->post_type, $rs->post_id) . '&co=1#c' . $comment_id, false);
        } catch (Exception $e) {
            $core->error->add($e->getMessage());
        }
    }
    if (!$can_edit) {
        $core->error->add(__("You can't edit this comment."));
    }
}
/* DISPLAY
-------------------------------------------------------- */
dcPage::open(__('Edit comment'), dcPage::jsConfirmClose('comment-form') . dcPage::jsToolBar() . dcPage::jsLoad('js/_comment.js'));
if ($comment_id) {
    if (!empty($_GET['upd'])) {
        echo '<p class="message">' . __('Comment has been successfully updated.') . '</p>';
    }
    $comment_mailto = '';
    if ($comment_email) {
        $comment_mailto = '<a href="mailto:' . html::escapeHTML($comment_email) . '?subject=' . rawurlencode(sprintf(__('Your comment on my blog %s'), $core->blog->name)) . '&body=' . rawurlencode(sprintf(__("Hi!\n\nYou wrote a comment on:\n%s\n\n\n"), $rs->getPostURL())) . '">' . __('Send an e-mail') . '</a>';
    }
    echo '<h2>' . html::escapeHTML($core->blog->name) . ' &rsaquo; ' . __('Edit comment') . '</h2>';
    echo '<p><a class="back" href="' . $core->getPostAdminURL($post_type, $post_id) . '&amp;co=1#c' . $comment_id . '"> ' . sprintf(__('Back to "%s"'), $post_title) . '</a></p>';
    echo '<form action="comment.php" method="post" id="comment-form">' . '<p><label>' . __('IP address:') . '</label> ' . '<a href="comments.php?ip=' . $comment_ip . '">' . $comment_ip . '</a></p>' . '<p><label>' . __('Date:') . '</label> ' . dt::dt2str(__('%Y-%m-%d %H:%M'), $comment_dt) . '</p>' . '<p><label class="required" title="' . __('Required field') . '">' . __('Author:') . form::field('comment_author', 30, 255, html::escapeHTML($comment_author)) . '</label></p>' . '<p><label>' . __('Email:') . form::field('comment_email', 30, 255, html::escapeHTML($comment_email)) . $comment_mailto . '</label></p>' . '<p><label>' . __('Web site:') . form::field('comment_site', 30, 255, html::escapeHTML($comment_site)) . '</label></p>' . '<p><label>' . __('Status:') . form::combo('comment_status', $status_combo, $comment_status, '', '', !$can_publish) . '</label></p>' . $core->callBehavior('adminAfterCommentDesc', $rs) . '<p class="area"><label for="comment_content">' . __('Comment:') . '</label> ' . form::textarea('comment_content', 50, 10, html::escapeHTML($comment_content)) . '</p>' . '<p>' . form::hidden('id', $comment_id) . $core->formNonce() . '<input type="submit" accesskey="s" name="update" value="' . __('save') . '" /> ';
    if ($can_delete) {
        echo '<input type="submit" name="delete" value="' . __('delete') . '" />';
    }
    echo '</p>' . '</form>';
}
dcPage::helpBlock('core_comments');
dcPage::close();
Exemplo n.º 28
0
 /**
  * Ajout des champs au formulaire de modification d'une page.
  *
  * @param oktCore $okt
  * @param arrayObject $aPageData
  * @return void
  */
 public static function adminPostBuildTabs($okt, $aPageData)
 {
     # ajout du champ "checkbox" à l'onglet "options"
     $aPageData['tabs'][40]['content'] .= '<p class="field"><label>' . form::checkbox('p_checkbox', 1, $aPageData['post']['checkbox']) . ' ' . __('m_pages_example_extra_fields_checkbox_label') . '</label></p>';
     # ajout du champ "date" à l'onglet "options" avec le UI datepicker
     $okt->page->datePicker();
     $aPageData['tabs'][40]['content'] .= '<p class="field col"><label for="p_date">' . __('m_pages_example_extra_fields_date_label') . '</label>' . form::text('p_date', 20, 255, !empty($aPageData['post']['date']) ? dt::dt2str('%d-%m-%Y', $aPageData['post']['date']) : '', 'datepicker') . '</p>';
     # ajout du champ "required" à l'onglet "Contenu"
     $aPageData['tabs'][40]['content'] .= '<p class="field col"><label for="p_required" title="' . __('c_c_required_field') . '" class="required">' . __('m_pages_example_extra_fields_required_label') . '</label>' . form::text('p_required', 20, 255, $aPageData['post']['required']) . '</p>';
     # ajout des champs "multilangue" et "editor" à l'onglet "Contenu"
     foreach ($okt->languages->list as $aLanguage) {
         $aPageData['tabs'][10]['content'] .= '<p class="field" lang="' . $aLanguage['code'] . '"><label for="p_multilangue_' . $aLanguage['code'] . '">' . ($okt->languages->unique ? __('m_pages_example_extra_fields_multilangue_label') : sprintf(__('m_pages_example_extra_fields_multilangue_label_in_%s'), $aLanguage['title'])) . ' <span class="lang-switcher-buttons"></span></label>' . form::text(array('p_multilangue[' . $aLanguage['code'] . ']', 'p_multilangue_' . $aLanguage['code']), 100, 255, html::escapeHTML($aPageData['locales'][$aLanguage['code']]['multilangue'])) . '</p>';
         $aPageData['tabs'][10]['content'] .= '<p class="field" lang="' . $aLanguage['code'] . '"><label for="p_editor_' . $aLanguage['code'] . '">' . ($okt->languages->unique ? __('m_pages_example_extra_fields_editor_label') : sprintf(__('m_pages_example_extra_fields_editor_label_in_%s'), $aLanguage['title'])) . ' <span class="lang-switcher-buttons"></span></label>' . form::textarea(array('p_editor[' . $aLanguage['code'] . ']', 'p_editor_' . $aLanguage['code']), 97, 15, $aPageData['locales'][$aLanguage['code']]['editor'], 'richTextEditor') . '</p>';
     }
 }
Exemplo n.º 29
0
 /**
  * Dashboard items stack.
  *
  * @param	$core	<b>dcCore</b>	dcCore instance
  * @param	$items	<b>arrayObject</b>	Dashboard items
  */
 public static function adminDashboardItems($core, $items)
 {
     $core->auth->user_prefs->addWorkspace('maintenance');
     if (!$core->auth->user_prefs->maintenance->dashboard_item) {
         return null;
     }
     $maintenance = new dcMaintenance($core);
     $lines = array();
     foreach ($maintenance->getTasks() as $t) {
         $ts = $t->expired();
         if ($ts === false) {
             continue;
         }
         $lines[] = '<li title="' . ($ts === null ? __('This task has never been executed.') : sprintf(__('Last execution of this task was on %s.'), dt::dt2str($core->blog->settings->system->date_format, $ts) . ' ' . dt::dt2str($core->blog->settings->system->time_format, $ts))) . '">' . $t->task() . '</li>';
     }
     if (empty($lines)) {
         return null;
     }
     $items[] = new ArrayObject(array('<div id="maintenance-expired" class="box small">' . '<h3><img src="' . dcPage::getPF('maintenance/icon-small.png') . '" alt="" /> ' . __('Maintenance') . '</h3>' . '<p class="warning no-margin">' . sprintf(__('There is a task to execute.', 'There are %s tasks to execute.', count($lines)), count($lines)) . '</p>' . '<ul>' . implode('', $lines) . '</ul>' . '<p><a href="' . $core->adminurl->get('admin.plugin.maintenance') . '">' . __('Manage tasks') . '</a></p>' . '</div>'));
 }
Exemplo n.º 30
0
<?php 
echo $okt->page->getButtonSet('pagesBtSt');
?>

<?php 
if (!empty($aPageData['post']['id'])) {
    ?>
<p><?php 
    printf(__('m_pages_page_added_on'), '<em>' . dt::dt2str(__('%A, %B %d, %Y, %H:%M'), $aPageData['post']['created_at']) . '</em>');
    ?>

<?php 
    if ($aPageData['post']['updated_at'] > $aPageData['post']['created_at']) {
        ?>
<span class="note"><?php 
        printf(__('m_pages_page_last_edit'), '<em>' . dt::dt2str(__('%A, %B %d, %Y, %H:%M'), $aPageData['post']['updated_at']) . '</em>');
        ?>
</span>
<?php 
    }
    ?>
</p>
<?php 
}
?>


<?php 
# Construction des onglets
$aPageData['tabs'] = new ArrayObject();
# onglet contenu