From: paulr Date: Wed, 20 Apr 2011 17:29:30 +0000 (+1000) Subject: all in the datastore. X-Git-Url: http://git.pjr.cc/?a=commitdiff_plain;h=ef5e2e02126452d4d25ec9c349b489cbb1822bc2;p=glcas.git all in the datastore. --- diff --git a/lib/plugins/datastore.php b/lib/plugins/datastore.php index 16ae107..1b2ff4f 100644 --- a/lib/plugins/datastore.php +++ b/lib/plugins/datastore.php @@ -9,12 +9,51 @@ $MENU_ITEMS["ds"]["link"] = "/ds/control"; function ds_contentPane() { - echo "i am a ds content pane
"; + global $URL_COMPONENTS; + if(isset($URL_COMPONENTS[1])) { + switch($URL_COMPONENTS[1]) { + case "browse": + $dsbr = $URL_COMPONENTS[2]; + echo "

Browsing, $dsbr


"; + break; + case "createds": + ds_createDS($_REQUEST["dsname"], $_REQUEST["dsloc"]); + echo "DS Created, return"; + break; + case "control": + default: + ds_controlPane(); + // go thru the db and list the components + } + } +} + +function ds_controlPane() +{ + echo ""; + echo ""; + + echo "
DataStore NameDataStore PathSizeUsageControl
"; + echo "
"; + echo "DataStore Name: "; + echo "DataStore Location: "; + echo ""; + echo "
"; + } function ds_leftMenu() { - echo "i am a ds leftmenu"; + global $GLOBAL_BASE_URL; + echo "Browse
"; + $dss = ds_listDS(); + echo "
";
+	//print_r($dss);
+	echo "
"; + foreach ($dss as $dsl) { + $dsname = $dsl["dsname"]; + echo "$dsname
"; + } } function ds_contentUrls() @@ -51,10 +90,10 @@ function ds_deleteFile($ds_name, $file_name, $file_tag) // we got ya $afname = $kmm["dsfname"]; if(file_exists($afname)) unlink($afname); - echo "name was: $afname\n"; + //echo "name was: $afname\n"; } } - echo "now delete name was: $afname\n"; + //echo "now delete name was: $afname\n"; if($afname != "") db_deleteData("datastores_files", "dsfname", $afname); } diff --git a/lib/plugins/www.php b/lib/plugins/www.php index d060677..ee6bc12 100644 --- a/lib/plugins/www.php +++ b/lib/plugins/www.php @@ -51,7 +51,7 @@ function www_basePage($calls) www_top(); } - echo ""; + echo ""; // left menu if(isset($calls["left_menu_function"])) { @@ -136,4 +136,17 @@ function www_pageend() { echo ""; } + +function urlCreate($from) +{ + global $MENU_ITEMS, $GLOBAL_BASE_URL; + + $mlink = "$GLOBAL_BASE_URL/".$from; + $mlink = preg_replace("/\/[\/]+/", "/", $mlink); + + return $mlink; + +} + + ?> \ No newline at end of file