root/trunk/install/php/selectcaptureimage.php

リビジョン 1, 3.8 kB (コミッタ: jplcom, コミット時期: 18 年 前)

initial import

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 旧仕様
16 mplayer -ss 00:0:10 -vo jpeg:outdir=./ -ao null -sstep 14  -v 3 ../665-13-20051230-0145.m2p
17 convert -verbose  -crop 160x120+1+3 -resize 165x126\!  ../*.jpg
18
19  DCC-JPL Japan/foltia project
20
21 */
22
23 include("./foltialib.php");
24
25 //$tid = getgetnumform(tid);
26 //$path = getgetform(d);
27 $pid = getgetform(pid);
28
29 if ($pid == "") {
30     header("Status: 404 Not Found",TRUE,404);
31 }
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>Starlight Breaker -キャプチャ画像選択</title>
41 <script src="http://images.apple.com/main/js/ac_quicktime.js" language="JavaScript" type="text/javascript"></script>
42 </head>
43 <body BGCOLOR="#ffffff" TEXT="#494949" LINK="#0047ff" VLINK="#000000" ALINK="#c6edff" >
44 <div align="center">
45
46 <?php
47 printhtmlpageheader();
48
49 if ($pid == "") {
50     print "画像がありません。<br></body></html>";
51     exit;
52 }
53
54
55 $con = m_connect();
56 $query = "
57 SELECT
58 foltia_program.tid,
59 stationname,
60 foltia_program.title,
61 foltia_subtitle.countno,
62 foltia_subtitle.subtitle,
63 foltia_subtitle.startdatetime ,
64 foltia_subtitle.lengthmin  ,
65 foltia_subtitle.pid ,
66 foltia_subtitle.m2pfilename ,
67 foltia_subtitle.pspfilename
68 FROM foltia_subtitle , foltia_program ,foltia_station 
69 WHERE foltia_program.tid = foltia_subtitle.tid AND foltia_station.stationid = foltia_subtitle.stationid
70  AND foltia_subtitle.pid = '$pid' 
71  
72     ";
73     $rs = m_query($con, $query, "DBクエリに失敗しました");
74     $rowdata = pg_fetch_row($rs, 0);
75
76 print "  <p align=\"left\"><font color=\"#494949\" size=\"6\">キャプチャ画像</font></p>
77   <hr size=\"4\">
78 <p align=\"left\">";
79 print "<a href = \"http://cal.syoboi.jp/tid/$rowdata[0]/time#$pid\" target=\"_blank\">";
80 print htmlspecialchars($rowdata[2]) . "</a> " ;
81 print htmlspecialchars($rowdata[3]) . " ";
82 print htmlspecialchars($rowdata[4]) . " ";
83 print htmlspecialchars($rowdata[1]) . " ";
84 print htmlspecialchars($rowdata[6]) . "分 ";
85 print htmlspecialchars(foldate2print($rowdata[5]));
86
87 $mp4filename = $rowdata[9];
88 $tid = $rowdata[0];
89 $serverfqdn = getserverfqdn();
90
91 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>";
92
93 $m2pfilename = $rowdata[8];
94
95 list($tid,$countno,$date,$time)= split ("-", $m2pfilename );
96     $tid = ereg_replace("[^0-9]", "", $tid);
97 //if ($countno == "x"){
98 //}else{
99 //    $countno = ereg_replace("[^0-9]", "", $countno);
100 //}
101 //    $date = ereg_replace("[^0-9]", "", $date);
102 //    $time = ereg_replace("[^0-9]", "", $time);
103 //$path = $tid."-".$countno."-".$date."-".$time ;
104 $path = ereg_replace("\.m2p$", "", $m2pfilename);
105 $serveruri = getserverfqdn ();
106
107 exec ("ls   $recfolderpath/$tid.localized/img/$path/", $tids);
108 //$timecount = 1;
109 foreach($tids as $filetid) {
110 print "<IMG SRC='http://$serveruri$httpmediamappath/$tid.localized/img/$path/$filetid' WIDTH='160' HEIGHT='120'  ALT='$tid:$countno:$filetid'>\n";
111 /*
112 $i++ ;
113 if ($i > 3){
114  print "<br>\n";
115 $i = 0;
116 //$timecount++ ;
117 }
118 */
119 }//foreach
120 // タイトル一覧 ここまで
121
122 // ファイル一覧 ここから
123 ?>
124
125
126
127
128 </body>
129 </html>
130
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。
track feed