Example #1
0
 $profile = GetProfile($user_id);
 $group = GetGroup($user_id);
 $group_info = GetGRPName($group);
 //assume self
 $Privilage = 3;
 /// print_r($profile);
 echo $user_id;
 echo "<br/>";
 if (isset($_GET['UID'])) {
     if (IDValidate($_GET['UID']) == 1) {
         if ($_GET['UID'] != $_SESSION['UID']) {
             $Editable = 0;
             $user_id = $_GET['UID'];
             $profile = GetProfile($_GET['UID']);
             $group = GetGroup($_GET['UID']);
             $readerGrp = GetGroup(GetProfile($_SESSION['UID']));
             //admin has all privilage
             if ($readerGrp >= 5) {
                 $Privilage = 3;
             } else {
                 $rel = GetRelation($_GET['UID'], $_SESSION['UID']);
                 echo $rel;
                 if ($rel == 1) {
                     $Privilage = 1;
                 } else {
                     if ($rel == 3) {
                         $Privilage = 2;
                     } else {
                         $Privilage = 0;
                     }
                 }
Example #2
0
<?php

session_start();
include "./DB.php";
//$_POST is used for test
if (!isset($_SESSION['UID'])) {
    echo "balh<br/>";
    return -1;
}
$userID = $_SESSION['UID'];
//echo $userID
$after = array();
$profile = GetProfile($userID);
//print_r($profile);
if ($profile['getProfile'] == -1) {
    // echo "No profiles found.<br/>";
    //return -1;
    //generate newly as profile entity.
    if (isset($_POST['Location'])) {
        $after['Location'] = $_POST['Location'];
    } else {
        $after['Location'] = "-";
    }
    if (isset($_POST['Habit'])) {
        $after['Habit'] = $_POST['Habit'];
    } else {
        $after['Habit'] = "-";
    }
    if (isset($_POST['BOD'])) {
        $after['BOD'] = $_POST['BOD'];
    } else {
Example #3
0
<?php

session_start();
if (isset($_SESSION['login']) && $_SESSION['login'] == true) {
    //print_r($_SESSION);
} else {
    header("Location: http://localhost/546Final/pages/index.php");
}
include "../include/DB.php";
if (isset($_SESSION['login']) && $_SESSION['login'] == true) {
    $user_id = $_SESSION['UID'];
    $profile = GetProfile($user_id);
    $group = GetGroup($user_id);
    $group_info = GetGRPName($group);
}
?>
<!DOCTYPE html>
<html 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">
<meta name="description" content="">
<meta name="author" content="">
<title>Profile Edit</title>

<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css" rel="stylesheet">
<link href="../css/bootstrap.min.css" rel="stylesheet">
<link href="../css/profile_site.css" rel="stylesheet">

</head>
Example #4
0
//                                                                           //
//  Copyright (c) 2004-2007 Jonathon Freeman                                 //
//  Copyright (c) 2007 Brian Otto                                            //
//  All rights reserved.                                                     //
//                                                                           //
//  This program is free software. You may use, modify, and/or redistribute  //
//  it under the terms of the MIT License.                                   //
//                                                                           //
//***************************************************************************//
// Initialize OvBB.
require './includes/init.inc.php';
// What do they wanna do?
switch ($_REQUEST['action']) {
    // Get member's profile
    case 'getprofile':
        GetProfile();
        // Log in
    // Log in
    case 'login':
        Login();
        // Log out
    // Log out
    case 'logout':
        Logout();
        // Request member details
    // Request member details
    case 'request':
        RequestDetails();
        // Reset member details
    // Reset member details
    case 'reset':