root/trunk/install/php/selectcaptureimage.php

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

SQLite採用

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