Location: PHPKode > projects > NetLink > netlink_os/save_page.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 

<html>
<head>
<?php
echo "<title>";
extract($_GET);
echo "Saving $file...";
echo "</title>";
?>
</head>
<body>
<style type="text/css">
<!--
.save
{
  font-size:10pt;
	
}
-->
</style>

<?php

extract($_POST);
$source  = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n\n<html>\n<head>\n<title>";
$source .= $title."</title>\n</head>\n\n<body>\n";
$source .= "<span style='font-family:".$F_FACE.", arial, serif; font-size:".$F_SIZE."pt'>\n".$input1."\n</span>\n</body>\n</html>";
if (isset($view))
{
	echo "<fieldset style='font-family:lucida console, courier new, serif; font-size:8pt;'><legend>Source Code</legend>";
	echo nl2br(htmlentities($source));
	echo "</fieldset>";
}
#Open File
extract($_SESSION);
$set = "Users/$user/".$file;
$f = fopen($set,"w");
//chmod($set, 0766);

#Put Code into File
if (!($f))
{
	echo "<span id='error'>ERROR</span><br/><br/>Could not open file...";
	exit;	
}

fwrite($f,$source);

#close File
fclose($f);

echo "<h3><b>$file</b> saved!</h3>";
echo "<a href='edit.php?file=$file' class='save'>Go Back and Edit $file</a>";
echo "<br/><br/>";

echo "<a href='Users/$user/$file' class='save' target='_blank'>View <b>$file</b></a>";

echo "<br/><br/>";
echo "<a href='main.php?id=cms' class='save'>Back to <b>Site Manager</b></a>";
?>
</body>
</html>
Return current item: NetLink