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

リビジョン 80, 4.0 kB (コミッタ: sorshi, コミット時期: 16 年 前)

Starlight Breaker update:apply env polycy

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 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 }//end if login
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 //$blogtitle =  stripslashes(urldecode($_POST[subjects]));
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";//1004
79 print "$path \n";// 1004-15-20061018-0145
80 print "$filename \n";// 00000102.jpg
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 //$blogurl = "http://www.dcc-jpl.com/wp3/wordpress/";
103 //$datafilepath = "/home/jplcom/public_html/soft/map/data";
104 //$picturepath = "http://www.dcc-jpl.com/wp3/wordpress/wp-content/uploads/";
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 //print "$blogtitle <br />\n";
114 //print "$blogmessages <br />\n";
115 print "--> \n";
116
117 $post = $bl->createNewPost();
118 $post->title = "$blogtitle";
119 $post->content = "$blogmessages";
120 $bl->savePost($post);
121 //echo 'post id: ' . $post->id;
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 //print "<img src='$wordpressimgdir/$imgpathfilename' width='160' height='120' align=\"left\">\n";
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
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。
track feed