Beispiel #1
0
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with MMC; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
/* $Id$ */
/* protected share */
$protectedShare = array("", "homes", "netlogon", "archives");
require "modules/samba/includes/shares.inc.php";
require "modules/samba/mainSidebar.php";
require "graph/navbar.inc.php";
global $conf;
$shares = get_shares_detailed();
$sharesName = array();
$sharesComment = array();
$editActions = array();
$delActions = array();
//$backupActions = array();
foreach ($shares as $share) {
    $sharesName[] = $share[0];
    if (isset($share[1])) {
        $sharesComment[] = $share[1];
    } else {
        $sharesComment[] = "";
    }
    if (!in_array($share[0], $protectedShare)) {
        $editActions[] = new ActionItem(_T("Edit"), "details", "edit", "share");
        $delActions[] = new ActionPopupItem(_T("Delete"), "delete", "delete", "share");
Beispiel #2
0
<?php

require "modules/samba/includes/shares.inc.php";
$filter = fromGET('filter');
if ($filter && strpos($filter, "*") === false) {
    $filter = "*" . $filter . "*";
}
/* protected shares */
$protectedShare = array("", "homes", "netlogon", "archives");
$shares = get_shares_detailed($filter);
$sharesName = array();
$sharesComment = array();
$editActions = array();
$delActions = array();
foreach ($shares as $share) {
    $sharesName[] = $share[0];
    if (isset($share[1])) {
        $sharesComment[] = $share[1];
    } else {
        $sharesComment[] = "";
    }
    if (!in_array($share[0], $protectedShare)) {
        $editActions[] = new ActionItem(_T("Edit"), "details", "edit", "share");
        $delActions[] = new ActionPopupItem(_T("Delete"), "delete", "delete", "share");
    } else {
        $editActions[] = new EmptyActionItem();
        $delActions[] = new EmptyActionItem();
    }
}
$l = new ListInfos($sharesName, _T("Shares"));
$l->first_elt_padding = 1;