diff --git a/static/config/config.inc.php b/static/config/config.inc.php new file mode 100644 index 0000000..b9821c9 --- /dev/null +++ b/static/config/config.inc.php @@ -0,0 +1,14 @@ + diff --git a/static/config/db_array.inc.php b/static/config/db_array.inc.php new file mode 100644 index 0000000..d8e409c --- /dev/null +++ b/static/config/db_array.inc.php @@ -0,0 +1,45 @@ + + array( + 'type' => 'INT', + 'size' => 11, + 'unique' => 'TRUE', + 'standard' => 'NOT NULL', + 'extra' => 'AUTO_INCREMENT PRIMARY KEY' + + ), + 'name' => array( + 'type' => 'VARCHAR', + 'size' => 255, + 'standard' => 'NOT NULL' + ), + 'email' => array( + 'type' => 'VARCHAR', + 'size' => 255, + 'standard' => 'NOT NULL' + ), + + 'signal' => array( + 'type' => 'VARCHAR', + 'size' => 255, + 'standard' => 'NOT NULL' + ), + 'sms' => array( + 'type' => 'VARCHAR', + 'size' => 255, + 'standard' => 'NOT NULL' + ), + 'telegram' => array( + 'type' => 'VARCHAR', + 'size' => 255, + 'standard' => 'NOT NULL' + ), + 'threema' => array( + 'type' => 'VARCHAR', + 'size' => 255, + 'standard' => 'NOT NULL' + ) + ); diff --git a/static/form.php b/static/form.php new file mode 100644 index 0000000..cd1f05a --- /dev/null +++ b/static/form.php @@ -0,0 +1,191 @@ +link_database(); + $this->em_check_database(); + $this->read_variables(); + date_default_timezone_set($this->settings['timezone']); + } + + function read_variables() { + //reads all GET and POST variables into the object, addslashing both + if (count($_POST)) { + foreach ($_POST as $key => $val){ + $key=addslashes("r_".$key); + if (is_array($val)) { + for ($z=0;$z$key=$val; + } + } + if (count($_GET)) { + foreach ($_GET as $key => $val){ + $key=addslashes("r_".$key); + if (is_array($val)) { + for ($z=0;$z$key=$val; + } + } + }//end of function read variables + + + function link_database() { + $this->databaselink = new mysqli(DB_HOST,DB_USER,DB_PW,DB_DATABASE); + $this->databaselink->set_charset('utf8'); + if ($this->databaselink->connect_errno) { + return "Datenbank nicht erreichbar: (" . $this->databaselink->connect_errno . ") " . $this->databaselink->connect_error; + } + else{ + $this->databasename=DB_DATABASE; + $this->databaselink->query("SET SQL_MODE = '';"); + return True; + } + } + + function store_data($sTable,$aFields,$sKey_ID,$mID) { + //updates or inserts data + //returns ID or -1 if fails + $i=0; $returnID = 0; + + if(($mID>0) or ($mID!="") or ($mID != null)) { + //search for it + $aCheckFields=array($sKey_ID=>$mID); + $aRow=$this->select_row($sTable,$aCheckFields); + $returnID=$aRow[$sKey_ID]; + } + if(($returnID>0) or ($returnID!="")) { + $sQuery="update ".$sTable." set "; + foreach($aFields as $key=>$value) { + $sQuery.=$key."='".$value."'"; + $i++; + if($i$value) { + $sKeys.=$sKey; + $sValues.="'".$value."'"; + $i++; + if($ilast_query[]=$sQuery; + if ($pResult = $this->databaselink->query($sQuery)) { + if(($returnID>0) or ($returnID!="")) { + return $returnID; + } + else { + return $this->databaselink->insert_id; + } + } + else { + return -1; + } + } + + function save_user($aUser){ + /* + args: + Array $aUser + Array of user information which will be saved. + e.g. array( + 'forename' => String $forname, + 'surname' => String $surname, + 'email' => String $email, + 'UID' => String $UID, + 'language' => String $language, + 'admin' => Bool $admin, + 'password' => String md5(str_rev($password)), #deprecated, do not use! + 'password_hash' => password_hash(String $password, PASSWORD_DEFAULT) + ); + + returns: + None + Function will save user Information given in $aUser. If user exists it will + overwrite existing data but not delete not-specified data + */ + $aFields = $aUser; + if ((isset($this->r_user_ID))and ($this->r_user_ID != "")){ + $this->ID=$this->store_data(TABLE_USER, $aFields, 'user_ID' , $this->r_user_ID); + } + else{ + $this->ID=$this->store_data(TABLE_USER, $aFields, NULL , NULL); + } + } +} + +//end of class + +session_start(); + + +include ("config/config.inc.php"); + + +$oObject = new Data; + +$oObject->output = ""; + +switch ($oObject->r_ac){ + case 'save' + $aUser = array(); + if(isset($oObject->r_user_ID)){ + $aUser['user_ID'] = $oObject->r_user_ID; + } + if(isset($oObject->r_name)){ + $aUser['name'] = $oObject->r_forename; + } + if(isset($oObject->r_email)){ + $aUser['email'] = $oObject->r_email; + } + if(isset($oObject->r_email)){ + $aUser['signal'] = $oObject->r_email; + } + if(isset($oObject->r_email)){ + $aUser['sms'] = $oObject->r_email; + } + if(isset($oObject->r_email)){ + $aUser['telegram'] = $oObject->r_email; + } + if(isset($oObject->r_email)){ + $aUser['threema'] = $oObject->r_email; + } + $oObject->save_user($aUser); + $oObject->output += "Erfolgreich gespeichert"; + break; + default: + $oObject->get_view("views/user_form.php"); +} +function output($oObject){ + echo $oObject->get_view("views/head.php"); + echo $oObject->get_view("views/body.php"); +} +output($oObject); + +} + + + +?> diff --git a/static/views/all_books.php b/static/views/all_books.php new file mode 100644 index 0000000..5e751e4 --- /dev/null +++ b/static/views/all_books.php @@ -0,0 +1,37 @@ + + + + +"; + $table .= + ' + '.$this->oLang->texts['TITLE'].' + '.$this->oLang->texts['AUTHOR'].' + '.$this->oLang->texts['LOCATION'].' + '.$this->oLang->texts['STATUS_AVAILABLE'].' + '.$this->oLang->texts['TOTAL'].' + '; + +foreach ($this->aBook as $title => $aResult){ + //var_dump($aResult); + if($aResult['available']==0){ + $sClass = 'lent'; + } + else{ + $sClass = 'available'; + } + $table .= + ' + '.$aResult['title'].' + '.$aResult['author'].' + '.$aResult['location'].' + '.$aResult['available'].' + '.$aResult['number'].''; +} + $table .=""; + echo $table; + + +?> + diff --git a/static/views/all_books_itemized.php b/static/views/all_books_itemized.php new file mode 100644 index 0000000..6bc0556 --- /dev/null +++ b/static/views/all_books_itemized.php @@ -0,0 +1,62 @@ + + + + + + + + '; +echo $form; + +/* +Adds a table of all itemized books +*/ +$table = ""; + $table .= + " + + + + + "; + + $table .=' + + + '; + + + foreach ($this->aBook as $book_ID => $aResult) + { + if($aResult['lent'] == 0){ + $sClass= "available"; + $sStatus= $this->oLang->texts['STATUS_AVAILABLE']; + } + else{ + $sClass = "lent"; + $sStatus = $this->oLang->texts['STATUS_LENT']; + } + + $table .= + ' + + + + + + + + '; + } + + $table .="
".$this->oLang->texts['BOOK_ID']."".$this->oLang->texts['TITLE']."".$this->oLang->texts['AUTHOR']."".$this->oLang->texts['LOCATION']."".$this->oLang->texts['STATUS']."'.$this->oLang->texts['BUTTON_CHANGE'].''.$this->oLang->texts['BUTTON_DELETE'].'
'.$aResult['book_ID'].''.$aResult['title'].''.$aResult['author'].''.$aResult['location'].''.$sStatus.' '.$this->oLang->texts['BUTTON_CHANGE'].' '.$this->oLang->texts['BUTTON_DELETE'].'
"; + echo $table; + +?> diff --git a/static/views/all_books_plain.php b/static/views/all_books_plain.php new file mode 100644 index 0000000..8e0bb96 --- /dev/null +++ b/static/views/all_books_plain.php @@ -0,0 +1,35 @@ + + + + +"; + $table .= + ' + '.$this->oLang->texts['TITLE'].' + '.$this->oLang->texts['AUTHOR'].' + '.$this->oLang->texts['LOCATION'].' + '.$this->oLang->texts['AVAILABLE'].' + '.$this->oLang->texts['TOTAL'].''; + +foreach ($this->aBook as $title => $aResult){ + if($aResult['available']==0){ + $sClass = 'lend'; + } + else{ + $sClass = 'available'; + } + $table .= + ' + '.$aResult['title'].' + '.$aResult['author'].' + '.$aResult['location'].' + '.$aResult['available'].' + '.$aResult['number'].''; +} + $table .=""; + echo $table; + + +?> + diff --git a/static/views/all_loans.php b/static/views/all_loans.php new file mode 100644 index 0000000..32e0684 --- /dev/null +++ b/static/views/all_loans.php @@ -0,0 +1,66 @@ +"; + $table .= + ' + '.$this->oLang->texts['LOAN_ID'].' + '.$this->oLang->texts['LENT_ON'].' + '.$this->oLang->texts['RETURNED_ON'].' + '.$this->oLang->texts['TITLE_MATERIAL'].' + '.$this->oLang->texts['ID'].' + '.$this->oLang->texts['FORENAME'].' + '.$this->oLang->texts['SURNAME'].' + '.$this->oLang->texts['USER_ID'].''; +if ($_SESSION['admin']==1){ + $table .= ' + '.$this->oLang->texts['BUTTON_CHANGE'].' + '.$this->oLang->texts['BUTTON_RETURN'].''; +} + $table .= ""; + foreach ($this->aLoan as $loan_ID => $aResult) + { + $table .= + ' + '.$aResult['loan_ID'].' + '.$aResult['pickup_date'].' + '; + if($aResult['return_date'] == 0000-00-00){ + $table .= $this->oLang->texts['STATUS_LENT']; + } + else{ + $table.= $aResult['return_date']; + } + $table .= ' + '.$this->all_book[$aResult['ID']]['title'].$this->all_material[$aResult['ID']]['name'].' + '.$aResult['ID'].' + '.$this->all_user[$aResult['user_ID']]['forename'].' + '.$this->all_user[$aResult['user_ID']]['surname'].' + '.$aResult['user_ID'].''; + if($_SESSION['admin']==1){ + $table .= + ' '.$this->oLang->texts['BUTTON_CHANGE'].' +'; + + if ($aResult['return_date']==000-00-00){ + $table .=' + '.$this->oLang->texts['BUTTON_RETURN'].' '; + } + + else{ + $table .=' + '.$this->oLang->texts['ALREADY_RETURNED'].''; + } + + $table .=''; + } + } + $table = $table.""; + echo $table; + +$form =' +
+ + +
'; +echo $form; +?> + diff --git a/static/views/all_material.php b/static/views/all_material.php new file mode 100644 index 0000000..dca082e --- /dev/null +++ b/static/views/all_material.php @@ -0,0 +1,33 @@ + + + + +"; + $table .= + " + ".$this->oLang->texts['NAME']." + ".$this->oLang->texts['LOCATION']." + ".$this->oLang->texts['STATUS_AVAILABLE']." + ".$this->oLang->texts['TOTAL'].""; + +foreach ($this->aMaterial as $title => $aResult){ + if($aResult['available']==0){ + $sClass = 'lent'; + } + else{ + $sClass = 'available'; + } + $table .= + ' + '.$aResult['name'].' + '.$aResult['location'].' + '.$aResult['available'].' + '.$aResult['number'].''; +} + $table .=""; + echo $table; + + +?> + diff --git a/static/views/all_material_itemized.php b/static/views/all_material_itemized.php new file mode 100644 index 0000000..5f12975 --- /dev/null +++ b/static/views/all_material_itemized.php @@ -0,0 +1,55 @@ + + + + +"; + $table .= + ' + '.$this->oLang->texts['MATERIAL_ID'].' + '.$this->oLang->texts['NAME'].' + '.$this->oLang->texts['LOCATION'].' + '.$this->oLang->texts['STATUS'].''; + + $table .=' + '.$this->oLang->texts['BUTTON_CHANGE'].' + '.$this->oLang->texts['BUTTON_DELETE'].''; + $table .=''; + + + foreach ($this->aMaterial as $material_ID => $aResult) + { + if($aResult['lent'] == 0){ + $sClass= "available"; + $sStatus= $this->oLang->texts['STATUS_AVAILABLE']; + } + else{ + $sClass = "lent"; + $sStatus = $this->oLang->texts['STATUS_LENT']; + } + $table .= + ' + '.$aResult['material_ID'].' + '.$aResult['name'].' + '.$aResult['location'].' + '.$sStatus; + + + $table .= + ' +
'.$this->oLang->texts['BUTTON_CHANGE'].' + '.$this->oLang->texts['BUTTON_DELETE'].' + '; + } + $table .=""; + echo $table; + + $form = '
oLang->texts['NEW_MATERIAL'].'"> +
'; + echo $form; +?> + diff --git a/static/views/all_present.php b/static/views/all_present.php new file mode 100644 index 0000000..03b86ec --- /dev/null +++ b/static/views/all_present.php @@ -0,0 +1,64 @@ + + + + '; +echo $form; + +$table = ""; + $table .= + ' + + + + '; +if ($_SESSION['admin']==1){ + $table .= ' + + + '; +} +$table .= ""; +foreach ($this->aPresence as $presence_ID => $aResult){ + if(isset($this->all_user[$aResult['UID']]['forename'])){ + $table .= + ' + + + + '; + if($_SESSION['admin']==1){ + $table .= + ' +'; + + if ($aResult['checkout_time'] == "0000-00-00 00:00:00"){ + $table .=' + '; + } + + else{ + $table .=' + '; + } + + $table .= + ' + '; + } + } +} +$table = $table."
'.$this->oLang->texts['FORENAME'].''.$this->oLang->texts['SURNAME'].''.$this->oLang->texts['CHECKIN_AT'].''.$this->oLang->texts['CHECKOUT_AT'].''.$this->oLang->texts['BUTTON_CHANGE'].''.$this->oLang->texts['BUTTON_CHECKOUT'].''.$this->oLang->texts['BUTTON_DELETE'].'
'.$this->all_user[$aResult['UID']]['forename'].''.$this->all_user[$aResult['UID']]['surname'].''.$aResult['checkin_time'].''; + if($aResult['checkout_time'] == "0000-00-00 00:00:00"){ + $table .= $this->oLang->texts['STATUS_PRESENT']; + } + else{ + $table.= $aResult['checkout_time']; + } + $table .= ' '.$this->oLang->texts['BUTTON_CHANGE'].' '.$this->oLang->texts['BUTTON_CHECKOUT'].' '.$this->oLang->texts['ALREADY_CHECKED_OUT'].' '.$this->oLang->texts['BUTTON_DELETE'].'
"; + +echo $table; + +?> + diff --git a/static/views/all_user.php b/static/views/all_user.php new file mode 100644 index 0000000..00ac7bb --- /dev/null +++ b/static/views/all_user.php @@ -0,0 +1,62 @@ + + + + '; + echo $form; +} +/* +Creates Table that shows all lends +*/ +$table = ""; + $table .= + ' + + + + + + '; + + +if ($_SESSION['admin']==1) { + $table .= + ' + '; + if (($_SESSION['admin']==1) or ($this->r_user_ID = $_SESSION['user_ID'])){ + $table .= ''; + } +} +$table .= ''; + foreach ($this->aUser as $user_ID => $aResult) + { + $table .= + ' + + + + + '; + if ($_SESSION['admin']==1){ + $table .= + ' + '; + if (($_SESSION['admin']==1) or ($this->r_user_ID = $_SESSION['user_ID'])){ + $table .=' + '; + } + } + + $table .= ''; + } + +$table = $table."
'.$this->oLang->texts['USER_ID'].''.$this->oLang->texts['SURNAME'].''.$this->oLang->texts['FORENAME'].''.$this->oLang->texts['EMAIL'].''.$this->oLang->texts['UID'].''.$this->oLang->texts['BUTTON_CHANGE'].''.$this->oLang->texts['BUTTON_DELETE'].''.$this->oLang->texts['BUTTON_SHOW_LOANS'].'
'.$aResult['user_ID'].''.$aResult['forename'].''.$aResult['surname'].''.$aResult['email'].''.$aResult['UID'].' '.$this->oLang->texts['BUTTON_CHANGE'].' '.$this->oLang->texts['BUTTON_DELETE'].' '.$this->oLang->texts['BUTTON_SHOW_LOANS'].'
"; +echo $table; +?> + diff --git a/static/views/body.php b/static/views/body.php new file mode 100644 index 0000000..fe1bd97 --- /dev/null +++ b/static/views/body.php @@ -0,0 +1,13 @@ + + + +error)) and ($this->error != "")){ + echo "
"; + echo $this->error; + echo "
"; +} +echo "
"; +echo $this->output; +echo "
"; +?> diff --git a/static/views/book_form.php b/static/views/book_form.php new file mode 100644 index 0000000..1c5715d --- /dev/null +++ b/static/views/book_form.php @@ -0,0 +1,34 @@ + + '. + $this->oLang->texts['BOOK_ID'].':
'; +if(!isset($this->aRow['book_ID'])){ + $form .= + $this->oLang->texts['NUMBER'].':
'; +} +$form .= $this->oLang->texts['TITLE'].':
'. + $this->oLang->texts['AUTHOR'].':
'; +$form .= $this->oLang->texts['LOCATION'].':
+ + +'; +echo $form; +?> diff --git a/static/views/changed_language.php b/static/views/changed_language.php new file mode 100644 index 0000000..b4cfdc1 --- /dev/null +++ b/static/views/changed_language.php @@ -0,0 +1,3 @@ +'.$this->oLang->texts['CHANGED_LANGUAGE_TO'].': '.$_SESSION['language'].''; +?> diff --git a/static/views/display_open.php b/static/views/display_open.php new file mode 100644 index 0000000..46d6a07 --- /dev/null +++ b/static/views/display_open.php @@ -0,0 +1,20 @@ + + '.$this->oLang->texts['W_DAY'].' + '.$this->oLang->texts['W_START'].' + '.$this->oLang->texts['W_END'].' + '.$this->oLang->texts['W_NOTICE'].''; + + foreach($this->settings['opening_days'] as $day){ + echo ' + '.constant(strtoupper($day)).' + '.$this->aOpen[$day]["start"].' + '.$this->aOpen[$day]["end"].' + '.$this->aOpen[$day]["notice"].' + '; + } +echo ''; + + ?> + + diff --git a/static/views/footer.php b/static/views/footer.php new file mode 100644 index 0000000..6259408 --- /dev/null +++ b/static/views/footer.php @@ -0,0 +1,22 @@ + +
+ + + + + +

'.$this->oLang->texts['LINKS'].':

+ +
+
+'; +echo $footer; + +?> diff --git a/static/views/head.php b/static/views/head.php new file mode 100644 index 0000000..afd7020 --- /dev/null +++ b/static/views/head.php @@ -0,0 +1,15 @@ + + + + + + + + + + Address collection + + '; +?> + diff --git a/static/views/header.php b/static/views/header.php new file mode 100644 index 0000000..8715e1c --- /dev/null +++ b/static/views/header.php @@ -0,0 +1,47 @@ + +
+ +

'.$this->oLang->library_info['LIBRARY_NAME'].'

+

'.$this->oLang->library_info['LIBRARY_DESCRIPTION'].'

+
'; +if ($this->settings['enable_status'] == 1){ + $oPresence = new Presence; + $status = $oPresence->get_status(); + $header .= + '
+

'.$this->oLang->texts['CURRENT_STATUS'].'

'; + if($status){ + $header.= $this->oLang->texts['OPEN']; + } + else{ + $header.= $this->oLang->texts['CLOSE']; + } +} + $header.='

+
+
+ '. + $this->oLang->texts['LANGUAGE'].':oLang->texts['ENGLISH'].' + oLang->texts['GERMAN'].'
+ +
+
+ +
+'; +echo $header; +?> diff --git a/static/views/loan_form.php b/static/views/loan_form.php new file mode 100644 index 0000000..7ad5633 --- /dev/null +++ b/static/views/loan_form.php @@ -0,0 +1,45 @@ + + '; +if(isset($this->r_loan_ID)){ + $form .=''; +} +$form .= + $this->oLang->texts['USER_ID'].':
'. + $this->oLang->texts['TYPE'].': aLoan['type']== "book"){ + $form .= 'checked'; +} +$form .= '> + + aLoan['type']=="material"){ + $form .= 'checked'; +} +$form .= '> +
'. + $this->oLang->texts['ID'].':
'. + $this->oLang->texts['LENT_ON'].':
'. + $this->oLang->texts['RETURNED_ON'].':
+ + +'; +echo $form; + + diff --git a/static/views/login_form.php b/static/views/login_form.php new file mode 100644 index 0000000..66f803b --- /dev/null +++ b/static/views/login_form.php @@ -0,0 +1,18 @@ +

'.$this->oLang->texts['PLEASE_LOG_IN'].' :


+ +
+ + +
+

+
+
+ + +
'; +echo $login; + + + diff --git a/static/views/mail_stats.php b/static/views/mail_stats.php new file mode 100644 index 0000000..f2d8e6f --- /dev/null +++ b/static/views/mail_stats.php @@ -0,0 +1,7 @@ +'.$this->oLang->texts['TODAYS_MAIL_STATS'].'
'. +$this->oLang->texts['TOTAL_MAILS'].': '.$this->mail_stats['total'].'
'. + $this->oLang->texts['SUCCESSFUL_MAILS'].': '.$this->mail_stats['successful'].'
'. + $this->oLang->texts['FAILED_MAILS'].': '.$this->mail_stats['failed'].'
'; +?> diff --git a/static/views/material_form.php b/static/views/material_form.php new file mode 100644 index 0000000..d8a4426 --- /dev/null +++ b/static/views/material_form.php @@ -0,0 +1,28 @@ + + + '.$this->oLang->texts['MATERIAL_ID'].':
'; + +if(!isset($this->aRow['material_ID'])){ + $form .= $this->oLang->texts['NUMBER'].':
'; + } +$form .= $this->oLang->texts['NAME'].' : aRow['name']; +} +$form .= '>
'. + $this->oLang->texts['LOCATION'].': aRow['location']; +} +$form .= '>
+ + +'; +echo $form; +?> + diff --git a/static/views/navigation.php b/static/views/navigation.php new file mode 100644 index 0000000..c5c6658 --- /dev/null +++ b/static/views/navigation.php @@ -0,0 +1,29 @@ + +
  • '.$this->oLang->texts['HOME'].'
  • +
  • '.$this->oLang->texts['ALL_BOOKS'].'
  • +
  • '.$this->oLang->texts['ALL_MATERIAL'].'
  • +
  • '.$this->oLang->texts['OPENING_HOURS'].'
  • '; +if ($_SESSION['admin'] ==1){ +$navigation .= ' +
  • '.$this->oLang->texts['ALL_USER'].'
  • +
  • '.$this->oLang->texts['SEARCH_USER'].'
  • +
  • '.$this->oLang->texts['NEW_USER'].'
  • +
  • '.$this->oLang->texts['CHANGE_OPENING_HOURS'].'
  • +
  • '.$this->oLang->texts['ALL_LOAN'].'
  • +
  • '.$this->oLang->texts['NEW_LOAN'].'
  • +
  • '.$this->oLang->texts['SHOW_BOOKS_ITEMIZED'].'
  • +
  • '.$this->oLang->texts['SHOW_MATERIAL_ITEMIZED'].'
  • +
  • '.$this->oLang->texts['SHOW_PRESENCE'].'
  • +'; +} +$navigation .= ' +
  • '.$this->oLang->texts['MY_PROFIL'].'
  • +
  • '.$this->oLang->texts['MY_LOANS'].'
  • +
  • '.$this->oLang->texts['LOGOUT'].'
  • +'; +echo $navigation; + +?> + diff --git a/static/views/open_form.php b/static/views/open_form.php new file mode 100644 index 0000000..0d17251 --- /dev/null +++ b/static/views/open_form.php @@ -0,0 +1,38 @@ + + + + + + + '; + foreach($this->settings['opening_days'] as $day){ + $open_form .= ' + + + + + '; + } +$open_form .= '
    '.$this->oLang->texts['W_DAY'].''.$this->oLang->texts['W_START'].''.$this->oLang->texts['W_END'].''.$this->oLang->texts['W_NOTICE'].'
    '.$this->oLang->texts[strtoupper($day)].'aOpen[$day]["start"]; + } + $open_form .= '">aOpen[$day]["end"]; + } + + $open_form .= '">aOpen[$day]["notice"]; + } + $open_form .='">
    + +'; +echo $open_form; +?> + + diff --git a/static/views/presence_form.php b/static/views/presence_form.php new file mode 100644 index 0000000..6d3d1e1 --- /dev/null +++ b/static/views/presence_form.php @@ -0,0 +1,31 @@ + + + '. + + $this->oLang->texts['UID'].':
    '. + $this->oLang->texts['CHECKIN_AT'].':
    '. + $this->oLang->texts['CHECKOUT_AT'].':
    '; + $form .= ' + + + '; +echo $form; +?> diff --git a/static/views/start.php b/static/views/start.php new file mode 100644 index 0000000..b40188a --- /dev/null +++ b/static/views/start.php @@ -0,0 +1,10 @@ +oLang->texts['WELCOME']; +if ($_SESSION['admin']==0){ +$start .= $this->oLang->texts['USER_INSTRUCTION']; +} +else{ +$start .= $this->oLang->texts['ADMIN_INSTRUCTION']; +} +echo $start; +?> diff --git a/static/views/user_form.php b/static/views/user_form.php new file mode 100644 index 0000000..06c62b0 --- /dev/null +++ b/static/views/user_form.php @@ -0,0 +1,17 @@ +'; + $form .=' + + '; + $form .= 'Name:
    '. + $form .= 'E-Mail:
    '. + $form .= 'Signal:
    '. + $form .= 'SMS:
    '. + $form .= 'Telegram:
    '. + $form .= 'Threema:
    '. + $form .= ' + + '; +echo $form; +?>