function getGroup($mysqli, $groupId) { if (doesGroupExist($mysqli, $groupId)) { if ($stmt = $mysqli->prepare("SELECT name, school_id, creator_id FROM groups WHERE id = ? LIMIT 1")) { $stmt->bind_param("i", $groupId); $stmt->execute(); $stmt->store_result(); $stmt->bind_result($name, $schoolId, $creatorId); $stmt->fetch(); return array("id" => $groupId, "name" => $name, "school" => getSchool($mysqli, $schoolId), "creator" => getMember($mysqli, $creatorId)); } } }
function updateSchool() { cleaningSchoolTable(); getSchool(); }
$flagArr = str_split($uv['flag']); ?> <h2><?php echo $uv['name']; ?> :</h2> <?php if (!empty($flagArr)) { foreach ($flagArr as $fk => $fv) { $val = 'field' . ($fk + 1) . 'name'; if ($fv) { if ($user_extrainfo[$uv['uecid']]) { if ($uv['uecid'] == 2 && $uv[$val] == '所属学校') { include_once '/var/www/html/site/lib/school.lib.php'; $City_Array = getCity(); $School_Array = getSchool(); $user_extrainfoArr = explode("_", $user_extrainfo[$uv['uecid']][$val]); echo '<span style="white-space:pre-wrap;">' . $uv[$val] . ':' . $City_Array[$user_extrainfoArr[0]] . ' / ' . $School_Array[$user_extrainfoArr[0]][$user_extrainfoArr[1]] . '</span><br />'; } else { ?> <span style="white-space:pre-wrap;"><?php echo $uv[$val]; ?> :<?php echo $user_extrainfo[$uv['uecid']][$val]; ?> </span><br /> <?php } } }
function renderSpellCrit($char_data) { $rating = getRating($char_data[UNIT_FIELD_LEVEL]); $spellCritRating = $char_data[PLAYER_FIELD_SPELL_CRIT_RATING]; $minCrit = getFloatValue($char_data[PLAYER_SPELL_CRIT_PERCENTAGE + 1], 2); $critRatingPct = $spellCritRating / GetRatingCoefficient($rating, CR_CRIT_SPELL); createTopTable(); printf("<TR><TD class=head colSpan=3>Crit Rating %d (%.2f%%)</TD></TR>", $spellCritRating, $critRatingPct); for ($i = 1; $i < 7; $i++) { $crit = getFloatValue($char_data[PLAYER_SPELL_CRIT_PERCENTAGE + $i], 2); $minCrit = min($minCrit, $crit); echo "<TR valign=center><TD width=1px><img src=images/player_info/characterframe/SpellSchoolIcon{$i}.gif></TD>"; echo "<TD> " . getSchool($i) . "</TD><TD align=right width=80px>{$crit}%</TD></TR>"; } createEndTable("normStat", $minCrit . "%"); }
<?php include_once 'includes/functions.php'; include_once 'includes/db_connect.php'; sec_session_start(); $id = $_GET['id']; $sortByClass = true; if (isset($_GET['class'])) { $sortByClass = $_GET['class']; } $school = getSchool($mysqli, $id); $schoolName = $school["name"]; $schoolLocation = $school["location"]; $user = getMember($mysqli, $_SESSION['user_id']); $members = getMembersInSchool($mysqli, $id); if ($sortByClass == "true") { $messages = getBoardMessagesWithGraduationYear($mysqli, $id, $user['graduationYear'], 'school'); } else { if ($sortByClass == "false") { $messages = getBoardMessages($mysqli, $id, 'school'); } } $groups = getGroups($mysqli, $id); ?> <!DOCTYPE html> <html> <head> <title>After School</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1">
function loadAlerts() { global $ThisUsername; //gain access to the curent username global $ThisUsers; //gain access to the current user data global $ThisSchools; //gain access to the current school data global $ThisGroups; //gain access to the current group data global $ThisOrders; //gain access to the current order data global $ThisProjects; //gain access to the current project data global $alertHtml; //gain access to the alert html variable (end display html) global $alertRemovedA; //gain access to the array of removed alerts global $alertA; //gain access to the array of all alerts getUser($ThisUsername); //load the current user data based upon the user's username getSchool($ThisUsers['School Code']); //load the current school data for this user getGroup($ThisUsers['Group Code']); //load the current group data for this user getOrder($ThisGroups['Order Code']); //load the current order data for this group getProject($ThisOrders['Doc Code']); //load the current project data for this order $userDBAlertsA = explode("&&&", $ThisUsers['Alerts']); //split the user alert data string by &&& and store this array if (count($userDBAlertsA) == 2) { //if this array has two parts, (one &&& seperator) $alertRemovedA = explode(",,,", $userDBAlertsA[0]); //split the first part by ,,, and make these items the removed alerts (add the user removed alerts) addAlerts($userDBAlertsA[1]); //and process the other part using the addAlerts function (add the user alerts with respect to the removed alerts) } addAlerts($ThisSchools['Alerts']); //add the school alerts with respect to the removed alerts addAlerts($ThisGroups['Alerts']); //add the group alerts with respect to the removed alerts addAlerts($ThisOrders['Alerts']); //add the order alerts with respect to the removed alerts addAlerts($ThisProjects['Alerts']); //add the project alerts with respect to the removed alerts addAlerts("13,,,12,,,0,,,This is an alert! these can be sent to peeples' dashboards! They can be sent per group, school, individual, etc. ! This one should be blueish! Dale and Erik, you can make it look basicly however you want as long as it is stackable in this right pane!"); //example alert addAlerts("23,,,22,,,1,,,Alerts basicly go away forever when you dismiss them.. these are just for testing.. This should be yellow-ish!"); //example alert addAlerts("34,,,33,,,2,,,This one should be red-sih! WARNING! THE WORLD HAS ENDED!"); //example alert $alertHtml = ""; //set the alert html to be blank for ($i = 0; $i < count($alertA); $i++) { //for each alert that is to be printed, $thisAlertA = $alertA[$i]; //create a temporary variable to store the data for this alert $alertHtml = $alertHtml . '<div class="alert-item-outer color-' . $thisAlertA[2] . '" id="alert-' . $thisAlertA[0] . '"><p align="left">' . $thisAlertA[3] . '</p><p align="right"><a style="color:#606060;" href="#" onclick="dismissAlert(' . "'" . $thisAlertA[0] . "'" . ');">Dismiss</a></p></div>'; //add this alert } if ($alertHtml == '') { //if no alerts were added $alertHtml = '<p style="margin-top:3em;color:#ffffff;font-size: 300%;">No new alerts at this time</p>'; //display the no new alerts text } }
<!-- Left side column. contains the logo and sidebar --> <?php include 'ministry_sidebar.php'; ?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> <?php $id = $_POST["school_id"]; include '../php/mysql_connector.php'; include '../php/controller/MethodSchController.php'; $school_name = getSchool($id); foreach ($school_name as $result) { echo $result['name']; } ?> <small></small> </h1> <ol class="breadcrumb"> <li><a href="#"><i class="fa fa-home"></i> Home</a></li> <li class="active"><?php echo $result['name']; ?> </li> </ol> </section>