<?php
session_start();
include("../includes/connect.php"); 
include("../includes/func.php");?>
<?include('editor_inc.php')?>
<title>You can Edit Template Here</title>

<link href="images/class.css" rel="stylesheet" type="text/css">
<SCRIPT language=JavaScript src="include/yusasp_ace.js"></SCRIPT>
<SCRIPT language=JavaScript src="include/yusasp_color.js"></SCRIPT>
<tr>
		<td align="center" class="BlackAri12B"><table width="95%"  border="0" align="left" cellpadding="2" class="bgExtraLightGray" cellspacing=2>
		<form name="frm" method=post onsubmit="return assignvalue(this);">
		
			<tr>
			    <td valign="top" bgcolor="#FFFFFF" class="LabelBold"><B>File Name </B><br><font class="text"><small>(Example myfile.html or myfile.txt)</small></td>
			    <td bgcolor="#FFFFFF" class="BlackNormal"><input name="file_name" type="text" size="35" maxlength="100" value=""></td>
			    <td valign="top" class="note">&nbsp;</td>
			</tr>
			<tr>
			    <td class="text">&nbsp;<B>Body :</B></td>
			    
      <td class="BlackNormal">&nbsp;<font size=2 color=red><B>(Uncheck HTML CheckBox Before Saving Your Work)</B></td>
			    <td class="BlackNormal">&nbsp;</td>
			</tr>

<tr>
	<td colspan=3>
		<SCRIPT>
			var ArticleObj = new ACEditor("ArticleObj")
			ArticleObj.width = "99%"
			ArticleObj.height = 350
			ArticleObj.useStyle = false
			ArticleObj.useAsset = false
			ArticleObj.useImage = false
			ArticleObj.usePageProperties = false
			ArticleObj.isFullHTML = false;
			ArticleObj.RUN()
		</SCRIPT>
		<table border=0 cellspacing=0 cellpadding=0 valign=top align=center>
		
		<DIV style="VISIBILITY: hidden"><TEXTAREA name=txt rows=5 cols=10>
		</TEXTAREA></DIV></TD></TR>
		
		<tr><td valign=top><input type="hidden" name="finaltxt" value="">
		<input name="savefile" type="submit" value="   Save File   "></td></tr>
		<tr>
			    <td align=left valign="top" bgcolor="#FFFFFF" class="LabelBold"><B>File will be saved to Template/ directory on server </B></td>
			   
			</tr>
		</table>
	</td>
</tr>
			
		</form>
		</table></td>
	</tr>
</table>
</body>
</html>
<SCRIPT language=javascript>

	ArticleObj.putContent(document.frm.txt.value);

</SCRIPT>
<script>
	function assignvalue()
	{
		if (frm.file_name.value == "") {
			alert("Please Enter File name.");
			frm.file_name.focus();
			return (false);
		}

		//alert (ArticleObj.getContentBody());
		document.frm.finaltxt.value = ArticleObj.getContentBody();
		return (true);
	}
</script>
