[ UP ] cgi
[archserver.git] / cgi / samba / list_shares.sh
blobf376bb8b3383d63f7db084faf74a5da44609d845
1 #!/bin/sh
3 echo -e "<h3><font color=blue>所有共享</color></h3>\n"
4 echo -e '<table cellpadding="4" cellspacing="0" border="1" width="40%" >\n'
6 echo -e '<form name="delete_shares">'
7 count=1
8 grep '^\[' /etc/samba/smb.conf | egrep -v 'global' | sed 's/\[\(.*\)\]/\1/' |while read share
9 do
10 [ $_n = 2 ] && _n=1 || _n=2
11 echo "<tr class=\"color_table_row$_n\">
12 <td><input type=\"checkbox\" name=\"share_$count\" value=\"$share\">$share</td>
13 </tr>"
14 let count=$count+1
15 done
16 echo -e "</form>"
17 echo "</tr></table>"