60 lines
1.7 KiB
PHP
60 lines
1.7 KiB
PHP
<?php
|
|
|
|
/**
|
|
* This is NOT a freeware, use is subject to license terms
|
|
* 应用名称: 贴吧楼中楼回复 9.0
|
|
* 下载地址: https://addon.dismall.com/plugins/replyfloor.html
|
|
* 应用开发者: 乘凉
|
|
* 开发者QQ: 594433766
|
|
* 更新日期: 202505310549
|
|
* 授权域名: www.shitangsweet.com
|
|
* 授权码: 2025053105b89RrI3R9n
|
|
* 未经应用程序开发者/所有者的书面许可,不得进行反向工程、反向汇编、反向编译等,不得擅自复制、修改、链接、转载、汇编、发表、出版、发展与之有关的衍生产品、作品等
|
|
*/
|
|
|
|
|
|
/**
|
|
* $author: 乘凉 $
|
|
*/
|
|
|
|
if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
|
|
exit('Access Denied');
|
|
}
|
|
|
|
delDirAndFile(getglobal('setting/attachdir').'./replyfloor');
|
|
|
|
$sql = <<<EOF
|
|
DROP TABLE IF EXISTS `cdb_plugin_replyfloor_message`;
|
|
DROP TABLE IF EXISTS `cdb_plugin_replyfloor_attachment`;
|
|
DROP TABLE IF EXISTS `cdb_plugin_replyfloor_attachment_unused`;
|
|
EOF;
|
|
|
|
runquery($sql);
|
|
|
|
$finish = TRUE;
|
|
|
|
function delDirAndFile($path, $delDir = true) {
|
|
if (is_array($path)) {
|
|
foreach ($path as $subPath)
|
|
delDirAndFile($subPath, $delDir);
|
|
}
|
|
if (is_dir($path)) {
|
|
$handle = opendir($path);
|
|
if ($handle) {
|
|
while (false !== ( $item = readdir($handle) )) {
|
|
if ($item != "." && $item != "..")
|
|
is_dir("$path/$item") ? delDirAndFile("$path/$item", $delDir) : unlink("$path/$item");
|
|
}
|
|
closedir($handle);
|
|
if ($delDir)
|
|
return rmdir($path);
|
|
}
|
|
} else {
|
|
if (file_exists($path)) {
|
|
return unlink($path);
|
|
} else {
|
|
return FALSE;
|
|
}
|
|
}
|
|
clearstatcache();
|
|
} |