Index: trunk/xpressme_integration_kit/wp-content/plugins/xpressme/language/xpressme-ja.po
===================================================================
--- trunk/xpressme_integration_kit/wp-content/plugins/xpressme/language/xpressme-ja.po	(revision 363)
+++ trunk/xpressme_integration_kit/wp-content/plugins/xpressme/language/xpressme-ja.po	(revision 368)
@@ -4,11 +4,10 @@
 # toemon <info@toemon.com>
 #
-#, fuzzy
 msgid ""
 msgstr ""
 "Project-Id-Version: XPressME Plugin\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-07-24 17:20+0900\n"
-"PO-Revision-Date: 2009-07-24 17:22+0900\n"
+"POT-Creation-Date: 2009-08-24 20:14+0900\n"
+"PO-Revision-Date: 2009-08-24 20:26+0900\n"
 "Last-Translator: toemon <info@toemon.com>\n"
 "Language-Team: toemon <info@toemon.com>\n"
@@ -24,37 +23,31 @@
 "X-Poedit-SearchPath-0: .\n"
 
-#: xpressme.php:34
+#: xpressme.php:33
 msgid "Display Settings"
 msgstr "表示設定"
 
-#: xpressme.php:35
+#: xpressme.php:34
 msgid "Integration Settings"
 msgstr "統合設定"
 
-#: xpressme.php:36
+#: xpressme.php:35
 msgid "Other Settings"
 msgstr "その他の設定"
 
 #: xpressme.php:37
+msgid "Upgrade"
+msgstr "アップグレード"
+
+#: xpressme.php:38
 msgid "to XOOPS Admin"
 msgstr "XOOPS管理へ"
 
-#: xpressme.php:137
+#: xpressme.php:138
 msgid "XPressME Display Setting"
 msgstr "XPressME 表示設定"
 
-#: xpressme.php:143
+#: xpressme.php:144
 msgid "Thema Sidebar Display"
 msgstr "テーマ表示時にサイドバー表示する。"
-
-#: xpressme.php:144
-#: xpressme.php:233
-#: xpressme.php:239
-#: xpressme.php:244
-#: xpressme.php:250
-#: xpressme_class.php:270
-#: xpressme_class.php:286
-msgid "YES"
-msgstr "はい"
 
 #: xpressme.php:145
@@ -65,421 +58,473 @@
 #: xpressme_class.php:271
 #: xpressme_class.php:287
+msgid "YES"
+msgstr "はい"
+
+#: xpressme.php:146
+#: xpressme.php:235
+#: xpressme.php:241
+#: xpressme.php:246
+#: xpressme.php:252
+#: xpressme_class.php:272
+#: xpressme_class.php:288
 msgid "NO"
 msgstr "いいえ"
-
-#: xpressme.php:153
-#: xpressme.php:202
-#: xpressme.php:256
-msgid "Update Config"
-msgstr "更新"
 
 #: xpressme.php:154
 #: xpressme.php:203
 #: xpressme.php:257
+msgid "Update Config"
+msgstr "更新"
+
+#: xpressme.php:155
+#: xpressme.php:204
+#: xpressme.php:258
 msgid "Preset Config"
 msgstr "プリセット"
 
-#: xpressme.php:186
+#: xpressme.php:187
 msgid "XPressME Integration Setting"
 msgstr "XPressME 統合設定"
 
-#: xpressme.php:191
+#: xpressme.php:192
 msgid "Media Upload Base Path"
 msgstr "メディアアップロードのベースパス設定"
 
-#: xpressme.php:192
+#: xpressme.php:193
 msgid "Use XOOPS UPLOAD PATH"
 msgstr "XOOPSのアップロードパスを使用する。"
 
-#: xpressme.php:193
+#: xpressme.php:194
 msgid "USE WordPress BASE_PATH"
 msgstr "WordPressのベースパスを使用する。"
 
-#: xpressme.php:227
+#: xpressme.php:228
 msgid "XPressME Other Setting"
 msgstr "XPressME その他の設定"
 
-#: xpressme.php:232
+#: xpressme.php:233
 msgid "The change tracking of the post is preserved"
 msgstr "投稿の変更履歴を有効にする。"
 
-#: xpressme.php:238
+#: xpressme.php:239
 msgid "Select Multi user mode"
 msgstr "マルチユーザーモードを選択"
 
-#: xpressme.php:243
+#: xpressme.php:244
 msgid "Is the posts author views counted?"
 msgstr "投稿者の閲覧をカウントしますか？"
 
-#: xpressme.php:249
+#: xpressme.php:250
 msgid "Is SQL debugging window displayed?"
 msgstr "SQLデバッグウィンドを表示しますか？"
 
-#: xpressme_class.php:51
-#: xpressme_class.php:222
+#: xpressme.php:274
+msgid "XPressME Upgrade"
+msgstr "XPressME アップグレード"
+
+#: xpressme.php:288
+#, php-format
+msgid "You are using a XPressME Integration Kit development version (%1$s). Cool! Please <a href=\"%2$s\">stay updated</a>."
+msgstr "お使いの XPressME Integration Kit は開発版 (%1$s) です。すばらしい ! どうぞ<a href=\"%2$s\">最新版を使い続けてください</a>。"
+
+#: xpressme.php:292
+msgid "There is a new version of XPressME Integration Kit available for upgrade"
+msgstr "新しいバージョンの XPressME Integration Kit にアップグレードが可能です"
+
+#: xpressme.php:295
+#, php-format
+msgid "You can upgrade to version %s download the package and install it manually:"
+msgstr "バージョン %s のパッケージを手動でダウンロードしてインストールすることができます。"
+
+#: xpressme.php:298
+#, php-format
+msgid "Download %s"
+msgstr "%s をダウンロード"
+
+#: xpressme.php:301
+msgid "You have the latest version of XPressME Integration Kit. You do not need to upgrade"
+msgstr "最新バージョンの XPressME Integration Kit をご利用中です。アップグレードの必要はありません。"
+
+#: xpressme.php:305
+#, php-format
+msgid "There is no response from <a href=\"%s\">version check API</a> now. sorry, please confirm it after."
+msgstr "現在、<a href=\"%s\">version check API</a>からのレスポンスがありません。　申し訳ありませんが、しばらく後で確認してください。"
+
+#: xpressme.php:398
+#, php-format
+msgid "XPressME Integration Kit Version %1$s is available! <a href=\"%2$s\">Please update now</a>."
+msgstr "XPressME Integration Kit Version %1$s が利用可能です ! <a href=\"%2$s\">アップデートしてください</a>。"
+
+#: xpressme.php:400
+#, php-format
+msgid "XPressME Integration Kit Version %1$s is available! Please notify the site administrator."
+msgstr "XPressME Integration Kit Version %1$s が利用可能です ! サイト管理者に連絡してください。"
+
+#: xpressme_class.php:52
+#: xpressme_class.php:223
 msgid "Older Post"
 msgstr "前の投稿へ"
 
-#: xpressme_class.php:52
-#: xpressme_class.php:225
+#: xpressme_class.php:53
+#: xpressme_class.php:226
 msgid "Newer Post"
 msgstr "次の投稿へ"
 
-#: xpressme_class.php:54
-#: xpressme_class.php:228
+#: xpressme_class.php:55
+#: xpressme_class.php:229
 msgid "Older Entries"
 msgstr "前ページへ"
 
-#: xpressme_class.php:55
-#: xpressme_class.php:231
+#: xpressme_class.php:56
+#: xpressme_class.php:232
 msgid "Newer Entries"
 msgstr "次ページへ"
 
-#: xpressme_class.php:69
 #: xpressme_class.php:70
-#: xpressme_class.php:234
+#: xpressme_class.php:71
+#: xpressme_class.php:235
 msgid "Read the rest of this entry &raquo;"
 msgstr "この投稿の続きを読む &raquo;"
 
-#: xpressme_class.php:329
+#: xpressme_class.php:330
 msgid "Single Post Navi Setting"
 msgstr "シングルポストナビの設定"
 
-#: xpressme_class.php:334
-#: xpressme_class.php:379
+#: xpressme_class.php:335
+#: xpressme_class.php:380
 msgid "Adjustment of Navi link display position"
 msgstr "リンクの表示位置設定"
 
-#: xpressme_class.php:337
+#: xpressme_class.php:338
 msgid "'Old Post Link' is displayed in the left, and 'Newer Post Link' is displayed in the right"
 msgstr "以前の記事へのリンクを左に、より新しい記事へのリンクを右に表示"
 
-#: xpressme_class.php:338
+#: xpressme_class.php:339
 msgid "'Newer Post Link' is displayed in the left, and 'Old Post Link' is displayed in the right"
 msgstr "より新しい記事へのリンクを左に、古い記事へのリンクを右に表示"
 
-#: xpressme_class.php:344
+#: xpressme_class.php:345
 msgid "Select Display name of PostNavi Link"
 msgstr "表示するリンクテキストを選択"
 
-#: xpressme_class.php:347
+#: xpressme_class.php:348
 msgid "Title of post"
 msgstr "投稿記事のタイトルを表示"
 
-#: xpressme_class.php:348
+#: xpressme_class.php:349
 msgid "Title of Navi"
 msgstr "ナビタイトルを表示"
 
-#: xpressme_class.php:354
+#: xpressme_class.php:355
 msgid "Display Navi Title of Old Post Link"
 msgstr "古い記事へのナビタイトルを設定"
 
-#: xpressme_class.php:361
+#: xpressme_class.php:362
 msgid "Display Navi Title of Newer Post Link"
 msgstr "より新しい記事へのナビタイトルを設定"
 
-#: xpressme_class.php:374
+#: xpressme_class.php:375
 msgid "Posts List Page Navi Setting"
 msgstr "ポストリストページナビの設定"
 
-#: xpressme_class.php:382
+#: xpressme_class.php:383
 msgid "'Old Page Link' is displayed in the left, and 'Newer Page Link' is displayed in the right"
 msgstr "古いページへのリンクを左に、より新しいページへのリンクを右に表示"
 
-#: xpressme_class.php:383
+#: xpressme_class.php:384
 msgid "'Newer Page Link' is displayed in the left, and 'Old Page Link' is displayed in the right"
 msgstr "より新しいページへのリンクを左に、古いページへのリンクを右に表示"
 
-#: xpressme_class.php:389
+#: xpressme_class.php:390
 msgid "Display Navi Title of Old Page Link"
 msgstr "古いページへのナビタイトルを設定"
 
-#: xpressme_class.php:396
+#: xpressme_class.php:397
 msgid "Display Navi Title of Newer Page Link"
 msgstr "より新しいページへのナビタイトルを設定"
 
-#: xpressme_class.php:411
+#: xpressme_class.php:412
 msgid "Role Setting at Login"
 msgstr "ログイン時の権限設定"
 
-#: xpressme_class.php:414
+#: xpressme_class.php:415
 msgid "XOOPS Groupe"
 msgstr "XOOPSグループ名"
 
-#: xpressme_class.php:414
+#: xpressme_class.php:415
 msgid "WordPress Role"
 msgstr "WordPressでの権限"
 
-#: xpressme_class.php:414
+#: xpressme_class.php:415
 msgid "Role is set at each login"
 msgstr "ログイン時、常に権限を更新する"
-
-#: xpressme_class.php:440
-#: xpressme_class.php:444
-#: xpressme_class.php:447
-msgid "Default Role of WordPress"
-msgstr "WordPressのデフォルト権限"
 
 #: xpressme_class.php:441
 #: xpressme_class.php:445
 #: xpressme_class.php:448
+msgid "Default Role of WordPress"
+msgstr "WordPressのデフォルト権限"
+
+#: xpressme_class.php:442
+#: xpressme_class.php:446
+#: xpressme_class.php:449
 msgid "Group User Doesn't Register"
 msgstr "ユーザ登録しない"
 
-#: xpressme_class.php:479
+#: xpressme_class.php:480
 msgid "WordPress MU cannot integrate the comments."
 msgstr "WordPress MUはコメント統合できません。"
 
-#: xpressme_class.php:481
+#: xpressme_class.php:482
 msgid "Do Not Comment Integration."
 msgstr "コメント統合しません。"
 
-#: xpressme_class.php:516
+#: xpressme_class.php:517
 msgid "Comment integration with D3Forum"
 msgstr "D3Forumとのコメント統合"
 
-#: xpressme_class.php:518
+#: xpressme_class.php:519
 msgid "Select the forum of D3Forum that does the comment integration from the following lists."
 msgstr "以下のリストからコメント統合をするD3Forumのフォーラムを選択してください。"
 
-#: xpressme_class.php:523
+#: xpressme_class.php:524
 msgid "Select the Type of display of D3Forum comment."
 msgstr "D3Forumの表示タイプを選択"
 
-#: xpressme_class.php:525
-#: xpressme_class.php:528
+#: xpressme_class.php:526
+#: xpressme_class.php:529
 msgid "Flat"
 msgstr "フラット"
 
-#: xpressme_class.php:526
-#: xpressme_class.php:529
+#: xpressme_class.php:527
+#: xpressme_class.php:530
 msgid "Threaded"
 msgstr "スレッド"
 
-#: xpressme_class.php:532
+#: xpressme_class.php:533
 msgid "Select the order of display of D3Forum comment."
 msgstr "D3Forumコメントの表示順を選択"
 
-#: xpressme_class.php:534
-#: xpressme_class.php:537
+#: xpressme_class.php:535
+#: xpressme_class.php:538
 msgid "DESC"
 msgstr "降順"
 
-#: xpressme_class.php:535
-#: xpressme_class.php:538
+#: xpressme_class.php:536
+#: xpressme_class.php:539
 msgid "ASC"
 msgstr "昇順"
 
-#: xpressme_class.php:541
+#: xpressme_class.php:542
 msgid "Number of displays of D3Forum comments."
 msgstr "D3Forumのコメント表示数"
 
-#: xpressme_class.php:544
+#: xpressme_class.php:545
 msgid "The import and the export between Wordpress Comments and the D3Forum Posts can be done. "
 msgstr "WordPressコメントとD3Forumポスト間の一括転送（エクスポート・インポート）"
 
-#: xpressme_class.php:545
+#: xpressme_class.php:546
 msgid "Export to D3Forum"
 msgstr "D3Forumへ一括エクスポート"
 
-#: xpressme_class.php:546
+#: xpressme_class.php:547
 msgid "Import from D3Forum"
 msgstr "D3Forumから一括インポート"
 
-#: xpressme_class.php:559
+#: xpressme_class.php:560
 msgid "Contents Excerpt Setting"
 msgstr "記事抜粋の設定"
 
-#: xpressme_class.php:564
+#: xpressme_class.php:565
 msgid "Is the excerpt display done with the archive of contents?"
 msgstr "記事のアーカイブで抜粋表示を行いますか？"
 
-#: xpressme_class.php:571
+#: xpressme_class.php:572
 msgid "When ASCII character more than the set ratio is included, it is judged ASCII contents. "
 msgstr "ASCII文字が含まれる比率が設定された値より大きい場合、ASCII文字コンテンツと判断します。"
 
-#: xpressme_class.php:578
+#: xpressme_class.php:579
 msgid "Excerpt length of word for ASCII contents"
 msgstr "ASCIIコンテンツの抜粋単語数"
 
-#: xpressme_class.php:585
+#: xpressme_class.php:586
 msgid "Excerpt length of character for multibyte contents"
 msgstr "マルチバイトコンテンツの抜粋文字数"
 
-#: xpressme_class.php:592
+#: xpressme_class.php:593
 msgid "This text is displayed in the link that reads contents not excerpted.(Is not displayed for the blank.)"
 msgstr "抜粋されていないコンテンツを読むためのリンクに表示されるテキスト(空白の場合リンクを表示しません)"
 
-#: xpressme_class.php:599
+#: xpressme_class.php:600
 msgid "This text is displayed in the link that more tag (&lt;!--more--&gt;). "
 msgstr "more タグ (&lt;!--more--&gt;)のリンクに表示されるテキスト"
 
-#: xpressme_class.php:611
+#: xpressme_class.php:612
 msgid "Display Mode Setting"
 msgstr "表示モード設定"
 
-#: xpressme_class.php:614
+#: xpressme_class.php:615
 msgid "Select the XPressME Display Mode."
 msgstr "XPressMEの表示モードの選択"
 
-#: xpressme_class.php:619
+#: xpressme_class.php:620
 msgid "Xoops Mode"
 msgstr "XOOPSモード"
 
-#: xpressme_class.php:623
+#: xpressme_class.php:624
 msgid "WordPress Mode"
 msgstr "WordPressモード"
 
-#: xpressme_class.php:627
+#: xpressme_class.php:628
 msgid "User select"
 msgstr "ユーザによる選択"
 
-#: xpressme_class.php:637
+#: xpressme_class.php:638
 msgid "Header Meta Option"
 msgstr "ヘッダメタ　オプション"
 
-#: xpressme_class.php:642
+#: xpressme_class.php:643
 msgid "Select the Header keyword."
 msgstr "ヘッダで使用するキーワードの選択"
 
-#: xpressme_class.php:647
+#: xpressme_class.php:648
 msgid "Xoops KeyWord"
 msgstr "XOOPSのキーワード"
 
-#: xpressme_class.php:650
+#: xpressme_class.php:651
 msgid "WordPress KeyWord"
 msgstr "WordPressのキーワード"
 
-#: xpressme_class.php:653
+#: xpressme_class.php:654
 msgid "WordPress & Xoops KeyWord"
 msgstr "WordPressｊとXOOPSのキーワード"
 
-#: xpressme_class.php:659
+#: xpressme_class.php:660
 msgid "Select the Header Description."
 msgstr "ヘッダで使用するディスクリプション（説明）の選択"
 
-#: xpressme_class.php:664
+#: xpressme_class.php:665
 msgid "Xoops Description"
 msgstr "XOOPSのディスクリプション"
 
-#: xpressme_class.php:667
+#: xpressme_class.php:668
 msgid "WordPress Description"
 msgstr "WordPressのディスクリプション"
 
-#: xpressme_class.php:670
+#: xpressme_class.php:671
 msgid "WordPress & Xoops Description"
 msgstr "WordPressとXOOPSのディスクリプション"
 
-#: xpressme_class.php:676
+#: xpressme_class.php:677
 msgid "Select the Header Robots Index."
 msgstr "ヘッダで使用するロボットインデックスの選択"
 
-#: xpressme_class.php:681
+#: xpressme_class.php:682
 msgid "Xoops Robots Index"
 msgstr "XOOPSのロボットインデックス"
 
-#: xpressme_class.php:684
+#: xpressme_class.php:685
 msgid "WordPress Robots Index"
 msgstr "WordPressのロボットインデックス"
 
-#: xpressme_class.php:713
+#: xpressme_class.php:714
 #, php-format
 msgid "Unable to create directory %s. Is its parent directory writable by the server?"
 msgstr "%s ディレクトリーが作成できません。サーバーの親ディレクトリー書き込み権限があるか確認くださいr?"
 
-#: include/custom_functions.php:75
+#: include/custom_functions.php:74
 #, php-format
 msgid "Permanent Link to %s"
 msgstr "%sのパーマリンク"
 
-#: include/custom_functions.php:430
-#: include/custom_functions.php:455
+#: include/custom_functions.php:429
+#: include/custom_functions.php:454
 #, php-format
 msgid "views :%d"
 msgstr "閲覧数 :%d"
 
-#: include/custom_functions.php:609
+#: include/custom_functions.php:608
 msgid "Main"
 msgstr "メイン"
 
-#: include/custom_functions.php:612
+#: include/custom_functions.php:611
 #, php-format
 msgid "Archive for the &#8216;%s&#8217; Category"
 msgstr "カテゴリー &#8216;%s&#8217; のアーカイブ"
 
-#: include/custom_functions.php:615
+#: include/custom_functions.php:614
 #, php-format
 msgid "Posts Tagged &#8216;%s&#8217;"
 msgstr "&#8216;%s&#8217; タグのついている投稿"
 
-#: include/custom_functions.php:618
+#: include/custom_functions.php:617
 #, php-format
 msgid "Archive for %s|Daily archive page"
 msgstr "%sの日別アーカイブ"
 
-#: include/custom_functions.php:618
+#: include/custom_functions.php:617
 msgid "F jS, Y"
 msgstr "Y年n月j日"
 
-#: include/custom_functions.php:620
+#: include/custom_functions.php:619
 #, php-format
 msgid "Archive for %s|Monthly archive page"
 msgstr "%sの月別アーカイブ"
 
-#: include/custom_functions.php:620
+#: include/custom_functions.php:619
 msgid "F, Y"
 msgstr "Y年n月"
 
-#: include/custom_functions.php:622
+#: include/custom_functions.php:621
 #, php-format
 msgid "Archive for %s|Yearly archive page"
 msgstr "%sの年別アーカイブ "
 
-#: include/custom_functions.php:622
+#: include/custom_functions.php:621
 msgid "Y"
 msgstr "Y年"
 
-#: include/custom_functions.php:625
+#: include/custom_functions.php:624
 #, php-format
 msgid "Archive for the &#8216;%s&#8217; Author"
 msgstr "投稿者 &#8216;%s&#8217; のアーカイブ"
 
-#: include/custom_functions.php:628
+#: include/custom_functions.php:627
 #, php-format
 msgid "Search Results of word &#8216;%s&#8217;"
 msgstr "&#8216;%s&#8217; の検索結果"
 
-#: include/custom_functions.php:634
-#: include/custom_functions.php:636
+#: include/custom_functions.php:633
+#: include/custom_functions.php:635
 #, php-format
 msgid "Article of %s"
 msgstr "%sの記事"
 
-#: include/custom_functions.php:658
+#: include/custom_functions.php:657
 #, php-format
 msgid "From %1$s on site %2$s"
 msgstr "サイト %2$s の %1$s より"
 
-#: include/custom_functions.php:679
+#: include/custom_functions.php:678
 msgid "No Trackback/Pingback"
 msgstr "トラックバック・ピンバックはありません"
 
-#: include/custom_functions.php:680
+#: include/custom_functions.php:679
 msgid "One Trackback/Pingback"
 msgstr "トラックバック・ピンバック 1 件"
 
-#: include/custom_functions.php:681
+#: include/custom_functions.php:680
 msgid "% TrackBack/Pingback"
 msgstr "トラックバック・ピンバック % 件"
 
-#: include/functions_for_wp20.php:21
+#: include/functions_for_wp_old.php:21
 msgid "<strong>ERROR</strong>: The password field is empty."
 msgstr "<strong>エラー</strong>: パスワードが入力されていません."
 
-#: include/functions_for_wp20.php:29
+#: include/functions_for_wp_old.php:29
 msgid "<strong>ERROR</strong>: Invalid username."
 msgstr "<strong>エラー</strong>: ユーザ名が異なっています."
 
-#: include/functions_for_wp20.php:37
+#: include/functions_for_wp_old.php:37
 msgid "<strong>ERROR</strong>: Incorrect password."
 msgstr "<strong>エラー</strong>: パスワードが異なっています."
@@ -515,5 +560,3 @@
 #~ msgid "XPressME Configuration Page"
 #~ msgstr "XPressMEの設定ページ"
-#~ msgid "XPressME"
-#~ msgstr "XPressME"
-
+
Index: trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php
===================================================================
--- trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php	(revision 363)
+++ trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php	(revision 368)
@@ -34,4 +34,6 @@
 	add_submenu_page(__FILE__, __('Integration Settings', 'xpressme'), __('Integration Settings', 'xpressme'), 8, 'integration_option_page', 'integration_option_page');
 	add_submenu_page(__FILE__, __('Other Settings', 'xpressme'), __('Other Settings', 'xpressme'), 8, 'other_option_page', 'other_option_page');
+	if (function_exists(wp_remote_get))
+		add_submenu_page(__FILE__, __('Upgrade', 'xpressme'), __('Upgrade', 'xpressme'), 8, 'upgrade_page', 'upgrade_page');
 	add_submenu_page(__FILE__, __('to XOOPS Admin', 'xpressme'), __('to XOOPS Admin', 'xpressme'), 8,  'redirect_xoops_admin', 'redirect_xoops_admin');
 }
@@ -261,3 +263,146 @@
 }
 
+function upgrade_page()
+{
+	global $xoops_config,$xpress_config;
+	
+	$xpress_version = $xoops_config->module_version . $xoops_config->module_codename;
+	$check_url = "http://ja1.xpressme.info/version_check/?version=$xpress_version";
+
+	echo	'<div class="wrap">'."\n";
+	echo		'<div id="icon-options-general" class="icon32"><br /></div>'."\n";
+	echo		'<h2>' . __('XPressME Upgrade', 'xpressme') . "</h2><br>\n";
+	
+	if(get_xpress_latest_version()){
+		$latest = get_option('xpressme_latest_version');
+		if ($latest) {
+			$site_url=$latest['url'];
+			$package=$latest['package'];
+			$latest_version=$latest['latest_version'];
+			$check_time=$latest['check_time'];
+		}
+
+
+		if (version_compare($xpress_version, $latest_version, '>')){
+				echo '<h3 class="response">';
+				printf(__('You are using a XPressME Integration Kit development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.', 'xpressme') , $xpress_version , $site_url);
+				echo '</h3>';
+
+		} else if (version_compare($xpress_version, $latest_version, '<')) {
+			echo	'<h3 class="response">'. __('There is a new version of XPressME Integration Kit available for upgrade', 'xpressme') . '</h3>';
+			echo '<p>';
+	//		printf(__('You can upgrade to version %s automatically or download the package and install it manually:'),$latest_version);
+			printf(__('You can upgrade to version %s download the package and install it manually:', 'xpressme'),$latest_version);
+			echo '</p>';
+			echo '<a class="button" href="' . $package . '">';
+			printf(__('Download %s', 'xpressme') , $latest_version);
+			echo '</a>';
+		} else {
+			echo	'<h3 class="response">'. __('You have the latest version of XPressME Integration Kit. You do not need to upgrade', 'xpressme') . '</h3>';
+		}
+	} else {
+		echo '<h3 class="response">';
+		printf(__('There is no response from <a href="%s">version check API</a> now. sorry, please confirm it after.', 'xpressme'),$check_url);
+		echo	"</div>\n";
+	}
+}
+
+function get_xpress_latest_version(){
+	global $wp_version, $wpdb, $wp_local_package;
+	global $xoops_config;
+	
+	$xpress_version = $xoops_config->module_version . $xoops_config->module_codename;
+
+	$check_url = "http://ja.xpressme.info/version_check/?version=$xpress_version";
+	$request_options = array(
+	'timeout' => 3,
+	'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )
+	);
+
+	if (! function_exists(wp_remote_get)) return false;
+	
+	$response = wp_remote_get($check_url, $request_options);
+	if ( is_wp_error( $response ) )
+		return false;
+
+	if ( 200 != $response['response']['code'] )
+		return false;
+
+	$body = trim( $response['body'] );
+	$body = str_replace(array("\r\n", "\r"), "\n", $body);
+	$returns = explode("\n", $body);
+	$response = esc_attr( $returns[0] );
+	if ( isset( $returns[1] ) )
+		$url = esc_url( $returns[1] );
+	if ( isset( $returns[2] ) )
+		$package = esc_url( $returns[2] );
+	if ( isset( $returns[3] ) )
+		$latest_version = esc_attr( $returns[3] );
+
+	$write_options = array (
+		'url' => $url ,
+		'package' => $package ,
+		'latest_version' => $latest_version ,
+		'check_time' => time()
+	);
+	
+	$latest_version = get_option('xpressme_latest_version');
+	if (!$latest_version) {
+		add_option('xpressme_latest_version', $write_options);
+	} else {
+		update_option('xpressme_latest_version', $write_options);
+	}
+	return true;
+}
+
+function xpress_update_check() {
+	if ( defined('WP_INSTALLING') )
+		return;
+	global $pagenow;
+
+	$php_query_string = $_SERVER['QUERY_STRING'];
+
+	if ( 'admin.php' == $pagenow && 'page=upgrade_page' == $php_query_string)
+		return;
+
+	global $wp_version, $wpdb, $wp_local_package;
+	global $xoops_config;
+
+	$php_query_string = $_SERVER['QUERY_STRING'];
+	$xpress_version = $xoops_config->module_version . $xoops_config->module_codename;
+
+	$latest = get_option('xpressme_latest_version');
+	if (!$latest ) {
+		get_xpress_latest_version();
+		$latest = get_option('xpressme_latest_version');
+	}
+
+	if ($latest) {
+		$next_check = $latest['check_time'] + (60*60*24);
+		$now_time = time();
+		if ($next_check < $now_time ){
+			get_xpress_latest_version();
+			$latest = get_option('xpressme_latest_version');
+		}
+	}
+
+	if ($latest) {
+		$url=$latest['url'];
+		$package=$latest['package'];
+		$latest_version=$latest['latest_version'];
+		$check_time=$latest['check_time'];
+		$upgrade_page = $xoops_config->module_url . "/wp-admin/admin.php?page=upgrade_page";
+
+		if (version_compare($xpress_version, $latest_version, '<')) {
+			if ( current_user_can('manage_options') ){
+				$msg = sprintf( __('XPressME Integration Kit Version %1$s is available! <a href="%2$s">Please update now</a>.', 'xpressme'), $latest_version, $upgrade_page );
+			} else {
+				$msg = sprintf( __('XPressME Integration Kit Version %1$s is available! Please notify the site administrator.', 'xpressme'), $latest_version );
+			}
+			echo "<div id='update-nag'>$msg </div>";
+		}
+	}
+}
+
+add_action( 'admin_notices', 'xpress_update_check', 3 );
 ?>
