include_once($_SERVER['DOCUMENT_ROOT'].'/ireru/tmpl.php'); include_once($_SERVER['DOCUMENT_ROOT'].'/ireru/convertlinks.php'); include_once($_SERVER['DOCUMENT_ROOT'].'/ireru/db_f.php'); nocache(); $connection = &db_conn(1); // news management /* DROP TABLE IF EXISTS `nw_news`; CREATE TABLE `nw_news` ( `nw_id` smallint(3) NOT NULL auto_increment, `nw_head` varchar(12) NOT NULL default '', `nw_brief` varchar(255) NOT NULL default '', `nw_title` varchar(200) NOT NULL default '', `nw_text` text NOT NULL, `nw_order` smallint(3) NOT NULL, `nw_modified` timestamp(14) NOT NULL, PRIMARY KEY (`nw_id`) ) TYPE=MyISAM AUTO_INCREMENT=4 ; */ $varnames = array( 'nw_head', 'nw_brief', 'nw_title', 'nw_text', 'nw_order', 'nw_displaylevel' ); $nw_id = clean($_GET['nw_id'],3); foreach ($varnames AS $key => $value) { $fields[] = $value; } $fieldlist = implode(', ', $fields); $sql= 'SELECT '.$fieldlist.' FROM nw_news WHERE nw_id="'.$nw_id.'"'; if (!($result = @ mysql_query($sql, $connection))) {showerror(); } $this_news = @ mysql_fetch_array($result, MYSQL_ASSOC); tmpl1("Jane Ray"); tmpl2(); if (!$this_news['nw_title']) { $this_news['nw_title'] = $this_news['nw_head']; } echo '
'.convertLinks(nl2br($this_news['nw_text'])).'
'; echo ''; echo '