1 |
<?php |
---|
2 |
|
---|
3 |
|
---|
4 |
|
---|
5 |
|
---|
6 |
|
---|
7 |
|
---|
8 |
|
---|
9 |
|
---|
10 |
|
---|
11 |
|
---|
12 |
|
---|
13 |
|
---|
14 |
|
---|
15 |
|
---|
16 |
|
---|
17 |
|
---|
18 |
|
---|
19 |
include("./foltialib.php"); |
---|
20 |
|
---|
21 |
$pid = getgetform(pid); |
---|
22 |
$filename = getgetform(f); |
---|
23 |
|
---|
24 |
if (($pid == "") ||($filename == "")) { |
---|
25 |
header("Status: 404 Not Found",TRUE,404); |
---|
26 |
} |
---|
27 |
?> |
---|
28 |
|
---|
29 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
---|
30 |
<html lang="ja"> |
---|
31 |
<head> |
---|
32 |
<meta http-equiv="Content-Type" content="text/html; charset=EUC-JP"> |
---|
33 |
<meta http-equiv="Content-Style-Type" content="text/css"> |
---|
34 |
<link rel="stylesheet" type="text/css" href="graytable.css"> |
---|
35 |
<title>Starlight Breaker -編集</title> |
---|
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 == "") ||($filename == "")) { |
---|
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 |
$title = htmlspecialchars($rowdata[2]); |
---|
84 |
$countno = htmlspecialchars($rowdata[3]); |
---|
85 |
print "$title</a> $countno " ; |
---|
86 |
|
---|
87 |
$tid = $rowdata[0]; |
---|
88 |
$subtitle = htmlspecialchars($rowdata[4]) ; |
---|
89 |
if ($tid > 0){ |
---|
90 |
print "<a href = \"http://cal.syoboi.jp/tid/$tid/time#$pid\" target=\"_blank\">$subtitle</a> "; |
---|
91 |
}else{ |
---|
92 |
print "$subtitle "; |
---|
93 |
} |
---|
94 |
print htmlspecialchars($rowdata[1]) . " "; |
---|
95 |
print htmlspecialchars($rowdata[6]) . "分 "; |
---|
96 |
print htmlspecialchars(foldate2print($rowdata[5])); |
---|
97 |
print "<br /><br />"; |
---|
98 |
$mp4filename = $rowdata[9]; |
---|
99 |
$serverfqdn = getserverfqdn(); |
---|
100 |
|
---|
101 |
|
---|
102 |
$m2pfilename = $rowdata[8]; |
---|
103 |
|
---|
104 |
list($tid,$countno,$date,$time)= split ("-", $m2pfilename ); |
---|
105 |
$tid = ereg_replace("[^0-9]", "", $tid); |
---|
106 |
|
---|
107 |
$path = ereg_replace("\.m2p$", "", $m2pfilename); |
---|
108 |
$serveruri = getserverfqdn (); |
---|
109 |
|
---|
110 |
print "</div>\n"; |
---|
111 |
|
---|
112 |
|
---|
113 |
|
---|
114 |
print "<img src='http://$serveruri$httpmediamappath/$tid.localized/img/$path/$filename' width='160' height='120' alt='$tid:$countno:$filetid' align=\"left\">\n"; |
---|
115 |
|
---|
116 |
|
---|
117 |
if (getform(preview) == 1){ |
---|
118 |
|
---|
119 |
|
---|
120 |
$subject = getform(subject); |
---|
121 |
$maintext = getform(textarea); |
---|
122 |
|
---|
123 |
$rate = getform(rank4); |
---|
124 |
|
---|
125 |
switch ($rate) { |
---|
126 |
case -2: |
---|
127 |
$ratechara = "× "; |
---|
128 |
break; |
---|
129 |
case -1: |
---|
130 |
$ratechara = "▲ "; |
---|
131 |
break; |
---|
132 |
case 0: |
---|
133 |
$ratechara = "− "; |
---|
134 |
break; |
---|
135 |
case 1: |
---|
136 |
$ratechara = "★ "; |
---|
137 |
break; |
---|
138 |
case 2: |
---|
139 |
$ratechara = "★★ "; |
---|
140 |
break; |
---|
141 |
case 3: |
---|
142 |
$ratechara = "★★★ "; |
---|
143 |
break; |
---|
144 |
case 4: |
---|
145 |
$ratechara = "★★★★ "; |
---|
146 |
break; |
---|
147 |
default: |
---|
148 |
$ratechara = "− "; |
---|
149 |
} |
---|
150 |
$subject = $ratechara . $subject; |
---|
151 |
|
---|
152 |
print "". htmlspecialchars(stripslashes( $subject)) ."\n"; |
---|
153 |
print "". stripslashes( $maintext) ."<br />\n"; |
---|
154 |
print "<br />\n"; |
---|
155 |
print "本文(source view):<br />". htmlspecialchars(stripslashes( $maintext)) ."<hr><br /><br /><br />\n"; |
---|
156 |
|
---|
157 |
print "<form id=\"form2\" name=\"form2\" method=\"post\" action=\"./sb-write.php?tid=$tid&path=$path&f=$filename\"><input type=\"password\" name=\"blogpw\">[ <a href = \"./sb-write.php?tid=$tid&path=$path&f=$filename\" target=\"_blank\">Send Picture Only</a> ] [ <input type=\"hidden\" name=\"subjects\" value=\"" . urlencode(stripslashes($subject)) . "\" /><input type=\"hidden\" name=\"maintext\" value=\"" . urlencode(stripslashes($maintext)) . "\" /><input type=submit value=\" Blog Write \"> ]</form>"; |
---|
158 |
|
---|
159 |
|
---|
160 |
}else{ |
---|
161 |
//タイトル |
---|
162 |
if ($tid == 0){ |
---|
163 |
$subjects = "「".$subtitle."」"; |
---|
164 |
}else{ |
---|
165 |
if ($countno == ""){ |
---|
166 |
$subjects = "$title 「".$subtitle."」"; |
---|
167 |
}else{ |
---|
168 |
$subjects = "$title #". $countno ." 「".$subtitle."」"; |
---|
169 |
} |
---|
170 |
} |
---|
171 |
print "<form id=\"form1\" name=\"form1\" method=\"post\" action=\"./sb-edit.php?pid=$pid&f=$filename\"> |
---|
172 |
<input type=\"text\" name=\"subject\" size=\"70\"value=\"$subjects \"><br /> |
---|
173 |
<select class='hosi' name='rank4' size='1'> |
---|
174 |
<option value='-2'>×見切り |
---|
175 |
<option value='-1'>▲見切り候補 |
---|
176 |
<option value='0'>−見てない |
---|
177 |
<option value='1' selected=\"selected\">★ふつう |
---|
178 |
<option value='2'>★★おもしろい |
---|
179 |
<option value='3'>★★★名作 |
---|
180 |
<option value='4'>★★★★殿堂 |
---|
181 |
</select> |
---|
182 |
<br /> |
---|
183 |
<br /> |
---|
184 |
<input type=\"hidden\" name=\"preview\" value=\"1\" /> |
---|
185 |
|
---|
186 |
<textarea name=\"textarea\" rows=\"40\" cols=\"55\"> |
---|
187 |
"; |
---|
188 |
if ($tid > 0){ |
---|
189 |
print " |
---|
190 |
|
---|
191 |
参考リンク:<a href = \"http://cal.syoboi.jp/tid/$tid/\" target=\"_blank\"> $title</a> "; |
---|
192 |
if ($countno != ""){ |
---|
193 |
print "第". $countno ."話 "; |
---|
194 |
} |
---|
195 |
print"<a href = \"http://cal.syoboi.jp/tid/$tid/time#$pid\" target=\"_blank\">$subtitle</a> (情報:<a href = \"http://cal.syoboi.jp/\">しょぼいカレンダー</a>)"; |
---|
196 |
} |
---|
197 |
print " </textarea><br /> |
---|
198 |
<input type=submit value=\" ブレビュー \"> |
---|
199 |
</form> |
---|
200 |
|
---|
201 |
"; |
---|
202 |
} |
---|
203 |
/* |
---|
204 |
ToDo |
---|
205 |
・Formプレビュー |
---|
206 |
・パブリッシュボタン |
---|
207 |
・ |
---|
208 |
*/ |
---|
209 |
|
---|
210 |
// タイトル一覧 ここまで |
---|
211 |
} |
---|
212 |
|
---|
213 |
?> |
---|
214 |
|
---|
215 |
</body> |
---|
216 |
</html> |
---|
217 |
|
---|