All pastes #2075762 Raw Edit

Stuff

public text v1 · immutable
#2075762 ·published 2011-06-06 21:30 UTC
rendered paste body
<?php
//$_SERVER['REMOTE_ADDR']." - ".$_SERVER['HTTP_USER_AGENT']." - ".date('[j/F/Y:G:i:s]', time() + 28800).", "."base.swf:page02"."<br>";

$lala = $_SERVER['REMOTE_ADDR']." - ".$_SERVER['HTTP_USER_AGENT']." - ".date('[j/F/Y:G:i:s]', time() + 28800).", "."base.swf:". $_POST['page'] . "<br>";

$logger = @fopen('logger.txt', 'w');

	if ($logger) {
		fwrite($logger, $lala);
		fclose($logger);
		echo('status=OK');
		
	} else {
		
	echo('status=' . urlencode('Could not open file for writing.'));
} ;



//$_POST['name'] = 'Richie Rich';
//$_POST['email'] = 'rr@rich.com';
//$_POST['comments'] = 'I am Richie Rich.';

// use foreach to loop out the values of the $_POST array
foreach ($_POST as $key => $value) {
    // loop through the array and store the result in $received
	$received .= "$key = $value\r\n";
}



	$somethingnew1 = "<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>
<html xmlns=http://www.w3.org/1999/xhtml>
<head>
<meta http-equiv=Content-Type content=text/html; charset=UTF-8 />
<title>Untitled Document</title>
<style type=text/css>
<!--
body {
	margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
	padding: 0;
	text-align: center;
	font-family: Arial;
	font-size: 9pt;
	background-image: url(file:///hello/Users/sexplorer/Desktop/localhost/RIA_A1/images/bg.png);
	color: #798fa1;
}
table {
	margin-bottom: 60px;
}
#container {
	width: 780px;
	text-align: left;
	border-top-style: none;
	border-right-style: none;
	border-bottom-style: none;
	border-left-style: none;
	margin-top: 0;
	margin-right: auto;
	margin-bottom: 0;
	margin-left: auto;
	padding-top: 200px;
}
#header {
	padding-top: 0;
	padding-right: 10px;
	padding-bottom: 0;
	padding-left: 20px;
	margin-bottom: 20px;
}
#mainContent {
	padding: 0 20px;
}
#mainContent h1 {
	font-size: 18pt;
	font-style: normal;
	text-decoration: none;
}
#titleOne {
	font-size: 24pt;
	color: #455c6d;
}
#linkOne {
	font-size: 16pt;
	color: #455c6d;
}
#linkOne a {
	text-decoration: none;
	color: #033;
	font-size: 12pt;
	padding: 0px;
}
#linkOne a:link {
	color: #333;
	text-decoration: none;
}
#linkOne a:active {
	color: #F66;
	text-decoration: none;
}
#linkOne a:hover {
	color: #F33;
	text-decoration: none;
}
#linkOne a:visited {
	color: #455C6D;
	text-decoration: none;
}
#footer {
	padding: 0 10px;
	background-color: #768386;
}
#footer p {
	margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
	padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
	color: #FFF;
}
#footer p a {
	text-decoration: none;
	color: #033;
	padding: 0px;
}
#footer p a:link {
	color: #333;
	text-decoration: none;
}
#footer p a:active {
	color: #F66;
	text-decoration: none;
}
#footer p a:hover {
	color: #F33;
	text-decoration: none;
}
#footer p a:visited {
	color: #455C6D;
	text-decoration: none;
}
-->
</style></head>

<body>

<div id=container>
  <div id=header>
    <img src=file:///hello/Users/sexplorer/Desktop/localhost/RIA_A1/images/myspace.png width=262 height=70 alt=Myspace.img />
<!-- end #header --></div>
  <div id=mainContent>
  
  <table width=720 border=0 cellspacing=0 cellpadding=0>
  <tr>
    <td height=25>".$_POST['date']."</td>
  </tr>
  <tr>
    <td><div id=titleOne>".$_POST['title']."</div></td>
  </tr>
  <tr>
    <td height=150>".$_POST['comment']."</td>
  </tr>
  <tr>
    <td height=20>
    <div id=linkOne>
    	<a href=".$_POST['link'].">".$_POST['link']."</a>
    </div>
  </td>
  </tr>
  <tr>
    <td height=20>
    <div id=linkOne>
    	<a href=".$_POST['link'].">".$_POST['link']."</a>
    </div>
    </td>
  </tr>
    <tr>
    <td height=25>
    <div id=linkOne>
    	<a href=".$_POST['link'].">".$_POST['link']."</a>
    </div>
    </td>
  </tr>
</table>
   
  <!-- end #mainContent --></div>

<!-- end #container --></div>
  <div id=footer>
    <p>Designed by<a href=http://www.facebook.com/lijiachopfingers> Lijia Boo</a>, 2011</p>
<!-- end #footer --></div>
</body>
</html>
";

    $somethingnew2 = "<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>
<html xmlns=http://www.w3.org/1999/xhtml>
<head>
<meta http-equiv=Content-Type content=text/html; charset=UTF-8 />
<title>Untitled Document</title>
<style type=text/css>
<!--
body {
	margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
	padding: 0;
	text-align: center;
	font-family: Arial;
	font-size: 9pt;
	background-image: url(file:///hello/Users/sexplorer/Desktop/localhost/RIA_A1/images/bg.png);
	color: #798fa1;
}
table {
	margin-bottom: 60px;
}
#container {
	width: 780px;
	text-align: left;
	border-top-style: none;
	border-right-style: none;
	border-bottom-style: none;
	border-left-style: none;
	margin-top: 0;
	margin-right: auto;
	margin-bottom: 0;
	margin-left: auto;
	padding-top: 200px;
}
#header {
	padding-top: 0;
	padding-right: 10px;
	padding-bottom: 0;
	padding-left: 20px;
	margin-bottom: 20px;
}
#mainContent {
	padding: 0 20px;
}
#mainContent h1 {
	font-size: 18pt;
	font-style: normal;
	text-decoration: none;
}
#titleOne {
	font-size: 24pt;
	color: #455c6d;
}
#linkOne {
	font-size: 16pt;
	color: #455c6d;
}
#linkOne a {
	text-decoration: none;
	color: #033;
	font-size: 12pt;
	padding: 0px;
}
#linkOne a:link {
	color: #333;
	text-decoration: none;
}
#linkOne a:active {
	color: #F66;
	text-decoration: none;
}
#linkOne a:hover {
	color: #F33;
	text-decoration: none;
}
#linkOne a:visited {
	color: #455C6D;
	text-decoration: none;
}
#footer {
	padding: 0 10px;
	background-color: #768386;
}
#footer p {
	margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
	padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
	color: #FFF;
}
#footer p a {
	text-decoration: none;
	color: #033;
	padding: 0px;
}
#footer p a:link {
	color: #333;
	text-decoration: none;
}
#footer p a:active {
	color: #F66;
	text-decoration: none;
}
#footer p a:hover {
	color: #F33;
	text-decoration: none;
}
#footer p a:visited {
	color: #455C6D;
	text-decoration: none;
}
-->
</style></head>

<body>

<div id=container>
  <div id=header>
    <img src=file:///hello/Users/sexplorer/Desktop/localhost/RIA_A1/images/myspace.png width=262 height=70 alt=Myspace.img />
<!-- end #header --></div>
  <div id=mainContent>
  
  <table width=720 border=0 cellspacing=0 cellpadding=0>
  <tr>
    <td height=25>".$_POST['date']."</td>
  </tr>
  <tr>
    <td><div id=titleOne>".$_POST['title']."</div></td>
  </tr>
  <tr>
    <td height=150>".$_POST['comment']."</td>
  </tr>
  <tr>
    <td height=20>
    <div id=linkOne>
    	<a href=".$_POST['link'].">".$_POST['link']."</a>
    </div>
  </td>
  </tr>
  <tr>
    <td height=20>
    <div id=linkOne>
    	<a href=".$_POST['link'].">".$_POST['link']."</a>
    </div>
    </td>
  </tr>
    <tr>
    <td height=25>
    <div id=linkOne>
    	<a href=".$_POST['link'].">".$_POST['link']."</a>
    </div>
    </td>
  </tr>
</table>
   
  <!-- end #mainContent --></div>

<!-- end #container --></div>
  <div id=footer>
    <p>Designed by<a href=http://www.facebook.com/lijiachopfingers> Lijia Boo</a>, 2011</p>
<!-- end #footer --></div>
</body>
</html>
";

	$somethingnew3 = "<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>
<html xmlns=http://www.w3.org/1999/xhtml>
<head>
<meta http-equiv=Content-Type content=text/html; charset=UTF-8 />
<title>Untitled Document</title>
<style type=text/css>
<!--
body {
	margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
	padding: 0;
	text-align: center;
	font-family: Arial;
	font-size: 9pt;
	background-image: url(file:///hello/Users/sexplorer/Desktop/localhost/RIA_A1/images/bg.png);
	color: #798fa1;
}
table {
	margin-bottom: 60px;
}
#container {
	width: 780px;
	text-align: left;
	border-top-style: none;
	border-right-style: none;
	border-bottom-style: none;
	border-left-style: none;
	margin-top: 0;
	margin-right: auto;
	margin-bottom: 0;
	margin-left: auto;
	padding-top: 200px;
}
#header {
	padding-top: 0;
	padding-right: 10px;
	padding-bottom: 0;
	padding-left: 20px;
	margin-bottom: 20px;
}
#mainContent {
	padding: 0 20px;
}
#mainContent h1 {
	font-size: 18pt;
	font-style: normal;
	text-decoration: none;
}
#titleOne {
	font-size: 24pt;
	color: #455c6d;
}
#linkOne {
	font-size: 16pt;
	color: #455c6d;
}
#linkOne a {
	text-decoration: none;
	color: #033;
	font-size: 12pt;
	padding: 0px;
}
#linkOne a:link {
	color: #333;
	text-decoration: none;
}
#linkOne a:active {
	color: #F66;
	text-decoration: none;
}
#linkOne a:hover {
	color: #F33;
	text-decoration: none;
}
#linkOne a:visited {
	color: #455C6D;
	text-decoration: none;
}
#footer {
	padding: 0 10px;
	background-color: #768386;
}
#footer p {
	margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
	padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
	color: #FFF;
}
#footer p a {
	text-decoration: none;
	color: #033;
	padding: 0px;
}
#footer p a:link {
	color: #333;
	text-decoration: none;
}
#footer p a:active {
	color: #F66;
	text-decoration: none;
}
#footer p a:hover {
	color: #F33;
	text-decoration: none;
}
#footer p a:visited {
	color: #455C6D;
	text-decoration: none;
}
-->
</style></head>

<body>

<div id=container>
  <div id=header>
    <img src=file:///hello/Users/sexplorer/Desktop/localhost/RIA_A1/images/myspace.png width=262 height=70 alt=Myspace.img />
<!-- end #header --></div>
  <div id=mainContent>
  
  <table width=720 border=0 cellspacing=0 cellpadding=0>
  <tr>
    <td height=25>".$_POST['date']."</td>
  </tr>
  <tr>
    <td><div id=titleOne>".$_POST['title']."</div></td>
  </tr>
  <tr>
    <td height=150>".$_POST['comment']."</td>
  </tr>
  <tr>
    <td height=20>
    <div id=linkOne>
    	<a href=".$_POST['link'].">".$_POST['link']."</a>
    </div>
  </td>
  </tr>
  <tr>
    <td height=20>
    <div id=linkOne>
    	<a href=".$_POST['link'].">".$_POST['link']."</a>
    </div>
    </td>
  </tr>
    <tr>
    <td height=25>
    <div id=linkOne>
    	<a href=".$_POST['link'].">".$_POST['link']."</a>
    </div>
    </td>
  </tr>
</table>
   
  <!-- end #mainContent --></div>

<!-- end #container --></div>
  <div id=footer>
    <p>Designed by<a href=http://www.facebook.com/lijiachopfingers> Lijia Boo</a>, 2011</p>
<!-- end #footer --></div>
</body>
</html>
";



// open a file for writing<hr />
// here when ever you write a new form, it will overwrite the text file.

if ($_POST['page']=="1") {
	$printout = @fopen('example1.html', 'w'); 
} else if ($_POST['page']=="2") {
	$printout = @fopen('example2.html', 'w');
} else {
	$printout = @fopen('example3.html', 'w');
}

// if open successful

	
if ($printout) {

    // write
    if ($_POST['page']=="1") {
    	fwrite($printout, $somethingnew1);
	
	} else if ($_POST['page']=="2") {
		fwrite($printout, $somethingnew2); 
	
	} else {
		fwrite($printout, $somethingnew3); 
	}
	
	
	
    // close file
    fclose($printout);
	
    // echo status to Flash
    echo('status=OK');
	
	
    // open failed
} else {
    // echo status to Flash
    echo('status=' . urlencode('Could not open file for writing.'));
} ;







?>