Ver Mensaje Individual
  #3 (permalink)  
Antiguo 22/01/2017, 14:40
thelighter
 
Fecha de Ingreso: agosto-2011
Mensajes: 36
Antigüedad: 12 años, 8 meses
Puntos: 0
Respuesta: enviar valor cuando se termine una fecha

Cita:
<link rel="stylesheet" href="../../bootstrap/css/bootstrap.css">
<!-- Bootstrap responsive -->
<link href="../../bootstrap/css/bootstrap-responsive.css" rel="stylesheet" type="text/css">

<?php require ('../../Connections/agregarequipos.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form")) {
$updateSQL = sprintf("UPDATE clientes SET nombres=%s, ip=%s, mac=%s, cell=%s, direcion=%s, comentario=%s, categoria=%s, pago_total=%s, fecha_inicial=%s, fecha_final=%s, codigo=%s, dias_p=%s,disable=%s, apellido=%s, tipo=%s WHERE id=%s",
GetSQLValueString($_POST['nombres'], "text"),
GetSQLValueString($_POST['ip'], "text"),
GetSQLValueString($_POST['mac'], "text"),
GetSQLValueString($_POST['cell'], "text"),
GetSQLValueString($_POST['direcion'], "text"),
GetSQLValueString($_POST['comentario'], "text"),
GetSQLValueString($_POST['categoria'], "text"),
GetSQLValueString($_POST['pago_total'], "text"),
GetSQLValueString($_POST['fecha_inicial'], "text"),
GetSQLValueString($_POST['fecha_final'], "text"),
GetSQLValueString($_POST['codigo'], "text"),
GetSQLValueString($_POST['dias_p'], "text"),
GetSQLValueString($_POST['disable'], "text"),
GetSQLValueString($_POST['apellido'], "text"),
GetSQLValueString($_POST['tipo'], "text"),
GetSQLValueString($_POST['id'], "int"));

mysql_select_db($database_agregarequipos, $agregarequipos);
$Result1 = mysql_query($updateSQL, $agregarequipos) or die(mysql_error());
}

$colname_Recordset1 = "-1";
if (isset($_GET['id'])) {
$colname_Recordset1 = $_GET['id'];
}
mysql_select_db($database_agregarequipos, $agregarequipos);
$query_Recordset1 = sprintf("SELECT * FROM clientes WHERE id = %s", GetSQLValueString($colname_Recordset1, "text"));
$Recordset1 = mysql_query($query_Recordset1, $agregarequipos) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);

mysql_free_result($Recordset1);
?>


<br>
<br>
<hr>


<div class="container-fluid">
<form action="../App/Arp_Dhcp/Editar/editar_arp_dhcp.php" method="post" name="form" id="form">



<div class="row-fluid">
<div class="span2 lightblue">
<label>Nombre.</label>
<input name="nombres" required type="text" class="span12" id="nombres" placeholder="Nombre del Titular" value="<?php echo htmlentities($row_Recordset1['nombres'], ENT_COMPAT, ''); ?>">
</div>


<div class="span5 lightblue">
<label>Apellidos.</label>
<input name="apellido" type="text" class="span12" id="cell" required placeholder="Apellidos del Cliente" value="<?php echo htmlentities($row_Recordset1['apellido'], ENT_COMPAT, ''); ?>">
</div>



<div class="span5 lightblue">
<label>Cell.</label>
<input name="cell" type="text" class="span12" id="cell" required placeholder="# Celular del Cliente" value="<?php echo htmlentities($row_Recordset1['cell'], ENT_COMPAT, ''); ?>">
</div>
<div class="row-fluid">
<div class="span4 lightblue">
<label>IP</label>
<input name="ip" required type="text" class="span12" id="ip" placeholder="Ip del Equipo" value="<?php echo htmlentities($row_Recordset1['ip'], ENT_COMPAT, ''); ?>">
</div>




<div class="span4 lightblue">
<label>mac</label>
<input name="mac" type="text" class="span12" id="mac" required placeholder="Direcion Mac del Cliente" value="<?php echo htmlentities($row_Recordset1['mac'], ENT_COMPAT, ''); ?>">
</div>


<div class="span4 lightblue">
<label>codigo</label>
<input name="codigo" type="text" class="span12" id="codigo" required placeholder="Codigo del Cliente" value="<?php echo htmlentities($row_Recordset1['codigo'], ENT_COMPAT, ''); ?>">
</div>

<div class="row-fluid">


<div class="span4 bgcolor">
<label>Categoria</label>
<select name="categoria" class="span6 input-mini" id="categoria">
<option value="Renta fija" <?php if (!(strcmp("Renta fija", htmlentities($row_Recordset1['categoria'], ENT_COMPAT, '')))) {echo "selected=\"selected\"";} ?>>Renta Fija</option>
<option value="Celulares" <?php if (!(strcmp("Celulares", htmlentities($row_Recordset1['categoria'], ENT_COMPAT, '')))) {echo "selected=\"selected\"";} ?>>Celulares</option>

<option value="Tableta" <?php if (!(strcmp("Tableta", htmlentities($row_Recordset1['categoria'], ENT_COMPAT, '')))) {echo "selected=\"selected\"";} ?>>Tableta</option>

<option value="PC" <?php if (!(strcmp("PC", htmlentities($row_Recordset1['categoria'], ENT_COMPAT, '')))) {echo "selected=\"selected\"";} ?>>PC</option>

<option value="Celulares" <?php if (!(strcmp("Celulares", htmlentities($row_Recordset1['categoria'], ENT_COMPAT, '')))) {echo "selected=\"selected\"";} ?>>Celulares</option>

<option value="Rauter" <?php if (!(strcmp("Rauter", htmlentities($row_Recordset1['categoria'], ENT_COMPAT, '')))) {echo "selected=\"selected\"";} ?>>Rauter</option>

<option value="Varios Equipos" <?php if (!(strcmp("Varios Equipos", htmlentities($row_Recordset1['categoria'], ENT_COMPAT, '')))) {echo "selected=\"selected\"";} ?>>Varios Equipos</option>
</select>
</div>



<div class="span2 bgcolor">
<label>Fecha Inicial</label>
<input name="fecha_inicial" required type="date" class="span12 input-mini" id="fecha_inicial" value="<?php echo htmlentities($row_Recordset1['fecha_inicial'], ENT_COMPAT, ''); ?>">
</div>