Save As in the menu and save as sspinstall.php # # # ###################################################################### error_reporting(E_ALL ^ E_NOTICE); extract($_POST); extract($_GET); $ssp="http://www.smartsitepublisher.dk/install/"; if ($download and $kodeord) { if (!file_exists("admin")) { if (!@mkdir("admin",0755)) { echo ("SmartSite Publisher does not have permission to write in ".$_SERVER[DOCUMENT_ROOT].". Change the owner of this dir to the www-user or change writing permissions (CHMOD 0777)."); exit; } } if (!file_exists("smartsiteinclude")) @mkdir("smartsiteinclude",0755); $tekst=@file_get_contents($ssp."sspcreate.php?url=".$_SERVER[HTTP_HOST]."&kodeord=$kodeord&sprog=$sprog&dev=$dev"); $fp=@fopen("ssp.php","w"); if ($fp) { fwrite($fp,$tekst); fclose($fp); header("location:ssp.php?kodeord=$kodeord&sprog=$sprog&dev=$dev"); exit; } else { $err="&chmod=nej"; } } if ($nytdir or $nytdefault or $laesdir) { if (preg_replace("/(?sim)http:\/\/(.*?)\/.*/","\\1",$_SERVER["HTTP_REFERER"])==$_SERVER["HTTP_HOST"]) { if ($nytdir) { @mkdir($nytdir,0755); header("location:admin/admin/".str_replace("***","&",$scriptname."forsoegtoprettet=1")); exit; } elseif ($laesdir) { $file_arr=""; $dirnavn="."; if (is_dir($dirnavn)) { $handle=opendir($dirnavn); while (($file = readdir($handle))!==false) { if (($file != ".") and ($file != "..") and (is_dir($dirnavn."/".$file))) { $file_arr.="file_arr[]=$file&"; } } }#print_r($file_arr); header("location:admin/admin/".$scriptname."?".$_SERVER["QUERY_STRING"]."&".$file_arr."&forsoegtvist=1"); exit; } else { $fp=fopen("index.php","w"); fwrite($fp,""); fclose($fp); header("location:".$nytdefault); } } } else { if ($_COOKIE["la"]) $la=$_COOKIE["la"]; else $la=substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2); if ($la) $la="&la=".$la; if ($dev) $dev="&dev=1"; if (function_exists("file_get_contents")) $txt=@file_get_contents($ssp."form.php?url=".$_SERVER[HTTP_HOST].$la.$err.$dev); if ($txt) echo $txt; else echo ("Your server does not allow file-transfer from other servers. Please download the zip-version of SmartSite Publisher from our homepage."); } ?>