Location: PHPKode > projects > Guestbook and Comment Box > gb_admin/guestbook/add_smiley.php
<?

/************************************

Script : Free Guest Book and comment box
Website : http://www.agrizlive.com

Script is provided Under GPU Non-Commercial License
Agrizlive.com doesn't provide any WARRANTY for this script
**************************************/

	if(defined('AGRIZ_FREE_SCRIPTS') && AGRIZ_FREE_SCRIPTS == "agrizlive.com"){
	}
	else{
		exit('You don\'t have access to this page');
	}
	
	include_once("functions/gb_functions.php");
	
	if(isset($_REQUEST['submit']) && !isset($_REQUEST['id']))
	{
		$title = addslashes($_REQUEST['title']);
		$short_cut = addslashes($_REQUEST['short_cut']);
		$image_name = $_FILES['smiley']['name'];
		$image_tmp = $_FILES['smiley']['tmp_name'];
		
		$t = addNewSmiley($title,$short_cut,$image_name,$image_tmp);
	}
	
	if(isset($_REQUEST['submit']) && isset($_REQUEST['id']))
	{
		$title = addslashes($_REQUEST['title']);
		$short_cut = addslashes($_REQUEST['short_cut']);
		$image_name = $_FILES['smiley']['name'];
		$image_tmp = $_FILES['smiley']['tmp_name'];
		
		$t = editSmiley($title,$short_cut,$image_name,$image_tmp,$_REQUEST['id']);
	}
	
	if(isset($_REQUEST['id'])){
		$value_smiley = getSmileyDetails($_REQUEST['id']);
	}
	
?>
<div id="box">
				<h3 id="adduser">Smiley <?=$t?></h3>
				<form id="form" action="" method="post" enctype="multipart/form-data">
				  <fieldset id="personal">
					<legend>INFORMATION</legend>
					<p>
						<label for="title">Name</label>
						<input type="text" name="title" value="<?=stripslashes($value_smiley['smiley_name'])?>" />
					</p>
					<p>
						<label for="short_cut">Short Cut</label>
						<input type="text" name="short_cut" value="<?=stripslashes($value_smiley['short_cut'])?>" />
					</p>
					<p>
						<label for="smiley">Image</label>
						<input type="file" name="smiley" />
					</p>
				</fieldset>
				<div align="center">
					<input id="button1" type="submit" value="Send" name="submit" /> 
					<input id="button2" type="reset" />
				</div>
			</form>		
</div>	
Return current item: Guestbook and Comment Box