| 1 | 
<?php | 
|---|
| 2 | 
 | 
|---|
| 3 | 
 | 
|---|
| 4 | 
 | 
|---|
| 5 | 
 | 
|---|
| 6 | 
 | 
|---|
| 7 | 
 | 
|---|
| 8 | 
 | 
|---|
| 9 | 
 | 
|---|
| 10 | 
 | 
|---|
| 11 | 
 | 
|---|
| 12 | 
 | 
|---|
| 13 | 
 | 
|---|
| 14 | 
 | 
|---|
| 15 | 
 | 
|---|
| 16 | 
 | 
|---|
| 17 | 
 | 
|---|
| 18 | 
 | 
|---|
| 19 | 
 | 
|---|
| 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 | 
 | 
|---|
| 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"; | 
|---|
| 67 | 
print "$path \n"; | 
|---|
| 68 | 
print "$filename \n"; | 
|---|
| 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 | 
 | 
|---|
| 91 | 
 | 
|---|
| 92 | 
 | 
|---|
| 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 | 
 | 
|---|
| 102 | 
 | 
|---|
| 103 | 
print "--> \n"; | 
|---|
| 104 | 
 | 
|---|
| 105 | 
$post = $bl->createNewPost(); | 
|---|
| 106 | 
$post->title = "$blogtitle"; | 
|---|
| 107 | 
$post->content = "$blogmessages"; | 
|---|
| 108 | 
$bl->savePost($post); | 
|---|
| 109 | 
 | 
|---|
| 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 | 
 | 
|---|
| 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 | 
 | 
|---|