root/trunk/install/php/StarlightBreaker /sb-write.php

リビジョン 56, 3.7 kB (コミッタ: sorshi, コミット時期: 18 年 前)

アニメ感想ブログラクチン書き込みツール、Starlight Breakerの評価版公開

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 tid:TID
12 path:PATH (1004-15-20061018-0145)
13 f:filename (00000102.jpg)
14
15  DCC-JPL Japan/foltia project
16
17 */
18
19 //�鴻�����潟������include("./sb-config.php");
20
21 include("./foltialib.php");
22
23 $tid = getgetnumform(tid);
24 $path = getgetform(path);
25 $filename = getgetform(f);
26 $blogwritepw = "$_POST[blogpw]" ;
27
28 $blogtitle = stripslashes(mb_convert_encoding(urldecode($_POST[subjects]), "UTF-8", "EUC-JP"));
29 //$blogtitle =  stripslashes(urldecode($_POST[subjects]));
30 $blogmessages = stripslashes(mb_convert_encoding(urldecode($_POST[maintext]), "UTF-8", "EUC-JP"));
31
32
33
34 if (($tid == "") ||($filename == "") || ($path == "")) {
35     header("Status: 404 Not Found",TRUE,404);
36 }
37
38 $htmloutput = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">
39 <html lang=\"ja\">
40 <head>
41 <meta http-equiv=\"Content-Type\" content=\"text/html; charset=EUC-JP\">
42 <meta http-equiv=\"Content-Style-Type\" content=\"text/css\">
43 <link rel=\"stylesheet\" type=\"text/css\" href=\"graytable.css\">
44 <title>Starlight Breaker -�吾�莨若�</title>
45 </head>
46 <body BGCOLOR=\"#ffffff\" TEXT=\"#494949\" LINK=\"#0047ff\" VLINK=\"#000000\" ALINK=\"#c6edff\" >
47 <div align=\"center\">";
48
49 $htmloutput mb_convert_encoding("$htmloutput","EUC-JP", "UTF-8");
50 print "$htmloutput";
51
52
53 printhtmlpageheader();
54
55 if (($tid == "") ||($filename == "") || ($path == "")) {
56     print "No pictures<br></body></html>";
57     exit;
58 }
59
60 $htmloutput = " <p align=\"left\"><font color=\"#494949\" size=\"6\">�吾�莨若��祉���������</font></p>  <hr size=\"4\">";
61 $htmloutput mb_convert_encoding($htmloutput,"EUC-JP", "UTF-8");
62 print "$htmloutput";
63
64
65 print "\n<!-- ";
66 print "$tid \n";//1004
67 print "$path \n";// 1004-15-20061018-0145
68 print "$filename \n";// 00000102.jpg
69
70 // copy src
71 // /home/foltia/php/tv/1004.localized/img/1004-15-20061018-0145/00000183.jpg
72
73 // dist
74 // /home/jplcom/public_html/diary/wp-content/uploads/StarlightBreaker/
75
76 $imgpathfilename = "$path-$filename";
77 $copycmd = "scp $recfolderpath/$tid.localized/img/$path/$filename  $scpuploaduseraccount@$uploadserver:$uploaddir/$imgpathfilename";
78
79 $blogmessages = "<img src=\"$wordpressimgdir/$imgpathfilename\" width=\"160\" height=\"120\" alt=\"$blogtitle\"> ".$blogmessages ;
80
81
82 print "$copycmd \n";//
83 $oserr = `$copycmd`;
84 print "$oserr \n";//
85
86
87
88 //�吾�莨若�
89 require_once 'Services/Blogging.php';
90 //$blogurl = "http://www.dcc-jpl.com/wp3/wordpress/";
91 //$datafilepath = "/home/jplcom/public_html/soft/map/data";
92 //$picturepath = "http://www.dcc-jpl.com/wp3/wordpress/wp-content/uploads/";
93
94 $settings = Services_Blogging::discoverSettings($blogurl);
95 $choicedriver Services_Blogging::getBestAvailableDriver($settings) . "\r\n";
96 $server = $settings["apis"]["MetaWeblog"]["server"];
97 $path $settings["apis"]["MetaWeblog"]["path"];
98 $bl = Services_Blogging::factory('MetaWeblog', $blogwriteid , $blogwritepw , "$server", "$path");
99 print "$server \n";
100 print "$path \n";
101 //print "$blogtitle <br />\n";
102 //print "$blogmessages <br />\n";
103 print "--> \n";
104
105 $post = $bl->createNewPost();
106 $post->title = "$blogtitle";
107 $post->content = "$blogmessages";
108 $bl->savePost($post);
109 //echo 'post id: ' . $post->id;
110
111 print "<a href = \"$blogurl/?p=";
112 echo $post->id;
113 print "\">Go Entry</a><br /><hr>\n";
114
115 $blogtitle mb_convert_encoding($blogtitle,"EUC-JP", "UTF-8");
116 print "$blogtitle <br />\n";
117
118 //print "<img src='$wordpressimgdir/$imgpathfilename' width='160' height='120' align=\"left\">\n";
119
120 $blogmessages mb_convert_encoding($blogmessages,"EUC-JP", "UTF-8");
121 print "$blogmessages <br />\n";
122
123
124
125
126 ?>
127
128 </body>
129 </html>
130
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。
track feed