本文整理匯總了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;
}