diff --git a/admin.php b/admin.php
deleted file mode 100644
index 3ce1f30..0000000
--- a/admin.php
+++ /dev/null
@@ -1,6 +0,0 @@
-owl_fs_root/presentation/webPageTemplate.inc");
-
-
-?>
-
diff --git a/admin/admin_dbmodify.php b/admin/admin_dbmodify.php
deleted file mode 100755
index 4780fb1..0000000
--- a/admin/admin_dbmodify.php
+++ /dev/null
@@ -1,183 +0,0 @@
-query("SELECT * FROM $default->owl_users_table WHERE id = '$id'");
- $sql->next_record();
- $newpass = $sql->f("password");
-
- // update password
- if ($newpass == $password)
- {
- $sql->query("UPDATE $default->owl_users_table SET groupid='$groupid',username='$loginname',name='$name',password='$password',quota_max='$quota', email='$email',notify='$notify',email='$email',attachfile='$attachfile',disabled='$disabled',noprefaccess='$noprefaccess',language='$newlanguage',maxsessions='$maxsessions' where id = '$id'");
- }
- else
- {
- $sql->query("UPDATE $default->owl_users_table SET groupid='$groupid',username='$loginname',name='$name',password='" . md5($password) ."',quota_max='$quota', email='$email', notify='$notify',attachfile='$attachfile',disabled='$disabled',noprefaccess='$noprefaccess',language='$newlanguage',maxsessions='$maxsessions' where id = '$id'");
- }
- // Bozz Change BEGIN
-
- // Clean Up the member group table first
- $sql->query("DELETE FROM $default->owl_users_grpmem_table WHERE userid = $id");
-
- // Insert the new Choices the member group table with selected groups
- for ( $i = 0 ; $i <= $no_groups_displayed; $i++ )
- {
- $checkboxfields = 'group' . $i;
- if($$checkboxfields != '')
- {
- $checkboxvalue = $$checkboxfields;
- $sql->query("INSERT INTO $default->owl_users_grpmem_table (userid,groupid) VALUES ('$id', '$checkboxvalue')");
- }
- }
- /* Bozz Change END */
- header("Location: index.php?sess=$sess&action=users&owluser=$id&change=1");
-}
-
-// if action selected is group
-if($action == "group")
-{
- //update the group table
- global $default;
- $sql = new Owl_DB;
- $sql->query("UPDATE $default->owl_groups_table SET name='$name' where id = '$id'");
- header("Location: index.php?sess=$sess&action=groups&group=$id&change=1");
-}
-
-// BEGIN BUG FIX: #448232 mistake in admin_dbmodify.php
-
-// if action is delete user
-if($action == $lang_deleteuser)
-{
-// END BUG FIX: #448232 mistake in admin_dbmodify.php
-
- //delete the user
- $sql = new Owl_DB;
- $sql->query("DELETE FROM $default->owl_users_table WHERE id = '$id'");
- // Bozz Change Begin
- // Also Clean up the groupmember table when a user is deleted
- $sql->query("DELETE FROM $default->owl_users_grpmem_table WHERE userid = $id");
- // Bozz Change End
- header("Location: index.php?sess=$sess&action=users");
-}
-
-// if action is edit html
-if($action == "edhtml")
-{
- //update html settings
- $sql = new Owl_DB;
- $sql->query("UPDATE $default->owl_html_table SET table_border='$border', table_header_bg='$header_bg', table_cell_bg='$cell_bg',table_cell_bg_alt='$cell_bg_alt',body_bgcolor='$body_bgcolor',body_textcolor='$body_textcolor',body_link='$body_link',body_vlink='$body_vlink',table_expand_width='$expand_width',table_collapse_width='$collapse_width', main_header_bgcolor='$main_header_bgcolor' ");
-
- header("Location: index.php?sess=$sess&action=edhtml&change=1");
-
-}
-
-//if action is edit prefernces
-if($action == "edprefs") {
- $sql = new Owl_DB;
-
- //update the preferences
- if ($lookAtHD != "false" )
- $lookAtHD = "true";
- if ($owl_expand != "1")
- $owl_expand = "0";
- if ($version_control != "1")
- $version_control = "0";
-
- $sql->query("UPDATE $default->owl_prefs_table SET email_from='$email_from', email_fromname='$email_fromname', email_replyto='$email_replyto', email_server='$email_server', lookAtHD='$lookAtHD', def_file_security='$def_file_security', def_file_group_owner='$def_file_group_owner', def_file_owner='$def_file_owner', def_file_title='$def_file_title', def_file_meta='$def_file_meta', def_fold_security='$def_fold_security', def_fold_group_owner='$def_fold_group_owner', def_fold_owner='$def_fold_owner', max_filesize='$max_filesize', timeout='$owl_timeout', expand='$owl_expand', version_control='$version_control', restrict_view='$restrict_view', dbdump_path='$dbdump_path', gzip_path='$gzip_path', tar_path='$tar_path'");
-
- header("Location: index.php?sess=$sess&action=edprefs&change=1");
-}
-
-// BEGIN BUG FIX: #448232 mistake in admin_dbmodify.php
-// if action is delete group
-if($action == $lang_deletegroup )
-{
-// END BUG FIX: #448232 mistake in admin_dbmodify.php
-
- //delete specified group
- global $default;
- $sql = new Owl_DB;
- $sql->query("DELETE FROM $default->owl_groups_table WHERE id = '$id'");
- header("Location: index.php?sess=$sess&action=groups");
-}
-
-// if action selected is add
-if($action == "add")
-{
- // if user to be added insert user into db
- if($type == "user")
- {
- $maxsessions = $maxsessions - 1; // always is stored - 1
- $sql = new Owl_DB;
- $sql->query("SELECT * FROM $default->owl_users_table WHERE username = '$loginname'");
-
- //check if user exists
- if($sql->num_rows($sql) > 0)
- {
- die ("$lang_err_user_exists");
- }
-
- $sql->query("INSERT INTO $default->owl_users_table (groupid,username,name,password,quota_max,quota_current,email,notify,attachfile,disabled,noprefaccess,language,maxsessions) VALUES ('$groupid', '$loginname', '$name', '" . md5($password) . "', '$quota', '0', '$email', '$notify','$attachfile', '$disabled', '$noprefaccess', '$newlanguage', '$maxsessions')");
- // Bozz Change BEGIN
- // Populated the member group table with selected groups
- $sql->query("SELECT id FROM $default->owl_users_table WHERE username = '$loginname'");
- $sql->next_record();
- $newuid = $sql->f("id");
-
- for ( $i = 0 ; $i <= $no_groups_displayed; $i++ )
- {
- $checkboxfields = 'group' . $i;
- if($$checkboxfields != '')
- {
- $checkboxvalue = $$checkboxfields;
- $sql->query("INSERT INTO $default->owl_users_grpmem_table (userid,groupid) VALUES ('$newuid', '$checkboxvalue')");
- }
- }
- /* Bozz Change END */
-
- // set home folder????
- if($home == "1")
- {
- $sql->query("select * from $default->owl_users_table where username = '$loginname'");
- while($sql->next_record()) $id = $sql->f("id");
- $sql->query("insert into $default->owl_folders_table values (0, '$loginname', '2', '54', '$groupid', '$id')");
- mkdir($default->owl_fs_root."/".fid_to_name("1")."/Home/$loginname", 0777);
- }
- header("Location: index.php?sess=$sess");
- }
- elseif($type == "group")
- {
- $sql = new Owl_DB;
- $sql->query("INSERT INTO $default->owl_groups_table (name) VALUES ('$name')");
- header("Location: index.php?sess=$sess");
- }
-}
-
-?>
diff --git a/admin/index.php b/admin/index.php
deleted file mode 100755
index 4d751b1..0000000
--- a/admin/index.php
+++ /dev/null
@@ -1,785 +0,0 @@
-");
-
-// if usergroupid invalid then unauthorised view and exit
-if($usergroupid != "0") {
- die("$lang_err_unauthorized");
-}
-
-// if not action set ..set action to users
-if(!isset($action)) {
- $action = "users";
-}
-
-//-------------------------------------------------------------
-/**
- * Function PrintUsers
- *
- * Prints the users out
- *
- */
-//-------------------------------------------------------------
-// Semi-Usable - Interface based
-function printusers()
-{
- global $sess, $default, $lang_users;
-
- //create a new connection
- $sql = new Owl_DB;
- // create a new active session
- $sql_active_sess = new Owl_DB;
-
-
- $sql->query("select username,name,id,maxsessions from $default->owl_users_table order by name");
-
-
- /* print("
| table_header_bg>$lang_users |
");
-
-
- print(" |
"); */
-
-
- print("table_border>| table_header_bg>$lang_users | table_header_bg>  |
");
-
-
- while($sql->next_record()) {
- // loop through record getting user information
- $uid = $sql->f("id");
- $username = $sql->f("username");
- $name = $sql->f("name");
- $maxsess = $sql->f("maxsessions") + 1;
- $numrows = 0;
-
- // find active sessions
- $sql_active_sess->query("select * from $default->owl_sessions_table where uid = $uid");
- $sql_active_sess->next_record();
- $numrows = $sql_active_sess->num_rows($sql_active_sess);
-
- // print out information ->not usable
- if ($name == "")
- print("| ".$username." | ");
- else
- print("
| ".$name." | ");
- print("(".$numrows."/".$maxsess.") |
");
- }
- print("
");
-}
-
-//-------------------------------------------------------------
-/**
- * Function PrintGroups
- *
- * Prints the Groups out
- *
- */
-//-------------------------------------------------------------
-// Semi-Usable -> Interface Based
-function printgroups()
-{// print out all groups
- global $sess, $lang_groups, $default;
- $sql = new Owl_DB;
- $sql->query("select name,id from $default->owl_groups_table order by name");
- print("table_border>| table_header_bg>$lang_groups |
");
-
- while($sql->next_record())
- {
- print("| ".$sql->f("name")." |
");
- }
- print("
");
-}
-
-//-------------------------------------------------------------
-/**
- * Function PrintUsr($id)
- *
- * Prints the User out
- *
- * @param $id
- * The Id of the user who's info is to be printed
- *
- */
-//-------------------------------------------------------------
-// Semi-Usable -> Interface Based
-function printuser($id)
-{ //declare globals
- global $sess,$change,$lang_saved,$lang_title,$lang_group,$lang_username,$lang_password,$lang_change,$lang_quota,$lang_groupmember,$lang_noprefaccess,$lang_disableuser, $lang_userlang, $lang_maxsessions, $lang_attach_file;
- global $lang_flush_sessions_alt, $lang_flushed, $lang_deleteuser, $lang_email, $lang_notification, $default, $flush;
-
- if($change == 1)
- {
- print("$lang_saved
");
- }
-
- if ($flush == 1)
- {
- flushsessions($id, $sess);
- print($lang_flushed);
- }
-
- $sql = new Owl_DB;
- $sql->query("select id,name from $default->owl_groups_table order by name");
- $i=0;
-
- // store groups in array
- while($sql->next_record())
- {
- $groups[$i][0] = $sql->f("id");
- $groups[$i][1] = $sql->f("name");
- $i++;
- }
- $sql->query("select * from $default->owl_users_table where id = '$id'");
-
- //post to dbmodify any changes and their values
- while($sql->next_record())
- {
- print("");
- }
-}
-
-//-------------------------------------------------------------
-/**
- * Function flushsessions($id, $sess)
- *
- * Flushes the session variable form the db
- *
- * @param $id
- * The Id of the user
- * @param $sess
- * The session variable
-*/
-//-------------------------------------------------------------
-// Usable
-function flushsessions($id, $sess)
-{
- global $default;
- $sql= new Owl_DB;
- $sql->query("delete from $default->owl_sessions_table where uid='$id' AND sessid!='$sess'");
-}
-
-
-//-------------------------------------------------------------
-/**
- * Function printgroup($id)
- *
- * Prints out the group
- *
- * @param $id
- * The Id of the user
- *
-*/
-//-------------------------------------------------------------
-// Semi-Usable -> interface based
-
-function printgroup($id)
-{
- global $sess,$change,$lang_title,$lang_change,$lang_deletegroup,$lang_saved,$default;
-
- if(isset($change))
- {
- print("$lang_saved
");
- }
-
- $sql = new Owl_DB;
- $sql->query("select id,name from $default->owl_groups_table where id = '$id'");
-
- // post to dbmodify with several values
- while($sql->next_record())
- {
- print("");
- }
-}
-
-//-------------------------------------------------------------
-/**
- * Function printnewgroup()
- *
- * Prints out a new group
- *
-
-*/
-//-------------------------------------------------------------
-// NOT Usable
-function printnewgroup()
-{
- global $default, $sess,$lang_title,$lang_add;
- print("");
-}
-
-//-------------------------------------------------------------
-/**
- * Function printnewuserr()
- *
- * Prints out a new user
- *
-*/
-//-------------------------------------------------------------
-// Semi-Usable
-function printnewuser() {
- global $sess,$lang_title,$lang_username,$lang_group,$lang_password,$lang_add,$default, $lang_quota,$lang_groupmember;
- global $lang_email, $lang_notification, $lang_noprefaccess, $lang_disableuser, $lang_userlang, $lang_maxsessions, $lang_attach_file;
- $sql = new Owl_DB;
- $sql->query("select id,name from $default->owl_groups_table order by name");
- $i=0;
- // get all groups
- while($sql->next_record())
- {
- $groups[$i][0] = $sql->f("id");
- $groups[$i][1] = $sql->f("name");
- $i++;
- }
- print("");
-}
-
-//-------------------------------------------------------------
-/**
- * Function printHTML()
- *
- * Prints out the required HTML
- *
- */
-//-------------------------------------------------------------
-// NOT Usable
-function printhtml() {
- global $default, $sess, $lang_add, $lang_change, $change, $lang_saved;
- global $lang_ht_tbl_border_sz, $lang_ht_tbl_hd_bg, $lang_ht_tbl_cell_bg_cl, $lang_ht_tbl_cell_bg_al, $lang_ht_tbl_bg_cl, $lang_ht_expand_width, $lang_ht_collapse_width, $lang_ht_bd_bg_cl, $lang_ht_bd_txt_cl, $lang_ht_bd_lnk_cl, $lang_ht_bd_vlnk_cl, $lang_ht_bd_width;
- if(isset($change)) print("$lang_saved
");
- print("");
-}
-//-------------------------------------------------------------
-/**
- * Function printPrefs()
- *
- * Prints out the preferences in a specific format
- *
- */
-//-------------------------------------------------------------
-// NOT Usable
-function printprefs() {
- global $default, $sess, $lang_add, $lang_change, $change, $lang_saved;
- global $lang_owl_title_email, $lang_owl_email_from, $lang_owl_email_fromname, $lang_owl_email_replyto , $lang_owl_email_server, $lang_owl_title_HD, $lang_owl_lookAtHD, $lang_owl_def_file_security, $lang_owl_def_file_group_owner, $lang_owl_def_file_owner, $lang_owl_def_file_title, $lang_owl_def_file_meta , $lang_owl_def_fold_sec, $lang_owl_def_fold_group_owner, $lang_owl_def_fold_owner, $lang_owl_title_other, $lang_owl_max_filesize, $lang_owl_owl_timeout, $lang_owl_owl_expand, $lang_owl_version_control, $lang_owl_restrict_view ;
- global $lang_owl_title_tools, $lang_owl_dbdump_path,$lang_owl_gzip_path, $lang_owl_tar_path;
-
- if(isset($change)) print("$lang_saved
");
- print("");
-}
-
-//-------------------------------------------------------------
-/**
- * Function DoBackup()
- *
- * Does a backup by zipping relevant data
- *
- */
-//-------------------------------------------------------------
-// NOT Usable
-function dobackup() {
- global $default;
-
- $command = $default->dbdump_path . " --opt --host=" . $default->owl_db_host . " --user=" . $default->owl_db_user . " --password=" . $default->owl_db_pass . " " . $default->owl_db_name . " | " . $default->gzip_path . " -fc";
- $date = date("Ymd.Hms");
-
- header("Content-Disposition: attachment; filename=\"" . $default->owl_db_name . "-$date.sql.gz\"");
- header("Content-Location: " . $default->owl_db_name . "-$date.sql.gz");
- header("Content-Type: application/octet-stream");
- //header("Content-Length: $fsize");
- //header("Pragma: no-cache");
- header("Expires: 0");
- passthru($command);
- exit();
-
-}
-
-
-// if action has been selected..do it..
-if($action) {
- print("table_expand_width BGCOLOR=$default->main_header_bgcolor CELLSPACING=0 CELLPADDING=0 BORDER=$default->table_border HEIGHT=30>");
- print("| ");
- print(" |
");
- print("| ");
- print uid_to_name($userid);
- print(" : $lang_logout | ");
- print(" $lang_owl_admin | ");
- print(" | ");
- print("
");
- print("
");
- print("
table_expand_width>
");
- print("table_expand_width BORDER=$default->table_border>");
- print("table_border>");
- print(" ");
- print(" ");
- print(" ");
- print(" ");
-
- if (file_exists($default->dbdump_path) && file_exists($default->gzip_path))
- {
- print("
");
- }
- else {
- print("
");
- }
-
-// print("$lang_upg_MD5
");
- printusers();
- print("
");
- printgroups();
- print(" | ");
- print(" | ");
- // if user action selected..print user
- if(isset($owluser))
- {
- printuser($owluser);
- }
-
- //if group action selected print group
- if(isset($group))
- {
- printgroup($group);
- }
-
- // if newgroup action slelected print the new group
- if($action == "newgroup")
- {
- printnewgroup();
- }
-
- // if the newuser action print the new user
- if($action == "newuser")
- {
- printnewuser();
- }
-
- //if the edit html action has been selected run the printHTML
- if($action == "edhtml")
- {
- printhtml();
- }
-
- // if edit preferences selected print the preferences
- if($action == "edprefs")
- {
- printprefs();
- }
- print(" |
");
-}
-else
-{
- exit("$lang_err_general");
-}
-
-print("
table_expand_width>
");
-?>
-
-