} require_once $cfg_web_root . 'classes/configobject.class.php'; require_once $cfg_web_root . 'classes/lang.class.php'; require_once $cfg_web_root . 'lang/' . $language . '/include/common.inc'; // Include common language file that all scripts need require_once $cfg_web_root . 'include/custom_error_handler.inc'; require_once $cfg_web_root . 'classes/dbutils.class.php'; require_once $cfg_web_root . 'classes/networkutils.class.php'; require_once $cfg_web_root . 'classes/userobject.class.php'; require_once $cfg_web_root . 'classes/authentication.class.php'; $mysqli = DBUtils::get_mysqli_link($configObject->get('cfg_db_host'), $configObject->get('cfg_db_staff_user'), $configObject->get('cfg_db_staff_passwd'), $configObject->get('cfg_db_database'), $configObject->get('cfg_db_charset'), $notice, $configObject->get('dbclass')); //array('alreadyloggedin', array('disabled' => true), 'Disabled Already Logged In'), $newauth = array(array('loginformfields', array('fields' => array(array('name' => 'Button1', 'description' => 'Description1', 'type' => 'input', 'defaultvalue' => ''), array('name' => 'Button2', 'description' => 'Description2', 'type' => 'input', 'defaultvalue' => ''))), 'SCT Reviewer Data Info'), array('fixedlist', array('authusers' => array('sctreviewer' => '@Password1')), 'SCT Reviewer List')); $configObject->set('authentication', $newauth); session_name('RogoAuthentication'); $return = session_start(); $authentication = new Authentication($configObject, $mysqli, $_REQUEST, $_SESSION); $authentication->do_authentication($string); if ($authentication->username != 'sctreviewer') { print "not expected user"; exit; } $getauthobj = new stdClass(); //$authentication->get_auth_obj($getauthobj); //$userObject = UserObject::get_instance(); //$userObject->db_user_change(); $authentication->display_debug(); $userObject = UserObject::get_instance(); var_dump($authentication); var_dump($_REQUEST); var_dump($userObject);
if (is_null($configObject->get('cfg_db_port'))) { $configObject->set('cfg_db_port', 3306); } $mysqli = DBUtils::get_mysqli_link($configObject->get('cfg_db_host'), $configObject->get('cfg_db_username'), $configObject->get('cfg_db_passwd'), $configObject->get('cfg_db_database'), $configObject->get('cfg_db_charset'), $notice, $configObject->get('dbclass'), $configObject->get('cfg_db_port')); $notice = UserNotices::get_instance(); if (is_null($configObject->get('display_auth_debug'))) { $notice->display_notice_and_exit($mysqli, $string['pagenotfound'], '"display_auth_debug" not correctly set in the config file', $string['accessdenied'], $configObject->get('cfg_root_path') . '/artwork/page_not_found.png', '#C00000', true, true); } if ($configObject->get('cfg_session_name') != '') { session_name($configObject->get('cfg_session_name')); } else { session_name('RogoAuthentication'); } $return = session_start(); $authentication = new Authentication($configObject, $mysqli, $_REQUEST, $_SESSION); $result = $authentication->do_authentication($string); $authinfo = $authentication->version_info(); $plugin_no = count($authinfo->plugins); echo "<h3>User Info:</h3>"; $getauthobj = new stdClass(); $authentication->get_auth_obj($getauthobj); $userObject = UserObject::get_instance(); $userObject->debug(); echo "<h3>Authentication Info:</h3><table cellspacing=\"0\" cellpadding=\"2\" border=\"0\" style=\"margin:10px\">\n"; echo "<tr><td class=\"sechead\">" . $string['No'] . "</td><td class=\"sechead\">" . $string['Name'] . "</td><td class=\"sechead\">" . $string['Class'] . "</td><td class=\"sechead\">" . $string['Version'] . "</td></tr>"; for ($i = 1; $i < $plugin_no; $i++) { echo "<tr><td>" . $authinfo->plugins[$i]->number . ".</td><td><nobr>" . $authinfo->plugins[$i]->name . "</nobr></td><td>" . $authinfo->plugins[$i]->classname . "</td><td>" . $authinfo->plugins[$i]->version . "</td></tr>\n"; } echo "</table>\n"; echo "<br />\n"; echo "<h3>Authentication Debug:</h3>";