File: /home/asjudine/public_html/modifica_servicios_accion.php
<?php
require_once("mainfile.php");
include ("config.php");
global $dbi;
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING']))
{
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form"))
{
$contenido = strtoupper($contenido);
$msql = "update actuaciones_servicios set accion = '$contenido' where id = $id";
mysql_query($msql, $dbi) or die(mysql_error());
echo "<script>alert('Registro modificado correctamente');<script>";
}
?>
<html>
<head>
<script languaje="JavaScript">
function Mostrar_Fecha()
{
var mydate=new Date()
var year=mydate.getYear()
if(year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym < 10)
daym="0"+daym
var dayarray=new Array("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sabado")
var montharray=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre")
document.write("<b><font face='Arial, Helvetica, sans-serif'>"+dayarray[day]+" "+daym+" de "+montharray[month]+" de "+year+"</font></b>")
}
</script>
<style type="text/css">
<!--
.Estilo1 {
color: #990000;
font-family: "Arial Narrow";
font-weight: bold;
}
-->
</style>
</head>
<body>
<FORM action="<?php echo $editFormAction; ?>" method="post" name="form">
<table width="430" border="1" align="center" cellpadding="2" cellspacing="2">
<tr>
<td width="418" bgcolor="#00CCFF"><div align="center"><span class="Estilo1">MODIFICAR ASESORIA SOLICITADA </span></div></td>
</tr>
<tr>
<td height="22" bgcolor="#00CCFF"><div align="center">
<script languaje="JavaScript">Mostrar_Fecha()</script>
</div></td>
</tr>
<tr>
<?php
$sql = "select * from actuaciones_servicios where id = $id";
$control = mysql_query($sql, $dbi);
$ac = mysql_result($control,0,"accion");
//$fec = mysql_result($control,0,"fecha");
echo "<tr><td><textarea name='contenido' cols='50' rows='4' title='MODIFICA ASESORIA'>\n";
echo htmlspecialchars($ac)."\n";
echo "</textarea></td></tr>";
echo "<input name='id' type='hidden' value=$id size='11' maxlength='11'>";
?>
<tr>
<td height="22" bgcolor="#00CCFF"> </td>
</tr>
<td bgcolor="#00CCFF"><div align="center">
<input name="submit" type="submit" value="MODIFICAR ASESORIA" style="font-family: Verdana; font-size: 8 pt; color: #000080; background-color: #C0C0C0; border-style: solid">
<input name="button" type="button" style="font-family: Verdana; font-size: 8 pt; color: #000080; background-color: #C0C0C0; border-style: solid" onClick="javascript:window.close()" value="Cerrar Ventana">
</div></td>
</tr>
</TABLE>
<input type="hidden" name="MM_insert" value="form">
</FORM>
</body>
</html>