OSDN Git Service

show schedule tasks
authorgn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Mon, 1 Jun 2009 15:01:39 +0000 (15:01 +0000)
committergn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Mon, 1 Jun 2009 15:01:39 +0000 (15:01 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/rec10@35 4e526526-5e11-4fc0-8910-f8fd03428081

Rec10WEB/trunk/src/rec10web.py
Rec10WEB/trunk/src/rswi.htm
Rec10WEB/trunk/src/schdule.htm

index bcfd0fe..ae891d6 100644 (file)
@@ -11,6 +11,36 @@ cgitb.enable()
 path=str(os.path.dirname(os.path.abspath(__file__)))+"/"
 dbpath=path+"ch.db"
 
+def getRecDate():
+    db=sqlite3.connect(dbpath)
+    recdata="\"id\",\"type\",\"chtxt\",\"title\",\"btime\",\"etime\",\"deltaday\",\"opt\"\n"
+    recdata="id,type,chtxt,title,btime,etime,deltaday,opt\n"
+    for id, typet, chtxt, title, btime, etime, deltatime ,deltaday ,opt in db.execute("SELECT id, type, chtxt, title, btime, etime, deltatime ,deltaday ,opt FROM rectime"):
+        if deltaday==None:
+            deltaday="なし"
+        elif deltaday=="":
+            deltaday="なし"
+        if opt==None:
+            opt="なし"
+        if typet=="res":
+            typet="一回予約"
+        elif typet=="key":
+            typet="検索予約"
+        elif typet=="keyevery":
+            typet="隔週予約"
+        elif typet=="res":
+            typet="録画最終"
+        elif typet=="grid":
+            typet="外部委託"
+        elif typet=="ts2avi":
+            typet="EncQue"
+        
+        s="\""+str(id)+"\",\""+typet+"\",\""+chtxt+"\",\""+title+"\",\""+btime+"\",\""+etime+"\",\""+deltaday+"\",\""+opt+"\"\n"
+        s=str(id)+","+typet+","+chtxt+","+title+","+btime+","+etime+","+deltaday+","+opt+"\n"
+        recdata=recdata+s
+    f=open("recdatum.csv","w")
+    f.write(recdata)
+    f.close()
 def getchtxt():
     db=sqlite3.connect(dbpath)
     chopt=""
@@ -80,6 +110,7 @@ def readRecFinisOver():
     ret=f.read()
     f.close()
     return ret
+
 f=cgi.FieldStorage()
 
 btime=""
@@ -88,6 +119,10 @@ title=""
 chtxt=""
 type="res"
 bt=""
+getRecDate()
+if f.getfirst('mode')=="schedule":
+    getRecDate()
+
 ###ここからiEPG用の読み出し
 if f.getfirst('station'):
     station=f.getfirst('station')
index 293a37a..860aa45 100644 (file)
                }else{
                        dijit.byId("dualaudio").setChecked(false);
                }
+        if (str.indexOf("5")>-1){
+                       dijit.byId("pentaaudio").setChecked(true);
+               }else{
+                       dijit.byId("pentaaudio").setChecked(false);
+               }
                if (str.indexOf("S")>-1){
                        dijit.byId("size").setValue("S");
                }else if (str.indexOf("H")>-1){
             //dijit.byId("2pass").setChecked(true);
             str=stropt+"d";
             dijit.byId("opts").setValue(str);
+        }else if(str.indexOf("5.1")>-1){
+            //dijit.byId("2pass").setChecked(true);
+            str=stropt+"5";
+            dijit.byId("opts").setValue(str);
+        }else if(str.indexOf("5.1")>-1){
+            //dijit.byId("2pass").setChecked(true);
+            str=stropt+"5";
+            dijit.byId("opts").setValue(str);
         }
     }
        function init(){
       <!-- テーマの読み込み -->
       <body class="tundra">
        <div dojoType="dijit.form.Form" action="rec10web.py" onExecute="this.submit()">
-       <h1>Rec10 Simple Web Interface ver.0.1.2</h1><br>
+       <h1>Rec10 Simple Web Interface ver.0.3.3c</h1><br>
        <select name="type"
                 dojoType="dijit.form.FilteringSelect"
                 autocomplete="false"
                 <option value="key">キーワード予約</option>
                 <option value="keyevery">隔日予約</option>
                 <option value="rec">最終予約</option>
+                <option value="ts2avi">エンコード予約</option>
         </select>番組名/キーワード
        <input type="text" 
                length="40" 
                dojoType="dijit.form.CheckBox" 
                id="dualaudio" name="dualaudio" value="d"
                onClick="setOpts(this)">二ヶ国語放送</input>
+    <input type="checkbox"
+               dojoType="dijit.form.CheckBox"
+               id="pentaaudio" name="pentaaudio" value="5"
+               onClick="setOpts(this)">5.1ch放送</input>
        <input type="checkbox" 
                dojoType="dijit.form.CheckBox" 
                id="2pass" name="2pass" value="2"
index 9babcbb..c46d03f 100644 (file)
@@ -1,51 +1,48 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-      <head>
-      <meta http-equive="Content-Type" content="text/html;charset=UTF-8"/>
-      <script src="../dojo/dojo.js" djConfig="parseOnLoad: true">
-      </script>
-      <!-- テーマの読み込み -->
-      <style type="text/css">
-        @import "../dojo/resources/dojo.css";
-        @import "../dijit/themes/tundra/tundra.css";
-
-       
-      </style>
-      <script type="text/javascript">
+<html lang="ja">
+   <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <meta http-equiv="Content-Style-Type" content="text/css">
+    <meta http-equiv="Content-Script-Type" content="text/javascript">
+    <link href="../dojox/grid/_grid/Grid.css" rel="stylesheet" type="text/css">
+    <link href="../dojox/grid/_grid/tundraGrid.css" rel="stylesheet" type="text/css">
+    <title>Grid / Dojo</title>
+    <script type="text/javascript" src="../dojo/dojo.js" djConfig="parseOnLoad: true"></script>
+    <script type="text/javascript">
+    <!--
+        dojo.require('dojox.grid.Grid');
+        dojo.require('dojo.data.ItemFileReadStore');
+        dojo.require('dojox.data.CsvStore');
+        dojo.require('dojo.parser');
 
-        dojo.require("dojo.parser");
-        // ※ ここで、使用するウィジェットの読み込みを行う
+        // グリッドに表示する元データをロード
+        var store = new dojox.data.CsvStore({url:'./recdatum.csv'});
+    -->
+    </script>
+</head>
 
-       dojo.require("dojo.data.ItemFileReadStore"); 
-       dojo.require("dojox.grid.Grid"); 
-       dojo.require("dojox.grid.compat._data.model"); 
-       var view = { 
-        
-         // 各セルの設定 
-       cells: [[ 
-               {name: "時間", field: "time"}
-               ],[
-                       {name: "タイトル", field: "ch[0].title"}
-                       
-               ],[
-                       {name: "タイトル", field: "ch[1].title"}
-               ].[
-                       {name: "タイトル", field: "ch[2].title"} 
-         ]] 
-       };       
-       var layout=[view];
-       //dojo.addOnLoad(init);
-      </script>
-      </head>
       <!-- テーマの読み込み -->
        <body class="tundra">
-       <div dojoType="dojo.data.ItemFileReadStore"
-               jiId="jsonStore" url="schdule.json">
-       </div>
-       <div dojoType="dojox.grid.data.DojoData" jsId="model"
-               store="jsonStore" rowsPerPage="100">
-       </div>
-       <div id="grid" dojoType="dojox.Grid" model="model" structure="layout">
-       </div>
+       <table
+        style="height:400px;"
+        dojoType="dojox.grid.Grid"
+        store="store"
+        query="{id:'*'}"
+        clientSort="true">
+            <thead>
+                <tr>
+                    <th width="20px" field="id">ID</th>
+                    <th width="60px" field="type">タイプ</th>
+                    <th width="50px" field="chtxt">チャンネル</th>
+                    <th width="200px" field="title">タイトル</th>
+                    <th width="130px" field="btime">開始</th>
+                    <th width="130px" field="etime">終了</th>
+                    <th width="30px" field="opt">オプション</th>
+                    <th width="50px" field="deltaday">周期</th>
+
+
+                </tr>
+            </thead>
+        </table>
 </body>
 </html>