<?php
include_once("../include/main.inc.php");
check_session('MyCpanel','index.php');

if($_POST[action]=="Update"){
	@extract($_POST);
	updateTable("homepage_pointer"," title1='$title1', title2='$title2', title3='$title3', title4='$title4', title5='$title5',title6='$title6',title7='$title7', description1='$description1', description2='$description2', description3='$description3', description4='$description4', description5='$description5',description6='$description6',description7='$description7' where web_type='1'");
	$_SESSION[session_message]="Records have been updated successfully";
	//header("Location:".SITE_ADMIN_URL."/home-pointer.php");

  $redirect_url = SITE_ADMIN_URL."/home-pointer.php";
        echo "<script>window.location.href='$redirect_url';</script>";
	exit;
}

$res=getResult("homepage_pointer"," where web_type='1'");
admin_header();
?>
<form name="form1" method="post" action="" onsubmit="return validate(this);">
<h5 align="center">Manage Homepage Pointer</h5>
<table width="39%" border="0" cellpadding="2" cellspacing="2" class="lightBorder" align="center">
 <?php
 if($_SESSION[session_message]!=""){
	 ?>
	 <tr><td colspan=3 class="lightGrayBg"><?php print_message();?></td></tr>
	 <?php
 }
 ?>
 <tr> 
  <td width="120" align="left" class="lightGrayBg"><span class="red">*</span>Pointer 1</td>
  <td colspan="2" align="center" class="lightGrayBg">:
    <input name="title1" type="text" class="txtfieldadmin" value="<?=$res[title1];?>" size="50" id="NOBLANK~Enter" placeholder="Title 1">
      <br/>
      <input name="description1" type="text" class="txtfieldadmin" value="<?=$res[description1];?>" size="50" id="NOBLANK~Enter" placeholder="Description 1">
     
     
     </td>
  </tr>
    
     <tr> 
  <td width="120" align="left" class="lightGrayBg"><span class="red">*</span>Pointer 2</td>
  <td colspan="2" align="center" class="lightGrayBg">:
    <input name="title2" type="text" class="txtfieldadmin" value="<?=$res[title2];?>" size="50" id="NOBLANK~Enter" placeholder="Title 2">
       <br/>
      <input name="description2" type="text" class="txtfieldadmin" value="<?=$res[description2];?>" size="50" id="NOBLANK~Enter" placeholder="Description 2">
     
     
     </td>
  </tr>
    
    <tr> 
  <td width="120" align="left" class="lightGrayBg"><span class="red">*</span>Pointer 3</td>
  <td colspan="2" align="center" class="lightGrayBg">:
    <input name="title3" type="text" class="txtfieldadmin" value="<?=$res[title3];?>" size="50" id="NOBLANK~Enter" placeholder="Title 3">
       <br/>
      <input name="description3" type="text" class="txtfieldadmin" value="<?=$res[description3];?>" size="50" id="NOBLANK~Enter" placeholder="Description 3">
    </td>
  </tr>
    
     <tr> 
  <td width="120" align="left" class="lightGrayBg"><span class="red">*</span>Pointer 4</td>
  <td colspan="2" align="center" class="lightGrayBg">:
    <input name="title4" type="text" class="txtfieldadmin" value="<?=$res[title4];?>" size="50" id="NOBLANK~Enter" placeholder="Title 4">
       <br/>
      <input name="description4" type="text" class="txtfieldadmin" value="<?=$res[description4];?>" size="50" id="NOBLANK~Enter" placeholder="Description 4">
    </td>
  </tr>
      <tr> 
  <td width="120" align="left" class="lightGrayBg"><span class="red">*</span>Pointer 5</td>
  <td colspan="2" align="center" class="lightGrayBg">:
    <input name="title5" type="text" class="txtfieldadmin" value="<?=$res[title5];?>" size="50" id="NOBLANK~Enter" placeholder="Title 5">
       <br/>
      <input name="description5" type="text" class="txtfieldadmin" value="<?=$res[description5];?>" size="50" id="NOBLANK~Enter" placeholder="Description 5">
    </td>
  </tr>
     <tr> 
  <td width="120" align="left" class="lightGrayBg"><span class="red">*</span>Pointer 6</td>
  <td colspan="2" align="center" class="lightGrayBg">:
    <input name="title6" type="text" class="txtfieldadmin" value="<?=$res[title6];?>" size="50" id="NOBLANK~Enter" placeholder="Title 6">
       <br/>
      <input name="description6" type="text" class="txtfieldadmin" value="<?=$res[description6];?>" size="50" id="NOBLANK~Enter" placeholder="Description 6">
    </td>
  </tr>
      <tr> 
  <td width="120" align="left" class="lightGrayBg"><span class="red">*</span>Pointer 7</td>
  <td colspan="2" align="center" class="lightGrayBg">:
    <input name="title7" type="text" class="txtfieldadmin" value="<?=$res[title7];?>" size="50" id="NOBLANK~Enter" placeholder="Title 7">
       <br/>
      <input name="description7" type="text" class="txtfieldadmin" value="<?=$res[description7];?>" size="50" id="NOBLANK~Enter" placeholder="Description 7">
    </td>
  </tr>
   
 <tr>
  <td align="right" class="lightGrayBg">&nbsp;</td>
  <td align="center" class="lightGrayBg">&nbsp;</td>
  <td align="left" class="lightGrayBg">
   <input type="hidden" name="action" value="Update">
   <input name="f2" type="submit" class="button" value="Submit">  </td>
 </tr>
</table>		
</form>
<?php
admin_footer();
exit;
?>