function ds_contentPane()
{
- echo "i am a ds content pane<br>";
+ global $URL_COMPONENTS;
+ if(isset($URL_COMPONENTS[1])) {
+ switch($URL_COMPONENTS[1]) {
+ case "browse":
+ $dsbr = $URL_COMPONENTS[2];
+ echo "<h3>Browsing, $dsbr</h3><br>";
+ break;
+ case "createds":
+ ds_createDS($_REQUEST["dsname"], $_REQUEST["dsloc"]);
+ echo "DS Created, <a href=\"".urlCreate("/ds/control")."\">return</a>";
+ break;
+ case "control":
+ default:
+ ds_controlPane();
+ // go thru the db and list the components
+ }
+ }
+}
+
+function ds_controlPane()
+{
+ echo "<table>";
+ echo "<tr><td>DataStore Name</td><td>DataStore Path</td><td>Size</td><td>Usage</td><td>Control</td></tr>";
+
+ echo "</table>";
+ echo "<form method=\"post\" action=\"".urlCreate("/ds/createds")."\">";
+ echo "DataStore Name: <input type=\"text\" name=\"dsname\">";
+ echo "DataStore Location: <input type=\"text\" name=\"dsloc\">";
+ echo "<input type=\"submit\" name=\"create\" value=\"create\">";
+ echo "</form>";
+
}
function ds_leftMenu()
{
- echo "i am a ds leftmenu";
+ global $GLOBAL_BASE_URL;
+ echo "<b>Browse</b><br>";
+ $dss = ds_listDS();
+ echo "<pre>";
+ //print_r($dss);
+ echo "</pre>";
+ foreach ($dss as $dsl) {
+ $dsname = $dsl["dsname"];
+ echo "<a href=\"".urlCreate("/ds/browse/$dsname")."\">$dsname</a><br>";
+ }
}
function ds_contentUrls()
// 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);
}
www_top();
}
- echo "</td></tr><tr><td>";
+ echo "</td></tr><tr valign=\"top\"><td>";
// left menu
if(isset($calls["left_menu_function"])) {
{
echo "</body></html>";
}
+
+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