Can u please help me with the few lines here???
This line error is giving me a headache.
Want to anable upload of files (*.doc ) on the server.
User loged in, with login and password...
require_once(HEADERF);
$path=$path_upload;
$handle=opendir($path);
$dir_size=0;
// here is the error
// first
while ($file = readdir($handle)){
if($file != "." && $file != ".." ){
$dir_size+=filesize($path."/".$file);
}
}
if(IsSet($message)){
$ns -> tablerender("", "<div style=\"text-align:center\"><b>".$message."</b></div>");
}
if(isset($delete)){
// when i push the button delete, remove the file from the server
// if the filename exists
foreach ($f_name as $ff_name){
@unlink( $path."/".$ff_name);
}
}
$text .= "<form method=\"post\" action=\"$PHP_SELF\" id=\"frm_add\" name=\"frm_add\">
<table style=\"width:95%\">";
$handle=opendir($path);
while ($file = readdir($handle)){
if($file != "." && $file != ".." ){
$file_extention = strtolower(substr(strrchr($file, "."), 1));
$file_name=substr($file,0, strrpos($file, "."));
$text .= "<tr><td>
<input name=\"f_name[]\" value=\"$file\" type=\"checkbox\" class=\"tbox\" ></td><td>
<a href=\"_view_files.php?nFile=".$file."\" target=\"_blank\">".$file."</a>
<a href=\"user.php?searchquery=".$file_name."&searchsubmit=1\" target=\"_blank\">".LAN_4."</a>
</td></tr>";
}
}
$text .= "
</td>
</tr>
<tr style=\"vertical-align:top\">
<td style=\"width:20%\" ></td>
<td style=\"width:80%\">
<input class=\"button\" type=\"submit\" name=\"delete\" value=\"".LAN_DELETE."\" />
</td>
</tr>
</table>
</form>";
$ns -> tablerender("<div style=\"text-align:center\">".LAN_201."</div>", $text);
require_once(FOOTERF);