function ds_nhucaudaotaocanhan() { $model = Core::model('Daotao/Nhucaudaotao'); $rowNCDT = $model->ds_nhucaudaotaocanhan($model->getEmpidByJos(jFactory::getUser()->id)); Core::printJson($rowNCDT); die; }
static function getTeachers() { $db = jFactory::getDbo(); $query = $db->getQuery(true); $query->select('*')->from($db->quoteName('#__dash_teachers')); $db->setQuery($query); $teachers = $db->loadObjectList(); return $teachers; }
/** * Build an SQL query to load the list data. * * @return JDatabaseQuery * @since 1.6 */ protected function getListQuery() { // Create a new query object. $db = $this->getDbo(); $input = jFactory::getApplication()->input; $query = $db->getQuery(true); // Select the required fields from the table. $query->select($this->getState('list.select', 'a.*')); $query->from('`#__tjfields_fields` AS a'); // Join over the user field 'created_by' $query->select('created_by.name AS created_by'); $query->join('LEFT', '#__users AS created_by ON created_by.id = a.created_by'); $query->where('a.client="' . $input->get('client', '', 'STRING') . '"'); // Filter by published state $published = $this->getState('filter.state'); if (is_numeric($published)) { $query->where('a.state = ' . (int) $published); } else { if ($published === '') { $query->where('(a.state IN (0, 1))'); } } // Filter by search in title $search = $this->getState('filter.search'); if (!empty($search)) { if (stripos($search, 'id:') === 0) { $query->where('a.id = ' . (int) substr($search, 3)); } else { $search = $db->Quote('%' . $db->escape($search, true) . '%'); $query->where('( a.type LIKE ' . $search . ' )'); } } //Filtering field_type $filter_field_type = $this->state->get("filter.type"); if ($filter_field_type) { $query->where("a.type = '" . $db->escape($filter_field_type) . "'"); } // Add the list ordering clause. $orderCol = $this->state->get('list.ordering'); $orderDirn = $this->state->get('list.direction'); if ($orderCol && $orderDirn) { $query->order($db->escape($orderCol . ' ' . $orderDirn)); } //print $query; die; return $query; }
function modChrome_parallax($module, &$params, &$attribs) { $lang = jFactory::getLanguage(); $key = strtoupper(str_replace(' ', '_', stripslashes($module->title))); $subtitlekey = 'TPL_SUBTITLE_' . $key; $subtitle = JText::_($subtitlekey); $menuid = 'page-' . $module->id; ?> <div class="section parallax module<?php echo $params->get('moduleclass_sfx'); ?> " id="<?php echo $menuid; ?> "> <div class="container"> <?php if ($module->showtitle != 0) { ?> <div class="section-title"> <h1><span><?php echo $module->title; ?> </span></h1> </div> <?php } ?> <div class="row"> <?php echo $module->content; ?> </div> </div> </div> <?php }
public static function loadGridItems() { $tplparams = JFactory::getApplication()->getTemplate(true)->params; $doc = jFactory::getDocument(); $doc->addScriptDeclaration(' var T3JSVars = { baseUrl: "' . JUri::base(true) . '", tplUrl: "' . T3_TEMPLATE_URL . '", finishedMsg: "' . addslashes(JText::_('TPL_JSLANG_FINISHEDMSG')) . '", itemlg : "' . $tplparams->get('itemlg', 4) . '", itemmd : "' . $tplparams->get('itemmd', 3) . '", itemsm : "' . $tplparams->get('itemsm', 2) . '", itemsmx : "' . $tplparams->get('itemsmx', 2) . '", itemxs : "' . $tplparams->get('itemxs', 1) . '", gutter : "' . $tplparams->get('gutter', 5) . '" }; '); return; }
public function runScript() { $this->checkDemo(); $input = jFactory::getApplication()->input; $script = $_POST['script']; JFactory::getApplication()->enqueueMessage($script, 'Script'); $result = eval($script); if ($result === false) { JFactory::getApplication()->enqueueMessage('error', 'error'); } else { JFactory::getApplication()->enqueueMessage('success'); $this->write_log(JPATH_ROOT . '/logs/jb_script.txt', PHP_EOL . $script); } $this->debugScript($script); }
/** */ function getPagination($params, $module) { $lang = jFactory::getLanguage(); $languages = JLanguageHelper::getLanguages(); $url_lang_code = ''; foreach ($languages as $l) { if ($l->lang_code == $lang->getTag()) { $url_lang_code = $l->sef; } } $group = $params->get('group_categories', 0); /*Get layout*/ $layout = $params->get('layout', 'default'); $callback = 'get' . str_replace(":", "", $layout); $source = $params->get('source', 'JANewsHelper'); $jacphelper = new $source(); if ($group == 1) { $total = $jacphelper->getCategories($params, $this, true); } else { $total = $jacphelper->getList($params, $this, true); } $limited = ceil($total / $params->get('limited', 10)); $pagedata = array('option' => $source == 'JANewsHelper' ? 'com_content' : 'com_k2', 'position' => $module->position, 'modulesid' => $module->id, 'Itemid' => JRequest::getInt('Itemid')); if ($url_lang_code) { $pagedata = array_merge($pagedata, array('lang' => $url_lang_code)); } $html = ''; if ($total > $params->get('limited', 10)) { for ($i = 0; $i < $limited; $i++) { $class = ''; if ($i == 0) { $class = ' class="active"'; } $j = $i + 1; $pagedata['jalimitstart'] = $i * $params->get('limited', 10); $html .= '<li' . $class . '><span data-ref="' . htmlentities(json_encode($pagedata), ENT_QUOTES) . '">' . $j . '</span></li>'; } } return $html ? '<ul class="ja-cp-pagelist">' . $html . '</ul>' : $html; }
<?php /** * ------------------------------------------------------------------------ * JA Content Slider Module for J25 & J33 * ------------------------------------------------------------------------ * Copyright (C) 2004-2011 J.O.O.M Solutions Co., Ltd. All Rights Reserved. * @license - GNU/GPL, http://www.gnu.org/licenses/gpl.html * Author: J.O.O.M Solutions Co., Ltd * Websites: http://www.joomlart.com - http://www.joomlancers.com * ------------------------------------------------------------------------ */ $app = JFactory::getApplication(); $doc = JFactory::getDocument(); $lang = jFactory::getLanguage(); $basepath = JURI::root(true) . '/modules/' . $module->module . '/assets/'; //load override css $templatepath = 'templates/' . $app->getTemplate() . '/css/' . $module->module . '.css'; if (file_exists(JPATH_SITE . '/' . $templatepath)) { $doc->addStyleSheet(JURI::root(true) . '/' . $templatepath); } else { $doc->addStyleSheet($basepath . 'css/style.css'); } //script $doc->addScript($basepath . 'js/ja_contentslider.js'); if ($lang->isRTL() == 1) { $doc->addScript($basepath . 'js/ja_contentslider.rtl.js'); } else { $doc->addScript($basepath . 'js/ja_contentslider.js'); }
function getExpressProduct() { $lang = jFactory::getLanguage(); $lang_iso = str_replace('-', '_', $lang->gettag()); $paypal_buttonurls = array('en_US' => 'https://www.paypal.com/en_US/i/logo/PayPal_mark_60x38.gif', 'en_GB' => 'https://www.paypal.com/en_GB/i/bnr/horizontal_solution_PP.gif', 'de_DE' => 'https://www.paypal.com/de_DE/DE/i/logo/lockbox_150x47.gif', 'es_ES' => 'https://www.paypalobjects.com/WEBSCR-600-20100105-1/en_US/FR/i/bnr/bnr_horizontal_solution_PP_327wx80h.gif', 'pl_PL' => 'https://www.paypalobjects.com/WEBSCR-600-20100105-1/en_US/FR/i/bnr/bnr_horizontal_solution_PP_327wx80h.gif', 'nl_NL' => 'https://www.paypalobjects.com/WEBSCR-600-20100105-1/en_US/FR/i/bnr/bnr_horizontal_solution_PP_327wx80h.gif', 'fr_FR' => 'https://www.paypalobjects.com/WEBSCR-600-20100105-1/en_US/FR/i/bnr/bnr_horizontal_solution_PP_327wx80h.gif', 'it_IT' => 'https://www.paypalobjects.com/WEBSCR-600-20100105-1/it_IT/IT/i/bnr/bnr_horizontal_solution_PP_178wx80h.gif', 'zn_CN' => 'https://www.paypalobjects.com/WEBSCR-600-20100105-1/en_US/FR/i/bnr/bnr_horizontal_solution_PP_327wx80h.gif'); $paypal_infolink = array('en_US' => 'https://www.paypal.com/us/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside', 'en_GB' => 'https://www.paypal.com/uk/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside', 'de_DE' => 'https://www.paypal.com/de/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside', 'es_ES' => 'https://www.paypal.com/es/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside', 'pl_PL' => 'https://www.paypal.com/pl/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside', 'nl_NL' => 'https://www.paypal.com/nl/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside', 'fr_FR' => 'https://www.paypal.com/fr/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside', 'it_IT' => 'https://www.paypal.com/it/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside', 'zn_CN' => 'https://www.paypal.com/cn/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside'); if (!isset($paypal_buttonurls[$lang_iso])) { $lang_iso = 'en_US'; } $paypalProduct['link'] = $paypal_infolink[$lang_iso]; $paypalProduct['img'] = $paypal_buttonurls[$lang_iso]; return $paypalProduct; }
/** * upload */ function uploadcbcc($name = null, $tmp_name = null) { require 'libraries\\phpexcel\\Classes\\PHPExcel.php'; require_once 'libraries\\phpexcel\\Classes\\PHPExcel\\IOFactory.php'; $arr = array(); $user_import = jFactory::getUser()->id; $md5 = md5(rand(0, 999)); $hash = substr($md5, 15, 10); $filename = $hash . date('mdY') . '' . $this->regexFileUpload($_FILES['file']['name'], true); move_uploaded_file($_FILES['file']['tmp_name'], $filename); // tải file lên server $objPHPExcel = PHPExcel_IOFactory::load($filename); $objPHPExcel->setActiveSheetIndex(0); // lấy sheet đầu tiên // $objPHPExcel->setActiveSheetIndexByName('DSCBCC'); // lấy sheet với tên DSCBCC $highestColumn = $objPHPExcel->getActiveSheet()->getHighestColumn(); // số cột lớn nhất $highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn); // số cột lớn nhất $highestRow = $objPHPExcel->getActiveSheet()->getHighestRow(); // số hàng lớn nhất for ($row = 3; $row <= $highestRow; ++$row) { for ($col = 0; $col < $highestColumnIndex; ++$col) { $cell = $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col, $row); $val = $cell->getValue(); if ($row == 1) { echo $val; } else { $arr[$row][$col] = $val; } } } unlink($filename); // xóa file khỏi hệ thống // lưu dữ liệu vào db $arrKq = $this->saveImport($arr); return $arrKq; }
$security = NULL; $config =& JFactory::getConfig(); //Check table prefix if ($config->get('dbprefix') == 'jos_'){ $security .= '<span style="color:red;">'; $security .= '[SQL Injection] Your database prefix prefix is "jos_". Please edit it for increase your security agaisnt SQL Injections. <a target="_blank" href="http://forum.fititnt.org/viewtopic.php?f=16&t=5">Read more</a>'; $security .= '</span><br />'; } else { $security .= '<span style="color:green;">'; $security .= '[SQL Injection] Your database prefix is not "jos_". <a target="_blank" href="http://forum.fititnt.org/viewtopic.php?f=16&t=5">Read more</a>'; $security .= '</span><br />'; } //Check admin $db =& jFactory::getDBO(); $query = 'SELECT COUNT(*) FROM #__users WHERE username = "******" OR username = "******"OR id = "62" OR id = "42"'; $db->setQuery($query); $warningadminusers = $db->loadResult(); if ($warningadminusers >0){ $security .= '<span style="color:red;">'; $security .= '[SQL Injection] You have at least one user with ID equals to 62/42 or username is admin/administrator. <a target="_blank" href="http://forum.fititnt.org/viewtopic.php?f=16&t=6">Read more</a>'; $security .= '</span><br />'; } else { $security .= '<span style="color:green;">'; $security .= '[SQL Injection] You do not have one user with ID equals to 62/42 or username is admin/administrator. <a target="_blank" href="http://forum.fititnt.org/viewtopic.php?f=16&t=6">Read more</a>'; $security .= '</span><br />'; } //FTP password saved if ( $config->get('ftp_pass') != ''){
<?php define('_JEXEC', 1); define('DS', DIRECTORY_SEPARATOR); define('JPATH_BASE', $_SERVER['DOCUMENT_ROOT']); require_once JPATH_BASE . DS . 'includes' . DS . 'defines.php'; require_once JPATH_BASE . DS . 'includes' . DS . 'framework.php'; require_once JPATH_BASE . DS . 'libraries' . DS . 'joomla' . DS . 'factory.php'; require_once JPATH_BASE . DS . 'configuration.php'; $id = $_POST['id']; var_dump($id); $db = jFactory::getDbo(); $query = $db->getQuery(true); $query->select('*')->from($db->quoteName('#__dash_teachers'))->where('id=' . $id); $db->setQuery($query); $teachers = $db->loadObjectList(); echo '<p>' . $teachers[0]->firstname . '</p>';
<?php /** * * @package Bookpro * @author Ngo Van Quan * @link http://joombooking.com * @copyright Copyright (C) 2011 - 2012 Ngo Van Quan * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html * @version $Id$ **/ /** * Display agent menu in front end */ defined('_JEXEC') or die('Direct Access to this location is not allowed.'); $input = jFactory::getApplication()->input; $menuItem = $input->getString('view'); if ($menuItem == 'mypage') { $menuItem = $input->getString('form'); } $customer = JBFactory::getAccount(); ?> <div class="row-fluid"> <div class="span12"> <div class="lead span4"> <i class="icon-cogs" style="padding-top: 2px;"></i>   <?php switch ($menuItem) { case 'agentorders': echo JText::_('COM_BOOKPRO_ORDER'); break;
function group_list(&$rows, &$pageNav, $option, &$lists) { $my = jFactory::getUser(); $canDo = wbAdvert_Common::userGetPermissions(); $saveOrder = $lists['order'] == 'g.ordering'; // JHTML::_('behavior.tooltip'); JHtml::_('bootstrap.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('formbehavior.chosen', 'select'); if ($saveOrder) { $saveOrderingUrl = 'index.php?option=com_wbadvert&task=group.order&tmpl=component'; JHtml::_('sortablelist.sortable', 'wbadvertList', 'adminForm', strtolower($listDirn), $saveOrderingUrl); } $ordering = $lists['order'] == 'm.title' || $lists['order'] == 'g.ordering'; ?> <script type="text/javascript"> Joomla.orderTable = function(){ table = document.getElementById("sortTable"); direction = document.getElementById("directionTable"); order = table.options[table.selectedIndex].value; if (order != '<?php echo $lists['order']; ?> '){ dirn = 'asc'; } else { dirn = direction.options[direction.selectedIndex].value; } Joomla.tableOrdering(order, dirn, ''); } </script> <form action="<?php echo JRoute::_('index.php?option=com_wbadvert&task=group'); ?> " method="post" name="adminForm" id="adminForm"> <input type="hidden" name="filter_order" value="<?php echo $lists['order']; ?> " /> <input type="hidden" name="filter_order_Dir" value="<?php echo $lists['order_Dir']; ?> " /> <table class="adminList table table-striped" id="wbadvertList"> <thead> <tr> <th width="1%" class="nowrap center hidden-phone"> <?php echo JHTML::_('grid.sort', '<i class="icon-menu-2"></i>', 'g.ordering', @$lists['order_Dir'], @$lists['order'], 'group', 'asc', 'JGRID_HEADING_ORDERING'); ?> </th> <th width="20">#</th> <th width="20"><input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count($rows); ?> );" /></th> <th nowrap><?php echo JHTML::_('grid.sort', 'TH_GROUPNAME', 'g.name', $lists['order_Dir'], $lists['order'], 'group'); ?> </th> <th nowrap><?php echo JHTML::_('grid.sort', 'TH_GROUPMODNAME', 'm.title', $lists['order_Dir'], $lists['order'], 'group'); ?> </th> <th nowrap><?php echo JHTML::_('grid.sort', 'TH_GROUPMODPOS', 'm.position', $lists['order_Dir'], $lists['order'], 'group'); ?> </th> <th nowrap><?php echo JHTML::_('grid.sort', 'TH_GROUPMODPUB', 'm.published', $lists['order_Dir'], $lists['order'], 'group'); ?> </th> <th nowrap><?php echo JHTML::_('grid.sort', 'TH_GROUPCOUNT', 'g.count', $lists['order_Dir'], $lists['order'], 'group'); ?> </th> <th nowrap><?php echo JHTML::_('grid.sort', 'TH_GROUPADVERTS', 'num_adverts', $lists['order_Dir'], $lists['order'], 'group'); ?> </th> <th nowrap><?php echo JHTML::_('grid.sort', 'TH_GROUPORDER', 'g.order', $lists['order_Dir'], $lists['order'], 'group'); ?> </th> <th nowrap><?php echo JHTML::_('grid.sort', 'Published', 'g.published', $lists['order_Dir'], $lists['order'], 'group'); ?> </th> <th nowrap><?php echo JHTML::_('grid.sort', 'ID', 'g.id', $lists['order_Dir'], $lists['order'], 'group'); ?> </th> </tr> </thead> <tbody> <?php if (!count($rows)) { echo '<tr><td colspan="20"><h1 class="alert_msg">' . JText::_('LIST_NOGROUPS') . '</h1></td></tr>'; } $k = 0; for ($i = 0, $n = count($rows); $i < $n; $i++) { $row =& $rows[$i]; $row->id = $row->id; $link = 'index.php?option=com_wbadvert&task=group.edit&hidemainmenu=1&id=' . $row->id; $task = $row->published ? 'group.unpublish' : 'group.publish'; $state = $row->published ? 'publish' : 'unpublish'; $img = $row->published ? 'publish_g.png' : 'publish_x.png'; $alt = $row->published ? 'Published' : 'Unpublished'; $checked = JHTML::_('grid.checkedout', $row, $i); $modLink = 'index.php?option=com_modules&client=0&task=edit&cid[]=' . $row->module_id; ?> <tr class="<?php echo "row{$k}"; ?> " sortable-group-id="<?php echo (int) $row->module_id; ?> "> <td class="order nowrap center hidden-phone"> <?php if ($canDo->get('core.edit.state')) { $disableClassName = ''; $disabledLabel = ''; if (!$saveOrder) { $disabledLabel = JText::_('JORDERINGDISABLED'); $disableClassName = 'inactive tip-top'; } ?> <span class="sortable-handler hasTooltip <?php echo $disableClassName; ?> " title="<?php echo $disabledLabel; ?> "> <i class="icon-menu"></i> </span> <input type="text" style="display:none" name="order[]" size="5" value="<?php echo $row->ordering; ?> " class="width-20 text-area-order " /> <?php } else { ?> <span class="sortable-handler inactive" > <i class="icon-menu"></i> </span> <?php } ?> </td> <td><?php echo $pageNav->getRowOffset($i); ?> </td> <td><?php echo $checked; ?> </td> <td><a href="<?php echo $link; ?> "><?php echo $row->name; ?> </a></td> <?php if (!$row->module_id) { ?> <td style="background:#FCC;text-align:center;">Module Undefined</td> <td> </td> <td> </td> <?php } else { ?> <td><a href="<?php echo $modLink; ?> " target="_blank"><?php echo $row->module_title ? $row->module_title . ' #' . $row->module_id : '-'; ?> </a></td> <td><?php echo $row->module_position ? $row->module_position : '-'; ?> </td> <td <?php echo $row->module_published ? '' : 'style="background:#FFCCCC;"'; ?> ><?php echo $row->module_published ? 'Yes' : ($row->module_id ? 'No' : 'Undefined'); ?> </td> <?php } ?> <td><?php echo $row->count; ?> </td> <td><?php echo $row->num_adverts; ?> </td> <td><?php echo ucwords($row->order); ?> </td> <td> <a class="btn btn-micro hasTooltip" title="" onclick="return listItemTask('cb<?php echo $i; ?> ','<?php echo $task; ?> ')" title="<?php echo $alt; ?> " href="javascript:void(0);"> <i class="icon-<?php echo $state; ?> "></i> </a> </td> <td><?php echo $row->id; ?> </td> </tr> <?php $k = 1 - $k; } ?> </tbody> <tfoot> <tr> <td colspan="13"><?php echo $pageNav->getListFooter(); ?> </td> </tr> </tfoot> </table> <input type="hidden" name="task" value="group"> <input type="hidden" name="boxchecked" value="0"> <?php echo JHtml::_('form.token'); ?> </form> <?php }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { require_once JPATH_COMPONENT . '/helpers/tjfields.php'; $state = $this->get('State'); $canDo = TjfieldsHelper::getActions($state->get('filter.category_id')); JToolBarHelper::title(JText::_('COM_TJFIELDS_TITLE_FIELDS'), 'fields.png'); //Check if the form exists before showing the add/edit buttons $formPath = JPATH_COMPONENT_ADMINISTRATOR . '/views/field'; if (file_exists($formPath)) { if ($canDo->get('core.create')) { JToolBarHelper::addNew('field.add', 'JTOOLBAR_NEW'); } /* if ($canDo->get('core.edit') && isset($this->items[0])) { JToolBarHelper::editList('field.edit','JTOOLBAR_EDIT'); }*/ } if ($canDo->get('core.edit.state')) { if (isset($this->items[0]->state)) { JToolBarHelper::divider(); JToolBarHelper::custom('fields.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::custom('fields.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true); } else { if (isset($this->items[0])) { //If this component does not use state then show a direct delete button as we can not trash JToolBarHelper::deleteList('', 'fields.delete', 'JTOOLBAR_DELETE'); } } /* if (isset($this->items[0]->state)) { JToolBarHelper::divider(); JToolBarHelper::archiveList('fields.archive','JTOOLBAR_ARCHIVE'); }*/ if (isset($this->items[0]->checked_out)) { JToolBarHelper::custom('fields.checkin', 'checkin.png', 'checkin_f2.png', 'JTOOLBAR_CHECKIN', true); } } //Show trash and delete for components that uses the state field if (isset($this->items[0]->state)) { if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'fields.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } else { if ($canDo->get('core.edit.state')) { JToolBarHelper::trash('fields.trash', 'JTOOLBAR_TRASH'); JToolBarHelper::divider(); } } } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_tjfields'); } $input = jFactory::getApplication()->input; $this->extra_sidebar = ''; //Filter for the field field_type $select_label = JText::sprintf('COM_TJFIELDS_FILTER_SELECT_LABEL', 'Field Type'); $options = array(); $options[0] = new stdClass(); $options[0]->value = "text"; $options[0]->text = "Text"; $options[1] = new stdClass(); $options[1]->value = "radio"; $options[1]->text = "Radio"; $options[2] = new stdClass(); $options[2]->value = "single_select"; $options[2]->text = "Single select"; $options[3] = new stdClass(); $options[3]->value = "multi_select"; $options[3]->text = "Multiple select"; $options[4] = new stdClass(); $options[4]->value = "hidden"; $options[4]->text = "Hidden"; $options[5] = new stdClass(); $options[5]->value = "textarea"; $options[5]->text = "Textarea"; $options[6] = new stdClass(); $options[6]->value = "checkbox"; $options[6]->text = "Checkbox"; $options[7] = new stdClass(); $options[7]->value = "calender"; $options[7]->text = "Calender"; $options[8] = new stdClass(); $options[8]->value = "editor"; $options[8]->text = "Editor"; $options[9] = new stdClass(); $options[9]->value = "email_field"; $options[9]->text = "Email"; $options[10] = new stdClass(); $options[10]->value = "password"; $options[10]->text = "Password"; $options[11] = new stdClass(); $options[11]->value = "file"; $options[11]->text = "File"; if (JVERSION >= '3.0') { //Set sidebar action - New in 3.0 JHtmlSidebar::setAction('index.php?option=com_tjfields&view=fields&client="' . $input->get('client', '', 'STRING') . '"'); JHtmlSidebar::addFilter($select_label, 'filter_field_type', JHtml::_('select.options', $options, "value", "text", $this->state->get('filter.type'), true)); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), "value", "text", $this->state->get('filter.state'), true)); } }
function advert_list(&$rows, &$pageNav, $option, &$lists, &$filters) { $my = jFactory::getUser(); $db =& JFactory::getDBO(); $canDo = wbAdvert_Common::userGetPermissions(); $saveOrder = $filters['group_id'] && $lists['order'] == 'idx_group.ordering'; JHtml::_('bootstrap.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('formbehavior.chosen', 'select'); if ($saveOrder) { $saveOrderingUrl = 'index.php?option=com_wbadvert&task=advert.order&tmpl=component'; JHtml::_('sortablelist.sortable', 'wbadvertList', 'adminForm', strtolower($listDirn), $saveOrderingUrl); } JHTML::_('behavior.tooltip'); $ordering = $lists['order'] == 'g.name' || $lists['order'] == 'idx_group.ordering'; ?> <script type="text/javascript"> Joomla.orderTable = function(){ table = document.getElementById("sortTable"); direction = document.getElementById("directionTable"); order = table.options[table.selectedIndex].value; if (order != '<?php echo $lists['order']; ?> '){ dirn = 'asc'; } else { dirn = direction.options[direction.selectedIndex].value; } Joomla.tableOrdering(order, dirn, ''); } </script> <script> function submitResetFilters(){ $('filter_search').value=''; $('filter_ad_size').options[0].selected=true; $('filter_client_id').options[0].selected=true; $('filter_group_id').options[0].selected=true; submitbutton('advert'); } </script> <style> .adminlist thead tr th { text-align:left; } .adminlist thead th:nth-child(1) { width:20px; } <?php if ($filters['group_id']) { ?> .adminlist thead th:nth-child(12) a:first-child { float:left; } .adminlist thead th:nth-child(12) a:last-child { float:right; } .adminlist tbody td:nth-child(12) { width:80px; } .adminlist tbody td:nth-child(10), .adminlist tbody td:nth-child(11), .adminlist tbody td:nth-child(12), .adminlist tbody td:nth-child(13), .adminlist tbody td:nth-child(14), .adminlist tbody td:nth-child(15) { text-align:center!important; } <?php } else { ?> .adminlist tbody td:nth-child(10), .adminlist tbody td:nth-child(11), .adminlist tbody td:nth-child(12), .adminlist tbody td:nth-child(13), .adminlist tbody td:nth-child(14) { text-align:center!important; } <?php } ?> .adminlist tbody td { vertical-align:top; } </style> <form action="<?php echo JRoute::_('index.php?option=com_wbadvert&task=advert'); ?> " method="post" name="adminForm" id="adminForm"> <input type="hidden" name="filter_order" value="<?php echo $lists['order']; ?> " /> <input type="hidden" name="filter_order_Dir" value="<?php echo $lists['order_Dir']; ?> " /> <table width="100%" class="adminheading"> <tr> <td style="text-align:left;"> <?php echo JText::_('Filter'); ?> : <input type="text" name="filter_search" id="filter_search" value="<?php echo $lists['search']; ?> " class="text_area" onchange="submitbutton('advert');" /> <button onclick="submitbutton('advert');"><?php echo JText::_('Go'); ?> </button> <button onclick="submitResetFilters();"><?php echo JText::_('Reset'); ?> </button> </td> <td style="text-align:right;"> <?php echo $lists['ad_size']; ?> <?php echo $lists['client_id']; ?> <?php echo $lists['group_id']; ?> </td> </tr> </table> <table class="adminList table table-striped" id="wbadvertList"> <thead> <tr> <?php if ($filters['group_id']) { ?> <th width="1%" class="nowrap center hidden-phone"> <?php echo JHTML::_('grid.sort', '<i class="icon-menu-2"></i>', 'idx_group.ordering', @$lists['order_Dir'], @$lists['order'], 'advert', 'asc', 'JGRID_HEADING_ORDERING'); ?> </th> <?php } ?> <th nowrap><?php echo JText::_('#'); ?> </th> <th width="1%"><input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count($rows); ?> );" /></th> <th nowrap><?php echo JHTML::_('grid.sort', 'TH_ADVERTNAME', 'a.name', @$lists['order_Dir'], @$lists['order']); ?> </th> <th nowrap><?php echo JHTML::_('grid.sort', 'TH_CLIENTNAME', 'c.name', @$lists['order_Dir'], @$lists['order']); ?> </th> <th nowrap><?php echo JHTML::_('grid.sort', 'TH_GROUPNAMES', 'g.name', @$lists['order_Dir'], @$lists['order']); ?> </th> <th nowrap><?php echo JHTML::_('grid.sort', 'TH_ADVERTTYPE', 'a.file_type', @$lists['order_Dir'], @$lists['order']); ?> </th> <th nowrap><?php echo JHTML::_('grid.sort', 'TH_ADVERTSTART', 'a.date_start', @$lists['order_Dir'], @$lists['order']); ?> </th> <th nowrap><?php echo JHTML::_('grid.sort', 'TH_ADVERTSTOP', 'a.date_stop', @$lists['order_Dir'], @$lists['order']); ?> </th> <th nowrap><?php echo JHTML::_('grid.sort', 'TH_ADVERTIMPRESSIONS', 'a.impmade', @$lists['order_Dir'], @$lists['order']); ?> </th> <th nowrap><?php echo JHTML::_('grid.sort', 'TH_ADVERTCLICKS', 'a.clicks', @$lists['order_Dir'], @$lists['order']); ?> </th> <th nowrap><?php echo JHTML::_('grid.sort', 'TH_ADVERTCLICKRATIO', 'percent_clicks', @$lists['order_Dir'], @$lists['order']); ?> </th> <?php /* if($filters['group_id']){ ?> <th nowrap><?php echo JHTML::_('grid.sort', 'Order', 'idx_group.ordering', @$lists['order_Dir'], @$lists['order'] ); ?> <?php if($ordering) echo JHTML::_('grid.order', $rows, 'filesave.png', 'advert.order' ); ?></th> <?php } */ ?> <th nowrap><?php echo JHTML::_('grid.sort', 'Published', 'a.published', @$lists['order_Dir'], @$lists['order']); ?> </th> <th nowrap><?php echo JText::_('TH_ADVERTFILTERS'); ?> <?php echo $lists['showall']; ?> </th> <th nowrap><?php echo JHTML::_('grid.sort', 'ID', 'a.id', @$lists['order_Dir'], @$lists['order']); ?> </th> </tr> </thead> <tbody> <?php if (!count($rows)) { echo '<tr><td colspan="16"><h1 class="alert_msg">' . JText::_('LIST_NOADVERTS') . '</h1></td></tr>'; } $k = 0; for ($i = 0, $n = count($rows); $i < $n; $i++) { $row =& $rows[$i]; $link = 'index.php?option=' . $option . '&task=advert.edit&hidemainmenu=1&id=' . $row->id; $link_group = 'index.php?option=' . $option . '&task=group.edit&hidemainmenu=1&id=' . $row->group_id; $link_client = 'index.php?option=' . $option . '&task=client.edit&hidemainmenu=1&id=' . $row->client_id; $task = $row->published ? 'advert.unpublish' : 'advert.publish'; $state = $row->published ? 'publish' : 'unpublish'; $alt = $row->published ? JText::_('Published') : JText::_('Unpublished'); if ($row->code) { $type_name = 'Code'; } else { if ($row->file_type) { $type_name = strtoupper($row->file_type) . '(' . $row->width . 'x' . $row->height . ')'; } else { $type_name = '-'; } } $nullDate = $db->getNullDate(); $checked = JHTML::_('grid.checkedout', $row, $i); ?> <tr class="<?php echo "row{$k}"; ?> " sortable-group-id="<?php echo (int) $filters['group_id']; ?> "> <?php if ($filters['group_id']) { ?> <td class="order nowrap center hidden-phone"> <?php if ($canDo->get('core.edit.state')) { $disableClassName = ''; $disabledLabel = ''; if (!$saveOrder) { $disabledLabel = JText::_('JORDERINGDISABLED'); $disableClassName = 'inactive tip-top'; } ?> <span class="sortable-handler hasTooltip <?php echo $disableClassName; ?> " title="<?php echo $disabledLabel; ?> "> <i class="icon-menu"></i> </span> <input type="text" style="display:none" name="order[]" size="5" value="<?php echo $row->ordering; ?> " class="width-20 text-area-order " /> <?php } else { ?> <span class="sortable-handler inactive" > <i class="icon-menu"></i> </span> <?php } ?> </td> <?php } ?> <td><?php echo $pageNav->getRowOffset($i); ?> </td> <td><?php echo $checked; ?> </td> <td align="left"><?php if ($row->checked_out && $row->checked_out != $my->id) { echo $row->name; } else { echo '<a href="' . $link . '" title="' . JText::sprintf('BTN_EDIT', JText::_('Advertisement')) . '">' . $row->name . '</a>'; } ?> </td> <td><a href="<?php echo $link_client; ?> " title="<?php echo JText::sprintf('BTN_EDIT', JText::_('Client')); ?> "><?php echo $row->client_name; ?> </a></td> <td><?php $idx_group_links = array(); if (strlen($row->idx_groups)) { $idx_groups = explode(',', $row->idx_groups); foreach ($lists['group_rows'] as $group_row) { if ($group_row->id && in_array($group_row->id, $idx_groups)) { $idx_group_links[] = '<a href="index.php?option=' . $option . '&task=group.edit&hidemainmenu=1&id=' . $group_row->id . '" title="' . JText::sprintf('BTN_EDIT', JText::_('Group')) . '">' . $group_row->name . '</a>'; } } } if (count($idx_group_links)) { echo implode(', ', $idx_group_links); } else { echo JText::_('FT_NONE'); } ?> </td> <td><?php echo $type_name; ?> </td> <td><?php echo $row->date_start == $nullDate ? 'Never' : JHTML::_('date', $row->date_start, JText::_('DATE_FORMAT_LC4')); ?> </td> <td><?php echo $row->date_stop == $nullDate ? 'Never' : JHTML::_('date', $row->date_stop, JText::_('DATE_FORMAT_LC4')); ?> </td> <td><?php echo $row->impmade . ' of ' . ($row->imptotal ? $row->imptotal : 'unlimited'); ?> </td> <td><?php echo $row->clicks; ?> </td> <td><?php echo $row->percent_clicks; ?> </td> <?php /* if($filters['group_id']){ ?> <td class="order"> <span><?php echo $pageNav->orderUpIcon( $i, ($row->group_id == @$rows[$i-1]->group_id), 'advert.orderup', $ordering ); ?></span> <span><?php echo $pageNav->orderDownIcon( $i, $n, ($row->group_id == @$rows[$i+1]->group_id), 'advert.orderdn', $ordering ); ?></span> <input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?>" <?php echo $ordering ? '' : 'disabled="disabled'; ?> class="text_area" style="text-align: center" /> </td> <?php } */ ?> <td> <a class="btn btn-micro hasTooltip" title="" onclick="return listItemTask('cb<?php echo $i; ?> ','<?php echo $task; ?> ')" title="<?php echo $alt; ?> " href="javascript:void(0);"> <i class="icon-<?php echo $state; ?> "></i> </a> </td> <td><?php if ($row->filters == 'na') { echo '-'; } elseif (!$row->num_menu && !$row->num_category && !$row->num_content) { echo JText::_('FT_NONE'); } else { if ($row->num_menu) { echo $row->num_menu . ' ' . JText::_('FT_MENUS') . '<br/>'; } if ($row->num_category) { echo $row->num_category . ' ' . JText::_('FT_CATEGORIES') . '<br/>'; } if ($row->num_content) { echo $row->num_content . ' ' . JText::_('FT_ARTICLES') . '<br/>'; } } ?> </td> <td><?php echo $row->id; ?> </td> </tr> <?php $k = 1 - $k; } ?> </tbody> <tfoot> <tr> <td colspan="16"><?php echo $pageNav->getListFooter(); ?> </td> </tr> </tfoot> </table> <input type="hidden" name="task" value="advert"> <input type="hidden" name="boxchecked" value="0"> <?php echo JHtml::_('form.token'); ?> </form> <?php }
<div class="control-group"> <label class="control-label" for="ngaydangky_nhucaudaotao">Ngày đăng ký</label> <div class="controls"> <input type="text" class="required" readonly="readonly" id="ngaydangky_nhucaudaotao" name="ngaydangky_nhucaudaotao" value="<?php echo date('d/m/Y'); ?> " /> </div> </div> </div> <div style="clear: both;"></div> <input type="hidden" id="empid" name="empid" value="<?php if (isset($data_nhucaudaotao[0]->empid)) { echo $data_nhucaudaotao[0]->empid; } else { echo $model->getEmpidByJos(jFactory::getUser()->id); } ?> " /> <input type="hidden" id="name_loaitrinhdo" name="name_loaitrinhdo" value="<?php echo $data_nhucaudaotao[0]->name_loaitrinhdo; ?> " /> <input type="hidden" id="name_trinhdo" name="name_trinhdo" value="<?php echo $data_nhucaudaotao[0]->name_trinhdo; ?> " /> <input type="hidden" id="name_chuyennganh" name="name_chuyennganh" value="<?php echo $data_nhucaudaotao[0]->name_chuyennganh; ?> " />
function client_list(&$rows, &$pageNav, $option, &$lists) { $my = jFactory::getUser(); JHTML::_('behavior.tooltip'); ?> <style> .adminlist thead tr th { text-align:left; } .adminlist thead th:nth-child(6), .adminlist thead th:nth-child(7), .adminlist thead th:nth-child(8), .adminlist thead th:last-child { text-align:center!important; } .adminlist tbody td:nth-child(6), .adminlist tbody td:nth-child(7), .adminlist tbody td:nth-child(8), .adminlist tbody td:last-child { text-align:center!important; } </style> <form action="<?php echo JRoute::_('index.php?option=com_wbadvert&task=client'); ?> " method="post" name="adminForm" id="adminForm"> <input type="hidden" name="filter_order" value="<?php echo $lists['order']; ?> " /> <input type="hidden" name="filter_order_Dir" value="<?php echo $lists['order_Dir']; ?> " /> <table class="adminList table table-striped" id="wbadvertList"> <thead> <tr> <th width="20">#</th> <th width="20"><input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count($rows); ?> );" /></th> <th nowrap><?php echo JHTML::_('grid.sort', 'TH_CLIENTNAME', 'c.name', @$lists['order_Dir'], @$lists['order']); ?> </th> <th nowrap><?php echo JHTML::_('grid.sort', 'TH_CLIENTCONTACT', 'c.contact', @$lists['order_Dir'], @$lists['order']); ?> </th> <th nowrap><?php echo JHTML::_('grid.sort', 'TH_CLIENTEMAIL', 'c.email', @$lists['order_Dir'], @$lists['order']); ?> </th> <th nowrap><?php echo JHTML::_('grid.sort', 'TH_CLIENTADVERTS', 'total_banners', @$lists['order_Dir'], @$lists['order']); ?> </th> <th nowrap><?php echo JHTML::_('grid.sort', 'TH_CLIENTIMPRESSIONS', 'total_impmade', @$lists['order_Dir'], @$lists['order']); ?> </th> <th nowrap><?php echo JHTML::_('grid.sort', 'TH_CLIENTCLICKS', 'total_clicks', @$lists['order_Dir'], @$lists['order']); ?> </th> <th nowrap><?php echo JHTML::_('grid.sort', 'Published', 'a.published', @$lists['order_Dir'], @$lists['order']); ?> </th> </tr> </thead> <tbody> <?php if (!count($rows)) { echo '<tr><td colspan="9"><h1 class="alert_msg">' . JText::_('LIST_NOCLIENTS') . '</h1></td></tr>'; } $k = 0; for ($i = 0, $n = count($rows); $i < $n; $i++) { $row =& $rows[$i]; $link = 'index.php?option=com_wbadvert&task=client.edit&hidemainmenu=1&id=' . $row->id; $task = $row->published ? 'client.unpublish' : 'client.publish'; $state = $row->published ? 'publish' : 'unpublish'; $img = $row->published ? 'publish_g.png' : 'publish_x.png'; $alt = $row->published ? JText::_('Published') : JText::_('Unpublished'); $checked = JHTML::_('grid.checkedout', $row, $i); ?> <tr class="<?php echo "row{$k}"; ?> "> <td width="1%"><?php echo $pageNav->getRowOffset($i); ?> </td> <td width="1%"><?php echo $checked; ?> </td> <td> <?php if ($row->checked_out && $row->checked_out != $my->id) { echo $row->name; } else { echo '<a href="' . $link . '" title="' . JText::sprintf('BTN_EDIT', JText::_('Client')) . '">' . $row->name . '</a>'; } ?> </td> <td><?php echo $row->contact; ?> </td> <td><a href="mailto:<?php echo $row->email; ?> " title="<?php echo JText::sprintf('BTN_EMAIL', JText::_('Client')); ?> "><?php echo $row->email; ?> </a></td> <td><?php echo $row->total_banners; ?> </td> <td><?php echo $row->total_impmade; ?> </td> <td><?php echo $row->total_clicks; ?> </td> <td> <a class="btn btn-micro hasTooltip" title="" onclick="return listItemTask('cb<?php echo $i; ?> ','<?php echo $task; ?> ')" title="<?php echo $alt; ?> " href="javascript:void(0);"> <i class="icon-<?php echo $state; ?> "></i> </a> </td> </tr> <?php $k = 1 - $k; } ?> </tbody> <tfoot> <tr> <td colspan="13"><?php echo $pageNav->getListFooter(); ?> </td> </tr> </tfoot> </table> <input type="hidden" name="task" value="client"> <input type="hidden" name="boxchecked" value="0"> <?php echo JHtml::_('form.token'); ?> </form> <?php }
/** * * @param array $params An object containing the module parameters * @access public */ public static function getCart($params) { $document = jFactory::getDocument(); $document->addScript('media/zoo/applications/product/elements/cart/assets/js/jquery.cookie.js'); $document->addScript('media/zoo/applications/product/elements/cart/assets/js/cart.js'); }