Results 1 to 10 of 10
-
28th Mar 2012, 01:42 PM #1OPMemberWebsite's:
WarezRocker.info Share4U.org Imdb.WarezRocker.info DownTurko.org Host-Palace.com HeroTurko.proFilemanager In php (HELP)
i am making a php based filemanager but getting some problem,i am trying to show all files from a directory with checkbox system and in a table,but if only 1 file is stored in the directory then its ok but if many files then its not fit in the table list.i need help,please guys.
my code is:
PHP Code:<?php
$filespath = dirname(__FILE__)."/files/";
if ($dir = opendir($filespath))
{
$images = array();
while (false !== ($file = readdir($dir)))
{
if ($file != "." && $file != "..")
{
$images[] = $file;
}
}
?>
<div id="filelist">
<table width="400px" align="center">
<tr><td>Click</td><td>Files</td><td>File Size</td></tr>
<?
foreach($images as $image)
{
?>
<tr><td><input type="checkbox" name="files[]" value="<? echo $image;?>" /></td><td><? echo $image;?></td><td><? echo filesize($filespath.$image)."KB";?></td></tr>
</table>
</div>
<?
}
closedir($dir);
}
?>saninokia Reviewed by saninokia on . Filemanager In php (HELP) i am making a php based filemanager but getting some problem,i am trying to show all files from a directory with checkbox system and in a table,but if only 1 file is stored in the directory then its ok but if many files then its not fit in the table list.i need help,please guys. my code is: <?php $filespath = dirname(__FILE__)."/files/"; if ($dir = opendir($filespath)) { $images = array(); while (false !== ($file = readdir($dir))) Rating: 5
-
28th Mar 2012, 01:50 PM #2Member
great i'm also working on the similar mod.. for rapidleech will take a look tonight..
-
28th Mar 2012, 02:07 PM #3MemberWebsite's:
wscripts.net damnlolscript.com lulzjet.comremove </table></div> from the loop
-
28th Mar 2012, 02:12 PM #4Respected Member
Try this:
PHP Code:<?php
$filespath = dirname(__FILE__)."/files/";
if ($dir = opendir($filespath))
{
$images = array();
while (false !== ($file = readdir($dir)))
{ if ($file != "." && $file != "..") {$images[] = $file;} }
echo "<div id='filelist'><table width='400px' align='center'><tr align=center><td>Click</td><td>Files</td><td>File Size</td></tr>";
foreach($images as $image)
{
$size = filesize($filespath.$image).' KB';
echo "<tr align=center><td><input type='checkbox' name='files[]' value='$image' /></td><td>$image</td><td>$size</td></tr>";
}
echo '</table></div> ';
closedir($dir);
}
?>
-
28th Mar 2012, 02:15 PM #5OPMemberWebsite's:
WarezRocker.info Share4U.org Imdb.WarezRocker.info DownTurko.org Host-Palace.com HeroTurko.proThx Lock Down Its Works.You Are My Hero,hurreeeeyyyy.hehe.
-
28th Mar 2012, 02:16 PM #6Respected Member
You are welcome.
-
8th Apr 2012, 11:53 AM #7OPMemberWebsite's:
WarezRocker.info Share4U.org Imdb.WarezRocker.info DownTurko.org Host-Palace.com HeroTurko.prohow to select 1 or 2 file from filelist using checkbox? for more action like edit,delete.
-
9th Apr 2012, 12:39 AM #8Respected Member
You add a 2nd and 3rd < input check box one for edit and one for delete.
-
9th Apr 2012, 06:03 AM #9OPMemberWebsite's:
WarezRocker.info Share4U.org Imdb.WarezRocker.info DownTurko.org Host-Palace.com HeroTurko.prothanks i am done.
-
9th Apr 2012, 04:16 PM #10Respected Member
You are welcome.
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Rapidshare Filemanager [How to see more than 3000 Files in Filemanager]
By astalavistia in forum Webmaster DiscussionReplies: 6Last Post: 16th May 2012, 10:06 PM -
public filemanager script
By rajeshjsl in forum Webmaster DiscussionReplies: 3Last Post: 24th Feb 2011, 04:43 PM -
PHP script to grab all files from MU filemanager
By Yawn92 in forum Webmaster ResourcesReplies: 2Last Post: 31st Jul 2010, 06:03 PM
themaPoster - post to forums and...
Version 5.38 released. Open older version (or...