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

PHP getSettingByScope函数代码示例

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

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



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

示例1: getCurrentVersion

function getCurrentVersion($guid, $connection2, $version)
{
    $output = "";
    $output .= "<script type=\"text/javascript\">";
    $output .= "\$(document).ready(function(){";
    $output .= "\$.ajax({";
    $output .= "crossDomain: true, type:\"GET\", contentType: \"application/json; charset=utf-8\",async:false,";
    $output .= "url: \"https://gibbonedu.org/services/version/version.php?callback=?\",";
    $output .= "data: \"\",dataType: \"jsonp\", jsonpCallback: 'fnsuccesscallback',jsonpResult: 'jsonpResult',";
    $output .= "success: function(data) {";
    $output .= "if (data['version']==='false') {";
    $output .= "\$(\"#status\").attr(\"class\",\"error\");";
    $output .= "\$(\"#status\").html('" . _('Version check failed') . ".') ;";
    $output .= "}";
    $output .= "else {";
    $output .= "if (parseFloat(data['version'])<=parseFloat('" . $version . "')) {";
    $output .= "\$(\"#status\").attr(\"class\",\"success\");";
    $output .= "\$(\"#status\").html('" . sprintf(_('Version check successful. Your Gibbon installation is up to date at %1$s.'), $version) . " " . sprintf(_('If you have recently updated your system files, please check that your database is up to date in %1$sUpdates%2$s.'), "<a href=\\'" . $_SESSION[$guid]["absoluteURL"] . "/index.php?q=/modules/System Admin/update.php\\'>", "</a>") . "') ;";
    $output .= "}";
    $output .= "else {";
    $output .= "\$(\"#status\").attr(\"class\",\"warning\");";
    $output .= "\$(\"#status\").html('" . sprintf(_('Version check successful. Your Gibbon installation is out of date. Please visit %1$s to download the latest version.'), "<a target=\"blank\" href=\\'http://gibbonedu.org/download\\'>the Gibbon download page</a>") . "') ;";
    $output .= "}";
    $output .= "}";
    $output .= "},";
    $output .= "error: function (data, textStatus, errorThrown) {";
    $output .= "\$(\"#status\").attr(\"class\",\"error\");";
    $output .= "\$(\"#status\").html('" . _('Version check failed') . ".') ;";
    $output .= "}";
    $output .= "});";
    $output .= "});";
    $output .= "</script>";
    $cuttingEdgeCode = getSettingByScope($connection2, "System", "cuttingEdgeCode");
    if ($cuttingEdgeCode != "Y") {
        $output .= "<div id='status' class='warning'>";
        $output .= "<div style='width: 100%; text-align: center'>";
        $output .= "<img style='margin: 10px 0 5px 0' src='" . $_SESSION[$guid]["absoluteURL"] . "/themes/Default/img/loading.gif' alt='Loading'/><br/>";
        $output .= _("Checking for Gibbon updates.");
        $output .= "</div>";
        $output .= "</div>";
    }
    return $output;
}
开发者ID:actcattest001,项目名称:core,代码行数:43,代码来源:moduleFunctions.php


示例2: array

     break;
 }
 //Write back to gibbonFinanceExpense
 try {
     $data = array("gibbonFinanceExpenseID" => $gibbonFinanceExpenseID, "status" => 'Paid', "paymentDate" => $paymentDate, "paymentAmount" => $paymentAmount, "gibbonPersonIDPayment" => $gibbonPersonIDPayment, "paymentMethod" => $paymentMethod, "paymentReimbursementReceipt" => $attachment, "paymentReimbursementStatus" => "Requested");
     $sql = "UPDATE gibbonFinanceExpense SET status=:status, paymentDate=:paymentDate, paymentAmount=:paymentAmount, gibbonPersonIDPayment=:gibbonPersonIDPayment, paymentMethod=:paymentMethod, paymentReimbursementReceipt=:paymentReimbursementReceipt, paymentReimbursementStatus=:paymentReimbursementStatus WHERE gibbonFinanceExpenseID=:gibbonFinanceExpenseID";
     $result = $connection2->prepare($sql);
     $result->execute($data);
 } catch (PDOException $e) {
     //Fail2
     $URL .= "&editReturn=fail2";
     header("Location: {$URL}");
     break;
 }
 //Notify reimbursement officer that action is required
 $reimbursementOfficer = getSettingByScope($connection2, "Finance", "reimbursementOfficer");
 if ($reimbursementOfficer != FALSE and $reimbursementOfficer != "") {
     $notificationText = sprintf(_('Someone has requested reimbursement for "%1$s" in budget "%2$s".'), $row["title"], $row["budget"]);
     setNotification($connection2, $guid, $reimbursementOfficer, $notificationText, "Finance", "/index.php?q=/modules/Finance/expenses_manage_edit.php&gibbonFinanceExpenseID={$gibbonFinanceExpenseID}&gibbonFinanceBudgetCycleID={$gibbonFinanceBudgetCycleID}&status=&gibbonFinanceBudgetID=" . $row["gibbonFinanceBudgetID"]);
 }
 //Write paid change to log
 try {
     $data = array("gibbonFinanceExpenseID" => $gibbonFinanceExpenseID, "gibbonPersonID" => $_SESSION[$guid]["gibbonPersonID"], "action" => "Payment");
     $sql = "INSERT INTO gibbonFinanceExpenseLog SET gibbonFinanceExpenseID=:gibbonFinanceExpenseID, gibbonPersonID=:gibbonPersonID, timestamp='" . date("Y-m-d H:i:s") . "', action=:action";
     $result = $connection2->prepare($sql);
     $result->execute($data);
 } catch (PDOException $e) {
     //Fail2
     $URL .= "&editReturn=fail2";
     header("Location: {$URL}");
     break;
开发者ID:actcattest001,项目名称:core,代码行数:31,代码来源:expenseRequest_manage_reimburseProcess.php


示例3: catch

     $result = $connection2->prepare($sql);
     $result->execute($data);
 } catch (PDOException $e) {
     print "<div class='error'>" . $e->getMessage() . "</div>";
 }
 if ($result->rowCount() < 1) {
     print "<div class='error'>";
     print _("There are no records to display.");
     print "</div>";
 } else {
     print "<table cellspacing='0' style='width: 100%'>";
     print "<tr class='head'>";
     print "<th>";
     print _("Activity");
     print "</th>";
     $options = getSettingByScope($connection2, "Activities", "activityTypes");
     if ($options != "") {
         print "<th>";
         print _("Type");
         print "</th>";
     }
     print "<th>";
     if ($dateType != "Date") {
         print _("Term");
     } else {
         print _("Dates");
     }
     print "</th>";
     print "<th>";
     print _("Status");
     print "</th>";
开发者ID:actcattest001,项目名称:core,代码行数:31,代码来源:report_activityChoices_byStudent.php


示例4: getSettingByScope

require_once "paypalfunctions.php";
//==================================
// PayPal Express Checkout Module
//==================================
//'------------------------------------
//' The paymentAmount is the total value of
//' the shopping cart, that was set
//' earlier in a session variable
//' by the shopping cart page
//'------------------------------------
$paymentAmount = $_GET["Payment_Amount"];
//'------------------------------------
//' The currencyCodeType and paymentType
//' are set to the selections made on the Integration Assistant
//'------------------------------------
$currency = getSettingByScope($connection2, "System", "currency");
if ($currency != FALSE and $currency != "") {
    $currencyCodeType = substr($currency, 0, 3);
} else {
    $currencyCodeType = "USD";
}
$paymentType = "Sale";
//'------------------------------------
//' The returnURL is the location where buyers return to when a
//' payment has been succesfully authorized.
//'
//' This is set to the value entered on the Integration Assistant
//'------------------------------------
$returnURL = $_SESSION[$guid]["absoluteURL"] . "/" . $_GET["return"];
//'------------------------------------
//' The cancelURL is the location buyers are sent to when they hit the
开发者ID:actcattest001,项目名称:core,代码行数:31,代码来源:expresscheckout.php


示例5: array

 try {
     $dataStudents = array("gibbonCourseClassID" => $gibbonCourseClassID);
     $sqlStudents = "SELECT title, surname, preferredName, gibbonPerson.gibbonPersonID, dateStart FROM gibbonCourseClassPerson JOIN gibbonPerson ON (gibbonCourseClassPerson.gibbonPersonID=gibbonPerson.gibbonPersonID) WHERE role='Student' AND gibbonCourseClassID=:gibbonCourseClassID AND status='Full' AND (dateStart IS NULL OR dateStart<='" . date("Y-m-d") . "') AND (dateEnd IS NULL  OR dateEnd>='" . date("Y-m-d") . "') ORDER BY surname, preferredName";
     $resultStudents = $connection2->prepare($sqlStudents);
     $resultStudents->execute($dataStudents);
 } catch (PDOException $e) {
     print "<div class='error'>" . $e->getMessage() . "</div>";
 }
 if ($resultStudents->rowCount() < 1) {
     print "<tr>";
     print "<td colspan=2>";
     print "<i>" . _('There are no records to display.') . "</i>";
     print "</td>";
     print "</tr>";
 } else {
     $PAS = getSettingByScope($connection2, 'System', 'primaryAssessmentScale');
     while ($rowStudents = $resultStudents->fetch()) {
         if ($count % 2 == 0) {
             $rowNum = "even";
         } else {
             $rowNum = "odd";
         }
         $count++;
         //COLOR ROW BY STATUS!
         print "<tr class={$rowNum}>";
         print "<td>";
         print "<div style='padding: 2px 0px'>" . $count . ") <b><a href='index.php?q=/modules/Students/student_view_details.php&gibbonPersonID=" . $rowStudents["gibbonPersonID"] . "&subpage=Markbook#" . $gibbonCourseClassID . "'>" . formatName("", $rowStudents["preferredName"], $rowStudents["surname"], "Student", true) . "</a><br/></div>";
         print "<input name='{$count}-gibbonPersonID' id='{$count}-gibbonPersonID' value='" . $rowStudents["gibbonPersonID"] . "' type='hidden'>";
         print "</td>";
         try {
             $dataEntry = array("gibbonCourseClassID" => $gibbonCourseClassID, "gibbonPersonIDStudent" => $rowStudents["gibbonPersonID"]);
开发者ID:actcattest001,项目名称:core,代码行数:31,代码来源:markbook_edit_targets.php


示例6: catch

     $sql = "SELECT * FROM gibbonPerson WHERE username=:username OR email=:email";
     $result = $connection2->prepare($sql);
     $result->execute($data);
 } catch (PDOException $e) {
     //Fail 2
     $URL .= "&addReturn=fail2";
     header("Location: {$URL}");
     break;
 }
 if ($result->rowCount() > 0) {
     //Fail 4
     $URL .= "&addReturn=fail4";
     header("Location: {$URL}");
 } else {
     //Check publicRegistrationMinimumAge
     $publicRegistrationMinimumAge = getSettingByScope($connection2, 'User Admin', 'publicRegistrationMinimumAge');
     $ageFail = FALSE;
     if ($publicRegistrationMinimumAge == "") {
         $ageFail = TRUE;
     } else {
         if ($publicRegistrationMinimumAge > 0 and $publicRegistrationMinimumAge > getAge(dateConvertToTimestamp($dob), TRUE, TRUE)) {
             $ageFail = TRUE;
         }
     }
     if ($ageFail == TRUE) {
         //Fail 5
         $URL .= "&addReturn=fail5";
         header("Location: {$URL}");
     } else {
         //Write to database
         try {
开发者ID:dpredster,项目名称:core,代码行数:31,代码来源:publicRegistrationProcess.php


示例7: PDO

along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
include "../../config.php";
//New PDO DB connection
try {
    $connection2 = new PDO("mysql:host={$databaseServer};dbname={$databaseName};charset=utf8", $databaseUsername, $databasePassword);
    $connection2->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    $connection2->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
} catch (PDOException $e) {
    echo $e->getMessage();
}
//Get alternative header names
$attainmentAlternativeName = getSettingByScope($connection2, "Markbook", "attainmentAlternativeName");
$attainmentAlternativeNameAbrev = getSettingByScope($connection2, "Markbook", "attainmentAlternativeNameAbrev");
$effortAlternativeName = getSettingByScope($connection2, "Markbook", "effortAlternativeName");
$effortAlternativeNameAbrev = getSettingByScope($connection2, "Markbook", "effortAlternativeNameAbrev");
@session_start();
$gibbonCourseClassID = $_SESSION[$guid]["exportToExcelParams"];
if (isActionAccessible($guid, $connection2, "/modules/Markbook/markbook_view.php") == FALSE) {
    //Acess denied
    print "<div class='error'>";
    print _("You do not have access to this action.");
    print "</div>";
} else {
    $alert = getAlert($connection2, 02);
    //Count number of columns
    try {
        $data = array("gibbonCourseClassID" => $gibbonCourseClassID);
        $sql = "SELECT * FROM gibbonMarkbookColumn WHERE gibbonCourseClassID=:gibbonCourseClassID ORDER BY complete, completeDate DESC";
        $result = $connection2->prepare($sql);
        $result->execute($data);
开发者ID:actcattest001,项目名称:core,代码行数:31,代码来源:markbook_viewExportAllContents.php


示例8: _

                    print _('Outcomes');
                    ?>
</h3>
								</td>
							</tr>
							<tr>
								<td colspan=2> 
									<p><?php 
                    print _('Link this lesson to outcomes (defined in the Manage Outcomes section of the Planner), and track which outcomes are being met in which lessons.');
                    ?>
</p>
								</td>
							</tr>
							<?php 
                    $type = "outcome";
                    $allowOutcomeEditing = getSettingByScope($connection2, "Planner", "allowOutcomeEditing");
                    $categories = array();
                    $categoryCount = 0;
                    ?>
 
							<style>
								#<?php 
                    print $type;
                    ?>
 { list-style-type: none; margin: 0; padding: 0; width: 100%; }
								#<?php 
                    print $type;
                    ?>
 div.ui-state-default { margin: 0 0px 5px 0px; padding: 5px; font-size: 100%; min-height: 58px; }
								div.ui-state-default_dud { margin: 5px 0px 5px 0px; padding: 5px; font-size: 100%; min-height: 58px; }
								html>body #<?php 
开发者ID:dpredster,项目名称:core,代码行数:31,代码来源:planner_edit.php


示例9: getSettingByScope

                    }
                    ?>
					
								</td>
							</tr>
							<?php 
                } else {
                    print "<input type=\"hidden\" name=\"privacy\" value=\"\">";
                }
            }
            if ($imagePrivacySet == false) {
                print "<input type=\"hidden\" name=\"imagePrivacy\" value=\"\">";
            }
            //Student options for agreements
            if ($student) {
                $studentAgreementOptions = getSettingByScope($connection2, "School Admin", "studentAgreementOptions");
                if ($studentAgreementOptions != "") {
                    ?>
							<tr>
								<td> 
									<b><?php 
                    print _('Student Agreements');
                    ?>
</b><br/>
									<span style="font-size: 90%"><i><?php 
                    print _('Check to indicate that student has signed the relevant agreement.');
                    ?>
<br/>
									</i></span>
								</td>
								<td class="right">
开发者ID:dpredster,项目名称:core,代码行数:31,代码来源:user_manage_edit.php


示例10: _

										$("#emailReminder").val('Y');
									}
								 });
							});
						</script>
						<tr class='break emailReminder'>
							<td colspan=2> 
								<h3><?php 
                print _('Email Reminder');
                ?>
</h3>
								<input type='hidden' id='emailReminder' name='emailReminder' value='Y'/>
							</td>
						</tr>
						<?php 
                $email = getSettingByScope($connection2, "Finance", "email");
                if ($email == "") {
                    print "<tr class='emailReminder'>";
                    print "<td colspan=2>";
                    print "<div class='error'>";
                    print _("An outgoing email address has not been set up under Invoice & Receipt Settings, and so no emails can be sent.");
                    print "</div>";
                    print "<input type='hidden' name='email' value='{$email}'/>";
                    print "<td>";
                    print "<tr>";
                } else {
                    print "<input type='hidden' name='email' value='{$email}'/>";
                    if ($row["invoiceTo"] == "Company") {
                        if ($row["companyEmail"] != "" and $row["companyContact"] != "" and $row["companyName"] != "") {
                            ?>
									<tr class='emailReminder'>
开发者ID:actcattest001,项目名称:core,代码行数:31,代码来源:invoices_manage_edit.php


示例11: LiveValidation

																		var password=new LiveValidation('password');
																		password.add(Validate.Presence);
																		<?php 
                            $alpha = getSettingByScope($connection2, "System", "passwordPolicyAlpha");
                            if ($alpha == "Y") {
                                print "password.add( Validate.Format, { pattern: /.*(?=.*[a-z])(?=.*[A-Z]).*/, failureMessage: \"" . _('Does not meet password policy.') . "\" } );";
                            }
                            $numeric = getSettingByScope($connection2, "System", "passwordPolicyNumeric");
                            if ($numeric == "Y") {
                                print "password.add( Validate.Format, { pattern: /.*[0-9]/, failureMessage: \"" . _('Does not meet password policy.') . "\" } );";
                            }
                            $punctuation = getSettingByScope($connection2, "System", "passwordPolicyNonAlphaNumeric");
                            if ($punctuation == "Y") {
                                print "password.add( Validate.Format, { pattern: /[^a-zA-Z0-9]/, failureMessage: \"" . _('Does not meet password policy.') . "\" } );";
                            }
                            $minLength = getSettingByScope($connection2, "System", "passwordPolicyMinLength");
                            if (is_numeric($minLength)) {
                                print "password.add( Validate.Length, { minimum: " . $minLength . "} );";
                            }
                            ?>
																	 </script>
																</td>
															</tr>
															<tr>
																<td> 
																	<b><?php 
                            print _('Confirm Password');
                            ?>
 *</b><br/>
																	<span style="font-size: 90%"><i></i></span>
																</td>
开发者ID:actcattest001,项目名称:core,代码行数:31,代码来源:install.php


示例12: _

                 print _("A welcome email was successfully sent to") . " " . formatName("", $informStudentEntry["preferredName"], $informStudentEntry["surname"], "Student") . ".";
                 print "</div>";
             } else {
                 print "<div class='error'>";
                 print _("A welcome email could not be sent to") . " " . formatName("", $informStudentEntry["preferredName"], $informStudentEntry["surname"], "Student") . ".";
                 print "</div>";
             }
         }
     }
 }
 //SEND PARENTS EMAIL
 if ($informParents == "Y") {
     print "<h4>";
     print "Parent Welcome Email";
     print "</h4>";
     $notificationParentsMessage = getSettingByScope($connection2, "Application Form", "notificationParentsMessage");
     foreach ($informParentsArray as $informParentsEntry) {
         if ($informParentsEntry["email"] != "" and $informParentsEntry["surname"] != "" and $informParentsEntry["preferredName"] != "" and $informParentsEntry["username"] != "" and $informParentsEntry["password"]) {
             $to = $informParentsEntry["email"];
             $subject = sprintf(_('Welcome to %1$s at %2$s'), $_SESSION[$guid]["systemName"], $_SESSION[$guid]["organisationNameShort"]);
             if ($notificationParentsMessage != "") {
                 $body = sprintf(_('Dear %1$s,\\n\\nWelcome to %2$s, %3$s\'s system for managing school information. You can access the system by going to %4$s and logging in with your new username (%5$s) and password (%6$s). You can learn more about using %7$s on the official support website (https://gibbonedu.org/support/parents).\\n\\nIn order to maintain the security of your data, we highly recommend you change your password to something easy to remember but hard to guess. This can be done by using the Preferences page after logging in (top-right of the screen).\\n\\n'), formatName("", $informParentsEntry["preferredName"], $informParentsEntry["surname"], "Student"), $_SESSION[$guid]["systemName"], $_SESSION[$guid]["organisationNameShort"], $_SESSION[$guid]["absoluteURL"], $informParentsEntry["username"], $informParentsEntry["password"], $_SESSION[$guid]["systemName"]) . $notificationParentsMessage . sprintf(_('\\n\\nPlease feel free to reply to this email should you have any questions.\\n\\n%1$s,\\n\\n%2$s Administrator'), $_SESSION[$guid]["organisationAdministratorName"], $_SESSION[$guid]["systemName"]);
             } else {
                 $body = sprintf(_('Dear %1$s,\\n\\nWelcome to %2$s, %3$s\'s system for managing school information. You can access the system by going to %4$s and logging in with your new username (%5$s) and password (%6$s). You can learn more about using %7$s on the official support website (https://gibbonedu.org/support/parents).\\n\\nIn order to maintain the security of your data, we highly recommend you change your password to something easy to remember but hard to guess. This can be done by using the Preferences page after logging in (top-right of the screen).\\n\\n'), formatName("", $informParentsEntry["preferredName"], $informParentsEntry["surname"], "Student"), $_SESSION[$guid]["systemName"], $_SESSION[$guid]["organisationNameShort"], $_SESSION[$guid]["absoluteURL"], $informParentsEntry["username"], $informParentsEntry["password"], $_SESSION[$guid]["systemName"]) . sprintf(_('\\n\\nPlease feel free to reply to this email should you have any questions.\\n\\n%1$s,\\n\\n%2$s Administrator'), $_SESSION[$guid]["organisationAdministratorName"], $_SESSION[$guid]["systemName"]);
             }
             $headers = "From: " . $_SESSION[$guid]["organisationAdministratorEmail"];
             if (mail($to, $subject, $body, $headers)) {
                 print "<div class='success'>";
                 print _("A welcome email was successfully sent to") . " " . formatName("", $informParentsEntry["preferredName"], $informParentsEntry["surname"], "Student") . ".";
                 print "</div>";
             } else {
开发者ID:dpredster,项目名称:core,代码行数:31,代码来源:applicationForm_manage_accept.php


示例13: _

                            print _("Submit");
                            ?>
">
								</td>
							</tr>
						</table>
					</form>
					<?php 
                        }
                    }
                    $gibbonPersonID = NULL;
                    if (isset($_GET["search"])) {
                        $gibbonPersonID = $_GET["search"];
                    }
                    $showParentAttainmentWarning = getSettingByScope($connection2, "Markbook", "showParentAttainmentWarning");
                    $showParentEffortWarning = getSettingByScope($connection2, "Markbook", "showParentEffortWarning");
                    if ($gibbonPersonID != "" and $count > 0) {
                        //Confirm access to this student
                        try {
                            $dataChild = array("gibbonPersonID" => $gibbonPersonID, "gibbonPersonID2" => $_SESSION[$guid]["gibbonPersonID"]);
                            $sqlChild = "SELECT * FROM gibbonFamilyChild JOIN gibbonFamily ON (gibbonFamilyChild.gibbonFamilyID=gibbonFamily.gibbonFamilyID) JOIN gibbonFamilyAdult ON (gibbonFamilyAdult.gibbonFamilyID=gibbonFamily.gibbonFamilyID) JOIN gibbonPerson ON (gibbonFamilyChild.gibbonPersonID=gibbonPerson.gibbonPersonID) WHERE gibbonPerson.status='Full' AND (dateStart IS NULL OR dateStart<='" . date("Y-m-d") . "') AND (dateEnd IS NULL  OR dateEnd>='" . date("Y-m-d") . "') AND gibbonFamilyChild.gibbonPersonID=:gibbonPersonID AND gibbonFamilyAdult.gibbonPersonID=:gibbonPersonID2 AND childDataAccess='Y'";
                            $resultChild = $connection2->prepare($sqlChild);
                            $resultChild->execute($dataChild);
                        } catch (PDOException $e) {
                            print "<div class='error'>" . $e->getMessage() . "</div>";
                        }
                        if ($resultChild->rowCount() < 1) {
                            print "<div class='error'>";
                            print _("The selected record does not exist, or you do not have access to it.");
                            print "</div>";
                        } else {
开发者ID:dpredster,项目名称:core,代码行数:31,代码来源:internalAssessment_view.php


示例14: _

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@session_start();
if (isActionAccessible($guid, $connection2, "/modules/Students/student_view_details_notes_add.php") == FALSE) {
    //Acess denied
    print "<div class='error'>";
    print _("You do not have access to this action.");
    print "</div>";
} else {
    $enableStudentNotes = getSettingByScope($connection2, "Students", "enableStudentNotes");
    if ($enableStudentNotes != "Y") {
        print "<div class='error'>";
        print _("You do not have access to this action.");
        print "</div>";
    } else {
        $gibbonPersonID = $_GET["gibbonPersonID"];
        $subpage = $_GET["subpage"];
        if ($gibbonPersonID == "" or $subpage == "") {
            print "<div class='error'>";
            print _("You have not specified one or more required parameters.");
            print "</div>";
        } else {
            try {
                $data = array("gibbonSchoolYearID" => $_SESSION[$guid]["gibbonSchoolYearID"], "gibbonPersonID" => $gibbonPersonID);
                $sql = "SELECT * FROM gibbonPerson JOIN gibbonStudentEnrolment ON (gibbonPerson.gibbonPersonID=gibbonStudentEnrolment.gibbonPersonID) WHERE gibbonSchoolYearID=:gibbonSchoolYearID AND status='Full' AND (dateStart IS NULL OR dateStart<='" . date("Y-m-d") . "') AND (dateEnd IS NULL  OR dateEnd>='" . date("Y-m-d") . "') AND gibbonPerson.gibbonPersonID=:gibbonPersonID";
开发者ID:actcattest001,项目名称:core,代码行数:31,代码来源:student_view_details_notes_add.php


示例15: catch

     $resultHomework = $connection2->prepare($sqlHomework);
     $resultHomework->execute($dataHomework);
 } catch (PDOException $e) {
     $homework .= $e->getMessage();
 }
 if ($resultHomework->rowCount() > 0) {
     $homework .= "<ul>";
     while ($rowHomework = $resultHomework->fetch()) {
         $homework .= "<li><b>" . $rowHomework["course"] . "." . $rowHomework["class"] . "</b> - " . $rowHomework["name"] . " - " . sprintf(_('Due on %1$s at %2$s.'), dateConvertBack($guid, substr($rowHomework["homeworkDueDateTime"], 0, 10)), substr($rowHomework["homeworkDueDateTime"], 11, 5)) . "</li>";
     }
     $homework .= "</ul><br/>";
 } else {
     $homework .= _("There are no records to display.") . "<br/><br/>";
 }
 $behaviour = "";
 $parentWeeklyEmailSummaryIncludeBehaviour = getSettingByScope($connection2, "Planner", "parentWeeklyEmailSummaryIncludeBehaviour");
 if ($parentWeeklyEmailSummaryIncludeBehaviour == "Y") {
     //Get behaviour records for the past week, ready for email
     $behaviour .= "<h2>" . _('Behaviour') . "</h2>";
     try {
         $dataBehaviourPositive = array("gibbonPersonID" => $row["gibbonPersonID"], "gibbonSchoolYearID" => $_SESSION[$guid]["gibbonSchoolYearID"]);
         $sqlBehaviourPositive = "SELECT * FROM gibbonBehaviour WHERE gibbonPersonID=:gibbonPersonID AND gibbonSchoolYearID=:gibbonSchoolYearID AND type='Positive' AND date>'" . date('Y-m-d', strtotime("-1 week")) . "' AND date<='" . date("Y-m-d") . "'";
         $resultBehaviourPositive = $connection2->prepare($sqlBehaviourPositive);
         $resultBehaviourPositive->execute($dataBehaviourPositive);
     } catch (PDOException $e) {
     }
     try {
         $dataBehaviourNegative = array("gibbonPersonID" => $row["gibbonPersonID"], "gibbonSchoolYearID" => $_SESSION[$guid]["gibbonSchoolYearID"]);
         $sqlBehaviourNegative = "SELECT * FROM gibbonBehaviour WHERE gibbonPersonID=:gibbonPersonID AND gibbonSchoolYearID=:gibbonSchoolYearID AND type='Negative' AND date>'" . date('Y-m-d', strtotime("-1 week")) . "' AND date<='" . date("Y-m-d") . "'";
         $resultBehaviourNegative = $connection2->prepare($sqlBehaviourNegative);
         $resultBehaviourNegative->execute($dataBehaviourNegative);
开发者ID:dpredster,项目名称:core,代码行数:31,代码来源:planner_parentWeeklyEmailSummary.php


示例16: getBudgetsByPerson

     $budgets = getBudgetsByPerson($connection2, $_SESSION[$guid]["gibbonPersonID"]);
     foreach ($budgets as $budget) {
         if ($budget[2] == "Full" or $budget[2] == "Write") {
             $budgetsAccess = TRUE;
         }
     }
 }
 if ($budgetsAccess == FALSE) {
     print "<div class='error'>";
     print _("You do not have Full or Write access to any budgets.");
     print "</div>";
 } else {
     //Get and check settings
     $expenseApprovalType = getSettingByScope($connection2, "Finance", "expenseApprovalType");
     $budgetLevelExpenseApproval = getSettingByScope($connection2, "Finance", "budgetLevelExpenseApproval");
     $expenseRequestTemplate = getSettingByScope($connection2, "Finance", "expenseRequestTemplate");
     if ($expenseApprovalType == "" or $budgetLevelExpenseApproval == "") {
         print "<div class='error'>";
         print _("An error has occurred with your expense and budget settings.");
         print "</div>";
     } else {
         //Check if there are approvers
         try {
             $data = array();
             $sql = "SELECT * FROM gibbonFinanceExpenseApprover JOIN gibbonPerson ON (gibbonFinanceExpenseApprover.gibbonPersonID=gibbonPerson.gibbonPersonID) WHERE status='Full'";
             $result = $connection2->prepare($sql);
             $result->execute($data);
         } catch (PDOException $e) {
             print $e->getMessage();
         }
         if ($result->rowCount() < 1) {
开发者ID:dpredster,项目名称:core,代码行数:31,代码来源:expenses_manage_edit.php


示例17: _

										</form>
										<?php 
                                    }
                                }
                            }
                        }
                    } else {
                        if ($mode = "unregister") {
                            if ($continue == FALSE) {
                                print "<div class='error'>";
                                print _("Your request failed due to a database error.");
                                print "</div>";
                            } else {
                                $today = date("Y-m-d");
                                //Should we show date as term or date?
                                $dateType = getSettingByScope($connection2, "Activities", "dateType");
                                try {
                                    if ($dateType != "Date") {
                                        $data = array("gibbonSchoolYearID" => $_SESSION[$guid]["gibbonSchoolYearID"], "gibbonPersonID" => $gibbonPersonID, "gibbonActivityID" => $gibbonActivityID);
                                        $sql = "SELECT DISTINCT gibbonActivity.* FROM gibbonActivity JOIN gibbonStudentEnrolment ON (gibbonActivity.gibbonYearGroupIDList LIKE concat( '%', gibbonStudentEnrolment.gibbonYearGroupID, '%' )) WHERE gibbonActivity.gibbonSchoolYearID=:gibbonSchoolYearID AND gibbonPersonID=:gibbonPersonID AND gibbonActivityID=:gibbonActivityID AND NOT gibbonSchoolYearTermIDList='' AND active='Y' {$and}";
                                    } else {
                                        $data = array("gibbonSchoolYearID" => $_SESSION[$guid]["gibbonSchoolYearID"], "gibbonPersonID" => $gibbonPersonID, "gibbonActivityID" => $gibbonActivityID, "listingStart" => $today, "listingEnd" => $today);
                                        $sql = "SELECT DISTINCT gibbonActivity.* FROM gibbonActivity JOIN gibbonStudentEnrolment ON (gibbonActivity.gibbonYearGroupIDList LIKE concat( '%', gibbonStudentEnrolment.gibbonYearGroupID, '%' )) WHERE gibbonActivity.gibbonSchoolYearID=:gibbonSchoolYearID AND gibbonPersonID=:gibbonPersonID AND gibbonActivityID=:gibbonActivityID AND listingStart<=:listingStart AND listingEnd>=:listingEnd AND active='Y' {$and}";
                                    }
                                    $result = $connection2->prepare($sql);
                                    $result->execute($data);
                                } catch (PDOException $e) {
                                    print "<div class='error'>" . $e->getMessage() . "</div>";
                                }
                                if ($result->rowCount() != 1) {
                                    print "<div class='error'>";
开发者ID:dpredster,项目名称:core,代码行数:31,代码来源:activities_view_register.php


示例18: _

            ?>
</option>
							</select>
						</td>
					</tr>
					<tr id="accessRowParents">
						<td> 
							<b><?php 
            print _('Viewable to Parents');
            ?>
 *</b><br/>
							<span style="font-size: 90%"><i></i></span>
						</td>
						<td class="right">
							<?php 
            $sharingDefaultParents = getSettingByScope($connection2, "Planner", "sharingDefaultParents");
            ?>
							<select name="viewableParents" id="viewableParents" style="width: 302px">
								<option <?php 
            if ($sharingDefaultParents == "Y") {
                print "selected";
            }
            ?>
 value="Y"><?php 
            print _('Yes');
            ?>
</option>
								<option <?php 
            if ($sharingDefaultParents == "N") {
                print "selected";
            }
开发者ID:dpredster,项目名称:core,代码行数:31,代码来源:planner_add.php


示例19: foreach

     $budgetsAccess 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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