******************/ //DEBUGMODE error_reporting(E_ALL ^ E_NOTICE); global $HTTP_GET_VARS, $HTTP_SERVER_VARS; //variables if(!isset($HTTP_GET_VARS["id"])){ $id = "";}else{$id = $HTTP_GET_VARS["id"];} function randstr($length = 32) { $str = ""; mt_srand((double)microtime()*10000); for($i=0;$i<$length;$i++) { $x = mt_rand(1,3); $str .= (($x == 1) ? chr(mt_rand(48,57)) : (($x == 2) ? chr(mt_rand(65,90)) : chr(mt_rand(97,122)))); } return $str; } function geturl(){ global $HTTP_SERVER_VARS; $this_url = ""; if( isset($HTTP_SERVER_VARS['HTTP_REFERER']) ) $this_url = str_replace( "/installer.php", "", $HTTP_SERVER_VARS['HTTP_REFERER']); if ( ! $this_url && isset($HTTP_SERVER_VARS['SCRIPT_NAME']) ){ $this_url = substr( $HTTP_SERVER_VARS['SCRIPT_NAME'],0, -14 ); if ($this_url == ''){ $this_url == '/'; } return this_url; } } function getpath(){ $path = dirname(__FILE__); //if ( substr($path, 0, 1) <> "/" ) //$path = substr($path, 2, strlen($path)); return str_replace("\\", "/", $path)."/"; } $serverurl = $HTTP_SERVER_VARS['SERVER_NAME']; $fullurl = geturl(); $path = getpath(); $file = "./installer.php"; function valid_email($email) { // Returns true if email address has a valid form. $pattern = "^[-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\.)+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$"; if(eregi($pattern, $email)) return true; else return false; } //start if($id == ""){ /*id Step 1*/ $title = "fusion install"; $datum = date("l dS of F Y h:i:s A",time()); //$p = $HTTP_SERVER_VARS["SCRIPT_FILENAME"]; if(!is_writeable($path)) @chmod("$path", 0777); if(is_writeable($path)){ $chmodcheck = "This folder ('$path') seems to have the right chmod settings (777)!"; }else{ $chmodcheck = "Please chmod '$path' to 777!"; } $content = << REQUIRES PHP4+, IE4+ or NS4+ or Mozilla Greetings,

Thank you for choosing Fusion News v3.6, one of the leading newsmanagement scripts.
Our only goal is to have happy users, so if you encounter any problems with this script, from installing to uninstalling it, you can always receive help from the Fusion team and some devoted Fusion script users.

Some links:
How to install

Before you continue you need to make sure all files/folders are in the same folder as this installer file. After you did that you can continue since the installer will try to CHMOD the files for you. If this fails you will need to do this manually.

The following list will guide you:


$chmodcheck
CHMOD TO
the folder in which these files are and all subfolders 777
index.php, comments.php, functions.php, send.php 755
badwords.txt, config.php, jsfunc.js, language.db, users.php, news.php, banned.php, flood.php, headlines.php

also

=> all files in all subfolders to 666 <=

666

Let's try to CHMOD: 

html; }elseif($id == "step2"){ /*id Step 2*/ $allclear = true; $filescleared = true; $maplist = array($path, $path.'smillies', $path.'img', $path.'plugins', $path.'news', $path.'templates', $path.'uploads'); $filelistwrite = array('config.php','users.php','banned.php','news.php','smillies.db', 'flood.php','headlines.php','banned.php','badwords.txt','news/toc.php','news/news.1.php','jsfunc.js','language.db'); $filelistexec = array('templates/arch_fullnews_temp.php','templates/arch_news_temp.php','templates/com_footer.php', 'templates/com_fulltemp.php','templates/com_header.php','templates/com_temp.php', 'templates/footer.php','templates/fullnews_temp.php','templates/header.php', 'templates/headline_temp.php','templates/news_temp.php','templates/sendtofriend_temp.php', 'templates/news_a_day_temp.php',); $debug = "Summary of the tests made using the information you entered in the previous form.
NOTE: If some files are not chmodded properly, do so through FTP and refresh this page.

Files access:
Files are being checked on accessibility and on existence.

"; sort($maplist); $debug .= ""; foreach($maplist as $val){ $debug .= ""; if(!is_writeable($val)) @chmod("$val", 0777); if(@is_writable($val)) { $debug .= ""; }else{ $debug .= ""; $allclear = false; $filescleared = false; } } $debug .= ""; sort($filelistwrite); $debug .= ""; foreach($filelistwrite as $val){ $debug .= ""; if(!@is_writable($path.$val)) @chmod("$path$val", 0666); if(@is_writable($path.$val)) { $debug .= ""; }else{ if(file_exists($path.$val)) $debug .= ""; else $debug .= ""; $allclear = false; $filescleared = false; } } $debug .= ""; sort($filelistexec); $debug .= ""; foreach($filelistexec as $val){ $debug .= ""; if(!@is_writable($path.$val)) @chmod("$path$val", 0777); if(@is_writable($path.$val)) { $debug .= ""; }else{ if(file_exists($path.$val)) $debug .= ""; else $debug .= ""; $allclear = false; $filescleared = false; } } $debug .= ""; $debug .= ""; $filelistread = array('plugins/check_chmod.php','comments.php','functions.php','index.php', 'archive.php','send.php','fullnews.php', 'upload.php', 'search.php'); sort($filelistread); foreach($filelistread as $val){ $debug .= ""; if(@is_readable($path.$val)) @chmod("$path$val", 0755); if(@is_readable($path.$val)) { $debug .= ""; }else{ if(file_exists($path.$val)) $debug .= ""; else $debug .= ""; $allclear = false; $filescleared = false; } } $debug .= "
All files located in: $path

All folders need to be CHMODDED to 0777
Can write to folder '$val':yes
no
 
All these datafiles need to be CHMODDED to 0666
Can write to '$path$val':yes
no
not uploaded
 
All these templatefiles need to be CHMODDED to 0777
Can execute/write to '$path$val':yes
no
not uploaded

All these scriptfiles need to be CHMODDED to 0755
Can execute '$val':yes
no
not uploaded
"; if($allclear == false){ $title = "setup interupted"; $content = "$debug

setup failed
Errors recieved during installation:


"; if($filescleared == false) $content .= "Invalid pathname, files missing or not properly CHMODed. Upload missing filesize or CHMOD filesize through FTP."; }else{ $title = "Files installed"; $content = <<Files installed and accesslevels succesfully set.
html; } }elseif($id == "step3"){ /*id Step 3*/ $title = "Set settings (* mandatory)"; $datum = date("l dS of F Y h:i:s A",time()); $content = <<
url to your site:*
url to the fusion folder:* (make sure the url to your fusion news folder is correct)
path to the fusion folder:* (trailing slash required in path only)

admin info

login:*
DON'T LOSE YOUR PASSWORD, IMPOSSIBLE TO RETRIEVE IT
password:*
confirm password:*
nickname:*
email:*
  Hide email?
Current Server Time: $datum
time offset:
icon url:
   
Now you get the option to choose in which kinda way your login info is stored while being logged in into the control panel.
Some servers have problems saving session info, some have problems saving cookies. Normally both ways work.
If you're not familliar with the differences between cookies and sessions, it's recomended to use sessions.
login options sessions (recommended, stores login info on the server, "more secure" and only allows you to stay logged in aslong as the browser window is open)
cookies (stores login info on the users pc, makes it possible to stay logged for any given time)
html; }elseif($id == "step4"){ /*id Step 4*/ $site1 = $HTTP_POST_VARS["site1"]; $furl1 = $HTTP_POST_VARS["furl1"]; $fpat = $HTTP_POST_VARS["fpat"]; $username = $HTTP_POST_VARS["username"]; $password = $HTTP_POST_VARS["password"]; $password2 = $HTTP_POST_VARS["password2"]; $nickname = $HTTP_POST_VARS["nickname"]; $email = $HTTP_POST_VARS["email"]; $offset = $HTTP_POST_VARS["offset"]; $icon = $HTTP_POST_VARS["icon"]; $cookies = $HTTP_POST_VARS["login"]; if( !$offset || $offset == "") $offset = '0'; $title = "Save settings"; $allclear = true; $debuginfo = "
User info:
Checking if given info is valid.

"; $debuginfo .= ""; if($site1 != ""){ $debuginfo .= ""; }else{ $debuginfo .= ""; $allclear = false; } $debuginfo .= ""; if($furl1 != ""){ $debuginfo .= ""; }else{ $debuginfo .= ""; $allclear = false; } $debuginfo .= ""; if($username != ""){ $username = preg_replace("|<|", "|>|", $username); $debuginfo .= ""; }else{ $debuginfo .= ""; $allclear = false; } $debuginfo .= ""; if($password != ""){ $password = preg_replace("|<|", "|>|", $password); $debuginfo .= ""; }else{ $debuginfo .= ""; $allclear = false; } $debuginfo .= ""; if($password2 != ""){ $password2 = preg_replace("|<|", "|>|", $password2); $debuginfo .= ""; }else{ $debuginfo .= ""; $allclear = false; } $debuginfo .= ""; if($password2 == $password && $password != ""){ $debuginfo .= ""; }else{ $debuginfo .= ""; $allclear = false; } $debuginfo .= ""; if($nickname != ""){ $nickname = preg_replace("|<|", "|>|", $nickname); $debuginfo .= ""; }else{ $debuginfo .= ""; $allclear = false; } $debuginfo .= ""; if($email != ""){ if(valid_email($email)){ $debuginfo .= ""; }else{ $debuginfo .= ""; $allclear = false; } }else{ $debuginfo .= ""; $allclear = false; } $debuginfo .= "
Valid url to your site:yes
no
Valid url to your newsmap:yes
no
Valid username:yes
no
Valid password:yes
no
Valid confirmed password:yes
no
Passwords compare:yes
no
Valid nickname:yes
no
Valid email:yes
no
no

NOTE: if you used the following combination of chars, |<|, in any of the fields, they were converted to |>|.
"; if($allclear == false){ $title = "setup interupted"; $content = "$debuginfo

setup failed
Errors recieved during installation:


"; $content .= "Required fields left blank or wrongly filled out. go back"; }else{ //what to write $save = ""; $config = $fpat."config.php"; $configfile = fopen($config,"w"); fputs($configfile,$save); fclose($configfile); //what to write $users = $fpat."users.php"; $fp=fopen($users,"w"); $password = md5($password); if (isset($HTTP_POST_VARS["showemail"])){$showemail = "checked";}else{$showemail = "";} fwrite($fp,"\n$username|<|$nickname|<|$showemail=$email|<|$icon|<|$offset|<|$password|<|3|<|\n"); fclose($fp); $title = "Setup complete"; $content = "$debuginfo
Files installed and accesslevels succesfully set.
You can now login as an administrator. Login here to customize your Fusion News manager, many options can be set to your liking.

DON'T FORGET TO DELETE THIS INSTALLER.PHP FILE."; } } ?> fusion - <?php echo $title;?>
Site hosted by Angelfire.com: Build your free website today!

Welcome to Fusion News v3.6.
We use up-to-date programs, and coding procedures.
If you have any questions please Contact us

We recommend these 2 links for help on using Fusion News:
faq.fusionphp.net manual.fusionphp.net


powered by FusionPHP