当前位置: 首页>>代码示例>>PHP>>正文


PHP Shineisp_Commons_Utilities::formatDateOut方法代码示例

本文整理汇总了PHP中Shineisp_Commons_Utilities::formatDateOut方法的典型用法代码示例。如果您正苦于以下问题:PHP Shineisp_Commons_Utilities::formatDateOut方法的具体用法?PHP Shineisp_Commons_Utilities::formatDateOut怎么用?PHP Shineisp_Commons_Utilities::formatDateOut使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Shineisp_Commons_Utilities的用法示例。


在下文中一共展示了Shineisp_Commons_Utilities::formatDateOut方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getById

 /**
  * Get a record by ID
  * @param $id
  * @return Doctrine Record
  */
 public static function getById($id)
 {
     $dq = Doctrine_Query::create()->from('Notes n')->where("n.note_id = ?", $id)->limit(1);
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $logged_user = $auth->getIdentity();
         $dq->leftJoin('n.AdminUser au')->whereIn("au.isp_id", $logged_user['isp_id']);
         $dq->addWhere("n.user_id = ?", $logged_user['user_id']);
     }
     $record = $dq->execute(array(), Doctrine_Core::HYDRATE_ARRAY);
     if (!empty($record)) {
         if (!empty($record[0]['expire'])) {
             $record[0]['expire'] = Shineisp_Commons_Utilities::formatDateOut($record[0]['expire']);
         }
     }
     return $record;
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:22,代码来源:Notes.php

示例2: Alerts

 public function Alerts()
 {
     $registry = Shineisp_Registry::getInstance();
     $currency = Shineisp_Registry::getInstance()->Zend_Currency;
     $translation = $registry->Zend_Translate;
     $alerts = array();
     $this->view->module = Zend_Controller_Front::getInstance()->getRequest()->getModuleName();
     $this->view->controller = Zend_Controller_Front::getInstance()->getRequest()->getControllerName();
     $this->view->action = Zend_Controller_Front::getInstance()->getRequest()->getActionName();
     $NS = new Zend_Session_Namespace('Default');
     if (!empty($NS->customer)) {
         $data = $NS->customer;
         $orders = Orders::find_all_not_paid_ordersbyCustomerID($data['customer_id']);
         $tasks_errors = DomainsTasks::GetIncompleteTask($data['customer_id']);
         if (count($tasks_errors) > 0) {
             foreach ($tasks_errors as $task) {
                 if (!empty($task['log'])) {
                     $alerts[] = array('message' => $task['domain'] . " - " . $translation->_($task['log']), $task['domain_id'], 'link' => '/domains/edit/id/' . $task['domain_id'], 'icon' => 'danger');
                 }
             }
         }
         if (count($orders) > 0) {
             foreach ($orders as $order) {
                 $order['grandtotal'] = $currency->toCurrency($order['grandtotal'], array('currency' => Settings::findbyParam('currency')));
                 if (!empty($order['invoice_id'])) {
                     $alerts[] = array('message' => $translation->_('The invoice %s of %s (%s) has been not payed yet, click here to show more details.', $order['Invoices']['number'], Shineisp_Commons_Utilities::formatDateOut($order['order_date']), $order['grandtotal']), 'link' => '/orders/edit/id/' . $order['order_id'], 'icon' => 'danger');
                 } else {
                     $alerts[] = array('message' => $translation->_('The order %s that you have requested the %s with total %s has not been paid yet, click here for more information.', $order['order_number'], Shineisp_Commons_Utilities::formatDateOut($order['order_date']), $order['grandtotal']), 'link' => '/orders/edit/id/' . $order['order_id'], 'icon' => 'danger');
                 }
             }
         }
         $this->view->alerts = $alerts;
         // Path of the template
         return $this->view->render('partials/alerts.phtml');
     }
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:36,代码来源:Alerts.php

示例3: processAction

 /**
  * processAction
  * Update the record previously selected
  * @return unknown_type
  */
 public function processAction()
 {
     $isp = Shineisp_Registry::get('ISP');
     $request = $this->getRequest();
     // Check if we have a POST request
     if (!$request->isPost()) {
         return $this->_helper->redirector('index');
     }
     // Get our form and validate it
     $form = $this->getForm('/admin/orders/process');
     if (!$form->isValid($request->getPost())) {
         // Invalid entries
         $this->view->form = $form;
         $this->view->title = $this->translator->translate("Order process");
         $this->view->description = $this->translator->translate("Check the information posted and then click on the save button.");
         return $this->_helper->viewRenderer('applicantform');
         // re-render the login form
     }
     // Get the values posted
     $params = $form->getValues();
     // Get the id
     $id = $this->getRequest()->getParam('order_id');
     // Save the message note
     if (!empty($params['note'])) {
         // If the order is commentable then go on
         if (Orders::IsCommentable($id)) {
             $order = Orders::getAllInfo($id, null, true);
             $link = Fastlinks::findlinks($id, $this->customer['customer_id'], 'orders');
             if (!empty($link[0]['code'])) {
                 $code = $link[0]['code'];
             } else {
                 $code = Fastlinks::CreateFastlink('orders', 'edit', json_encode(array('id' => $id)), 'orders', $id, $this->customer['customer_id']);
             }
             // Save the message in the database
             Messages::addMessage($params['note'], $this->customer['customer_id'], null, $id);
             $in_reply_to = md5($id);
             $placeholder['messagetype'] = $this->translator->translate('Order');
             $placeholders['subject'] = sprintf("%03s", $id) . " - " . Shineisp_Commons_Utilities::formatDateOut($order[0]['order_date']);
             $placeholders['fullname'] = $this->customer['firstname'] . " " . $this->customer['lastname'];
             $placeholders['orderid'] = $placeholders['subject'];
             $placeholders['conditions'] = Settings::findbyParam('conditions');
             $placeholders['url'] = "http://" . $_SERVER['HTTP_HOST'] . "/index/link/id/" . $code;
             // Send a message to the customer
             Shineisp_Commons_Utilities::sendEmailTemplate($order[0]['Customers']['email'], 'order_message', $placeholders, $in_reply_to, null, null, $isp, $order[0]['Customers']['language_id']);
             $placeholders['url'] = "http://" . $_SERVER['HTTP_HOST'] . "/admin/login/link/id/{$code}/keypass/" . Shineisp_Commons_Hasher::hash_string($isp->email);
             $placeholders['message'] = $params['note'];
             // Send a message to the administrator
             Shineisp_Commons_Utilities::sendEmailTemplate($isp->email, 'order_message_admin', $placeholders, $in_reply_to);
         }
     }
     $this->_helper->redirector('index', 'orders', 'default', array('mex' => 'The requested task has been completed successfully', 'status' => 'success'));
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:57,代码来源:OrdersController.php

示例4: editAction

 /**
  * editAction
  * Get a record and populate the application form 
  * @return unknown_type
  */
 public function editAction()
 {
     $form = $this->getForm('/admin/purchases/process');
     $id = $this->getRequest()->getParam('id');
     // Create the buttons in the edit form
     $this->view->buttons = array(array("url" => "#", "label" => $this->translator->translate('Save'), "params" => array('css' => null, 'id' => 'submit')), array("url" => "/admin/purchases/list", "label" => $this->translator->translate('List'), "params" => array('css' => null, 'id' => 'submit')), array("url" => "/admin/purchases/new/", "label" => $this->translator->translate('New'), "params" => array('css' => null)));
     $this->view->title = $this->translator->translate("Purchases Edit");
     $this->view->description = $this->translator->translate("Here you can edit the selected purchase invoice.");
     if (!empty($id) && is_numeric($id)) {
         $rs = $this->purchases->find($id)->toArray();
         if (!empty($rs)) {
             $rs['creationdate'] = Shineisp_Commons_Utilities::formatDateOut($rs['creationdate']);
             $rs['expiringdate'] = Shineisp_Commons_Utilities::formatDateOut($rs['expiringdate']);
             $rs['paymentdate'] = Shineisp_Commons_Utilities::formatDateOut($rs['paymentdate']);
             $this->view->title = $this->translator->translate("Purchase invoice") . " #" . $rs['number'] . " - " . $rs['creationdate'];
             $this->view->id = $id;
             $this->view->attachment = $rs['document'];
             $form->populate($rs);
             $this->view->buttons[] = array("url" => "/admin/purchases/confirm/id/{$id}", "label" => $this->translator->translate('Delete'), "params" => array('css' => null));
         }
     }
     $this->view->mex = urldecode($this->getRequest()->getParam('mex'));
     $this->view->mexstatus = $this->getRequest()->getParam('status');
     $this->view->form = $form;
     $this->render('applicantform');
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:31,代码来源:PurchasesController.php

示例5: editAction

 /**
  * editAction
  * Get a record and populate the application form 
  * @return unknown_type
  */
 public function editAction()
 {
     $form = $this->getForm('/admin/invoices/process');
     $id = $this->getRequest()->getParam('id');
     if (!empty($id) && is_numeric($id)) {
         $rs = $this->invoices->find($id)->toArray();
         if (!empty($rs)) {
             $rs['invoice_date'] = Shineisp_Commons_Utilities::formatDateOut($rs['invoice_date']);
             $parent = Customers::find($rs['customer_id']);
             //if customer comes from reseller
             if ($parent['parent_id']) {
                 $rs['customer_parent_id'] = $parent['parent_id'];
             } else {
                 $rs['customer_parent_id'] = $rs['customer_id'];
             }
             // Create the buttons in the edit form
             $this->view->buttons = array(array("url" => "#", "label" => $this->translator->translate('Save'), "params" => array('css' => null, 'id' => 'submit')), array("url" => "/admin/invoices/confirm/id/{$id}", "label" => $this->translator->translate('Delete'), "params" => array('css' => null)), array("url" => "/admin/invoices/list", "label" => $this->translator->translate('List'), "params" => array('css' => null, 'id' => 'submit')), array("url" => "/admin/invoices/new/", "label" => $this->translator->translate('New'), "params" => array('css' => null)));
             // Check if the order has been invoiced
             $this->view->buttons[] = array("url" => "/admin/orders/sendinvoice/id/{$id}", "label" => $this->translator->translate('Email invoice'), "params" => array('css' => null));
             $this->view->buttons[] = array("url" => "/admin/invoices/print/id/{$id}", "label" => $this->translator->translate('Print invoice'), "params" => array('css' => null));
             $this->view->buttons[] = array("url" => "/admin/invoices/confirmoverwrite/id/{$id}", "label" => $this->translator->translate('Overwrite invoice'), "params" => array('css' => null));
             $this->view->buttons[] = array("url" => "/admin/orders/edit/id/" . $rs['order_id'], "label" => $this->translator->translate('Order'), "params" => array('css' => null));
             $form->populate($rs);
         }
     }
     $this->view->title = $this->translator->translate("Invoice Edit");
     $this->view->description = $this->translator->translate("Here you can edit the selected order.");
     $this->view->mex = urldecode($this->getRequest()->getParam('mex'));
     $this->view->mexstatus = $this->getRequest()->getParam('status');
     $this->view->form = $form;
     $this->render('applicantform');
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:37,代码来源:InvoicesController.php

示例6: editAction

 /**
  * editAction
  * Get a record and populate the application form 
  * @return unknown_type
  */
 public function editAction()
 {
     $form = $this->getForm('/admin/ordersitems/process');
     $id = $this->getRequest()->getParam('id');
     // Create the buttons in the edit form
     $this->view->buttons = array(array("url" => "#", "label" => $this->translator->translate('Save'), "params" => array('css' => null, 'id' => 'submit')), array("url" => "/admin/ordersitems/list", "label" => $this->translator->translate('List'), "params" => array('css' => null, 'id' => 'submit')), array("url" => "/admin/ordersitems/new/", "label" => $this->translator->translate('New'), "params" => array('css' => null)));
     if (!empty($id) && is_numeric($id)) {
         $rs = OrdersItems::getAllInfo($id);
         if (!empty($rs)) {
             // Load the domains attached to the order
             $form->getElement('domains_selected')->setMultiOptions(OrdersItemsDomains::getList($id));
             $rs['date_start'] = Shineisp_Commons_Utilities::formatDateOut($rs['date_start']);
             $rs['date_end'] = !empty($rs['date_end']) ? Shineisp_Commons_Utilities::formatDateOut($rs['date_end']) : "";
             $form->populate($rs);
             // send the order id in the view
             $this->view->order_id = $rs['order_id'];
             // send the customer id in the view
             $this->view->customer_id = $rs['Orders']['customer_id'];
             // Check if the product is a hosting plan
             $this->view->isHosting = !empty($rs['Products']['type']) && $rs['Products']['type'] == "hosting" ? true : false;
             // Create the buttons in the edit form
             $this->view->buttons[] = array("url" => "/admin/ordersitems/confirm/id/{$id}", "label" => $this->translator->translate('Delete'), "params" => array('css' => null));
             $this->view->buttons[] = array("url" => "/admin/services/edit/id/{$id}", "label" => $this->translator->translate('Service'), "params" => array('css' => null));
             $this->view->buttons[] = array("url" => "/admin/orders/edit/id/" . $rs['order_id'], "label" => $this->translator->translate('Order'), "params" => array('css' => null));
             $this->view->buttons[] = array("url" => "/admin/customers/edit/id/" . $rs['Orders']['customer_id'], "label" => $this->translator->translate('Customers'), "params" => array('css' => null));
         } else {
             $this->_helper->redirector('list', 'orders', 'admin', array('mex' => $this->translator->translate('Unable to find the order item selected.'), 'status' => 'danger'));
         }
     } else {
         $this->_helper->redirector('list', 'orders', 'admin', array('mex' => $this->translator->translate('Unable to find the order item selected.'), 'status' => 'danger'));
     }
     $this->view->title = $this->translator->translate("Service edit");
     $this->view->description = $this->translator->translate("Here you can edit the service selected");
     $this->view->form = $form;
     $this->render('applicantform');
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:41,代码来源:OrdersitemsController.php

示例7: pdf

 /**
  * print the order
  *
  * @param unknown_type $invoiceid
  */
 public static function pdf($order_id, $show = true, $force = false, $path = "/documents/orders/")
 {
     $taxpercent = "";
     $currency = Shineisp_Registry::getInstance()->Zend_Currency;
     if (!is_numeric($order_id)) {
         return false;
     }
     $pdf = new Shineisp_Commons_PdfOrder();
     $translator = Shineisp_Registry::getInstance()->Zend_Translate;
     $payments = Payments::findbyorderid($order_id, null, true);
     $order = self::getAllInfo($order_id, null, true);
     // Set the name of the file
     $filename = $order[0]['order_date'] . " - " . $order[0]['order_id'] . ".pdf";
     $database['header']['label'] = $translator->translate('Order No.') . " " . $order[0]['order_number'] . " - " . Shineisp_Commons_Utilities::formatDateOut($order[0]['order_date']);
     $database['columns'][] = array("value" => $translator->translate("SKU"), "size" => 40);
     $database['columns'][] = array("value" => $translator->translate("Description"));
     $database['columns'][] = array("value" => $translator->translate("Qty"), "size" => 30, "align" => "center");
     $database['columns'][] = array("value" => $translator->translate("Unit"), "size" => 30);
     $database['columns'][] = array("value" => $translator->translate("Tax Free Price"), "size" => 60, "align" => "right");
     $database['columns'][] = array("value" => $translator->translate("Discount"), "size" => 60, "align" => "right");
     $database['columns'][] = array("value" => $translator->translate("Setup fee"), "size" => 60, "align" => "right");
     $database['columns'][] = array("value" => $translator->translate("Tax %"), "size" => 40, "align" => "center");
     $database['columns'][] = array("value" => $translator->translate("Total"), "size" => 50, "align" => "right");
     if (isset($order[0])) {
         $orderinfo['order_number'] = !empty($order[0]['order_number']) ? $order[0]['order_number'] : self::formatOrderId($order[0]['order_id']);
         $orderinfo['invoice_id'] = "";
         $orderinfo['date'] = Shineisp_Commons_Utilities::formatDateOut($order[0]['order_date']);
         //if customer comes from reseller
         if ($order[0]['Customers']['parent_id']) {
             $isTaxFree = Customers::isTaxFree($order[0]['Customers']['parent_id']);
             $isVATFree = Customers::isVATFree($order[0]['Customers']['parent_id']);
             $invoice_dest = Customers::getAllInfo($order[0]['Customers']['parent_id'], 'c.*, a.*');
             $orderinfo['customer']['customer_id'] = $invoice_dest['customer_id'];
             $orderinfo['customer']['company'] = $invoice_dest['company'];
             $orderinfo['customer']['firstname'] = $invoice_dest['firstname'];
             $orderinfo['customer']['lastname'] = $invoice_dest['lastname'];
             $orderinfo['customer']['vat'] = $invoice_dest['vat'];
             $orderinfo['customer']['taxpayernumber'] = $invoice_dest['taxpayernumber'];
             $orderinfo['customer']['email'] = $invoice_dest['email'];
             if (isset($invoice_dest['Addresses'][0])) {
                 $orderinfo['customer']['address'] = $invoice_dest['Addresses'][0]['address'];
                 $orderinfo['customer']['city'] = $invoice_dest['Addresses'][0]['city'];
                 $orderinfo['customer']['code'] = $invoice_dest['Addresses'][0]['code'];
                 $orderinfo['customer']['country'] = !empty($invoice_dest['Addresses'][0]['Countries']['name']) ? $invoice_dest['Addresses'][0]['Countries']['name'] : "";
             }
         } else {
             $isTaxFree = Customers::isTaxFree($order[0]['Customers']['customer_id']);
             $isVATFree = Customers::isVATFree($order[0]['Customers']['customer_id']);
             $orderinfo['customer']['customer_id'] = $order[0]['Customers']['customer_id'];
             $orderinfo['customer']['company'] = $order[0]['Customers']['company'];
             $orderinfo['customer']['firstname'] = $order[0]['Customers']['firstname'];
             $orderinfo['customer']['lastname'] = $order[0]['Customers']['lastname'];
             $orderinfo['customer']['vat'] = $order[0]['Customers']['vat'];
             $orderinfo['customer']['taxpayernumber'] = $order[0]['Customers']['taxpayernumber'];
             $orderinfo['customer']['email'] = $order[0]['Customers']['email'];
             if (isset($order[0]['Customers']['Addresses'][0])) {
                 $orderinfo['customer']['address'] = $order[0]['Customers']['Addresses'][0]['address'];
                 $orderinfo['customer']['city'] = $order[0]['Customers']['Addresses'][0]['city'];
                 $orderinfo['customer']['code'] = $order[0]['Customers']['Addresses'][0]['code'];
                 $orderinfo['customer']['country'] = $order[0]['Customers']['Addresses'][0]['Countries']['name'];
             }
         }
         if (count($payments) > 0) {
             $orderinfo['payment_date'] = Shineisp_Commons_Utilities::formatDateOut($payments[0]['paymentdate']);
             $orderinfo['payment_mode'] = $payments[0]['Banks']['name'];
             $orderinfo['payment_description'] = $payments[0]['description'];
             $orderinfo['payment_transaction_id'] = $payments[0]['reference'];
         }
         $orderinfo['invoice_id'] = "";
         $orderinfo['company']['name'] = $order[0]['Isp']['company'];
         $orderinfo['company']['manager'] = $order[0]['Isp']['manager'];
         $orderinfo['company']['vat'] = $order[0]['Isp']['vatnumber'];
         $orderinfo['company']['bankname'] = $order[0]['Isp']['bankname'];
         $orderinfo['company']['iban'] = $order[0]['Isp']['iban'];
         $orderinfo['company']['bic'] = $order[0]['Isp']['bic'];
         $orderinfo['company']['address'] = $order[0]['Isp']['address'];
         $orderinfo['company']['zip'] = $order[0]['Isp']['zip'];
         $orderinfo['company']['city'] = $order[0]['Isp']['city'];
         $orderinfo['company']['country'] = $order[0]['Isp']['country'];
         $orderinfo['company']['telephone'] = $order[0]['Isp']['telephone'];
         $orderinfo['company']['fax'] = $order[0]['Isp']['fax'];
         $orderinfo['company']['website'] = $order[0]['Isp']['website'];
         $orderinfo['company']['email'] = $order[0]['Isp']['email'];
         $orderinfo['company']['slogan'] = $order[0]['Isp']['slogan'];
         $orderinfo['company']['custom1'] = $order[0]['Isp']['custom1'];
         $orderinfo['company']['custom2'] = $order[0]['Isp']['custom2'];
         $orderinfo['company']['custom3'] = $order[0]['Isp']['custom3'];
         if ($order[0]['status_id'] == Statuses::id("tobepaid", "orders")) {
             // To be payed
             $orderinfo['ribbon']['text'] = $translator->translate("To be Paid");
             $orderinfo['ribbon']['color'] = "#D60000";
             $orderinfo['ribbon']['border-color'] = "#BD0000";
         } elseif ($order[0]['status_id'] == Statuses::id("complete", "orders")) {
             // Complete
             $orderinfo['ribbon']['text'] = $translator->translate("Paid");
//.........这里部分代码省略.........
开发者ID:kokkez,项目名称:shineisp,代码行数:101,代码来源:Orders.php

示例8: editAction

 /**
  * Get a record and populate the application form 
  * 
  */
 public function editAction()
 {
     $form = $this->getForm('/admin/creditnotes/process');
     $id = $this->getRequest()->getParam('id');
     $this->view->title = $this->translator->translate("Credit Note Edit");
     $this->view->description = $this->translator->translate("Here you can edit the selected credit notes.");
     // Create the buttons in the edit form
     $this->view->buttons = array(array("url" => "#", "label" => $this->translator->translate('Save'), "params" => array('css' => null, 'id' => 'submit')), array("url" => "/admin/creditnotes/confirm/id/{$id}", "label" => $this->translator->translate('Delete'), "params" => array('css' => null)), array("url" => "/admin/creditnotes/list", "label" => $this->translator->translate('List'), "params" => array('css' => null, 'id' => 'submit')), array("url" => "/admin/creditnotes/new/", "label" => $this->translator->translate('New'), "params" => array('css' => null)));
     if (!empty($id) && is_numeric($id)) {
         $rs = $this->creditnotes->get_by_id($id);
         if (!empty($rs)) {
             $rs['creationdate'] = Shineisp_Commons_Utilities::formatDateOut($rs['creationdate']);
             $this->view->title = $this->translator->translate("Credit Note") . " #" . $rs['number'] . " - " . $rs['creationdate'];
             $this->view->id = $id;
             $form->populate($rs);
         }
         // Check if the order has been invoiced
         $invoice_id = $rs['invoice_id'];
         if ($invoice_id) {
             $this->view->buttons[] = array("url" => "/admin/creditnotes/printpdf/id/{$id}", "label" => $this->translator->translate('Print'), "params" => array('css' => null));
             $this->view->buttons[] = array("url" => "/admin/invoices/edit/id/{$invoice_id}", "label" => $this->translator->translate('Invoice'), "params" => array('css' => null));
         }
     }
     $this->view->mex = urldecode($this->getRequest()->getParam('mex'));
     $this->view->mexstatus = $this->getRequest()->getParam('status');
     $this->view->items = $this->itemsGrid();
     $this->view->form = $form;
     $this->render('applicantform');
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:33,代码来源:CreditnotesController.php

示例9: paymentsGrid

 /**
  * Creation of the payment transaction grid 
  * @return multitype:boolean multitype:string
  */
 private function paymentsGrid()
 {
     $currency = Shineisp_Registry::getInstance()->Zend_Currency;
     $myrec = array();
     $requestId = $this->getParam('id');
     if (!empty($requestId) && is_numeric($requestId)) {
         $rs = Payments::findbyorderid($requestId, 'payment_id, paymentdate, b.name as bank, description, reference, confirmed, income, outcome', true);
         if (isset($rs)) {
             $i = 0;
             // Format some data
             foreach ($rs as $record) {
                 $myrec[$i]['id'] = $record['payment_id'];
                 // Set the date format
                 $myrec[$i]['payment_date'] = Shineisp_Commons_Utilities::formatDateOut($record['paymentdate']);
                 $myrec[$i]['description'] = $record['description'];
                 $myrec[$i]['reference'] = $record['reference'];
                 $myrec[$i]['confirmed'] = $record['confirmed'] ? $this->translator->translate('Yes') : $this->translator->translate('No');
                 $myrec[$i]['type'] = $record['bank'];
                 // Checking the currency set in the configuration
                 $myrec[$i]['income'] = $currency->toCurrency($record['income'], array('currency' => Settings::findbyParam('currency')));
                 $myrec[$i]['outcome'] = $currency->toCurrency($record['outcome'], array('currency' => Settings::findbyParam('currency')));
                 $i++;
             }
             return array('records' => $myrec, 'pager' => true, 'edit' => array('controller' => 'payments', 'action' => 'edit'), 'delete' => array('controller' => 'orders', 'action' => 'deletepayment'));
         }
     }
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:31,代码来源:OrdersController.php

示例10: editAction

 /**
  * editAction
  * Get a record and populate the application form 
  * @return unknown_type
  */
 public function editAction()
 {
     $form = $this->getForm('/admin/domains/process');
     $this->view->title = $this->translator->translate("Domain Edit");
     $this->view->description = $this->translator->translate("Here you can edit your own domain parameters.");
     $id = $this->getRequest()->getParam('id');
     if (!empty($id) && is_numeric($id)) {
         // Create the buttons in the edit form
         $this->view->buttons = array(array("url" => "#", "label" => $this->translator->translate('Save'), "params" => array('css' => null, 'id' => 'submit')), array("url" => "/admin/domains/confirm/id/{$id}", "label" => $this->translator->translate('Delete'), "params" => array('css' => null)), array("url" => "/admin/domains/list", "label" => $this->translator->translate('List'), "params" => array('css' => null)), array("url" => "/admin/domains/new/", "label" => $this->translator->translate('New'), "params" => array('css' => null)), array("url" => "/admin/domains/newevent/id/{$id}", "label" => $this->translator->translate('Calendar Event'), "params" => array('css' => null)));
         try {
             $rs = $this->domains->find($id, null);
             if (!empty($rs[0])) {
                 $rs[0]['creation_date'] = Shineisp_Commons_Utilities::formatDateOut($rs[0]['creation_date']);
                 $rs[0]['expiring_date'] = Shineisp_Commons_Utilities::formatDateOut($rs[0]['expiring_date']);
                 $rs[0]['status_id'] = $rs[0]['Statuses']['status_id'];
                 // Domains NicHandles
                 $rs[0]['owner'] = DomainsNichandle::getProfile($id);
                 $rs[0]['admin'] = DomainsNichandle::getProfile($id, "admin");
                 $rs[0]['tech'] = DomainsNichandle::getProfile($id, "tech");
                 $rs[0]['billing'] = DomainsNichandle::getProfile($id, "billing");
                 $form->populate($rs[0]);
                 if (!empty($rs[0]['DomainsTlds']['WhoisServers'])) {
                     $this->view->title = $rs[0]['domain'] . "." . $rs[0]['DomainsTlds']['WhoisServers']['tld'];
                     $this->view->titlelink = "http://" . $rs[0]['domain'] . "." . $rs[0]['DomainsTlds']['WhoisServers']['tld'];
                     $this->view->icon = "fa fa-globe";
                 }
                 $this->view->owner_datagrid = domains::ownerGrid($id);
                 $this->view->actions = Registrars::getActions($rs[0]['registrars_id']);
             }
         } catch (Exception $e) {
             die($e->getMessage());
         }
         $this->view->id = $id;
         // Get all the messages attached to the domain
         $this->view->messages = Messages::getbyDomainId($id);
     }
     $this->view->mex = $this->getRequest()->getParam('mex');
     $this->view->mexstatus = $this->getRequest()->getParam('status');
     $this->view->dns_datagrid = Domains::dnsGrid();
     $this->view->form = $form;
     $this->view->services_datagrid = array('records' => domains::Services($id), 'edit' => array('controller' => 'services', 'action' => 'edit'));
     $this->view->orders_datagrid = array('records' => domains::Orders($id), 'edit' => array('controller' => 'orders', 'action' => 'edit'));
     $this->render('applicantform');
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:49,代码来源:DomainsController.php

示例11: editAction

 /**
  * editAction
  * Get a record and populate the application form 
  * @return unknown_type
  */
 public function editAction()
 {
     $form = $this->getForm('/admin/customers/process');
     $id = $this->getRequest()->getParam('id');
     $this->view->title = $this->translator->translate("Customer edit");
     $this->view->description = $this->translator->translate("Here you can edit the customer details.");
     // Create the buttons in the edit form
     $this->view->buttons = array(array("url" => "#", "label" => $this->translator->translate('Save'), "params" => array('css' => null, 'id' => 'submit')), array("url" => "/admin/customers/list", "label" => $this->translator->translate('List'), "params" => array('css' => null)), array("url" => "/admin/customers/new/", "label" => $this->translator->translate('New'), "params" => array('css' => null)));
     if (!empty($id) && is_numeric($id)) {
         $rs = $this->customers->getAllInfo($id);
         if (!empty($rs)) {
             $rs += CustomAttributes::getElementsValues($id, 'customers');
             $rs['birthdate'] = Shineisp_Commons_Utilities::formatDateOut($rs['birthdate']);
             $this->view->id = $id;
             $form->populate($rs);
             if (!empty($rs['company'])) {
                 $this->view->title = $rs['company'] . " - " . $rs['firstname'] . " " . $rs['lastname'];
             } else {
                 $this->view->title = $rs['firstname'] . " " . $rs['lastname'];
             }
             $this->view->buttons[] = array("url" => "/admin/orders/new", "label" => $this->translator->translate('New Order'), "params" => array('css' => null));
             $this->view->buttons[] = array("url" => "/admin/customers/confirm/id/{$id}", "label" => $this->translator->translate('Delete'), "params" => array('css' => null));
             $this->view->buttons[] = array("url" => "/default/index/fastlogin/id/" . Shineisp_Commons_Hasher::hash_string($rs['email']), "label" => $this->translator->translate('Public profile'), "params" => array('css' => null));
         }
     }
     $this->view->mex = $this->getRequest()->getParam('mex');
     $this->view->mexstatus = $this->getRequest()->getParam('status');
     $this->view->editmode = true;
     $this->view->addressesdatagrid = $this->addressesGrid();
     $this->view->contactsdatagrid = $this->contactsGrid();
     $this->view->filesdatagrid = $this->filesGrid();
     $this->view->domainsdatagrid = $this->domainsGrid();
     $this->view->servicesdatagrid = $this->servicesGrid();
     $this->view->ordersdatagrid = $this->ordersGrid();
     $this->view->tickets = $this->ticketsGrid();
     $this->view->invoicesdatagrid = $this->invoicesGrid();
     $this->view->sentmailsdatagrid = $this->sentmailsGrid();
     $this->view->form = $form;
     $this->render('applicantform');
 }
开发者ID:moay,项目名称:shineisp,代码行数:45,代码来源:CustomersController.php

示例12: checkTickets

 /**
  * This batch has been created in order to remind customers
  * that one or more tickets are still open.
  */
 public static function checkTickets()
 {
     $isp = Isp::getActiveISP();
     $tickets = Tickets::getWaitingReply();
     // Get the template from the main email template folder
     $retval = Shineisp_Commons_Utilities::getEmailTemplate('ticket_waitreply');
     foreach ($tickets as $ticket) {
         $customer = $ticket['Customers'];
         // Get the fastlink attached
         $link_exist = Fastlinks::findlinks($ticket['ticket_id'], $customer['customer_id'], 'tickets');
         if (count($link_exist) > 0) {
             $fastlink = $link_exist[0]['code'];
         } else {
             $fastlink = Fastlinks::CreateFastlink('tickets', 'edit', json_encode(array('id' => $ticket['ticket_id'])), 'tickets', $ticket['ticket_id'], $customer['customer_id']);
         }
         $customer_url = "http://" . $_SERVER['HTTP_HOST'] . "/index/link/id/{$fastlink}";
         if ($retval) {
             $subject = $retval['subject'];
             $Template = nl2br($retval['template']);
             $subject = str_replace("[subject]", $ticket['subject'], $subject);
             $Template = str_replace("[subject]", $ticket['subject'], $Template);
             $Template = str_replace("[lastname]", $customer['lastname'], $Template);
             $Template = str_replace("[issue_number]", $ticket['ticket_id'], $Template);
             $Template = str_replace("[date_open]", Shineisp_Commons_Utilities::formatDateOut($ticket['date_open']), $Template);
             $Template = str_replace("[link]", $customer_url, $Template);
             $Template = str_replace("[signature]", $isp['company'] . "<br/>" . $isp['website'], $Template);
             Shineisp_Commons_Utilities::SendEmail($isp['email'], Contacts::getEmails($customer['customer_id']), null, $subject, $Template, true);
         }
     }
     return true;
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:35,代码来源:Tickets.php

示例13: formatSearchvalue

 public static function formatSearchvalue($value)
 {
     // If is a numeric
     if (is_numeric($value)) {
         return $value;
     }
     // If is a date
     if (Shineisp_Commons_Utilities::isDate($value)) {
         return Shineisp_Commons_Utilities::formatDateOut($value);
     }
     $value = addslashes($value);
     return $value;
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:13,代码来源:Utilities.php

示例14: getList

 public static function getList($empty = false)
 {
     $items = array();
     $arrTypes = Doctrine::getTable('PurchaseInvoices')->findAll();
     if ($empty) {
         $items[] = "";
     }
     foreach ($arrTypes->getData() as $c) {
         $items[$c['purchase_id']] = $z = sprintf("%03d", $c['number']) . " - " . Shineisp_Commons_Utilities::formatDateOut($c['creationdate']);
     }
     return $items;
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:12,代码来源:PurchaseInvoices.php

示例15: editAction

 /**
  * editAction
  * Get a record and populate the application form 
  * @return unknown_type
  */
 public function editAction()
 {
     $form = $this->getForm('/admin/payments/process');
     $id = $this->getRequest()->getParam('id');
     // Create the buttons in the edit form
     $this->view->buttons = array(array("url" => "#", "label" => $this->translator->translate('Save'), "params" => array('css' => null, 'id' => 'submit')), array("url" => "/admin/payments/list", "label" => $this->translator->translate('List'), "params" => array('css' => null, 'id' => 'submit')), array("url" => "/admin/payments/new/", "label" => $this->translator->translate('New'), "params" => array('css' => null)));
     if (!empty($id) && is_numeric($id)) {
         $rs = $this->payments->getAllInfo($id, null, true);
         if (!empty($rs[0])) {
             $rs[0]['paymentdate'] = Shineisp_Commons_Utilities::formatDateOut($rs[0]['paymentdate']);
             $this->view->buttons[] = array("url" => "/admin/orders/edit/id/" . $rs[0]['order_id'], "label" => $this->translator->translate('Order'), "params" => array('css' => null));
             $this->view->buttons[] = array("url" => "/admin/customers/edit/id/" . $rs[0]['customer_id'], "label" => $this->translator->translate('Customer'), "params" => array('css' => null));
             $form->populate($rs[0]);
         }
         $this->view->buttons[] = array("url" => "/admin/payments/confirm/id/{$id}", "label" => $this->translator->translate('Delete'), "params" => array('css' => null));
     }
     $this->view->title = $this->translator->translate("Payment Transaction Details");
     $this->view->description = $this->translator->translate("Here you can edit the Payment Transaction information parameters.");
     $this->view->mex = $this->getRequest()->getParam('mex');
     $this->view->mexstatus = $this->getRequest()->getParam('status');
     $this->view->form = $form;
     $this->render('applicantform');
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:28,代码来源:PaymentsController.php


注:本文中的Shineisp_Commons_Utilities::formatDateOut方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。