예제 #1
0
 * This file is the first page that the user sees when they log in.
 * Most of the code in it is html but there is some logic that displays
 * based upon the login. 
 * There is also some javascript that handles the form information.
 *
 * @internal revisions
 **/
require_once '../../config.inc.php';
require_once 'common.php';
if (function_exists('memory_get_usage') && function_exists('memory_get_peak_usage')) {
    tlog("mainPage.php: Memory after common.php> Usage: " . memory_get_usage(), 'DEBUG');
}
testlinkInitPage($db);
$smarty = new TLSmarty();
$tproject_mgr = new testproject($db);
$tprojectQty = $tproject_mgr->getTotalCount();
$currentUser = $_SESSION['currentUser'];
$userID = $currentUser->dbID;
$gui = new stdClass();
$gui->grants = array();
$gui->testprojectID = isset($_REQUEST['tproject_id']) ? intval($_REQUEST['tproject_id']) : 0;
$gui->testplanID = isset($_REQUEST['tplan_id']) ? intval($_REQUEST['tplan_id']) : 0;
if ($gui->testplanID == 0) {
    $gui->testplanID = isset($_REQUEST['testplan']) ? intval($_REQUEST['testplan']) : 0;
}
$gui->tprojectOptions = new stdClass();
$gui->tprojectOptions->inventoryEnabled = 0;
$gui->tprojectOptions->requirementsEnabled = 0;
if ($gui->testprojectID > 0) {
    $dummy = $tproject_mgr->get_by_id($gui->testprojectID);
    $gui->tprojectOptions = $dummy['opt'];