$com = explode(",", $com); $sm = false; $own = false; foreach ($com as $key => $value) { $al = explode(":", $value); if ($al[0] == 'al') { $al = trim($al[1]); $sm = superMaster($_SESSION['adminLevel'], $al); } else { if ($al[0] == 'o') { $al = trim($al[1]); $own = authObject($al); } } } if ($own or $sm or authorizeTransit($_SESSION['adminLevel'], "Zz0")) { $query = "SHOW FULL COLUMNS FROM `" . $tn . "`"; $tResult = mysql_db_query("collegedb2", $query, $dbc); $cc = mysql_num_rows($tResult); for ($j = 0; $j < $cc; $j++) { $Field[$j] = mysql_result($tResult, $j, 'Field'); $query = "SELECT * FROM `" . $tn . "` WHERE `" . $Field[$j] . "` LIKE '" . $searchString . "'"; $sResult = mysql_query($query, $dbc); $sRCount = mysql_num_rows($sResult); if ($sRCount > 0) { $mRows[$tn] = array(); $rRow = array(); for ($k = 0; $k < $sRCount; $k++) { for ($c = 0; $c < $cc; $c++) { $cn = mysql_result($tResult, $c, "Field"); $rRow[$cn] = mysql_result($sResult, $k, $cn);
$ms[0] = $mems; $com = $liveDBTable['com']; $com = explode(",", $com); foreach ($com as $key => $value) { $al = explode(":", $value); if ($al[0] == 'al') { $adl = trim($al[1]); $sm = superMaster($_SESSION['adminLevel'], $adl); } else { if ($al[0] == 'o') { $o = $al[1]; $own = $adl != "" ? authObject($o) : $_SESSION['uid'] == $o ? true : false; } } } if (authorizeTransit($_SESSION['adminLevel'], 'Zz0') or authorizeTransit($_SESSION['adminLevel'], 'Zs0') or $own) { $authorizeTransit = TRUE; $liveDBTable['usersData'][$_SESSION['uid']]['fc'] = TRUE; $fc = TRUE; $rc = $rowCount; } elseif ($tableAdminLevel) { $mems['r']['authRows'] = array_unique(array_merge($mems['r']['authRows'], $mems['w']['authRows'])); if ($mems['w']['authRows'][0] == '*') { $authorizeTransit = TRUE; $liveDBTable['usersData'][$_SESSION['uid']]['fc'] = TRUE; $fc = TRUE; $rc = $rowCount; } elseif ($mems['r']['authRows'] != NULL) { for ($i = 1; $i < $colCount; $i++) { $k = 0; for ($j = 0; $j < $rowCount; $j++) {
<?php /* Author: Gowtham */ $root = realpath($_SERVER['DOCUMENT_ROOT']); require "authorize.php"; require_once "{$root}/lib/inc.php"; $uTools = new DOMDocument(); //disables html error logging libxml_use_internal_errors(FALSE); @$uTools->loadHTMLFile('userTools.html'); $userAuthTools = new DOMDocument(); $userTools = $userAuthTools->createElement('userTools'); if (authorizeTransit($_SESSION['adminLevel'], 'Zz0')) { } if (domesticSlave($_SESSION['adminLevel'], 'Zz9')) { $dbTableExecuter = $uTools->getElementById('dbTableExecuterTool'); $dbTableExecuter = $userAuthTools->importNode($dbTableExecuter, TRUE); $appendChild = $userTools->appendChild($dbTableExecuter); $inboxOpener = $uTools->getElementById('inboxOpener'); $inboxOpener = $userAuthTools->importNode($inboxOpener, TRUE); $appendChild = $userTools->appendChild($inboxOpener); $chatTool = $uTools->getElementById('chatTool'); $chatTool = $userAuthTools->importNode($chatTool, TRUE); $appendChild = $userTools->appendChild($chatTool); $keelCrafter = $uTools->getElementById('keelCrafter'); $keelCrafter = $userAuthTools->importNode($keelCrafter, TRUE); $appendChild = $userTools->appendChild($keelCrafter); } if (domesticSlave($_SESSION['adminLevel'], 'Zz0')) { $dGTool = $uTools->getElementById('dataGrabberTool'); $dGTool = $userAuthTools->importNode($dGTool, TRUE);
function tableAllowed($dbTable) { if (authorizeTransit($_SESSION['adminLevel'], 'Zz0')) { return true; } if (domesticSlave($_SESSION['adminLevel'], 'Zz9')) { if (strpos($dbTable, '_' . $_SESSION['username'])) { return TRUE; } require '../adminLevelDecoder.php'; if (strpos($dbTable, '_' . $adminLevelDecoder[$_SESSION['function'][$_POST['role']]['aL'][0]]['label'] . '_' . $adminLevelDecoder[$_SESSION['function'][$_POST['role']]['aL'][2]]['label'])) { return TRUE; } } if (anyDeptSlave($_SESSION['function'][$_POST['role']]['aL'], 'Zz0')) { require '../adminLevelDecoder.php'; if (strpos($dbTable, strtolower('_' . $adminLevelDecoder[$_SESSION['function'][$_POST['role']]['aL'][0]]['label'] . '_' . $adminLevelDecoder[$_SESSION['function'][$_POST['role']]['aL'][2]]['label']))) { return TRUE; } } return FALSE; }