/* ======================================================================================== * WMNews Version 0.3 * Another PHP & MySQL driven News Publishing system * * Filename : wmnprint.php * Description : Part of WMNews, printable news viewer * Last Updated : Tuesday, November 25, 2003 11:14:23 AM * Latest Version : http://wartamikael.org/PHPScripts/ * * Copyright (c) 2001-2003 Rudy S. Ingga (toekangweb@wartamikael.org). All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ======================================================================================== */ /* ----------------------------------------- * * Tables, configuration and library we need * * ----------------------------------------- */ $article_catfile = "WMNCat"; $article_file = "WMNArticle"; $members_file = "WMLMembers"; if(!isset($config)){ include("config/config.php"); } if(!isset($lib_lib)){ include("libs/lib-wmlib.php"); } /* ---------------- * * Begin the action * * ---------------- */ if(!isset($ArtID)){ $ArtID = GetLast(); } if($ArtID){ $get_news = mysql_query("SELECT * FROM $article_file LEFT JOIN $article_catfile ON ($article_catfile.ArtCat=$article_file.ArtCat) LEFT JOIN $members_file ON ($members_file.MbID=$article_file.ArtPostBy) WHERE $article_file.ArtID='$ArtID' LIMIT 0,1", $db); if(mysql_num_rows($get_news) > 0){ $get_row = mysql_fetch_array($get_news); $pretty_time = pretty_time($get_row[ArtDate],1); $content = $get_row[ArtMsg]; $article_title = $get_row[ArtTitle]; $img_to_show_full = ""; $pictalign_desc = Combo_Box_Desc(array("left", "right"), $get_row[ArtPictA]); if($get_row[ArtPictF] != ""){ $img_to_show_full = ""; }else{ if($get_row[ArtFull] != ""){ $img_to_show_full = ""; } } if($get_row[MbEmail] != ""){ $u_realname = "$get_row[MbName]"; }else{ $u_realname = $get_row[MbName]; } // --- dari bawah!
$article_title - $pretty_time ($T_POSTBY: $u_realname) $article_title $content
[$site_title]
EOF;
$upd_print = mysql_query("UPDATE $article_file SET ArtPrint=ArtPrint+1, ArtDate =ArtDate WHERE ArtID='$ArtID'", $db);
}else{
$detail = << $T_NEWS $T_NOEXISTS!
$get_row[ArtLead]
$detail = <<
$img_to_show_full
$get_row[ArtLead]