Example #1
0
$trackStr = $settingInfo->TrackName;
//Name for Track
$topicStr = $settingInfo->TopicName;
//Name for Topic
$levelStr = $settingInfo->LevelName;
//Name for Level
if ($settingInfo->AbstractOnlySubmissions || $settingInfo->SESUG) {
    $exempt_array = array("email", "middlename", "presenterbio", "keyword1", "keyword2", "keyword3", "userfile", "numpages");
    $fullPaper = false;
} else {
    $exempt_array = array("email", "middlename", "presenterbio", "keyword1", "keyword2", "keyword3");
    $fullPaper = true;
}
if (count($_POST) > 0) {
    if ($_POST["Submit"] == "Update Authors") {
        if (isIntegerMoreThanZero($_POST["numauthors"], &$error_array["numauthors"]) || !empty($_POST["numauthors"])) {
        } else {
            if (trim($_POST["numauthors"]) == "") {
                $error_array["numauthors"][0] = " This entry cannot be empty. <br>\n";
            }
        }
    } else {
        if ($settingInfo->SESUG && !$_POST["level"]) {
            $error_array["level"][0] = "You must choose at least one {$levelStr}.<br>\n";
        }
        if (!$_POST["track"]) {
            $error_array["track"][0] = "You must choose a {$trackStr}.<br>\n";
        }
        if (!$_POST["category"]) {
            if (numCategories(&$err_message) > 0) {
                // allow conferences with only Tracks, but no Topics
function isValidDate(&$date, $error_array = array(), $index = 0)
{
    //	echo "<br>\nDATE: " . $date . "<br>\n" ;
    list($year, $month, $day) = split('[/.-]', $date);
    if (isIntegerMoreThanZero($day, &$error_array, &$index) && isIntegerMoreThanZero($month, &$error_array, &$index) && isIntegerMoreThanZero($year, &$error_array, &$index)) {
        if (checkdate($month, $day, $year)) {
            return true;
        } else {
            $error_array[$index] = " Invalid date input. Please check a calender for valid date. <br>\n";
            return false;
        }
    } else {
        $error_array[$index] = " Invalid date input.";
        return false;
    }
}