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

################ Paging Starts From Here ##################
@extract($_REQUEST);
$start = (intval($start)==0 or $start=="")?$start=0:$start;
$pagesize = intval($pagesize)==0?$pagesize=10:$pagesize;

$heading="";
//$record_type="member";
$script_name="manage-city.php";
$table_name="city";

if($id=="set_top_business_category") {
	updateTable($table_name," hotstatus='Y', status='Y' where cityID='$recordID'");
	$_SESSION[session_message]=$record_type.' has been set as top business category successfully.';
	header("Location: ".SITE_ADMIN_URL."/".$script_name);
	exit;
}

if($id=="unset_top_business_category") {
	
	
	updateTable($table_name," hotstatus='N', status='Y' where cityID='$recordID'");
	$_SESSION[session_message]=$record_type.' has been unset as top business category successfully.';
	header("Location: ".SITE_ADMIN_URL."/".$script_name);
	exit;	
}

admin_header();
?>
<table width="100%"  border="0" cellpadding="0" cellspacing="2">
 <tr>
  <td align="center"><input type="button" class="button" value="Add New City" onclick="window.location.href='http://www.naturaltherapypages.in/sitepanel/add-new-city.php';"></td>
 </tr>
</table><br />
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" valign="top">

	 <form name="pg_form" action="<?=$PHP_SELF?>" method="post" style="margin:0px;padding:0px;">
	
	   <?

	$urlqry=mysql_query("select cityNAME,cityID,hotstatus,status from city where status='Y' ORDER BY cityID,cityID ASC");
    while($urlres=mysql_fetch_array($urlqry)) {
	$cityNAME=$urlres[cityNAME];
	$cityID=$urlres[cityID];

	
	//echo $memberID1;
	?>
	<tr  bgcolor="#f9f9f9">
	  <td align="left"></td>
	  <td align="left" class="">
	   <b><?=$cityNAME;?></b>
	   	  </td>
	 
	
	 
	  <td class="" align="left">
	   <?php
	   if ($urlres[hotstatus]=="N") {
		   ?>
		   <strong>No</strong>&nbsp;&nbsp;<a href="<?=SITE_ADMIN_URL?>/<?=$script_name;?>?id=set_top_business_category&recordID=<?=$cityID;?>"><strong>Set</strong></a>
		   <?php
	   }
	   else {
		   ?>
		   <strong>Yes</strong>&nbsp;&nbsp;<a href="<?=SITE_ADMIN_URL?>/<?=$script_name;?>?id=unset_top_business_category&recordID=<?=$cityID;?>"><strong>Unset</strong></a>
		   <?php
	   }
	   ?>
	  
	   <a href="http://www.naturaltherapypages.in/sitepanel/add-new-city.php?cityID=<?=$cityID;?>"><img src="http://www.naturaltherapypages.in/sitepanel/images/edit.gif" alt="Edit This Category" title="Edit This City" border="0"></a>
	   	   
	   	   &nbsp;<a href="http://www.naturaltherapypages.in/sitepanel/add-new-city.php?id=delete_record&cityID=<?=$cityID;?>" onClick="return confirm('Are you sure to delete this Category...');"><img src="http://www.naturaltherapypages.in/sitepanel/images/cancel.gif" alt="Delete This Category" title="Delete This Category" border="0"></a>
	   	  
	  </td>
	 </tr>
	 
	 <?
 }
	//header('Refresh: 0.1');      
	

     

?>
	
	<table width="100%"  border="0" cellpadding="0" cellspacing="2">
 <tr>
  <td align="center"><input type="button" class="button" value="Add New City" onclick="window.location.href='http://www.naturaltherapypages.in/sitepanel/add-new-city.php';"></td>
 </tr>
</table><br />
	   
</table>


<?php
admin_footer();	
exit;
?>