OSDN Git Service

new rule master
author“nanbuwks” <“nanbuwks-sourceforge@nanbu.com”>
Tue, 30 Mar 2010 05:42:54 +0000 (14:42 +0900)
committer“nanbuwks” <“nanbuwks-sourceforge@nanbu.com”>
Tue, 30 Mar 2010 05:42:54 +0000 (14:42 +0900)
14 files changed:
VERSION
package/usr/bin/usbadd2
package/var/squarantine/www/regist.php
package/var/squarantine/www/sambalog [new symlink]
package/var/squarantine/www/templates/0.未登録.html
package/var/squarantine/www/templates/1.使用禁止.html
package/var/squarantine/www/templates/128.使用停止.html [new file with mode: 0644]
package/var/squarantine/www/templates/16.強制削除.html [new file with mode: 0644]
package/var/squarantine/www/templates/2.利用可能.html [new file with mode: 0644]
package/var/squarantine/www/templates/20.削除.html [new file with mode: 0644]
package/var/squarantine/www/templates/32.エクスポート.html [new file with mode: 0644]
package/var/squarantine/www/templates/4.操作前確認.html [new file with mode: 0644]
package/var/squarantine/www/templates/64.強制フォーマット.html [new file with mode: 0644]
package/var/squarantine/www/templates/68.初期化.html [new file with mode: 0644]

diff --git a/VERSION b/VERSION
index 75407c6..3e6d305 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,3 +1,4 @@
+squarantine 0.3  2010/03/30 new rule set
 squarantine 0.22 2010/03/30 fix to usbremove bug
 squarantine 0.21 2010/03/30 INSTALL document fix and contain /etc/sodoers file
 squarantine 0.2 2010/03/27 configration to /etc/squarantine/squarantine.conf
index 83a3b1f..45baaba 100755 (executable)
@@ -72,12 +72,25 @@ sub makeattfile {
   $dirname = $nickname;
   $dirname =~ s/[<>:\*\?\|\"\/\\]//g;
   system("mkdir -p /var/squarantine/usbstorages/$dirname");
-
+  if ( 4 == ( 4 & $flags )) { $pagecode = 4; } else { $pagecode = $flags; }
   #### MAKE ATTENTION FILE FROM TEMP FILE #################
   #  system("cp /var/squarantine/templates/未登録.html /var/squarantine/usbstorages/$dirname");
   #$templatefile = "/var/squarantine/www/templates/未登録.html";
   #$attentionfile  = "/var/squarantine/usbstorages/$dirname/未登録.html";
-  while (defined($templatefile = </var/squarantine/www/templates/$flags\.*> )) {
+  $action="";
+  if (   1 == (    1 & $flags )) { $action = $action."「使用禁止」" }
+  if (   2 == (    2 & $flags )) { $action = $action."「信頼済」" }
+  if (   4 == (    4 & $flags )) { $action = $action."「操作前確認」" }
+  if (   8 == (    8 & $flags )) { $action = $action."「削除ファイルをバックアップ」" }
+  if (  16 == (   16 & $flags )) { $action = $action."「実行ファイル削除」" }
+  if (  32 == (   32 & $flags )) { $action = $action."「検疫済ファイルを外部にコピー」" }
+  if (  64 == (   64 & $flags )) { $action = $action."「フォーマット」" }
+  if ( 128 == (  128 & $flags )) { $action = $action."「使用停止」" }
+  if ( 256 == (  256 & $flags )) { $action = $action."「検疫後共有公開」" }
+  if ( 512 == (  512 & $flags )) { $action = $action."「持出可」" }
+
+  while (defined($templatefile = </var/squarantine/www/templates/$pagecode\.*> )) {
     $filename = $templatefile;
     $filename =~ s#.*/##;           # get file name
     $attentionfile = "/var/squarantine/usbstorages/$dirname/$filename";
@@ -86,8 +99,10 @@ sub makeattfile {
     open(FILE , "$templatefile" ) or die "tempate file open error";
     while (<FILE>) {
       s/\#\#ID\#\#/$id/g ;
+      s/\#\#ACTION\#\#/$action/g ;
       s/\#\#DEVNAME\#\#/$ENV{'DEVNAME'}/g ;
-      s/\#\#WEBROOT\#\#/$conf->{WEBROOT}/g ;
+      s/\#\#FLAGS\#\#/$ENV{'FLAGS'}/g ;
+      s/\#\#WEBROOT\#\#/$conf->{'WEBROOT'}/g ;
       print FILE2 $_;
     }
     close(FILE);
@@ -129,58 +144,77 @@ if ( 0 == $num_rows ){
 
 } else {
 ############ GET INFO ###########
-my $sth = $dbh->prepare("select id,id_serial,nickname,memo,flags from media where id_serial=\'".$ENV{'ID_SERIAL'}."\'");
+my $sth = $dbh->prepare("select id,id_serial,nickname,memo,flags,distpath,distaccount from media where id_serial=\'".$ENV{'ID_SERIAL'}."\'");
   $sth->execute;
   $num_rows = $sth->rows;
   for ($i=0; $i<$num_rows; $i++) {
     @a = $sth->fetchrow_array;
-    $id = $a[0];
-    $id_serial = $a[1];
-    $memo = $a[3];
-    $flags = $a[4];
-    $nickname = $a[2];
+    $id          = $a[0];
+    $id_serial   = $a[1];
+    $memo        = $a[3];
+    $flags       = $a[4];
+    $distpath    = $a[5];
+    $distaccount = $a[6];
+    $nickname    = $a[2];
+    $ENV{'FLAGS'}       = $flags;
   }
-  if ( 1 == $flags )
+  if ( 1 ==( 1 & $flags ) )
   { 
     #################  1: NOT PERMIT              ##################
     makeattfile($nickname,1);
-  } elsif ( 2 == $flags ) {
-    #################  2: STOP                    ##################
+  } elsif ( 2 == ( 2 & $flags )) {
+    #################  2: FREE TO ADMINSITRATOR   ##################
     makeattfile($nickname,2);
-  } elsif ( 4 == $flags ) {
-    #################  4: RESERVED                ##################
-    makeattfile($nickname,4);
-  } elsif ( 8 == $flags ) {
-    #################  8: AUTO FORMAT             ##################
-    makeattfile($nickname,8);
-    system("mkfs.vfat $ENV{'DEVNAME'} > /var/log/squarantine.log");
-    system("echo mkfs.vfat $ENV{'DEVNAME'} >> /var/log/squarantine.log");
-    system("mkdir -p /mnt$ENV{'DEVNAME'}");
-    #system("mount -o umask=000  $ENV{'DEVNAME'} /mnt$ENV{'DEVNAME'}");
-    #system("ln -s /mnt$ENV{'DEVNAME'} /var/squarantine/usbstorages/$nickname");
-    system("mount -o umask=000 $ENV{'DEVNAME'} /var/squarantine/usbstorages/$nickname");
-
-  } elsif ( 16 == $flags ) {
-    #################  16: MANUAL FORMAT          ##################
-    makeattfile($nickname,16);
-  } elsif ( 32 == $flags ) {
-    #################  32: AUTO DELETE            ##################
-    makeattfile($nickname,32);
-    system("mkdir -p /mnt$ENV{'DEVNAME'}");
-    system("mount $ENV{'DEVNAME'} /mnt$ENV{'DEVNAME'}");
-    autodelete("/mnt".$ENV{'DEVNAME'});
-    system("umount $ENV{'DEVNAME'}");
-    system("mount -o umask=000 $ENV{'DEVNAME'} /var/squarantine/usbstorages/$nickname");
-
-  } elsif ( 64 == $flags ) {
-    #################  64: MANUAL DELETE          ##################
-    makeattfile($nickname,64);
-  } elsif ( 128 == $flags ) {
-    #################  128: FREE TO ADMINISTRATOR ##################
-    makeattfile($nickname,128);
+  } elsif ( 4 == ( 4 & $flags )) {
+        #################  16+4: MANUAL DELETE          ##################
+        #################  32+4: MANUAL EXPORT          ##################
+        #################  64+4: MANUAL FORMAT          ##################
+        #################  etc                          ##################
+        makeattfile($nickname,$flags);
+  } else { 
+    if ( 16 == ( 16 & $flags )) {
+        #################  16: AUTO DELETE            ##################
+        makeattfile($nickname,16);
+        system("mkdir -p /mnt$ENV{'DEVNAME'}");
+        system("mount $ENV{'DEVNAME'} /mnt$ENV{'DEVNAME'}");
+        autodelete("/mnt".$ENV{'DEVNAME'});
+        system("umount $ENV{'DEVNAME'}");
+    }
+    if ( 32 == ( 32 & $flags )) {
+        #################  32: DATA EXPORT             ##################
+        makeattfile($nickname,32);
+        system("mkdir -p /mnt$ENV{'DEVNAME'}");
+        system("mount $ENV{'DEVNAME'} /mnt$ENV{'DEVNAME'}");
+        system("smbmount $distpath /mnt/$id -o username=$distaccount");
+        system("cp -a /mnt$ENV{'DEVNAME'}/ /mnt/$id");
+        system("umount $ENV{'DEVNAME'}");
+    #    system("umount /mnt/$id");
+    }
+    if ( 64 == ( 64 & $flags )) {
+        #################  64: AUTO FORMAT             ##################
+        makeattfile($nickname,64);
+        system("mkfs.vfat $ENV{'DEVNAME'} > /var/log/squarantine.log");
+        system("echo mkfs.vfat $ENV{'DEVNAME'} >> /var/log/squarantine.log");
+        #system("mkdir -p /mnt$ENV{'DEVNAME'}");
+        #system("mount -o umask=000  $ENV{'DEVNAME'} /mnt$ENV{'DEVNAME'}");
+        #system("ln -s /mnt$ENV{'DEVNAME'} /var/squarantine/usbstorages/$nickname");
+    }
+    if ( 128 == ( 128 & $flags )) {
+      #################  128: STOP                    ##################
+      makeattfile($nickname,128);
+    } else {
+      if ( 256 == ( 256 & $flags )) {
+        #################  256: MOUNT                   ##################
+        if ( 512 == ( 512 & $flags )) {
+        #################  512: WRITEABLE               ##################
+          system("mount -o umask=000 $ENV{'DEVNAME'} /var/squarantine/usbstorages/$nickname");
+        } else {
+        #################     : READONLY               ##################
+          system("mount -r -o umask=000 $ENV{'DEVNAME'} /var/squarantine/usbstorages/$nickname");
+        }
+      }
+    }
   }
-
-
 }
 $sth->finish;
 $dbh->disconnect;
index b3fde2e..beedfb4 100644 (file)
@@ -8,15 +8,29 @@
 <?php 
 require_once('spyc.php');
 $conf = Spyc::YAMLLoad('/etc/squarantine/squarantine.conf');
-
 $SAMBAPATH = "//192.168.0.51/usb/";
 if (isset( $_POST["id"      ] )) { $_var[      "id"]=$_POST["id"] ;      }
 if (isset( $_POST["nickname"] )) { $_var["nickname"]=$_POST["nickname"]; }
-if (isset( $_POST["flags"   ] )) { $_var[   "flags"]=$_POST["flags"];    }
 if (isset( $_POST["distpath"] )) { $_var["distpath"]=$_POST["distpath"]; }
+if (isset( $_POST["distaccount"] )) { $_var["distaccount"]=$_POST["distaccount"]; }
 if (isset( $_POST["memo"    ] )) { $_var[    "memo"]=$_POST["memo"];     }
 if (isset( $_POST["mode"    ] )) { $_var[    "mode"]=$_POST["mode"];     } else {  $_var["mode"]=0; }
 if (isset( $_POST["devname" ] )) { $_var[ "devname"]=$_POST["devname"];  }
+if (isset( $_POST["flags1"   ] )) { $_var["flags1"   ]=$_POST["flags1"   ];     } else {  $_var["flags1"   ]=0; }
+if (isset( $_POST["flags2"   ] )) { $_var["flags2"   ]=$_POST["flags2"   ];     } else {  $_var["flags2"   ]=0; }
+if (isset( $_POST["flags4"   ] )) { $_var["flags4"   ]=$_POST["flags4"   ];     } else {  $_var["flags4"   ]=0; }
+if (isset( $_POST["flags8"   ] )) { $_var["flags8"   ]=$_POST["flags8"   ];     } else {  $_var["flags8"   ]=0; }
+if (isset( $_POST["flags16"  ] )) { $_var["flags16"  ]=$_POST["flags16"  ];     } else {  $_var["flags16"   ]=0; }
+if (isset( $_POST["flags32"  ] )) { $_var["flags32"  ]=$_POST["flags32"  ];     } else {  $_var["flags32"   ]=0; }
+if (isset( $_POST["flags64"  ] )) { $_var["flags64"  ]=$_POST["flags64"  ];     } else {  $_var["flags64"   ]=0; }
+if (isset( $_POST["flags128" ] )) { $_var["flags128" ]=$_POST["flags128" ];     } else {  $_var["flags128"   ]=0; }
+if (isset( $_POST["flags256" ] )) { $_var["flags256" ]=$_POST["flags256" ];     } else {  $_var["flags256"   ]=0; }
+if (isset( $_POST["flags512" ] )) { $_var["flags512" ]=$_POST["flags512" ];     } else {  $_var["flags512"   ]=0; }
+if (isset( $_POST["flags1024"] )) { $_var["flags1024"]=$_POST["flags1024"];     } else {  $_var["flags1024"   ]=0; }
+ $_var["flags"]= $_var["flags1" ]+ $_var["flags2" ]+ $_var["flags4" ]+ $_var["flags8" ]+ $_var["flags16" ]+ $_var["flags32"   ]+ $_var["flags64"   ]+ $_var["flags128"   ]+ $_var["flags256"   ]+ $_var["flags512"   ]+ $_var["flags1024"   ]; 
+
+
+
 if (isset( $_POST["adminid" ] ) && isset( $_POST["adminpass"] ) &&  0 == strcmp( "admin",$_POST["adminid"] )  &&  0 == strcmp( $conf["WEB_ADMINPASS"],$_POST["adminpass"] )) {
    $_var["adminmode"] = 1;
 } else {
@@ -38,31 +52,13 @@ $db = 'squarantine';
 
 ?>
 <?php
-<table style="border:0" width="100%">
-<tbody><tr>
-<td style="border:0"><img src="image/addr.png" alt="address"></td>
-<td style="border:0"><img src="image/logo.png" alt="Logo" align="right"></td>
-<td style="border:1"><form action=regist.php method=POST>
-  <table border=1><tr><td><input type=text name=adminid>:ID</td></tr><tr><td><input type=password name=adminpass>:PASS</td></tr></table>
-<input type="hidden" name="mode" value="change">
-<input type="submit" value="login">
-<?php
-if ( 1 == isset( $_var["id"] )) {
-?>
-<input type="hidden" name="id" value="<?php echo $_var[      "id"];  ?>">
-<?php } ?>
-</form>
-</td>
-</tr></tbody>
-</table>
-<?php
 
-if ( 0 == isset( $_var["id"] )){
+if ( 0 == isset( $_var["id"] )){ 
 // ----------------------------------------------- list mode start-----------------------
- print("<h1>登録済みUSBデバイス一覧</h1>");
+// print("<h1>登録済みUSBデバイス一覧</h1>");
 
 
-        $sql = "select id,id_serial,nickname,memo,flags from media";
+        $sql = "select id,id_serial,nickname,memo,flags,distpath,distaccount from media";
         $results = mysql_db_query($db,$sql);
         if (!$results)
         {
@@ -72,9 +68,243 @@ if ( 0 == isset( $_var["id"] )){
         $num = mysql_num_fields($results);
 ?>
 
-<table border=1><tr><th></th><th>ID</th><th>名前</th><th>説明</th><th>動作</th><th></th></tr>
+<table>
+<tbody>
+<tr>
+<td colspan="4" rowspan="11" style="vertical-align: top;"><br>
+<table style="border: 0pt none ;" width="100%">
+<tbody>
+<tr>
+<td style="border: 0pt none ;"><img src="image/addr.png"
+alt="address"></td>
+<td style="border: 0pt none ;"><img src="image/logo.png"
+alt="Logo" align="right"></td>
+<td style="">
+<form action="regist.php" method="post">
+<table border="1">
+<tbody>
+<tr>
+<td><input name="adminid" type="text">:ID</td>
+</tr>
+<tr>
+<td><input name="adminpass" type="password">:PASS</td>
+</tr>
+</tbody>
+</table>
+<input name="mode" value="change" type="hidden">
+<input value="login" type="submit">
+<?php 
+if ( 1 == isset( $_var["id"] )) {
+?>
+<input type="hidden" name="id" value="<?php echo $_var[      "id"];  ?>">
+<?php } ?>
+</form> 
+</td>
+</tr>
+</tbody>
+</table>
 
 
+<h1>登録済みUSBデバイス一覧</h1>
+</td>
+<th style="vertical-align: top;">┏<br>
+</th>
+<td colspan="11" rowspan="1" style="vertical-align: top;">*未登録<br>
+</td>
+</tr>
+<tr>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">┏
+</th>
+<td colspan="10" rowspan="1" style="vertical-align: top;">*使用禁止<br>
+</td>
+</tr>
+<tr>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">┏
+</th>
+<td colspan="9" rowspan="1" style="vertical-align: top;">*信頼済(管理者
+のみ利用)<br>
+</td>
+</tr>
+<tr>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">┏
+</th>
+<td colspan="8" rowspan="1" style="vertical-align: top;">(操作前確認<br>
+</td>
+</tr>
+<tr>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">┏
+</th>
+<td colspan="7" rowspan="1" style="vertical-align: top;">(削除ファイルを
+バックアップ<br>
+</td>
+</tr>
+<tr>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">┏
+</th>
+<td colspan="6" rowspan="1" style="vertical-align: top;">実行ファイル削除<br>
+</td>
+</tr>
+<tr>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">┏
+</th>
+<td colspan="5" rowspan="1" style="vertical-align: top;">検疫済ファイルを外
+部にコピー
+</td>
+</tr>
+<tr>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">┏
+</th>
+<td colspan="4" rowspan="1" style="vertical-align: top;">フォーマット<br>
+</td>
+</tr>
+<tr>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">┏
+</th>
+<td colspan="3" rowspan="1" style="vertical-align: top;">*使用停止<br>
+</td>
+</tr>
+<tr>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">┏
+</th>
+<td colspan="2" rowspan="1" style="vertical-align: top;">検疫後共有公開<br>
+</td>
+</tr>
+<tr>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">|<br>
+</th>
+<th style="vertical-align: top;">┏
+</th>
+<td colspan="1" rowspan="1" style="vertical-align: top;">持出可(書込OK)</td>
+</tr>
+
+<tr>
+<th style="vertical-align: top;"></th>
+<th style="vertical-align: top;">USB ID</th>
+<th style="vertical-align: top;">名前</th>
+<th style="vertical-align: top;">説明</th>
+</th>
+<th style="vertical-align: top;">|<br> </th>
+<th style="vertical-align: top;">|<br> </th>
+<th style="vertical-align: top;">|<br> </th>
+<th style="vertical-align: top;">|<br> </th>
+<th style="vertical-align: top;">|<br> </th>
+<th style="vertical-align: top;">|<br> </th>
+<th style="vertical-align: top;">|<br> </th>
+<th style="vertical-align: top;">|<br> </th>
+<th style="vertical-align: top;">|<br> </th>
+<th style="vertical-align: top;">|<br> </th>
+<th style="vertical-align: top;">|<br> </th>
+<th>外部コピー先</th>
+</tr>
+
 <?php
         while($row=mysql_fetch_array($results))
         {
@@ -84,15 +314,15 @@ if ( 0 == isset( $_var["id"] )){
                         print("<td>".$row[$j]."</td>");
                 }
                 if ( 0 == $row[4] ) {
-                  print ("<td>@</td>");
+                  print ("<td></td>");
                } else {
-                  print ("<td></td>");
+                  print ("<td></td>");
                 }
                 for ( $i=1 ; $i<=512 ; $i = $i * 2 ) {
                  if ( 0 == ( $i & $row[4]) ){
-                   $check="";
+                   $check="";
                  } else {
-                   $check="@";
+                   $check="";
                  }
                   print("<td>$check</td>");
                }
@@ -100,6 +330,9 @@ if ( 0 == isset( $_var["id"] )){
 //              print ($row[4]); // flags
 //               print("</td>");
                 print("<td>");
+               print ($row[5]);  // distpath
+                print("</td>");
+                print("<td>");
                if (1 == $_var["adminmode"]){
 ?>
                <form action="regist.php" method="post">
@@ -132,7 +365,7 @@ exit(0);
 }
 // ----------------------------------------------- list mode end-----------------------
 
-$sql = "select id_serial,nickname,flags,memo,distpath from media where id=\"".$_var["id"]."\"";
+$sql = "select id_serial,nickname,flags,memo,distpath,distaccount from media where id=\"".$_var["id"]."\"";
 // echo $sql;
 $results = mysql_db_query($db,$sql);
 if (!$results)
@@ -143,20 +376,22 @@ if (!$results)
 $num = mysql_num_fields($results);
 while($row=mysql_fetch_array($results))
 {
-       $org["id_serial"] =($row[0]);
-       $org["nickname" ] =($row[1]);
-       $org["flags"    ] =($row[2]);
-       $org["memo"     ] =($row[3]);
-       $org["distpath" ] =($row[4]);
+       $org["id_serial"  ] =($row[0]);
+       $org["nickname"   ] =($row[1]);
+       $org["flags"      ] =($row[2]);
+       $org["memo"       ] =($row[3]);
+       $org["distpath"   ] =($row[4]);
+       $org["distaccount"] =($row[5]);
  }
 mysql_free_result($results);
 if ( 0 == strcmp("regist", $_var["mode"])){
 // ----------------------------------------------- new regist mode start-----------------------
         $sql = "update media set
-                nickname=\"".$_var["nickname"]."\",
-               flags   =\"".$_var["flags"]."\", 
-               memo    =\"".$_var["memo"]."\", 
-               distpath=\"".$_var["distpath"]."\" 
+                nickname   =\"".$_var["nickname"]."\",
+               flags      =\"".$_var["flags"]."\", 
+               memo       =\"".$_var["memo"]."\", 
+               distpath   =\"".$_var["distpath"]."\",
+               distaccount=\"".$_var["distaccount"]."\" 
         where id=\"".$_var["id"]."\"";
         
         $results = mysql_db_query($db,$sql);
@@ -190,40 +425,6 @@ print "$sql";
 <b>一旦抜いて、もう一度差し直してください</b>
 <?php
 //----------------------------new regist mode end -------------------
-} else if ( 0 == strcmp("format", $_var["mode"])){
-//----------------------------format mode start --------------------
-print "<h1>format中...</h1>";
-print "<pre>";
-passthru("sudo mkfs.vfat   ".$_var["devname"]);
-passthru("sudo mount ".$_var["devname"]." /var/squarantine/usbstorages/".$org["nickname"]);
-passthru("echo sudo mount ".$_var["devname"]." /var/squarantine/usbstorages/".$org["nickname"]);
-#passthru("find /etc -name a*");
-print "</pre>";
-print "<h2>終了しました</h2>";
-print "<a href=\"file:".$conf["SAMBAPATH"]."\">こちらからアクセスしてください</a>";
-
-
-//----------------------------format mode end   --------------------
-} else if ( 0 == strcmp("delete", $_var["mode"])){
-//----------------------------delete mode start --------------------
-print "<h1>消毒中...</h1>";
-print "<pre>";
-print $_var["devname"]."\n";
-passthru("sudo mount ".$_var["devname"]." /mnt".$_var["devname"]);
-//passthru("sudo mount");
-//print "-------------\n";
-passthru("sudo usbsearchdelete /mnt".$_var["devname"]);
-passthru("sudo umount ".$_var["devname"]);
-passthru("sudo mount ".$_var["devname"]." /var/squarantine/usbstorages/".$org["nickname"]);
-//passthru("sudo mount");
-//passthru("sudo echo mount ".$_var["devname"]." /var/squarantine/usbstorages/".$org["nickname"]);
-//passthru("echo 123");
-//passthru("find /etc -name a*");
-print "</pre>";
-print "<h2>終了しました</h2>";
-
-
-//----------------------------delete mode end   --------------------
 } else if ( 0 == strcmp("change",$_var["mode"] )) {
 //----------------------------device edit mdde start -----------------
 print("<h1>登録情報変更</h1>");
@@ -237,105 +438,126 @@ print("<h1>登録情報変更</h1>");
 <br>
 <input type="text" name=memo     value="<?php echo $org["memo"    ]; ?>">メモ(備忘録)
 <br>
-<input type="text" name=flags    value="<?php echo $org["flags"   ]; ?>">動作指定
+動作指定
 <br>
+<input type="checkbox" name=flags1    value="1"   <?php if ( 0 != (   1 &$org["flags"]) ) { print "checked"; } ?>>*使用禁止
+<br>
+<input type="checkbox" name=flags2    value="2"   <?php if ( 0 != (   2 &$org["flags"]) ) { print "checked"; } ?>>*信頼済(管理者のみ利用)
+<br>
+<input type="checkbox" name=flags4    value="4"   <?php if ( 0 != (   4 &$org["flags"]) ) { print "checked"; } ?>>操作前確認
+<br>
+<input type="checkbox" name=flags8    value="8"   <?php if ( 0 != (   8 &$org["flags"]) ) { print "checked"; } ?>>#削除ファイルをバックアップ
+<br>
+<input type="checkbox" name=flags16   value="16"  <?php if ( 0 != (  16 &$org["flags"]) ) { print "checked"; } ?>>実行ファイル削除
+<br>
+<input type="checkbox" name=flags32   value="32"  <?php if ( 0 != (  32 &$org["flags"]) ) { print "checked"; } ?>>検疫済ファイルを外部にコピー
+<br>
+<input type="checkbox" name=flags64   value="64"  <?php if ( 0 != (  64 &$org["flags"]) ) { print "checked"; } ?>>フォーマット
+<br>
+<input type="checkbox" name=flags128  value="128" <?php if ( 0 != ( 128 &$org["flags"]) ) { print "checked"; } ?>>*使用停止
+<br>
+<input type="checkbox" name=flags256  value="256" <?php if ( 0 != ( 256 &$org["flags"]) ) { print "checked"; } ?>>検疫後共有公開
+<br>
+<input type="checkbox" name=flags512  value="512" <?php if ( 0 != ( 512 &$org["flags"]) ) { print "checked"; } ?>>持出可(書込OK) 
 
+<br>
+ルールは上から順番に適用されます。*印のついているものは、そこでストップします。#印のついているものは現在使用できません
+<br>
+<input type="text" name=distpath value="<?php echo $org["distpath"]; ?>">コピー先PATH //SERVERNAME/DIR/PATH のように入力してください
+<br>
+<input type="text" name=distaccount value="<?php echo $org["distaccount"]; ?>">コピー先PATHへのユーザ名、パスワード USERNAME%PASSWORDと入力してください。必要ない場合も%のみ入力してください
+<br>
 <input type="submit">
 <input type="hidden" name="id" value="<?php echo $_var["id"]; ?>">
 <input type="hidden" name="mode" value="regist">
 </form>
 <?php
 //----------------------------device edit mode end-------------
-} else if ( 0 == $_var["mode"] ) {  
+} else if ( 0 == strcmp( "0",  $_var["mode"] ) ) {  
 //----------------------------new device found mode -----------------
 print("<h1>このUSBデバイス(".$org["nickname"].")は未登録です</h1>");
 
-
 ?>
 
 <b>以下のボタンから登録してください</b>
 <form action="regist.php" method="POST">
 <input type="text" name=nickname value="<?php echo $org["nickname"]; ?>">ニックネームを登録してください
+<br>
 <input type="text" name=memo     value="<?php echo $org["memo"    ]; ?>">メモ(備忘録)
-<input type="text" name=flags    value="<?php echo $org["flags"   ]; ?>">動作指定
-
+<br>
+動作指定
+<br>
+<input type="checkbox" name=flags1    value="1"   <?php if ( 0 != (   1 &$org["flags"]) ) { print "checked"; } ?>>*使用禁止
+<br>
+<input type="checkbox" name=flags2    value="2"   <?php if ( 0 != (   2 &$org["flags"]) ) { print "checked"; } ?>>*信頼済(管理者のみ利用)
+<br>
+<input type="checkbox" name=flags4    value="4"   <?php if ( 0 != (   4 &$org["flags"]) ) { print "checked"; } ?>>操作前確認
+<br>
+<input type="checkbox" name=flags8    value="8"   <?php if ( 0 != (   8 &$org["flags"]) ) { print "checked"; } ?>>#削除ファイルをバックアップ
+<br>
+<input type="checkbox" name=flags16   value="16"  <?php if ( 0 != (  16 &$org["flags"]) ) { print "checked"; } ?>>実行ファイル削除
+<br>
+<input type="checkbox" name=flags32   value="32"  <?php if ( 0 != (  32 &$org["flags"]) ) { print "checked"; } ?>>検疫済ファイルを外部にコピー
+<br>
+<input type="checkbox" name=flags64   value="64"  <?php if ( 0 != (  64 &$org["flags"]) ) { print "checked"; } ?>>フォーマット
+<br>
+<input type="checkbox" name=flags128  value="128" <?php if ( 0 != ( 128 &$org["flags"]) ) { print "checked"; } ?>>*使用停止
+<br>
+<input type="checkbox" name=flags256  value="256" <?php if ( 0 != ( 256 &$org["flags"]) ) { print "checked"; } ?>>検疫後共有公開
+<br>
+<input type="checkbox" name=flags512  value="512" <?php if ( 0 != ( 512 &$org["flags"]) ) { print "checked"; } ?>>持出可(書込OK) 
+<br>
 
+ルールは上から順番に適用されます。*印のついているものは、そこでストップします。#印のついているものは現在使用できません
+<br>
+<input type="text" name=distpath value="<?php echo $org["distpath"]; ?>">コピー先PATH //SERVERNAME/DIR/PATH のように入力してください
+<br>
+<input type="text" name=distaccount value="<?php echo $org["distaccount"]; ?>">コピー先PATHへのユーザ名、パスワード USERNAME%PASSWORDと入力してください。必要ない場合も%のみ入力してください
+<br>
 <input type="submit">
 <input type="hidden" name="id" value="<?php echo $_var["id"]; ?>">
 <input type="hidden" name="mode" value="regist">
 </form>
 <?php
 //----------------------------new device found mode end-------------
-} else if ( 1 == $_var["mode"] ) {
-//----------------------------forbidden mode start-------------
- print("<h1>このUSBデバイスは使用禁止です</h1>");
-
-
-        $sql = "select * from media where id=\"".$_var["id"]."\"";
-        $results = mysql_db_query($db,$sql);
-        if (!$results)
-        {
-                print("SQL execution error");
-                exit;
-        }
-        $num = mysql_num_fields($results);
+} else if ( 0 == strcmp("ACTION",$_var["mode"]) ) {
+//----------------------------ACTION mode start-------------
+  
+$flags = $org["flags"];
+// print_r ($org);
+  $actions="";
+  if (   1 == (    1 & $flags )) { $actions = $actions."「使用禁止」"; }
+  if (   2 == (    2 & $flags )) { $actions = $actions."「信頼済」"; }
+  if (   4 == (    4 & $flags )) { $actions = $actions."「操作前確認」"; }
+  if (   8 == (    8 & $flags )) { $actions = $actions."「削除ファイルをバックアップ」"; }
+  if (  16 == (   16 & $flags )) { $actions = $actions."「実行ファイル削除」"; }
+  if (  32 == (   32 & $flags )) { $actions = $actions."「検疫済ファイルを外部にコピー」"; }
+  if (  64 == (   64 & $flags )) { $actions = $actions."「フォーマット」"; }
+  if ( 128 == (  128 & $flags )) { $actions = $actions."「使用停止」"; }
+  if ( 256 == (  256 & $flags )) { $actions = $actions."「検疫後共有公開」"; }
+  if ( 512 == (  512 & $flags )) { $actions = $actions."「持出可」"; }
+
+  if (   4 == (    4 & $flags )) {
+//----------------------------actionconfirm mode start-------------
+
+    print("<h1>このUSBデバイスは".$actions."として設定されています</h1>");
 ?>
-
-<table border=1><tr><th></th><th>ID</th><th>名前</th><th>説明</th><th></th></tr><tr>
+ <b>以下のボタンを押して開始してください</b>
+ <form action="regist.php" method="POST">
+ <input type="submit">
+ <input type="hidden" name="devname" value="<?php echo $_var["devname"]; ?>">
+ <input type="hidden" name="id"      value="<?php echo $_var["id"]; ?>">
+ <input type="hidden" name="mode"    value="DOACTION">
+ <input type="hidden" name="flags"   value="<?php echo $_var["flags"]; ?>">
+ </form>
 <?php
-        while($row=mysql_fetch_array($results))
-        {
-                for($j=0;$j<$num;$j++)
-                {
-                        print("<td>".$row[$j]."</td>");
-                }
-        }
-        mysql_free_result($results);
-        mysql_close($dbh);
 
+//----------------------------actionconfirm mode end-------------
 
-?>
+  } else if (  0 !=  $flags ) { 
+//----------------------------actiondisplay mode start-------------
 
-</tr></table>
-状態の変更は管理としてログインしてください
-<?php
-//----------------------------forbidden mode end-------------
-} else if ( 2 == $_var["mode"] ) {
-//----------------------------stop mode start-------------
- print("<h1>このUSBデバイスは使用停止中です</h1>");
-
-
-        $sql = "select * from media where id=\"".$_var["id"]."\"";
-        $results = mysql_db_query($db,$sql);
-        if (!$results)
-        {
-                print("SQL execution error");
-                exit;
-        }
-        $num = mysql_num_fields($results);
-?>
-
-<table border=1><tr><th></th><th>ID</th><th>名前</th><th>説明</th><th></th></tr><tr>
-<?php
-        while($row=mysql_fetch_array($results))
-        {
-                for($j=0;$j<$num;$j++)
-                {
-                        print("<td>".$row[$j]."</td>");
-                }
-        }
-        mysql_free_result($results);
-        mysql_close($dbh);
-
-
-?>
-</tr></table>
-状態の変更は管理としてログインしてください
-<?php
-//----------------------------stop mode end-------------
-} else if ( 4 == $_var["mode"] ) {
-//----------------------------hold mode start-------------
- print("<h1>このUSBデバイスの使用は保留中です</h1>");
+    print("<h1>このUSBデバイスは".$actions."として設定されています</h1>");
 
 
         $sql = "select * from media where id=\"".$_var["id"]."\"";
@@ -364,43 +586,97 @@ print("<h1>このUSBデバイス(".$org["nickname"].")は未登録です</h1>");
 ?>
 
 </tr></table>
-状態の変更は管理としてログインしてください
-<?php
-//----------------------------hold mode end-------------
-} else if ( 16 == $_var["mode"] ) {  
-//----------------------------manual   format  mode start-------------
- print("<h1>このUSBデバイスのフォーマットを開始します</h1>");
-
-?>
-
-<b>以下のボタンを押して開始してください</b>
-<form action="regist.php" method="POST">
-<input type="submit">
-<input type="hidden" name="devname" value="<?php echo $_var["devname"]; ?>">
-<input type="hidden" name="id"      value="<?php echo $_var["id"]; ?>">
-<input type="hidden" name="mode"    value="format">
-</form>
+状態の変更は管理者としてログインしてください
 <?php
-//----------------------------manual   format  mode end-------------
-} else if ( 64 == $_var["mode"] ) {
-//----------------------------manual   delete  mode start-------------
- print("<h1>このUSBデバイスの消毒を開始します</h1>");
-
-echo $_var["devname"];
-?>
+//----------------------------actiondisplay mode end-------------
+  }
+} else if ( 0 == strcmp("DOACTION", $_var["mode"])){
+//----------------------------manual action mode start --------------------
+       
+ob_end_flush();
+
+$flags = $org["flags"];
+  $actions="";
+  if (   1 == (    1 & $flags )) { $actions = $actions."「使用禁止」"; }
+  if (   2 == (    2 & $flags )) { $actions = $actions."「信頼済」"; }
+  if (   4 == (    4 & $flags )) { $actions = $actions."「操作前確認」"; }
+  if (   8 == (    8 & $flags )) { $actions = $actions."「削除ファイルをバックアップ」"; }
+  if (  16 == (   16 & $flags )) { $actions = $actions."「実行ファイル削除」"; }
+  if (  32 == (   32 & $flags )) { $actions = $actions."「検疫済ファイルを外部にコピー」"; }
+  if (  64 == (   64 & $flags )) { $actions = $actions."「フォーマット」"; }
+  if ( 128 == (  128 & $flags )) { $actions = $actions."「使用停止」"; }
+  if ( 256 == (  256 & $flags )) { $actions = $actions."「検疫後共有公開」"; }
+  if ( 512 == (  512 & $flags )) { $actions = $actions."「持出可」"; }
+
+  if (   4 == (    4 & $flags )) {
+//----------------------------actionconfirm mode start-------------
+
+    print("<h1>このUSBデバイスは".$actions."として設定されています</h1>");
+  if (        1 == (    1 & $flags )) {
+     $action = "「使用禁止」"; 
+     print $action;
+} else {
+  if (  16 == (   16 & $flags )) {
+      $action = "「実行ファイル削除」";
+      print $action;
+      print "<h1>消毒中...</h1>";
+      print "<pre>";
+      print $_var["devname"]."\n";
+      passthru("sudo mount ".$_var["devname"]." /mnt".$_var["devname"]);
+      //passthru("sudo mount");
+      //print "-------------\n";
+      passthru("sudo usbsearchdelete /mnt".$_var["devname"]);
+      passthru("sudo umount ".$_var["devname"]);
+      print "</pre>";
+  }
+  if (  32 == (   32 & $flags )) {
+      $action = "「検疫済ファイルを外部にコピー」";
+      print $action;
+      print "<h1>外部にコピー中...</h1>";
+      print "<pre>";
+      passthru("sudo mkdir -p /mnt".$_var["devname"]);
+      passthru("sudo mount ".$_var["devname"]." /mnt".$_var["devname"]);
+      passthru("sudo smbmount ".$_var["distpath"]." /mnt/$id -o username=".$_var["distaccount"]);
+      passthru("sudo cp -a /mnt".$_var["devname"]."/ /mnt/".$_var["id"]);
+      passthru("sudo umount ".$_var["devname"]);
+      print "</pre>";
+  }
+  if (  64 == (   64 & $flags )) {
+      $action = "「フォーマット」";
+      print $action;
+      print "<h1>format中...</h1>";
+      print "<pre>";
+      passthru("sudo mkfs.vfat   ".$_var["devname"]);
+      passthru("sudo mount ".$_var["devname"]." /var/squarantine/usbstorages/".$org["nickname"]);
+      passthru("echo sudo mount ".$_var["devname"]." /var/squarantine/usbstorages/".$org["nickname"]);
+      #passthru("find /etc -name a*");
+      print "</pre>";
+  }
+  if ( 128 == (  128 & $flags )) {
+      $action = "「使用停止」";
+      print $action;
+  } else {
+    if ( 256 == (  256 & $flags )) {
+       $action = "「検疫後共有公開」";
+       print $action;
+       if ( 512 == (  512 & $flags )) {
+          $action = "「持出可」";
+          print $action;
+          passthru("sudo mount ".$_var["devname"]." /var/squarantine/usbstorages/".$org["nickname"]);
+       } else {
+          passthru("sudo mount -r ".$_var["devname"]." /var/squarantine/usbstorages/".$org["nickname"]);
+       }
+       print "<h2>終了しました</h2>";
+       print "<a href=\"file:".$conf["SAMBAPATH"]."\">こちらからアクセスしてください</a>";
+
+    }
+  }
+}
+}
+}
 
-<b>以下のボタンを押して開始してください</b>
-<form action="regist.php" method="POST">
-<input type="submit">
-<input type="hidden" name="devname" value="<?php echo $_var["devname"]; ?>">
-<input type="hidden" name="id"      value="<?php echo $_var["id"]; ?>">
-<input type="hidden" name="mode"    value="delete">
-</form>
-<?php
 
-//----------------------------manual   delete  mode end-------------
-}
+//----------------------------DOACTION mode end   --------------------
 
 ?>
 </body>
diff --git a/package/var/squarantine/www/sambalog b/package/var/squarantine/www/sambalog
new file mode 120000 (symlink)
index 0000000..3887b3c
--- /dev/null
@@ -0,0 +1 @@
+/var/log/samba
\ No newline at end of file
index da7d53e..2a3886f 100644 (file)
@@ -17,7 +17,7 @@
 <form action="##WEBROOT##regist.php" method="POST">
 <input type="submit">
 <input type="hidden" name="id" value="##ID##">
-<input type="hidden" name="mode" value="0">
-</form>
+<input type="hidden" name="mode" value="ACTION">
+<input type="hidden" name="flags" value="##FLAGS##"></form>
 </body>
 </html>
index 69ab679..114c3b6 100644 (file)
@@ -17,7 +17,7 @@
 <form action="##WEBROOT##regist.php" method="POST">
 <input type="submit">
 <input type="hidden" name="id" value="##ID##">
-<input type="hidden" name="mode" value="1">
-</form>
+<input type="hidden" name="mode" value="ACTION">
+<input type="hidden" name="flags" value="##FLAGS##"></form>
 </body>
 </html>
diff --git a/package/var/squarantine/www/templates/128.使用停止.html b/package/var/squarantine/www/templates/128.使用停止.html
new file mode 100644 (file)
index 0000000..189f0b1
--- /dev/null
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="ja"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>squarantine</title>
+<link rel="stylesheet" type="text/css" href="/style.css">
+</head>
+<body>
+<table style="border:0" width="100%">
+<tbody><tr>
+<td style="border:0"><img src="/image/addr.png" alt="address"></td>
+<td style="border:0"><img src="/image/logo.png" alt="Logo" align="right"></td>
+</tr></tbody>
+</table>
+<h1>このUSBデバイスは使用停止中です</h1>
+
+<b>詳細は以下のボタンから確認してください</b>
+<form action="##WEBROOT##regist.php" method="POST">
+<input type="submit">
+<input type="hidden" name="id" value="##ID##">
+<input type="hidden" name="mode" value="ACTION">
+<input type="hidden" name="flags" value="##FLAGS##"></form>
+</body>
+</html>
diff --git a/package/var/squarantine/www/templates/16.強制削除.html b/package/var/squarantine/www/templates/16.強制削除.html
new file mode 100644 (file)
index 0000000..80daf8b
--- /dev/null
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="ja"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>squarantine</title>
+<link rel="stylesheet" type="text/css" href="/style.css">
+</head>
+<body>
+<table style="border:0" width="100%">
+<tbody><tr>
+<td style="border:0"><img src="/image/addr.png" alt="address"></td>
+<td style="border:0"><img src="/image/logo.png" alt="Logo" align="right"></td>
+</tr></tbody>
+</table>
+<h1>このUSBデバイスは実行ファイルの強制削除動作が登録されています</h1>
+
+<b>詳細は以下のボタンから確認してください</b>
+<form action="##WEBROOT##regist.php" method="POST">
+<input type="submit">
+<input type="hidden" name="_id" value="##ID##">
+<input type="hidden" name="mode" value="ACTION">
+<input type="hidden" name="flags" value="##FLAGS##"></form>
+</body>
+</html>
diff --git a/package/var/squarantine/www/templates/2.利用可能.html b/package/var/squarantine/www/templates/2.利用可能.html
new file mode 100644 (file)
index 0000000..79c21bd
--- /dev/null
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="ja"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>squarantine</title>
+<link rel="stylesheet" type="text/css" href="/style.css">
+</head>
+<body>
+<table style="border:0" width="100%">
+<tbody><tr>
+<td style="border:0"><img src="/image/addr.png" alt="address"></td>
+<td style="border:0"><img src="/image/logo.png" alt="Logo" align="right"></td>
+</tr></tbody>
+</table>
+<h1>このUSBデバイスは信頼済み(管理者用)として登録されています</h1>
+
+<b>詳細は以下のボタンから確認してください</b>
+<form action="##WEBROOT##regist.php" method="POST">
+<input type="submit">
+<input type="hidden" name="_id" value="##ID##">
+<input type="hidden" name="mode" value="ACTION">
+<input type="hidden" name="flags" value="##FLAGS##"></form>
+</body>
+</html>
diff --git a/package/var/squarantine/www/templates/20.削除.html b/package/var/squarantine/www/templates/20.削除.html
new file mode 100644 (file)
index 0000000..6a82ec1
--- /dev/null
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="ja"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>squarantine</title>
+<link rel="stylesheet" type="text/css" href="/style.css">
+</head>
+<body>
+<table style="border:0" width="100%">
+<tbody><tr>
+<td style="border:0"><img src="/image/addr.png" alt="address"></td>
+<td style="border:0"><img src="/image/logo.png" alt="Logo" align="right"></td>
+</tr></tbody>
+</table>
+<h1>このUSBデバイス中の実行ファイルを削除します</h1>
+
+
+<b>以下のボタンを押して開始してください</b>
+<form action="##WEBROOT##regist.php" method="POST">
+<input type="submit">
+<input type="hidden" name="id" value="##ID##">
+<input type="hidden" name="flags" value="64">
+<input type="hidden" name="devname" value="##DEVNAME##">
+input type="hidden" name="flags" value="##FLAGS##"></form>
+</body>
+</html>
diff --git a/package/var/squarantine/www/templates/32.エクスポート.html b/package/var/squarantine/www/templates/32.エクスポート.html
new file mode 100644 (file)
index 0000000..29ec48b
--- /dev/null
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="ja"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>squarantine</title>
+<link rel="stylesheet" type="text/css" href="/style.css">
+</head>
+<body>
+<table style="border:0" width="100%">
+<tbody><tr>
+<td style="border:0"><img src="/image/addr.png" alt="address"></td>
+<td style="border:0"><img src="/image/logo.png" alt="Logo" align="right"></td>
+</tr></tbody>
+</table>
+<h1>データを転送中です</h1>
+
+<b>詳細は以下のボタンから確認してください</b>
+<form action="##WEBROOT##regist.php" method="POST">
+<input type="submit">
+<input type="hidden" name="_id" value="##ID##">
+<input type="hidden" name="mode" value="ACTION">
+<input type="hidden" name="flags" value="##FLAGS##"></form>
+</body>
+</html>
diff --git a/package/var/squarantine/www/templates/4.操作前確認.html b/package/var/squarantine/www/templates/4.操作前確認.html
new file mode 100644 (file)
index 0000000..f89ad9e
--- /dev/null
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="ja"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>squarantine</title>
+<link rel="stylesheet" type="text/css" href="/style.css">
+</head>
+<body>
+<table style="border:0" width="100%">
+<tbody><tr>
+<td style="border:0"><img src="/image/addr.png" alt="address"></td>
+<td style="border:0"><img src="/image/logo.png" alt="Logo" align="right"></td>
+</tr></tbody>
+</table>
+<h1>このUSBデバイスは##ACTION##として設定されています</h1>
+
+
+<b>以下のボタンを押して開始してください</b>
+<form action="##WEBROOT##regist.php" method="POST">
+<input type="submit">
+<input type="hidden" name="id" value="##ID##">
+<input type="hidden" name="mode" value="ACTION">
+<input type="hidden" name="devname" value="##DEVNAME##">
+<input type="hidden" name="flags" value="##FLAGS##"></form>
+</body>
+</html>
diff --git a/package/var/squarantine/www/templates/64.強制フォーマット.html b/package/var/squarantine/www/templates/64.強制フォーマット.html
new file mode 100644 (file)
index 0000000..b0fb4d9
--- /dev/null
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="ja"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>squarantine</title>
+<link rel="stylesheet" type="text/css" href="/style.css">
+</head>
+<body>
+<table style="border:0" width="100%">
+<tbody><tr>
+<td style="border:0"><img src="/image/addr.png" alt="address"></td>
+<td style="border:0"><img src="/image/logo.png" alt="Logo" align="right"></td>
+</tr></tbody>
+</table>
+<h1>このUSBデバイスは強制フォーマットとして登録されています</h1>
+
+<b>詳細は以下のボタンから確認してください</b>
+<form action="##WEBROOT##regist.php" method="POST">
+<input type="submit">
+<input type="hidden" name="_id" value="##ID##">
+<input type="hidden" name="mode" value="ACTION">
+<input type="hidden" name="flags" value="##FLAGS##"></form>
+</body>
+</html>
diff --git a/package/var/squarantine/www/templates/68.初期化.html b/package/var/squarantine/www/templates/68.初期化.html
new file mode 100644 (file)
index 0000000..b6c3c12
--- /dev/null
@@ -0,0 +1,24 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="ja"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>squarantine</title>
+<link rel="stylesheet" type="text/css" href="/style.css">
+</head>
+<body>
+<table style="border:0" width="100%">
+<tbody><tr>
+<td style="border:0"><img src="/image/addr.png" alt="address"></td>
+<td style="border:0"><img src="/image/logo.png" alt="Logo" align="right"></td>
+</tr></tbody>
+</table>
+<h1>このUSBデバイスを今からフォーマットします</h1>
+
+<b>以下のボタンを押して開始してください</b>
+<form action="##WEBROOT##regist.php" method="POST">
+<input type="submit">
+<input type="hidden" name="id" value="##ID##">
+<input type="hidden" name="mode" value="ACTION">
+<input type="hidden" name="devname" value="##DEVNAME##">
+<input type="hidden" name="flags" value="##FLAGS##"></form>
+</body>
+</html>