root/trunk/install/php/selectcaptureimage.php

リビジョン 41, 3.6 kB (コミッタ: sorshi, コミット時期: 18 年 前)

 EPG予約の際に、既に予約があるかの検出を既存予約が[全局録画]の場合検出出来ていなかったのを修正。
 キャプチャ表示画面で不正PIDのときのエラー処理の追加。

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
21 $pid = getgetform(pid);
22
23 if ($pid == "") {
24     header("Status: 404 Not Found",TRUE,404);
25 }
26 ?>
27
28 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
29 <html lang="ja">
30 <head>
31 <meta http-equiv="Content-Type" content="text/html; charset=EUC-JP">
32 <meta http-equiv="Content-Style-Type" content="text/css">
33 <link rel="stylesheet" type="text/css" href="graytable.css">
34 <title>Starlight Breaker -キャプチャ画像選択</title>
35 <script src="http://images.apple.com/main/js/ac_quicktime.js" language="JavaScript" type="text/javascript"></script>
36 </head>
37 <body BGCOLOR="#ffffff" TEXT="#494949" LINK="#0047ff" VLINK="#000000" ALINK="#c6edff" >
38 <div align="center">
39
40 <?php
41 printhtmlpageheader();
42
43 if ($pid == "") {
44     print "画像がありません。<br></body></html>";
45     exit;
46 }
47
48
49 $con = m_connect();
50 $query = "
51 SELECT
52 foltia_program.tid,
53 stationname,
54 foltia_program.title,
55 foltia_subtitle.countno,
56 foltia_subtitle.subtitle,
57 foltia_subtitle.startdatetime ,
58 foltia_subtitle.lengthmin  ,
59 foltia_subtitle.pid ,
60 foltia_subtitle.m2pfilename ,
61 foltia_subtitle.pspfilename
62 FROM foltia_subtitle , foltia_program ,foltia_station 
63 WHERE foltia_program.tid = foltia_subtitle.tid AND foltia_station.stationid = foltia_subtitle.stationid
64  AND foltia_subtitle.pid = '$pid' 
65  
66     ";
67     $rs = m_query($con, $query, "DBクエリに失敗しました");
68 $rows = pg_num_rows($rs);
69 if ($rows == 0){
70     print "  <p align=\"left\"><font color=\"#494949\" size=\"6\">キャプチャ画像</font></p>
71   <hr size=\"4\">
72 <p align=\"left\">
73 録画記録がありません。<br>
74 ";
75
76 }else{
77 $rowdata = pg_fetch_row($rs, 0);
78
79 print "  <p align=\"left\"><font color=\"#494949\" size=\"6\">キャプチャ画像</font></p>
80   <hr size=\"4\">
81 <p align=\"left\">";
82 print "<a href = \"http://cal.syoboi.jp/tid/$rowdata[0]/\" target=\"_blank\">";
83 print htmlspecialchars($rowdata[2]) . "</a> " ;
84 print htmlspecialchars($rowdata[3]) . " ";
85 $tid = $rowdata[0];
86 if ($tid > 0){
87 print "<a href = \"http://cal.syoboi.jp/tid/$tid/time#$pid\" target=\"_blank\">";
88 print htmlspecialchars($rowdata[4]) . "</a> ";
89 }else{
90 print htmlspecialchars($rowdata[4]) . " ";
91 }
92 print htmlspecialchars($rowdata[1]) . " ";
93 print htmlspecialchars($rowdata[6]) . "分 ";
94 print htmlspecialchars(foldate2print($rowdata[5]));
95
96 $mp4filename = $rowdata[9];
97 $serverfqdn = getserverfqdn();
98
99 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><br>";
100
101 $m2pfilename = $rowdata[8];
102
103 list($tid,$countno,$date,$time)= split ("-", $m2pfilename );
104     $tid = ereg_replace("[^0-9]", "", $tid);
105
106 $path = ereg_replace("\.m2p$", "", $m2pfilename);
107 $serveruri = getserverfqdn ();
108
109 exec ("ls   $recfolderpath/$tid.localized/img/$path/", $tids);
110 //$timecount = 1;
111 foreach($tids as $filetid) {
112 print "<IMG SRC='http://$serveruri$httpmediamappath/$tid.localized/img/$path/$filetid' WIDTH='160' HEIGHT='120'  ALT='$tid:$countno:$filetid'>\n";
113
114 }//foreach
115 // タイトル一覧 ここまで
116 }//if rowdata == 0
117
118 ?>
119
120 </body>
121 </html>
122
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。
track feed