function display($tpl = null) { // Access check. if (!JFactory::getUser()->authorise('digicom.orders', 'com_digicom')) { return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); } $document = JFactory::getDocument(); $orders = $this->get('Items'); $pagination = $this->get('Pagination'); $this->orders = $orders; $this->pagination = $pagination; $startdate = JRequest::getVar("startdate", "", "request"); $startdate = strtotime($startdate); //$startdate = DigiComHelperDigiCom::parseDate( $configs->get('time_format','DD-MM-YYYY'), $startdate ); $this->assign("startdate", $startdate); $enddate = JRequest::getVar("enddate", "", "request"); $enddate = strtotime($enddate); //$enddate = DigiComHelperDigiCom::parseDate( $configs->get('time_format','DD-MM-YYYY'), $enddate ); $this->assign("enddate", $enddate); $keyword = JRequest::getVar("keyword", "", "request"); $this->assign("keyword", $keyword); //set toolber $this->addToolbar(); DigiComHelperDigiCom::addSubmenu('orders'); $this->sidebar = DigiComHelperDigiCom::renderSidebar(); parent::display($tpl); }
function display($tpl = null) { //$comInfo = JComponentHelper::getComponent('com_digicom'); //print_r ( $comInfo->params );die; $form = null; $component = null; try { $form = $this->get('Form'); $component = $this->get('Component'); $user = JFactory::getUser(); } catch (Exception $e) { JFactory::getApplication()->enqueueMessage($e->getMessage(), 'error'); return false; } // Bind the form to the data. if ($form && $component->params) { $form->bind($component->params); } $this->form =& $form; $this->component =& $component; $this->userIsSuperAdmin = $user->authorise('core.admin'); $this->currentComponent = JFactory::getApplication()->input->get('component'); $this->return = JFactory::getApplication()->input->get('return', '', 'base64'); JFactory::getApplication()->input->set('hidemainmenu', true); //set toolber $this->addToolbar(); DigiComHelperDigiCom::addSubmenu('configs'); $this->sidebar = JHtmlSidebar::render(); parent::display($tpl); }
/** * Display the view * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return void */ public function display($tpl = null) { $this->state = $this->get('State'); $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->assoc = $this->get('Assoc'); $this->filterForm = $this->get('FilterForm'); $this->activeFilters = $this->get('ActiveFilters'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } // Preprocess the list of items to find ordering divisions. foreach ($this->items as &$item) { $this->ordering[$item->parent_id][] = $item->id; } // Levels filter. $options = array(); $options[] = JHtml::_('select.option', '1', JText::_('J1')); $options[] = JHtml::_('select.option', '2', JText::_('J2')); $options[] = JHtml::_('select.option', '3', JText::_('J3')); $options[] = JHtml::_('select.option', '4', JText::_('J4')); $options[] = JHtml::_('select.option', '5', JText::_('J5')); $options[] = JHtml::_('select.option', '6', JText::_('J6')); $options[] = JHtml::_('select.option', '7', JText::_('J7')); $options[] = JHtml::_('select.option', '8', JText::_('J8')); $options[] = JHtml::_('select.option', '9', JText::_('J9')); $options[] = JHtml::_('select.option', '10', JText::_('J10')); $this->f_levels = $options; $this->addToolbar(); DigiComHelperDigiCom::addSubmenu('categories'); $this->sidebar = DigiComHelperDigiCom::renderSidebar(); parent::display($tpl); }
/** * Display the view. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return void */ public function display($tpl = null) { $this->form = $this->get('Form'); $this->item = $this->get('Item'); $this->state = $this->get('State'); $section = $this->state->get('category.section') ? $this->state->get('category.section') . '.' : ''; $this->canDo = JHelperContent::getActions($this->state->get('category.component'), $section . 'category', $this->item->id); $this->assoc = $this->get('Assoc'); $input = JFactory::getApplication()->input; // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } // Check for tag type $this->checkTags = JHelperTags::getTypes('objectList', array($this->state->get('category.extension') . '.category'), true); $input->set('hidemainmenu', true); if ($this->getLayout() == 'modal') { $this->form->setFieldAttribute('language', 'readonly', 'true'); $this->form->setFieldAttribute('parent_id', 'readonly', 'true'); } $this->addToolbar(); DigiComHelperDigiCom::addSubmenu('categories'); $this->sidebar = DigiComHelperDigiCom::renderSidebar(); parent::display($tpl); }
function display($tpl = null) { //require_once( JPATH_COMPONENT.DS.'helpers'.DS.'sajax.php' ); $db = JFactory::getDBO(); $customer = $this->get('customer'); //print_r($customer);die; $user = $this->get('User'); $isNew = $customer->id < 1; $text = $isNew ? JText::_('COM_DIGICOM_NEW') : JText::_('COM_DIGICOM_EDIT') . " : " . $customer->firstname; JToolBarHelper::title(JText::_('COM_DIGICOM_CUSTOMER') . ":<small>[" . $text . "]</small>"); $bar = JToolBar::getInstance('toolbar'); $layout = new JLayoutFile('toolbar.title'); $title = array('title' => JText::_('COM_DIGICOM_CUSTOMER') . ":<small>[" . $text . "]</small>", 'class' => 'title'); $bar->appendButton('Custom', $layout->render($title), 'title'); $layout = new JLayoutFile('toolbar.settings'); $bar->appendButton('Custom', $layout->render(array()), 'settings'); JToolBarHelper::apply('customer.apply'); JToolBarHelper::save('customer.save'); JToolBarHelper::divider(); JToolBarHelper::cancel('customer.cancel'); $this->assign("cust", $customer); $this->assign("user", $user); $configs = $this->get("Configs"); $this->assign("configs", $configs); DigiComHelperDigiCom::addSubmenu('customers'); $this->sidebar = DigiComHelperDigiCom::renderSidebar(); parent::display($tpl); }
function display($tpl = null) { JToolBarHelper::title(JText::_('COM_DIGICOM_ABOUT_TOOLBAR_TITLE'), 'generic.png'); $bar = JToolBar::getInstance('toolbar'); // Instantiate a new JLayoutFile instance and render the layout $layout = new JLayoutFile('toolbar.title'); $title = array('title' => JText::_('COM_DIGICOM_ABOUT_TOOLBAR_TITLE'), 'class' => 'title'); $bar->appendButton('Custom', $layout->render($title), 'title'); $layout = new JLayoutFile('toolbar.settings'); $bar->appendButton('Custom', $layout->render(array()), 'settings'); DigiComHelperDigiCom::addSubmenu('about'); $this->sidebar = DigiComHelperDigiCom::renderSidebar(); parent::display($tpl); }
/** * Display the view * * @return void */ function display($tpl = null) { $this->latest_orders = DigiComHelperDigiCom::getOrders(5); $this->most_sold = DigiComHelperDigiCom::getMostSoldProducts(5); $this->totalOrder = $this->get('reportTotal'); $this->reportOrders = $this->get('reportOrders'); $this->reportCustomer = $this->get('reportCustomer'); $this->configs = $this->get('configs'); //load the toolber $this->addToolbar(); DigiComHelperDigiCom::addSubmenu('digicom'); $this->sidebar = DigiComHelperDigiCom::renderSidebar(); parent::display($tpl); }
function display($tpl = null) { // Access check. if (!JFactory::getUser()->authorise('digicom.reports', 'com_digicom')) { return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); } $this->latest_orders = DigiComHelperDigiCom::getOrders(5); $this->most_sold = DigiComHelperDigiCom::getMostSoldProducts(5); $this->totalOrder = $this->get('reportTotal'); $this->reportOrders = $this->get('reportOrders'); $this->reportCustomer = $this->get('reportCustomer'); $this->configs = $this->get('configs'); //load the toolber $this->addToolbar(); DigiComHelperDigiCom::addSubmenu('reports'); $this->sidebar = DigiComHelperDigiCom::renderSidebar(); parent::display($tpl); }
function display($tpl = null) { // Access check. if (!JFactory::getUser()->authorise('digicom.discounts', 'com_digicom')) { return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); } $condition = JRequest::getVar("condition", '1'); $this->assign("condition", $condition); $status = JRequest::getVar("status", ''); $this->assign("status", $status); $this->promos = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->configs = $this->get('configs'); //set toolber $this->addToolbar(); DigiComHelperDigiCom::addSubmenu('discounts'); $this->sidebar = DigiComHelperDigiCom::renderSidebar(); parent::display($tpl); }
function display($tpl = null) { if ($this->getLayout() !== 'modal') { DigiComHelperDigiCom::addSubmenu('products'); } // Access check. if (!JFactory::getUser()->authorise('digicom.products', 'com_digicom')) { return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); } $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->authors = $this->get('Authors'); $this->filterForm = $this->get('FilterForm'); $this->activeFilters = $this->get('ActiveFilters'); $this->configs = $this->get('configs'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } // Levels filter. $options = array(); $options[] = JHtml::_('select.option', '1', JText::_('J1')); $options[] = JHtml::_('select.option', '2', JText::_('J2')); $options[] = JHtml::_('select.option', '3', JText::_('J3')); $options[] = JHtml::_('select.option', '4', JText::_('J4')); $options[] = JHtml::_('select.option', '5', JText::_('J5')); $options[] = JHtml::_('select.option', '6', JText::_('J6')); $options[] = JHtml::_('select.option', '7', JText::_('J7')); $options[] = JHtml::_('select.option', '8', JText::_('J8')); $options[] = JHtml::_('select.option', '9', JText::_('J9')); $options[] = JHtml::_('select.option', '10', JText::_('J10')); $this->f_levels = $options; // We don't need toolbar in the modal window. if ($this->getLayout() !== 'modal') { //set toolber $this->addToolbar(); $this->sidebar = DigiComHelperDigiCom::renderSidebar(); } parent::display($tpl); }
/** * Display the view */ public function display($tpl = null) { $this->state = $this->get('State'); $this->item = $this->get('Item'); $this->form = $this->get('Form'); $this->configs = $this->get('configs'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } // We don't need toolbar in the modal window. if ($this->getLayout() !== 'modal') { //set toolber DigiComHelperDigiCom::addSubmenu('products'); $this->addToolbar(); $this->sidebar = DigiComHelperDigiCom::renderSidebar(); } parent::display($tpl); }
function display($tpl = null) { $this->state = $this->get('State'); $this->item = $this->get('Item'); $this->form = $this->get('Form'); $this->configs = $this->get('configs'); $this->promocode = $this->get('promocode'); JToolBarHelper::title(JText::_('COM_DIGICOM_ORDER_CREATE_NEW_ORDER_TOOLBAR_TITLE'), 'generic.png'); $bar = JToolBar::getInstance('toolbar'); // Instantiate a new JLayoutFile instance and render the layout $layout = new JLayoutFile('toolbar.title'); $title = array('title' => JText::_('COM_DIGICOM_ORDER_CREATE_NEW_ORDER_TOOLBAR_TITLE'), 'class' => 'title'); $bar->appendButton('Custom', $layout->render($title), 'title'); $layout = new JLayoutFile('toolbar.settings'); $bar->appendButton('Custom', $layout->render(array()), 'settings'); JToolBarHelper::save('ordernew.save'); JToolBarHelper::cancel('order.cancel'); DigiComHelperDigiCom::addSubmenu('orders'); $this->sidebar = JHtmlSidebar::render(); parent::display($tpl); }
function display($tpl = null) { JToolBarHelper::title(JText::_('COM_DIGICOM_FILE_MANAGER_TOOLBAR_TITLE'), 'generic.png'); // Access check. if (!JFactory::getUser()->authorise('digicom.filemanager', 'com_digicom')) { return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); } $bar = JToolBar::getInstance('toolbar'); // Instantiate a new JLayoutFile instance and render the layout $layout = new JLayoutFile('toolbar.title'); $title = array('title' => JText::_('COM_DIGICOM_FILE_MANAGER_TOOLBAR_TITLE'), 'class' => 'title'); $bar->appendButton('Custom', $layout->render($title), 'title'); $layout = new JLayoutFile('toolbar.settings'); $bar->appendButton('Custom', $layout->render(array()), 'settings'); $mainframe = JFactory::getApplication(); $user = JFactory::getUser(); $document = JFactory::getDocument(); $document->addStyleSheet(JURI::root(true) . '/media/digicom/assets/css/smoothness/jquery-ui.css?v=1.8.0'); $document->addStyleSheet(JURI::root(true) . '/media/digicom/assets/css/theme.css?v=2.7.0'); $document->addStyleSheet(JURI::root(true) . '/media/digicom/assets/css/elfinder.min.css?v=2.7.0'); if ($document->getType() == 'html') { $document->addScript(JURI::root(true) . '/media/digicom/assets/js/jquery-ui-1.8.24.custom.min.js'); $document->addScript(JURI::root(true) . '/media/digicom/assets/js/elfinder.js?v=1.0.0'); } $type = JRequest::getCmd('type'); $fieldID = JRequest::getCmd('fieldID'); $mimes = ''; $this->assignRef('mimes', $mimes); $this->assignRef('type', $type); $this->assignRef('fieldID', $fieldID); $tmpl = JRequest::getCmd('tmpl', ''); if ($tmpl != 'component') { DigiComHelperDigiCom::addSubmenu('filemanager'); $this->sidebar = DigiComHelperDigiCom::renderSidebar(); } parent::display($tpl); }
function display($tpl = null) { // Access check. if (!JFactory::getUser()->authorise('digicom.customers', 'com_digicom')) { return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); } $layout = JRequest::getVar('layout', ''); if ($layout) { $this->setLayout($layout); } $customers = $this->get('Items'); $pagination = $this->get('Pagination'); $this->custs = $customers; $this->pagination = $pagination; $prd = JRequest::getVar("prd", 0, "request"); $this->assign("prd", $prd); $keyword = JRequest::getVar("keyword", "", "request"); $this->assign("keyword", $keyword); //set toolber $this->addToolbar(); DigiComHelperDigiCom::addSubmenu('customers'); $this->sidebar = DigiComHelperDigiCom::renderSidebar(); parent::display($tpl); }
function editForm($tpl = null) { $db = JFactory::getDBO(); $order = $this->get('order'); $isNew = $order->id < 1; $text = $isNew ? JText::_('New') : JText::_('Edit'); JToolBarHelper::title(JText::_('Order') . ":<small>[" . $text . "]</small>"); $bar = JToolBar::getInstance('toolbar'); $layout = new JLayoutFile('toolbar.title'); $title = array('title' => JText::_('Order') . ":<small>[" . $text . "]</small>", 'class' => 'title'); $bar->appendButton('Custom', $layout->render($title), 'title'); $layout = new JLayoutFile('toolbar.settings'); $bar->appendButton('Custom', $layout->render(array()), 'settings'); // JToolBarHelper::save(); if ($isNew) { JToolBarHelper::cancel(); } else { JToolBarHelper::cancel('cancel', 'Close'); } $this->assign("order", $order); //dsdebug($order); $configs = $this->_models['config']->getConfigs(); $lists = array(); $prods = $this->_models['product']->getListProducts(); $opts = array(); $opts[] = JHTML::_('select.option', "", JText::_("Select product")); foreach ($prods as $prod) { $opts[] = JHTML::_('select.option', $prod->id, $prod->name); } $lists['productid'] = JHTML::_('select.genericlist', $opts, 'productid', 'class="inputbox" size="1" ', 'value', 'text', ''); // $license->productid $this->assign("configs", $configs); $this->assign("lists", $lists); $this->assign("currency_options", array()); // get user info $customer_model = $this->getModel('Customer'); $cust = $customer_model->getUserByID($order->userid); $this->assign("cust", $cust); // plugins $this->assign("plugins", $order->processor); // promocode if ($order->promocode == 0) { $order->promocode = 'none'; } $this->assign("promocode", $order->promocode); // products $products = array(); if ($order->products) { $products = $order->products; foreach ($products as $key => $product) { //print_r($product);die; // get Plain //orderDetails /* $license = $this->_models['license']->getLicense( $product->lid ); $products[$key]->license = $license; if ($license->renew) { $plans = $this->_models['plain']->getPlanitemRenewal($product->id, $license->plan_id); } else { $plans = $this->_models['plain']->getPlanitemNew($product->id, $license->plan_id); } $products[$key]->plans = $plans; // get renew license if ( $license->renewlicid != -1 ) { $renewlicense = $this->_models['license']->getLicense( $license->renewlicid ); $products[$key]->renewlicense = $renewlicense; } else { $products[$key]->renewlicense = null; } */ } } //dsdebug($products);die; $this->assign("products", $products); $this->assign("amount_paid", $order->amount_paid); $this->assign("total", $order->amount); $this->assign("tax", '0'); DigiComHelperDigiCom::addSubmenu('orders'); $this->sidebar = DigiComHelperDigiCom::renderSidebar(); parent::display($tpl); }