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

PHP osc_get_preference函数代码示例

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

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



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

示例1: processData

 private function processData($products)
 {
     if (!empty($products)) {
         $total = 0;
         foreach ($products as $aRow) {
             $row = array();
             $row['id'] = $aRow['id'];
             $row['description'] = $aRow['description'];
             $row['amount'] = osc_format_price(1000000 * $aRow['amount'], osc_get_preference('currency', 'payment_pro'));
             $row['quantity'] = $aRow['quantity'];
             $row['total'] = osc_format_price(1000000 * $aRow['amount'] * $aRow['quantity'], osc_get_preference('currency', 'payment_pro'));
             $row['delete'] = '<a href="' . osc_route_url('payment-pro-cart-delete', array('id' => $aRow['id'])) . '" >' . __('Delete', 'payment_pro') . '</a>';
             $row = osc_apply_filter('payment_pro_processing_row', $row, $aRow);
             $this->addRow($row);
             $this->rawRows[] = $aRow;
             $total += $aRow['amount'] * $aRow['quantity'];
         }
         $row = array();
         $row['id'] = '';
         $row['description'] = '';
         $row['amount'] = '';
         $row['quantity'] = '<b>' . __('Total', 'payment_pro') . '</b>';
         $row['total'] = '<b>' . osc_format_price(1000000 * $total, osc_get_preference('currency', 'payment_pro')) . '</b>';
         $row['delete'] = '';
         $this->addRow($row);
         //$this->rawRows[] = $row;
     }
 }
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:28,代码来源:CheckoutDataTable.php


示例2: __construct

 function __construct()
 {
     parent::__construct();
     // check if is moderator and can enter to this page
     if ($this->isModerator()) {
         if (!in_array($this->page, osc_apply_filter('moderator_access', array('items', 'comments', 'media', 'login', 'admins', 'ajax', 'stats', '')))) {
             osc_add_flash_error_message(_m("You don't have enough permissions"), 'admin');
             $this->redirectTo(osc_admin_base_url());
         }
     }
     osc_run_hook('init_admin');
     $config_version = str_replace('.', '', OSCLASS_VERSION);
     $config_version = preg_replace('|-.*|', '', $config_version);
     if ($config_version > osc_get_preference('version')) {
         if (get_class($this) == 'CAdminTools') {
         } else {
             if (get_class($this) != 'CAdminUpgrade') {
                 $this->redirectTo(osc_admin_base_url(true) . '?page=upgrade');
             }
         }
     }
     // show donation successful
     if (Params::getParam('donation') == 'successful') {
         osc_add_flash_ok_message(_m('Thank you very much for your donation'), 'admin');
     }
     // enqueue scripts
     osc_enqueue_script('jquery');
     osc_enqueue_script('jquery-ui');
     osc_enqueue_script('admin-osc');
     osc_enqueue_script('admin-ui-osc');
 }
开发者ID:mylastof,项目名称:os-class,代码行数:31,代码来源:AdminSecBaseModel.php


示例3: youtube_update

function youtube_update()
{
    // convert version
    $version = osc_get_preference('youtube_version', 'youtube');
    if ($version == '') {
        $version = 12;
    }
    if ($version < 200) {
        $conn = DBConnectionClass::newInstance();
        $data = $conn->getOsclassDb();
        $dbCommand = new DBCommandClass($data);
        $dbCommand->query(sprintf('ALTER TABLE %s ADD COLUMN s_id VARCHAR(15) NOT NULL DEFAULT \'-no-id-\' AFTER s_youtube', YOUTUBE_TABLE));
        // update s_id
        $dbCommand->select();
        $dbCommand->from(YOUTUBE_TABLE);
        $rs = $dbCommand->get();
        if ($rs !== false) {
            $result = $rs->result();
            foreach ($result as $video) {
                $video_code = youtube_get_code_from_url($video['s_youtube']);
                $dbCommand->update(YOUTUBE_TABLE, array('s_id' => $video_code), array('fk_i_item_id' => $video['fk_i_item_id']));
            }
        }
        osc_set_preference('youtube_version', '200', 'youtube', 'STRING');
        osc_reset_preferences();
    }
}
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:27,代码来源:index.php


示例4: fjs_search

    function fjs_search()
    {
        echo "\n";
        ?>
    var sQuery = '<?php 
        echo osc_esc_js(osc_get_preference('keyword_placeholder', 'seeker'));
        ?>
' ;
    $(document).ready(function(){
                var element = $('input[name="sPattern"]');
                element.focus(function(){
                        $(this).prev().hide();
                }).blur(function(){
                    if($(this).val() == '') {
                        $(this).prev().show();
                    }
                }).prev().click(function(){
                        $(this).hide();
                        $(this).next().focus();
                });
                if(element.val() != ''){
                    element.prev().hide();
                }
            });
    function doSearch() {
        var sPattern = $('input[name=sPattern]');
        if(sPattern.val() == ''){
            return false;
        }
        return true;
    }
<?php 
    }
开发者ID:ricktaylord,项目名称:osclass-themes,代码行数:33,代码来源:inc.search.php


示例5: __construct

 public function __construct()
 {
     parent::__construct();
     $this->setTableName('t_facebook_connect');
     $this->setPrimaryKey('fk_i_user_id');
     $this->setFields(array('fk_i_user_id', 'i_facebook_uid'));
     self::$facebook = new Facebook(array('appId' => osc_get_preference('fbc_appId', 'facebook_connect'), 'secret' => osc_get_preference('fbc_secret', 'facebook_connect')));
 }
开发者ID:oanav,项目名称:closetshare,代码行数:8,代码来源:OSCFacebook.php


示例6: show_qrcode

function show_qrcode()
{
    $filename = osc_item_id() . "_" . md5(osc_item_url()) . "_" . osc_get_preference("code_size", "qrcode") . ".png";
    if (!file_exists(osc_get_preference('upload_path', 'qrcode') . $filename)) {
        qrcode_generateqr(osc_item_url(), osc_item_id());
    }
    echo '<img src="' . osc_get_preference('upload_url', 'qrcode') . $filename . '" alt="QR CODE" id="qrcode_' . osc_item_id() . '" class="qrcode" />';
}
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:8,代码来源:index.php


示例7: modern_compactmode_actions

function modern_compactmode_actions()
{
    $compactMode = osc_get_preference('compact_mode', 'modern_admin_theme');
    $modeStatus = array('compact_mode' => true);
    if ($compactMode == true) {
        $modeStatus['compact_mode'] = false;
    }
    osc_set_preference('compact_mode', $modeStatus['compact_mode'], 'modern_admin_theme');
    echo json_encode($modeStatus);
}
开发者ID:jmcclenon,项目名称:Osclass,代码行数:10,代码来源:functions.php


示例8: customHead

function customHead()
{
    $all = osc_get_preference('location_todo');
    if ($all == '') {
        $all = 0;
    }
    $worktodo = LocationsTmp::newInstance()->count();
    ?>
        <script type="text/javascript">
            function reload() {
                window.location = '<?php 
    echo osc_admin_base_url(true) . '?page=tools&action=locations';
    ?>
';
            }

            function ajax_() {
                $.ajax({
                    type: "POST",
                    url: '<?php 
    echo osc_admin_base_url(true);
    ?>
?page=ajax&action=location_stats&<?php 
    echo osc_csrf_token_url();
    ?>
',
                    dataType: 'json',
                    success: function(data) {
                        if(data.status=='done') {
                            $('span#percent').html(100);
                        }else{
                            var pending = data.pending;
                            var all = <?php 
    echo osc_esc_js($all);
    ?>
;
                            var percent = parseInt( ((all-pending)*100) / all );
                            $('span#percent').html(percent);
                            ajax_();
                        }
                    }
                });
            }

            $(document).ready(function(){
                if(<?php 
    echo $worktodo;
    ?>
> 0) {
                    ajax_();
                }
            });
        </script>
        <?php 
}
开发者ID:mylastof,项目名称:os-class,代码行数:55,代码来源:locations.php


示例9: item_success_update_version

function item_success_update_version()
{
    $version = osc_get_preference('item_success_version', 'item_success');
    if ($version == '') {
        $version = 0;
    }
    if ($version < 110) {
        osc_set_preference('item_success_add_meta_og', 'true', 'item_success', 'BOOLEAN');
        osc_set_preference('item_success_version', '110', 'item_success', 'STRING');
        osc_reset_preferences();
    }
}
开发者ID:oanav,项目名称:closetshare,代码行数:12,代码来源:index.php


示例10: button

    public static function button($amount = '0.00', $description = '', $itemnumber = '101', $extra_array = null)
    {
        $extra = payment_prepare_custom($extra_array);
        $r = rand(0, 1000);
        $extra .= 'random,' . $r;
        $apcs = self::customToAPC($extra);
        $RETURNURL = osc_base_url() . 'oc-content/plugins/' . osc_plugin_folder(__FILE__) . 'return.php?extra=' . $extra;
        $CANCELURL = osc_base_url() . 'oc-content/plugins/' . osc_plugin_folder(__FILE__) . 'cancel.php?extra=' . $extra;
        ?>
            <form method="post" action="https://secure.payza.com/checkout" >
                <input type="hidden" name="ap_merchant" value="[email protected]"/>
                <input type="hidden" name="ap_purchasetype" value="service"/>
                <input type="hidden" name="ap_itemname" value="<?php 
        echo $description;
        ?>
"/>
                <input type="hidden" name="ap_amount" value="<?php 
        echo $amount;
        ?>
"/>
                <input type="hidden" name="ap_currency" value="<?php 
        echo osc_get_preference('currency', 'payment');
        ?>
"/>

               <input type="hidden" name="ap_quantity" value="1"/>
                <input type="hidden" name="ap_itemcode" value="<?php 
        echo $itemnumber;
        ?>
"/>
                <input type="hidden" name="ap_description" value="Audio equipment"/>
                <input type="hidden" name="ap_returnurl" value="<?php 
        echo $RETURNURL;
        ?>
"/>
                <input type="hidden" name="ap_cancelurl" value="<?php 
        echo $CANCELURL;
        ?>
"/>

                <?php 
        foreach ($apcs as $k => $v) {
            echo '<input type="hidden" name="apc_' . $k . '" value="' . $v . '"/>';
        }
        ?>

                <input type="image" src="<?php 
        echo osc_base_url() . 'oc-content/plugins/' . osc_plugin_folder(__FILE__);
        ?>
payza-buy-now.png"/>
            </form>
        <?php 
    }
开发者ID:virsoni,项目名称:plugin-payment,代码行数:53,代码来源:Payza.php


示例11: listAll

 /**
  * List all email datas stored in the database.
  * @return Array 	the complete list of datas for emails and footer. Ready to use.
  */
 public function listAll()
 {
     // Retrieve email datas from database.
     $datas = json_decode(osc_get_preference("email_datas", mdh_current_preferences_section()), true);
     if (!is_array($datas)) {
         // TODO. Handle error.
     }
     // Retrieve all emails from database;
     $emails = Page::newInstance()->listAll(true);
     $activeLocales = Madhouse_Utils_Collections::getFieldsFromList(osc_get_locales(), "pk_c_code");
     // Complete the list of emails with new mails (not already in the JSON).
     foreach ($emails as $e) {
         if (!in_array($e["s_internal_name"], Madhouse_Utils_Collections::getFieldsFromList($datas["emails"], "s_internal_name"))) {
             array_push($datas["emails"], Madhouse_EmailMagick_Utils::newEmptyEmail($e["s_internal_name"]));
         }
     }
     // Complete, filter and sort emails.
     $datas["emails"] = Madhouse_Utils_Collections::sortListByField(array_map(function ($e) use($emails, $activeLocales) {
         $row = Madhouse_Utils_Collections::findByField($emails, "s_internal_name", $e["s_internal_name"]);
         $e["pk_i_id"] = $row["pk_i_id"];
         // Compute the filling rate.
         $e["i_filled"] = Madhouse_EmailMagick_Utils::computeFillingRate($e);
         // Is the email still exists ? (in oc_t_pages)
         if (!in_array($e["s_internal_name"], Madhouse_Utils_Collections::getFieldsFromList($emails, "s_internal_name"))) {
             $e["b_deleted"] = true;
         }
         // Add a locale for locales that have not been provided.
         foreach ($activeLocales as $al) {
             $el = Madhouse_Utils_Collections::findByField($e["locales"], "fk_c_locale_code", $al);
             if (is_null($el)) {
                 array_push($e["locales"], Madhouse_EmailMagick_Utils::newEmptyLocale($al));
             }
         }
         $e["locales"] = array_values(array_filter($e["locales"], function ($v) use($activeLocales) {
             return in_array($v["fk_c_locale_code"], $activeLocales);
         }));
         return $e;
     }, $datas["emails"]), "s_internal_name");
     // Filter the footer datas (only active locales are left).
     $datas["footer"]["locales"] = array_values(array_filter($datas["footer"]["locales"], function ($v) use($activeLocales) {
         return in_array($v["fk_c_locale_code"], $activeLocales);
     }));
     // Add a locale for locales that have not been provided.
     foreach ($activeLocales as $al) {
         $fl = Madhouse_Utils_Collections::findByField($datas["footer"]["locales"], "fk_c_locale_code", $al);
         if (is_null($fl)) {
             array_push($datas["footer"]["locales"], Madhouse_EmailMagick_Utils::newEmptyLocale($al));
         }
     }
     return $datas;
 }
开发者ID:bomvendador,项目名称:soroka_r,代码行数:55,代码来源:Emails.php


示例12: __construct

        function __construct()
        {
            parent::__construct();

            // check if is moderator and can enter to this page
            if( $this->isModerator() ) {
                if( !in_array($this->page, osc_apply_filter('moderator_access', array('items', 'comments', 'media', 'login', 'admins', 'ajax', 'stats',''))) ) {
                    osc_add_flash_error_message(_m("You don't have enough permissions"), 'admin');
                    $this->redirectTo(osc_admin_base_url());
                }
            }

            osc_run_hook( 'init_admin' );

            // check if exist a new version each day
            if( (time() - osc_last_version_check()) > (24 * 3600) ) {
                $data = osc_file_get_contents('http://osclass.org/latest_version_v1.php?callback=?');
                $data = preg_replace('|^\?\((.*?)\);$|', '$01', $data);
                $json = json_decode($data);
                if( $json->version > osc_version() ) {
                    osc_set_preference( 'update_core_json', $data );
                } else {
                    osc_set_preference( 'update_core_json', '' );
                }
                osc_set_preference( 'last_version_check', time() );
                osc_reset_preferences();
            }

            $config_version = str_replace('.', '', OSCLASS_VERSION);
            $config_version = preg_replace('|-.*|', '', $config_version);

            if( $config_version > osc_get_preference('version') ) {
                if(get_class($this) == 'CAdminTools') {
                } else {
                    if(get_class($this) != 'CAdminUpgrade' )
                        $this->redirectTo(osc_admin_base_url(true) . '?page=upgrade');
                }
            }

            // show donation successful
            if( Params::getParam('donation') == 'successful' ) {
                osc_add_flash_ok_message(_m('Thank you very much for your donation'), 'admin');
            }

            // enqueue scripts
            osc_enqueue_script('jquery');
            osc_enqueue_script('jquery-ui');
            osc_enqueue_script('admin-osc');
            osc_enqueue_script('admin-ui-osc');
        }
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:50,代码来源:AdminSecBaseModel.php


示例13: cookie_load

function cookie_load()
{
    ?>
        <script type="text/javascript" >
        $(document).ready(function () {
            var options = new Object();
            <?php 
    if (osc_get_preference('accept', 'cookie') == 1) {
        echo 'options.cookieAcceptButton = true;';
    }
    if (osc_get_preference('decline', 'cookie') == 1) {
        echo 'options.cookieDeclineButton = true;';
    }
    if (osc_get_preference('reset', 'cookie') == 1) {
        echo 'options.cookieResetButton = true;';
    }
    echo "options.cookiePolicyLink = '" . osc_esc_js(osc_get_preference('policy_link', 'cookie')) . "';";
    echo "options.cookieWhatAreTheyLink = '" . osc_esc_js(osc_get_preference('what_are_link', 'cookie')) . "';";
    echo "options.cookieAnalyticsMessage = '" . str_replace("'", "\\'", osc_get_preference('analytics_msg', 'cookie')) . "';";
    echo "options.cookieMessage = '" . str_replace("'", "\\'", osc_get_preference('non_analytics_msg', 'cookie')) . "';";
    if (osc_get_preference('analytics_id', 'cookie') != '') {
        ?>
            options.cookieAnalytics = true;
            if (jQuery.cookie('cc_cookie_decline') == "cc_cookie_decline") {
            } else {
                var _gaq = _gaq || [];
                _gaq.push(['_setAccount', '<?php 
        echo osc_get_preference('analytics_id', 'cookie');
        ?>
']);
                _gaq.push(['_trackPageview']);

                (function() {
                    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                    var s = document. getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
                })();
            }
            <?php 
    } else {
        echo 'options.cookieAnalytics = false;';
    }
    ?>
            $.cookieCuttr(options);
        });
        </script>
    <?php 
}
开发者ID:oanav,项目名称:closetshare,代码行数:48,代码来源:index.php


示例14: update

 /**
  * Generates emails from the templates & datas.
  *  - For each emails and for each active locale :
  *  	- Check if the emails is empty or does not exists anymore. If so, do nothing.
  *  	- Combines templates and datas to produce the s_title and s_text fields.
  * 	- Saves those settings for next run.
  * @return void.
  */
 public function update()
 {
     // Decode and transform into a PHP array (true as a second parameter).
     $data = json_decode(Params::getParam("email_datas", false, false), true);
     if (!is_array($data)) {
         mdh_handle_error(sprintf(__("Given JSON datas are not correct (Error #%d)", mdh_current_plugin_name()), json_last_error()), mdh_emailmagick_url());
     }
     // Get the HTML template.
     $template = Params::getParam("email_template", false, false);
     // This is current emails datas (stored in the database).
     $currentDatas = json_decode(osc_get_preference("email_datas", mdh_current_preferences_section()), true);
     // Create a new array, merge of the old and the new one.
     $newDatas = array("emails" => array(), "footer" => array("locales" => Madhouse_EmailMagick_Utils::mergeLocales($currentDatas["footer"]["locales"], $data["footer"]["locales"])));
     // Iterate through new submitted emails data to update.
     $i = 0;
     foreach ($data["emails"] as $e) {
         // Get the old email datas, as they are right now.
         $oe = Madhouse_Utils_Collections::findByField($currentDatas["emails"], "s_internal_name", $e["s_internal_name"]);
         if (is_null($oe)) {
             // Not found in old emails. => new email has been installed.
             $locales = $e["locales"];
         } else {
             // Found in old emails. Merge with new locales.
             $locales = Madhouse_EmailMagick_Utils::mergeLocales($oe["locales"], $e["locales"]);
         }
         // Email exists, create in order to be filled and pushed to the new datas (at the end).
         $nEmail = array("s_internal_name" => $e["s_internal_name"], "locales" => $locales);
         // Get the email from the database.
         $email = Page::newInstance()->findByInternalName($e["s_internal_name"]);
         if ($email !== false && count($email) > 0) {
             // Update the email.
             $updated = Madhouse_EmailMagick_Models_Emails::newInstance()->update($template, $email["pk_i_id"], $newDatas, $nEmail);
             $i += $updated;
         }
         array_push($newDatas["emails"], $nEmail);
     }
     // Saves the settings.
     Madhouse_Utils_Controllers::doSettingsPost(array("email_template", "email_datas"), array("email_template" => $template, "email_datas" => json_encode($newDatas)), mdh_emailmagick_url(), null, sprintf(__("Sucessfully updated %d emails (out of %d)!", mdh_current_plugin_name()), $i, count($data["emails"]) * count(osc_get_locales())));
 }
开发者ID:bomvendador,项目名称:soroka_r,代码行数:47,代码来源:Admin.php


示例15: osc_google_analytics_id

function osc_google_analytics_id()
{
    return osc_get_preference('google_analytics_id', 'plugin-google_analytics');
}
开发者ID:acharei,项目名称:OSClass,代码行数:4,代码来源:index.php


示例16: processPayment

 public static function processPayment()
 {
     if (osc_get_preference('coinjar_sandbox', 'payment') != 1) {
         $coinjar = new CoinJar(payment_decrypt(osc_get_preference('coinjar_merchant_user', 'payment')), payment_decrypt(osc_get_preference('coinjar_merchant_password', 'payment')), payment_decrypt(osc_get_preference('coinjar_api_key', 'payment')));
     } else {
         $coinjar = new CoinJar(payment_decrypt(osc_get_preference('coinjar_sb_merchant_user', 'payment')), payment_decrypt(osc_get_preference('coinjar_sb_merchant_password', 'payment')), payment_decrypt(osc_get_preference('coinjar_sb_api_key', 'payment')), true);
     }
     // data from the post (it's supposed to be sent by CoinJar, is sent by POST!)
     if (Params::existParam('uuid') && Params::existParam('amount') && Params::existParam('currency') && Params::existParam('status') && Params::existParam('ipn_digest')) {
         if (Params::getParam('status') == 'COMPLETED') {
             $digest = $coinjar->IPNDigest(Params::getParam('uuid'), Params::getParam('amount'), Params::getParam('currency'), Params::getParam('status'));
             if ($digest == Params::getParam('ipn_digest')) {
                 $order = json_decode($coinjar->order(Params::getParam('uuid')));
                 if ($order != null) {
                     if (Params::getParam('amount') == $order->order->amount && Params::getParam('currency') == $order->order->currency && Params::getParam('status') == $order->order->status) {
                         $payment = ModelPayment::newInstance()->getPayment($order->order->uuid);
                         if (!$payment) {
                             $data = payment_get_custom(Params::getParam('extra'));
                             $product_type = explode('x', Params::getParam('item_number'));
                             // SAVE TRANSACTION LOG
                             $payment_id = ModelPayment::newInstance()->saveLog($data['concept'], $order->order->uuid, $order->order->amount, $order->order->currenct, $data['email'], $data['user'], $data['itemid'], $product_type[0], 'COINJAR');
                             //source
                             if ($product_type[0] == '101') {
                                 ModelPayment::newInstance()->payPublishFee($product_type[2], $payment_id);
                             } else {
                                 if ($product_type[0] == '201') {
                                     ModelPayment::newInstance()->payPremiumFee($product_type[2], $payment_id);
                                 } else {
                                     ModelPayment::newInstance()->addWallet($data['user'], $order->order->amount);
                                 }
                             }
                             return PAYMENT_COMPLETED;
                         } else {
                             return PAYMENT_ALREADY_PAID;
                         }
                     }
                 }
             }
         }
     }
     return PAYMENT_PENDING;
 }
开发者ID:virsoni,项目名称:plugin-payment,代码行数:42,代码来源:CoinjarPayment.php


示例17: currency_select

 public static function currency_select($currencies = null, $item = null)
 {
     if ($currencies == null) {
         $currencies = osc_get_currencies();
     }
     if ($item == null) {
         $item = osc_item();
     }
     if (Session::newInstance()->_getForm('currency') != '') {
         $item['fk_c_currency_code'] = Session::newInstance()->_getForm('currency');
     }
     if (count($currencies) > 1) {
         $default_key = null;
         $currency = osc_get_preference('currency');
         if (isset($item['fk_c_currency_code'])) {
             $default_key = $item['fk_c_currency_code'];
         } elseif (isset($currency)) {
             $default_key = $currency;
         }
         parent::generic_select('currency', $currencies, 'pk_c_code', 's_description', null, $default_key);
     } else {
         if (count($currencies) == 1) {
             parent::generic_input_hidden("currency", $currencies[0]["pk_c_code"]);
             echo $currencies[0]['s_description'];
         }
     }
 }
开发者ID:randomecho,项目名称:OSClass,代码行数:27,代码来源:Item.form.class.php


示例18: osc_get_preference

 *                        Copyright (C) 2010 OSCLASS
 *
 *       This program is free software: you can redistribute it and/or
 *     modify it under the terms of the GNU Affero General Public License
 *     as published by the Free Software Foundation, either version 3 of
 *            the License, or (at your option) any later version.
 *
 *     This program is distributed in the hope that it will be useful, but
 *         WITHOUT ANY WARRANTY; without even the implied warranty of
 *        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *             GNU Affero General Public License for more details.
 *
 *      You should have received a copy of the GNU Affero General Public
 * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
$sQuery = osc_get_preference('keyword_placeholder', 'modern_theme');
?>
<script type="text/javascript">
    var sQuery = '<?php 
echo osc_esc_js($sQuery);
?>
' ;

    $(document).ready(function(){
        if($('input[name=sPattern]').val() == sQuery) {
            $('input[name=sPattern]').css('color', 'gray');
        }
        $('input[name=sPattern]').click(function(){
            if($('input[name=sPattern]').val() == sQuery) {
                $('input[name=sPattern]').val('');
                $('input[name=sPattern]').css('color', '');
开发者ID:semul,项目名称:Osclass,代码行数:31,代码来源:inc.search.php


示例19: butler_delete_activated_users

function butler_delete_activated_users($days = 30, $limit = 1000)
{
    $users = ModelButler::newInstance()->inactivatedUsers($days, $limit);
    $mUsers = User::newInstance();
    $numSuccess = 0;
    foreach ($users as $user) {
        $success = $mUsers->deleteUser($user['pk_i_id']);
        if ($success) {
            $numSuccess++;
        }
    }
    osc_set_preference('activated_users', (int) osc_get_preference('activated_users', 'butler') + $numSuccess, 'butler', 'INTEGER');
}
开发者ID:syedfiraat4,项目名称:bikade.com,代码行数:13,代码来源:index.php


示例20: printf

                        <div class="form-controls"><?php 
printf(__('Inactivated listings deleted: %d', 'butler'), osc_get_preference('activated_listings', 'butler'));
?>
</div>
                    </div>

                    <div class="form-row">
                        <div class="form-controls"><?php 
printf(__('Spam listings deleted: %d', 'butler'), osc_get_preference('spam_listings', 'butler'));
?>
</div>
                    </div>

                    <div class="form-row">
                        <div class="form-controls"><?php 
printf(__('Inactivated users deleted: %d', 'butler'), osc_get_preference('activated_users', 'butler'));
?>
</div>
                    </div>

                    <div class="clear"></div>
                    <div class="form-actions">
                        <input type="submit" id="save_changes" value="<?php 
echo osc_esc_html(__('Run Butler now'));
?>
" class="btn btn-submit" />
                    </div>

                </div>
            </fieldset>
        </form>
开发者ID:syedfiraat4,项目名称:bikade.com,代码行数:31,代码来源:stats.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP osc_get_product_id函数代码示例发布时间:2022-05-15
下一篇:
PHP osc_get_locales函数代码示例发布时间: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