<?

/*
FlexCMS (http://www.flexcms.com)
Flexible, Powerful, Affordable.

Contents of this file are protected by the copyright
notice found at http://www.flexcms.com/flex/pages/copyright.html,
and its usage is subject to the terms of the licensing agreement 
available at http://www.flexcms.com/flex/pages/license.html
*/



	// ========================================================================================
	// Edit Smilie
	// ========================================================================================
	
	$PageTitle = '<img src="'.$ImagesURL.'/admin/admincp_settings.gif" width="23" height="20"> '.$MsgText[0][412];
	$BrowserTitle = $MsgText[0][412];
	$LocationBar = '<a href="'.$IndexURL.'">'.$MsgText[0][1].'</a> > <a href="' . $MainURL . '/options.html">'.$MsgText[0][4].'</a> > <a href="' . $MainURL . '/admin/smilies.html">'.$MsgText[0][60].'</a> > '.$MsgText[0][412];
	
	if ($LoggedIn == 'y') {
		
		ReadPermissions();
		Global $Permissions;
		
		if ($Permissions[15] == 'y') {
				
			$query = "select * from `".$Settings['DBPrefix']."core-Smilies` where RecordNumber=".intval($Arguments3)." limit 1";
			$result = mysql_query($query) or die (mysql_error());
			
			$row = mysql_fetch_array($result);			
			
			
			$HiddenSelected[$row['Hidden']] = ' selected';
			$EnabledSelected[$row['Enabled']] = ' selected';
			
			
			
			$PageContents .= '<form action="'.$MainURL.'/admin/smilies-editsave" method="post"><input type="hidden" name="SmilieToEdit" value="'.$row['RecordNumber'].'"><b>'.$MsgText[0][399].':</b><br><input type="text" name="Name" size="25" value="'.str_replace('"','&#3'.'4;',$row['Description']).'"><br><br><b>'.$MsgText[0][400].':</b><br><input type="text" name="Filename" size="50" value="'.str_replace('"','&#3'.'4;',$row['ImageLink']).'"><br><font size="1">('.$MsgText[0][406].')<br></font><br><b>'.$MsgText[0][402].':</b><br><input type="text" name="InsertCode1" size="5" value="'.str_replace('"','&#3'.'4;',$row['InsertCode']).'">&nbsp;&nbsp;&nbsp;<input type="text" name="InsertCode2" size="5" value="'.str_replace('"','&#3'.'4;',$row['InsertCode2']).'">&nbsp;&nbsp;&nbsp;<input type="text" name="InsertCode3" size="5" value="'.str_replace('"','&#3'.'4;',$row['InsertCode3']).'">&nbsp;&nbsp;&nbsp;<input type="text" name="InsertCode4" size="5" value="'.str_replace('"','&#3'.'4;',$row['InsertCode4']).'">&nbsp;&nbsp;&nbsp;<input type="text" name="InsertCode5" size="5" value="'.str_replace('"','&#3'.'4;',$row['InsertCode5']).'"><br><br><b>'.$MsgText[0][408].'</b><br><select name="Hidden">
	<option value="0"'.$HiddenSelected[0].'> '.$MsgText[0][119].'</option>
	<option value="1"'.$HiddenSelected[1].'> '.$MsgText[0][118].'</option>
</select><br><br><b>'.$MsgText[0][409].'</b><br><select name="Enabled">
	<option value="1"'.$EnabledSelected[1].'> '.$MsgText[0][118].'</option>
	<option value="0"'.$EnabledSelected[0].'> '.$MsgText[0][119].'</option>
</select>
<br><br><b>'.$MsgText[0][404].':</b><br><input type="text" name="SmilieOrder" size="5" value="'.$row['SmilieOrder'].'">
<br><br><br><input type="submit" value="'.$MsgText[0][123].'"></form>';
			
	
	
		}
		else {
		
			$PageContents = $MsgText[0][97];
		
		}

	}
	else {
	
		RedirectToLogin();
	
	}
	

	// ========================================================================================




?>
