Ver Mensaje Individual
  #2 (permalink)  
Antiguo 29/06/2011, 11:27
systemar_marv
 
Fecha de Ingreso: mayo-2011
Ubicación: aqp
Mensajes: 52
Antigüedad: 13 años
Puntos: 0
Respuesta: conflicto en javascript con otro para subir archivos a mi web

CODIGO 1RA PARTE HTML ERRORES

Código HTML:
<?php require_once('../Connections/conexionCP.php'); ?>
<?php
//initialize the session
if (!isset($_SESSION)) {
  session_start();
}

// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
  $logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}

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";

// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { 
  // For security, start by assuming the visitor is NOT authorized. 
  $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. 
    // Parse the strings into arrays. 
    $arrUsers = Explode(",", $strUsers); 
    $arrGroups = Explode(",", $strGroups); 
    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; 
    } 
    if (($strUsers == "") && true) { 
      $isValid = true; 
    } 
  } 
  return $isValid; 
}

$MM_restrictGoTo = "index.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {   
  $MM_qsChar = "?";
  $MM_referrer = $_SERVER['PHP_SELF'];
  if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
  if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0) 
  $MM_referrer .= "?" . $QUERY_STRING;
  $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
  header("Location: ". $MM_restrictGoTo); 
  exit;
}
?><?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $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;
}
}

$colname_RSusuario = "-1";
if (isset($_SESSION['MM_Username'])) {
  $colname_RSusuario = $_SESSION['MM_Username'];
}
mysql_select_db($database_conexionCP, $conexionCP);
$query_RSusuario = sprintf("SELECT * FROM usuarios WHERE email = %s", GetSQLValueString($colname_RSusuario, "text"));
$RSusuario = mysql_query($query_RSusuario, $conexionCP) or die(mysql_error());
$row_RSusuario = mysql_fetch_assoc($RSusuario);
$totalRows_RSusuario = mysql_num_rows($RSusuario);
?><!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"><!-- InstanceBegin template="/Templates/plantilla_admin.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Wwww wWWw</title>
<!-- InstanceEndEditable -->
<meta name="description" content="Venta de Computadoras, Computadoras Juliaca, Computadoras Arequipa, notebook, laptop, suministros, sistemas" />
<meta name="keywords" content" />
<meta name="url" content="" />
<meta name="page-topic" content="" />
<meta name="audience" content="All" /> 
<meta name="robots" content="all" />
<meta name="distribution" content="Global" />
<meta name="ObjectType" content="Document" /> 
<meta name="Rating" content="General" />
<meta name="author" content="" />
<meta name="copyright" content="" />
<meta name="Publisher" content="" />
<meta name="language" content="es" />

<script type="text/javascript" src="stmenu.js"></script>
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.Estilo1 {
	color: #0000FF;
	font-weight: bold;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
}
.Estilo2 {
	font-size: 18px;
	font-family: Arial, Helvetica, sans-serif;
}
.Estilo3 {
	font-size: 16px;
	font-weight: bold;
	color: #043C7C;
}
-->
</style>
<!-- InstanceBeginEditable name="head" --> 

<script language="javascript" src="../rutinas.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
function Imagen(codigo){
	url="agregar_foto.php?id=" + codigo
	AbrirCentro(url,'Agregar',400,90,'no','no');
}
</script>

<!-- InstanceEndEditable -->
</head>