<?php 
if(!isset($_SESSION["logado"]) == 1) {
	exit('<div class="box_conteudo">Voc&ecirc; n&atilde;o pode acessar esta p&aacute;gina</div>');
}
else{
$cargo = mssql_fetch_row(mssql_query("select cargo from ct_equipe where login='".$_SESSION["login"]."'"));
if($cargo[0] < 2) {
	exit('<div class="box_conteudo">Voc&ecirc; n&atilde;o tem benef&iacute;cio para acessar esta p&aacute;gina</div>');
}
else{
?>
<!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>Untitled Document</title>
</head>

<body>
<div class="about-team-page-top-wrap" style="padding-bottom: 0px; margin-top: -5px;">
    <div class="top-title" style="width: 100%;">
        <h2 style="color: #fff; font-size: 30px; margin-left: 30px; border-color: darkgray;">Adicionar Noticia.</h2>
    </div>
</div>
<div class="match-list-wrap">
<br />
<br />
<table width="100%" border="0" cellspacing="2" cellpadding="2">
  <tr>
    <td width="20%" align="right" style="color: #FFF">Personagem:</td>
    <td width="80%"><label>
      <select name="add_char" id="add_char">
      <?php 
	  $char = mssql_query("select name from character where accountid='".$_SESSION["login"]."'");
	  for($i=0;$i<mssql_num_rows($char);$i++) {
		$pega = mssql_fetch_row($char);
		echo '<option value="'.$pega[0].'">'.$pega[0].'</option>';
	}
	  ?>
      </select>
    </label></td>
  </tr>
  <tr>
    <td align="right" style="color: #FFF">Título:</td>
    <td><label>
      <input name="add_titulo" type="text" id="add_titulo" maxlength="100" />
    </label></td>
  </tr>
  <tr>
    <td align="right" style="color: #FFF">Comentário:</td>
    <td><label>
      <select name="add_comentario" id="add_comentario">
      <option value="">Selecione</option>
      <option value="0">Aberto</option>
      <option value="1">Fechado</option>
      </select>
    </label></td>
  </tr>
  <tr>
    <td align="right" style="color: #FFF">Mensagem:</td>
    <td><label>
      <textarea name="add_noticia" id="add_noticia" cols="45" rows="5"></textarea>
    </label></td>
  </tr>
  <tr>
    <td align="right" style="color: #FFF">&nbsp;</td>
    <td><label>
      <input type="submit" name="add" id="add" onclick="loading('?go=comentar&add=true'+'&add_char='+document.getElementById('add_char').value+'&add_titulo='+document.getElementById('add_titulo').value+'&add_comentario='+document.getElementById('add_comentario').value+'&add_noticia='+document.getElementById('add_noticia').value, 'adicionar');" value="Adicionar notícia" />
    </label><br />
<br /><div id="adicionar" style="color: #FFF"></div></td>
  </tr>
</table>
</div>

</body>
</html>
<? }} ?>