Browse Source

second commit

Benson 3 years ago
parent
commit
273dc07385
100 changed files with 10646 additions and 0 deletions
  1. 3 0
      EdamameProjectTest/.idea/.gitignore
  2. 21 0
      EdamameProjectTest/.idea/Edamame Project.iml
  3. 4 0
      EdamameProjectTest/.idea/encodings.xml
  4. 6 0
      EdamameProjectTest/.idea/inspectionProfiles/profiles_settings.xml
  5. 10 0
      EdamameProjectTest/.idea/misc.xml
  6. 8 0
      EdamameProjectTest/.idea/modules.xml
  7. BIN
      EdamameProjectTest/__pycache__/manage.cpython-35.pyc
  8. BIN
      EdamameProjectTest/__pycache__/manage.cpython-38.pyc
  9. 63 0
      EdamameProjectTest/app/__init__.py
  10. BIN
      EdamameProjectTest/app/__pycache__/__init__.cpython-35.pyc
  11. BIN
      EdamameProjectTest/app/__pycache__/__init__.cpython-38.pyc
  12. BIN
      EdamameProjectTest/app/__pycache__/models.cpython-35.pyc
  13. BIN
      EdamameProjectTest/app/__pycache__/models.cpython-38.pyc
  14. 5 0
      EdamameProjectTest/app/main/__init__.py
  15. BIN
      EdamameProjectTest/app/main/__pycache__/__init__.cpython-35.pyc
  16. BIN
      EdamameProjectTest/app/main/__pycache__/__init__.cpython-38.pyc
  17. BIN
      EdamameProjectTest/app/main/__pycache__/views.cpython-35.pyc
  18. BIN
      EdamameProjectTest/app/main/__pycache__/views.cpython-38.pyc
  19. 432 0
      EdamameProjectTest/app/main/test.py
  20. 359 0
      EdamameProjectTest/app/main/test2.py
  21. 1588 0
      EdamameProjectTest/app/main/views.py
  22. 171 0
      EdamameProjectTest/app/models.py
  23. 128 0
      EdamameProjectTest/app/static/css/55.css
  24. 86 0
      EdamameProjectTest/app/static/css/b.css
  25. 1 0
      EdamameProjectTest/app/static/css/bootstrap-slider.min.css
  26. 5 0
      EdamameProjectTest/app/static/css/bootstrap.min.css
  27. 4 0
      EdamameProjectTest/app/static/css/font-awesome.min.css
  28. 208 0
      EdamameProjectTest/app/static/css/generalstyle.css
  29. 67 0
      EdamameProjectTest/app/static/css/indexstyle.css
  30. 73 0
      EdamameProjectTest/app/static/css/loginstyle.css
  31. 112 0
      EdamameProjectTest/app/static/css/registration.css
  32. 116 0
      EdamameProjectTest/app/static/css/sign_in.css
  33. BIN
      EdamameProjectTest/app/static/img/Mowdo.jpg
  34. BIN
      EdamameProjectTest/app/static/img/PV.jpg
  35. BIN
      EdamameProjectTest/app/static/img/blue.png
  36. BIN
      EdamameProjectTest/app/static/img/camera.png
  37. BIN
      EdamameProjectTest/app/static/img/color1.jpg
  38. BIN
      EdamameProjectTest/app/static/img/down.png
  39. BIN
      EdamameProjectTest/app/static/img/left.png
  40. BIN
      EdamameProjectTest/app/static/img/loading.gif
  41. BIN
      EdamameProjectTest/app/static/img/loginbackground1.png
  42. BIN
      EdamameProjectTest/app/static/img/logo_new.png
  43. BIN
      EdamameProjectTest/app/static/img/ndvi.jpg
  44. BIN
      EdamameProjectTest/app/static/img/red.png
  45. BIN
      EdamameProjectTest/app/static/img/reset.png
  46. BIN
      EdamameProjectTest/app/static/img/right.png
  47. BIN
      EdamameProjectTest/app/static/img/stop.png
  48. BIN
      EdamameProjectTest/app/static/img/up.png
  49. BIN
      EdamameProjectTest/app/static/img/user.png
  50. 2 0
      EdamameProjectTest/app/static/js/bootstrap-slider.min.js
  51. 7 0
      EdamameProjectTest/app/static/js/bootstrap.min.js
  52. 1 0
      EdamameProjectTest/app/static/js/gauge.min.js
  53. 2203 0
      EdamameProjectTest/app/static/js/jquery-ui-timepicker-addon.js
  54. 22 0
      EdamameProjectTest/app/static/js/jquery-ui-timepicker-zh-TW.js
  55. 12 0
      EdamameProjectTest/app/static/js/jquery-ui.min.js
  56. 5 0
      EdamameProjectTest/app/static/js/jquery.min.js
  57. 43 0
      EdamameProjectTest/app/static/js/registration.js
  58. 3 0
      EdamameProjectTest/app/static/js/signin.js
  59. 661 0
      EdamameProjectTest/app/templates/ahistory_ndvi1.html
  60. 717 0
      EdamameProjectTest/app/templates/aim.html
  61. 352 0
      EdamameProjectTest/app/templates/aindex.html
  62. 216 0
      EdamameProjectTest/app/templates/allindex.html
  63. 645 0
      EdamameProjectTest/app/templates/chistory_ndvi1.html
  64. 708 0
      EdamameProjectTest/app/templates/cim.html
  65. 392 0
      EdamameProjectTest/app/templates/cindex.html
  66. 61 0
      EdamameProjectTest/app/templates/registration.html
  67. 66 0
      EdamameProjectTest/app/templates/sign_in.html
  68. 43 0
      EdamameProjectTest/manage.py
  69. 1 0
      EdamameProjectTest/venv/Lib/site-packages/Flask-1.1.2.dist-info/INSTALLER
  70. 28 0
      EdamameProjectTest/venv/Lib/site-packages/Flask-1.1.2.dist-info/LICENSE.rst
  71. 137 0
      EdamameProjectTest/venv/Lib/site-packages/Flask-1.1.2.dist-info/METADATA
  72. 48 0
      EdamameProjectTest/venv/Lib/site-packages/Flask-1.1.2.dist-info/RECORD
  73. 6 0
      EdamameProjectTest/venv/Lib/site-packages/Flask-1.1.2.dist-info/WHEEL
  74. 3 0
      EdamameProjectTest/venv/Lib/site-packages/Flask-1.1.2.dist-info/entry_points.txt
  75. 1 0
      EdamameProjectTest/venv/Lib/site-packages/Flask-1.1.2.dist-info/top_level.txt
  76. 1 0
      EdamameProjectTest/venv/Lib/site-packages/Jinja2-2.11.2.dist-info/INSTALLER
  77. 28 0
      EdamameProjectTest/venv/Lib/site-packages/Jinja2-2.11.2.dist-info/LICENSE.rst
  78. 106 0
      EdamameProjectTest/venv/Lib/site-packages/Jinja2-2.11.2.dist-info/METADATA
  79. 59 0
      EdamameProjectTest/venv/Lib/site-packages/Jinja2-2.11.2.dist-info/RECORD
  80. 6 0
      EdamameProjectTest/venv/Lib/site-packages/Jinja2-2.11.2.dist-info/WHEEL
  81. 3 0
      EdamameProjectTest/venv/Lib/site-packages/Jinja2-2.11.2.dist-info/entry_points.txt
  82. 1 0
      EdamameProjectTest/venv/Lib/site-packages/Jinja2-2.11.2.dist-info/top_level.txt
  83. 1 0
      EdamameProjectTest/venv/Lib/site-packages/MarkupSafe-1.1.1.dist-info/INSTALLER
  84. 28 0
      EdamameProjectTest/venv/Lib/site-packages/MarkupSafe-1.1.1.dist-info/LICENSE.rst
  85. 103 0
      EdamameProjectTest/venv/Lib/site-packages/MarkupSafe-1.1.1.dist-info/METADATA
  86. 15 0
      EdamameProjectTest/venv/Lib/site-packages/MarkupSafe-1.1.1.dist-info/RECORD
  87. 5 0
      EdamameProjectTest/venv/Lib/site-packages/MarkupSafe-1.1.1.dist-info/WHEEL
  88. 1 0
      EdamameProjectTest/venv/Lib/site-packages/MarkupSafe-1.1.1.dist-info/top_level.txt
  89. 1 0
      EdamameProjectTest/venv/Lib/site-packages/Werkzeug-1.0.1.dist-info/INSTALLER
  90. 28 0
      EdamameProjectTest/venv/Lib/site-packages/Werkzeug-1.0.1.dist-info/LICENSE.rst
  91. 128 0
      EdamameProjectTest/venv/Lib/site-packages/Werkzeug-1.0.1.dist-info/METADATA
  92. 101 0
      EdamameProjectTest/venv/Lib/site-packages/Werkzeug-1.0.1.dist-info/RECORD
  93. 6 0
      EdamameProjectTest/venv/Lib/site-packages/Werkzeug-1.0.1.dist-info/WHEEL
  94. 1 0
      EdamameProjectTest/venv/Lib/site-packages/Werkzeug-1.0.1.dist-info/top_level.txt
  95. BIN
      EdamameProjectTest/venv/Lib/site-packages/__pycache__/easy_install.cpython-35.pyc
  96. 1 0
      EdamameProjectTest/venv/Lib/site-packages/click-7.1.2.dist-info/INSTALLER
  97. 28 0
      EdamameProjectTest/venv/Lib/site-packages/click-7.1.2.dist-info/LICENSE.rst
  98. 102 0
      EdamameProjectTest/venv/Lib/site-packages/click-7.1.2.dist-info/METADATA
  99. 40 0
      EdamameProjectTest/venv/Lib/site-packages/click-7.1.2.dist-info/RECORD
  100. 0 0
      EdamameProjectTest/venv/Lib/site-packages/click-7.1.2.dist-info/WHEEL

+ 3 - 0
EdamameProjectTest/.idea/.gitignore

@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml

+ 21 - 0
EdamameProjectTest/.idea/Edamame Project.iml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="PYTHON_MODULE" version="4">
+  <component name="Flask">
+    <option name="enabled" value="true" />
+  </component>
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$">
+      <excludeFolder url="file://$MODULE_DIR$/venv" />
+    </content>
+    <orderEntry type="jdk" jdkName="Python 3.5" jdkType="Python SDK" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+  <component name="TemplatesService">
+    <option name="TEMPLATE_CONFIGURATION" value="Jinja2" />
+    <option name="TEMPLATE_FOLDERS">
+      <list>
+        <option value="$MODULE_DIR$/../Edamame Project\templates" />
+      </list>
+    </option>
+  </component>
+</module>

+ 4 - 0
EdamameProjectTest/.idea/encodings.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Encoding" addBOMForNewFiles="with NO BOM" />
+</project>

+ 6 - 0
EdamameProjectTest/.idea/inspectionProfiles/profiles_settings.xml

@@ -0,0 +1,6 @@
+<component name="InspectionProjectProfileManager">
+  <settings>
+    <option name="USE_PROJECT_PROFILE" value="false" />
+    <version value="1.0" />
+  </settings>
+</component>

+ 10 - 0
EdamameProjectTest/.idea/misc.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="JavaScriptSettings">
+    <option name="languageLevel" value="ES6" />
+  </component>
+  <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.5" project-jdk-type="Python SDK" />
+  <component name="PyCharmProfessionalAdvertiser">
+    <option name="shown" value="true" />
+  </component>
+</project>

+ 8 - 0
EdamameProjectTest/.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/Edamame Project.iml" filepath="$PROJECT_DIR$/.idea/Edamame Project.iml" />
+    </modules>
+  </component>
+</project>

BIN
EdamameProjectTest/__pycache__/manage.cpython-35.pyc


BIN
EdamameProjectTest/__pycache__/manage.cpython-38.pyc


+ 63 - 0
EdamameProjectTest/app/__init__.py

@@ -0,0 +1,63 @@
+#對整個應用做初始化操作
+#主要工作:
+# 1.構建Flask的應用以及各種配置
+#2.構建SQLAlchemy的應用
+
+from flask import Flask
+from flask_sqlalchemy import SQLAlchemy
+import pymysql
+# import eventlet
+from flask_mqtt import Mqtt
+
+#綠化(綠色線程)所有系統模組,實現IO多路複用
+# eventlet.monkey_patch()
+
+pymysql.install_as_MySQLdb()
+
+
+
+
+def create_app():
+    global db, mqtt
+    app = Flask(__name__)
+    #配置啟動模式為調適模式
+    # app.config['DEBUG'] = True
+    #配置數據庫的連接字符串
+    app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://edamame:skyeye@52.69.200.169:3306/Edamame'
+    #配置數據庫內容再更新時自動提交
+    app.config['SQLALCHEMY_COMMIT_ON_TEARDOWN'] = True
+    #配置session所需要的秘鑰
+    app.config['SECRET_KEY'] = 'you guess'
+    # template 有修改後,會自動去更新
+    app.config['TEMPLATES_AUTO_RELOAD'] = True
+    # 如果设置成True(默认情况),Flask - SQLAlchemy将会追踪对象的修改并且发送信号。这需要额外的内存, 如果不必要的可以禁用它
+    app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = True
+    #資料库连接池的大小。默认是数据库引擎的默认值 (通常是5)
+    app.config['SQLALCHEMY_POOL_SIZE'] = 100
+    #指定資料库连接池的超时时间。默认是 10
+    app.config['SQLALCHEMY_POOL_TIMEOUT'] = 60 * 60
+    #自动回收连接的秒数。这对 MySQL 是必须的,默认 情况下 MySQL 会自动移除闲置 8 小时或者以上的连接。 需要注意地是如果使用 MySQL 的话, Flask-SQLAlchemy 会自动地设置这个值为 2 小时
+    app.config['SQLALCHEMY_MAX_OVERFLOW'] = 15
+
+    app.config['SECRET'] = 'my secret key'
+    #MQTT相關設置
+    app.config['MQTT_BROKER_URL'] = '60.250.156.234'
+    app.config['MQTT_BROKER_PORT'] = 1883
+    app.config['MQTT_USERNAME'] = 'aisky-client'
+    app.config['MQTT_PASSWORD'] = 'aiskyc'
+    #將發送ping到代理的時間間隔設置60秒
+    app.config['MQTT_KEEPALIVE'] = 60
+    #出於測試目的將TLS設置為禁用
+    app.config['MQTT_TLS_ENABLED'] = False
+
+    #數據庫的初始化
+    db = SQLAlchemy(app)
+    db.init_app(app)
+    mqtt = Mqtt(app)
+
+
+    #將main藍圖程序與app關聯到一起
+    from .main import main as main_blueprint
+    app.register_blueprint(main_blueprint)
+
+    return app, db, mqtt

BIN
EdamameProjectTest/app/__pycache__/__init__.cpython-35.pyc


BIN
EdamameProjectTest/app/__pycache__/__init__.cpython-38.pyc


BIN
EdamameProjectTest/app/__pycache__/models.cpython-35.pyc


BIN
EdamameProjectTest/app/__pycache__/models.cpython-38.pyc


+ 5 - 0
EdamameProjectTest/app/main/__init__.py

@@ -0,0 +1,5 @@
+#main 目錄: 包含主要的業務邏輯的路由和視圖
+# __init__.py : 對主業務邏輯程序的初始化操作
+from flask import Blueprint
+main = Blueprint('main',__name__)
+from . import views

BIN
EdamameProjectTest/app/main/__pycache__/__init__.cpython-35.pyc


BIN
EdamameProjectTest/app/main/__pycache__/__init__.cpython-38.pyc


BIN
EdamameProjectTest/app/main/__pycache__/views.cpython-35.pyc


BIN
EdamameProjectTest/app/main/__pycache__/views.cpython-38.pyc


+ 432 - 0
EdamameProjectTest/app/main/test.py

@@ -0,0 +1,432 @@
+# 主業務邏輯中的視圖和路由的定義
+import os
+import datetime
+from flask import render_template, request, session, Response
+# 導入藍圖程序,用於構建路由
+from werkzeug.utils import redirect
+from . import main
+from manage import mqtt
+# 導入db,用於操作數據庫
+from manage import db
+# 導入實體類,用於操作數據庫
+from ..models import *
+import json
+from datetime import datetime as dt
+from sqlalchemy import text
+import socket
+import pickle
+import cv2
+import numpy as np
+import math
+import threading
+import time
+from flask_mqtt import Mqtt
+
+
+c_sock = 0
+s_sock = 0
+
+
+
+# 主頁的訪問路徑
+@main.route('/')
+def main_index():
+    # 獲取登入信息
+    if 'id' in session and 'uname' in session:
+        return render_template('allindex.html')
+    else:
+        return render_template('sign_in.html')
+
+
+# 登入頁面的訪問路徑
+@main.route('/login', methods=['GET', 'POST'])
+def login_views():
+    if request.method == 'GET':
+        if 'id' in session and 'uname' in session:
+            return redirect('/')
+        else:
+            return render_template('sign_in.html')
+    else:
+        # 接收前端傳過來的資料
+        username = request.form['username']
+        password = request.form['password']
+        # 使用接收的用戶和密碼到資料庫中查詢
+        user = User.query.filter_by(account=username, password=password).first()
+        # 如果用戶存在,將信息保存置session並重定向回首頁,否則重定向回登入頁
+        if user:
+            resp = redirect('/')
+            # 判斷是否有記住密碼
+            if 'rem' in request.form:
+                sn = str(user.sn)
+                max_age = 60 * 60 * 24 * 365
+                resp.set_cookie("username", username, max_age=max_age)
+                resp.set_cookie("sn", sn, max_age=max_age)
+
+            session['uname'] = user.account
+            session['id'] = user.sn
+            return resp
+        else:
+            errMsg = "Wrong login or password"
+            return render_template('sign_in.html', errMsg=errMsg)
+
+
+# 註冊頁面的訪問路徑
+@main.route('/register', methods=['POST', "GET"])
+def register_views():
+    if request.method == 'GET':
+        return render_template('registration.html')
+    else:
+        # 獲取文本框的值並賦值給user實體對象
+        user = User()
+        user.account = request.form['username']
+        user.password = request.form['password']
+        # 將數據保存進資料庫  - 註冊
+        db.session.add(user)
+        # 手動提交,目的是為了獲取提交後的user的id
+        db.session.commit()
+        # 當user成功插入進資料庫之後,程序會自動將所有信息取出來在賦值給user
+        # 完成登入的操作
+        user = User.query.filter_by(account=user.account).first()
+        session['id'] = user.sn
+        session['uname'] = user.account
+        return redirect('/')
+
+
+# 毛豆田的主頁面
+@main.route('/aindex', methods=['POST', 'GET'])
+def aindex_views():
+    return render_template('aindex.html')
+
+
+# 毛豆車的主頁面
+@main.route('/cindex', methods=['POST', 'GET'])
+def cindex_views():
+    return render_template('cindex.html')
+
+
+# 毛豆田拍攝設定的主頁面
+@main.route('/ashoot_setting/<tid>', methods=['POST', 'GET'])
+def ashoot_setting_views(tid):
+    if request.method == 'GET':
+        global s_sock, c_sock
+        #當跳轉小兵頁面時,判定scoket是否還在連接中
+        if c_sock != 0:
+            c_sock.shutdown(2)
+            c_sock.close()
+            c_sock = 0
+            print("c_sock is closing")
+        if s_sock != 0:
+            s_sock.shutdown(2)
+            s_sock.close()
+            s_sock = 0
+            print("s_sock is closing")
+
+        dict = request.args.to_dict()
+        if dict:
+            try:
+                nr = "KDAIS" + dict['nr']
+                mode = int(dict['mode'])
+                jvtotime = JvtOTime.query.filter_by(nr=nr, MODE=mode).order_by(text('datetime desc')).first()
+                tilt_angle = jvtotime.tilt_angle
+                pan_angle = jvtotime.pan_angle
+                zoom = str(jvtotime.zoom_now)
+                time1 = jvtotime.time1
+                time2 = jvtotime.time2
+                time3 = jvtotime.time3
+                time4 = jvtotime.time4
+                time5 = jvtotime.time5
+                time6 = jvtotime.time6
+                time7 = jvtotime.time7
+                time8 = jvtotime.time8
+                dict = {"tilt_angle": tilt_angle, "pan_angle": pan_angle, "zoom": zoom, "time1": time1,
+                        "time2": time2, "time3": time3, "time4": time4, "time5": time5, "time6": time6,
+                        "time7": time7, "time8": time8}
+                return json.dumps(dict)
+            except Exception:
+                dict = {"tilt_angle": "0", "pan_angle": "0", "zoom": "0", "time1": "00000000",
+                        "time2": "00000000", "time3": "00000000", "time4": "00000000", "time5": "00000000",
+                        "time6": "00000000",
+                        "time7": "00000000", "time8": "00000000"}
+                return json.dumps(dict)
+
+        return render_template('aim.html', params=locals())
+    else:
+        dict = request.form.to_dict()
+        jvtotime = JvtOTime()
+        if dict['nr'] == '1':
+            jvtotime.MAC = 'b8:27:eb:a1:b0:70'
+        elif dict['nr'] == '2':
+            jvtotime.MAC = 'b8:27:eb:e7:51:44'
+        elif dict['nr'] == '3':
+            jvtotime.MAC = 'b8:27:eb:ce:a5:35'
+        elif dict['nr'] == '4':
+            jvtotime.MAC = 'b8:27:eb:06:9a:f1'
+        elif dict['nr'] == '5':
+            jvtotime.MAC = 'b8:27:eb:0c:f0:21'
+        elif dict['nr'] == '6':
+            jvtotime.MAC = 'b8:27:eb:df:4b:0f'
+        elif dict['nr'] == '7':
+            jvtotime.MAC = 'b8:27:eb:af:df:b6'
+        elif dict['nr'] == '8':
+            jvtotime.MAC = 'b8:27:eb:d2:d0:8f'
+        elif dict['nr'] == '9':
+            jvtotime.MAC = 'b8:27:eb:57:3c:da'
+        elif dict['nr'] == '10':
+            jvtotime.MAC = 'b8:27:eb:bd:29:b1'
+        elif dict['nr'] == '11':
+            jvtotime.MAC = 'b8:27:eb:7c:f6:06'
+        elif dict['nr'] == '12':
+            jvtotime.MAC = 'b8:27:eb:74:bd:ac'
+        elif dict['nr'] == '13':
+            jvtotime.MAC = 'b8:27:eb:e7:21:e5'
+        elif dict['nr'] == '14':
+            jvtotime.MAC = 'b8:27:eb:6f:5a:6b'
+        elif dict['nr'] == '15':
+            jvtotime.MAC = 'b8:27:eb:e3:f1:f4'
+        elif dict['nr'] == '16':
+            jvtotime.MAC = 'b8:27:eb:60:1c:2e'
+        elif dict['nr'] == '17':
+            jvtotime.MAC = 'b8:27:eb:9d:68:05'
+        elif dict['nr'] == '18':
+            jvtotime.MAC = 'b8:27:eb:4d:e4:34'
+
+        jvtotime.nr = 'KDAIS' + dict['nr']
+        jvtotime.MODE = int(dict['mode'])
+        jvtotime.tilt_angle = dict['tilt_angle']
+        jvtotime.pan_angle = dict['pan_angle']
+        jvtotime.zoom_before = 0
+        jvtotime.zoom_now = int(dict['zoom'])
+        jvtotime.time1 = dict['time1']
+        jvtotime.time2 = dict['time2']
+        jvtotime.time3 = dict['time3']
+        jvtotime.time4 = dict['time4']
+        jvtotime.time5 = dict['time5']
+        jvtotime.time6 = dict['time6']
+        jvtotime.time7 = dict['time7']
+        jvtotime.time8 = dict['time8']
+        jvtotime.datetime = dt.now()
+        db.session.add(jvtotime)
+        db.session.commit()
+
+        return {"status": "OK"}
+
+
+# 毛豆田歷史資料的主頁面
+@main.route('/aimg_history/<tid>', methods=['POST', 'GET'])
+def aimg_history_views(tid):
+    if request.method == 'GET':
+        return render_template('ahistory_ndvi1.html', params=locals())
+    else:
+        pass
+
+
+# 毛豆車拍攝設定的主頁面
+@main.route('/cshoot_setting/<tid>', methods=['POST', 'GET'])
+def cshoot_setting_views(tid):
+    if request.method == 'GET':
+        return render_template('cim.html', params=locals())
+    else:
+        pass
+
+
+# 毛豆車歷史資料的主頁面
+@main.route('/cimg_history/<tid>', methods=['POST', 'GET'])
+def cimg_history_views(tid):
+    if request.method == 'GET':
+        return render_template('chistory_ndvi1.html', params=locals())
+    else:
+        pass
+
+
+# 退出的訪問路徑
+@main.route('/logout')
+def logout_views():
+    if 'id' in session and 'uname' in session:
+        del session['id']
+        del session['uname']
+    return redirect('/')
+
+
+
+
+@main.route("/udp_client", methods=['POST', 'GET'])
+def udp_views():
+    time.sleep(0.5)
+    if request.method == 'GET':
+        def close():
+            global c_sock
+            time.sleep(300)
+            c_sock.shutdown(2)
+            c_sock.close()
+            c_sock = 0
+            print("c_sock is closing")
+
+        max_length = 65000
+        # max_length = 95000
+        # lab1的IP
+        # host = "192.168.50.65"
+        # lab2的IP
+        host = "192.168.51.161"
+        port = 8000
+        global c_sock
+        c_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+
+
+        t = threading.Thread(target=close)
+        t.daemon = True
+        t.start()
+
+        # 地下室小兵
+        cap = cv2.VideoCapture('rtsp://admin:abcd1234@192.168.51.48/av2_0')
+        # 主機攝像頭
+        # cap = cv2.VideoCapture(0)
+        # 外面小兵
+        # cap = cv2.VideoCapture('rtsp://admin:admin@192.168.50.182/av2_0')
+        ret, frame = cap.read()
+
+        while ret:
+            # compress frame
+            frame = cv2.resize(frame, (550, 400), interpolation=cv2.INTER_AREA)
+            retval, buffer = cv2.imencode(".jpg", frame)
+
+
+            if retval:
+                # convert to byte array
+                buffer = buffer.tobytes()
+                # get size of the frame
+                buffer_size = len(buffer)
+
+                num_of_packs = 1
+                if buffer_size > max_length:
+                    num_of_packs = math.ceil(buffer_size / max_length)
+
+                frame_info = {"packs": num_of_packs}
+
+                # send the number of packs to be expected
+                # print("Number of packs:", num_of_packs)
+                c_sock.sendto(pickle.dumps(frame_info), (host, port))
+
+                left = 0
+                right = max_length
+
+                for i in range(num_of_packs):
+                    # print("left:", left)
+                    # print("right:", right)
+
+                    # truncate data to send
+                    data = buffer[left:right]
+                    left = right
+                    right += max_length
+
+                    # send the frames accordingly
+                    c_sock.sendto(data, (host, port))
+
+            ret, frame = cap.read()
+
+        print("done")
+    else:
+        global c_sock
+        c_sock.shutdown(2)
+        c_sock.close()
+        c_sock = 0
+        print("c_sock is closing")
+
+
+
+
+# 影像串流的路徑
+@main.route("/video_feed", methods=['POST', 'GET'])
+def video_feed_views():
+    if request.method == 'GET':
+
+        def close():
+            global s_sock
+            time.sleep(300)
+            s_sock.shutdown(2)
+            s_sock.close()
+            s_sock = 0
+            print("s_sock is closing")
+
+        # lab1的IP
+        # host = "192.168.50.65"
+        # lab2的IP
+        host = "192.168.51.161"
+        port = 8000
+        max_length = 65540
+        # max_length = 95540
+        print(host,port)
+
+        global s_sock
+        s_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+        s_sock.bind((host, port))
+
+        t = threading.Thread(target=close)
+        t.daemon = True
+        t.start()
+
+        frame_info = None
+        buffer = None
+        frame = None
+
+
+        print("-> waiting for connection")
+
+
+        # 影像生成器函數,將影像以jpg格式傳給前端
+        def generate():
+            while True:
+                global s_sock, frame_info, buffer, frame
+                data, address = s_sock.recvfrom(max_length)
+
+                if len(data) < 100:
+                    frame_info = pickle.loads(data)
+
+
+                    if frame_info:
+                        nums_of_packs = frame_info["packs"]
+
+
+                        for i in range(nums_of_packs):
+                            data, address = s_sock.recvfrom(max_length)
+
+                            if i == 0:
+                                buffer = data
+                            else:
+                                buffer += data
+
+                        frame = np.frombuffer(buffer, dtype=np.uint8)
+                        frame = frame.reshape(frame.shape[0], 1)
+
+                        frame = cv2.imdecode(frame, cv2.IMREAD_COLOR)
+                        frame = cv2.resize(frame, (1280, 720), interpolation=cv2.INTER_AREA)
+
+                        # encode the frame in JPEG format
+                        (flag, encodedImage) = cv2.imencode(".jpg", frame)
+                        # ensure the frame was successfully encoded
+                        if not flag:
+                            continue
+                # yield the output frame in the byte format
+                yield (b'--frame\r\n' b'Content-Type: image/jpeg\r\n\r\n' +
+                    bytearray(encodedImage) + b'\r\n')
+
+        # return the response generated along with the specific media
+        # type (mime type)
+        return Response(generate(), mimetype="multipart/x-mixed-replace; boundary=frame")
+    else:
+        global s_sock
+        s_sock.shutdown(2)
+        s_sock.close()
+        s_sock = 0
+        print("s_sock is closing")
+
+
+
+#mqtt發布
+@main.route('/mqtt', methods=['GET','POST'])
+def mqtt_views():
+    import json
+    dict = request.args.to_dict()
+    json = json.dumps(dict)
+    print(json)
+    mqtt.publish('AISKY/AppleFarm/MK-G/b8:27:eb:f8:24:92', json)
+    return "Publish done"

+ 359 - 0
EdamameProjectTest/app/main/test2.py

@@ -0,0 +1,359 @@
+#主業務邏輯中的視圖和路由的定義
+import os
+import datetime
+from flask import render_template, request, session, Response
+#導入藍圖程序,用於構建路由
+from werkzeug.utils import redirect
+from . import main
+from manage import  mqtt
+#導入db,用於操作數據庫
+from manage import db
+#導入實體類,用於操作數據庫
+from ..models import *
+import json
+from datetime import datetime as dt
+from sqlalchemy import text
+import socket
+import pickle
+import cv2
+import numpy as np
+import math
+import threading
+import time
+
+
+#主頁的訪問路徑
+@main.route('/')
+def main_index():
+    #獲取登入信息
+    if 'id' in session and 'uname' in session:
+        return render_template('allindex.html')
+    else:
+        return render_template('sign_in.html')
+
+#登入頁面的訪問路徑
+@main.route('/login', methods=['GET','POST'])
+def login_views():
+    if request.method == 'GET':
+        if 'id' in session and 'uname' in session:
+            return redirect('/')
+        else:
+            return render_template('sign_in.html')
+    else:
+        #接收前端傳過來的資料
+        username = request.form['username']
+        password = request.form['password']
+        #使用接收的用戶和密碼到資料庫中查詢
+        user = User.query.filter_by(account=username, password=password).first()
+        #如果用戶存在,將信息保存置session並重定向回首頁,否則重定向回登入頁
+        if user:
+            resp = redirect('/')
+            #判斷是否有記住密碼
+            if 'rem' in request.form:
+                sn = str(user.sn)
+                max_age = 60*60*24*365
+                resp.set_cookie("username", username, max_age=max_age)
+                resp.set_cookie("sn", sn, max_age=max_age)
+
+            session['uname'] = user.account
+            session['id'] = user.sn
+            return resp
+        else:
+            errMsg = "Wrong login or password"
+            return render_template('sign_in.html',errMsg=errMsg)
+
+#註冊頁面的訪問路徑
+@main.route('/register',methods=['POST',"GET"])
+def register_views():
+    if request.method == 'GET':
+        return render_template('registration.html')
+    else:
+        #獲取文本框的值並賦值給user實體對象
+        user = User()
+        user.account = request.form['username']
+        user.password = request.form['password']
+        #將數據保存進資料庫  - 註冊
+        db.session.add(user)
+        #手動提交,目的是為了獲取提交後的user的id
+        db.session.commit()
+        #當user成功插入進資料庫之後,程序會自動將所有信息取出來在賦值給user
+        #完成登入的操作
+        user = User.query.filter_by(account=user.account).first()
+        session['id'] = user.sn
+        session['uname'] = user.account
+        return redirect('/')
+
+#毛豆田的主頁面
+@main.route('/aindex', methods=['POST', 'GET'])
+def aindex_views():
+    return render_template('aindex.html')
+
+#毛豆車的主頁面
+@main.route('/cindex', methods=['POST', 'GET'])
+def cindex_views():
+    return render_template('cindex.html')
+
+#毛豆田拍攝設定的主頁面
+@main.route('/ashoot_setting/<tid>', methods=['POST', 'GET'])
+def ashoot_setting_views(tid):
+    if request.method == 'GET':
+        dict = request.args.to_dict()
+        if dict:
+            try:
+                nr = "KDAIS" + dict['nr']
+                mode = int(dict['mode'])
+                jvtotime = JvtOTime.query.filter_by(nr=nr, MODE=mode).order_by(text('datetime desc')).first()
+                tilt_angle = jvtotime.tilt_angle
+                pan_angle = jvtotime.pan_angle
+                zoom = str(jvtotime.zoom_now)
+                time1 = jvtotime.time1
+                time2 = jvtotime.time2
+                time3 = jvtotime.time3
+                time4 = jvtotime.time4
+                time5 = jvtotime.time5
+                time6 = jvtotime.time6
+                time7 = jvtotime.time7
+                time8 = jvtotime.time8
+                dict = {"tilt_angle":tilt_angle, "pan_angle":pan_angle, "zoom":zoom, "time1":time1,
+                    "time2":time2, "time3":time3, "time4":time4, "time5":time5, "time6":time6,
+                    "time7":time7, "time8":time8}
+                return json.dumps(dict)
+            except Exception:
+                dict = {"tilt_angle":"0", "pan_angle":"0", "zoom":"0", "time1":"00000000",
+                    "time2":"00000000", "time3":"00000000", "time4":"00000000", "time5":"00000000", "time6":"00000000",
+                    "time7":"00000000", "time8":"00000000"}
+                return json.dumps(dict)
+
+        return render_template('aim.html', params=locals())
+    else:
+        dict = request.form.to_dict()
+        jvtotime = JvtOTime()
+        if dict['nr'] == '1':
+            jvtotime.MAC = 'b8:27:eb:a1:b0:70'
+        elif dict['nr'] == '2':
+            jvtotime.MAC = 'b8:27:eb:e7:51:44'
+        elif dict['nr'] == '3':
+            jvtotime.MAC = 'b8:27:eb:ce:a5:35'
+        elif dict['nr'] == '4':
+            jvtotime.MAC = 'b8:27:eb:06:9a:f1'
+        elif dict['nr'] == '5':
+            jvtotime.MAC = 'b8:27:eb:0c:f0:21'
+        elif dict['nr'] == '6':
+            jvtotime.MAC = 'b8:27:eb:df:4b:0f'
+        elif dict['nr'] == '7':
+            jvtotime.MAC = 'b8:27:eb:af:df:b6'
+        elif dict['nr'] == '8':
+            jvtotime.MAC = 'b8:27:eb:d2:d0:8f'
+        elif dict['nr'] == '9':
+            jvtotime.MAC = 'b8:27:eb:57:3c:da'
+        elif dict['nr'] == '10':
+            jvtotime.MAC = 'b8:27:eb:bd:29:b1'
+        elif dict['nr'] == '11':
+            jvtotime.MAC = 'b8:27:eb:7c:f6:06'
+        elif dict['nr'] == '12':
+            jvtotime.MAC = 'b8:27:eb:74:bd:ac'
+        elif dict['nr'] == '13':
+            jvtotime.MAC = 'b8:27:eb:e7:21:e5'
+        elif dict['nr'] == '14':
+            jvtotime.MAC = 'b8:27:eb:6f:5a:6b'
+        elif dict['nr'] == '15':
+            jvtotime.MAC = 'b8:27:eb:e3:f1:f4'
+        elif dict['nr'] == '16':
+            jvtotime.MAC = 'b8:27:eb:60:1c:2e'
+        elif dict['nr'] == '17':
+            jvtotime.MAC = 'b8:27:eb:9d:68:05'
+        elif dict['nr'] == '18':
+            jvtotime.MAC = 'b8:27:eb:4d:e4:34'
+
+        jvtotime.nr = 'KDAIS' + dict['nr']
+        jvtotime.MODE = int(dict['mode'])
+        jvtotime.tilt_angle = dict['tilt_angle']
+        jvtotime.pan_angle = dict['pan_angle']
+        jvtotime.zoom_before = 0
+        jvtotime.zoom_now = int(dict['zoom'])
+        jvtotime.time1 = dict['time1']
+        jvtotime.time2 = dict['time2']
+        jvtotime.time3 = dict['time3']
+        jvtotime.time4 = dict['time4']
+        jvtotime.time5 = dict['time5']
+        jvtotime.time6 = dict['time6']
+        jvtotime.time7 = dict['time7']
+        jvtotime.time8 = dict['time8']
+        jvtotime.datetime = dt.now()
+        db.session.add(jvtotime)
+        db.session.commit()
+
+        return  {"status":"OK"}
+
+#毛豆田歷史資料的主頁面
+@main.route('/aimg_history/<tid>', methods=['POST', 'GET'])
+def aimg_history_views(tid):
+    if request.method == 'GET':
+        return render_template('ahistory_ndvi1.html', params=locals())
+    else:
+        pass
+
+#毛豆車拍攝設定的主頁面
+@main.route('/cshoot_setting/<tid>', methods=['POST', 'GET'])
+def cshoot_setting_views(tid):
+    if request.method == 'GET':
+        return render_template('cim.html', params=locals())
+    else:
+        pass
+
+#毛豆車歷史資料的主頁面
+@main.route('/cimg_history/<tid>', methods=['POST', 'GET'])
+def cimg_history_views(tid):
+    if request.method == 'GET':
+        return render_template('chistory_ndvi1.html', params=locals())
+    else:
+        pass
+
+
+
+
+#退出的訪問路徑
+@main.route('/logout')
+def logout_views():
+    if 'id' in session and 'uname' in session:
+        del session['id']
+        del session['uname']
+    return redirect('/')
+
+
+
+lock = threading.Lock()
+
+@main.route("/udp_client")
+def udp_views():
+    time.sleep(1)
+
+    max_length = 65000
+    # max_length = 95000
+    #lab1的IP
+    host = "192.168.50.65"
+    # lab2的IP
+    # host = "192.168.51.161"
+    port = 8000
+
+    sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+
+    #地下室小兵
+    # cap = cv2.VideoCapture('rtsp://admin:abcd1234@192.168.51.48/av2_0')
+    #主機攝像頭
+    # cap = cv2.VideoCapture(0)
+    #外面小兵
+    cap = cv2.VideoCapture('rtsp://admin:admin@192.168.50.182/av2_0')
+    ret, frame = cap.read()
+
+    while ret:
+	    # compress frame
+        frame = cv2.resize(frame, (500, 400), interpolation=cv2.INTER_AREA)
+        retval, buffer = cv2.imencode(".jpg", frame)
+
+        if retval:
+            # convert to byte array
+            buffer = buffer.tobytes()
+            # get size of the frame
+            buffer_size = len(buffer)
+
+            num_of_packs = 1
+            if buffer_size > max_length:
+                num_of_packs = math.ceil(buffer_size / max_length)
+
+            frame_info = {"packs": num_of_packs}
+
+            # send the number of packs to be expected
+            print("Number of packs:", num_of_packs)
+            sock.sendto(pickle.dumps(frame_info), (host, port))
+
+            left = 0
+            right = max_length
+
+            for i in range(num_of_packs):
+                print("left:", left)
+                print("right:", right)
+
+                # truncate data to send
+                data = buffer[left:right]
+                left = right
+                right += max_length
+
+                # send the frames accordingly
+                sock.sendto(data, (host, port))
+
+        ret, frame = cap.read()
+
+    print("done")
+
+
+lock = threading.Lock()
+
+
+#影像串流的路徑
+@main.route ( "/video_feed", methods=['POST', 'GET'])
+def video_feed_views( ) :
+    # 影像生成器函數,將影像以jpg格式傳給前端
+    def generate():
+        # lab1的IP
+        host = "192.168.50.65"
+        # lab2的IP
+        # host = "192.168.51.161"
+        port = 8000
+        max_length = 65540
+        # max_length = 95540
+
+        sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+        sock.bind((host, port))
+
+        frame_info = None
+        buffer = None
+        frame = None
+        port8000_status = 1
+
+        print("-> waiting for connection")
+
+        while True:
+            data, address = sock.recvfrom(max_length)
+
+            if len(data) < 100:
+                frame_info = pickle.loads(data)
+
+                if frame_info:
+                    nums_of_packs = frame_info["packs"]
+
+                    for i in range(nums_of_packs):
+                        data, address = sock.recvfrom(max_length)
+
+                        if i == 0:
+                            buffer = data
+                        else:
+                            buffer += data
+
+                    frame = np.frombuffer(buffer, dtype=np.uint8)
+                    frame = frame.reshape(frame.shape[0], 1)
+
+                    frame = cv2.imdecode(frame, cv2.IMREAD_COLOR)
+                    frame = cv2.resize(frame, (1280, 720), interpolation=cv2.INTER_AREA)
+
+                    global lock
+                    with lock:
+                        if frame is None:
+                            continue
+
+                        # encode the frame in JPEG format
+                        (flag, encodedImage) = cv2.imencode(".jpg", frame)
+                        # ensure the frame was successfully encoded
+                        if not flag:
+                            continue
+
+            # yield the output frame in the byte format
+            yield (b'--frame\r\n' b'Content-Type: image/jpeg\r\n\r\n' +
+                   bytearray(encodedImage) + b'\r\n')
+
+    if request.method == 'GET':
+        # return the response generated along with the specific media
+        # type (mime type)
+        return  Response(generate ( ) ,mimetype = "multipart/x-mixed-replace; boundary=frame")
+    else:
+        pass

File diff suppressed because it is too large
+ 1588 - 0
EdamameProjectTest/app/main/views.py


+ 171 - 0
EdamameProjectTest/app/models.py

@@ -0,0 +1,171 @@
+# coding: utf-8
+from sqlalchemy import Column, DateTime, Integer, Numeric, String
+from flask_sqlalchemy import SQLAlchemy
+#使用Werkzeug的security加密
+from werkzeug.security import generate_password_hash,check_password_hash
+
+
+#與當前項目相關的模型文件,即所有的實體類在此編寫
+from manage import db
+
+
+class User(db.Model):
+    __tablename__ = 'user'
+
+    sn = db.Column(db.Integer, primary_key=True)
+    username = db.Column(db.String(30), nullable=False, unique=True)
+    password = db.Column(db.Text, nullable=False)
+
+#哈希加密版本
+# class User(db.Model):
+#     __tablename__ = 'user_info'
+#
+#     sn = db.Column(db.Integer, primary_key=True)
+#     username = db.Column(db.String(30), nullable=False, unique=True)
+#     password = db.Column(db.Text, nullable=False)
+#
+#     def __init__(self, *args, **kwargs):
+#         username = kwargs.get('username')
+#         password = kwargs.get('password')
+#
+#         self.username = username
+#         self.password = generate_password_hash(password)
+#
+#     def check_hash_password(self,raw_password):  这里的参数是hash过的参数以及原始传入hash
+#         result = check_password_hash(self.password, raw_password)
+#         return result  得到验证結果  
+
+
+class Orientation(db.Model):
+    __tablename__ = 'Orientation'
+
+    sn = db.Column(db.Integer, primary_key=True)
+    nr = db.Column(db.String(13), nullable=False, info='小小兵編號')
+    mode = db.Column(db.Integer, nullable=True, info='方位')
+    tilt_angle = db.Column(db.String(3), nullable=False)
+    pan_angle = db.Column(db.String(3), nullable=False)
+    zoom = db.Column(db.String(1), nullable=False, info='顯示UI')
+    datetime = db.Column(db.DateTime, nullable=False)
+
+
+
+class Status(db.Model):
+    __tablename__ = 'status'
+
+    sn = db.Column(db.Integer, primary_key=True)
+    nr = db.Column(db.String(13), nullable=False)
+    status = db.Column(db.String(10), nullable=False)
+    datetime = db.Column(db.DateTime, nullable=False)
+
+
+class JvtOTime(db.Model):
+    __tablename__ = 'jvt_o_time'
+
+    sn = db.Column(db.Integer, primary_key=True)
+    mac = db.Column(db.String(20), nullable=False)
+    nr = db.Column(db.String(20), nullable=False, info='小小兵編號')
+    name = db.Column(db.Text, nullable=False, info='方位名稱')
+    mode = db.Column(db.Integer, nullable=False, info='方位')
+    tilt_angle = db.Column(db.String(3), nullable=False)
+    pan_angle = db.Column(db.String(3), nullable=False)
+    zoom = db.Column(db.Integer, nullable=False)
+    time1 = db.Column(db.String(8), nullable=False)
+    time2 = db.Column(db.String(8), nullable=False)
+    time3 = db.Column(db.String(8), nullable=False)
+    time4 = db.Column(db.String(8), nullable=False)
+    time5 = db.Column(db.String(8), nullable=False)
+    time6 = db.Column(db.String(8), nullable=False)
+    time7 = db.Column(db.String(8), nullable=False)
+    time8 = db.Column(db.String(8), nullable=False)
+    datetime = db.Column(db.DateTime, nullable=False)
+
+
+class JvtOTimeHistory(db.Model):
+    __tablename__ = 'jvt_o_time_history'
+
+    sn = db.Column(db.Integer, primary_key=True)
+    mac = db.Column(db.String(20), nullable=False)
+    nr = db.Column(db.String(20), nullable=False, info='小小兵編號')
+    name = db.Column(db.Text, nullable=False, info='方位名稱')
+    mode = db.Column(db.Integer, nullable=False, info='方位')
+    tilt_angle = db.Column(db.String(3), nullable=False)
+    pan_angle = db.Column(db.String(3), nullable=False)
+    zoom = db.Column(db.Integer, nullable=False)
+    time1 = db.Column(db.String(8), nullable=False)
+    time2 = db.Column(db.String(8), nullable=False)
+    time3 = db.Column(db.String(8), nullable=False)
+    time4 = db.Column(db.String(8), nullable=False)
+    time5 = db.Column(db.String(8), nullable=False)
+    time6 = db.Column(db.String(8), nullable=False)
+    time7 = db.Column(db.String(8), nullable=False)
+    time8 = db.Column(db.String(8), nullable=False)
+    datetime = db.Column(db.DateTime, nullable=False)
+
+
+class SignalLog(db.Model):
+    __tablename__ = 'signalLog'
+
+    sn = db.Column(db.Integer, primary_key=True)
+    nr = db.Column(db.String(13), nullable=False, info='小小兵編號')
+    command = db.Column(db.String(20), nullable=False)
+    response = db.Column(db.String(20), nullable=False)
+    tilt_angle = db.Column(db.Text, nullable=True, info='垂直')
+    pan_angle = db.Column(db.Text, nullable=True, info='水平')
+    zoom = db.Column(db.Text, nullable=True, info='倍率')
+    position = db.Column(db.Text, nullable=True, info='方位')
+    datetime = db.Column(db.DateTime, nullable=False, info='日期時間')
+
+
+class Skyeye5GpsNr1(db.Model):
+    __tablename__ = 'skyeye5_gps_nr1'
+
+    sn = db.Column(db.Integer, primary_key=True)
+    datetime = db.Column(db.DateTime, nullable=False)
+    lat = db.Column(db.Text, nullable=False)
+    lng = db.Column(db.Text, nullable=False)
+    log = db.Column(db.Text, nullable=False)
+
+
+class Skyeye5GpsNr2(db.Model):
+    __tablename__ = 'skyeye5_gps_nr2'
+
+    sn = db.Column(db.Integer, primary_key=True)
+    datetime = db.Column(db.DateTime, nullable=False)
+    lat = db.Column(db.Text, nullable=False)
+    lng = db.Column(db.Text, nullable=False)
+    log = db.Column(db.Text, nullable=False)
+
+
+class Skyeye5GpsNr3(db.Model):
+    __tablename__ = 'skyeye5_gps_nr3'
+
+    sn = db.Column(db.Integer, primary_key=True)
+    datetime = db.Column(db.DateTime, nullable=False)
+    lat = db.Column(db.Text, nullable=False)
+    lng = db.Column(db.Text, nullable=False)
+    log = db.Column(db.Text, nullable=False)
+
+class ImageSignalLog(db.Model):
+    __tablename__ = 'imgSignalLog'
+
+    sn = db.Column(db.Integer, primary_key=True)
+    nr = db.Column(db.String(13), nullable=False, info='小小兵編號')
+    command = db.Column(db.String(20), nullable=False)
+    response = db.Column(db.String(20), nullable=False)
+    position = db.Column(db.Text, nullable=True, info='方位')
+    time = db.Column(db.Text, nullable=True, info='排程')
+    size_a = db.Column(db.Text, nullable=False)
+    size_b = db.Column(db.Text, nullable=False)
+    filename = db.Column(db.String(20), nullable=False, info='照片名')
+    datetime = db.Column(db.DateTime, nullable=False, info='日期時間')
+
+class RebootInfo(db.Model):
+    __tablename__ = 'reboot_info'
+
+    sn = db.Column(db.Integer, primary_key=True)
+    nr = db.Column(db.String(13), nullable=False, info='小小兵編號')
+    info = db.Column(db.Text, nullable=True, info='原因')
+    value = db.Column(db.Text, nullable=True, info='數值')
+    datetime = db.Column(db.DateTime, nullable=False, info='日期時間')
+
+# db.create_all()

+ 128 - 0
EdamameProjectTest/app/static/css/55.css

@@ -0,0 +1,128 @@
+.pic { 
+	content:url(static/8.jpg);
+	position: static;
+	width:100%;
+	height: 358px;
+}
+
+.w1 {
+	position:absolute;
+	top:23%;
+	left:71%;
+	background-color:#FFD4D4;
+}
+
+.w2 {
+	position:absolute;
+	bottom:23%;
+	left:26%;
+	background-color:#FFD4D4;
+}
+
+.s1 {
+	position:absolute;
+	top:30%;
+	left:72%;
+}
+
+.s2 {
+	position:absolute;
+	bottom:30%;
+	left:26%;
+}
+
+.s3 {
+	position:absolute;
+	top:53%;
+	left:71%;
+}
+
+.s4 {
+	position:absolute;
+	top:75%;
+	left:70%;
+}
+
+.s5 {
+	position:absolute;
+	bottom:9%;
+	left:64%;
+}
+
+.s6 {
+	position:absolute;
+	bottom:12%;
+	left:55%;
+}
+
+.s7 {
+	position:absolute;
+	bottom:30%;
+	left:53%;
+}
+
+.s8 {
+	position:absolute;
+	top:34%;
+	left:55%;
+}
+
+.s9 {
+	position:absolute;
+	top:22%;
+	left:59%;
+}
+
+.s10 {
+	position:absolute;
+	top:26%;
+	left:67%;
+}
+
+.s11 {
+	position:absolute;
+	bottom:48%;
+	left:27%;
+}
+
+.s12 {
+	position:absolute;
+	bottom:70%;
+	left:28%;
+}
+
+.s13 {
+	position:absolute;
+	top:10%;
+	left:35%;
+}
+
+.s14 {
+	position:absolute;
+	top:12%;
+	left:45%;
+}
+
+.s15 {
+	position:absolute;
+	top:30%;
+	left:50%;
+}
+
+.s16 {
+	position:absolute;
+	bottom:32%;
+	left:48%;
+}
+
+.s17 {
+	position:absolute;
+	bottom:21%;
+	left:41%;
+}
+
+.s18 {
+	position:absolute;
+	bottom:24%;
+	left:32%;
+}

+ 86 - 0
EdamameProjectTest/app/static/css/b.css

@@ -0,0 +1,86 @@
+body {
+	background-color: #4d4d4d;
+	font-family:微軟正黑體; “Microsoft JhengHei”, sans-serif;
+}
+.clearfix {
+	overflow: auto;
+}
+.box-content {
+	padding: 10px;
+	margin-top: 10px;
+}
+.box {
+  border:1px solid #cccccc;
+  width:300px;
+  height:50px;
+  background-color:#FFFFFF;
+  overflow:auto;
+}
+.ui-slider-range {
+	background: blue;
+}
+.spil {
+	position: absolute;
+	top: 5px;
+	left: 50px;
+}
+.lightsp {
+	position: absolute;
+	left: -10px;
+}
+.box{
+	display:none;
+}
+.dis{
+	display:none;
+}
+.radio {
+	position: relative;
+	float: left;
+	display: block;
+	padding-left: 25px;
+	margin-bottom: 12px;
+	line-height: 10px;
+	font-size: 30px;
+	cursor: hand;
+}
+.radio:before {
+	background: #fff;
+	content: "";
+	position: absolute;
+	display: inline-block;
+	top: 0;
+	left: 0;
+	width: 22px;
+	height: 21px;
+	border: 1px solid #bbb;
+
+	border-radius: 100%;
+	-moz-border-radius: 100%;
+	-webkit-border-radius: 100%;
+
+	box-shadow: inset 0 0 3px 0 #ccc;
+	-moz-box-shadow: inset 0 0 3px 0 #ccc;
+	-webkit-box-shadow: inset 0 0 3px 0 #ccc;
+}
+/*input[type="radio"] {
+  display: none;
+} 
+input[type="radio"]:checked + label:before {
+  content: "\221A";
+  font-family: Tahoma;
+  font-size: 25px;
+  color: #ff0000;
+}*/
+
+fieldset {
+	border:0;
+	padding:10px;
+	margin-bottom:10px;
+	background:#EEE;
+}
+legend {
+	padding:5px 10px;
+	background-color:#4F709F;
+	color:#FFF;
+}

File diff suppressed because it is too large
+ 1 - 0
EdamameProjectTest/app/static/css/bootstrap-slider.min.css


File diff suppressed because it is too large
+ 5 - 0
EdamameProjectTest/app/static/css/bootstrap.min.css


File diff suppressed because it is too large
+ 4 - 0
EdamameProjectTest/app/static/css/font-awesome.min.css


+ 208 - 0
EdamameProjectTest/app/static/css/generalstyle.css

@@ -0,0 +1,208 @@
+html{
+	width:100%;
+	height:100%;
+	background-color:#ffffff;
+}
+body{
+	padding:0;
+	margin:0;
+	background-color:#ffffff;
+	font-family:Microsoft JhengHei,sans-serif;
+}
+.row{
+	margin:15px auto 0;
+}
+#header button{
+	margin-top:3px;
+}
+a {
+	text-decoration:none;
+}
+a:hover {
+	text-decoration:none;
+}
+.content{
+	/*text-align:center;*/
+	width:90%;
+	margin:60px auto 10px;
+}
+span{
+	margin-left:5px;
+}
+span:hover{
+	color:#B0BEC5;
+}
+
+/* enable absolute positioning */
+.inner-addon {
+  position: relative;
+}
+
+/* style glyph */
+.inner-addon .fa, .inner-addon .glyphicon {
+  position: absolute;
+  padding: 10px;
+  pointer-events: none;
+}
+
+/* align glyph */
+.inner-addon .fa, .left-addon .glyphicon  { left:  0px;}
+.inner-addon .fa, .right-addon .glyphicon { right: 0px;}
+
+/* add padding  */
+.left-addon input  { padding-left:  30px; }
+.right-addon input { padding-right: 30px; }
+
+.btn-right {
+	float: right;
+	margin-left: 3px;
+}
+
+button:disabled {
+	background: #dddddd;
+	cursor:not-allowed;
+}
+
+.btn_controller {
+	width:50%;
+	height:40px;
+	color: white;
+	-webkit-transition-duration: 0.4s; /* Safari */
+	transition-duration: 0.4s;
+	background: #008CBA;
+}
+
+.btn_controller:hover {
+	background: white;
+	color: black;
+}
+
+.breadcrumb{
+	padding: 10px 16px;
+	list-style: none;
+	background-color: #eee;
+	font-size:1.2em;
+	text-align:left;
+}
+
+.ui-datepicker span{
+	margin: 0;
+}
+			
+table,th,td{
+	text-align:center;
+	vertical-align:middle;
+}
+.table>tbody>tr>td, .table>tbody>tr>th{
+	vertical-align:middle;
+}
+
+.our_modal {
+	display:none;
+	position: fixed;
+	z-index: 1200;
+	padding-top: 150px;
+	left: 0;
+	top: 0;
+	width: 100%;
+	height: 100%;
+	overflow: auto;
+	background:rgba(0,0,0,0.8);
+}
+.our_modal .modal-content {
+	width:200px;
+	margin: auto;
+}
+.our_modal .close {
+	color: white;
+	position: absolute;
+	top: 10px;
+	right: 25px;
+	font-size: 35px;
+	font-weight: bold;
+}
+.our_modal .close:hover,.our_modal .close:focus {
+	color: #999;
+	text-decoration: none;
+	cursor: pointer;
+}
+/* tab */
+.container>div.tab-content{
+	border: 1px solid #ddd;
+	border-top:none;
+}
+.tab-content{
+	padding:5px;
+}
+/* datatable button */
+div.dt-buttons{
+	text-align: right;
+}
+div.dt-buttons button{
+	color: #fff;
+	background-color: #f0ad4e;
+	border-color: #eea236;
+}
+div.dt-buttons button:hover{
+	background-color: #eb9114;
+}
+div.dt-buttons span{
+	margin:0;
+}
+div.dt-buttons span:hover{
+	color: #fff;
+}
+/* table Navbar RWD */
+@media only screen and (max-width:768px){
+	.navbar-header {
+		float: none;
+	}
+	.navbar-toggle {
+		display: inline-block;
+		float:left;
+	}
+	.navbar-collapse {
+		border-top: 1px solid transparent;
+		box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
+	}
+	.navbar-collapse.collapse {
+		display: none!important;
+	}
+	.navbar-nav>li {
+		float: none;
+	}
+	.navbar-nav>li>a {
+		padding-top: 10px;
+		padding-bottom: 10px;
+	}
+	.navbar-text {
+		float: none;
+		margin: 15px 0;
+	}
+	/* since 3.1.0 */    .navbar-collapse.collapse.in { 
+		display: block!important;
+	}
+	.collapsing {
+		overflow: hidden!important;
+	}
+	
+	thead{
+		display: none;
+	}
+	td{
+		display: block;
+		padding: .3rem .5rem;
+		text-align: left;
+	}
+	td:before{
+		content: attr(data-title);
+		display: inline-block;
+		width: auto;
+		min-width: 20%;
+		font-weight: 900;
+		padding-right: 1rem;
+	}
+	#project_diary_table .warning td{
+		display: none;
+	}
+}

+ 67 - 0
EdamameProjectTest/app/static/css/indexstyle.css

@@ -0,0 +1,67 @@
+body{
+	width:95%;
+	height:95%;
+	background-attachment:fixed;
+	background-repeat: repeat;
+	background-image: url("../img/loginbackground1.png");
+}
+.container{
+	width:420px;
+	height:500px;
+	text-align: center;
+	background-color:rgba(0, 26, 0, 0.5);
+	border-radius: 4px;
+	margin: 0 auto;
+	margin-top: 50px;
+}
+p{
+	color:#ffd34b;
+	font-weight: bold;
+	font-size: 30px;
+	margin-top: 0px;
+}
+input[type="text"],input[type="password"]{
+	width: 300px;
+	height: 45px;
+	font-size: 18px;
+	margin-bottom: 20px;
+	background-color: #fff;
+	padding-left: 30px;
+	-webkit-border-radius:5px;
+	-o-border-radius:5px;
+	-moz-border-radius:5px;
+}
+.checkbox{
+	color:#80d4ff;
+	padding-right: 230px;
+	padding-bottom:  10px;
+}
+.btn-login{
+	padding: 15px 30px;
+	color: #073B24;
+	border-radius:4px;
+	border: none;
+	background-color: #78D9C0;
+	border-bottom:4px solid #227963;
+	margin-bottom: 20px;
+}
+.btn-login:hover{
+	background-color:#3aaf85;
+}
+a{
+	color:#fff;
+}
+.footer{
+	position:relative;
+	margin-top:50px;
+	clear:both;
+	width:100%;
+	height:100px;
+	bottom:0;
+	text-align:center;
+}
+h5{
+	color: #4d4d4d;
+	font-size: 14px;
+	font-family: "新細明體", "Times New Roman";
+}

+ 73 - 0
EdamameProjectTest/app/static/css/loginstyle.css

@@ -0,0 +1,73 @@
+body{
+	width:95%;
+	height:95%;
+	background-attachment:fixed;
+	background-repeat: repeat;
+	background-image: url("../img/loginbackground1.png");
+}
+.container{
+	width:480px;
+	height:450px;
+	text-align: center;
+	background-color:rgba(0, 26, 0, 0.5);
+	border-radius: 4px;
+	margin: 0 auto;
+	margin-top: 250px;
+}
+.container img{
+	width: 350px;
+	height: 150px;
+	margin-top: -180px;
+	margin-bottom: 60px;
+}
+p{
+	color:#ffd34b;
+	font-weight: bold;
+	font-size: 30px;
+	margin-top: 0px;
+}
+input[type="text"],input[type="password"]{
+	width: 300px;
+	height: 45px;
+	font-size: 18px;
+	margin-bottom: 20px;
+	background-color: #fff;
+	padding-left: 30px;
+	-webkit-border-radius:5px;
+	-o-border-radius:5px;
+	-moz-border-radius:5px;
+}
+.checkbox{
+	color:#80d4ff;
+	padding-right: 230px;
+	padding-bottom:  10px;
+}
+.btn-login{
+	padding: 15px 30px;
+	color: #073B24;
+	border-radius:4px;
+	border: none;
+	background-color: #78D9C0;
+	border-bottom:4px solid #227963;
+	margin-bottom: 20px;
+}
+.btn-login:hover{
+	background-color:#3aaf85;
+}
+a{
+	color:#fff;
+}
+.footer{
+	position:relative;
+	margin-top:50px;
+	clear:both;
+	width:100%;
+	height:100px;
+	bottom:0;
+	text-align:center;
+}
+h5{
+	color: #4d4d4d;
+	font-size: 14px;
+	font-family: "新細明體", "Times New Roman";
+}

+ 112 - 0
EdamameProjectTest/app/static/css/registration.css

@@ -0,0 +1,112 @@
+        .img-fluid {
+            margin-top: 50px;
+        }
+
+        .text-center {
+            margin-top: 50px;
+        }
+
+        form {
+            margin-top: 50px;
+        }
+
+        form > div:last-child {
+            margin-top: 40px;
+        }
+
+        form > div:last-child input:last-child {
+            margin-left: 120px;
+        }
+
+        .btn-info {
+            width: 105px;
+            height: 43px;
+            background: #85BF31;
+            border: 1px solid #CFCFCF;
+            box-sizing: border-box;
+            border-radius: 5px;
+            color: #000000;
+        }
+
+        .wrong-info {
+            height: 20px;
+            font-family: Roboto;
+            font-style: normal;
+            font-weight: normal;
+            font-size: 14px;
+            color: #FF0505;
+        }
+
+        @media(max-width:373px){
+            .col-2 {
+                display: none;
+            }
+        }
+
+        @media(max-width:577px){
+            form > div:last-child input:last-child {
+                margin-left: 0px;
+            }
+        }
+
+        @media(min-width:576px){
+
+        }
+
+         @media(min-width:768px){
+            .form-inline {
+                margin-left: 60px;
+            }
+            form > div:last-child {
+                margin-left: 60px;
+            }
+            .wrong-info {
+                margin-left: 50px;
+            }
+            #first {
+                margin-left: 70px;
+            }
+            #last {
+                margin-left: 71px;
+            }
+            #email {
+                margin-left: 108px;
+            }
+            #phone {
+                margin-left: 103px;
+            }
+            #usr {
+                margin-left: 68px;
+            }
+            #pwd {
+                margin-left: 81px;
+            }
+            #cpwd {
+                margin-left: 22px;
+            }
+
+         }
+
+         @media(min-width:991px){
+            .form-inline {
+                margin-left: 140px;
+            }
+            form > div:last-child {
+                margin-left: 150px;
+            }
+            .wrong-info {
+                margin-left: 140px;
+            }
+         }
+
+         @media(min-width:1200px){
+            .form-inline {
+                margin-left: 180px;
+            }
+             form > div:last-child {
+                margin-left: 190px;
+            }
+            .wrong-info {
+                margin-left: 170px;
+            }
+         }

+ 116 - 0
EdamameProjectTest/app/static/css/sign_in.css

@@ -0,0 +1,116 @@
+        .img-fluid {
+            margin-top: 50px;
+        }
+
+        .text-center {
+            margin-top: 30px;
+        }
+
+        form {
+            margin-top: 50px;
+        }
+
+         .radio a {
+            text-decoration: none;
+            margin-left: 75px;
+        }
+
+        form > div:last-child {
+            margin-top: 40px;
+        }
+
+        form > div:last-child input:last-child {
+            margin-left: 100px;
+        }
+
+        .btn-info {
+            width: 105px;
+            height: 43px;
+            background: #85BF31;
+            border: 1px solid #CFCFCF;
+            box-sizing: border-box;
+            border-radius: 5px;
+            color: #000000;
+        }
+
+        .wrong-info {
+            height: 20px;
+            font-family: Roboto;
+            font-style: normal;
+            font-weight: normal;
+            font-size: 14px;
+            color: #FF0505;
+        }
+
+        @media(max-width:373px){
+            .col-2 {
+                display: none;
+            }
+        }
+
+        @media(max-width:577px){
+            .radio a {
+                margin-left: 0px;
+                display: block;
+            }
+            form > div:last-child input:last-child {
+                margin-left: 0px;
+            }
+        }
+
+        @media(min-width:576px){
+            #usr {
+                margin-left: 70px;
+            }
+            #pwd {
+                margin-left: 40px;
+            }
+            .form div:not(:first-child) {
+                margin-top: 20px;
+            }
+
+        }
+         @media(min-width:768px){
+            .form-inline {
+                margin-left: 50px;
+            }
+            .radio {
+                margin-left: 50px;
+            }
+            form > div:last-child {
+                margin-left: 60px;
+            }
+            .wrong-info {
+                margin-left: 50px;
+            }
+         }
+
+         @media(min-width:991px){
+            .form-inline {
+                margin-left: 140px;
+            }
+            .radio {
+                margin-left: 140px;
+            }
+            form > div:last-child {
+                margin-left: 150px;
+            }
+            .wrong-info {
+                margin-left: 140px;
+            }
+         }
+
+         @media(min-width:1200px){
+            .form-inline {
+                margin-left: 180px;
+            }
+            .radio {
+                margin-left: 180px;
+            }
+             form > div:last-child {
+                margin-left: 190px;
+            }
+            .wrong-info {
+                margin-left: 170px;
+            }
+         }

BIN
EdamameProjectTest/app/static/img/Mowdo.jpg


BIN
EdamameProjectTest/app/static/img/PV.jpg


BIN
EdamameProjectTest/app/static/img/blue.png


BIN
EdamameProjectTest/app/static/img/camera.png


BIN
EdamameProjectTest/app/static/img/color1.jpg


BIN
EdamameProjectTest/app/static/img/down.png


BIN
EdamameProjectTest/app/static/img/left.png


BIN
EdamameProjectTest/app/static/img/loading.gif


BIN
EdamameProjectTest/app/static/img/loginbackground1.png


BIN
EdamameProjectTest/app/static/img/logo_new.png


BIN
EdamameProjectTest/app/static/img/ndvi.jpg


BIN
EdamameProjectTest/app/static/img/red.png


BIN
EdamameProjectTest/app/static/img/reset.png


BIN
EdamameProjectTest/app/static/img/right.png


BIN
EdamameProjectTest/app/static/img/stop.png


BIN
EdamameProjectTest/app/static/img/up.png


BIN
EdamameProjectTest/app/static/img/user.png


File diff suppressed because it is too large
+ 2 - 0
EdamameProjectTest/app/static/js/bootstrap-slider.min.js


File diff suppressed because it is too large
+ 7 - 0
EdamameProjectTest/app/static/js/bootstrap.min.js


File diff suppressed because it is too large
+ 1 - 0
EdamameProjectTest/app/static/js/gauge.min.js


File diff suppressed because it is too large
+ 2203 - 0
EdamameProjectTest/app/static/js/jquery-ui-timepicker-addon.js


+ 22 - 0
EdamameProjectTest/app/static/js/jquery-ui-timepicker-zh-TW.js

@@ -0,0 +1,22 @@
+/* Chinese translation for the jQuery Timepicker Addon */
+/* Written by Alang.lin */
+(function($) {
+	$.timepicker.regional['zh-TW'] = {
+		timeOnlyTitle: '選擇時分秒',
+		timeText: '時間',
+		hourText: '時',
+		minuteText: '分',
+		secondText: '秒',
+		millisecText: '毫秒',
+		microsecText: '微秒',
+		timezoneText: '時區',
+		currentText: '現在時間',
+		closeText: '確定',
+		timeFormat: 'HH:mm',
+		timeSuffix: '',
+		amNames: ['上午', 'AM', 'A'],
+		pmNames: ['下午', 'PM', 'P'],
+		isRTL: false
+	};
+	$.timepicker.setDefaults($.timepicker.regional['zh-TW']);
+})(jQuery);

File diff suppressed because it is too large
+ 12 - 0
EdamameProjectTest/app/static/js/jquery-ui.min.js


File diff suppressed because it is too large
+ 5 - 0
EdamameProjectTest/app/static/js/jquery.min.js


+ 43 - 0
EdamameProjectTest/app/static/js/registration.js

@@ -0,0 +1,43 @@
+        function Login(){
+            window.location.href='/login';
+        };
+
+        $(function (){
+            var username = $("input[name='username']");
+            var password = $("input[name='password']");
+            var confirmpwd = $("input[name='confirmpwd']");
+            var status = false;
+            var form = $("form");
+
+            username.blur(function(){
+                $.get("/check_username","username="+username.val(),function(resText){
+                    if(resText.errMsg){
+                        $("#firstname-span").text("This username is already registered");
+                        status = false;
+                    }else{
+                        $("#firstname-span").text("");
+                        status = true;
+                    };
+                },'json');
+            });
+
+            confirmpwd.blur(function(){
+                var span = $("#password-span");
+                if(password.val() != confirmpwd.val()){
+                    span.text("Passwords does not match");
+                    status = false;
+                }else{
+                    span.text("");
+                    status = true;
+                };
+            });
+
+            form.submit(function(){
+                if((status == true) && (password.val() != '') && (confirmpwd.val() != '')){
+                    return true;
+                }else{
+                    alert("Please type your infomation");
+                    return false;
+                };
+            });
+        });

+ 3 - 0
EdamameProjectTest/app/static/js/signin.js

@@ -0,0 +1,3 @@
+function Registration(){
+    window.location.href='/register';
+};

+ 661 - 0
EdamameProjectTest/app/templates/ahistory_ndvi1.html

@@ -0,0 +1,661 @@
+<!DOCTYPE html>
+<html>
+<head>
+	<title>Welcome to SkyAI</title>
+	<meta charset="utf-8">
+	<meta name="viewport" content="width=device-width, initial-scale=1">
+	<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.css">
+	<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
+	<!--<link rel="stylesheet" href="css/b.css">-->
+	<!--<link rel="stylesheet" href="..static/css/generalstyle.css?<?php echo rand(0,512);?>">-->
+	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
+	<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
+	<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
+	<style>
+		.detail{
+			font-family: Microsoft JhengHei;
+			border-radius: 100px;
+			background-color: #008CBA;
+			border: none;
+			color: white;
+			padding: 5px 12px;
+			text-align: center;
+			text-decoration: none;
+			display: inline-block;
+			font-size: 1.4em;
+			margin: 4px 2px;
+			cursor: pointer;
+			transition-duration: 0.4s;
+			border: 3px solid white;
+		}
+		.detail:hover {
+			background-color: white; 
+			color: black; 
+			border: 3px solid black;
+		}
+		.title{
+			font-family: Microsoft JhengHei;
+			border-radius: 100px;
+			background-color: #f2f2f2;
+			border: none;
+			color: black;
+			padding: 10px 32px;
+			font-size: 2.5em;
+		}
+		.choose_nr {
+			color: #333333;
+			font-size: 1.7em;
+			font-weight:bold;
+			/*text-shadow: 1px 2px black;*/
+		}
+		.sw_number {
+			width:40px;
+			font-size:1.5em;
+			border:1px;
+			border-radius: 100px;
+			border: 3px solid lightgray;
+		}
+		.sw_number:hover {
+			width:40px;
+			font-size:1.5em;
+			border:1px;
+			border-radius: 100px;
+			border: 3px solid lightgreen;
+			background-color: white; 
+		}
+		.choosed {
+			width:40px;
+			font-size:1.5em;
+			border:1px;
+			border-radius: 100px;
+			border: 3px solid red;
+			background-color: white; 
+		}
+
+		select {
+			border-radius: 2px;
+    		height: 25px;
+    		font-size: 15px;
+		}
+	</style>
+
+	<script>
+		function Change(evt){
+			var nr = {{params.tid}};
+			var l = evt.length;
+			var n = $('select[name=' + evt.substring(0,l-1) + 'n]').val();
+			var y = $('select[name=' + evt.substring(0,l-1) + 'y]').val();
+			var m = $('select[name=' + evt.substring(0,l-1) + 'm]').val();
+			var d = $('select[name=' + evt.substring(0,l-1) + 'd]').val();
+			if(evt.charAt(1) == '_'){
+				var ori = '0';
+			}else if(evt.charAt(1) == '1'){
+				var ori = '1';
+			}else if(evt.charAt(1) == '2'){
+				var ori = '2';
+			}else if(evt.charAt(1) == '3'){
+				var ori = '3';
+			}else if(evt.charAt(1) == '4'){
+				var ori = '4';
+			}else if(evt.charAt(1) == '5'){
+				var ori = '5';
+			}else if(evt.charAt(1) == '6'){
+				var ori = '6';
+			}else if(evt.charAt(1) == '7'){
+				var ori = '7';
+			}else{
+				var ori = '8';
+			};
+
+
+			var json = {"nr":nr, "ori":ori, "n":n, "y":y, "m":m, "d":d, "evt":evt};
+			$.post('/aimg_history/' + nr, json, function(resText){
+				var html_y = '';
+				var html_m = '';
+				var html_d = '';
+				var html_t = '';
+				var l = evt.length;
+				if(evt.substring(l-1) == 'n'){
+					$.each(resText.y, function(i, obj){
+						html_y += '<option value="' + obj + '">' + obj + '</option>';
+						$('select[name=' + evt.substring(0, l-1) + 'y]').html(html_y);
+					});
+					$.each(resText.m, function(i, obj){
+						html_m += '<option value="' + obj + '">' + obj + '</option>';
+						$('select[name=' + evt.substring(0, l-1) + 'm]').html(html_m);
+					});
+					$.each(resText.d, function(i, obj){
+						html_d += '<option value="' + obj + '">' + obj + '</option>';
+						$('select[name=' + evt.substring(0, l-1) + 'd]').html(html_d);
+					});
+					$.each(resText.t, function(i, obj){
+						html_t += '<option value="' + obj + '">' + obj + '</option>';
+						$('select[name=' + evt.substring(0, l-1) + 't]').html(html_t);
+					});
+
+				}else if(evt.substring(l-1) == 'y'){
+					$.each(resText.m, function(i, obj){
+						html_m += '<option value="' + obj + '">' + obj + '</option>';
+						$('select[name=' + evt.substring(0, l-1) + 'm]').html(html_m);
+					});
+					$.each(resText.d, function(i, obj){
+						html_d += '<option value="' + obj + '">' + obj + '</option>';
+						$('select[name=' + evt.substring(0, l-1) + 'd]').html(html_d);
+					});
+					$.each(resText.t, function(i, obj){
+						html_t += '<option value="' + obj + '">' + obj + '</option>';
+						$('select[name=' + evt.substring(0, l-1) + 't]').html(html_t);
+					});
+				}else if(evt.substring(l-1) == 'm'){
+					$.each(resText.d, function(i, obj){
+						html_d += '<option value="' + obj + '">' + obj + '</option>';
+						$('select[name=' + evt.substring(0, l-1) + 'd]').html(html_d);
+					});
+					$.each(resText.t, function(i, obj){
+						html_t += '<option value="' + obj + '">' + obj + '</option>';
+						$('select[name=' + evt.substring(0, l-1) + 't]').html(html_t);
+					});
+				}else{
+					$.each(resText.t, function(i, obj){
+						html_t += '<option value="' + obj + '">' + obj + '</option>';
+						$('select[name=' + evt.substring(0, l-1) + 't]').html(html_t);
+					});
+				};
+
+			}, 'json');
+		};
+
+		function SearchImg(evt){
+			var nr = {{params.tid}};
+			var ori = 0;
+			if(evt == 'c'){
+				ori = 0;
+			}else if(evt == 'c1'){
+				ori = 1;
+			}else if(evt == 'c2'){
+				ori = 2;
+			}else if(evt == 'c3'){
+				ori = 3;
+			}else if(evt == 'c4'){
+				ori = 4;
+			}else if(evt == 'c5'){
+				ori = 5;
+			}else if(evt == 'c6'){
+				ori = 6;
+			}else if(evt == 'c7'){
+				ori = 7;
+			}else if(evt == 'c8'){
+				ori = 8;
+			}else{};
+			var y = $('select[name=' + evt + '_y]').val();
+			var m = $('select[name=' + evt + '_m]').val();
+			var d = $('select[name=' + evt + '_d]').val();
+			var t = $('select[name=' + evt + '_t]').val();
+			if(ori == 0){
+				var ndvi = 'http://60.250.156.234/cust/' + nr + '/ndvia/' + y + '-' + m + '-' + d + '_' + t + '.png';
+				var img = 'http://60.250.156.234/cust/' + nr + '/nj/' + y + '-' + m + '-' + d + '_' + t + '.jpg';
+				$('font[class=title]').text('N0.' + nr +  ' Direction' + '自動' + '@' + y + '-' + m + '-' + d + '_' + t);
+			}else{
+				var ndvi = 'http://60.250.156.234/cust/' + nr + '/ndvia' + ori + '/' + y + '-' + m + '-' + d + '_' + t + '.png';
+				var img = 'http://60.250.156.234/cust/' + nr + '/nj' + ori + '/' + y + '-' + m + '-' + d + '_' + t + '.jpg';
+				$('font[class=title]').text('N0.' + nr +  ' Direction' + ori + ' @' + y + '-' + m + '-' + d + '_' + t);
+			};
+
+			$('img[name=ndvi]').attr('src', ndvi);
+			$('img[name=img]').attr('src', img);
+
+		};
+
+		$(function(){
+			{% if params.ndviImgPath %}
+				$("img[name=ndvi]").attr('src', '{{params.ndviImgPath}}');
+			{% endif %}
+
+			{% if params.imgPath %}
+				$("img[name=img]").attr('src', '{{params.imgPath}}');
+			{% endif %}
+
+			{% if params.year %}
+				$('font[class=title]').text('N0.' + '{{params.tid}}' +  ' Direction' + '{{params.mode}}' + ' @' + '{{params.year}}' + '-' + '{{params.month}}' + '-' + '{{params.day}}' + '_' + '{{params.time}}');
+			{% endif %}
+		});
+
+
+	</script>
+</head>
+<body>
+	<div class="container">
+		<div id="header" class="row" style="background-color:#ffffff;">
+			<div style="height:20px;"></div>
+	    	<div class="col-md-12 col-md-12" style="text-align:center;margin:auto;">
+				<div class="col-md-4 col-sm-12" style="">
+					<img src="../static/img/logo_new.png" width="60%" height="7%">
+				</div>
+				<div class="col-md-6 col-sm-12 text-left" style="">
+					<a href="/aindex"><button class="btn btn-danger btn-lg" style="">地形圖</button></a>
+					<a href="/ashoot_setting/{{params.tid}}"><button class="btn btn-danger btn-lg" style="">拍攝設定</button></a>
+					<a href="/aimg_history/1"><button class="btn btn-primary btn-lg" style="">歷史資料</button></a>
+				</div>
+				<div class="col-md-1 col-sm-12" style="">
+					<a href="/logout"><button class="btn btn-primary btn-lg" style="">登出</button></a>
+				</div>
+	    	</div>
+	    	<div class="col-md-12" style="background-color:red;width:100%;height:5px;margin-top:5px;margin-bottom:20px;"></div>
+        </div>
+		
+		<div class="col-sm-12" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+			<center>
+<!--				<?php echo "<font class='title'>$NR  號 NDVI歷史查詢</font>"; ?>-->
+				<h1>{{params.tid}} 號 NDVI歷史查詢</h1>
+				<br>
+				<a href="/aimg_history/1"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">1</button></a>
+				<a href="/aimg_history/2"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">2</button></a>
+				<a href="/aimg_history/3"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">3</button></a>
+				<a href="/aimg_history/4"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">4</button></a>
+				<a href="/aimg_history/5"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">5</button></a>
+				<a href="/aimg_history/6"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">6</button></a>
+				<a href="/aimg_history/7"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">7</button></a>
+				<a href="/aimg_history/8"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">8</button></a>
+				<a href="/aimg_history/9"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">9</button></a>
+				<a href="/aimg_history/10"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">10</button></a>
+				<a href="/aimg_history/11"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">11</button></a>
+				<a href="/aimg_history/12"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">12</button></a>
+				<a href="/aimg_history/13"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">13</button></a>
+				<a href="/aimg_history/14"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">14</button></a>
+				<a href="/aimg_history/15"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">15</button></a>
+				<a href="/aimg_history/16"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">16</button></a>
+				<a href="/aimg_history/17"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">17</button></a>
+				<a href="/aimg_history/18"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">18</button></a>
+				<a href="/aimg_history/19"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">19</button></a>
+				<table style="width:auto; height:auto; border: 20px solid #f2f2f2" border="0" align="center">
+					<div class="col-sm-12" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+						<div class="col-sm-4" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+							<font class="choose_nr">手動</font><br>
+							<select name='c_y' oninput="Change('c_y');">
+								{% if params.Ly %}
+									{% for y in params.Ly %}
+										<option value="{{y}}">{{y}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:年</font>
+							<select name='c_m' oninput="Change('c_m');">
+								{% if params.Lm %}
+									{% for m in params.Lm %}
+										<option value="{{m}}">{{m}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:月</font>
+							<select name='c_d' oninput="Change('c_d');">
+								{% if params.Ld %}
+									{% for d in params.Ld %}
+										<option value="{{d}}">{{d}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:日</font>
+							<select name='c_t'>
+								{% if params.Lt %}
+									{% for t in params.Lt %}
+										<option value="{{t}}">{{t}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<button name="c" type="button" onclick="SearchImg('c');">查詢</button>
+						</div>
+						<div class="col-sm-4" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+							<font class='choose_nr'>1.方位名稱</font>
+							<select name='c1_n' oninput="Change('c1_n');">
+                                <option value="all">全部照片</option>
+								{% if params.Ln1 %}
+									{% for n in params.Ln1 %}
+										<option value="{{n}}">{{n}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<select name='c1_y' oninput="Change('c1_y');">
+								{% if params.Ly1 %}
+									{% for y in params.Ly1 %}
+										<option value="{{y}}">{{y}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:年</font>
+							<select name='c1_m' oninput="Change('c1_m');">
+								{% if params.Lm1 %}
+									{% for m in params.Lm1 %}
+										<option value="{{m}}">{{m}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:月</font>
+							<select name='c1_d' oninput="Change('c1_d');">
+								{% if params.Ld1 %}
+									{% for d in params.Ld1 %}
+										<option value="{{d}}">{{d}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:日</font>
+							<select name='c1_t'>
+								{% if params.Lt1 %}
+									{% for t in params.Lt1 %}
+										<option value="{{t}}">{{t}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<button name="c1" type="button" onclick="SearchImg('c1');">查詢</button>
+						</div>
+						<div class="col-sm-4" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+							<font class='choose_nr'>2.方位名稱</font>
+							<select name='c2_n' oninput="Change('c2_n');">
+                                <option value="all">全部照片</option>
+								{% if params.Ln2 %}
+									{% for n in params.Ln2 %}
+										<option value="{{n}}">{{n}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<select name='c2_y' oninput="Change('c2_y');">
+								{% if params.Ly2 %}
+									{% for y in params.Ly2 %}
+										<option value="{{y}}">{{y}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:年</font>
+							<select name='c2_m' oninput="Change('c2_m');">
+								{% if params.Lm2 %}
+									{% for m in params.Lm2 %}
+										<option value="{{m}}">{{m}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:月</font>
+							<select name='c2_d' oninput="Change('c2_d');">
+								{% if params.Ld2 %}
+									{% for d in params.Ld2 %}
+										<option value="{{d}}">{{d}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:日</font>
+							<select name='c2_t'>
+								{% if params.Lt2 %}
+									{% for t in params.Lt2 %}
+										<option value="{{t}}">{{t}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<button name="c2" type="button" onclick="SearchImg('c2');">查詢</button>
+						</div>
+						<div class="col-sm-4" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+							<font class='choose_nr'>3.方位名稱</font>
+							<select name='c3_n' oninput="Change('c3_n');">
+                                <option value="all">全部照片</option>
+								{% if params.Ln3 %}
+									{% for n in params.Ln3 %}
+										<option value="{{n}}">{{n}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<select name='c3_y' oninput="Change('c3_y');">
+								{% if params.Ly3 %}
+									{% for y in params.Ly3 %}
+										<option value="{{y}}">{{y}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:年</font>
+							<select name='c3_m' oninput="Change('c3_m');">
+								{% if params.Lm3 %}
+									{% for m in params.Lm3 %}
+										<option value="{{m}}">{{m}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:月</font>
+							<select name='c3_d' oninput="Change('c3_d');">
+								{% if params.Ld3 %}
+									{% for d in params.Ld3 %}
+										<option value="{{d}}">{{d}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:日</font>
+							<select name='c3_t'>
+								{% if params.Lt3 %}
+									{% for t in params.Lt3 %}
+										<option value="{{t}}">{{t}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<button name="c3" type="button" onclick="SearchImg('c3');">查詢</button>
+						</div>
+						<div class="col-sm-4" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+							<font class='choose_nr'>4.方位名稱</font>
+							<select name='c4_n' oninput="Change('c4_n');">
+                                <option value="all">全部照片</option>
+								{% if params.Ln4 %}
+									{% for n in params.Ln4 %}
+										<option value="{{n}}">{{n}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<select name='c4_y' oninput="Change('c4_y');">
+								{% if params.Ly4 %}
+									{% for y in params.Ly4 %}
+										<option value="{{y}}">{{y}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:年</font>
+							<select name='c4_m' oninput="Change('c4_m');">
+								{% if params.Lm4 %}
+									{% for m in params.Lm4 %}
+										<option value="{{m}}">{{m}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:月</font>
+							<select name='c4_d' oninput="Change('c4_d');">
+								{% if params.Ld4 %}
+									{% for d in params.Ld4 %}
+										<option value="{{d}}">{{d}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:日</font>
+							<select name='c4_t'>
+								{% if params.Lt4 %}
+									{% for t in params.Lt4 %}
+										<option value="{{t}}">{{t}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<button name="c4" type="button" onclick="SearchImg('c4');">查詢</button>
+						</div>
+						<div class="col-sm-4" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+							<font class='choose_nr'>5.方位名稱</font>
+							<select name='c5_n' oninput="Change('c5_n');">
+                                <option value="all">全部照片</option>
+								{% if params.Ln5 %}
+									{% for n in params.Ln5 %}
+										<option value="{{n}}">{{n}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<select name='c5_y' oninput="Change('c5_y');">
+								{% if params.Ly5 %}
+									{% for y in params.Ly5 %}
+										<option value="{{y}}">{{y}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:年</font>
+							<select name='c5_m' oninput="Change('c5_m');">
+								{% if params.Lm5 %}
+									{% for m in params.Lm5 %}
+										<option value="{{m}}">{{m}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:月</font>
+							<select name='c5_d' oninput="Change('c5_d');">
+								{% if params.Ld5 %}
+									{% for d in params.Ld5 %}
+										<option value="{{d}}">{{d}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:日</font>
+							<select name='c5_t'>
+								{% if params.Lt5 %}
+									{% for t in params.Lt5 %}
+										<option value="{{t}}">{{t}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<button name="c5" type="button" onclick="SearchImg('c5');">查詢</button>
+						</div>
+						<div class="col-sm-4" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+							<font class='choose_nr'>6.方位名稱</font>
+							<select name='c6_n' oninput="Change('c6_n');">
+                                <option value="all">全部照片</option>
+								{% if params.Ln6 %}
+									{% for n in params.Ln6 %}
+										<option value="{{n}}">{{n}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<select name='c6_y' oninput="Change('c6_y');">
+								{% if params.Ly6 %}
+									{% for y in params.Ly6 %}
+										<option value="{{y}}">{{y}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:年</font>
+							<select name='c6_m' oninput="Change('c6_m');">
+								{% if params.Lm6 %}
+									{% for m in params.Lm6 %}
+										<option value="{{m}}">{{m}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:月</font>
+							<select name='c6_d' oninput="Change('c6_d');">
+								{% if params.Ld6 %}
+									{% for d in params.Ld6 %}
+										<option value="{{d}}">{{d}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:日</font>
+							<select name='c6_t'>
+								{% if params.Lt6 %}
+									{% for t in params.Lt6 %}
+										<option value="{{t}}">{{t}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<button name="c6" type="button" onclick="SearchImg('c6');">查詢</button>
+						</div>
+						<div class="col-sm-4" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+							<font class='choose_nr'>7.方位名稱</font>
+							<select name='c7_n' oninput="Change('c7_n');">
+                                <option value="all">全部照片</option>
+								{% if params.Ln7 %}
+									{% for n in params.Ln7 %}
+										<option value="{{n}}">{{n}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<select name='c7_y' oninput="Change('c7_y');">
+								{% if params.Ly7 %}
+									{% for y in params.Ly7 %}
+										<option value="{{y}}">{{y}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:年</font>
+							<select name='c7_m' oninput="Change('c7_m');">
+								{% if params.Lm7 %}
+									{% for m in params.Lm7 %}
+										<option value="{{m}}">{{m}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:月</font>
+							<select name='c7_d' oninput="Change('c7_d');">
+								{% if params.Ld7 %}
+									{% for d in params.Ld7 %}
+										<option value="{{d}}">{{d}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:日</font>
+							<select name='c7_t'>
+								{% if params.Lt7 %}
+									{% for t in params.Lt7 %}
+										<option value="{{t}}">{{t}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<button  name="c7" type="button" onclick="SearchImg('c7');">查詢</button>
+						</div>
+						<div class="col-sm-4" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+							<font class='choose_nr'>8.方位名稱</font>
+							<select name='c8_n' oninput="Change('c8_n');">
+                                <option value="all">全部照片</option>
+								{% if params.Ln8 %}
+									{% for n in params.Ln8 %}
+										<option value="{{n}}">{{n}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<select name='c8_y' oninput="Change('c8_y');">
+								{% if params.Ly8 %}
+									{% for y in params.Ly8 %}
+										<option value="{{y}}">{{y}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:年</font>
+							<select name='c8_m' oninput="Change('c8_m');">
+								{% if params.Lm8 %}
+									{% for m in params.Lm8 %}
+										<option value="{{m}}">{{m}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:月</font>
+							<select name='c8_d' oninput="Change('c8_d');">
+								{% if params.Ld8 %}
+									{% for d in params.Ld8 %}
+										<option value="{{d}}">{{d}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:日</font>
+							<select name='c8_t'>
+								{% if params.Lt8 %}
+									{% for t in params.Lt8 %}
+										<option value="{{t}}">{{t}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<button name="c8" type="button" onclick="SearchImg('c8');">查詢</button>
+						</div>
+						<font class='title'>N0.{{params.tid}} Direction @--</font>
+					</div>
+				</table>
+				<img src='../static/img/ndvi.jpg' name="ndvi" class='img' style='max-width:100%;height: auto;'>
+            	<img src='../static/img/color1.jpg' class='img' style='max-width:100%;height: auto;'>
+				<img src='../static/img/PV.jpg'  name="img" class='img' style='max-width:100%;height: auto;'>
+			</center>
+		</div>
+	</div>
+</body>
+</html>

+ 717 - 0
EdamameProjectTest/app/templates/aim.html

@@ -0,0 +1,717 @@
+<!-- 主操作頁面(im3.php)的外觀設定 -->
+<!DOCTYPE html>
+<html>
+	<head>
+		<title>Welcome to SkyAI</title>
+		<meta charset="utf-8">
+		<meta name="viewport" content="width=device-width, initial-scale=1.0">
+		<!--<meta http-equiv="refresh" content="3">-->
+		<meta http-equiv="pragma" content="no-cache">
+		<meta http-equiv="Cache-Control" CONTENT="no-cache, must-revalidate"> 
+		<meta http-equiv="expires" content="365 days">
+		<script src="../static/js/jquery.min.js"></script>
+		<link rel="stylesheet" href="../static/css/bootstrap.min.css">
+		<script src="../static/js/bootstrap.min.js"></script>
+		<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/10.2.1/bootstrap-slider.min.js"></script>
+		<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/10.2.1/css/bootstrap-slider.min.css">
+		<link rel="stylesheet" href="../static/css/generalstyle.css?<?php echo rand(0,512);?>">
+		<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
+		<meta name="viewport" content="width=device-width, initial-scale=1">
+		<script src="https://cdnjs.cloudflare.com/ajax/libs/paho-mqtt/1.0.1/mqttws31.min.js" type="text/javascript"></script>
+
+		<style>
+			
+			.slider-selection {
+				background: #BABABA;
+			}
+			.slider.slider-horizontal{
+				width: 90%;
+			}
+			#setlight>div>div{
+				display:inline-block;
+				vertical-align:middle;
+			}
+			
+			img {
+			display: block;
+			margin-left: auto;
+			margin-right: auto;
+			}
+			.img1 {
+			display: block;
+			margin-left: auto;
+			margin-right: auto;
+			margin: auto;
+			}
+
+			.detail{
+			font-family: Microsoft JhengHei;
+			border-radius: 100px;
+			background-color: #008CBA;
+			border: none;
+			color: white;
+			padding: 5px 12px;
+			text-align: center;
+			text-decoration: none;
+			display: inline-block;
+			font-size: 1.4em;
+			margin: 4px 2px;
+			cursor: pointer;
+			transition-duration: 0.4s;
+			border: 3px solid white;
+		}
+		.detail:hover {
+			background-color: white; 
+			color: black; 
+			border: 3px solid black;
+		}
+		.title{
+			font-family: Microsoft JhengHei;
+			border-radius: 100px;
+			background-color: #f2f2f2;
+			border: none;
+			color: black;
+			padding: 10px 32px;
+			font-size: 2em;
+		}
+		.font {
+			color: white;
+			font-size: 1.4em;
+		}
+		.font:hover {
+			color: black;
+			font-size: 1.5em;
+		}
+		.sw_number {
+			background-color: white;
+			width:40px;font-size:1.5em;border:1px;border-radius: 100px;
+			border: 3px solid lightgray;
+			color: #337ab7;
+		}
+		.disabled {
+			width:40px;font-size:1.5em;border:1px;border-radius: 100px;
+			border: 3px solid lightgray;
+			background-color:#e0e0e0;
+		}
+		.sw_number:hover {
+			width:40px;
+			font-size:1.5em;
+			border:1px;
+			border-radius: 100px;
+			border: 3px solid lightgreen;
+			background-color: white;
+		}
+		.disabled:hover {
+			width:40px;
+			font-size:1.5em;
+			border:1px;
+			border-radius: 100px;
+			border: 3px solid lightgray;
+			background-color: #e0e0e0;
+		}
+		.choosed {
+			width:40px;
+			font-size:1.5em;
+			border:1px;
+			border-radius: 100px;
+			border: 3px solid red;
+			background-color: white; 
+		}
+		.choose_nr {
+			font-family: Microsoft JhengHei;
+			color: #333333;
+			font-size: 1.7em;
+			/*text-shadow: 1px 2px black;*/
+		}
+		button {
+			background-color: white;
+			border-radius:10px;
+			border: 3px solid lightgray;
+		}
+		
+		.stn{font-size:20px;background-color: white;border-radius:10px;border: 3px solid lightgray;background-color:white;}
+		.atn{font-size:20px;background-color:#25AD87;border-radius:10px;}
+
+		.stl{background-color:#DDDDDD;}
+		.atl{background-color:white;}	
+
+		}		
+		</style>
+		<!--js 特效樣式設定-->
+
+		<script>
+
+            var zoom_now = 0;
+            var node_id = {{params.tid}};
+            if(node_id < 10){
+               	node_id = 'GTW00900200' + node_id;
+            }else{
+				node_id = 'GTW0090020' + node_id;
+            };
+            var imgPath = "../static/img/PV.jpg";
+
+            //控制拍攝預覽照開關
+            var setSwh = 0;
+            var panelSwh = 0;
+
+            //從後端讀取資料,顯示已設定的方位
+			$(function(){
+				{% if params.mode %}
+					{% for j in params.mode %}
+						if({{j}} != 1){
+						    $("input[name=ori" + {{j}} + "]").toggleClass('disabled');
+						};
+					{% endfor %}
+				{% endif %}
+
+				//顯示小兵現在位置以及最新照片
+                $(".zoom").text('{{params.begin_zoom}}');
+                $(".pan-angle").text('{{params.begin_pan_angle}}');
+				$(".tilt-angle").text('{{params.begin_tilt_angle}}');
+				imgPath = '{{params.begin_imgPath}}';
+				$("#img3").attr('src','{{params.begin_imgPath}}');
+			});
+
+            //倍率函數
+			function Zoom(evt){
+				var name = evt.getAttribute('name');
+				var zoom = $(".zoom");
+				var zoom_num = 0;
+				var tilt = $(".tilt-angle");
+				var pan = $(".pan-angle");
+				var tilt_history = $(".tilt-angle-history");
+				var pan_history = $(".pan-angle-history");
+				var zoom_history = $(".zoom-history");
+
+
+				if(name == 'zoom0'){
+					zoom.text('0');
+					zoom_num = 0;
+                    var zoom_diff = (0 - zoom_now).toString();
+                    zoom_now = 0;
+					var command = {"node_id":node_id, "command":"a016", "Zoom":zoom_diff};
+					$.get('/mqtt/' + node_id, command, function(resText){
+					}, 'text');
+				}else if(name == 'zoom1'){
+					zoom.text('1');
+					zoom_num = 1;
+					var zoom_diff = (1 - zoom_now).toString();
+					zoom_now = 1;
+					var command = {"node_id":node_id, "command":"a016", "Zoom":zoom_diff};
+					$.get('/mqtt/' + node_id, command, function(resText){
+					}, 'text');
+				}else if(name == 'zoom2'){
+					zoom.text('2');
+					zoom_num = 2;
+					var zoom_diff = (2 - zoom_now).toString();
+					zoom_now = 2;
+					var command = {"node_id":node_id, "command":"a016", "Zoom":zoom_diff};
+					$.get('/mqtt/' + node_id, command, function(resText){
+					}, 'text');
+				}else if(name == 'zoom3'){
+					zoom.text('3');
+					zoom_num = 3;
+					var zoom_diff = (3 - zoom_now).toString();
+					zoom_now = 3;
+					var command = {"node_id":node_id, "command":"a016", "Zoom":zoom_diff};
+					$.get('/mqtt/' + node_id, command, function(resText){
+					}, 'text');
+				}else if(name == 'zoom4'){
+					zoom.text('4');
+					zoom_num = 4;
+					var zoom_diff = (4 - zoom_now).toString();
+					zoom_now = 4;
+					var command = {"node_id":node_id, "command":"a016", "Zoom":zoom_diff};
+					$.get('/mqtt/' + node_id, command, function(resText){
+					}, 'text');
+				}else{
+					zoom.text('5');
+					zoom_num = 5;
+					var zoom_diff = (5 - zoom_now).toString();
+					zoom_now = 5;
+					var command = {"node_id":node_id, "command":"a016", "Zoom":zoom_diff};
+					$.get('/mqtt/' + node_id, command, function(resText){
+					}, 'text');
+				};
+				$("input[name=zoom]").val(zoom_num);
+				var pan_num = pan.text();
+				var tilt_num = tilt.text();
+				var zoom_num = zoom.text();
+				console.log(zoom_num);
+				tilt_history.text(tilt_num);
+				pan_history.text(pan_num);
+				zoom_history.text(zoom_num);
+
+				panelSwh = 1;
+			};
+
+			//角度函數
+			function Angle(evt){
+				var name = evt.getAttribute('name');
+				var tilt = $(".tilt-angle");
+				var pan = $(".pan-angle");
+				var zoom = $(".zoom");
+				var tilt_history = $(".tilt-angle-history");
+				var pan_history = $(".pan-angle-history");
+				var zoom_history = $(".zoom-history");
+
+				if(name == 'up'){
+					var num = Number(tilt.text()) + 5;
+					if(num > 90){
+						num = 90;
+					};
+					num = num.toString();
+					tilt.text(num);
+					var command = {"node_id":node_id, "command":"a014", "Tilt":tilt.text()};
+					$.get('/mqtt/' + node_id, command, function(resText){
+					}, 'text');
+				}else if(name == 'down'){
+					var num = Number(tilt.text()) - 5;
+					if(num < -25){
+						num = -25;
+					};
+					num = num.toString();
+					tilt.text(num);
+
+					var command = {"node_id":node_id, "command":"a014", "Tilt":tilt.text()};
+					$.get('/mqtt/' + node_id, command, function(resText){
+					}, 'text');
+				}else if(name == 'left'){
+					var num = Number(pan.text()) - 5;
+					if(num == -5){
+						num = 355;
+					};
+					num = num.toString();
+					pan.text(num);
+					var command = {"node_id":node_id, "command":"a012", "Pan":pan.text()};
+					$.get('/mqtt/' + node_id, command, function(resText){
+					}, 'text');
+				}else if(name == 'right'){
+					var num = Number(pan.text()) + 5;
+					if(num == 360){
+						num = 0;
+					};
+					num = num.toString();
+					pan.text(num);
+					var command = {"node_id":node_id, "command":"a012", "Pan":pan.text()};
+					$.get('/mqtt/' + node_id, command, function(resText){
+					}, 'text');
+				}else{
+					tilt.text("0");
+					pan.text("0");
+					zoom.text("0");
+					var command = {"node_id":node_id, "command":"a052"};
+					$.get('/mqtt/' + node_id, command, function(resText){
+					}, 'text');
+				};
+				$("input[name=tilt-angle]").val(tilt.text());
+				$("input[name=pan-angle]").val(pan.text());
+				var pan_num = pan.text();
+				var tilt_num = tilt.text();
+				var zoom_num = zoom.text();
+				tilt_history.text(tilt_num);
+				pan_history.text(pan_num);
+				zoom_history.text(zoom_num);
+
+				panelSwh = 1;
+			};
+
+			//手動拍攝函數
+			function Photo() {
+			    var date = new Date();
+			    var year = (date.getFullYear()).toString();
+			    var month = date.getMonth() + 1;
+			    var day = (date.getDate()).toString();
+			    var hour = date.getHours();
+			    var min = (date.getMinutes()).toString();
+			    if(month < 10){
+			        month = "0" + month;
+                };
+                if(day < 10){
+			        day = "0" + day;
+                };
+			    if(hour < 10){
+			      hour = "0" + hour;
+                };
+                if(min < 10){
+			      min = "0" + min;
+                };
+                var filename = year + "-" + month + "-" + day + "_" + hour + "." + min;
+                var command = {"node_id":node_id, "command": "a051", "position":"0", "time":"1", "filename":filename};
+                $.get('/mqtt/' + node_id, command, function(resText){
+                }, 'text');
+            };
+
+			//從後端讀資料,顯示方位的設定
+			function Orientation(evt){
+				var val = evt.getAttribute('value');
+				var set = $(".set-span");
+				set.text(val);
+				var nr = {{params.tid}};
+				nr = nr.toString();
+				var mode = $(".set-span").text();
+				var json = {"nr":nr, "mode":mode};
+				$.get('/ashoot_setting/' + nr, json, function(resText){
+					$("input[name=ori_name]").val(resText.name);
+					$(".tilt-angle-history").text(resText.tilt_angle);
+					$(".pan-angle-history").text(resText.pan_angle);
+					$(".zoom-history").text(resText.zoom);
+					$("input[name=m_s1]").val(resText.time1.substring(0,2));
+					$("input[name=d_s1]").val(resText.time1.substring(2,4));
+					$("input[name=h_s1]").val(resText.time1.substring(4,6));
+					$("input[name=min_s1]").val(resText.time1.substring(6,8));
+
+					$("input[name=m_s2]").val(resText.time2.substring(0,2));
+					$("input[name=d_s2]").val(resText.time2.substring(2,4));
+					$("input[name=h_s2]").val(resText.time2.substring(4,6));
+					$("input[name=min_s2]").val(resText.time2.substring(6,8));
+
+					$("input[name=m_s3]").val(resText.time3.substring(0,2));
+					$("input[name=d_s3]").val(resText.time3.substring(2,4));
+					$("input[name=h_s3]").val(resText.time3.substring(4,6));
+					$("input[name=min_s3]").val(resText.time3.substring(6,8));
+
+					$("input[name=m_s4]").val(resText.time4.substring(0,2));
+					$("input[name=d_s4]").val(resText.time4.substring(2,4));
+					$("input[name=h_s4]").val(resText.time4.substring(4,6));
+					$("input[name=min_s4]").val(resText.time4.substring(6,8));
+
+					$("input[name=m_s5]").val(resText.time5.substring(0,2));
+					$("input[name=d_s5]").val(resText.time5.substring(2,4));
+					$("input[name=h_s5]").val(resText.time5.substring(4,6));
+					$("input[name=min_s5]").val(resText.time5.substring(6,8));
+
+					$("input[name=m_s6]").val(resText.time6.substring(0,2));
+					$("input[name=d_s6]").val(resText.time6.substring(2,4));
+					$("input[name=h_s6]").val(resText.time6.substring(4,6));
+					$("input[name=min_s6]").val(resText.time6.substring(6,8));
+
+					$("input[name=m_s7]").val(resText.time7.substring(0,2));
+					$("input[name=d_s7]").val(resText.time7.substring(2,4));
+					$("input[name=h_s7]").val(resText.time7.substring(4,6));
+					$("input[name=min_s7]").val(resText.time7.substring(6,8));
+
+					$("input[name=m_s8]").val(resText.time8.substring(0,2));
+					$("input[name=d_s8]").val(resText.time8.substring(2,4));
+					$("input[name=h_s8]").val(resText.time8.substring(4,6));
+					$("input[name=min_s8]").val(resText.time8.substring(6,8));
+
+				}, 'json');
+			};
+
+			//開啟設定
+			function Bts(){
+				document.getElementById("time_set").style.display = 'block';
+
+				setSwh = 1;
+			};
+
+
+			//可見光
+		    function Btn() {
+				document.getElementById("img3").src = imgPath;
+
+				$.post('/video_feed', 'close', function(resText){
+				}, 'text');
+				var command = {"node_id":node_id, "command": "a054"};
+                $.get('/mqtt/' + node_id, command, function(resText){
+                	}, 'text');
+				$("#control_panel").css('display', 'none');
+            };
+
+			//影像串流
+            function Btx() {
+            	var nr = {{params.tid}};
+				nr = nr.toString();
+				var json = {"nr":nr};
+            	document.getElementById("img3").src = "{{url_for('main.video_feed_views')}}";
+                var command = {"node_id":node_id, "command": "a053"};
+                $.get('/mqtt/' + node_id, command, function(resText){
+                	}, 'text');
+
+                $("#control_panel").css('display', 'block');
+            };
+
+
+			//儲存方位
+			function Btsv(){
+				if($("input[name=ori_name]").val() == ''){
+					alert("請輸入方位名稱");
+				}else{
+					var nr = {{params.tid}};
+					nr = nr.toString();
+					var ori_name = $("input[name=ori_name]").val();
+					var mode = $(".set-span").text();
+					var tilt_angle = $(".tilt-angle-history").text();
+					var pan_angle = $(".pan-angle-history").text();
+					var zoom = $(".zoom-history").text();
+					var time1 = $("input[name=m_s1]").val() + $("input[name=d_s1]").val() + $("input[name=h_s1]").val() + $("input[name=min_s1]").val();
+					var time2 = $("input[name=m_s2]").val() + $("input[name=d_s2]").val() + $("input[name=h_s2]").val() + $("input[name=min_s2]").val();
+					var time3 = $("input[name=m_s3]").val() + $("input[name=d_s3]").val() + $("input[name=h_s3]").val() + $("input[name=min_s3]").val();
+					var time4 = $("input[name=m_s4]").val() + $("input[name=d_s4]").val() + $("input[name=h_s4]").val() + $("input[name=min_s4]").val();
+					var time5 = $("input[name=m_s5]").val() + $("input[name=d_s5]").val() + $("input[name=h_s5]").val() + $("input[name=min_s5]").val();
+					var time6 = $("input[name=m_s6]").val() + $("input[name=d_s6]").val() + $("input[name=h_s6]").val() + $("input[name=min_s6]").val();
+					var time7 = $("input[name=m_s7]").val() + $("input[name=d_s7]").val() + $("input[name=h_s7]").val() + $("input[name=min_s7]").val();
+					var time8 = $("input[name=m_s8]").val() + $("input[name=d_s8]").val() + $("input[name=h_s8]").val() + $("input[name=min_s8]").val();
+					var json = {"nr":nr, "ori_name":ori_name, "mode":mode, "tilt_angle":tilt_angle, "pan_angle":pan_angle, "zoom":zoom, "time1":time1, "time2":time2,
+								"time3":time3, "time4":time4, "time5":time5, "time6":time6, "time7":time7, "time8":time8};
+					$.post('/ashoot_setting/' + nr, json, function(resText){}, 'json');
+					if(panelSwh == 1 && setSwh == 1){
+						//預覽照命令
+						var command = {"node_id":node_id, "command":"a018", "position":mode};
+						$.get('/mqtt/' + node_id, command, function(resText){
+						}, 'text');
+						panelSwh = 0;
+						setSwh = 0;
+					};
+					document.getElementById("time_set").style.display = "none";
+					if($("input[name=ori" + mode + "]").attr('class') == 'sw_number disabled'){
+						$("input[name=ori" + mode + "]").toggleClass('disabled');
+					};
+				};
+			};
+
+			//刪除方位
+			function Btd(){
+				var nr = {{params.tid}};
+				nr = nr.toString();
+				var mode = $(".set-span").text();
+				var json = {"nr":nr, "mode":mode, "delete":"ok"};
+				$.get('/ashoot_setting/' + nr, json, function(resText){}, 'json');
+				if($("input[name=ori" + mode + "]").attr('class') == 'sw_number'){
+					$("input[name=ori" + mode + "]").toggleClass('disabled');
+				};
+				document.getElementById("time_set").style.display = "none";
+
+				setSwh = 0;
+			};
+
+			//關閉設定
+			function Btq(){
+				document.getElementById("time_set").style.display = "none";
+
+				setSwh = 0;
+			};
+
+			//跳轉頁面關閉影像串流
+			function CloseImage(){
+				var command = {"node_id":node_id, "command":"a054"};
+				$.get('/mqtt/' + node_id, command, function(resText){
+                }, 'text');
+			};
+
+			//關閉視窗關閉影像串流
+			var isClose = false;
+        	function close(){
+				var command = {"node_id":node_id, "command":"a054"};
+				$.get('/mqtt/' + node_id, command, function(resText){
+                }, 'text');
+                //將server的socket關掉
+                $.post('/video_feed', 'close', function(resText){
+				}, 'text');
+        	};
+        	window.onbeforeunload = function() {
+
+        	};
+        	window.onunload = function() {
+            	if(!isClose){
+                	close();
+            	};
+        	};
+
+
+
+
+		</script>
+		
+	</head>
+	<!-- 進入HTML -->
+	<body>
+		<!-- 介面主選單 -->
+		<div class="container">
+			<div id="header" class="row" style="background-color:#ffffff;">
+	            <div class="col-md-12 col-md-12" style="text-align:center;margin:auto;">
+		             <div class="col-md-4 col-sm-12" style="">
+			              <img src="../static/img/logo_new.png" width="60%" height="7%">
+					 </div>
+					<div class="col-md-6 col-sm-12 text-left" style="">
+		             	<a href="/aindex"><button class="btn btn-danger btn-lg" style="">地形圖</button></a>
+		             	<a href="/ashoot_setting/1"><button class="btn btn-primary btn-lg" style="">拍攝設定</button></a>
+		             	<a href="/aimg_history/{{params.tid}}"><button class="btn btn-danger btn-lg" style="">歷史資料</button></a>
+					</div>
+					<div class="col-md-1 col-sm-12" style="">
+						<a href="/logout"><button class="btn btn-primary btn-lg" style="">登出</button></a>
+					</div>
+	            </div>
+            </div>
+            <div class="col-md-12" style="background-color:red;width:100%;height:5px;margin-top:5px;margin-bottom: 20px;">
+	        </div>
+			<!-- 設定參數外觀 -->
+			<div class="col-sm-12" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+				<center>
+					<h1>{{params.tid}} 號 拍攝設定</h1>
+					<br><br>
+					<a href="/ashoot_setting/1"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px" onclick="CloseImage();">1</button></a>
+					<a href="/ashoot_setting/2"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px" onclick="CloseImage();">2</button></a>
+					<a href="/ashoot_setting/3"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px" onclick="CloseImage();">3</button></a>
+					<a href="/ashoot_setting/4"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px" onclick="CloseImage();">4</button></a>
+					<a href="/ashoot_setting/5"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px" onclick="CloseImage();">5</button></a>
+					<a href="/ashoot_setting/6"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px" onclick="CloseImage();">6</button></a>
+					<a href="/ashoot_setting/7"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px" onclick="CloseImage();">7</button></a>
+					<a href="/ashoot_setting/8"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px" onclick="CloseImage();">8</button></a>
+					<a href="/ashoot_setting/9"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px" onclick="CloseImage();">9</button></a>
+					<a href="/ashoot_setting/10"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px" onclick="CloseImage();">10</button></a>
+					<a href="/ashoot_setting/11"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px" onclick="CloseImage();">11</button></a>
+					<a href="/ashoot_setting/12"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px" onclick="CloseImage();">12</button></a>
+					<a href="/ashoot_setting/13"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px" onclick="CloseImage();">13</button></a>
+					<a href="/ashoot_setting/14"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px" onclick="CloseImage();">14</button></a>
+					<a href="/ashoot_setting/15"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px" onclick="CloseImage();">15</button></a>
+					<a href="/ashoot_setting/16"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px" onclick="CloseImage();">16</button></a>
+					<a href="/ashoot_setting/17"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px" onclick="CloseImage();">17</button></a>
+					<a href="/ashoot_setting/18"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px" onclick="CloseImage();">18</button></a>
+					<a href="/ashoot_setting/19"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px" onclick="CloseImage();">19</button></a>
+					<!-- 預覽畫面設定 -->
+					<div  class="row">
+					<!-- 按鈕顯示圖片切換功能 -->
+						<div class="col-md-12" style="text-align:center;margin-top:5px;">
+							<img id="img3" src="../static/img/PV.jpg" style="max-width:100%;height:auto;">
+						</div>
+						<div class="col-md-12" style="text-align:center;margin-top:5px;">
+							<div class="col-md-6" style="text-align:center;margin-top:5px;">
+								<button id="btn" style="font-size:20px" onclick="Btn()">可見光</button>
+							</div>
+							<div class="col-md-6" style="text-align:center;margin-top:5px;">
+								<button id="btx" style="font-size:20px" onclick="Btx()">影像串流</button>
+							</div>
+						</div>
+					</div>
+					
+				&nbsp;
+				&nbsp;	<form action="/ashoot_setting" method="post">
+					<div id="control_panel" style="display: none;">
+						<div class="col-md-12">
+			    			<!-- 空白的實線 -->
+			    			<div style="background-color:#FFFFFF;width:100%;height:5px;margin-top:5px;"></div>
+			    			<!-- 拍攝控制板外觀 -->
+	            	 		<div class="col-md-3" style="text-align:center;margin-top:5px;">
+	            	   			<p style="text-align:center;font-weight:bold;font-size: 1.7em;">鏡頭方位</p>
+	            	   			<div class="col-md-12" style="text-align:center;margin-top:5px;">
+	            	   	    		<button type="button" name="up" class="sub_1" onclick="Angle(up);" style="width:49px;height:49px;font-size:20px;border-radius:10px;">▲</button>
+	            	   			</div>
+								<div class="col-md-12" style="text-align:center;margin-top:5px;margin-bottom:5px;">
+	            	  				<div class="col-md-4" style="text-align:center;margin-top:5px;padding:0px">
+	            	   	      			<button type="button" name="left" class="sub_3" onclick="Angle(left);" style="width:49px;height:49px;font-size:20px;border-radius:10px;padding:0px">◄</button>
+	            	   	  			</div>
+	            	   	  			<div class="col-md-4" style="text-align:center;margin-top:5px;padding:0px">
+	            	   	  				<button type="button" name="original" class="sub_3" onclick="Angle(original);" style="width:49px;height:49px;font-size:20px;border-radius:10px;padding:0px;font-weight:bold;font-size: 1.7em;">0</button>
+	            	   	  			</div>
+	            	   	  			<div class="col-md-4" style="text-align:center;margin-top:5px;padding:0px">
+	            	   	      			<button type="button" name="right" class="sub_4" onclick="Angle(right);" style="width:49px;height:49px;font-size:20px;border-radius:10px;padding:0px">►</button>
+	            	   	  			</div>
+								</div>
+	            	   			<div class="col-md-12" style="text-align:center;margin-top:5px;">
+	            	   	       		<button type="button" name="down" class="sub_2" onclick="Angle(down);" style="width:49px;height:49px;font-size:20px;border-radius:10px;">▼</button>
+	            	   			</div>
+								<input type="hidden" name="tilt-angle">
+								<input type="hidden" name="pan-angle">
+							</div>
+
+							<div class="col-md-3" style="text-align:center;margin-top:5px;">
+	            	   			<p style="text-align:center;font-weight:bold;font-size: 1.7em;">拍攝倍率</p>
+	            	   			<div class="col-md-12" style="text-align:center;margin-top:5px;">
+	            	   	 			<div class="col-md-12" style="text-align:center;margin-top:5px;">
+	            	   					<button type="button" name="zoom0" class="sub_5" onclick="Zoom(zoom0);" style="width:60px;height:49px;font-size:20px;border-radius:10px;">0倍</button>
+	            	   					<button type="button" name="zoom1" class="sub_6" onclick="Zoom(zoom1);" style="width:60px;height:49px;font-size:20px;border-radius:10px;">1倍</button>
+	            	   				</div>
+	            	   				<div class="col-md-12" style="text-align:center;margin-top:5px;">
+	            	   					<button type="button" name="zoom2" class="sub_6" onclick="Zoom(zoom2);" style="width:60px;height:49px;font-size:20px;border-radius:10px;">2倍</button>
+	            	   					<button type="button" name="zoom3" class="sub_6" onclick="Zoom(zoom3);" style="width:60px;height:49px;font-size:20px;border-radius:10px;">3倍</button>
+	            	   				</div>
+	            	   				<div class="col-md-12" style="text-align:center;margin-top:5px;">
+	            	   					<button type="button" name="zoom4" class="sub_6" onclick="Zoom(zoom4);" style="width:60px;height:49px;font-size:20px;border-radius:10px;">4倍</button>
+	            	   					<button type="button" name="zoom5" class="sub_6" onclick="Zoom(zoom5);" style="width:60px;height:49px;font-size:20px;border-radius:10px;">5倍</button>
+	            	   				</div>
+									<input type="hidden" name="zoom">
+	            	   			</div>
+	               			 </div>
+
+							<div class="col-md-3" style="text-align:center;margin-top:5px;">
+	            	 			<p style="text-align:center;font-weight:bold;font-size: 1.7em;">拍攝</p>
+<!--					  			<form id="form" name="form" method="POST" action="" target="blankFrame">-->
+									<button type="button" name="zoom_in" value="1" class="sub_6" onclick="Photo();" style="width:120px;height:80px;font-size:20px;border-radius:10px"><img src="../static/img/camera.png" style="width:50%;height:70%"></button>
+<!--					  			</form>-->
+	                		</div>
+
+							<div class="col-md-3" style="text-align:center;margin-top:5px;">
+						 		<p style="text-align:center;font-weight:bold;font-size: 1.7em;">定程方位</p>
+	                 	 		<div class="col-md-12" style="text-align:center;margin-top:5px;">
+									<input type='button' class='sw_number' name='ori1' value='1' onclick="Orientation(ori1);" style='font-size:20px;border-radius:10px;'>
+									<input type='button' name='ori2' class='sw_number disabled' value='2' onclick="Orientation(ori2);" style='font-size:20px;border-radius:10px;'>
+									<input type='button' name='ori3' class='sw_number disabled' value='3' onclick="Orientation(ori3);" style='font-size:20px;border-radius:10px;'>
+									<input type='button' name='ori4' class='sw_number disabled' value='4' onclick="Orientation(ori4);" style='font-size:20px;border-radius:10px;'>
+								</div>
+						 		<div class="col-md-12" style="text-align:center;margin-top:5px;">
+									<input type='button' name='ori5' class='sw_number disabled' value='5' onclick="Orientation(ori5);" style='font-size:20px;border-radius:10px;'>
+									<input type='button' name='ori6' class='sw_number disabled' value='6' onclick="Orientation(ori6);" style='font-size:20px;border-radius:10px;'>
+									<input type='button' name='ori7' class='sw_number disabled' value='7' onclick="Orientation(ori7);" style='font-size:20px;border-radius:10px;'>
+									<input type='button' name="ori8" class='sw_number disabled' value='8' onclick="Orientation(ori8);" style='font-size:20px;border-radius:10px;'>
+								</div>
+								<div class="col-md-12" style="text-align:center;margin-top:5px;">
+								 	<button type="button" id="bts" onclick="Bts()" style="width:100px;height:50px;font-size:20px;border-radius:10px;font-weight:bold;font-size: 1.7em;">設定</button>
+							 	</div>
+	                 	 	</div>
+						</div>
+						<p style='text-align:center;font-weight:bold;font-size: 1.7em;'>
+							定程方位 垂直:<span class="tilt-angle">0</span> 度 水平:<span class="pan-angle">0</span> 度 倍率:<span class="zoom">0</span> 倍
+						</p>
+					</div>
+
+
+					<div class="col-md-12" style="text-align:center;margin-top:5px;"></div>
+
+	            	<div id = "time_set" class="col-md-12" style="display: none;">
+	            		<div style="background-color:#FFFFFF;width:100%;height:5px;margin-top:5px;"></div><br>
+	            		<p style="text-align:center;font-weight:bold;font-size: 1.7em;">定程方位設定:</p><br>
+						<p style="text-align:center;font-weight:bold;font-size: 1.7em;">
+							方位名稱 : <input type="text" name="ori_name" placeholder="請輸入方位名稱" style="width:200px;">
+						</p><br>
+	            		<p style="text-align:center;font-weight:bold;font-size: 1.7em;"><span class="set-span">0</span>號 方位設定:</p><br>
+
+	            	
+						<p style='text-align:center;font-weight:bold;font-size: 1.7em;'>定程方位 垂直:<span class="tilt-angle-history">0</span> 度 水平:<span class="pan-angle-history">0</span> 度 倍率:<span class="zoom-history">0</span> 倍</p>
+						<p style='text-align:center;font-weight:bold;font-size: 1.7em;'>拍攝時間:</p><br>
+						<p style='text-align:center;font-weight:bold;font-size: 1.7em;'></p>
+						<div class="col-md-6" style="text-align:center;margin-top:5px;">
+							<p style='text-align:center;font-weight:bold;font-size: 1.7em;'>
+								1.<input type='text' name='m_s1' value='00' style='width:50px;' maxlength="2">月<input type='text' name='d_s1' value='00' style='width:50px;' maxlength="2">日<input type='text' name='h_s1' value='00' style='width:50px;' maxlength="2">時<input type='text' name='min_s1' value='00' style='width:50px;' maxlength="2">分<br><br>
+								3.<input type='text' name='m_s3' value='00' style='width:50px;' maxlength="2">月<input type='text' name='d_s3' value='00' style='width:50px;' maxlength="2">日<input type='text' name='h_s3' value='00' style='width:50px;' maxlength="2">時<input type='text' name='min_s3' value='00' style='width:50px;' maxlength="2">分<br><br>
+								5.<input type='text' name='m_s5' value='00' style='width:50px;' maxlength="2">月<input type='text' name='d_s5' value='00' style='width:50px;' maxlength="2">日<input type='text' name='h_s5' value='00' style='width:50px;' maxlength="2">時<input type='text' name='min_s5' value='00' style='width:50px;' maxlength="2">分<br><br>
+								7.<input type='text' name='m_s7' value='00' style='width:50px;' maxlength="2">月<input type='text' name='d_s7' value='00' style='width:50px;' maxlength="2">日<input type='text' name='h_s7' value='00' style='width:50px;' maxlength="2">時<input type='text' name='min_s7' value='00' style='width:50px;' maxlength="2">分<br><br>
+							</p>
+						</div>
+						<div class="col-md-6" style="text-align:center;margin-top:5px;">
+							<p style='text-align:center;font-weight:bold;font-size: 1.7em;'>
+								2.<input type='text' name='m_s2' value='00' style='width:50px;' maxlength="2">月<input type='text' name='d_s2' value='00' style='width:50px;' maxlength="2">日<input type='text' name='h_s2' value='00' style='width:50px;' maxlength="2">時<input type='text' name='min_s2' value='00' style='width:50px;' maxlength="2">分<br><br>
+								4.<input type='text' name='m_s4' value='00' style='width:50px;' maxlength="2">月<input type='text' name='d_s4' value='00' style='width:50px;' maxlength="2">日<input type='text' name='h_s4' value='00' style='width:50px;' maxlength="2">時<input type='text' name='min_s4' value='00' style='width:50px;' maxlength="2">分<br><br>
+								6.<input type='text' name='m_s6' value='00' style='width:50px;' maxlength="2">月<input type='text' name='d_s6' value='00' style='width:50px;' maxlength="2">日<input type='text' name='h_s6' value='00' style='width:50px;' maxlength="2">時<input type='text' name='min_s6' value='00' style='width:50px;' maxlength="2">分<br><br>
+								8.<input type='text' name='m_s8' value='00' style='width:50px;' maxlength="2">月<input type='text' name='d_s8' value='00' style='width:50px;' maxlength="2">日<input type='text' name='h_s8' value='00' style='width:50px;' maxlength="2">時<input type='text' name='min_s8' value='00' style='width:50px;' maxlength="2">分<br><br>
+							</p>
+						</div>
+						<div class="col-md-12" style="text-align:center;margin-top:5px;">
+							<div class="col-md-4" style="text-align:center;margin-top:5px;">
+								<input type='button' class="btn btn-primary btn-lg" name='submits' onclick="Btsv()" style='font-weight:bold;font-size:20px' value='儲存'>
+							</div>
+							<div class="col-md-4" style="text-align:center;margin-top:5px;">
+								<input type='button' class="btn btn-primary btn-lg" name='delete' onclick="Btd()" style='font-weight:bold;font-size:20px' value='刪除'>
+							</div>
+							<div class="col-md-4" style="text-align:center;margin-top:5px;">
+								<input type='button' id="btq" class="btn btn-primary btn-lg" onclick="Btq()" style='font-weight:bold;font-size:20px' value='關閉'>
+							</div>
+						</div>
+					</div>
+				</form>
+				</center>
+			</div>
+		</div>
+	</body>
+</html>

+ 352 - 0
EdamameProjectTest/app/templates/aindex.html

@@ -0,0 +1,352 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<title>Welcome to SkyAI</title>
+		<meta charset="utf-8">
+		<meta name="viewport" content="width=device-width, initial-scale=1.0">
+		<!--<meta http-equiv="refresh" content="5">-->
+		<meta http-equiv="pragma" content="no-cache">
+		<meta http-equiv="Cache-Control" CONTENT="no-cache, must-revalidate"> 
+		<meta http-equiv="expires" content="365 days">
+		<script src="../static/js/jquery.min.js"></script>
+		<link rel="stylesheet" href="../static/css/bootstrap.min.css">
+		<script src="../static/js/bootstrap.min.js"></script>
+		<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/10.2.1/bootstrap-slider.min.js"></script>
+		<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/10.2.1/css/bootstrap-slider.min.css">
+		<link rel="stylesheet" href="../static/css/generalstyle.css?<?php echo rand(0,512);?>">
+		<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
+		<meta name="viewport" content="width=device-width, initial-scale=1">
+        <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js"></script>
+
+		<style >
+        	html, body, #map-canvas {width:100%;  height: 100%;}
+        </style>
+
+		<script>
+        function initialize() {
+        	var a = -1;
+        var mapOptions = {
+          center: { lat: 22.707340, lng: 120.531000},
+          zoom: 19,
+          mapTypeId: 'satellite',
+        };
+        var position1 = {
+         lat:  22.707508,
+         lng: 120.532132
+        };
+        var position2 = {
+         lat: 22.706996,
+         lng: 120.529765
+        };
+        var position3 = {
+         lat:  22.707200,
+         lng: 120.532090
+        };
+        var position4 = {
+         lat:  22.706900,
+         lng: 120.532040
+        };
+        var position5 = {
+         lat:  22.706684,
+         lng: 120.531459
+        };
+        var position6 = {
+         lat:  22.706813,
+         lng: 120.530876
+        };
+        var position7 = {
+         lat:  22.707066,
+         lng: 120.531099
+        };
+        var position8 = {
+         lat:  22.707340,
+         lng: 120.531166
+        };
+        var position9 = {
+         lat:  22.707611,
+         lng: 120.531440
+        };
+        var position10 = {
+         lat: 22.707549,
+         lng: 120.531845
+        };
+        var position11 = {
+         lat:  22.707300,
+         lng: 120.529820
+        };
+        var position12 = {
+         lat:  22.707576,
+         lng: 120.529871
+        };
+        var position13 = {
+         lat:  22.707791,
+         lng: 120.530245
+        };
+        var position14 = {
+         lat:  22.707726,
+         lng: 120.530770
+        };
+        var position15 = {
+         lat:  22.707360,
+         lng: 120.531087
+        };
+        var position16 = {
+         lat:  22.707086,
+         lng: 120.531013
+        };
+        var position17 = {
+         lat:  22.706867,
+         lng: 120.530592
+        };
+        var position18 = {
+         lat:  22.706946,
+         lng: 120.530130
+        };
+        var map = new google.maps.Map(
+            document.getElementById('map-canvas'),
+            mapOptions);
+
+        var marker1 = new google.maps.Marker({
+        position: position1,
+        map: map,
+        label: '1'
+        });
+        var marker2 = new google.maps.Marker({
+        position: position2,
+        map: map,
+        label: '2'
+        });
+        var marker3 = new google.maps.Marker({
+        position: position3,
+        map: map,
+        label: '3'
+        });
+         var marker4 = new google.maps.Marker({
+        position: position4,
+        map: map,
+        label: '4'
+        });
+        var marker5 = new google.maps.Marker({
+        position: position5,
+        map: map,
+        label: '5'
+        });
+         var marker6 = new google.maps.Marker({
+        position: position6,
+        map: map,
+        label: '6'
+        });
+        var marker7 = new google.maps.Marker({
+        position: position7,
+        map: map,
+        label: '7'
+        });
+         var marker8 = new google.maps.Marker({
+        position: position8,
+        map: map,
+        label: '8'
+        });
+        var marker9 = new google.maps.Marker({
+        position: position9,
+        map: map,
+        label: '9'
+        });
+         var marker10 = new google.maps.Marker({
+        position: position10,
+        map: map,
+        label: '10'
+        });
+        var marker11 = new google.maps.Marker({
+        position: position11,
+        map: map,
+        label: '11'
+        });
+         var marker12 = new google.maps.Marker({
+        position: position12,
+        map: map,
+        label: '12'
+        });
+        var marker13 = new google.maps.Marker({
+        position: position13,
+        map: map,
+        label: '13'
+        });
+         var marker14 = new google.maps.Marker({
+        position: position14,
+        map: map,
+        label: '14'
+        });
+        var marker15 = new google.maps.Marker({
+        position: position15,
+        map: map,
+        label: '15'
+        });
+         var marker16 = new google.maps.Marker({
+        position: position16,
+        map: map,
+        label: '16'
+        });
+        var marker17 = new google.maps.Marker({
+        position: position17,
+        map: map,
+        label: '17'
+        });
+         var marker18 = new google.maps.Marker({
+        position: position18,
+        map: map,
+        label: '18'
+        });    
+
+     
+
+        }
+        google.maps.event.addDomListener(
+          window, 'load', initialize);
+        </script>
+
+		<style>
+		.bg{
+			position:static;
+			width:100%;
+			height: 358px;
+			display:block;
+			margin:auto;
+			background-position: 0px 0px;
+			background-repeat: no-repeat;
+			background-size: 100% 100%;
+			}
+		.logo {
+			 width:35%;
+			 height:100px;
+			 border: 0px;
+			 background-color: #EF7F33;
+			 color:#172987;
+			 text-align:center;
+			 font-size:48px;
+			 margin: auto;
+			 font-family:DFKai-sb;
+			 font-weight:bold;
+			 margin-bottom:15px;
+			}
+		button {
+			background-color: white;
+			border-radius:10px;
+			border: 3px solid lightgray;
+			}
+		img {
+			display: block;
+			margin-left: auto;
+			margin-right: auto;
+			}
+		.img1 {
+			display: block;
+			margin-left: auto;
+			margin-right: auto;
+			margin: auto;
+		}
+
+		.detail{
+			font-family: Microsoft JhengHei;
+			border-radius: 100px;
+			background-color: #008CBA;
+			border: none;
+			color: white;
+			padding: 5px 12px;
+			text-align: center;
+			text-decoration: none;
+			display: inline-block;
+			font-size: 1.4em;
+			margin: 4px 2px;
+			cursor: pointer;
+			transition-duration: 0.4s;
+			border: 3px solid white;
+			}
+		.detail:hover {
+			background-color: white; 
+			color: black; 
+			border: 3px solid black;
+			}
+		.title{
+			font-family: Microsoft JhengHei;
+			border-radius: 100px;
+			background-color: #f2f2f2;
+			border: none;
+			color: black;
+			padding: 10px 32px;
+			font-size: 2em;
+			}
+		.font {
+			color: white;
+			font-size: 1.4em;
+			}
+		.font:hover {
+			color: black;
+			font-size: 1.5em;
+			}
+
+		.choosed {
+		    width: 40px;
+		    font-size: 1.5em;
+		    border: 1px;
+		    border-radius: 100px;
+		    border: 3px solid red;
+		    background-color: white;
+		}
+		.sw_number {
+		    width: 40px;
+		    font-size: 1.5em;
+		    border: 1px;
+		    border-radius: 100px;
+		    border: 3px solid lightgray;
+		}
+		 </style>
+
+	</head>
+	<body>
+		<div class="container">
+			<div id="header" class="row" style="background-color:#ffffff;">
+	            <div class="col-md-12" style="text-align:center;margin-top:5px;">
+		            <div class="col-md-4 col-sm-12" style="">
+			        	<img src="../static/img/logo_new.png" width="60%" height="30%">
+		            </div>
+		            <div class="col-md-4 col-sm-12" style="">
+			        	<a href="/aindex"><button class="btn btn-primary btn-lg" style="">地形圖</button></a>
+						<a href="/cindex/1"><button class="btn btn-primary btn-lg" style="">毛豆車</button></a>
+		            </div>
+					<div class="col-md-4 col-sm-12" style="">
+			        	<a href="/logout"><button class="btn btn-primary btn-lg" style="">登出</button></a>
+		            </div>
+				</div>
+           	</div>
+
+            <div class="col-md-12" style="background-color:red;width:100%;height:5px;margin-top:5px;margin-bottom:20px"></div>
+			<div class="col-sm-12" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+				<center>
+					<font class="title">地形圖</font>
+					<p style="text-align:center;font-weight:bold;font-size: 1.7em;">請選擇攝影機號碼</p>
+					<a href="/ashoot_setting/1"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">1</button></a>
+					<a href="/ashoot_setting/2"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">2</button></a>
+					<a href="/ashoot_setting/3"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">3</button></a>
+					<a href="/ashoot_setting/4"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">4</button></a>
+					<a href="/ashoot_setting/5"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">5</button></a>
+					<a href="/ashoot_setting/6"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">6</button></a>
+					<a href="/ashoot_setting/7"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">7</button></a>
+					<a href="/ashoot_setting/8"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">8</button></a>
+					<a href="/ashoot_setting/9"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">9</button></a>
+					<a href="/ashoot_setting/10"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">10</button></a>
+					<a href="/ashoot_setting/11"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">11</button></a>
+					<a href="/ashoot_setting/12"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">12</button></a>
+					<a href="/ashoot_setting/13"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">13</button></a>
+					<a href="/ashoot_setting/14"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">14</button></a>
+					<a href="/ashoot_setting/15"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">15</button></a>
+					<a href="/ashoot_setting/16"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">16</button></a>
+					<a href="/ashoot_setting/17"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">17</button></a>
+					<a href="/ashoot_setting/18"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">18</button></a>
+					<a href="/ashoot_setting/19"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">19</button></a>
+            		<br>
+            		<div id="map-canvas" class="col-sm-12" style="text-align:center;background-color:#f2f2f2;padding:280px;border:1px;border-radius: 35px;"></div>
+				</center>
+			</div>
+    	</div>
+	</body>
+</html>

+ 216 - 0
EdamameProjectTest/app/templates/allindex.html

@@ -0,0 +1,216 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<title>Welcome to SkyAI</title>
+		<meta charset="utf-8">
+		<meta name="viewport" content="width=device-width, initial-scale=1.0">
+		<meta http-equiv="refresh" content="120">
+		<meta http-equiv="pragma" content="no-cache">
+		<meta http-equiv="Cache-Control" CONTENT="no-cache, must-revalidate">
+		<meta http-equiv="expires" content="365 days">
+		<script src="../static/js/jquery.min.js"></script>
+		<link rel="stylesheet" href="../static/css/bootstrap.min.css">
+		<script src="../static/js/bootstrap.min.js"></script>
+		<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/10.2.1/bootstrap-slider.min.js"></script>
+		<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/10.2.1/css/bootstrap-slider.min.css">
+		<link rel="stylesheet" href="../static/css/generalstyle.css?415">
+		<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
+		<meta name="viewport" content="width=device-width, initial-scale=1">
+		<script src="http://CSS3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
+		<link rel="stylesheet" type="text/css" media="screen and (max-device-width: 400px)" href="tinyScreen.css">
+		<link rel="stylesheet" type="text/css"media="screen and (min-width: 400px) and (max-device-width: 600px)"href="smallScreen.css" />
+		<style>
+			.slider-selection {
+				background: #BABABA;
+			}
+			.slider.slider-horizontal{
+				width: 10%;
+			}
+			#setlight>div>div{
+				display:inline-block;
+				vertical-align:middle;
+			}
+
+			img {
+			display: block;
+			margin-left: auto;
+			margin-right: auto;
+			}
+			.img1 {
+			display: block;
+			margin-left: auto;
+			margin-right: auto;
+			margin: auto;
+			}
+
+			.detail{
+			font-family: Microsoft JhengHei;
+			border-radius: 100px;
+			background-color: #008CBA;
+			border: none;
+			color: white;
+			padding: 5px 12px;
+			text-align: center;
+			text-decoration: none;
+			display: inline-block;
+			font-size: 1.4em;
+			margin: 4px 2px;
+			cursor: pointer;
+			transition-duration: 0.4s;
+			border: 3px solid white;
+		}
+		.detail:hover {
+			background-color: white;
+			color: black;
+			border: 3px solid black;
+		}
+		.title{
+			font-family: Microsoft JhengHei;
+			border-radius: 100px;
+			background-color: #f2f2f2;
+			border: none;
+			color: black;
+			padding: 10px 32px;
+			font-size: 2em;
+		}
+		.font {
+			color: white;
+			font-size: 1.4em;
+		}
+		.font:hover {
+			color: black;
+			font-size: 1.5em;
+		}
+		.sw_number {
+			width:40px;font-size:1.5em;border:1px;border-radius: 100px;
+			border: 3px solid lightgray;
+		}
+		.sw_number:hover {
+			width:40px;
+			font-size:1.5em;
+			border:1px;
+			border-radius: 100px;
+			border: 3px solid lightgreen;
+			background-color: white;
+		}
+		.choosed {
+			width:40px;
+			font-size:1.5em;
+			border:1px;
+			border-radius: 100px;
+			border: 3px solid red;
+			background-color: #DDDDDD;
+		}
+		.choose_nr {
+			font-family: Microsoft JhengHei;
+			color: #333333;
+			font-size: 1.7em;
+			/*text-shadow: 1px 2px black;*/
+		}
+
+		button {
+			background-color: white;
+			border-radius:10px;
+			border: 3px solid lightgray;
+		}
+
+		.stn{font-size:20px;background-color: white;border-radius:10px;border: 3px solid lightgray;background-color:white;}
+		.atn{font-size:20px;background-color:#25AD87;border-radius:10px;}
+
+		.stl{background-color:#DDDDDD;}
+		.atl{background-color:white;}
+		</style>
+		<script>
+
+			function changeColor(num){
+				for(var i=1;i<=8;i++){
+				var str = document.getElementById('sub_'+i);
+					if(i==num){
+						str.className="atn";
+					}
+					else{
+						str.className="stn";
+					}
+				}
+			}
+			function changeColor2(num){
+				for(var i=1;i<=4;i++){
+				var str = document.getElementById('stt_'+i);
+					if(i==num){
+						str.className="atl";
+					}
+					else{
+						str.className="stl";
+					}
+				}
+			}
+		</script>
+	</head>
+	<body>
+		<div class="container">
+			<!DOCTYPE html>
+<html lang="zh-Hant-TW">
+<head>
+	<style>
+		.choosed {
+		    width: 40px;
+		    font-size: 1.5em;
+		    border: 1px;
+		    border-radius: 100px;
+		    border: 3px solid red;
+		    background-color: white;
+		}
+		.sw_number {
+		    width: 40px;
+		    font-size: 1.5em;
+		    border: 1px;
+		    border-radius: 100px;
+		    border: 3px solid lightgray;
+		}
+	</style>
+</head>
+<body>
+
+<div id="header" class="row" style="background-color:#ffffff;">
+	<div class="col-md-8 col-md-12" style="text-align:center;margin:auto;">
+		<div class="col-md-6 col-sm-12" style="">
+			<img src="../static/img/logo_new.png" width="60%" height="30%">
+		</div>
+		<!--<a href="im1.php"><button class="btn btn-primary btn-lg" style="">影像控制</button></a>
+		<a href="/jvt/4/schedule1.php"><button class="btn btn-success btn-lg" style="">定程</button></a>-->
+		<!--<a href="history_jvt.php"><button class="btn btn-danger btn-lg" style="">車輛軌跡</button></a>
+		<a href="history_ndvi1.php"><button class="btn btn-danger btn-lg" style="">NDVI</button></a>
+
+		<a href="im3.php"><button class="btn btn-info btn-lg" style="">車載1</button></a>
+		<a href="im4.php"><button class="btn btn-info btn-lg" style="">車載2</button></a>
+		<a href="im5.php"><button class="btn btn-info btn-lg" style="">車載3</button></a>-->
+		<!--<a href="#"><button class="btn btn-warning btn-lg" style="">智慧貨架</button></a>
+		<a href="#"><button class="btn btn-info btn-lg" style="">使用者設定</button></a-->
+	</div>
+	<div class="col-md-12" style="background-color:red;width:100%;height:5px;margin-top:5px;">
+	</div>
+</div>
+</body>
+</html>
+			<div style="height:20px;"></div>
+				<div class="col-sm-12" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+					<center>
+
+					<table style="width:auto; height:auto" border="0" align="center">
+						<th>
+							<form class="form" name="form" method="get" action="/aindex">
+								<button type="submit" name="up" value="1" id="sub_1" onclick="changeColor('1')" style="width:120px;height:49px;font-size:20px;border-radius:10px;">毛豆田</button>
+							</form>
+						</th>
+						<th>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
+						<th>
+							<form class="form" name="form" method="get" action="/cindex/1">
+								<button type="submit" name="up" value="2" id="sub_2" onclick="changeColor('2')" style="width:120px;height:49px;font-size:20px;border-radius:10px;">毛豆車</button>
+							</form>
+						</th>
+					</table>
+				</center>
+			</div>
+		</div>
+	</body>
+</html>

+ 645 - 0
EdamameProjectTest/app/templates/chistory_ndvi1.html

@@ -0,0 +1,645 @@
+<!DOCTYPE html>
+<html>
+<head>
+	<title>Welcome to SkyAI</title>
+	<meta charset="utf-8">
+	<meta name="viewport" content="width=device-width, initial-scale=1">
+	<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.css">
+	<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
+	<!--<link rel="stylesheet" href="css/b.css">-->
+	<!--<link rel="stylesheet" href="..static/css/generalstyle.css?<?php echo rand(0,512);?>">-->
+	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
+	<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
+	<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
+	<style>
+		.detail{
+			font-family: Microsoft JhengHei;
+			border-radius: 100px;
+			background-color: #008CBA;
+			border: none;
+			color: white;
+			padding: 5px 12px;
+			text-align: center;
+			text-decoration: none;
+			display: inline-block;
+			font-size: 1.4em;
+			margin: 4px 2px;
+			cursor: pointer;
+			transition-duration: 0.4s;
+			border: 3px solid white;
+		}
+		.detail:hover {
+			background-color: white;
+			color: black;
+			border: 3px solid black;
+		}
+		.title{
+			font-family: Microsoft JhengHei;
+			border-radius: 100px;
+			background-color: #f2f2f2;
+			border: none;
+			color: black;
+			padding: 10px 32px;
+			font-size: 2.5em;
+		}
+		.choose_nr {
+			color: #333333;
+			font-size: 1.7em;
+			font-weight:bold;
+			/*text-shadow: 1px 2px black;*/
+		}
+		.sw_number {
+			width:40px;
+			font-size:1.5em;
+			border:1px;
+			border-radius: 100px;
+			border: 3px solid lightgray;
+		}
+		.sw_number:hover {
+			width:40px;
+			font-size:1.5em;
+			border:1px;
+			border-radius: 100px;
+			border: 3px solid lightgreen;
+			background-color: white;
+		}
+		.choosed {
+			width:40px;
+			font-size:1.5em;
+			border:1px;
+			border-radius: 100px;
+			border: 3px solid red;
+			background-color: white;
+		}
+
+		select {
+			border-radius: 2px;
+    		height: 25px;
+    		font-size: 15px;
+		}
+	</style>
+
+	<script>
+		function Change(evt){
+			var nr = {{params.tid}};
+			var l = evt.length;
+			var n = $('select[name=' + evt.substring(0,l-1) + 'n]').val();
+			var y = $('select[name=' + evt.substring(0,l-1) + 'y]').val();
+			var m = $('select[name=' + evt.substring(0,l-1) + 'm]').val();
+			var d = $('select[name=' + evt.substring(0,l-1) + 'd]').val();
+			if(evt.charAt(1) == '_'){
+				var ori = '0';
+			}else if(evt.charAt(1) == '1'){
+				var ori = '1';
+			}else if(evt.charAt(1) == '2'){
+				var ori = '2';
+			}else if(evt.charAt(1) == '3'){
+				var ori = '3';
+			}else if(evt.charAt(1) == '4'){
+				var ori = '4';
+			}else if(evt.charAt(1) == '5'){
+				var ori = '5';
+			}else if(evt.charAt(1) == '6'){
+				var ori = '6';
+			}else if(evt.charAt(1) == '7'){
+				var ori = '7';
+			}else{
+				var ori = '8';
+			};
+
+
+			var json = {"nr":nr, "ori":ori, "n":n, "y":y, "m":m, "d":d, "evt":evt};
+			$.post('/cimg_history/' + nr, json, function(resText){
+				var html_n = '';
+				var html_m = '';
+				var html_d = '';
+				var html_t = '';
+				var l = evt.length;
+				if(evt.substring(l-1) == 'n'){
+					$.each(resText.y, function(i, obj){
+						html_y += '<option value="' + obj + '">' + obj + '</option>';
+						$('select[name=' + evt.substring(0, l-1) + 'y]').html(html_y);
+					});
+					$.each(resText.m, function(i, obj){
+						html_m += '<option value="' + obj + '">' + obj + '</option>';
+						$('select[name=' + evt.substring(0, l-1) + 'm]').html(html_m);
+					});
+					$.each(resText.d, function(i, obj){
+						html_d += '<option value="' + obj + '">' + obj + '</option>';
+						$('select[name=' + evt.substring(0, l-1) + 'd]').html(html_d);
+					});
+					$.each(resText.t, function(i, obj){
+						html_t += '<option value="' + obj + '">' + obj + '</option>';
+						$('select[name=' + evt.substring(0, l-1) + 't]').html(html_t);
+					});
+
+				}else if(evt.substring(l-1) == 'y'){
+					$.each(resText.m, function(i, obj){
+						html_m += '<option value="' + obj + '">' + obj + '</option>';
+						$('select[name=' + evt.substring(0, l-1) + 'm]').html(html_m);
+					});
+					$.each(resText.d, function(i, obj){
+						html_d += '<option value="' + obj + '">' + obj + '</option>';
+						$('select[name=' + evt.substring(0, l-1) + 'd]').html(html_d);
+					});
+					$.each(resText.t, function(i, obj){
+						html_t += '<option value="' + obj + '">' + obj + '</option>';
+						$('select[name=' + evt.substring(0, l-1) + 't]').html(html_t);
+					});
+				}else if(evt.substring(l-1) == 'm'){
+					$.each(resText.d, function(i, obj){
+						html_d += '<option value="' + obj + '">' + obj + '</option>';
+						$('select[name=' + evt.substring(0, l-1) + 'd]').html(html_d);
+					});
+					$.each(resText.t, function(i, obj){
+						html_t += '<option value="' + obj + '">' + obj + '</option>';
+						$('select[name=' + evt.substring(0, l-1) + 't]').html(html_t);
+					});
+				}else{
+					$.each(resText.t, function(i, obj){
+						html_t += '<option value="' + obj + '">' + obj + '</option>';
+						$('select[name=' + evt.substring(0, l-1) + 't]').html(html_t);
+					});
+				};
+
+			}, 'json');
+		};
+
+		function SearchImg(evt){
+			var nr = {{params.tid}};
+			var ori = 0;
+			if(evt == 'c'){
+				ori = 0;
+			}else if(evt == 'c1'){
+				ori = 1;
+			}else if(evt == 'c2'){
+				ori = 2;
+			}else if(evt == 'c3'){
+				ori = 3;
+			}else if(evt == 'c4'){
+				ori = 4;
+			}else if(evt == 'c5'){
+				ori = 5;
+			}else if(evt == 'c6'){
+				ori = 6;
+			}else if(evt == 'c7'){
+				ori = 7;
+			}else if(evt == 'c8'){
+				ori = 8;
+			}else{};
+			var y = $('select[name=' + evt + '_y]').val();
+			var m = $('select[name=' + evt + '_m]').val();
+			var d = $('select[name=' + evt + '_d]').val();
+			var t = $('select[name=' + evt + '_t]').val();
+			if(ori == 0){
+				var ndvi = 'http://60.250.156.234/cust/' + nr + 'm/ndvia/' + y + '-' + m + '-' + d + '_' + t + '.jpg';
+				var img = 'http://60.250.156.234/cust/' + nr + 'm/nj/' + y + '-' + m + '-' + d + '_' + t + '.jpg';
+				$('font[class=title]').text('N0.' + nr +  ' Direction' + '自動' + '@' + y + '-' + m + '-' + d + '_' + t);
+			}else{
+				var ndvi = 'http://60.250.156.234/cust/' + nr + 'm/ndvia' + ori + '/' + y + '-' + m + '-' + d + '_' + t + '.jpg';
+				var img = 'http://60.250.156.234/cust/' + nr + 'm/nj' + ori + '/' + y + '-' + m + '-' + d + '_' + t + '.jpg';
+				$('font[class=title]').text('N0.' + nr +  ' Direction' + ori + ' @' + y + '-' + m + '-' + d + '_' + t);
+			};
+
+			$('img[name=ndvi]').attr('src', ndvi);
+			$('img[name=img]').attr('src', img);
+
+		};
+
+		$(function(){
+			{% if params.ndviImgPath %}
+				$("img[name=ndvi]").attr('src', '{{params.ndviImgPath}}');
+			{% endif %}
+
+			{% if params.imgPath %}
+				$("img[name=img]").attr('src', '{{params.imgPath}}');
+			{% endif %}
+
+			{% if params.year %}
+				$('font[class=title]').text('N0.' + '{{params.tid}}' +  ' Direction' + '{{params.mode}}' + ' @' + '{{params.year}}' + '-' + '{{params.month}}' + '-' + '{{params.day}}' + '_' + '{{params.time}}');
+			{% endif %}
+		});
+
+
+	</script>
+</head>
+<body>
+	<div class="container">
+		<div id="header" class="row" style="background-color:#ffffff;">
+			<div style="height:20px;"></div>
+	    	<div class="col-md-12 col-md-12" style="text-align:center;margin:auto;">
+				<div class="col-md-4 col-sm-12" style="">
+					<img src="../static/img/logo_new.png" width="60%" height="7%">
+				</div>
+				<div class="col-md-6 col-sm-12 text-left" style="">
+					<a href="/cindex/{{params.tid}}"><button class="btn btn-danger btn-lg" style="">地形圖</button></a>
+					<a href="/cshoot_setting/{{params.tid}}"><button class="btn btn-danger btn-lg" style="">拍攝設定</button></a>
+					<a href="/cimg_history/1"><button class="btn btn-primary btn-lg" style="">歷史資料</button></a>
+				</div>
+				<div class="col-md-1 col-sm-12" style="">
+					<a href="/logout"><button class="btn btn-primary btn-lg" style="">登出</button></a>
+				</div>
+	    	</div>
+	    	<div class="col-md-12" style="background-color:red;width:100%;height:5px;margin-top:5px;margin-bottom:20px;"></div>
+        </div>
+
+		<div class="col-sm-12" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+			<center>
+<!--				<?php echo "<font class='title'>$NR  號 NDVI歷史查詢</font>"; ?>-->
+				<h1>{{params.tid}} 號 NDVI歷史查詢</h1>
+				<br>
+				<a href="/cimg_history/1"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">1</button></a>
+				<a href="/cimg_history/2"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">2</button></a>
+				<a href="/cimg_history/3"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">3</button></a>
+				<table style="width:auto; height:auto; border: 20px solid #f2f2f2" border="0" align="center">
+					<div class="col-sm-12" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+						<div class="col-sm-4" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+							<font class="choose_nr">手動</font><br>
+							<select name='c_y' oninput="Change('c_y');">
+								{% if params.Ly %}
+									{% for y in params.Ly %}
+										<option value="{{y}}">{{y}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:年</font>
+							<select name='c_m' oninput="Change('c_m');">
+								{% if params.Lm %}
+									{% for m in params.Lm %}
+										<option value="{{m}}">{{m}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:月</font>
+							<select name='c_d' oninput="Change('c_d');">
+								{% if params.Ld %}
+									{% for d in params.Ld %}
+										<option value="{{d}}">{{d}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:日</font>
+							<select name='c_t'>
+								{% if params.Lt %}
+									{% for t in params.Lt %}
+										<option value="{{t}}">{{t}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<button name="c" type="button" onclick="SearchImg('c');">查詢</button>
+						</div>
+						<div class="col-sm-4" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+							<font class='choose_nr'>1.方位名稱</font>
+							<select name='c1_n' oninput="Change('c1_n');">
+								<option value="all">全部照片</option>
+								{% if params.Ln1 %}
+									{% for n in params.Ln1 %}
+										<option value="{{n}}">{{n}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<select name='c1_y' oninput="Change('c1_y');">
+								{% if params.Ly1 %}
+									{% for y in params.Ly1 %}
+										<option value="{{y}}">{{y}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:年</font>
+							<select name='c1_m' oninput="Change('c1_m');">
+								{% if params.Lm1 %}
+									{% for m in params.Lm1 %}
+										<option value="{{m}}">{{m}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:月</font>
+							<select name='c1_d' oninput="Change('c1_d');">
+								{% if params.Ld1 %}
+									{% for d in params.Ld1 %}
+										<option value="{{d}}">{{d}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:日</font>
+							<select name='c1_t'>
+								{% if params.Lt1 %}
+									{% for t in params.Lt1 %}
+										<option value="{{t}}">{{t}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<button name="c1" type="button" onclick="SearchImg('c1');">查詢</button>
+						</div>
+						<div class="col-sm-4" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+							<font class='choose_nr'>2.方位名稱</font>
+							<select name='c2_n' oninput="Change('c2_n');">
+								<option value="all">全部照片</option>
+								{% if params.Ln2 %}
+									{% for n in params.Ln2 %}
+										<option value="{{n}}">{{n}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<select name='c2_y' oninput="Change('c2_y');">
+								{% if params.Ly2 %}
+									{% for y in params.Ly2 %}
+										<option value="{{y}}">{{y}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:年</font>
+							<select name='c2_m' oninput="Change('c2_m');">
+								{% if params.Lm2 %}
+									{% for m in params.Lm2 %}
+										<option value="{{m}}">{{m}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:月</font>
+							<select name='c2_d' oninput="Change('c2_d');">
+								{% if params.Ld2 %}
+									{% for d in params.Ld2 %}
+										<option value="{{d}}">{{d}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:日</font>
+							<select name='c2_t'>
+								{% if params.Lt2 %}
+									{% for t in params.Lt2 %}
+										<option value="{{t}}">{{t}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<button name="c2" type="button" onclick="SearchImg('c2');">查詢</button>
+						</div>
+						<div class="col-sm-4" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+							<font class='choose_nr'>3.方位名稱</font>
+							<select name='c3_n' oninput="Change('c3_n');">
+								<option value="all">全部照片</option>
+								{% if params.Ln3 %}
+									{% for n in params.Ln3 %}
+										<option value="{{n}}">{{n}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<select name='c3_y' oninput="Change('c3_y');">
+								{% if params.Ly3 %}
+									{% for y in params.Ly3 %}
+										<option value="{{y}}">{{y}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:年</font>
+							<select name='c3_m' oninput="Change('c3_m');">
+								{% if params.Lm3 %}
+									{% for m in params.Lm3 %}
+										<option value="{{m}}">{{m}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:月</font>
+							<select name='c3_d' oninput="Change('c3_d');">
+								{% if params.Ld3 %}
+									{% for d in params.Ld3 %}
+										<option value="{{d}}">{{d}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:日</font>
+							<select name='c3_t'>
+								{% if params.Lt3 %}
+									{% for t in params.Lt3 %}
+										<option value="{{t}}">{{t}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<button name="c3" type="button" onclick="SearchImg('c3');">查詢</button>
+						</div>
+						<div class="col-sm-4" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+							<font class='choose_nr'>4.方位名稱</font>
+							<select name='c4_n' oninput="Change('c4_n');">
+								<option value="all">全部照片</option>
+								{% if params.Ln4 %}
+									{% for n in params.Ln4 %}
+										<option value="{{n}}">{{n}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<select name='c4_y' oninput="Change('c4_y');">
+								{% if params.Ly4 %}
+									{% for y in params.Ly4 %}
+										<option value="{{y}}">{{y}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:年</font>
+							<select name='c4_m' oninput="Change('c4_m');">
+								{% if params.Lm4 %}
+									{% for m in params.Lm4 %}
+										<option value="{{m}}">{{m}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:月</font>
+							<select name='c4_d' oninput="Change('c4_d');">
+								{% if params.Ld4 %}
+									{% for d in params.Ld4 %}
+										<option value="{{d}}">{{d}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:日</font>
+							<select name='c4_t'>
+								{% if params.Lt4 %}
+									{% for t in params.Lt4 %}
+										<option value="{{t}}">{{t}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<button name="c4" type="button" onclick="SearchImg('c4');">查詢</button>
+						</div>
+						<div class="col-sm-4" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+							<font class='choose_nr'>5.方位名稱</font>
+							<select name='c5_n' oninput="Change('c5_n');">
+								<option value="all">全部照片</option>
+								{% if params.Ln5 %}
+									{% for n in params.Ln5 %}
+										<option value="{{n}}">{{n}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<select name='c5_y' oninput="Change('c5_y');">
+								{% if params.Ly5 %}
+									{% for y in params.Ly5 %}
+										<option value="{{y}}">{{y}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:年</font>
+							<select name='c5_m' oninput="Change('c5_m');">
+								{% if params.Lm5 %}
+									{% for m in params.Lm5 %}
+										<option value="{{m}}">{{m}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:月</font>
+							<select name='c5_d' oninput="Change('c5_d');">
+								{% if params.Ld5 %}
+									{% for d in params.Ld5 %}
+										<option value="{{d}}">{{d}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:日</font>
+							<select name='c5_t'>
+								{% if params.Lt5 %}
+									{% for t in params.Lt5 %}
+										<option value="{{t}}">{{t}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<button name="c5" type="button" onclick="SearchImg('c5');">查詢</button>
+						</div>
+						<div class="col-sm-4" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+							<font class='choose_nr'>6.方位名稱</font>
+							<select name='c6_n' oninput="Change('c6_n');">
+								<option value="all">全部照片</option>
+								{% if params.Ln6 %}
+									{% for n in params.Ln6 %}
+										<option value="{{n}}">{{n}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<select name='c6_y' oninput="Change('c6_y');">
+								{% if params.Ly6 %}
+									{% for y in params.Ly6 %}
+										<option value="{{y}}">{{y}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:年</font>
+							<select name='c6_m' oninput="Change('c6_m');">
+								{% if params.Lm6 %}
+									{% for m in params.Lm6 %}
+										<option value="{{m}}">{{m}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:月</font>
+							<select name='c6_d' oninput="Change('c6_d');">
+								{% if params.Ld6 %}
+									{% for d in params.Ld6 %}
+										<option value="{{d}}">{{d}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:日</font>
+							<select name='c6_t'>
+								{% if params.Lt6 %}
+									{% for t in params.Lt6 %}
+										<option value="{{t}}">{{t}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<button name="c6" type="button" onclick="SearchImg('c6');">查詢</button>
+						</div>
+						<div class="col-sm-4" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+							<font class='choose_nr'>7.方位名稱</font>
+							<select name='c7_n' oninput="Change('c7_n');">
+								<option value="all">全部照片</option>
+								{% if params.Ln7 %}
+									{% for n in params.Ln7 %}
+										<option value="{{n}}">{{n}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<select name='c7_y' oninput="Change('c7_y');">
+								{% if params.Ly7 %}
+									{% for y in params.Ly7 %}
+										<option value="{{y}}">{{y}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:年</font>
+							<select name='c7_m' oninput="Change('c7_m');">
+								{% if params.Lm7 %}
+									{% for m in params.Lm7 %}
+										<option value="{{m}}">{{m}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:月</font>
+							<select name='c7_d' oninput="Change('c7_d');">
+								{% if params.Ld7 %}
+									{% for d in params.Ld7 %}
+										<option value="{{d}}">{{d}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:日</font>
+							<select name='c7_t'>
+								{% if params.Lt7 %}
+									{% for t in params.Lt7 %}
+										<option value="{{t}}">{{t}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<button  name="c7" type="button" onclick="SearchImg('c7');">查詢</button>
+						</div>
+						<div class="col-sm-4" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+							<font class='choose_nr'>8.方位名稱</font>
+							<select name='c8_n' oninput="Change('c8_n');">
+								<option value="all">全部照片</option>
+								{% if params.Ln8 %}
+									{% for n in params.Ln8 %}
+										<option value="{{n}}">{{n}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<select name='c8_y' oninput="Change('c8_y');">
+								{% if params.Ly8 %}
+									{% for y in params.Ly8 %}
+										<option value="{{y}}">{{y}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:年</font>
+							<select name='c8_m' oninput="Change('c8_m');">
+								{% if params.Lm8 %}
+									{% for m in params.Lm8 %}
+										<option value="{{m}}">{{m}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:月</font>
+							<select name='c8_d' oninput="Change('c8_d');">
+								{% if params.Ld8 %}
+									{% for d in params.Ld8 %}
+										<option value="{{d}}">{{d}}</option>
+									{% endfor %}
+								{% endif %}
+							</select>
+							<font class='choose_nr'>:日</font>
+							<select name='c8_t'>
+								{% if params.Lt8 %}
+									{% for t in params.Lt8 %}
+										<option value="{{t}}">{{t}}</option>
+									{% endfor %}
+								{% endif %}
+							</select><br>
+							<button name="c8" type="button" onclick="SearchImg('c8');">查詢</button>
+						</div>
+						<font class='title'>N0.{{params.tid}} Direction @--</font>
+					</div>
+				</table>
+				<img src='../static/img/ndvi.jpg' name="ndvi" class='img' style='max-width:100%;height: auto;'>
+            	<img src='../static/img/color1.jpg' class='img' style='max-width:100%;height: auto;'>
+				<img src='../static/img/PV.jpg'  name="img" class='img' style='max-width:100%;height: auto;'>
+			</center>
+		</div>
+	</div>
+</body>
+</html>

+ 708 - 0
EdamameProjectTest/app/templates/cim.html

@@ -0,0 +1,708 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<title>Welcome to SkyAI</title>
+		<meta charset="utf-8">
+		<meta name="viewport" content="width=device-width, initial-scale=1.0">
+		<!--<meta http-equiv="refresh" content="3">-->
+		<meta http-equiv="pragma" content="no-cache">
+		<meta http-equiv="Cache-Control" CONTENT="no-cache, must-revalidate">
+		<meta http-equiv="expires" content="365 days">
+		<script src="../static/js/jquery.min.js"></script>
+		<link rel="stylesheet" href="../static/css/bootstrap.min.css">
+		<script src="../static/js/bootstrap.min.js"></script>
+		<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/10.2.1/bootstrap-slider.min.js"></script>
+		<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/10.2.1/css/bootstrap-slider.min.css">
+		<link rel="stylesheet" href="../static/css/generalstyle.css?<?php echo rand(0,512);?>">
+		<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
+		<meta name="viewport" content="width=device-width, initial-scale=1">
+		<script src="https://cdnjs.cloudflare.com/ajax/libs/paho-mqtt/1.0.1/mqttws31.min.js" type="text/javascript"></script>
+		<style>
+
+
+			.slider-selection {
+				background: #BABABA;
+			}
+			.slider.slider-horizontal{
+				width: 90%;
+			}
+			#setlight>div>div{
+				display:inline-block;
+				vertical-align:middle;
+			}
+
+			img {
+			display: block;
+			margin-left: auto;
+			margin-right: auto;
+			}
+			.img1 {
+			display: block;
+			margin-left: auto;
+			margin-right: auto;
+			margin: auto;
+			}
+
+			.detail{
+			font-family: Microsoft JhengHei;
+			border-radius: 100px;
+			background-color: #008CBA;
+			border: none;
+			color: white;
+			padding: 5px 12px;
+			text-align: center;
+			text-decoration: none;
+			display: inline-block;
+			font-size: 1.4em;
+			margin: 4px 2px;
+			cursor: pointer;
+			transition-duration: 0.4s;
+			border: 3px solid white;
+		}
+		.detail:hover {
+			background-color: white;
+			color: black;
+			border: 3px solid black;
+		}
+		.title{
+			font-family: Microsoft JhengHei;
+			border-radius: 100px;
+			background-color: #f2f2f2;
+			border: none;
+			color: black;
+			padding: 10px 32px;
+			font-size: 2em;
+		}
+		.font {
+			color: white;
+			font-size: 1.4em;
+		}
+		.font:hover {
+			color: black;
+			font-size: 1.5em;
+		}
+		.sw_number {
+			background-color: white;
+			width:40px;font-size:1.5em;border:1px;border-radius: 100px;
+			border: 3px solid lightgray;
+			color: #337ab7;
+		}
+		.disabled {
+			width:40px;font-size:1.5em;border:1px;border-radius: 100px;
+			border: 3px solid lightgray;
+			background-color:#e0e0e0;
+		}
+		.sw_number:hover {
+			width:40px;
+			font-size:1.5em;
+			border:1px;
+			border-radius: 100px;
+			border: 3px solid lightgreen;
+			background-color: white;
+		}
+		.disabled:hover {
+			width:40px;
+			font-size:1.5em;
+			border:1px;
+			border-radius: 100px;
+			border: 3px solid lightgray;
+			background-color: #e0e0e0;
+		}
+		.choosed {
+			width:40px;
+			font-size:1.5em;
+			border:1px;
+			border-radius: 100px;
+			border: 3px solid red;
+			background-color: white;
+		}
+		.choose_nr {
+			font-family: Microsoft JhengHei;
+			color: #333333;
+			font-size: 1.7em;
+			/*text-shadow: 1px 2px black;*/
+		}
+		button {
+			background-color: white;
+			border-radius:10px;
+			border: 3px solid lightgray;
+		}
+
+		.stn{font-size:20px;background-color: white;border-radius:10px;border: 3px solid lightgray;background-color:white;}
+		.atn{font-size:20px;background-color:#25AD87;border-radius:10px;}
+
+		.stl{background-color:#DDDDDD;}
+		.atl{background-color:white;}
+		</style>
+		<!--js 特效樣式設定-->
+		<script>
+			var room_now = 0;
+			var node_id = {{params.tid}};
+            node_id = 'GTW00900100' + node_id;
+            var imgPath = "../static/img/PV.jpg";
+
+            //控制拍攝預覽照開關
+            var setSwh = 0;
+            var panelSwh = 0;
+
+            //從後端讀取資料,顯示已設定的方位
+			$(function(){
+				{% if params.mode %}
+					{% for j in params.mode %}
+						if({{j}} != 1){
+						    $("input[name=ori" + {{j}} + "]").toggleClass('disabled');
+						};
+					{% endfor %}
+				{% endif %}
+
+
+                <!--var json = {"nr": node_id};-->
+                <!--$.get('/orientation/' + node_id, json, function (resText) {-->
+                    <!--zoom_now = resText.zoom;-->
+                    <!--$(".zoom").text(zoom_now);-->
+
+                    <!--var pan = resText.pan_angle;-->
+                    <!--$(".pan-angle").text(pan);-->
+
+					<!--var tilt = resText.tilt_angle;-->
+                    <!--$(".tilt-angle").text(tilt);-->
+
+                    <!--imgPath = resText.img;-->
+                    <!--$("#img3").attr('src',imgPath);-->
+
+                    <!--}, 'json');-->
+
+                //顯示小兵現在位置以及最新照片
+                $(".zoom").text('{{params.begin_zoom}}');
+                $(".pan-angle").text('{{params.begin_pan_angle}}');
+				$(".tilt-angle").text('{{params.begin_tilt_angle}}');
+				imgPath = '{{params.begin_imgPath}}';
+				$("#img3").attr('src','{{params.begin_imgPath}}');
+
+			});
+
+            //倍率函數
+			function Zoom(evt){
+				var name = evt.getAttribute('name');
+				var zoom = $(".zoom");
+				var zoom_num = 0;
+				var tilt = $(".tilt-angle");
+				var pan = $(".pan-angle");
+				var tilt_history = $(".tilt-angle-history");
+				var pan_history = $(".pan-angle-history");
+				var zoom_history = $(".zoom-history");
+
+
+				if(name == 'zoom0'){
+					zoom.text('0');
+					zoom_num = 0;
+                    var zoom_diff = (0 - zoom_now).toString();
+                    zoom_now = 0;
+					var command = {"node_id":node_id, "command":"a016", "Zoom":zoom_diff};
+					$.get('/mqtt/' + node_id, command, function(resText){
+					}, 'text');
+				}else if(name == 'zoom1'){
+					zoom.text('1');
+					zoom_num = 1;
+					var zoom_diff = (1 - zoom_now).toString();
+					zoom_now = 1;
+					var command = {"node_id":node_id, "command":"a016", "Zoom":zoom_diff};
+					$.get('/mqtt/' + node_id, command, function(resText){
+					}, 'text');
+				}else if(name == 'zoom2'){
+					zoom.text('2');
+					zoom_num = 2;
+					var zoom_diff = (2 - zoom_now).toString();
+					zoom_now = 2;
+					var command = {"node_id":node_id, "command":"a016", "Zoom":zoom_diff};
+					$.get('/mqtt/' + node_id, command, function(resText){
+					}, 'text');
+				}else if(name == 'zoom3'){
+					zoom.text('3');
+					zoom_num = 3;
+					var zoom_diff = (3 - zoom_now).toString();
+					zoom_now = 3;
+					var command = {"node_id":node_id, "command":"a016", "Zoom":zoom_diff};
+					$.get('/mqtt/' + node_id, command, function(resText){
+					}, 'text');
+				}else if(name == 'zoom4'){
+					zoom.text('4');
+					zoom_num = 4;
+					var zoom_diff = (4 - zoom_now).toString();
+					zoom_now = 4;
+					var command = {"node_id":node_id, "command":"a016", "Zoom":zoom_diff};
+					$.get('/mqtt/' + node_id, command, function(resText){
+					}, 'text');
+				}else{
+					zoom.text('5');
+					zoom_num = 5;
+					var zoom_diff = (5 - zoom_now).toString();
+					zoom_now = 5;
+					var command = {"node_id":node_id, "command":"a016", "Zoom":zoom_diff};
+					$.get('/mqtt/' + node_id, command, function(resText){
+					}, 'text');
+				};
+				$("input[name=zoom]").val(zoom_num);
+				var pan_num = pan.text();
+				var tilt_num = tilt.text();
+				var zoom_num = zoom.text();
+				tilt_history.text(tilt_num);
+				pan_history.text(pan_num);
+				zoom_history.text(zoom_num);
+				console.log("test");
+
+				panelSwh = 1;
+			};
+
+			////角度函數
+			function Angle(evt){
+				var name = evt.getAttribute('name');
+				var tilt = $(".tilt-angle");
+				var pan = $(".pan-angle");
+				var zoom = $(".zoom");
+				var tilt_history = $(".tilt-angle-history");
+				var pan_history = $(".pan-angle-history");
+				var zoom_history = $(".zoom-history");
+
+				if(name == 'up'){
+					var num = Number(tilt.text()) + 5;
+					if(num > 90){
+						num = 90;
+					};
+					num = num.toString();
+					tilt.text(num);
+					var command = {"node_id":node_id, "command":"a014", "Tilt":tilt.text()};
+					$.get('/mqtt/' + node_id, command, function(resText){
+					}, 'text');
+				}else if(name == 'down'){
+					var num = Number(tilt.text()) - 5;
+					if(num < -25){
+						num = -25;
+					};
+					num = num.toString();
+					tilt.text(num);
+
+					var command = {"node_id":node_id, "command":"a014", "Tilt":tilt.text()};
+					$.get('/mqtt/' + node_id, command, function(resText){
+					}, 'text');
+				}else if(name == 'left'){
+					var num = Number(pan.text()) - 5;
+					if(num == -5){
+						num = 355;
+					};
+					num = num.toString();
+					pan.text(num);
+					var command = {"node_id":node_id, "command":"a012", "Pan":pan.text()};
+					$.get('/mqtt/' + node_id, command, function(resText){
+					}, 'text');
+				}else if(name == 'right'){
+					var num = Number(pan.text()) + 5;
+					if(num == 360){
+						num = 0;
+					};
+					num = num.toString();
+					pan.text(num);
+					var command = {"node_id":node_id, "command":"a012", "Pan":pan.text()};
+					$.get('/mqtt/' + node_id, command, function(resText){
+					}, 'text');
+				}else{
+					tilt.text("0");
+					pan.text("0");
+					zoom.text("0");
+					var command = {"node_id":node_id, "command":"a052"};
+					$.get('/mqtt/' + node_id, command, function(resText){
+					}, 'text');
+				};
+				$("input[name=tilt-angle]").val(tilt.text());
+				$("input[name=pan-angle]").val(pan.text());
+				var pan_num = pan.text();
+				var tilt_num = tilt.text();
+				var zoom_num = zoom.text();
+				tilt_history.text(tilt_num);
+				pan_history.text(pan_num);
+				zoom_history.text(zoom_num);
+
+				panelSwh = 1;
+			};
+
+			//手動拍攝函數
+			function Photo() {
+			    var date = new Date();
+			    var year = (date.getFullYear()).toString();
+			    var month = date.getMonth() + 1;
+			    var day = (date.getDate()).toString();
+			    var hour = date.getHours();
+			    if(month < 10){
+			        month = "0" + month;
+                };
+                if(day < 10){
+			        day = "0" + day;
+                };
+			    if(hour < 10){
+			      hour = "0" + hour;
+                };
+                if(min < 10){
+			      min = "0" + min;
+                };
+                var filename = year + "-" + month + "-" + day + "_" + hour + "." + min;
+                var command = {"node_id":node_id, "command": "a051", "position":"0", "time":"1", "filename":filename};
+                $.get('/mqtt/' + node_id, command, function(resText){
+                }, 'text');
+            };
+
+			//從後端讀資料,顯示方位的設定
+			function Orientation(evt){
+				var val = evt.getAttribute('value');
+				var set = $(".set-span");
+				set.text(val);
+				var nr = {{params.tid}};
+				nr = nr.toString();
+				var mode = $(".set-span").text();
+				var json = {"nr":nr, "mode":mode};
+				$.get('/cshoot_setting/' + nr, json, function(resText){
+					$("input[name=ori_name]").val(resText.name);
+					$(".tilt-angle-history").text(resText.tilt_angle);
+					$(".pan-angle-history").text(resText.pan_angle);
+					$(".zoom-history").text(resText.zoom);
+					$("input[name=m_s1]").val(resText.time1.substring(0,2));
+					$("input[name=d_s1]").val(resText.time1.substring(2,4));
+					$("input[name=h_s1]").val(resText.time1.substring(4,6));
+					$("input[name=min_s1]").val(resText.time1.substring(6,8));
+
+					$("input[name=m_s2]").val(resText.time2.substring(0,2));
+					$("input[name=d_s2]").val(resText.time2.substring(2,4));
+					$("input[name=h_s2]").val(resText.time2.substring(4,6));
+					$("input[name=min_s2]").val(resText.time2.substring(6,8));
+
+					$("input[name=m_s3]").val(resText.time3.substring(0,2));
+					$("input[name=d_s3]").val(resText.time3.substring(2,4));
+					$("input[name=h_s3]").val(resText.time3.substring(4,6));
+					$("input[name=min_s3]").val(resText.time3.substring(6,8));
+
+					$("input[name=m_s4]").val(resText.time4.substring(0,2));
+					$("input[name=d_s4]").val(resText.time4.substring(2,4));
+					$("input[name=h_s4]").val(resText.time4.substring(4,6));
+					$("input[name=min_s4]").val(resText.time4.substring(6,8));
+
+					$("input[name=m_s5]").val(resText.time5.substring(0,2));
+					$("input[name=d_s5]").val(resText.time5.substring(2,4));
+					$("input[name=h_s5]").val(resText.time5.substring(4,6));
+					$("input[name=min_s5]").val(resText.time5.substring(6,8));
+
+					$("input[name=m_s6]").val(resText.time6.substring(0,2));
+					$("input[name=d_s6]").val(resText.time6.substring(2,4));
+					$("input[name=h_s6]").val(resText.time6.substring(4,6));
+					$("input[name=min_s6]").val(resText.time6.substring(6,8));
+
+					$("input[name=m_s7]").val(resText.time7.substring(0,2));
+					$("input[name=d_s7]").val(resText.time7.substring(2,4));
+					$("input[name=h_s7]").val(resText.time7.substring(4,6));
+					$("input[name=min_s7]").val(resText.time7.substring(6,8));
+
+					$("input[name=m_s8]").val(resText.time8.substring(0,2));
+					$("input[name=d_s8]").val(resText.time8.substring(2,4));
+					$("input[name=h_s8]").val(resText.time8.substring(4,6));
+					$("input[name=min_s8]").val(resText.time8.substring(6,8));
+
+				}, 'json');
+			};
+
+            //開啟設定
+			function Bts(){
+				document.getElementById("time_set").style.display = 'block';
+			};
+
+
+
+			//可見光
+		    function Btn() {
+				document.getElementById("img3").src = imgPath;
+				$.post('/video_feed', 'close', function(resText){
+				}, 'text');
+				var command = {"node_id":node_id, "command": "a054"};
+                $.get('/mqtt/' + node_id, command, function(resText){
+                }, 'text');
+				$("#control_panel").css('display', 'none');
+            };
+
+			//影像串流
+            function Btx() {
+            	var nr = {{params.tid}};
+				nr = nr.toString();
+				var json = {"nr":nr};
+            	document.getElementById("img3").src = "{{url_for('main.video_feed_views')}}";
+                var command = {"node_id":node_id, "command": "a053"};
+                $.get('/mqtt/' + node_id, command, function(resText){
+                	}, 'text');
+                $("#control_panel").css('display', 'block');
+            };
+
+
+			//儲存方位
+			function Btsv(){
+				if($("input[name=ori_name]").val() == ''){
+					alert("請輸入方位名稱");
+				}else{
+					var nr = {{params.tid}};
+					nr = nr.toString();
+					var ori_name = $("input[name=ori_name]").val();
+					var mode = $(".set-span").text();
+					var tilt_angle = $(".tilt-angle-history").text();
+					var pan_angle = $(".pan-angle-history").text();
+					var zoom = $(".zoom-history").text();
+					var time1 = $("input[name=m_s1]").val() + $("input[name=d_s1]").val() + $("input[name=h_s1]").val() + $("input[name=min_s1]").val();
+					var time2 = $("input[name=m_s2]").val() + $("input[name=d_s2]").val() + $("input[name=h_s2]").val() + $("input[name=min_s2]").val();
+					var time3 = $("input[name=m_s3]").val() + $("input[name=d_s3]").val() + $("input[name=h_s3]").val() + $("input[name=min_s3]").val();
+					var time4 = $("input[name=m_s4]").val() + $("input[name=d_s4]").val() + $("input[name=h_s4]").val() + $("input[name=min_s4]").val();
+					var time5 = $("input[name=m_s5]").val() + $("input[name=d_s5]").val() + $("input[name=h_s5]").val() + $("input[name=min_s5]").val();
+					var time6 = $("input[name=m_s6]").val() + $("input[name=d_s6]").val() + $("input[name=h_s6]").val() + $("input[name=min_s6]").val();
+					var time7 = $("input[name=m_s7]").val() + $("input[name=d_s7]").val() + $("input[name=h_s7]").val() + $("input[name=min_s7]").val();
+					var time8 = $("input[name=m_s8]").val() + $("input[name=d_s8]").val() + $("input[name=h_s8]").val() + $("input[name=min_s8]").val();
+					var json = {"nr":nr, "ori_name":ori_name, "mode":mode, "tilt_angle":tilt_angle, "pan_angle":pan_angle, "zoom":zoom, "time1":time1, "time2":time2,
+								"time3":time3, "time4":time4, "time5":time5, "time6":time6, "time7":time7, "time8":time8};
+					$.post('/cshoot_setting/' + nr, json, function(resText){}, 'json');
+					if(panelSwh == 1 && setSwh == 1){
+						//預覽照命令
+						var command = {"node_id":node_id, "command":"a018", "position":mode};
+						$.get('/mqtt/' + node_id, command, function(resText){
+						}, 'text');
+						panelSwh = 0;
+						setSwh = 0;
+					};
+					document.getElementById("time_set").style.display = "none";
+					if($("input[name=ori" + mode + "]").attr('class') == 'sw_number disabled'){
+						$("input[name=ori" + mode + "]").toggleClass('disabled');
+					};
+				};
+			};
+
+			//刪除方位
+			function Btd(){
+				var nr = {{params.tid}};
+				nr = nr.toString();
+				var mode = $(".set-span").text();
+				var json = {"nr":nr, "mode":mode, "delete":"ok"};
+				$.get('/cshoot_setting/' + nr, json, function(resText){}, 'json');
+				if($("input[name=ori" + mode + "]").attr('class') == 'sw_number'){
+					$("input[name=ori" + mode + "]").toggleClass('disabled');
+				};
+				document.getElementById("time_set").style.display = "none";
+
+				setSwh = 0;
+			};
+
+			//關閉設定
+			function Btq(){
+				document.getElementById("time_set").style.display = "none";
+
+				setSwh = 0;
+			};
+
+			//跳轉頁面關閉影像串流
+			function CloseImage(){
+				console.log('test');
+				var command = {"node_id":node_id, "command":"a054"};
+				$.get('/mqtt/' + node_id, command, function(resText){
+                }, 'text');
+			};
+
+			//關閉視窗關閉影像串流
+			var isClose = false;
+        	function close(){
+				var command = {"node_id":node_id, "command":"a054"};
+				$.get('/mqtt/' + node_id, command, function(resText){
+                }, 'text');
+                //將server的socket關掉
+                $.post('/video_feed', 'close', function(resText){
+				}, 'text');
+        	};
+        	window.onbeforeunload = function() {
+
+        	};
+        	window.onunload = function() {
+            	if(!isClose){
+                	close();
+            	};
+        	};
+
+		</script>
+
+	</head>
+	<!-- 進入HTML -->
+	<body>
+		<!-- 介面主選單 -->
+		<div class="container">
+			<div id="header" class="row" style="background-color:#ffffff;">
+	            <div class="col-md-12 col-md-12" style="text-align:center;margin:auto;">
+		             <div class="col-md-4 col-sm-12" style="">
+			              <img src="../static/img/logo_new.png" width="60%" height="7%">
+					 </div>
+					<div class="col-md-6 col-sm-12 text-left" style="">
+		             	<a href="/cindex/{{params.tid}}"><button class="btn btn-danger btn-lg" style="">地形圖</button></a>
+		             	<a href="/cshoot_setting/1"><button class="btn btn-primary btn-lg" style="">拍攝設定</button></a>
+		             	<a href="/cimg_history/{{params.tid}}"><button class="btn btn-danger btn-lg" style="">歷史資料</button></a>
+					</div>
+					<div class="col-md-1 col-sm-12 text-left" style="">
+						<a href="/logout"><button class="btn btn-primary btn-lg" style="">登出</button></a>
+					</div>
+	            </div>
+            </div>
+            <div class="col-md-12" style="background-color:red;width:100%;height:5px;margin-top:5px;margin-bottom: 20px;">
+	        </div>
+			<!-- 設定參數外觀 -->
+			<div class="col-sm-12" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+				<center>
+					<h1>{{params.tid}} 號 拍攝設定</h1>
+					<br><br>
+					<a href="/cshoot_setting/1"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px" onclick="CloseImage();">1</button></a>
+					<a href="/cshoot_setting/2"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px" onclick="CloseImage();">2</button></a>
+					<a href="/cshoot_setting/3"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px" onclick="CloseImage();">3</button></a>
+					<!-- 預覽畫面設定 -->
+					<div  class="row">
+					<!-- 按鈕顯示圖片切換功能 -->
+						<div class="col-md-12" style="text-align:center;margin-top:5px;">
+							<img id="img3" src="../static/img/PV.jpg" style="max-width:100%;height:auto;">
+						</div>
+						<div class="col-md-12" style="text-align:center;margin-top:5px;">
+							<div class="col-md-6" style="text-align:center;margin-top:5px;">
+							 	<button id="btn" style="font-size:20px" onclick="Btn()">可見光</button>
+							</div>
+							<div class="col-md-6" style="text-align:center;margin-top:5px;">
+								<button id="btx" style="font-size:20px" onclick="Btx()">影像串流</button>
+							</div>
+						</div>
+					</div>
+
+				&nbsp;
+				&nbsp;
+
+					<form action="" method="post">
+						<div id = "control_panel" style="display: none;">
+							<div class="col-md-12">
+			    				<!-- 空白的實線 -->
+			    				<div style="background-color:#FFFFFF;width:100%;height:5px;margin-top:5px;"></div>
+			    				<!-- 拍攝控制板外觀 -->
+	            	 			<div class="col-md-3" style="text-align:center;margin-top:5px;">
+	            	   				<p style="text-align:center;font-weight:bold;font-size: 1.7em;">鏡頭方位</p>
+	            	   				<div class="col-md-12" style="text-align:center;margin-top:5px;">
+	            	   	    			<button type="button" name="up" class="sub_1" onclick="Angle(up);" style="width:49px;height:49px;font-size:20px;border-radius:10px;">▲</button>
+	            	   				</div>
+									<div class="col-md-12" style="text-align:center;margin-top:5px;margin-bottom:5px;">
+	            	  					<div class="col-md-4" style="text-align:center;margin-top:5px;padding:0px">
+	            	   	      				<button type="button" name="left" class="sub_3" onclick="Angle(left);" style="width:49px;height:49px;font-size:20px;border-radius:10px;padding:0px">◄</button>
+	            	   	  				</div>
+										<div class="col-md-4" style="text-align:center;margin-top:5px;padding:0px">
+											<button type="button" name="original" class="sub_3" onclick="Angle(original);" style="width:49px;height:49px;font-size:20px;border-radius:10px;padding:0px;font-weight:bold;font-size: 1.7em;">0</button>
+										</div>
+	            	   	  				<div class="col-md-4" style="text-align:center;margin-top:5px;padding:0px">
+	            	   	      				<button type="button" name="right" class="sub_4" onclick="Angle(right);" style="width:49px;height:49px;font-size:20px;border-radius:10px;padding:0px">►</button>
+	            	   	  				</div>
+									</div>
+	            	   				<div class="col-md-12" style="text-align:center;margin-top:5px;">
+	            	   	       			<button type="button" name="down" class="sub_2" onclick="Angle(down);" style="width:49px;height:49px;font-size:20px;border-radius:10px;">▼</button>
+	            	   				</div>
+									<input type="hidden" name="tilt-angle">
+									<input type="hidden" name="pan-angle">
+								</div>
+
+								<div class="col-md-3" style="text-align:center;margin-top:5px;">
+	            	   				<p style="text-align:center;font-weight:bold;font-size: 1.7em;">拍攝倍率</p>
+	            	   				<div class="col-md-12" style="text-align:center;margin-top:5px;">
+	            	   	 				<div class="col-md-12" style="text-align:center;margin-top:5px;">
+	            	   						<button type="button" name="zoom0" class="sub_5" onclick="Zoom(zoom0);" style="width:60px;height:49px;font-size:20px;border-radius:10px;">0倍</button>
+	            	   						<button type="button" name="zoom1" class="sub_6" onclick="Zoom(zoom1);" style="width:60px;height:49px;font-size:20px;border-radius:10px;">1倍</button>
+	            	   					</div>
+	            	   					<div class="col-md-12" style="text-align:center;margin-top:5px;">
+	            	   						<button type="button" name="zoom2" class="sub_6" onclick="Zoom(zoom2);" style="width:60px;height:49px;font-size:20px;border-radius:10px;">2倍</button>
+	            	   						<button type="button" name="zoom3" class="sub_6" onclick="Zoom(zoom3);" style="width:60px;height:49px;font-size:20px;border-radius:10px;">3倍</button>
+	            	   					</div>
+	            	   					<div class="col-md-12" style="text-align:center;margin-top:5px;">
+	            	   						<button type="button" name="zoom4" class="sub_6" onclick="Zoom(zoom4);" style="width:60px;height:49px;font-size:20px;border-radius:10px;">4倍</button>
+	            	   						<button type="button" name="zoom5" class="sub_6" onclick="Zoom(zoom5);" style="width:60px;height:49px;font-size:20px;border-radius:10px;">5倍</button>
+	            	   					</div>
+										<input type="hidden" name="zoom">
+	            	   				</div>
+	               			 	</div>
+
+								<div class="col-md-3" style="text-align:center;margin-top:5px;">
+	            	 				<p style="text-align:center;font-weight:bold;font-size: 1.7em;">拍攝</p>
+					  				<!--<form id="form" name="form" method="POST" action="" target="blankFrame">-->
+										<button type="button" name="zoom_in" value="1" class="sub_6" onclick="Photo()" style="width:120px;height:80px;font-size:20px;border-radius:10px"><img src="../static/img/camera.png" style="width:50%;height:70%"></button>
+					  				<!--</form>-->
+	                			</div>
+
+								<div class="col-md-3" style="text-align:center;margin-top:5px;">
+						 			<p style="text-align:center;font-weight:bold;font-size: 1.7em;">定程方位</p>
+	                 	 			<div class="col-md-12" style="text-align:center;margin-top:5px;">
+										<input type='button' class='sw_number' name='ori1' value='1' onclick="Orientation(ori1);" style='font-size:20px;border-radius:10px;'>
+										<input type='button' name='ori2' class='sw_number disabled' value='2' onclick="Orientation(ori2);" style='font-size:20px;border-radius:10px;'>
+										<input type='button' name='ori3' class='sw_number disabled' value='3' onclick="Orientation(ori3);" style='font-size:20px;border-radius:10px;'>
+										<input type='button' name='ori4' class='sw_number disabled' value='4' onclick="Orientation(ori4);" style='font-size:20px;border-radius:10px;'>
+									</div>
+						 			<div class="col-md-12" style="text-align:center;margin-top:5px;">
+										<input type='button' name='ori5' class='sw_number disabled' value='5' onclick="Orientation(ori5);" style='font-size:20px;border-radius:10px;'>
+										<input type='button' name='ori6' class='sw_number disabled' value='6' onclick="Orientation(ori6);" style='font-size:20px;border-radius:10px;'>
+										<input type='button' name='ori7' class='sw_number disabled' value='7' onclick="Orientation(ori7);" style='font-size:20px;border-radius:10px;'>
+										<input type='button' name="ori8" class='sw_number disabled' value='8' onclick="Orientation(ori8);" style='font-size:20px;border-radius:10px;'>
+									</div>
+									<div class="col-md-12" style="text-align:center;margin-top:5px;">
+								 		<button type="button" id="bts" onclick="Bts()" style="width:100px;height:50px;font-size:20px;border-radius:10px;font-weight:bold;font-size: 1.7em;">設定</button>
+							 		</div>
+	                 	 		</div>
+							</div>
+							<p style='text-align:center;font-weight:bold;font-size: 1.7em;'>
+									定程方位 垂直:<span class="tilt-angle">0</span> 度 水平:<span class="pan-angle">0</span> 度 倍率:<span class="zoom">0</span> 倍
+							</p>
+						</div>
+
+
+					<div class="col-md-12" style="text-align:center;margin-top:5px;">
+
+	            	</div>
+
+	            	<div id="time_set" class="col-md-12" style="display: none;">
+	            		<div style="background-color:#FFFFFF;width:100%;height:5px;margin-top:5px;"></div><br>
+	            		<p style="text-align:center;font-weight:bold;font-size: 1.7em;">定程方位設定:</p><br>
+						<p style="text-align:center;font-weight:bold;font-size: 1.7em;">
+							方位名稱 : <input type="text" name="ori_name" placeholder="請輸入方位名稱" style="width:200px;">
+						</p><br>
+	            		<p style="text-align:center;font-weight:bold;font-size: 1.7em;"><span class="set-span">0</span>號 方位設定:</p><br>
+
+
+						<p style='text-align:center;font-weight:bold;font-size: 1.7em;'>定程方位 垂直:<span class="tilt-angle-history">0</span> 度 水平:<span class="pan-angle-history">0</span> 度 倍率:<span class="zoom-history">0</span> 倍</p>
+						<p style='text-align:center;font-weight:bold;font-size: 1.7em;'>拍攝時間:</p><br>
+						<p style='text-align:center;font-weight:bold;font-size: 1.7em;'></p>
+						<div class="col-md-6" style="text-align:center;margin-top:5px;">
+							<p style='text-align:center;font-weight:bold;font-size: 1.7em;'>
+								1.<input type='text' name='m_s1' value='00' style='width:50px;' maxlength="2">月<input type='text' name='d_s1' value='00' style='width:50px;' maxlength="2">日<input type='text' name='h_s1' value='00' style='width:50px;' maxlength="2">時<input type='text' name='min_s1' value='00' style='width:50px;' maxlength="2">分<br><br>
+								3.<input type='text' name='m_s3' value='00' style='width:50px;' maxlength="2">月<input type='text' name='d_s3' value='00' style='width:50px;' maxlength="2">日<input type='text' name='h_s3' value='00' style='width:50px;' maxlength="2">時<input type='text' name='min_s3' value='00' style='width:50px;' maxlength="2">分<br><br>
+								5.<input type='text' name='m_s5' value='00' style='width:50px;' maxlength="2">月<input type='text' name='d_s5' value='00' style='width:50px;' maxlength="2">日<input type='text' name='h_s5' value='00' style='width:50px;' maxlength="2">時<input type='text' name='min_s5' value='00' style='width:50px;' maxlength="2">分<br><br>
+								7.<input type='text' name='m_s7' value='00' style='width:50px;' maxlength="2">月<input type='text' name='d_s7' value='00' style='width:50px;' maxlength="2">日<input type='text' name='h_s7' value='00' style='width:50px;' maxlength="2">時<input type='text' name='min_s7' value='00' style='width:50px;' maxlength="2">分<br><br>
+							</p>
+						</div>
+						<div class="col-md-6" style="text-align:center;margin-top:5px;">
+							<p style='text-align:center;font-weight:bold;font-size: 1.7em;'>
+								2.<input type='text' name='m_s2' value='00' style='width:50px;' maxlength="2">月<input type='text' name='d_s2' value='00' style='width:50px;' maxlength="2">日<input type='text' name='h_s2' value='00' style='width:50px;' maxlength="2">時<input type='text' name='min_s2' value='00' style='width:50px;' maxlength="2">分<br><br>
+								4.<input type='text' name='m_s4' value='00' style='width:50px;' maxlength="2">月<input type='text' name='d_s4' value='00' style='width:50px;' maxlength="2">日<input type='text' name='h_s4' value='00' style='width:50px;' maxlength="2">時<input type='text' name='min_s4' value='00' style='width:50px;' maxlength="2">分<br><br>
+								6.<input type='text' name='m_s6' value='00' style='width:50px;' maxlength="2">月<input type='text' name='d_s6' value='00' style='width:50px;' maxlength="2">日<input type='text' name='h_s6' value='00' style='width:50px;' maxlength="2">時<input type='text' name='min_s6' value='00' style='width:50px;' maxlength="2">分<br><br>
+								8.<input type='text' name='m_s8' value='00' style='width:50px;' maxlength="2">月<input type='text' name='d_s8' value='00' style='width:50px;' maxlength="2">日<input type='text' name='h_s8' value='00' style='width:50px;' maxlength="2">時<input type='text' name='min_s8' value='00' style='width:50px;' maxlength="2">分<br><br>
+							</p>
+						</div>
+						<div class="col-md-12" style="text-align:center;margin-top:5px;">
+							<div class="col-md-4" style="text-align:center;margin-top:5px;">
+								<input type='button' class="btn btn-primary btn-lg" name='submits' onclick="Btsv()" style='font-weight:bold;font-size:20px' value='儲存'>
+							</div>
+							<div class="col-md-4" style="text-align:center;margin-top:5px;">
+								<input type='button' class="btn btn-primary btn-lg" name='delete' onclick="Btd()" style='font-weight:bold;font-size:20px' value='刪除'>
+							</div>
+							<div class="col-md-4" style="text-align:center;margin-top:5px;">
+								<input type='button' id="btq" class="btn btn-primary btn-lg" onclick="Btq()" style='font-weight:bold;font-size:20px' value='關閉'>
+							</div>
+						</div>
+					</div>
+					</form>
+				</center>
+			</div>
+		</div>
+	</body>
+</html>

+ 392 - 0
EdamameProjectTest/app/templates/cindex.html

@@ -0,0 +1,392 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<title>Welcome to SkyAI</title>
+		<meta charset="utf-8">
+		<meta name="viewport" content="width=device-width, initial-scale=1.0">
+		<!--<meta http-equiv="refresh" content="5">-->
+		<meta http-equiv="pragma" content="no-cache">
+		<meta http-equiv="Cache-Control" CONTENT="no-cache, must-revalidate"> 
+		<meta http-equiv="expires" content="365 days">
+		<script src="../static/js/jquery.min.js"></script>
+		<link rel="stylesheet" href="../static/css/bootstrap.min.css">
+		<script src="../static/js/bootstrap.min.js"></script>
+		<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/10.2.1/bootstrap-slider.min.js"></script>
+		<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/10.2.1/css/bootstrap-slider.min.css">
+		<link rel="stylesheet" href="../static/css/generalstyle.css?<?php echo rand(0,512);?>">
+		<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
+		<meta name="viewport" content="width=device-width, initial-scale=1">
+		 <script type="text/javascript"
+        src="https://maps.googleapis.com/maps/api/js">
+        </script>
+        <style >
+        html, body, #map-canvas {width:100%;  height: 100%;}
+        </style>
+        <script>
+        {% if params.gps %}
+        	var lat = {{params.gps[0].lat}};
+        	var lng = {{params.gps[0].lng}};
+        {% else %}
+        	var lat = 22.707340;
+        	var lng = 120.531000;
+        {% endif %}
+
+        function initialize() {
+        	var a = -1;
+
+        var mapOptions = {
+          center: { lat: lat, lng: lng},
+          zoom: 19,
+          mapTypeId: 'satellite',
+        };
+        var position1 = {
+         lat:  22.707508,
+         lng: 120.532132
+        };
+        var position2 = {
+         lat: 22.706996,
+         lng: 120.529765
+        };
+        var position3 = {
+         lat:  22.707200,
+         lng: 120.532090
+        };
+        var position4 = {
+         lat:  22.706900,
+         lng: 120.532040
+        };
+        var position5 = {
+         lat:  22.706684,
+         lng: 120.531459
+        };
+        var position6 = {
+         lat:  22.706813,
+         lng: 120.530876
+        };
+        var position7 = {
+         lat:  22.707066,
+         lng: 120.531099
+        };
+        var position8 = {
+         lat:  22.707340,
+         lng: 120.531166
+        };
+        var position9 = {
+         lat:  22.707611,
+         lng: 120.531440
+        };
+        var position10 = {
+         lat: 22.707549,
+         lng: 120.531845
+        };
+        var position11 = {
+         lat:  22.707300,
+         lng: 120.529820
+        };
+        var position12 = {
+         lat:  22.707576,
+         lng: 120.529871
+        };
+        var position13 = {
+         lat:  22.707791,
+         lng: 120.530245
+        };
+        var position14 = {
+         lat:  22.707726,
+         lng: 120.530770
+        };
+        var position15 = {
+         lat:  22.707360,
+         lng: 120.531087
+        };
+        var position16 = {
+         lat:  22.707086,
+         lng: 120.531013
+        };
+        var position17 = {
+         lat:  22.706867,
+         lng: 120.530592
+        };
+        var position18 = {
+         lat:  22.706946,
+         lng: 120.530130
+        };
+        var map = new google.maps.Map(
+            document.getElementById('map-canvas'),
+            mapOptions);
+
+        var marker1 = new google.maps.Marker({
+        position: position1,
+        map: map,
+        label: '1'
+        });
+
+        var contentString ='<div id="content">' +
+       "<img src='img/PV.jpg' id='img' style='max-width:100%;height:auto;'/>"+
+       "</div>";
+        var infowindow = new google.maps.InfoWindow({
+        content:contentString});
+
+        marker1.addListener('click',function(){
+        a = a * -1;
+        if(a > 0){
+         infowindow.open(map, marker1);
+         }else{
+         infowindow.close();
+         }
+         });
+         var marker2 = new google.maps.Marker({
+        position: position2,
+        map: map,
+        label: '2'
+        });
+        var marker3 = new google.maps.Marker({
+        position: position3,
+        map: map,
+        label: '3'
+        });
+         var marker4 = new google.maps.Marker({
+        position: position4,
+        map: map,
+        label: '4'
+        });
+        var marker5 = new google.maps.Marker({
+        position: position5,
+        map: map,
+        label: '5'
+        });
+         var marker6 = new google.maps.Marker({
+        position: position6,
+        map: map,
+        label: '6'
+        });
+        var marker7 = new google.maps.Marker({
+        position: position7,
+        map: map,
+        label: '7'
+        });
+         var marker8 = new google.maps.Marker({
+        position: position8,
+        map: map,
+        label: '8'
+        });
+        var marker9 = new google.maps.Marker({
+        position: position9,
+        map: map,
+        label: '9'
+        });
+         var marker10 = new google.maps.Marker({
+        position: position10,
+        map: map,
+        label: '10'
+        });
+        var marker11 = new google.maps.Marker({
+        position: position11,
+        map: map,
+        label: '11'
+        });
+         var marker12 = new google.maps.Marker({
+        position: position12,
+        map: map,
+        label: '12'
+        });
+        var marker13 = new google.maps.Marker({
+        position: position13,
+        map: map,
+        label: '13'
+        });
+         var marker14 = new google.maps.Marker({
+        position: position14,
+        map: map,
+        label: '14'
+        });
+        var marker15 = new google.maps.Marker({
+        position: position15,
+        map: map,
+        label: '15'
+        });
+         var marker16 = new google.maps.Marker({
+        position: position16,
+        map: map,
+        label: '16'
+        });
+        var marker17 = new google.maps.Marker({
+        position: position17,
+        map: map,
+        label: '17'
+        });
+         var marker18 = new google.maps.Marker({
+        position: position18,
+        map: map,
+        label: '18'
+        });
+
+
+        var trackPoints = [
+        		{% for g in params.gps %}
+        			new google.maps.LatLng({{g.lat}},{{g.lng}}),
+        		{% endfor %}
+            ];  
+        var trackPath = new google.maps.Polyline({        
+                path: trackPoints,        
+                strokeColor: "#FF0000", // 線條顏色        
+                strokeOpacity: 1.0, // 線條透明度        
+                strokeWeight: 2 // 線條粗細        
+            });  
+        trackPath.setMap(map);       
+
+        }
+        google.maps.event.addDomListener(
+          window, 'load', initialize);
+
+
+          $(function(){
+          	{% if params.queryDate %}
+          		{% if params.month < 10 %}
+          			var month = '0' + {{params.month}};
+          		{% else %}
+          			var month = {{params.month}};
+          		{% endif %}
+          		{% if params.day < 10 %}
+          			var day = '0' + {{params.day}};
+          		{% else %}
+          			var day = {{params.day}};
+          		{% endif %}
+          		$("input[name=date]").val({{params.year}} + '-' + month + '-' + day);
+          	{% endif %}
+          });
+        </script>
+		<style>
+		.bg{
+			position:static;
+			width:100%;
+			height: 358px;
+			display:block;
+			margin:auto;
+			background-position: 0px 0px;
+			background-repeat: no-repeat;
+			background-size: 100% 100%;
+			}
+		.logo {
+			 width:35%;
+			 height:100px;
+			 border: 0px;
+			 background-color: #EF7F33;
+			 color:#172987;
+			 text-align:center;
+			 font-size:48px;
+			 margin: auto;
+			 font-family:DFKai-sb;
+			 font-weight:bold;
+			 margin-bottom:15px;
+			}
+		button {
+			background-color: white;
+			border-radius:10px;
+			border: 3px solid lightgray;
+			}
+		img {
+			display: block;
+			margin-left: auto;
+			margin-right: auto;
+			}
+		.img1 {
+			display: block;
+			margin-left: auto;
+			margin-right: auto;
+			margin: auto;
+		}
+
+		.detail{
+			font-family: Microsoft JhengHei;
+			border-radius: 100px;
+			background-color: #008CBA;
+			border: none;
+			color: white;
+			padding: 5px 12px;
+			text-align: center;
+			text-decoration: none;
+			display: inline-block;
+			font-size: 1.4em;
+			margin: 4px 2px;
+			cursor: pointer;
+			transition-duration: 0.4s;
+			border: 3px solid white;
+			}
+		.detail:hover {
+			background-color: white; 
+			color: black; 
+			border: 3px solid black;
+			}
+		.title{
+			font-family: Microsoft JhengHei;
+			border-radius: 100px;
+			background-color: #f2f2f2;
+			border: none;
+			color: black;
+			padding: 10px 32px;
+			font-size: 2em;
+			}
+		.font {
+			color: white;
+			font-size: 1.4em;
+			}
+		.font:hover {
+			color: black;
+			font-size: 1.5em;
+			}
+
+		.choosed {
+		    width: 40px;
+		    font-size: 1.5em;
+		    border: 1px;
+		    border-radius: 100px;
+		    border: 3px solid red;
+		    background-color: white;
+		}
+		.sw_number {
+		    width: 40px;
+		    font-size: 1.5em;
+		    border: 1px;
+		    border-radius: 100px;
+		    border: 3px solid lightgray;
+		}
+		 </style>
+	</head>
+	<body>
+		<div class="container">
+			<div id="header" class="row" style="background-color:#ffffff;">
+	            <div class="col-md-12" style="text-align:center;margin-top:5px;">
+		            <div class="col-md-4 col-sm-12" style="">
+			        	<img src="../static/img/logo_new.png" width="60%" height="30%">
+		            </div>
+		            <div class="col-md-4 col-sm-12" style="">
+			        	<a href="/cindex/{{params.tid}}"><button class="btn btn-primary btn-lg" style="">車輛軌跡</button></a>
+						<a href="/cshoot_setting/{{params.tid}}"><button class="btn btn-danger btn-lg" style="">拍攝設定</button></a>
+		             	<a href="/cimg_history/{{params.tid}}"><button class="btn btn-danger btn-lg" style="">歷史資料</button></a>
+						<a href="/aindex"><button class="btn btn-danger btn-lg" style="">毛豆田</button></a>
+		            </div>
+					<div class="col-md-4 col-sm-12" style="">
+						<a href="/logout"><button class="btn btn-primary btn-lg" style="">登出</button></a>
+					</div>
+				</div>
+           </div>
+            <div class="col-md-12" style="background-color:red;width:100%;height:5px;margin-top:5px;margin-bottom:20px"></div>
+			<div class="col-sm-12" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
+				<center>
+					<h1>{{params.tid}} 號 車輛軌跡</h1>
+					<p style="text-align:center;font-weight:bold;font-size: 1.7em;">請選擇查詢日期:</p>
+					<form action="/cindex/{{params.tid}}" method="post">
+						<input type="date" name="date">
+						<input type="submit" value="查詢">
+					</form>
+					<a href="/cindex/1"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">1</button></a>
+					<a href="/cindex/2"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">2</button></a>
+					<a href="/cindex/3"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">3</button></a>
+					<br>
+					<div id="map-canvas" class="col-sm-12" style="text-align:center;background-color:#f2f2f2;padding:280px;border:1px;border-radius: 35px;"></div>
+				</center>
+			</div>
+		</div>
+	</body>
+</html>

+ 61 - 0
EdamameProjectTest/app/templates/registration.html

@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>Skyeye</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+
+    <!-- 新 Bootstrap4 核心 CSS 文件 -->
+    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.1.0/css/bootstrap.min.css">
+
+    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
+    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
+
+    <!-- popper.min.js 用于弹窗、提示、下拉菜单 -->
+    <script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script>
+
+    <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
+    <script src="https://cdn.bootcss.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
+
+    <script src="../static/js/registration.js"></script>
+
+    <link rel="stylesheet" href="../static/css/registration.css">
+
+
+</head>
+<body>
+    <div class="container">
+        <div class="row">
+            <div class="col-2"></div>
+            <div class="col">
+                <img src="../static/img/logo_new.png" class="img-fluid">
+                <h1 class="text-center">Registration</h1>
+                <form method="post" action="/register">
+                    <div class="form">
+                        <div class="wrong-info"><span id="username-span"></span></div>
+                        <div class="form-inline">
+                            <label for="usr">User Name</label>
+                            <input type="text" class="form-control" id="usr" name="username">
+                        </div>
+                        <div class="wrong-info"><span id="password-span"></span></div>
+                        <div class="form-inline">
+                            <label for="pwd">Password</label>
+                            <input type="password" class="form-control" id="pwd" name="password">
+                        </div>
+                        <div class="wrong-info"><span></span></div>
+                        <div class="form-inline">
+                            <label for="cpwd">Confirm Password</label>
+                            <input type="password" class="form-control" id="cpwd" name="confirmpwd">
+                        </div>
+                    </div>
+                    <div>
+                        <input type="submit" class="btn btn-info" value="Register">
+                        <input type="button"  class="btn btn-info" value="Cancel" onclick="Login()">
+                    </div>
+                </form>
+            </div>
+            <div class="col-2"></div>
+        </div>
+    </div>
+</body>
+</html>

+ 66 - 0
EdamameProjectTest/app/templates/sign_in.html

@@ -0,0 +1,66 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>Skyeye</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+
+    <!-- 新 Bootstrap4 核心 CSS 文件 -->
+    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.1.0/css/bootstrap.min.css">
+
+    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
+    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
+
+    <!-- popper.min.js 用于弹窗、提示、下拉菜单 -->
+    <script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script>
+
+    <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
+    <script src="https://cdn.bootcss.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
+
+    <script src="../static/js/signin.js"></script>
+
+    <link rel="stylesheet" href="../static/css/sign_in.css">
+
+    {% if errMsg %}
+        <script>
+            $(function(){
+                $(".wrong-span").text("{{errMsg}}");
+            });
+        </script>
+    {% endif %}
+
+</head>
+<body>
+    <div class="container">
+        <div class="row">
+            <div class="col-2"></div>
+            <div class="col">
+                <img src="../static/img/logo_new.png" class="img-fluid">
+                <h1 class="text-center">Sign in</h1>
+                <form method="post" action="/login">
+                    <div class="wrong-info"><span class="wrong-span"></span></div>
+                    <div class="form">
+                        <div class="form-inline">
+                            <label for="usr">Login</label>
+                            <input type="text" class="form-control" id="usr" name="username">
+                        </div>
+                        <div class="form-inline">
+                            <label for="pwd">Password</label>
+                            <input type="password" class="form-control" id="pwd" name="password">
+                        </div>
+                        <div class="radio">
+                            <label><input type="radio" name="rem">  Remember me</label>
+                            <a href="#">Reset password</a>
+                        </div>
+                    </div>
+                    <div>
+                        <input type="submit" class="btn btn-info" value="Log in">
+                        <input type="button"  class="btn btn-info" value="Registration" onclick="Registration();">
+                    </div>
+                </form>
+            </div>
+            <div class="col-2"></div>
+        </div>
+    </div>
+</body>
+</html>

+ 43 - 0
EdamameProjectTest/manage.py

@@ -0,0 +1,43 @@
+#啟動和管理項目
+from app import create_app
+
+app, db, mqtt = create_app()
+
+
+#mqtt訂閱
+@mqtt.on_connect()
+def handle_connect(client, userdata, flags, rc):
+    mqtt.subscribe('AISKY/AppleFarm/MK-G/b8:27:eb:b7:52:9c/Log')
+    mqtt.subscribe('AISKY/AppleFarm/MK-G/b8:27:eb:c1:72:0c/Log')
+    mqtt.subscribe('AISKY/AppleFarm/MK-G/b8:27:eb:84:e9:3f/Log')
+    mqtt.subscribe('AISKY/AppleFarm/MK-G/b8:27:eb:95:00:53/Log')
+    mqtt.subscribe('AISKY/AppleFarm/MK-G/b8:27:eb:e7:51:44/Log')
+    mqtt.subscribe('AISKY/AppleFarm/MK-G/b8:27:eb:ce:a5:35/Log')
+    mqtt.subscribe('AISKY/AppleFarm/MK-G/b8:27:eb:fc:9d:34/Log')
+    mqtt.subscribe('AISKY/AppleFarm/MK-G/b8:27:eb:86:00:c9/Log')
+    mqtt.subscribe('AISKY/AppleFarm/MK-G/b8:27:eb:df:4b:0f/Log')
+    mqtt.subscribe('AISKY/AppleFarm/MK-G/b8:27:eb:6a:5d:17/Log')
+    mqtt.subscribe('AISKY/AppleFarm/MK-G/b8:27:eb:d2:d0:8f/Log')
+    mqtt.subscribe('AISKY/AppleFarm/MK-G/b8:27:eb:57:3c:da/Log')
+    mqtt.subscribe('AISKY/AppleFarm/MK-G/b8:27:eb:bd:29:b1/Log')
+    mqtt.subscribe('AISKY/AppleFarm/MK-G/b8:27:eb:7c:f6:06/Log')
+    mqtt.subscribe('AISKY/AppleFarm/MK-G/b8:27:eb:59:9d:bd/Log')
+    mqtt.subscribe('AISKY/AppleFarm/MK-G/b8:27:eb:e7:21:e5/Log')
+    mqtt.subscribe('AISKY/AppleFarm/MK-G/b8:27:eb:34:9e:39/Log')
+    mqtt.subscribe('AISKY/AppleFarm/MK-G/b8:27:eb:e3:f1:f4/Log')
+    mqtt.subscribe('AISKY/AppleFarm/MK-G/b8:27:eb:f8:24:92/Log')
+    mqtt.subscribe('AISKY/AppleFarm/MK-G/b8:27:eb:9d:68:05/Log')
+    mqtt.subscribe('AISKY/AppleFarm/MK-G/b8:27:eb:4d:e4:34/Log')
+
+#調用日誌訊息
+@mqtt.on_log()
+def handle_logging(client, userdata, level, buf):
+    print(level, buf)
+
+#自動關閉所有未使用、掛著的連接
+@app.teardown_appcontext
+def shutdown_session(exception=None):
+        db.session.remove()
+
+if __name__ == '__main__':
+    app.run(debug=False, host='0.0.0.0', port=5555)

+ 1 - 0
EdamameProjectTest/venv/Lib/site-packages/Flask-1.1.2.dist-info/INSTALLER

@@ -0,0 +1 @@
+pip

+ 28 - 0
EdamameProjectTest/venv/Lib/site-packages/Flask-1.1.2.dist-info/LICENSE.rst

@@ -0,0 +1,28 @@
+Copyright 2010 Pallets
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+1.  Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+
+2.  Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+
+3.  Neither the name of the copyright holder nor the names of its
+    contributors may be used to endorse or promote products derived from
+    this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 137 - 0
EdamameProjectTest/venv/Lib/site-packages/Flask-1.1.2.dist-info/METADATA

@@ -0,0 +1,137 @@
+Metadata-Version: 2.1
+Name: Flask
+Version: 1.1.2
+Summary: A simple framework for building complex web applications.
+Home-page: https://palletsprojects.com/p/flask/
+Author: Armin Ronacher
+Author-email: armin.ronacher@active-4.com
+Maintainer: Pallets
+Maintainer-email: contact@palletsprojects.com
+License: BSD-3-Clause
+Project-URL: Documentation, https://flask.palletsprojects.com/
+Project-URL: Code, https://github.com/pallets/flask
+Project-URL: Issue tracker, https://github.com/pallets/flask/issues
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Web Environment
+Classifier: Framework :: Flask
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
+Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
+Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
+Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
+Requires-Dist: Werkzeug (>=0.15)
+Requires-Dist: Jinja2 (>=2.10.1)
+Requires-Dist: itsdangerous (>=0.24)
+Requires-Dist: click (>=5.1)
+Provides-Extra: dev
+Requires-Dist: pytest ; extra == 'dev'
+Requires-Dist: coverage ; extra == 'dev'
+Requires-Dist: tox ; extra == 'dev'
+Requires-Dist: sphinx ; extra == 'dev'
+Requires-Dist: pallets-sphinx-themes ; extra == 'dev'
+Requires-Dist: sphinxcontrib-log-cabinet ; extra == 'dev'
+Requires-Dist: sphinx-issues ; extra == 'dev'
+Provides-Extra: docs
+Requires-Dist: sphinx ; extra == 'docs'
+Requires-Dist: pallets-sphinx-themes ; extra == 'docs'
+Requires-Dist: sphinxcontrib-log-cabinet ; extra == 'docs'
+Requires-Dist: sphinx-issues ; extra == 'docs'
+Provides-Extra: dotenv
+Requires-Dist: python-dotenv ; extra == 'dotenv'
+
+Flask
+=====
+
+Flask is a lightweight `WSGI`_ web application framework. It is designed
+to make getting started quick and easy, with the ability to scale up to
+complex applications. It began as a simple wrapper around `Werkzeug`_
+and `Jinja`_ and has become one of the most popular Python web
+application frameworks.
+
+Flask offers suggestions, but doesn't enforce any dependencies or
+project layout. It is up to the developer to choose the tools and
+libraries they want to use. There are many extensions provided by the
+community that make adding new functionality easy.
+
+
+Installing
+----------
+
+Install and update using `pip`_:
+
+.. code-block:: text
+
+    pip install -U Flask
+
+
+A Simple Example
+----------------
+
+.. code-block:: python
+
+    from flask import Flask
+
+    app = Flask(__name__)
+
+    @app.route("/")
+    def hello():
+        return "Hello, World!"
+
+.. code-block:: text
+
+    $ env FLASK_APP=hello.py flask run
+     * Serving Flask app "hello"
+     * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
+
+
+Contributing
+------------
+
+For guidance on setting up a development environment and how to make a
+contribution to Flask, see the `contributing guidelines`_.
+
+.. _contributing guidelines: https://github.com/pallets/flask/blob/master/CONTRIBUTING.rst
+
+
+Donate
+------
+
+The Pallets organization develops and supports Flask and the libraries
+it uses. In order to grow the community of contributors and users, and
+allow the maintainers to devote more time to the projects, `please
+donate today`_.
+
+.. _please donate today: https://psfmember.org/civicrm/contribute/transact?reset=1&id=20
+
+
+Links
+-----
+
+* Website: https://palletsprojects.com/p/flask/
+* Documentation: https://flask.palletsprojects.com/
+* Releases: https://pypi.org/project/Flask/
+* Code: https://github.com/pallets/flask
+* Issue tracker: https://github.com/pallets/flask/issues
+* Test status: https://dev.azure.com/pallets/flask/_build
+* Official chat: https://discord.gg/t6rrQZH
+
+.. _WSGI: https://wsgi.readthedocs.io
+.. _Werkzeug: https://www.palletsprojects.com/p/werkzeug/
+.. _Jinja: https://www.palletsprojects.com/p/jinja/
+.. _pip: https://pip.pypa.io/en/stable/quickstart/
+
+

+ 48 - 0
EdamameProjectTest/venv/Lib/site-packages/Flask-1.1.2.dist-info/RECORD

@@ -0,0 +1,48 @@
+../../Scripts/flask.exe,sha256=SdmNSMGNVPrPdNfrWqTVUM2K7Z85h-fcIflHykA8LmU,106379
+Flask-1.1.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
+Flask-1.1.2.dist-info/LICENSE.rst,sha256=SJqOEQhQntmKN7uYPhHg9-HTHwvY-Zp5yESOf_N9B-o,1475
+Flask-1.1.2.dist-info/METADATA,sha256=3INpPWH6nKfZ33R2N-bQZy4TOe1wQCMweZc9mwcNrtc,4591
+Flask-1.1.2.dist-info/RECORD,,
+Flask-1.1.2.dist-info/WHEEL,sha256=8zNYZbwQSXoB9IfXOjPfeNwvAsALAjffgk27FqvCWbo,110
+Flask-1.1.2.dist-info/entry_points.txt,sha256=gBLA1aKg0OYR8AhbAfg8lnburHtKcgJLDU52BBctN0k,42
+Flask-1.1.2.dist-info/top_level.txt,sha256=dvi65F6AeGWVU0TBpYiC04yM60-FX1gJFkK31IKQr5c,6
+flask/__init__.py,sha256=YnA9wkwbJcnb_jTT-nMsMFeFE_UWt33khKzdHmMSuyI,1894
+flask/__main__.py,sha256=fjVtt3QTANXlpJCOv3Ha7d5H-76MwzSIOab7SFD9TEk,254
+flask/__pycache__/__init__.cpython-35.pyc,,
+flask/__pycache__/__main__.cpython-35.pyc,,
+flask/__pycache__/_compat.cpython-35.pyc,,
+flask/__pycache__/app.cpython-35.pyc,,
+flask/__pycache__/blueprints.cpython-35.pyc,,
+flask/__pycache__/cli.cpython-35.pyc,,
+flask/__pycache__/config.cpython-35.pyc,,
+flask/__pycache__/ctx.cpython-35.pyc,,
+flask/__pycache__/debughelpers.cpython-35.pyc,,
+flask/__pycache__/globals.cpython-35.pyc,,
+flask/__pycache__/helpers.cpython-35.pyc,,
+flask/__pycache__/logging.cpython-35.pyc,,
+flask/__pycache__/sessions.cpython-35.pyc,,
+flask/__pycache__/signals.cpython-35.pyc,,
+flask/__pycache__/templating.cpython-35.pyc,,
+flask/__pycache__/testing.cpython-35.pyc,,
+flask/__pycache__/views.cpython-35.pyc,,
+flask/__pycache__/wrappers.cpython-35.pyc,,
+flask/_compat.py,sha256=8KPT54Iig96TuLipdogLRHNYToIcg-xPhnSV5VRERnw,4099
+flask/app.py,sha256=tmEhx_XrIRP24vZg39dHMWFzJ2jj-YxIcd51LaIT5cE,98059
+flask/blueprints.py,sha256=vkdm8NusGsfZUeIfPdCluj733QFmiQcT4Sk1tuZLUjw,21400
+flask/cli.py,sha256=SIb22uq9wYBeB2tKMl0pYdhtZ1MAQyZtPL-3m6es4G0,31035
+flask/config.py,sha256=3dejvQRYfNHw_V7dCLMxU8UNFpL34xIKemN7gHZIZ8Y,10052
+flask/ctx.py,sha256=cks-omGedkxawHFo6bKIrdOHsJCAgg1i_NWw_htxb5U,16724
+flask/debughelpers.py,sha256=-whvPKuAoU8AZ9c1z_INuOeBgfYDqE1J2xNBsoriugU,6475
+flask/globals.py,sha256=OgcHb6_NCyX6-TldciOdKcyj4PNfyQwClxdMhvov6aA,1637
+flask/helpers.py,sha256=IHa578HU_3XAAo1wpXQv24MYRYO5TzaiDQQwvUIcE6Q,43074
+flask/json/__init__.py,sha256=6nITbZYiYOPB8Qfi1-dvsblwn01KRz8VOsMBIZyaYek,11988
+flask/json/__pycache__/__init__.cpython-35.pyc,,
+flask/json/__pycache__/tag.cpython-35.pyc,,
+flask/json/tag.py,sha256=vq9GOllg_0kTWKuVFrwmkeOQzR-jdBD23x-89JyCCQI,8306
+flask/logging.py,sha256=WcY5UkqTysGfmosyygSlXyZYGwOp3y-VsE6ehoJ48dk,3250
+flask/sessions.py,sha256=G0KsEkr_i1LG_wOINwFSOW3ts7Xbv4bNgEZKc7TRloc,14360
+flask/signals.py,sha256=yYLOed2x8WnQ7pirGalQYfpYpCILJ0LJhmNSrnWvjqw,2212
+flask/templating.py,sha256=F8E_IZXn9BGsjMzUJ5N_ACMyZdiFBp_SSEaUunvfZ7g,4939
+flask/testing.py,sha256=WXsciCQbHBP7xjHqNvOA4bT0k86GvSNpgzncfXLDEEg,10146
+flask/views.py,sha256=eeWnadLAj0QdQPLtjKipDetRZyG62CT2y7fNOFDJz0g,5802
+flask/wrappers.py,sha256=kgsvtZuMM6RQaDqhRbc5Pcj9vqTnaERl2pmXcdGL7LU,4736

+ 6 - 0
EdamameProjectTest/venv/Lib/site-packages/Flask-1.1.2.dist-info/WHEEL

@@ -0,0 +1,6 @@
+Wheel-Version: 1.0
+Generator: bdist_wheel (0.33.6)
+Root-Is-Purelib: true
+Tag: py2-none-any
+Tag: py3-none-any
+

+ 3 - 0
EdamameProjectTest/venv/Lib/site-packages/Flask-1.1.2.dist-info/entry_points.txt

@@ -0,0 +1,3 @@
+[console_scripts]
+flask = flask.cli:main
+

+ 1 - 0
EdamameProjectTest/venv/Lib/site-packages/Flask-1.1.2.dist-info/top_level.txt

@@ -0,0 +1 @@
+flask

+ 1 - 0
EdamameProjectTest/venv/Lib/site-packages/Jinja2-2.11.2.dist-info/INSTALLER

@@ -0,0 +1 @@
+pip

+ 28 - 0
EdamameProjectTest/venv/Lib/site-packages/Jinja2-2.11.2.dist-info/LICENSE.rst

@@ -0,0 +1,28 @@
+Copyright 2007 Pallets
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+1.  Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+
+2.  Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+
+3.  Neither the name of the copyright holder nor the names of its
+    contributors may be used to endorse or promote products derived from
+    this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 106 - 0
EdamameProjectTest/venv/Lib/site-packages/Jinja2-2.11.2.dist-info/METADATA

@@ -0,0 +1,106 @@
+Metadata-Version: 2.1
+Name: Jinja2
+Version: 2.11.2
+Summary: A very fast and expressive template engine.
+Home-page: https://palletsprojects.com/p/jinja/
+Author: Armin Ronacher
+Author-email: armin.ronacher@active-4.com
+Maintainer: Pallets
+Maintainer-email: contact@palletsprojects.com
+License: BSD-3-Clause
+Project-URL: Documentation, https://jinja.palletsprojects.com/
+Project-URL: Code, https://github.com/pallets/jinja
+Project-URL: Issue tracker, https://github.com/pallets/jinja/issues
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Web Environment
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
+Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Classifier: Topic :: Text Processing :: Markup :: HTML
+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
+Description-Content-Type: text/x-rst
+Requires-Dist: MarkupSafe (>=0.23)
+Provides-Extra: i18n
+Requires-Dist: Babel (>=0.8) ; extra == 'i18n'
+
+Jinja
+=====
+
+Jinja is a fast, expressive, extensible templating engine. Special
+placeholders in the template allow writing code similar to Python
+syntax. Then the template is passed data to render the final document.
+
+It includes:
+
+-   Template inheritance and inclusion.
+-   Define and import macros within templates.
+-   HTML templates can use autoescaping to prevent XSS from untrusted
+    user input.
+-   A sandboxed environment can safely render untrusted templates.
+-   AsyncIO support for generating templates and calling async
+    functions.
+-   I18N support with Babel.
+-   Templates are compiled to optimized Python code just-in-time and
+    cached, or can be compiled ahead-of-time.
+-   Exceptions point to the correct line in templates to make debugging
+    easier.
+-   Extensible filters, tests, functions, and even syntax.
+
+Jinja's philosophy is that while application logic belongs in Python if
+possible, it shouldn't make the template designer's job difficult by
+restricting functionality too much.
+
+
+Installing
+----------
+
+Install and update using `pip`_:
+
+.. code-block:: text
+
+    $ pip install -U Jinja2
+
+.. _pip: https://pip.pypa.io/en/stable/quickstart/
+
+
+In A Nutshell
+-------------
+
+.. code-block:: jinja
+
+    {% extends "base.html" %}
+    {% block title %}Members{% endblock %}
+    {% block content %}
+      <ul>
+      {% for user in users %}
+        <li><a href="{{ user.url }}">{{ user.username }}</a></li>
+      {% endfor %}
+      </ul>
+    {% endblock %}
+
+
+Links
+-----
+
+-   Website: https://palletsprojects.com/p/jinja/
+-   Documentation: https://jinja.palletsprojects.com/
+-   Releases: https://pypi.org/project/Jinja2/
+-   Code: https://github.com/pallets/jinja
+-   Issue tracker: https://github.com/pallets/jinja/issues
+-   Test status: https://dev.azure.com/pallets/jinja/_build
+-   Official chat: https://discord.gg/t6rrQZH
+
+

+ 59 - 0
EdamameProjectTest/venv/Lib/site-packages/Jinja2-2.11.2.dist-info/RECORD

@@ -0,0 +1,59 @@
+Jinja2-2.11.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
+Jinja2-2.11.2.dist-info/LICENSE.rst,sha256=O0nc7kEF6ze6wQ-vG-JgQI_oXSUrjp3y4JefweCUQ3s,1475
+Jinja2-2.11.2.dist-info/METADATA,sha256=5ZHRZoIRAMHsJPnqhlJ622_dRPsYePYJ-9EH4-Ry7yI,3535
+Jinja2-2.11.2.dist-info/RECORD,,
+Jinja2-2.11.2.dist-info/WHEEL,sha256=kGT74LWyRUZrL4VgLh6_g12IeVl_9u9ZVhadrgXZUEY,110
+Jinja2-2.11.2.dist-info/entry_points.txt,sha256=Qy_DkVo6Xj_zzOtmErrATe8lHZhOqdjpt3e4JJAGyi8,61
+Jinja2-2.11.2.dist-info/top_level.txt,sha256=PkeVWtLb3-CqjWi1fO29OCbj55EhX_chhKrCdrVe_zs,7
+jinja2/__init__.py,sha256=0QCM_jKKDM10yzSdHRVV4mQbCbDqf0GN0GirAqibn9Y,1549
+jinja2/__pycache__/__init__.cpython-35.pyc,,
+jinja2/__pycache__/_compat.cpython-35.pyc,,
+jinja2/__pycache__/_identifier.cpython-35.pyc,,
+jinja2/__pycache__/bccache.cpython-35.pyc,,
+jinja2/__pycache__/compiler.cpython-35.pyc,,
+jinja2/__pycache__/constants.cpython-35.pyc,,
+jinja2/__pycache__/debug.cpython-35.pyc,,
+jinja2/__pycache__/defaults.cpython-35.pyc,,
+jinja2/__pycache__/environment.cpython-35.pyc,,
+jinja2/__pycache__/exceptions.cpython-35.pyc,,
+jinja2/__pycache__/ext.cpython-35.pyc,,
+jinja2/__pycache__/filters.cpython-35.pyc,,
+jinja2/__pycache__/idtracking.cpython-35.pyc,,
+jinja2/__pycache__/lexer.cpython-35.pyc,,
+jinja2/__pycache__/loaders.cpython-35.pyc,,
+jinja2/__pycache__/meta.cpython-35.pyc,,
+jinja2/__pycache__/nativetypes.cpython-35.pyc,,
+jinja2/__pycache__/nodes.cpython-35.pyc,,
+jinja2/__pycache__/optimizer.cpython-35.pyc,,
+jinja2/__pycache__/parser.cpython-35.pyc,,
+jinja2/__pycache__/runtime.cpython-35.pyc,,
+jinja2/__pycache__/sandbox.cpython-35.pyc,,
+jinja2/__pycache__/tests.cpython-35.pyc,,
+jinja2/__pycache__/utils.cpython-35.pyc,,
+jinja2/__pycache__/visitor.cpython-35.pyc,,
+jinja2/_compat.py,sha256=B6Se8HjnXVpzz9-vfHejn-DV2NjaVK-Iewupc5kKlu8,3191
+jinja2/_identifier.py,sha256=EdgGJKi7O1yvr4yFlvqPNEqV6M1qHyQr8Gt8GmVTKVM,1775
+jinja2/asyncfilters.py,sha256=XJtYXTxFvcJ5xwk6SaDL4S0oNnT0wPYvXBCSzc482fI,4250
+jinja2/asyncsupport.py,sha256=ZBFsDLuq3Gtji3Ia87lcyuDbqaHZJRdtShZcqwpFnSQ,7209
+jinja2/bccache.py,sha256=3Pmp4jo65M9FQuIxdxoDBbEDFwe4acDMQf77nEJfrHA,12139
+jinja2/compiler.py,sha256=Ta9W1Lit542wItAHXlDcg0sEOsFDMirCdlFPHAurg4o,66284
+jinja2/constants.py,sha256=RR1sTzNzUmKco6aZicw4JpQpJGCuPuqm1h1YmCNUEFY,1458
+jinja2/debug.py,sha256=neR7GIGGjZH3_ILJGVUYy3eLQCCaWJMXOb7o0kGInWc,8529
+jinja2/defaults.py,sha256=85B6YUUCyWPSdrSeVhcqFVuu_bHUAQXeey--FIwSeVQ,1126
+jinja2/environment.py,sha256=XDSLKc4SqNLMOwTSq3TbWEyA5WyXfuLuVD0wAVjEFwM,50629
+jinja2/exceptions.py,sha256=VjNLawcmf2ODffqVMCQK1cRmvFaUfQWF4u8ouP3QPcE,5425
+jinja2/ext.py,sha256=AtwL5O5enT_L3HR9-oBvhGyUTdGoyaqG_ICtnR_EVd4,26441
+jinja2/filters.py,sha256=_RpPgAlgIj7ExvyDzcHAC3B36cocfWK-1TEketbNeM0,41415
+jinja2/idtracking.py,sha256=J3O4VHsrbf3wzwiBc7Cro26kHb6_5kbULeIOzocchIU,9211
+jinja2/lexer.py,sha256=nUFLRKhhKmmEWkLI65nQePgcQs7qsRdjVYZETMt_v0g,30331
+jinja2/loaders.py,sha256=C-fST_dmFjgWkp0ZuCkrgICAoOsoSIF28wfAFink0oU,17666
+jinja2/meta.py,sha256=QjyYhfNRD3QCXjBJpiPl9KgkEkGXJbAkCUq4-Ur10EQ,4131
+jinja2/nativetypes.py,sha256=Ul__gtVw4xH-0qvUvnCNHedQeNDwmEuyLJztzzSPeRg,2753
+jinja2/nodes.py,sha256=Mk1oJPVgIjnQw9WOqILvcu3rLepcFZ0ahxQm2mbwDwc,31095
+jinja2/optimizer.py,sha256=gQLlMYzvQhluhzmAIFA1tXS0cwgWYOjprN-gTRcHVsc,1457
+jinja2/parser.py,sha256=fcfdqePNTNyvosIvczbytVA332qpsURvYnCGcjDHSkA,35660
+jinja2/runtime.py,sha256=0y-BRyIEZ9ltByL2Id6GpHe1oDRQAwNeQvI0SKobNMw,30618
+jinja2/sandbox.py,sha256=knayyUvXsZ-F0mk15mO2-ehK9gsw04UhB8td-iUOtLc,17127
+jinja2/tests.py,sha256=iO_Y-9Vo60zrVe1lMpSl5sKHqAxe2leZHC08OoZ8K24,4799
+jinja2/utils.py,sha256=OoVMlQe9S2-lWT6jJbTu9tDuDvGNyWUhHDcE51i5_Do,22522
+jinja2/visitor.py,sha256=DUHupl0a4PGp7nxRtZFttUzAi1ccxzqc2hzetPYUz8U,3240

+ 6 - 0
EdamameProjectTest/venv/Lib/site-packages/Jinja2-2.11.2.dist-info/WHEEL

@@ -0,0 +1,6 @@
+Wheel-Version: 1.0
+Generator: bdist_wheel (0.34.2)
+Root-Is-Purelib: true
+Tag: py2-none-any
+Tag: py3-none-any
+

+ 3 - 0
EdamameProjectTest/venv/Lib/site-packages/Jinja2-2.11.2.dist-info/entry_points.txt

@@ -0,0 +1,3 @@
+[babel.extractors]
+jinja2 = jinja2.ext:babel_extract [i18n]
+

+ 1 - 0
EdamameProjectTest/venv/Lib/site-packages/Jinja2-2.11.2.dist-info/top_level.txt

@@ -0,0 +1 @@
+jinja2

+ 1 - 0
EdamameProjectTest/venv/Lib/site-packages/MarkupSafe-1.1.1.dist-info/INSTALLER

@@ -0,0 +1 @@
+pip

+ 28 - 0
EdamameProjectTest/venv/Lib/site-packages/MarkupSafe-1.1.1.dist-info/LICENSE.rst

@@ -0,0 +1,28 @@
+Copyright 2010 Pallets
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+1.  Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+
+2.  Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+
+3.  Neither the name of the copyright holder nor the names of its
+    contributors may be used to endorse or promote products derived from
+    this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 103 - 0
EdamameProjectTest/venv/Lib/site-packages/MarkupSafe-1.1.1.dist-info/METADATA

@@ -0,0 +1,103 @@
+Metadata-Version: 2.1
+Name: MarkupSafe
+Version: 1.1.1
+Summary: Safely add untrusted strings to HTML/XML markup.
+Home-page: https://palletsprojects.com/p/markupsafe/
+Author: Armin Ronacher
+Author-email: armin.ronacher@active-4.com
+Maintainer: The Pallets Team
+Maintainer-email: contact@palletsprojects.com
+License: BSD-3-Clause
+Project-URL: Documentation, https://markupsafe.palletsprojects.com/
+Project-URL: Code, https://github.com/pallets/markupsafe
+Project-URL: Issue tracker, https://github.com/pallets/markupsafe/issues
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Web Environment
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Classifier: Topic :: Text Processing :: Markup :: HTML
+Requires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*
+
+MarkupSafe
+==========
+
+MarkupSafe implements a text object that escapes characters so it is
+safe to use in HTML and XML. Characters that have special meanings are
+replaced so that they display as the actual characters. This mitigates
+injection attacks, meaning untrusted user input can safely be displayed
+on a page.
+
+
+Installing
+----------
+
+Install and update using `pip`_:
+
+.. code-block:: text
+
+    pip install -U MarkupSafe
+
+.. _pip: https://pip.pypa.io/en/stable/quickstart/
+
+
+Examples
+--------
+
+.. code-block:: pycon
+
+    >>> from markupsafe import Markup, escape
+    >>> # escape replaces special characters and wraps in Markup
+    >>> escape('<script>alert(document.cookie);</script>')
+    Markup(u'&lt;script&gt;alert(document.cookie);&lt;/script&gt;')
+    >>> # wrap in Markup to mark text "safe" and prevent escaping
+    >>> Markup('<strong>Hello</strong>')
+    Markup('<strong>hello</strong>')
+    >>> escape(Markup('<strong>Hello</strong>'))
+    Markup('<strong>hello</strong>')
+    >>> # Markup is a text subclass (str on Python 3, unicode on Python 2)
+    >>> # methods and operators escape their arguments
+    >>> template = Markup("Hello <em>%s</em>")
+    >>> template % '"World"'
+    Markup('Hello <em>&#34;World&#34;</em>')
+
+
+Donate
+------
+
+The Pallets organization develops and supports MarkupSafe and other
+libraries that use it. In order to grow the community of contributors
+and users, and allow the maintainers to devote more time to the
+projects, `please donate today`_.
+
+.. _please donate today: https://palletsprojects.com/donate
+
+
+Links
+-----
+
+*   Website: https://palletsprojects.com/p/markupsafe/
+*   Documentation: https://markupsafe.palletsprojects.com/
+*   License: `BSD-3-Clause <https://github.com/pallets/markupsafe/blob/master/LICENSE.rst>`_
+*   Releases: https://pypi.org/project/MarkupSafe/
+*   Code: https://github.com/pallets/markupsafe
+*   Issue tracker: https://github.com/pallets/markupsafe/issues
+*   Test status:
+
+    *   Linux, Mac: https://travis-ci.org/pallets/markupsafe
+    *   Windows: https://ci.appveyor.com/project/pallets/markupsafe
+
+*   Test coverage: https://codecov.io/gh/pallets/markupsafe
+
+

+ 15 - 0
EdamameProjectTest/venv/Lib/site-packages/MarkupSafe-1.1.1.dist-info/RECORD

@@ -0,0 +1,15 @@
+MarkupSafe-1.1.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
+MarkupSafe-1.1.1.dist-info/LICENSE.rst,sha256=SJqOEQhQntmKN7uYPhHg9-HTHwvY-Zp5yESOf_N9B-o,1475
+MarkupSafe-1.1.1.dist-info/METADATA,sha256=nJHwJ4_4ka-V39QH883jPrslj6inNdyyNASBXbYgHXQ,3570
+MarkupSafe-1.1.1.dist-info/RECORD,,
+MarkupSafe-1.1.1.dist-info/WHEEL,sha256=Q_8UIgV2becTkGqdKVgmaXdyabd83UTktF08jttIiu0,106
+MarkupSafe-1.1.1.dist-info/top_level.txt,sha256=qy0Plje5IJuvsCBjejJyhDCjEAdcDLK_2agVcex8Z6U,11
+markupsafe/__init__.py,sha256=oTblO5f9KFM-pvnq9bB0HgElnqkJyqHnFN1Nx2NIvnY,10126
+markupsafe/__pycache__/__init__.cpython-35.pyc,,
+markupsafe/__pycache__/_compat.cpython-35.pyc,,
+markupsafe/__pycache__/_constants.cpython-35.pyc,,
+markupsafe/__pycache__/_native.cpython-35.pyc,,
+markupsafe/_compat.py,sha256=uEW1ybxEjfxIiuTbRRaJpHsPFf4yQUMMKaPgYEC5XbU,558
+markupsafe/_constants.py,sha256=zo2ajfScG-l1Sb_52EP3MlDCqO7Y1BVHUXXKRsVDRNk,4690
+markupsafe/_native.py,sha256=d-8S_zzYt2y512xYcuSxq0NeG2DUUvG80wVdTn-4KI8,1873
+markupsafe/_speedups.cp35-win_amd64.pyd,sha256=Gl6I45geMZhMkY1_2_MkvzYKIwFyARHjzSKzI7ZGIFU,15360

+ 5 - 0
EdamameProjectTest/venv/Lib/site-packages/MarkupSafe-1.1.1.dist-info/WHEEL

@@ -0,0 +1,5 @@
+Wheel-Version: 1.0
+Generator: bdist_wheel (0.33.1)
+Root-Is-Purelib: false
+Tag: cp35-cp35m-win_amd64
+

+ 1 - 0
EdamameProjectTest/venv/Lib/site-packages/MarkupSafe-1.1.1.dist-info/top_level.txt

@@ -0,0 +1 @@
+markupsafe

+ 1 - 0
EdamameProjectTest/venv/Lib/site-packages/Werkzeug-1.0.1.dist-info/INSTALLER

@@ -0,0 +1 @@
+pip

+ 28 - 0
EdamameProjectTest/venv/Lib/site-packages/Werkzeug-1.0.1.dist-info/LICENSE.rst

@@ -0,0 +1,28 @@
+Copyright 2007 Pallets
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+1.  Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+
+2.  Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+
+3.  Neither the name of the copyright holder nor the names of its
+    contributors may be used to endorse or promote products derived from
+    this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 128 - 0
EdamameProjectTest/venv/Lib/site-packages/Werkzeug-1.0.1.dist-info/METADATA

@@ -0,0 +1,128 @@
+Metadata-Version: 2.1
+Name: Werkzeug
+Version: 1.0.1
+Summary: The comprehensive WSGI web application library.
+Home-page: https://palletsprojects.com/p/werkzeug/
+Author: Armin Ronacher
+Author-email: armin.ronacher@active-4.com
+Maintainer: Pallets
+Maintainer-email: contact@palletsprojects.com
+License: BSD-3-Clause
+Project-URL: Documentation, https://werkzeug.palletsprojects.com/
+Project-URL: Code, https://github.com/pallets/werkzeug
+Project-URL: Issue tracker, https://github.com/pallets/werkzeug/issues
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Web Environment
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
+Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
+Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
+Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
+Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware
+Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
+Description-Content-Type: text/x-rst
+Provides-Extra: dev
+Requires-Dist: pytest ; extra == 'dev'
+Requires-Dist: pytest-timeout ; extra == 'dev'
+Requires-Dist: coverage ; extra == 'dev'
+Requires-Dist: tox ; extra == 'dev'
+Requires-Dist: sphinx ; extra == 'dev'
+Requires-Dist: pallets-sphinx-themes ; extra == 'dev'
+Requires-Dist: sphinx-issues ; extra == 'dev'
+Provides-Extra: watchdog
+Requires-Dist: watchdog ; extra == 'watchdog'
+
+Werkzeug
+========
+
+*werkzeug* German noun: "tool". Etymology: *werk* ("work"), *zeug* ("stuff")
+
+Werkzeug is a comprehensive `WSGI`_ web application library. It began as
+a simple collection of various utilities for WSGI applications and has
+become one of the most advanced WSGI utility libraries.
+
+It includes:
+
+-   An interactive debugger that allows inspecting stack traces and
+    source code in the browser with an interactive interpreter for any
+    frame in the stack.
+-   A full-featured request object with objects to interact with
+    headers, query args, form data, files, and cookies.
+-   A response object that can wrap other WSGI applications and handle
+    streaming data.
+-   A routing system for matching URLs to endpoints and generating URLs
+    for endpoints, with an extensible system for capturing variables
+    from URLs.
+-   HTTP utilities to handle entity tags, cache control, dates, user
+    agents, cookies, files, and more.
+-   A threaded WSGI server for use while developing applications
+    locally.
+-   A test client for simulating HTTP requests during testing without
+    requiring running a server.
+
+Werkzeug is Unicode aware and doesn't enforce any dependencies. It is up
+to the developer to choose a template engine, database adapter, and even
+how to handle requests. It can be used to build all sorts of end user
+applications such as blogs, wikis, or bulletin boards.
+
+`Flask`_ wraps Werkzeug, using it to handle the details of WSGI while
+providing more structure and patterns for defining powerful
+applications.
+
+
+Installing
+----------
+
+Install and update using `pip`_:
+
+.. code-block:: text
+
+    pip install -U Werkzeug
+
+
+A Simple Example
+----------------
+
+.. code-block:: python
+
+    from werkzeug.wrappers import Request, Response
+
+    @Request.application
+    def application(request):
+        return Response('Hello, World!')
+
+    if __name__ == '__main__':
+        from werkzeug.serving import run_simple
+        run_simple('localhost', 4000, application)
+
+
+Links
+-----
+
+-   Website: https://palletsprojects.com/p/werkzeug/
+-   Documentation: https://werkzeug.palletsprojects.com/
+-   Releases: https://pypi.org/project/Werkzeug/
+-   Code: https://github.com/pallets/werkzeug
+-   Issue tracker: https://github.com/pallets/werkzeug/issues
+-   Test status: https://dev.azure.com/pallets/werkzeug/_build
+-   Official chat: https://discord.gg/t6rrQZH
+
+.. _WSGI: https://wsgi.readthedocs.io/en/latest/
+.. _Flask: https://www.palletsprojects.com/p/flask/
+.. _pip: https://pip.pypa.io/en/stable/quickstart/
+
+

+ 101 - 0
EdamameProjectTest/venv/Lib/site-packages/Werkzeug-1.0.1.dist-info/RECORD

@@ -0,0 +1,101 @@
+Werkzeug-1.0.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
+Werkzeug-1.0.1.dist-info/LICENSE.rst,sha256=O0nc7kEF6ze6wQ-vG-JgQI_oXSUrjp3y4JefweCUQ3s,1475
+Werkzeug-1.0.1.dist-info/METADATA,sha256=d0zmVNa4UC2-nAo2A8_81oiy123D6JTGRSuY_Ymgyt4,4730
+Werkzeug-1.0.1.dist-info/RECORD,,
+Werkzeug-1.0.1.dist-info/WHEEL,sha256=kGT74LWyRUZrL4VgLh6_g12IeVl_9u9ZVhadrgXZUEY,110
+Werkzeug-1.0.1.dist-info/top_level.txt,sha256=QRyj2VjwJoQkrwjwFIOlB8Xg3r9un0NtqVHQF-15xaw,9
+werkzeug/__init__.py,sha256=rb-yPiXOjTLbtDOl5fQp5hN7oBdaoXAoQ-slAAvfZAo,502
+werkzeug/__pycache__/__init__.cpython-35.pyc,,
+werkzeug/__pycache__/_compat.cpython-35.pyc,,
+werkzeug/__pycache__/_internal.cpython-35.pyc,,
+werkzeug/__pycache__/_reloader.cpython-35.pyc,,
+werkzeug/__pycache__/datastructures.cpython-35.pyc,,
+werkzeug/__pycache__/exceptions.cpython-35.pyc,,
+werkzeug/__pycache__/filesystem.cpython-35.pyc,,
+werkzeug/__pycache__/formparser.cpython-35.pyc,,
+werkzeug/__pycache__/http.cpython-35.pyc,,
+werkzeug/__pycache__/local.cpython-35.pyc,,
+werkzeug/__pycache__/posixemulation.cpython-35.pyc,,
+werkzeug/__pycache__/routing.cpython-35.pyc,,
+werkzeug/__pycache__/security.cpython-35.pyc,,
+werkzeug/__pycache__/serving.cpython-35.pyc,,
+werkzeug/__pycache__/test.cpython-35.pyc,,
+werkzeug/__pycache__/testapp.cpython-35.pyc,,
+werkzeug/__pycache__/urls.cpython-35.pyc,,
+werkzeug/__pycache__/useragents.cpython-35.pyc,,
+werkzeug/__pycache__/utils.cpython-35.pyc,,
+werkzeug/__pycache__/wsgi.cpython-35.pyc,,
+werkzeug/_compat.py,sha256=zjufTNrhQ8BgYSGSh-sVu6iW3r3O9WzjE9j-qJobx-g,6671
+werkzeug/_internal.py,sha256=d_4AqheyS6dHMViwdc0drFrjs67ZzT6Ej2gWf-Z-Iys,14351
+werkzeug/_reloader.py,sha256=I3mg3oRQ0lLzl06oEoVopN3bN7CtINuuUQdqDcmTnEs,11531
+werkzeug/datastructures.py,sha256=AonxOcwU0TPMEzfKF1368ySULxHgxE-JE-DEAGdo2ts,100480
+werkzeug/debug/__init__.py,sha256=3RtUMc5Y9hYyK11ugHltgkQ9Dt-ViR945Vy_X5NV7zU,17289
+werkzeug/debug/__pycache__/__init__.cpython-35.pyc,,
+werkzeug/debug/__pycache__/console.cpython-35.pyc,,
+werkzeug/debug/__pycache__/repr.cpython-35.pyc,,
+werkzeug/debug/__pycache__/tbtools.cpython-35.pyc,,
+werkzeug/debug/console.py,sha256=OATaO7KHYMqpbzIFe1HeW9Mnl3wZgA3jMQoGDPn5URc,5488
+werkzeug/debug/repr.py,sha256=lIwuhbyrMwVe3P_cFqNyqzHL7P93TLKod7lw9clydEw,9621
+werkzeug/debug/shared/FONT_LICENSE,sha256=LwAVEI1oYnvXiNMT9SnCH_TaLCxCpeHziDrMg0gPkAI,4673
+werkzeug/debug/shared/console.png,sha256=bxax6RXXlvOij_KeqvSNX0ojJf83YbnZ7my-3Gx9w2A,507
+werkzeug/debug/shared/debugger.js,sha256=rOhqZMRfpZnnu6_XCGn6wMWPhtfwRAcyZKksdIxPJas,6400
+werkzeug/debug/shared/jquery.js,sha256=CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo,88145
+werkzeug/debug/shared/less.png,sha256=-4-kNRaXJSONVLahrQKUxMwXGm9R4OnZ9SxDGpHlIR4,191
+werkzeug/debug/shared/more.png,sha256=GngN7CioHQoV58rH6ojnkYi8c_qED2Aka5FO5UXrReY,200
+werkzeug/debug/shared/source.png,sha256=RoGcBTE4CyCB85GBuDGTFlAnUqxwTBiIfDqW15EpnUQ,818
+werkzeug/debug/shared/style.css,sha256=gZ9uhmb5zj3XLuT9RvnMp6jMINgQ-VVBCp-2AZbG3YQ,6604
+werkzeug/debug/shared/ubuntu.ttf,sha256=1eaHFyepmy4FyDvjLVzpITrGEBu_CZYY94jE0nED1c0,70220
+werkzeug/debug/tbtools.py,sha256=2iJ8RURUZUSbopOIehy53LnVJWx47lsHN2V2l6hc7Wc,20363
+werkzeug/exceptions.py,sha256=UTYSDkmAsH-vt8VSidlEffwqBVNXuT7bRg-_NqgUe8A,25188
+werkzeug/filesystem.py,sha256=HzKl-j0Hd8Jl66j778UbPTAYNnY6vUZgYLlBZ0e7uw0,2101
+werkzeug/formparser.py,sha256=Sto0jZid9im9ZVIf56vilCdyX-arK33wSftkYsLCnzo,21788
+werkzeug/http.py,sha256=KVRV3yFK14PJeI56qClEq4qxFdvKUQVy4C_dwuWz9_Q,43107
+werkzeug/local.py,sha256=_Tk7gB238pPWUU7habxFkZF02fiCMRVW6d62YWL1Rh0,14371
+werkzeug/middleware/__init__.py,sha256=f1SFZo67IlW4k1uqKzNHxYQlsakUS-D6KK_j0e3jjwQ,549
+werkzeug/middleware/__pycache__/__init__.cpython-35.pyc,,
+werkzeug/middleware/__pycache__/dispatcher.cpython-35.pyc,,
+werkzeug/middleware/__pycache__/http_proxy.cpython-35.pyc,,
+werkzeug/middleware/__pycache__/lint.cpython-35.pyc,,
+werkzeug/middleware/__pycache__/profiler.cpython-35.pyc,,
+werkzeug/middleware/__pycache__/proxy_fix.cpython-35.pyc,,
+werkzeug/middleware/__pycache__/shared_data.cpython-35.pyc,,
+werkzeug/middleware/dispatcher.py,sha256=_-KoMzHtcISHS7ouWKAOraqlCLprdh83YOAn_8DjLp8,2240
+werkzeug/middleware/http_proxy.py,sha256=lRjTdMmghHiZuZrS7_UJ3gZc-vlFizhBbFZ-XZPLwIA,7117
+werkzeug/middleware/lint.py,sha256=ItTwuWJnflF8xMT1uqU_Ty1ryhux-CjeUfskqaUpxsw,12967
+werkzeug/middleware/profiler.py,sha256=8B_s23d6BGrU_q54gJsm6kcCbOJbTSqrXCsioHON0Xs,4471
+werkzeug/middleware/proxy_fix.py,sha256=K5oZ3DPXOzdZi0Xba5zW7ClPOxgUuqXHQHvY2-AWCGw,6431
+werkzeug/middleware/shared_data.py,sha256=sPSRTKqtKSVBUyN8fr6jOJbdq9cdOLu6pg3gz4Y_1Xo,9599
+werkzeug/posixemulation.py,sha256=gSSiv1SCmOyzOM_nq1ZaZCtxP__C5MeDJl_4yXJmi4Q,3541
+werkzeug/routing.py,sha256=6-iZ7CKeUILYAehoKXLbmi5E6LgLbwuzUh8TNplnf5Q,79019
+werkzeug/security.py,sha256=81149MplFq7-hD4RK4sKp9kzXXejjV9D4lWBzaRyeQ8,8106
+werkzeug/serving.py,sha256=YvTqvurA-Mnj8mkqRe2kBdVr2ap4ibCq1ByQjOA6g1w,38694
+werkzeug/test.py,sha256=GJ9kxTMSJ-nB7kfGtxuROr9JGmXxDRev-2U1SkeUJGE,39564
+werkzeug/testapp.py,sha256=bHekqMsqRfVxwgFbvOMem-DYa_sdB7R47yUXpt1RUTo,9329
+werkzeug/urls.py,sha256=T8-hV_1vwhu6xhX93FwsHteK-W-kIE2orj5WoMf-WFw,39322
+werkzeug/useragents.py,sha256=TSoGv5IOvP375eK5gLLpsLQCeUgTR6sO1WftmAP_YvM,5563
+werkzeug/utils.py,sha256=hrVK4u_wi8z9viBO9bgOLlm1aaIvCpn-p2d1FeZQDEo,25251
+werkzeug/wrappers/__init__.py,sha256=S4VioKAmF_av9Ec9zQvG71X1EOkYfPx1TYck9jyDiyY,1384
+werkzeug/wrappers/__pycache__/__init__.cpython-35.pyc,,
+werkzeug/wrappers/__pycache__/accept.cpython-35.pyc,,
+werkzeug/wrappers/__pycache__/auth.cpython-35.pyc,,
+werkzeug/wrappers/__pycache__/base_request.cpython-35.pyc,,
+werkzeug/wrappers/__pycache__/base_response.cpython-35.pyc,,
+werkzeug/wrappers/__pycache__/common_descriptors.cpython-35.pyc,,
+werkzeug/wrappers/__pycache__/cors.cpython-35.pyc,,
+werkzeug/wrappers/__pycache__/etag.cpython-35.pyc,,
+werkzeug/wrappers/__pycache__/json.cpython-35.pyc,,
+werkzeug/wrappers/__pycache__/request.cpython-35.pyc,,
+werkzeug/wrappers/__pycache__/response.cpython-35.pyc,,
+werkzeug/wrappers/__pycache__/user_agent.cpython-35.pyc,,
+werkzeug/wrappers/accept.py,sha256=TIvjUc0g73fhTWX54wg_D9NNzKvpnG1X8u1w26tK1o8,1760
+werkzeug/wrappers/auth.py,sha256=Pmn6iaGHBrUyHbJpW0lZhO_q9RVoAa5QalaTqcavdAI,1158
+werkzeug/wrappers/base_request.py,sha256=4TuGlKWeKQdlq4eU94hJYcXSfWo8Rk7CS1Ef5lJ3ZM0,26012
+werkzeug/wrappers/base_response.py,sha256=JTxJZ8o-IBetpoWJqt2HFwPaNWNDAlM3_GXJe1Whw80,27784
+werkzeug/wrappers/common_descriptors.py,sha256=X2Ktd5zUWsmcd4ciaF62Dd8Lru9pLGP_XDUNukc8cXs,12829
+werkzeug/wrappers/cors.py,sha256=XMbaCol4dWTGvb-dCJBoN0p3JX91v93AIAHd7tnB3L4,3466
+werkzeug/wrappers/etag.py,sha256=XMXtyfByBsOjxwaX8U7ZtUY7JXkbQLP45oXZ0qkyTNs,12217
+werkzeug/wrappers/json.py,sha256=HvK_A4NpO0sLqgb10sTJcoZydYOwyNiPCJPV7SVgcgE,4343
+werkzeug/wrappers/request.py,sha256=QbHGqDpGPN684pnOPEokwkPESfm-NnfYM7ydOMxW_NI,1514
+werkzeug/wrappers/response.py,sha256=Oqv8TMG_dnOKTq_V30ddgkO5B7IJhkVPODvm7cbhZ3c,2524
+werkzeug/wrappers/user_agent.py,sha256=YJb-vr12cujG7sQMG9V89VsJa-03SWSenhg1W4cT0EY,435
+werkzeug/wsgi.py,sha256=ZGk85NzRyQTzkYis-xl8V9ydJgfClBdStvhzDzER2mw,34367

+ 6 - 0
EdamameProjectTest/venv/Lib/site-packages/Werkzeug-1.0.1.dist-info/WHEEL

@@ -0,0 +1,6 @@
+Wheel-Version: 1.0
+Generator: bdist_wheel (0.34.2)
+Root-Is-Purelib: true
+Tag: py2-none-any
+Tag: py3-none-any
+

+ 1 - 0
EdamameProjectTest/venv/Lib/site-packages/Werkzeug-1.0.1.dist-info/top_level.txt

@@ -0,0 +1 @@
+werkzeug

BIN
EdamameProjectTest/venv/Lib/site-packages/__pycache__/easy_install.cpython-35.pyc


+ 1 - 0
EdamameProjectTest/venv/Lib/site-packages/click-7.1.2.dist-info/INSTALLER

@@ -0,0 +1 @@
+pip

+ 28 - 0
EdamameProjectTest/venv/Lib/site-packages/click-7.1.2.dist-info/LICENSE.rst

@@ -0,0 +1,28 @@
+Copyright 2014 Pallets
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+1.  Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+
+2.  Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+
+3.  Neither the name of the copyright holder nor the names of its
+    contributors may be used to endorse or promote products derived from
+    this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 102 - 0
EdamameProjectTest/venv/Lib/site-packages/click-7.1.2.dist-info/METADATA

@@ -0,0 +1,102 @@
+Metadata-Version: 2.1
+Name: click
+Version: 7.1.2
+Summary: Composable command line interface toolkit
+Home-page: https://palletsprojects.com/p/click/
+Maintainer: Pallets
+Maintainer-email: contact@palletsprojects.com
+License: BSD-3-Clause
+Project-URL: Documentation, https://click.palletsprojects.com/
+Project-URL: Code, https://github.com/pallets/click
+Project-URL: Issue tracker, https://github.com/pallets/click/issues
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 3
+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
+
+\$ click\_
+==========
+
+Click is a Python package for creating beautiful command line interfaces
+in a composable way with as little code as necessary. It's the "Command
+Line Interface Creation Kit". It's highly configurable but comes with
+sensible defaults out of the box.
+
+It aims to make the process of writing command line tools quick and fun
+while also preventing any frustration caused by the inability to
+implement an intended CLI API.
+
+Click in three points:
+
+-   Arbitrary nesting of commands
+-   Automatic help page generation
+-   Supports lazy loading of subcommands at runtime
+
+
+Installing
+----------
+
+Install and update using `pip`_:
+
+.. code-block:: text
+
+    $ pip install -U click
+
+.. _pip: https://pip.pypa.io/en/stable/quickstart/
+
+
+A Simple Example
+----------------
+
+.. code-block:: python
+
+    import click
+
+    @click.command()
+    @click.option("--count", default=1, help="Number of greetings.")
+    @click.option("--name", prompt="Your name", help="The person to greet.")
+    def hello(count, name):
+        """Simple program that greets NAME for a total of COUNT times."""
+        for _ in range(count):
+            click.echo(f"Hello, {name}!")
+
+    if __name__ == '__main__':
+        hello()
+
+.. code-block:: text
+
+    $ python hello.py --count=3
+    Your name: Click
+    Hello, Click!
+    Hello, Click!
+    Hello, Click!
+
+
+Donate
+------
+
+The Pallets organization develops and supports Click and other popular
+packages. In order to grow the community of contributors and users, and
+allow the maintainers to devote more time to the projects, `please
+donate today`_.
+
+.. _please donate today: https://palletsprojects.com/donate
+
+
+Links
+-----
+
+-   Website: https://palletsprojects.com/p/click/
+-   Documentation: https://click.palletsprojects.com/
+-   Releases: https://pypi.org/project/click/
+-   Code: https://github.com/pallets/click
+-   Issue tracker: https://github.com/pallets/click/issues
+-   Test status: https://dev.azure.com/pallets/click/_build
+-   Official chat: https://discord.gg/t6rrQZH
+
+

+ 40 - 0
EdamameProjectTest/venv/Lib/site-packages/click-7.1.2.dist-info/RECORD

@@ -0,0 +1,40 @@
+click-7.1.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
+click-7.1.2.dist-info/LICENSE.rst,sha256=morRBqOU6FO_4h9C9OctWSgZoigF2ZG18ydQKSkrZY0,1475
+click-7.1.2.dist-info/METADATA,sha256=LrRgakZKV7Yg3qJqX_plu2WhFW81MzP3EqQmZhHIO8M,2868
+click-7.1.2.dist-info/RECORD,,
+click-7.1.2.dist-info/WHEEL,sha256=kGT74LWyRUZrL4VgLh6_g12IeVl_9u9ZVhadrgXZUEY,110
+click-7.1.2.dist-info/top_level.txt,sha256=J1ZQogalYS4pphY_lPECoNMfw0HzTSrZglC4Yfwo4xA,6
+click/__init__.py,sha256=FkyGDQ-cbiQxP_lxgUspyFYS48f2S_pTcfKPz-d_RMo,2463
+click/__pycache__/__init__.cpython-35.pyc,,
+click/__pycache__/_bashcomplete.cpython-35.pyc,,
+click/__pycache__/_compat.cpython-35.pyc,,
+click/__pycache__/_termui_impl.cpython-35.pyc,,
+click/__pycache__/_textwrap.cpython-35.pyc,,
+click/__pycache__/_unicodefun.cpython-35.pyc,,
+click/__pycache__/_winconsole.cpython-35.pyc,,
+click/__pycache__/core.cpython-35.pyc,,
+click/__pycache__/decorators.cpython-35.pyc,,
+click/__pycache__/exceptions.cpython-35.pyc,,
+click/__pycache__/formatting.cpython-35.pyc,,
+click/__pycache__/globals.cpython-35.pyc,,
+click/__pycache__/parser.cpython-35.pyc,,
+click/__pycache__/termui.cpython-35.pyc,,
+click/__pycache__/testing.cpython-35.pyc,,
+click/__pycache__/types.cpython-35.pyc,,
+click/__pycache__/utils.cpython-35.pyc,,
+click/_bashcomplete.py,sha256=9J98IHQYmCAr2Jup6TDshUr5FJEen-AoQCZR0K5nKxQ,12309
+click/_compat.py,sha256=AoMaYnZ-3pwtNXuHtlb6_UXsayoG0QZiHKIRy2VFezc,24169
+click/_termui_impl.py,sha256=yNktUMAdjYOU1HMkq915jR3zgAzUNtGSQqSTSSMn3eQ,20702
+click/_textwrap.py,sha256=ajCzkzFly5tjm9foQ5N9_MOeaYJMBjAltuFa69n4iXY,1197
+click/_unicodefun.py,sha256=apLSNEBZgUsQNPMUv072zJ1swqnm0dYVT5TqcIWTt6w,4201
+click/_winconsole.py,sha256=6YDu6Rq1Wxx4w9uinBMK2LHvP83aerZM9GQurlk3QDo,10010
+click/core.py,sha256=V6DJzastGhrC6WTDwV9MSLwcJUdX2Uf1ypmgkjBdn_Y,77650
+click/decorators.py,sha256=3TvEO_BkaHl7k6Eh1G5eC7JK4LKPdpFqH9JP0QDyTlM,11215
+click/exceptions.py,sha256=3pQAyyMFzx5A3eV0Y27WtDTyGogZRbrC6_o5DjjKBbw,8118
+click/formatting.py,sha256=Wb4gqFEpWaKPgAbOvnkCl8p-bEZx5KpM5ZSByhlnJNk,9281
+click/globals.py,sha256=ht7u2kUGI08pAarB4e4yC8Lkkxy6gJfRZyzxEj8EbWQ,1501
+click/parser.py,sha256=mFK-k58JtPpqO0AC36WAr0t5UfzEw1mvgVSyn7WCe9M,15691
+click/termui.py,sha256=G7QBEKIepRIGLvNdGwBTYiEtSImRxvTO_AglVpyHH2s,23998
+click/testing.py,sha256=EUEsDUqNXFgCLhZ0ZFOROpaVDA5I_rijwnNPE6qICgA,12854
+click/types.py,sha256=wuubik4VqgqAw5dvbYFkDt-zSAx97y9TQXuXcVaRyQA,25045
+click/utils.py,sha256=4VEcJ7iEHwjnFuzEuRtkT99o5VG3zqSD7Q2CVzv13WU,15940

+ 0 - 0
EdamameProjectTest/venv/Lib/site-packages/click-7.1.2.dist-info/WHEEL


Some files were not shown because too many files changed in this diff