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


PHP ISafe::id方法代码示例

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


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

示例1: show

    /**
     * @brief 展示插件
     * @param string $name 用户名
     * @param string $pwd  密码
     */
    public function show($name = '', $pwd = '')
    {
        $sessionName = ISafe::name();
        $sessionId = ISafe::id();
        $uploadUrl = IUrl::creatUrl($this->submit);
        $admin_name = $name == '' ? ISafe::get('admin_name') : $name;
        $admin_pwd = $pwd == '' ? ISafe::get('admin_pwd') : $pwd;
        echo <<<OEF
\t\t<script type="text/javascript">
\t\twindow.onload = function()
\t\t{
\t\t\tnew SWFUpload({
\t\t\t\t// Backend Settings
\t\t\t\tupload_url: "{$uploadUrl}",
\t\t\t\tpost_params: {"{$sessionName}": "{$sessionId}","admin_name":"{$admin_name}","admin_pwd":"{$admin_pwd}"},

\t\t\t\t// File Upload Settings
\t\t\t\tfile_types : "*.jpg;*.jpge;*.png;*.gif",

\t\t\t\t// Event Handler Settings - these functions as defined in Handlers.js
\t\t\t\t//  The handlers are not part of SWFUpload but are part of my website and control how
\t\t\t\t//  my website reacts to the SWFUpload events.
\t\t\t\tswfupload_preload_handler : preLoad,
\t\t\t\tswfupload_load_failed_handler : loadFailed,
\t\t\t\tfile_queue_error_handler : fileQueueError,
\t\t\t\tfile_dialog_complete_handler : fileDialogComplete,
\t\t\t\tupload_progress_handler : uploadProgress,
\t\t\t\tupload_error_handler : uploadError,
\t\t\t\tupload_success_handler : uploadSuccess,
\t\t\t\tupload_complete_handler : uploadComplete,

\t\t\t\t// Button Settings
\t\t\t\tbutton_placeholder_id : "uploadButton",
\t\t\t\tbutton_width: 50,
\t\t\t\tbutton_height: 21,
\t\t\t\tbutton_text : '选择...',
\t\t\t\tbutton_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
\t\t\t\tbutton_cursor: SWFUpload.CURSOR.HAND,

\t\t\t\t// Flash Settings
\t\t\t\tflash_url : "{$this->path}swfupload.swf",

\t\t\t\tcustom_settings : {
\t\t\t\t\tupload_target : "divFileProgressContainer"
\t\t\t\t},

\t\t\t\t// Debug Settings
\t\t\t\tdebug: false
\t\t\t});
\t\t};
\t\t</script>
OEF;
    }
开发者ID:yongge666,项目名称:sunupedu,代码行数:58,代码来源:swfupload.php


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