wok-next diff wikiss/stuff/plugins/wkp_Upload.php @ rev 10798
wikiss: list uploaded files
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jun 03 11:01:10 2011 +0200 (2011-06-03) |
parents | 4cb7a59db958 |
children | 44d943aaf21c |
line diff
1.1 --- a/wikiss/stuff/plugins/wkp_Upload.php Wed Jun 01 18:38:36 2011 +0200 1.2 +++ b/wikiss/stuff/plugins/wkp_Upload.php Fri Jun 03 11:01:10 2011 +0200 1.3 @@ -44,6 +44,20 @@ 1.4 <form method="post" enctype="multipart/form-data" action="?action=uploadfile"> 1.5 <input type="file" name="file" value="file"/> 1.6 <input type="submit"/> 1.7 +<table> 1.8 +'; 1.9 + if ($handle = @opendir("pages/data")) { 1.10 + while(($item = readdir($handle)) !== false) { 1.11 + if ($item == '..' || $item == '.') continue; 1.12 + $CONTENT .= '<tr><td><input type=checkbox '; 1.13 + exec('grep -qs "pages/data/'.$item.'" pages/*.txt', $tmp, $ret); 1.14 + if ($ret == 0) $CONTENT .= 'checked=checked '; 1.15 + $CONTENT .= 'disabled=disabled /><a href="pages/data/'. 1.16 + $item.'">'.$item.'</a></td></tr>'; 1.17 + } 1.18 + } 1.19 + $CONTENT .= ' 1.20 +</table> 1.21 </form> 1.22 '; 1.23 break;