git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_Intranet/trunk/src@1 e2b1556b-49f8-d141-9351-52d6861a72d9
59 lines
1.5 KiB
PHP
59 lines
1.5 KiB
PHP
<?php
|
|
|
|
include("seguridad.php");
|
|
include("functions.php");
|
|
|
|
if(!$_SESSION["oid"]){
|
|
header("Location: aplicacion.php?e=permiso");
|
|
}
|
|
|
|
$action="";
|
|
if($_POST['action']!=""){
|
|
$action=$_POST['action'];
|
|
} else {
|
|
if($_GET['action']!=""){
|
|
$action=$_GET['action'];
|
|
}
|
|
}
|
|
|
|
include_once("html/cabecera.php");
|
|
|
|
$errores=array();
|
|
switch ($action) {
|
|
case "edit":
|
|
$oid = stripinput($_POST["oid"]);
|
|
$viejo = stripinput($_POST["viejo"]);
|
|
$nuevo = stripinput($_POST["nuevo"]);
|
|
$confirmar = stripinput($_POST["confirmar"]);
|
|
$usuario = $_SESSION["usuario"];
|
|
if($usuario->setPassword($viejo, $nuevo, $confirmar)){
|
|
$mensaje=$locale['4037'];
|
|
$tipomsg="ok";
|
|
}else{
|
|
$mensaje=$locale['4036'];
|
|
$tipomsg="error";
|
|
}
|
|
break;
|
|
}
|
|
?>
|
|
<h2><?php echo $locale['713']; ?></h2>
|
|
<?php
|
|
if($mensaje!=""){
|
|
// Mostramos el mensaje
|
|
echo "<div class=\"aviso ".$tipomsg."\">".$mensaje."</div>";
|
|
}
|
|
|
|
?>
|
|
<br>
|
|
<form action="password.php" method="post"><table>
|
|
<input type="hidden" name="oid" value="<?php echo $_SESSION["oid"];?>">
|
|
<tr><td><?php echo $locale['1571'];?></td><td><input type="password" name="viejo"></td></tr>
|
|
<tr><td><?php echo $locale['1572'];?></td><td><input type="password" name="nuevo"></td></tr>
|
|
<tr><td><?php echo $locale['1573'];?></td><td><input type="password" name="confirmar"></td></tr>
|
|
<input type="hidden" name="action" value="edit">
|
|
<tr><td align="center" colspan="2"><input type="submit" class="button" value="<?php echo $locale['ac'];?>"></td></tr>
|
|
</form></table>
|
|
<?php
|
|
include_once("html/pie.php");
|
|
?>
|