<?php include 'concha.php';?>
<?php include 'lang_es_no_panel.php';?>

<?php $titulo = "$nombresitio / $lang_programacion";
include 'arriba_full.php'
?> 
<div class="news-summary col-lg-8 col-md-8 col-sm-12 col-12 " >

<div class="widget-head">
    <h3 <? if ($estiloweb <= 3){echo 'style="padding: 1px 5px 1px 5px; background-color:'; echo $d_color_fondo_menu; echo ';font-family:'; echo $style_titulo; echo ';font-size:25px;color:#ffffff;"'; } else {echo 'class="widget-title"';} ?>>
        <span><? echo $asdasd ?>PUBLICAR UN AVISO NUEVO</span>
    </h3>
</div>

    <div class="col-12">


          
          <?php  $IDC = $_POST['IDC']; ?>

              <form action="publicar1.php" method="post">

                <div align="center">

                  <?php   if ($IDC == 150) { echo "TIENE QUE ELEGIR UNA CATEGORIA <br> <a href='publicar1.php'>VOLVER</a>";  exit;}; ?>

                  <select name="IDC" class="Estilo41" id="IDC">

                    <?



if ($IDC == NULL) {



  ?>

                    <option value="150" selected="selected">Seleccione una categor&iacute;a -&raquo;</option>

                    <?



include('concha.php');



mysql_connect ("$host", "$usuario", "$contra");



mysql_select_db ("$basedatos");







$sql = "SELECT * FROM cla_categorias ORDER BY nombre";







$consulta = mysql_query ($sql);



while ($row = mysql_fetch_array($consulta))



{



$ID = $row["ID"];



$nombre = $row["nombre"];



?>

                    <option value="<?php echo $ID ?>"><?php echo $nombre ?></option>

                    <?







}



mysql_free_result($consulta); } else {



include('concha.php');



echo $IDC;







mysql_connect ("$host", "$usuario", "$contra");



mysql_select_db ("$basedatos");







$sql = "SELECT * FROM cla_categorias WHERE ID = '$IDC'";







$consulta = mysql_query ($sql);



while ($row = mysql_fetch_array($consulta))



{



$ID = $row["ID"];



$nombre = $row["nombre"];



?>

                    <option value="<?php echo $ID ?>"><?php echo $nombre ?></option>

                    <?







}



mysql_free_result($consulta); }



?>

                  </select>

                  <?php if ($IDC == NULL) { ?>

                  <input name="button" type="submit" class="Estilo41" id="button" value="OK" />

                  <? } else {?>

                  <?php };?>

                </div>

              </form>

           

                <?php if ($IDC == NULL) {} else { ?>


         

            <form action="publicar2.php" method="post">

                <div align="center">

                  <select name="IDS" class="Estilo41" id="IDS">

                    <option value="000" selected="selected">Seleccione una sub-categor&iacute;a -&raquo;</option>

                    <?







include('concha.php');



mysql_connect ("$host", "$usuario", "$contra");



mysql_select_db ("$basedatos");







$sql = "SELECT * FROM subcategorias where IDC = '$IDC' ORDER BY nombresub";







$consulta = mysql_query ($sql);



while ($row = mysql_fetch_array($consulta))



{



$IDS = $row["ID"];



$nombresub = $row["nombresub"];



?>

                    <option value="<?php echo $IDS ?>"><?php echo $nombresub ?></option>

                    <?







}



mysql_free_result($consulta); } ?>

                  </select>

                  <?php if ($IDC == NULL) {} else {?>

                  <input name="button2" type="submit" class="Estilo41" id="button2" value="OK" />

                  <?php }?>

                </div>

            </form>



</div>
<?php include 'abajo_full.php'; ?>


