/lenasys/0.1

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/0.1

« back to all changes in this revision

Viewing changes to trunk/DuggaSys/quizSystem/index.php

  • Committer: galaxyAbstractor
  • Date: 2013-03-28 15:59:22 UTC
  • mfrom: (4.10.2 lenasys)
  • mto: (4.7.12 GammaBear)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: galaxyabstractor@gmail.com-20130328155922-yh5676lqrteke4do
Merged Daniels code

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
header("X-UA-Compatible: IE=edge,chrome=1");
3
3
session_start();
4
4
 
5
 
function htmlsafe($str){
 
5
function htmlsafe($str) {
6
6
        return $str=htmlspecialchars($str,ENT_QUOTES,'UTF-8');
7
7
}
8
8
        
9
 
function generatePassword($length){
 
9
function generatePassword($length) {
10
10
        $arr = str_split('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890'); //Array of characters that may occur in the password
11
11
    shuffle($arr); //Shuffle array
12
12
    $arr = array_slice($arr, 0, $length); //Extract the first $length characters from the shuffled array
13
13
    return implode('', $arr); //Make string of the array and return the result
14
14
}
15
15
 
16
 
function addBackLink($postBacks){
 
16
function addBackLink($postBacks) {
17
17
        echo "<form name='backLink' action='.' method='post'>";
18
 
        foreach($postBacks as $name=>$value){
 
18
        foreach($postBacks as $name=>$value) {
19
19
                echo "<input type='hidden' name='".$name."' value='".$value."' />";
20
20
        }
21
21
    echo "<a href='#' onclick='document[\"backLink\"].submit();return false;'><-- Back</a>";
47
47
                include "data/index.php";
48
48
        } else if(isset($_POST['registerStudentsLink']) || isset($_POST['parseSubmit'])) {
49
49
                include "registerStudents/index.php";
50
 
        } else if(isset($_POST['listStudentsLink'])){
 
50
        } else if(isset($_POST['listStudentsLink'])) {
51
51
                include "students/index.php";
52
 
        } else if(isset($_POST['listQuizzesLink'])){
 
52
        } else if(isset($_POST['listQuizzesLink'])) {
53
53
                include "quiz/index.php";
54
 
        } else if(isset($_POST['checkQuizzesLink'])){
 
54
        } else if(isset($_POST['checkQuizzesLink'])) {
55
55
                include "quizChecking/index.php";
56
 
        }else if(isset($_POST['coursesLink'])){
 
56
        }else if(isset($_POST['coursesLink'])) {
57
57
                include "course/index.php";
58
58
        } else if (isset($_POST['searchString'])) {
59
59
        include "search/index.php";