From e984491d54999bc652fdd13824d2b96ebb6c1420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Tue, 12 Nov 2019 12:33:51 +0100 Subject: [PATCH] Removed unnecessary views --- static/views/all_books.php | 37 --------------- static/views/all_books_itemized.php | 62 ------------------------ static/views/all_books_plain.php | 35 -------------- static/views/all_loans.php | 66 -------------------------- static/views/all_material.php | 33 ------------- static/views/all_material_itemized.php | 55 --------------------- static/views/all_present.php | 64 ------------------------- static/views/all_user.php | 62 ------------------------ static/views/book_form.php | 34 ------------- static/views/changed_language.php | 3 -- static/views/display_open.php | 20 -------- static/views/footer.php | 22 --------- static/views/header.php | 47 ------------------ static/views/loan_form.php | 45 ------------------ static/views/login_form.php | 18 ------- static/views/mail_stats.php | 7 --- static/views/material_form.php | 28 ----------- static/views/navigation.php | 29 ----------- static/views/open_form.php | 38 --------------- static/views/presence_form.php | 31 ------------ static/views/start.php | 10 ---- 21 files changed, 746 deletions(-) delete mode 100644 static/views/all_books.php delete mode 100644 static/views/all_books_itemized.php delete mode 100644 static/views/all_books_plain.php delete mode 100644 static/views/all_loans.php delete mode 100644 static/views/all_material.php delete mode 100644 static/views/all_material_itemized.php delete mode 100644 static/views/all_present.php delete mode 100644 static/views/all_user.php delete mode 100644 static/views/book_form.php delete mode 100644 static/views/changed_language.php delete mode 100644 static/views/display_open.php delete mode 100644 static/views/footer.php delete mode 100644 static/views/header.php delete mode 100644 static/views/loan_form.php delete mode 100644 static/views/login_form.php delete mode 100644 static/views/mail_stats.php delete mode 100644 static/views/material_form.php delete mode 100644 static/views/navigation.php delete mode 100644 static/views/open_form.php delete mode 100644 static/views/presence_form.php delete mode 100644 static/views/start.php diff --git a/static/views/all_books.php b/static/views/all_books.php deleted file mode 100644 index 5e751e4..0000000 --- a/static/views/all_books.php +++ /dev/null @@ -1,37 +0,0 @@ - - - - -"; - $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 deleted file mode 100644 index 6bc0556..0000000 --- a/static/views/all_books_itemized.php +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - '; -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 deleted file mode 100644 index 8e0bb96..0000000 --- a/static/views/all_books_plain.php +++ /dev/null @@ -1,35 +0,0 @@ - - - - -"; - $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 deleted file mode 100644 index 32e0684..0000000 --- a/static/views/all_loans.php +++ /dev/null @@ -1,66 +0,0 @@ -"; - $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 deleted file mode 100644 index dca082e..0000000 --- a/static/views/all_material.php +++ /dev/null @@ -1,33 +0,0 @@ - - - - -"; - $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 deleted file mode 100644 index 5f12975..0000000 --- a/static/views/all_material_itemized.php +++ /dev/null @@ -1,55 +0,0 @@ - - - - -"; - $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 deleted file mode 100644 index 03b86ec..0000000 --- a/static/views/all_present.php +++ /dev/null @@ -1,64 +0,0 @@ - - - - '; -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 deleted file mode 100644 index 00ac7bb..0000000 --- a/static/views/all_user.php +++ /dev/null @@ -1,62 +0,0 @@ - - - - '; - 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/book_form.php b/static/views/book_form.php deleted file mode 100644 index 1c5715d..0000000 --- a/static/views/book_form.php +++ /dev/null @@ -1,34 +0,0 @@ - - '. - $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 deleted file mode 100644 index b4cfdc1..0000000 --- a/static/views/changed_language.php +++ /dev/null @@ -1,3 +0,0 @@ -'.$this->oLang->texts['CHANGED_LANGUAGE_TO'].': '.$_SESSION['language'].''; -?> diff --git a/static/views/display_open.php b/static/views/display_open.php deleted file mode 100644 index 46d6a07..0000000 --- a/static/views/display_open.php +++ /dev/null @@ -1,20 +0,0 @@ - - '.$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 deleted file mode 100644 index 6259408..0000000 --- a/static/views/footer.php +++ /dev/null @@ -1,22 +0,0 @@ - -
- - - - - -

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

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

'.$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 deleted file mode 100644 index 7ad5633..0000000 --- a/static/views/loan_form.php +++ /dev/null @@ -1,45 +0,0 @@ - - '; -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 deleted file mode 100644 index 66f803b..0000000 --- a/static/views/login_form.php +++ /dev/null @@ -1,18 +0,0 @@ -

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


- -
- - -
-

-
-
- - -
'; -echo $login; - - - diff --git a/static/views/mail_stats.php b/static/views/mail_stats.php deleted file mode 100644 index f2d8e6f..0000000 --- a/static/views/mail_stats.php +++ /dev/null @@ -1,7 +0,0 @@ -'.$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 deleted file mode 100644 index d8a4426..0000000 --- a/static/views/material_form.php +++ /dev/null @@ -1,28 +0,0 @@ - - - '.$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 deleted file mode 100644 index c5c6658..0000000 --- a/static/views/navigation.php +++ /dev/null @@ -1,29 +0,0 @@ - -
  • '.$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 deleted file mode 100644 index 0d17251..0000000 --- a/static/views/open_form.php +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - '; - 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 deleted file mode 100644 index 6d3d1e1..0000000 --- a/static/views/presence_form.php +++ /dev/null @@ -1,31 +0,0 @@ - - - '. - - $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 deleted file mode 100644 index b40188a..0000000 --- a/static/views/start.php +++ /dev/null @@ -1,10 +0,0 @@ -oLang->texts['WELCOME']; -if ($_SESSION['admin']==0){ -$start .= $this->oLang->texts['USER_INSTRUCTION']; -} -else{ -$start .= $this->oLang->texts['ADMIN_INSTRUCTION']; -} -echo $start; -?>