示例#1
0
function fs_remove($path)
{
    if (fs_is_dir($path)) {
        $a = fs_dir($path);
        $rc = true;
        for ($i = 0; $i < count($a); $i++) {
            $rc = $rc && fs_remove($path . "/" . $a[$i]);
        }
        return $rc && fs_remove_dir($path);
    } else {
        return fs_unlink($path);
    }
}
示例#2
0
//
// Pipecode 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, or
// (at your option) any later version.
//
// Pipecode 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 Pipecode.  If not, see <http://www.gnu.org/licenses/>.
//
print_header("Icons");
writeln('<table class="fill">');
writeln('<tr>');
writeln('<td>');
$a = fs_dir("{$doc_root}/images");
for ($i = 0; $i < count($a); $i++) {
    if (fs_ext($a[$i]) == "png" && string_has($a[$i], "-64")) {
        writeln('<div class="topic_box">');
        writeln('	<img src="/images/' . $a[$i] . '"/>');
        writeln('	' . substr($a[$i], 0, -7));
        writeln('</div>');
    }
}
writeln('</td>');
writeln('</tr>');
writeln('</table>');
print_footer();