root/trunk/install/php/selectcaptureimage.php

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

foltiaHD最初のリリース。
デジタル録画はFriio/Friio BS/CSのみに対応。
ivtvは1.0系使用になりました。

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 = getgetform(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
62 $query = "
63 SELECT
64 foltia_program.tid,
65 stationname,
66 foltia_program.title,
67 foltia_subtitle.countno,
68 foltia_subtitle.subtitle,
69 foltia_subtitle.startdatetime ,
70 foltia_subtitle.lengthmin  ,
71 foltia_subtitle.pid ,
72 foltia_subtitle.m2pfilename ,
73 foltia_subtitle.pspfilename
74 FROM foltia_subtitle , foltia_program ,foltia_station 
75 WHERE foltia_program.tid = foltia_subtitle.tid AND foltia_station.stationid = foltia_subtitle.stationid
76  AND foltia_subtitle.pid = '$pid' 
77  
78     ";
79     $rs = m_query($con, $query, "DBクエリに失敗しました");
80 $rows = pg_num_rows($rs);
81 if ($rows == 0){
82     print "  <p align=\"left\"><font color=\"#494949\" size=\"6\">キャプチャ画像</font></p>
83   <hr size=\"4\">
84 <p align=\"left\">
85 録画記録がありません。<br>
86 ";
87
88 }else{
89 $rowdata = pg_fetch_row($rs, 0);
90
91 print "  <p align=\"left\"><font color=\"#494949\" size=\"6\">キャプチャ画像</font></p>
92   <hr size=\"4\">
93 <p align=\"left\">";
94 print "<a href = \"http://cal.syoboi.jp/tid/$rowdata[0]/\" target=\"_blank\">";
95 print htmlspecialchars($rowdata[2]) . "</a> " ;
96 print htmlspecialchars($rowdata[3]) . " ";
97 $tid = $rowdata[0];
98 if ($tid > 0){
99 print "<a href = \"http://cal.syoboi.jp/tid/$tid/time#$pid\" target=\"_blank\">";
100 print htmlspecialchars($rowdata[4]) . "</a> ";
101 }else{
102 print htmlspecialchars($rowdata[4]) . " ";
103 }
104 print htmlspecialchars($rowdata[1]) . " ";
105 print htmlspecialchars($rowdata[6]) . "分 ";
106 print htmlspecialchars(foldate2print($rowdata[5]));
107
108 $mp4filename = $rowdata[9];
109 $serverfqdn = getserverfqdn();
110
111 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>";
112
113 $m2pfilename = $rowdata[8];
114
115 list($tid,$countno,$date,$time)= split ("-", $m2pfilename );
116     $tid = ereg_replace("[^0-9]", "", $tid);
117
118 $path = ereg_replace("\.m2p$|\.m2t$", "", $m2pfilename);
119 $serveruri = getserverfqdn ();
120
121 exec ("ls   $recfolderpath/$tid.localized/img/$path/", $tids);
122 //$timecount = 1;
123 foreach($tids as $filetid) {
124
125 if (file_exists("./sb-edit.php") ) {
126 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";
127 }else{
128 print "<img src='http://$serveruri$httpmediamappath/$tid.localized/img/$path/$filetid'  alt='$tid:$countno:$filetid'>\n";
129 }
130 }//foreach
131 // タイトル一覧 ここまで
132 }//if rowdata == 0
133
134 ?>
135
136 </body>
137 </html>
138  
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。
track feed