root/trunk/install/php/titlelist.php

リビジョン 70, 2.5 kB (コミッタ: sorshi, コミット時期: 16 年 前)

環境ポリシー機能搭載

Line 
1 <?php
2 /*
3  Anime recording system foltia
4  http://www.dcc-jpl.com/soft/foltia/
5
6 titlelist.php
7
8 目的
9 全番組一覧を表示します。
10 録画有無にかかわらず情報を保持しているもの全てを表示します
11
12 引数
13 なし
14
15  DCC-JPL Japan/foltia project
16
17 */
18
19 include("./foltialib.php");
20 $con = m_connect();
21
22 if ($useenvironmentpolicy == 1){
23 if (!isset($_SERVER['PHP_AUTH_USER'])) {
24     header("WWW-Authenticate: Basic realm=\"foltia\"");
25     header("HTTP/1.0 401 Unauthorized");
26     redirectlogin();
27     exit;
28 } else {
29 login($con,$_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW']);
30 }
31 }//end if login
32
33 ?>
34 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
35 <html lang="ja">
36 <head>
37 <meta http-equiv="Content-Type" content="text/html; charset=EUC-JP">
38 <meta http-equiv="Content-Style-Type" content="text/css">
39 <link rel="stylesheet" type="text/css" href="graytable.css">
40 <title>foltia</title>
41 </head>
42
43 <?php
44 $now = date("YmdHi");   
45
46     $query = "
47 SELECT
48 foltia_program.tid,
49 foltia_program .title
50 FROM  foltia_program
51 ORDER BY foltia_program.tid  DESC
52     ";
53     $rs = m_query($con, $query, "DBクエリに失敗しました");
54     $maxrows = pg_num_rows($rs);
55             
56         if ($maxrows == 0) {
57         die_exit("番組データがありません<BR>");
58             
59         }
60
61 ?>
62
63 <body BGCOLOR="#ffffff" TEXT="#494949" LINK="#0047ff" VLINK="#000000" ALINK="#c6edff" >
64 <div align="center">
65 <?php
66 printhtmlpageheader();
67 ?>
68   <p align="left"><font color="#494949" size="6">番組一覧</font></p>
69   <hr size="4">
70 <p align="left">全番組リストを表示します。</p>
71
72 <?
73         /* フィールド数 */
74         $maxcols = pg_num_fields($rs);
75         ?>
76   <table BORDER="0" CELLPADDING="0" CELLSPACING="2" WIDTH="100%">
77     <thead>
78         <tr>
79             <th align="left">TID</th>
80             <th align="left">タイトル</th>
81             <th align="left">MPEG4リンク</th>
82         </tr>
83     </thead>
84
85     <tbody>
86         <?php
87             /* テーブルのデータを出力 */
88             for ($row = 0; $row < $maxrows; $row++) { /* 行に対応 */
89                 echo("<tr>\n");
90                 /* pg_fetch_row で一行取り出す */
91                 $rowdata = pg_fetch_row($rs, $row);
92                 //TID
93                     echo("<td><a href=\"reserveprogram.php?tid=" .
94                      htmlspecialchars($rowdata[0])  . "\">" .
95                      htmlspecialchars($rowdata[0]) . "</a></td>\n");
96                       //タイトル
97                      echo("<td><a href=\"http://cal.syoboi.jp/progedit.php?TID=" .
98                      htmlspecialchars($rowdata[0])  . "\" target=\"_blank\">" .
99                      htmlspecialchars($rowdata[1]) . "</a></td>\n");
100                     print "<td><A HREF = \"showlibc.php?tid=".htmlspecialchars($rowdata[0])."\">mp4</A></td>\n";
101                 echo("</tr>\n");
102             }
103         ?>
104     </tbody>
105 </table>
106
107
108 </body>
109 </html>
110
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。
track feed