コード例 #1
0
ファイル: controller.php プロジェクト: jputz12/OneNow-Vshop
 function display($cachable = true, $urlparams = null)
 {
     $app = JFactory::getApplication();
     $view = $app->input->get('view');
     $id = $app->input->getInt('id');
     if ($view == 'itemform' && !$this->checkEditId('com_djcatalog2.edit.itemform', $id)) {
         $app->redirect(JRoute::_(DJCatalogHelperRoute::getMyItemsRoute(), false), JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
         return true;
     }
     $noncachable = array('itemform', 'myitems', 'cart', 'order', 'orders', 'quote');
     if (in_array($view, $noncachable)) {
         $cachable = false;
     }
     DJCatalog2ThemeHelper::setThemeAssets();
     $urlparams = array('id' => 'STRING', 'cid' => 'STRING', 'pid' => 'STRING', 'aid' => 'STRING', 'search' => 'STRING', 'task' => 'STRING', 'order' => 'STRING', 'dir' => 'STRING', 'cm' => 'INT', 'l' => 'STRING', 'Itemid' => 'INT', 'limit' => 'UINT', 'limitstart' => 'UINT', 'start' => 'UINT', 'lang' => 'CMD', 'tmpl' => 'CMD', 'ind' => 'RAW', 'template' => 'STRING', 'price_from' => 'STRING', 'price_to' => 'STRING', 'type' => 'STRING', 'print' => 'INT', 'pdf' => 'INT', 'layout' => 'STRING', 'ms_unit' => 'STRING', 'ms_radius' => 'INT', 'mapsearch' => 'STRING', 'eid' => 'STRING', 'ecid' => 'STRING');
     $db = JFactory::getDbo();
     $db->setQuery('select alias from #__djc2_items_extra_fields where type=\'checkbox\' or type=\'radio\' or type=\'select\'');
     $extra_fields = $db->loadColumn();
     if (count($extra_fields) > 0) {
         foreach ($extra_fields as $extra_field) {
             $urlparams['f_' . $extra_field] = 'RAW';
             // stupid, stupid, stupid me
             $urlparams[str_replace('-', '_', 'f_' . $extra_field)] = 'RAW';
         }
     }
     parent::display($cachable, $urlparams);
 }
コード例 #2
0
ファイル: mod_djc2items.php プロジェクト: ForAEdesWeb/AEW4
 *
 */
defined('_JEXEC') or die('Restricted access');
if (!defined('DS')) {
    define('DS', DIRECTORY_SEPARATOR);
}
require_once dirname(__FILE__) . DS . 'helper.php';
require_once JPATH_BASE . DS . 'components' . DS . 'com_djcatalog2' . DS . 'defines.djcatalog2.php';
require_once JPATH_BASE . DS . 'components' . DS . 'com_djcatalog2' . DS . 'helpers' . DS . 'route.php';
require_once JPATH_BASE . DS . 'components' . DS . 'com_djcatalog2' . DS . 'helpers' . DS . 'html.php';
require_once JPATH_BASE . DS . 'components' . DS . 'com_djcatalog2' . DS . 'helpers' . DS . 'theme.php';
require_once JPATH_BASE . DS . 'administrator' . DS . 'components' . DS . 'com_djcatalog2' . DS . 'lib' . DS . 'categories.php';
require_once JPATH_BASE . DS . 'administrator' . DS . 'components' . DS . 'com_djcatalog2' . DS . 'helpers' . DS . 'image.php';
$document = JFactory::getDocument();
$module_id = $module->id;
DJCatalog2ThemeHelper::setThemeAssets();
$module_css = array();
$module_float = $params->get('module_float', '');
$module_width = $params->get('module_width', '');
$module_height = $params->get('module_height', '');
$module_text_align = $params->get('module_text_align', '');
if ($module_float == 'left') {
    $module_css[] = 'float: left;';
    //$module_css[] = 'clear: right;';
    $module_css[] = 'margin: auto;';
} else {
    if ($module_float == 'right') {
        $module_css[] = 'float: right;';
        //$module_css[] = 'clear: left;';
        $module_css[] = 'margin: auto;';
    }