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 |
$maintext = mbereg_replace("\n","<br />\n", $maintext); |
---|
124 |
$rate = getform(rank4); |
---|
125 |
|
---|
126 |
switch ($rate) { |
---|
127 |
case -2: |
---|
128 |
$ratechara = "× "; |
---|
129 |
break; |
---|
130 |
case -1: |
---|
131 |
$ratechara = "▲ "; |
---|
132 |
break; |
---|
133 |
case 0: |
---|
134 |
$ratechara = "− "; |
---|
135 |
break; |
---|
136 |
case 1: |
---|
137 |
$ratechara = "★ "; |
---|
138 |
break; |
---|
139 |
case 2: |
---|
140 |
$ratechara = "★★ "; |
---|
141 |
break; |
---|
142 |
case 3: |
---|
143 |
$ratechara = "★★★ "; |
---|
144 |
break; |
---|
145 |
case 4: |
---|
146 |
$ratechara = "★★★★ "; |
---|
147 |
break; |
---|
148 |
default: |
---|
149 |
$ratechara = "− "; |
---|
150 |
} |
---|
151 |
$subject = $ratechara . $subject; |
---|
152 |
|
---|
153 |
print "". htmlspecialchars(stripslashes( $subject)) ."<br />\n"; |
---|
154 |
print "". stripslashes( $maintext) ."<br />\n"; |
---|
155 |
print "<br />\n"; |
---|
156 |
print "本文(source view):<br />". htmlspecialchars(stripslashes( $maintext)) ."<hr><br /><br /><br />\n"; |
---|
157 |
|
---|
158 |
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>"; |
---|
159 |
|
---|
160 |
|
---|
161 |
}else{ |
---|
162 |
//タイトル |
---|
163 |
if ($tid == 0){ |
---|
164 |
$subjects = "「".$subtitle."」"; |
---|
165 |
}else{ |
---|
166 |
if ($countno == ""){ |
---|
167 |
$subjects = "$title 「".$subtitle."」"; |
---|
168 |
}else{ |
---|
169 |
$subjects = "$title #". $countno ." 「".$subtitle."」"; |
---|
170 |
} |
---|
171 |
} |
---|
172 |
print "<form id=\"form1\" name=\"form1\" method=\"post\" action=\"./sb-edit.php?pid=$pid&f=$filename\"> |
---|
173 |
<input type=\"text\" name=\"subject\" size=\"70\"value=\"$subjects \"><br /> |
---|
174 |
<select class='hosi' name='rank4' size='1'> |
---|
175 |
<option value='-2'>×見切り |
---|
176 |
<option value='-1'>▲見切り候補 |
---|
177 |
<option value='0'>−見てない |
---|
178 |
<option value='1' selected=\"selected\">★ふつう |
---|
179 |
<option value='2'>★★おもしろい |
---|
180 |
<option value='3'>★★★名作 |
---|
181 |
<option value='4'>★★★★殿堂 |
---|
182 |
</select> |
---|
183 |
<br /> |
---|
184 |
<br /> |
---|
185 |
<input type=\"hidden\" name=\"preview\" value=\"1\" /> |
---|
186 |
|
---|
187 |
<textarea name=\"textarea\" rows=\"40\" cols=\"55\"> |
---|
188 |
"; |
---|
189 |
if ($tid > 0){ |
---|
190 |
print " |
---|
191 |
|
---|
192 |
参考リンク:<a href = \"http://cal.syoboi.jp/tid/$tid/\" target=\"_blank\"> $title</a> "; |
---|
193 |
if ($countno != ""){ |
---|
194 |
print "第". $countno ."話 "; |
---|
195 |
} |
---|
196 |
print"<a href = \"http://cal.syoboi.jp/tid/$tid/time#$pid\" target=\"_blank\">$subtitle</a> (情報:<a href = \"http://cal.syoboi.jp/\">しょぼいカレンダー</a>)"; |
---|
197 |
} |
---|
198 |
print " </textarea><br /> |
---|
199 |
<input type=submit value=\" ブレビュー \"> |
---|
200 |
</form> |
---|
201 |
|
---|
202 |
"; |
---|
203 |
} |
---|
204 |
/* |
---|
205 |
ToDo |
---|
206 |
・Formプレビュー |
---|
207 |
・パブリッシュボタン |
---|
208 |
・ |
---|
209 |
*/ |
---|
210 |
|
---|
211 |
// タイトル一覧 ここまで |
---|
212 |
} |
---|
213 |
|
---|
214 |
?> |
---|
215 |
|
---|
216 |
</body> |
---|
217 |
</html> |
---|
218 |
|
---|