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


PHP JHTML::Script方法代码示例

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


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

示例1: display

 public function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $Itemid = JRequest::getInt('Itemid');
     $user = JFactory::getUser();
     $session = JFactory::getSession();
     $auth = $session->get('auth');
     if ($user->id || isset($auth['users_info_id']) && $auth['users_info_id'] > 0) {
         $app->Redirect('index.php?option=com_redshop&view=account&Itemid=' . $Itemid);
     }
     $params = $app->getParams('com_redshop');
     JHTML::Script('joomla.javascript.js', 'includes/js/', false);
     JHTML::Script('jquery-1.4.2.min.js', 'components/com_redshop/assets/js/', false);
     JHTML::Script('jquery.validate.js', 'components/com_redshop/assets/js/', false);
     JHTML::Script('common.js', 'components/com_redshop/assets/js/', false);
     JHTML::Script('jquery.metadata.js', 'components/com_redshop/assets/js/', false);
     JHTML::Script('registration.js', 'components/com_redshop/assets/js/', false);
     JHTML::Stylesheet('validation.css', 'components/com_redshop/assets/css/');
     $field = new extraField();
     // Field_section 7 : Customer Registration
     $lists['extra_field_user'] = $field->list_all_field(7);
     // Field_section 8 : Company Address
     $lists['extra_field_company'] = $field->list_all_field(8);
     $this->lists = $lists;
     $this->params = $params;
     parent::display($tpl);
 }
开发者ID:,项目名称:,代码行数:27,代码来源:

示例2: display

 function display($tpl = null)
 {
     global $mainframe;
     $mainframe = JFactory::getApplication();
     $params = $mainframe->getparams();
     $groupeid = JRequest::getVar('groupid');
     $profiletypeid = JRequest::getVar('profiletypeid');
     $doc = JFactory::getDocument();
     $doc->addStyleSheet("components/com_redsocialstream/assets/css/redsocialstream_group.css");
     JHTML::Script('jquery.js', 'components/com_redsocialstream/assets/js/', false);
     JHTML::_('behavior.mootools');
     JHTML::_('behavior.framework', true);
     $model = $this->getModel();
     if ($params->get('groupid') != array()) {
         $group = $model->getgroupdata($params->get('groupid'));
         $this->assignRef('groupinfo', $group);
     }
     $limit = JRequest::getVar('limit');
     if ($limit == "") {
         $limit = $params->get('feedlimit');
     }
     if ($profiletypeid == "") {
         if ($params->get('profiletypeid') != "") {
             $profiletypeid = $params->get('profiletypeid');
         }
     }
     $feedlists = $model->getfeedslist($groupeid, $profiletypeid);
     $this->feedlists = $feedlists;
     $this->posts = $model->getposts($groupeid, $profiletypeid, $limit);
     $this->profiletypeid = $profiletypeid;
     $this->limit = $limit;
     parent::display($tpl);
 }
开发者ID:prox91,项目名称:joomla-dev,代码行数:33,代码来源:view.html.php

示例3: display

 public function display($tpl = null)
 {
     JHTML::stylesheet(Juri::base() . 'media/openhrm/assets/css/stylesheet.css');
     JHTML::Script(Juri::base() . 'media/openhrm/assets/js/jwplayer/jwplayer.js');
     $this->lesson = $this->get("Items");
     $this->pagination = $this->get('Pagination');
     // Display the view
     parent::display($tpl);
 }
开发者ID:prox91,项目名称:joomla-dev,代码行数:9,代码来源:view.html.php

示例4: rsCarthelper

require_once JPATH_COMPONENT . '/helpers/product.php';
require_once JPATH_COMPONENT . '/helpers/cart.php';
require_once JPATH_COMPONENT . '/helpers/helper.php';
$carthelper = new rsCarthelper();
$producthelper = new producthelper();
$order_functions = new order_functions();
$redhelper = new redhelper();
$redTemplate = new Redtemplate();
$shippinghelper = new shipping();
$session = JFactory::getSession();
$document = JFactory::getDocument();
// Get redshop helper
$Itemid = $redhelper->getCheckoutItemid();
$model = $this->getModel('checkout');
$cart = $session->get('cart');
JHTML::Script('credit_card.js', 'components/com_redshop/assets/js/', false);
$billingaddresses = $model->billingaddresses();
if (!count($billingaddresses)) {
    $msg = JText::_('COM_REDSHOP_LOGIN_USER_IS_NOT_REDSHOP_USER');
    $app->Redirect("index.php?option=com_redshop&view=account_billto&return=checkout&Itemid=" . $Itemid, $msg);
}
$paymentmethod = $redhelper->getPlugins('redshop_payment');
$selpayment_method_id = 0;
if (count($paymentmethod) > 0) {
    $selpayment_method_id = $paymentmethod[0]->element;
}
$shippingBoxes = $shippinghelper->getShippingBox();
$selshipping_box_post_id = 0;
if (count($shippingBoxes) > 0) {
    $selshipping_box_post_id = $shippingBoxes[0]->shipping_box_id;
}
开发者ID:,项目名称:,代码行数:31,代码来源:

示例5: shippingrate_calc

 /**
  * 	shipping rate calculator
  */
 public function shippingrate_calc()
 {
     $document = JFactory::getDocument();
     JHTML::Script('commmon.js', 'components/com_redshop/assets/js/', false);
     $redConfig = new Redconfiguration();
     $countryarray = $redConfig->getCountryList();
     $post['country_code'] = $countryarray['country_code'];
     $conutry = $countryarray['country_dropdown'];
     $statearray = $redConfig->getStateList($post);
     $state = $statearray['state_dropdown'];
     $shipping_calc = "<form name='adminForm' id='adminForm'>";
     $shipping_calc .= "<label>" . JText::_('COM_REDSHOP_COUNTRY') . "</label><br />";
     $shipping_calc .= $conutry;
     $shipping_calc .= "<div id='div_state_lbl'><label>" . JText::_('COM_REDSHOP_STATE') . "</label></div>";
     $shipping_calc .= "<div id='div_state_txt'>" . $state . "</div>";
     $shipping_calc .= "<br />";
     $shipping_calc .= "<label>" . JText::_('COM_REDSHOP_ZIPCODE') . "</label><br />";
     $shipping_calc .= "<input type='text' name='zipcode' id='zip_code' />";
     $shipping_calc .= "<br />";
     $shipping_calc .= "<input class='blackbutton' type='button' name='shippingcalc' id='shippingcalc' value='" . JText::_('COM_REDSHOP_UPDATE') . "' onClick='javascript:getShippingrate();' />";
     $shipping_calc .= "</form>";
     return $shipping_calc;
 }
开发者ID:,项目名称:,代码行数:26,代码来源:

示例6: redCategoryMenu

    if ($jscookTree_style == "ThemeXP") {
        $jscook_tree = "ctThemeXP1";
    }
    if ($jscookTree_style == "ThemeNavy") {
        $jscook_tree = "ctThemeNavy";
    }
    JHTML::Script('JSCookTree.js', $js_src . '/', false);
    JHTML::Script('theme.js', $js_src . '/' . $jscookTree_style . '/', false);
    JHTML::Stylesheet('theme.css', $js_src . '/' . $jscookTree_style . '/');
    $_jscook = new redCategoryMenu();
} else {
    //JHTML::Script('JSCookMenu.js', $urlpath.'includes/js/',false);
    //JHTML::Script('theme.js', $urlpath.'includes/js/'.$jscookMenu_style.'/',false);
    //JHTML::Stylesheet('theme.css', $urlpath.'includes/js/'.$jscookMenu_style.'/');
    JHTML::Script('JSCookMenu.js', $js_src . '/JSCook/', false);
    JHTML::Script('theme.js', $js_src . '/JSCook/', false);
    JHTML::Stylesheet('theme.css', $js_src . '/JSCook/');
    $_jscook = new redCategoryMenu();
}
// create a unique tree identifier, in case multiple trees are used
// (max one per module)
$varname = "JSCook_" . uniqid($jscook_type . "_");
$menu_htmlcode = '<div align="left" class="mainlevel" id="div_' . $varname . '"></div>
<script type="text/javascript">
//<!--
function ' . $varname . '_addEvent( obj, type, fn )
{
   if (obj.addEventListener) {
      obj.addEventListener( type, fn, false );
   } else if (obj.attachEvent) {
      obj["e"+type+fn] = fn;
开发者ID:,项目名称:,代码行数:31,代码来源:

示例7: list_all_user_fields

    public function list_all_user_fields($field_section = "", $section_id = 12, $field_type = '', $idx = 'NULL', $isatt = 0, $product_id, $mywish = "", $addwish = 0)
    {
        $db = JFactory::getDbo();
        $session = JFactory::getSession();
        $cart = $session->get('cart');
        $url = JURI::base();
        $preprefix = "";
        if ($isatt == 1) {
            $preprefix = "ajax_";
        }
        $addtocartFormName = 'addtocart_' . $preprefix . 'prd_' . $product_id;
        $document = JFactory::getDocument();
        JHTML::Script('attribute.js', 'components/com_redshop/assets/js/', false);
        $q = "SELECT * FROM " . $this->_table_prefix . "fields " . "WHERE field_section = " . $db->quote($section_id) . " " . "AND field_name = " . $db->quote($field_section) . " " . "AND published = 1 " . "AND field_show_in_front = 1 " . "ORDER BY ordering ";
        $this->_db->setQuery($q);
        $row_data = $this->_db->loadObjectlist();
        $ex_field = '';
        $ex_field_title = '';
        for ($i = 0; $i < count($row_data); $i++) {
            $type = $row_data[$i]->field_type;
            $asterisk = $row_data[$i]->required > 0 ? '* ' : '';
            if ($field_type != 'hidden') {
                $ex_field_title .= '<div class="userfield_label">' . $asterisk . $row_data[$i]->field_title . '</div>';
            }
            $data_value = $this->getSectionFieldDataList($row_data[$i]->field_id, $field_section, $section_id);
            $text_value = '';
            if ($addwish == 1) {
                $text_value = $mywish;
            }
            if ($cart && isset($cart[$idx][$row_data[$i]->field_name])) {
                if ($type == 12) {
                    $text_value = date("d-m-Y", strtotime($cart[$idx][$row_data[$i]->field_name]));
                } else {
                    $text_value = $cart[$idx][$row_data[$i]->field_name];
                }
            }
            if ($field_type == 'hidden') {
                $ex_field .= '<input type="hidden" name="' . $row_data[$i]->field_name . '"  id="' . $row_data[$i]->field_name . '" value=""/>';
            } else {
                if ($row_data[$i]->required == 1) {
                    $req = ' required = "' . $row_data[$i]->required . '"';
                } else {
                    $req = '';
                }
                switch ($type) {
                    case 1:
                        // 1 :- Text Field
                        $onkeyup = '';
                        if (AJAX_CART_BOX == 0) {
                            $onkeyup = $addtocartFormName . '.' . $row_data[$i]->field_name . '.value = this.value';
                        }
                        $ex_field .= '<div class="userfield_input"><input class="' . $row_data[$i]->field_class . '" type="text" maxlength="' . $row_data[$i]->field_maxlength . '" onkeyup="var f_value = this.value;' . $onkeyup . '" name="extrafields' . $product_id . '[]"  id="' . $row_data[$i]->field_name . '" ' . $req . ' userfieldlbl="' . $row_data[$i]->field_title . '" value="' . $text_value . '" size="' . $row_data[$i]->field_size . '" /></div>';
                        break;
                    case 2:
                        // 2 :- Text Area
                        $onkeyup = '';
                        if (AJAX_CART_BOX == 0) {
                            $onkeyup = $addtocartFormName . '.' . $row_data[$i]->field_name . '.value = this.value';
                        }
                        $ex_field .= '<div class="userfield_input"><textarea class="' . $row_data[$i]->field_class . '"  name="extrafields' . $product_id . '[]"  id="' . $row_data[$i]->field_name . '" ' . $req . ' userfieldlbl="' . $row_data[$i]->field_title . '" cols="' . $row_data[$i]->field_cols . '" onkeyup=" var f_value = this.value;' . $onkeyup . '" rows="' . $row_data[$i]->field_rows . '" >' . $text_value . '</textarea></div>';
                        break;
                    case 3:
                        // 3 :- Check Box
                        $field_chk = $this->getFieldValue($row_data[$i]->field_id);
                        $chk_data = @explode(",", $cart[$idx][$row_data[$i]->field_name]);
                        for ($c = 0; $c < count($field_chk); $c++) {
                            $checked = '';
                            if (@in_array($field_chk[$c]->field_value, $chk_data)) {
                                $checked = ' checked="checked" ';
                            }
                            $ex_field .= '<div class="userfield_input"><input  class="' . $row_data[$i]->field_class . '" type="checkbox"  ' . $checked . ' name="extrafields' . $product_id . '[]" id="' . $row_data[$i]->field_name . "_" . $field_chk[$c]->value_id . '" userfieldlbl="' . $row_data[$i]->field_title . '" value="' . $field_chk[$c]->field_value . '" ' . $req . ' />' . $field_chk[$c]->field_value . '</div>';
                        }
                        break;
                    case 4:
                        // 4 :- Radio Button
                        $field_chk = $this->getFieldValue($row_data[$i]->field_id);
                        $chk_data = @explode(",", $cart[$idx][$row_data[$i]->field_name]);
                        for ($c = 0; $c < count($field_chk); $c++) {
                            $checked = '';
                            if (@in_array($field_chk[$c]->field_value, $chk_data)) {
                                $checked = ' checked="checked" ';
                            }
                            $ex_field .= '<div class="userfield_input"><input class="' . $row_data[$i]->field_class . '" type="radio" ' . $checked . ' name="extrafields' . $product_id . '[]" userfieldlbl="' . $row_data[$i]->field_title . '"  id="' . $row_data[$i]->field_name . "_" . $field_chk[$c]->value_id . '" value="' . $field_chk[$c]->field_value . '" ' . $req . ' />' . $field_chk[$c]->field_value . '</div>';
                        }
                        break;
                    case 5:
                        // 5 :-Select Box (Single select)
                        $field_chk = $this->getFieldValue($row_data[$i]->field_id);
                        $chk_data = @explode(",", $cart[$idx][$row_data[$i]->field_name]);
                        $ex_field .= '<div class="userfield_input"><select name="extrafields' . $product_id . '[]" ' . $req . ' id="' . $row_data[$i]->field_name . '" userfieldlbl="' . $row_data[$i]->field_title . '">';
                        $ex_field .= '<option value="">' . JText::_('COM_REDSHOP_SELECT') . '</option>';
                        for ($c = 0; $c < count($field_chk); $c++) {
                            if ($field_chk[$c]->field_value != "" && $field_chk[$c]->field_value != "-" && $field_chk[$c]->field_value != "0" && $field_chk[$c]->field_value != "select") {
                                $selected = '';
                                if (@in_array($field_chk[$c]->field_value, $chk_data)) {
                                    $selected = ' selected="selected" ';
                                }
                                $ex_field .= '<option value="' . $field_chk[$c]->field_value . '" ' . $selected . '   >' . $field_chk[$c]->field_value . '</option>';
                            }
                        }
//.........这里部分代码省略.........
开发者ID:,项目名称:,代码行数:101,代码来源:

示例8: urlencode

}
// Facebook I like Button
if (strstr($template_desc, "{facebook_like_button}")) {
    $uri = JFactory::getURI();
    $facebook_link = urlencode($uri->toString());
    $facebook_like = '<iframe src="' . $Scheme . '://www.facebook.com/plugins/like.php?href=' . $facebook_link . '&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;font&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>';
    $template_desc = str_replace("{facebook_like_button}", $facebook_like, $template_desc);
    $jconfig = JFactory::getConfig();
    $sitename = $jconfig->getValue('config.sitename');
    $this->document->setMetaData("og:url", $uri->toString());
    $this->document->setMetaData("og:type", "product");
    $this->document->setMetaData("og:site_name", $sitename);
}
// Google I like Button
if (strstr($template_desc, "{googleplus1}")) {
    JHTML::Script('plusone.js', 'https://apis.google.com/js/', false);
    $uri = JFactory::getURI();
    $google_like = '<g:plusone></g:plusone>';
    $template_desc = str_replace("{googleplus1}", $google_like, $template_desc);
}
if (strstr($template_desc, "{bookmark}")) {
    $bookmark = '<script type="text/javascript">addthis_pub = "AddThis";</script>';
    $bookmark .= '<a href="' . $Scheme . '://www.addthis.com/bookmark.php" onmouseover="return addthis_open(this, \'\', \'[URL]\', \'[TITLE]\')" onmouseout="addthis_close()" onclick="return addthis_sendto()">';
    $bookmark .= '<img src="' . $Scheme . '://s7.addthis.com/static/btn/lg-share-en.gif" alt="Share" border="0" height="16" width="125"></a>';
    $bookmark .= '<script type="text/javascript" src="' . $Scheme . '://s7.addthis.com/js/200/addthis_widget.js"></script>';
    $template_desc = str_replace("{bookmark}", $bookmark, $template_desc);
}
//  Extra field display
$extraFieldName = $extraField->getSectionFieldNameArray(1, 1, 1);
$template_desc = $producthelper->getExtraSectionTag($extraFieldName, $this->data->product_id, "1", $template_desc);
// Product thumb image
开发者ID:,项目名称:,代码行数:31,代码来源:

示例9: getDatas

 function getDatas()
 {
     if ($this->config['module_mode'] != 'normal') {
         if (!class_exists('NSP_GK4_' . $this->config['module_mode'])) {
             require_once dirname(__FILE__) . DS . 'gk_classes' . DS . 'portal_modes' . DS . 'gk.' . strtolower($this->config['module_mode']) . '.php';
         }
         //
         $method_name = $this->config['module_mode'] . '_getData';
         $this->content = $method_name($this);
     } else {
         $db = JFactory::getDBO();
         if ($this->config["data_source"] == "com_categories" || $this->config["data_source"] == "com_articles" || $this->config["data_source"] == "com_all_articles") {
             // getting instance of Joomla! com_content source class
             $newsClass = new NSP_GK4_Joomla_Source();
             // Getting list of categories
             $categories = $this->config["data_source"] != "com_all_articles" ? $newsClass->getSources($this->config) : false;
             // getting content
             $amountOfArts = $this->config['news_column'] * $this->config['news_rows'] * $this->config['news_full_pages'] + $this->config['links_amount'] * $this->config['news_short_pages'] * $this->config['links_columns_amount'];
             $this->content = $newsClass->getArticles($categories, $this->config, $amountOfArts);
         } else {
             if ($this->config["data_source"] == "k2_categories" || $this->config["data_source"] == "k2_tags" || $this->config["data_source"] == "k2_articles" || $this->config["data_source"] == "all_k2_articles") {
                 // getting insance of K2 source class
                 $newsClass = new NSP_GK4_K2_Source();
                 // Getting list of categories
                 $categories = $this->config["data_source"] != "all_k2_articles" ? $newsClass->getSources($this->config) : false;
                 // getting content
                 $amountOfArts = $this->config['news_column'] * $this->config['news_rows'] * $this->config['news_full_pages'] + $this->config['links_amount'] * $this->config['news_short_pages'] * $this->config['links_columns_amount'];
                 $this->content = $newsClass->getArticles($categories, $this->config, $amountOfArts);
                 $this->content['comments'] = $newsClass->getComments($this->content, $this->config);
             } else {
                 if ($this->config["data_source"] == "redshop_categories" || $this->config["data_source"] == "redshop_products" || $this->config["data_source"] == "all_redshop_products") {
                     if (file_exists(JPATH_ROOT . DS . 'components' . DS . 'com_redshop')) {
                         $newsClass = new NSP_GK4_Redshop_Source();
                         // get product helper
                         if (file_exists(JPATH_ROOT . DS . 'components' . DS . 'com_redshop' . DS . 'helpers' . DS . 'product.php')) {
                             require_once JPATH_ROOT . DS . 'components' . DS . 'com_redshop' . DS . 'helpers' . DS . 'product.php';
                         }
                         if (file_exists(JPATH_ROOT . DS . 'components' . DS . 'com_redshop' . DS . 'helpers' . DS . 'helper.php')) {
                             require_once JPATH_ROOT . DS . 'components' . DS . 'com_redshop' . DS . 'helpers' . DS . 'helper.php';
                         }
                         if (file_exists(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_redshop' . DS . 'helpers' . DS . 'category.php')) {
                             require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_redshop' . DS . 'helpers' . DS . 'category.php';
                         }
                         if ($this->config['rs_add_to_cart'] == 1) {
                             if (file_exists(JPATH_ROOT . DS . 'components' . DS . 'com_redshop' . DS . 'helpers' . DS . 'redshop.js.php')) {
                                 require_once JPATH_ROOT . DS . 'components' . DS . 'com_redshop' . DS . 'helpers' . DS . 'redshop.js.php';
                             }
                         }
                         // include scripts
                         if (file_exists('components/com_redshop/assets/js/') && $this->config['rs_add_to_cart'] == 1) {
                             JHTML::Script('attribute.js', 'components/com_redshop/assets/js/', false);
                             JHTML::Script('common.js', 'components/com_redshop/assets/js/', false);
                             //JHTML::Script('jquery.tools.min.js', 'components/com_redshop/assets/js/',false);
                         }
                         require_once JPATH_ROOT . DS . 'components' . DS . 'com_redshop' . DS . 'helpers' . DS . 'redshop.js.php';
                         $doc =& JFactory::getDocument();
                         $tmpl = JRequest::getCmd('tmpl');
                         $view = JRequest::getCmd('view');
                         $layout = JRequest::getCmd('layout');
                         $for = JRequest::getWord("for", false);
                         if ($tmpl == 'component' && !$for) {
                             $doc->addStyleDeclaration('html { overflow:scroll; }');
                         }
                         // 	Getting the configuration
                         require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_redshop' . DS . 'helpers' . DS . 'redshop.cfg.php';
                         require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_redshop' . DS . 'helpers' . DS . 'configuration.php';
                         $Redconfiguration = new Redconfiguration();
                         $Redconfiguration->defineDynamicVars();
                         require_once JPATH_SITE . DS . 'components' . DS . 'com_redshop' . DS . 'helpers' . DS . 'currency.php';
                         $session = JFactory::getSession('product_currency');
                         $post = JRequest::get('POST');
                         $Itemid = JRequest::getVar('Itemid');
                         if (isset($post['product_currency'])) {
                             $session->set('product_currency', $post['product_currency']);
                         }
                         $currency_symbol = REDCURRENCY_SYMBOL;
                         $currency_convert = 1;
                         if ($session->get('product_currency')) {
                             $currency_symbol = $session->get('product_currency');
                             $convertPrice = new convertPrice();
                             $currency_convert = $convertPrice->convert(1);
                         }
                         $script = "window.site_url ='" . JURI::root() . "';\n\t\t\t\t\twindow.AJAX_CART_BOX ='" . AJAX_CART_BOX . "';\n\t\t\t\t\twindow.REDSHOP_VIEW ='" . $view . "';\n\t\t\t\t\twindow.REDSHOP_LAYOUT ='" . $layout . "';\n\t\t\t\t\twindow.AJAX_CART_URL ='" . JRoute::_('index.php?option=com_redshop&view=cart&Itemid=' . $Itemid, false) . "';\n\t\t\t\t\twindow.REDCURRENCY_SYMBOL ='" . REDCURRENCY_SYMBOL . "';\n\t\t\t\t\twindow.CURRENCY_SYMBOL_CONVERT ='" . $currency_symbol . "';\n\t\t\t\t\twindow.CURRENCY_CONVERT ='" . $currency_convert . "';\n\t\t\t\t\twindow.PRICE_SEPERATOR ='" . PRICE_SEPERATOR . "';\n\t\t\t\t\twindow.PRODUCT_OUTOFSTOCK_MESSAGE ='" . JText::_('PRODUCT_OUTOFSTOCK_MESSAGE') . "';\n\t\t\t\t\twindow.PREORDER_PRODUCT_OUTOFSTOCK_MESSAGE ='" . JText::_('PREORDER_PRODUCT_OUTOFSTOCK_MESSAGE') . "';\n\t\t\t\t\twindow.CURRENCY_SYMBOL_POSITION ='" . CURRENCY_SYMBOL_POSITION . "';\n\t\t\t\t\twindow.PRICE_DECIMAL ='" . PRICE_DECIMAL . "';\n\t\t\t\t\twindow.PASSWORD_MIN_CHARACTER_LIMIT ='" . JText::_('PASSWORD_MIN_CHARACTER_LIMIT') . "';\n\t\t\t\t\twindow.THOUSAND_SEPERATOR ='" . THOUSAND_SEPERATOR . "';\n\t\t\t\t\twindow.VIEW_CART ='" . JText::_('VIEW_CART') . "';\n\t\t\t\t\twindow.CONTINUE_SHOPPING ='" . JText::_('CONTINUE_SHOPPING') . "';\n\t\t\t\t\twindow.CART_SAVE ='" . JText::_('CART_SAVE') . "';\n\t\t\t\t\twindow.IS_REQUIRED ='" . JText::_('IS_REQUIRED') . "';\n\t\t\t\t\twindow.ENTER_NUMBER ='" . JText::_('ENTER_NUMBER') . "';\n\t\t\t\t\twindow.USE_STOCKROOM ='" . USE_STOCKROOM . "';\n\t\t\t\t\twindow.USE_AS_CATALOG ='" . USE_AS_CATALOG . "';\n\t\t\t\t\twindow.AJAX_CART_DISPLAY_TIME ='" . AJAX_CART_DISPLAY_TIME . "';\n\t\t\t\t\twindow.SHOW_PRICE ='" . SHOW_PRICE . "';\n\t\t\t\t\twindow.DEFAULT_QUOTATION_MODE ='" . DEFAULT_QUOTATION_MODE . "';\n\t\t\t\t\twindow.PRICE_REPLACE ='" . PRICE_REPLACE . "';\n\t\t\t\t\twindow.PRICE_REPLACE_URL ='" . PRICE_REPLACE_URL . "';\n\t\t\t\t\twindow.ZERO_PRICE_REPLACE ='" . ZERO_PRICE_REPLACE . "';\n\t\t\t\t\twindow.ZERO_PRICE_REPLACE_URL ='" . ZERO_PRICE_REPLACE_URL . "';\n\t\t\t\t\twindow.OPTIONAL_SHIPPING_ADDRESS ='" . OPTIONAL_SHIPPING_ADDRESS . "';\n\t\t\t\t\twindow.SHIPPING_METHOD_ENABLE ='" . SHIPPING_METHOD_ENABLE . "';\n\t\t\t\t\twindow.PRODUCT_ADDIMG_IS_LIGHTBOX ='" . PRODUCT_ADDIMG_IS_LIGHTBOX . "';\n\t\t\t\t\twindow.ALLOW_PRE_ORDER ='" . ALLOW_PRE_ORDER . "';\n\t\t\t\t\twindow.ATTRIBUTE_SCROLLER_THUMB_WIDTH ='" . ATTRIBUTE_SCROLLER_THUMB_WIDTH . "';\n\t\t\t\t\twindow.ATTRIBUTE_SCROLLER_THUMB_HEIGHT ='" . ATTRIBUTE_SCROLLER_THUMB_HEIGHT . "';\n\t\t\t\t\twindow.PRODUCT_DETAIL_IS_LIGHTBOX ='" . PRODUCT_DETAIL_IS_LIGHTBOX . "';\n\t\t\t\t\twindow.PLEASE_ENTER_COMPANY_NAME ='" . JText::_('PLEASE_ENTER_COMPANY_NAME', true) . "';\n\t\t\t\t\twindow.YOUR_MUST_PROVIDE_A_FIRSTNAME ='" . JText::_('YOUR_MUST_PROVIDE_A_FIRSTNAME', true) . "';\n\t\t\t\t\twindow.YOUR_MUST_PROVIDE_A_LASTNAME ='" . JText::_('YOUR_MUST_PROVIDE_A_LASTNAME', true) . "';\n\t\t\t\t\twindow.YOUR_MUST_PROVIDE_A_ADDRESS ='" . JText::_('YOUR_MUST_PROVIDE_A_ADDRESS', true) . "';\n\t\t\t\t\twindow.YOUR_MUST_PROVIDE_A_ZIP ='" . JText::_('YOUR_MUST_PROVIDE_A_ZIP', true) . "';\n\t\t\t\t\twindow.YOUR_MUST_PROVIDE_A_CITY ='" . JText::_('YOUR_MUST_PROVIDE_A_CITY', true) . "';\n\t\t\t\t\twindow.YOUR_MUST_PROVIDE_A_PHONE ='" . JText::_('YOUR_MUST_PROVIDE_A_PHONE', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_REQUIRED ='" . JText::_('THIS_FIELD_REQUIRED', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_REMOTE ='" . JText::_('THIS_FIELD_REMOTE', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_URL='" . JText::_('THIS_FIELD_URL', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_DATE='" . JText::_('THIS_FIELD_DATE', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_DATEISO='" . JText::_('THIS_FIELD_DATEISO', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_NUMBER='" . JText::_('THIS_FIELD_NUMBER', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_DIGITS='" . JText::_('THIS_FIELD_DIGITS', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_CREDITCARD='" . JText::_('THIS_FIELD_CREDITCARD', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_EQUALTO='" . JText::_('THIS_FIELD_EQUALTO', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_ACCEPT='" . JText::_('THIS_FIELD_ACCEPT', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_MAXLENGTH='" . JText::_('THIS_FIELD_MAXLENGTH', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_MINLENGTH='" . JText::_('THIS_FIELD_MINLENGTH', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_RANGELENGTH='" . JText::_('THIS_FIELD_RANGELENGTH', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_RANGE='" . JText::_('THIS_FIELD_RANGE', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_MAX='" . JText::_('THIS_FIELD_MAX', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_MIN='" . JText::_('THIS_FIELD_MIN', true) . "';\n\t\t\t\t\twindow.YOU_MUST_PROVIDE_LOGIN_NAME ='" . JText::_('YOU_MUST_PROVIDE_LOGIN_NAME', true) . "';\n\t\t\t\t\twindow.PROVIDE_EMAIL_ADDRESS ='" . JText::_('PROVIDE_EMAIL_ADDRESS', true) . "';\n\t\t\t\t\twindow.EMAIL_NOT_MATCH ='" . JText::_('EMAIL_NOT_MATCH', true) . "';\n\t\t\t\t\twindow.PASSWORD_NOT_MATCH ='" . JText::_('PASSWORD_NOT_MATCH', true) . "';\n\t\t\t\t\twindow.NOOF_SUBATTRIB_THUMB_FOR_SCROLLER ='" . NOOF_SUBATTRIB_THUMB_FOR_SCROLLER . "';\n\t\t\t\t\twindow.NOT_AVAILABLE ='" . JText::_('NOT_AVAILABLE', true) . "';\n\t\t\t\t\twindow.PLEASE_INSERT_HEIGHT ='" . JText::_('PLEASE_INSERT_HEIGHT', true) . "';\n\t\t\t\t\twindow.PLEASE_INSERT_WIDTH ='" . JText::_('PLEASE_INSERT_WIDTH', true) . "';\n\t\t\t\t\twindow.PLEASE_INSERT_DEPTH ='" . JText::_('PLEASE_INSERT_DEPTH', true) . "';\n\t\t\t\t\twindow.PLEASE_INSERT_RADIUS ='" . JText::_('PLEASE_INSERT_RADIUS', true) . "';\n\t\t\t\t\twindow.PLEASE_INSERT_UNIT ='" . JText::_('PLEASE_INSERT_UNIT', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_IS_REQUIRED ='" . JText::_('THIS_FIELD_IS_REQUIRED', true) . "';\n\t\t\t\t\twindow.CREATE_ACCOUNT_CHECKBOX ='" . CREATE_ACCOUNT_CHECKBOX . "';\n\t\t\t\t\twindow.SHOW_QUOTATION_PRICE ='" . SHOW_QUOTATION_PRICE . "';";
                         $document = JFactory::getDocument();
                         $document->addScriptDeclaration($script);
                         // Getting list of categories
                         $categories = $newsClass->getSources($this->config);
                         // getting content
                         $amountOfProducts = $this->config['news_column'] * $this->config['news_rows'] * $this->config['news_full_pages'] + $this->config['links_amount'] * $this->config['news_short_pages'] * $this->config['links_columns_amount'];
                         $this->content = $newsClass->getArticles($categories, $this->config, $amountOfProducts);
                     }
                 } else {
                     // VM block
                     $newsClass = new NSP_GK4_VM_Source();
                     // Getting list of categories
                     $categories = $newsClass->getSources($this->config);
                     // getting content
                     $amountOfProducts = $this->config['news_column'] * $this->config['news_rows'] * $this->config['news_full_pages'] + $this->config['links_amount'] * $this->config['news_short_pages'] * $this->config['links_columns_amount'];
                     $this->content = $newsClass->getProducts($categories, $this->config, $amountOfProducts);
                     $this->content['comments'] = $newsClass->getComments($this->content, $this->config);
//.........这里部分代码省略.........
开发者ID:shuramita,项目名称:anhquanggffl,代码行数:101,代码来源:helper.php

示例10: displayredManufacturer

        /**
         * Display Product Data
         */
        function displayredManufacturer($limit = 0)
        {
            $uri = JUri::getInstance();
            $url = $uri->root();
            $database = JFactory::getDbo();
            $Itemid = JRequest::getInt('Itemid', 0);
            $extra_data = new producthelper();
            $document = JFactory::getDocument();
            JHTML::Script('jquery-1.js', 'modules/mod_redmanufacturer/js/', false);
            JHTML::Script('jquery.js', 'modules/mod_redmanufacturer/js/', false);
            JHTML::Stylesheet('jquery.css', 'modules/mod_redmanufacturer/css/');
            echo $this->params->get('pretext', "");
            $qlimit = "";
            if ($limit > 0) {
                $qlimit = "LIMIT {$limit}";
            }
            $query = "SELECT m.media_name,ma.manufacturer_name,ma.manufacturer_id FROM #__redshop_manufacturer as ma " . "LEFT JOIN #__redshop_media AS m ON m.`section_id`=ma.manufacturer_id " . "WHERE m.media_section='manufacturer' " . "AND m.published=1 " . "AND ma.published=1 " . $qlimit;
            $database->setQuery($query);
            $rows = $database->loadObjectList();
            ?>

	<script type="text/javascript">
		var dom1 = {};
		dom1.query = jQuery.noConflict(true);
		var mycarousel_itemList = [
			<?php 
            for ($i = 0; $i < count($rows); $i++) {
                $thumbUrl = RedShopHelperImages::getImagePath($rows[$i]->media_name, '', 'thumb', 'manufacturer', $this->ImageWidth, $this->ImageHeight, USE_IMAGE_SIZE_SWAPPING);
                ?>
			{url: "<?php 
                echo $thumbUrl;
                ?>
", title: '<?php 
                echo $rows[$i]->manufacturer_name;
                ?>
', ahref: '<a href="<?php 
                echo JRoute::_('index.php?option=com_redshop&view=manufacturers&layout=' . $this->PageLink . '&mid=' . $rows[$i]->manufacturer_id . '&Itemid=' . $Itemid);
                ?>
"  title="<?php 
                echo $rows[$i]->manufacturer_name;
                ?>
">'}
			<?php 
                if ($i < count($rows) - 1) {
                    ?>
			,
			<?php 
                }
            }
            ?>
		];

		function mycarousel_itemVisibleInCallback(carousel, item, i, state, evt) {
			// The index() method calculates the index from a
			// given index who is out of the actual item range.

			var idx = carousel.index(i, mycarousel_itemList.length);
			carousel.add(i, mycarousel_getItemHTML(mycarousel_itemList[idx - 1]));
		}
		;

		function mycarousel_itemVisibleOutCallback(carousel, item, i, state, evt) {
			carousel.remove(i);
		}
		;

		/**
		 * Item html creation helper.
		 */
		function mycarousel_getItemHTML(item) {
			var displayItem = '';
			<?php 
            if ($this->show_image == 1) {
                ?>
			displayItem = displayItem + item.ahref + '<img src="' + item.url + '" width="<?php 
                echo $this->ImageWidth;
                ?>
" height="<?php 
                echo $this->ImageHeight;
                ?>
" alt="' + item.title + '" /></a><br/>';
			<?php 
            }
            if ($this->show_link_on_product_name == 1) {
                ?>
			displayItem = displayItem + item.ahref;

			<?php 
            }
            if ($this->show_product_name == 1) {
                ?>
			displayItem = displayItem + '<div align="center">' + item.title + '</div>';
			<?php 
            }
            if ($this->show_link_on_product_name == 1) {
                ?>
			displayItem = displayItem + '</a>';
//.........这里部分代码省略.........
开发者ID:,项目名称:,代码行数:101,代码来源:

示例11: defined

 *
 * @version $Id: view.html.php 2010-06-02 12:34:25 svn $
 * @author 
 * @package Joomla
 * @subpackage Listings
 * @license Copyright (c) 2010 - All Rights Reserved
 *
 * 
 *
 */
// no direct access
defined('_JEXEC') or die('Restricted access');
//initializing variables
$media = "components/" . EBOOK_COMPONENT . "/media/";
//loading media
JHTML::Script('searchbar.js', $media . 'js/');
?>
<div class="search_wrapper">
	<div class="search_container">
		<div class="search_settings">
			<form action="?option=com_byrdlist&view=listings" id="basic_search" method="post">
				<div class="search_left"></div>
				<div class="search_mid">
					<div class="mid_top">
						<b>Find</b>
						<input type="text" id="filter" name="search_filter" onKeyUp="javascript: _search();" />
						<!-- 
						<b>in</b>
						<select id="select_categories" name="_categories_id">
							<option></option>
						</select>
开发者ID:Jonathonbyrd,项目名称:Joomla-Listings,代码行数:31,代码来源:search_bar.php

示例12: rsUserhelper

$uname = '';
$uemail = '';
$address = '';
$telephone = '';
$user = JFactory::getUser();
if ($user->id) {
    $uname = $user->name;
    $uemail = $user->email;
}
$Itemid = JRequest::getInt('Itemid');
$pid = JRequest::getInt('pid');
$ask = JRequest::getInt('ask');
$category_id = JRequest::getInt('category_id');
$document = JFactory::getDocument();
$userhelper = new rsUserhelper();
JHTML::Script('jquery.tools.min.js', 'components/com_redshop/assets/js/', false);
$template = $redTemplate->getTemplate('ask_question_template');
if (count($template) > 0 && $template[0]->template_desc != "") {
    $template_desc = $template[0]->template_desc;
} else {
    $template_desc = '<table border="0"><tbody><tr><td>{user_name_lbl}</td><td>{user_name}</td></tr><tr><td>{user_email_lbl}</td><td>{user_email}</td></tr><tr><td>{user_question_lbl}</td><td>{user_question}</td></tr><tr><td></td><td>{send_button}</td></tr></tbody></table>';
}
?>
<script type="text/javascript" language="javascript">var J = jQuery.noConflict();</script>
<script type="text/javascript" language="javascript">
	function validateQuestion() {
		var frm = document.frmaskquestion;

		if (frm.your_name.value == '') {
			alert("<?php 
echo JText::_('COM_REDSHOP_PLEASE_ENTER_YOUR_NAME');
开发者ID:,项目名称:,代码行数:31,代码来源:

示例13: payment

    /**
     *  payment function
     *
     * @return void
     */
    public function payment()
    {
        $app = JFactory::getApplication();
        $redconfig = new Redconfiguration();
        $Itemid = JRequest::getVar('Itemid');
        $order_id = JRequest::getInt('order_id');
        $option = JRequest::getVar('option');
        $order = $this->_order_functions->getOrderDetails($order_id);
        $paymentInfo = $this->_order_functions->getOrderPaymentDetail($order_id);
        if (count($paymentInfo) > 0) {
            $paymentmethod = $this->_order_functions->getPaymentMethodInfo($paymentInfo[0]->payment_method_class);
            if (count($paymentmethod) > 0) {
                $paymentparams = new JRegistry($paymentmethod[0]->params);
                $is_creditcard = $paymentparams->get('is_creditcard', 0);
                if ($is_creditcard) {
                    JHTML::Script('credit_card.js', 'components/com_redshop/assets/js/', false);
                    ?>

				<form action="<?php 
                    echo JRoute::_('index.php?option=com_redshop&view=checkout');
                    ?>
" method="post"
				      name="adminForm" id="adminForm" enctype="multipart/form-data"
				      onsubmit="return CheckCardNumber(this);">
					<?php 
                    echo $cardinfo = $this->_carthelper->replaceCreditCardInformation($paymentInfo[0]->payment_method_class);
                    ?>
					<div style="float: right;">
						<input type="hidden" name="option" value="com_redshop"/>
						<input type="hidden" name="Itemid" value="<?php 
                    echo $Itemid;
                    ?>
"/>
						<input type="hidden" name="task" value="process_payment"/>
						<input type="hidden" name="view" value="order_detail"/>
						<input type="submit" name="submit" class="greenbutton"
						       value="<?php 
                    echo JText::_('COM_REDSHOP_PAY');
                    ?>
"/>
						<input type="hidden" name="ccinfo" value="1"/>
						<input type="hidden" name="users_info_id" value="<?php 
                    echo $order->user_info_id;
                    ?>
"/>
						<input type="hidden" name="order_id" value="<?php 
                    echo $order->order_id;
                    ?>
"/>
						<input type="hidden" name="payment_method_id"
						       value="<?php 
                    echo $paymentInfo[0]->payment_method_class;
                    ?>
"/>
					</div>
					</form><?php 
                } else {
                    $link = 'index.php?option=com_redshop&view=order_detail&layout=checkout_final&oid=' . $order_id . '&Itemid=' . $Itemid;
                    $this->setRedirect($link);
                }
            }
        }
    }
开发者ID:,项目名称:,代码行数:68,代码来源:

示例14: defined

defined('_JEXEC') or die('Restricted access');
$option = JRequest::getCmd('option');
$session = JFactory::getSession();
$cart = $session->get('cart');
$count = 0;
if (isset($cart['idx'])) {
    $count = $cart['idx'];
}
require_once JPATH_ROOT . '/administrator/components/com_redshop/helpers/redshop.cfg.php';
require_once JPATH_ADMINISTRATOR . '/components/com_redshop/helpers/configuration.php';
$Redconfiguration = new Redconfiguration();
$Redconfiguration->defineDynamicVars();
$user = JFactory::getUser();
$document = JFactory::getDocument();
$document->addScriptDeclaration("\n\t\tvar base_url = '" . JURI::root() . "';\n\t");
JHTML::Script('search.js', 'modules/mod_redshop_search/js/', false);
$enableAjaxsearch = trim($params->get('enableAjaxsearch', '0'));
$javaFun = "";
if ($enableAjaxsearch) {
    $document->addScript(JURI::base() . "administrator/components/com_redshop/assets/js/search.js");
    $document->addStyleSheet(JURI::base() . "administrator/components/com_redshop/assets/css/search.css");
    $javaFun = "makeUrl();";
}
$db = JFactory::getDbo();
if ($user->id > 0) {
    $query = "SELECT sg.shopper_group_categories FROM `#__redshop_shopper_group` as sg LEFT JOIN #__redshop_users_info as uf ON sg.`shopper_group_id` = uf.shopper_group_id WHERE uf.user_id = " . (int) $user->id . " GROUP BY sg.shopper_group_id  AND sg.shopper_group_portal=1";
} else {
    $query = "SELECT sg.shopper_group_categories FROM `#__redshop_shopper_group` as sg WHERE  sg.`shopper_group_id` = '" . SHOPPER_GROUP_DEFAULT_UNREGISTERED . "' AND sg.shopper_group_portal=1";
}
$db->setQuery($query);
$shoppercatdata = $db->loadResult();
开发者ID:,项目名称:,代码行数:31,代码来源:

示例15: producthelper

include_once JPATH_COMPONENT . '/helpers/product.php';
include_once JPATH_COMPONENT . '/helpers/cart.php';
$producthelper = new producthelper();
$carthelper = new rsCarthelper();
$redTemplate = new Redtemplate();
$cart = $this->cart;
$idx = $cart['idx'];
$Itemid = JRequest::getInt('Itemid');
$cart_index = JRequest::getInt('cart_index');
$product_id = JRequest::getInt('pid');
$model = $this->getModel('cart');
$session = JFactory::getSession();
$user = JFactory::getUser();
$document = JFactory::getDocument();
JHTML::Script('attribute.js', 'components/com_redshop/assets/js/', false);
JHTML::Script('common.js', 'components/com_redshop/assets/js/', false);
?>
	<script type="text/javascript">
		function cancelForm(frm) {
			frm.task.value = 'cancel';
			frm.submit();
		}
		function submitChangeAttribute() {
			calculateTotalPrice(<?php 
echo $product_id;
?>
, 0);
			var requiedAttribute = document.getElementById('requiedAttribute').value;
			var requiedProperty = document.getElementById('requiedProperty').value;

			if (requiedAttribute != 0 && requiedAttribute != "") {
开发者ID:,项目名称:,代码行数:31,代码来源:


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