<?
	include("head.php");
	include("../include/db.inc.php");
	include("../include/pager.php");
	//include("function.php");	
	$db1=new db;
    $db1->open();mysql_query("SET NAMES 'utf8'");

	if($_SESSION['uid']=='' || $_SESSION['pwd']=='')
	{
		//header("location:login.php");
	}
	
	if($_GET['hid'])
	{
	$h_id=$_GET['hid'];
	mysql_query("delete from hotspot where id='$h_id'");
	mysql_query("delete from hotspot_img where hotid='$h_id'");
	}
	
	if($_GET['feature'])
	{
	mysql_query("update hotspot set featured='1' where id=$_GET[feature]");	
	}
	
	if($_GET['nonfeature'])
	{
	mysql_query("update hotspot set featured='0' where id=$_GET[nonfeature]");	
	}
	
	
   $query="select id,name,location,featured from hotspot";
	$res1=mysql_query(dopaging($query,10))or die(mysql_error());

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Money-Auctions Administion Console</title>
<link href="index.css" rel="stylesheet" type="text/css" />
<link href="style.css" rel="stylesheet" type="text/css">
<script language="JavaScript">

	function viewhotspot(id){
		window.open('hotspot_description.php?id='+id,'','scrollbars,width=920,height=700,top=5,left=180');		
	}
	
	
</script>
</head>
<body >
<div class="admin_wrapper">
<div class="logo_show"><? include("minorlogout.php");?></div>
<div style="float:left; width:200px">
<div class="topg_links_show"><? include("left.php");	?></div>
<div class="top_links_show"><? include("belowleft1.php");	?></div></div>
<div style="float:left; width:800px">
<div class="maximum">
<!--::::::::::::::::::::::::::::::::::::::::::::::::::::::::::header starts:::::::::::::::::::::::::::::::::::::::::::::::::::::-->



<!-- ImageReady Slices (apanel.psd) -->


  
 
    

<table  width="99%" border="0" cellpadding="0" cellspacing="0" class="bodytxt">
  <tr> 
    <td width="15" valign="top">&nbsp;</td>
          <td width="968" valign="top"><br> 
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="bodytxt">
        <tr> 
          <td width="33" valign="top"><img src="img/03.gif" width="33" height="23"></td>
                  
                <td background="img/bg01.gif"><strong> HOTSPOT LIST </strong></td>
          <td width="35"><img src="img/04.gif" width="35" height="23"></td>
        </tr>
      </table>
      <table width="100%" border="0" cellpadding="0" cellspacing="0" class="bodytxt">
        <tr> 
          <td width="22" height="185" valign="top" background="img/tbl-left04.gif">
          <img border='0' src="img/tbl-left04.gif" width="22" height="13"></td>
          <td width="939" align="center" valign="top"><br>
		
		<div align="right" style="height:15px; margin-right:100px"><a href="add_hotspot.php">Add Hotspot</a></div>
		<table width="91%" border="1" cellpadding="1" cellspacing="1" style="border-collapse:collapse; border-color:#FED267">
  <tr bgcolor="#FED267" style="padding-left:10px;color:#FFFFFF">
    <td width="7%" style="padding-left:30px;">S.N.</td>
    <td width="21%">Name</td>
    <td width="11%">Location</td>
    <td width="11%">Edit</td>
    <td width="11%">Add to Featured </td>
    <td width="11%">Delete</td>
  </tr>
  <?  $x=1;
  while($rec=mysql_fetch_array($res1)){ ?>
  <tr<?php /*?> <? if($x%2==0)echo 'bgcolor="#E6E4E3"';?><?php */?> height="20px" onMouseOver="this.style.backgroundColor='#FFECBF'" onMouseOut="this.style.backgroundColor='#ffffff'">
    <td align="center"><?=$x?></td>
	<td ><? echo '<a href="javascript:viewhotspot('.$rec['id'].')" class="link11">'.$rec[name].'</a>'?></td>
    
    <td><?=$rec[location]?></td>
    <td><a href="add_hotspot.php?editid=<?=$rec[id]?>">edit</a></td>
    <td>
	<? if($rec['featured']==0){ ?>
	<a href="list_hotspot.php?feature=<?=$rec[id]?>">Add to Featured</a>
	<? }
	else
	 { ?>
	<a href="list_hotspot.php?nonfeature=<?=$rec[id]?>">Remove from Featured</a>
	<? }?>	</td>
    <td><a href="list_hotspot.php?hid=<?=$rec[id]?>" onClick="return confirm('Are you sure to delete this hotspot?')">delete</a></td>
  </tr>
  <? $x=$x+1; }?>
  <tr height="30px"><td colspan="6" align="center"><?=rightpaging();?></td></tr>
</table>

	   
	    <!--End Main Body-->		</td>
          <td width="19" valign="top" background="img/tbl-right04.gif"> <img src="img/tbl-right04.gif" width="19" height="9" /></td>
        </tr>
      </table>
      <table width="100%" border="0" cellpadding="0" cellspacing="0" class="bodytxt">
              <tr> 
                <td width="33"><img src="img/tbl-bot01.gif" width="33" height="12"></td>
                <td  width="709" align="right" background="img/tbl-bg.gif"></td>
                <td width="33"><img src="img/tbl-right05.gif" width="35" height="12"></td>
              </tr>
            </table>
      </td>
  </tr>
  
</table></div></div>
  <div class="bottom_links_show"><? include("footer.php");	?></div>
<!--::::::::::::::::::::::::::::::::::::::::::::::::::::::::::footer ends:::::::::::::::::::::::::::::::::::::::::::::::::::::-->
</body>
</html>




