public function getorderlastmonitexpirationAction() { $this->_helper->viewRenderer->setNoRender(); $this->_helper->getHelper("layout")->disableLayout(); $oModelOrderVJournal = new User_Model_VOrderJournal(); $oOrderExpirationLastMonit = $oModelOrderVJournal->getOrderLastMonitExpiration(); foreach ($oOrderExpirationLastMonit as $oRow) { $nOrderId = $oRow->id; $nOrderStatusId = $oRow->order_status_id; $oMail = new AppCms2_Controller_Plugin_Mail(); $oMail->sendBorrowerOrderStatusInfo($nOrderId, $nOrderStatusId); } exit; }
public function orderemailnotificationAction() { $oModelOrderEmailNotification = new User_Model_OrderEmailNotification(); $oModelVOrderEmailNotification = new User_Model_VOrderEmailNotification(); $oFormOrderEmailNotification = new User_Form_OrderEmailNotification(); $oModelVOrderJournal = new User_Model_VOrderJournal(); if ($this->_request->isPost()) { $aPostData = $this->_request->getPost(); if ($oFormOrderEmailNotification->isValid($aPostData)) { $nOrderEmailNotificationEditId = (int) $aPostData["order_email_notification_edit_id"]; foreach ($aPostData as $sKey => $sValue) { if (is_string($sValue)) { $aPostData[$sKey] = stripcslashes($sValue); } } if ($nOrderEmailNotificationEditId) { $oModelOrderEmailNotification->editRow($nOrderEmailNotificationEditId, $aPostData); } else { $oRow = $oModelVOrderEmailNotification->getOrderEmailNotification($aPostData["order_status_id_old"], $aPostData["order_status_id_new"]); if ($oRow) { $oModelOrderEmailNotification->editRow($oRow->id, $aPostData); } else { $oModelOrderEmailNotification->addRow($aPostData); } } $oFormOrderEmailNotification->clearForm(); } } $aAllOrderEmailNotification = $oModelVOrderEmailNotification->getAll(array("order_status_id_old"))->toArray(); $this->view->aColumnName = $oModelVOrderJournal->getColumnName(); $this->view->oFormOrderEmailNotification = $oFormOrderEmailNotification; $this->view->aAllOrderEmailNotification = $aAllOrderEmailNotification; }
public function gettabscountAction() { $this->_helper->viewRenderer->setNoRender(); $this->_helper->getHelper("layout")->disableLayout(); $aJson = null; $oModelOrderStatus = new User_Model_OrderStatus(); $oModelVOrderJournal = new User_Model_VOrderJournal(); if ($this->_request->isPost()) { $aAllStatuses = $oModelOrderStatus->getAll()->toArray(); if (count($aAllStatuses)) { foreach ($aAllStatuses as $nKey => $aValue) { $aAllStatuses[$nKey]["count"] = $oModelVOrderJournal->getUserCount(null, $aValue["id"]); } $aJson = $aAllStatuses; } } header("Content-type: application/json"); echo Zend_Json::encode($aJson); exit; }
public function printAction() { $this->_helper->viewRenderer->setNoRender(); $this->_helper->getHelper("layout")->disableLayout(); require_once "../library/zkk/AppCms2/tcpdf/tcpdf.php"; $nOrderId = (int) $this->_getParam("no"); if (is_numeric($nOrderId) && $nOrderId > 0 && in_array($this->_sRoleName, array("librarian", "administrator", "superadministrator"))) { $oModelOrderJournal = new User_Model_VOrderJournal(); $oModelOrderChangeLog = new User_Model_OrderChangeLog(); $oModelOrderJournalOrderChangeLog = new User_Model_OrderJournalOrderChangeLog(); $oOrderJournal = $oModelOrderJournal->getOne($nOrderId); $oPdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, "UTF-8", false); $oPdf->setFont("freesans"); $oPdf->setPrintHeader(false); $oPdf->addPage(); $oPdf->SetFontSize(12); $oPdf->writeHTMLCell(60, 10, "", 5, "<strong>{$oOrderJournal->call_id}</strong>", 0, 0, false, true, "L", true); $oPdf->writeHTMLCell(120, 10, "", "", "ZAKŁADKA ZAMÓWIENIA KOPII", 0, 1, false, true, "L", true); $oPdf->writeHTMLCell(95, 5, "", "", "Numer zamówienia: <strong>{$oOrderJournal->id}</strong>", 0, 0, false, true, "L", true); $oPdf->writeHTMLCell(75, 5, "", "", "Sygnatura: <strong>{$oOrderJournal->call_id}</strong><br />Sygnatura lokalna: <strong>{$oOrderJournal->csa_call_id}</strong><br />Kolekcja: <strong>{$oOrderJournal->collection}</strong>", 0, 1, false, true, "R", true); $oPdf->writeHTMLCell(190, 5, "", "", "", 0, 1, false, true, "L", true); $oPdf->writeHTMLCell(190, 5, "", "", "", 0, 1, false, true, "L", true); $oPdf->writeHTMLCell(95, 30, "", "", "Tytuł książki / czasopisma:<br /><strong>{$oOrderJournal->journal_title}</strong>", 1, 1, false, true, "L", true); $oPdf->writeHTMLCell(95, 5, "", "", "Rocznik: <strong>{$oOrderJournal->journal_year_publication}</strong>", 1, 1, false, true, "L", true); $oPdf->writeHTMLCell(95, 5, "", "", "Numeracja: <strong>{$oOrderJournal->journal_number}</strong>", 1, 1, false, true, "L", true); $oPdf->writeHTMLCell(95, 5, "", "", "Strony od: <strong>{$oOrderJournal->page_from}</strong>", 1, 1, false, true, "L", true); $oPdf->writeHTMLCell(95, 5, "", "", "Strony do: <strong>{$oOrderJournal->page_until}</strong>", 1, 1, false, true, "L", true); $oPdf->writeHTMLCell(95, 5, "", "", "Autor: <strong>{$oOrderJournal->article_author}</strong>", 1, 1, false, true, "L", true); $oPdf->writeHTMLCell(95, 30, "", "", "Nazwa rozdziału / artykułu:<br /><strong>{$oOrderJournal->article_title}</strong>", 1, 1, false, true, "L", true); $sCurrTime = date("Y-m-d H:i:s", time()); $sHtml1 = "\n Data zamówienia: <strong>{$sCurrTime}</strong><br /><br />\n Zamówione dla: <br /><strong>{$oOrderJournal->user_first_name} {$oOrderJournal->user_last_name}</strong><br /><br />\n Przekazać do: <br /><strong></strong>\n "; $oPdf->writeHTMLCell(95, 5, 110, 75, $sHtml1, 0, 1, false, true, "L", true); $oPdf->writeHTMLCell(60, 10, "", 150, "<strong>{$oOrderJournal->call_id}</strong>", 0, 0, false, true, "L", true); $oPdf->writeHTMLCell(120, 10, "", "", "ZAKŁADKA ZAMÓWIENIA KOPII", 0, 1, false, true, "L", true); $oPdf->writeHTMLCell(95, 5, "", "", "Numer zamówienia: <strong>{$oOrderJournal->id}</strong>", 0, 0, false, true, "L", true); $oPdf->writeHTMLCell(75, 5, "", "", "Sygnatura: <strong>{$oOrderJournal->call_id}</strong><br />Sygnatura lokalna: <strong>{$oOrderJournal->csa_call_id}</strong><br />Kolekcja: <strong>{$oOrderJournal->collection}</strong>", 0, 1, false, true, "R", true); $oPdf->writeHTMLCell(190, 5, "", "", "", 0, 1, false, true, "L", true); $oPdf->writeHTMLCell(190, 5, "", "", "", 0, 1, false, true, "L", true); $oPdf->writeHTMLCell(95, 30, "", "", "Tytuł książki / czasopisma:<br /><strong>{$oOrderJournal->journal_title}</strong>", 1, 1, false, true, "L", true); $oPdf->writeHTMLCell(95, 5, "", "", "Rocznik: <strong>{$oOrderJournal->journal_year_publication}</strong>", 1, 1, false, true, "L", true); $oPdf->writeHTMLCell(95, 5, "", "", "Numeracja: <strong>{$oOrderJournal->journal_number}</strong>", 1, 1, false, true, "L", true); $sHtml2 = "\n Data zamówienia: <strong>{$sCurrTime}</strong><br /><br />\n Zamówione dla: <br /><strong></strong>\n "; $oPdf->writeHTMLCell(95, 5, 110, 190, $sHtml2, 0, 1, false, true, "L", true); $oPdf->Output($nOrderId . ".pdf", "I"); $nOrderChangeLogId = $oModelOrderChangeLog->addRow(array("order_change_type_id" => 3, "user_id" => $this->_oAuth->getStorage()->read()->user_id, "date" => time())); $oModelOrderJournalOrderChangeLog->addRow(array("order_journal_id" => $nOrderId, "order_change_log_id" => $nOrderChangeLogId)); } exit; }