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