1 |
<?php |
---|
2 |
|
---|
3 |
|
---|
4 |
|
---|
5 |
|
---|
6 |
|
---|
7 |
|
---|
8 |
|
---|
9 |
|
---|
10 |
|
---|
11 |
|
---|
12 |
|
---|
13 |
|
---|
14 |
|
---|
15 |
|
---|
16 |
|
---|
17 |
|
---|
18 |
|
---|
19 |
|
---|
20 |
include("./foltialib.php"); |
---|
21 |
$con = m_connect(); |
---|
22 |
|
---|
23 |
if ($useenvironmentpolicy == 1){ |
---|
24 |
if (!isset($_SERVER['PHP_AUTH_USER'])) { |
---|
25 |
header("WWW-Authenticate: Basic realm=\"foltia\""); |
---|
26 |
header("HTTP/1.0 401 Unauthorized"); |
---|
27 |
redirectlogin(); |
---|
28 |
exit; |
---|
29 |
} else { |
---|
30 |
login($con,$_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW']); |
---|
31 |
} |
---|
32 |
} |
---|
33 |
|
---|
34 |
|
---|
35 |
$tid = getgetnumform(tid); |
---|
36 |
$path = getgetform(path); |
---|
37 |
$filename = getgetform(f); |
---|
38 |
$blogwritepw = "$_POST[blogpw]" ; |
---|
39 |
|
---|
40 |
$blogtitle = stripslashes(mb_convert_encoding(urldecode($_POST[subjects]), "UTF-8", "EUC-JP")); |
---|
41 |
|
---|
42 |
$blogmessages = stripslashes(mb_convert_encoding(urldecode($_POST[maintext]), "UTF-8", "EUC-JP")); |
---|
43 |
|
---|
44 |
|
---|
45 |
|
---|
46 |
if (($tid == "") ||($filename == "") || ($path == "")) { |
---|
47 |
header("Status: 404 Not Found",TRUE,404); |
---|
48 |
} |
---|
49 |
|
---|
50 |
$htmloutput = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\"> |
---|
51 |
<html lang=\"ja\"> |
---|
52 |
<head> |
---|
53 |
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=EUC-JP\"> |
---|
54 |
<meta http-equiv=\"Content-Style-Type\" content=\"text/css\"> |
---|
55 |
<link rel=\"stylesheet\" type=\"text/css\" href=\"graytable.css\"> |
---|
56 |
<title>Starlight Breaker -�吾�莨若�</title> |
---|
57 |
</head> |
---|
58 |
<body BGCOLOR=\"#ffffff\" TEXT=\"#494949\" LINK=\"#0047ff\" VLINK=\"#000000\" ALINK=\"#c6edff\" > |
---|
59 |
<div align=\"center\">"; |
---|
60 |
|
---|
61 |
$htmloutput = mb_convert_encoding("$htmloutput","EUC-JP", "UTF-8"); |
---|
62 |
print "$htmloutput"; |
---|
63 |
|
---|
64 |
|
---|
65 |
printhtmlpageheader(); |
---|
66 |
|
---|
67 |
if (($tid == "") ||($filename == "") || ($path == "")) { |
---|
68 |
print "No pictures<br></body></html>"; |
---|
69 |
exit; |
---|
70 |
} |
---|
71 |
|
---|
72 |
$htmloutput = " <p align=\"left\"><font color=\"#494949\" size=\"6\">�吾�莨若��祉���������</font></p> <hr size=\"4\">"; |
---|
73 |
$htmloutput = mb_convert_encoding($htmloutput,"EUC-JP", "UTF-8"); |
---|
74 |
print "$htmloutput"; |
---|
75 |
|
---|
76 |
|
---|
77 |
print "\n<!-- "; |
---|
78 |
print "$tid \n"; |
---|
79 |
print "$path \n"; |
---|
80 |
print "$filename \n"; |
---|
81 |
|
---|
82 |
// copy src |
---|
83 |
// /home/foltia/php/tv/1004.localized/img/1004-15-20061018-0145/00000183.jpg |
---|
84 |
|
---|
85 |
// dist |
---|
86 |
// /home/jplcom/public_html/diary/wp-content/uploads/StarlightBreaker/ |
---|
87 |
|
---|
88 |
$imgpathfilename = "$path-$filename"; |
---|
89 |
$copycmd = "scp $recfolderpath/$tid.localized/img/$path/$filename $scpuploaduseraccount@$uploadserver:$uploaddir/$imgpathfilename"; |
---|
90 |
|
---|
91 |
$blogmessages = "<img src=\"$wordpressimgdir/$imgpathfilename\" width=\"160\" height=\"120\" alt=\"$blogtitle\"> ".$blogmessages ; |
---|
92 |
|
---|
93 |
|
---|
94 |
print "$copycmd \n"; |
---|
95 |
$oserr = `$copycmd`; |
---|
96 |
print "$oserr \n"; |
---|
97 |
|
---|
98 |
|
---|
99 |
|
---|
100 |
//�吾�莨若� |
---|
101 |
require_once 'Services/Blogging.php'; |
---|
102 |
|
---|
103 |
|
---|
104 |
|
---|
105 |
|
---|
106 |
$settings = Services_Blogging::discoverSettings($blogurl); |
---|
107 |
$choicedriver = Services_Blogging::getBestAvailableDriver($settings) . "\r\n"; |
---|
108 |
$server = $settings["apis"]["MetaWeblog"]["server"]; |
---|
109 |
$path = $settings["apis"]["MetaWeblog"]["path"]; |
---|
110 |
$bl = Services_Blogging::factory('MetaWeblog', $blogwriteid , $blogwritepw , "$server", "$path"); |
---|
111 |
print "$server \n"; |
---|
112 |
print "$path \n"; |
---|
113 |
|
---|
114 |
|
---|
115 |
print "--> \n"; |
---|
116 |
|
---|
117 |
$post = $bl->createNewPost(); |
---|
118 |
$post->title = "$blogtitle"; |
---|
119 |
$post->content = "$blogmessages"; |
---|
120 |
$bl->savePost($post); |
---|
121 |
|
---|
122 |
|
---|
123 |
print "<a href = \"$blogurl/?p="; |
---|
124 |
echo $post->id; |
---|
125 |
print "\">Go Entry</a><br /><hr>\n"; |
---|
126 |
|
---|
127 |
$blogtitle = mb_convert_encoding($blogtitle,"EUC-JP", "UTF-8"); |
---|
128 |
print "$blogtitle <br />\n"; |
---|
129 |
|
---|
130 |
|
---|
131 |
|
---|
132 |
$blogmessages = mb_convert_encoding($blogmessages,"EUC-JP", "UTF-8"); |
---|
133 |
print "$blogmessages <br />\n"; |
---|
134 |
|
---|
135 |
|
---|
136 |
|
---|
137 |
|
---|
138 |
?> |
---|
139 |
|
---|
140 |
</body> |
---|
141 |
</html> |
---|
142 |
= pg_num_rows($rs); |
---|
143 |
|
---|
144 |
if ($maxrows == 0) { |
---|
145 |
echo("放映予定はありません<BR>"); |
---|
146 |
} |
---|
147 |
else{ |
---|
148 |
$maxcols = pg_num_fields($rs); |
---|
149 |
?> |
---|
150 |
<table BORDER="0" CELLPADDING="0" CELLSPACING="2" WIDTH="100%" BGCOLOR="#bcf1be"> |
---|
151 |
<thead> |
---|
152 |
<tr> |
---|
153 |
<th align="left">放映局</th> |
---|
154 |
<th align="left">話数</th> |
---|
155 |
<th align="left">サブタイトル</th> |
---|
156 |
<th align="left">開始時刻</th> |
---|
157 |
<th align="left">総尺</th> |
---|
158 |
<th align="left">時刻ずれ</th> |
---|
159 |
|
---|
160 |
</tr> |
---|
161 |
</thead> |
---|
162 |
|
---|
163 |
<tbody> |
---|
164 |
<?php |
---|
165 |
|
---|
166 |
for ($row = 0; $row < $maxrows; $row++) { |
---|
167 |
echo("<tr>\n"); |
---|
168 |
|
---|
169 |
$rowdata = pg_fetch_row($rs, $row); |
---|
170 |
|
---|
171 |
for ($col = 0; $col < $maxcols; $col++) { |
---|
172 |
echo("<td>".htmlspecialchars($rowdata[$col])."<br></td>\n"); |
---|
173 |
} |
---|
174 |
echo("</tr>\n"); |
---|
175 |
} |
---|
176 |
} |
---|
177 |
?> |
---|
178 |
</tbody> |
---|
179 |
</table> |
---|
180 |
|
---|
181 |
|
---|
182 |
|
---|
183 |
</body> |
---|
184 |
</html> |
---|
185 |
|
---|