<?
session_start();
include 'cnn.php';
@$login = $_SESSION['login'];
@$senha = $_SESSION['senha'];
if(!isset($_SESSION['login'])) { echo "Para acessar essa pagina é preciso esta logado!"; }
else{
$Gms = mssql_fetch_row(mssql_query("select painelgm from memb_info where memb___id='".$login."'"));
if($Gms[0] <= 0) { echo "Você não faz parte da Administração"; }
else{ 
?>



 <h1>Confirma de Vip </h1>
 <div class="quadros">
 <table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr bgcolor="#E2DEC5"> 
			    <td bgcolor="#CCCCCC"><b>Id</b></td>
                <td bgcolor="#CCCCCC"><b>Login</b></td>
                <td width="264" bgcolor="#CCCCCC"><b>Fun&ccedil;&atilde;o</b></td>
   </tr>
<?   
  $Query = mssql_query("select id, login, plano, dias, data, hora, cidadeestado, nterminal, ncontrole, valor from site_confirmav order by id desc");
  for($i=0;$i<mssql_num_rows($Query);$i++) {
  $rank = $i+1;
  $Array = mssql_fetch_row($Query);			  
	    if($i % 2)
{
$cor="#EDEBDC";
}
else
{
$cor="#EDEBDC";
}
if ($Array[1] == 0) { $status = "<font color='green'>Aberto</font>"; }
if ($Array[1] == 1) { $status = "<font color='#FF0000'>Fechado</font>"; }
  ?>
              <tr bgcolor="#EDEBDC"> 
			  <td width="21" bgcolor="#E5E5E5" <? echo" bgcolor='$cor'"; ?> > 
                  <strong>
                  <?=$Array[0]?>
                </strong></td>
<td width="669" bgcolor="#E5E5E5" <? echo" bgcolor='$cor'"; ?>> 
                  <?=$Array[1]?>                </td>
                <td bgcolor="#E5E5E5" <? echo" bgcolor='$cor'"; ?>>[<a href="index.php?go=ler_confirma&amp;id=<?=$Array[0]?>">Ler</a>]</td>
                <? 
		}
		}
		}
		?>
              </tr>
</table>
</div>