HEX
Server: Apache
System: Linux iad1-shared-e1-19 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User: austral3d (14892361)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: /home/austral3d/fourdplan.com/php/editar_noticia.php
<?php
require('conexion2.php');

session_start();
if ($_SESSION == NULL ){
	session_destroy();
	echo'<script>
	alert("Acceso denegado.")
	self.location="../index.php"
	</script>';		
}
$id = $_GET['id'];

$consulta = mysql_query("select * from noticias where id = $id");
$noticia = mysql_fetch_array($consulta);
?>
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<link href="../css/sti.css" rel="stylesheet">
		<link href="../css/bootstrap.min.css" rel="stylesheet">
		<meta name="author" content="">
		<link rel="icon" href="../img/fdp.ico">
		<title>Fourdplan</title>
		<link href="../css/bootstrap.min.css" rel="stylesheet">
		<link href="../css/ie10-viewport-bug-workaround.css" rel="stylesheet">
		<link href="../ccs/jumbotron.css" rel="stylesheet">
		<script src="../js/ie-emulation-modes-warning.js"></script>
		<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
		<script src="../js/bootstrap.min.js"></script>
	</head>
	<body>
		<div class="content">
			<nav class="navbar navbar-inverse navbar-fixed-top">
			  <div class="container-fluid">
				<!-- Brand and toggle get grouped for better mobile display -->
				<div class="navbar-header">
				  <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
					<span class="sr-only">Toggle navigation</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				  </button>
				  <a class="navbar-brand" ><img src="../img/logo90x19.png"  class="img"/></a>
				</div>
				<!-- Collect the nav links, forms, and other content for toggling -->
				<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">				  
				  <ul class="nav navbar-nav">	
					<li><a href="../index.php"><span class="glyphicon glyphicon-home" aria-hidden="true"></span> Inicio<span class="sr-only">(current)</span></a></li>
				  </ul>				  
				  <!--Derecha barra-->
				  <ul class="nav navbar-nav navbar-right">
					<?php require("barrasuperior.php");?>
					<li role="presentation"><a><span class="glyphicon glyphicon-user" aria-hidden="true"></span> <?php if($_SESSION){echo $_SESSION['nombre'];}?></a></li>							
					<li class="dropdown">
					  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="glyphicon glyphicon-list" aria-hidden="true"></span><span class="caret"></span></a>
					  <ul class="dropdown-menu">				  
					  <?php 
							if($lenguaje){
							?>
								<li><a href="cerrar_session.php">Cerrar sesion</a></li>
								<li><a href="notificaciones.php">Ingles</a></li>
							<?php
								}else{
							?>
								<li><a href="cerrar_session.php">Log Out</a></li>
								<li><a href="notificaciones.php?&lenguaje=true">Spanish</a></li>
							<?php 
								}
							?>
					  </ul>
					</li>					
				  </ul>
				</div><!-- /.navbar-collapse -->
			  </div><!-- /.container-fluid -->
			</nav>				
				<br><br><br><br>

			<div class="container">								
				<form method="POST" action="update_noticia.php">
				  <div class="form-group">
					<label for="exampleInputEmail1">Titulo</label>
					<input type="text" class="form-control" name="titulo" value="<?php echo $noticia[1]?>"/>
					<input type="hidden" name="id" value="<?php echo $noticia[0]?>">
					<input type="hidden" name="fecha" value="<?php echo $noticia[3]?>">
				  </div>
				  <div class="form-group">
					<label>Noticia</label>
					<textarea class="form-control" rows="3" name="noticia"><?php echo $noticia[2]?></textarea>
				  </div>
				  <button type="submit" class="btn btn-default">Editar</button>
				  <input type="button" class="btn btn-default" name="Cancelar" value="Cancelar" onClick="location.href='noticias.php'"> 
				</form>
				
				
			</div>
		</div>		
		<?php require("pie.php");?>		
  </body>
</html>