$lang_description: $desc";
+ $mail->altBody = "URL: $newfilename \n\n$lang_notif_msg\n\n" . "$lang_title: $title" . "\n\n $lang_description: $desc";
+ }
+
+ }
+ else
+ // set up mailer
+ {
+ $mail = new phpmailer();
$mail->IsSMTP(); // set mailer to use SMTP
$mail->Host = "$default->owl_email_server"; // specify main and backup server
$mail->From = "$default->owl_email_from";
@@ -409,19 +409,19 @@ function notify_users($groupid, $flag, $parent, $filename, $title, $desc, $type)
$mail->AddReplyTo("$default->owl_email_replyto", "OWL Intranet");
$mail->WordWrap = 50; // set word wrap to 50 characters
$mail->IsHTML(true); // set email format to HTML
- $mail->Subject = "$lang_notif_subject_upd";
+ $mail->Subject = "$lang_notif_subject_upd";
- // if type not a url
+ // if type not a url
if ($type != "url")
{
- // if attachfile is true..go through process of attaching file..simarly to previous
+ // if attachfile is true..go through process of attaching file..simarly to previous
if ($sql->f("attachfile") == 1)
{
$mail->Body = "$lang_notif_msg
" . "$lang_title: $title" . "
$lang_description: $desc";
$mail->altBody = "$lang_notif_msg\n\n" . "$lang_title: $title" . "\n\n $lang_description: $desc";
- if (!$default->owl_use_fs)
- {
- // check existence of file
+ if (!$default->owl_use_fs)
+ {
+ // check existence of file
if (file_exists("$default->owl_FileDir/$filename"))
{
unlink("$default->owl_FileDir/$filename");
@@ -480,18 +480,18 @@ function notify_users($groupid, $flag, $parent, $filename, $title, $desc, $type)
$mail->Body = "URL: $newfilename
$lang_notif_msg
" . "$lang_title: $title" . "
$lang_description: $desc";
$mail->altBody = "URL: $newfilename \n\n$lang_notif_msg\n\n" . "$lang_title: $title" . "\n\n $lang_description: $desc";
}
- }
- // send the email
- $mail->Send();
- if (!$default->owl_use_fs && $sql->f("attachfile") == 1)
- {
- unlink("$default->owl_FileDir$newfilename");
- }
-
+ }
+ // send the email
+ $mail->Send();
+ if (!$default->owl_use_fs && $sql->f("attachfile") == 1)
+ {
+ unlink("$default->owl_FileDir$newfilename");
+ }
+
}
}
// BEGIN BUG 548994
- }
+ }
// END BUG 548994
}
@@ -502,29 +502,29 @@ function notify_users($groupid, $flag, $parent, $filename, $title, $desc, $type)
* Used to verify a users login name and password
*
* @param $username
- * The username to verfiy
+ * The username to verfiy
* @param $password
- * The password to verify
+ * The password to verify
*/
//-------------------------------------------------------------
// Usable
function verify_login($username, $password)
{
- global $default;
- $sql = new Owl_DB;
- $query = "select * from $default->owl_users_table where username = '$username' and password = '" . md5($password) . "'";
- $sql->query("select * from $default->owl_users_table where username = '$username' and password = '" . md5($password) . "'");
- $numrows = $sql->num_rows($sql);
+ global $default;
+ $sql = new Owl_DB;
+ $query = "select * from $default->owl_users_table where username = '$username' and password = '" . md5($password) . "'";
+ $sql->query("select * from $default->owl_users_table where username = '$username' and password = '" . md5($password) . "'");
+ $numrows = $sql->num_rows($sql);
// Bozz Begin added Password Encryption above, but for now
// I will allow admin to use non crypted password untile he
// upgrades all users
- if ($numrows == "1")
- {
- while($sql->next_record()) {
+ if ($numrows == "1")
+ {
+ while($sql->next_record()) {
if ( $sql->f("disabled") == 1 )
- $verified["bit"] = 2;
+ $verified["bit"] = 2;
else
- $verified["bit"] = 1;
+ $verified["bit"] = 1;
$verified["user"] = $sql->f("username");
$verified["uid"] = $sql->f("id");
$verified["group"] = $sql->f("groupid");
@@ -533,10 +533,10 @@ function verify_login($username, $password)
}
// Remove this else in a future version
else {
- // username admin check password
+ // username admin check password
if ($username == "admin")
{
- $sql->query("select * from $default->owl_users_table where username = '$username' and password = '$password'");
+ $sql->query("select * from $default->owl_users_table where username = '$username' and password = '$password'");
$numrows = $sql->num_rows($sql);
if ($numrows == "1")
{
@@ -564,13 +564,13 @@ function verify_login($username, $password)
$sql = new Owl_DB;
$sql->query("select * from $default->owl_sessions_table where uid = '".$verified["uid"]."'");
- if ($sql->num_rows($sql) >= $maxsessions && $verified["bit"] != 0) {
+ if ($sql->num_rows($sql) >= $maxsessions && $verified["bit"] != 0) {
if ( $verified["group"] == 0)
- $verified["bit"] = 1;
+ $verified["bit"] = 1;
else
- $verified["bit"] = 3;
- }
- return $verified;
+ $verified["bit"] = 3;
+ }
+ return $verified;
}
//------------------------------------------------------------
@@ -580,82 +580,82 @@ function verify_login($username, $password)
* Used to verify a users session
*
* @param $username
- * The username to check
+ * The username to check
* @param $password
- * The password to check
+ * The password to check
*/
//-------------------------------------------------------------
// Usable
function verify_session($sess) {
getprefs();
- global $default, $lang_sesstimeout, $lang_sessinuse, $lang_clicklogin;
+ global $default, $lang_sesstimeout, $lang_sessinuse, $lang_clicklogin;
$sess = ltrim($sess);
- $verified["bit"] = 0;
-
- $sql = new Owl_DB;
+ $verified["bit"] = 0;
+
+ $sql = new Owl_DB;
$sql->query("select * from $default->owl_sessions_table where sessid = '$sess'");
- $numrows = $sql->num_rows($sql);
- $time = time();
-
- if ($numrows == "1")
- {
- while($sql->next_record())
- {
- if(getenv("HTTP_CLIENT_IP"))
- {
- $ip = getenv("HTTP_CLIENT_IP");
- }
- elseif(getenv("HTTP_X_FORWARDED_FOR"))
- {
- $forwardedip = getenv("HTTP_X_FORWARDED_FOR");
- list($ip,$ip2,$ip3,$ip4)= split (",", $forwardedip);
- }
- else
- {
- $ip = getenv("REMOTE_ADDR");
- }
- if ($ip == $sql->f("ip"))
- {
- // if timeout not exceeded
- if(($time - $sql->f("lastused")) <= $default->owl_timeout)
- {
- $verified["bit"] = 1;
- $verified["userid"] = $sql->f("uid");
- $sql->query("select * from $default->owl_users_table where id = '".$verified["userid"]."'");
- while($sql->next_record()) $verified["groupid"] = $sql->f("groupid");
- }
- else
- {
+ $numrows = $sql->num_rows($sql);
+ $time = time();
+
+ if ($numrows == "1")
+ {
+ while($sql->next_record())
+ {
+ if(getenv("HTTP_CLIENT_IP"))
+ {
+ $ip = getenv("HTTP_CLIENT_IP");
+ }
+ elseif(getenv("HTTP_X_FORWARDED_FOR"))
+ {
+ $forwardedip = getenv("HTTP_X_FORWARDED_FOR");
+ list($ip,$ip2,$ip3,$ip4)= split (",", $forwardedip);
+ }
+ else
+ {
+ $ip = getenv("REMOTE_ADDR");
+ }
+ if ($ip == $sql->f("ip"))
+ {
+ // if timeout not exceeded
+ if(($time - $sql->f("lastused")) <= $default->owl_timeout)
+ {
+ $verified["bit"] = 1;
+ $verified["userid"] = $sql->f("uid");
+ $sql->query("select * from $default->owl_users_table where id = '".$verified["userid"]."'");
+ while($sql->next_record()) $verified["groupid"] = $sql->f("groupid");
+ }
+ else
+ {
// Bozz Bug Fix begin
if (file_exists("./lib/header.inc"))
{
- include("./lib/header.inc");
+ include("./lib/header.inc");
} else {
include("../lib/header.inc");
}
// Bozz Buf Fix End
- print("
".$lang_sessinuse);
+ exit;
+ }
+ }
+ }
+ return $verified;
}
//------------------------------------------------------------
@@ -665,21 +665,21 @@ function verify_session($sess) {
* used to get the folder name
*
* @param $parent
- * The parent id
+ * The parent id
* @Return $sql->f("name");
- * Return the name of the folder
+ * Return the name of the folder
*/
//-------------------------------------------------------------
// Usable
function fid_to_name($parent)
{
- global $default;
- $sql = new Owl_DB;
+ global $default;
+ $sql = new Owl_DB;
$sql->query("select name from $default->owl_folders_table where id = $parent");
- while($sql->next_record())
- {
- return $sql->f("name");
- }
+ while($sql->next_record())
+ {
+ return $sql->f("name");
+ }
}
//------------------------------------------------------------
@@ -689,21 +689,21 @@ function fid_to_name($parent)
* Gets the filename corresponding to the file id
*
* @param $id
- * The file id
+ * The file id
* @Return $sql->f("name");
- * Return the name of the file
+ * Return the name of the file
*/
//-------------------------------------------------------------
// Usable
function flid_to_name($id)
{
- global $default;
- $sql = new Owl_DB;
+ global $default;
+ $sql = new Owl_DB;
$sql->query("select name from $default->owl_files_table where id = $id");
- while($sql->next_record())
- {
- return $sql->f("name");
- }
+ while($sql->next_record())
+ {
+ return $sql->f("name");
+ }
}
//------------------------------------------------------------
@@ -713,20 +713,20 @@ function flid_to_name($id)
* gets filename based on id
*
* @param $id
- * file id
+ * file id
* @Return $sql->f("name");
- * Return the name of the file
+ * Return the name of the file
*/
//-------------------------------------------------------------
// Usable
function flid_to_filename($id) {
- global $default;
- $sql = new Owl_DB;
+ global $default;
+ $sql = new Owl_DB;
$sql->query("select filename from $default->owl_files_table where id = $id");
- while($sql->next_record())
- {
- return $sql->f("filename");
- }
+ while($sql->next_record())
+ {
+ return $sql->f("filename");
+ }
}
//------------------------------------------------------------
/**
@@ -735,22 +735,22 @@ function flid_to_filename($id) {
* Gets the group id that the user blongs to
*
* @param $userid
- * The user id
+ * The user id
* @Return $groupid
- * Return the groupId
+ * Return the groupId
*/
//-------------------------------------------------------------
// Usable
function owlusergroup($userid)
{
- global $default;
- $sql = new Owl_DB;
+ global $default;
+ $sql = new Owl_DB;
$sql->query("select groupid from $default->owl_users_table where id = '$userid'");
- while($sql->next_record())
- {
- $groupid = $sql->f("groupid");
- return $groupid;
- }
+ while($sql->next_record())
+ {
+ $groupid = $sql->f("groupid");
+ return $groupid;
+ }
}
//------------------------------------------------------------
/**
@@ -759,21 +759,21 @@ function owlusergroup($userid)
* used to find the file creator
*
* @param $fileid
- * The parent id
+ * The parent id
* @return $filecreator
- * Return the creatorid of the file
+ * Return the creatorid of the file
*/
//-------------------------------------------------------------
// Usable
function owlfilecreator($fileid) {
- global $default;
- $sql = new Owl_DB;
+ global $default;
+ $sql = new Owl_DB;
$sql->query("select creatorid from ".$default->owl_files_table." where id = '$fileid'");
- while($sql->next_record())
- {
- $filecreator = $sql->f("creatorid");
- return $filecreator;
- }
+ while($sql->next_record())
+ {
+ $filecreator = $sql->f("creatorid");
+ return $filecreator;
+ }
}
//------------------------------------------------------------
/**
@@ -782,22 +782,22 @@ function owlfilecreator($fileid) {
* Used to get the folder creator
*
* @param $fileid
- * The file id
+ * The file id
* @Return $foldercreator
- * Return the creatorid of the folder
+ * Return the creatorid of the folder
*/
//-------------------------------------------------------------
// Usable
function owlfoldercreator($folderid)
{
- global $default;
- $sql = new Owl_DB;
+ global $default;
+ $sql = new Owl_DB;
$sql->query("select creatorid from ".$default->owl_folders_table." where id = '$folderid'");
- while($sql->next_record())
- {
- $foldercreator = $sql->f("creatorid");
- return $foldercreator;
- }
+ while($sql->next_record())
+ {
+ $foldercreator = $sql->f("creatorid");
+ return $foldercreator;
+ }
}
//-------------------------------------------------------------
/**
@@ -806,23 +806,23 @@ function owlfoldercreator($folderid)
* Used to get the file group id
*
* @param $fileid
- * The file id
+ * The file id
* @Return $filegroup;
- * Returns the group id of the file group
+ * Returns the group id of the file group
*/
//-------------------------------------------------------------
// Usable
function owlfilegroup($fileid)
{
- global $default;
- $sql = new Owl_DB;
+ global $default;
+ $sql = new Owl_DB;
$sql->query("select groupid from $default->owl_files_table where id = '$fileid'");
- while($sql->next_record())
- {
- $filegroup = $sql->f("groupid");
- return $filegroup;
- }
-
+ while($sql->next_record())
+ {
+ $filegroup = $sql->f("groupid");
+ return $filegroup;
+ }
+
}
//-------------------------------------------------------------
/**
@@ -831,22 +831,22 @@ function owlfilegroup($fileid)
* Used to get the folder group id
*
* @param $folderid
- * The folder id
+ * The folder id
* @Return $foldergroup;
- * Returns the group id of the folder group
+ * Returns the group id of the folder group
*/
//-------------------------------------------------------------
// Usable
function owlfoldergroup($folderid) {
- global $default;
- $sql = new Owl_DB;
+ global $default;
+ $sql = new Owl_DB;
$sql->query("select groupid from $default->owl_folders_table where id = '$folderid'");
- while($sql->next_record())
- {
- $foldergroup = $sql->f("groupid");
- return $foldergroup;
- }
-
+ while($sql->next_record())
+ {
+ $foldergroup = $sql->f("groupid");
+ return $foldergroup;
+ }
+
}
//-------------------------------------------------------------
/**
@@ -855,23 +855,23 @@ function owlfoldergroup($folderid) {
* Used to get the folder parent
*
* @param $folderid
- * The folder id
+ * The folder id
* @Return $folderparent
- * Returns the folderparent of from the folder
+ * Returns the folderparent of from the folder
*/
//-------------------------------------------------------------
// Usable
function owlfolderparent($folderid)
{
- global $default;
- $sql = new Owl_DB;
+ global $default;
+ $sql = new Owl_DB;
$sql->query("select parent from $default->owl_folders_table where id = '$folderid'");
- while($sql->next_record())
- {
- $folderparent = $sql->f("parent");
- return $folderparent;
- }
-
+ while($sql->next_record())
+ {
+ $folderparent = $sql->f("parent");
+ return $folderparent;
+ }
+
}
//-------------------------------------------------------------
/**
@@ -880,22 +880,22 @@ function owlfolderparent($folderid)
* Used to get the file parent
*
* @param $fileid
- * The file id
+ * The file id
* @Return $fileparent
- * Returns the file parent of from the files
+ * Returns the file parent of from the files
*/
//-------------------------------------------------------------
// Usable
function owlfileparent($fileid)
{
- global $default;
- $sql = new Owl_DB; $sql->query("select parent from $default->owl_files_table where id = '$fileid'");
- while($sql->next_record())
- {
- $fileparent = $sql->f("parent");
-
- return $fileparent;
- }
+ global $default;
+ $sql = new Owl_DB; $sql->query("select parent from $default->owl_files_table where id = '$fileid'");
+ while($sql->next_record())
+ {
+ $fileparent = $sql->f("parent");
+
+ return $fileparent;
+ }
}
//------------------------------------------------------------
/**
@@ -904,26 +904,26 @@ function owlfileparent($fileid)
* Used to get the creator of the files
*
* @param $id
- * The id
+ * The id
* @Return $name;
- * Return the name of the creator
+ * Return the name of the creator
*/
//-------------------------------------------------------------
// Usable
function fid_to_creator($id) {
- global $default;
- $sql = new Owl_DB;
- $sql->query("select creatorid from ".$default->owl_files_table." where id = '$id'");
- $sql2 = new Owl_DB;
- while($sql->next_record())
- {
- $creatorid = $sql->f("creatorid");
- $sql2->query("select name from $default->owl_users_table where id = '".$creatorid."'");
- $sql2->next_record();
- $name = $sql2->f("name");
- }
- return $name;
+ global $default;
+ $sql = new Owl_DB;
+ $sql->query("select creatorid from ".$default->owl_files_table." where id = '$id'");
+ $sql2 = new Owl_DB;
+ while($sql->next_record())
+ {
+ $creatorid = $sql->f("creatorid");
+ $sql2->query("select name from $default->owl_users_table where id = '".$creatorid."'");
+ $sql2->next_record();
+ $name = $sql2->f("name");
+ }
+ return $name;
}
//------------------------------------------------------------
/**
@@ -932,21 +932,21 @@ function fid_to_creator($id) {
* select name from the group
*
* @param $id
- * The id
+ * The id
* @Return $sql->f("name");
- * Return the name of the group
+ * Return the name of the group
*/
//-------------------------------------------------------------
// Usable
function group_to_name($id)
{
- global $default;
- $sql = new Owl_DB;
- $sql->query("select name from $default->owl_groups_table where id = '$id'");
- while($sql->next_record())
- {
- return $sql->f("name");
- }
+ global $default;
+ $sql = new Owl_DB;
+ $sql->query("select name from $default->owl_groups_table where id = '$id'");
+ while($sql->next_record())
+ {
+ return $sql->f("name");
+ }
}
//------------------------------------------------------------
/**
@@ -955,26 +955,26 @@ function group_to_name($id)
* name from the users
*
* @param $id
- * The id
+ * The id
* @Return $name
- * Return the name of the user
+ * Return the name of the user
*/
//-------------------------------------------------------------
// Usable
function uid_to_name($id)
{
- global $default;
- $sql = new Owl_DB;
- $sql->query("select name from $default->owl_users_table where id = '$id'");
- while($sql->next_record())
- {
- $name = $sql->f("name");
- if ($name == "")
- {
- $name = "Owl";
- }
- return $name;
- }
+ global $default;
+ $sql = new Owl_DB;
+ $sql->query("select name from $default->owl_users_table where id = '$id'");
+ while($sql->next_record())
+ {
+ $name = $sql->f("name");
+ if ($name == "")
+ {
+ $name = "Owl";
+ }
+ return $name;
+ }
}
//------------------------------------------------------------
/**
@@ -983,22 +983,22 @@ function uid_to_name($id)
* get the noprefaccess from the users to compare if access granted
*
* @param $id
- * The id
+ * The id
* @Return prefaccess;
- * Return the name of the folder
+ * Return the name of the folder
*/
//-------------------------------------------------------------
// Usable
function prefaccess($id) {
- global $default;
- $prefaccess = 1;
- $sql = new Owl_DB; $sql->query("select noprefaccess from $default->owl_users_table where id = '$id'");
- while($sql->next_record())
- {
- $prefaccess = !($sql->f("noprefaccess"));
- return $prefaccess;
- }
+ global $default;
+ $prefaccess = 1;
+ $sql = new Owl_DB; $sql->query("select noprefaccess from $default->owl_users_table where id = '$id'");
+ while($sql->next_record())
+ {
+ $prefaccess = !($sql->f("noprefaccess"));
+ return $prefaccess;
+ }
}
//------------------------------------------------------------
/**
@@ -1007,28 +1007,28 @@ function prefaccess($id) {
* Used to generate a nav bar
*
* @param $parent
- * The parent id
+ * The parent id
* @Return $Navbar
- * Return the navbar that has been generated
+ * Return the navbar that has been generated
*/
//-------------------------------------------------------------
// NOT Usable -> Interface based
function gen_navbar($parent)
{
- global $default;
- global $sess, $expand, $sort, $sortorder, $order;
- $name = fid_to_name($parent);
- $navbar = "$name";
- $new = $parent;
- while ($new != "1")
- {
- $sql = new Owl_DB; $sql->query("select parent from $default->owl_folders_table where id = '$new'");
- while($sql->next_record()) $newparentid = $sql->f("parent");
- $name = fid_to_name($newparentid);
- $navbar = "$name/" . $navbar;
- $new = $newparentid;
- }
- return $navbar;
+ global $default;
+ global $sess, $expand, $sort, $sortorder, $order;
+ $name = fid_to_name($parent);
+ $navbar = "$name";
+ $new = $parent;
+ while ($new != "1")
+ {
+ $sql = new Owl_DB; $sql->query("select parent from $default->owl_folders_table where id = '$new'");
+ while($sql->next_record()) $newparentid = $sql->f("parent");
+ $name = fid_to_name($newparentid);
+ $navbar = "$name/" . $navbar;
+ $new = $newparentid;
+ }
+ return $navbar;
}
//------------------------------------------------------------
/**
@@ -1037,9 +1037,9 @@ function gen_navbar($parent)
* Get the directory path from the db
*
* @param $parent
- * The parent id
+ * The parent id
* @Return $Navbar;
- * Return the navbar with directory path
+ * Return the navbar with directory path
*/
//-------------------------------------------------------------
// NOT Usable if used in ocnjunction with navbar
@@ -1067,22 +1067,22 @@ function get_dirpath($parent) {
* generates the file size
*
* @param $filesize
- * The size of the file
+ * The size of the file
* @Return $file_size;
- * Return the rounded off file size
+ * Return the rounded off file size
*/
//-------------------------------------------------------------
// Usable
function gen_filesize($file_size)
{
- if(ereg("[^0-9]", $file_size))
- {
- return $file_size;
- }
-
- if ($file_size >= 1073741824)
- {
- $file_size = round($file_size / 1073741824 * 100) / 100 . "g";
+ if(ereg("[^0-9]", $file_size))
+ {
+ return $file_size;
+ }
+
+ if ($file_size >= 1073741824)
+ {
+ $file_size = round($file_size / 1073741824 * 100) / 100 . "g";
}
elseif ($file_size >= 1048576)
{
@@ -1096,7 +1096,7 @@ function gen_filesize($file_size)
{
$file_size = $file_size . "b";
}
- return $file_size;
+ return $file_size;
}
//------------------------------------------------------------
/**
@@ -1105,9 +1105,9 @@ function gen_filesize($file_size)
* used to upload
*
* @param $varname
- * The parent id
+ * The parent id
* @Return $sql->f("name");
- * Return the name of the folder
+ * Return the name of the folder
*/
//-------------------------------------------------------------
// Usable
@@ -1130,7 +1130,7 @@ function uploadCompat($varname) {
* Used to check requirments
*
* @Return 1
- * Returns 1
+ * Returns 1
*/
//-------------------------------------------------------------
// Usable
@@ -1159,32 +1159,32 @@ function checkrequirements()
*
*
* @param $cmd
- * The command
+ * The command
* @param $lines
*
* @param $errco
- * The error code
+ * The error code
* @Return "";
- * Return empty string
+ * Return empty string
* @Return $lines[count($lines)-1]
- * Returns numba of lines
+ * Returns numba of lines
*/
//-------------------------------------------------------------
// Usable
function myExec($_cmd, &$lines, &$errco)
{
- $cmd = "$_cmd ; echo $?";
- exec($cmd, $lines);
- // Get rid of the last errco line...
- $errco = (integer) array_pop($lines);
- if (count($lines) == 0)
- {
- return "";
- }
- else
- {
- return $lines[count($lines) - 1];
- }
+ $cmd = "$_cmd ; echo $?";
+ exec($cmd, $lines);
+ // Get rid of the last errco line...
+ $errco = (integer) array_pop($lines);
+ if (count($lines) == 0)
+ {
+ return "";
+ }
+ else
+ {
+ return $lines[count($lines) - 1];
+ }
}
//------------------------------------------------------------
/**
@@ -1193,32 +1193,32 @@ function myExec($_cmd, &$lines, &$errco)
* used to delete a file if it exists
*
* @param $file
- * The file to be deleted
+ * The file to be deleted
*/
//-------------------------------------------------------------
// Usable
function myDelete($file) {
- if (file_exists($file))
- {
- chmod($file,0777);
- if (is_dir($file))
- {
- $handle = opendir($file);
- while($filename = readdir($handle))
- {
- if ($filename != "." && $filename != "..")
- {
- myDelete($file."/".$filename);
- }
- }
- closedir($handle);
- rmdir($file);
- }
- else
- {
- unlink($file);
- }
- }
+ if (file_exists($file))
+ {
+ chmod($file,0777);
+ if (is_dir($file))
+ {
+ $handle = opendir($file);
+ while($filename = readdir($handle))
+ {
+ if ($filename != "." && $filename != "..")
+ {
+ myDelete($file."/".$filename);
+ }
+ }
+ closedir($handle);
+ rmdir($file);
+ }
+ else
+ {
+ unlink($file);
+ }
+ }
}
//------------------------------------------------------------
/**
@@ -1227,41 +1227,41 @@ function myDelete($file) {
* Prints out error messages
*
* @param $message
- * The message
+ * The message
* @param $submessage
- * The submessage
+ * The submessage
*/
//-------------------------------------------------------------
// Not Usable -> INTERFACE Based
function printError($message, $submessage) {
- global $default;
+ global $default;
global $sess, $parent, $expand, $order, $sortorder ,$sortname, $userid;
global $language;
- require("$default->owl_fs_root/locale/$default->owl_lang/language.inc");
- include("./lib/header.inc");
+ require("$default->owl_fs_root/locale/$default->owl_lang/language.inc");
+ include("./lib/header.inc");
- if(check_auth($parent, "folder_view", $userid) != "1") {
- $sql = new Owl_DB;
+ if(check_auth($parent, "folder_view", $userid) != "1") {
+ $sql = new Owl_DB;
$sql->query("select * from $default->owl_folders_table where id = '$parent'");
$sql->next_record();
$parent = $sql->f("parent");
- }
-
- echo("