<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: 			*/
// +----------------------------------------------------------------------+
// | PHP version 4/5                                                      |
// +----------------------------------------------------------------------+
// | Copyright (c) 2004-2008 ARMIA INC                                    |
// +----------------------------------------------------------------------+
// | This source file is a part of iScripts EasyCart                      |
// +----------------------------------------------------------------------+
// | Authors: Jipson<jipson.thomas@armiasystems.com>             		  |
// +----------------------------------------------------------------------+
?>
<script language="javascript" type="text/javascript">
function chk(){
	var errorstr = '';
	var msgstr = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n\n";
	with(document.Page)
	{ 	
		
		if (CmspageTitle.value == "") { errorstr += "- Please Enter Page Title.\n"; CmspageTitle.focus();}
		if (CmspageContent.value == "") { errorstr += "- Please Enter Page Content.\n"; CmspageContent.focus();}
	}	
	
	if (errorstr != '')
	{
		msgstr = msgstr + errorstr;
		alert(msgstr);
		return false;
	}
	else
	{
		return true;
	}
} 
</script>
<div align="center" class="admin_subheading">
   <div align="left">EDIT HELP CONTENTS</div>
     </div>

<?php if($session->check('Message.flash')) { ?><div id="okbox"><font color="#FF0000"><?php $session->flash(); ?></font></div><?php } ?>
<div align="left" id="item_details_admin" class="inner_content_area_admin_new">
							 <?php echo $fck->load(); ?> 
							<?php	echo $form->create('Help', array('name' =>'Help')); 	?>
							<table width="100%" border="0" cellpadding="0" cellspacing="0" class="manage_top" align="center">										
							</table>
							
							<table align="center" width="90%" cellpadding="2" cellspacing="2" class="form_table">							
							<tr>
							
							<td width="82%">Help Type</td>
							</tr>
							<tr>
							
							<td width="82%">
							<?php 
						     $types['A']='Admin';$types['U']='User';
					         echo $form->input('type', array('options' => $types,'label' => '','class' => 'box2_admin','selected' => $pagedet["Help"]["type"])); ?>
							 </td>
							</tr>
							<tr>
							
							<td width="82%">Title <span class="mandatory">*</span></td>
							</tr>
							<tr>
							
							<td width="82%"><?php echo $form->input('title', array('label' => '','class' => 'box2_admin','size'=>250));?></td>
							</tr>
							<tr>
							
							<td>Content <span class="mandatory">*</span></td>
							</tr>
							<tr>
							
							<td>
								<?php echo $form->input('content', array('rows' => '3','label' => '', 'value' => $pagedet["Help"]["content"])); ?>
								<?php	echo $fck->editor('Help/content');?> 
							</td>
							</tr>							
							<tr>
							<td align="center">			
							 
							 <input name="cancel" type="button" class="buttn_admin btn-input_grey" onClick="window.location.href = '<?php echo $form->url('/helps');?>';" value="Cancel" />
							 <input name="submit" type="submit" class="buttn_admin btn-input" value="Update" onClick="return chk();"/>
							 
							</td>
							</tr>
							<tr>
								<td>&nbsp;</td>
							</tr>
							</table>
							<?php echo $form->end(); ?>
				</div>
				 <div align="left" class="float_clear1"></div>
				</div>