本文整理汇总了PHP中verifyAction函数的典型用法代码示例。如果您正苦于以下问题:PHP verifyAction函数的具体用法?PHP verifyAction怎么用?PHP verifyAction使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了verifyAction函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: liubo
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Contact: Lyubomir Arsov, liubo (at) web-lobby.com
*/
include '../system.inc.php';
include 'functions.inc.php';
verifyAction('UPLOAD');
checkAccess('UPLOAD');
$path = trim(empty($_POST['d']) ? getFilesPath() : $_POST['d']);
verifyPath($path);
$res = '';
if (is_dir(fixPath($path))) {
if (!empty($_FILES['files']) && is_array($_FILES['files']['tmp_name'])) {
$errors = $errorsExt = array();
foreach ($_FILES['files']['tmp_name'] as $k => $v) {
$filename = $_FILES['files']['name'][$k];
$filename = RoxyFile::MakeUniqueFilename(fixPath($path), $filename);
$filePath = fixPath($path) . '/' . $filename;
if (!RoxyFile::CanUploadFile($filename)) {
$errorsExt[] = $filename;
} elseif (!move_uploaded_file($v, $filePath)) {
$errors[] = $filename;
开发者ID:fzlrhmn,项目名称:sanitasi-salatiga,代码行数:31,代码来源:upload.php
示例2: liubo
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Contact: Lyubomir Arsov, liubo (at) web-lobby.com
*/
include '../system.inc.php';
include 'functions.inc.php';
verifyAction('MOVEDIR');
checkAccess('MOVEDIR');
$path = trim(empty($_GET['d']) ? '' : $_GET['d']);
$newPath = trim(empty($_GET['n']) ? '' : $_GET['n']);
verifyPath($path);
verifyPath($newPath);
if (is_dir(fixPath($path))) {
if (mb_strpos($newPath, $path) === 0) {
echo getErrorRes(t('E_CannotMoveDirToChild'));
} elseif (file_exists(fixPath($newPath) . '/' . basename($path))) {
echo getErrorRes(t('E_DirAlreadyExists'));
} elseif (rename(fixPath($path), fixPath($newPath) . '/' . basename($path))) {
echo getSuccessRes();
} else {
echo getErrorRes(t('E_MoveDir') . ' ' . basename($path));
}
开发者ID:fzlrhmn,项目名称:sanitasi-salatiga,代码行数:31,代码来源:movedir.php
示例3: liubo
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Contact: Lyubomir Arsov, liubo (at) web-lobby.com
*/
include '../system.inc.php';
include 'functions.inc.php';
verifyAction('COPYDIR');
checkAccess('COPYDIR');
$path = trim(empty($_GET['d']) ? '' : $_GET['d']);
$newPath = trim(empty($_GET['n']) ? '' : $_GET['n']);
verifyPath($path);
verifyPath($newPath);
function copyDir($path, $newPath)
{
$items = listDirectory($path);
if (!is_dir($newPath)) {
mkdir($newPath, octdec(DIRPERMISSIONS));
}
foreach ($items as $item) {
if ($item == '.' || $item == '..') {
continue;
}
开发者ID:fzlrhmn,项目名称:sanitasi-salatiga,代码行数:31,代码来源:copydir.php
示例4: liubo
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Contact: Lyubomir Arsov, liubo (at) web-lobby.com
*/
include '../system.inc.php';
include 'functions.inc.php';
verifyAction('FILESLIST');
checkAccess('FILESLIST');
$path = empty($_GET['d']) ? getFilesPath() : $_GET['d'];
$type = empty($_GET['type']) ? '' : strtolower($_GET['type']);
if ($type != 'image' && $type != 'flash') {
$type = '';
}
verifyPath($path);
$files = listDirectory(fixPath($path), 0);
natcasesort($files);
$str = '';
echo '[';
foreach ($files as $f) {
$fullPath = $path . '/' . $f;
if (!is_file(fixPath($fullPath)) || $type == 'image' && !RoxyFile::IsImage($f) || $type == 'flash' && !RoxyFile::IsFlash($f)) {
continue;
开发者ID:famry,项目名称:fameCMSv2,代码行数:31,代码来源:fileslist.php
示例5: liubo
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Contact: Lyubomir Arsov, liubo (at) web-lobby.com
*/
include '../system.inc.php';
include 'functions.inc.php';
verifyAction('RENAMEDIR');
checkAccess('RENAMEDIR');
$path = trim(empty($_POST['d']) ? '' : $_POST['d']);
$name = trim(empty($_POST['n']) ? '' : $_POST['n']);
verifyPath($path);
if (is_dir(fixPath($path))) {
if (fixPath($path . '/') == fixPath(getFilesPath() . '/')) {
echo getErrorRes(t('E_CannotRenameRoot'));
} elseif (rename(fixPath($path), dirname(fixPath($path)) . '/' . $name)) {
echo getSuccessRes();
} else {
echo getErrorRes(t('E_RenameDir') . ' ' . basename($path));
}
} else {
echo getErrorRes(t('E_RenameDirInvalidPath'));
}
开发者ID:keremcankaya0,项目名称:CakeBlog,代码行数:31,代码来源:renamedir.php
示例6: liubo
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Contact: Lyubomir Arsov, liubo (at) web-lobby.com
*/
include '../system.inc.php';
include 'functions.inc.php';
verifyAction('COPYFILE');
checkAccess('COPYFILE');
$path = trim(empty($_POST['f']) ? '' : $_POST['f']);
$newPath = trim(empty($_POST['n']) ? '' : $_POST['n']);
if (!$newPath) {
$newPath = getFilesPath();
}
verifyPath($path);
verifyPath($newPath);
if (is_file(fixPath($path))) {
$newPath = $newPath . '/' . RoxyFile::MakeUniqueFilename(fixPath($newPath), basename($path));
if (copy(fixPath($path), fixPath($newPath))) {
echo getSuccessRes();
} else {
echo getErrorRes(t('E_CopyFile'));
}
开发者ID:e2e4gu,项目名称:cakeadmin-lightstrap,代码行数:31,代码来源:copyfile.php
示例7: liubo
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Contact: Lyubomir Arsov, liubo (at) web-lobby.com
*/
include '../system.inc.php';
include 'functions.inc.php';
verifyAction('CREATEDIR');
checkAccess('CREATEDIR');
$path = trim(empty($_GET['d']) ? '' : $_GET['d']);
$name = trim(empty($_GET['n']) ? '' : $_GET['n']);
verifyPath($path);
if (is_dir(fixPath($path))) {
if (mkdir(fixPath($path) . '/' . $name, octdec(DIRPERMISSIONS))) {
echo getSuccessRes();
} else {
echo getErrorRes(t('E_CreateDirFailed') . ' ' . basename($path));
}
} else {
echo getErrorRes(t('E_CreateDirInvalidPath'));
}
开发者ID:famry,项目名称:fameCMSv2,代码行数:30,代码来源:createdir.php
示例8: liubo
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Contact: Lyubomir Arsov, liubo (at) web-lobby.com
*/
include '../system.inc.php';
include 'functions.inc.php';
verifyAction('MOVEFILE');
checkAccess('MOVEFILE');
$path = trim(empty($_GET['f']) ? '' : $_GET['f']);
$newPath = trim(empty($_GET['n']) ? '' : $_GET['n']);
if (!$newPath) {
$newPath = getFilesPath();
}
verifyPath($path);
verifyPath($newPath);
if (is_file(fixPath($path))) {
if (file_exists(fixPath($newPath))) {
echo getErrorRes(t('E_MoveFileAlreadyExists') . ' ' . basename($newPath));
} elseif (rename(fixPath($path), fixPath($newPath))) {
echo getSuccessRes();
} else {
echo getErrorRes(t('E_MoveFile') . ' ' . basename($path));
开发者ID:famry,项目名称:fameCMSv2,代码行数:31,代码来源:movefile.php
示例9: liubo
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Contact: Lyubomir Arsov, liubo (at) web-lobby.com
*/
include '../system.inc.php';
include 'functions.inc.php';
verifyAction('DELETEDIR');
checkAccess('DELETEDIR');
$path = trim(empty($_GET['d']) ? '' : $_GET['d']);
verifyPath($path);
if (is_dir(fixPath($path))) {
if (fixPath($path . '/') == fixPath(getFilesPath() . '/')) {
echo getErrorRes(t('E_CannotDeleteRoot'));
} elseif (count(glob(fixPath($path) . "/*"))) {
echo getErrorRes(t('E_DeleteNonEmpty'));
} elseif (rmdir(fixPath($path))) {
echo getSuccessRes();
} else {
echo getErrorRes(t('E_CannotDeleteDir') . ' ' . basename($path));
}
} else {
echo getErrorRes(t('E_DeleteDirInvalidPath') . ' ' . $path);
开发者ID:createitro,项目名称:hartafreeex,代码行数:31,代码来源:deletedir.php
示例10: Copyright
Can be easily integrated with any other WYSIWYG editor or CMS.
Copyright (C) 2013, RoxyFileman.com - Lyubomir Arsov. All rights reserved.
For licensing, see LICENSE.txt or http://RoxyFileman.com/license
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Contact: Lyubomir Arsov, liubo (at) web-lobby.com
*/
include '../system.inc.php';
include 'functions.inc.php';
verifyAction('DOWNLOAD');
checkAccess('DOWNLOAD');
$path = trim($_GET['f']);
verifyPath($path);
if (is_file(fixPath($path))) {
$file = urldecode(basename($path));
header('Content-Disposition: attachment; filename="' . $file . '"');
header('Content-Type: application/force-download');
readfile(fixPath($path));
}
开发者ID:e2e4gu,项目名称:cakeadmin-lightstrap,代码行数:31,代码来源:download.php
示例11: liubo
the Free Software Foundation, either version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Contact: Lyubomir Arsov, liubo (at) web-lobby.com
*/
include '../system.inc.php';
include 'functions.inc.php';
@ini_set('memory_limit', -1);
verifyAction('DOWNLOADDIR');
checkAccess('DOWNLOADDIR');
$path = trim($_GET['d']);
verifyPath($path);
$path = fixPath($path);
if (!class_exists('ZipArchive')) {
echo '<script>alert("Cannot create zip archive - ZipArchive class is missing. Check your PHP version and configuration");</script>';
} else {
try {
$filename = basename($path);
$zipFile = $filename . '.zip';
$zipPath = BASE_PATH . '/tmp/' . $zipFile;
RoxyFile::ZipDir($path, $zipPath);
header('Content-Disposition: attachment; filename="' . $zipFile . '"');
header('Content-Type: application/force-download');
readfile($zipPath);
开发者ID:createitro,项目名称:hartafreeex,代码行数:31,代码来源:downloaddir.php
示例12: liubo
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Contact: Lyubomir Arsov, liubo (at) web-lobby.com
*/
include '../system.inc.php';
include 'functions.inc.php';
header("Pragma: cache");
header("Cache-Control: max-age=3600");
verifyAction('GENERATETHUMB');
checkAccess('GENERATETHUMB');
$path = urldecode(empty($_GET['f']) ? '' : $_GET['f']);
verifyPath($path);
@chmod(fixPath(dirname($path)), octdec(DIRPERMISSIONS));
@chmod(fixPath($path), octdec(FILEPERMISSIONS));
$w = intval(empty($_GET['width']) ? '100' : $_GET['width']);
$h = intval(empty($_GET['height']) ? '0' : $_GET['height']);
header('Content-type: ' . RoxyFile::GetMIMEType(basename($path)));
if ($w && $h) {
RoxyImage::CropCenter(fixPath($path), null, $w, $h);
} else {
RoxyImage::Resize(fixPath($path), null, $w, $h);
}
开发者ID:keremcankaya0,项目名称:CakeBlog,代码行数:31,代码来源:thumb.php
示例13: liubo
For licensing, see LICENSE.txt or http://RoxyFileman.com/license
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Contact: Lyubomir Arsov, liubo (at) web-lobby.com
*/
include '../system.inc.php';
include 'functions.inc.php';
verifyAction('DELETEFILE');
checkAccess('DELETEFILE');
$path = trim($_GET['f']);
verifyPath($path);
if (is_file(fixPath($path))) {
if (unlink(fixPath($path))) {
echo getSuccessRes();
} else {
echo getErrorRes(t('E_DeletеFile') . ' ' . basename($path));
}
} else {
echo getErrorRes(t('E_DeleteFileInvalidPath'));
}
开发者ID:fzlrhmn,项目名称:sanitasi-salatiga,代码行数:31,代码来源:deletefile.php
示例14: liubo
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Contact: Lyubomir Arsov, liubo (at) web-lobby.com
*/
include '../system.inc.php';
include 'functions.inc.php';
verifyAction('DIRLIST');
checkAccess('DIRLIST');
function getFilesNumber($path, $type)
{
$files = 0;
$dirs = 0;
$tmp = listDirectory($path);
foreach ($tmp as $ff) {
if ($ff == '.' || $ff == '..' || $ff == 'index.php' || $ff == '.htaccess') {
continue;
} elseif (is_file($path . '/' . $ff) && ($type == '' || $type == 'image' && RoxyFile::IsImage($ff) || $type == 'flash' && RoxyFile::IsFlash($ff))) {
$files++;
} elseif (is_dir($path . '/' . $ff)) {
$dirs++;
}
}
开发者ID:thunderamur,项目名称:PortaMx-Virgo-2.0-Beta-2,代码行数:31,代码来源:dirtree.php
示例15: liubo
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Contact: Lyubomir Arsov, liubo (at) web-lobby.com
*/
include '../system.inc.php';
include 'functions.inc.php';
verifyAction('RENAMEFILE');
checkAccess('RENAMEFILE');
$path = trim(empty($_GET['f']) ? '' : $_GET['f']);
$name = trim(empty($_GET['n']) ? '' : $_GET['n']);
verifyPath($path);
if (is_file(fixPath($path))) {
if (!RoxyFile::CanUploadFile($name)) {
echo getErrorRes(t('E_FileExtensionForbidden') . ' ".' . RoxyFile::GetExtension($name) . '"');
} elseif (rename(fixPath($path), dirname(fixPath($path)) . '/' . $name)) {
echo getSuccessRes();
} else {
echo getErrorRes(t('E_RenameFile') . ' ' . basename($path));
}
} else {
echo getErrorRes(t('E_RenameFileInvalidPath'));
}
开发者ID:famry,项目名称:fameCMSv2,代码行数:31,代码来源:renamefile.php
注:本文中的verifyAction函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论