当前位置: 首页>>代码示例>>PHP>>正文


PHP application_log函数代码示例

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


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

示例1: sendNotification

function sendNotification($result)
{
    global $AGENT_CONTACTS, $db;
    if ($result["preceptor_proxy_id"] != 0) {
        $query = "SELECT `prefix`, `firstname`, `lastname`, `email` FROM `" . AUTH_DATABASE . "`.`user_data` WHERE `id` = " . $db->qstr($result["preceptor_proxy_id"]);
        $preceptor = $db->GetRow($query);
        $preceptor_email = $preceptor["email"];
        $preceptor_name = (!empty($preceptor["prefix"]) ? $preceptor["prefix"] . " " : "") . $preceptor["firstname"] . " " . $preceptor["lastname"];
    } else {
        $preceptor_email = $result["preceptor_email"];
        $preceptor_name = $result["preceptor_firstname"] . " " . $result["preceptor_lastname"];
    }
    if ($preceptor_email) {
        $ENTRADA_USER = User::get($result["student_id"]);
        $message = $preceptor_name . ",\n\n";
        $message .= "You have been indicated as the preceptor on an Observership:\n" . "======================================================\n" . "Submitted at: " . date("Y-m-d H:i", time()) . "\n" . "Submitted by: " . $ENTRADA_USER->getFullname(false) . "\n" . "E-Mail Address: " . $ENTRADA_USER->getEmail() . "\n" . "Observership details:\n" . "---------------------\n" . "Title: " . $result["title"] . "\n" . "Activity Type: " . $result["activity_type"] . "\n" . ($result["activity_type"] == "ipobservership" ? "IP Observership Details: " . $result["activity_type"] . "\n" : "") . "Clinical Discipline: " . $result["clinical_discipline"] . "\n" . "Organisation: " . $result["organisation"] . "\n" . "Address: " . $result["address_l1"] . "\n" . "Preceptor: " . $preceptor_name . "\n" . "Start date: " . date("Y-m-d", $result["start"]) . "\n" . "End date: " . date("Y-m-d", $result["end"]) . "\n\n" . "The observership request can be approved or rejected at the following address:\n" . ENTRADA_URL . "/confirm_observership?unique_id=" . $result["unique_id"];
        $mail = new Zend_Mail();
        $mail->addHeader("X-Section", "Observership Confirmation", true);
        $mail->setFrom($AGENT_CONTACTS["general-contact"]["email"], $AGENT_CONTACTS["general-contact"]["name"]);
        $mail->setSubject("Observership Confirmation");
        $mail->setBodyText($message);
        $mail->addTo($preceptor_email, $preceptor_name);
        if ($mail->send()) {
            $query = "UPDATE `student_observerships` SET `notice_sent` = " . $db->qstr(time()) . " WHERE `id` = " . $db->qstr($result["id"]);
            if ($db->Execute($query)) {
                return true;
                application_log("success", "Sent observership notification to [" . $preceptor_email . "] for observership_id [" . $result["id"] . "].");
            }
        } else {
            application_log("error", "Unable to send observership [observership_id: " . $result["id"] . "] confirmation request.");
            return false;
        }
    }
}
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:34,代码来源:observership-confirmations.php

示例2: delete

 public function delete()
 {
     global $db;
     $query = "DELETE FROM `student_formal_remediations` where `id`=" . $db->qstr($this->id);
     if (!$db->Execute($query)) {
         add_error("Failed to remove formal remediation from database.");
         application_log("error", "Unable to delete a student_formal_remediations record. Database said: " . $db->ErrorMsg());
     } else {
         add_success("Successfully removed Formal Remediation.");
     }
 }
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:11,代码来源:FormalRemediation.class.php

示例3: update

 public function update(array $input_arr)
 {
     extract($input_arr);
     global $db;
     $query = "Update `student_clineval_comments` set `comment`=?, `source`=? where `id`=?";
     if (!$db->Execute($query, array($text, $source, $this->id))) {
         add_error("Failed to update a clinical performance evaluation comment.");
         application_log("error", "Unable to update a student_clineval_comment record. Database said: " . $db->ErrorMsg());
     } else {
         add_success("Successfully updated clinical performance evaluation.");
     }
 }
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:12,代码来源:ClinicalPerformanceEvaluation.class.php

示例4: setSequence

 /**
  * User is included to prevent tampering with another user's sequence.
  * @param User $user
  * @param array $ids
  */
 public function setSequence($user_id, array $ids)
 {
     global $db;
     $stmt = $db->Prepare('update `student_research` set `priority`=? where `user_id`=? and `id`=?');
     foreach ($ids as $priority => $id) {
         if (!$db->Execute($stmt, array($priority, $user_id, $id))) {
             add_error("Failed to re-sequence Research Citations.");
             application_log("error", "Unable to modify a student_research record. Database said: " . $db->ErrorMsg());
             break;
         }
     }
 }
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:17,代码来源:ResearchCitations.class.php

示例5: grade_below_threshold_notice

function grade_below_threshold_notice($assessment_list)
{
    global $db, $AGENT_CONTACTS;
    $assessment_list = (array) $assessment_list;
    foreach ($assessment_list as $assessment_id => $assessment) {
        $mail = new Zend_Mail();
        $mail->addHeader("X-Originating-IP", $_SERVER["REMOTE_ADDR"]);
        $mail->addHeader("X-Section", "Gradebook Notification System", true);
        $mail->clearFrom();
        $mail->clearSubject();
        $mail->setFrom($AGENT_CONTACTS["agent-notifications"]["email"], APPLICATION_NAME . ' Gradebook System');
        $mail->setSubject("Grade Below Threshold Notification");
        $message = "<pre>This notification is being sent to inform you that students scored below the assessment threshold.\n\n";
        $message .= "Course:\t\t\t" . $assessment["course_name"] . " - " . $assessment["course_code"] . "\n";
        $message .= "Assessment:\t\t<a href=\"" . ENTRADA_URL . "/admin/gradebook/assessments?section=grade&id=" . $assessment["course_id"] . "&assessment_id=" . $assessment_id . "\">" . $assessment["assessment_name"] . "</a>\n";
        $message .= "Assessment ID:\t\t" . $assessment_id . "\n";
        $message .= "Grade Threshold:\t" . $assessment["threshold"] . "%\n\n";
        $message .= "The following students scored below the assessment threshold:\n";
        $message .= "-------------------------------------------------------------\n\n";
        foreach ($assessment["students"] as $proxy_number => $student) {
            $query = "\tUPDATE `assessment_grades`\n\t\t\t\t\t\tSET `threshold_notified` = '1'\n\t\t\t\t\t\tWHERE `grade_id` = " . $db->qstr($student["grade_id"]);
            $result = $db->Execute($query);
            $message .= "Student:\t\t" . $student["student_name"] . " - [" . $student["student_email"] . "] \n";
            $message .= "Student Number:\t\t" . $student["student_number"] . "\n";
            $message .= "Grade Recieved:\t\t" . $student["assessment_grade"] . "%\n\n";
        }
        $message .= "</pre>";
        $mail->setBodyHtml($message);
        $query = "\tSELECT a.`contact_type`, a.`contact_order`, b.`prefix`, b.`firstname`, b.`lastname`, b.`email`, a.`proxy_id`\n\t\t\tFROM " . DATABASE_NAME . ".`course_contacts` AS a \n\t\t\tJOIN " . AUTH_DATABASE . ".`user_data` AS b \n\t\t\tON a.`proxy_id` = b.`id`  \n\t\t\tWHERE a.`course_id` = " . $db->qstr($assessment["course_id"]) . "\n\t\t\tORDER BY a.`contact_type` DESC, a.`contact_order` ASC";
        $contacts = $db->GetAll($query);
        foreach ($contacts as $contact) {
            $mail->addTo($contact["email"], (!empty($contact["prefix"]) ? $contact["prefix"] . " " : "") . $contact["firstname"] . " " . $contact["lastname"]);
            $contact_proxies[] = $contact["proxy_id"];
        }
        $sent = true;
        try {
            $mail->send();
        } catch (Exception $e) {
            $sent = false;
        }
        if ($sent) {
            application_log("success", "Sent grade below threshold notification to Program Coordinators / Directors [" . implode(",", $contact_proxies) . "].");
            $return_value = true;
        } else {
            application_log("error", "Unable to send grade below threshold notification to Program Coordinators / Directors [" . implode(",", $contact_proxies) . "].");
        }
    }
}
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:48,代码来源:check_grade_thresholds.php

示例6: elseif

 * @author Unit: School of Medicine
 * @author Developer: Harry Brundage <hbrundage@qmed.ca>
 * @copyright Copyright 2010 Queen's University. All Rights Reserved.
 *
 */
if (!defined("PARENT_INCLUDED") || !defined("IN_GRADEBOOK")) {
    exit;
} elseif (!isset($_SESSION["isAuthorized"]) || !$_SESSION["isAuthorized"]) {
    header("Location: " . ENTRADA_URL);
    exit;
} elseif (!$ENTRADA_ACL->amIAllowed("gradebook", "update", false)) {
    $ONLOAD[] = "setTimeout('window.location=\\'" . ENTRADA_URL . "/admin/" . $MODULE . "\\'', 15000)";
    $ERROR++;
    $ERRORSTR[] = "Your account does not have the permissions required to use this feature of 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"] . "] does not have access to this module [" . $MODULE . "]");
} else {
    if (isset($_POST["assessment_id"]) && (int) $_POST["assessment_id"]) {
        $assessment_id = (int) $_POST["assessment_id"];
    }
    if (isset($_POST["course_id"]) && (int) $_POST["course_id"]) {
        $course_id = (int) $_POST["course_id"];
    }
    if (isset($_POST["import_type"]) && clean_input($_POST["import_type"], "alpha")) {
        $import_type = clean_input($_POST["import_type"], "alpha");
    } else {
        $import_type = "all";
    }
    $url = ENTRADA_URL . "/admin/gradebook/assessments?section=grade&id=" . $course_id . "&assessment_id=" . $assessment_id;
    $BREADCRUMB[] = array("url" => ENTRADA_URL . "/admin/gradebook/assessments?" . replace_query(array("section" => "grade", "id" => $COURSE_ID, "step" => false)), "title" => "Grading Assessment");
    $BREADCRUMB[] = array("url" => ENTRADA_URL . "/admin/gradebook/assessments?" . replace_query(array("section" => "import-quiz", "id" => $COURSE_ID, "step" => false)), "title" => "Importing Quiz Results");
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:import-quiz.inc.php

示例7: application_log

                            } else {
                                application_log("cron", "Action: Community " . $history_timestamp["community_id"] . " inactive for 12 months 7 days. Set to inactive.");
                            }
                        }
                    }
                } elseif ($timestamp < strtotime("-12 months -7 days 00:00:00")) {
                    $query = "  SELECT * FROM `communities`\n\t\t\t\t\t\t\t\tWHERE `community_id` = " . $db->qstr($history_timestamp["community_id"]);
                    $inactive_community_results = $db->GetAll($query);
                    if ($inactive_community_results) {
                        foreach ($inactive_community_results as $inactive_community) {
                            echo "\n";
                            echo $history_timestamp["history_timestamp"] . "\n";
                            echo $history_timestamp["timestamp"] . "\n";
                            $query = "  UPDATE `communities` SET `community_active` = '0'\n\t\t\t\t\t\t\t\t\t\tWHERE `community_id` =" . $db->qstr($inactive_community["community_id"]);
                            if ($SET_INACTIVE_COMMUNITIES) {
                                $db->Execute($query);
                                if ($query) {
                                    application_log("cron", "Community " . $history_timestamp["community_id"] . " inactive for more than 12 months 7 days. Set to inactive.");
                                } else {
                                    application_log("error", "Unable to deactivate community " . $history_timestamp["community_id"]);
                                }
                            } else {
                                application_log("cron", "Action: Community " . $history_timestamp["community_id"] . " " . $history_timestamp["history_timestamp"] . " " . "inactive for more than 12 months 7 days. Set to inactive.");
                            }
                        }
                    }
                }
            }
        }
    }
}
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:community-cleanup.php

示例8: application_log

                /**
                 * Reset the requires_apartment flag so this person is put back on the Regional Education dashboard.
                 */
                if (!$db->AutoExecute(CLERKSHIP_DATABASE . ".events", array("requires_apartment" => 1), "UPDATE", "event_id=" . $db->qstr($ASCHEDULE_INFO["event_id"]))) {
                    $NOTICE++;
                    $NOTICESSTR[] = "We were unable to add this learners event back onto the " . $APARTMENT_INFO["department_title"] . " dashboard as a todo task.";
                    application_log("error", "Unable to set requires_apartment to 1 for event_id [" . $ASCHEDULE_INFO["event_id"] . "] after proxy_id [" . $ASCHEDULE_INFO["proxy_id"] . "] had been removed from aschedule_id [" . $ASCHEDULE_ID . "]. Database said: " . $db->ErrorMsg());
                }
            }
            if (isset($_POST["notify"]) && (int) $_POST["notify"] == 1) {
                $apartment_address = ($APARTMENT_INFO["apartment_number"] != "" ? $APARTMENT_INFO["apartment_number"] . "-" : "") . $APARTMENT_INFO["apartment_address"] . "\n";
                $apartment_address .= $APARTMENT_INFO["region_name"] . ($APARTMENT_INFO["province"] ? ", " . $APARTMENT_INFO["province"] : "") . "\n";
                $apartment_address .= $APARTMENT_INFO["apartment_postcode"] . ", " . $APARTMENT_INFO["country"];
                $message_variables = array("to_firstname" => $ASCHEDULE_INFO["firstname"], "to_lastname" => $ASCHEDULE_INFO["lastname"], "from_firstname" => $_SESSION["details"]["firstname"], "from_lastname" => $_SESSION["details"]["lastname"], "region" => $APARTMENT_INFO["region_name"], "apartment_address" => $apartment_address, "inhabiting_start" => date(DEFAULT_DATE_FORMAT, $ASCHEDULE_INFO["inhabiting_start"]), "inhabiting_finish" => date(DEFAULT_DATE_FORMAT, $ASCHEDULE_INFO["inhabiting_finish"]), "application_name" => APPLICATION_NAME, "department_title" => $APARTMENT_INFO["department_title"], "department_id" => $APARTMENT_INFO["department_id"]);
                $recipient = array("email" => $ASCHEDULE_INFO["email"], "firstname" => $ASCHEDULE_INFO["firstname"], "lastname" => $ASCHEDULE_INFO["lastname"]);
                regionaled_apartment_notification("delete", $recipient, $message_variables);
            }
        } else {
            $ERROR++;
            $ERRORSTR[] = "Unable to remove <strong>" . html_encode($ASCHEDULE_INFO["firstname"] . " " . $ASCHEDULE_INFO["lastname"]) . "</strong> from <strong>" . html_encode($APARTMENT_INFO["apartment_title"]) . "</strong> at this time. The system administrator has been notified of this issue, please try again later.<br /><br />You will now be redirected to the apartment schedule; this will happen <strong>automatically</strong> in 5 seconds or <a href=\"" . ENTRADA_URL . $url . "\" style=\"font-weight: bold\">click here</a> to continue.";
            application_log("error", "Unable to remove proxy_id [" . $ASCHEDULE_INFO["proxy_id"] . "] from apartment_id [" . $APARTMENT_ID . "] / aschedule_id [" . $ASCHEDULE_ID . "]. Database said: " . $db->ErrorMsg());
        }
    } else {
        $url = "/admin/regionaled/apartments/manage/schedule?id=" . $APARTMENT_ID . "&sid=" . $ASCHEDULE_ID;
        $ERROR++;
        $ERRORSTR[] = "You must confirm that you wish to remove <strong>" . html_encode($ASCHEDULE_INFO["firstname"] . " " . $ASCHEDULE_INFO["lastname"]) . "</strong> from <strong>" . html_encode($APARTMENT_INFO["apartment_title"]) . "</strong>.<br /><br />You will now be redirected to the apartment schedule; this will happen <strong>automatically</strong> in 5 seconds or <a href=\"" . ENTRADA_URL . $url . "\" style=\"font-weight: bold\">click here</a> to continue.";
        application_log("error", "The remove request for proxy_id [" . $ASCHEDULE_INFO["proxy_id"] . "] from apartment_id [" . $APARTMENT_ID . "] / aschedule_id [" . $ASCHEDULE_ID . "] was not confirmed. This step shouldn't have been accessible otherwise.");
    }
    $ONLOAD[] = "setTimeout('window.location=\\'" . ENTRADA_URL . $url . "\\'', 5000)";
    display_status_messages();
}
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:delete.inc.php

示例9: IN

                            $evaluator_ids_string .= ($evaluator_ids_string ? ", " : "") . $db->qstr($evaluator["proxy_id"]);
                        }
                    }
                }
                $query .= " AND a.`id` IN (" . $evaluator_ids_string . ")";
                break;
        }
        $query .= "\tAND b.`app_id` = " . $db->qstr(AUTH_APP_ID) . "\n\t\t\t\t\tAND b.`account_active` = 'true'\n\t\t\t\t\tAND (b.`access_starts`='0' OR b.`access_starts` <= " . $db->qstr(time()) . ")\n\t\t\t\t\tAND (b.`access_expires`='0' OR b.`access_expires` >= " . $db->qstr(time()) . ")\n\t\t\t\t\tGROUP BY a.`id`\n\t\t\t\t\tORDER BY `fullname` ASC";
        echo "<ul>\n";
        $results = $db->GetAll($query);
        if ($results) {
            foreach ($results as $result) {
                echo "\t<li id=\"" . (int) $result["proxy_id"] . "\">" . html_encode($result["fullname"]) . "<span class=\"informal content-small\"><br />" . html_encode($result["organisation_title"]) . " - " . html_encode(ucfirst($result["group"])) . "<br />" . html_encode($result["email"]) . "</span></li>\n";
            }
        } else {
            echo "\t<li id=\"0\"><span class=\"informal\">&quot;<strong>" . html_encode($fullname) . "&quot;</strong> was not found</span></li>";
        }
        echo "</ul>";
    }
    if ($email) {
        $query = "\tSELECT a.`id` AS `proxy_id`, a.`lastname`, a.`firstname`, a.`email`\n\t\t\t\t\tFROM `" . AUTH_DATABASE . "`.`user_data` AS a\n\t\t\t\t\tLEFT JOIN `" . AUTH_DATABASE . "`.`user_access` AS b\n\t\t\t\t\tON b.`user_id` = a.`id`\n\t\t\t\t\tAND (b.`group` <> 'guest')\n\t\t\t\t\tWHERE (a.`email` = " . $db->qstr($email) . " OR a.`email_alt` = " . $db->qstr($email) . ")";
        $result = $db->GetRow($query);
        if ($result) {
            echo json_encode(array("status" => "success", "data" => $result));
        } else {
            echo json_encode(array("status" => "error", "data" => array("msg" => "That email address is not registered in the system.")));
        }
    }
} else {
    application_log("error", "Personnel API accessed without valid session_id.");
}
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:personnel.api.php

示例10: html_encode

                     $msg = "You will now be redirected to add another new record; this will happen <strong>automatically</strong> in 5 seconds or <a href=\"" . $url . "\" style=\"font-weight: bold\">click here</a> to continue.";
                     break;
                 case "index":
                 default:
                     $url = ENTRADA_URL . "/annualreport/research";
                     $msg = "You will now be redirected to the research page; this will happen <strong>automatically</strong> in 5 seconds or <a href=\"" . $url . "\" style=\"font-weight: bold\">click here</a> to continue.";
                     break;
             }
             $SUCCESS++;
             $SUCCESSSTR[] = "You have successfully added <strong>" . html_encode($PROCESSED["title"]) . "</strong> to the system.<br /><br />" . $msg;
             $ONLOAD[] = "setTimeout('window.location=\\'" . $url . "\\'', 5000);";
             application_log("success", "Book / Chapter / Mono [" . $EVENT_ID . "] added to the system.");
         } else {
             $ERROR++;
             $ERRORSTR[] = "There was a problem inserting this Book / Chapter / Mono into the system. The MEdIT Unit was informed of this error; please try again later.";
             application_log("error", "There was an error inserting a Book / Chapter / Mono. Database said: " . $db->ErrorMsg());
         }
     } else {
         $STEP = 1;
     }
     break;
 case 1:
     if (isset($_POST['pubmed_id'])) {
         $argv[1] = $_POST['pubmed_id'];
         $PROCESSED['pubmed_id'] = clean_input($_POST["pubmed_id"], array("notags", "trim"));
         if ($xml = simplexml_load_file('http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&retmax=0&usehistory=y&term=' . urlencode($argv[1]))) {
             if ($xml = simplexml_load_file("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=pubmed&retmode=xml&query_key={$xml->QueryKey}&WebEnv={$xml->WebEnv}&retstart=0&retmax=10")) {
                 $docs = $xml->DocSum;
             }
         }
         if (!isset($xml->DocSum->Item[3]) || $xml->DocSum->Item[3] == "") {
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:add_poster_reports.inc.php

示例11: application_log

                         break;
                     case "index":
                     default:
                         $url = ENTRADA_URL . "/admin/courses/groups?id=" . $COURSE_ID;
                         $msg = "You will now be redirected to the group index; this will happen <strong>automatically</strong> in 5 seconds or <a href=\"" . $url . "\" style=\"font-weight: bold\">click here</a> to continue.";
                         break;
                 }
                 $SUCCESS++;
                 $SUCCESSSTR[] = "You have successfully added <strong>" . $number_of_groups . " course groups</strong> to the system.<br /><br />" . $msg;
                 $ONLOAD[] = "setTimeout('window.location=\\'" . $url . "\\'', 5000)";
                 application_log("success", "New course groups added for course [" . $COURSE_ID . "] added to the system.");
             }
         } else {
             $ERROR++;
             $ERRORSTR[] = "There was a problem inserting group into the system. The system administrator was informed of this error; please try again later.";
             application_log("error", "There was an error inserting a group. Database said: " . $db->ErrorMsg());
         }
         if ($ERROR) {
             $STEP = 1;
         }
         break;
     case 1:
     default:
         continue;
         break;
 }
 // Display Content
 switch ($STEP) {
     case 2:
         display_status_messages();
         break;
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:add.inc.php

示例12: foreach

                                        </form>
                                    </div>
                                </div>
                                <?php 
                                break;
                        }
                        break;
                }
                ?>
                <div id="scripts-on-open" style="display: none;">
                <?php 
                foreach ($modal_onload as $string) {
                    echo $string . ";\n";
                }
                ?>
                </div>
                <?php 
            }
        } else {
            $ERROR++;
            $ERRORSTR[] = "The provided event identifier does not exist in this system.";
            echo display_error();
            application_log("error", "LTI Provider wizard was accessed without a valid event id.");
        }
    } else {
        $ERROR++;
        $ERRORSTR[] = "You must provide an event identifier when using the LTI Provider wizard.";
        echo display_error();
        application_log("error", "LTI Provider wizard was accessed without any event id.");
    }
}
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:lti-wizard-event.api.php

示例13: add_success

             if (defined("EDIT_RESTRICTED_DAY") && EDIT_RESTRICTED_DAY) {
                 if ($day->fromArray($PROCESSED)->update()) {
                     add_success("The restricted day has successfully been updated. You will be redirected to the restricted days index in 5 seconds, or you can <a href=\"" . ENTRADA_URL . "/admin/settings/manage/restricteddays?org=" . $ORGANISATION_ID . "\">click here</a> if you do not wish to wait.");
                     add_statistic("restricted_day", "update", "orday_id", $PROCESSED["orday_id"], $ENTRADA_USER->getID());
                 } else {
                     add_error("An error occurred when attempting to update a restricted day [" . $PROCESSED["orday_id"] . "], an administrator has been informed, please try again later.");
                     application_log("error", "Error occurred when updating restricted day, DB said: " . $db->ErrorMsg());
                 }
             } else {
                 $PROCESSED["organisation_id"] = $ORGANISATION_ID;
                 if ($day->fromArray($PROCESSED)->insert()) {
                     add_success("The restricted day has successfully been updated. You will be redirected to the restricted days index in 5 seconds, or you can <a href=\"" . ENTRADA_URL . "/admin/settings/manage/restricteddays?org=" . $ORGANISATION_ID . "\">click here</a> if you do not wish to wait.");
                     add_statistic("restricted_day", "insert", "orday_id", $db->Insert_ID(), $ENTRADA_USER->getID());
                 } else {
                     add_error("An error occurred when attempting to create a new restricted day, an administrator has been informed, please try again later.");
                     application_log("error", "Error occurred when updating a restricted day, DB said: " . $db->ErrorMsg());
                 }
             }
         } else {
             $day = new Models_RestrictedDays();
             $day->fromArray($PROCESSED);
             $STEP = 1;
         }
         break;
     default:
         break;
 }
 switch ($STEP) {
     case 2:
         if ($ERROR) {
             echo display_error();
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:form.inc.php

示例14: display_error

									<option value="index"<?php 
                        echo $_SESSION[APPLICATION_IDENTIFIER]["tmp"]["post_action"] == "index" ? " selected=\"selected\"" : "";
                        ?>
>Return to Research list</option>
									</select>
									<input type="submit" class="btn btn-primary" value="Save" />
								</td>
							</tr>
							</table>
						</td>
					</tr>
					</table>					
					</form>
					<br /><br />
					<?php 
                        break;
                }
            } else {
                $ERROR++;
                $ERRORSTR[] = "In order to edit a research grant you must provide a valid research grant identifier. The provided ID does not exist in this system.";
                echo display_error();
                application_log("notice", "Failed to provide a valid research grant identifer when attempting to edit a research grant.");
            }
        } else {
            $ERROR++;
            $ERRORSTR[] = "In order to edit a research grant you must provide the research grant identifier.";
            echo display_error();
            application_log("notice", "Failed to provide research grant identifer when attempting to edit a research grant.");
        }
    }
}
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:edit_patent.inc.php

示例15: display_error

							</div>
						</div>
						<?php 
                        break;
                }
            } else {
                if ($ERROR) {
                    echo display_error();
                }
                if ($NOTICE) {
                    echo display_notice();
                }
            }
        } else {
            $NOTICE++;
            $NOTICESTR[] = "The photo that you are trying to edit was deactivated <strong>" . date(DEFAULT_DATE_FORMAT, $photo_record["updated_date"]) . "</strong> by <strong>" . html_encode(get_account_data("firstlast", $photo_record["updated_by"])) . "</strong>.<br /><br />If there has been a mistake or you have questions relating to this issue please contact the MEdTech Unit directly.";
            echo display_notice();
            application_log("error", "The photo record id [" . $RECORD_ID . "] is deactivated; however, " . $_SESSION["details"]["firstname"] . " " . $_SESSION["details"]["lastname"] . " [" . $ENTRADA_USER->getID() . "] has tried to edit it.");
        }
    } else {
        $ERROR++;
        $ERRORSTR[] = "The photo id that you have provided does not exist in the system. Please provide a valid record id to proceed.";
        echo display_error();
        application_log("error", "The provided photo id was invalid [" . $RECORD_ID . "] (Edit Photo).");
    }
} else {
    $ERROR++;
    $ERRORSTR[] = "Please provide a valid photo id to proceed.";
    echo display_error();
    application_log("error", "No photo id was provided to edit. (Edit Photo)");
}
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:edit-photo.inc.php


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