[Comoblog-commit] comoblog/admin manage_comment_users.php,1.1,1.2
Status: Inactive
Brought to you by:
markwallis
|
From: iamdecal <iam...@us...> - 2006-11-17 00:50:52
|
Update of /cvsroot/comoblog/comoblog/admin In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29462/admin Modified Files: manage_comment_users.php Log Message: Working version of captchas. not as feature complete as id like, but it works on the current version think we should sort out a may sort out a mini release? if so it needs add_comment.php list_comments.php templates/add_comment.tpl.htm templates/list_comments.tpl.htm captcha.php img/ttf/REVELMED.TTF and a bit of tidying of captcha.php tested on two systems, but i cant garentee it for everywhere Index: manage_comment_users.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/admin/manage_comment_users.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- manage_comment_users.php 16 Aug 2006 01:27:28 -0000 1.1 +++ manage_comment_users.php 17 Nov 2006 00:50:46 -0000 1.2 @@ -1,84 +1,84 @@ -<?php -require ('include/admin.inc.php'); - -$tpl = new XTemplate ('templates/manage_posts.tpl.htm'); - -$offset = 0; -if (isset($_GET['o'])) $offset = $_GET['o'] + 0; - -$delete = 'n'; -if (isset($_GET['d']) && $_GET['d'] == 'y') $delete = 'y'; - - - - - - - - -if ($delete == 'y') - $tpl->parse('main.deleted'); - - - - - -$display = 10; - -$posts = posts_list ($offset, $display); - -if ($posts) { - - for ($cnt = 0; $cnt < count($posts); $cnt++) { - - if ($cnt % 2) - $tpl->assign('BGCOLOR', '#ffffff'); - else - $tpl->assign('BGCOLOR', '#efefef'); - - $posts[$cnt]['post_mail_from'] = htmlentities(antispam($posts[$cnt]['post_mail_from'])); - $posts[$cnt]['post_mail_date'] = strftime('%D %T',$posts[$cnt]['post_mail_date']); - if ( $posts[$cnt]['post_mail_subject'] == ""){ - // need to to strip html incase we break across a tag - $title = filter_html($posts[$cnt]['post_mail_body']); - $posts[$cnt]['post_mail_subject'] = substr($title,0,150) ."..." ; - } - - $tpl->assign('POST', $posts[$cnt]); - $tpl->parse('main.posts.post'); - } - - $howmany = posts_howmany(); - - $tpl->assign("OFFSET", $offset); - $tpl->assign("FIRST", $offset + 1); - $tpl->assign("LAST", $offset + $cnt); - $tpl->assign("TOTAL", $howmany); - - if ($howmany > ($offset + $display)) - { - $next_offset = $offset + $display; - $tpl->assign("NEXT_OFFSET", $next_offset); - $tpl->parse("main.posts.next"); - } - - if (($offset - $display) >= 0) - { - $prev_offset = $offset - $display; - $tpl->assign("PREV_OFFSET", $prev_offset); - $tpl->parse("main.posts.prev"); - } - $tpl->parse('main.posts'); -} -else { - $tpl->parse('main.no_posts'); -} - -$tpl->parse('main.home'); -$tpl->parse('main'); -$tpl->out('main'); - - -// close db connection -mysql_close (); -?> +<?php +require ('include/admin.inc.php'); + +$tpl = new XTemplate ('templates/manage_comment_users.tpl.htm'); + +$offset = 0; +if (isset($_GET['o'])) $offset = $_GET['o'] + 0; + +$delete = 'n'; +if (isset($_GET['d']) && $_GET['d'] == 'y') $delete = 'y'; + + + + + + + + +if ($delete == 'y') + $tpl->parse('main.deleted'); + + + + + +$display = 10; + +$posts = posts_list ($offset, $display); + +if ($posts) { + + for ($cnt = 0; $cnt < count($posts); $cnt++) { + + if ($cnt % 2) + $tpl->assign('BGCOLOR', '#ffffff'); + else + $tpl->assign('BGCOLOR', '#efefef'); + + $posts[$cnt]['post_mail_from'] = htmlentities(antispam($posts[$cnt]['post_mail_from'])); + $posts[$cnt]['post_mail_date'] = strftime('%D %T',$posts[$cnt]['post_mail_date']); + if ( $posts[$cnt]['post_mail_subject'] == ""){ + // need to to strip html incase we break across a tag + $title = filter_html($posts[$cnt]['post_mail_body']); + $posts[$cnt]['post_mail_subject'] = substr($title,0,150) ."..." ; + } + + $tpl->assign('POST', $posts[$cnt]); + $tpl->parse('main.posts.post'); + } + + $howmany = posts_howmany(); + + $tpl->assign("OFFSET", $offset); + $tpl->assign("FIRST", $offset + 1); + $tpl->assign("LAST", $offset + $cnt); + $tpl->assign("TOTAL", $howmany); + + if ($howmany > ($offset + $display)) + { + $next_offset = $offset + $display; + $tpl->assign("NEXT_OFFSET", $next_offset); + $tpl->parse("main.posts.next"); + } + + if (($offset - $display) >= 0) + { + $prev_offset = $offset - $display; + $tpl->assign("PREV_OFFSET", $prev_offset); + $tpl->parse("main.posts.prev"); + } + $tpl->parse('main.posts'); +} +else { + $tpl->parse('main.no_posts'); +} + +$tpl->parse('main.home'); +$tpl->parse('main'); +$tpl->out('main'); + + +// close db connection +mysql_close (); +?> |