Código PHP:
<?php
session_start();
include('../../lib/conexion.php');
include('./lib/functions.php');
?>
<html>
<title>Indice</title>
<head>
<link href="../../imagenes/estetoscopio.png" rel="icon" type="image/x-icon" />
<link href="../../css/estilos.css" rel="stylesheet" type="text/css" />
<style type="text/css">
*{
margin: 0px;
padding: 0px;
}
#header{
margin: auto;
width: 500px;
font-family:Arial, Arial, Arial;
}
ul, ol{
list-style:none;
}
.nav > li {
float:left;
}
.nav li a {
background-color: #3A3838;
color: white;
text-decoration:none;
padding:10px 12px;
display:block;
border:0px;
}
.nav li a:hover{
background-color:#c21d1d;
}
.nav li ul{
display:none;
position:absolute;
min-width:140px;
}
.nav li:hover > ul{
display:block;
}
.nav li ul li ul{
right:-140px;
top:0px;
}
</style>
</head>
<body>
<table border="0" class="menu" cellpadding="0" cellspacing="0">
<tr>
<td style='border: inset 0pt' width="200" class=""><a href="http://www.forosdelweb.com/f18/index.php"><img height='40%' width='70%' src="http://www.forosdelweb.com/imagenes/corta2.png"><img height='40%' width='70%' src="http://www.forosdelweb.com/imagenes/SISGEOR.png"></a>
</td>
<td style='border: inset 0pt'><font color="#D61D3C" size="5">Bienvenido</font>
<div id="header">
<ul class="nav">
<li><a href="http://www.forosdelweb.com/f18/consejo/mostrar_con.php">Consejos Comunales</a>
<ul>
<li><a href="http://www.forosdelweb.com/f18/consejo/consultar_con.php">Consultar Consejos</a></li>
</ul>
</li>
<li><a href="mostrar_jor.php">Fechas</a>
</li>
<li><a href="#">Otras Gestiones</a>
<ul>
<li><a href="http://www.forosdelweb.com/f18/usuarios/mostrar_user.php">Gestion de Usuarios</a></li>
<li><a href="http://www.forosdelweb.com/f18/proceso/jornada_gen.php">Gestion de Jornadas Generadas</a></li>
</ul>
</li>
<li><a href="http://www.forosdelweb.com/f18/ayuda_admin.php"> <img height='18px' width='18px' src="http://www.forosdelweb.com/imagenes/interrogacion4.png"> </a></li>
</ul>
</div>
</td>
<td style='border: inset 0pt' width="200" class="">
<?php
if(isset($_SESSION['nombre'])){
if($_SESSION['privilegios']=='admin'){
?>
<?php
if (isset($_SESSION['nombre'])) {
?>
<?php
echo 'Bienvenido!!: '.$_SESSION['nombre'];
echo ' '.$_SESSION['apellido'];
}else{
echo "Tu estas en SISGEOR!";
}
?>
<?php
if(!isset($_SESSION['nombre'])){
?>
<?php
} else {
?>
<br><a href="logout.php"> Cerrar Sesion </a>
<?php
}
?>
<?php
}else{
echo '<script type="text/javascript">
alert("No tienes los suficientes privilegios para acceder a este lugar");
window.location.href="../../index.php";
</script>';
}
}else{
echo '<script type="text/javascript">
window.location.href="../../index.php"
</script>';
}
?>
</td>
</tr>
</table>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<center>
<div class="editar">
<br>
<h3>Agregar Jornada</h3>
<div>
<form Action="agregar_jor.php" method="post" enctype="multipart/form-data" onsubmit="">
<br><br>
<label for=""> Tipo: </label><br>
<select name="tipo">
<option value=""> selecione un tipo de jornada...</option><br>
<?php
$sql = "SELECT * FROM tipo";
$result = mysql_query($sql, conectar::conexion());
while($row = mysql_fetch_array($result)){
?>
<option value="<?php echo $row[1];?>"> <?php echo $row[1]; ?> </option>
<?php
}
?>
</select>
<br>
<br>
<label for=""> Fecha: (año/mes/dia)</label><br>
<input type="text" name="fecha" value="<?php echo date ('y/m/d')?> "/>
<br>
<br>
<label for=""> Estado: </label><br>
<select name="status">
<option>publicado</option>
<option>despublicado</option>
</select>
<br>
<br>
<br>
<input type="submit" value="agregar Jornada"/>
</form>
<?php
if($_POST){
$tipo = $_POST['tipo'];
$fecha = $_POST['fecha'];
$status = $_POST['status'];
$agregar = new fecha();
$agregar->agregar($tipo, $fecha, $status);
}
?>
</center>
</div>
</div>
</body>
</html>
como ya creo que vieron antes tengo este codigo que me trae unos datos de una base de datos para poder seleccionarlos y algunos tienen acentos y me aparece un signo de interrogacion.
Código PHP:
<?php
$sql = "SELECT * FROM tipo";
$result = mysql_query($sql, conectar::conexion());
while($row = mysql_fetch_array($result)){
?>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
o este
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
y no se soluciona esa parte en especifico
entonces coloco esto
Código PHP:
<?php
header('Content-Type: text/html; charset=ISO-8859-1');
$sql = "SELECT * FROM tipo";
$result = mysql_query($sql, conectar::conexion());
while($row = mysql_fetch_array($result)){
?>
y se soluciona pero me da error de ñ en esta parte (en la parte de la palabra año)
Código PHP:
<label for=""> Fecha: (año/mes/dia)</label><br>