<?php
session_start();
//*Client Data System, Copyright (C) 2000, 2001 Tedd Kelleher. This is free software, subject to the
//*GNU GENERAL PUBLIC LICENSE, Version 2, June 1991 (in file named gpl.txt), which should accompany
//*any distribution of this file. Tedd Kelleher can be contacted at hide@address.com
//display_value($HTTP_GLOBAL_VARS);
$page_title = "Change to Another Login ID";
$page_id = "change_id";
$page_access_levels = "all";
$page_profile = "Assume Identify of Subcontractor or User";
$instructions .= "To assume the identity of one of your subcontractors or users, click on an ID listed below. ";
////Header for every page that finds the include directory, connects to db, authenticates user access
include("initialize_pointer.php");
if(!include($include_root."authenticate.inc")){echo "No Authentication"; exit; };
include($include_root."Questions_into_array_class.inc");
include($include_root."questions_display.inc");
include($include_root."Questions_answers_validation_class.inc");
include($include_root."head.inc");
include($include_root."template_parser.inc");
include($include_root."change_id_class.inc");
include($include_root."questions_into_tags_function.inc");
include($include_root."page_elements_display.inc");
include($include_root."user_info_functions.inc");
//echo "TEST is: ".$_SESSION['test']."<p>";
$_SESSION['test'] = "why me<p>";
//echo "Value of xxx session ID is: ".$_SESSION['xxx']."<p>";
//echo "Value of xxx ID is: ".$xxx."<p>";
//display_value($GLOBALS);
//echo "Value of superuser session ID is: ".$_SESSION["super_user_id"]."<p>";
//$_SESSION["super_user_id"] = "DONKEY<p>";
//$_SESSION['xxx'] = "smelly goo gaa";
//echo "Value of xxx session ID is: ".$_SESSION["xxx"]."<p>";
//display_value($_SESSION);
//If the path includes the "new_id" variable, attempt to change id using Change_id
if ($HTTP_GET_VARS["new_id"]) {
$change_validation = new Change_id_class;
$change_validation->Change_id ("change", $HTTP_GET_VARS["new_id"], $access_level, $user_id, $org_id, $group_id);
//echo "Back on main page usper user id is: ".$_SESSION["super_user_id"]."<p>";
}
//If the path includes the "revert_id" variable, attempt to change id using Change_id
if ($HTTP_GET_VARS["revert_id"] && $_SESSION["super_user_idB"]) {
$change_validation = new Change_id_class;
$change_validation->Change_id ("revert", $HTTP_GET_VARS["revert_id"], $access_level, $user_id, $org_id, $group_id);
}
//Pull appropriate questions attributes into an array (based on page, user, org, and access level) for display
//$pull_questions_display = new Questions_into_array ("add_users", $access_level, $org_id, $group_id, "display");
//Define the values for tags contained in the html template
$tag_values["{PAGE TITLE}"] = page_title_table();
$tag_values["{MENU}"] = menu();
$display_related_users = new Change_id_class;
$tag_values["{RELATED USERS}"] = $display_related_users->display_related_users($user_id);
$tag_values["{HEAD}"] = head ($page_title, $head_page_specific, $head_dynamic_style);
$tag_values["{FOOTER}"] = footer();
//questions_into_tags ($pull_questions_display->questions, $pull_questions_display->question_elements, $validation->vetted_form_answer);
template_parser ("change_id.html", $tag_values);
//template_parser ($page_id.".html", $pull_questions_display->questions, $pull_questions_display->question_elements, $tag_values, $validation->form_answer);
//echo "Bottom Back on main page usper user id is: ".$_SESSION["super_user_id"]."<p>";
//For when register_globals is on in php.ini. PHP seems to get confused when your set session variable via $_SESSION[""] in a class and/or function. These lines can be deleted if register_globals of set to 'Off', which is the security-related preference
//$super_user_id = $_SESSION["super_user_id"];
//$super_user_name = $_SESSION["super_user_name"];
//echo "SeSS Org name is: ".$_SESSION['org_nameB']."<p/>";
//echo "Interanl Org name is: ".$org_name."<p/>";
?>