本文整理汇总了PHP中Tool::alertOpenerClose方法的典型用法代码示例。如果您正苦于以下问题:PHP Tool::alertOpenerClose方法的具体用法?PHP Tool::alertOpenerClose怎么用?PHP Tool::alertOpenerClose使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tool
的用法示例。
在下文中一共展示了Tool::alertOpenerClose方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: FileUpload
<?php
require '../init.inc.php';
$file = new FileUpload('pic');
//$path = $file->Get_Link_Path();
if (isset($_POST['type'])) {
switch ($_POST['type']) {
case 'content':
$hight = 100;
$width = 150;
break;
case 'rotatain':
$hight = 193;
$width = 268;
}
}
$img = new Image($file->Get_Path());
$img->Thumb($width, $hight);
$img->Out();
Tool::alertOpenerClose('上传成功', $file->Get_Link_Path());
示例2: substr
<?php
require substr(dirname(__FILE__), 0, -7) . '/init.inc.php';
if (isset($_POST['send'])) {
$_fileupload = new FileUpload('pic', $_POST['MAX_FILE_SIZE']);
$_path = $_fileupload->getPath();
$_img = new Image($_path);
$_img->thumb(100, 100);
$_img->out();
Tool::alertOpenerClose('thumbnail upload succeed', $_path);
} else {
Tool::alertBack('file too size');
}
示例3: switch
break;
case 'rotatain':
$_width = 268;
$_height = 193;
$_info = '轮播图上传成功!';
break;
case 'adver':
switch ($_POST['size']) {
case '690x80':
$_width = 690;
$_height = 80;
$_info = '头部广告690x80上传成功!';
break;
case '270x200':
$_width = 270;
$_height = 200;
$_info = '侧栏广告270x200上传成功!';
}
break;
default:
Tool::alertBack('警告:非法操作!');
}
$_fileupload = new FileUpload('pic', $_POST['MAX_FILE_SIZE']);
$_path = $_fileupload->getPath();
$_img = new Image($_path);
$_img->thumb($_width, $_height);
$_img->out();
Tool::alertOpenerClose($_info, $_path);
} else {
Tool::alertBack('警告:文件过大或者其他未知错误导致浏览器崩溃!');
}