• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP validate_calendars函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中validate_calendars函数的典型用法代码示例。如果您正苦于以下问题:PHP validate_calendars函数的具体用法?PHP validate_calendars怎么用?PHP validate_calendars使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了validate_calendars函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: validate_calendars

 }
 if (isset($_POST["assignment_uploads"]) && ($tmp_uploads = clean_input($_POST["assignment_uploads"], array("trim", "notags")))) {
     $PROCESSED["assignment_uploads"] = $tmp_uploads == "allow" ? 0 : 1;
 } else {
     $PROCESSED["assignment_uploads"] = 1;
 }
 if (isset($_POST["allow_multiple_files"]) && $_POST["allow_multiple_files"] && isset($_POST["num_files_allowed"]) && ($max_file_uploads = (int) $_POST["num_files_allowed"]) > 0) {
     $PROCESSED["max_file_uploads"] = $max_file_uploads;
 } else {
     $PROCESSED["max_file_uploads"] = 1;
 }
 /**
  * Required field "event_start" / Event Date & Time Start (validated through validate_calendars function).
  */
 $release_date = validate_calendars("viewable", false, false, true);
 $due_date = validate_calendars("due", false, false, true);
 if (isset($release_date["start"]) && (int) $release_date["start"]) {
     $PROCESSED["release_date"] = (int) $release_date["start"];
 } else {
     $PROCESSED["release_date"] = 0;
 }
 if (isset($release_date["finish"]) && (int) $release_date["finish"]) {
     $PROCESSED["release_until"] = (int) $release_date["finish"];
 } else {
     $PROCESSED["release_until"] = 0;
 }
 if (isset($due_date["finish"]) && (int) $due_date["finish"]) {
     $PROCESSED["due_date"] = (int) $due_date["finish"];
 } else {
     $PROCESSED["due_date"] = 0;
 }
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:add.inc.php


示例2: elseif

} elseif (!isset($_SESSION["isAuthorized"]) || !$_SESSION["isAuthorized"]) {
    header("Location: " . ENTRADA_URL);
    exit;
} elseif (!$ENTRADA_ACL->amIAllowed("reportindex", "read", false)) {
    $ERROR++;
    $ERRORSTR[] = "Your account does not have the permissions required to use this module.<br /><br />If you believe you are receiving this message in error please contact <a href=\"mailto:" . html_encode($AGENT_CONTACTS["administrator"]["email"]) . "\">" . html_encode($AGENT_CONTACTS["administrator"]["name"]) . "</a> for assistance.";
    echo display_error();
    application_log("error", "Group [" . $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["group"] . "] and role [" . $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["role"] . "] do not have access to this module [" . $MODULE . "]");
} else {
    define("IN_REPORTS", true);
    $BREADCRUMB[] = array("url" => ENTRADA_URL . "/admin/" . $MODULE, "title" => $MODULES[strtolower($MODULE)]["title"]);
    if ($router && $router->initRoute()) {
        $PREFERENCES = preferences_load($MODULE);
        $ORGANISATION_LIST = array();
        if (isset($_POST["reporting_start"]) && (int) trim($_POST["reporting_start"]) && isset($_POST["reporting_finish"]) && (int) trim($_POST["reporting_finish"])) {
            $report_date = validate_calendars("reporting", true, true, true);
            if (isset($report_date["start"]) && (int) $report_date["start"]) {
                $_SESSION[APPLICATION_IDENTIFIER][$MODULE]["reporting_start"] = (int) $report_date["start"];
            }
            if (isset($report_date["finish"]) && (int) $report_date["finish"]) {
                $_SESSION[APPLICATION_IDENTIFIER][$MODULE]["reporting_finish"] = (int) $report_date["finish"];
            }
        } else {
            if (!isset($_SESSION[APPLICATION_IDENTIFIER][$MODULE]["reporting_start"])) {
                $_SESSION[APPLICATION_IDENTIFIER][$MODULE]["reporting_start"] = strtotime("July 1st, " . (date("Y", time()) - (date("m", time()) < 7 ? 1 : 2)) . " 0:00:00");
            }
            if (!isset($_SESSION[APPLICATION_IDENTIFIER][$MODULE]["reporting_finish"])) {
                $_SESSION[APPLICATION_IDENTIFIER][$MODULE]["reporting_finish"] = strtotime("+1 year", $_SESSION[APPLICATION_IDENTIFIER][$MODULE]["reporting_start"] - 1);
            }
        }
        /**
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:reports.inc.php


示例3: validate_calendars

 } else {
     $PROCESSED["incident_severity"] = 1;
 }
 /*
  * Required field "incident_status" / Incident Status.
  */
 if (isset($_POST["incident_status"]) && $_POST["incident_status"]) {
     $PROCESSED["incident_status"] = 1;
 } else {
     $PROCESSED["incident_status"] = 0;
 }
 /**
  * Required field "incident_date" / Incident Start (validated through validate_calendars function).
  * Non-required field "follow_up_date" / Incident Finish (validated through validate_calendars function).
  */
 $incident_date = validate_calendars("incident", true, false);
 if (isset($incident_date["start"]) && (int) $incident_date["start"]) {
     $PROCESSED["incident_date"] = (int) $incident_date["start"];
 }
 if (isset($incident_date["finish"]) && (int) $incident_date["finish"]) {
     $PROCESSED["follow_up_date"] = (int) $incident_date["finish"];
 } else {
     $PROCESSED["follow_up_date"] = 0;
 }
 /**
  * Non-required field "incident_description" / Comments.
  */
 if (isset($_POST["incident_description"]) && ($incident_description = clean_input($_POST["incident_description"], array("trim", "notags")))) {
     $PROCESSED["incident_description"] = $incident_description;
 } else {
     $PROCESSED["incident_description"] = "";
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:add.inc.php


示例4: validate_calendars

     $PROCESSED["event_desc"] = "";
 }
 if (isset($_POST["rotation_id"]) && ($rotation_id = (int) $_POST["rotation_id"])) {
     $query = "SELECT `rotation_id` FROM `" . CLERKSHIP_DATABASE . "`.`global_lu_rotations` WHERE `rotation_id` = " . $db->qstr($rotation_id);
     $result = $db->GetRow($query);
     if ($result) {
         $PROCESSED["rotation_id"] = (int) $result["rotation_id"];
     } else {
         $ERROR++;
         $ERRORSTR[] = "We were unable to locate the rotation title you've selected.";
     }
 } else {
     $ERROR++;
     $ERRORSTR[] = "The <strong>Rotation ID</strong> field is required if this event is to be a part of a Core Rotation.";
 }
 $event_dates = validate_calendars("event", true, true);
 if (isset($event_dates["start"]) && (int) $event_dates["start"]) {
     $PROCESSED["event_start"] = (int) $event_dates["start"];
 } else {
     $ERROR++;
     $ERRORSTR[] = "The <strong>Event Start</strong> field is required if this is to appear on the calendar.";
 }
 if (isset($event_dates["finish"]) && (int) $event_dates["finish"]) {
     $PROCESSED["event_finish"] = (int) $event_dates["finish"];
 } else {
     $ERROR++;
     $ERRORSTR[] = "The <strong>Event Finish</strong> field is required if this is to appear on the calendar.";
 }
 if (strlen(trim($_POST["event_status"])) < 1) {
     $ERROR++;
     $ERRORSTR[] = "Please select the status of this category after you have saved it.";
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:edit.inc.php


示例5: elseif

  */
 if (isset($_POST["max_submittable"]) && (($max_submittable = clean_input($_POST["max_submittable"], "int")) || $max_submittable === 0) && $max_submittable <= 999) {
     $PROCESSED["max_submittable"] = $max_submittable;
 } elseif ($evaluation_target_type == "peer") {
     $PROCESSED["max_submittable"] = 0;
 } else {
     add_error("The evaluation <strong>Max Submittable</strong> field is required and must be less than 999.");
 }
 if ($PROCESSED["min_submittable"] > $PROCESSED["max_submittable"] && $PROCESSED["max_submittable"] !== 0) {
     add_error("Your <strong>Min Submittable</strong> value may not be greater than your <strong>Max Submittable</strong> value.");
 }
 /**
  * Non-required field "release_date" / Viewable Start (validated through validate_calendars function).
  * Non-required field "release_until" / Viewable Finish (validated through validate_calendars function).
  */
 $viewable_date = validate_calendars("viewable", false, false);
 if (isset($viewable_date["start"]) && (int) $viewable_date["start"]) {
     $PROCESSED["release_date"] = (int) $viewable_date["start"];
 } else {
     $PROCESSED["release_date"] = 0;
 }
 if (isset($viewable_date["finish"]) && (int) $viewable_date["finish"]) {
     $PROCESSED["release_until"] = (int) $viewable_date["finish"];
 } else {
     $PROCESSED["release_until"] = 0;
 }
 /**
  * Processing for evaluation_evaluators table.
  */
 if (isset($_POST["target_group_type"]) && in_array($_POST["target_group_type"], array("cohort", "percentage", "proxy_id", "faculty", "cgroup_id"))) {
     switch ($_POST["target_group_type"]) {
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:add.inc.php


示例6: array

 * Serves as a detection method for conflicting events.
 * 
 * @author Organisation: Queen's University
 * @author Unit: School of Medicine
 * @author Developer: Brandon Thorn <[email protected]>
 * @copyright Copyright 2010 Queen's University. All Rights Reserved.
 * 
*/
@set_include_path(implode(PATH_SEPARATOR, array(dirname(__FILE__) . "/../core", dirname(__FILE__) . "/../core/includes", dirname(__FILE__) . "/../core/library", get_include_path())));
/**
 * Include the Entrada init code.
 */
require_once "init.inc.php";
if (isset($_SESSION["isAuthorized"]) && (bool) $_SESSION["isAuthorized"]) {
    if (isset($_POST) && isset($_POST["duration_segment"]) && is_array($_POST["duration_segment"]) && !empty($_POST["duration_segment"])) {
        $date = validate_calendars("event", true, false);
        $length = 0;
        foreach ($_POST["duration_segment"] as $segment) {
            $segment = clean_input($segment, array("trim", "int"));
            if ($segment) {
                $length += $segment;
            }
        }
        $start_time = $date["start"];
        $finish_time = $start_time + $length * 60;
        $audience_type = clean_input($_POST["event_audience_type"], array("notags", "trim"));
        $event_id = (int) $_POST["event_id"];
        $query = "\tSELECT * FROM `events`  AS a JOIN `event_audience` AS b ON a.`event_id` = b.`event_id`\n\t\t\t\t\tWHERE (" . $start_time . " BETWEEN `event_start` AND `event_finish` \n\t\t\t\t\tOR " . $finish_time . " BETWEEN `event_start` AND `event_finish`)";
        switch ($audience_type) {
            case "cohort":
                $cohort = isset($_POST["associated_cohort"]) ? clean_input($_POST["associated_cohort"], array("int")) : 0;
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:learning-event-conflicts.api.php


示例7: display_error

         echo display_error();
         application_log("error", "LTI Provider wizard was accessed without any LTI Provider id.");
     }
     break;
 case "add":
 default:
     switch ($STEP) {
         case 2:
             $PROCESSED["event_id"] = $EVENT_ID;
             /**
              * Step 2 Error Checking
              * Because this unsets the $ERRORSTR array, only do this if there is not already an error.
              * PITA, I know.
              */
             if (isset($_POST["timedrelease"]) && $_POST["timedrelease"] == "yes") {
                 $timed_release = validate_calendars("valid", false, false);
                 if ($ERROR) {
                     $modal_onload[] = "alert('" . addslashes($ERRORSTR[0]) . "')";
                     $ERROR = 0;
                     $ERRORSTR = array();
                     $ERROR++;
                     $ERRORSTR[] = "q3";
                     $JS_INITSTEP = 2;
                 }
                 if (isset($timed_release["start"]) && (int) $timed_release["start"]) {
                     $PROCESSED["valid_from"] = (int) $timed_release["start"];
                 }
                 if (isset($timed_release["finish"]) && (int) $timed_release["finish"]) {
                     $PROCESSED["valid_until"] = (int) $timed_release["finish"];
                 }
             }
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:lti-wizard-event.api.php


示例8: switch

 $PROCESSED["organisation_id"] = $ENTRADA_USER->getActiveOrganisation();
 echo "<h1>Editing Notice</h1>\n";
 // Error Checking
 switch ($STEP) {
     case 2:
         if (isset($_POST["target"]) && ($target_audience = clean_input($_POST["target"], array("trim", "dir")))) {
             $PROCESSED["target"] = $target_audience;
         } else {
             $PROCESSED["target"] = 'updated';
         }
         if (isset($_POST["notice_summary"]) && ($notice_summary = strip_tags(clean_input($_POST["notice_summary"], "trim"), "<a><br><p>"))) {
             $PROCESSED["notice_summary"] = $notice_summary;
         } else {
             add_error("You must provide a notice summary.");
         }
         $display_date = validate_calendars("display", true, true);
         if (isset($display_date["start"]) && (int) $display_date["start"]) {
             $PROCESSED["display_from"] = (int) $display_date["start"];
         } else {
             add_error("You must select a valid display start date.");
         }
         if (isset($display_date["finish"]) && (int) $display_date["finish"]) {
             $PROCESSED["display_until"] = (int) $display_date["finish"];
         } else {
             add_error("You must select a valid display finish date.");
         }
         if (isset($_POST["target_audience"]) && ($target_audience = clean_input($_POST["target_audience"], "trim"))) {
             if (strpos($target_audience, "all:") !== false || $target_audience == "public") {
                 $PROCESSED["associated_audience"][] = array("audience_type" => $target_audience, "audience_value" => 0);
             }
         }
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:edit.inc.php


示例9: validate_calendars

 } else {
     $PROCESSED["clinical"] = 1;
 }
 /*
  * Required field "account_active" / Account Status.
  */
 if (isset($_POST["account_active"]) && $_POST["account_active"] == "true") {
     $PROCESSED_ACCESS["account_active"] = "true";
 } else {
     $PROCESSED_ACCESS["account_active"] = "false";
 }
 /**
  * Required field "access_starts" / Access Start (validated through validate_calendars function).
  * Non-required field "access_finish" / Access Finish (validated through validate_calendars function).
  */
 $access_date = validate_calendars("access", true, false);
 if (isset($access_date["start"]) && (int) $access_date["start"]) {
     $PROCESSED_ACCESS["access_starts"] = (int) $access_date["start"];
 }
 if (isset($access_date["finish"]) && (int) $access_date["finish"]) {
     $PROCESSED_ACCESS["access_expires"] = (int) $access_date["finish"];
 } else {
     $PROCESSED_ACCESS["access_expires"] = 0;
 }
 /**
  * Non-required field "prefix" / Prefix.
  */
 if (isset($_POST["prefix"]) && @in_array($prefix = clean_input($_POST["prefix"], "trim"), $PROFILE_NAME_PREFIX)) {
     $PROCESSED["prefix"] = $prefix;
 } else {
     $PROCESSED["prefix"] = "";
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:edit.inc.php


示例10: switch

     }
 } else {
     $ERROR++;
     $ERRORSTR[] = "The <strong>Marking Scheme</strong> field is a required field.";
 }
 //Show in learner gradebook check
 if (isset($_POST["show_learner_option"])) {
     switch ($show_learner_option = clean_input($_POST["show_learner_option"], array("trim", "int"))) {
         case 0:
             $PROCESSED["show_learner"] = $show_learner_option;
             $PROCESSED["release_date"] = 0;
             $PROCESSED["release_until"] = 0;
             break;
         case 1:
             $PROCESSED["show_learner"] = $show_learner_option;
             $release_dates = validate_calendars("show", false, false);
             if (isset($release_dates["start"]) && (int) $release_dates["start"]) {
                 $PROCESSED["release_date"] = (int) $release_dates["start"];
             } else {
                 $PROCESSED["release_date"] = 0;
             }
             if (isset($release_dates["finish"]) && (int) $release_dates["finish"]) {
                 $PROCESSED["release_until"] = (int) $release_dates["finish"];
             } else {
                 $PROCESSED["release_until"] = 0;
             }
             break;
         default:
             $PROCESSED["show_learner"] = 0;
             break;
     }
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:add.inc.php


示例11: validate_calendars

             $ERRORSTR[] = "You must provide an occupant name or title in the <strong>Occupant Name / Title</strong> field.";
         }
         if (isset($_POST["cost_recovery"]) && $_POST["cost_recovery"] == "1") {
             $PROCESSED["cost_recovery"] = 1;
         }
         $PROCESSED["confirmed"] = 1;
         break;
     default:
         $ERROR++;
         $ERRORSTR[] = "You must provide a valid occupant type in order to continue.";
         break;
 }
 if (isset($_POST["notes"]) && ($tmp_input = clean_input($_POST["notes"], array("trim", "allowedtags")))) {
     $PROCESSED["notes"] = $tmp_input;
 }
 $inhabiting_date = validate_calendars("inhabiting", true, true, false);
 if (isset($inhabiting_date["start"]) && (int) $inhabiting_date["start"]) {
     $PROCESSED["inhabiting_start"] = (int) $inhabiting_date["start"];
 } else {
     $ERROR++;
     $ERRORSTR[] = "You must select a date that the occupant will move into " . html_encode($APARTMENT_INFO["apartment_title"]);
 }
 if (isset($inhabiting_date["finish"]) && (int) $inhabiting_date["finish"]) {
     $PROCESSED["inhabiting_finish"] = (int) $inhabiting_date["finish"];
 } else {
     $ERROR++;
     $ERRORSTR[] = "You must select a date that the occupant will vacate from " . html_encode($APARTMENT_INFO["apartment_title"]);
 }
 if (!$ERROR) {
     $PROCESSED["updated_last"] = time();
     $PROCESSED["updated_by"] = $ENTRADA_USER->getID();
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:add.inc.php


示例12: validate_calendars

  */
 $draft_date = validate_calendars("copy", true, true, false);
 if (isset($draft_date["start"]) && (int) $draft_date["start"]) {
     $PROCESSED["draft_start_date"] = (int) $draft_date["start"];
 } else {
     $PROCESSED["draft_start_date"] = 0;
 }
 if (isset($draft_date["finish"]) && (int) $draft_date["finish"]) {
     $PROCESSED["draft_finish_date"] = (int) $draft_date["finish"];
 } else {
     $PROCESSED["draft_finish_date"] = 0;
 }
 /**
  * Required field "new_start" / Event Date & Time Start (validated through validate_calendars function).
  */
 $start_date = validate_calendars("new", true, false, false);
 if (isset($start_date["start"]) && (int) $start_date["start"]) {
     $PROCESSED["new_start_day"] = (int) $start_date["start"];
 }
 if (has_error()) {
     $STEP = 1;
 } else {
     if ($db->AutoExecute("drafts", $PROCESSED, "INSERT") && ($draft_id = $db->Insert_ID())) {
         $creators = array("draft_id" => $draft_id, "proxy_id" => $ENTRADA_USER->getActiveId());
         if (!$db->AutoExecute("draft_creators", $creators, "INSERT")) {
             application_log("error", "Error when creating draft [" . $draft_id . "]. Unable to insert to the draft_creators table. Database said: " . $db->ErrorMsg());
         }
         if ($PROCESSED["options"]) {
             // This is just to be safe I am assuming.
             $query = "DELETE FROM `draft_options` WHERE `draft_id` = " . $db->qstr($draft_id);
             $db->Execute($query);
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:create-draft.inc.php


示例13: application_log

             $url = ENTRADA_URL;
             $SUCCESS++;
             $SUCCESSSTR[] = "You have successfully updated this <strong>Deficiency Plan</strong> in the system.<br /><br />Please <a href=\"" . $url . "\">click here</a> to proceed to the Dashboard or you will be automatically forwarded in 5 seconds.";
             $ONLOAD[] = "setTimeout('window.location=\\'" . $url . "\\'', 5000)";
             application_log("success", "Updated deficiency plan [" . $PLAN_ID . "] in the system.");
         } else {
             $ERROR++;
             $ERRORSTR[] = "There was a problem editing this deficiency plan in the system. The MEdTech Unit was informed of this error; please try again later.";
             application_log("error", "There was an error editing a deficiency plan for Proxy ID [" . $PROXY_ID . "]. Database said: " . $db->ErrorMsg());
         }
     }
 } else {
     if (isset($_POST["plan_body"]) && ($plan_body = clean_input($_POST["plan_body"], array("notags", "trim")))) {
         $PROCESSED["plan_body"] = $plan_body;
     }
     $timeline_dates = validate_calendars("timeline", true, true);
     if (isset($timeline_dates["start"]) && (int) $timeline_dates["start"]) {
         $PROCESSED["timeline_start"] = (int) $timeline_dates["start"];
     } else {
         $ERROR++;
         $ERRORSTR[] = "The <strong>Timeline Start</strong> field is required to detail when your plan to attain deficiencies will begin.";
     }
     if (isset($timeline_dates["finish"]) && (int) $timeline_dates["finish"]) {
         $PROCESSED["timeline_finish"] = (int) $timeline_dates["finish"];
     } else {
         $ERROR++;
         $ERRORSTR[] = "The <strong>Timeline Finish</strong> field is required to detail when your plan to attain deficiencies will end.";
     }
     if (!isset($PROCESSED["clerk_accepted"]) || !$PROCESSED["clerk_accepted"]) {
         if (isset($_POST["clerk_accepted"]) && ($clerk_accepted = $_POST["clerk_accepted"] ? true : false)) {
             $PROCESSED["clerk_accepted"] = $clerk_accepted;
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:deficiency-plan.inc.php


示例14: validate_calendars

     $PROCESSED["report_supporting_link"] = "";
 }
 /**
  * Required field "report_date" / Event Date & Time Start.
  */
 $report_date = validate_calendars("report", true, false, false);
 if (isset($report_date["start"]) && (int) $report_date["start"]) {
     $PROCESSED["report_date"] = (int) $report_date["start"];
 } else {
     $PROCESSED["report_date"] = 0;
     add_error("You must provide a reporting date for this report.");
 }
 /**
  * Required field "event_start" / Event Date & Time Start.
  */
 $period_date = validate_calendars("period", true, true, false);
 if (isset($period_date["start"]) && (int) $period_date["start"]) {
     $PROCESSED["report_start"] = (int) $period_date["start"];
 } else {
     $PROCESSED["report_start"] = 0;
     add_error("You must provide a reporting start date.");
 }
 if (isset($period_date["finish"]) && (int) $period_date["finish"]) {
     $PROCESSED["report_finish"] = (int) $period_date["finish"];
 } else {
     $PROCESSED["report_finish"] = 0;
     add_error("You must provide a reporting finish date.");
 }
 /**
  * Non-required field "event_location" / Event Location
  */
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:add.inc.php


示例15: validate_calendars

     } else {
         $ERROR++;
         $ERRORSTR[] = "You must provide the telephone number of the key contact.";
     }
     if (isset($_POST["keys_email"]) && ($tmp_input = clean_input($_POST["keys_email"], array("trim", "notags"))) && valid_address($tmp_input)) {
         $PROCESSED["keys_email"] = $tmp_input;
     } else {
         $ERROR++;
         $ERRORSTR[] = "You must provide a valid e-mail address for the key contact.";
     }
 }
 /**
  * Required field "release_date" / Available Start (validated through validate_calendars function).
  * Non-required field "release_until" / Available Finish (validated through validate_calendars function).
  */
 $available_date = validate_calendars("available", true, false, false);
 if (isset($available_date["start"]) && (int) $available_date["start"]) {
     $PROCESSED["available_start"] = (int) $available_date["start"];
 } else {
     $PROCESSED["available_start"] = 0;
 }
 if (isset($available_date["finish"]) && (int) $available_date["finish"]) {
     $PROCESSED["available_finish"] = (int) $available_date["finish"];
 } else {
     $PROCESSED["available_finish"] = 0;
 }
 $query = "\tSELECT `dep_id`\n\t\t\t\t\t\tFROM `" . AUTH_DATABASE . "`.`user_departments`\n\t\t\t\t\t\tWHERE `user_id` = " . $db->qstr($ENTRADA_USER->getId());
 $department_id = $db->getOne($query);
 if ($department_id) {
     $PROCESSED["department_id"] = $department_id;
 } else {
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:add.inc.php


示例16: validate_calendars

  */
 if (isset($_POST["category_name"]) && ($category_name = clean_input($_POST["category_name"], array("notags", "trim")))) {
     $PROCESSED["category_name"] = $category_name;
 } else {
     $ERROR++;
     $ERRORSTR[] = "The <strong>Category" . (isset($category_details["ctype_name"]) && $category_details["ctype_name"] ? " " . $category_details["ctype_name"] : "") . " Name</strong> is a required field.";
 }
 /**
  * Non-required field "category_code" / Category Code
  */
 if (isset($_POST["category_code"]) && ($category_code = clean_input($_POST["category_code"], array("notags", "trim")))) {
     $PROCESSED["category_code"] = $category_code;
 } else {
     $PROCESSED["category_code"] = "";
 }
 $category_dates = validate_calendars("category", true, false, false);
 if (isset($category_dates["start"]) && (int) $category_dates["start"]) {
     $PROCESSED["category_start"] = (int) $category_dates["start"];
 } else {
     $ERROR++;
     $ERRORSTR[] = "The <strong>Category Start</strong> field is required.";
 }
 if (isset($category_dates["finish"]) && (int) $category_dates["finish"]) {
     $PROCESSED["category_finish"] = (int) $category_dates["finish"];
 } else {
     $ERROR++;
     $ERRORSTR[] = "The <strong>Category Finish</strong> field is required.";
 }
 /**
  * Required field "category_type" / Category Type.
  */
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:edit.inc.php


示例17: validate_calendars

         $require_start = true;
         $require_finish = false;
         break;
     default:
         $require_start = false;
         $require_finish = false;
         break;
 }
 if ($STEP >= 4 && isset($PROCESSED["quiztype_id"]) && $PROCESSED["quiztype_id"]) {
     $query = "SELECT `quiztype_code` FROM `quizzes_lu_quiztypes` WHERE `quiztype_id` = " . $db->qstr($PROCESSED["quiztype_id"]);
     $quiztype = $db->GetOne($query);
     if ($quiztype == "delayed") {
         $require_finish = true;
     }
 }
 $viewable_date = validate_calendars("accessible", $require_start, $require_finish);
 if (isset($viewable_date["start"]) && (int) $viewable_date["start"]) {
     $PROCESSED["release_date"] = (int) $viewable_date["start"];
 } else {
     $PROCESSED["release_date"] = 0;
 }
 if (isset($viewable_date["finish"]) && (int) $viewable_date["finish"]) {
     $PROCESSED["release_until"] = (int) $viewable_date["finish"];
 } else {
     $PROCESSED["release_until"] = 0;
 }
 if (isset($_POST["accessible_start"]) && $_POST["accessible_start"] == 1) {
     $PROCESSED["accessible_start"] = 1;
     $PROCESSED["accessible_start_date"] = clean_input($_POST["accessible_start_date"], "credentials");
     $PROCESSED["accessible_start_hour"] = clean_input($_POST["accessible_start_hour"], "int");
     $PROCESSED["accessible_start_min"] = clean_input($_POST["accessible_start_min"], "int");
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:quiz-wizard.api.php


示例18: validate_calendars

 if (isset($_POST["poll_answer_2"]) && ($poll_answer_2 = clean_input($_POST["poll_answer_2"], array("trim")))) {
     $PROCESSED_ANSWERS[1] = $poll_answer_2;
 } else {
     $ERROR++;
     $ERRORSTR[] = "You must provide an answer for poll answer 2.";
 }
 if (isset($_POST["poll_answer_3"]) && ($poll_answer_3 = clean_input($_POST["poll_answer_3"], array("trim")))) {
     $PROCESSED_ANSWERS[2] = $poll_answer_3;
 }
 if (isset($_POST["poll_answer_4"]) && ($poll_answer_4 = clean_input($_POST["poll_answer_4"], array("trim")))) {
     $PROCESSED_ANSWERS[3] = $poll_answer_4;
 }
 if (isset($_POST["poll_answer_5"]) && ($poll_answer_5 = clean_input($_POST["poll_answer_5"], array("trim")))) {
     $PROCESSED_ANSWERS[4] = $poll_answer_5;
 }
 $display_date = validate_calendars("poll", true, false);
 if (isset($display_date["start"]) && (int) $display_date["start"]) {
     $PROCESSED["poll_from"] = (int) $display_date["start"];
 } else {
     $ERROR++;
     $ERRORSTR[] = "You must select a valid display start date.";
 }
 if (isset($display_date["finish"]) && (int) $display_date["finish"]) {
     $PROCESSED["poll_until"] = (int) $display_date["finish"];
 } else {
     $PROCESSED["poll_until"] = 0;
 }
 if (!$ERROR) {
     $PROCESSED["updated_date"] = time();
     $PROCESSED["updated_by"] = $ENTRADA_USER->getID();
     if ($db->AutoExecute("poll_questions", $PROCESSED, "INSERT")) {
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:add.inc.php


示例19: application_log

         application_log("error", print_r($ERRORSTR, true));
     }
     if (isset($_POST["new"]) && $_POST["new"]) {
         $PROCESSED = array("event_start" => $PROCESSED["event_start"]);
         if (!$temp_event_id) {
             echo "<input type=\"hidden\" value=\"" . $event_id . "\" id=\"updated_session_id\" />";
         }
         $event_id = 0;
     }
 } else {
     $PROCESSED = $event_info;
     if (isset($_POST["event_start"]) && $_POST["event_start"]) {
         /**
          * Required field "event_start" / Event Date & Time Start (validated through validate_calendars function).
          */
         $start_date = validate_calendars("event", false, false);
         if (isset($start_date["start"]) && (int) $start_date["start"]) {
             $PROCESSED["event_start"] = (int) $start_date["start"];
         }
     }
 }
 if ($parent_id) {
     $query = "SELECT COUNT(*) FROM `events` WHERE `parent_id` = " . $db->qstr($parent_id);
     $session_count = $db->GetOne($query);
     $session_count = $session_count ? $session_count + 1 : 1;
 } else {
     $session_count = 1;
 }
 /**
  * Compiles the full list of faculty members.
  */
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:view-sessions.api.php


示例20: add_error

     $result = $db->GetRow($query);
     if ($result) {
         $evaluation_target_id = $result["target_id"];
         $evaluation_target_type = $result["target_shortname"];
         $PROCESSED["eform_id"] = $eform_id;
     } else {
         add_error("The <strong>Evaluation Form</strong> that you selected is not currently available for use.");
     }
 } else {
     add_error("You must select an <strong>Evaluation Form</strong> to use during this evaluation.");
 }
 /**
  * Non-required field "evaluation_start" / Evaluation Start (validated through validate_calendars function).
  * Non-required field "evaluation_finish" / Evaluation Finish (validated through validate_calendars function).
  */
 $viewable_date = validate_calendars("evaluation", false, false);
 if (isset($viewable_date["start"]) && (int) $viewable_date["start"]) {
     $PROCESSED["evaluation_start"] = (int) $viewable_date["start"];
 } else {
     $PROCESSED["evaluation_start"] = 0;
 }
 if (isset($viewable_date["finish"]) && (int) $viewable_date["finish"]) {
     $PROCESSED["evaluation_finish"] = (int) $viewable_date["finish"];
 } else {
     $PROCESSED["evaluation_finish"] = 0;
 }
 /**
  * Non-required field "evaluation_mandatory" / Evaluation Mandatory
  */
 if (isset($_POST["evaluation_mandatory"]) && $_POST["min_submittable"]) {
     $PROCESSED["evaluation_mandatory"] = true;
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:edit.inc.php



注:本文中的validate_calendars函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP validate_config_vars函数代码示例发布时间:2022-05-23
下一篇:
PHP validate_blog_form函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap