require_once 'benchmarks.php'; require_once 'FbAuth.php'; require_once 'model_user.php'; //###To make more secure ajax call look use this: http://insecureweb.com/web-security/secure-your-ajax-request-with-jquery/ //I create timer object and start it (TRUE) $timer = new Benchmark_Timer(); $timer->start(); //Establish connection try { DB::get()->connect(); } catch (Exception $e) { print_r($e); //### It must be handle better: writing in the log file (that must be set) and } $realUser = 0; $u = FbAuth::requireAuthenticate(true, false, $realUser); //### This must change later to true and take vcare to pass the cookie if (!$u) { error('Not logged in: Try to refresh the page'); } //In order to debug XML add "?T3ST=1" in the URL if (isset($_REQUEST[$debug_parameter])) { $XML_debug = true; } if (isset($_REQUEST['f']) && $_REQUEST['f'] == "position") { $col = 'position_text'; $value = $_REQUEST['v']; } elseif (isset($_REQUEST['f']) && $_REQUEST['f'] == "institution") { $col = 'institution_text'; $value = $_REQUEST['v']; } elseif (isset($_REQUEST['f']) && $_REQUEST['f'] == "degrees") {
require_once 'benchmarks.php'; require_once 'FbAuth.php'; require_once 'model_user_user.php'; require_once 'controllers.php'; //###To make more secure ajax call look use this: http://insecureweb.com/web-security/secure-your-ajax-request-with-jquery/ //I create timer object and start it (TRUE) $timer = new Benchmark_Timer(); $timer->start(); //Establish connection try { DB::get()->connect(); } catch (Exception $e) { print_r($e); //### It must be handle better: writing in the log file (that must be set) and } $u = FbAuth::requireAuthenticate(true, false); //### This must change later to true and take vcare to pass the cookie if (!$u) { error('Not logged in: Try to refresh the page'); } //The other user $v = isset($_REQUEST['v']) ? intval($_REQUEST['v']) : '0'; if (!$v) { error('Error - Other user not specified'); } //In order to debug XML add "?T3ST=1" in the URL if (isset($_REQUEST[$debug_parameter])) { $XML_debug = true; } //$c = new People(); $fOk = false;
require_once 'benchmarks.php'; require_once 'FbAuth.php'; require_once 'model_user_article.php'; require_once 'controllers.php'; //###To make more secure ajax call look use this: http://insecureweb.com/web-security/secure-your-ajax-request-with-jquery/ //I create timer object and start it (TRUE) $timer = new Benchmark_Timer(); $timer->start(); //Establish connection try { DB::get()->connect(); } catch (Exception $e) { print_r($e); //### It must be handle better: writing in the log file (that must be set) and } $u = FbAuth::requireAuthenticate(true, true); //### This must change later to true and take vcare to pass the cookie if (!$u) { error('Not logged in: Try to refresh the page'); } //In order to debug XML add "?T3ST=1" in the URL if (isset($_REQUEST[$debug_parameter])) { $XML_debug = true; } $a = isset($_REQUEST['a']) ? intval($_REQUEST['a']) : '0'; //$u = isset($_REQUEST['u']) ? $_REQUEST['u'] : '0'; if (isset($_REQUEST['mine'])) { $col = 'its_mine'; $value = !!$_REQUEST['mine']; //###Should claiming an article means also automatically follow it? Controller::a_claim($u, $a);
if ($c == 2) { //Auth as user 10101010 $u = '10101010'; MyAuth::setLoginAuthenticate($u); echo "MyAuth::setLoginAuthenticate({$u}) executed"; } else { if ($c == 3) { //perform the check auth $n = MyAuth::checkAuthentication(false); $e = MyAuth::checkAuthentication(); echo '<pre>'; print_r($_COOKIE); echo "Auth (normal) user is {$n}\n"; echo "Auth (extra secure) user is {$e}"; echo '</pre>'; } else { if ($c == 4) { //perform the check auth $e = FbAuth::requireAuthenticate(false); $n = MyAuth::checkAuthentication(false); echo '<pre>'; print_r($_COOKIE); echo "FbAuth (normal) user is {$e}\n"; echo "MyAuth (normal) user is {$n}"; echo '</pre>'; } } } } } }