• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP osc_current_user_locale函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中osc_current_user_locale函数的典型用法代码示例。如果您正苦于以下问题:PHP osc_current_user_locale函数的具体用法?PHP osc_current_user_locale怎么用?PHP osc_current_user_locale使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: extendDataSingle

 public function extendDataSingle($item)
 {
     $prefLocale = osc_current_user_locale();
     $descriptions = $this->conn->osc_dbFetchResults('SELECT * FROM %st_item_description WHERE fk_i_item_id = %d', DB_TABLE_PREFIX, $item['pk_i_id']);
     $item['locale'] = array();
     foreach ($descriptions as $desc) {
         if ($desc['s_title'] != "" || $desc['s_description'] != "") {
             $item['locale'][$desc['fk_c_locale_code']] = $desc;
         }
     }
     $is_itemLanguageAvailable = !empty($item['locale'][$prefLocale]['s_title']) && !empty($item['locale'][$prefLocale]['s_description']);
     if (isset($item['locale'][$prefLocale]) && $is_itemLanguageAvailable) {
         $item['s_title'] = $item['locale'][$prefLocale]['s_title'];
         $item['s_description'] = $item['locale'][$prefLocale]['s_description'];
     } else {
         $mCategories = new Category();
         $aCategory = $mCategories->findByPrimaryKey($item['fk_i_category_id']);
         $title = sprintf(__('%s in'), $aCategory['s_name']);
         if (isset($item['s_city'])) {
             $title .= ' ' . $item['s_city'];
         } else {
             if (isset($item['s_region'])) {
                 $title .= ' ' . $item['s_region'];
             } else {
                 if (isset($item['s_country'])) {
                     $title .= ' ' . $item['s_country'];
                 }
             }
         }
         $item['s_title'] = $title;
         $item['s_description'] = __('There\'s no description available in your language');
         unset($data);
     }
     return $item;
 }
开发者ID:hashemgamal,项目名称:OSClass,代码行数:35,代码来源:Item.php


示例2: processData

 private function processData($pages)
 {
     if (!empty($pages)) {
         $prefLocale = osc_current_user_locale();
         foreach ($pages as $aRow) {
             $row = array();
             $content = array();
             if (isset($aRow['locale'][$prefLocale]) && !empty($aRow['locale'][$prefLocale]['s_title'])) {
                 $content = $aRow['locale'][$prefLocale];
             } else {
                 $content = current($aRow['locale']);
             }
             // -- options --
             $options = array();
             View::newInstance()->_exportVariableToView('page', $aRow);
             $options[] = '<a href="' . osc_static_page_url() . '" target="_blank">' . __('View page') . '</a>';
             $options[] = '<a href="' . osc_admin_base_url(true) . '?page=pages&amp;action=edit&amp;id=' . $aRow['pk_i_id'] . '">' . __('Edit') . '</a>';
             if (!$aRow['b_indelible']) {
                 $options[] = '<a onclick="return delete_dialog(\'' . $aRow['pk_i_id'] . '\');" href="' . osc_admin_base_url(true) . '?page=pages&amp;action=delete&amp;id=' . $aRow['pk_i_id'] . '&amp;' . osc_csrf_token_url() . '">' . __('Delete') . '</a>';
             }
             $auxOptions = '<ul>' . PHP_EOL;
             foreach ($options as $actual) {
                 $auxOptions .= '<li>' . $actual . '</li>' . PHP_EOL;
             }
             $actions = '<div class="actions">' . $auxOptions . '</div>' . PHP_EOL;
             $row['bulkactions'] = '<input type="checkbox" name="id[]"" value="' . $aRow['pk_i_id'] . '"" />';
             $row['internal_name'] = $aRow['s_internal_name'] . $actions;
             $row['title'] = $content['s_title'];
             $row['order'] = '<div class="order-box">' . $aRow['i_order'] . ' <img class="up" onclick="order_up(' . $aRow['pk_i_id'] . ');" src="' . osc_current_admin_theme_url('images/arrow_up.png') . '" alt="' . __('Up') . '" title="' . __('Up') . '" />  <img class="down" onclick="order_down(' . $aRow['pk_i_id'] . ');" src="' . osc_current_admin_theme_url('images/arrow_down.png') . '" alt="' . __('Down') . '" title="' . __('Down') . '" /></div>';
             $row = osc_apply_filter('pages_processing_row', $row, $aRow);
             $this->addRow($row);
             $this->rawRows[] = $aRow;
         }
     }
 }
开发者ID:mylastof,项目名称:os-class,代码行数:35,代码来源:PagesDataTable.php


示例3: new_pm_email

/**
 * Send email to user when they get a new PM
 * 
 * @param integer $item
 * @param integer $offer_value 
 *
 * @dynamic tags
 *
 * '{RECIP_NAME}', '{SENDER_NAME}', '{WEB_URL}', '{WEB_TITLE}', '{PM_URL}', '{PM_SUBJECT}', '{PM_MESSAGE}'
 */
function new_pm_email($pm_info)
{
    $mPages = new Page();
    $aPage = $mPages->findByInternalName('email_PM_alert');
    $locale = osc_current_user_locale();
    $content = array();
    if (isset($aPage['locale'][$locale]['s_title'])) {
        $content = $aPage['locale'][$locale];
    } else {
        $content = current($aPage['locale']);
    }
    if ($pm_info['sender_id'] == 0) {
        $sender_name = pmAdmin();
    } else {
        $pm_senderData = User::newInstance()->findByPrimaryKey($pm_info['sender_id']);
        $sender_name = $pm_senderData['s_name'];
    }
    if ($pm_info['recip_id'] == 0) {
        $pm_url = osc_admin_base_url(true) . '?page=plugins&action=renderplugin&file=osclass_pm/admin-send.php?userId=' . $pm_info['sender_id'] . '&mType=adminQuote&messId=' . $pm_info['pm_id'];
        $pm_name = pmAdmin();
        $pm_recipData['s_email'] = osc_contact_email();
    } else {
        $pm_url = osc_base_url(true) . '?page=custom&file=osclass_pm/user-send.php?userId=' . $pm_info['sender_id'] . '&mType=quote&messId=' . $pm_info['pm_id'];
        $pm_recipData = User::newInstance()->findByPrimaryKey($pm_info['recip_id']);
        $pm_name = $pm_recipData['s_name'];
    }
    $pm_url = '<a href="' . $pm_url . '" >' . $pm_url . '</a>';
    $words = array();
    $words[] = array('{RECIP_NAME}', '{SENDER_NAME}', '{WEB_URL}', '{WEB_TITLE}', '{PM_URL}', '{PM_SUBJECT}', '{PM_MESSAGE}', '[quote]', '[/quote]', '[quoteAuthor]', '[/quoteAuthor]');
    $words[] = array($pm_name, $sender_name, osc_base_url(), osc_page_title(), $pm_url, $pm_info['pm_subject'], nl2br($pm_info['pm_message']), '<div class="messQuote">', '</div>', '<div class="quoteAuthor">', '</div>');
    $title = osc_mailBeauty($content['s_title'], $words);
    $body = osc_mailBeauty($content['s_text'], $words);
    $emailParams = array('subject' => $title, 'to' => $pm_recipData['s_email'], 'to_name' => $pm_name, 'body' => $body, 'alt_body' => $body);
    osc_sendMail($emailParams);
}
开发者ID:oanav,项目名称:closetshare,代码行数:45,代码来源:email-temps.php


示例4: __construct

 public function __construct($l = "")
 {
     if ($l == "") {
         $l = osc_current_user_locale();
     }
     $this->language = $l;
     parent::__construct();
 }
开发者ID:hashemgamal,项目名称:OSClass,代码行数:8,代码来源:Category.php


示例5: listAll

 public function listAll($language = "")
 {
     if ($language == '') {
         $language = osc_current_user_locale();
     } else {
         $language = "en_US";
     }
     return $this->conn->osc_dbFetchResults('SELECT * FROM (SELECT *, FIELD(fk_c_locale_code, \'en_US\', \'' . osc_current_user_locale() . '\', \'' . $language . '\') as sorter FROM %s WHERE s_name != \'\' ORDER BY sorter DESC) dummytable GROUP BY pk_c_code ORDER BY s_name ASC', $this->getTableName());
 }
开发者ID:hashemgamal,项目名称:OSClass,代码行数:9,代码来源:Country.php


示例6: __construct

 public function __construct($l = "")
 {
     if ($l == "") {
         $l = osc_current_user_locale();
     }
     $this->language = $l;
     $this->tree = null;
     $this->relation = null;
     $this->categories = null;
     parent::__construct();
     $this->empty_tree = true;
     $this->toTree();
 }
开发者ID:nsswaga,项目名称:OSClass,代码行数:13,代码来源:Category.php


示例7: __construct

 /**
  * Set data related to t_category table
  */
 function __construct($l = '')
 {
     parent::__construct();
     $this->setTableName('t_category');
     $this->setPrimaryKey('pk_i_id');
     $array_fields = array('pk_i_id', 'fk_i_parent_id', 'i_expiration_days', 'i_position', 'b_enabled', 's_icon', 'b_price_enabled');
     $this->setFields($array_fields);
     if ($l == '') {
         $l = osc_current_user_locale();
     }
     $this->_language = $l;
     $this->_tree = null;
     $this->_relation = null;
     $this->_categories = null;
     $this->_emptyTree = true;
     $this->toTree();
 }
开发者ID:oanav,项目名称:closetshare,代码行数:20,代码来源:Category.php


示例8: listAllAdmin

 public function listAllAdmin($language = "")
 {
     if ($language == '') {
         $language = osc_current_user_locale();
     } else {
         $language = 'en_US';
     }
     $countries_temp = $this->conn->osc_dbFetchResults('SELECT * FROM (SELECT *, FIELD(fk_c_locale_code, \'en_US\', \'' . osc_current_user_locale() . '\', \'' . $language . '\') as sorter FROM %s WHERE s_name != \'\' ORDER BY sorter DESC) dummytable GROUP BY pk_c_code ORDER BY s_name ASC', $this->getTableName());
     $countries = array();
     foreach ($countries_temp as $country) {
         $locales = $this->conn->osc_dbFetchResults("SELECT * FROM %s WHERE pk_c_code = '%s'", $this->getTableName(), $country['pk_c_code']);
         foreach ($locales as $locale) {
             $country['locales'][$locale['fk_c_locale_code']] = $locale['s_name'];
         }
         $countries[] = $country;
     }
     return $countries;
 }
开发者ID:nsswaga,项目名称:OSClass,代码行数:18,代码来源:Country.php


示例9: __construct

 function __construct($install = false)
 {
     if (!$install) {
         // get user/admin locale
         if (OC_ADMIN) {
             $locale = osc_current_admin_locale();
         } else {
             $locale = osc_current_user_locale();
         }
         // load core
         $core_file = osc_translations_path() . $locale . '/core.mo';
         $this->_load($core_file, 'core');
         // load messages
         $messages_file = osc_themes_path() . osc_theme() . '/languages/' . $locale . '/messages.mo';
         if (!file_exists($messages_file)) {
             $messages_file = osc_translations_path() . $locale . '/messages.mo';
         }
         $this->_load($messages_file, 'messages');
         // load theme
         $domain = osc_theme();
         $theme_file = osc_themes_path() . $domain . '/languages/' . $locale . '/theme.mo';
         if (!file_exists($theme_file)) {
             if (!file_exists(osc_themes_path() . $domain)) {
                 $domain = 'modern';
             }
             $theme_file = osc_translations_path() . $locale . '/theme.mo';
         }
         $this->_load($theme_file, $domain);
         // load plugins
         $aPlugins = Plugins::listInstalled();
         foreach ($aPlugins as $plugin) {
             $domain = preg_replace('|/.*|', '', $plugin);
             $plugin_file = osc_plugins_path() . $domain . '/languages/' . $locale . '/messages.mo';
             if (file_exists($plugin_file)) {
                 $this->_load($plugin_file, $domain);
             }
         }
     } else {
         $core_file = osc_translations_path() . osc_current_admin_locale() . '/core.mo';
         $this->_load($core_file, 'core');
     }
 }
开发者ID:jmcclenon,项目名称:Osclass,代码行数:42,代码来源:Translation.php


示例10: toArrayFormat

 private function toArrayFormat()
 {
     $this->result['iTotalRecords'] = $this->total;
     $this->result['iTotalDisplayRecords'] = $this->total_filtered;
     $this->result['iDisplayLength'] = $this->_get['iDisplayLength'];
     $this->result['aaData'] = array();
     if (count($this->pages) == 0) {
         return;
     }
     $prefLocale = osc_current_user_locale();
     $count = 0;
     foreach ($this->pages as $aRow) {
         $row = array();
         $content = array();
         if (isset($aRow['locale'][$prefLocale]) && !empty($aRow['locale'][$prefLocale]['s_title'])) {
             $content = $aRow['locale'][$prefLocale];
         } else {
             $content = current($aRow['locale']);
         }
         // -- options --
         $options = array();
         View::newInstance()->_exportVariableToView('page', $aRow);
         $options[] = '<a href="' . osc_static_page_url() . '" target="_blank">' . __('View page') . '</a>';
         $options[] = '<a href="' . osc_admin_base_url(true) . '?page=pages&amp;action=edit&amp;id=' . $aRow['pk_i_id'] . '">' . __('Edit') . '</a>';
         if (!$aRow['b_indelible']) {
             $options[] = '<a onclick="return delete_dialog(\'' . $aRow['pk_i_id'] . '\');" href="' . osc_admin_base_url(true) . '?page=pages&amp;action=delete&amp;id=' . $aRow['pk_i_id'] . '">' . __('Delete') . '</a>';
         }
         $auxOptions = '<ul>' . PHP_EOL;
         foreach ($options as $actual) {
             $auxOptions .= '<li>' . $actual . '</li>' . PHP_EOL;
         }
         $actions = '<div class="actions">' . $auxOptions . '</div>' . PHP_EOL;
         $row[] = '<input type="checkbox" name="id[]"" value="' . $aRow['pk_i_id'] . '"" />';
         $row[] = $aRow['s_internal_name'] . $actions;
         $row[] = $content['s_title'];
         $row[] = '<div class="order-box">' . $aRow['i_order'] . ' <img class="up" onclick="order_up(' . $aRow['pk_i_id'] . ');" src="' . osc_current_admin_theme_url('images/arrow_up.png') . '" alt="' . __('Up') . '" title="' . __('Up') . '" />  <img class="down" onclick="order_down(' . $aRow['pk_i_id'] . ');" src="' . osc_current_admin_theme_url('images/arrow_down.png') . '" alt="' . __('Down') . '" title="' . __('Down') . '" /></div>';
         $this->result['aaData'][] = $row;
     }
 }
开发者ID:semul,项目名称:Osclass,代码行数:39,代码来源:pages_processing.php


示例11: email_link_problem

function email_link_problem($url_from, $url_to, $contact)
{
    $page = new Page();
    $page = $page->findByInternalName('seo_link_problem');
    if (empty($page)) {
        exit;
    }
    $locale = osc_current_user_locale();
    $content = array();
    if (isset($page['locale'][$locale]['s_title'])) {
        $content = $page['locale'][$locale];
    } else {
        $content = current($page['locale']);
    }
    $words = array();
    $words[] = array('{LINK_FROM}', '{LINK_TO}');
    $words[] = array($url_from, $url_to);
    $title = osc_mailBeauty($content['s_title'], $words);
    $body = osc_mailBeauty($content['s_text'], $words);
    $email_build = array('subject' => $title, 'to' => $contact, 'to_name' => 'Partner', 'body' => $body, 'alt_body' => $body);
    osc_sendMail($email_build);
}
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:22,代码来源:email.php


示例12: language_selector

 public static function language_selector($value = NULL)
 {
     $name = 'new_item[gn_lang]';
     self::setInputValueFor('gn_lang', $value);
     $locales = osc_all_enabled_locales_for_admin();
     if ($value == NULL) {
         $value = osc_current_user_locale();
     }
     if (count($locales) > 1) {
         echo '<select name="' . $name . '" id="news_lang_selector">';
         foreach ($locales as $locale) {
             $selected = '';
             if ($value == $locale['pk_c_code']) {
                 $selected = 'selected="selected"';
             }
             echo '<option value="' . $locale['pk_c_code'] . '" ' . $selected . '>' . $locale['s_short_name'] . '</option>';
         }
         echo '</select>';
     } else {
         echo $locales[0]['s_short_name'];
         parent::generic_input_hidden('locale', $locales[0]['pk_c_code']);
     }
 }
开发者ID:faosclass,项目名称:gz_news,代码行数:23,代码来源:GzNewsForm.php


示例13: _e

          </label>
          <div class="controls">
            <?php 
UserForm::website_text(osc_user());
?>
          </div>
        </div>
        <div class="form-group">
          <label class="control-label" for="s_info">
            <?php 
_e('Description', OSCLASSWIZARDS_THEME_FOLDER);
?>
          </label>
          <div class="controls">
            <?php 
UserForm::info_textarea('s_info', osc_current_user_locale(), @$osc_user['locale'][osc_current_user_locale()]['s_info']);
?>
          </div>
        </div>
        <?php 
osc_run_hook('user_profile_form', osc_user());
?>
        <div class="form-group">
          <div class="controls">
            <button type="submit" class="btn btn-success">
            <?php 
_e("Update", OSCLASSWIZARDS_THEME_FOLDER);
?>
            </button>
          </div>
        </div>
开发者ID:syedfiraat4,项目名称:bikade.com,代码行数:31,代码来源:user-profile.php


示例14: __construct

 /**
  *
  */
 function __construct($expired = false)
 {
     parent::__construct();
     $this->setTableName('t_item');
     $this->setFields(array('pk_i_id'));
     $this->withPattern = false;
     $this->withLocations = false;
     $this->withCategoryId = false;
     $this->withUserId = false;
     $this->withPicture = false;
     $this->withNoUserEmail = false;
     $this->price_min = null;
     $this->price_max = null;
     $this->user_ids = null;
     $this->itemId = null;
     $this->city_areas = array();
     $this->cities = array();
     $this->regions = array();
     $this->countries = array();
     $this->categories = array();
     $this->conditions = array();
     $this->tables = array();
     $this->tables_join = array();
     $this->search_fields = array();
     $this->itemConditions = array();
     $this->groupBy = '';
     $this->having = '';
     $this->order();
     $this->limit();
     $this->results_per_page = 10;
     if (!$expired) {
         // t_item
         $this->addItemConditions(sprintf("%st_item.b_enabled = 1 ", DB_TABLE_PREFIX));
         $this->addItemConditions(sprintf("%st_item.b_active = 1 ", DB_TABLE_PREFIX));
         $this->addItemConditions(sprintf("%st_item.b_spam = 0", DB_TABLE_PREFIX));
         $this->addItemConditions(sprintf("(%st_item.b_premium = 1 || %st_item.dt_expiration >= '%s')", DB_TABLE_PREFIX, DB_TABLE_PREFIX, date('Y-m-d H:i:s')));
     }
     $this->total_results = null;
     $this->total_results_table = null;
     // get all item_location data
     if (OC_ADMIN) {
         $this->addField(sprintf('%st_item_location.*', DB_TABLE_PREFIX));
         $this->locale_code = osc_current_admin_locale();
     } else {
         $this->locale_code = osc_current_user_locale();
     }
 }
开发者ID:jmcclenon,项目名称:Osclass,代码行数:50,代码来源:Search.php


示例15: echo_users_best_rated

/**
 * Return layout optimized for sidebar at main web page, with the best user voted with a limit
 *
 * @param int $num number of users
 */
function echo_users_best_rated($num = 5)
{
    if (osc_get_preference('user_voting', 'voting') == 1) {
        $filter = array('order' => 'desc', 'num_items' => $num);
        $results = get_user_votes($filter);
        if (count($results) > 0) {
            $locale = osc_current_user_locale();
            require 'set_results_user.php';
        }
    }
}
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:16,代码来源:index.php


示例16: fn_email_new_comment_user

function fn_email_new_comment_user($aItem)
{
    $authorName = trim($aItem['authorName']);
    $authorName = strip_tags($authorName);
    $authorEmail = trim($aItem['authorEmail']);
    $authorEmail = strip_tags($authorEmail);
    $body = trim($aItem['body']);
    $body = strip_tags($body);
    $title = $aItem['title'];
    $itemId = $aItem['id'];
    $userId = $aItem['userId'];
    $admin_email = osc_contact_email();
    $prefLocale = osc_language();
    $item = Item::newInstance()->findByPrimaryKey($itemId);
    View::newInstance()->_exportVariableToView('item', $item);
    $itemURL = osc_item_url();
    $itemURL = '<a href="' . $itemURL . '" >' . $itemURL . '</a>';
    $mPages = new Page();
    $aPage = $mPages->findByInternalName('email_new_comment_user');
    $locale = osc_current_user_locale();
    $content = array();
    if (isset($aPage['locale'][$locale]['s_title'])) {
        $content = $aPage['locale'][$locale];
    } else {
        $content = current($aPage['locale']);
    }
    $words = array();
    $words[] = array('{COMMENT_AUTHOR}', '{COMMENT_EMAIL}', '{COMMENT_TITLE}', '{COMMENT_TEXT}', '{ITEM_TITLE}', '{ITEM_ID}', '{ITEM_URL}', '{SELLER_NAME}', '{SELLER_EMAIL}');
    $words[] = array($authorName, $authorEmail, $title, $body, $item['s_title'], $itemId, $itemURL, $item['s_contact_name'], $item['s_contact_email']);
    $title_email = osc_mailBeauty(osc_apply_filter('email_title', osc_apply_filter('email_new_comment_user_title', $content['s_title'])), $words);
    $body_email = osc_mailBeauty(osc_apply_filter('email_description', osc_apply_filter('email_new_comment_user_description', $content['s_text'])), $words);
    $from = osc_contact_email();
    $from_name = osc_page_title();
    $emailParams = array('from' => $admin_email, 'from_name' => __('Admin mail system'), 'subject' => $title_email, 'to' => $item['s_contact_email'], 'to_name' => $item['s_contact_name'], 'body' => $body_email, 'alt_body' => $body_email);
    osc_sendMail($emailParams);
}
开发者ID:randomecho,项目名称:OSClass,代码行数:36,代码来源:emails.php


示例17: extendData

        /**
         * Extends the given array $items with description in available locales
         *
         * @access public
         * @since unknown
         * @param type $items
         * @return array with description extended with all available locales
         */
        public function extendData($items)
        {
            if( OC_ADMIN ) {
                $prefLocale = osc_current_admin_locale();
            } else {
                $prefLocale = osc_current_user_locale();
            }

            $results = array();

            foreach ($items as $item) {
                $this->dao->select();
                $this->dao->from(DB_TABLE_PREFIX.'t_item_description');
                $this->dao->where(DB_TABLE_PREFIX.'t_item_description.fk_i_item_id', $item['pk_i_id']);

                $result = $this->dao->get();
                $descriptions = $result->result();

                $item['locale'] = array();
                foreach ($descriptions as $desc) {
                    if ($desc['s_title'] != "" || $desc['s_description'] != "") {
                        $item['locale'][$desc['fk_c_locale_code']] = $desc;
                    }
                }
                if (isset($item['locale'][$prefLocale])) {
                    $item['s_title'] = $item['locale'][$prefLocale]['s_title'];
                    $item['s_description'] = $item['locale'][$prefLocale]['s_description'];
                } else {
                    $data = current($item['locale']);
                    $item['s_title'] = $data['s_title'];
                    $item['s_description'] = $data['s_description'];
                    unset($data);
                }

                // populate locations and category_name
                $this->dao->select(DB_TABLE_PREFIX.'t_item_location.*, cd.s_name as s_category_name');
                // select sum item_stats
                $this->dao->select('SUM(`s`.`i_num_views`) as `i_num_views`' );
                $this->dao->select('SUM(`s`.`i_num_spam`) as `i_num_spam`' );
                $this->dao->select('SUM(`s`.`i_num_bad_classified`) as `i_num_bad_classified`' );
                $this->dao->select('SUM(`s`.`i_num_repeated`) as `i_num_repeated`' );
                $this->dao->select('SUM(`s`.`i_num_offensive`) as `i_num_offensive`' );
                $this->dao->select('SUM(`s`.`i_num_expired`) as `i_num_expired` ' );
                $this->dao->select('SUM(`s`.`i_num_premium_views`) as `i_num_premium_views` ' );

                $this->dao->from(DB_TABLE_PREFIX.'t_item_location');
                $this->dao->from(DB_TABLE_PREFIX.'t_category_description as cd');
                $this->dao->from(DB_TABLE_PREFIX.'t_item_stats as s');
                $this->dao->where(DB_TABLE_PREFIX.'t_item_location.fk_i_item_id', $item['pk_i_id']);
//                $this->dao->where(DB_TABLE_PREFIX.'t_item_stats.fk_i_item_id', $item['pk_i_id']);
                $this->dao->where('s.fk_i_item_id', $item['pk_i_id']);
                $this->dao->where('cd.fk_i_category_id', $item['fk_i_category_id']);
                // group by item_id
                $this->dao->groupBy('fk_i_item_id');

                $result = $this->dao->get();
                $extraFields = $result->row();

                foreach($extraFields as $key => $value) {
                    $item[$key] = $value;
                }

                $results[] = $item;
            }
            return $results;
        }
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:74,代码来源:Item.php


示例18: fn_email_item_validation_non_register_user

function fn_email_item_validation_non_register_user($item)
{
    View::newInstance()->_exportVariableToView('item', $item);
    $mPages = new Page();
    $aPage = $mPages->findByInternalName('email_item_validation_non_register_user');
    $locale = osc_current_user_locale();
    $content = array();
    if (isset($aPage['locale'][$locale]['s_title'])) {
        $content = $aPage['locale'][$locale];
    } else {
        $content = current($aPage['locale']);
    }
    $item_url = osc_item_url();
    $item_url = '<a href="' . $item_url . '" >' . $item_url . '</a>';
    $edit_url = osc_item_edit_url($item['s_secret'], $item['pk_i_id']);
    $delete_url = osc_item_delete_url($item['s_secret'], $item['pk_i_id']);
    $all = '';
    if (isset($item['locale'])) {
        foreach ($item['locale'] as $locale => $data) {
            $locale_name = OSCLocale::newInstance()->listWhere("pk_c_code = '" . $locale . "'");
            $all .= '<br/>';
            if (isset($locale_name[0]) && isset($locale_name[0]['s_name'])) {
                $all .= __('Language') . ': ' . $locale_name[0]['s_name'] . '<br/>';
            } else {
                $all .= __('Language') . ': ' . $locale . '<br/>';
            }
            $all .= __('Title') . ': ' . $data['s_title'] . '<br/>';
            $all .= __('Description') . ': ' . $data['s_description'] . '<br/>';
            $all .= '<br/>';
        }
    } else {
        $all .= __('Title') . ': ' . $item['s_title'] . '<br/>';
        $all .= __('Description') . ': ' . $item['s_description'] . '<br/>';
    }
    // Format activation URL
    $validation_url = osc_item_activate_url($item['s_secret'], $item['pk_i_id']);
    $words = array();
    $words[] = array('{ITEM_DESCRIPTION_ALL_LANGUAGES}', '{ITEM_DESCRIPTION}', '{ITEM_COUNTRY}', '{ITEM_PRICE}', '{ITEM_REGION}', '{ITEM_CITY}', '{ITEM_ID}', '{USER_NAME}', '{USER_EMAIL}', '{WEB_URL}', '{ITEM_TITLE}', '{ITEM_URL}', '{WEB_TITLE}', '{VALIDATION_LINK}', '{VALIDATION_URL}', '{EDIT_LINK}', '{EDIT_URL}', '{DELETE_LINK}', '{DELETE_URL}');
    $words[] = array($all, $item['s_description'], $item['s_country'], osc_prepare_price($item['s_price']), $item['s_region'], $item['s_city'], $item['pk_i_id'], $item['s_contact_name'], $item['s_contact_email'], '<a href="' . osc_base_url() . '" >' . osc_base_url() . '</a>', $item['s_title'], $item_url, osc_page_title(), '<a href="' . $validation_url . '" >' . $validation_url . '</a>', $validation_url, '<a href="' . $edit_url . '">' . $edit_url . '</a>', $edit_url, '<a href="' . $delete_url . '">' . $delete_url . '</a>', $delete_url);
    $title = osc_mailBeauty(osc_apply_filter('email_title', osc_apply_filter('email_item_validation_non_register_user_title', $content['s_title'])), $words);
    $body = osc_mailBeauty(osc_apply_filter('email_description', osc_apply_filter('email_item_validation_non_register_user_description', $content['s_text'])), $words);
    $emailParams = array('subject' => $title, 'to' => $item['s_contact_email'], 'to_name' => $item['s_contact_name'], 'body' => $body, 'alt_body' => $body);
    osc_sendMail($emailParams);
}
开发者ID:nsswaga,项目名称:OSClass,代码行数:44,代码来源:emails.php


示例19: getLastComments

 public function getLastComments($num)
 {
     if (!intval($num)) {
         return false;
     }
     $lang = osc_current_user_locale();
     return $this->conn->osc_dbFetchResults('SELECT i.*, d.s_title
             FROM %st_item_comment i
             JOIN %st_item c ON c.pk_i_id = i.fk_i_item_id
             JOIN %st_item_description d ON d.fk_i_item_id = i.fk_i_item_id
             GROUP BY d.fk_i_item_id 
             ORDER BY pk_i_id DESC LIMIT 0, ' . $num . '', DB_TABLE_PREFIX, DB_TABLE_PREFIX, DB_TABLE_PREFIX);
 }
开发者ID:hashemgamal,项目名称:OSClass,代码行数:13,代码来源:ItemComment.php


示例20: osc_get_current_user_locale

/**
 * Gets current locale object
 *
 * @return array
 */
function osc_get_current_user_locale()
{
    $locale = OSCLocale::newInstance()->findByPrimaryKey(osc_current_user_locale());
    View::newInstance()->_exportVariableToView('locale', $locale);
    return $locale;
}
开发者ID:mylastof,项目名称:os-class,代码行数:11,代码来源:hLocale.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP osc_current_web_theme_js_url函数代码示例发布时间:2022-05-15
下一篇:
PHP osc_current_admin_theme_url函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap