예제 #1
0
 public function execute($dataContainer)
 {
     defined('_AEXEC') or die('Access denied');
     require_once 'AdminBooklistInterface.php';
     require_once 'AdminBooklistProcessing.php';
     parent::entryPoint($dataContainer);
     parent::moduleTemplatePathSet();
     $BookInterface = new AdminBooklistInterface($this->relPath);
     $BookProcessing = new AdminBooklistProcessing($this->_dataContainer, $BookInterface);
     $action_arr = array('show_booklist' => 1, 'add_book' => 4, 'del_book' => 6);
     if (isset($_GET['action'])) {
         $action = $_GET['action'];
         switch ($action) {
             case 2:
                 //edit a book
                 $this->editBook();
                 die;
                 if (isset($_POST['isbn_search'])) {
                     $bookID = $BookProcessing->getBookIdByISBN($_POST['isbn_search']);
                     $BookProcessing->editBook($bookID);
                 } else {
                     if (!isset($_POST['subject'], $_POST['class'], $_POST['title'], $_POST['author'], $_POST['publisher'], $_POST['isbn'], $_POST['price'], $_POST['bundle'])) {
                         $BookProcessing->editBook($_GET['ID']);
                     } else {
                         $BookProcessing->changeBook($_GET['ID'], $_POST['subject'], $_POST['class'], $_POST['title'], $_POST['author'], $_POST['publisher'], $_POST['isbn'], $_POST['price'], $_POST['bundle']);
                     }
                 }
                 break;
             case 3:
                 //delete an entry
                 $this->deleteBook();
                 break;
             case 4:
                 //add an entry
                 $this->addBook();
                 break;
             case 5:
                 //filter
                 $BookProcessing->ShowBooklist("search", $_POST['search']);
                 break;
             case 6:
                 //search an entry for deleting
                 $BookProcessing->ScanForDeleteEntry();
                 break;
             case 'showBooksFNY':
                 $BookProcessing->showBooksForNextYear();
                 break;
             case 'showBooksBT':
                 $BookProcessing->showBooksByTopic();
                 break;
                 break;
         }
     } else {
         $BookInterface->ShowSelectionFunctionality($action_arr);
     }
 }
예제 #2
0
 public function __construct($name, $display_name, $path)
 {
     parent::__construct($name, $display_name, $path);
 }
예제 #3
0
 protected function entryPoint($dataContainer)
 {
     parent::entryPoint($dataContainer);
     parent::moduleTemplatePathSet();
     $this->_loanHelper = new \Babesk\Schbas\Loan($dataContainer);
 }
예제 #4
0
 protected function entryPoint($dataContainer)
 {
     parent::entryPoint($dataContainer);
     $this->moduleTemplatePathSet();
 }
예제 #5
0
 protected function entryPoint($dataContainer)
 {
     parent::entryPoint($dataContainer);
     $this->initSmartyVariables();
 }
예제 #6
0
 public function __construct($name, $display_name, $headmod_menu)
 {
     parent::__construct($name, $display_name, $headmod_menu);
 }
예제 #7
0
 public function __construct($name, $display_name, $path)
 {
     parent::__construct($name, $display_name, $path);
     $this->_smartyPath = PATH_SMARTY_TPL . '/web' . $path;
 }
예제 #8
0
 public function execute($dataContainer)
 {
     defined('_AEXEC') or die('Access denied');
     parent::entryPoint($dataContainer);
     parent::moduleTemplatePathSet();
     require_once 'AdminSchbasSettingsInterface.php';
     $SchbasSettingsInterface = new AdminSchbasSettingsInterface($this->relPath);
     if (!isset($_GET['action'])) {
         $SchbasSettingsInterface->InitialMenu();
     } else {
         switch ($_GET['action']) {
             case 'editBankAccount':
                 $this->editBankAccount();
                 break;
             case '3':
                 $SchbasSettingsInterface->RetourSettings();
                 break;
             case '4':
                 TableMng::query(sprintf("UPDATE SystemGlobalSettings SET value = '%s' WHERE name = '%s'", $_POST['owner'] . "|" . $_POST['number'] . "|" . $_POST['blz'] . "|" . $_POST['institute'], 'bank_details'));
                 break;
             case '5':
                 $this->updateFee();
                 $SchbasSettingsInterface->LoanSettings($SchbasSettingsProcessing->getLoanSettings(), true);
                 break;
             case '6':
                 $claim_date = $_POST['claim_Year'] . "-" . $_POST['claim_Month'] . "-" . $_POST['claim_Day'];
                 $transfer_date = $_POST['transfer_Year'] . "-" . $_POST['transfer_Month'] . "-" . $_POST['transfer_Day'];
                 TableMng::query(sprintf("UPDATE SystemGlobalSettings SET value = '%s' WHERE name = '%s'", $claim_date, "schbasDeadlineClaim"));
                 TableMng::query(sprintf("UPDATE SystemGlobalSettings SET value = '%s' WHERE name = '%s'", $transfer_date, "schbasDeadlineTransfer"));
                 break;
             case '7':
                 $claimEnabled = TableMng::query(sprintf("SELECT value FROM SystemGlobalSettings WHERE name='isSchbasClaimEnabled'"));
                 $SchbasSettingsInterface->enableFormConfirm($claimEnabled[0]['value']);
                 break;
             case '8':
                 $SchbasSettingsInterface->TextSettings();
                 break;
             case '9':
                 if (isset($_POST['enable'])) {
                     TableMng::query(sprintf("UPDATE SystemGlobalSettings SET value = '%s' WHERE name = '%s'", 1, 'isSchbasClaimEnabled'));
                 } else {
                     TableMng::query(sprintf("UPDATE SystemGlobalSettings SET value = '%s' WHERE name = '%s'", 0, 'isSchbasClaimEnabled'));
                 }
                 $SchbasSettingsInterface->enableFormConfirmFin();
                 break;
             case '10':
                 $this->saveTexts();
                 break;
             case 'editCoverLetter':
                 $this->editCoverLetter();
                 break;
             case 'previewInfoDocs':
                 $this->previewInfoDocs();
                 break;
             case 'setReminder':
                 if (isset($_POST['templateID']) && isset($_POST['authorID'])) {
                     TableMng::query(sprintf("UPDATE SystemGlobalSettings SET value = '%s' WHERE name = '%s'", $_POST['templateID'], 'schbasReminderMessageID'));
                     TableMng::query(sprintf("UPDATE SystemGlobalSettings SET value = '%s' WHERE name = '%s'", $_POST['authorID'], 'schbasReminderAuthorID'));
                     $SchbasSettingsInterface->enableFormConfirmFin();
                     break;
                 } else {
                     $this->setReminder();
                 }
                 break;
             case 'fetchTextsAjax':
                 $this->fetchTextsAjax();
                 break;
         }
     }
 }