Manual Del Programador
Manual Del Programador
<?php
if (!isset($_SESSION)) {
session_start();
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
//to fully log out a visitor we need to clear the session varialbles
$_SESSION['MM_Username'] = NULL;
$_SESSION['MM_UserGroup'] = NULL;
$_SESSION['PrevUrl'] = NULL;
unset($_SESSION['MM_Username']);
unset($_SESSION['MM_UserGroup']);
unset($_SESSION['PrevUrl']);
$logoutGoTo = "index.php";
if ($logoutGoTo) {
header("Location: $logoutGoTo");
exit;
?>
<?php
if (!isset($_SESSION)) {
session_start();
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";
$isValid = False;
// When a visitor has logged into this site, the Session variable MM_Username set equal to their
username.
// Therefore, we know that a user is NOT logged in if that Session variable is blank.
if (!empty($UserName)) {
// Besides being logged in, you may restrict access to only certain users based on an ID established
when they login.
if (in_array($UserName, $arrUsers)) {
$isValid = true;
// Or, you may restrict access to only certain users based on their username.
if (in_array($UserGroup, $arrGroups)) {
$isValid = true;
$isValid = true;
return $isValid;
$MM_restrictGoTo = "index.php";
$MM_qsChar = "?";
$MM_referrer = $_SERVER['PHP_SELF'];
exit;
?>
<?php
if (!function_exists("GetSQLValueString")) {
if (PHP_VERSION < 6) {
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) :
mysql_escape_string($theValue);
switch ($theType) {
case "text":
break;
case "long":
case "int":
break;
case "double":
break;
case "date":
break;
case "defined":
break;
return $theValue;
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
GetSQLValueString($_POST['codigo'], "int"),
GetSQLValueString($_POST['fecha_act'], "text"),
GetSQLValueString($_POST['tipo'], "text"),
GetSQLValueString($_POST['descripcion'], "text"),
GetSQLValueString($_POST['dependencia'], "text"),
GetSQLValueString($_POST['no_caja'], "text"),
GetSQLValueString($_POST['no_carpeta'], "text"),
GetSQLValueString($_POST['sub_serie'], "text"));
mysql_select_db($database_conectar, $conectar);
$insertGoTo = "ok.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= $_SERVER['QUERY_STRING'];
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>