Code

Really moved
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 17 Jan 2008 08:21:03 +0000 (08:21 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 17 Jan 2008 08:21:03 +0000 (08:21 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8427 594d385d-05f5-0310-b6e9-bd551577e9d8

12 files changed:
gosa-plugins/dfs/addons/godfs/class_dfsManagment.inc [new file with mode: 0644]
gosa-plugins/dfs/addons/godfs/class_dfsgeneric.inc [new file with mode: 0644]
gosa-plugins/dfs/addons/godfs/contents.tpl [new file with mode: 0644]
gosa-plugins/dfs/addons/godfs/generic.tpl [new file with mode: 0644]
gosa-plugins/dfs/addons/godfs/main.inc [new file with mode: 0644]
gosa-plugins/dfs/addons/godfs/tabs_dfs.inc [new file with mode: 0644]
gosa-plugins/dfs/godfs/class_dfsManagment.inc [deleted file]
gosa-plugins/dfs/godfs/class_dfsgeneric.inc [deleted file]
gosa-plugins/dfs/godfs/contents.tpl [deleted file]
gosa-plugins/dfs/godfs/generic.tpl [deleted file]
gosa-plugins/dfs/godfs/main.inc [deleted file]
gosa-plugins/dfs/godfs/tabs_dfs.inc [deleted file]

diff --git a/gosa-plugins/dfs/addons/godfs/class_dfsManagment.inc b/gosa-plugins/dfs/addons/godfs/class_dfsManagment.inc
new file mode 100644 (file)
index 0000000..28c6e92
--- /dev/null
@@ -0,0 +1,263 @@
+<?php
+
+/* Create a class (name must be unique inside GOsa) which extends plugin. The plugin base
+    class contains all methods that are used by GOsa and it provides the mechanism to load data
+    from LDAP to local variables and prepare the save to ldap routine for you. */
+class dfsManagment extends plugin {
+  /* Definitions */
+  var $plHeadline = "DFS Managment";
+  var $plDescription = "This does something";
+   
+  /* These contain attributes to be loaded. We're not doing an LDAP plugin currently, so we don't
+     care... */
+  var $attributes = array();
+  var $objectclasses = array();
+  var $dfstab = NULL;
+
+  /* The constructor just saves a copy of the config. You may add what ever you need. */
+  function dfsManagment (&$config, &$ui) {
+    /* save config for later use */
+    $this->config = &$config;
+    $this->ui = &$ui;
+    
+  }
+
+  /* Execute is the function all plugins need. It fills the plugin with life and produces the output. */
+  function execute() {
+       
+    /* Normally you would react to user input here. */
+    plugin::execute();    
+
+    $action = "";
+    $s_action= "";
+    $options = "";
+    $regex = "";
+       
+    $icon         = 'folder.gif';
+    $expandedIcon = 'folder-expanded.gif';
+    $base = get_base_from_people($this->ui->dn);
+    $smarty= get_smarty();
+
+    foreach ($_POST as $key => $val) {
+      # delete
+      if (preg_match("/dfs_del.*/", $key)) {
+        $s_action = "del";
+        $s_entry = preg_replace("/dfs_".$s_action."_/i", "", $key);
+        $s_entry = preg_replace("/_.*$/", "", $s_entry);
+        $s_entry = base64_decode($s_entry);
+      # edit  
+      } elseif (preg_match("/dfs_edit.*/", $key)) {
+        $s_action = "edit";
+        $s_entry = preg_replace("/dfs_".$s_action."_/i", "", $key);
+        $s_entry = preg_replace("/_.*$/", "", $s_entry);
+        $s_entry = base64_decode($s_entry);
+      # new
+      } elseif (preg_match("/dfs_new.*/", $key)) {
+        $s_action = "new";
+      # back
+      } elseif (preg_match("/dfs_back.*/", $key)) {
+        $s_action = "back";
+      # home
+      } elseif (preg_match("/dfs_home.*/", $key)) {
+        $s_action = "home";
+      # root
+      } elseif (preg_match("/dfs_root.*/", $key)) {
+        $s_action = "root";
+      }
+    }  
+
+    $tree  = new HTML_TreeMenu();
+
+    if ((isset($_GET['act'])) && ($_GET['act'] == "edit_entry")) {
+      $s_action = "edit";
+      $dfs_share = $_GET['id'];
+    }
+
+    # new
+    if ($s_action == "new") {
+      $this->dn = "new";
+      $this->dfstab = new dfstabs($this->config, $this->config->data['TABS']['DFSTABS'], $this->dn);
+    }
+
+    # edit
+    if (($_SERVER['REQUEST_METHOD'] == "POST") || ($_SERVER['REQUEST_METHOD'] == "GET")) {
+      if ($s_action == "edit") {
+
+        $this->dn = $dfs_share;
+
+        if (($user = get_lock($this->dn)) != "") {  
+          return (gen_locked_message ($user, $this->dn));
+        } else {
+          add_lock ($this->dn, $this->ui->dn);
+        }
+
+        $this->acl = get_permissions($this->dn, $this->ui->subtreeACL);
+
+        $this->dfstab = new dfstabs($this->config, $this->config->data['TABS']['DFSTABS'], $this->dn);
+        $this->dfstab->set_acl($this->acl);
+        $this->dfstab->save_object();
+        session::set('objectinfo',$this->dn);
+      }
+    } 
+      
+    # save pressed
+    if (isset($_POST['edit_finish'])) {
+      $this->dfstab->last = $this->dfstab->current;
+      $this->dfstab->save_object(); 
+      #$disp = $this->by_object[''];
+      #var_dump($disp);
+    
+      $message = $this->dfstab->check();
+     
+      # any errors?
+      if (count($message) == 0) {
+        # write to ldap
+        $this->dfstab->save();
+      } else {
+        show_errors($message);
+      }
+    }
+
+    # cancel pressed
+    if (isset($_POST['edit_cancel'])) {
+      del_lock (session::get('objectinfo'));
+      unset ($this->dfstab);
+      $this->dfstab = NULL;
+      $this->dn = "";
+      session::un_set('objectinfo');
+    }
+
+    # delete pressed
+    if (isset($_POST['edit_delete'])) {
+      
+      # get the current values
+      $this->sambasharename = $_POST['sambaShareName'];
+      $this->sharedescription = $_POST['description'];
+      $this->fileserver = $_POST['fileserver'];
+      $this->share = $_POST['fileservershare'];
+      $this->loc = $_POST['location'];
+          
+      $base = get_base_from_people($this->ui->dn);
+      $ou = get_ou("DFS");
+      $this->basedn = "sambaShareName=$this->sambasharename,ou=$this->loc,$ou$base";
+
+      $ldap = $this->config->get_ldap_link();
+      $ldap->cd($this->basedn);
+      $ldap->rmdir($this->basedn);
+                       show_ldap_error($ldap->get_error(), sprintf(_("Removing of DFS share with dn '%s' failed."),$this->dn));
+      
+      del_lock (session::get('objectinfo'));
+      unset ($this->dfstab);
+      $this->dfstab = NULL;
+      $this->dn = "";
+      session::un_set('objectinfo');
+    }
+
+    # generate main page no tabs
+
+    $ldap = $this->config->get_ldap_link();
+
+    $ou = get_ou("DFS");
+    
+    $ldap->cd("$ou$base");
+    $ldap->search(("ou=*"), array("dn"));
+    
+    if ($ldap->count() == 0) {
+      $message[] = _("No DFS entries found");
+      show_errors ($message);
+    } else {
+      $have_tree= false;
+      while ($dfs = $ldap->fetch()) {
+        if (preg_match("/^ou=DFS.*/", $dfs["dn"])) {
+          $dfs_root_node = new HTML_TreeNode(array('text' => "DFS", 'icon' => $icon, 'expandedIcon' => $expandedIcon, 'expanded' => false));
+         $have_tree= true;
+        } elseif ($have_tree) {
+          preg_match("/^ou=(.*),/U", $dfs["dn"], $reg);
+          $loc = $reg[1];
+          $node = $dfs_root_node->addItem(new HTML_TreeNode(array('text' => "$loc", 'icon' => $icon, 'expandedIcon' => $expandedIcon)));
+          
+          $sub_node_ldap = $this->config->get_ldap_link();
+          $sub_node_ldap->cd("ou=$loc, $ou$base");
+          $sub_node_ldap->search("(objectclass=sambaShare)", array("sambaShareName", "description", "documentLocation"));
+          
+          while ($dfs_loc = $sub_node_ldap->fetch()) {
+            $share_name = $dfs_loc["sambaShareName"][0];
+            $desc = $dfs_loc["description"][0];
+            $srv_loc = preg_replace("/msdfs:/", "", $dfs_loc["documentLocation"][0]);
+            #$srv_loc = preg_replace("/\\/", "\\\\", $srv_loc);
+            $link = "main.php\?plug=".$_GET['plug']."\&id=$loc\/$share_name\&act=edit_entry"; 
+            $share_node = &$node->addItem(new HTML_TreeNode(array('text' => "$share_name - $desc", 'link' => "$link", 'icon' => $icon, 'expandedIcon' => $expandedIcon)));
+            $srv_loc_node = &$share_node->addItem(new HTML_TreeNode(array('text' => "$srv_loc", 'icon' => $icon, 'expandedIcon' => $expandedIcon)));
+          }
+        }
+      }
+    }
+
+    $tree->addItem($dfs_root_node);
+
+    // Create the presentation class
+    $treeMenu = new HTML_TreeMenu_DHTML($tree, array('images' => 'images', 'defaultClass' => 'treeMenuDefault'));
+    $tree_html = $treeMenu->toHTML();
+    
+    if ($this->dfstab === NULL) {
+
+      if (($message = check_sizelimit()) != "") {
+        return ($message);
+      }
+  
+      $listhead = "<div style='background:#F0F0F9;padding:5px;'>".
+         " <input type='image' class='center' src='images/list_up.png' align='middle' title='"._("Go up one dfsshare")."' name='dfs_back' alt='"._("Up")."'>&nbsp;".
+         " <input type='image' class='center' src='images/list_root.png' align='middle' title='"._("Go to dfs root")."' name='dfs_root' alt='"._("Root")."'>&nbsp;".
+         " <input class='center' type='image' src='images/dtree.png' align='middle' alt='"._("Create new dfsshare")."' name='dfs_new'>&nbsp;".
+         " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'>&nbsp;".
+         _("Base")."&nbsp;<select name='depselect' onChange='mainform.submit()' class='center'>$options</select>".
+         " <input class='center' type='image' src='images/list_submit.png' align='middle' title='"._("Submit department")."' name='submit_department' alt='"._("Submit").
+         "'>&nbsp;</div>";
+
+
+      /* Use the smarty templating engine here... */
+
+      $smarty->assign('tree', $tree_html);
+      $smarty->assign('search_image', get_template_path('images/search.png'));
+      $smarty->assign('infoimage', get_template_path('images/info.png'));
+      $smarty->assign('launchimage', get_template_path('images/launch.png'));
+      $smarty->assign('alphabet', generate_alphabet());
+      $smarty->assign('hint', print_sizelimit_warning());
+      $smarty->assign('apply', apply_filter());
+      $smarty->assign('dfshead', $listhead);
+
+      /* Let smarty fetch and process the page. Always seperate PHP and HTML as much as
+         you can. */
+      return ($smarty->fetch (get_template_path('contents.tpl', TRUE)));
+    }
+
+    /* TABS */
+
+    $display = $this->dfstab->execute();
+   
+    $display .= "<p>\n";
+    $display .= "  <table width=100\%>\n";
+    $display .= "    <tbody>\n";
+    $display .= "      <tr>\n";
+    $display .= "        <td style=\"text-align: right\">\n";
+    $display .= "          <input type=submit name=\"edit_finish\" value=\""._("Finish")."\">\n";
+    $display .= "          &nbsp;\n";
+    $display .= "          <input type=submit name=\"edit_cancel\" value=\""._("Cancel")."\">\n";
+    $display .= "        </td>\n";
+    $display .= "      </tr>\n";
+    $display .= "    </tbody>\n";
+    $display .= "  </table>\n";
+    $display .= "</p>\n";
+    
+    return ($display);
+
+  }
+
+  function remove_lock() {
+    if (isset($this->dn)) {
+      del_lock ($this->dn);
+    }
+  }
+
+}
+?>
diff --git a/gosa-plugins/dfs/addons/godfs/class_dfsgeneric.inc b/gosa-plugins/dfs/addons/godfs/class_dfsgeneric.inc
new file mode 100644 (file)
index 0000000..12a2ed2
--- /dev/null
@@ -0,0 +1,223 @@
+<?php
+
+  class dfsgeneric extends plugin {
+    /* CLI vars */
+    var $cli_summary      = "Manage terminal base objects";
+    var $cli_description  = "Some longer text\nfor help";
+    var $cli_parameters   = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
+
+    /* Needed values and lists */
+    var $base             = "";
+    var $cn               = "";
+
+    /* attribute list for save action */
+    var $attributes     = array();
+    var $objectclasses  = array();
+
+    function dfsgeneric(&$config, $dn) {
+      plugin::plugin($config, $dn);
+      $this->dn = $dn;
+      $this->orig_dn = $dn;
+    }
+    function execute() {
+      /* Call parent execute */
+      plugin::execute();
+      
+      $smarty= get_smarty();
+
+      if (($this->dn == "new") || ($this->dn == "")) {
+        $smarty->assign("sambasharename", "");
+        $smarty->assign("sharedescription", "");
+        $smarty->assign("fileserver", "");
+        $smarty->assign("fileservershare", "");
+        $smarty->assign("location", "");
+        $smarty->assign("dfsdescription", "");
+      } else {
+        $ldap = $this->config->get_ldap_link();
+
+        $base = get_base_from_people($this->dn);
+        $ou = get_ou("DFS");
+
+        $tmp = preg_split('/\//', $this->dn, 2);
+        $this->loc = $tmp[0];
+        $this->sambasharename = $tmp[1];
+
+        $ldap->cd("$ou $base");
+        $ldap->search(("ou=$this->loc"), array("description"));
+        $dfs_desc = $ldap->fetch();
+        $this->dfsdescription = $dfs_desc['description'][0];
+
+        $ldap->cd("ou=$this->loc, $ou $base");
+        $ldap->search("(&(sambaShareName=$this->sambasharename)(objectclass=sambaShare))", array("description", "documentLocation"));
+
+        $details = $ldap->fetch();
+        $this->sharedescription = $details['description'][0];
+        $tmp = preg_split('/\\\\/', $details['documentLocation'][0], 2);
+
+        $this->fileserver = preg_replace("/msdfs:/", "", $tmp[0]);
+        $this->share = preg_replace("/\\\/", "", $tmp[1]);
+      
+        #var_dump($this->dn);
+        #echo "<BR>\n";
+
+        /* Fill array */
+        #$this->reload();
+        $smarty->assign("sambasharename", $this->sambasharename);
+        $smarty->assign("sharedescription", $this->sharedescription);
+        $smarty->assign("fileserver", $this->fileserver);
+        $smarty->assign("fileservershare", $this->share);
+        $smarty->assign("location", $this->loc);
+        $smarty->assign("dfsdescription", $this->dfsdescription);
+      }
+
+      /* Show main page */
+      return ($smarty->fetch (get_template_path('generic.tpl', TRUE)));
+      #, dirname(__FILE__))));
+    }
+
+    function check() 
+       {
+      plugin::check(); 
+      $message = array();
+
+      ## permission
+      #if (chkacl($this->acl, "create") != "") {
+      #  $message[] = _("You have no premissions to create a dfs share.");
+      #}
+
+      # existance
+      
+      $ldap = $this->config->get_ldap_link();
+      $base = get_base_from_people($this->ui->dn);
+      $ou = get_ou("DFS");
+      $dn_explode = explode("/", $this->dn);
+      $sub_ou = $dn_explode[0];
+      $sambaShareName = $dn_explode[1] . "/" . $dn_explode[2] . "/" . $dn_explode[3];
+      $dn = "sambaShareName=$sambaShareName,ou=$sub_ou,$ou$base";
+      $ldap->cat($dn);
+      $attrs = $ldap->fetch();
+      
+      if ($this->orig_dn == "new" && !($attrs == FALSE)) {
+        $message[] = _("Dfs share already exists.");
+      } elseif ($this->orig_dn != $this->dn && !($attrs == FALSE)) {
+        $message[] = _("Dfs share already exists.");
+      }
+      
+      if ($this->dn == "new" || $this->dn == "") {
+        $this->sambasharename = $_POST['sambaShareName'];
+        $this->sharedescription = $_POST['description'];
+        $this->fileserver = $_POST['fileserver'];
+        $this->share = $_POST['fileservershare'];
+        $this->loc = $_POST['location'];
+      }
+      
+      # required fields set?
+      if ($this->sambasharename == "") {
+        $message[] = _("Required Field \"Name of dfs Share\" is not set.");
+      }
+      if ($this->sharedescription == "") {
+        $message[] = _("Required Field \"Description\" is not set.");
+      }
+      if ($this->fileserver == "") {
+        $message[] = _("Required Field \"Fileserver\" is not set.");
+      }
+      if ($this->share == "") {
+        $message[] = _("Required Field \"Share on fileserver\" is not set.");
+      }
+      if ($this->loc == "") {
+        $message[] = _("Required Field \"Location\" is not set.");
+      }
+
+      return $message;
+    }
+    
+    function save() {
+      
+      plugin::save();
+
+      # get the current values
+      $this->sambasharename = $_POST['sambaShareName'];
+      $this->sharedescription = $_POST['description'];
+      $this->fileserver = $_POST['fileserver'];
+      $this->share = $_POST['fileservershare'];
+      $this->loc = $_POST['location'];
+          
+      # set the attribs
+      $this->attrs["sambaShareName"]   = "$this->sambasharename,ou=$this->loc,$ou$base";
+      $this->attrs["objectClass"][]    = "top";
+      $this->attrs["objectClass"][]    = "SambaShare";
+      $this->attrs["objectClass"][]    = "extensibleObject"; 
+      $this->attrs["sambaShareName"]   = $this->sambasharename;
+      $this->attrs["description"]      = $this->sharedescription;
+      $this->attrs["documentLocation"] = "msdfs:$this->fileserver\\\\$this->share";
+
+      $ldap = $this->config->get_ldap_link();
+
+      if ($this->dn == "new" || $this->dn == "") {
+        echo "new<br>\n";
+        $base = get_base_from_people($this->ui->dn);
+        $ou = get_ou("DFS");
+        $this->basedn = "sambaShareName=$this->sambasharename,ou=$this->loc,$ou$base";
+        $ldap->cd($this->basedn);
+        $ldap->add($this->attrs);
+      } else {
+        # try to find entry
+        $base = get_base_from_people($this->ui->dn);
+        $ou = get_ou("DFS");
+        #$dn_explode = explode("/", $this->sambasharename);
+        #$sub_ou = $dn_explode[0];
+        #$sambaShareName = $dn_explode[1] . "/" . $dn_explode[2] . "/" . $dn_explode[3];
+        $dn = "sambaShareName=$this->sambasharename,ou=$this->loc,$ou$base";
+        $ldap->cat($dn);
+        $attrs = $ldap->fetch();
+          
+        $this->basedn = "sambaShareName=$this->sambasharename,ou=$this->loc,$ou$base";
+        $ldap->cd($this->basedn);
+        $nr = count($attrs);
+        
+        if (count($attrs)) {
+          # modify if found
+          $ldap->modify($this->attrs);
+        } else {
+          # add
+          $ldap->add($this->attrs);
+        }
+                               show_ldap_error($ldap->get_error(), sprintf(_("Saving dfs/generic with dn '%s' failed."),$this->basedn));
+      }
+    }
+
+    function save_object() {
+      #if (isset($_POST['base'])) {
+        plugin::save_object();
+        #echo "base = ".$_POST['base']."<br>\n";
+      #}
+#      if (chkacl($this->acl, "create") == "") {
+        $this->base = $_POST['base'];
+#      }
+    }
+
+    function delete() {
+    
+      plugin::delete();
+
+      # get the current values
+      $this->sambasharename = $_POST['sambaShareName'];
+      $this->sharedescription = $_POST['description'];
+      $this->fileserver = $_POST['fileserver'];
+      $this->share = $_POST['fileservershare'];
+      $this->loc = $_POST['location'];
+          
+      $base = get_base_from_people($this->ui->dn);
+      $ou = get_ou("DFS");
+      $this->basedn = "sambaShareName=$this->sambasharename,ou=$this->loc,$ou$base";
+      echo "BASEDN: $this->basedn<br>\n";
+
+      $ldap = $this->config->get_ldap_link();
+      $ldap->cd($this->basedn);
+      $ldap->rmdir($this->basedn);
+                       show_ldap_error($ldap->get_error(), sprintf(_("Removing dfs/generic with dn '%s' failed."),$this->basedn));
+    }
+      
+  }
+
diff --git a/gosa-plugins/dfs/addons/godfs/contents.tpl b/gosa-plugins/dfs/addons/godfs/contents.tpl
new file mode 100644 (file)
index 0000000..e5f2206
--- /dev/null
@@ -0,0 +1,54 @@
+<script src="TreeMenu.js" language="JavaScript" type="text/javascript"></script>
+
+<table summary="" style="width:100%; vertical-align:top; text-align:left;" cellpadding=4>
+<tr>
+  <td style="vertical-align:top;width:600px">
+  <div class="contentboxh">
+    <p class="contentboxh">
+     {t}DFS Shares{/t} {$hint}
+    </p>
+  </div>
+  <div class="contentboxb">
+      {$dfshead}
+  </div>
+  <div style='height:4px;'></div>
+  <div class="contentboxb" style="border-top:1px solid #B0B0B0;">
+      {$tree}
+    <input type=hidden name="edit_helper">
+  </div>
+  </td>
+  <td style="vertical-align:top;">
+   <div class="contentboxh">
+    <p class="contentboxh"><img src="{$infoimage}" align="right" alt="[i]">{t}Information{/t}</p>
+   </div>
+   <div class="contentboxb">
+   <p class="contentboxb">
+     {t}This menu allows you to create, delete and edit selected dfs shares. Having a large numbers of dfs shares, you might prefer the range selectors on top of the dfs share list.{/t}
+   </p>
+   </div>
+   <br>
+   <div class="contentboxh">
+    <p class="contentboxh"><img src="{$launchimage}" align="right" alt="[F]">{t}Filters{/t}</p>
+   </div>
+   <div class="contentboxb">
+     <table summary="" style="width:100%;border-top:1px solid #B0B0B0;">
+      {$alphabet}
+     </table>
+     <table summary=""  style="width:100%;border-top:1px solid #B0B0B0;">
+     <tr>
+     <td>
+     <LABEL for "regex"><img alt="{t}Display dfs shares matching{/t}" src="{$search_image}" align=middle title='{t}Display dfs shares matching{/t}'></LABEL>
+     </td>
+     <td width="99%">
+     <input type='text' name='regex' maxlength='20' style='width:99%' value='{*$regex*}' id='filter'
+     title='{t}Regular expression for matching dfs share names{/t}' onChange="mainform.submit()">
+     </td>
+     </tr>
+     </table>
+                            {$apply}
+   </div>
+  </td>
+</tr>
+</table summary="">
+
+<input type="hidden" name="ignore">
diff --git a/gosa-plugins/dfs/addons/godfs/generic.tpl b/gosa-plugins/dfs/addons/godfs/generic.tpl
new file mode 100644 (file)
index 0000000..4f3ded4
--- /dev/null
@@ -0,0 +1,52 @@
+<table summary="" style="width:100%; vertical-align:top; text-align:left;" cellpadding=4>
+ <tr>
+   <td style="vertical-align:top; width:50%">
+     <h2><img alt="" align="top" src="images/rightarrow.png"> {t}DFS Properties{/t}</h2>
+     
+     <table summary="">
+      <tr>
+       <td><LABEL for="sambaShareName">{t}Name of dfs Share{/t}</LABEL>{$must}</td>
+       <td><input id="sambaShareName" name="sambaShareName" size=40 maxlength=100 value="{$sambasharename}"></td>
+      </tr>
+      <tr>
+       <td><LABEL for="descripition">{t}Description{/t}</LABEL>{$must}</td>
+       <td><input id="description" name="description" size=40 maxlength=100 value="{$sharedescription}"></td>
+      </tr>
+      <tr>
+       <td><LABEL for="fileserver">{t}Fileserver{/t}</LABEL>{$must}</td>
+       <td><input id="fileserver" name="fileserver" size=40 maxlength=100 value="{$fileserver}"></td>
+      </tr>
+      <tr>
+       <td><LABEL for="fileservershare">{t}Share on Fileserver{/t}</LABEL>{$must}</td>
+       <td><input id="fileservershare" name="fileservershare" size=40 maxlength=100 value="{$fileservershare}"></td>
+      </tr>
+     </table>
+
+   </td>
+   <td style="border-left:1px solid #A0A0A0">
+    &nbsp;
+   </td>
+   <td style="vertical-align:top; width:50%">
+     <h2><img alt="" align="top" src="images/house.png"> {t}DFS Location{/t}</h2>
+
+     <table summary="" style="width:100%">
+      <tr>
+       <td><LABEL for="location">{t}Location{/t}</LABEL>{$must}</td>
+       <td><input id="location" name="location" size=40 maxlength=100 value="{$location}"></td>
+      </tr>
+      <tr>
+       <td><LABEL for="dfsdescription">{t}Description{/t}</LABEL></td>
+       <td><input id="dfsdescription" name="dfsdescription" size=40 maxlength=100 value="{$dfsdescription}"></td>
+      </tr>
+     </table>
+
+   </td>
+ </tr>
+</table>
+
+<!-- Place cursor -->
+<script language="JavaScript" type="text/javascript">
+  <!-- // First input field on page
+       focus_field('ou');
+  -->
+</script>
diff --git a/gosa-plugins/dfs/addons/godfs/main.inc b/gosa-plugins/dfs/addons/godfs/main.inc
new file mode 100644 (file)
index 0000000..2c9994e
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+   if ($remove_lock) {
+     if (session::is_set('dfsManagment')) {
+       $dfsManagment  = session::get('dfsManagment');
+       $dfsManagment->remove_lock();
+       del_lock($ui->dn);
+       session::un_set('dfsManagment');
+     }
+   } else {
+     # create dfsManagment object
+     if (!session::is_set('dfsManagment') || 
+        (isset($_GET['reset']) && $_GET['reset'] == 1)) {
+       session::set('dfsManagment',new dfsManagment($config, $ui));
+     }
+     $dfsManagment  = session::get('dfsManagment');
+     $output = $dfsManagment->execute();
+
+     # do we have to reset
+     if (isset($_GET['reset']) && $_GET['reset'] == 1) {
+       del_lock ($ui->dn);
+       session::un_set('dfsManagment');
+     }
+     # create page header
+     if (session::is_set('objectinfo')) {
+       $display = print_header(get_template_path('images/dfs.png'), 
+                                _("Distributed File System Administration"),
+                                "<img alt=\"\" class=\"center\" src=\"".
+                                get_template_path('images/closedlock.png').
+                                "\"> ".session::get('objectinfo'));
+     } else {
+       $display = print_header(get_template_path('images/dfs.png'),
+                                _("Distributed File System Administration"));
+     }
+
+     $display.= $output;
+    
+     # show page
+     session::set('dfsManagment',$dfsManagment);
+  }
+
+?>
diff --git a/gosa-plugins/dfs/addons/godfs/tabs_dfs.inc b/gosa-plugins/dfs/addons/godfs/tabs_dfs.inc
new file mode 100644 (file)
index 0000000..ef5950e
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+
+class dfstabs extends tabs { 
+  var $base;
+
+  function dfstabs($config, $data, $dn) {
+    tabs::tabs($config, $data, $dn);
+    #$this->base = $this->by_object['dfsManagment']->base;
+  }
+
+  #function save_object() {
+  #  if (isset($_POST['base'])) {
+  #    plugin::save_object();
+  #  } else {
+  #    $this->base = $_POST['base'];
+  #  }
+  #}
+
+
+
+
+  function check($ignore_account= FALSE) {
+    return (tabs::check(TRUE));
+  }
+
+  function save($ignore_account= FALSE)
+  {
+    $baseobject = $this->by_object['dfsManagment'];
+    return tabs::save(TRUE);
+  }
+
+  function del() {
+    $baseobject = $this->by_object['dfsManagment'];
+    return tabs::delete(TRUE); 
+  }
+
+}
+
+?>
diff --git a/gosa-plugins/dfs/godfs/class_dfsManagment.inc b/gosa-plugins/dfs/godfs/class_dfsManagment.inc
deleted file mode 100644 (file)
index 28c6e92..0000000
+++ /dev/null
@@ -1,263 +0,0 @@
-<?php
-
-/* Create a class (name must be unique inside GOsa) which extends plugin. The plugin base
-    class contains all methods that are used by GOsa and it provides the mechanism to load data
-    from LDAP to local variables and prepare the save to ldap routine for you. */
-class dfsManagment extends plugin {
-  /* Definitions */
-  var $plHeadline = "DFS Managment";
-  var $plDescription = "This does something";
-   
-  /* These contain attributes to be loaded. We're not doing an LDAP plugin currently, so we don't
-     care... */
-  var $attributes = array();
-  var $objectclasses = array();
-  var $dfstab = NULL;
-
-  /* The constructor just saves a copy of the config. You may add what ever you need. */
-  function dfsManagment (&$config, &$ui) {
-    /* save config for later use */
-    $this->config = &$config;
-    $this->ui = &$ui;
-    
-  }
-
-  /* Execute is the function all plugins need. It fills the plugin with life and produces the output. */
-  function execute() {
-       
-    /* Normally you would react to user input here. */
-    plugin::execute();    
-
-    $action = "";
-    $s_action= "";
-    $options = "";
-    $regex = "";
-       
-    $icon         = 'folder.gif';
-    $expandedIcon = 'folder-expanded.gif';
-    $base = get_base_from_people($this->ui->dn);
-    $smarty= get_smarty();
-
-    foreach ($_POST as $key => $val) {
-      # delete
-      if (preg_match("/dfs_del.*/", $key)) {
-        $s_action = "del";
-        $s_entry = preg_replace("/dfs_".$s_action."_/i", "", $key);
-        $s_entry = preg_replace("/_.*$/", "", $s_entry);
-        $s_entry = base64_decode($s_entry);
-      # edit  
-      } elseif (preg_match("/dfs_edit.*/", $key)) {
-        $s_action = "edit";
-        $s_entry = preg_replace("/dfs_".$s_action."_/i", "", $key);
-        $s_entry = preg_replace("/_.*$/", "", $s_entry);
-        $s_entry = base64_decode($s_entry);
-      # new
-      } elseif (preg_match("/dfs_new.*/", $key)) {
-        $s_action = "new";
-      # back
-      } elseif (preg_match("/dfs_back.*/", $key)) {
-        $s_action = "back";
-      # home
-      } elseif (preg_match("/dfs_home.*/", $key)) {
-        $s_action = "home";
-      # root
-      } elseif (preg_match("/dfs_root.*/", $key)) {
-        $s_action = "root";
-      }
-    }  
-
-    $tree  = new HTML_TreeMenu();
-
-    if ((isset($_GET['act'])) && ($_GET['act'] == "edit_entry")) {
-      $s_action = "edit";
-      $dfs_share = $_GET['id'];
-    }
-
-    # new
-    if ($s_action == "new") {
-      $this->dn = "new";
-      $this->dfstab = new dfstabs($this->config, $this->config->data['TABS']['DFSTABS'], $this->dn);
-    }
-
-    # edit
-    if (($_SERVER['REQUEST_METHOD'] == "POST") || ($_SERVER['REQUEST_METHOD'] == "GET")) {
-      if ($s_action == "edit") {
-
-        $this->dn = $dfs_share;
-
-        if (($user = get_lock($this->dn)) != "") {  
-          return (gen_locked_message ($user, $this->dn));
-        } else {
-          add_lock ($this->dn, $this->ui->dn);
-        }
-
-        $this->acl = get_permissions($this->dn, $this->ui->subtreeACL);
-
-        $this->dfstab = new dfstabs($this->config, $this->config->data['TABS']['DFSTABS'], $this->dn);
-        $this->dfstab->set_acl($this->acl);
-        $this->dfstab->save_object();
-        session::set('objectinfo',$this->dn);
-      }
-    } 
-      
-    # save pressed
-    if (isset($_POST['edit_finish'])) {
-      $this->dfstab->last = $this->dfstab->current;
-      $this->dfstab->save_object(); 
-      #$disp = $this->by_object[''];
-      #var_dump($disp);
-    
-      $message = $this->dfstab->check();
-     
-      # any errors?
-      if (count($message) == 0) {
-        # write to ldap
-        $this->dfstab->save();
-      } else {
-        show_errors($message);
-      }
-    }
-
-    # cancel pressed
-    if (isset($_POST['edit_cancel'])) {
-      del_lock (session::get('objectinfo'));
-      unset ($this->dfstab);
-      $this->dfstab = NULL;
-      $this->dn = "";
-      session::un_set('objectinfo');
-    }
-
-    # delete pressed
-    if (isset($_POST['edit_delete'])) {
-      
-      # get the current values
-      $this->sambasharename = $_POST['sambaShareName'];
-      $this->sharedescription = $_POST['description'];
-      $this->fileserver = $_POST['fileserver'];
-      $this->share = $_POST['fileservershare'];
-      $this->loc = $_POST['location'];
-          
-      $base = get_base_from_people($this->ui->dn);
-      $ou = get_ou("DFS");
-      $this->basedn = "sambaShareName=$this->sambasharename,ou=$this->loc,$ou$base";
-
-      $ldap = $this->config->get_ldap_link();
-      $ldap->cd($this->basedn);
-      $ldap->rmdir($this->basedn);
-                       show_ldap_error($ldap->get_error(), sprintf(_("Removing of DFS share with dn '%s' failed."),$this->dn));
-      
-      del_lock (session::get('objectinfo'));
-      unset ($this->dfstab);
-      $this->dfstab = NULL;
-      $this->dn = "";
-      session::un_set('objectinfo');
-    }
-
-    # generate main page no tabs
-
-    $ldap = $this->config->get_ldap_link();
-
-    $ou = get_ou("DFS");
-    
-    $ldap->cd("$ou$base");
-    $ldap->search(("ou=*"), array("dn"));
-    
-    if ($ldap->count() == 0) {
-      $message[] = _("No DFS entries found");
-      show_errors ($message);
-    } else {
-      $have_tree= false;
-      while ($dfs = $ldap->fetch()) {
-        if (preg_match("/^ou=DFS.*/", $dfs["dn"])) {
-          $dfs_root_node = new HTML_TreeNode(array('text' => "DFS", 'icon' => $icon, 'expandedIcon' => $expandedIcon, 'expanded' => false));
-         $have_tree= true;
-        } elseif ($have_tree) {
-          preg_match("/^ou=(.*),/U", $dfs["dn"], $reg);
-          $loc = $reg[1];
-          $node = $dfs_root_node->addItem(new HTML_TreeNode(array('text' => "$loc", 'icon' => $icon, 'expandedIcon' => $expandedIcon)));
-          
-          $sub_node_ldap = $this->config->get_ldap_link();
-          $sub_node_ldap->cd("ou=$loc, $ou$base");
-          $sub_node_ldap->search("(objectclass=sambaShare)", array("sambaShareName", "description", "documentLocation"));
-          
-          while ($dfs_loc = $sub_node_ldap->fetch()) {
-            $share_name = $dfs_loc["sambaShareName"][0];
-            $desc = $dfs_loc["description"][0];
-            $srv_loc = preg_replace("/msdfs:/", "", $dfs_loc["documentLocation"][0]);
-            #$srv_loc = preg_replace("/\\/", "\\\\", $srv_loc);
-            $link = "main.php\?plug=".$_GET['plug']."\&id=$loc\/$share_name\&act=edit_entry"; 
-            $share_node = &$node->addItem(new HTML_TreeNode(array('text' => "$share_name - $desc", 'link' => "$link", 'icon' => $icon, 'expandedIcon' => $expandedIcon)));
-            $srv_loc_node = &$share_node->addItem(new HTML_TreeNode(array('text' => "$srv_loc", 'icon' => $icon, 'expandedIcon' => $expandedIcon)));
-          }
-        }
-      }
-    }
-
-    $tree->addItem($dfs_root_node);
-
-    // Create the presentation class
-    $treeMenu = new HTML_TreeMenu_DHTML($tree, array('images' => 'images', 'defaultClass' => 'treeMenuDefault'));
-    $tree_html = $treeMenu->toHTML();
-    
-    if ($this->dfstab === NULL) {
-
-      if (($message = check_sizelimit()) != "") {
-        return ($message);
-      }
-  
-      $listhead = "<div style='background:#F0F0F9;padding:5px;'>".
-         " <input type='image' class='center' src='images/list_up.png' align='middle' title='"._("Go up one dfsshare")."' name='dfs_back' alt='"._("Up")."'>&nbsp;".
-         " <input type='image' class='center' src='images/list_root.png' align='middle' title='"._("Go to dfs root")."' name='dfs_root' alt='"._("Root")."'>&nbsp;".
-         " <input class='center' type='image' src='images/dtree.png' align='middle' alt='"._("Create new dfsshare")."' name='dfs_new'>&nbsp;".
-         " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'>&nbsp;".
-         _("Base")."&nbsp;<select name='depselect' onChange='mainform.submit()' class='center'>$options</select>".
-         " <input class='center' type='image' src='images/list_submit.png' align='middle' title='"._("Submit department")."' name='submit_department' alt='"._("Submit").
-         "'>&nbsp;</div>";
-
-
-      /* Use the smarty templating engine here... */
-
-      $smarty->assign('tree', $tree_html);
-      $smarty->assign('search_image', get_template_path('images/search.png'));
-      $smarty->assign('infoimage', get_template_path('images/info.png'));
-      $smarty->assign('launchimage', get_template_path('images/launch.png'));
-      $smarty->assign('alphabet', generate_alphabet());
-      $smarty->assign('hint', print_sizelimit_warning());
-      $smarty->assign('apply', apply_filter());
-      $smarty->assign('dfshead', $listhead);
-
-      /* Let smarty fetch and process the page. Always seperate PHP and HTML as much as
-         you can. */
-      return ($smarty->fetch (get_template_path('contents.tpl', TRUE)));
-    }
-
-    /* TABS */
-
-    $display = $this->dfstab->execute();
-   
-    $display .= "<p>\n";
-    $display .= "  <table width=100\%>\n";
-    $display .= "    <tbody>\n";
-    $display .= "      <tr>\n";
-    $display .= "        <td style=\"text-align: right\">\n";
-    $display .= "          <input type=submit name=\"edit_finish\" value=\""._("Finish")."\">\n";
-    $display .= "          &nbsp;\n";
-    $display .= "          <input type=submit name=\"edit_cancel\" value=\""._("Cancel")."\">\n";
-    $display .= "        </td>\n";
-    $display .= "      </tr>\n";
-    $display .= "    </tbody>\n";
-    $display .= "  </table>\n";
-    $display .= "</p>\n";
-    
-    return ($display);
-
-  }
-
-  function remove_lock() {
-    if (isset($this->dn)) {
-      del_lock ($this->dn);
-    }
-  }
-
-}
-?>
diff --git a/gosa-plugins/dfs/godfs/class_dfsgeneric.inc b/gosa-plugins/dfs/godfs/class_dfsgeneric.inc
deleted file mode 100644 (file)
index 12a2ed2..0000000
+++ /dev/null
@@ -1,223 +0,0 @@
-<?php
-
-  class dfsgeneric extends plugin {
-    /* CLI vars */
-    var $cli_summary      = "Manage terminal base objects";
-    var $cli_description  = "Some longer text\nfor help";
-    var $cli_parameters   = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
-    /* Needed values and lists */
-    var $base             = "";
-    var $cn               = "";
-
-    /* attribute list for save action */
-    var $attributes     = array();
-    var $objectclasses  = array();
-
-    function dfsgeneric(&$config, $dn) {
-      plugin::plugin($config, $dn);
-      $this->dn = $dn;
-      $this->orig_dn = $dn;
-    }
-    function execute() {
-      /* Call parent execute */
-      plugin::execute();
-      
-      $smarty= get_smarty();
-
-      if (($this->dn == "new") || ($this->dn == "")) {
-        $smarty->assign("sambasharename", "");
-        $smarty->assign("sharedescription", "");
-        $smarty->assign("fileserver", "");
-        $smarty->assign("fileservershare", "");
-        $smarty->assign("location", "");
-        $smarty->assign("dfsdescription", "");
-      } else {
-        $ldap = $this->config->get_ldap_link();
-
-        $base = get_base_from_people($this->dn);
-        $ou = get_ou("DFS");
-
-        $tmp = preg_split('/\//', $this->dn, 2);
-        $this->loc = $tmp[0];
-        $this->sambasharename = $tmp[1];
-
-        $ldap->cd("$ou $base");
-        $ldap->search(("ou=$this->loc"), array("description"));
-        $dfs_desc = $ldap->fetch();
-        $this->dfsdescription = $dfs_desc['description'][0];
-
-        $ldap->cd("ou=$this->loc, $ou $base");
-        $ldap->search("(&(sambaShareName=$this->sambasharename)(objectclass=sambaShare))", array("description", "documentLocation"));
-
-        $details = $ldap->fetch();
-        $this->sharedescription = $details['description'][0];
-        $tmp = preg_split('/\\\\/', $details['documentLocation'][0], 2);
-
-        $this->fileserver = preg_replace("/msdfs:/", "", $tmp[0]);
-        $this->share = preg_replace("/\\\/", "", $tmp[1]);
-      
-        #var_dump($this->dn);
-        #echo "<BR>\n";
-
-        /* Fill array */
-        #$this->reload();
-        $smarty->assign("sambasharename", $this->sambasharename);
-        $smarty->assign("sharedescription", $this->sharedescription);
-        $smarty->assign("fileserver", $this->fileserver);
-        $smarty->assign("fileservershare", $this->share);
-        $smarty->assign("location", $this->loc);
-        $smarty->assign("dfsdescription", $this->dfsdescription);
-      }
-
-      /* Show main page */
-      return ($smarty->fetch (get_template_path('generic.tpl', TRUE)));
-      #, dirname(__FILE__))));
-    }
-
-    function check() 
-       {
-      plugin::check(); 
-      $message = array();
-
-      ## permission
-      #if (chkacl($this->acl, "create") != "") {
-      #  $message[] = _("You have no premissions to create a dfs share.");
-      #}
-
-      # existance
-      
-      $ldap = $this->config->get_ldap_link();
-      $base = get_base_from_people($this->ui->dn);
-      $ou = get_ou("DFS");
-      $dn_explode = explode("/", $this->dn);
-      $sub_ou = $dn_explode[0];
-      $sambaShareName = $dn_explode[1] . "/" . $dn_explode[2] . "/" . $dn_explode[3];
-      $dn = "sambaShareName=$sambaShareName,ou=$sub_ou,$ou$base";
-      $ldap->cat($dn);
-      $attrs = $ldap->fetch();
-      
-      if ($this->orig_dn == "new" && !($attrs == FALSE)) {
-        $message[] = _("Dfs share already exists.");
-      } elseif ($this->orig_dn != $this->dn && !($attrs == FALSE)) {
-        $message[] = _("Dfs share already exists.");
-      }
-      
-      if ($this->dn == "new" || $this->dn == "") {
-        $this->sambasharename = $_POST['sambaShareName'];
-        $this->sharedescription = $_POST['description'];
-        $this->fileserver = $_POST['fileserver'];
-        $this->share = $_POST['fileservershare'];
-        $this->loc = $_POST['location'];
-      }
-      
-      # required fields set?
-      if ($this->sambasharename == "") {
-        $message[] = _("Required Field \"Name of dfs Share\" is not set.");
-      }
-      if ($this->sharedescription == "") {
-        $message[] = _("Required Field \"Description\" is not set.");
-      }
-      if ($this->fileserver == "") {
-        $message[] = _("Required Field \"Fileserver\" is not set.");
-      }
-      if ($this->share == "") {
-        $message[] = _("Required Field \"Share on fileserver\" is not set.");
-      }
-      if ($this->loc == "") {
-        $message[] = _("Required Field \"Location\" is not set.");
-      }
-
-      return $message;
-    }
-    
-    function save() {
-      
-      plugin::save();
-
-      # get the current values
-      $this->sambasharename = $_POST['sambaShareName'];
-      $this->sharedescription = $_POST['description'];
-      $this->fileserver = $_POST['fileserver'];
-      $this->share = $_POST['fileservershare'];
-      $this->loc = $_POST['location'];
-          
-      # set the attribs
-      $this->attrs["sambaShareName"]   = "$this->sambasharename,ou=$this->loc,$ou$base";
-      $this->attrs["objectClass"][]    = "top";
-      $this->attrs["objectClass"][]    = "SambaShare";
-      $this->attrs["objectClass"][]    = "extensibleObject"; 
-      $this->attrs["sambaShareName"]   = $this->sambasharename;
-      $this->attrs["description"]      = $this->sharedescription;
-      $this->attrs["documentLocation"] = "msdfs:$this->fileserver\\\\$this->share";
-
-      $ldap = $this->config->get_ldap_link();
-
-      if ($this->dn == "new" || $this->dn == "") {
-        echo "new<br>\n";
-        $base = get_base_from_people($this->ui->dn);
-        $ou = get_ou("DFS");
-        $this->basedn = "sambaShareName=$this->sambasharename,ou=$this->loc,$ou$base";
-        $ldap->cd($this->basedn);
-        $ldap->add($this->attrs);
-      } else {
-        # try to find entry
-        $base = get_base_from_people($this->ui->dn);
-        $ou = get_ou("DFS");
-        #$dn_explode = explode("/", $this->sambasharename);
-        #$sub_ou = $dn_explode[0];
-        #$sambaShareName = $dn_explode[1] . "/" . $dn_explode[2] . "/" . $dn_explode[3];
-        $dn = "sambaShareName=$this->sambasharename,ou=$this->loc,$ou$base";
-        $ldap->cat($dn);
-        $attrs = $ldap->fetch();
-          
-        $this->basedn = "sambaShareName=$this->sambasharename,ou=$this->loc,$ou$base";
-        $ldap->cd($this->basedn);
-        $nr = count($attrs);
-        
-        if (count($attrs)) {
-          # modify if found
-          $ldap->modify($this->attrs);
-        } else {
-          # add
-          $ldap->add($this->attrs);
-        }
-                               show_ldap_error($ldap->get_error(), sprintf(_("Saving dfs/generic with dn '%s' failed."),$this->basedn));
-      }
-    }
-
-    function save_object() {
-      #if (isset($_POST['base'])) {
-        plugin::save_object();
-        #echo "base = ".$_POST['base']."<br>\n";
-      #}
-#      if (chkacl($this->acl, "create") == "") {
-        $this->base = $_POST['base'];
-#      }
-    }
-
-    function delete() {
-    
-      plugin::delete();
-
-      # get the current values
-      $this->sambasharename = $_POST['sambaShareName'];
-      $this->sharedescription = $_POST['description'];
-      $this->fileserver = $_POST['fileserver'];
-      $this->share = $_POST['fileservershare'];
-      $this->loc = $_POST['location'];
-          
-      $base = get_base_from_people($this->ui->dn);
-      $ou = get_ou("DFS");
-      $this->basedn = "sambaShareName=$this->sambasharename,ou=$this->loc,$ou$base";
-      echo "BASEDN: $this->basedn<br>\n";
-
-      $ldap = $this->config->get_ldap_link();
-      $ldap->cd($this->basedn);
-      $ldap->rmdir($this->basedn);
-                       show_ldap_error($ldap->get_error(), sprintf(_("Removing dfs/generic with dn '%s' failed."),$this->basedn));
-    }
-      
-  }
-
diff --git a/gosa-plugins/dfs/godfs/contents.tpl b/gosa-plugins/dfs/godfs/contents.tpl
deleted file mode 100644 (file)
index e5f2206..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-<script src="TreeMenu.js" language="JavaScript" type="text/javascript"></script>
-
-<table summary="" style="width:100%; vertical-align:top; text-align:left;" cellpadding=4>
-<tr>
-  <td style="vertical-align:top;width:600px">
-  <div class="contentboxh">
-    <p class="contentboxh">
-     {t}DFS Shares{/t} {$hint}
-    </p>
-  </div>
-  <div class="contentboxb">
-      {$dfshead}
-  </div>
-  <div style='height:4px;'></div>
-  <div class="contentboxb" style="border-top:1px solid #B0B0B0;">
-      {$tree}
-    <input type=hidden name="edit_helper">
-  </div>
-  </td>
-  <td style="vertical-align:top;">
-   <div class="contentboxh">
-    <p class="contentboxh"><img src="{$infoimage}" align="right" alt="[i]">{t}Information{/t}</p>
-   </div>
-   <div class="contentboxb">
-   <p class="contentboxb">
-     {t}This menu allows you to create, delete and edit selected dfs shares. Having a large numbers of dfs shares, you might prefer the range selectors on top of the dfs share list.{/t}
-   </p>
-   </div>
-   <br>
-   <div class="contentboxh">
-    <p class="contentboxh"><img src="{$launchimage}" align="right" alt="[F]">{t}Filters{/t}</p>
-   </div>
-   <div class="contentboxb">
-     <table summary="" style="width:100%;border-top:1px solid #B0B0B0;">
-      {$alphabet}
-     </table>
-     <table summary=""  style="width:100%;border-top:1px solid #B0B0B0;">
-     <tr>
-     <td>
-     <LABEL for "regex"><img alt="{t}Display dfs shares matching{/t}" src="{$search_image}" align=middle title='{t}Display dfs shares matching{/t}'></LABEL>
-     </td>
-     <td width="99%">
-     <input type='text' name='regex' maxlength='20' style='width:99%' value='{*$regex*}' id='filter'
-     title='{t}Regular expression for matching dfs share names{/t}' onChange="mainform.submit()">
-     </td>
-     </tr>
-     </table>
-                            {$apply}
-   </div>
-  </td>
-</tr>
-</table summary="">
-
-<input type="hidden" name="ignore">
diff --git a/gosa-plugins/dfs/godfs/generic.tpl b/gosa-plugins/dfs/godfs/generic.tpl
deleted file mode 100644 (file)
index 4f3ded4..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<table summary="" style="width:100%; vertical-align:top; text-align:left;" cellpadding=4>
- <tr>
-   <td style="vertical-align:top; width:50%">
-     <h2><img alt="" align="top" src="images/rightarrow.png"> {t}DFS Properties{/t}</h2>
-     
-     <table summary="">
-      <tr>
-       <td><LABEL for="sambaShareName">{t}Name of dfs Share{/t}</LABEL>{$must}</td>
-       <td><input id="sambaShareName" name="sambaShareName" size=40 maxlength=100 value="{$sambasharename}"></td>
-      </tr>
-      <tr>
-       <td><LABEL for="descripition">{t}Description{/t}</LABEL>{$must}</td>
-       <td><input id="description" name="description" size=40 maxlength=100 value="{$sharedescription}"></td>
-      </tr>
-      <tr>
-       <td><LABEL for="fileserver">{t}Fileserver{/t}</LABEL>{$must}</td>
-       <td><input id="fileserver" name="fileserver" size=40 maxlength=100 value="{$fileserver}"></td>
-      </tr>
-      <tr>
-       <td><LABEL for="fileservershare">{t}Share on Fileserver{/t}</LABEL>{$must}</td>
-       <td><input id="fileservershare" name="fileservershare" size=40 maxlength=100 value="{$fileservershare}"></td>
-      </tr>
-     </table>
-
-   </td>
-   <td style="border-left:1px solid #A0A0A0">
-    &nbsp;
-   </td>
-   <td style="vertical-align:top; width:50%">
-     <h2><img alt="" align="top" src="images/house.png"> {t}DFS Location{/t}</h2>
-
-     <table summary="" style="width:100%">
-      <tr>
-       <td><LABEL for="location">{t}Location{/t}</LABEL>{$must}</td>
-       <td><input id="location" name="location" size=40 maxlength=100 value="{$location}"></td>
-      </tr>
-      <tr>
-       <td><LABEL for="dfsdescription">{t}Description{/t}</LABEL></td>
-       <td><input id="dfsdescription" name="dfsdescription" size=40 maxlength=100 value="{$dfsdescription}"></td>
-      </tr>
-     </table>
-
-   </td>
- </tr>
-</table>
-
-<!-- Place cursor -->
-<script language="JavaScript" type="text/javascript">
-  <!-- // First input field on page
-       focus_field('ou');
-  -->
-</script>
diff --git a/gosa-plugins/dfs/godfs/main.inc b/gosa-plugins/dfs/godfs/main.inc
deleted file mode 100644 (file)
index 2c9994e..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-   if ($remove_lock) {
-     if (session::is_set('dfsManagment')) {
-       $dfsManagment  = session::get('dfsManagment');
-       $dfsManagment->remove_lock();
-       del_lock($ui->dn);
-       session::un_set('dfsManagment');
-     }
-   } else {
-     # create dfsManagment object
-     if (!session::is_set('dfsManagment') || 
-        (isset($_GET['reset']) && $_GET['reset'] == 1)) {
-       session::set('dfsManagment',new dfsManagment($config, $ui));
-     }
-     $dfsManagment  = session::get('dfsManagment');
-     $output = $dfsManagment->execute();
-
-     # do we have to reset
-     if (isset($_GET['reset']) && $_GET['reset'] == 1) {
-       del_lock ($ui->dn);
-       session::un_set('dfsManagment');
-     }
-     # create page header
-     if (session::is_set('objectinfo')) {
-       $display = print_header(get_template_path('images/dfs.png'), 
-                                _("Distributed File System Administration"),
-                                "<img alt=\"\" class=\"center\" src=\"".
-                                get_template_path('images/closedlock.png').
-                                "\"> ".session::get('objectinfo'));
-     } else {
-       $display = print_header(get_template_path('images/dfs.png'),
-                                _("Distributed File System Administration"));
-     }
-
-     $display.= $output;
-    
-     # show page
-     session::set('dfsManagment',$dfsManagment);
-  }
-
-?>
diff --git a/gosa-plugins/dfs/godfs/tabs_dfs.inc b/gosa-plugins/dfs/godfs/tabs_dfs.inc
deleted file mode 100644 (file)
index ef5950e..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-
-class dfstabs extends tabs { 
-  var $base;
-
-  function dfstabs($config, $data, $dn) {
-    tabs::tabs($config, $data, $dn);
-    #$this->base = $this->by_object['dfsManagment']->base;
-  }
-
-  #function save_object() {
-  #  if (isset($_POST['base'])) {
-  #    plugin::save_object();
-  #  } else {
-  #    $this->base = $_POST['base'];
-  #  }
-  #}
-
-
-
-
-  function check($ignore_account= FALSE) {
-    return (tabs::check(TRUE));
-  }
-
-  function save($ignore_account= FALSE)
-  {
-    $baseobject = $this->by_object['dfsManagment'];
-    return tabs::save(TRUE);
-  }
-
-  function del() {
-    $baseobject = $this->by_object['dfsManagment'];
-    return tabs::delete(TRUE); 
-  }
-
-}
-
-?>