-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbanco.aplica.php
executable file
·95 lines (87 loc) · 3.07 KB
/
banco.aplica.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php require_once('Connections/tecnocomm.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"] == "form1")) {
$updateSQL = sprintf("UPDATE banco SET aplica=%s WHERE id=%s",
GetSQLValueString($_POST['aplica'], "int"),
GetSQLValueString($_POST['id'], "int"));
mysql_select_db($database_tecnocomm, $tecnocomm);
$Result1 = mysql_query($updateSQL, $tecnocomm) or die(mysql_error());
$updateGoTo = "close.php";
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $updateGoTo));
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>REGISTRAR MOVIMIENTO</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.Estilo1 {color: #FF0000}
.Estilo2 {color: #FFFFFF}
-->
</style>
</head>
<body>
<form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>">
<table width="350" border="0" align="center" class="wrapper">
<tr class="titulos">
<td colspan="3" align="center"><span class="Estilo2">APLICAR REGISTRO</span></td>
</tr>
<tr>
<td> </td>
<td>ESTAS SEGURO QUE DESEAS APLICAR EL REGISTRO <span class="Estilo1"></span>?</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td align="center">
<label>
<input type="submit" name="button" id="button" value="Aceptar" />
</label> </td>
<td> </td>
</tr>
</table>
<input type="hidden" name="id" value="<?php echo $_GET['id'];?>"/>
<input type="hidden" name="aplica" value="1"/>
<input type="hidden" name="MM_update" value="form1" />
</form>
</body>
</html>