Beispiel #1
0
session_start();
include "../includes/configuration.php";
include "../includes/utilities.php";
if (!isset($_COOKIE['Erecor'])) {
    $mail = $_COOKIE['Email'];
    $pass = $_COOKIE['Epass'];
    $sel = "";
} else {
    $mail = $_COOKIE['Email'];
    $pass = $_COOKIE['Epass'];
    $sel = "checked";
    $dat = pasedirecto($strHostMYSQL, $strUserMYSQL, $strPWDMYSQL, $strDBMYSQL, $mail, $pass);
    $_SESSION["iduser"] = $dat[0];
    $_SESSION["user"] = $dat[1];
}
$datosPerfil = datosPerfil($strHostMYSQL, $strUserMYSQL, $strPWDMYSQL, $strDBMYSQL, $_SESSION["iduser"]);
$avatar = avatar($strHostMYSQL, $strUserMYSQL, $strPWDMYSQL, $strDBMYSQL, $_SESSION["iduser"]);
$latlog = obtenerlatlong($strHostMYSQL, $strUserMYSQL, $strPWDMYSQL, $strDBMYSQL);
$noti = notificaciones($strHostMYSQL, $strUserMYSQL, $strPWDMYSQL, $strDBMYSQL);
$not = explode(";", $noti);
$tamnot = substr_count($not[1], "&");
if ($_GET["order"] == 1) {
    $orden = "Ultima Actividad";
    $ordenBD = "a.fechaconex Desc";
}
if ($_GET["order"] == 2) {
    $orden = "Ubicacion";
    $ordenBD = "distance Asc";
}
if ($_GET["order"] == 3) {
    $orden = "Nombre Usuario";
<?php

session_start();
include "../includes/configuration.php";
include "../includes/utilities.php";
$datosPerfil = datosPerfil($strHostMYSQL, $strUserMYSQL, $strPWDMYSQL, $strDBMYSQL, $_GET["iduser"]);
$avatar = avatar($strHostMYSQL, $strUserMYSQL, $strPWDMYSQL, $strDBMYSQL, $_SESSION["iduser"]);
$avatarExt = avatar($strHostMYSQL, $strUserMYSQL, $strPWDMYSQL, $strDBMYSQL, $_GET["iduser"]);
$nombreusus = nombreusus($strHostMYSQL, $strUserMYSQL, $strPWDMYSQL, $strDBMYSQL, $_GET["iduser"]);
$noti = notificaciones($strHostMYSQL, $strUserMYSQL, $strPWDMYSQL, $strDBMYSQL);
$not = explode(";", $noti);
$tamnot = substr_count($not[1], "&");
?>
<!DOCTYPE html>
<html class="no-js css-menubar" lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
  <meta name="description" content="bootstrap admin template">
  <meta name="author" content="">

  <title>Profile | Remark Admin Template</title>

  <link rel="apple-touch-icon" href="../../assets/images/apple-touch-icon.png">
  <link rel="shortcut icon" href="../../assets/images/favicon.ico">

  <!-- Stylesheets -->
  <link rel="stylesheet" href="../../assets/css/bootstrap.min.css">
  <link rel="stylesheet" href="../../assets/css/bootstrap-extend.min.css">
  <link rel="stylesheet" href="../../assets/css/site.min.css">
Beispiel #3
0
     break;
 case 'eliminarProfesor':
     $idProfesor = $_REQUEST['idProfesor'];
     eliminarProfesor($idProfesor);
     break;
 case 'addProfesor':
     $nombre = $_REQUEST['nombre'];
     $apellido1 = $_REQUEST['apellido1'];
     $apellido2 = $_REQUEST['apellido2'];
     $password = $_REQUEST['password'];
     $usuario = $_REQUEST['usuario'];
     $email = $_REQUEST['email'];
     addProfesor($nombre, $apellido1, $apellido2, $password, $usuario, $email);
     break;
 case 'datosPerfil':
     datosPerfil();
     break;
 case 'getPerfil':
     getPerfil();
     break;
 case 'desconectar':
     desconectar();
     break;
 case 'getMensajes':
     getMensajes();
     break;
 case 'addMensajeProyecto':
     $proyecto = $_REQUEST['proyecto'];
     $mensaje = $_REQUEST['mensaje'];
     addMensajeProyecto($proyecto, $mensaje);
     break;
function agregarusu($strHostMYSQL, $strUserMYSQL, $strPWDMYSQL, $strDBMYSQL, $usu)
{
    $link = mysql_connect($strHostMYSQL, $strUserMYSQL, $strPWDMYSQL);
    mysql_select_db($strDBMYSQL, $link);
    if (mysql_errno() > 0) {
        $strResultOp = "No fue posible validar el usuario.";
        $strInfoTec = "No fue posible localizar el host[" . mysql_errno() . "-" . mysql_error() . "]";
        $strModulo = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/" . basename($_SERVER['PHP_SELF']);
        $strParameters = "host:" . $strHostMYSQL . "~-user:"******"~PWD:" . $strPWDMYSQL . "bd:" . $strDBMYSQL;
    } else {
        $datosPerfil = datosPerfil($strHostMYSQL, $strUserMYSQL, $strPWDMYSQL, $strDBMYSQL, $_SESSION["iduser"]);
        if ($datosPerfil[17] > 0) {
            if ($datosPerfil[15] == 1 && $datosPerfil[16] < 12 || ($datosPerfil[15] = 2)) {
                $fecha = date("Y-m-d H:i:s");
                $strS = "insert into agregados (iduserAgo,iduserAdo,fecha) values(" . $_SESSION["iduser"] . "," . $usu . ",'" . $fecha . "')";
                $Res = mysql_query($strS);
                if (mysql_errno() > 0) {
                    $strResultOp = "No fue posible validar el usuario.";
                    $strInfoTec = "No fue posible ejecutar la consulta[" . mysql_errno() . "-" . mysql_error() . "]";
                    $strModulo = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/" . basename($_SERVER['PHP_SELF']);
                    $strParameters = $str;
                    $h = 0;
                } else {
                    $tipo = 1;
                    // agregar usuario
                    $fechahr = date("Y-m-d H:i:s");
                    $str = "insert into notificaciones (iduserAct,iduserMov,tipoNotif,fechaHrNotif) values(" . $usu . "," . $_SESSION["iduser"] . "," . $tipo . ",'" . $fechahr . "')";
                    $Resu = mysql_query($str);
                    $h = 1;
                }
            } else {
                $fechahr = date("Y-m-d H:i:s");
                if (($datosPerfil[15] == 1 || $datosPerfil[15] == 2) && $datosPerfil[14] < $fechahr) {
                    $h = 2;
                } else {
                    if ($datosPerfil[15] == 1 && $datosPerfil[16] == 12) {
                        $h = 3;
                    }
                }
                // susc.ilimitada pero ya agrego a 12 contactos
            }
        } else {
            $h = 4;
            // no tiene suscripcion
        }
    }
    return $h;
}