<?php
session_start();

include "../phpscripts/config.php";
include "../phpscripts/valida_login.php";
include "../includes/topo.php"; 

$sql_tipos = mysql_query("SELECT * FROM tipos ORDER BY tipo ASC");

?>


        <ul class="breadcrumb">
          <li><a href="<?php echo sitei('ADM');  ?>">Home</a> <span class="divider">/</span></li>
          <li class="active">Adicionar projetos</li>
        </ul>

 <form class="form-horizontal" method="post" action="adiciona.php">
        <fieldset>
          <div class="control-group">
            <label class="control-label" for="input01">Nome do projeto</label>
            <div class="controls">
              <input type="text" class="input-xlarge" name='nome' >
            </div>
          </div>
          <div class="control-group">
            <label class="control-label" for="input02">Slug</label>
            <div class="controls">
              <input type="text" class="input-xlarge" name='slug' >
              <input type="hidden" class="input-xlarge" name='pos' value='0' >
            </div>
          </div>
         


          <input type="hidden" name="views" value="0" />


           <div class="control-group">
            <label class="control-label" >Visibilidade </label>
            <div class="controls">
            Ativo  <input type="radio" class='check' name='status' value='1' checked="checked" />
            Intaivo <input type="radio" class='check' name='status' value='0' />           
        </div>
       
          </div> 

           <div class="control-group">
            <label class="control-label" for="input03">Categorias</label>
            <div class="controls" >


              <div class="well" style='overflow:auto;height:200px;width:276px;padding:7px'>
           
              <?php  while($line = mysql_fetch_assoc($sql_tipos)){  ?>
              <label class="checkbox">

              <input type="checkbox" class="input-xlarge" name='categoria[]' value="<?php echo $line['id']; ?>"><?php echo $line['tipo']; ?><br />
              </label>
              <?php  } ?>
          

              </div>


            </div>
          </div> 



          <div class="control-group">
            <label class="control-label" for="textarea">Descrição do Projeto</label>
            <div class="controls">
              <textarea class="input-xxlarge" id="myArea2" name="descricao" rows="10"></textarea>
            </div>
          </div>



          <div class="form-actions">
            <button type="submit" class="btn btn-primary">Salvar</button>
            <a class="btn btn-warning pull-right" href="index.php">Voltar</a>
          </div>



        </fieldset>
      </form>

      <script src="http://js.nicedit.com/nicEdit-latest.js" type="text/javascript"></script>
    <script type="text/javascript">
      //<![CDATA[
      var area1;

      function toggleArea1() {
      
            area1 = new nicEditor({fullPanel : true}).panelInstance('myArea2',{hasPanel : true});

      }


      bkLib.onDomLoaded(function() { 
      
          new nicEditor({buttonList : ['fontFormat','bold','italic','underline','strikeThrough','subscript','superscript','html','image','link','ul']}).panelInstance('myArea2');
      
      toggleArea1(); });

      //]]>
      </script>

 

<?php include "../includes/rodape.php"; ?>
