/*************************************************************************** Jupiter Content System @ Highstrike.net Copyright (C) 2005 Cosmin Flavius (highstrike@gmail.com) 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. More Info About The Licence At http://www.gnu.org/copyleft/gpl.html Hack module code messed up by Harley, harleyquine@gmail.com :D ****************************************************************************/ switch($a) { //----------------------------------------------------------------- // View Add article Form //----------------------------------------------------------------- case 1: //----------------------------------------------------------------- // Restrict guests/users/moderators //----------------------------------------------------------------- if(isset($is_guest) || isset($is_user) || isset($is_moderator)) header("location: $PHP_SELF?i=2"); //----------------------------------------------------------------- // Show the Form //----------------------------------------------------------------- ?>
break; //----------------------------------------------------------------- // Add article to database //----------------------------------------------------------------- case 2: //----------------------------------------------------------------- // Restrict guests/users/moderators //----------------------------------------------------------------- if(isset($is_guest) || isset($is_user) || isset($is_moderator)) header("location: $PHP_SELF?i=2"); //----------------------------------------------------------------- // Upload File/Show error if file not ok //----------------------------------------------------------------- if(!@copy ($_FILES['add_file']['tmp_name'], "images/articles/".$_FILES['add_file']['name'])){ if($_FILES['add_file']['tmp_name']){ echo "Error | ||||
Could not upload image ".$_FILES['add_file']['name']." Please make sure you have permission to upload to images/articles (CHMOD 777) |
| |||
|
{$article['article_name']}$show_author | {$article['hit_count']} Reads |
Articles"; if(isset($is_administrator) || isset($is_webmaster)) { echo " [ Add article ]"; } echo " |
Article List |
|