//
session_start();
/*
* To debug or not
*/
$debug = true;
/*
* Use syslog
*/
define_syslog_variables();
/*
* Open the log using the LOG_USER facility
*/
$r_log = openlog("CNL", LOG_CONS | LOG_PID, LOG_USER);
//
if (! $r_log) {
//
if ($debug) {
//
print_start();
//
echo "
" . basename($_SERVER['PHP_SELF']) . ": Opening log facility [failure]
";
//
print_end();
//
flush();
}
/*
* End
*/
exit();
}
//
if ($debug) {
//
syslog(LOG_INFO, basename($_SERVER['PHP_SELF']) . ": Array \$_GET is an " . print_r($_GET, true));
//
syslog(LOG_INFO, basename($_SERVER['PHP_SELF']) . ": Array \$_SESSION is an " . print_r($_SESSION, true));
//
syslog(LOG_INFO, basename($_SERVER['PHP_SELF']) . ": Array \$_POST is an " . print_r($_POST, true));
syslog(LOG_INFO, basename($_SERVER['PHP_SELF']) . ": Opening log facility [success]");
//
foreach ($_GET as $key => $value) {
syslog(LOG_INFO, basename($_SERVER['PHP_SELF']) . ": Variable \$_GET[" . $key . "] is " . $_GET[$value]);
}
//
foreach ($_SESSION as $key => $value) {
syslog(LOG_INFO, basename($_SERVER['PHP_SELF']) . ": Variable \$_SESSION[" . $key . "] is " . $_SESSION[$value]);
}
//
foreach ($_POST as $key => $value) {
syslog(LOG_INFO, basename($_SERVER['PHP_SELF']) . ": Variable \$_POST[" . $key . "] is " . $_POST[$value]);
}
}
//
if ( (! isset($_SESSION['loggedIn']) ) || (! ($_SESSION['loggedIn'] == true) ) ) {
//
header("Location: Login.php");
}
else {
if ( ( isset($_POST['action']) ) && ( isset($_POST['choice']) ) ) {
if ( strcmp( $_POST['action'], "Add" ) == 0 || strcmp( $_POST['action'], "?nioe?ec" ) == 0) {
if ($_SESSION['lang'] == 1) {
if ($_POST['choice'] == "IYec")
$_POST['choice'] = "Members";
if ($_POST['choice'] == "Aciioeayoaeo")
$_POST['choice'] = "Publications";
if ($_POST['choice'] == "?aniooeUoaeo")
$_POST['choice'] = "Presentations";
if ($_POST['choice'] == "?niouioa")
$_POST['choice'] = "Qualifications";
if ($_POST['choice'] == "Anaaa?a")
$_POST['choice'] = "Awards";
if ($_POST['choice'] == "Aiuoaneeuo OoaanaoYao")
$_POST['choice'] = "Foreign Author";
if ($_POST['choice'] == "?naa")
$_POST['choice'] = "Projects";
if ($_POST['choice'] == "OoianaUoao ?naio")
$_POST['choice'] = "Project Partners";
}
//
Header( "Location: AddForm.php?choice=" . $_POST['choice'] );
}
if ( strcmp( $_POST['action'], "Edit" ) == 0 || strcmp( $_POST['action'], "A?aianaao?a" ) == 0) {
if ($_SESSION['lang'] == 1) {
if ($_POST['choice'] == "IYec")
$_POST['choice'] = "Members";
if ($_POST['choice'] == "Aciioeayoaeo")
$_POST['choice'] = "Publications";
if ($_POST['choice'] == "?aniooeUoaeo")
$_POST['choice'] = "Presentations";
if ($_POST['choice'] == "?niouioa")
$_POST['choice'] = "Qualifications";
if ($_POST['choice'] == "Anaaa?a")
$_POST['choice'] = "Awards";
if ($_POST['choice'] == "Aiuoaneeuo OoaanaoYao")
$_POST['choice'] = "Foreign Author";
if ($_POST['choice'] == "?naa")
$_POST['choice'] = "Projects";
if ($_POST['choice'] == "OoianaUoao ?naio")
$_POST['choice'] = "Project Partners";
}
//
Header( "Location: EditForm.php?choice=" . $_POST['choice'] . "&user=" . $_SESSION['userId'] );
}
if ( strcmp( $_POST['action'], "Delete" ) == 0 || strcmp( $_POST['action'], "Aeaanao?" ) == 0) {
if ($_SESSION['lang'] == 1) {
if ($_POST['choice'] == "IYec")
$_POST['choice'] = "Members";
if ($_POST['choice'] == "Aciioeayoaeo")
$_POST['choice'] = "Publications";
if ($_POST['choice'] == "?aniooeUoaeo")
$_POST['choice'] = "Presentations";
if ($_POST['choice'] == "?niouioa")
$_POST['choice'] = "Qualifications";
if ($_POST['choice'] == "Anaaa?a")
$_POST['choice'] = "Awards";
if ($_POST['choice'] == "Aiuoaneeuo OoaanaoYao")
$_POST['choice'] = "Foreign Author";
if ($_POST['choice'] == "?naa")
$_POST['choice'] = "Projects";
if ($_POST['choice'] == "OoianaUoao ?naio")
$_POST['choice'] = "Project Partners";
}
//
Header( "Location: DeleteForm.php?choice=" . $_POST['choice'] . "&user=" . $_SESSION['userId'] );
}
}
}
//
if (! (isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] == true) ) {
//
header("Location: Login.php");
}
?>
if (isset($_SESSION['lang'])) {
if ($_SESSION['lang'] == 0) {
echo "User data management main menu ";
}
if ($_SESSION['lang'] == 1) {
echo "Eaioneeu iaiiy aea?a?neoco aaaiiYiui eae ?ncoo?i ";
}
}
?>