<?php
require("./total.inc");

session_start();
require("./ninsyou.inc");
if(0 > ninsyou_check(2)){
   exit;
   }


echo "<!DOCTYP:pserver:cvs@dhcvs.ms-n.com:/usr/home/cvsE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>";
echo "<HTML>";
echo "<HEAD>";
echo "<META name='GENERATOR' content='AmBuilder'>";
echo "<META http-equiv='Content-Type' content='text/html; charset=euc-jp'>";
	echo "<title>zither monitorring save info</title>";

echo "<SCRIPT LANGUAGE='JavaScript'>";
echo "<!--

function WinCls(){
        window.close()
                       }
// window.onload=WinCls();
//-->";
echo "</SCRIPT>";

echo "</head>";
echo "<body alink='#ff0000' bgcolor='#ffffff' link='#0000ff' text='#000000' vlink='#000080'>";

echo "<pre>";

$select = enco($_GET["SELECT"]);


if(0 != strlen($select)){
   $select_get = urldecode($select);
   print("GET SELECT DATA = $select_get \n");
   $select_data = "delete from errlog where " . $select_get;
   }
else{
   echo "NG NOT WHER DATA! \n";
   exit;
   }


// print("DELETE ERRLOG COMMAND = $select_data\n");


print($version_name);
print("\n");
print(date("Y m d g i s A"));
print("\n");



// $auth_user = $_SERVER["PHP_AUTH_USER"];
// $auth_pw = $_SERVER["PHP_AUTH_PW"];

// if(0 != strcmp($auth_user, $user_name)){
//   echo "検索する権限があなたにはありませぬ\n";
//   exit;
//   }



$conn = db_connect();
if(!$conn){
   echo "not connection!<br>";
   exit;
   }


if(0 == strlen($select_data)){
   print("NG NOT select_data");
   exit;
   }
else{
   $result = db_query($conn, "$select_data");
   print("エラーログの削除中です\n");
   if(!$result){
      print("NG bud query $select_data\n");
      exit;
      }
   $num = db_num_rows($result);
   if($num < 0){
      print("NG エラーログの削除が出来ないです\n");
      exit;
      }
   }


print("OK DBの変更は完了しました\n");
printf("ファイルへ反映しています\n");

db_free_result($result);
db_Close($conn);

?>

</pre>
</body>
</html>

