$id_news)); print_result_message ($result, __('Successfully deleted'), __('Could not be deleted')); } // Main form view for Links edit if ((isset ($_GET["form_add"])) || (isset ($_GET["form_edit"]))) { if (isset($_GET["form_edit"])) { $creation_mode = 0; $id_news = (int) get_parameter ("id_news", 0); $result = get_db_row ("tnews", "id_news", $id_news); if ($result !== false) { $subject = $result["subject"]; $text = $result["text"]; $author = $result["author"]; $timestamp = $result["timestamp"]; } else { echo "

".__('Name error')."

"; } } else { // form_add $creation_mode = 1; $text = ""; $subject = ""; $author = $config['id_user']; } // Create news echo "

".__('Pandora Setup')." » "; echo __('Site news management')."

"; echo ''; echo ''; if ($creation_mode == 1) echo ""; else echo ""; echo ""; echo ''; echo ''; echo "
'.__('Subject').' '; echo '
'.__('Text').'
"; echo ""; echo "
"; echo '
'; } else { // Main list view for Links editor echo "

".__('Pandora Setup')." » "; echo __('Site news management')."

"; echo ""; echo ""; echo ""; echo ""; echo ""; $sql = 'SELECT * FROM tnews ORDER BY timestamp'; $result = mysql_query ($sql); $color = 1; while ($row=mysql_fetch_array($result)){ if ($color == 1) { $tdcolor = "datos"; $color = 0; } else { $tdcolor = "datos2"; $color = 1; } echo ""; echo ""; echo ""; echo ''; } echo "
".__('Subject')."".__('Author')."".__('Timestamp')."".__('Delete')."
".$row["subject"]."".$row["author"]."".$row["timestamp"]."
"; echo ""; echo "
"; echo "
"; echo ""; echo "
"; } ?>