function display($tpl = null)
 {
     $this->state = $this->get('State');
     $from_date = $this->state->get('filter.from_date');
     if (empty($from_date)) {
         $this->state->set('filter.from_date', JHtml::date('now', 'Y-m-d'));
     }
     $to_date = $this->state->get('filter.to_date');
     if (empty($to_date)) {
         $this->state->set('filter.to_date', JHtml::date('now', 'Y-m-d'));
     }
     $order_status = $this->state->get('filter.order_status');
     $this->state->set('filter.order_status', 'CONFIRMED');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $model = new BookProModelTransports();
     $this->airport = $model->getGroupAirportList();
     $this->dest_list = $model->dest_list;
     $this->route_list = $model->getRouteList();
     $this->total_order = $this->get('TotalBooking');
     $this->total_pass = $this->get('Total');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode('<br />', $errors));
         return false;
     }
     // Set the toolbar
     $this->addToolBar();
     // Display the template
     parent::display($tpl);
 }
 /**
  *  Displays the list view
  * @param string $tpl
  */
 public function display($tpl = null)
 {
     $tour_model = new BookProModelTours();
     $this->state = $this->get('State');
     $input = JFactory::getApplication()->input;
     $this->tours = $tour_model->getItemByIds();
     $tour_id = $this->state->get('filter.tour_id');
     if (empty($tour_id)) {
         $this->state->set('filter.tour_id', $this->tours[0]->id);
     }
     $from_date = $this->state->get('filter.from_date');
     if (empty($from_date)) {
         $this->state->set('filter.from_date', JHtml::date('now', 'Y-m-d'));
     }
     $to_date = $this->state->get('filter.to_date');
     if (empty($to_date)) {
         $this->state->set('filter.to_date', JHtml::date('now', 'Y-m-d'));
     }
     $this->state->set('filter.order_status', 'CONFIRMED');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->total_order = $this->get('TotalBooking');
     $this->total_pass = $this->get('Total');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     $this->addToolbar();
     parent::display($tpl);
 }
 /**
  * Print passenger manifest to pdf
  */
 function exportpdf()
 {
     AImporter::model('passengers');
     $app = JFactory::getApplication();
     $input = $app->input;
     AImporter::helper('pdf', 'date');
     $model = new BookproModelpassengers(array('ignore_request' => 0));
     if ($app->isAdmin()) {
         $ticket_view = $this->getView('passengers', 'html', 'BookProView');
     } else {
         $ticket_view = $this->getView('AgentPassengers', 'html', 'BookProView');
         $ticket_view->is_admin = 1;
     }
     $ticket_view->setModel($model, true);
     $ticket_view->setLayout('report');
     ob_start();
     $ticket_view->display();
     $pdf = ob_get_contents();
     ob_end_clean();
     $order = new JObject();
     $order->name = 'Tour_report' . '_export_time_' . JHtml::date('now', 'Y-m-d-H-i-s');
     $order->fontsize = 7;
     PrintPdfHelper::printTicket($pdf, $order, 'P');
     return;
 }
Example #4
0
 /**
  * Display the view
  *
  * @access	public
  */
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $state = $this->get('State');
     $item = $this->get('Item');
     $form = $this->get('Form');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     JHTML::stylesheet('administrator/components/com_xmap/css/xmap.css');
     // Convert dates from UTC
     $offset = $app->getCfg('offset');
     if (intval($item->created)) {
         $item->created = JHtml::date($item->created, '%Y-%m-%d %H-%M-%S', $offset);
     }
     $form->bind($item);
     $this->assignRef('state', $state);
     $this->assignRef('item', $item);
     $this->assignRef('form', $form);
     $this->_setToolbar();
     parent::display($tpl);
     JRequest::setVar('hidemainmenu', true);
 }
Example #5
0
 /**
  * Returns date/time in short format. i.e. 6m, 6h, 6d, 6w, 6m, 6y etc
  * @param unknown $date
  * @return Ambigous <string, string, mixed, multitype:>|Ambigous <string, string, mixed>
  */
 public static function getShortDate($date)
 {
     if (empty($date) || $date == '0000-00-00 00:00:00') {
         return JText::_('LBL_NA');
     }
     jimport('joomla.utilities.date');
     $user = JFactory::getUser();
     // Given time
     $date = new JDate(JHtml::date($date, 'Y-m-d H:i:s'));
     $compareTo = new JDate(JHtml::date('now', 'Y-m-d H:i:s'));
     $diff = $compareTo->toUnix() - $date->toUnix();
     $diff = abs($diff);
     $dayDiff = floor($diff / 86400);
     if ($dayDiff == 0) {
         if ($diff < 120) {
             return '1m';
         } elseif ($diff < 3600) {
             return floor($diff / 60) . 'm';
         } else {
             return floor($diff / 3600) . 'h';
         }
     } elseif ($dayDiff < 7) {
         return $dayDiff . 'd';
     } elseif ($dayDiff < 7 * 6) {
         return ceil($dayDiff / 7) . 'w';
     } elseif ($dayDiff < 365) {
         return ceil($dayDiff / (365 / 12)) . 'm';
     } else {
         return round($dayDiff / 365) . 'y';
     }
 }
Example #6
0
   /**
    * Method to get the field input markup.
    *
    * @return	string	The field input markup.
    * @since	1.6
    */
   protected function getInput()
   {
       // Initialize some field attributes.
       $format = $this->element['format'] ? (string) $this->element['format'] : 'd.m.Y H:i';
       $readonly = $this->element['readonly'] ? 'readonly="readonly"' : null;
       if ($this->value && $this->value !== '0000-00-00 00:00:00') {
           $this->value = JHtml::date($this->value, $format);
       } else {
           $this->value = null;
       }
       $jformat = str_replace('d', '%d', $format);
       $jformat = str_replace('m', '%m', $jformat);
       $jformat = str_replace('Y', '%Y', $jformat);
       $jformat = str_replace('H', '%H', $jformat);
       $jformat = str_replace('i', '%M', $jformat);
       $time = JHtml::date('now', 'Hi');
       $html = '<input name="' . $this->name . '" id="' . $this->id . '" value="' . $this->value . '"' . $readonly . ' /><img onmouseover="this.style.cursor=\'pointer\'" src="media/com_smfaq/images/calendar_icon.png" alt="Calendar" id="cal-' . $this->element['name'] . '" />';
       $html .= '<script type="text/javascript">
  		Calendar.setup({
        trigger    : "cal-' . $this->element['name'] . '",
        inputField : "' . $this->id . '",
        dateFormat : "' . $jformat . '",
        onSelect : function() { this.hide() },
        showTime: true,
        time: "' . $time . '",
   	});
	</script>';
       return $html;
   }
 function check()
 {
     if (empty($this->id)) {
         $this->created = JHtml::date('now', 'Y-m-d H:i:s');
     }
     return true;
 }
Example #8
0
 public function setData($order)
 {
     $form_data = $this->app->data->create();
     $billto = array($order->elements->get('billing.name'), $order->elements->get('billing.street1'), $order->elements->get('billing.street2') ? $order->elements->get('billing.street2') : null, $order->elements->get('billing.city') . ', ' . $order->elements->get('billing.state') . ' ' . $order->elements->get('billing.postalCode'), $order->elements->get('billing.phoneNumber') . '  ' . $order->elements->get('billing.altNumber'), $order->elements->get('email'));
     $form_data->set('billto', $billto);
     if ($order->elements->get('shipping_method') != 'LP') {
         $shipto = array($order->elements->get('shipping.name'), $order->elements->get('shipping.street1'), $order->elements->get('shipping.street2'), $order->elements->get('shipping.city') . ', ' . $order->elements->get('shipping.state') . ' ' . $order->elements->get('shipping.postalCode'), $order->elements->get('shipping.phoneNumber') . ' ' . $order->elements->get('shipping.altNumber'));
         $form_data->set('shipto', $shipto);
     }
     $item_array = array();
     foreach ($order->elements->get('items.', array()) as $item) {
         $options = array();
         foreach ($item->options as $option) {
             $options[] = $option['name'] . ': ' . $option['text'];
         }
         $item_array[] = array('item_description' => array(array('format' => 'item-name', 'text' => $item->name), array('format' => 'item-options', 'text' => implode("\n", $options))), 'qty' => array('text' => $item->qty), 'price' => array('text' => $item->getTotal('base')));
     }
     $form_data->set('items', $item_array);
     $form_data->set('id', $order->id);
     $form_data->set('created', JHtml::date($order->created, JText::_('DATE_STORE_RECEIPT')));
     $form_data->set('salesperson', $order->getCreator());
     $form_data->set('payment_info', $order->params->get('payment.creditcard.card_name') . ' ' . $order->params->get('payment.creditcard.cardNumber'));
     $form_data->set('delivery_method', JText::_(($ship = $order->elements->get('shipping_method')) ? 'SHIPPING_METHOD_' . $ship : ''));
     $form_data->set('terms', JText::_(($terms = $order->params->get('terms')) ? 'ACCOUNT_TERMS_' . $terms : ''));
     $form_data->set('subtotal', $order->getSubtotal());
     $form_data->set('tax_total', $order->getTaxTotal());
     $form_data->set('ship_total', $order->getShippingTotal());
     $form_data->set('total', $order->getTotal());
     return parent::setData($form_data);
 }
Example #9
0
 /**
  * Display the view
  *
  * @access	public
  */
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $this->state = $this->get('State');
     $this->item = $this->get('Item');
     $this->form = $this->get('Form');
     $version = new JVersion();
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     JHTML::stylesheet('administrator/components/com_xmap/css/xmap.css');
     // Convert dates from UTC
     $offset = $app->getCfg('offset');
     if (intval($this->item->created)) {
         $this->item->created = JHtml::date($this->item->created, '%Y-%m-%d %H-%M-%S', $offset);
     }
     $this->_setToolbar();
     if (version_compare($version->getShortVersion(), '3.0.0', '<')) {
         $tpl = 'legacy';
     }
     parent::display($tpl);
     JRequest::setVar('hidemainmenu', true);
 }
Example #10
0
 static function calendar($isodate, $name)
 {
     $cfg = BidsHelperTools::getConfig();
     $result = JHTML::_('calendar', $isodate, $name, $name, BidsHelperDateTime::dateFormatConversion($cfg->date_format));
     if ($isodate) {
         //ISODATES and JHtml::_('calendar') doesn't take kindly all formats
         $result = str_replace(' value="' . htmlspecialchars($isodate, ENT_COMPAT, 'UTF-8') . '"', ' value="' . htmlspecialchars(JHtml::date($isodate, $cfg->date_format, false), ENT_COMPAT, 'UTF-8') . '"', $result);
     }
     return $result;
 }
Example #11
0
 public static function showDate($date = null, $date_format = null)
 {
     if (is_null($date)) {
         $date = JFactory::getDate()->toSql();
     }
     if (is_null($date_format)) {
         $date_format = RSMembershipHelper::getConfig('date_format');
     }
     return JHtml::date($date, $date_format);
 }
Example #12
0
 /**
  * Method to display the view.
  *
  * @param   string  $tpl  A template file to load. [optional]
  *
  * @return  mixed  JError object on failure, void on success.
  *
  * @since   2.5
  */
 public function display($tpl = null)
 {
     // Get the application
     $app = JFactory::getApplication();
     // Adjust the list limit to the feed limit.
     $app->input->set('limit', $app->getCfg('feed_limit'));
     // Get view data.
     $state = $this->get('State');
     $params = $state->get('params');
     $query = $this->get('Query');
     $results = $this->get('Results');
     // Push out the query data.
     JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
     $suggested = JHtml::_('query.suggested', $query);
     $explained = JHtml::_('query.explained', $query);
     // Set the document title.
     $title = $params->get('page_title', '');
     if (empty($title)) {
         $title = $app->getCfg('sitename');
     } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) {
         $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title);
     } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) {
         $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename'));
     }
     $this->document->setTitle($title);
     // Configure the document description.
     if (!empty($explained)) {
         $this->document->setDescription(html_entity_decode(strip_tags($explained), ENT_QUOTES, 'UTF-8'));
     }
     // Set the document link.
     $this->document->link = JRoute::_($query->toURI());
     // If we don't have any results, we are done.
     if (empty($results)) {
         return;
     }
     // Convert the results to feed entries.
     foreach ($results as $result) {
         // Convert the result to a feed entry.
         $item = new JFeedItem();
         $item->title = $result->title;
         $item->link = JRoute::_($result->route);
         $item->description = $result->description;
         $item->date = intval($result->start_date) ? JHtml::date($result->start_date, 'l d F Y') : $result->indexdate;
         // Get the taxonomy data.
         $taxonomy = $result->getTaxonomy();
         // Add the category to the feed if available.
         if (isset($taxonomy['Category'])) {
             $node = array_pop($taxonomy['Category']);
             $item->category = $node->title;
         }
         // Loads item info into rss array.
         $this->document->addItem($item);
     }
 }
 function register()
 {
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     $document = JFactory::getDocument();
     //$mainframe->enqueueMessage(JText::_('PredictionEntry Task -> '.$this->getTask()),'');
     JRequest::checkToken() or jexit(JText::_('COM_JOOMLEAGUE_PRED_INVALID_TOKEN_REFUSED'));
     $msg = '';
     $link = '';
     $post = JRequest::get('post');
     $predictionGameID = JRequest::getVar('prediction_id', '', 'post', 'int');
     $joomlaUserID = JRequest::getVar('user_id', '', 'post', 'int');
     $approved = JRequest::getVar('approved', 0, '', 'int');
     $model = $this->getModel('predictionentry');
     $user =& JFactory::getUser();
     $isMember = $model->checkPredictionMembership();
     if ($user->id != $joomlaUserID) {
         $msg .= JText::_('COM_JOOMLEAGUE_PRED_ENTRY_CONTROLLER_ERROR_1');
         $link = JFactory::getURI()->toString();
     } else {
         if ($isMember) {
             $msg .= JText::_('COM_JOOMLEAGUE_PRED_ENTRY_CONTROLLER_ERROR_4');
             $link = JFactory::getURI()->toString();
         } else {
             //$post['registerDate'] = JHTML::date(time(),'Y-m-d h:i:s');
             $post['registerDate'] = JHtml::date($input = 'now', 'Y-m-d h:i:s', false);
             //if (!$model->store($post,'PredictionEntry'))
             if (!$model->store($post)) {
                 $msg .= JText::_('COM_JOOMLEAGUE_PRED_ENTRY_CONTROLLER_ERROR_5');
                 $link = JFactory::getURI()->toString();
             } else {
                 $cids = array();
                 $cids[] = $model->getDbo()->insertid();
                 JArrayHelper::toInteger($cids);
                 $msg .= JText::_('COM_JOOMLEAGUE_PRED_ENTRY_CONTROLLER_MSG_2');
                 if ($model->sendMembershipConfirmation($cids)) {
                     $msg .= ' - ';
                     $msg .= JText::_('COM_JOOMLEAGUE_PRED_ENTRY_CONTROLLER_MSG_3');
                 } else {
                     $msg .= ' - ';
                     $msg .= JText::_('COM_JOOMLEAGUE_PRED_ENTRY_CONTROLLER_ERROR_6');
                 }
                 $params = array('option' => 'com_joomleague', 'view' => 'predictionentry', 'prediction_id' => $predictionGameID, 's' => '1');
                 $query = JoomleagueHelperRoute::buildQuery($params);
                 $link = JRoute::_('index.php?' . $query, false);
             }
         }
     }
     echo '<br /><br />';
     echo '#' . $msg . '#<br />';
     $this->setRedirect($link, $msg);
 }
Example #14
0
 static function editEndDate(&$auction, $isAdmin = false)
 {
     $cfg = BidsHelperTools::getConfig();
     $dateFormat = BidsHelperDateTime::dateFormatConvert2JHTML(false);
     $fType = CustomFieldsFactory::getFieldType('date');
     $calendarFormat = $fType->dateFormatConversion($dateFormat);
     $dateFormat = BidsHelperDateTime::dateFormatConvert2JHTML(false);
     if (!$cfg->bid_opt_enable_date) {
         if ($auction->id && $auction->published) {
             $html = JHTML::date(JFactory::getDate($auction->end_date)->toUnix(), $dateFormat);
         } else {
             $tooltipMsg = array();
             if (intval($cfg->bid_opt_default_period) > 0) {
                 $tooltipMsg[] = JText::_('COM_BIDS_AUTO_END_DATE_TOOLTIP_1') . ' ' . $cfg->bid_opt_default_period . ' ' . JText::_('COM_BIDS_DAYS');
             }
             if ($cfg->bid_opt_allow_proxy && intval($cfg->bid_opt_proxy_default_period) > 0) {
                 $tooltipMsg[] = JText::_('COM_BIDS_AUTO_END_DATE_TOOLTIP_2') . ' ' . $cfg->bid_opt_proxy_default_period . ' ' . JText::_('COM_BIDS_DAYS');
             }
             if (($cfg->bid_opt_global_enable_bin || $cfg->bid_opt_enable_bin_only) && intval($cfg->bid_opt_bin_default_period) > 0) {
                 $tooltipMsg[] = JText::_('COM_BIDS_AUTO_END_DATE_TOOLTIP_3') . ' ' . $cfg->bid_opt_bin_default_period . ' ' . JText::_('COM_BIDS_DAYS');
             }
             if ($cfg->bid_opt_global_enable_reserve_price && intval($cfg->bid_opt_reserve_price_default_period) > 0) {
                 $tooltipMsg[] = JText::_('COM_BIDS_AUTO_END_DATE_TOOLTIP_4') . ' ' . $cfg->bid_opt_reserve_price_default_period . ' ' . JText::_('COM_BIDS_DAYS');
             }
             $html = count($tooltipMsg) ? JHtml::tooltip(implode('<br />', $tooltipMsg)) : '-';
         }
     } else {
         if ($auction->published && !$isAdmin) {
             $html = JHTML::date(JFactory::getDate($auction->end_date)->toUnix(), $dateFormat);
         } else {
             $attribs = array('class' => 'inputbox required validate-start-date');
             $date = $auction->end_date ? $auction->end_date : '';
             $d = $date ? $date : '';
             if (preg_match('/^[0-9][0-9]:[0-9][0-9]$/', $date)) {
                 //if it's only end hour
                 $d = "";
             }
             $html = JHTML::calendar($d, 'end_date', 'end_date', $calendarFormat, $attribs);
             if ($d) {
                 $html = str_replace(' value="' . htmlspecialchars($d, ENT_COMPAT, 'UTF-8') . '"', ' value="' . htmlspecialchars(JHtml::date($d, $cfg->bid_opt_date_format, false), ENT_COMPAT, 'UTF-8') . '"', $html);
             }
             if ($cfg->bid_opt_enable_hour) {
                 $endHours = $auction->end_date ? JHTML::date($auction->end_date, 'H') : '00';
                 $endMinutes = $auction->end_date ? JHTML::date($auction->end_date, 'i') : '00';
                 $html .= '&nbsp;<input name="end_hour" size="1" value="' . $endHours . '" maxlength="2" class="inputbox required" onblur="bidCheckHours(this)" /> :
                     <input name="end_minutes" size="1" value="' . $endMinutes . '" maxlength="2" class="inputbox required" onblur="bidCheckMinutes(this)" />';
             }
             $html .= '&nbsp;' . JHtml::image(JUri::root() . 'components/com_bids/images/requiredfield.gif', 'Required');
         }
     }
     return $html;
 }
 public function store($data = null)
 {
     $data = $data ? $data : JRequest::getVar('jform', array(), 'post', 'array');
     $row = JTable::getInstance($data['table'], 'Table');
     $date = date("Y-m-d H:i:s");
     // Bind the form fields to the table
     if (!$row->bind($data)) {
         return false;
     }
     $row->modified = $date;
     if (!$row->created) {
         $row->created = $date;
     }
     if ($data['table'] == 'ddcaccounts') {
         if ($this->data['alias'] == null) {
             $row->alias = JFilterOutput::stringURLSafe($data['account_name']);
         }
     }
     if ($data['table'] == 'ddcgoals') {
         if ($data['alias'] == null) {
             $row->alias = JFilterOutput::stringURLSafe($data['title']);
         }
         $row->target_date = JHtml::date($data['target_date'], "Y-m-d");
         if ($data['end_date'] != null) {
             $row->end_date = JHtml::date($data['end_date'], "Y-m-d");
         }
     }
     if ($data['table'] == 'ddcaccount_types') {
         if ($data['alias'] == null) {
             $row->alias = JFilterOutput::stringURLSafe($data['account_type']);
         }
     }
     if ($data['table'] == "ddcbalances") {
         $row->balance = $data['balance_dr'] - $data['balance_cr'];
         $row->record_date = JHtml::date($data['record_date'], "Y-m-d");
     }
     // Make sure the record is valid
     if (!$row->check()) {
         return false;
     }
     if (!$row->store()) {
         return false;
     }
     return $row;
 }
Example #16
0
 function backup()
 {
     $sqlFileName = 'bids.sql';
     $imagesDir = AUCTION_PICTURES_PATH;
     jimport('joomla.filesystem.archive');
     jimport('joomla.filesystem.file');
     if (!is_writable(AUCTION_BACKUPS_PATH)) {
         JError::raiseWarning(500, '<strong style="color:red;">' . AUCTION_BACKUPS_PATH . ' not writable!</strong>');
         return false;
     }
     $sqlData = $this->backupSQL();
     $imagesData = $this->backupImages();
     $backupFile = AUCTION_BACKUPS_PATH . DS . 'Auction_Factory_BKP_' . JHtml::date('now', 'd-M-Y_H-i-s') . '.zip';
     $aFilesData = array_merge($sqlData, $imagesData);
     $zip = JArchive::getAdapter('zip');
     //the second parameter for this function is very odd
     //as you can see above, each "file" entity needs to be an array with 2 keys: 'name' and 'data'
     $zip->create($backupFile, $aFilesData);
     return $backupFile;
 }
 function save($apply = true)
 {
     AImporter::table('transportdayoff');
     $db = JFactory::getDbo();
     //delete old dayoff
     $query = $db->getQuery(true);
     $query->delete('#__bookpro_transport_dayoff')->where('date < ' . JHtml::date('now', 'Y-m-d'));
     $db->setQuery($query);
     $db->execute();
     $data = $this->input->get('params', array(), 'array');
     $params = array();
     foreach ($data as $rate_id => $param) {
         foreach ($param as $key => $array) {
             foreach ($array as $i => $val) {
                 if ($val) {
                     $params[$rate_id][$i][$key] = $val;
                 } else {
                     if (isset($params[$rate_id][$i])) {
                         unset($params[$rate_id][$i]);
                     }
                 }
             }
         }
     }
     $data = array('id' => $this->input->getInt('id'), 'date' => $this->input->getString('date'), 'params' => json_encode($params));
     $table = new TableTransportdayoff($db);
     if ($table->save($data)) {
         JFactory::getApplication()->enqueueMessage('Update successful');
     } else {
         JFactory::getApplication()->enqueueMessage('Update failed');
     }
     if ($apply) {
         $this->setRedirect(JRoute::_('index.php?option=com_bookpro&view=transportdayoff&layout=edit&date=' . $this->input->getString('date') . '&id=' . $table->id, false));
     } else {
         $this->setRedirect(JRoute::_('index.php?option=com_bookpro&view=transportdayoffs'));
     }
     return;
 }
Example #18
0
 public function display($tpl = null)
 {
     if (!$this->is_admin) {
         $model = new BookproModelpassengers();
         $this->setModel($model, true);
     }
     $this->state = $this->get('State');
     $tour_model = new BookProModelTours();
     $this->tours = $tour_model->getItemByIds();
     $tour_id = $this->state->get('filter.tour_id');
     if (empty($tour_id)) {
         $this->state->set('filter.tour_id', $this->tours[0]->id);
     }
     $from_date = $this->state->get('filter.from_date');
     if (empty($from_date)) {
         $this->state->set('filter.from_date', JHtml::date('now', 'Y-m-d'));
     }
     $to_date = $this->state->get('filter.to_date');
     if (empty($to_date)) {
         $this->state->set('filter.to_date', JHtml::date('now', 'Y-m-d'));
     }
     $this->state->set('filter.order_status', 'CONFIRMED');
     $this->state->set('list.limit', null);
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->total_order = $this->get('TotalBooking');
     $this->total_pass = $this->get('Total');
     $this->agent = JBFactory::getAccount();
     $this->authorise = $this->agent->authorise;
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     JHtml::_('formbehavior.chosen', 'select');
     parent::display($tpl);
 }
"/>
		<button id="btn-submit" class="btn pull-right"><?php 
echo JText::_('COM_DDC_UPDATE');
?>
</button>
		</form>
	</div>
</div>
<div class="row-fluid">
	<div class="col-xs-12" id="activeAccount">
		<span style="padding-top:5px;font-weight:400;" class="pull-right">
			<?php 
echo JText::_('COM_DDC_TARGET_DATE') . ": ";
?>
<span style="font-weight:400;color:rgb(100,100,100)" class="pull-right"><?php 
echo JHtml::date($this->item->target_date, "d/m/Y");
?>
</span><br/>
			<?php 
echo JText::_('COM_DDC_TARGET') . ": ";
?>
<span style="font-weight:400;color:rgb(100,100,100)" class="pull-right"><?php 
echo "&pound; " . number_format($this->item->target_balance, 2);
?>
</span><br/>
			<?php 
echo JText::_('COM_DDC_BALANCE') . ": ";
?>
<span class="pull-right"><?php 
echo "&pound; " . number_format($this->item->balance, 2);
?>
Example #20
0
    }
    ?>
				</td>
				<td class="center">
					<?php 
    echo $this->escape($item->access_level);
    ?>
				</td>
				<td class="center">
					<?php 
    echo $this->escape($item->author_name);
    ?>
				</td>
				<td class="center">
					<?php 
    echo JHtml::date($item->created, '%Y.%m.%d');
    ?>
				</td>
				<td class="center">
					<?php 
    echo (int) $item->hits;
    ?>
				</td>
				<td class="center">
					<?php 
    echo (int) $item->id;
    ?>
				</td>
			</tr>
			<?php 
}
Example #21
0
			</tr>
			<?php 
}
if ($this->person->deathday != '0000-00-00') {
    ?>
			<tr>
				<td class="">
				<span class="label">
					<?php 
    echo JText::_('COM_JOOMLEAGUE_PERSON_DEATHDAY');
    ?>
				</span>
				</td>
				<td class="data">
					<?php 
    $deathdateStr = JHtml::date($this->person->deathday . ' UTC', JText::_('COM_JOOMLEAGUE_GLOBAL_DEATHDATE'), JoomleagueHelper::getTimezone($this->project, $this->overallconfig));
    echo '&dagger; ' . $deathdateStr;
    ?>
				</td>
			</tr>
			<?php 
}
if ($this->person->address != "" && $this->config['show_person_address'] == 1 && $this->isContactDataVisible) {
    ?>
			<tr>
				<td class=""><span class="label"><?php 
    echo JText::_('COM_JOOMLEAGUE_PERSON_ADDRESS');
    ?>
</span></td>
				<td class="data"><?php 
    echo Countries::convertAddressString('', $this->person->address, $this->person->state, $this->person->zipcode, $this->person->location, $this->person->address_country, 'COM_JOOMLEAGUE_PERSON_ADDRESS_FORM');
Example #22
0
            } else {
                $color = 'highlight';
            }
            ?>

				<?php 
            // Loop through all reviews
            if (!empty($this->rating_reviews) && $review->published) {
                $reviews_published++;
                ?>
					<div class="<?php 
                echo $color;
                ?>
">
						<span class="date"><?php 
                echo JHtml::date($review->created_on, vmText::_('DATE_FORMAT_LC'));
                ?>
</span>
						<span class="vote"><?php 
                echo $stars[(int) $review->review_rating];
                ?>
</span>
						<blockquote><?php 
                echo $review->comment;
                ?>
</blockquote>
						<span class="bold"><?php 
                echo $review->customer;
                ?>
</span>
					</div>
Example #23
0
    ?>
"><?php 
    echo $document->title;
    ?>
</a>
			</td>
			<td><?php 
    echo $document->updated;
    ?>
</td>
			<td><?php 
    echo $document->version;
    ?>
</td>
			<td><?php 
    echo JHtml::date($document->created, 'Y-m-d H:i:s');
    ?>
</td>
			<td class="center"><?php 
    echo JHtml::_('grid.boolean', $document->id, $document->published);
    ?>
</td>
		</tr>
	<?php 
}
?>
	</tbody>
</table>
<!--  !Last updated -->

<!--  top download -->
Example #24
0
</h4>
				<?php 
        } else {
            ?>
					<h4><?php 
            echo JText::sprintf('COM_USERS_NOTE_N_SUBJECT', (int) $item->id, JText::_('COM_USERS_EMPTY_SUBJECT'));
            ?>
</h4>
				<?php 
        }
        ?>
			</div>

			<div class="fltlft utitle">
				<?php 
        echo JHtml::date($item->created_time, 'D d M Y H:i');
        ?>
			</div>

			<?php 
        $category_image = $item->cparams->get('image');
        ?>

			<?php 
        if ($item->catid && isset($category_image)) {
            ?>
			<div class="fltlft utitle">
				<?php 
            echo JHtml::_('users.image', $category_image);
            ?>
			</div>
 function getDays($d, $f)
 {
     //update default value, from 1.2.2 to 1.2.3
     if ($f == 'd-m-Y') {
         $f = '%d-%m-%Y';
     }
     // détermine le mois et l'année
     $ex_data = explode('-', $d);
     $month = $ex_data[1];
     $year = $ex_data[0];
     $jour = $ex_data[2];
     // Génération du Calendrier
     $days = date("d", mktime(0, 0, 0, $month + 1, 0, $year));
     $list = array();
     //
     // Setting function of the visitor Time Zone
     //
     $today = time();
     $config = JFactory::getConfig();
     if (version_compare(JVERSION, '3.0', 'ge')) {
         $joomla_offset = $config->get('offset');
     } else {
         $joomla_offset = $config->getValue('config.offset');
     }
     $opt_TimeZone = '';
     $displayDatesTimezone = '0';
     if (isset($this->setTodayTimezone)) {
         $opt_TimeZone = $this->setTodayTimezone;
     }
     //		if (isset($this->displayDatesTimezone)) $displayDatesTimezone = $this->displayDatesTimezone;
     $gmt_today = gmdate('Y-m-d H:i:s', $today);
     $today_timestamp = strtotime($gmt_today);
     $GMT_timezone = 'Etc/UTC';
     if ($opt_TimeZone == 'SITE') {
         // Joomla Server Time Zone
         $visitor_timezone = $joomla_offset;
         $offset = $this->get_timezone_offset($GMT_timezone, $visitor_timezone);
         $visitor_today = date('Y-m-d H:i:s', $today_timestamp + $offset);
         $UTCsite = $offset / 3600;
         if ($UTCsite > 0) {
             $UTCsite = '+' . $UTCsite;
         }
         if ($displayDatesTimezone == '1') {
             echo '<small>' . JHtml::date('now', 'Y-m-d H:i:s', true) . ' UTC' . $UTCsite . '</small><br />';
         }
     } elseif ($opt_TimeZone == 'UTC') {
         // UTC Time Zone
         $offset = 0;
         $visitor_today = date('Y-m-d H:i:s', $today_timestamp + $offset);
         $UTC = $offset / 3600;
         if ($UTC > 0) {
             $UTC = '+' . $UTC;
         }
         if ($displayDatesTimezone == '1') {
             echo '<small>' . gmdate('Y-m-d H:i:s', $today) . ' UTC' . $UTC . '</small><br />';
         }
     } else {
         $visitor_today = date('Y-m-d H:i:s', $today_timestamp);
     }
     $date_today = str_replace(' ', '-', $visitor_today);
     $date_today = str_replace(':', '-', $date_today);
     $ex_data = explode('-', $date_today);
     $v_month = $ex_data[1];
     $v_year = $ex_data[0];
     $v_day = $ex_data[2];
     $v_hours = $ex_data[3];
     $v_minutes = $ex_data[4];
     for ($a = 1; $a <= $days; $a++) {
         if ($a == $v_day && $month == $v_month && $year == $v_year) {
             $classDay = 'style_Today';
         } else {
             $classDay = 'style_Day';
         }
         $datejour = date('Y-m-d', mktime(0, 0, 0, $month, $a, $year));
         $list[$a]['date'] = date('Y-m-d H:i', mktime(0, 0, 0, $month, $a, $year));
         $list[$a]['dateFormat'] = strftime($f, mktime(0, 0, 0, $month, $a, $year));
         $list[$a]['dateTitle'] = $this->formatDate($datejour);
         $list[$a]['week'] = date('N', mktime(0, 0, 0, $month, $a, $year));
         $list[$a]['day'] = "<div class='" . $classDay . "'>" . $a . "</div>";
         // Set cal_date
         $list[$a]['this_day'] = substr($list[$a]['date'], 0, 10);
         // Added in 2.1.2 (change in NAME_day.php)
         $list[$a]['ifToday'] = $classDay;
         $list[$a]['Days'] = $a;
         //
         $list[$a]['month'] = $month;
         $list[$a]['year'] = $year;
         $list[$a]['events'] = array();
         //			$list[$a]['plus'] = "$stamp->events[1]['cat_color']";
     }
     return $list;
 }
Example #26
0
$ictip_ordering = $events_ordering_first . '-' . $events_ordering_second;
$header_text = $params->get('header_text', '');
$padding = $params->get('padding', '0');
// Module
$cal = new modiCcalendarHelper();
$data = $cal->getStamp($params);
$url_date = JRequest::getVar('date');
$iccaldate = JRequest::getVar('iccaldate');
//function GetNbDays ($month = null, $year = null)
//{
//	$month = ($month) ? $month : date('m');
//	$year = ($year) ? $year : date('Y');
//	return intval(date("t",strtotime("$year-$month-01")));
//}
// First day of the current month
$this_month = $firstMonth ? date("Y-m-d", strtotime("+1 month", strtotime($firstMonth))) : JHtml::date('now', 'Y-m-01', null);
//			: date('Y-m') . '-01';
if (isset($iccaldate) && !empty($iccaldate)) {
    // This should be the first day of a month
    $date_start = date('Y-m-01', strtotime($iccaldate));
    //	$date_start = JHtml::date($iccaldate, 'Y-m-01', null);
} else {
    $date_start = $this_month;
}
$nav = $cal->getNav($date_start, $modid);
// Set first day
if ($firstday == NULL) {
    $firstday = '1';
}
if ($firstday == '0') {
    $na = 7;
Example #27
0
						<div class="acd-content">
							<?php 
            if ($params->get('item_description_display') == 1) {
                ?>
							<div class="acd-description">
								<?php 
                echo SjContentAccordionHelper::truncate($item->introtext, $params->get('item_description_max_characters', 200));
                ?>
							</div>
							<?php 
            }
            ?>
							<ul class="acd-info ">
								
								<li><span class="acd-date"><?php 
            echo JHtml::date($item->created, 'd.m.Y');
            ?>
</span></li>
								<li><span class="acd-hits"><?php 
            echo $item->hits;
            ?>
</span></li>
							</ul>
							<?php 
            if ($params->get('item_readmore_display') == 1) {
                ?>
							<div class="acd-readmore">
								<a href="<?php 
                echo $item->link;
                ?>
" title="<?php 
Example #28
0
                    <td class="nowrap has-context"> <!-- title -->
                        <a href="<?= JRoute::_('index.php?option=com_prp&task=table.edit&id='.(int) $item->id); ?>">
                            <?= $this->escape($item->title); ?>
                        </a>
                    </td>
                    <td class="nowrap has-context"> <!-- name -->
                        <a href="<?= JRoute::_('index.php?option=com_prp&task=table.edit&id='.(int) $item->id); ?>">
                            <?= $this->escape($item->name); ?>
                        </a>
                    </td>
                    <td class="center nowrap"> <!-- user_name -->
                        <?= $this->escape($item->user_name); ?>
                    </td>
                    <td class="center hidden-phone"> <!-- created_when -->
                        <?= JHtml::date($item->created_when, 'd/m/Y H:i:s', true, false); ?>
                    </td>
                    <td class="center hidden-phone"> <!-- modified_when -->
                        <?= JHtml::date($item->modified_when, 'd/m/Y H:i:s', true, false); ?>
                    </td>
                </tr>
            <?php endforeach; ?>
            </tbody>
        </table>
        <?php endif; ?>
        <input type="hidden" name="task" value="" />
        <input type="hidden" name="boxchecked" value="0" />
        <input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
        <input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
        <?php echo JHtml::_('form.token'); ?>
    </div>
</form>
Example #29
0
    echo JText::_('COM_JKIT_ANY_WRITTEN');
    ?>
 
			<a href="<?php 
    echo JRoute::_('index.php?option=com_jkit&view=items&author=' . $this->item->user_alias);
    ?>
">
				<?php 
    echo $this->item->user;
    ?>
			</a>
		<?php 
}
?>
		<?php 
echo JHtml::date($this->item->created);
?>
    </p>
    <hr>

	<?php 
if ($this->item->tags) {
    ?>
		<div class="jkit-item-tags">
			<p>
				<?php 
    echo JText::_('COM_JKIT_ANY_TAGGED');
    ?>
:
				<?php 
    foreach ($this->item->tags as $tag) {
Example #30
0
			<?php 
echo JText::_('Users_Profile_Registered_Date_Label');
?>
		</dt>
		<dd>
			<?php 
echo JHtml::date($this->data->registerDate);
?>
		</dd>
				<dt>
			<?php 
echo JText::_('Users_Profile_Last_Visited_Date_Label');
?>
		</dt>
		<dd>
		<?php 
if ($this->data->lastvisitDate != '0000-00-00 00:00:00') {
    ?>
		
			<?php 
    echo JHtml::date($this->data->lastvisitDate);
    ?>
		<?php 
} else {
    echo JText::_('Users_Profile_Never_Visited');
}
?>
	
		</dd>
	</dl>
</fieldset>