diff --git a/livesupport/modules/archiveServer/var/html/default.css b/livesupport/modules/archiveServer/var/html/default.css deleted file mode 100644 index a065ef231..000000000 --- a/livesupport/modules/archiveServer/var/html/default.css +++ /dev/null @@ -1,19 +0,0 @@ - diff --git a/livesupport/modules/archiveServer/var/html/gbHtmlBrowse.php b/livesupport/modules/archiveServer/var/html/gbHtmlBrowse.php deleted file mode 100644 index 321f48233..000000000 --- a/livesupport/modules/archiveServer/var/html/gbHtmlBrowse.php +++ /dev/null @@ -1,245 +0,0 @@ -\n"; print_r($_FILES); print_r($_REQUEST); print_r($_SERVER); exit; -require_once"gbHtml_h.php"; -require_once"gbHtmlTestAuth.php"; - -$fldsname=array('author'=>'Author', 'title'=>'Title', 'creator'=>'Creator', - 'description'=>'Description', 'subject'=>'Subject', 'genre'=>'Genre'); - -$sessid = $_REQUEST[$config['authCookieName']]; -$userid = $gb->getSessUserId($sessid); -$login = $gb->getSessLogin($sessid); - -#$path = ($_REQUEST['path']=='' ? '/' : $_REQUEST['path']); -$id = (!$_REQUEST['id'] ? $gb->storId : $_REQUEST['id']); - -#echo"
\nsessid=$sessid\nuserid=$userid\nlogin=$login\n"; exit;
-
-$tpldata = array(
-    'msg'       => $_SESSION['alertMsg'],
-    'loggedAs'  => $login,
-    'id'        => $id,
-); unset($_SESSION['alertMsg']);
-
-switch($_REQUEST['act']){
-    case"getHomeDir":
-        $id = $gb->getObjId($login, $gb->storId);
-        $tpldata['id'] = $id;
-    default:
-#        echo"
\n$path\n$upath
\n"; print_r($_FILES); print_r($_REQUEST); exit; - $tpldata=array_merge($tpldata, array( - 'pathdata' => $gb->getPath($id, $sessid), - 'listdata' => ($gb->getObjType($id)=='Folder'? - $gb->listFolder($id, $sessid):array() - ), - 'tree' => ($_REQUEST['tree']=='Y'), - 'showPath' => true, - 'showTree' => true, - )); - if($_REQUEST['tree']=='Y'){ - $tpldata['treedata'] = $gb->getSubTree($id, $sessid); - } - break; - case"newfile": - $tpldata=array( - 'pathdata' => $gb->getPath($id, $sessid), - 'showEdit' => true, - 'id' => $id, - ); - break; - case"sform": - $tpldata=array( -# 'pathdata' => $gb->getPath($path, $sessid), - 'showSForm' => true, - 'id' => $id, - ); - break; - case"search": - $tpldata=array( -# 'pathdata' => $gb->getPath($path, $sessid), - 'search' => $gb->localSearch($_REQUEST['srch'], $sessid), - 'showSRes' => true, - 'id' => $id, - ); - break; -} - -if(PEAR::isError($tpldata['listdata'])){ - $tpldata['msg'] = $tpldata['listdata']->getMessage(); - $tpldata['listdata'] = array(); -} -#echo"
\n$path
\n"; print_r($tpldata['pathdata']); print_r($tpldata); exit; - -$tpldata['showMenu']=true; - - -// =================== template: =================== - -?> - -Archive - browser - - - - - - - - -

- Home directory - Upload new file - Create new folder - Search -

- - - -

- Tree   - - - / - : - - permissions - -

- - - - - - -
- - - - - - - - - -
- href="gbHtmlBrowse.php?id="> - - 'D', 'File'=>'F', 'Replica'=>'R'); echo$a[$o['type']]?> -  rename -  move -  copy - -  replicate - -  permissions -  DEL - -  Access -  Analyze -  MetaData - - -   (->) - -
No objects
- - - -
-?> - - - - - - - - -
File name:
Media file:
Metadata file:
- -
- - - -
- - - -
- - - -
Search string:
- - -
- - - -
    -$v){?> -
  • - - No items found - -
- - - - - - \ No newline at end of file diff --git a/livesupport/modules/archiveServer/var/html/gbHtmlLogin.php b/livesupport/modules/archiveServer/var/html/gbHtmlLogin.php deleted file mode 100644 index 33dd62848..000000000 --- a/livesupport/modules/archiveServer/var/html/gbHtmlLogin.php +++ /dev/null @@ -1,73 +0,0 @@ - $gb->getSubjects(), - 'actions' => $gb->getAllActions(), - 'objects' => $gb->getAllObjects(), - 'msg' => $_SESSION['alertMsg'] -); -unset($_SESSION['alertMsg']); - -// forms prefill: -if(is_array($_SESSION['lastPost'])) $d = array_merge($d, array( - 'lastSubj' => $_SESSION['lastPost']['subj'], - 'lastAction'=> $_SESSION['lastPost']['permAction'], - 'lastObj' => $_SESSION['lastPost']['obj'] -)); -unset($_SESSION['lastPost']); - -#header("Content-type: text/plain"); print_r($d); exit; -#require_once"gbHtml_f.php"; -// template follows: -?> - -Archive - login - - - - - -
- Test accounts/pass: - -
- -

Archive - login

- -
- - - - -
Login:
Password:
- -
-
- - - - - \ No newline at end of file diff --git a/livesupport/modules/archiveServer/var/html/gbHtmlPerms.php b/livesupport/modules/archiveServer/var/html/gbHtmlPerms.php deleted file mode 100644 index 2214e0fdc..000000000 --- a/livesupport/modules/archiveServer/var/html/gbHtmlPerms.php +++ /dev/null @@ -1,111 +0,0 @@ -getSessUserId($_REQUEST[$config['authCookieName']]); -$login = $gb->getSessLogin($_REQUEST[$config['authCookieName']]); - -$id = (!$_REQUEST['id'] ? $gb->storId : $_REQUEST['id']); - -#header("Content-type: text/plain"); print_r($_REQUEST); exit; -#header("Content-type: text/plain"); echo $gb->dumpTree($id, ' ')."\n"; exit; - -// prefill data structure for template -$tpldata = array( - 'pathdata' => $gb->getPath($id), - 'perms' => $gb->getObjPerms($id), - 'actions' => $gb->getAllowedActions($gb->getObjType($id)), - 'subjects' => $gb->getSubjects(), - 'id' => $id, - 'loggedAs' => $login, -); -$tpldata['msg'] = $_SESSION['alertMsg']; unset($_SESSION['alertMsg']); - -#header("Content-type: text/plain"); print_r($tpldata); exit; - - -#require_once"gbHtml_f.php"; -// template follows: -?> - -Archive - permission editor - - - - - - -

Permission editor

- -

Path: - $it) {?> - / - - -

- - - -0) foreach($tpldata['perms'] as $k=>$row) { - $da=($row['type']=='A' ? 'allow' : ($row['type']=='D' ? 'deny' : $row['type']));?> - - - - - - - - - -
subject nameactionpermission
> - remove -
none
- -
-Add permission - -for action - -to subject - - - - -
- - - - - \ No newline at end of file diff --git a/livesupport/modules/archiveServer/var/html/gbHtmlSubj.php b/livesupport/modules/archiveServer/var/html/gbHtmlSubj.php deleted file mode 100644 index cbf598c07..000000000 --- a/livesupport/modules/archiveServer/var/html/gbHtmlSubj.php +++ /dev/null @@ -1,162 +0,0 @@ -listGroup($id)); exit; - -// prefill data structure for template -switch($type){ - case "list": - $d = array( - 'subj' => $gb->getSubjectsWCnt(), - 'loggedAs' => $login - ); - break; - case "group": - $d = array( - 'rows' => $gb->listGroup($id), - 'id' => $id, - 'loggedAs' => $login, - 'gname' => $gb->getSubjName($id), - 'subj' => $gb->getSubjects() - ); - break; - case "passwd": - break; - default: -} -$d['msg'] = $_SESSION['alertMsg']; unset($_SESSION['alertMsg']); - -#header("Content-type: text/plain"); print_r($d); echo($list ? 'Y' : 'N')."\n"; exit; -#require_once"gbHtml_f.php"; -// template follows: -?> - -Archive - user and roles editor - - - - - - -

User/Group editor

- - -

Subjects:

- - -0) foreach($d['subj'] as $k=>$c) {?> - - - (G:) (U) - - - - - -
idloginuser/group
- - - - - - remove - change password -
none
- -
-Add subject with name: -[and password: ] - - -
- - - -

Subjects in group :

- - - - - -0) foreach($d['rows'] as $k=>$row) {?> - - - (G) (U) - - - - - -
- All subjects -
- - - - - - - removeFromGroup - -
none
- -
-Add subject - -to group - - - - -
- - -
- - - - - -
Old password:
New password:
Retype:
- - -
- - - - - - \ No newline at end of file diff --git a/livesupport/modules/archiveServer/var/html/gbHtmlTestAuth.php b/livesupport/modules/archiveServer/var/html/gbHtmlTestAuth.php deleted file mode 100644 index 70da09b9b..000000000 --- a/livesupport/modules/archiveServer/var/html/gbHtmlTestAuth.php +++ /dev/null @@ -1,9 +0,0 @@ -getSessLogin($_REQUEST[$config['authCookieName']]); -if(!isset($login)||$login==''){ - $_SESSION['alertMsg'] = "Login required"; - header("Location: gbHtmlLogin.php"); - exit; -} -?> diff --git a/livesupport/modules/archiveServer/var/html/gbHtmlTestData.php b/livesupport/modules/archiveServer/var/html/gbHtmlTestData.php deleted file mode 100644 index eb50120dd..000000000 --- a/livesupport/modules/archiveServer/var/html/gbHtmlTestData.php +++ /dev/null @@ -1,13 +0,0 @@ -initDb(); -$gb->init(); -#system("rm -f {$config['storageDir']}/*.bin {$config['storageDir']}/*.xml"); -$d = $gb->testData(); -$gb->putFile('/folder1/folder1_2/folder1_2_1', 'fileA', "123\n345\n", "", 'at'); -$gb->createReplica('/folder1/folder1_2/folder1_2_1/fileA', '/folder1/folder1_2/folder1_2_1', 'replFA', 'at'); -$gb->putFile('/folder1/folder1_2/folder1_2_1', 'fileB', "123\n345\n789\n", "", 'at'); -$gb->ovewriteMetadata('/folder1/folder1_2/folder1_2_1/fileA', "\n", 'at'); - -$gb->deleteFile('/folder1/folder1_2/folder1_2_1/fileB', 'at'); - -?> \ No newline at end of file diff --git a/livesupport/modules/archiveServer/var/html/gbHtml_h.php b/livesupport/modules/archiveServer/var/html/gbHtml_h.php deleted file mode 100644 index 6815c3f93..000000000 --- a/livesupport/modules/archiveServer/var/html/gbHtml_h.php +++ /dev/null @@ -1,25 +0,0 @@ -gm:\n".$err->getMessage()."\ndi:\n".$err->getDebugInfo()."\nui:\n".$err->getUserInfo()."\n"; - echo "
BackTrace:\n"; - print_r($err->backtrace); - echo "
\n"; - exit; -} - -$dbc = DB::connect($config['dsn'], TRUE); -$dbc->setFetchMode(DB_FETCHMODE_ASSOC); -$gb = &new GreenBox($dbc, $config); - -?> \ No newline at end of file diff --git a/livesupport/modules/archiveServer/var/html/gbHttp.php b/livesupport/modules/archiveServer/var/html/gbHttp.php deleted file mode 100644 index d17b608ab..000000000 --- a/livesupport/modules/archiveServer/var/html/gbHttp.php +++ /dev/null @@ -1,197 +0,0 @@ -\n"; print_r($_SERVER); exit; - -define('BROWSER', "gbHtmlBrowse.php"); - - -$sessid = $_REQUEST[$config['authCookieName']]; -$userid = $gb->getSessUserId($sessid); -$login = $gb->getSessLogin($sessid); - -#$path = ($_REQUEST['path']=='' ? '/' : $_REQUEST['path']); -#$upath = urlencode($path); -#$id = $gb->_idFromPath($path); -$id = (!$_REQUEST['id'] ? $gb->storId : $_REQUEST['id']); - - -#if(PEAR::isError($id)){ $_SESSION['msg'] = $id->getMessage(); header("Location: ".BROWSER."?id=$id"); exit; } -$redirUrl="gbHtmlBrowse.php?id=$id"; - -switch($_REQUEST['act']){ -// --- authentication --- - case"login"; -# echo"
\n"; print_r($_REQUEST); exit;
-        $sessid = $gb->login($_REQUEST['login'], $_REQUEST['pass']);
-        if($sessid && !PEAR::isError($sessid)){
-#            echo"
$sessid\n"; print_r($_REQUEST); exit;
-            setcookie($config['authCookieName'], $sessid);
-            $redirUrl="gbHtmlBrowse.php";
-            $fid = $gb->getObjId($_REQUEST['login'], $gb->storId);
-            if(!PEAR::isError($fid)) $redirUrl.="?id=$fid";
-        }else{ $redirUrl="gbHtmlLogin.php"; $_SESSION['alertMsg']='Login failed.'; }
-#        echo"
$redirUrl\n"; print_r($_REQUEST); exit;
-    break;
-    case"logout";
-        $gb->logout($sessid);
-        setcookie($config['authCookieName'], '');
-        $redirUrl="gbHtmlLogin.php";
-    break;
-
-// --- files ---
-    case"upload":
-        $tmpgunid = md5(microtime().$_SERVER['SERVER_ADDR'].rand()."org.mdlf.livesupport");
-        $ntmp = "{$gb->storageDir}/buffer/$tmpgunid";
-#        $ntmp = tempnam(""{$gb->storageDir}/buffer", 'gbTmp_');
-        $mdtmp = "";
-        move_uploaded_file($_FILES['mediafile']['tmp_name'], $ntmp); chmod($ntmp, 0664);
-        if($_FILES['mdatafile']['tmp_name']){
-            $mdtmp = "$ntmp.xml";
-            if(move_uploaded_file($_FILES['mdatafile']['tmp_name'], $mdtmp)){
-                chmod($mdtmp, 0664);
-            }
-        }
-        $r = $gb->putFile($id, $_REQUEST['filename'], $ntmp, $mdtmp, $sessid);
-        if(PEAR::isError($r)) $_SESSION['alertMsg'] = $r->getMessage();
-        else{
-#            $gb->updateMetadataDB($gb->_pathFromId($r), $mdata, $sessid);
-            @unlink($ntmp);
-            @unlink($mdtmp);
-        }
-        $redirUrl = BROWSER."?id=$id";
-    break;
-    case"newFolder":
-        $r = $gb->createFolder($id, $_REQUEST['newname'], $sessid);
-        if(PEAR::isError($r)) $_SESSION['alertMsg'] = $r->getMessage();
-        $redirUrl = BROWSER."?id=$id";
-    break;
-    case"rename":
-        $parid = $gb->getparent($id);
-        $r = $gb->renameFile($id, $_REQUEST['newname'], $sessid);
-        if(PEAR::isError($r)) $_SESSION['alertMsg'] = $r->getMessage();
-        $redirUrl = BROWSER."?id=$parid";
-    break;
-    case"move":
-        $newPath = urlencode($_REQUEST['newPath']);
-        $did = $gb->getObjIdFromRelPath($id, $newPath);
-        $parid = $gb->getparent($id);
-        $r = $gb->moveFile($id, $did, $sessid);
-        if(PEAR::isError($r)){
-            $_SESSION['alertMsg'] = $r->getMessage();
-            $redirUrl = BROWSER."?id=$parid";
-        }
-        else $redirUrl = BROWSER."?id=$did";
-    break;
-    case"copy":
-        $newPath = urldecode($_REQUEST['newPath']);
-        $did = $gb->getObjIdFromRelPath($id, $newPath);
-        $parid = $gb->getparent($id);
-#        echo"
\n$id\t$newPath\t$did\n"; print_r($did); exit;
-        $r = $gb->copyFile($id, $did, $sessid);
-        if(PEAR::isError($r)){
-            $_SESSION['alertMsg'] = $r->getMessage();
-            $redirUrl = BROWSER."?id=$parid";
-        }
-        else $redirUrl = BROWSER."?id=$did";
-    break;
-/* NOT WORKING - sorry
-    case"repl":
-        $unewpath = urlencode($_REQUEST['newpath']);
-        $r = $gb->createReplica($id, $_REQUEST['newpath'], '', $sessid);
-        if(PEAR::isError($r)) $_SESSION['alertMsg'] = $r->getMessage();
-        $redirUrl = BROWSER."?id=$newparid";
-    break;
-*/
-    case"delete":
-        $parid = $gb->getparent($id);
-        $r = $gb->deleteFile($id, $sessid);
-        if(PEAR::isError($r)) $_SESSION['alertMsg'] = $r->getMessage();
-        $redirUrl = BROWSER."?id=$parid";
-    break;
-    case"getFile":
-#        echo"
$t, $ctype\n"; exit;
-#        $r = $gb->getFile($id, $sessid);
-        $r = $gb->access($id, $sessid);
-        if(PEAR::isError($r)) $_SESSION['alertMsg'] = $r->getMessage();
-        else echo $r;
-        exit;
-    break;
-    case"getMdata":
-        header("Content-type: text/xml");
-        $r = $gb->getMdata($id, $sessid);
-        print_r($r);
-        exit;
-    break;
-    case"getInfo":
-        header("Content-type: text/plain");
-        $ia = $gb->analyzeFile($id, $sessid);
-        echo"fileformat: {$ia['fileformat']}\n";
-        echo"channels: {$ia['audio']['channels']}\n";
-        echo"sample_rate: {$ia['audio']['sample_rate']}\n";
-        echo"bits_per_sample: {$ia['audio']['bits_per_sample']}\n";
-        echo"channelmode: {$ia['audio']['channelmode']}\n";
-        echo"title: {$ia['id3v1']['title']}\n";
-        echo"artist: {$ia['id3v1']['artist']}\n";
-        echo"comment: {$ia['id3v1']['comment']}\n";
-#        echo": {$ia['id3v1']['']}\n";
-#        print_r($ia);
-        exit;
-    break;
-
-// --- subjs ----
-    case"addSubj";
-        $redirUrl="gbHtmlSubj.php";
-        if($gb->checkPerm($userid, 'subjects'))
-            $res = $gb->addSubj($_REQUEST['login'], ($_REQUEST['pass']=='' ? NULL:$_REQUEST['pass'] ));
-        else{ $_SESSION['alertMsg']='Access denied.'; break; }
-        if(PEAR::isError($res)) $_SESSION['alertMsg'] = $res->getMessage();
-    break;
-    case"removeSubj";
-        $redirUrl="gbHtmlSubj.php";
-        if($gb->checkPerm($userid, 'subjects'))
-            $res = $gb->removeSubj($_REQUEST['login']);
-        else{ $_SESSION['alertMsg']='Access denied.'; break; }
-        if(PEAR::isError($res)) $_SESSION['alertMsg'] = $res->getMessage();
-    break;
-    case"passwd";
-        $redirUrl="gbHtmlSubj.php";
-        $ulogin = $gb->getSubjName($_REQUEST['uid']);
-        if($userid != $_REQUEST['uid'] &&
-            ! $gb->checkPerm($userid, 'subjects')){
-            $_SESSION['alertMsg']='Access denied..';
-            break;
-        }
-        if(FALSE === $gb->authenticate($ulogin, $_REQUEST['oldpass'])){
-            $_SESSION['alertMsg']='Wrong old pasword.';
-            break;
-        }
-        if($_REQUEST['pass'] !== $_REQUEST['pass2']){
-            $_SESSION['alertMsg']="Passwords do not match. ({$_REQUEST['pass']}/{$_REQUEST['pass2']})";
-            break;
-        }
-        $gb->passwd($ulogin, $_REQUEST['oldpass'], $_REQUEST['pass']);
-    break;
-
-// --- perms ---
-    case"addPerm";
-        if($gb->checkPerm($userid, 'editPerms', $_REQUEST['id']))
-            $gb->addPerm($_REQUEST['subj'], $_REQUEST['permAction'], $_REQUEST['id'], $_REQUEST['allowDeny']);
-        else $_SESSION['alertMsg']='Access denied.';
-        $redirUrl="gbHtmlPerms.php?id=$id";
-    break;
-    case"removePerm";
-        if($gb->checkPerm($userid, 'editPerms', $_REQUEST['oid']))
-            $gb->removePerm($_GET['permid']);
-        else $_SESSION['alertMsg']='Access denied.';
-        $redirUrl="gbHtmlPerms.php?id=$id";
-    break;
-
-    default:
-        $_SESSION['alertMsg']="Unknown method: {$_REQUEST['act']}";
-        $redirUrl="gbHtmlLogin.php";
-}
-
-#echo"
$redirUrl\n"; print_r($_REQUEST); exit;
-header("Location: $redirUrl");
-?>
\ No newline at end of file
diff --git a/livesupport/modules/archiveServer/var/html/index.php b/livesupport/modules/archiveServer/var/html/index.php
deleted file mode 100644
index 47a34380e..000000000
--- a/livesupport/modules/archiveServer/var/html/index.php
+++ /dev/null
@@ -1,34 +0,0 @@
-