File "index_2_t.php"

Full path: /www/ais_management/old/index_2_t.php
File size: 3.1 KiB (3178 bytes)
MIME-type: text/html
Charset: utf-8

Download   Open   Back

<!DOCTYPE html>
<html lang="ja">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-cache">
    <title>AISデータ管理</title>
    <!-- css -->
    <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
    <link href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" rel="stylesheet" crossorigin="anonymous">
    <link href="https://use.fontawesome.com/releases/v5.0.6/css/all.css" rel="stylesheet">
    <!-- page org style -->
    <link href="./style/basic2.css" rel="stylesheet">
  </head>

  <body>

    <!-- Main Contents -->
    <main>
      <div class="container-fluid">
        <!-- page header -->
        <div class="row mb-2">
          <div class="col-12">
            <div class="title p-2 border rounded text-center"><FONT SIZE='6'>AISデータ管理</FONT></div>
          </div>
        </div>

                        <!-- コピー対象要素とコピーボタン -->
                        <input id="copyTarget" type="text" value="コピー対象の文言" readonly>
                        <button onclick="copyToClipboard()">Copy text</button>

                        <script>
                            function copyToClipboard() {
                                // コピー対象をJavaScript上で変数として定義する
                                var copyTarget = document.getElementById("copyTarget");

                                // コピー対象のテキストを選択する
                                copyTarget.select();

                                // 選択しているテキストをクリップボードにコピーする
                                document.execCommand("Copy");

                                // コピーをお知らせする
 //                               alert("コピーできました! : " + copyTarget.value);
                            }
                        </script>

<?php

EXTRACT($_POST);
//print_r($_POST);

$flag_file_path = "/www/ais_management/start_flag.txt";


if($_POST['p_start'])
{
	file_put_contents($flag_file_path, "1" ,LOCK_EX);
}

if($_POST['p_stop'])
{
	file_put_contents($flag_file_path, "0" ,LOCK_EX);
}

$start_flag = file_get_contents($flag_file_path);
$status =($start_flag)? '実行中' : '停止中';


//print "<h4>■バックホウ旋回数カウント実行</h4>";

print "<form name='program' enctype='multipart/form-data' action='' method='post'>";
print "<TABLE BORDER='0'>";
print "<TR><TD>";
print "動作状態:";
print "</TD>";
print "<TD>";
print $status;
print "</TD></TR>";
print "<TR><TD>";
print "<INPUT TYPE='submit' NAME='p_start' VALUE='データ処理開始' style='width:130px;'>";
print "</TD>";
print "<TD>";
print "<INPUT TYPE='submit' NAME='p_stop' VALUE='停止' style='width:130px;'>";
print "</TD>";
print "<TD>";
print "</TD>";
print "</TR>";
print "</form>";
print "</TABLE>";

?>
    </main>
  </body>
</html>

PHP File Manager