root/trunk/install/php/selectcaptureimage.php

リビジョン 126, 4.7 kB (コミッタ: sorshi, コミット時期: 14 年 前)

reserveprogram.php
short open tagを利用していたのを修正。

showplaylist.php
AutoPagerize?未使用時にタグが閉じていなかったのを修正

selectcaptureimage.php
録画局が存在していないときの対策を追加。

Line 
1 <?php
2 /*
3  Anime recording system foltia
4  http://www.dcc-jpl.com/soft/foltia/
5
6
7 目的
8 blogツール、スターライトブレイカー用キャプ選択画面サンプル
9
10 引数
11 pid:PID
12
13 mplayer -ss 00:00:10 -vo jpeg:outdir=/home/foltia/php/tv/691.localized/img/6/ -vf crop=702:468:6:6,scale=160:120,pp=lb  -ao null -sstep 14  -v 3 /home/foltia/php/tv/691-6-20060216-0130.m2p
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 $pid = getgetnumform(pid);
35
36 if ($pid == "") {
37     header("Status: 404 Not Found",TRUE,404);
38 }
39 ?>
40
41 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
42 <html lang="ja">
43 <head>
44 <meta http-equiv="Content-Type" content="text/html; charset=EUC-JP">
45 <meta http-equiv="Content-Style-Type" content="text/css">
46 <link rel="stylesheet" type="text/css" href="graytable.css">
47 <title>Starlight Breaker -キャプチャ画像選択</title>
48 <script src="http://images.apple.com/main/js/ac_quicktime.js" language="JavaScript" type="text/javascript"></script>
49 </head>
50 <body BGCOLOR="#ffffff" TEXT="#494949" LINK="#0047ff" VLINK="#000000" ALINK="#c6edff" >
51 <div align="center">
52
53 <?php
54 printhtmlpageheader();
55
56 if ($pid == "") {
57     print "画像がありません。<br></body></html>";
58     exit;
59 }
60
61 $query = "
62 SELECT
63 foltia_program.tid,
64 stationname,
65 foltia_program.title,
66 foltia_subtitle.countno,
67 foltia_subtitle.subtitle,
68 foltia_subtitle.startdatetime ,
69 foltia_subtitle.lengthmin  ,
70 foltia_subtitle.pid ,
71 foltia_subtitle.m2pfilename ,
72 foltia_subtitle.pspfilename
73 FROM foltia_subtitle , foltia_program ,foltia_station 
74 WHERE foltia_program.tid = foltia_subtitle.tid AND foltia_station.stationid = foltia_subtitle.stationid
75 AND foltia_subtitle.pid = ? 
76 ";
77 $rs = sql_query($con, $query, "DBクエリに失敗しました",array($pid));
78 $rowdata = $rs->fetch();
79
80 if (! $rowdata) {
81 $query = "
82 SELECT
83 foltia_program.tid,
84 foltia_program.tid,
85 foltia_program.title,
86 foltia_subtitle.countno,
87 foltia_subtitle.subtitle,
88 foltia_subtitle.startdatetime ,
89 foltia_subtitle.lengthmin  ,
90 foltia_subtitle.pid ,
91 foltia_subtitle.m2pfilename ,
92 foltia_subtitle.pspfilename
93 FROM foltia_subtitle , foltia_program 
94 WHERE foltia_program.tid = foltia_subtitle.tid
95 AND foltia_subtitle.pid = ? 
96 ";
97
98 $rs = sql_query($con, $query, "DBクエリに失敗しました",array($pid));
99 $rowdata = $rs->fetch();
100     if (! $rowdata) {
101         print "  <p align=\"left\"><font color=\"#494949\" size=\"6\">キャプチャ画像</font></p>
102       <hr size=\"4\">
103     <p align=\"left\">
104     録画記録がありません。<br></body></html>";
105     exit ;
106     }
107 $rowdata[1] = "";
108 }//end if (! $rowdata)
109
110 print "  <p align=\"left\"><font color=\"#494949\" size=\"6\">キャプチャ画像</font></p>
111   <hr size=\"4\">
112 <p align=\"left\">";
113 print "<a href = \"http://cal.syoboi.jp/tid/$rowdata[0]/\" target=\"_blank\">";
114 print htmlspecialchars($rowdata[2]) . "</a> " ;
115 print htmlspecialchars($rowdata[3]) . " ";
116 $tid = $rowdata[0];
117 if ($tid > 0){
118 print "<a href = \"http://cal.syoboi.jp/tid/$tid/time#$pid\" target=\"_blank\">";
119 print htmlspecialchars($rowdata[4]) . "</a> ";
120 }else{
121 print htmlspecialchars($rowdata[4]) . " ";
122 }
123 print htmlspecialchars($rowdata[1]) . " ";
124 print htmlspecialchars($rowdata[6]) . "分 ";
125 print htmlspecialchars(foldate2print($rowdata[5]));
126
127 $mp4filename = $rowdata[9];
128 $serverfqdn = getserverfqdn();
129
130 print "  再生:<A HREF=\"$httpmediamappath/$tid.localized/mp4/$mp4filename\" target=\"_blank\">$mp4filename</A> / <script language=\"JavaScript\" type=\"text/javascript\">QT_WriteOBJECT_XHTML('http://g.hatena.ne.jp/images/podcasting.gif','16','16','','controller','FALSE','href','http://$serverfqdn/$httpmediamappath/$tid.localized/mp4/$mp4filename','target','QuickTimePlayer','type','video/mp4');</script> / <a href=\"./mp4player.php?p=$pid\" target=\"_blank\">Player</a><br>";
131
132 $m2pfilename = $rowdata[8];
133
134 list($tid,$countno,$date,$time)= split ("-", $m2pfilename );
135 //    $tid = ereg_replace("[^0-9]", "", $tid);
136 $tid = $rowdata[0];
137 $countno = $rowdata[3] ;
138 $path = ereg_replace("\.m2p$|\.m2t$", "", $m2pfilename);
139 $serveruri = getserverfqdn ();
140
141 exec ("ls $recfolderpath/$tid.localized/img/$path/", $tids);
142 //$timecount = 1;
143 foreach($tids as $filetid) {
144
145 if (file_exists("./sb-edit.php") ) {
146 print "<a href=\"./sb-edit.php?pid=$pid&f=$filetid\"><img src='http://$serveruri$httpmediamappath/$tid.localized/img/$path/$filetid' alt='$tid:$countno:$filetid'></a>\n";
147 }else{
148 print "<img src='http://$serveruri$httpmediamappath/$tid.localized/img/$path/$filetid'  alt='$tid:$countno:$filetid'>\n";
149 }
150 }//foreach
151 // タイトル一覧 ここまで
152
153
154 ?>
155
156 </body>
157 </html>
158  
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。
track feed