Example #1
0
                          <form role="form" method="POST">
                              <div class="form-group">
                                  <label for="exampleInputEmail1">Nama Jabatan:</label>
                                  <input type="text" class="form-control" name="deptName" required>
                              </div>
                              <button type="submit" class="btn btn-default" name="newDept">Hantar</button>
                          </form>
                      </div>
                  </div>
              </div>
          </div>

          <?php 
if (isset($_GET['updateDept'])) {
    $deptID = $_GET['updateDept'];
    $deptName = getDeptName($deptID);
    $updateForm = "<br/><br/><form method='POST'>\n                              <input type='hidden' name='deptID' value='{$deptID}'>\n                              <input type='text' name='deptName' value='{$deptName}' placeholder='Nama Jabatan' required><br/>\n                              <input type='submit' name='updtDept' class='btn btn-info' value='Kemaskini'>\n                            </form>";
    echo $updateForm;
}
?>

          </section>
      </section>
      <!--main content end-->
  </section>

    <!-- js placed at the end of the document so the pages load faster -->
    <?php 
include 'FL_JS.php';
?>
Example #2
0
    echo "Tiada Jabatan Ditemui";
}
?>
                              <br/>
                              <button type="reset" class="btn" name="clear">Set Semula</button>
                              <button type="submit" class="btn btn-primary" name="newDeptLdr"> Hantar </button>
                          </form>
                      </div>
                  </div>
              </div>
          </div>

          <?php 
if (isset($_GET['updateDeptLdr'])) {
    $DLID = $_GET['updateDeptLdr'];
    $deptName = getDeptName($DLID);
    $DLName = getDLName($DLID);
    $DLEmail = getDLEmail($DLID);
    $updateForm = "<br/><br/><form method='POST'>\n                              <input type='hidden' name='DLID' value='{$DLID}'>\n                              <input type='text' name='DLName' value='{$DLName}' placeholder='Nama' required> <br/>\n                              <input type='email' name='DLEmail' value='{$DLEmail}' placeholder='Emel' required> <br/>\n                              <input type='submit' name='updtDL' value='Update'>\n                            </form>";
    echo $updateForm;
}
?>

          </section>
      </section>
      <!--main content end-->
  </section>

    <!-- js placed at the end of the document so the pages load faster -->
    <?php 
include 'FL_JS.php';
Example #3
0
        return false;
    }
}
// update departments
$depts = DeptQuery::create()->filterBySchool($school)->find();
foreach ($depts as $dept) {
    $abbr = $dept->getAbbr();
    if ($name = getDeptName($dept->getAbbr(), true)) {
        $dept->setName(trim($name))->save();
    }
}
// update courses
// sets term cookie
curl_post("http://voyager.adminsvc.temple.edu/tucourses/tu_courses.asp", http_build_query(array('radSemester' => '1103', 'radCrseType' => 'All')));
foreach ($depts as $dept) {
    if ($name = getDeptName($dept->getAbbr())) {
        $params = http_build_query(array('lstCrsLevel' => 'All', 'radCampus' => 'All', 'lstDept' => $name, 'lstCredHrs' => 'All', 'radDivn' => 'All', 'radStatus' => 'All', 'lstReq' => 'All')) . "&Day1=&Day2=&Day3=&Day4=&Day5=&Day6=&Day7=&PrevCourse1B=&PrevTextCourse1B=&PrevCourse2B=" . "&PrevTextCourse2B=&PrevCourse3B=&PrevTextCourse3B=&PrevCourse4B=&PrevTextCourse4B=" . "&PrevCourse5B=&PrevTextCourse5B=&PrevCourse4B=&PrevTextCourse4B=&PrevCourse5B=&" . "PrevTextCourse5B=&browser=&host=";
        $result = curl_post("http://voyager.adminsvc.temple.edu/tucourses/tu_courseslist.asp", $params, array(CURLOPT_HTTPHEADER => array("Origin: http://voyager.adminsvc.temple.edu")));
        //var_dump($result);
        //die();
        preg_match_all("/header\"\\>(.+?)\\</", $result, $matches);
        $matches = $matches[1];
        print_r($matches);
        for ($i = 0; $i < count($matches); $i += 11) {
            $num = substr($matches[$i], strpos($matches[$i], '0'), 6);
            $section = curl_get("http://voyager.adminsvc.temple.edu/tucourses/tu_coursesdescrip.asp?name={$num}&Clear=Yes");
            if (preg_match("/Instructor.+?descripNobold\"\\>([^<]+?),([^<]+?)\\</s", $section, $m)) {
                $prof = trim(preg_replace("/\\s+/", ' ', $m[2] . $m[1]));
            } else {
                $prof = null;
            }
Example #4
0
switch (mb_substr($fnvch, -1)) {
    case 'д':
        $tchData->FORMNAVCH = 'денна';
        break;
    case 'з':
        $tchData->FORMNAVCH = 'зоачна';
        break;
    case 'в':
        $tchData->FORMNAVCH = 'вечірня';
        break;
    case 'н':
        $tchData->FORMNAVCH = 'дистанційна';
        break;
}
$tchData->NUMSEM = getSemestr($tchData->SPECNAMEID, $cid);
$tchData->DEPTNAME = getDeptName($tchData->SPECNAMEID);
switch ($tchData->NUMSEM) {
    case '01':
    case '02':
        $tchData->COURSE = 'I';
        $nvCrYr = 1;
        break;
    case '03':
    case '04':
        $tchData->COURSE = 'II';
        $nvCrYr = 2;
        break;
    case '05':
    case '06':
        $tchData->COURSE = 'III';
        $nvCrYr = 3;