Запись [f:_dev/util/delete.php] < dev.sky.1.001
Версия 1.001
001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 051 | <?php defined('START') and AUTH_OK or die; if (START == 'ajax'): # 2do elseif ('force' == $WHAT): # HTML DELETE FORCE ?>2do <script type="text/javascript"> mtop('Warning!!!<br>This utility will remove the whole applications!!!', '#f00'); </script> <?php else: # HTML DELETE TO RECYCLE $file = ($f = isset($g_file)) ? getfile($g_file, rectype($g_file)) : ''; # 2do: $file can be array! if ($f) sql("insert into _dev_recycled values(null,'$g_file',0,".escape($file).",now())") && unlink($g_file); $WVAL or $WVAL = '.'; if ($f) $WVAL = ($p = strrpos($WVAL, '/')) ? substr($WVAL, 0, $p) : '.'; define('UP', $WVAL == '.' ? false : (($p = strrpos($WVAL, '/')) ? substr($WVAL, 0, $p) : '.')); $TOP = "< Current dir: <b>$WVAL</b>".($WVAL == '.' ? ' which is: ' . ROOT : ''); ?><script type="text/javascript"> var s = 'If you do some work and plan later create DEV script in order to memorize your work then you should delete files'; s += ' (if required) via this page. This will memo files in recycle bin and therefore rollback of deleted files is possible.'; s += '<br>After script been created you can rollback your work via "My Builds" utility.'; if (<?=$WVAL=='.'&&!$f?1:0?>) mtop(s + '<br>Also you can force <a href="?utility=delete&force">delete</a> applications!'); if (<?=(int)$f?>) mtop('File `<?=@$g_file?>` has been moved to Recycle bin.', green); function d(f) { var r = '<div style="float:right"><input onclick="document.location.href=\'?utility=delete&file=' + f + '\'" type="button" value="yes" /> '; mtop(r + button_no + '</div>' + 'This will delete file `' + f + '` to recycle bin.<br>Are you sure?', green); } </script> <h3>Change dir (browse):</h3><?php function link_dir($v) { $a = $v == '..' ? UP : $v; return '<a href="?utility=delete&dir='.$a.'" class="nd">'."$v</a>"; } echo implode(' • ', array_map('link_dir', Area::lst($WVAL, 'is_dir', UP))) ?> <h3>Delete file:</h3><?php function link_file($v) { return '<a href="javascript:d(\''.$v.'\')" class="nd">'."$v</a>"; } echo implode(' • ', array_map('link_file', Area::lst($WVAL, 'is_file'))); endif; |
Записи Codebase (89)
Статус SKY.
Current version: 1.001
Coresky records: 22
Local (DEV) records: 89
Web (all) records: 105
Download: dev.php
Coresky records: 22
Local (DEV) records: 89
Web (all) records: 105
Download: dev.php