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


PHP osc_esc_js函数代码示例

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


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

示例1: customHead

function customHead()
{
    ?>
        <script type="text/javascript">
            $(document).ready(function() {
                $("#dialog-widget-delete").dialog({
                    autoOpen: false,
                    modal: true,
                    title: '<?php 
    echo osc_esc_js(__('Delete widget'));
    ?>
'
                });
            });

            // dialog delete function
            function delete_dialog(widget_id) {
                $("#dialog-widget-delete input[name='id']").attr('value', widget_id);
                $("#dialog-widget-delete").dialog('open');
                return false;
            }

        </script>
        <?php 
}
开发者ID:oanav,项目名称:closetshare,代码行数:25,代码来源:widgets.php

示例2: customHead

function customHead()
{
    echo '<script type="text/javascript" src="' . osc_current_admin_theme_js_url('jquery.validate.min.js') . '"></script>';
    ?>
        <script type="text/javascript">
            $(document).ready(function() {
                $("#dialog-widget-delete").dialog({
                    autoOpen: false,
                    modal: true,
                    title: '<?php 
    echo osc_esc_js(__('Delete widget'));
    ?>
'
                });
            });
            
            // dialog delete function
            function delete_dialog(widget_id) {
                $("#dialog-widget-delete input[name='id']").attr('value', widget_id);
                $("#dialog-widget-delete").dialog('open');
                return false;
            }
            
        </script>
        <?php 
}
开发者ID:semul,项目名称:Osclass,代码行数:26,代码来源:widgets.php

示例3: 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

示例4: customHead

function customHead()
{
    ?>
        <script type="text/javascript">
            $(document).ready(function() {
                // dialog delete
                $("#dialog-delete-theme").dialog({
                    autoOpen: false,
                    modal: true,
                    title: '<?php 
    echo osc_esc_js(__('Delete theme'));
    ?>
'
                });
            });

            // dialog delete function
            function delete_dialog(theme) {
                $("#dialog-delete-theme input[name='webtheme']").attr('value', theme);
                $("#dialog-delete-theme").dialog('open');
                return false;
            }
        </script>
        <?php 
}
开发者ID:mylastof,项目名称:os-class,代码行数:25,代码来源:index.php

示例5: customHead

function customHead()
{
    ?>
        <script type="text/javascript">
            $(document).ready(function(){
                // Code for form validation
                $("form[name=currency_form]").validate({
                    rules: {
                        pk_c_code: {
                            required: true,
                            minlength: 3,
                            maxlength: 3
                        },
                        s_name: {
                            required: true,
                            minlength: 1
                        }
                    },
                    messages: {
                        pk_c_code: {
                            required: '<?php 
    echo osc_esc_js(__('Currency code: this field is required'));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__('Currency code: this field is required'));
    ?>
.',
                            maxlength: '<?php 
    echo osc_esc_js(__('Currency code: this field is required'));
    ?>
.'
                        },
                        s_name: {
                            required: '<?php 
    echo osc_esc_js(__('Name: this field is required'));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__('Name: this field is required'));
    ?>
.'
                        }
                    },
                    wrapper: "li",
                    errorLabelContainer: "#error_list",
                    invalidHandler: function(form, validator) {
                        $('html,body').animate({ scrollTop: $('h1').offset().top }, { duration: 250, easing: 'swing'});
                    },
                    submitHandler: function(form){
                        $('button[type=submit], input[type=submit]').attr('disabled', 'disabled');
                        form.submit();
                    }
                });
            });
        </script>
        <?php 
}
开发者ID:oanav,项目名称:closetshare,代码行数:58,代码来源:currency_form.php

示例6: customHead

function customHead()
{
    ?>
        <script type="text/javascript" src="<?php 
    echo osc_current_admin_theme_js_url('jquery.validate.min.js');
    ?>
"></script>
        <script type="text/javascript">
            $(document).ready(function(){
                // Code for form validation
                $("form[name=currency_form]").validate({
                    rules: {
                        pk_c_code: {
                            required: true,
                            minlength: 3,
                            maxlength: 3
                        },
                        s_name: {
                            required: true,
                            minlength: 1
                        }
                    },
                    messages: {
                        pk_c_code: {
                            required: '<?php 
    echo osc_esc_js(__('Currency code: this field is required'));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__('Currency code: this field is required'));
    ?>
.',
                            maxlength: '<?php 
    echo osc_esc_js(__('Currency code: this field is required'));
    ?>
.'
                        },
                        s_name: {
                            required: '<?php 
    echo osc_esc_js(__('Name: this field is required'));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__('Name: this field is required'));
    ?>
.'
                        }
                    },
                    wrapper: "li",
                    errorLabelContainer: "#error_list",
                    invalidHandler: function(form, validator) {
                        $('html,body').animate({ scrollTop: $('h1').offset().top }, { duration: 250, easing: 'swing'});
                    }
                });
            });
        </script>
        <?php 
}
开发者ID:semul,项目名称:Osclass,代码行数:58,代码来源:currency_form.php

示例7: 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

示例8: customHead

function customHead()
{
    ?>
<script type="text/javascript">
$(document).ready(function(){
    // Code for form validation

    $.validator.addMethod('customrule', function(value, element) {
        if($('input:radio[name=purge_searches]:checked').val()=='custom') {
            if($("#custom_queries").val()=='') {
                return false;
            }
        }
        return true;
    });

    $("form[name=searches_form]").validate({
        rules: {
            custom_queries: {
                digits: true,
                customrule: true
            }
        },
        messages: {
            custom_queries: {
                digits: '<?php 
    echo osc_esc_js(__('Custom number: this field must only contain numeric characters'));
    ?>
.',
                customrule: '<?php 
    echo osc_esc_js(__('Custom number: this field cannot be left empty'));
    ?>
.'
            }
        },
        wrapper: "li",
        errorLabelContainer: "#error_list",
        invalidHandler: function(form, validator) {
            $('html,body').animate({ scrollTop: $('h1').offset().top }, { duration: 250, easing: 'swing'});
        },
        submitHandler: function(form){
            $('button[type=submit], input[type=submit]').attr('disabled', 'disabled');
            form.submit();
        }
    });
});
</script>
        <?php 
}
开发者ID:mylastof,项目名称:os-class,代码行数:49,代码来源:searches.php

示例9: 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

示例10: customHead

    function customHead() { ?>
        <script type="text/javascript">
            $(document).ready(function(){
                $('input:hidden[name="installed"]').each(function() {
                    $(this).parent().parent().children().css('background', 'none');
                    if( $(this).val() == '1' ) {
                        if( $(this).attr("enabled") == 1 ) {
                            $(this).parent().parent().css('background-color', '#EDFFDF');
                        } else {
                            $(this).parent().parent().css('background-color', '#FFFFDF');
                        }
                    } else {
                        $(this).parent().parent().css('background-color', '#FFF0DF');
                    }
                });

                // dialog delete
                $("#dialog-uninstall").dialog({
                    autoOpen: false,
                    modal: true,
                    title: '<?php echo osc_esc_js( __('Uninstall plugin') ); ?>'
                });

                $('.plugin-tooltip').each(function(){
                    $(this).osc_tooltip('<?php echo osc_esc_js(__('Problems with this plugin? Ask for support.')); ?>',{layout:'gray-tooltip',position:{x:'right',y:'middle'}});
                });


            });

            // dialog delete function
            function uninstall_dialog(plugin, title) {
                $("#dialog-uninstall input[name='plugin']").attr('value', plugin);
                $("#dialog-uninstall").dialog('option', 'title', title);
                $("#dialog-uninstall").dialog('open');
                return false;
            }
        </script>
        <?php
    }
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:40,代码来源:index.php

示例11: while

} else {
    ?>
    <?php 
    $i = 1;
    while (osc_has_alerts()) {
        ?>
        <div class="userItem" >
            <div class="title-has-actions">
                <h3><?php 
        _e('Alert', 'osclassclsx');
        ?>
 <?php 
        echo $i;
        ?>
</h3> <a onclick="javascript:return confirm('<?php 
        echo osc_esc_js(__('This action can\'t be undone. Are you sure you want to continue?', 'benderw'));
        ?>
');" href="<?php 
        echo osc_user_unsubscribe_alert_url();
        ?>
"><?php 
        _e('Delete this alert', 'osclassclsx');
        ?>
</a><div class="clear"></div></div>
            <div>
            <?php 
        osc_current_web_theme_path('loop.php');
        ?>
            <?php 
        if (osc_count_items() == 0) {
            ?>
开发者ID:kraymond70,项目名称:osclassclsx,代码行数:31,代码来源:user-alerts.php

示例12: osc_esc_js

        ?>
', '');
            }
            <?php 
    }
    ?>
            <?php 
    if (osc_locale_dec_point() != '') {
        ?>
            var tmp = price.split('<?php 
        echo osc_esc_js(osc_locale_dec_point());
        ?>
');
            if(tmp.length>2) {
                price = tmp[0]+'<?php 
        echo osc_esc_js(osc_locale_dec_point());
        ?>
'+tmp[1];
            }
            <?php 
    }
    ?>
            $("#price").prop("value", price);
        });
    });
    <?php 
}
?>
</script>
<?php 
osc_current_web_theme_path('footer.php');
开发者ID:mylastof,项目名称:os-class,代码行数:31,代码来源:item-post.php

示例13: toDatatablesFormat

 private function toDatatablesFormat()
 {
     $this->result['iTotalRecords'] = $this->total;
     $this->result['iTotalDisplayRecords'] = $this->total_filtered;
     $this->result['sEcho'] = $this->sEcho;
     $this->result['aaData'] = array();
     if (count($this->media) == 0) {
         return;
     }
     $count = 0;
     foreach ($this->media as $aRow) {
         $row = array();
         $row[] = '<input type="checkbox" name="id[]" value="' . $aRow['pk_i_id'] . '" />';
         $row[] = '<div id="media_list_pic"><img src="' . osc_apply_filter('resource_path', osc_base_url() . $aRow['s_path']) . $aRow['pk_i_id'] . '_thumbnail.' . $aRow['s_extension'] . '" style="max-width: 60px; max-height: 60px;" /></div> <div id="media_list_filename">' . $aRow['s_content_type'];
         $row[] = '<a onclick="javascript:return confirm(\'' . osc_esc_js(__('This action can not be undone. Are you sure you want to continue?')) . '\')" href="' . osc_admin_base_url(true) . '?page=media&amp;action=delete&amp;id[]=' . $aRow['pk_i_id'] . '" id="dt_link_delete">' . __('Delete') . '</a>';
         $row[] = '<a target="_blank" href="' . osc_item_url_ns($aRow['fk_i_item_id']) . '">item #' . $aRow['fk_i_item_id'] . '</a>';
         $row[] = $aRow['dt_pub_date'];
         $count++;
         $this->result['aaData'][] = $row;
     }
 }
开发者ID:randomecho,项目名称:OSClass,代码行数:21,代码来源:media_processing.php

示例14: osc_base_url

                            $.getJSON(
                                "<?php 
echo osc_base_url(true);
?>
?page=ajax&action=check_username_availability",
                                {"s_username": $("#s_username").attr("value")},
                                function(data){
                                    clearInterval(cInterval);
                                    if(data.exists==0) {
                                        $("#available").text('<?php 
echo osc_esc_js(__("The username is available", "modern"));
?>
');
                                    } else {
                                        $("#available").text('<?php 
echo osc_esc_js(__("The username is NOT available", "modern"));
?>
');
                                    }
                                }
                            );
                        }, 1000);
                    }
                });

            });
        </script>
    </head>
    <body>
        <?php 
osc_current_web_theme_path('header.php');
开发者ID:jmcclenon,项目名称:Osclass,代码行数:31,代码来源:user-change_username.php

示例15: customHead


//.........这里部分代码省略.........
                        },
                        rewrite_user_alerts: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_user_recover: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_user_forgot: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_user_change_password: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_user_change_email: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_user_change_username: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_user_change_email_confirm: {
                            required: true,
                            minlength: 1
                        }
                    },
                    messages: {
                        rewrite_item_url: {
                            required: '<?php 
    echo osc_esc_js(__("Listings url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Listings url: this field is required"));
    ?>
.'
                        },
                        rewrite_page_url: {
                            required: '<?php 
    echo osc_esc_js(__("Page url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Page url: this field is required"));
    ?>
.'
                        },
                        rewrite_cat_url: {
                            required: '<?php 
    echo osc_esc_js(__("Categories url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Categories url: this field is required"));
    ?>
.'
                        },
                        rewrite_search_url: {
                            required: '<?php 
    echo osc_esc_js(__("Search url: this field is required"));
    ?>
.',
开发者ID:jmcclenon,项目名称:Osclass,代码行数:67,代码来源:permalinks.php


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