<?php
session_start();
include("config.php");
error_reporting(0);
include('funciones.php');
validacion_usuario($con);
include('include/head.php');
?>
</head>
<body>
<?php include("include/menu.php") ?>  
	<div class="container margin-top" >
		<div class="panel panel-info">
		    <div class="panel-heading">
		      <h3 class="panel-title">Nueva Noticia</h3>
		    </div>
		    <div class="panel-body">
	      		<form id="formulario_noticiasnuevo" name="formulario_noticiasnuevo" method="post" enctype="multipart/form-data">		        	
		        	<div class="row">
		        		<div class="col-sm-2">
		        			<a type="button" href="noticias.php" class="btn btn-primary">Ver lista de Noticias</a>
		        			<br><br>
		        		</div>
		        	</div>

		        	<div class="row"><div class="col-sm-12"><div class="alert alert-warning"> Se permiten imágenes de formato .jpg, .png </div></div></div>
		        	<div class="row">
		        		<div class="col-sm-12"><label for="imagen">Categoría de Noticias:</label></div>
		       		</div>
		       		<div class="row">	
					    <div class="col-sm-2">
							 <label class="radio-inline">
							      <input type="radio" name="categoria" value="1">Noticia
							</label>
						</div>
						<div class="col-sm-2">
							<label class="radio-inline">
							    <input type="radio" name="categoria" value="2">Evento
							</label>
						</div>	
						<div class="col-sm-2">
							<label class="radio-inline">
							    <input type="radio" name="categoria" value="3">Casos de Éxito
							</label>
						</div>
					</div>
	
					<br>
		            <div class="row">
		            	<div class="col-sm-12"><label for="imagen">Imágen Cabecera</label></div>
		            	<div class="col-sm-12"><div class="alert alert-warning">La imágen de cabecera debe tener un tamaño de 1170 x 450 px. La imágen debe tener un tamaño menor o igual a 120 kb.</div></div>
		            	<div class="col-sm-12"><input name="imagen_cabecera" type="file" id="imagen_cabecera" size="88"/></div>
		            </div>

					
					<br>
					<div class="row">
						<div class="col-sm-12"><label>Título</label></div>
						<div class="col-sm-12"><div class="alert alert-warning">El título debe tener un máximo de 80 caracteres.</div></div>
		                <div class="col-sm-12"><input class="form-control input-sm" type="text" name="titulo" id="titulo" maxlength="80" ></div>
					</div>

		            <br>
					<div class="row">
						<div class="col-sm-12"><label>Bajada</label></div>   
						<div class="col-sm-12"><div class="alert alert-warning">El texto de bajada debe tener un máximo de 163 caracteres.</div></div>
		                <div class="col-sm-12"><input class="form-control input-sm" type="text" value="" name="bajada" id="bajada" maxlength="163" ></div>
		            </div> 
					<br>

					<div class="row"> 
						<div class="col-sm-12">
						 	<textarea class="custom_ckeditor" name="cuerpo_interno" id="cuerpo_interno" rows="10" cols="80">
				                <p>On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will</p>
								<p>which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted.</p>
								<blockquote>
								<p>Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.</p>
								<p style="color: #777;font-size:1em;"><strong>Por:</strong> <strong>Paloma Martinez</strong></p>
								</blockquote>
								<p>Similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus.</p>
								<p>On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain.</p>
								<p>Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.</p>
				            </textarea>
						</div>
					</div>
  		 	
		            <br>
					<div class="row"><div class="col-sm-12"><label for="imagen">Imagen Interna</label></div></div>
		            <div class="row"><div class="col-sm-12"><div class="alert alert-warning">La imágen debe tener un tamaño menor o igual a 120 kb.</div></div></div>
		            <div class="row"><div class="col-sm-12"><input name="imagen_interna" type="file" id="imagen_interna" size="88" maxlength="170" /></div></div> 
   
		            <br>
		            <div class="row"><div class="col-sm-12"><label for="imagen">Keywords</label></div></div>  
		            <div class="row"><div class="col-sm-12"><input type="text" name="keywords"  id="keywords" class="form-control" /></div></div>   
		            <br> 
					<div class="row"><div class="col-sm-12"><label for="imagen">Imágen para redes</label></div></div> 
					<div class="row"><div class="col-sm-12"><div class="alert alert-warning">La imágen para redes debe tener un tamaño minímo de 200 x 200 px. La imágen debe tener un tamaño menor o igual a 120 kb.</div></div></div>
		            <div class="row"><div class="col-sm-12"><input name="imagen_redes" type="file" id="imagen_redes" size="88" /></div></div>

					<br>
					<div class="row"> 
						<div class="col-sm-12">
							<a class="btn btn-default" href="noticias.php" role="button">Regresar</a>
							<input class="submit btn btn-default" id="submitBtn" type="submit" value="Grabar"/>

						</div>				               
					</div>	
					<br>
					
					 <div class="row">    
                        <div class="col-sm-12">
                            <div id="cargando" class="alert alert-success" style="display:none; color: green;width:100%">Cargando...</div>
                            <div id="alertBoxes" style="width:100%"></div>              
                        </div>
                     </div>                     
				</form>
				
	           <div id="imgContainer_cabe">
	            </div>
	            <div id="imgContainer_redes">
	            </div>   

			</div>
		</div>
	</div>
	<script src="js/jqueryvalidation/jquery.js"></script>    
    <script type="text/javascript" src="js/ckeditor/function_ckeditor.min.js"></script>
    <?php include("include/footer.php");?>
    <script type="text/javascript" src="js/validation.js"></script>
    <?php
          include("include/ckeditor.php");
    ?>
    <script src="js/jqueryvalidation/jquery.validate.min.js"></script>
    <script src="js/jqueryvalidation/additional-methods.js"></script> 

	</body>
</html> 	