Incam_Intranet/administracion.php

393 lines
24 KiB
PHP
Raw Permalink Normal View History

<?php
include("seguridad.php");
include("functions.php");
if (!comprobar_permisos("AS")){
header("Location: aplicacion.php?e=permiso");
exit;
}
include_once("html/cabecera.php");
/* ADMINISTRACION.PHP */
echo "<h2>".$locale['200']."</h2>";
echo "<br/><br/>";
echo "<p><b>".$locale['201']."</b></p>";
$e = stripinput($_GET["e"]);
$a = stripinput($_GET["a"]);
$opcion = stripinput($_GET["opcion"]);
//Pesta<74>as de navegaci<63>n
echo '<ul id="tabnav">';
if($opcion != "perfil"){
echo "<li class='activo'>";
}else{
echo "<li class='inactivo'>";
}
echo "<a href='administracion.php?opcion=perfil'>".$locale['202']."</a></li>";
if($opcion != "tecnologia"){
echo "<li class='activo'>";
}else{
echo "<li class='inactivo'>";
}
echo "<a href='administracion.php?opcion=tecnologia'>".$locale['203']."</a></li>";
if($opcion != "estado"){
echo "<li class='activo'>";
}else{
echo "<li class='inactivo'>";
}
echo "<a href='administracion.php?opcion=estado'>".$locale['204']."</a></li>";
if($opcion != "estado_pedidos"){
echo "<li class='activo'>";
}else{
echo "<li class='inactivo'>";
}
echo "<a href='administracion.php?opcion=estado_pedidos'>".$locale['712']."</a></li>";
if($opcion != "estado_candidatura"){
echo "<li class='activo'>";
}else{
echo "<li class='inactivo'>";
}
echo "<a href='administracion.php?opcion=estado_candidatura'>".$locale['1807']."</a></li>";
if($opcion != "situacion"){
echo "<li class='activo'>";
}else{
echo "<li class='inactivo'>";
}
echo "<a href='administracion.php?opcion=situacion'>".$locale['205']."</a></li>";
if($opcion != "idioma"){
echo "<li class='activo'>";
}else{
echo "<li class='inactivo'>";
}
echo "<a href='administracion.php?opcion=idioma'>".$locale['206']."</a></li>";
if($opcion != "titulacion"){
echo "<li class='activo'>";
}else{
echo "<li class='inactivo'>";
}
echo "<a href='administracion.php?opcion=titulacion'>".$locale['207']."</a></li>";
if($opcion != "tipo_via"){
echo "<li class='activo'>";
}else{
echo "<li class='inactivo'>";
}
echo "<a href='administracion.php?opcion=tipo_via'>".$locale['208']."</a></li>";
if($opcion != "provincia"){
echo "<li class='activo'>";
}else{
echo "<li class='inactivo'>";
}
echo "<a href='administracion.php?opcion=provincia'>".$locale['226']."</a></li>";
if($opcion != "localidad"){
echo "<li class='activo'>";
}else{
echo "<li class='inactivo'>";
}
echo "<a href='administracion.php?opcion=localidad'>".$locale['210']."</a></li>";
if($opcion != "constantes"){
echo "<li class='activo'>";
}else{
echo "<li class='inactivo'>";
}
echo "<a href='administracion.php?opcion=constantes'>".$locale['212']."</a></li>";
if($opcion != "procedencia"){
echo "<li class='activo'>";
}else{
echo "<li class='inactivo'>";
}
echo "<a href='administracion.php?opcion=procedencia'>".$locale['1800']."</a></li>";
if($opcion != "incorporacion"){
echo "<li class='activo'>";
}else{
echo "<li class='inactivo'>";
}
echo "<a href='administracion.php?opcion=incorporacion'>".$locale['1814']."</a></li>";
echo '</ul>';
echo '<div id="ContTabul">';
/* ------------ PERFIL */
if($opcion == "perfil"){
echo '<form action="tablas_madre.php?opcion=perfil&action=eliminar" method="POST" name="form_e_perfil">';
echo rellena_perfiles("perfil","perfil","");
echo '<input type="submit" name="enviar" value="'.$locale['220'].'" onclick="return admin_e_perfil()" class="button"><br><br>'.$locale['223'].'<input type="text" name="cadena" size="30" maxlength="100">';
echo ' '.$locale['224'].' <input type="text" name="abrev" size="10" maxlength="30"> ';
echo '<input type="submit" name="enviar" value="'.$locale['ed'].'" class="button"><br>';
echo '</form>';
echo "<h4>".$locale['221']."</h4>";
echo '<form action="tablas_madre.php?opcion=perfil&accion=insertar" method="POST" name="form_i_perfil">
<tr>
<td align="right" width="60">'.$locale['223'].'</td>
<td><input type="text" name="cadena" size="30" maxlength="100"></td>
<td align="right" width="60">'.$locale['224'].'</td>
<td><input type="text" name="abrev" size="10" maxlength="30"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="enviar" value="'.$locale['225'].'" onclick="return admin_i_perfil()" class="button"></td>
</tr>
</form>';
/* ------------ PERFIL */
}else if($opcion == "tecnologia"){
/* ------------ TECNOLOG<4F>A */
echo '<form action="tablas_madre.php?opcion=tecnologia&action=eliminar" method="POST" name="form_e_tecnologia">';
echo rellena_desplegable_oid("tecnologia","tecnologia","");
echo '<input type="submit" name="enviar" value="'.$locale['229'].'" onclick="return admin_e_tecnologia()" class="button"><br>'.$locale['223'].'<input type="text" name="cadena" size="30" maxlength="100">';
echo '<input type="submit" name="enviar" value="'.$locale['ed'].'" class="button"><br>';
echo '</form>';
echo "<h4>".$locale['230']."</h4>";
echo '<form action="tablas_madre.php?opcion=tecnologia&accion=insertar" method="POST" name="form_i_tecnologia">
<tr>
<td align="right" width="60">'.$locale['223'].'</td>
<td><input type="text" name="cadena" size="60" maxlength="100"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="enviar" value="'.$locale['231'].'" onclick="return admin_i_tecnologia()" class="button"></td>
</tr>
</form>';
/* ------------ TECNOLOG<4F>A */
}else if($opcion == "estado"){
/* ------------ ESTADO */
echo '<form action="tablas_madre.php?opcion=estado&action=editar" method="POST" name="form_e_estado">';
echo rellena_desplegable_orden("estado","estado","");
echo '<input type="submit" name="enviar" value="+" class="button"><input type="submit" name="enviar" value="-" class="button"><br>'.$locale['223'].'<input type="text" name="cadena" size="30" maxlength="100">';
echo '<input type="submit" name="enviar" value="'.$locale['ed'].'" class="button"><br>';
echo '<input type="submit" name="enviar" value="'.$locale['232'].'" onclick="return admin_e_estado()" class="button">
</form>';
echo "<h4>".$locale['233']."</h4>";
echo '<form action="tablas_madre.php?opcion=estado&accion=insertar" method="POST" name="form_i_estado">
<tr>
<td align="right" width="30">'.$locale['223'].'</td>
<td><input type="text" name="cadena" size="30" maxlength="100"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="enviar" value="'.$locale['234'].'" onclick="return admin_i_estado()" class="button"></td>
</tr>
</form>';
/* ------------ ESTADO */
}else if($opcion == "estado_pedidos"){
/* ------------ ESTADO PEDIDOS*/
echo '<form action="tablas_madre.php?opcion=estado_pedidos&action=editar" method="POST" name="form_e_estado">';
echo rellena_desplegable_orden("estado_pedidos","estado_pedidos","");
echo '<input type="submit" name="enviar" value="+" class="button"><input type="submit" name="enviar" value="-" class="button"><br>'.$locale['223'].'<input type="text" name="cadena" size="30" maxlength="100">';
echo '<input type="submit" name="enviar" value="'.$locale['ed'].'" class="button"><br>';
echo '<input type="submit" name="enviar" value="'.$locale['232'].'" onclick="return admin_e_estado()" class="button">
</form>';
echo "<h4>".$locale['233']."</h4>";
echo '<form action="tablas_madre.php?opcion=estado_pedidos&accion=insertar" method="POST" name="form_i_estado">
<tr>
<td align="right" width="30">'.$locale['223'].'</td>
<td><input type="text" name="cadena" size="30" maxlength="100"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="enviar" value="'.$locale['234'].'" onclick="return admin_i_estado()" class="button"></td>
</tr>
</form>';
/* ------------ ESTADO PEDIDOS*/
}else if($opcion == "estado_candidatura"){
/* ------------ ESTADO CANDIDATURAS*/
echo '<form action="tablas_madre.php?opcion=estado_candidatura&action=editar" method="POST" name="form_e_estado">';
echo rellena_desplegable_orden("estado_candidatura","estado_candidatura","");
echo '<input type="submit" name="enviar" value="+" class="button"><input type="submit" name="enviar" value="-" class="button"><br>'.$locale['223'].'<input type="text" name="cadena" size="30" maxlength="100">';
echo '<input type="submit" name="enviar" value="'.$locale['ed'].'" class="button"><br>';
echo '<input type="submit" name="enviar" value="'.$locale['232'].'" onclick="return admin_e_estado()" class="button">
</form>';
echo "<h4>".$locale['233']."</h4>";
echo '<form action="tablas_madre.php?opcion=estado_candidatura&accion=insertar" method="POST" name="form_i_estado">
<tr>
<td align="right" width="30">'.$locale['223'].'</td>
<td><input type="text" name="cadena" size="30" maxlength="100"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="enviar" value="'.$locale['234'].'" onclick="return admin_i_estado()" class="button"></td>
</tr>
</form>';
/* ------------ ESTADO CANDIDATURAS*/
}else if($opcion == "situacion"){
/* ------------ SITUACI<43>N */
echo '<form action="tablas_madre.php?opcion=situacion&action=eliminar" method="POST" name="form_e_situacion">';
echo rellena_desplegable("situacion","situacion","");
echo '<input type="submit" name="enviar" value="'.$locale['235'].'" onclick="return admin_e_situacion()" class="button">
</form>';
echo "<h4>".$locale['236']."</h4>";
echo '<form action="tablas_madre.php?opcion=situacion&accion=insertar" method="POST" name="form_i_situacion">
<tr>
<td align="right" width="30">'.$locale['223'].'</td>
<td><input type="text" name="cadena" size="30" maxlength="100"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="enviar" value="'.$locale['237'].'" onclick="return admin_i_situacion()" class="button"></td>
</tr>
</form>';
/* ------------ SITUACI<43>N */
}else if($opcion == "idioma"){
/* ------------ IDIOMA */
echo '<form action="tablas_madre.php?opcion=idioma&action=eliminar" method="POST" name="form_e_idioma">';
echo rellena_desplegable_oid("idiomas","idiomas","");
echo '<input type="submit" name="enviar" value="'.$locale['238'].'" onclick="return admin_e_idioma()" class="button"><br>'.$locale['223'].'<input type="text" name="cadena" size="30" maxlength="100">';
echo '<input type="submit" name="enviar" value="'.$locale['ed'].'" class="button"><br>';
echo '</form>';
echo "<h4>".$locale['239']."</h4>";
echo '<form action="tablas_madre.php?opcion=idioma&accion=insertar" method="POST" name="form_i_idioma">
<tr>
<td align="right" width="100">'.$locale['223'].'</td>
<td><input type="text" name="cadena" size="30" maxlength="100"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="enviar" value="'.$locale['240'].'" onclick="return admin_i_idioma()" class="button"></td>
</tr>
</form>';
/* ------------ IDIOMA */
}else if($opcion == "titulacion"){
/* ------------ TITULACION */
echo '<form action="tablas_madre.php?opcion=titulacion&action=eliminar" method="POST" name="form_e_titulacion">';
echo rellena_desplegable_oid("titulaciones","titulaciones","");
echo '<input type="submit" name="enviar" value="'.$locale['241'].'" onclick="return admin_e_titulacion()" class="button"><br>'.$locale['223'].'<input type="text" name="cadena" size="30" maxlength="100">';
echo '<input type="submit" name="enviar" value="'.$locale['ed'].'" class="button"><br>';
echo '</form>';
echo "<h4>".$locale['242']."</h4>";
echo '<form action="tablas_madre.php?opcion=titulacion&accion=insertar" method="POST" name="form_i_titulacion">
<tr>
<td align="right" width="100">'.$locale['223'].'</td>
<td><input type="text" name="cadena" size="30" maxlength="50"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="enviar" value="'.$locale['243'].'" onclick="return admin_i_titulacion()" class="button"></td>
</tr>
</form>';
/* ------------ TITULACION */
}else if($opcion == "tipo_via"){
/* ------------ TIPO_VIA */
echo '<form action="tablas_madre.php?opcion=tipo_via&action=eliminar" method="POST" name="form_e_tipo_via">';
echo rellena_desplegable("tipo_via","tipo_via","");
echo '<input type="submit" name="enviar" value="'.$locale['244'].'" onclick="return admin_e_tipo_via()" class="button"><br>'.$locale['223'].'<input type="text" name="cadena" size="30" maxlength="100">';
echo '<input type="submit" name="enviar" value="'.$locale['ed'].'" class="button"><br>';
echo '</form>';
echo "<h4>".$locale['245']."</h4>";
echo '<form action="tablas_madre.php?opcion=tipo_via&accion=insertar" method="POST" name="form_i_tipo_via">
<tr>
<td align="right" width="100">'.$locale['223'].'</td>
<td><input type="text" name="cadena" size="5" maxlength="5"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="enviar" value="'.$locale['246'].'" onclick="return admin_i_tipo_via()" class="button"></td>
</tr>
</form>';
/* ------------ TIPO_VIA */
}else if($opcion == "provincia"){
/* ------------ PROVINCIA */
echo '<form action="tablas_madre.php?opcion=provincia&action=eliminar" method="POST" name="form_e_provincia">';
echo rellena_desplegable_oid("provincias","provincias","");
echo '<input type="submit" name="enviar" value="'.$locale['247'].'" onclick="return admin_e_provincia()" class="button"><br>'.$locale['223'].'<input type="text" name="cadena" size="30" maxlength="100">';
echo '<input type="submit" name="enviar" value="'.$locale['ed'].'" class="button"><br>';
echo '</form>';
echo "<h4>".$locale['248']."</h4>";
echo '<form action="tablas_madre.php?opcion=provincia&accion=insertar" method="POST" name="form_i_provincia">
<tr>
<td align="right" width="100">'.$locale['223'].'</td>
<td><input type="text" name="cadena" size="20" maxlength="50"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="enviar" value="'.$locale['249'].'" onclick="return admin_i_provincia()" class="button"></td>
</tr>
</form>';
/* ------------ PROVINCIA */
}else if($opcion == "localidad"){
/* ------------ LOCALIDAD */
echo '<form action="tablas_madre.php?opcion=localidad&action=eliminar" method="POST" name="form_e_localidad">';
echo rellena_desplegable_localidad("", "localidades");
echo '<input type="submit" name="enviar" value="'.$locale['250'].'" onclick="return admin_e_localidad()" class="button"><br>'.$locale['223'].'<input type="text" name="cadena" size="30" maxlength="100">';
echo '<input type="submit" name="enviar" value="'.$locale['ed'].'" class="button"><br>';
echo '</form>';
echo "<h4>".$locale['251']."</h4>";
echo '<form action="tablas_madre.php?opcion=localidad&accion=insertar" method="POST" name="form_i_localidad">
<tr>
<td align="right" width="100">'.$locale['223'].'</td>
<td><input type="text" name="cadena" size="30" maxlength="100"></td>
<td align="right" width="100">'.$locale['256'].'</td>
<td>';
echo rellena_desplegable_oid("provincias","provincias","");
echo '<td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="enviar" value="'.$locale['252'].'" onclick="return admin_i_localidad()" class="button"></td>
</tr>
</form>';
/* ------------ LOCALIDAD */
}else if($opcion == "constantes"){
/* ------------ CONSTANTES DEL SISTEMA*/
echo '<form action="constantes.php" name="form_sistema" method="post">';
echo '<table>';
$link = conectar();
$consulta = "select * from sistema";
$resultado = mysql_query($consulta, $link);
if($resultado){
while($rows = mysql_fetch_array($resultado)){
echo "<tr><td>".$rows['id']." </td><td><input type=text name=".$rows['id']." size='50' maxlength='50' value=".$rows['valor']."></td></tr>";
}
}
echo "<p><tr><td colspan=2><b>".$locale['228'].":</b></td></tr></p>";
echo "<p><tr><td>Nombre: <input type=text name=id value=''></td>
<td>Valor: <input type=text size='50' maxlength='50' name=valor></td></tr></p>";
echo '<p><tr><td colspan="2" align="center"><input type="submit" name="enviar" value="'.$locale['258'].'" class="button"></td></tr></p>
</form>';
echo '</table>';
/* ------------ CONSTANTES DEL SISTEMA*/
}else if($opcion == "procedencia"){
/* ------------ PROCEDENCIA */
echo '<form action="tablas_madre.php?opcion=procedencia&action=eliminar" method="POST" name="form_e_procedencia">';
echo rellena_procedencias("procedencia","","");
echo '<input type="submit" name="enviar" value="'.$locale['1801'].'" onclick="return admin_e_procedencia()" class="button"><br>'.$locale['223'].'<input type="text" name="cadena" size="30" maxlength="100">';
echo '<input type="submit" name="enviar" value="'.$locale['ed'].'" class="button"><br>';
echo '</form>';
echo "<p>".$locale['1802']."</p>";
echo '<form action="tablas_madre.php?opcion=procedencia&accion=insertar" method="POST" name="form_i_procedencia">
<table>
<tr>
<td align="right" width="60">'.$locale['1803'].'</td>
<td><input type="text" name="cadena" size="60" maxlength="100"></td>
</tr>
<tr>
<td align="right" width="60">'.$locale['1804'].'</td>
<td>';
rellena_desplegable_color("color");
echo '</td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="enviar" value="'.$locale['1805'].'" onclick="return admin_i_procedencia()" class="button"></td>
</tr>
</table>
</form>';
/* ------------ PROCEDENCIA */
}else if($opcion == "incorporacion"){
/* ------------ INCORPORACION */
echo '<form action="tablas_madre.php?opcion=incorporacion&action=eliminar" method="POST" name="form_e_incorporacion">';
echo rellena_desplegable("incorporaciones","incorporacion","");
echo '<input type="submit" name="enviar" value="'.$locale['1811'].'" onclick="return admin_e_incorporacion()" class="button"><br>'.$locale['223'].'<input type="text" name="cadena" size="30" maxlength="100">';
echo '<input type="submit" name="enviar" value="'.$locale['ed'].'" class="button"><br>';
echo '</form>';
echo "<h4>".$locale['1812']."</h4>";
echo '<form action="tablas_madre.php?opcion=incorporacion&accion=insertar" method="POST" name="form_i_incorporacion">
<tr>
<td align="right" width="100">'.$locale['223'].'</td>
<td><input type="text" name="cadena" size="5" maxlength="5"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="enviar" value="'.$locale['1813'].'" onclick="return admin_i_incorporacion()" class="button"></td>
</tr>
</form>';
/* ------------ INCORPORACION */
}else{
echo "<p>".$locale['200'].".</p>";
}
echo '</div>';
include_once("html/pie.php");
?>