Dotclear

source: admin/post.php @ 194:44f7a03a7d3c

Revision 194:44f7a03a7d3c, 19.5 KB checked in by Franck <carnet.franck.paul@…>, 13 years ago (diff)

Complément dans le titre de la page

Line 
1<?php
2# -- BEGIN LICENSE BLOCK ---------------------------------------
3#
4# This file is part of Dotclear 2.
5#
6# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
7# Licensed under the GPL version 2.0 license.
8# See LICENSE file or
9# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
10#
11# -- END LICENSE BLOCK -----------------------------------------
12
13require dirname(__FILE__).'/../inc/admin/prepend.php';
14
15dcPage::check('usage,contentadmin');
16
17$post_id = '';
18$cat_id = '';
19$post_dt = '';
20$post_format = $core->auth->getOption('post_format');
21$post_password = '';
22$post_url = '';
23$post_lang = $core->auth->getInfo('user_lang');
24$post_title = '';
25$post_excerpt = '';
26$post_excerpt_xhtml = '';
27$post_content = '';
28$post_content_xhtml = '';
29$post_notes = '';
30$post_status = $core->auth->getInfo('user_post_status');
31$post_selected = false;
32$post_open_comment = $core->blog->settings->system->allow_comments;
33$post_open_tb = $core->blog->settings->system->allow_trackbacks;
34
35$post_media = array();
36
37$page_title = __('New entry').' - '.__('Entries');
38
39$can_view_page = true;
40$can_edit_post = $core->auth->check('usage,contentadmin',$core->blog->id);
41$can_publish = $core->auth->check('publish,contentadmin',$core->blog->id);
42$can_delete = false;
43
44$post_headlink = '<link rel="%s" title="%s" href="post.php?id=%s" />';
45$post_link = '<a href="post.php?id=%s" title="%s">%s</a>';
46
47$next_link = $prev_link = $next_headlink = $prev_headlink = null;
48
49# If user can't publish
50if (!$can_publish) {
51     $post_status = -2;
52}
53
54# Getting categories
55$categories_combo = array('&nbsp;' => '');
56try {
57     $categories = $core->blog->getCategories(array('post_type'=>'post'));
58     while ($categories->fetch()) {
59          $categories_combo[] = new formSelectOption(
60               str_repeat('&nbsp;&nbsp;',$categories->level-1).'&bull; '.html::escapeHTML($categories->cat_title),
61               $categories->cat_id
62          );
63     }
64} catch (Exception $e) { }
65
66# Status combo
67foreach ($core->blog->getAllPostStatus() as $k => $v) {
68     $status_combo[$v] = (string) $k;
69}
70
71# Formaters combo
72foreach ($core->getFormaters() as $v) {
73     $formaters_combo[$v] = $v;
74}
75
76# Languages combo
77$rs = $core->blog->getLangs(array('order'=>'asc'));
78$all_langs = l10n::getISOcodes(0,1);
79$lang_combo = array('' => '', __('Most used') => array(), __('Available') => l10n::getISOcodes(1,1));
80while ($rs->fetch()) {
81     if (isset($all_langs[$rs->post_lang])) {
82          $lang_combo[__('Most used')][$all_langs[$rs->post_lang]] = $rs->post_lang;
83          unset($lang_combo[__('Available')][$all_langs[$rs->post_lang]]);
84     } else {
85          $lang_combo[__('Most used')][$rs->post_lang] = $rs->post_lang;
86     }
87}
88unset($all_langs);
89unset($rs);
90
91
92# Get entry informations
93if (!empty($_REQUEST['id']))
94{
95     $params['post_id'] = $_REQUEST['id'];
96     
97     $post = $core->blog->getPosts($params);
98     
99     if ($post->isEmpty())
100     {
101          $core->error->add(__('This entry does not exist.'));
102          $can_view_page = false;
103     }
104     else
105     {
106          $post_id = $post->post_id;
107          $cat_id = $post->cat_id;
108          $post_dt = date('Y-m-d H:i',strtotime($post->post_dt));
109          $post_format = $post->post_format;
110          $post_password = $post->post_password;
111          $post_url = $post->post_url;
112          $post_lang = $post->post_lang;
113          $post_title = $post->post_title;
114          $post_excerpt = $post->post_excerpt;
115          $post_excerpt_xhtml = $post->post_excerpt_xhtml;
116          $post_content = $post->post_content;
117          $post_content_xhtml = $post->post_content_xhtml;
118          $post_notes = $post->post_notes;
119          $post_status = $post->post_status;
120          $post_selected = (boolean) $post->post_selected;
121          $post_open_comment = (boolean) $post->post_open_comment;
122          $post_open_tb = (boolean) $post->post_open_tb;
123         
124          $page_title = __('Edit entry');
125         
126          $can_edit_post = $post->isEditable();
127          $can_delete= $post->isDeletable();
128         
129          $next_rs = $core->blog->getNextPost($post,1);
130          $prev_rs = $core->blog->getNextPost($post,-1);
131         
132          if ($next_rs !== null) {
133               $next_link = sprintf($post_link,$next_rs->post_id,
134                    html::escapeHTML($next_rs->post_title),__('next entry').'&nbsp;&#187;');
135               $next_headlink = sprintf($post_headlink,'next',
136                    html::escapeHTML($next_rs->post_title),$next_rs->post_id);
137          }
138         
139          if ($prev_rs !== null) {
140               $prev_link = sprintf($post_link,$prev_rs->post_id,
141                    html::escapeHTML($prev_rs->post_title),'&#171;&nbsp;'.__('previous entry'));
142               $prev_headlink = sprintf($post_headlink,'previous',
143                    html::escapeHTML($prev_rs->post_title),$prev_rs->post_id);
144          }
145         
146          try {
147               $core->media = new dcMedia($core);
148               $post_media = $core->media->getPostMedia($post_id);
149          } catch (Exception $e) {}
150     }
151}
152
153# Format excerpt and content
154if (!empty($_POST) && $can_edit_post)
155{
156     $post_format = $_POST['post_format'];
157     $post_excerpt = $_POST['post_excerpt'];
158     $post_content = $_POST['post_content'];
159     
160     $post_title = $_POST['post_title'];
161     
162     $cat_id = (integer) $_POST['cat_id'];
163     
164     if (isset($_POST['post_status'])) {
165          $post_status = (integer) $_POST['post_status'];
166     }
167     
168     if (empty($_POST['post_dt'])) {
169          $post_dt = '';
170     } else {
171          $post_dt = strtotime($_POST['post_dt']);
172          $post_dt = date('Y-m-d H:i',$post_dt);
173     }
174     
175     $post_open_comment = !empty($_POST['post_open_comment']);
176     $post_open_tb = !empty($_POST['post_open_tb']);
177     $post_selected = !empty($_POST['post_selected']);
178     $post_lang = $_POST['post_lang'];
179     $post_password = !empty($_POST['post_password']) ? $_POST['post_password'] : null;
180     
181     $post_notes = $_POST['post_notes'];
182     
183     if (isset($_POST['post_url'])) {
184          $post_url = $_POST['post_url'];
185     }
186     
187     $core->blog->setPostContent(
188          $post_id,$post_format,$post_lang,
189          $post_excerpt,$post_excerpt_xhtml,$post_content,$post_content_xhtml
190     );
191}
192
193# Create or update post
194if (!empty($_POST) && !empty($_POST['save']) && $can_edit_post)
195{
196     $cur = $core->con->openCursor($core->prefix.'post');
197     
198     $cur->post_title = $post_title;
199     $cur->cat_id = ($cat_id ? $cat_id : null);
200     $cur->post_dt = $post_dt ? date('Y-m-d H:i:00',strtotime($post_dt)) : '';
201     $cur->post_format = $post_format;
202     $cur->post_password = $post_password;
203     $cur->post_lang = $post_lang;
204     $cur->post_title = $post_title;
205     $cur->post_excerpt = $post_excerpt;
206     $cur->post_excerpt_xhtml = $post_excerpt_xhtml;
207     $cur->post_content = $post_content;
208     $cur->post_content_xhtml = $post_content_xhtml;
209     $cur->post_notes = $post_notes;
210     $cur->post_status = $post_status;
211     $cur->post_selected = (integer) $post_selected;
212     $cur->post_open_comment = (integer) $post_open_comment;
213     $cur->post_open_tb = (integer) $post_open_tb;
214     
215     if (isset($_POST['post_url'])) {
216          $cur->post_url = $post_url;
217     }
218     
219     # Update post
220     if ($post_id)
221     {
222          try
223          {
224               # --BEHAVIOR-- adminBeforePostUpdate
225               $core->callBehavior('adminBeforePostUpdate',$cur,$post_id);
226               
227               $core->blog->updPost($post_id,$cur);
228               
229               # --BEHAVIOR-- adminAfterPostUpdate
230               $core->callBehavior('adminAfterPostUpdate',$cur,$post_id);
231               
232               http::redirect('post.php?id='.$post_id.'&upd=1');
233          }
234          catch (Exception $e)
235          {
236               $core->error->add($e->getMessage());
237          }
238     }
239     else
240     {
241          $cur->user_id = $core->auth->userID();
242         
243          try
244          {
245               # --BEHAVIOR-- adminBeforePostCreate
246               $core->callBehavior('adminBeforePostCreate',$cur);
247               
248               $return_id = $core->blog->addPost($cur);
249               
250               # --BEHAVIOR-- adminAfterPostCreate
251               $core->callBehavior('adminAfterPostCreate',$cur,$return_id);
252               
253               http::redirect('post.php?id='.$return_id.'&crea=1');
254          }
255          catch (Exception $e)
256          {
257               $core->error->add($e->getMessage());
258          }
259     }
260}
261
262if (!empty($_POST['delete']) && $can_delete)
263{
264     try {
265          # --BEHAVIOR-- adminBeforePostDelete
266          $core->callBehavior('adminBeforePostDelete',$post_id);
267          $core->blog->delPost($post_id);
268          http::redirect('posts.php');
269     } catch (Exception $e) {
270          $core->error->add($e->getMessage());
271     }
272}
273
274/* DISPLAY
275-------------------------------------------------------- */
276$default_tab = 'edit-entry';
277if (!$can_edit_post) {
278     $default_tab = '';
279}
280if (!empty($_GET['co'])) {
281     $default_tab = 'comments';
282}
283
284dcPage::open($page_title,
285     dcPage::jsDatePicker().
286     dcPage::jsToolBar().
287     dcPage::jsModal().
288     dcPage::jsMetaEditor().
289     dcPage::jsLoad('js/_post.js').
290     dcPage::jsConfirmClose('entry-form','comment-form').
291     # --BEHAVIOR-- adminPostHeaders
292     $core->callBehavior('adminPostHeaders').
293     dcPage::jsPageTabs($default_tab).
294     $next_headlink."\n".$prev_headlink
295);
296
297if (!empty($_GET['upd'])) {
298          echo '<p class="message">'.__('Entry has been successfully updated.').'</p>';
299}
300elseif (!empty($_GET['crea'])) {
301          echo '<p class="message">'.__('Entry has been successfully created.').'</p>';
302}
303elseif (!empty($_GET['attached'])) {
304     echo '<p class="message">'.__('File has been successfully attached.').'</p>';
305}
306elseif (!empty($_GET['rmattach'])) {
307     echo '<p class="message">'.__('Attachment has been successfully removed.').'</p>';
308}
309
310if (!empty($_GET['creaco'])) {
311          echo '<p class="message">'.__('Comment has been successfully created.').'</p>';
312     }
313
314# XHTML conversion
315if (!empty($_GET['xconv']))
316{
317     $post_excerpt = $post_excerpt_xhtml;
318     $post_content = $post_content_xhtml;
319     $post_format = 'xhtml';
320     
321     echo '<p class="message">'.__('Don\'t forget to validate your XHTML conversion by saving your post.').'</p>';
322}
323
324echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.'<a href="posts.php">'.__('Entries').'</a> &rsaquo; '.__('New entry');
325
326if ($post_id && $post->post_status == 1) {
327     echo ' - <a id="post-preview" href="'.$post->getURL().'" class="button">'.__('View entry').'</a>';
328} elseif ($post_id) {
329     $preview_url =
330     $core->blog->url.$core->url->getBase('preview').'/'.
331     $core->auth->userID().'/'.
332     http::browserUID(DC_MASTER_KEY.$core->auth->userID().$core->auth->getInfo('user_pwd')).
333     '/'.$post->post_url;
334     echo ' - <a id="post-preview" href="'.$preview_url.'" class="button">'.__('Preview entry').'</a>';
335}
336
337echo '</h2>';
338
339if ($post_id)
340{
341     echo '<p>';
342     if ($prev_link) { echo $prev_link; }
343     if ($next_link && $prev_link) { echo ' - '; }
344     if ($next_link) { echo $next_link; }
345     
346     # --BEHAVIOR-- adminPostNavLinks
347     $core->callBehavior('adminPostNavLinks',isset($post) ? $post : null);
348     
349     echo '</p>';
350}
351
352# Exit if we cannot view page
353if (!$can_view_page) {
354     dcPage::helpBlock('core_post');
355     dcPage::close();
356     exit;
357}
358
359/* Post form if we can edit post
360-------------------------------------------------------- */
361if ($can_edit_post)
362{
363     echo '<div class="multi-part" title="'.__('Edit entry').'" id="edit-entry">';
364     echo '<form action="post.php" method="post" id="entry-form">';
365     echo '<div id="entry-sidebar">';
366     
367     echo
368     '<p><label for="cat_id">'.__('Category:').
369     form::combo('cat_id',$categories_combo,$cat_id,'maximal',3).
370     '</label></p>'.
371     
372     '<p><label for="post_status">'.__('Entry status:').
373     form::combo('post_status',$status_combo,$post_status,'',3,!$can_publish).
374     '</label></p>'.
375     
376     '<p><label for="post_dt">'.__('Published on:').
377     form::field('post_dt',16,16,$post_dt,'',3).
378     '</label></p>'.
379     
380     '<p><label for="post_format">'.__('Text formating:').
381     form::combo('post_format',$formaters_combo,$post_format,'',3).
382     ($post_id && $post_format != 'xhtml' ? '<a id="convert-xhtml" href="post.php?id='.$post_id.'&amp;xconv=1">'.__('Convert to XHTML').'</a>' : '').
383     '</label></p>'.
384     
385     '<p><label for="post_open_comment" class="classic">'.form::checkbox('post_open_comment',1,$post_open_comment,'',3).' '.
386     __('Accept comments').'</label></p>'.
387     '<p><label for="post_open_tb" class="classic">'.form::checkbox('post_open_tb',1,$post_open_tb,'',3).' '.
388     __('Accept trackbacks').'</label></p>'.
389     '<p><label for="post_selected" class="classic">'.form::checkbox('post_selected',1,$post_selected,'',3).' '.
390     __('Selected entry').'</label></p>'.
391     
392     '<p><label for="post_lang">'.__('Entry lang:').
393     form::combo('post_lang',$lang_combo,$post_lang,'',5).
394     '</label></p>'.
395     
396     '<p><label for="post_password">'.__('Entry password:').
397     form::field('post_password',10,32,html::escapeHTML($post_password),'maximal',3).
398     '</label></p>'.
399     
400     '<div class="lockable">'.
401     '<p><label for="post_url">'.__('Basename:').
402     form::field('post_url',10,255,html::escapeHTML($post_url),'maximal',3).
403     '</label></p>'.
404     '<p class="form-note warn">'.
405     __('Warning: If you set the URL manually, it may conflict with another entry.').
406     '</p>'.
407     '</div>';
408     
409     if ($post_id)
410     {
411          echo
412          '<h3 class="clear">'.__('Attachments').'</h3>';
413          foreach ($post_media as $f)
414          {
415               $ftitle = $f->media_title;
416               if (strlen($ftitle) > 18) {
417                    $ftitle = substr($ftitle,0,16).'...';
418               }
419               echo
420               '<div class="media-item">'.
421               '<a class="media-icon" href="media_item.php?id='.$f->media_id.'">'.
422               '<img src="'.$f->media_icon.'" alt="" title="'.$f->basename.'" /></a>'.
423               '<ul>'.
424               '<li><a class="media-link" href="media_item.php?id='.$f->media_id.'"'.
425               'title="'.$f->basename.'">'.$ftitle.'</a></li>'.
426               '<li>'.$f->media_dtstr.'</li>'.
427               '<li>'.files::size($f->size).' - '.
428               '<a href="'.$f->file_url.'">'.__('open').'</a>'.'</li>'.
429               
430               '<li class="media-action"><a class="attachment-remove" id="attachment-'.$f->media_id.'" '.
431               'href="post_media.php?post_id='.$post_id.'&amp;media_id='.$f->media_id.'&amp;remove=1">'.
432               '<img src="images/check-off.png" alt="'.__('remove').'" /></a>'.
433               '</li>'.
434               
435               '</ul>'.
436               '</div>';
437          }
438          unset($f);
439         
440          if (empty($post_media)) {
441               echo '<p>'.__('No attachment.').'</p>';
442          }
443          echo '<p><a href="media.php?post_id='.$post_id.'">'.__('Add files to this entry').'</a></p>';
444     }
445     
446     # --BEHAVIOR-- adminPostFormSidebar
447     $core->callBehavior('adminPostFormSidebar',isset($post) ? $post : null);
448     
449     echo '</div>';      // End #entry-sidebar
450     
451     echo '<div id="entry-content"><fieldset class="constrained">';
452     
453     echo
454     '<p class="col"><label class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').
455     form::field('post_title',20,255,html::escapeHTML($post_title),'maximal',2).
456     '</label></p>'.
457     
458     '<p class="area" id="excerpt-area"><label for="post_excerpt">'.__('Excerpt:').'</label> '.
459     form::textarea('post_excerpt',50,5,html::escapeHTML($post_excerpt),'',2).
460     '</p>'.
461     
462     '<p class="area"><label class="required" '.
463     'for="post_content"><abbr title="'.__('Required field').'">*</abbr> '.__('Content:').'</label> '.
464     form::textarea('post_content',50,$core->auth->getOption('edit_size'),html::escapeHTML($post_content),'',2).
465     '</p>'.
466     
467     '<p class="area" id="notes-area"><label for="post_notes">'.__('Notes:').'</label>'.
468     form::textarea('post_notes',50,5,html::escapeHTML($post_notes),'',2).
469     '</p>';
470     
471     # --BEHAVIOR-- adminPostForm
472     $core->callBehavior('adminPostForm',isset($post) ? $post : null);
473     
474     echo
475     '<p>'.
476     ($post_id ? form::hidden('id',$post_id) : '').
477     '<input type="submit" value="'.__('save').' (s)" tabindex="4" '.
478     'accesskey="s" name="save" /> '.
479     ($can_delete ? '<input type="submit" class="delete" value="'.__('delete').'" name="delete" />' : '').
480     $core->formNonce().
481     '</p>';
482     
483     echo '</fieldset></div>';          // End #entry-content
484     echo '</form>';
485     echo '</div>';
486     
487     if ($post_id && $post->post_status == 1) {
488          echo '<p><a href="trackbacks.php?id='.$post_id.'" class="multi-part">'.
489          __('Ping blogs').'</a></p>';
490     }
491     
492     if ($post_id && !empty($post_media))
493     {
494          echo
495          '<form action="post_media.php" id="attachment-remove-hide" method="post">'.
496          '<div>'.form::hidden(array('post_id'),$post_id).
497          form::hidden(array('media_id'),'').
498          form::hidden(array('remove'),1).
499          $core->formNonce().'</div></form>';
500     }
501}
502
503
504/* Comments and trackbacks
505-------------------------------------------------------- */
506if ($post_id)
507{
508     $params = array('post_id' => $post_id, 'order' => 'comment_dt ASC');
509     
510     $comments = $core->blog->getComments(array_merge($params,array('comment_trackback'=>0)));
511     $trackbacks = $core->blog->getComments(array_merge($params,array('comment_trackback'=>1)));
512     
513     # Actions combo box
514     $combo_action = array();
515     if ($can_edit_post && $core->auth->check('publish,contentadmin',$core->blog->id))
516     {
517          $combo_action[__('publish')] = 'publish';
518          $combo_action[__('unpublish')] = 'unpublish';
519          $combo_action[__('mark as pending')] = 'pending';
520          $combo_action[__('mark as junk')] = 'junk';
521     }
522     
523     if ($can_edit_post && $core->auth->check('delete,contentadmin',$core->blog->id))
524     {
525          $combo_action[__('delete')] = 'delete';
526     }
527     
528     $has_action = !empty($combo_action) && (!$trackbacks->isEmpty() || !$comments->isEmpty());
529     
530     echo
531     '<div id="comments" class="multi-part" title="'.__('Comments').'">';
532     
533     if ($has_action) {
534          echo '<form action="comments_actions.php" id="form-comments" method="post">';
535     }
536     
537     echo '<h3>'.__('Trackbacks').'</h3>';
538     
539     if (!$trackbacks->isEmpty()) {
540          showComments($trackbacks,$has_action,true);
541     } else {
542          echo '<p>'.__('No trackback').'</p>';
543     }
544     
545     echo '<h3>'.__('Comments').'</h3>';
546     if (!$comments->isEmpty()) {
547          showComments($comments,$has_action);
548     } else {
549          echo '<p>'.__('No comment').'</p>';
550     }
551     
552     if ($has_action) {
553          echo
554          '<div class="two-cols">'.
555          '<p class="col checkboxes-helpers"></p>'.
556         
557          '<p class="col right"><label for="action" class="classic">'.__('Selected comments action:').'</label> '.
558          form::combo('action',$combo_action).
559          form::hidden('redir','post.php?id='.$post_id.'&amp;co=1').
560          $core->formNonce().
561          '<input type="submit" value="'.__('ok').'" /></p>'.
562          '</div>'.
563          '</form>';
564     }
565     
566     echo '</div>';
567}
568
569/* Add a comment
570-------------------------------------------------------- */
571if ($post_id)
572{
573     echo
574     '<div class="multi-part" id="add-comment" title="'.__('Add a comment').'">'.
575     '<h3>'.__('Add a comment').'</h3>'.
576     
577     '<form action="comment.php" method="post" id="comment-form">'.
578     '<fieldset class="constrained">'.
579     '<p><label for="comment_author" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Name:').
580     form::field('comment_author',30,255,html::escapeHTML($core->auth->getInfo('user_cn'))).
581     '</label></p>'.
582     
583     '<p><label for="comment_email">'.__('Email:').
584     form::field('comment_email',30,255,html::escapeHTML($core->auth->getInfo('user_email'))).
585     '</label></p>'.
586     
587     '<p><label for="comment_site">'.__('Web site:').
588     form::field('comment_site',30,255,html::escapeHTML($core->auth->getInfo('user_url'))).
589     '</label></p>'.
590     
591     '<p class="area"><label for="comment_content" class="required"><abbr title="'.__('Required field').'">*</abbr> '.
592     __('Comment:').'</label> '.
593     form::textarea('comment_content',50,8,html::escapeHTML('')).
594     '</p>'.
595     
596     '<p>'.form::hidden('post_id',$post_id).
597     $core->formNonce().
598     '<input type="submit" name="add" value="'.__('save').'" /></p>'.
599     '</fieldset>'.
600     '</form>'.
601     '</div>';
602}
603
604
605# Show comments or trackbacks
606function showComments($rs,$has_action,$tb=false)
607{
608     echo
609     '<table class="comments-list"><tr>'.
610     '<th colspan="2">'.__('Author').'</th>'.
611     '<th>'.__('Date').'</th>'.
612     '<th class="nowrap">'.__('IP address').'</th>'.
613     '<th>'.__('Status').'</th>'.
614     '<th>&nbsp;</th>'.
615     '</tr>';
616     
617     while($rs->fetch())
618     {
619          $comment_url = 'comment.php?id='.$rs->comment_id;
620         
621          $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />';
622          switch ($rs->comment_status) {
623               case 1:
624                    $img_status = sprintf($img,__('published'),'check-on.png');
625                    break;
626               case 0:
627                    $img_status = sprintf($img,__('unpublished'),'check-off.png');
628                    break;
629               case -1:
630                    $img_status = sprintf($img,__('pending'),'check-wrn.png');
631                    break;
632               case -2:
633                    $img_status = sprintf($img,__('junk'),'junk.png');
634                    break;
635          }
636         
637          echo
638          '<tr class="line'.($rs->comment_status != 1 ? ' offline' : '').'"'.
639          ' id="c'.$rs->comment_id.'">'.
640         
641          '<td class="nowrap">'.
642          ($has_action ? form::checkbox(array('comments[]'),$rs->comment_id,'','','',0,'title="'.($tb ? __('select this trackback') : __('select this comment')).'"') : '').'</td>'.
643          '<td class="maximal">'.html::escapeHTML($rs->comment_author).'</td>'.
644          '<td class="nowrap">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$rs->comment_dt).'</td>'.
645          '<td class="nowrap"><a href="comments.php?ip='.$rs->comment_ip.'">'.$rs->comment_ip.'</a></td>'.
646          '<td class="nowrap status">'.$img_status.'</td>'.
647          '<td class="nowrap status"><a href="'.$comment_url.'">'.
648          '<img src="images/edit-mini.png" alt="" title="'.__('Edit this comment').'" /></a></td>'.
649         
650          '</tr>';
651     }
652     
653     echo '</table>';
654}
655
656dcPage::helpBlock('core_post','core_wiki');
657dcPage::close();
658?>
Note: See TracBrowser for help on using the repository browser.

Sites map