#native_company# #native_desc#

Graffitti Code

By Halit YESIL
on November 18, 2005

Version: 1.1.1

Type: Full Script

Category: Other

License: Other

Description: Allows a small line of text to be modified by the user – which is then included in your webpage – so it allows a small amount of INteractivity.

It includes full logging – and the option to dynamically include the text in any PHP page by using the include command wiht the path to the file specified


function graffitti_fns($graffitti)
	$filecurr = "currmsg.include";
	$filelog = "graf.logit";	
	$graffitti = htmlentities($graffitti);
      $newfile = fopen($filecurr, "w+");
    if(!($newfile = fopen($filecurr, "w"))){ return false; }	
    if(!fwrite($newfile, $graffitti)){ return false; }	
    if(!fclose($newfile)){ return false; }	
    if(!($newfile1 = fopen($filelog, "a+"))){ return false; }	
    $add = "%".date("F jS Y g:i:s a T")."#".$_SERVER['REMOTE_ADDR']."#".$graffitti."n";
	if(!fwrite($newfile1, $add)){ return false; }	
	if(!fclose($newfile1)){ return false; }
	return true; 

if($edit == "yes"){

  if($_POST['graffitti'] == ""){
     display_html_graffitti_form('Sorry - You entered nothing in the text box', 'red');
	$graffitti = $_POST['graffitti'];
		echo "<h2>Nothing!</h2>";
		echo "<h2>Thankyou!</h2>";
	display_html_graffitti_form('<big><big>Graffitti!</big></big>', 'black');