예제 #1
0
//Name for Track
$topicStr = $settingInfo->TopicName;
//Name for Topic
$levelStr = $settingInfo->LevelName;
//Name for Level
$err_message = " Unable to process your request due to the following problems: <br>\n";
$header = "View Assigned Papers";
$accepted_privilegeID_arr = array(2 => "");
$accepted_phaseID_arr = array(3 => "");
authentication($header, $accepted_privilegeID_arr, $accepted_phaseID_arr, $homepage, $php_root_path, $GLOBALS["DB_PREFIX"], &$err_message);
//Establish connection with database
$db = adodb_connect(&$err_message);
$showing = $_GET["showing"];
$sort = $_GET["sort"];
//Call function to evaluate showing
$showing = evaluate_showing($showing);
$_SESSION["sort"] = $sort;
$_SESSION["showing"] = $showing;
//Retrive the preferences on the papers
$reviewSQL = "SELECT * FROM " . $GLOBALS["DB_PREFIX"] . "Review R , " . $GLOBALS["DB_PREFIX"] . "Paper P";
$reviewSQL .= " WHERE R.PaperID = P.PaperID";
$reviewSQL .= " AND R.Membername = '" . $_SESSION["valid_user"] . "'";
$reviewSQL .= " AND P.Withdraw = 'false'";
$reviewResult = $db->Execute($reviewSQL);
$totalPapers = $reviewResult->RecordCount();
$countResult = $db->Execute($reviewSQL);
$num_rows = $countResult->RecordCount();
////////////////////////////////////////////////
if (is_null($_SESSION["view"]) && is_null($_POST["view"])) {
    define("MAX_TAGS", 5);
} else {
예제 #2
0
            $sortStr = "UserName - Ascending";
            break;
    }
    //Limit the records according to max_view_emails
    $emailSQL .= " LIMIT " . $showing . "," . $max_view_emails;
    return $emailSQL;
}
//end of function
if ($_POST["showing"]) {
    $_GET["showing "] = $_POST["showing"];
}
if ($_POST["sort"]) {
    $_GET["sort"] = $_POST["sort"];
}
//Call function to evaluate showing
$_GET["showing"] = evaluate_showing($_GET["showing"]);
$emailSQL = get_Recipient_Group_SQL($recipientGroupName);
$emailResult = $db->Execute($emailSQL);
$num_rows = $emailResult->RecordCount();
$emailSQL = limit_view_emails($emailSQL, $_GET["sort"], $_GET["showing"], $sortStr, MAX_EMAILS);
//echo $emailSQL;
$emailResult = $db->Execute($emailSQL);
if (!$emailResult) {
    echo "Could not retrieve user email information - try again";
    exit;
}
$limit_rows = $emailResult->RecordCount();
//Update the session accordingly
if ($_POST["to"] || isset($_SESSION["arrUpdateEmails"])) {
    /*
    		echo "<br>Both post and session.<br>";