1 |
<?php |
---|
2 |
|
---|
3 |
|
---|
4 |
|
---|
5 |
|
---|
6 |
|
---|
7 |
|
---|
8 |
|
---|
9 |
|
---|
10 |
|
---|
11 |
|
---|
12 |
|
---|
13 |
|
---|
14 |
|
---|
15 |
|
---|
16 |
|
---|
17 |
|
---|
18 |
|
---|
19 |
|
---|
20 |
|
---|
21 |
|
---|
22 |
include("./foltialib.php"); |
---|
23 |
$con = m_connect(); |
---|
24 |
|
---|
25 |
if ($useenvironmentpolicy == 1){ |
---|
26 |
if (!isset($_SERVER['PHP_AUTH_USER'])) { |
---|
27 |
header("WWW-Authenticate: Basic realm=\"foltia\""); |
---|
28 |
header("HTTP/1.0 401 Unauthorized"); |
---|
29 |
redirectlogin(); |
---|
30 |
exit; |
---|
31 |
} else { |
---|
32 |
login($con,$_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW']); |
---|
33 |
} |
---|
34 |
} |
---|
35 |
|
---|
36 |
|
---|
37 |
$pid = getgetnumform(pid); |
---|
38 |
|
---|
39 |
|
---|
40 |
if ($pid == "") { |
---|
41 |
exit; |
---|
42 |
} |
---|
43 |
|
---|
44 |
$query = " |
---|
45 |
SELECT |
---|
46 |
foltia_program.tid, |
---|
47 |
stationname, |
---|
48 |
foltia_program.title, |
---|
49 |
foltia_subtitle.countno, |
---|
50 |
foltia_subtitle.subtitle, |
---|
51 |
foltia_subtitle.startdatetime , |
---|
52 |
foltia_subtitle.lengthmin , |
---|
53 |
foltia_subtitle.pid , |
---|
54 |
foltia_subtitle.m2pfilename , |
---|
55 |
foltia_subtitle.pspfilename |
---|
56 |
FROM foltia_subtitle , foltia_program ,foltia_station |
---|
57 |
WHERE foltia_program.tid = foltia_subtitle.tid AND foltia_station.stationid = foltia_subtitle.stationid |
---|
58 |
AND foltia_subtitle.pid = '$pid' |
---|
59 |
|
---|
60 |
"; |
---|
61 |
$rs = m_query($con, $query, "DBクエリに失敗しました"); |
---|
62 |
|
---|
63 |
$rows = pg_num_rows($rs); |
---|
64 |
if ($rows == 0){ |
---|
65 |
print ""; |
---|
66 |
exit; |
---|
67 |
}else{ |
---|
68 |
$rowdata = pg_fetch_row($rs, 0); |
---|
69 |
|
---|
70 |
$title = $rowdata[2]; |
---|
71 |
$episode = $rowdata[3]; |
---|
72 |
$subtitle = $rowdata[4]; |
---|
73 |
$m2pfilename = $rowdata[8]; |
---|
74 |
$serveruri = getserveruri(); |
---|
75 |
} |
---|
76 |
|
---|
77 |
print "\n"; |
---|
78 |
print "\n"; |
---|
79 |
|
---|
80 |
print "$title"; |
---|
81 |
print " 第". "$episode" . "話 "; |
---|
82 |
print "$subtitle"; |
---|
83 |
print "|0|0|"; |
---|
84 |
print "http://$serveruri$httpmediamappath/$m2pfilename"; |
---|
85 |
print "|"; |
---|
86 |
|
---|
87 |
?> |
---|
88 |
|
---|
89 |
|
---|
90 |
|
---|
91 |
|
---|