Exemple #1
0
 // If it didn`t, blog id is invalid. What is the visitor doing on this page?
 // If no data, terminate script execution..
 if (mysql_num_rows($q_blog) == 0) {
     exit;
 }
 // Get comments for this blog..
 $q_comments = mysql_query("SELECT * FROM " . $database['prefix'] . "comments\n                              WHERE postid = '{$blog}'\n                              ORDER BY id " . ($SETTINGS->commentsOrder == 'asc' ? 'ASC' : 'DESC') . "\n                              ") or die(mysql_error());
 // Load tpl file and parse data..
 $find = array('{post_title}', '{post_content}', '{comments_count}', '{post_date}', '{path}');
 $replace = array(cleanData($BLOG->title), autoParseLinks(cleanData($BLOG->comments)), str_replace("{count}", number_format(mysql_num_rows($q_comments)), $msg_index3), $BLOG->rawpostdate, $SETTINGS->w_path . '/themes/' . THEME);
 $vBlog = str_replace($find, $replace, file_get_contents(FOLDER_PATH . 'themes/' . THEME . '/tpl_files/print_blog_post.tpl'));
 // Load comment data..
 if (mysql_num_rows($q_comments) > 0) {
     while ($COMMENTS = mysql_fetch_object($q_comments)) {
         $find = array('{comment_class}', '{post_content}', '{post_date}', '{path}');
         $replace = array($COMMENTS->adminPost ? 'comment_admin' : 'comment_visitor', autoParseLinks(nl2br(cleanData($COMMENTS->comments))), str_replace(array('{poster}', '{date}'), array(cleanData($COMMENTS->name), $COMMENTS->rawpostdate), $msg_viewblog), $SETTINGS->w_path . '/themes/' . THEME);
         $vComments .= str_replace($find, $replace, file_get_contents(FOLDER_PATH . 'themes/' . THEME . '/tpl_files/comments.tpl'));
     }
 } else {
     $vComments = str_replace(array('{message}', '{path}'), array($msg_viewblog2, $SETTINGS->w_path . '/themes/' . THEME), file_get_contents(FOLDER_PATH . 'themes/' . THEME . '/tpl_files/system_message.tpl'));
 }
 $tpl_print = new Savant2();
 $tpl_print->assign('CHARSET', $msg_charset);
 $tpl_print->assign('TITLE', $msg_print);
 $tpl_print->assign('PATH', $SETTINGS->w_path . '/themes/' . THEME);
 $tpl_print->assign('BLOG_DATA', $vBlog);
 $tpl_print->assign('COMMENT_DATA', $vComments);
 $tpl_print->assign('CLOSE_WINDOW', $msg_script18);
 $tpl_print->display('themes/' . THEME . '/print.tpl.php');
 break;
 //========================
Exemple #2
0
">
    <table cellpadding="0" cellspacing="1" width="100%" align="center" style="margin-top:3px;border: 1px solid #164677;">
    <tr>
        <td align="left" height="17" class="menutable"><b><?php 
echo strtoupper($msg_addcomments4);
?>
</b> &raquo;</b> <?php 
echo cleanData($BLOG->title);
?>
</td>
    </tr>
    </table>
    <table cellpadding="0" cellspacing="0" width="100%" align="center" style="margin-top:3px;border: 1px solid #164677;">
    <tr>
        <td align="left" colspan="2" height="17" style="padding:5px;border-bottom:1px solid #164677"><?php 
echo autoParseLinks(cleanData($BLOG->comments));
?>
</td>
    </tr>
    <tr>
        <td align="left" class="displaytd"><i><?php 
echo $msg_addcomments8;
?>
: <?php 
echo $BLOG->rawpostdate;
?>
</i></td>
        <td align="right" class="displaytd"><a href="../index.php?cmd=blog&amp;post=<?php 
echo $BLOG->id;
?>
" title="<?php