Menu="Share:1" Title="Share Settings" Tag="share-alt-square" --- $width = [123,300]; if ($name == "") { /* default values when adding new share */ $share = ["nameOrig" => "", "name" => "", "comment" => "", "allocator" => "highwater", "floor" => "", "splitLevel" => "", "include" => "", "exclude" => "", "useCache" => "no", "cachePool" => "cache", "cow" => "auto"]; } elseif (array_key_exists($name, $shares)) { /* edit existing share */ $share = $shares[$name]; } else { /* handle share deleted case */ echo "
"._('Share')." '".htmlspecialchars($name)."' "._('has been deleted').".
"; return; } /* check for empty share */ function shareEmpty($name) { return (($files = @scandir("/mnt/user/$name")) && (count($files) <= 2)); } function globalInclude($name) { global $var; return substr($name,0,4)=='disk' && (!$var['shareUserInclude'] || strpos("{$var['shareUserInclude']},","$name,")!==false); } // global shares include/exclude $myDisks = array_filter(array_diff(array_keys(array_filter($disks,'my_disks')), explode(',',$var['shareUserExclude'])), 'globalInclude'); ?> :share_edit_global1_help: :share_edit_global2_help: