OSDN Git Service

携帯関係のウィジェット、テンプレートを削除。
authornaoki hirata <naoki@magic3.org>
Sun, 28 Oct 2018 06:37:05 +0000 (15:37 +0900)
committernaoki hirata <naoki@magic3.org>
Sun, 28 Oct 2018 06:37:05 +0000 (15:37 +0900)
238 files changed:
include/container/baseFrameContainer.php
include/container/m_indexFrameContainer.php
include/manager/envManager.php
include/manager/pageManager.php
include/manager/requestManager.php
include/manager/systemManager.php
include/sql/create_base.sql
include/sql/update/2018101201_to_2018110101.sql [new file with mode: 0644]
m/index.php [deleted file]
templates/m/_admin/index.php [deleted file]
templates/m/default/index.php [deleted file]
templates/m/default/template_thumbnail.png [deleted file]
templates/m/smallfont/index.php [deleted file]
templates/m/smallfont/template_thumbnail.png [deleted file]
widgets/admin_main/include/container/admin_mainConfigsysWidgetContainer.php
widgets/admin_main/include/container/admin_mainPagedefWidgetContainer.php
widgets/admin_main/include/container/admin_mainTemplistWidgetContainer.php
widgets/admin_main/include/db/admin_mainDb.php
widgets/admin_main/include/template/configsystem.tmpl.html
widgets/m/adtag/admin/index.php [deleted file]
widgets/m/adtag/include/container/admin_m_adtagWidgetContainer.php [deleted file]
widgets/m/adtag/include/container/m_adtagWidgetContainer.php [deleted file]
widgets/m/adtag/include/template/admin.tmpl.html [deleted file]
widgets/m/adtag/include/template/admin_list.tmpl.html [deleted file]
widgets/m/adtag/include/template/index.tmpl.html [deleted file]
widgets/m/adtag/index.php [deleted file]
widgets/m/bbs_2ch/admin/index.php [deleted file]
widgets/m/bbs_2ch/images/ba.gif [deleted file]
widgets/m/bbs_2ch/images/icon32.png [deleted file]
widgets/m/bbs_2ch/images/icon64.png [deleted file]
widgets/m/bbs_2ch/images/tubo.gif [deleted file]
widgets/m/bbs_2ch/include/container/admin_m_bbs_2chBaseWidgetContainer.php [deleted file]
widgets/m/bbs_2ch/include/container/admin_m_bbs_2chOtherWidgetContainer.php [deleted file]
widgets/m/bbs_2ch/include/container/admin_m_bbs_2chWidgetContainer.php [deleted file]
widgets/m/bbs_2ch/include/container/m_bbs_2chBaseWidgetContainer.php [deleted file]
widgets/m/bbs_2ch/include/container/m_bbs_2chReadWidgetContainer.php [deleted file]
widgets/m/bbs_2ch/include/container/m_bbs_2chSubjectWidgetContainer.php [deleted file]
widgets/m/bbs_2ch/include/container/m_bbs_2chThreadWidgetContainer.php [deleted file]
widgets/m/bbs_2ch/include/container/m_bbs_2chTopWidgetContainer.php [deleted file]
widgets/m/bbs_2ch/include/container/m_bbs_2chWidgetContainer.php [deleted file]
widgets/m/bbs_2ch/include/db/bbs_2chDb.php [deleted file]
widgets/m/bbs_2ch/include/help/index.php [deleted file]
widgets/m/bbs_2ch/include/template/admin_other.tmpl.html [deleted file]
widgets/m/bbs_2ch/include/template/main.tmpl.html [deleted file]
widgets/m/bbs_2ch/include/template/message.tmpl.html [deleted file]
widgets/m/bbs_2ch/include/template/newthread.tmpl.html [deleted file]
widgets/m/bbs_2ch/include/template/subject.tmpl.html [deleted file]
widgets/m/bbs_2ch/include/template/thread.tmpl.html [deleted file]
widgets/m/bbs_2ch/index.php [deleted file]
widgets/m/bbs_2ch_search_box/images/icon32.png [deleted file]
widgets/m/bbs_2ch_search_box/images/icon64.png [deleted file]
widgets/m/bbs_2ch_search_box/include/container/m_bbs_2ch_search_boxWidgetContainer.php [deleted file]
widgets/m/bbs_2ch_search_box/include/template/index.tmpl.html [deleted file]
widgets/m/bbs_2ch_search_box/index.php [deleted file]
widgets/m/blog/admin/index.php [deleted file]
widgets/m/blog/images/icon32.png [deleted file]
widgets/m/blog/images/icon64.png [deleted file]
widgets/m/blog/include/container/admin_m_blogBaseWidgetContainer.php [deleted file]
widgets/m/blog/include/container/admin_m_blogConfigWidgetContainer.php [deleted file]
widgets/m/blog/include/container/admin_m_blogWidgetContainer.php [deleted file]
widgets/m/blog/include/container/m_blogBaseWidgetContainer.php [deleted file]
widgets/m/blog/include/container/m_blogReadWidgetContainer.php [deleted file]
widgets/m/blog/include/container/m_blogWidgetContainer.php [deleted file]
widgets/m/blog/include/db/blogDb.php [deleted file]
widgets/m/blog/include/help/index.php [deleted file]
widgets/m/blog/include/template/admin_config.tmpl.html [deleted file]
widgets/m/blog/include/template/admin_message.tmpl.html [deleted file]
widgets/m/blog/include/template/message.tmpl.html [deleted file]
widgets/m/blog/include/template/thread_read.tmpl.html [deleted file]
widgets/m/blog/index.php [deleted file]
widgets/m/blog_category/admin/index.php [deleted file]
widgets/m/blog_category/images/icon32.png [deleted file]
widgets/m/blog_category/images/icon64.png [deleted file]
widgets/m/blog_category/include/container/m_blog_categoryWidgetContainer.php [deleted file]
widgets/m/blog_category/include/db/blog_categoryDb.php [deleted file]
widgets/m/blog_category/include/template/menu.tmpl.html [deleted file]
widgets/m/blog_category/index.php [deleted file]
widgets/m/blog_list/admin/index.php [deleted file]
widgets/m/blog_list/images/icon32.png [deleted file]
widgets/m/blog_list/images/icon64.png [deleted file]
widgets/m/blog_list/include/container/m_blog_listWidgetContainer.php [deleted file]
widgets/m/blog_list/include/db/blog_listDb.php [deleted file]
widgets/m/blog_list/include/template/main.tmpl.html [deleted file]
widgets/m/blog_list/index.php [deleted file]
widgets/m/blog_search/images/icon32.png [deleted file]
widgets/m/blog_search/images/icon64.png [deleted file]
widgets/m/blog_search/include/container/m_blog_searchWidgetContainer.php [deleted file]
widgets/m/blog_search/include/template/index.tmpl.html [deleted file]
widgets/m/blog_search/index.php [deleted file]
widgets/m/chacha/admin/index.php [deleted file]
widgets/m/chacha/images/default_avatar32.gif [deleted file]
widgets/m/chacha/images/icon32.png [deleted file]
widgets/m/chacha/images/icon64.png [deleted file]
widgets/m/chacha/include/container/admin_m_chachaBaseWidgetContainer.php [deleted file]
widgets/m/chacha/include/container/admin_m_chachaOtherWidgetContainer.php [deleted file]
widgets/m/chacha/include/container/admin_m_chachaWidgetContainer.php [deleted file]
widgets/m/chacha/include/container/m_chachaBaseWidgetContainer.php [deleted file]
widgets/m/chacha/include/container/m_chachaMypageWidgetContainer.php [deleted file]
widgets/m/chacha/include/container/m_chachaProfileWidgetContainer.php [deleted file]
widgets/m/chacha/include/container/m_chachaReadWidgetContainer.php [deleted file]
widgets/m/chacha/include/container/m_chachaThreadWidgetContainer.php [deleted file]
widgets/m/chacha/include/container/m_chachaTopWidgetContainer.php [deleted file]
widgets/m/chacha/include/container/m_chachaWidgetContainer.php [deleted file]
widgets/m/chacha/include/db/chachaDb.php [deleted file]
widgets/m/chacha/include/template/admin_other.tmpl.html [deleted file]
widgets/m/chacha/include/template/message.tmpl.html [deleted file]
widgets/m/chacha/include/template/mypage.tmpl.html [deleted file]
widgets/m/chacha/include/template/profile.tmpl.html [deleted file]
widgets/m/chacha/include/template/thread.tmpl.html [deleted file]
widgets/m/chacha/include/template/thread_read.tmpl.html [deleted file]
widgets/m/chacha/include/template/top.tmpl.html [deleted file]
widgets/m/chacha/index.php [deleted file]
widgets/m/contactus/admin/index.php [deleted file]
widgets/m/contactus/images/icon32.gif [deleted file]
widgets/m/contactus/images/icon64.gif [deleted file]
widgets/m/contactus/include/container/admin_m_contactusWidgetContainer.php [deleted file]
widgets/m/contactus/include/container/m_contactusWidgetContainer.php [deleted file]
widgets/m/contactus/include/db/contactus_mainDb.php [deleted file]
widgets/m/contactus/include/template/admin.tmpl.html [deleted file]
widgets/m/contactus/include/template/index.tmpl.html [deleted file]
widgets/m/contactus/index.php [deleted file]
widgets/m/contactus_custom/admin/index.php [deleted file]
widgets/m/contactus_custom/images/icon32.gif [deleted file]
widgets/m/contactus_custom/images/icon64.gif [deleted file]
widgets/m/contactus_custom/include/container/admin_m_contactus_customWidgetContainer.php [deleted file]
widgets/m/contactus_custom/include/container/m_contactus_customWidgetContainer.php [deleted file]
widgets/m/contactus_custom/include/db/contactus_customDb.php [deleted file]
widgets/m/contactus_custom/include/help/index.php [deleted file]
widgets/m/contactus_custom/include/template/admin.tmpl.html [deleted file]
widgets/m/contactus_custom/include/template/admin_list.tmpl.html [deleted file]
widgets/m/contactus_custom/include/template/index.tmpl.html [deleted file]
widgets/m/contactus_custom/index.php [deleted file]
widgets/m/content/admin/index.php [deleted file]
widgets/m/content/images/icon32.png [deleted file]
widgets/m/content/images/icon64.png [deleted file]
widgets/m/content/include/container/admin_m_contentWidgetContainer.php [deleted file]
widgets/m/content/include/container/m_contentWidgetContainer.php [deleted file]
widgets/m/content/include/db/contentDb.php [deleted file]
widgets/m/content/include/template/admin_main.tmpl.html [deleted file]
widgets/m/content/include/template/admin_main_detail.tmpl.html [deleted file]
widgets/m/content/include/template/main.tmpl.html [deleted file]
widgets/m/content/include/template/search.tmpl.html [deleted file]
widgets/m/content/index.php [deleted file]
widgets/m/content_search_box/images/icon32.png [deleted file]
widgets/m/content_search_box/images/icon64.png [deleted file]
widgets/m/content_search_box/include/container/m_content_search_boxWidgetContainer.php [deleted file]
widgets/m/content_search_box/include/template/index.tmpl.html [deleted file]
widgets/m/content_search_box/index.php [deleted file]
widgets/m/custom_footer/admin/index.php [deleted file]
widgets/m/custom_footer/images/icon32.png [deleted file]
widgets/m/custom_footer/images/icon64.png [deleted file]
widgets/m/custom_footer/include/container/admin_m_custom_footerWidgetContainer.php [deleted file]
widgets/m/custom_footer/include/container/m_custom_footerWidgetContainer.php [deleted file]
widgets/m/custom_footer/include/template/admin.tmpl.html [deleted file]
widgets/m/custom_footer/include/template/index.tmpl.html [deleted file]
widgets/m/custom_footer/index.php [deleted file]
widgets/m/custom_header/admin/index.php [deleted file]
widgets/m/custom_header/images/icon32.gif [deleted file]
widgets/m/custom_header/images/icon64.gif [deleted file]
widgets/m/custom_header/include/container/admin_m_custom_headerWidgetContainer.php [deleted file]
widgets/m/custom_header/include/container/m_custom_headerWidgetContainer.php [deleted file]
widgets/m/custom_header/include/template/admin.tmpl.html [deleted file]
widgets/m/custom_header/include/template/index.tmpl.html [deleted file]
widgets/m/custom_header/index.php [deleted file]
widgets/m/default_login/images/icon32.png [deleted file]
widgets/m/default_login/images/icon64.png [deleted file]
widgets/m/default_login/include/container/m_default_loginWidgetContainer.php [deleted file]
widgets/m/default_login/include/template/index.tmpl.html [deleted file]
widgets/m/default_login/index.php [deleted file]
widgets/m/g_analytics/admin/index.php [deleted file]
widgets/m/g_analytics/ga.php [deleted file]
widgets/m/g_analytics/images/icon32.png [deleted file]
widgets/m/g_analytics/images/icon64.png [deleted file]
widgets/m/g_analytics/include/container/admin_m_g_analyticsWidgetContainer.php [deleted file]
widgets/m/g_analytics/include/container/m_g_analyticsWidgetContainer.php [deleted file]
widgets/m/g_analytics/include/help/index.php [deleted file]
widgets/m/g_analytics/include/template/admin.tmpl.html [deleted file]
widgets/m/g_analytics/include/template/main.tmpl.html [deleted file]
widgets/m/g_analytics/index.php [deleted file]
widgets/m/googlemaps/admin/index.php [deleted file]
widgets/m/googlemaps/images/icon32.gif [deleted file]
widgets/m/googlemaps/images/icon64.gif [deleted file]
widgets/m/googlemaps/include/container/admin_m_googlemapsWidgetContainer.php [deleted file]
widgets/m/googlemaps/include/container/m_googlemapsWidgetContainer.php [deleted file]
widgets/m/googlemaps/include/help/index.php [deleted file]
widgets/m/googlemaps/include/template/admin.tmpl.html [deleted file]
widgets/m/googlemaps/include/template/admin_list.tmpl.html [deleted file]
widgets/m/googlemaps/include/template/index.tmpl.html [deleted file]
widgets/m/googlemaps/index.php [deleted file]
widgets/m/menu/admin/index.php [deleted file]
widgets/m/menu/images/icon32.png [deleted file]
widgets/m/menu/images/icon64.png [deleted file]
widgets/m/menu/include/container/admin_m_menuWidgetContainer.php [deleted file]
widgets/m/menu/include/container/m_menuWidgetContainer.php [deleted file]
widgets/m/menu/include/db/menuDb.php [deleted file]
widgets/m/menu/include/help/index.php [deleted file]
widgets/m/menu/include/template/admin.tmpl.html [deleted file]
widgets/m/menu/include/template/admin_list.tmpl.html [deleted file]
widgets/m/menu/include/template/index.tmpl.html [deleted file]
widgets/m/menu/index.php [deleted file]
widgets/m/pc_content/admin/index.php [deleted file]
widgets/m/pc_content/images/icon32.png [deleted file]
widgets/m/pc_content/images/icon64.png [deleted file]
widgets/m/pc_content/include/container/admin_m_pc_contentWidgetContainer.php [deleted file]
widgets/m/pc_content/include/container/m_pc_contentWidgetContainer.php [deleted file]
widgets/m/pc_content/include/db/pc_contentDb.php [deleted file]
widgets/m/pc_content/include/help/index.php [deleted file]
widgets/m/pc_content/include/template/admin_main.tmpl.html [deleted file]
widgets/m/pc_content/include/template/admin_main_detail.tmpl.html [deleted file]
widgets/m/pc_content/include/template/main.tmpl.html [deleted file]
widgets/m/pc_content/index.php [deleted file]
widgets/m/quizk/admin/index.php [deleted file]
widgets/m/quizk/include/container/admin_m_quizkBaseWidgetContainer.php [deleted file]
widgets/m/quizk/include/container/admin_m_quizkCsvWidgetContainer.php [deleted file]
widgets/m/quizk/include/container/admin_m_quizkOperationWidgetContainer.php [deleted file]
widgets/m/quizk/include/container/admin_m_quizkWidgetContainer.php [deleted file]
widgets/m/quizk/include/container/m_quizkBaseWidgetContainer.php [deleted file]
widgets/m/quizk/include/container/m_quizkCompleteWidgetContainer.php [deleted file]
widgets/m/quizk/include/container/m_quizkProgressWidgetContainer.php [deleted file]
widgets/m/quizk/include/container/m_quizkTopWidgetContainer.php [deleted file]
widgets/m/quizk/include/container/m_quizkWidgetContainer.php [deleted file]
widgets/m/quizk/include/db/quizkDb.php [deleted file]
widgets/m/quizk/include/template/admin_csv.tmpl.html [deleted file]
widgets/m/quizk/include/template/admin_operation.tmpl.html [deleted file]
widgets/m/quizk/include/template/complete.tmpl.html [deleted file]
widgets/m/quizk/include/template/main.tmpl.html [deleted file]
widgets/m/quizk/include/template/message.tmpl.html [deleted file]
widgets/m/quizk/include/template/progress.tmpl.html [deleted file]
widgets/m/quizk/include/template/top.tmpl.html [deleted file]
widgets/m/quizk/index.php [deleted file]
widgets/m/sample/index.php [deleted file]
widgets/m/sample2/include/container/m_sample2WidgetContainer.php [deleted file]
widgets/m/sample2/include/template/index.tmpl.html [deleted file]
widgets/m/sample2/index.php [deleted file]
widgets/m/sample_input/include/container/m_sample_inputWidgetContainer.php [deleted file]
widgets/m/sample_input/include/template/index.tmpl.html [deleted file]
widgets/m/sample_input/index.php [deleted file]
widgets/qrcode/include/container/admin_qrcodeWidgetContainer.php

index 1acba2f..66d4b39 100644 (file)
@@ -26,7 +26,6 @@ class BaseFrameContainer extends Core
        const ERR_MESSAGE_ACCESS_DENY = 'Access denied.';               // ウィジェットアクセスエラーのメッセージ
        const SITE_ACCESS_EXCEPTION_IP = 'site_access_exception_ip';            // アクセス制御、例外とするIP
        const CONFIG_KEY_MSG_TEMPLATE = 'msg_template';                 // メッセージ用テンプレート取得キー
-//     const CF_MOBILE_AUTO_REDIRECT = 'mobile_auto_redirect';         // 携帯の自動遷移
        const TEMPLATE_GENERATOR_THEMLER = 'themler';                   // テンプレート作成アプリケーション(Themler)
                
        /**
@@ -276,14 +275,6 @@ class BaseFrameContainer extends Core
                                return;
                        }
                        // #################### URLの遷移 #######################
-                       //if ($this->gSystem->getSystemConfig(self::CF_MOBILE_AUTO_REDIRECT)){          // 携帯自動遷移を行う場合
-                       if ($this->gSystem->mobileAutoRedirect()){              // 携帯自動遷移を行う場合
-                               // 携帯のときは携帯用URLへ遷移
-                               if ($this->gEnv->isMobile() && !$this->gEnv->getIsMobileSite()){
-                                       $this->gPage->redirect($this->gEnv->getDefaultMobileUrl(true/*携帯用パラメータ付加*/), true/*遷移時のダイアログ表示を抑止*/);
-                                       return;
-                               }
-                       }
                        if ($this->gSystem->smartphoneAutoRedirect()){          // スマートフォン自動遷移を行う場合
                                // スマートフォンのときはスマートフォンURLへ遷移
                                if ($this->gEnv->isSmartphone() && !$this->gEnv->getIsSmartphoneSite()){
@@ -673,26 +664,20 @@ class BaseFrameContainer extends Core
                $this->gEnv->setCurrentTemplateId($curTemplate, $subTemplateId);
 
                // テンプレート情報を取得
-               $convType = 0;          // 変換処理タイプ(0=デフォルト(Joomla!v1.0)、-1=携帯用、1=Joomla!v1.5、2=Joomla!v2.5)
-               if ($this->gEnv->getIsMobileSite()){
-                       $convType = -1;         // 携帯サイト用変換
-               } else {
+//             $convType = 0;          // 変換処理タイプ(0=デフォルト(Joomla!v1.0)、-1=携帯用、1=Joomla!v1.5、2=Joomla!v2.5)
+//             if ($this->gEnv->getIsMobileSite()){
+//                     $convType = -1;         // 携帯サイト用変換
+//             } else {
                        // テンプレートタイプを取得(0=デフォルト(Joomla!v1.0),1=Joomla!v1.5,2=Joomla!v2.5)
                        $convType = $this->gEnv->getCurrentTemplateType();
-               }
+//             }
 
                // バッファリングの準備
                if (method_exists($this, '_prepareBuffer')) $this->_prepareBuffer($request);
        
                // ################### バッファリング開始 ######################
                // ob_end_flush()までの出力をバッファリングする
-               if ($convType == -1){// 携帯用サイトの場合は出力エンコーディングを変更
-                       $mobileEncoding = $this->gEnv->getMobileEncoding();             // 携帯用エンコーディングを取得
-                       mb_http_output($mobileEncoding);
-                       ob_start("mb_output_handler"); // 出力のバッファリング開始
-               } else {
-                       ob_start();
-               }
+               ob_start();
 
                // サブクラスの前処理を実行
                if (method_exists($this, '_preBuffer')) $this->_preBuffer($request);
@@ -1133,17 +1118,6 @@ class BaseFrameContainer extends Core
        
                // 遅延実行ウィジェットの出力を埋め込む。HTMLヘッダ出力する。
                $destContents = $this->gPage->lateLaunchWidget($request, $srcContents);
-
-               // 携帯インターフェイスのときのときは、手動変換後、バイナリコード(絵文字等)を埋め込む
-               if ($convType == -1){                   // 携帯アクセスポイントの場合
-                       // 出力するコードに変換
-                       $destContents = mb_convert_encoding($destContents, $mobileEncoding, M3_ENCODING);
-       
-                       // コンテンツ変換メソッドがある場合は実行
-                       if (method_exists($this, '_convContents')){
-                               $destContents = $this->_convContents($destContents);// 絵文字埋め込み処理等
-                       }
-               }
                
                // ##### CSS生成の場合は、すべてのウィジェット実行後出力を削除する #####
                if ($cmd == M3_REQUEST_CMD_CSS) $destContents = '';             // CSS生成のとき
@@ -1229,8 +1203,6 @@ class BaseFrameContainer extends Core
                                        if ($pageId == $this->gEnv->getDefaultPageId()){                // 通常サイトのとき
                                                $curTemplate = $this->gSystem->defaultTemplateId();
                                                $subTemplateId = $this->gSystem->defaultSubTemplateId();
-                                       } else if ($pageId == $this->gEnv->getDefaultMobilePageId()){           // 携帯サイトのとき
-                                               $curTemplate = $this->gSystem->defaultMobileTemplateId();               // 携帯用デフォルトテンプレート
                                        } else if ($pageId == $this->gEnv->getDefaultSmartphonePageId()){               // スマートフォン用サイトのとき
                                                $curTemplate = $this->gSystem->defaultSmartphoneTemplateId();           // スマートフォン用デフォルトテンプレート
                                        } else if ($pageId == $this->gEnv->getDefaultAdminPageId() ||           // 管理サイトのとき
@@ -1266,9 +1238,7 @@ class BaseFrameContainer extends Core
                                
                                // セッションにないときはデフォルトを取得
                                if (empty($curTemplate)){
-                                       if ($this->gEnv->getIsMobileSite()){// 携帯用サイトの場合
-                                               $curTemplate = $this->gSystem->defaultMobileTemplateId();               // 携帯用デフォルトテンプレート
-                                       } else if ($this->gEnv->getIsSmartphoneSite()){// スマートフォン用サイトの場合
+                                       if ($this->gEnv->getIsSmartphoneSite()){// スマートフォン用サイトの場合
                                                $curTemplate = $this->gSystem->defaultSmartphoneTemplateId();           // スマートフォン用デフォルトテンプレート
                                        } else {
                                                $curTemplate = $this->gSystem->defaultTemplateId();
index 704d154..a284236 100644 (file)
@@ -32,9 +32,6 @@ class m_indexFrameContainer extends BaseFrameContainer
         */
        function _prepareBuffer($request)
        {
-               // 携帯の機種に応じて出力エンコーディングを設定する
-               //$encode = 'SJIS';
-               //$this->gEnv->setMobileEncoding($encode);
        }
        /**
         * ビュー作成の前処理
index c7c1d8b..1d8f967 100644 (file)
@@ -61,7 +61,6 @@ class EnvManager extends Core
        private $canUseDbSession;       // DBセッションが使用できるかどうか
        private $canUseDb;                      // DBが使用可能状態にあるかどうか
        private $canUseCookie;          // クッキーが使用可能かどうか
-       private $mobileUseSession;      // 携帯でセッション管理を使用するかどうか
        private $canChangeLang;         // 言語変更可能かどうか
        private $useSsl;                        // SSL機能を使用するかどうか
        private $useSslAdmin;           // 管理画面にSSL機能を使用するかどうか
@@ -77,7 +76,6 @@ class EnvManager extends Core
        private $isSmartphoneSite;      // スマートフォン用URLへのアクセスかどうか
        private $isSubWidget;           // サブウィジェットの起動かどうか
        private $isServerConnector;     // サーバ接続かどうか
-       private $mobileEncoding;        // 携帯用の入力、出力エンコーディング
        private $workDir;                       // 作業用ディレクトリ
        private $userAgent = array();   // アクセス端末の情報
        private $menuAttr = array();            // メニューの表示属性
@@ -98,8 +96,6 @@ class EnvManager extends Core
        const DEFAULT_CSV_NL_CODE = 'csv_nl_code';              // デフォルトのCSV改行コード
        const DEFAULT_CSV_FILE_SUFFIX = 'csv_file_suffix';              // デフォルトのCSVファイル拡張子
        const MULTI_LANGUAGE = 'multi_language';                // 多言語対応かどうか
-       const MOBILE_ENCODING = 'mobile_encoding';              // 携帯用入出力エンコーディング
-       const MOBILE_CHARSET = 'mobile_charset';                // 携帯用HTML上のエンコーディング表記
        const DEFAULT_THEME_CSS_FILE = 'jquery-ui.custom.css';          // テーマファイル
        const CONFIG_ID_WORK_DIR = 'work_dir';                  // 作業用ディレクトリ
        const DEFAULT_PAGE_ID = 'index';                                        // デフォルトのページID
@@ -111,14 +107,12 @@ class EnvManager extends Core
        const USER_AGENT_TYPE_MOBILE = 'mobile';                        // アクセス端末の種類(携帯)
        const CF_CSV_DOWNLOAD_ENCODING = 'csv_download_encoding';                       // CSVダウンロードエンコーディング
        const CF_CSV_UPLOAD_ENCODING = 'csv_upload_encoding';                   // CSVアップロードエンコーディング
-       const CF_MOBILE_USE_SESSION = 'mobile_use_session';             // 携帯でセッション管理を行うかどうか
        const CF_USE_SSL = 'use_ssl';           // SSL機能を使用するかどうか
        const CF_USE_SSL_ADMIN = 'use_ssl_admin';               // 管理画面にSSL機能を使用するかどうか
        const CF_SSL_URL = 'ssl_root_url';                              // SSL用のルートURL
        const CF_DEFAULT_LANG = 'default_lang';                 // デフォルト言語
        const CF_MULTI_DOMAIN = 'multi_domain';                 // マルチドメイン運用かどうか
        const CF_SITE_SMARTPHONE_URL = 'site_smartphone_url';           // スマートフォン用サイトURL
-       const CF_SITE_MOBILE_URL = 'site_mobile_url';           // 携帯用サイトURL
        const CF_REALTIME_SERVER_PORT = 'realtime_server_port';         // リアルタイムサーバ用ポート番号
        const CF_MULTI_DEVICE_ADMIN = 'multi_device_admin';                     // マルチデバイス最適化管理画面
        const DEFAULT_SITE_NAME = 'サイト名未設定';              // 管理画面用のデフォルトサイト名
@@ -244,9 +238,6 @@ class EnvManager extends Core
                $this->useSsl = $this->gSystem->getSystemConfig(self::CF_USE_SSL);              // SSL機能を使用するかどうか
                $this->useSslAdmin = $this->gSystem->getSystemConfig(self::CF_USE_SSL_ADMIN);           // 管理画面にSSL機能を使用するかどうか
                $this->sslUrl = $this->gSystem->getSystemConfig(self::CF_SSL_URL);                      // SSL用URL
-               $this->mobileEncoding = $this->gSystem->getSystemConfig(self::MOBILE_ENCODING); // 携帯用の入力、出力エンコーディング
-               $this->mobileCharset = $this->gSystem->getSystemConfig(self::MOBILE_CHARSET);           // 携帯用HTML上のエンコーディング表記
-               $this->mobileUseSession = $this->gSystem->getSystemConfig(self::CF_MOBILE_USE_SESSION); // 携帯でセッション管理を使用するかどうか
                $value = $this->gSystem->getSystemConfig(self::CONFIG_ID_WORK_DIR);// 作業用ディレクトリ
                if (!empty($value)) $this->workDir = $value;
        }
@@ -262,8 +253,6 @@ class EnvManager extends Core
                        $url = '';
                        if ($this->isSmartphoneSite){
                                $url = $this->gSystem->getSystemConfig(self::CF_SITE_SMARTPHONE_URL);   // スマートフォン用サイトURL
-                       } else if ($this->isMobileSite){
-                               $url = $this->gSystem->getSystemConfig(self::CF_SITE_MOBILE_URL);               // 携帯用サイトURL
                        }
                        if (!empty($url)) $this->currentDomainRootUrl = $url;
                }
@@ -789,23 +778,8 @@ class EnvManager extends Core
         */
        public function getDefaultMobileUrl($withMobileParam = false, $withFilename = true)
        {
-               static $mobileUrl;
-               
-               if ($this->multiDomain){                        // マルチドメイン運用の場合
-                       if (!isset($mobileUrl)) $mobileUrl = $this->gSystem->getSystemConfig(self::CF_SITE_MOBILE_URL);         // 携帯用サイトURL
-
-                       if (empty($mobileUrl)){
-                               $url = M3_SYSTEM_ROOT_URL . '/' . M3_DIR_NAME_MOBILE;
-                       } else {
-                               $url = $mobileUrl;
-                       }
-               } else {
-                       $url = M3_SYSTEM_ROOT_URL . '/' . M3_DIR_NAME_MOBILE;
-               }
+               $url = M3_SYSTEM_ROOT_URL . '/' . M3_DIR_NAME_MOBILE;
                if ($withFilename) $url .= '/' . M3_FILENAME_INDEX;
-               if ($withMobileParam){          // 携帯用のパラメータを付加するとき
-                       $url = createUrl($url, $this->_getMobileUrlParam());
-               }
                return $url;
        }
        /**
@@ -2433,9 +2407,6 @@ class EnvManager extends Core
         */
        public function createCurrentPageUrlForMobile($addParam = '', $withSessionId = true)
        {
-               // 携帯用パラメータ取得
-               $param = $this->_getMobileUrlParam($withSessionId);
-               
                // ページサブID付加
                $param['sub'] = $this->getCurrentPageSubId();
 
@@ -2557,42 +2528,6 @@ class EnvManager extends Core
                return $this->useSslAdmin;
        }
        /**
-        * 携帯用の入出力エンコーディングを設定
-        *
-        * @param string                エンコーディング
-        */
-       public function setMobileEncoding($value)
-       {
-               $this->mobileEncoding = $value;
-       }
-       /**
-        * 携帯用の入出力エンコーディングを取得
-        *
-        * @return string               エンコーディング
-        */
-       public function getMobileEncoding()
-       {
-               return $this->mobileEncoding;
-       }
-       /**
-        * 携帯用HTML上のエンコーディング表記を設定
-        *
-        * @param string                エンコーディング
-        */
-       public function setMobileCharset($value)
-       {
-               $this->mobileCharset = $value;
-       }
-       /**
-        * 携帯用HTML上のエンコーディング表記を取得
-        *
-        * @return string               エンコーディング
-        */
-       public function getMobileCharset()
-       {
-               return $this->mobileCharset;
-       }
-       /**
         * DBセッションが使用できるかどうか
         */
        public function canUseDbSession()
@@ -3005,31 +2940,6 @@ class EnvManager extends Core
                return $isSmartphone;
        }
        /**
-        * 携帯用のURLパラメータを取得
-        *
-        * @param bool   $withSessionId セッションIDを付加するかどうか
-        * @return array                                URLパラメータ
-        */
-       function _getMobileUrlParam($withSessionId = true)
-       {
-               global $gInstanceManager;
-               
-               $param = array();
-               $agent = $gInstanceManager->getMobileAgent();
-               if (method_exists($agent, 'isNonMobile')){
-                       if (!$agent->isNonMobile()){                    // 携帯端末でのアクセスの場合
-                               // ログインしている場合はセッションIDを付加(セッション管理機能が使用可能なときのみ)
-                               //if (!empty($this->mobileUseSession) && $this->isCurrentUserLogined()) $param[session_name()] = session_id();
-                               // ログイン状況に関わらずセッションIDを付加(セッション管理機能が使用可能なときのみ)
-                               if ($withSessionId && !empty($this->mobileUseSession)) $param[session_name()] = session_id();
-                                       
-                               // ドコモ端末の場合はiモードIDを送信させる
-                               if ($agent->isDoCoMo()) $param['guid'] = 'ON';
-                       }
-               }
-               return $param;
-       }
-       /**
         * 管理画面の小画面デバイス最適化を行うかどうか
         *
         * @return bool         true=最適化を行う、false=最適化を行わない
index 34e304e..badfd99 100644 (file)
@@ -2490,8 +2490,6 @@ class PageManager extends Core
                                                                        if (empty($curTemplate)){
                                                                                if ($pageId == $this->gEnv->getDefaultPageId()){                // 通常サイトのとき
                                                                                        $curTemplate = $this->gSystem->defaultTemplateId();
-                                                                               } else if ($pageId == $this->gEnv->getDefaultMobilePageId()){           // 携帯サイトのとき
-                                                                                       $curTemplate = $this->gSystem->defaultMobileTemplateId();               // 携帯用デフォルトテンプレート
                                                                                } else if ($pageId == $this->gEnv->getDefaultSmartphonePageId()){               // スマートフォン用サイトのとき
                                                                                        $curTemplate = $this->gSystem->defaultSmartphoneTemplateId();           // スマートフォン用デフォルトテンプレート
                                                                                }
@@ -3451,11 +3449,7 @@ class PageManager extends Core
                                $docTypeStr = '<!DOCTYPE html PUBLIC "-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN" "xhtml-basic10-plus.dtd">';
                        }
                }
-               if ($gEnvManager->getIsMobileSite()){           // 携帯用サイトへのアクセスの場合
-                       echo '<?xml version="1.0" encoding="' . $gEnvManager->getMobileCharset() . '" ?>' . M3_NL;
-               } else {
-                       echo '<?xml version="1.0" encoding="' . M3_HTML_CHARSET . '" ?>' . M3_NL;
-               }
+               echo '<?xml version="1.0" encoding="' . M3_HTML_CHARSET . '" ?>' . M3_NL;
                if (empty($docTypeStr)) $docTypeStr = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
                echo $docTypeStr . M3_NL;
        }
@@ -3502,49 +3496,36 @@ class PageManager extends Core
                // 実行コマンドを取得
                $cmd = $gRequestManager->trimValueOf(M3_REQUEST_PARAM_OPERATION_COMMAND);
                
-               if ($gEnvManager->getIsMobileSite()){           // 携帯サイトの場合
-                       // キャラクターセット
-                       $headStr .= '<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=' . $gEnvManager->getMobileCharset() . '" />' . M3_NL;
-
-                       // キャッシュを保存させない
-                       $headStr .= '<meta http-equiv="Pragma" content="no-cache" />' . M3_NL;
-                       $headStr .= '<meta http-equiv="Cache-Control" content="no-cache" />' . M3_NL;
-                       $headStr .= '<meta http-equiv="Expires" content="-1" />' . M3_NL;
+               if ($gEnvManager->getIsSmartphoneSite()){               // スマートフォン用サイトのときはHTML5で設定
+                       $this->isHtml5 = true;
+               } else {
+                       $tempVer = $gEnvManager->getCurrentTemplateType();              // テンプレートタイプを取得(0=デフォルト(Joomla!v1.0),1=Joomla!v1.5,2=Joomla!v2.5)
+                       if (intval($tempVer) >= 2) $this->isHtml5 = true;
+               }
                
-                       // サイト構築エンジン
-                       $headStr .= '<meta name="generator" content="' . M3_SYSTEM_NAME . ' ver.' . M3_SYSTEM_VERSION . ' - ' . M3_SYSTEM_DESCRIPTION . '" />' . M3_NL;
-               } else {                // PC用サイト、管理用サイト、スマートフォン用サイトのとき
-                       if ($gEnvManager->getIsSmartphoneSite()){               // スマートフォン用サイトのときはHTML5で設定
-                               $this->isHtml5 = true;
-                       } else {
-                               $tempVer = $gEnvManager->getCurrentTemplateType();              // テンプレートタイプを取得(0=デフォルト(Joomla!v1.0),1=Joomla!v1.5,2=Joomla!v2.5)
-                               if (intval($tempVer) >= 2) $this->isHtml5 = true;
-                       }
-                       
-                       // キャラクターセット
-                       if ($this->isHtml5){
-                               $headStr .= '<meta charset="' . M3_HTML_CHARSET . '">' . M3_NL;
+               // キャラクターセット
+               if ($this->isHtml5){
+                       $headStr .= '<meta charset="' . M3_HTML_CHARSET . '">' . M3_NL;
+               } else {
+                       $headStr .= '<meta http-equiv="content-script-type" content="text/javascript" />' . M3_NL;
+                       $headStr .= '<meta http-equiv="content-style-type" content="text/css" />' . M3_NL;
+                       $headStr .= '<meta http-equiv="content-type" content="application/xhtml+xml; charset=' . M3_HTML_CHARSET .'" />' . M3_NL;
+               }
+               if ($gEnvManager->isAdminDirAccess()){          // 管理画面へのアクセスのとき
+                       // Bootstrapで必要なMETAタグを追加
+                       $headStr .= '<meta name="viewport" content="width=device-width, initial-scale=1">' . M3_NL;
+               }
+               
+               // 基準ディレクトリの指定
+               if ($cmd == M3_REQUEST_CMD_SHOW_POSITION ||                             // 表示位置を表示するとき
+                       $cmd == M3_REQUEST_CMD_SHOW_POSITION_WITH_WIDGET){      // 表示位置を表示するとき(ウィジェット付き)
+               
+                       if ($gEnvManager->getUseSslAdmin()){
+                               $rootUrl = $gEnvManager->getSslRootUrl();
                        } else {
-                               $headStr .= '<meta http-equiv="content-script-type" content="text/javascript" />' . M3_NL;
-                               $headStr .= '<meta http-equiv="content-style-type" content="text/css" />' . M3_NL;
-                               $headStr .= '<meta http-equiv="content-type" content="application/xhtml+xml; charset=' . M3_HTML_CHARSET .'" />' . M3_NL;
-                       }
-                       if ($gEnvManager->isAdminDirAccess()){          // 管理画面へのアクセスのとき
-                               // Bootstrapで必要なMETAタグを追加
-                               $headStr .= '<meta name="viewport" content="width=device-width, initial-scale=1">' . M3_NL;
-                       }
-                       
-                       // 基準ディレクトリの指定
-                       if ($cmd == M3_REQUEST_CMD_SHOW_POSITION ||                             // 表示位置を表示するとき
-                               $cmd == M3_REQUEST_CMD_SHOW_POSITION_WITH_WIDGET){      // 表示位置を表示するとき(ウィジェット付き)
-                       
-                               if ($gEnvManager->getUseSslAdmin()){
-                                       $rootUrl = $gEnvManager->getSslRootUrl();
-                               } else {
-                                       $rootUrl = $gEnvManager->getRootUrl();
-                               }
-                               $headStr .= '<base href="' . $rootUrl . '/" />' . M3_NL;
+                               $rootUrl = $gEnvManager->getRootUrl();
                        }
+                       $headStr .= '<base href="' . $rootUrl . '/" />' . M3_NL;
                }
                return $headStr;
        }
@@ -5621,8 +5602,6 @@ class PageManager extends Core
                        if (empty($curTemplate)){
                                if ($pageId == $this->gEnv->getDefaultPageId()){                // 通常サイトのとき
                                        $curTemplate = $this->gSystem->defaultTemplateId();
-                               } else if ($pageId == $this->gEnv->getDefaultMobilePageId()){           // 携帯サイトのとき
-                                       $curTemplate = $this->gSystem->defaultMobileTemplateId();               // 携帯用デフォルトテンプレート
                                } else if ($pageId == $this->gEnv->getDefaultSmartphonePageId()){               // スマートフォン用サイトのとき
                                        $curTemplate = $this->gSystem->defaultSmartphoneTemplateId();           // スマートフォン用デフォルトテンプレート
                                }
@@ -7554,8 +7533,6 @@ class PageManager extends Core
                $templateId = '';
                if ($pageId == $this->gEnv->getDefaultPageId()){                // 通常サイトのとき
                        $templateId = $this->gSystem->defaultTemplateId();
-               } else if ($pageId == $this->gEnv->getDefaultMobilePageId()){           // 携帯サイトのとき
-                       $templateId = $this->gSystem->defaultMobileTemplateId();                // 携帯用デフォルトテンプレート
                } else if ($pageId == $this->gEnv->getDefaultSmartphonePageId()){               // スマートフォン用サイトのとき
                        $templateId = $this->gSystem->defaultSmartphoneTemplateId();            // スマートフォン用デフォルトテンプレート
                }
index e8cf762..549ec89 100644 (file)
@@ -284,52 +284,6 @@ class RequestManager extends Core
                return preg_replace($search, $replace, $src);
        }
        /**
-        * (携帯用)POST,GETから値を取得(トリミング(前後の空白削除)あり)
-        *
-        * POSTまたはGETから値を取得し、トリミング(前後の空白削除)する
-        * デフォルトでHTMLタグを取り除く
-        * 携帯用の文字コード変換を行う
-        *
-        * @param string $name          キー値
-        * @param string $default       値が存在しないときのデフォルト値
-        * @return string                       取得値
-        */
-       public function mobileTrimValueOf($name, $default = '')
-       {
-               // 携帯用エンコーディングを取得
-               $mobileEncoding = $this->gEnv->getMobileEncoding();
-               
-               // 入力データの文字コードをシステム内部コードに変換する
-               $srcValue = $this->trimValueOf($name, $default);
-               if (is_array($srcValue)){               // 配列の場合
-                       $destValue = array();
-                       if (function_exists('mb_convert_encoding')){
-                               foreach (array_keys($srcValue) as $key){
-                                       $destValue[] = mb_convert_encoding($srcValue[$key], M3_ENCODING, $mobileEncoding);
-                               }
-                       }
-               } else {
-                       $destValue = '';
-                       if (function_exists('mb_convert_encoding')) $destValue = mb_convert_encoding($srcValue, M3_ENCODING, $mobileEncoding);
-               }
-               return $destValue;
-       }
-       /**
-        * 携帯用のテキストに変換
-        *
-        * @param string $srcStr        変換するデータ
-        * @return string                       変換後データ
-        */
-       function convMobileText($srcStr)
-       {
-               // 携帯用エンコーディングを取得
-               $mobileEncoding = $this->gEnv->getMobileEncoding();
-               
-               $destStr = '';
-               if (function_exists('mb_convert_encoding')) $destStr = mb_convert_encoding($srcStr, $mobileEncoding, M3_ENCODING);
-               return $destStr;
-       }
-       /**
         * 取得メソッドがGETかどうか
         *
         * @return bool                 true=GETメソッド、false=GET以外
index 8999b5f..f0fdad8 100644 (file)
@@ -24,7 +24,6 @@ class SystemManager extends Core
        private $defaultAdminTemplateId;                                // 管理画面用テンプレートID
        private $defaultTemplateId;                                             // PC用テンプレートID
        private $defaultSubTemplateId;                                          // PC用サブテンプレートID
-       private $defaultMobileTemplateId;                               // 携帯用テンプレートID
        private $defaultSmartphoneTemplateId;                           // スマートフォン用テンプレートID
        private $adminDefaultTheme;                     // 管理画面用jQueryUIテーマ
        private $permitInitSystem;                                              // システム初期化可能かどうか
@@ -32,7 +31,6 @@ class SystemManager extends Core
        private $sitePcInPublic;                        // PC用サイトの公開状況
        private $siteMobileInPublic;            // 携帯用サイトの公開状況
        private $siteSmartphoneInPublic;        // スマートフォン用サイトの公開状況
-       private $mobileAutoRedirect;            // 携帯の自動遷移
        private $smartphoneAutoRedirect;        // スマートフォンの自動遷移
        private $usePageCache;          // 表示キャッシュ機能を使用するかどうか
        private $pageCacheLifetime;     // 画面キャッシュの更新時間(分)
@@ -58,13 +56,11 @@ class SystemManager extends Core
        const CF_PAGE_CACHE_LIFETIME = 'page_cache_lifetime';           // 画面キャッシュの更新時間(分)
        const CF_DEFAULT_TEMPLATE                       = 'default_template';                   // システム定義値取得用キー(PC用デフォルトテンプレート)
        const CF_DEFAULT_SUB_TEMPLATE           = 'default_sub_template';                       // システム定義値取得用キー(PC用デフォルトサブテンプレート)
-       const CF_DEFAULT_TEMPLATE_MOBILE        = 'mobile_default_template';    // システム定義値取得用キー(携帯用デフォルトテンプレート)
        const CF_DEFAULT_TEMPLATE_SMARTPHONE    = 'smartphone_default_template';        // システム定義値取得用キー(スマートフォン用デフォルトテンプレート)
        const CF_ADMIN_DEFAULT_THEME = 'admin_default_theme';           // 管理画面用jQueryUIテーマ
        const CF_DEFAULT_THEME = 'default_theme';               // フロント画面用jQueryUIテーマ
        const CF_ACCEPT_LANGUAGE        = 'accept_language';    // アクセス可能言語
        const CF_ADMIN_DEFAULT_TEMPLATE = 'admin_default_template';             // 管理用デフォルトテンプレート
-       const CF_MOBILE_AUTO_REDIRECT = 'mobile_auto_redirect';         // 携帯の自動遷移
        const CF_SMARTPHONE_AUTO_REDIRECT = 'smartphone_auto_redirect';         // スマートフォンの自動遷移
        const CF_HIERARCHICAL_PAGE = 'hierarchical_page';               // 階層化ページを使用するかどうか
        const DEFAULT_PAGE_CACHE_LIFETIME = 1440;               // デフォルトの画面キャッシュの更新時間(分)。1日ごと。
@@ -89,7 +85,6 @@ class SystemManager extends Core
                $this->defaultAdminTemplateId = '';                             // 管理画面用テンプレートID
                $this->defaultTemplateId = '';                                          // PC用テンプレートID
                $this->defaultSubTemplateId = '';                                               // PC用サブテンプレートID
-               $this->defaultMobileTemplateId = '';                            // 携帯用テンプレートID
                $this->defaultSmartphoneTemplateId = '';                        // スマートフォン用テンプレートID
                $this->adminDefaultTheme = '';                  // 管理画面用jQueryUIテーマ
                $this->permitInitSystem         = false;                        // システム初期化可能かどうか
@@ -97,7 +92,6 @@ class SystemManager extends Core
                $this->sitePcInPublic = '1';                    // PC用サイトの公開状況
                $this->siteMobileInPublic = '1';                // 携帯用サイトの公開状況
                $this->siteSmartphoneInPublic = '1';    // スマートフォン用サイトの公開状況
-               $this->mobileAutoRedirect = '0';                // 携帯の自動遷移
                $this->smartphoneAutoRedirect = '0';    // スマートフォンの自動遷移
                $this->usePageCache = '0';              // 表示キャッシュ機能を使用するかどうか
                $this->pageCacheLifetime = self::DEFAULT_PAGE_CACHE_LIFETIME;   // 画面キャッシュの更新時間(分)
@@ -173,7 +167,6 @@ class SystemManager extends Core
                        $this->defaultAdminTemplateId   = $this->getSystemConfig(self::CF_ADMIN_DEFAULT_TEMPLATE);                              // 管理画面用テンプレートID
                        $this->defaultTemplateId                = $this->getSystemConfig(self::CF_DEFAULT_TEMPLATE);    // PC用テンプレートID
                        $this->defaultSubTemplateId             = $this->getSystemConfig(self::CF_DEFAULT_SUB_TEMPLATE);                                                // PC用サブテンプレートID
-                       $this->defaultMobileTemplateId  = $this->getSystemConfig(self::CF_DEFAULT_TEMPLATE_MOBILE);// 携帯用テンプレートID
                        $this->defaultSmartphoneTemplateId = $this->getSystemConfig(self::CF_DEFAULT_TEMPLATE_SMARTPHONE);              // スマートフォン用テンプレートID
                        $this->adminDefaultTheme = $this->getSystemConfig(self::CF_ADMIN_DEFAULT_THEME);                        // 管理画面用jQueryUIテーマ
                        if ($this->getSystemConfig(self::CF_PERMIT_INIT_SYSTEM) == '1'){// システム初期化可能かどうか
@@ -194,8 +187,6 @@ class SystemManager extends Core
                        if ($this->siteMobileInPublic == '') $this->siteMobileInPublic = '1';           // デフォルトは公開
                        $this->siteSmartphoneInPublic   = $this->getSystemConfig(self::CF_SITE_SMARTPHONE_IN_PUBLIC);   // スマートフォン用サイトの公開状況
                        if ($this->siteSmartphoneInPublic == '') $this->siteSmartphoneInPublic = '1';           // デフォルトは公開
-                       $this->mobileAutoRedirect       = $this->getSystemConfig(self::CF_MOBILE_AUTO_REDIRECT);        // 携帯の自動遷移
-                       if ($this->mobileAutoRedirect == '') $this->mobileAutoRedirect = '0';
                        $this->smartphoneAutoRedirect   = $this->getSystemConfig(self::CF_SMARTPHONE_AUTO_REDIRECT);    // スマートフォンの自動遷移
                        if ($this->smartphoneAutoRedirect == '') $this->smartphoneAutoRedirect = '0';
                        $this->usePageCache     = $this->getSystemConfig(self::CF_USE_PAGE_CACHE);      // 表示キャッシュ機能を使用するかどうか
@@ -357,19 +348,6 @@ class SystemManager extends Core
                return $this->defaultSubTemplateId;
        }
        /**
-        * 携帯用デフォルトのテンプレートIDを取得
-        *
-        * @param bool $reload  再取得するかどうか
-        * @return string       デフォルトのテンプレートID
-        */
-       function defaultMobileTemplateId($reload = false)
-       {
-               if ($reload){
-                       $this->defaultMobileTemplateId          = $this->db->getSystemConfig(self::CF_DEFAULT_TEMPLATE_MOBILE);
-               }
-               return $this->defaultMobileTemplateId;
-       }
-       /**
         * スマートフォン用デフォルトのテンプレートIDを取得
         *
         * @param bool $reload  再取得するかどうか
@@ -400,20 +378,6 @@ class SystemManager extends Core
                return $ret;
        }
        /**
-        * 携帯用デフォルトテンプレートの変更
-        *
-        * @param string  $templateId   デフォルトテンプレートID
-        * @return                                              true=成功、false=失敗
-        */
-       function changeDefaultMobileTemplate($templateId)
-       {
-               $ret = $this->db->updateSystemConfig(self::CF_DEFAULT_TEMPLATE_MOBILE, $templateId);
-               
-               // データ再取得
-               $this->defaultMobileTemplateId(true);
-               return $ret;
-       }
-       /**
         * スマートフォン用デフォルトテンプレートの変更
         *
         * @param string  $templateId   デフォルトテンプレートID
@@ -619,20 +583,6 @@ class SystemManager extends Core
                return $this->siteSmartphoneInPublic;                   // スマートフォン用サイトの公開状況
        }
        /**
-        * 携帯の自動遷移を行うかどうか
-        *
-        * @param bool $reload  再取得するかどうか
-        * @return bool                 true=公開、false=非公開
-        */
-       public function mobileAutoRedirect($reload = false)
-       {
-               if ($reload){
-                       $this->mobileAutoRedirect       = $this->db->getSystemConfig(self::CF_MOBILE_AUTO_REDIRECT);    // 携帯の自動遷移
-                       if ($this->mobileAutoRedirect == '') $this->mobileAutoRedirect = '0';
-               }
-               return $this->mobileAutoRedirect;
-       }
-       /**
         * スマートフォンの自動遷移を行うかどうか
         *
         * @param bool $reload  再取得するかどうか
index 3392c14..b951fca 100644 (file)
@@ -641,7 +641,7 @@ CREATE TABLE _widgets (
     wd_add_scripts_a     TEXT                                         NOT NULL,      -- (管理機能用)追加スクリプトファイル(相対パス表記、「,」区切りで複数指定可)\r
     wd_add_css_a         TEXT                                         NOT NULL,      -- (管理機能用)追加CSSファイル(相対パス表記、「,」区切りで複数指定可)\r
     wd_admin             BOOLEAN        DEFAULT false                 NOT NULL,      -- 管理用ウィジェットかどうか\r
-    wd_mobile            BOOLEAN        DEFAULT false                 NOT NULL,      -- 携帯対応かどうか\r
+    wd_mobile            BOOLEAN        DEFAULT false                 NOT NULL,      -- 携帯対応かどうか(廃止予定)\r
     wd_show_name         BOOLEAN        DEFAULT false                 NOT NULL,      -- ウィジェット名称を表示するかどうか(wd_hide_titleと統合?)\r
        wd_hide_title        BOOLEAN        DEFAULT false                 NOT NULL,      -- 実稼働時に強制的にタイトルを非表示にするかどうか(廃止予定?)\r
     wd_enable_content    BOOLEAN        DEFAULT false                 NOT NULL,      -- コンテンツ組み込み可能かどうか\r
diff --git a/include/sql/update/2018101201_to_2018110101.sql b/include/sql/update/2018101201_to_2018110101.sql
new file mode 100644 (file)
index 0000000..a8b1a8c
--- /dev/null
@@ -0,0 +1,43 @@
+-- *
+-- * バージョンアップ用スクリプト
+-- *
+-- * PHP versions 5
+-- *
+-- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
+-- *
+-- * @package    Magic3 Framework
+-- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
+-- * @copyright  Copyright 2006-2018 Magic3 Project.
+-- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
+-- * @version    SVN: $Id$
+-- * @link       http://www.magic3.org
+-- *
+-- --------------------------------------------------------------------------------------------------
+-- Magic3 v3.0バージョンアップ用スクリプト最終版
+-- --------------------------------------------------------------------------------------------------
+
+-- *** システムベーステーブル ***
+-- システム設定マスター
+DELETE FROM _system_config WHERE sc_id = 'site_mobile_in_public'; -- 携帯用サイト公開
+
+DELETE FROM _system_config WHERE sc_id = 'site_mobile_url'; -- 携帯用サイトURL
+DELETE FROM _system_config WHERE sc_id = 'mobile_auto_redirect'; -- 携帯アクセスの自動遷移
+DELETE FROM _system_config WHERE sc_id = 'mobile_use_session'; -- 携帯セッション管理
+DELETE FROM _system_config WHERE sc_id = 'mobile_encoding'; -- 携帯用出力変換エンコード
+DELETE FROM _system_config WHERE sc_id = 'mobile_charset'; -- 携帯HTML上でのエンコーディング表記
+DELETE FROM _system_config WHERE sc_id = 'mobile_default_template'; -- 携帯画面用デフォルトテンプレート
+DELETE FROM _system_config WHERE sc_id = 'mobile_default_menu_id'; -- WordPressテンプレートで使用(現在未使用)
+
+-- ウィジェット情報
+DELETE FROM _widgets WHERE wd_mobile = true;
+
+-- ページIDマスター
+DELETE FROM _page_id WHERE pg_id = 'm_index' AND pg_type = 0;
+
+-- ページ情報マスター
+DELETE FROM _page_info WHERE pn_id = 'm_index';
+
+-- テンプレート情報
+DELETE FROM _templates WHERE tm_mobile = true;
+
+-- *** システム標準テーブル ***
diff --git a/m/index.php b/m/index.php
deleted file mode 100644 (file)
index bb2df1d..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-/**
- * 携帯用アクセスポイントindex.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2008 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 277 2008-02-05 07:05:21Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once(dirname(dirname(__FILE__)) . '/include/global.php');
-
-// プログラム実行
-$gLaunchManager->goMobile(__FILE__);
-?>
diff --git a/templates/m/_admin/index.php b/templates/m/_admin/index.php
deleted file mode 100644 (file)
index 280c403..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php\r
-// 直接アクセスの防止\r
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');\r
-?>\r
-<?php m3MobileDocType(); ?>\r
-<html>\r
-<head>\r
-<?php mosShowHead(); ?>\r
-</head>\r
-<body bgcolor="#ffffff">\r
-<div><?php mosLoadModules('top'); ?></div>\r
-<div><?php mosLoadModules('center'); ?></div>\r
-<div><?php mosMainBody(); ?></div>\r
-<div><?php mosLoadModules('footer'); ?></div>\r
-</body>\r
-</html>\r
diff --git a/templates/m/default/index.php b/templates/m/default/index.php
deleted file mode 100644 (file)
index 280c403..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php\r
-// 直接アクセスの防止\r
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');\r
-?>\r
-<?php m3MobileDocType(); ?>\r
-<html>\r
-<head>\r
-<?php mosShowHead(); ?>\r
-</head>\r
-<body bgcolor="#ffffff">\r
-<div><?php mosLoadModules('top'); ?></div>\r
-<div><?php mosLoadModules('center'); ?></div>\r
-<div><?php mosMainBody(); ?></div>\r
-<div><?php mosLoadModules('footer'); ?></div>\r
-</body>\r
-</html>\r
diff --git a/templates/m/default/template_thumbnail.png b/templates/m/default/template_thumbnail.png
deleted file mode 100644 (file)
index ec9804c..0000000
Binary files a/templates/m/default/template_thumbnail.png and /dev/null differ
diff --git a/templates/m/smallfont/index.php b/templates/m/smallfont/index.php
deleted file mode 100644 (file)
index 59616d4..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php\r
-// 直接アクセスの防止\r
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');\r
-?>\r
-<?php m3MobileDocType(); ?>\r
-<html>\r
-<head>\r
-<?php mosShowHead(); ?>\r
-</head>\r
-<body style="background-color:#ffffff;">\r
-<div style="font-size:xx-small;">\r
-<div><?php mosLoadModules('top'); ?></div>\r
-<div><?php mosLoadModules('center'); ?></div>\r
-<div><?php mosMainBody(); ?></div>\r
-<div><?php mosLoadModules('footer'); ?></div>\r
-</div>\r
-</body>\r
-</html>\r
diff --git a/templates/m/smallfont/template_thumbnail.png b/templates/m/smallfont/template_thumbnail.png
deleted file mode 100644 (file)
index ec9804c..0000000
Binary files a/templates/m/smallfont/template_thumbnail.png and /dev/null differ
index 836dc75..fad30de 100644 (file)
@@ -37,16 +37,13 @@ class admin_mainConfigsysWidgetContainer extends admin_mainConfigsystemBaseWidge
        const CF_SITE_PC_IN_PUBLIC = 'site_pc_in_public';                               // PC用サイトの公開状況
        const CF_SITE_MOBILE_IN_PUBLIC = 'site_mobile_in_public';               // 携帯用サイトの公開状況
        const CF_SITE_SMARTPHONE_IN_PUBLIC = 'site_smartphone_in_public';               // スマートフォン用サイトの公開状況
-       const CF_MOBILE_AUTO_REDIRECT = 'mobile_auto_redirect';                                 // 携帯の自動遷移
        const CF_SMARTPHONE_AUTO_REDIRECT = 'smartphone_auto_redirect';                 // スマートフォンの自動遷移
        const CF_SITE_SMARTPHONE_URL = 'site_smartphone_url';           // スマートフォン用サイトURL
-       const CF_SITE_MOBILE_URL = 'site_mobile_url';           // 携帯用サイトURL
        const CF_SITE_OPERATION_MODE = 'site_operation_mode';                   // サイト運用モード
        const CF_ACCESS_IN_INTRANET = 'access_in_intranet';             // イントラネット運用
        const CF_MULTI_DOMAIN = 'multi_domain';         // マルチドメイン運用
        const CF_USE_LANDING_PAGE = 'use_landing_page';         // ランディングページ機能を使用するかどうか
        const CF_SITE_ACCESS_EXCEPTION_IP = 'site_access_exception_ip';         // アクセス制御、例外とするIP
-       const CF_MOBILE_USE_SESSION = 'mobile_use_session';             // 携帯でセッション管理を行うかどうか
        const CF_USE_PAGE_CACHE = 'use_page_cache';             // 画面キャッシュ機能を使用するかどうか
        const CF_USE_TEMPLATE_ID_IN_SESSION = 'use_template_id_in_session';                     // セッションにテンプレートIDを保存
        const CF_SSL_URL = 'ssl_root_url';                              // SSL用のルートURL
@@ -128,14 +125,11 @@ class admin_mainConfigsysWidgetContainer extends admin_mainConfigsystemBaseWidge
                $sslUrl = $request->trimValueOf('item_ssl_url');                        // SSL用のURL
                $connectServerUrl = $request->trimValueOf('item_connect_server_url');                   // ポータル接続先URL
                $siteSmartphoneUrl = $request->trimValueOf('item_site_smartphone_url');         // スマートフォン用サイトURL
-               $siteMobileUrl = $request->trimValueOf('item_site_mobile_url');         // 携帯用サイトURL
                $usePageCache = ($request->trimValueOf('item_use_page_cache') == 'on') ? 1 : 0;         // 表示キャッシュ機能を使用するかどうか
                $canChangeTemplate = ($request->trimValueOf('item_can_change_template') == 'on') ? 1 : 0;               // ユーザによるテンプレート変更を許可するかどうか
                $canDetailConfig = ($request->trimValueOf('item_can_detail_config') == 'on') ? 1 : 0;           // 詳細システム設定が可能かどうか
                $multiDeviceAdmin = ($request->trimValueOf('item_multi_device_admin') == 'on') ? 1 : 0;// マルチデバイス最適化管理画面
-               $mobileAutoRedirect = ($request->trimValueOf('item_mobile_auto_redirect') == 'on') ? 1 : 0;             // 携帯の自動遷移
                $smartphoneAutoRedirect = ($request->trimValueOf('item_smartphone_auto_redirect') == 'on') ? 1 : 0;             // スマートフォンの自動遷移
-               $mobileUseSession = ($request->trimValueOf('item_mobile_use_session') == 'on') ? 1 : 0;         // 携帯でセッション管理するかどうか
                $sitePcInPublic = ($request->trimValueOf('item_site_pc_in_public') == 'on') ? 1 : 0;                    // PC用サイトの公開状況
                $siteMobileInPublic = ($request->trimValueOf('item_site_mobile_in_public') == 'on') ? 1 : 0;    // 携帯用サイトの公開状況
                $siteSmartphoneInPublic = ($request->trimValueOf('item_site_smartphone_in_public') == 'on') ? 1 : 0;    // スマートフォン用サイトの公開状況
@@ -144,7 +138,6 @@ class admin_mainConfigsysWidgetContainer extends admin_mainConfigsystemBaseWidge
                $useLandingPage         = $request->trimCheckedValueOf('item_use_landing_page');        // ランディングページ機能を使用するかどうか
                $isActiveSitePc = ($request->trimValueOf('item_is_active_site_pc') == 'on') ? 1 : 0;    // PC用サイト有効
                $isActiveSiteSmartphone = ($request->trimValueOf('item_is_active_site_smartphone') == 'on') ? 1 : 0;    // スマートフォン用サイト有効
-               $isActiveSiteMobile = ($request->trimValueOf('item_is_active_site_mobile') == 'on') ? 1 : 0;    // 携帯用サイト有効
                $configWindowOpenByTab = ($request->trimValueOf('item_config_window_open_by_tab') == 'on') ? 1 : 0;                     // ウィジェット設定画面をタブで開くかどうか
                $multiLanguage = ($request->trimValueOf('item_multi_language') == 'on') ? 1 : 0;                        // 多言語対応
                $lang = $request->trimValueOf('item_lang');
@@ -181,15 +174,9 @@ class admin_mainConfigsysWidgetContainer extends admin_mainConfigsystemBaseWidge
                                if (!$this->db->updateSystemConfig(self::CF_MULTI_DEVICE_ADMIN, $multiDeviceAdmin)) $isErr = true;// マルチデバイス最適化管理画面
                        }
                        if (!$isErr){
-                               if (!$this->db->updateSystemConfig(self::CF_MOBILE_AUTO_REDIRECT, $mobileAutoRedirect)) $isErr = true;
-                       }
-                       if (!$isErr){
                                if (!$this->db->updateSystemConfig(self::CF_SMARTPHONE_AUTO_REDIRECT, $smartphoneAutoRedirect)) $isErr = true;
                        }
                        if (!$isErr){
-                               if (!$this->db->updateSystemConfig(self::CF_MOBILE_USE_SESSION, $mobileUseSession)) $isErr = true;// 携帯でセッション管理するかどうか
-                       }
-                       if (!$isErr){
                                if (!$this->db->updateSystemConfig(self::CF_SITE_PC_IN_PUBLIC, $sitePcInPublic)) $isErr = true;
                        }
                        if (!$isErr){
@@ -214,9 +201,6 @@ class admin_mainConfigsysWidgetContainer extends admin_mainConfigsystemBaseWidge
                                if (!$this->updateActiveAccessPoint(2/*スマートフォン*/, $isActiveSiteSmartphone)) $isErr = true;// スマートフォン用サイト有効
                        }
                        if (!$isErr){
-                               if (!$this->updateActiveAccessPoint(1/*携帯*/, $isActiveSiteMobile)) $isErr = true;// 携帯用サイト有効
-                       }
-                       if (!$isErr){
                                if (!$this->db->updateSystemConfig(self::CF_CONFIG_WINDOW_OPEN_TYPE, $configWindowOpenByTab)) $isErr = true;                    // ウィジェット設定画面をタブで開くかどうか
                        }
                        if (!$isErr){
@@ -236,10 +220,6 @@ class admin_mainConfigsysWidgetContainer extends admin_mainConfigsystemBaseWidge
                                if (!$this->db->updateSystemConfig(self::CF_SITE_SMARTPHONE_URL, $siteSmartphoneUrl)) $isErr = true;// スマートフォン用サイトURL
                        }
                        if (!$isErr){
-                               $siteMobileUrl = rtrim($siteMobileUrl, '/');// 最後の「/」を除く
-                               if (!$this->db->updateSystemConfig(self::CF_SITE_MOBILE_URL, $siteMobileUrl)) $isErr = true;// 携帯用サイトURL
-                       }
-                       if (!$isErr){
                                $workDir = rtrim($workDir, '/');// 最後の「/」を除く
                                if (!$this->db->updateSystemConfig(self::CF_WORK_DIR, $workDir)) $isErr = true;
                        }
@@ -300,10 +280,7 @@ class admin_mainConfigsysWidgetContainer extends admin_mainConfigsystemBaseWidge
                        $canChangeTemplate      = $this->db->getSystemConfig(self::CF_USE_TEMPLATE_ID_IN_SESSION);// ユーザによるテンプレート変更を許可するかどうか
                        $canDetailConfig        = $this->db->getSystemConfig(self::CF_PERMIT_DETAIL_CONFIG);
                        $multiDeviceAdmin       = $this->db->getSystemConfig(self::CF_MULTI_DEVICE_ADMIN);              // マルチデバイス最適化管理画面
-//                     $mobileAutoRedirect     = $this->db->getSystemConfig(self::CF_MOBILE_AUTO_REDIRECT);
-                       $mobileAutoRedirect     = $this->gSystem->mobileAutoRedirect(true/*再取得*/);                                // 携帯の自動遷移
                        $smartphoneAutoRedirect = $this->gSystem->smartphoneAutoRedirect(true/*再取得*/);            // スマートフォンの自動遷移
-                       $mobileUseSession = $this->db->getSystemConfig(self::CF_MOBILE_USE_SESSION);// 携帯でセッション管理するかどうか
                        $workDir = $this->db->getSystemConfig(self::CF_WORK_DIR);
                        $sitePcInPublic = $this->gSystem->sitePcInPublic(true/*再取得*/);                    // PC用サイトの公開状況
                        $siteMobileInPublic = $this->gSystem->siteMobileInPublic(true/*再取得*/);    // 携帯用サイトの公開状況
@@ -313,9 +290,7 @@ class admin_mainConfigsysWidgetContainer extends admin_mainConfigsystemBaseWidge
                        $useLandingPage         = $this->db->getSystemConfig(self::CF_USE_LANDING_PAGE);// ランディングページ機能を使用するかどうか
                        $isActiveSitePc                 = $this->isActiveAccessPoint(0/*PC*/);                                  // PC用サイト有効かどうか
                        $isActiveSiteSmartphone = $this->isActiveAccessPoint(2/*スマートフォン*/);               // スマートフォン用サイト有効かどうか
-                       $isActiveSiteMobile             = $this->isActiveAccessPoint(1/*スマートフォン*/);               // 携帯用サイト有効かどうか
                        $siteSmartphoneUrl = $this->db->getSystemConfig(self::CF_SITE_SMARTPHONE_URL);          // スマートフォン用サイトURL
-                       $siteMobileUrl = $this->db->getSystemConfig(self::CF_SITE_MOBILE_URL);          // 携帯用サイトURL
                        $configWindowOpenByTab = $this->db->getSystemConfig(self::CF_CONFIG_WINDOW_OPEN_TYPE);                  // ウィジェット設定画面をタブで開くかどうか
                        $multiLanguage = $this->gSystem->getSystemConfig(self::CF_MULTI_LANGUAGE);              // 多言語対応かどうか
                        $this->systemTemplate           = $this->db->getSystemConfig(self::CF_SYSTEM_TEMPLATE);// システム画面用テンプレート
@@ -382,10 +357,7 @@ class admin_mainConfigsysWidgetContainer extends admin_mainConfigsystemBaseWidge
                        $canChangeTemplate      = $this->db->getSystemConfig(self::CF_USE_TEMPLATE_ID_IN_SESSION);// ユーザによるテンプレート変更を許可するかどうか
                        $canDetailConfig        = $this->db->getSystemConfig(self::CF_PERMIT_DETAIL_CONFIG);
                        $multiDeviceAdmin       = $this->db->getSystemConfig(self::CF_MULTI_DEVICE_ADMIN);              // マルチデバイス最適化管理画面
-//                     $mobileAutoRedirect     = $this->db->getSystemConfig(self::CF_MOBILE_AUTO_REDIRECT);
-                       $mobileAutoRedirect     = $this->gSystem->mobileAutoRedirect(true/*再取得*/);                                // 携帯の自動遷移
                        $smartphoneAutoRedirect = $this->gSystem->smartphoneAutoRedirect(true/*再取得*/);            // スマートフォンの自動遷移
-                       $mobileUseSession = $this->db->getSystemConfig(self::CF_MOBILE_USE_SESSION);// 携帯でセッション管理するかどうか
                        $workDir                                = $this->db->getSystemConfig(self::CF_WORK_DIR);
                        $sitePcInPublic = $this->gSystem->sitePcInPublic(true/*再取得*/);                    // PC用サイトの公開状況
                        $siteMobileInPublic = $this->gSystem->siteMobileInPublic(true/*再取得*/);    // 携帯用サイトの公開状況
@@ -395,9 +367,7 @@ class admin_mainConfigsysWidgetContainer extends admin_mainConfigsystemBaseWidge
                        $useLandingPage         = $this->db->getSystemConfig(self::CF_USE_LANDING_PAGE);// ランディングページ機能を使用するかどうか
                        $isActiveSitePc                 = $this->isActiveAccessPoint(0/*PC*/);                                  // PC用サイト有効かどうか
                        $isActiveSiteSmartphone = $this->isActiveAccessPoint(2/*スマートフォン*/);               // スマートフォン用サイト有効かどうか
-                       $isActiveSiteMobile             = $this->isActiveAccessPoint(1/*スマートフォン*/);               // 携帯用サイト有効かどうか
                        $siteSmartphoneUrl = $this->db->getSystemConfig(self::CF_SITE_SMARTPHONE_URL);          // スマートフォン用サイトURL
-                       $siteMobileUrl = $this->db->getSystemConfig(self::CF_SITE_MOBILE_URL);          // 携帯用サイトURL
                        $configWindowOpenByTab = $this->db->getSystemConfig(self::CF_CONFIG_WINDOW_OPEN_TYPE);                  // ウィジェット設定画面をタブで開くかどうか
                        $multiLanguage = $this->gSystem->getSystemConfig(self::CF_MULTI_LANGUAGE);              // 多言語対応かどうか
                        $this->systemTemplate           = $this->db->getSystemConfig(self::CF_SYSTEM_TEMPLATE);// システム画面用テンプレート
@@ -433,11 +403,8 @@ class admin_mainConfigsysWidgetContainer extends admin_mainConfigsystemBaseWidge
                // サイトURL
                $this->tmpl->addVar("_widget", "site_url", $this->gEnv->getRootUrl());
                $this->tmpl->addVar("show_site_pc_open", "pc_access_url", $this->gEnv->getDefaultUrl());
-               $this->tmpl->addVar("show_site_mobile_open", "mobile_access_url", $this->gEnv->getDefaultMobileUrl());
                $this->tmpl->addVar("show_site_smartphone_open", "smartphone_access_url", $this->gEnv->getDefaultSmartphoneUrl());
                $this->tmpl->addVar("_widget", "admin_access_url", $this->gEnv->getDefaultAdminUrl());
-               // 携帯画面エンコード
-               $this->tmpl->addVar("show_site_mobile_open", "mobile_encode", $this->gEnv->getMobileEncoding());
                
                // サイト運用状況を設定
                $checked = '';
@@ -455,12 +422,6 @@ class admin_mainConfigsysWidgetContainer extends admin_mainConfigsystemBaseWidge
                } else {
                        $this->tmpl->setAttribute('show_site_pc_close', 'visibility', 'visible');
                }
-               $isActiveSite = $this->gSystem->getSiteActiveStatus(1);         // 携帯用サイト
-               if ($isActiveSite){
-                       $this->tmpl->setAttribute('show_site_mobile_open', 'visibility', 'visible');
-               } else {
-                       $this->tmpl->setAttribute('show_site_mobile_close', 'visibility', 'visible');
-               }
                $isActiveSite = $this->gSystem->getSiteActiveStatus(2);         // スマートフォン用サイト
                if ($isActiveSite){
                        $this->tmpl->setAttribute('show_site_smartphone_open', 'visibility', 'visible');
@@ -489,9 +450,6 @@ class admin_mainConfigsysWidgetContainer extends admin_mainConfigsystemBaseWidge
                if ($sitePcInPublic) $checked = 'checked';
                $this->tmpl->addVar("show_site_pc_open", "site_pc_in_public", $checked);// PC用サイトの公開状況
                $checked = '';
-               if ($siteMobileInPublic) $checked = 'checked';
-               $this->tmpl->addVar("show_site_mobile_open", "site_mobile_in_public", $checked);// 携帯用サイトの公開状況
-               $checked = '';
                if ($siteSmartphoneInPublic) $checked = 'checked';
                $this->tmpl->addVar("show_site_smartphone_open", "site_smartphone_in_public", $checked);// スマートフォン用サイトの公開状況
                $this->tmpl->addVar("_widget", "access_in_intranet", $this->convertToCheckedString($accessInIntranet));// イントラネット運用
@@ -506,9 +464,6 @@ class admin_mainConfigsysWidgetContainer extends admin_mainConfigsystemBaseWidge
                if ($isActiveSiteSmartphone) $checked = 'checked';
                $this->tmpl->addVar("_widget", "is_active_site_smartphone", $checked);// スマートフォン用サイト有効
                $checked = '';
-               if ($isActiveSiteMobile) $checked = 'checked';
-               $this->tmpl->addVar("_widget", "is_active_site_mobile", $checked);// 携帯用サイト有効
-               $checked = '';
                if ($useSsl) $checked = 'checked';
                $this->tmpl->addVar("_widget", "use_ssl", $checked);// SSL機能を使用するかどうか
                $checked = '';
@@ -543,7 +498,6 @@ class admin_mainConfigsysWidgetContainer extends admin_mainConfigsystemBaseWidge
                $this->tmpl->addVar("_widget", "root_url", $this->gEnv->getRootUrl());
                $this->tmpl->addVar("_widget", "connect_server_url", $connectServerUrl);// ポータル接続先URL
                $this->tmpl->addVar("_widget", "site_smartphone_url", $siteSmartphoneUrl);              // スマートフォン用サイトURL
-               $this->tmpl->addVar("_widget", "site_mobile_url", $siteMobileUrl);              // 携帯用サイトURL
                
                // 共有SSL用のURL
                if (!empty($sslUrl)){
@@ -559,15 +513,9 @@ class admin_mainConfigsysWidgetContainer extends admin_mainConfigsystemBaseWidge
                $this->tmpl->addVar("_widget", "can_detail_config", $checked);
                $this->tmpl->addVar("_widget", "multi_device_admin", $this->convertToCheckedString($multiDeviceAdmin));// マルチデバイス最適化管理画面
                $checked = '';
-               if (!empty($mobileAutoRedirect)) $checked = 'checked';
-               $this->tmpl->addVar("_widget", "mobile_auto_redirect", $checked);// 携帯の自動遷移
-               $checked = '';
                if (!empty($smartphoneAutoRedirect)) $checked = 'checked';
                $this->tmpl->addVar("_widget", "smartphone_auto_redirect", $checked);// スマートフォンの自動遷移
                $checked = '';
-               if (!empty($mobileUseSession)) $checked = 'checked';
-               $this->tmpl->addVar("_widget", "mobile_use_session", $checked);
-               $checked = '';
                if (!empty($configWindowOpenByTab)) $checked = 'checked';                       // ウィジェット設定画面をタブで開くかどうか
                $this->tmpl->addVar("_widget", "config_window_open_by_tab", $checked);
 
index 9db6771..450530b 100644 (file)
@@ -214,14 +214,6 @@ class admin_mainPagedefWidgetContainer extends BaseAdminWidgetContainer
                
                // デフォルトテンプレート取得
                switch ($task){
-                       case 'pagedef_mobile':  // 携帯用設定画面のとき
-                               $this->templateId = $this->gSystem->defaultMobileTemplateId();
-                               $deviceType = 1;                // デバイスタイプ(携帯)
-                               $taskStr = 'pagedef_mobile';
-                               $previewWidth = '600px';
-                               $this->tmpl->addVar("_widget", "preview_option_class", 'class="layout_top_border layout_side_border"');         // プレビューエリアにトップとサイドのボーダーラインを付加
-                               $this->tmpl->addVar("_widget", "template_normal_disabled", 'disabled');
-                               break;
                        case 'pagedef_smartphone':              // スマートフォン用設定画面
                                $this->templateId = $this->gSystem->defaultSmartphoneTemplateId();
                                $deviceType = 2;                // デバイスタイプ(スマートフォン)
index 49b6d1f..2254474 100644 (file)
@@ -462,10 +462,6 @@ class admin_mainTemplistWidgetContainer extends admin_mainTempBaseWidgetContaine
                                $this->defalutTemplate = $this->gSystem->defaultTemplateId();// デフォルトのテンプレート
                                $installDir = $this->gEnv->getTemplatesPath();// テンプレート格納ディレクトリ
                                break;
-                       case '1':               // 携帯用テンプレート
-                               $this->defalutTemplate = $this->gSystem->defaultMobileTemplateId();// デフォルトのテンプレート
-                               $installDir = $this->gEnv->getTemplatesPath() . '/' . M3_DIR_NAME_MOBILE;// テンプレート格納ディレクトリ
-                               break;
                        case '2':               // スマートフォン用テンプレート
                                $this->defalutTemplate = $this->gSystem->defaultSmartphoneTemplateId();// デフォルトのテンプレート
                                $installDir = $this->gEnv->getTemplatesPath() . '/' . M3_DIR_NAME_SMARTPHONE;// テンプレート格納ディレクトリ
index b8551ca..d87896f 100644 (file)
@@ -21,8 +21,6 @@ class admin_mainDb extends BaseDb
        private $now;           // 現在日時
        private $userId;                // ログイン中のユーザ
        private $maxNo;         // 最大管理番号
-//     const CF_DEFAULT_TEMPLATE                       = 'default_template';                   // システム定義値取得用キー(PC用デフォルトテンプレート)
-//     const CF_DEFAULT_TEMPLATE_MOBILE        = 'mobile_default_template';    // システム定義値取得用キー(携帯用デフォルトテンプレート)
        
        // 取得値
        const CAN_DETAIL_CONFIG = 'permit_detail_config';                               // 詳細設定が可能かどうか
index 8467bad..a2ab771 100644 (file)
@@ -99,7 +99,7 @@ $(function(){
                </td>\r
        </tr>\r
     <tr>\r
-           <th rowspan="4">アクセスポイント</th>\r
+           <th rowspan="3">アクセスポイント</th>\r
            <th>管理用</th><td><div class="form-control-static"><a href="#" onclick="previewInOtherWindow(0, '{ADMIN_ACCESS_URL}');">{ADMIN_ACCESS_URL}</a></div></td>\r
        </tr>\r
     <tr>\r
@@ -113,11 +113,6 @@ $(function(){
                <patTemplate:tmpl name="show_site_smartphone_close" visibility="hidden"><div class="form-control-static">閉鎖中</div></patTemplate:tmpl></td>\r
        </tr>\r
     <tr>\r
-           <th>携帯用</th><td><patTemplate:tmpl name="show_site_mobile_open" visibility="hidden"><div class="checkbox col-sm-6 m3config_item"><label><input type="checkbox" name="item_site_mobile_in_public" {SITE_MOBILE_IN_PUBLIC} />公開</label></div><div class="form-control-static col-sm-6 text-right m3config_item">画面エンコーディング:{MOBILE_ENCODE}</div>\r
-           <div class="form-control-static"><a href="#" onclick="previewInOtherWindow(1, '{MOBILE_ACCESS_URL}');">{MOBILE_ACCESS_URL}</a></div></patTemplate:tmpl>\r
-               <patTemplate:tmpl name="show_site_mobile_close" visibility="hidden"><div class="form-control-static">閉鎖中</div></patTemplate:tmpl></td>\r
-       </tr>\r
-    <tr>\r
            <th><span {_HELP_CONFIGSYS_ADMIM_MODE}>管理画面モード</span></th>\r
            <td colspan="2"><input type="checkbox" id="site_operation_mode_status" data-toggle="toggle" data-onstyle="success" data-offstyle="primary" data-on="サイト運用モード" data-off="サイト構築モード" data-width="160" {SITE_OPERATION_MODE_CHECKED} />\r
                </td>\r
@@ -137,16 +132,13 @@ $(function(){
                <patTemplate:tmpl name="show_ssl_url_expiredt" visibility="hidden"><div class="col-sm-6 m3config_item"><input type="text" name="item_ssl_url" class="form-control" value="{SSL_URL}" maxlength="200" /></div><div class="form-control-static col-sm-6 m3config_item" style="padding-left:10px;">SSL証明書期限:{SSL_EXPIRE_DT}</div></patTemplate:tmpl></td>\r
        </tr>\r
     <tr>\r
-           <th rowspan="3"><span {_HELP_CONFIGSYS_ACCESS_POINT}>アクセスポイント</span></th>\r
+           <th rowspan="2"><span {_HELP_CONFIGSYS_ACCESS_POINT}>アクセスポイント</span></th>\r
            <th><span {_HELP_CONFIGSYS_SITE_PC}>PC用</span></th><td><div class="checkbox"><label><input type="checkbox" name="item_is_active_site_pc" {IS_ACTIVE_SITE_PC} />有効</label></div></td>\r
        </tr>\r
     <tr>\r
            <th><span {_HELP_CONFIGSYS_SITE_SMARTPHONE}>スマートフォン用</span></th><td><div class="checkbox"><label><input type="checkbox" name="item_is_active_site_smartphone" {IS_ACTIVE_SITE_SMARTPHONE} />有効</label></div>マルチドメインURL:<input type="text" name="item_site_smartphone_url" class="form-control" value="{SITE_SMARTPHONE_URL}" size="60" maxlength="120" style="width:100%;" /></td>\r
        </tr>\r
     <tr>\r
-           <th><span {_HELP_CONFIGSYS_SITE_MOBILE}>携帯用</span></th><td><div class="checkbox"><label><input type="checkbox" name="item_is_active_site_mobile" {IS_ACTIVE_SITE_MOBILE} />有効</label></div>マルチドメインURL:<input type="text" id="item_site_mobile_url" name="item_site_mobile_url" class="form-control" value="{SITE_MOBILE_URL}" size="60" maxlength="120" style="width:100%;" /></td>\r
-       </tr>\r
-    <tr>\r
            <th>ネットワーク</th>\r
            <td colspan="2"><div class="checkbox"><label><input type="checkbox" name="item_access_in_intranet" {ACCESS_IN_INTRANET} />イントラネット運用</label></div></td>\r
        </tr>\r
@@ -173,13 +165,6 @@ $(function(){
            <td colspan="2"><div class="checkbox"><label><input type="checkbox" name="item_smartphone_auto_redirect" {SMARTPHONE_AUTO_REDIRECT} />スマートフォンでのアクセスを自動的にスマートフォンURLへ遷移</label></div></td>\r
        </tr>\r
     <tr>\r
-           <th rowspan="2">携帯</th>\r
-           <td colspan="2"><div class="checkbox"><label><input type="checkbox" name="item_mobile_auto_redirect" {MOBILE_AUTO_REDIRECT} />携帯でのアクセスを自動的に携帯URLへ遷移</label></div></td>\r
-       </tr>\r
-    <tr>\r
-           <td colspan="2"><div class="checkbox"><label><input type="checkbox" name="item_mobile_use_session" {MOBILE_USE_SESSION} />携帯でユーザ管理を行う(セッション管理)</label></div></td>\r
-       </tr>\r
-    <tr>\r
            <th rowspan="3">管理画面</th>\r
            <td colspan="2"><div class="form-control-static col-sm-3 m3config_item">管理画面用jQueryUIテーマ</div>\r
            <div class="col-sm-4 m3config_item"><select name="item_admin_theme" class="form-control">\r
diff --git a/widgets/m/adtag/admin/index.php b/widgets/m/adtag/admin/index.php
deleted file mode 100644 (file)
index 8996219..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 1858 2009-05-06 13:44:08Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/adtag/include/container/admin_m_adtagWidgetContainer.php b/widgets/m/adtag/include/container/admin_m_adtagWidgetContainer.php
deleted file mode 100644 (file)
index 7814118..0000000
+++ /dev/null
@@ -1,324 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2011 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: admin_m_adtagWidgetContainer.php 4194 2011-06-14 06:00:32Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseAdminWidgetContainer.php');
-
-class admin_m_adtagWidgetContainer extends BaseAdminWidgetContainer
-{
-       private $sysDb; // DB接続オブジェクト
-       private $serialNo;              // 選択中の項目のシリアル番号
-       private $serialArray = array();                 // 表示中のシリアル番号
-       private $langId;
-       private $configId;              // 定義ID
-       private $paramObj;              // パラメータ保存用オブジェクト
-       const DEFAULT_NAME_HEAD = '名称未設定';                    // デフォルトの設定名
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-               
-               // DBオブジェクト作成
-               $this->sysDb = $this->gInstance->getSytemDbObject();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               $task = $request->trimValueOf('task');
-               if ($task == 'list'){           // 一覧画面
-                       return 'admin_list.tmpl.html';
-               } else {                        // 一覧画面
-                       return 'admin.tmpl.html';
-               }
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $task = $request->trimValueOf('task');
-               if ($task == 'list'){           // 一覧画面
-                       return $this->createList($request);
-               } else {                        // 詳細設定画面
-                       return $this->createDetail($request);
-               }
-       }
-       /**
-        * 詳細画面作成
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param                                                               なし
-        */
-       function createDetail($request)
-       {
-               // ページ定義IDとページ定義のレコードシリアル番号を取得
-               $this->startPageDefParam($defSerial, $defConfigId, $this->paramObj);
-               
-               $userId         = $this->gEnv->getCurrentUserId();
-               $this->langId   = $this->gEnv->getCurrentLanguage();            // 表示言語を取得
-               $act = $request->trimValueOf('act');
-               $this->serialNo = $request->trimValueOf('serial');              // 選択項目のシリアル番号
-
-               // 入力値を取得
-               $name           = $request->trimValueOf('item_name');                   // ヘッダタイトル
-               $content        = $request->valueOf('item_content');            // タグ内容
-               $this->configId = $request->trimValueOf('item_id');             // 定義ID
-               if (empty($this->configId)) $this->configId = $defConfigId;             // 呼び出しウィンドウから引き継いだ定義ID
-               
-               $replaceNew = false;            // データを再取得するかどうか
-               if (empty($act)){// 初期起動時
-                       // デフォルト値設定
-                       $this->configId = $defConfigId;         // 呼び出しウィンドウから引き継いだ定義ID
-                       $replaceNew = true;                     // データ再取得
-               } else if ($act == 'add'){// 新規追加
-                       // 入力チェック
-                       $this->checkInput($name, '名前');
-                       $this->checkInput($content, 'タグ内容');
-                       
-                       // 設定名の重複チェック
-                       for ($i = 0; $i < count($this->paramObj); $i++){
-                               $targetObj = $this->paramObj[$i]->object;
-                               if ($name == $targetObj->name){         // 定義名
-                                       $this->setUserErrorMsg('名前が重複しています');
-                                       break;
-                               }
-                       }
-                       
-                       // エラーなしの場合は、データを登録
-                       if ($this->getMsgCount() == 0){
-                               // 追加オブジェクト作成
-                               $newObj = new stdClass;
-                               $newObj->name           = $name;// 表示名
-                               $newObj->content        = $content;             // タグ内容
-                               
-                               $ret = $this->addPageDefParam($defSerial, $defConfigId, $this->paramObj, $newObj);
-                               if ($ret){
-                                       $this->setGuidanceMsg('データを追加しました');
-                                       
-                                       $this->configId = $defConfigId;         // 定義定義IDを更新
-                                       $replaceNew = true;                     // データ再取得
-                               } else {
-                                       $this->setAppErrorMsg('データ追加に失敗しました');
-                               }
-                       }
-               } else if ($act == 'update'){           // 設定更新のとき
-                       // 入力値のエラーチェック
-                       $this->checkInput($content, 'タグ内容');
-                       
-                       if ($this->getMsgCount() == 0){                 // エラーのないとき
-                               // 現在の設定値を取得
-                               $ret = $this->getPageDefParam($defSerial, $defConfigId, $this->paramObj, $this->configId, $targetObj);
-                               if ($ret){
-                                       // ウィジェットオブジェクト更新
-                                       $targetObj->content     = $content;             // タグ内容
-                               }
-                               
-                               // 設定値を更新
-                               if ($ret) $ret = $this->updatePageDefParam($defSerial, $defConfigId, $this->paramObj, $this->configId, $targetObj);
-                               if ($ret){
-                                       $this->setMsg(self::MSG_GUIDANCE, 'データを更新しました');
-                                       
-                                       $replaceNew = true;                     // データ再取得
-                               } else {
-                                       $this->setMsg(self::MSG_APP_ERR, 'データ更新に失敗しました');
-                               }
-                       }
-               } else if ($act == 'select'){   // 定義IDを変更
-                       $replaceNew = true;                     // データ再取得
-               }
-               
-               // 設定項目選択メニュー作成
-               $this->createItemMenu();
-               
-               // 表示用データを取得
-               if (empty($this->configId)){            // 新規登録の場合
-                       $this->tmpl->setAttribute('item_name_visible', 'visibility', 'visible');// 名前入力フィールド表示
-                       if ($replaceNew){               // データ再取得時
-                               $name = $this->createDefaultName();                     // デフォルト登録項目名
-                               $content = '';          // タグ内容
-                       }
-                       $this->serialNo = 0;
-               } else {
-                       if ($replaceNew){
-                               $ret = $this->getPageDefParam($defSerial, $defConfigId, $this->paramObj, $this->configId, $targetObj);
-                               if ($ret){
-                                       $name = $targetObj->name;// 名前
-                                       $content = $targetObj->content;         // タグ内容                 
-                               }
-                       }
-                       $this->serialNo = $this->configId;
-                               
-                       // 新規作成でないときは、メニューを変更不可にする(画面作成から呼ばれている場合のみ)
-                       if (!empty($defConfigId) && !empty($defSerial)) $this->tmpl->addVar("_widget", "id_disabled", 'disabled');
-               }
-               
-               // 画面にデータを埋め込む
-               $this->tmpl->addVar("item_name_visible", "name", $name);                // 名前
-               $this->tmpl->addVar("_widget", "content",       $content);                      // タグ内容
-
-               $this->tmpl->addVar("_widget", "serial", $this->serialNo);// 選択中のシリアル番号、IDを設定
-               
-               // ボタンの表示制御
-               if (empty($this->serialNo)){            // 新規追加項目を選択しているとき
-                       $this->tmpl->setAttribute('add_button', 'visibility', 'visible');// 「新規追加」ボタン
-               } else {
-                       $this->tmpl->setAttribute('update_button', 'visibility', 'visible');// 「更新」ボタン
-               }
-               // ページ定義IDとページ定義のレコードシリアル番号を更新
-               $this->endPageDefParam($defSerial, $defConfigId, $this->paramObj);
-       }
-       /**
-        * 選択用メニューを作成
-        *
-        * @return なし                                               
-        */
-       function createItemMenu()
-       {
-               for ($i = 0; $i < count($this->paramObj); $i++){
-                       $id = $this->paramObj[$i]->id;// 定義ID
-                       $targetObj = $this->paramObj[$i]->object;
-                       $name = $targetObj->name;// 定義名
-                       $selected = '';
-
-                       if ($this->configId == $id) $selected = 'selected';
-                       $row = array(
-                               'name' => $name,                // 名前
-                               'value' => $id,         // 定義ID
-                               'selected' => $selected // 選択中の項目かどうか
-                       );
-                       $this->tmpl->addVars('title_list', $row);
-                       $this->tmpl->parseTemplate('title_list', 'a');
-               }
-       }
-       /**
-        * デフォルトの名前を取得
-        *
-        * @return string       デフォルト名                                              
-        */
-       function createDefaultName()
-       {
-               $name = self::DEFAULT_NAME_HEAD;
-               for ($j = 1; $j < 100; $j++){
-                       $name = self::DEFAULT_NAME_HEAD . $j;
-                       // 設定名の重複チェック
-                       for ($i = 0; $i < count($this->paramObj); $i++){
-                               $targetObj = $this->paramObj[$i]->object;
-                               if ($name == $targetObj->name){         // 定義名
-                                       break;
-                               }
-                       }
-                       // 重複なしのときは終了
-                       if ($i == count($this->paramObj)) break;
-               }
-               return $name;
-       }
-       /**
-        * 一覧画面作成
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param                                                               なし
-        */
-       function createList($request)
-       {
-               // ページ定義IDとページ定義のレコードシリアル番号を取得
-               $this->startPageDefParam($defSerial, $defConfigId, $this->paramObj);
-               
-               $userId         = $this->gEnv->getCurrentUserId();
-               $langId = $this->gEnv->getCurrentLanguage();            // 表示言語を取得
-               $act = $request->trimValueOf('act');
-               
-               if ($act == 'delete'){          // メニュー項目の削除
-                       $listedItem = explode(',', $request->trimValueOf('seriallist'));
-                       $delItems = array();
-                       for ($i = 0; $i < count($listedItem); $i++){
-                               // 項目がチェックされているかを取得
-                               $itemName = 'item' . $i . '_selected';
-                               $itemValue = ($request->trimValueOf($itemName) == 'on') ? 1 : 0;
-                               
-                               if ($itemValue){                // チェック項目
-                                       $delItems[] = $listedItem[$i];
-                               }
-                       }
-                       if (count($delItems) > 0){
-                               $ret = $this->delPageDefParam($defSerial, $defConfigId, $this->paramObj, $delItems);
-                               if ($ret){              // データ削除成功のとき
-                                       $this->setGuidanceMsg('データを削除しました');
-                               } else {
-                                       $this->setAppErrorMsg('データ削除に失敗しました');
-                               }
-                       }
-               }
-               // 定義一覧作成
-               $this->createItemList();
-               
-               // 項目がないときは、一覧を表示しない
-               if (count($this->serialArray) == 0) $this->tmpl->setAttribute('itemlist', 'visibility', 'hidden');              
-               
-               $this->tmpl->addVar("_widget", "serial_list", implode($this->serialArray, ','));// 表示項目のシリアル番号を設定
-               
-               // ページ定義IDとページ定義のレコードシリアル番号を更新
-               $this->endPageDefParam($defSerial, $defConfigId, $this->paramObj);
-       }
-       /**
-        * 定義一覧作成
-        *
-        * @return なし                                               
-        */
-       function createItemList()
-       {
-               for ($i = 0; $i < count($this->paramObj); $i++){
-                       $id = $this->paramObj[$i]->id;// 定義ID
-                       $targetObj = $this->paramObj[$i]->object;
-                       $name = $targetObj->name;// 定義名
-                       
-                       $defCount = 0;
-                       if (!empty($id)){
-                               $defCount = $this->sysDb->getPageDefCount($this->gEnv->getCurrentWidgetId(), $id);
-                       }
-                       $operationDisagled = '';
-                       if ($defCount > 0) $operationDisagled = 'disabled';
-                       $row = array(
-                               'index' => $i,
-                               'ope_disabled' => $operationDisagled,                   // 選択可能かどうか
-                               'name' => $this->convertToDispString($name),            // 名前
-                               'def_count' => $defCount                                                        // 使用数
-                       );
-                       $this->tmpl->addVars('itemlist', $row);
-                       $this->tmpl->parseTemplate('itemlist', 'a');
-                       
-                       // シリアル番号を保存
-                       $this->serialArray[] = $id;
-               }
-       }
-}
-?>
diff --git a/widgets/m/adtag/include/container/m_adtagWidgetContainer.php b/widgets/m/adtag/include/container/m_adtagWidgetContainer.php
deleted file mode 100644 (file)
index e29d687..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2009 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_adtagWidgetContainer.php 1861 2009-05-07 03:33:45Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseWidgetContainer.php');
-
-class m_adtagWidgetContainer extends BaseWidgetContainer
-{
-       private $langId;                // 現在の言語
-       const DEFAULT_CONFIG_ID = 0;
-       const DEFAULT_TITLE = '広告タグ';                   // デフォルトのウィジェットタイトル
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'index.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $this->langId = $this->gEnv->getCurrentLanguage();
-               
-               // 定義ID取得
-               $configId = $this->gEnv->getCurrentWidgetConfigId();
-               if (empty($configId)) $configId = self::DEFAULT_CONFIG_ID;
-               
-               // パラメータオブジェクトを取得
-               $targetObj = $this->getWidgetParamObjByConfigId($configId);
-               if (!empty($targetObj)){                // 定義データが取得できたとき
-                       $name           = $targetObj->name;// 定義名
-                       $content        = $targetObj->content;          // タグ内容
-                       
-                       // 表示データ埋め込み
-                       $this->tmpl->addVar("_widget", "content",       $content);
-               }
-       }
-       /**
-        * ウィジェットのタイトルを設定
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               ウィジェットのタイトル名
-        */
-       function _setTitle($request, &$param)
-       {
-               return self::DEFAULT_TITLE;
-       }
-}
-?>
diff --git a/widgets/m/adtag/include/template/admin.tmpl.html b/widgets/m/adtag/include/template/admin.tmpl.html
deleted file mode 100644 (file)
index a6d04d5..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<script type="text/javascript">\r
-<!--\r
-function addItem(){\r
-    if (!window.confirm('項目を新規追加しますか?')) return false;\r
-    document.main.act.value = 'add';\r
-    document.main.submit();\r
-    return true;\r
-}\r
-function updateItem(){\r
-       if (!window.confirm('設定を更新しますか?')) return false;\r
-       document.main.act.value='update';\r
-       document.main.submit();\r
-       return true;\r
-}\r
-function selectItem()\r
-{\r
-       document.main.act.value = 'select';\r
-       document.main.submit();\r
-       return true;\r
-}\r
-function listItem(){\r
-       document.main.task.value = 'list';\r
-       document.main.submit();\r
-       return true;\r
-}\r
-// -->\r
-</script>\r
-<div align="center">\r
-<br />\r
-<!-- m3:ErrorMessage -->\r
-<form method="post" name="main" class="form">\r
-<input type="hidden" name="task" />\r
-<input type="hidden" name="act" />\r
-<input type="hidden" name="serial" value="{SERIAL}" />\r
-<!-- m3:PostParam -->\r
-<table width="90%">\r
-<tr><td><label>広告タグ項目</label></td>\r
-<td align="right"><input type="button" class="button" onclick="listItem();" value="一覧" />\r
-</td></tr>\r
-<tr><td colspan="2">\r
-\r
-<table class="simple-table" width="100%">\r
-    <tbody>\r
-        <tr>\r
-           <td class="table-headside" width="200">名前</td>\r
-           <td>\r
-           <select name="item_id" onchange="selectItem();" {ID_DISABLED}>\r
-               <option value="0">-- 新規登録 --</option>\r
-               <patTemplate:tmpl name="title_list">\r
-               <option value="{VALUE}" {SELECTED}>{NAME}</option>\r
-               </patTemplate:tmpl>\r
-           </select>\r
-           <patTemplate:tmpl name="item_name_visible" visibility="hidden">\r
-           <input type="text" name="item_name" value="{NAME}" size="40" maxlength="40" />\r
-           </patTemplate:tmpl>\r
-           </td>\r
-       </tr>\r
-        <tr class="even">\r
-           <td class="table-headside">タグ内容</td>\r
-           <td><textarea name="item_content" rows="2" cols="50" style="width:100%;">{CONTENT}</textarea></td>\r
-       </tr>\r
-       <tr>\r
-           <td align="right" colspan="2">\r
-<patTemplate:tmpl name="del_button" visibility="hidden">\r
-               <input type="button" class="button" onclick="deleteItem();" value="削除" />\r
-</patTemplate:tmpl>\r
-<patTemplate:tmpl name="update_button" visibility="hidden">\r
-               <input type="button" class="button" onclick="updateItem();" value="更新" />\r
-</patTemplate:tmpl>\r
-<patTemplate:tmpl name="add_button" visibility="hidden">\r
-               <input type="button" class="button" onclick="addItem();" value="新規追加" />\r
-</patTemplate:tmpl>\r
-           </td>\r
-       </tr>\r
-    </tbody>\r
-</table>\r
-</td></tr>\r
-</table>\r
-\r
-</form>\r
-</div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/adtag/include/template/admin_list.tmpl.html b/widgets/m/adtag/include/template/admin_list.tmpl.html
deleted file mode 100644 (file)
index 9f8df45..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<script type="text/javascript">\r
-<!--\r
-function delItem(){\r
-    if (document.main.seriallist.value){\r
-        var items = document.main.seriallist.value.split(",");\r
-       for (var i = 0; i < items.length; i++){\r
-           var name = "document.main.item" + i + "_selected";\r
-           var itemObj = eval(name);\r
-           // チェックありのときは終了\r
-           if (itemObj && itemObj.checked) break;\r
-       }\r
-       if (i == items.length){                 \r
-           window.alert('削除する項目を選択してください');\r
-       } else {\r
-            if (!window.confirm('選択項目を削除しますか?')) return false;\r
-            document.main.act.value = 'delete';\r
-            document.main.submit();\r
-       }\r
-    }\r
-    return true;\r
-}\r
-function cancelItem(){\r
-    document.main.task.value = '';\r
-    document.main.submit();\r
-    return true;\r
-}\r
-$(function(){\r
-       // スクロールバー付きのテーブルを作成\r
-       m3_tableWithScrollbar('itemlist', -1, 0);\r
-});\r
-// -->\r
-</script>\r
-<div align="center">\r
-<br />\r
-<!-- m3:ErrorMessage -->\r
-<form method="post" name="main">\r
-<input type="hidden" name="task" value="list" />\r
-<input type="hidden" name="act" />\r
-<input type="hidden" name="serial" />\r
-<input type="hidden" name="seriallist" value="{SERIAL_LIST}" />\r
-<!-- m3:PostParam -->\r
-<table width="90%">\r
-<tr><td>\r
-<label>広告タグ一覧</label>\r
-</td><td align="right"><input type="button" class="button" onclick="delItem();" value="削除" /><input type="button" class="button" onclick="cancelItem();" value="戻る" />\r
-</td></tr>\r
-<tr><td colspan="2">\r
-<table id="itemlist" class="simple-table" width="100%">\r
-    <thead>\r
-        <tr>\r
-           <th width="35" align="center">選択</th>\r
-           <th width="40%" align="center">名前</th>\r
-           <th align="center">使用</th>\r
-       </tr>\r
-    </thead>\r
-    <tbody>\r
-        <patTemplate:tmpl name="itemlist">\r
-        <tr>\r
-            <td align="center"><input type="checkbox" name="item{INDEX}_selected" {OPE_DISABLED} /></td>\r
-           <td>{NAME}</td>\r
-           <td align="center">{DEF_COUNT}</td>\r
-       </tr>\r
-       </patTemplate:tmpl>\r
-    </tbody>\r
-</table>\r
-</td></tr>\r
-</table>\r
-\r
-</form>\r
-</div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/adtag/include/template/index.tmpl.html b/widgets/m/adtag/include/template/index.tmpl.html
deleted file mode 100644 (file)
index 0a69e43..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<patTemplate:tmpl name="_widget">
-{CONTENT}
-</patTemplate:tmpl>
diff --git a/widgets/m/adtag/index.php b/widgets/m/adtag/index.php
deleted file mode 100644 (file)
index 8996219..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 1858 2009-05-06 13:44:08Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/bbs_2ch/admin/index.php b/widgets/m/bbs_2ch/admin/index.php
deleted file mode 100644 (file)
index 25e40ae..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2010 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 4028 2011-03-11 04:11:33Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/bbs_2ch/images/ba.gif b/widgets/m/bbs_2ch/images/ba.gif
deleted file mode 100644 (file)
index fa1d375..0000000
Binary files a/widgets/m/bbs_2ch/images/ba.gif and /dev/null differ
diff --git a/widgets/m/bbs_2ch/images/icon32.png b/widgets/m/bbs_2ch/images/icon32.png
deleted file mode 100644 (file)
index fe403cd..0000000
Binary files a/widgets/m/bbs_2ch/images/icon32.png and /dev/null differ
diff --git a/widgets/m/bbs_2ch/images/icon64.png b/widgets/m/bbs_2ch/images/icon64.png
deleted file mode 100644 (file)
index 3ee6c67..0000000
Binary files a/widgets/m/bbs_2ch/images/icon64.png and /dev/null differ
diff --git a/widgets/m/bbs_2ch/images/tubo.gif b/widgets/m/bbs_2ch/images/tubo.gif
deleted file mode 100644 (file)
index 3ab1714..0000000
Binary files a/widgets/m/bbs_2ch/images/tubo.gif and /dev/null differ
diff --git a/widgets/m/bbs_2ch/include/container/admin_m_bbs_2chBaseWidgetContainer.php b/widgets/m/bbs_2ch/include/container/admin_m_bbs_2chBaseWidgetContainer.php
deleted file mode 100644 (file)
index fe0b2da..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2011 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: admin_m_bbs_2chBaseWidgetContainer.php 4037 2011-03-19 13:54:56Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseAdminWidgetContainer.php');
-require_once($gEnvManager->getCurrentWidgetDbPath() . '/bbs_2chDb.php');
-
-class admin_m_bbs_2chBaseWidgetContainer extends BaseAdminWidgetContainer
-{
-       protected $_db;                 // DB接続オブジェクト
-       protected $_boardId;    // 掲示板ID
-       const DEFAULT_BBS_ID = 'board1';                // デフォルトの掲示板ID
-       const DEFAULT_TOP_PAGE = 'other';               // デフォルトのトップページ
-       const DEFAULT_BOTTOM_MESSAGE = '<center><b>どのような形の削除依頼であれ公開させていただきます。</b></center>';                // デフォルトのトップ画面下部メッセージ
-       const DEFAULT_THREAD_END_MESSAGE = "このスレッドは[#RES_MAX_NO#]を超えました。\r\nもう書けないので、新しいスレッドを立ててくださいです。。。";               // デフォルトのレス上限メッセージ
-       const DEFAULT_ADMIN_NAME = 'サイト運営者';                                // サイト運営者名
-       const WIDGET_TITLE_NAME = '2ちゃんねる風BBSメイン';                            // ウィジェットタイトル名
-       const CF_BBS_TITLE = 'title';                   // 掲示板タイトル
-       const CF_TITLE_COLOR = 'title_color';   // タイトルカラー
-       const CF_TOP_LINK = 'top_link';         // トップ画像のリンク先
-       const CF_TOP_IMAGE = 'top_image';               // トップ画像
-       const CF_BBS_GUIDE = 'bbs_guide';               // 掲示板規則
-       const CF_BOTTOM_MESSAGE = 'bottom_message';             // トップ画面下部メッセージ
-       const CF_THREAD_END_MESSAGE = 'thread_end_message';             // レス上限メッセージ
-       const CF_BG_IMAGE = 'bg_image';         // 背景画像
-       const CF_BG_COLOR = 'bg_color';         // 背景色
-       const CF_TEXT_COLOR = 'text_color';             // 文字色
-       const CF_MENU_COLOR = 'menu_color';             // メニュー背景色
-       const CF_MAKE_THREAD_COLOR = 'makethread_color';                // スレッド作成部背景色
-       const CF_THREAD_COLOR = 'thread_color';         // スレッド表示部背景色
-       const CF_LINK_COLOR = 'link_color';             // リンク色
-       const CF_ALINK_COLOR = 'alink_color';           // リンク色
-       const CF_VLINK_COLOR = 'vlink_color';           // リンク色
-       const CF_NAME_COLOR = 'name_color';                     // 投稿者名文字色
-       const CF_FILE_UPLOAD = 'file_upload';           // ファイルアップロード許可
-       const CF_SUBJECT_LENGTH = 'subject_length';             // 件名最大長
-       const CF_NAME_LENGTH = 'name_length';           // 投稿者名最大長
-       const CF_EMAIL_LENGTH = 'email_length';         // emailアドレス最大長
-       const CF_MESSAGE_LENGTH = 'message_length';     // 最大メッセージ長
-       const CF_ERR_MESSAGE_COLOR = 'err_message_color';               // エラーメッセージ文字色
-       const CF_SUBJECT_COLOR = 'subject_color';               // 件名文字色
-       const CF_LINE_LENGTH = 'line_length';           // 投稿文行長
-       const CF_LINE_COUNT = 'line_count';                     // 投稿文行数
-       const CF_RES_ANCHOR_LINK_COUNT = 'res_anchor_link_count';               // レスアンカーリンク数
-       const CF_THREAD_COUNT = 'thread_count';         // トップ画面に表示するスレッド最大数
-       const CF_RES_COUNT = 'res_count';               // トップ画面に表示するレス最大数
-       const CF_THREAD_RES = 'thread_res';             // 1スレッドに投稿できるレス数の上限
-       const CF_MENU_THREAD_COUNT = 'menu_thread_count';       // メニューに表示するスレッド最大数
-       const CF_SHOW_EMAIL = 'show_email';             // Eメールアドレスを表示
-       const CF_AUTOLINK = 'autolink';                 // 自動的にリンクを作成
-       const CF_NONAME_NAME = 'noname_name';                           // 名前未設定時の表示名
-       const CF_ADMIN_NAME = 'admin_name';                             // サイト運営者名
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-               
-               // DBオブジェクト作成
-               $this->_db = new bbs_2chDb();
-               
-               // BBS定義を読み込む
-               $this->_loadConfig();
-               
-               $this->_boardId = self::DEFAULT_BBS_ID;
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @return                                                              なし
-        */
-       function _postAssign($request, &$param)
-       {
-               // ウィンドウオープンタイプ取得
-               $openBy = $request->trimValueOf(M3_REQUEST_PARAM_OPEN_BY);              // ウィンドウオープンタイプ
-               if (!empty($openBy)) $this->addOptionUrlParam(M3_REQUEST_PARAM_OPEN_BY, $openBy);
-               
-               // 表示画面を決定
-               $task = $request->trimValueOf(M3_REQUEST_PARAM_OPERATION_TASK);
-               if (empty($task)) $task = self::DEFAULT_TOP_PAGE;
-               
-               // パンくずリストを作成
-               switch ($task){
-                       case 'other':           // その他設定
-                               $linkList = ' &gt;&gt; 基本設定';// パンくずリスト
-                               break;
-               }
-               // ####### 上段メニューの作成 #######
-               $menuText = '<div id="configmenu-upper">' . M3_NL;
-               $menuText .= '<ul>' . M3_NL;
-               $baseUrl = $this->getAdminUrlWithOptionParam(true);// 画面定義ID付き
-
-               // その他設定
-               $current = '';
-               $link = $baseUrl . '&task=other';
-               if ($task == 'other'){          
-                       $current = 'id="current"';
-               }
-               $menuText .= '<li ' . $current . '><a href="'. $this->getUrl($link, true) .'"><span>基本設定</span></a></li>' . M3_NL;
-               
-               // 上段メニュー終了
-               $menuText .= '</ul>' . M3_NL;
-               $menuText .= '</div>' . M3_NL;
-               
-               // 作成データの埋め込み
-               $linkList = '<div id="configmenu-top"><label>' . self::WIDGET_TITLE_NAME . $linkList . '</div>';
-               $outputText .= '<table width="90%"><tr><td>' . $linkList . $menuText . '</td></tr></table>' . M3_NL;
-               $this->tmpl->addVar("_widget", "menu_items", $outputText);
-       }
-       /**
-        * BBS定義値をDBから取得
-        *
-        * @return bool                 true=取得成功、false=取得失敗
-        */
-       function _loadConfig()
-       {
-               $this->_configArray = array();
-
-               // BBS定義を読み込み
-               $ret = $this->_db->getAllConfig($rows);
-               if ($ret){
-                       // 取得データを連想配列にする
-                       $configCount = count($rows);
-                       for ($i = 0; $i < $configCount; $i++){
-                               $key = $rows[$i]['tg_id'];
-                               $value = $rows[$i]['tg_value'];
-                               $this->_configArray[$key] = $value;
-                       }
-               }
-               return $ret;
-       }
-}
-?>
diff --git a/widgets/m/bbs_2ch/include/container/admin_m_bbs_2chOtherWidgetContainer.php b/widgets/m/bbs_2ch/include/container/admin_m_bbs_2chOtherWidgetContainer.php
deleted file mode 100644 (file)
index 108c79c..0000000
+++ /dev/null
@@ -1,221 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2011 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: admin_m_bbs_2chOtherWidgetContainer.php 4028 2011-03-11 04:11:33Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getCurrentWidgetContainerPath() . '/admin_m_bbs_2chBaseWidgetContainer.php');
-
-class admin_m_bbs_2chOtherWidgetContainer extends admin_m_bbs_2chBaseWidgetContainer
-{
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'admin_other.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $defaultLang    = $this->gEnv->getDefaultLanguage();
-               $act = $request->trimValueOf('act');
-               
-               $bbsTitle = $request->trimValueOf('bbs_title');                                 // 掲示板タイトル
-               $topLink = $request->trimValueOf('title_link');                         // トップ画像のリンク先
-               $topImage = $request->trimValueOf('top_image');                         // トップ画像
-               $bgImage = $request->trimValueOf('bg_image');                           // 背景画像
-               $bbsGuide = $request->valueOf('bbs_guide');                             // 掲示板規則(HTML許可)
-               $bottomMessage = $request->valueOf('bottom_message');                           // トップ画面下部メッセージ(HTML許可)
-               $textColor = $request->valueOf('text_color');                           // 文字色
-               $bgColor = $request->valueOf('bg_color');                               // 背景色
-               //$titleColor = $request->valueOf('title_color');                               // タイトルカラー
-               $menuColor = $request->valueOf('menu_color');                           // メニュー背景色
-               $threadColor = $request->valueOf('thread_color');                       // スレッド表示部背景色
-               $makeThreadColor = $request->valueOf('makethread_color');       // スレッド作成部背景色
-               $linkColor = $request->valueOf('link_color');   // リンク色
-               $alinkColor = $request->valueOf('alink_color'); // リンク色(アクティブ)
-               $vlinkColor = $request->valueOf('vlink_color'); // リンク色(アクセス済み)
-               $subjectColor = $request->valueOf('subject_color');     // 件名文字色
-               $nameColor = $request->valueOf('name_color');   // 投稿者名文字色
-               $errMessageColor = $request->valueOf('err_message_color');      // エラーメッセージ文字色
-               $subjectLength = $request->valueOf('subject_length');   // 件名最大長
-               $nameLength = $request->valueOf('name_length'); // 投稿者名最大長
-               $emailLength = $request->valueOf('email_length');       // emailアドレス最大長
-               $messageLength = $request->valueOf('message_length');   // 投稿文最大長
-               $lineLength = $request->valueOf('line_length'); // 投稿文行長
-               $lineCount = $request->valueOf('line_count');   // 投稿文行数
-               $resAnchorLinkCount = $request->valueOf('res_anchor_link_count');       // レスアンカーリンク数
-               $threadCount = $request->valueOf('thread_count');       // トップ画面のスレッド最大数
-               $resCount = $request->valueOf('res_count');     // トップ画面のレス最大数
-               $threadRes = $request->valueOf('thread_res');   // 投稿可能なレス数の上限
-               $menuThreadCount = $request->valueOf('menu_thread_count');      // メニューのスレッド最大数
-               $nonameName = $request->valueOf('noname_name'); // 名前未設定時の表示名
-               $adminName = $request->valueOf('admin_name');   // サイト運営者名
-               $threadEndMessage = $request->valueOf('thread_end_message');    // スレッド終了メッセージ
-               
-               $reloadData = false;            // データの再読み込み
-               if ($act == 'update'){          // 設定更新のとき
-                       // 入力値のエラーチェック
-                       
-                       if ($this->getMsgCount() == 0){                 // エラーのないとき
-                               // パスの修正
-                               if (!empty($topImage)) $topImage = $this->gEnv->getMacroPath($topImage);
-                               if (!empty($bgImage)) $bgImage = $this->gEnv->getMacroPath($bgImage);
-                                                       
-                               $ret = $this->_db->updateConfig(self::CF_BBS_TITLE, $bbsTitle);         // 掲示板タイトル
-                               if ($ret) $this->_db->updateConfig(self::CF_TOP_LINK, $topLink);        // トップ画像のリンク先
-                               if ($ret) $this->_db->updateConfig(self::CF_TOP_IMAGE, $topImage);      // トップ画像
-                               if ($ret) $this->_db->updateConfig(self::CF_BG_IMAGE, $bgImage);        // 背景画像
-                               if ($ret) $this->_db->updateConfig(self::CF_BBS_GUIDE, $bbsGuide);      // 掲示板規則
-                               if ($ret) $this->_db->updateConfig(self::CF_BOTTOM_MESSAGE, $bottomMessage);    // トップ画面下部メッセージ
-                               if ($ret) $this->_db->updateConfig(self::CF_TEXT_COLOR, $textColor);    // 文字色
-                               if ($ret) $this->_db->updateConfig(self::CF_BG_COLOR, $bgColor);        // 背景色
-                               //if ($ret) $this->_db->updateConfig(self::CF_TITLE_COLOR, $titleColor);        // タイトルカラー
-                               if ($ret) $this->_db->updateConfig(self::CF_MENU_COLOR, $menuColor);    // メニュー背景色
-                               if ($ret) $this->_db->updateConfig(self::CF_THREAD_COLOR, $threadColor);        // スレッド表示部背景色
-                               if ($ret) $this->_db->updateConfig(self::CF_MAKE_THREAD_COLOR, $makeThreadColor);       // スレッド作成部背景色
-                               if ($ret) $this->_db->updateConfig(self::CF_LINK_COLOR, $linkColor);    // リンク色
-                               if ($ret) $this->_db->updateConfig(self::CF_ALINK_COLOR, $alinkColor);  // リンク色(アクティブ)
-                               if ($ret) $this->_db->updateConfig(self::CF_VLINK_COLOR, $vlinkColor);  // リンク色(アクセス済み)
-                               if ($ret) $this->_db->updateConfig(self::CF_SUBJECT_COLOR, $subjectColor);      // 件名文字色
-                               if ($ret) $this->_db->updateConfig(self::CF_NAME_COLOR, $nameColor);    // 投稿者名文字色
-                               if ($ret) $this->_db->updateConfig(self::CF_ERR_MESSAGE_COLOR, $errMessageColor);       // エラーメッセージ文字色
-                               if ($ret) $this->_db->updateConfig(self::CF_SUBJECT_LENGTH, $subjectLength);    // 件名最大長
-                               if ($ret) $this->_db->updateConfig(self::CF_NAME_LENGTH, $nameLength);  // 投稿者名最大長
-                               if ($ret) $this->_db->updateConfig(self::CF_EMAIL_LENGTH, $emailLength);        // emailアドレス最大長
-                               if ($ret) $this->_db->updateConfig(self::CF_MESSAGE_LENGTH, $messageLength);    // 投稿文最大長
-                               if ($ret) $this->_db->updateConfig(self::CF_LINE_LENGTH, $lineLength);  // 投稿文行長
-                               if ($ret) $this->_db->updateConfig(self::CF_LINE_COUNT, $lineCount);    // 投稿文行数
-                               if ($ret) $this->_db->updateConfig(self::CF_RES_ANCHOR_LINK_COUNT, $resAnchorLinkCount);        // レスアンカーリンク数
-                               if ($ret) $this->_db->updateConfig(self::CF_THREAD_COUNT, $threadCount);        // トップ画面のスレッド最大数
-                               if ($ret) $this->_db->updateConfig(self::CF_RES_COUNT, $resCount);      // トップ画面のレス最大数
-                               if ($ret) $this->_db->updateConfig(self::CF_THREAD_RES, $threadRes);    // 投稿可能なレス数の上限
-                               if ($ret) $this->_db->updateConfig(self::CF_MENU_THREAD_COUNT, $menuThreadCount);       // メニューのスレッド最大数
-                               if ($ret) $this->_db->updateConfig(self::CF_NONAME_NAME, $nonameName);  // 名前未設定時の表示名
-                               if ($ret) $this->_db->updateConfig(self::CF_ADMIN_NAME, $adminName);    // サイト運営者名
-                               if ($ret) $this->_db->updateConfig(self::CF_THREAD_END_MESSAGE, $threadEndMessage);             // スレッド終了メッセージ
-                               
-                               if ($ret){
-                                       $this->setMsg(self::MSG_GUIDANCE, 'データを更新しました');
-                                       
-                                       // BBS定義を再読み込み
-                                       $this->_loadConfig();
-                                       $reloadData = true;             // データの再読み込み
-                               } else {
-                                       $this->setMsg(self::MSG_APP_ERR, 'データ更新に失敗しました');
-                               }
-                               $this->gPage->updateParentWindow();// 親ウィンドウを更新
-                       }
-               } else {                // 初期表示の場合
-                       $reloadData = true;             // データの再読み込み
-               }
-               if ($reloadData){
-                       $bbsTitle = $this->_configArray[self::CF_BBS_TITLE];            // 掲示板タイトル
-                       $topLink = $this->_configArray[self::CF_TOP_LINK];                                      // トップ画像のリンク先
-                       $topImage = $this->_configArray[self::CF_TOP_IMAGE];            // トップ画像
-                       $bgImage = $this->_configArray[self::CF_BG_IMAGE];                                      // 背景画像
-                       $bbsGuide = $this->_configArray[self::CF_BBS_GUIDE];    // 掲示板規則
-                       $bottomMessage = $this->_configArray[self::CF_BOTTOM_MESSAGE];  // トップ画面下部メッセージ
-                       if (is_null($bottomMessage)) $bottomMessage = self::DEFAULT_BOTTOM_MESSAGE;
-                       $textColor = $this->_configArray[self::CF_TEXT_COLOR];  // 文字色
-                       $bgColor = $this->_configArray[self::CF_BG_COLOR];      // 背景色
-                       //$titleColor = $this->_configArray[self::CF_TITLE_COLOR];      // タイトルカラー
-                       $menuColor = $this->_configArray[self::CF_MENU_COLOR];  // メニュー背景色
-                       $threadColor = $this->_configArray[self::CF_THREAD_COLOR];      // スレッド表示部背景色
-                       $makeThreadColor = $this->_configArray[self::CF_MAKE_THREAD_COLOR];     // スレッド作成部背景色
-                       $linkColor = $this->_configArray[self::CF_LINK_COLOR];  // リンク色
-                       $alinkColor = $this->_configArray[self::CF_ALINK_COLOR];        // リンク色(アクティブ)
-                       $vlinkColor = $this->_configArray[self::CF_VLINK_COLOR];        // リンク色(アクセス済み)
-                       $subjectColor = $this->_configArray[self::CF_SUBJECT_COLOR];    // 件名文字色
-                       $nameColor = $this->_configArray[self::CF_NAME_COLOR];  // 投稿者名文字色
-                       $errMessageColor = $this->_configArray[self::CF_ERR_MESSAGE_COLOR];     // エラーメッセージ文字色
-                       $subjectLength = $this->_configArray[self::CF_SUBJECT_LENGTH];  // 件名最大長
-                       $nameLength = $this->_configArray[self::CF_NAME_LENGTH];        // 投稿者名最大長
-                       $emailLength = $this->_configArray[self::CF_EMAIL_LENGTH];      // emailアドレス最大長
-                       $messageLength = $this->_configArray[self::CF_MESSAGE_LENGTH];  // 投稿文最大長
-                       $lineLength = $this->_configArray[self::CF_LINE_LENGTH];        // 投稿文行長
-                       $lineCount = $this->_configArray[self::CF_LINE_COUNT];  // 投稿文行数
-                       $resAnchorLinkCount = $this->_configArray[self::CF_RES_ANCHOR_LINK_COUNT];      // レスアンカーリンク数
-                       $threadCount = $this->_configArray[self::CF_THREAD_COUNT];      // トップ画面のスレッド最大数
-                       $resCount = $this->_configArray[self::CF_RES_COUNT];    // トップ画面のレス最大数
-                       $threadRes = $this->_configArray[self::CF_THREAD_RES];  // 投稿可能なレス数の上限
-                       $menuThreadCount = $this->_configArray[self::CF_MENU_THREAD_COUNT];     // メニューのスレッド最大数
-                       $nonameName = $this->_configArray[self::CF_NONAME_NAME];        // 名前未設定時の表示名
-                       $adminName = $this->_configArray[self::CF_ADMIN_NAME];  // サイト運営者名
-                       if (empty($adminName)) $adminName = self::DEFAULT_ADMIN_NAME;
-                       $threadEndMessage = $this->_configArray[self::CF_THREAD_END_MESSAGE];           // スレッド終了メッセージ
-                       if (empty($threadEndMessage)) $threadEndMessage = self::DEFAULT_THREAD_END_MESSAGE;
-                       
-                       // パスの修正
-                       $topImage = str_replace(M3_TAG_START . M3_TAG_MACRO_ROOT_URL . M3_TAG_END, $this->gEnv->getRootUrl(), $topImage);
-                       $bgImage = str_replace(M3_TAG_START . M3_TAG_MACRO_ROOT_URL . M3_TAG_END, $this->gEnv->getRootUrl(), $bgImage);
-               }
-               // 画面に書き戻す
-               $this->tmpl->addVar("_widget", "bbs_title", $bbsTitle);         // 掲示板タイトル
-               $this->tmpl->addVar("_widget", "top_link", $topLink);           // トップ画像のリンク先
-               $this->tmpl->addVar("_widget", "top_image", $topImage);         // トップ画像
-               $this->tmpl->addVar("_widget", "bg_image", $bgImage);           // 背景画像
-               $this->tmpl->addVar("_widget", "bbs_guide", $bbsGuide);         // 掲示板規則
-               $this->tmpl->addVar("_widget", "bottom_message", $bottomMessage);       // トップ画面下部メッセージ
-               $this->tmpl->addVar("_widget", "text_color", $textColor);               // 文字色
-               $this->tmpl->addVar("_widget", "bg_color", $bgColor);           // 背景色
-               //$this->tmpl->addVar("_widget", "title_color", $titleColor);           // タイトルカラー
-               $this->tmpl->addVar("_widget", "menu_color", $menuColor);               // メニュー背景色
-               $this->tmpl->addVar("_widget", "thread_color", $threadColor);           // スレッド表示部背景色
-               $this->tmpl->addVar("_widget", "makethread_color", $makeThreadColor);           // スレッド作成部背景色
-               $this->tmpl->addVar("_widget", "link_color", $linkColor);       // リンク色
-               $this->tmpl->addVar("_widget", "alink_color", $alinkColor);     // リンク色(アクティブ)
-               $this->tmpl->addVar("_widget", "vlink_color", $vlinkColor);     // リンク色(アクセス済み)
-               $this->tmpl->addVar("_widget", "subject_color", $subjectColor); // 件名文字色
-               $this->tmpl->addVar("_widget", "name_color", $nameColor);       // 投稿者名文字色
-               $this->tmpl->addVar("_widget", "err_message_color", $errMessageColor);  // エラーメッセージ文字色
-               $this->tmpl->addVar("_widget", "subject_length", $subjectLength);       // 件名最大長
-               $this->tmpl->addVar("_widget", "name_length", $nameLength);     // 投稿者名最大長
-               $this->tmpl->addVar("_widget", "email_length", $emailLength);   // emailアドレス最大長
-               $this->tmpl->addVar("_widget", "message_length", $messageLength);       // 投稿文最大長
-               $this->tmpl->addVar("_widget", "line_length", $lineLength);     // 投稿文行長
-               $this->tmpl->addVar("_widget", "line_count", $lineCount);       // 投稿文行数
-               $this->tmpl->addVar("_widget", "res_anchor_link_count", $resAnchorLinkCount);   // レスアンカーリンク数
-               $this->tmpl->addVar("_widget", "thread_count", $threadCount);   // トップ画面のスレッド最大数
-               $this->tmpl->addVar("_widget", "res_count", $resCount); // トップ画面のレス最大数
-               $this->tmpl->addVar("_widget", "thread_res", $threadRes);       // 投稿可能なレス数の上限
-               $this->tmpl->addVar("_widget", "menu_thread_count", $menuThreadCount);  // メニューのスレッド最大数
-               $this->tmpl->addVar("_widget", "noname_name", $nonameName);     // 名前未設定時の表示名
-               $this->tmpl->addVar("_widget", "admin_name", $adminName);       // サイト運営者名
-               $this->tmpl->addVar("_widget", "thread_end_message", $threadEndMessage);                // スレッド終了メッセージ
-       }
-}
-?>
diff --git a/widgets/m/bbs_2ch/include/container/admin_m_bbs_2chWidgetContainer.php b/widgets/m/bbs_2ch/include/container/admin_m_bbs_2chWidgetContainer.php
deleted file mode 100644 (file)
index 6901929..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2011 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: admin_m_bbs_2chWidgetContainer.php 4037 2011-03-19 13:54:56Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getCurrentWidgetContainerPath() . '/admin_m_bbs_2chBaseWidgetContainer.php');
-
-class admin_m_bbs_2chWidgetContainer extends admin_m_bbs_2chBaseWidgetContainer
-{
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * ディスパッチ処理(メインコンテナのみ実行)
-        *
-     * HTTPリクエストの内容を見て処理をコンテナに振り分ける
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return bool                                                 このクラスの_setTemplate(), _assign()へ処理を継続するかどうかを返す。
-        *                                      true=処理を継続、false=処理を終了
-        */
-       function _dispatch($request, &$param)
-       {
-               // 表示画面を決定
-               $task = $request->trimValueOf(M3_REQUEST_PARAM_OPERATION_TASK);
-               if (empty($task)) $task = self::DEFAULT_TOP_PAGE;
-               
-               // コンテナを起動
-               $goWidget = false;              // サブウィジェットを実行するかどうか
-               switch ($task){
-                       case 'other':           // その他設定
-                               $goWidget = true;               // サブウィジェットを実行するかどうか
-                               break;
-                       default:
-                               break;
-               }
-               if ($goWidget){         // サブウィジェットを実行するかどうか
-                       $this->gLaunch->goSubWidget($task, true);               // 管理者機能で呼び出し
-                       return false;
-               } else {
-                       $this->SetMsg(self::MSG_APP_ERR, "画面が見つかりません");
-                       return true;
-               }
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'message.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @return                                                              なし
-        */
-       function _assign($request, &$param)
-       {
-       }
-}
-?>
diff --git a/widgets/m/bbs_2ch/include/container/m_bbs_2chBaseWidgetContainer.php b/widgets/m/bbs_2ch/include/container/m_bbs_2chBaseWidgetContainer.php
deleted file mode 100644 (file)
index 36bbb4a..0000000
+++ /dev/null
@@ -1,327 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2011 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_bbs_2chBaseWidgetContainer.php 4037 2011-03-19 13:54:56Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseMobileWidgetContainer.php');
-require_once($gEnvManager->getCurrentWidgetDbPath() . '/bbs_2chDb.php');
-
-class m_bbs_2chBaseWidgetContainer extends BaseMobileWidgetContainer
-{
-       protected $_db;                 // DB接続オブジェクト
-       protected $_configArray;                // BBS定義値
-       protected $_headCss;    // CSS定義
-       protected $_boardId;    // 掲示板ID
-       protected $_currentPageUrl;     // 現在のページのURL
-//     protected $_postUrl;            // POST用のURL
-       protected $_autolink;           // リンクを自動作成
-       protected $_spacer;             // スペーサ
-       const SPACER_FORMAT = '<div style="background-color:#aaaaaa;margin:1px 0;height:1px;"><img src="%s/images/system/spacer.gif" width="1" height="1" /></div>';            // スペーサフォーマット
-       const MACRO_RES_MAX_NO = 'RES_MAX_NO';          // レス上限数マクロ
-       const DEFAULT_BBS_ID = 'board1';                // デフォルトの掲示板ID
-       const DEFAULT_LAST_MESSAGE_COUNT = 50;  // メッセージ取得用デフォルトの最新メッセージ数
-       const DEFAULT_MESSAGE_COUNT_PER_PAGE = 100;     // メッセージ取得用デフォルトの1ページあたりメッセージ数
-       const DEFAULT_BOTTOM_MESSAGE = '<center><b>どのような形の削除依頼であれ公開させていただきます。</b></center>';                // デフォルトのトップ画面下部メッセージ
-       const DEFAULT_THREAD_END_MESSAGE = "このスレッドは[#RES_MAX_NO#]を超えました。\r\nもう書けないので、新しいスレッドを立ててくださいです。。。";               // デフォルトのレス上限メッセージ
-       const DEFAULT_EMAIL_NOT_UPDATE = 'sage';                // スレッドの日付更新を行わないEmailアドレス
-       const DEFAULT_ADMIN_NAME = 'サイト運営者';                                // サイト運営者名
-       const CF_BBS_TITLE = 'title';                   // 掲示板タイトル
-       const CF_TITLE_COLOR = 'title_color';   // タイトルカラー
-       const CF_TOP_LINK = 'top_link';         // トップ画像のリンク先
-       const CF_TOP_IMAGE = 'top_image';               // トップ画像
-       const CF_BBS_GUIDE = 'bbs_guide';               // 掲示板規則
-       const CF_BOTTOM_MESSAGE = 'bottom_message';             // トップ画面下部メッセージ
-       const CF_THREAD_END_MESSAGE = 'thread_end_message';             // レス上限メッセージ
-       const CF_BG_IMAGE = 'bg_image';         // 背景画像
-       const CF_BG_COLOR = 'bg_color';         // 背景色
-       const CF_TEXT_COLOR = 'text_color';             // 文字色
-       const CF_MENU_COLOR = 'menu_color';             // メニュー背景色
-       const CF_MAKE_THREAD_COLOR = 'makethread_color';                // スレッド作成部背景色
-       const CF_THREAD_COLOR = 'thread_color';         // スレッド表示部背景色
-       const CF_LINK_COLOR = 'link_color';             // リンク色
-       const CF_ALINK_COLOR = 'alink_color';           // リンク色
-       const CF_VLINK_COLOR = 'vlink_color';           // リンク色
-       const CF_NAME_COLOR = 'name_color';                     // 投稿者名文字色
-       const CF_FILE_UPLOAD = 'file_upload';           // ファイルアップロード許可
-       const CF_SUBJECT_LENGTH = 'subject_length';             // 件名最大長
-       const CF_NAME_LENGTH = 'name_length';           // 投稿者名最大長
-       const CF_EMAIL_LENGTH = 'email_length';         // emailアドレス最大長
-       const CF_MESSAGE_LENGTH = 'message_length';     // 最大メッセージ長
-       const CF_ERR_MESSAGE_COLOR = 'err_message_color';               // エラーメッセージ文字色
-       const CF_SUBJECT_COLOR = 'subject_color';               // 件名文字色
-       const CF_LINE_LENGTH = 'line_length';           // 投稿文行長
-       const CF_LINE_COUNT = 'line_count';                     // 投稿文行数
-       const CF_RES_ANCHOR_LINK_COUNT = 'res_anchor_link_count';               // レスアンカーリンク数
-       const CF_THREAD_COUNT = 'thread_count';         // トップ画面に表示するスレッド最大数
-       const CF_RES_COUNT = 'res_count';               // トップ画面に表示するレス最大数
-       const CF_THREAD_RES = 'thread_res';             // 1スレッドに投稿できるレス番号の上限
-       const CF_MENU_THREAD_COUNT = 'menu_thread_count';       // メニューに表示するスレッド最大数
-       const CF_SHOW_EMAIL = 'show_email';             // Eメールアドレスを表示
-       const CF_AUTOLINK = 'autolink';                 // 自動的にリンクを作成
-       const CF_NONAME_NAME = 'noname_name';                           // 名前未設定時の表示名
-       const CF_ADMIN_NAME = 'admin_name';                             // サイト運営者名
-       // 画面
-       const TASK_TOP = 'top';                 // トップ画面
-       const TASK_SUBJECT = 'subject';                 // スレッド件名
-       const TASK_THREAD = 'thread';                   // スレッド処理
-       const TASK_NEW_THREAD = 'newthread';            // スレッド新規作成
-       const TASK_READ_THREAD = 'read';                // スレッド表示
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-               
-               // DBオブジェクト作成
-               $this->_db = new bbs_2chDb();
-               
-               // BBS定義を読み込む
-               $this->_loadConfig();
-               
-               $this->_boardId = self::DEFAULT_BBS_ID;
-               //$this->_currentPageUrl = $this->gEnv->createCurrentPageUrl(); // 現在のページのURL
-               $this->_currentPageUrl = $this->gEnv->createCurrentPageUrlForMobile();  // 現在のページのURL
-//             $this->_postUrl = $this->gEnv->getCurrentRequestUri();          // POST用のURL
-               $this->_autolink = $this->_configArray[self::CF_AUTOLINK];              // リンクを自動作成
-               $this->_spacer = sprintf(self::SPACER_FORMAT, $this->getUrl($this->gEnv->getRootUrl()));// スペーサ作成
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @return                                                              なし
-        */
-       function _postAssign($request, &$param)
-       {
-               // トップ画像
-               $titleColor = $this->_configArray[self::CF_TITLE_COLOR];        // タイトルカラー
-               $topImage = $this->_configArray[self::CF_TOP_IMAGE];
-               if (!empty($topImage)){
-                       $topLink = $this->convertUrlToHtmlEntity($this->_configArray[self::CF_TOP_LINK]);               // トップ画像のリンク先
-                       
-                       // パスの修正
-                       $pos = strpos($topImage, '/');
-                       if ($pos === false){            // ファイル名だけのとき
-                               $topImage = $this->gEnv->getCurrentWidgetImagesUrl() . '/' . $topImage;
-                       } else {
-                               $topImage = str_replace(M3_TAG_START . M3_TAG_MACRO_ROOT_URL . M3_TAG_END, $this->gEnv->getRootUrl(), $topImage);
-                       }
-                       $topImage = '<img src="' . $topImage . '" border="0" />';
-                       if (!empty($topLink)) $topImage = '<a href="' . $topLink . '">' . $topImage . '</a>';
-               }
-               $this->tmpl->addVar("_widget", "top_image", $topImage);         // トップ画像
-               
-               // 掲示板タイトル、説明
-               $title = $this->_configArray[self::CF_BBS_TITLE];                       // 掲示板タイトル
-               $this->tmpl->addVar("_widget", "bbs_title", $this->convertToDispString($title));
-               $this->tmpl->addVar("_widget", "guide", $this->_configArray[self::CF_BBS_GUIDE]);
-               
-               // 共通のスタイル
-               $bbsStyle = '';
-/*             $bgImage = $this->_configArray[self::CF_BG_IMAGE];
-               $pos = strpos($bgImage, '/');
-               if ($pos === false){            // ファイル名だけのとき
-                       $bgImage = $this->gEnv->getCurrentWidgetImagesUrl() . '/' . $bgImage;
-               } else {
-                       $bgImage = str_replace(M3_TAG_START . M3_TAG_MACRO_ROOT_URL . M3_TAG_END, $this->gEnv->getRootUrl(), $bgImage);
-               }*/
-               $bgColor = $this->_configArray[self::CF_BG_COLOR];
-               $textColor = $this->_configArray[self::CF_TEXT_COLOR];          // 文字色
-//             $bbsStyle .= 'background-image:url(' . $bgImage . ');';
-               $bbsStyle .= 'background-color:' . $bgColor . ';';
-               $bbsStyle .= 'color:' . $textColor . ';';
-               $this->tmpl->addVar("_widget", "bbs_style", $bbsStyle);
-               
-               $menuColor = $this->_configArray[self::CF_MENU_COLOR];          // メニュー背景色
-               $menuStyle .= 'background-color:' . $menuColor . ';';
-               $this->tmpl->addVar("_widget", "menu_style", $menuStyle);
-               
-               // メッセージカラーを設定
-               if ($this->getMsgCount(1) > 0 || $this->getMsgCount(2) > 0){            // エラーメッセージが出力されているとき
-                       $errMessageColor = $this->_configArray[self::CF_ERR_MESSAGE_COLOR];             // エラーメッセージ色
-                       if (!empty($errMessageColor)){
-                               $errMessageStyle .= 'color:' . $errMessageColor . ';';
-                               $attr = 'style="' . $errMessageStyle . '"';
-                               $this->setMessageAttr($attr);
-                       }
-               }
-               
-               // 追加CSSを作成
-               $cssId = $this->gEnv->getCurrentWidgetId() . '_0';
-               $this->_headCss .= '#' . $cssId . ' a {text-decoration:underline;}' . M3_NL;
-               $this->_headCss .= '#' . $cssId . ' a:link {color:' . $this->_configArray[self::CF_LINK_COLOR] . ';}' . M3_NL;
-               $this->_headCss .= '#' . $cssId . ' a:active {color:' . $this->_configArray[self::CF_ALINK_COLOR] . ';}' . M3_NL;
-               //$this->_headCss .= '#' . $cssId . ' a:hover {color:' . $this->_configArray[self::CF_VLINK_COLOR] . ';}' . M3_NL;
-               $this->_headCss .= '#' . $cssId . ' a:visited {color:' . $this->_configArray[self::CF_VLINK_COLOR] . ';}' . M3_NL;
-               $this->tmpl->addVar("_widget", "css_id",        $cssId);        // CSS用ID
-               
-               // 遷移先を設定
-               $this->tmpl->addVar("_widget", "bbs_url", $this->convertUrlToHtmlEntity($this->getUrl($this->gEnv->createCurrentPageUrl(), true)));
-               $this->tmpl->addVar("_widget", "subject_url",   $this->convertUrlToHtmlEntity($this->getUrl($this->gEnv->createCurrentPageUrl() . '&task=' . self::TASK_SUBJECT, true)));       // スレッド件名
-               $this->tmpl->addVar("_widget", "newthread_url", $this->convertUrlToHtmlEntity($this->getUrl($this->gEnv->createCurrentPageUrl() . '&task=' . self::TASK_NEW_THREAD, true)));    // 新規スレッド作成
-       }
-       /**
-        * CSSデータをHTMLヘッダ部に設定
-        *
-        * CSSデータをHTMLのheadタグ内に追加出力する。
-        * _assign()よりも後に実行される。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。
-        * @return string                                               CSS文字列。出力しない場合は空文字列を設定。
-        */
-       function _addCssToHead($request, &$param)
-       {
-               return $this->_headCss;
-       }
-       /**
-        * BBS定義値をDBから取得
-        *
-        * @return bool                 true=取得成功、false=取得失敗
-        */
-       function _loadConfig()
-       {
-               $this->_configArray = array();
-
-               // BBS定義を読み込み
-               $ret = $this->_db->getAllConfig($rows);
-               if ($ret){
-                       // 取得データを連想配列にする
-                       $configCount = count($rows);
-                       for ($i = 0; $i < $configCount; $i++){
-                               $key = $rows[$i]['tg_id'];
-                               $value = $rows[$i]['tg_value'];
-                               $this->_configArray[$key] = $value;
-                       }
-               }
-               return $ret;
-       }
-       /**
-        * 投稿文入力データのエラーチェック
-        *
-        * @param string $boardId               掲示板ID
-        * @param string $threadId              スレッドID(-1のときチェックなし)
-        * @param string $name                  ユーザ名
-        * @param string $email                 Eメールアドレス
-        * @param string $message               投稿文
-        * @return bool                                 true=正常終了、false=異常終了
-        */
-       function checkMessageInput($boardId, $threadId, $name, $email, $message)
-       {
-               // 入力チェック
-               if ($threadId != -1) $this->checkInput($threadId, 'スレッドID');
-               $this->checkInput($message, '本文', 'ERROR:本文がありません!');
-               
-               if ($this->getMsgCount() == 0){
-                       // スレッドIDが正しいかチェック
-                       if ($threadId != -1){
-                               $ret = $this->_db->getThreadInfo($boardId, $threadId, $row);
-                               if ($ret){
-                                       // レス可能かチェック
-                                       $resCount = $this->_configArray[self::CF_THREAD_RES];
-                                       if ($row['th_message_count'] >= $resCount){
-                                               $this->setUserErrorMsg('このスレッドは' . $resCount . 'を超えました。<br /> もう書けないので、新しいスレッドを立ててくださいです。。。');
-                                       }
-                       
-                               // 書き込み可能かチェック
-               /*#.datが存在してないか書けないならばいばい
-       if (!is_writable($DATAFILE)) DispError("ERROR!","ERROR:このスレッドには書けません!");*/
-                               } else {
-                                       $this->setUserErrorMsg('ERROR:スレッドIDが不正です!');
-                               }
-                       }
-                       
-                       // 本文の文字数を取得
-                       if (function_exists('mb_strlen')){
-                               $length = mb_strlen($message);
-                       } else {
-                               $length = strlen($message);
-                       }
-                       if ($length > $this->_configArray[self::CF_MESSAGE_LENGTH]){
-                               $this->setUserErrorMsg('ERROR:本文が長すぎます!(最大文字数' . $this->_configArray[self::CF_MESSAGE_LENGTH] . ')');
-                       } else {
-                               // 行数のチェック
-                               $lines = preg_split("/(\015\012)|(\015)|(\012)/", $message);
-                               if (count($lines) > $this->_configArray[self::CF_LINE_COUNT]) $this->setUserErrorMsg('ERROR:改行が多すぎます!');
-                               
-                               // 1行の長さのチェック
-                               $maxLineLength = $this->_configArray[self::CF_LINE_LENGTH];
-                               foreach ($lines as $line) {
-                                       // 文字数を取得
-                                       if (function_exists('mb_strlen')){
-                                               $length = mb_strlen($line);
-                                       } else {
-                                               $length = strlen($line);
-                                       }
-                                       if ($length > $maxLineLength){
-                                               $this->setUserErrorMsg('ERROR:長すぎる行があります!(最大文字数' . $maxLineLength . ')');
-                                               break;
-                                       }
-                               }
-                               
-                               // レスアンカーリンク数チェック
-                               if (preg_match_all("/>>[0-9]/", $message, $matches) > $this->_configArray[self::CF_RES_ANCHOR_LINK_COUNT]) $this->setUserErrorMsg('レスアンカーリンクが多すぎます!');
-                       }
-
-                       // 名前
-                       if (function_exists('mb_strlen')){
-                               $length = mb_strlen($name);
-                       } else {
-                               $length = strlen($name);
-                       }
-                       if ($length > $this->_configArray[self::CF_NAME_LENGTH]) $this->setUserErrorMsg('ERROR:名前が長すぎます!(最大文字数' . $this->_configArray[self::CF_NAME_LENGTH] . ')');
-                       
-                       // メールアドレス
-                       if (function_exists('mb_strlen')){
-                               $length = mb_strlen($email);
-                       } else {
-                               $length = strlen($email);
-                       }
-                       if ($length > $this->_configArray[self::CF_EMAIL_LENGTH]) $this->setUserErrorMsg('ERROR:メールアドレスが長すぎます!(最大文字数' . $this->_configArray[self::CF_EMAIL_LENGTH] . ')');
-               }
-               if ($this->getMsgCount() == 0){
-                       return true;
-               } else {
-                       return false;
-               }
-       }
-       /**
-        * メッセージを表示用に変換
-        *
-        * @param string $message               変換元メッセージ
-        * @param string $threadId              スレッドID
-        * @return string                               変換後メッセージ
-        */
-       function convDispMessage($message, $threadId)
-       {
-               // リンク変換
-               if (!empty($this->_autolink)){          // 自動リンク作成のとき
-                       $message = preg_replace("/(https?):\/\/([\w;\/\?:\@&=\+\$,\-\.!~\*'\(\)%#]+)/", "<a href=\"$1://$2\" target=\"_blank\">$1://$2</a>", $message);
-               
-                       // メッセージへのリンク
-                       $baseUrl = $this->convertUrlToHtmlEntity($this->getUrl($this->_currentPageUrl . '&' . M3_REQUEST_PARAM_BBS_THREAD_ID . '=' . $threadId, true));
-                       $messageUrl = $baseUrl . $this->convertUrlToHtmlEntity('&' . M3_REQUEST_PARAM_ITEM_NO . '=');
-                       $messageListUrl = $baseUrl . $this->convertUrlToHtmlEntity('&' . M3_REQUEST_PARAM_LIST_NO . '=');
-                       $message = preg_replace("/&gt;&gt;([0-9]+)(?![-\d])/", '<a href="' . $messageUrl . '$1" target="_blank">&gt;&gt;$1</a>', $message);
-                       $message = preg_replace("/&gt;&gt;([0-9]+)\-([0-9]+)/", '<a href="' . $messageListUrl . '$1-$2" target="_blank">&gt;&gt;$1-$2</a>', $message);
-               }
-               return $message;
-       }
-}
-?>
diff --git a/widgets/m/bbs_2ch/include/container/m_bbs_2chReadWidgetContainer.php b/widgets/m/bbs_2ch/include/container/m_bbs_2chReadWidgetContainer.php
deleted file mode 100644 (file)
index fc07090..0000000
+++ /dev/null
@@ -1,250 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2011 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_bbs_2chReadWidgetContainer.php 4039 2011-03-21 05:37:18Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getCurrentWidgetContainerPath() .   '/m_bbs_2chBaseWidgetContainer.php');
-
-class m_bbs_2chReadWidgetContainer extends m_bbs_2chBaseWidgetContainer
-{
-       private $threadStyle;   // スレッド部表示スタイル
-       private $subjectColor;  // 件名文字色
-       private $nameColor;             // 登録者名文字色
-       private $createEmailLink;       // Eメールのリンクを作成するかどうか
-       private $isExistsMessage;       // メッセージが存在するかどうか
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'thread.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $act = $request->trimValueOf('act');
-               $postTicket = $request->trimValueOf('ticket');          // POST確認用
-               $threadId = $request->trimValueOf(M3_REQUEST_PARAM_BBS_THREAD_ID);      // スレッドID
-               $list = $request->trimValueOf(M3_REQUEST_PARAM_LIST_NO);                        // 取得メッセージ
-               $no = intval($request->trimValueOf(M3_REQUEST_PARAM_ITEM_NO));                          // 取得メッセージ
-               $message = $request->mobileTrimValueOf('bbs_message');// 投稿メッセージ
-               $name = $request->mobileTrimValueOf('bbs_name');// 名前
-               $email = $request->trimValueOf('bbs_email');// Eメールアドレス
-               
-               if ($act == 'add'){             // 投稿追加のとき
-                       if (!empty($postTicket) && $postTicket == $request->getSessionValue(M3_SESSION_POST_TICKET)){           // 正常なPOST値のとき
-                               // 入力項目のエラーチェック
-                               $this->checkMessageInput($this->_boardId, $threadId, $name, $email, $message);
-                       
-                               // エラーなしの場合は、データを更新
-                               if ($this->getMsgCount() == 0){
-                                       // 新規投稿文の追加
-                                       if (strcasecmp($email, self::DEFAULT_EMAIL_NOT_UPDATE) == 0){           // 日付更新を行わないとき
-                                               $updateDt = false;
-                                       } else {
-                                               $updateDt = true;               // 日付を更新
-                                       }
-                                       $ret = $this->_db->addMessage($this->_boardId, $threadId, $name, $email, $message, $updateDt, $newSerial);
-
-                                       if ($ret){              // データ追加成功のとき
-                                               //$this->setMsg(self::MSG_GUIDANCE, 'スレッドを作成しました');
-                                               $this->setMsg(self::MSG_GUIDANCE, '書きこみが終わりました。');
-                                       
-                                               // 入力項目を使用不可に設定
-                                               $this->tmpl->addVar("thread_area", "name_disabled", 'disabled ');
-                                               $this->tmpl->addVar("thread_area", "email_disabled", 'disabled ');
-                                               $this->tmpl->addVar("thread_area", "message_disabled", 'disabled ');
-                                               $this->tmpl->addVar("thread_area", "button_disabled", 'disabled ');
-                                               
-                                               // スレッドが最大数に達したときはメッセージを追加
-                                               $ret = $this->_db->getThreadInfo($this->_boardId, $threadId, $row);
-                                               if ($ret){
-                                                       $resCount = $this->_configArray[self::CF_THREAD_RES];
-                                                       if ($row['th_message_count'] >= $resCount){
-                                                               $adminName = $this->_configArray[self::CF_ADMIN_NAME];  // サイト運営者名
-                                                               if (empty($adminName)) $adminName = self::DEFAULT_ADMIN_NAME;
-                                                               $overMessage = $this->_configArray[self::CF_THREAD_END_MESSAGE];        // デフォルトのレス上限メッセージ
-                                                               if (empty($overMessage)) $overMessage = self::DEFAULT_THREAD_END_MESSAGE;
-                                                               $overMessage = str_replace(M3_TAG_START . self::MACRO_RES_MAX_NO . M3_TAG_END, $resCount, $overMessage);// レス上限数を埋め込む
-                                                               $ret = $this->_db->addMessage($this->_boardId, $threadId, $adminName, ''/*Eメール*/, $overMessage, $updateDt, $newSerial);
-                                                       }
-                                               }
-                                       } else {
-                                               //$this->setMsg(self::MSG_APP_ERR, 'スレッドを作成に失敗しました');
-                                               $this->setMsg(self::MSG_APP_ERR, '書きこみに失敗しました。');
-                                       }
-                               } else {
-                                       // 入力データを再設定
-                                       $this->tmpl->addVar("thread_area", "bbs_name", $this->convertToDispString($name));
-                                       $this->tmpl->addVar("thread_area", "bbs_email", $this->convertToDispString($email));
-                                       $this->tmpl->addVar("thread_area", "bbs_message", $this->convertToDispString($message));
-                               }
-                       } else {
-                               $this->setMsg(self::MSG_APP_ERR, '不正な投稿により、書きこみに失敗しました。');
-                       }
-                       $request->unsetSessionValue(M3_SESSION_POST_TICKET);            // セッション値をクリア
-               }
-               
-               // 表示スタイル作成
-               $this->createEmailLink = $this->_configArray[self::CF_SHOW_EMAIL];              // Eメールのリンクを作成するかどうか
-               $threadColor = $this->_configArray[self::CF_THREAD_COLOR];              // スレッド表示部背景色
-               $this->threadStyle .= 'background-color:' . $threadColor . ';';
-               $this->subjectColor = $this->_configArray[self::CF_SUBJECT_COLOR];              // 件名文字色
-               $this->nameColor = $this->_configArray[self::CF_NAME_COLOR];            // 登録者名文字色
-               
-               // スレッドIDが正しいかチェック
-               $ret = $this->_db->getThreadInfo($this->_boardId, $threadId, $row);
-               if ($ret){
-                       $offset = 0;            // データ取得開始位置
-                       $limit = 0;             // 取得数、すべて取得
-                       
-                       // 表示範囲を取得
-                       if (empty($list) && !empty($no)){               // メッセージNoで取得のとき
-                               $offset = $no -1;
-                               if ($offset < 0) $offset = 0;
-                               $limit = 1;
-                       } else {                // 一覧で取得のとき
-                               if (strStartsWith($list, 'l')){         // 最新から取得の場合
-                                       $messageCount = intval(substr($list, 1));
-                                       if ($messageCount <= 0) $messageCount = 1;
-                                       $offset = $row['th_message_count'] - $messageCount;
-                                       if ($offset < 0) $offset = 0;
-                                       $limit = $messageCount;
-                               }
-                       }
-                       // 投稿文を作成
-                       $this->_db->getThreadMessageByRange(array($this, 'itemsLoop'), $this->_boardId, $threadId, $limit, $offset);
-                       
-                       // リンク作成
-                       $threadUrl = $this->_currentPageUrl . '&' . M3_REQUEST_PARAM_BBS_THREAD_ID . '=' . $threadId;
-                       $threadNewUrl = $this->_currentPageUrl . '&' . M3_REQUEST_PARAM_BBS_THREAD_ID . '=' . $threadId . '&' . M3_REQUEST_PARAM_LIST_NO . '=l1';
-                       $thread50Url = $this->_currentPageUrl . '&' . M3_REQUEST_PARAM_BBS_THREAD_ID . '=' . $threadId . '&' . M3_REQUEST_PARAM_LIST_NO . '=l' . self::DEFAULT_LAST_MESSAGE_COUNT;
-                       $thread100Url = $this->_currentPageUrl . '&' . M3_REQUEST_PARAM_BBS_THREAD_ID . '=' . $threadId . '&' . M3_REQUEST_PARAM_LIST_NO . '=' . self::DEFAULT_MESSAGE_COUNT_PER_PAGE;
-                       $reloadUrl = $this->_currentPageUrl;
-                       
-                       // 画面にデータを埋め込む
-                       $this->tmpl->addVar("thread_area", "bbs_url", $this->convertUrlToHtmlEntity($this->getUrl($this->gEnv->createCurrentPageUrl(), true)));
-                       $this->tmpl->addVar("thread_area", "thread_url", $this->convertUrlToHtmlEntity($this->getUrl($threadUrl, true)));// スレッド全表示URL
-                       $this->tmpl->addVar("thread_area", "threadNew_url", $this->convertUrlToHtmlEntity($this->getUrl($threadNewUrl, true)));// スレッド最新表示URL
-                       $this->tmpl->addVar("thread_area", "thread50_url", $this->convertUrlToHtmlEntity($this->getUrl($thread50Url, true)));// スレッド最新50表示URL
-                       $this->tmpl->addVar("thread_area", "thread100_url", $this->convertUrlToHtmlEntity($this->getUrl($thread100Url, true)));// スレッド100まで表示URL
-                       $this->tmpl->addVar("thread_area", "reload_url", $this->convertUrlToHtmlEntity($this->getUrl($reloadUrl, true)));// 画面再表示
-                       $this->tmpl->addVar("thread_area", "thread_id", $threadId);
-                       $this->tmpl->addVar("thread_area", "subject", $this->convertToDispString($row['th_subject']));                          // スレッド件名
-                       $this->tmpl->addVar("thread_area", "subject_color", $this->subjectColor);               // 件名表示色
-                       
-                       // スレッドが存在しないときはタグを非表示にする
-                       if (!$this->isExistsMessage){
-                               $this->setUserErrorMsg('ERROR:メッセージが存在しません!');
-                               
-                               $this->tmpl->setAttribute('message_list', 'visibility', 'hidden');
-                       }
-                       // ハッシュキー作成
-                       $postTicket = md5(time() . $this->gAccess->getAccessLogSerialNo());
-                       $request->setSessionValue(M3_SESSION_POST_TICKET, $postTicket);         // セッションに保存
-                       $this->tmpl->addVar("thread_area", "ticket", $postTicket);                              // 画面に書き出し
-               } else {
-                       $this->setUserErrorMsg('ERROR:スレッドIDが不正です!');
-                       
-                       // スレッド表示部を非表示にする
-                       $this->tmpl->setAttribute('thread_area', 'visibility', 'hidden');
-               }
-
-               // 送信先
-               $this->tmpl->addVar("thread_area", "post_url", $this->_currentPageUrl);
-               
-               // 画面にデータを埋め込む
-               $this->tmpl->addVar("thread_area", "thread_style", $this->threadStyle);
-       }
-       /**
-        * 取得したコンテンツ項目をテンプレートに設定する
-        *
-        * @param int           $index                  行番号
-        * @param array         $fetchedRow             取得行
-        * @param object        $param                  任意使用パラメータ
-        * @return bool                                         trueを返すとループ続行。falseを返すとその時点で終了。
-        */
-       function itemsLoop($index, $fetchedRow)
-       {
-               $no = $fetchedRow['te_index'];                  // メッセージインデックス番号
-               
-               // ##### メッセージ部分を作成 #####
-               // 登録者名作成
-               $name = $this->convertToDispString($fetchedRow['te_user_name']);                // ユーザ名
-               if (empty($name)) $name = $this->_configArray[self::CF_NONAME_NAME];                            // 名前未設定時の表示名
-               $email = $this->convertToDispString($fetchedRow['te_email']);                   // Eメール
-               if (!empty($email) && !empty($this->createEmailLink)){                  // Eメールリンク作成のとき
-                       $name = '<a href="mailto:' . $email . '">' . $name . '</a>';
-               } else {
-                       $name = '<span style="color:' . $this->nameColor . ';">' . $name . '</span>';
-               }
-               
-               // 日付作成
-               $weekDay = array('日', '月', '火', '水', '木', '金', '土');
-               $timestamp = strtotime($fetchedRow['te_regist_dt']);
-               $weekNo = intval(date('w', $timestamp));
-               $date = date('Y/m/d(' . $weekDay[$weekNo] . ') H:i:s', $timestamp);
-               
-               // 投稿文
-               $message = $this->convertToDispString($fetchedRow['te_message']);// 文字エスケープ処理
-               $message = $this->convertToPreviewText($message);                       // 改行をBRタグに変換
-               if ($fetchedRow['te_index'] == 1) $message .= '<br />';         // トップのメッセージは改行を追加
-               
-               // メッセージ変換
-               $message = $this->convDispMessage($message, $fetchedRow['te_thread_id']);
-               
-               // 削除メッセージのとき
-               if ($fetchedRow['te_deleted']){
-                       $name = '参照不可';
-                       $message = '参照できません。';
-               }
-               
-               $row = array(
-                       'no'            => $no,         // メッセージインデックス番号
-                       'name'          => $name,       // 投稿者名
-                       'date'          => $date,       // 投稿日付
-                       'message'               => $message             // 投稿文
-               );
-               $this->tmpl->addVars('message_list', $row);
-               $this->tmpl->parseTemplate('message_list', 'a');
-               
-               // メッセージが存在するかどうか
-               $this->isExistsMessage = true;
-               return true;
-       }
-}
-?>
diff --git a/widgets/m/bbs_2ch/include/container/m_bbs_2chSubjectWidgetContainer.php b/widgets/m/bbs_2ch/include/container/m_bbs_2chSubjectWidgetContainer.php
deleted file mode 100644 (file)
index d427d72..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2011 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_bbs_2chSubjectWidgetContainer.php 4033 2011-03-18 01:43:53Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getCurrentWidgetContainerPath() .   '/m_bbs_2chBaseWidgetContainer.php');
-
-class m_bbs_2chSubjectWidgetContainer extends m_bbs_2chBaseWidgetContainer
-{
-       private $isExistsThread;        // スレッドが存在するかどうか
-               
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'subject.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               // 検索キーワードを取得
-               $keyword = $request->trimValueOf(M3_REQUEST_PARAM_KEYWORD);
-                       
-               // スレッドメニュー作成
-               if (empty($keyword)){
-                       $this->_db->getThread(array($this, 'itemsLoop'), $this->_boardId, -1/*すべて取得*/);
-               } else {
-                       $this->_db->getThreadByKeyword(array($this, 'itemsLoop'), $this->_boardId, -1/*すべて取得*/, $keyword);
-               }
-               
-               // スレッドが存在しないときはタグを非表示にする
-               if (!$this->isExistsThread) $this->tmpl->setAttribute('itemlist', 'visibility', 'hidden');
-       }
-       /**
-        * 取得したコンテンツ項目をテンプレートに設定する
-        *
-        * @param int           $index                  行番号
-        * @param array         $fetchedRow             取得行
-        * @param object        $param                  任意使用パラメータ
-        * @return bool                                         trueを返すとループ続行。falseを返すとその時点で終了。
-        */
-       function itemsLoop($index, $fetchedRow)
-       {
-               // トップ画面に表示するスレッド最大数
-               $threadId = $fetchedRow['th_id'];
-               $no = $index + 1;
-               $subject = $fetchedRow['th_subject'] . '(' . $fetchedRow['th_message_count'] . ')';
-               $url = $this->_currentPageUrl . '&' . M3_REQUEST_PARAM_BBS_THREAD_ID . '=' . $threadId;
-               
-               $row = array(
-                       'no' => $no,                                                                                    // インデックス番号
-                       'url' => $this->convertUrlToHtmlEntity($this->getUrl($url, true)),                                                                                      // スレッド画面へのリンク
-                       'subject' => $this->convertToDispString($subject)               // スレッド件名
-               );
-               $this->tmpl->addVars('itemlist', $row);
-               $this->tmpl->parseTemplate('itemlist', 'a');
-               
-               $this->isExistsThread = true;   // スレッドが存在するかどうか
-               return true;
-       }
-}
-?>
diff --git a/widgets/m/bbs_2ch/include/container/m_bbs_2chThreadWidgetContainer.php b/widgets/m/bbs_2ch/include/container/m_bbs_2chThreadWidgetContainer.php
deleted file mode 100644 (file)
index 8e514b9..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2011 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_bbs_2chThreadWidgetContainer.php 4038 2011-03-20 12:21:33Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getCurrentWidgetContainerPath() .   '/m_bbs_2chBaseWidgetContainer.php');
-
-class m_bbs_2chThreadWidgetContainer extends m_bbs_2chBaseWidgetContainer
-{
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               $task = $request->trimValueOf('task');
-               if ($task == self::TASK_NEW_THREAD){            // 新規スレッド作成画面
-                       return 'newthread.tmpl.html';
-               } else {                        // スレッド一覧画面
-                       return 'thread.tmpl.html';
-               }
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $task = $request->trimValueOf('task');
-               if ($task == self::TASK_NEW_THREAD){            // 新規スレッド作成画面
-                       return $this->createNewThread($request);
-               } else {                        // スレッド一覧画面
-                       return $this->createThreadList($request);
-               }
-       }
-       /**
-        * 新規スレッド投稿画面作成
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param                                                               なし
-        */
-       function createNewThread($request)
-       {
-               $act = $request->trimValueOf('act');
-               $postTicket = $request->trimValueOf('ticket');          // POST確認用
-               $subject = $request->mobileTrimValueOf('bbs_subject');// 投稿件名
-               $message = $request->mobileTrimValueOf('bbs_message');// 投稿メッセージ
-               $name = $request->mobileTrimValueOf('bbs_name');// 名前
-               $email = $request->trimValueOf('bbs_email');// Eメールアドレス
-               
-               $isCompleted = false;           // 登録完了かどうか
-               if ($act == 'add'){             // 新規追加のとき
-                       if (!empty($postTicket) && $postTicket == $request->getSessionValue(M3_SESSION_POST_TICKET)){           // 正常なPOST値のとき
-                               // 入力チェック
-                               $this->checkInput($subject, 'タイトル', 'ERROR:タイトルが存在しません!');
-                               if (function_exists('mb_strlen')){
-                                       $length = mb_strlen($subject);
-                               } else {
-                                       $length = strlen($subject);
-                               }
-                               if ($length > $this->_configArray[self::CF_SUBJECT_LENGTH]) $this->setUserErrorMsg('ERROR:タイトルが長すぎます!(最大文字数' . $this->_configArray[self::CF_SUBJECT_LENGTH] . ')');
-                       
-                               // その他の入力項目のエラーチェック
-                               $this->checkMessageInput($this->_boardId, -1/*スレッドIDチェックなし*/, $name, $email, $message);
-                       
-                               // エラーなしの場合は、データを更新
-                               if ($this->getMsgCount() == 0){
-                                       // スレッドID作成
-                                       $threadId = md5(time() . $this->gRequest->trimServerValueOf('REMOTE_ADDR'));
-                               
-                                       // 新規スレッドの追加
-                                       $ret = $this->_db->addNewThread($this->_boardId, $threadId, $subject, $name, $email, $message);
-
-                                       if ($ret){              // データ追加成功のとき
-                                               //$this->setMsg(self::MSG_GUIDANCE, 'スレッドを作成しました');
-                                               $this->setMsg(self::MSG_GUIDANCE, '書きこみが終わりました。');
-                                               $isCompleted = true;                    // 投稿完了
-                                       } else {
-                                               //$this->setMsg(self::MSG_APP_ERR, 'スレッドを作成に失敗しました');
-                                               $this->setMsg(self::MSG_APP_ERR, '書きこみに失敗しました。');
-                                       }
-                               }
-                       } else {
-                               $this->setMsg(self::MSG_APP_ERR, '不正な投稿により、書きこみに失敗しました。');
-                       }
-                       $request->unsetSessionValue(M3_SESSION_POST_TICKET);            // セッション値をクリア
-               }
-
-               // 入力データを再設定
-               if ($isCompleted){              // 投稿完了のとき
-                       $this->tmpl->setAttribute('result_area', 'visibility', 'visible');// 投稿エリアを表示
-                       $this->tmpl->addVar("result_area", "subject", $this->convertToDispString($subject));
-                       $this->tmpl->addVar("result_area", "message", $this->convertToDispString($message));
-                       $this->tmpl->addVar("result_area", "name", $this->convertToDispString($name));
-                       $this->tmpl->addVar("result_area", "email", $this->convertToDispString($email));
-               } else {
-                       $this->tmpl->setAttribute('input_area', 'visibility', 'visible');// 投稿エリアを表示
-                       $this->tmpl->addVar("input_area", "subject", $this->convertToDispString($subject));
-                       $this->tmpl->addVar("input_area", "message", $this->convertToDispString($message));
-               }
-               
-               $makeThreadColor = $this->_configArray[self::CF_MAKE_THREAD_COLOR];             // スレッド作成部背景色
-               $makeThreadStyle .= 'background-color:' . $makeThreadColor . ';';
-               $this->tmpl->addVar("_widget", "make_thread_style", $makeThreadStyle);
-               
-               $enctype = 'application/x-www-form-urlencoded';
-               if (!empty($this->_configArray[self::CF_FILE_UPLOAD])){         // ファイルアップロード許可のとき
-                       $enctype = 'multipart/form-data';
-                       $this->tmpl->setAttribute('file_upload', 'visibility', 'visible');// ファイルアップロード領域追加
-               }
-               $this->tmpl->addVar("_widget", "enctype", $enctype);
-               
-               // ハッシュキー作成
-               $postTicket = md5(time() . $this->gAccess->getAccessLogSerialNo());
-               $request->setSessionValue(M3_SESSION_POST_TICKET, $postTicket);         // セッションに保存
-               $this->tmpl->addVar("_widget", "ticket", $postTicket);                          // 画面に書き出し
-               
-               // 送信先
-               $this->tmpl->addVar("_widget", "post_url", $this->_currentPageUrl);
-       }
-       /**
-        * 取得したコンテンツ項目をテンプレートに設定する
-        *
-        * @param int           $index                  行番号
-        * @param array         $fetchedRow             取得行
-        * @param object        $param                  任意使用パラメータ
-        * @return bool                                         trueを返すとループ続行。falseを返すとその時点で終了。
-        */
-       function itemsLoop($index, $fetchedRow)
-       {
-               return true;
-       }
-}
-?>
diff --git a/widgets/m/bbs_2ch/include/container/m_bbs_2chTopWidgetContainer.php b/widgets/m/bbs_2ch/include/container/m_bbs_2chTopWidgetContainer.php
deleted file mode 100644 (file)
index fad6883..0000000
+++ /dev/null
@@ -1,361 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2011 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_bbs_2chTopWidgetContainer.php 4039 2011-03-21 05:37:18Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getCurrentWidgetContainerPath() .   '/m_bbs_2chBaseWidgetContainer.php');
-
-class m_bbs_2chTopWidgetContainer extends m_bbs_2chBaseWidgetContainer
-{
-       private $threadCount;   // スレッド表示数
-       private $threadId;              // スレッドID
-       private $threadIdArray = array();       // 表示するスレッドID
-       private $threadInfoArray = array();     // 表示中のスレッドの情報
-       private $headTitle;             // METAタグタイトル
-       private $headDesc;              // METAタグ要約
-       private $headKeyword;   // METAタグキーワード
-       private $headCss;                       // ヘッダ追加CSS
-       private $threadStyle;   // スレッド部表示スタイル
-       private $subjectColor;  // 件名文字色
-       private $nameColor;             // 登録者名文字色
-       private $createEmailLink;       // Eメールのリンクを作成するかどうか
-       private $isExistsMessage;       // メッセージが存在するかどうか
-       private $ticket;                // POST確認用ハッシュキー
-       private $bbsName;               // 入力再設定用(名前)
-       private $bbsEmail;              // 入力再設定用(Eメールアドレス)
-       private $bbsMessage;            // 入力再設定用(投稿メッセージ)
-       const DEFAULT_MENU_NAME = 'menu';               // スレッドメニューの名前
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               $act = $request->trimValueOf('act');
-               return 'main.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $act = $request->trimValueOf('act');
-               $postTicket = $request->trimValueOf('ticket');          // POST確認用
-               $this->threadId = $request->trimValueOf(M3_REQUEST_PARAM_BBS_THREAD_ID);        // スレッドID
-               $message = $request->mobileTrimValueOf('bbs_message');// 投稿メッセージ
-               $name = $request->mobileTrimValueOf('bbs_name');// 名前
-               $email = $request->trimValueOf('bbs_email');// Eメールアドレス
-               
-               if ($act == 'add'){             // 投稿追加のとき
-                       if (!empty($postTicket) && $postTicket == $request->getSessionValue(M3_SESSION_POST_TICKET)){           // 正常なPOST値のとき
-                               // 入力項目のエラーチェック
-                               $this->checkMessageInput($this->_boardId, $this->threadId, $name, $email, $message);
-                       
-                               // エラーなしの場合は、データを更新
-                               if ($this->getMsgCount() == 0){
-                                       // 新規投稿文の追加
-                                       if (strcasecmp($email, self::DEFAULT_EMAIL_NOT_UPDATE) == 0){           // 日付更新を行わないとき
-                                               $updateDt = false;
-                                       } else {
-                                               $updateDt = true;               // 日付を更新
-                                       }
-                                       $ret = $this->_db->addMessage($this->_boardId, $this->threadId, $name, $email, $message, $updateDt, $newSerial);
-
-                                       if ($ret){              // データ追加成功のとき
-                                               //$this->setMsg(self::MSG_GUIDANCE, 'スレッドを作成しました');
-                                               $this->setMsg(self::MSG_GUIDANCE, '書きこみが終わりました。');
-                                       
-                                               // 入力項目を使用不可に設定
-                                               $this->tmpl->addVar("_widget", "name_disabled", 'disabled ');
-                                               $this->tmpl->addVar("_widget", "email_disabled", 'disabled ');
-                                               $this->tmpl->addVar("_widget", "subject_disabled", 'disabled ');
-                                               $this->tmpl->addVar("_widget", "message_disabled", 'disabled ');
-                                               $this->tmpl->addVar("_widget", "button_disabled", 'disabled ');
-                                               
-                                               // スレッドが最大数に達したときはメッセージを追加
-                                               $ret = $this->_db->getThreadInfo($this->_boardId, $this->threadId, $row);
-                                               if ($ret){
-                                                       $resCount = $this->_configArray[self::CF_THREAD_RES];
-                                                       if ($row['th_message_count'] >= $resCount){
-                                                               $adminName = $this->_configArray[self::CF_ADMIN_NAME];  // サイト運営者名
-                                                               if (empty($adminName)) $adminName = self::DEFAULT_ADMIN_NAME;
-                                                               $overMessage = $this->_configArray[self::CF_THREAD_END_MESSAGE];        // デフォルトのレス上限メッセージ
-                                                               if (empty($overMessage)) $overMessage = self::DEFAULT_THREAD_END_MESSAGE;
-                                                               $overMessage = str_replace(M3_TAG_START . self::MACRO_RES_MAX_NO . M3_TAG_END, $resCount, $overMessage);// レス上限数を埋め込む
-                                                               $ret = $this->_db->addMessage($this->_boardId, $this->threadId, $adminName, ''/*Eメール*/, $overMessage, $updateDt, $newSerial);
-                                                       }
-                                               }
-                                       } else {
-                                               //$this->setMsg(self::MSG_APP_ERR, 'スレッドを作成に失敗しました');
-                                               $this->setMsg(self::MSG_APP_ERR, '書きこみに失敗しました。');
-                                       }
-                               } else {
-                                       // 入力データを再設定
-                                       $this->bbsName = $name;         // 入力再設定用(名前)
-                                       $this->bbsEmail = $email;               // 入力再設定用(Eメールアドレス)
-                                       $this->bbsMessage = $message;           // 入力再設定用(投稿メッセージ)
-                               }
-                       } else {
-                               $this->setMsg(self::MSG_APP_ERR, '不正な投稿により、書きこみに失敗しました。');
-                       }
-                       $request->unsetSessionValue(M3_SESSION_POST_TICKET);            // セッション値をクリア
-               }
-               // ハッシュキー作成
-               $this->ticket = md5(time() . $this->gAccess->getAccessLogSerialNo());
-               $request->setSessionValue(M3_SESSION_POST_TICKET, $this->ticket);               // セッションに保存
-               
-               // 表示スタイル作成
-               $this->createEmailLink = $this->_configArray[self::CF_SHOW_EMAIL];              // Eメールのリンクを作成するかどうか
-               $threadColor = $this->_configArray[self::CF_THREAD_COLOR];              // スレッド表示部背景色
-               $this->threadStyle .= 'background-color:' . $threadColor . ';';
-               //$this->tmpl->addVar("_widget", "thread_style", $this->threadStyle);
-               $makeThreadColor = $this->_configArray[self::CF_MAKE_THREAD_COLOR];             // スレッド作成部背景色
-               $makeThreadStyle .= 'background-color:' . $makeThreadColor . ';';
-               $this->subjectColor = $this->_configArray[self::CF_SUBJECT_COLOR];              // 件名文字色
-               $this->nameColor = $this->_configArray[self::CF_NAME_COLOR];            // 登録者名文字色
-               
-               // ファイルアップロード領域
-               if (!empty($this->_configArray[self::CF_FILE_UPLOAD])){         // ファイルアップロード許可のとき
-                       $this->tmpl->setAttribute('file_upload', 'visibility', 'visible');// ファイルアップロード領域追加
-               }
-               
-               // スレッドメニュー作成
-               $this->threadCount = $this->_configArray[self::CF_THREAD_COUNT];
-               $this->_db->getThread(array($this, 'itemsLoop'), $this->_boardId, $this->_configArray[self::CF_MENU_THREAD_COUNT]/*メニューに表示するスレッド最大数*/);
-               
-               // 投稿文を作成
-               // メッセージの最小インデックス番号を求める
-               $resCount = $this->_configArray[self::CF_RES_COUNT];    // トップ画面に表示するレス最大数
-               $minIndexArray = array();
-               for ($i = 0; $i < count($this->threadIdArray); $i++){
-                       $minIndex = 2;                  // 2番目のメッセージ以降
-                       if ($this->threadInfoArray[$i]['th_message_count'] > $resCount + 1) $minIndex = $this->threadInfoArray[$i]['th_message_count'] - $resCount + 1;
-                       $minIndexArray[] = $minIndex;
-               }
-               $this->_db->getThreadMessage(array($this, 'messagesLoop'), $this->_boardId, $this->threadIdArray, $minIndexArray);
-               
-               // スレッドが存在しないときはタグを非表示にする
-               if (!$this->isExistsMessage) $this->tmpl->setAttribute('thread_list', 'visibility', 'hidden');
-               
-               // 掲示板規則部
-               $this->tmpl->addVar("_widget", "make_thread_style", $makeThreadStyle);
-               $this->tmpl->addVar("_widget", "menu_name", self::DEFAULT_MENU_NAME);// スレッドメニューの名前
-               $this->tmpl->addVar("_widget", "menu_anchor", '#' . self::DEFAULT_MENU_NAME);// スレッドメニューへのアンカーリンク
-               if ($this->isExistsMessage){
-                       $firstAnchorTag = '<a href="#1">▼</a>';
-               } else {
-                       $firstAnchorTag = '▼';
-               }
-               $this->tmpl->addVar("_widget", "first_anchor", $firstAnchorTag);                // 最初のスレッドへのアンカーリンク
-               
-               // 画面下部メッセージ
-               $bottomMessage = $this->_configArray[self::CF_BOTTOM_MESSAGE];
-               if (is_null($bottomMessage)) $bottomMessage = self::DEFAULT_BOTTOM_MESSAGE;
-               $this->tmpl->addVar("_widget", "bottom_message", $bottomMessage);
-               
-               // 送信先
-               $this->tmpl->addVar("_widget", "post_url", $this->_currentPageUrl);
-                               
-               // その他
-               $this->tmpl->addVar("_widget", "ad", "");               // 広告バナー等
-               $this->tmpl->addVar("_widget", "spacer", "$this->_spacer");             // スペーサ
-       }
-       /**
-        * 取得したスレッド件名をテンプレートに設定する
-        *
-        * @param int           $index                  行番号
-        * @param array         $fetchedRow             取得行
-        * @param object        $param                  任意使用パラメータ
-        * @return bool                                         trueを返すとループ続行。falseを返すとその時点で終了。
-        */
-       function itemsLoop($index, $fetchedRow)
-       {
-               // トップ画面に表示するスレッド最大数
-               $no = $index + 1;
-               $subject = $fetchedRow['th_subject'] . '(' . $fetchedRow['th_message_count'] . ')';
-               $threadLinkUrl = $this->_currentPageUrl . '&' . M3_REQUEST_PARAM_BBS_THREAD_ID . '=' . $fetchedRow['th_id'] . '&' . M3_REQUEST_PARAM_LIST_NO . '=l' . self::DEFAULT_LAST_MESSAGE_COUNT;
-               if ($index < $this->threadCount){
-                       $subject = $no . ':</a><a href="#' . $no . '">' . $this->convertToDispString($subject);
-                       
-                       // スレッドIDを追加
-                       $this->threadIdArray[] = $fetchedRow['th_id'];
-                       
-                       // スレッド情報を追加
-                       $this->threadInfoArray[] = $fetchedRow;
-               } else {
-                       $subject = $no . ':' . $this->convertToDispString($subject);
-               }
-               
-               $row = array(
-                       'url' => $this->convertUrlToHtmlEntity($this->getUrl($threadLinkUrl, true)),    // スレッドリンク先
-                       'subject' => $subject           // スレッド件名
-               );
-               $this->tmpl->addVars('itemlist', $row);
-               $this->tmpl->parseTemplate('itemlist', 'a');
-               return true;
-       }
-       /**
-        * 取得したスレッドメッセージをテンプレートに設定する
-        *
-        * @param int           $index                  行番号
-        * @param array         $fetchedRow             取得行
-        * @param object        $param                  任意使用パラメータ
-        * @return bool                                         trueを返すとループ続行。falseを返すとその時点で終了。
-        */
-       function messagesLoop($index, $fetchedRow)
-       {
-               static $threadIndex = 0;
-               
-               $threadId = $fetchedRow['te_thread_id'];
-               $messageCount = $this->threadInfoArray[$threadIndex]['th_message_count'];               // メッセージ総数
-               $no = $fetchedRow['te_index'];                  // メッセージインデックス番号
-
-               // メッセージが最大を超えたときは終了
-               if ($no > $messageCount) return true;
-               
-               $findLastMessage = false;
-               if ($no == $messageCount) $findLastMessage = true;// 最後のメッセージかどうか
-               
-               // ##### メッセージ部分を作成 #####
-               // 登録者名作成
-               $name = $this->convertToDispString($fetchedRow['te_user_name']);                // ユーザ名
-               if (empty($name)) $name = $this->_configArray[self::CF_NONAME_NAME];                            // 名前未設定時の表示名
-               $email = $this->convertToDispString($fetchedRow['te_email']);                   // Eメール
-               if (!empty($email) && !empty($this->createEmailLink)){                  // Eメールリンク作成のとき
-                       $name = '<a href="mailto:' . $email . '">' . $name . '</a>';
-               } else {
-                       $name = '<span style="color:' . $this->nameColor . ';">' . $name . '</span>';
-               }
-               
-               // 日付作成
-               $weekDay = array('日', '月', '火', '水', '木', '金', '土');
-               $timestamp = strtotime($fetchedRow['te_regist_dt']);
-               $weekNo = intval(date('w', $timestamp));
-               $date = date('Y/m/d(' . $weekDay[$weekNo] . ') H:i:s', $timestamp);
-               
-               // 投稿文
-               $message = $this->convertToDispString($fetchedRow['te_message']);// 文字エスケープ処理
-               $message = $this->convertToPreviewText($message);                       // 改行をBRタグに変換
-               if ($fetchedRow['te_index'] == 1) $message .= '<br />';         // トップのメッセージは改行を追加
-               
-               // メッセージ変換
-               $message = $this->convDispMessage($message, $threadId);
-               
-               // 削除メッセージのとき
-               if ($fetchedRow['te_deleted']){
-                       $name = '参照不可';
-                       $message = '参照できません。';
-               }
-               
-               $row = array(
-                       'no'            => $no,         // メッセージインデックス番号
-                       'name'          => $name,       // 投稿者名
-                       'date'          => $date,       // 投稿日付
-                       'message'               => $message             // 投稿文
-               );
-               $this->tmpl->addVars('message_list', $row);
-               $this->tmpl->parseTemplate('message_list', 'a');
-               
-               // ##### スレッドごとの出力 #####
-               if ($findLastMessage){          // 最後のメッセージの場合
-                       $threadInfo = $this->threadInfoArray[$threadIndex];
-                       $threadUrl = $this->_currentPageUrl . '&' . M3_REQUEST_PARAM_BBS_THREAD_ID . '=' . $threadId;
-                       $thread50Url = $this->_currentPageUrl . '&' . M3_REQUEST_PARAM_BBS_THREAD_ID . '=' . $threadId . '&' . M3_REQUEST_PARAM_LIST_NO . '=l' . self::DEFAULT_LAST_MESSAGE_COUNT;
-                       $thread100Url = $this->_currentPageUrl . '&' . M3_REQUEST_PARAM_BBS_THREAD_ID . '=' . $threadId . '&' . M3_REQUEST_PARAM_LIST_NO . '=' . self::DEFAULT_MESSAGE_COUNT_PER_PAGE;
-                       $reloadUrl = $this->_currentPageUrl;
-                       
-                       // アンカーリンク作成
-                       if ($threadIndex == 0){
-                               $foreAnchor = '#' . count($this->threadIdArray);
-                               if (count($this->threadIdArray) == 1){
-                                       $nextAnchor = '#1';
-                               } else {
-                                       $nextAnchor = '#' . ($threadIndex + 2);
-                               }
-                       } else if ($threadIndex < count($this->threadIdArray) -1){
-                               $foreAnchor = '#' . $threadIndex;
-                               $nextAnchor = '#' . ($threadIndex + 2);
-                       } else {
-                               $foreAnchor = '#' . $threadIndex;
-                               $nextAnchor = '#1';
-                       }
-                       
-                       // ファイルアップロード領域の表示
-                       $enctype = 'application/x-www-form-urlencoded';
-                       if (!empty($this->_configArray[self::CF_FILE_UPLOAD])){         // ファイルアップロード許可のとき
-                               $enctype = 'multipart/form-data';
-                       }
-                       // 入力データを再設定
-                       $bbsName = '';          // 入力再設定用(名前)
-                       $bbsEmail = '';         // 入力再設定用(Eメールアドレス)
-                       $bbsMessage = '';               // 入力再設定用(投稿メッセージ)
-                       if ($this->threadId == $threadId){
-                               if (!empty($this->bbsName)) $bbsName = $this->bbsName;          // 入力再設定用(名前)
-                               if (!empty($this->bbsEmail)) $bbsEmail = $this->bbsEmail;               // 入力再設定用(Eメールアドレス)
-                               if (!empty($this->bbsMessage)) $bbsMessage = $this->bbsMessage;         // 入力再設定用(投稿メッセージ)
-                       }
-                       $row = array(
-                               'bbs_name'              => $this->convertToDispString($bbsName),        // 入力再設定用(名前)
-                               'bbs_email'             => $this->convertToDispString($bbsEmail),       // 入力再設定用(Eメールアドレス)
-                               'bbs_message'   => $this->convertToDispString($bbsMessage),     // 入力再設定用(投稿メッセージ)
-                               'enctype'               => $enctype,            // ファイルアップロード領域
-                               'index'                 => $threadIndex + 1,                            // スレッドインデックス番号
-                               'menu_anchor'   => '#' . self::DEFAULT_MENU_NAME,       // スレッドメニューへのアンカーリンク
-                               'fore_anchor'   => $foreAnchor,         // 前スレッドリンク
-                               'next_anchor'   => $nextAnchor, // 次スレッドリンク
-                               'message_count' => $threadInfo['th_message_count'],                     // メッセージ総数
-                               'thread_id'             => $threadId,           // スレッドID
-                               'subject'               => $this->convertToDispString($threadInfo['th_subject']),                               // スレッド件名
-                               'subject_color' => $this->subjectColor,         // 件名表示色
-                               'thread_style'  => $this->threadStyle,          // スレッド表示スタイル
-                               'thread_url'    => $this->convertUrlToHtmlEntity($this->getUrl($threadUrl, true)),                              // スレッド全表示URL
-                               'thread50_url'  => $this->convertUrlToHtmlEntity($this->getUrl($thread50Url, true)),                            // スレッド最新50表示URL
-                               'thread100_url' => $this->convertUrlToHtmlEntity($this->getUrl($thread100Url, true)),                           // スレッド100まで表示URL
-                               'reload_url'    => $this->convertUrlToHtmlEntity($this->getUrl($reloadUrl, true)),                                      // 画面再表示
-                               'post_url'              => $this->_currentPageUrl,              // POST先URL
-                               'ticket'                => $this->ticket,               // POST確認用ハッシュキー
-                               'spacer'                => $this->_spacer       // スペーサ
-                       );
-                       $this->tmpl->addVars('thread_list', $row);
-                       $this->tmpl->parseTemplate('thread_list', 'a');
-                       
-                       $this->tmpl->clearTemplate('message_list');             // メッセージを一旦クリア
-                       $threadIndex++;
-               }
-               // メッセージが存在するかどうか
-               $this->isExistsMessage = true;
-               return true;
-       }
-}
-?>
diff --git a/widgets/m/bbs_2ch/include/container/m_bbs_2chWidgetContainer.php b/widgets/m/bbs_2ch/include/container/m_bbs_2chWidgetContainer.php
deleted file mode 100644 (file)
index af3feb0..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2011 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_bbs_2chWidgetContainer.php 4028 2011-03-11 04:11:33Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getCurrentWidgetContainerPath() .   '/m_bbs_2chBaseWidgetContainer.php');
-
-class m_bbs_2chWidgetContainer extends m_bbs_2chBaseWidgetContainer
-{
-       const DEFAULT_TASK = 'top';                             // デフォルトの画面
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * ディスパッチ処理(メインコンテナのみ実行)
-        *
-     * HTTPリクエストの内容を見て処理をコンテナに振り分ける
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return bool                                                 このクラスの_setTemplate(), _assign()へ処理を継続するかどうかを返す。
-        *                                      true=処理を継続、false=処理を終了
-        */
-       function _dispatch($request, &$param)
-       {
-               // 実行処理を決定
-               $task = $request->trimValueOf(M3_REQUEST_PARAM_OPERATION_TASK);
-               if (empty($task)){
-                       // スレッドIDを取得
-                       $threadId = $request->trimValueOf(M3_REQUEST_PARAM_BBS_THREAD_ID);
-                       if (empty($threadId)) $request->trimValueOf(M3_REQUEST_PARAM_BBS_THREAD_ID_SHORT);
-                       
-                       // 検索キーワードを取得
-                       $keyword = $request->trimValueOf(M3_REQUEST_PARAM_KEYWORD);
-                       
-                       // スレッドIDが設定されているときはスレッド表示タスクを設定
-                       if (empty($threadId)){
-                               if (empty($keyword)){
-                                       $task = self::DEFAULT_TASK;
-                               } else {                // 検索キーワードが設定されている場合
-                                       $task = self::TASK_SUBJECT;             // 件名一覧
-                               }
-                       } else {
-                               $task = self::TASK_READ_THREAD;         // スレッド表示
-                       }
-               } else if ($task == self::TASK_NEW_THREAD){             // スレッド新規作成
-                       $task = self::TASK_THREAD;
-               }
-
-               // ##### コンテナを起動 #####
-               switch ($task){
-                       case self::TASK_TOP:                    // トップ画面
-                       case self::TASK_SUBJECT:                // スレッド件名
-                       case self::TASK_THREAD:         // スレッド処理
-                       case self::TASK_READ_THREAD:            // スレッド表示
-                               $this->gLaunch->goSubWidget($task);
-                               return false;
-                       default:
-                               $this->SetMsg(self::MSG_APP_ERR, "画面が見つかりません");
-                               return true;
-               }
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               $task = $request->trimValueOf(M3_REQUEST_PARAM_OPERATION_TASK);
-               return 'message.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @return                                                              なし
-        */
-       function _assign($request, &$param)
-       {
-               $task = $request->trimValueOf(M3_REQUEST_PARAM_OPERATION_TASK);
-
-               // 要求画面によってテンプレートを変更
-               switch ($task){
-                       case self::TASK_TOP:                    // トップ画面
-                       default:
-                               // メッセージを表示
-                               //$this->tmpl->addVar("_widget", "login_url", $this->gEnv->createCurrentPageUrl() . '&task=login');             // ログイン用URL
-                               break;
-               }
-       }
-}
-?>
diff --git a/widgets/m/bbs_2ch/include/db/bbs_2chDb.php b/widgets/m/bbs_2ch/include/db/bbs_2chDb.php
deleted file mode 100644 (file)
index 7ebef72..0000000
+++ /dev/null
@@ -1,482 +0,0 @@
-<?php
-/**
- * DBクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2011 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: bbs_2chDb.php 4028 2011-03-11 04:11:33Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getDbPath() . '/baseDb.php');
-
-class bbs_2chDb extends BaseDb
-{
-       /**
-        * BBS定義値をすべて取得
-        *
-        * @param array  $rows                  レコード
-        * @param string $boardId               掲示板ID
-        * @return bool                                 1行以上取得 = true, 取得なし= false
-        */
-       function getAllConfig(&$rows, $boardId = '')
-       {
-               $queryStr  = 'SELECT * FROM bbs_2ch_config ';
-               $queryStr .=  'WHERE tg_board_id = ? ';
-               $queryStr .=   'ORDER BY tg_index';
-               $retValue = $this->selectRecords($queryStr, array($boardId), $rows);
-               return $retValue;
-       }
-       /**
-        * BBS定義値を更新
-        *
-        * @param string $key           キーとなる項目値
-        * @param string $value         値
-        * @param string $boardId               掲示板ID
-        * @return                                      true = 正常、false=異常
-        */
-       function updateConfig($key, $value, $boardId = '')
-       {
-               // トランザクションスタート
-               $this->startTransaction();
-               
-               $queryStr  = 'SELECT tg_value FROM bbs_2ch_config ';
-               $queryStr .=   'WHERE tg_board_id = ? ';
-               $queryStr .=     'AND tg_id = ? ';
-               $ret = $this->selectRecord($queryStr, array($boardId, $key), $row);
-               if ($ret){
-                       $queryStr  = 'UPDATE bbs_2ch_config ';
-                       $queryStr .=   'SET tg_value = ? ';
-                       $queryStr .=   'WHERE tg_board_id = ? ';
-                       $queryStr .=     'AND tg_id = ? ';
-                       $ret = $this->execStatement($queryStr, array($value, $boardId, $key));                  
-               } else {
-                       $queryStr  = 'INSERT INTO bbs_2ch_config (';
-                       $queryStr .=   'tg_board_id, ';
-                       $queryStr .=   'tg_id, ';
-                       $queryStr .=   'tg_value ';
-                       $queryStr .= ') VALUES (';
-                       $queryStr .=   '?, ?, ?';
-                       $queryStr .= ')';
-                       $ret = $this->execStatement($queryStr, array($boardId, $key, $value));  
-               }
-               // トランザクション終了
-               $ret = $this->endTransaction();
-               return $ret;
-       }
-       /**
-        * スレッドの新規追加
-        *
-        * @param string  $boardId              掲示板ID
-        * @param string  $threadId             スレッドID
-        * @param string  $subject              スレッド件名
-        * @param string  $userName             投稿者名
-        * @param string  $email                Eメールアドレス
-        * @param string  $message              投稿メッセージ
-        * @return bool                                 true = 成功、false = 失敗
-        */
-       function addNewThread($boardId, $threadId, $subject, $userName, $email, $message)
-       {
-               $now = date("Y/m/d H:i:s");     // 現在日時
-               $user = $this->gEnv->getCurrentUserId();        // 現在のユーザ
-               $accessLog = $this->gEnv->getCurrentAccessLogSerial();
-                               
-               // トランザクション開始
-               $this->startTransaction();
-               
-               // データを追加
-               $queryStr  = 'INSERT INTO bbs_2ch_thread ';
-               $queryStr .=   '(';
-               $queryStr .=   'th_board_id, ';
-               $queryStr .=   'th_id, ';
-               $queryStr .=   'th_subject, ';
-               $queryStr .=   'th_message_count, ';
-               $queryStr .=   'th_dt, ';
-               $queryStr .=   'th_log_serial, ';
-               $queryStr .=   'th_create_user_id, ';
-               $queryStr .=   'th_create_dt) ';
-               $queryStr .=  'VALUES ';
-               $queryStr .=  '(?, ?, ?, ?, ?, ?, ?, ?)';
-               $this->execStatement($queryStr, array($boardId, $threadId, $subject, 1, $now, $accessLog, $user, $now));
-               
-               $queryStr  = 'INSERT INTO bbs_2ch_thread_message ';
-               $queryStr .=   '(';
-               $queryStr .=   'te_board_id, ';
-               $queryStr .=   'te_thread_id, ';
-               $queryStr .=   'te_index, ';
-               $queryStr .=   'te_user_name, ';
-               $queryStr .=   'te_email, ';
-               $queryStr .=   'te_message, ';
-               $queryStr .=   'te_regist_dt, ';
-               $queryStr .=   'te_log_serial, ';
-               $queryStr .=   'te_update_user_id, ';
-               $queryStr .=   'te_update_dt) ';
-               $queryStr .=  'VALUES ';
-               $queryStr .=  '(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
-               $this->execStatement($queryStr, array($boardId, $threadId, 1, $userName, $email, $message, $now, $accessLog, $user, $now));
-                       
-               // トランザクション確定
-               $ret = $this->endTransaction();
-               return $ret;
-       }
-       /**
-        * スレッド件名を取得
-        *
-        * @param function      $callback               コールバック関数
-        * @param string    $boardId            掲示板ID
-        * @param int       $limit                      取得数(-1=すべて取得)
-        * @return                      なし
-        */
-       function getThread($callback, $boardId, $limit)
-       {
-               $queryStr = 'SELECT * FROM bbs_2ch_thread ';
-               $queryStr .=  'WHERE th_board_id = ? ';
-               $queryStr .=    'AND th_deleted = false ';              // 削除されていない
-               if ($limit == -1){
-                       $queryStr .=  'ORDER BY th_dt DESC';
-               } else {
-                       $queryStr .=  'ORDER BY th_dt DESC limit ' . intval($limit);
-               }
-               $this->selectLoop($queryStr, array($boardId), $callback, null);
-       }
-       /**
-        * スレッド件名を検索キーワードで取得
-        *
-        * @param function      $callback               コールバック関数
-        * @param string    $boardId            掲示板ID
-        * @param int       $limit                      取得数(-1=すべて取得)
-        * @param string    $keyword            検索キーワード
-        * @return                      なし
-        */
-       function getThreadByKeyword($callback, $boardId, $limit, $keyword)
-       {
-               $queryStr  = 'SELECT th_id,th_subject,th_message_count FROM bbs_2ch_thread_message LEFT JOIN bbs_2ch_thread ON te_board_id = th_board_id AND te_thread_id = th_id AND th_deleted = false ';
-               $queryStr .=   'WHERE te_board_id = ? ';
-               $queryStr .=     'AND te_deleted = false ';             // 削除されていない
-               
-               // 「'"\」文字をエスケープ
-               $keyword = addslashes($keyword);
-               $queryStr .=     'AND (te_user_name LIKE \'%' . $keyword . '%\' ';
-               $queryStr .=     'OR te_email LIKE \'%' . $keyword . '%\' ';
-               $queryStr .=     'OR te_message LIKE \'%' . $keyword . '%\') ';
-                       
-               $queryStr .=   'GROUP BY th_id ';
-               if ($limit == -1){
-                       $queryStr .=  'ORDER BY th_dt DESC';
-               } else {
-                       $queryStr .=  'ORDER BY th_dt DESC limit ' . intval($limit);
-               }
-               $this->selectLoop($queryStr, array($boardId), $callback, null);
-       }
-       /**
-        * スレッドメッセージを取得
-        *
-        * @param function      $callback               コールバック関数
-        * @param string    $boardId            掲示板ID
-        * @param array     $threadId           スレッドID
-        * @param array     $minIndexArray      メッセージインデックス番号の最小値
-        * @return                      なし
-        */
-       function getThreadMessage($callback, $boardId, $threadId, $minIndexArray)
-       {
-               // スレッドの指定がないときは終了
-               if (empty($threadId)) return;
-               
-               // CASE文作成
-               $threadCount = count($threadId);
-               $caseStr = 'CASE te_thread_id ';
-               $thread = '';
-               for ($i = 0; $i < $threadCount; $i++){
-                       $threadIdStr = addslashes($threadId[$i]);
-                       $caseStr .= 'WHEN \'' . $threadIdStr . '\' THEN ' . $i . ' ';
-                       $thread .= '\'' . $threadIdStr . '\',';
-               }
-               $caseStr .= 'END AS no';
-               $thread = rtrim($thread, ',');
-               
-               // スレッドのメッセージ取得条件作成
-               $condStr = 'AND (';
-               for ($i = 0; $i < $threadCount; $i++){
-                       if ($i > 0) $condStr .= 'OR ';
-                       $threadIdStr = addslashes($threadId[$i]);
-                       $condStr .= '(te_thread_id = \'' . $threadIdStr . '\' ';
-                       $condStr .= 'AND (te_index = 1 OR te_index >= ' . intval($minIndexArray[$i]) . ')) ';
-               }
-               $condStr .= ') ';
-               
-               $queryStr  = 'SELECT *, ' . $caseStr . ' FROM bbs_2ch_thread_message ';
-               $queryStr .=   'WHERE te_board_id = ? ';
-               $queryStr .= $condStr;
-               $queryStr .=   'ORDER BY no, te_index';
-               $this->selectLoop($queryStr, array($boardId), $callback, null);
-       }
-       /**
-        * スレッドメッセージを範囲で取得
-        *
-        * @param function      $callback               コールバック関数
-        * @param string    $boardId            掲示板ID
-        * @param array     $threadId           スレッドID
-        * @param int           $limit                  取得する項目数(0のときすべて)
-        * @param int           $offset                 取得開始位置(0~)
-        * @return                      なし
-        */
-       function getThreadMessageByRange($callback, $boardId, $threadId, $limit, $offset)
-       {
-               $queryStr  = 'SELECT * FROM bbs_2ch_thread_message ';
-               $queryStr .=   'WHERE te_board_id = ? ';
-               $queryStr .=     'AND te_thread_id = ? ';
-               if ($limit <= 0){
-                       $queryStr .=  'ORDER BY te_index';
-               } else {
-                       $queryStr .=  'ORDER BY te_index limit ' . intval($limit) . ' offset ' . intval($offset);
-               }
-               $this->selectLoop($queryStr, array($boardId, $threadId), $callback);
-       }
-       /**
-        * スレッド情報の取得
-        *
-        * @param string $boardId               掲示板ID
-        * @param string $threadId              スレッドID
-        * @param array  $row                   取得データ
-        * @return                                              true=正常、false=異常
-        */
-       function getThreadInfo($boardId, $threadId, &$row)
-       {
-               $queryStr  = 'SELECT * FROM bbs_2ch_thread ';
-               $queryStr .=   'WHERE th_board_id = ? ';
-               $queryStr .=     'AND th_id = ? ';
-               $queryStr .=     'AND th_deleted = false ';             // 削除されていない
-               $ret = $this->selectRecord($queryStr, array($boardId, $threadId), $row);
-               return $ret;
-       }
-       /**
-        * 投稿文の追加
-        *
-        * @param string  $boardId              掲示板ID
-        * @param string  $threadId             スレッドID
-        * @param string  $userName             投稿者名
-        * @param string  $email                Eメールアドレス
-        * @param string  $message              投稿メッセージ
-        * @param bool    $updateDt             日付を更新するかどうか
-        * @param int     $newSerial    新規シリアル番号
-        * @return bool                                 true = 成功、false = 失敗
-        */
-       function addMessage($boardId, $threadId, $userName, $email, $message, $updateDt, &$newSerial)
-       {
-               $now = date("Y/m/d H:i:s");     // 現在日時
-               $user = $this->gEnv->getCurrentUserId();        // 現在のユーザ
-               $accessLog = $this->gEnv->getCurrentAccessLogSerial();
-                               
-               // トランザクション開始
-               $this->startTransaction();
-               
-               // スレッドがあるかどうかチェック
-               $queryStr  = 'SELECT * FROM bbs_2ch_thread ';
-               $queryStr .=   'WHERE th_board_id = ? ';
-               $queryStr .=     'AND th_id = ? ';
-               $queryStr .=     'AND th_deleted = false ';             // 削除されていない
-               $ret = $this->selectRecord($queryStr, array($boardId, $threadId), $row);
-               if ($ret){
-                       $params = array();
-                       $messageCount = $row['th_message_count'] + 1;           // メッセージ数
-                       $queryStr  = 'UPDATE bbs_2ch_thread ';
-                       $queryStr .=   'SET th_message_count = ?, '; $params[] = $messageCount;
-                       if ($updateDt){
-                               $queryStr .=     'th_dt = ?, '; $params[] = $now;               // 日付を更新
-                       }
-                       $queryStr .=     'th_update_user_id = ?, '; $params[] = $user;
-                       $queryStr .=     'th_update_dt = ? '; $params[] = $now;
-                       $queryStr .=   'WHERE th_serial = ?'; $params[] = $row['th_serial'];
-                       $ret = $this->execStatement($queryStr, $params);                        
-               } else {                // 存在しない場合は終了
-                       $this->endTransaction();
-                       return false;
-               }
-               // 投稿文を追加
-               $queryStr  = 'INSERT INTO bbs_2ch_thread_message ';
-               $queryStr .=   '(';
-               $queryStr .=   'te_board_id, ';
-               $queryStr .=   'te_thread_id, ';
-               $queryStr .=   'te_index, ';
-               $queryStr .=   'te_user_name, ';
-               $queryStr .=   'te_email, ';
-               $queryStr .=   'te_message, ';
-               $queryStr .=   'te_regist_dt, ';
-               $queryStr .=   'te_log_serial, ';
-               $queryStr .=   'te_update_user_id, ';
-               $queryStr .=   'te_update_dt) ';
-               $queryStr .=  'VALUES ';
-               $queryStr .=  '(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
-               $this->execStatement($queryStr, array($boardId, $threadId, $messageCount, $userName, $email, $message, $now, $accessLog, $user, $now));
-                       
-               // 新規のシリアル番号取得
-               $queryStr = 'SELECT MAX(te_serial) AS mx FROM bbs_2ch_thread_message ';
-               $ret = $this->selectRecord($queryStr, array(), $row);
-               if ($ret) $newSerial = $row['mx'];
-               
-               // トランザクション確定
-               $ret = $this->endTransaction();
-               return $ret;
-       }
-       /**
-        * 投稿メッセージを取得(管理用)
-        *
-        * @param string    $boardId            掲示板ID
-        * @param int       $limit                      取得数
-        * @param int           $page                   取得するページ(1~)
-        * @param function      $callback               コールバック関数
-        * @return                      なし
-        */
-       function getMessage($boardId, $limit, $page, $callback)
-       {
-               if ($limit < 0) $limit = 0;
-               
-               $offset = $limit * ($page -1);
-               if ($offset < 0) $offset = 0;
-               
-               $queryStr = 'SELECT * FROM bbs_2ch_thread_message LEFT JOIN bbs_2ch_thread ON te_board_id = th_board_id AND te_thread_id = th_id AND th_deleted = false ';
-               $queryStr .=  'WHERE te_board_id = ? ';
-               $queryStr .=    'AND te_deleted = false ';              // 削除されていない
-               $queryStr .=  'ORDER BY th_dt DESC, te_index ';
-               $queryStr .=  'LIMIT ' . $limit . ' OFFSET ' . $offset;
-               $this->selectLoop($queryStr, array($boardId), $callback);
-       }
-       /**
-        * 投稿メッセージ数を取得(管理用)
-        *
-        * @param string    $boardId            掲示板ID
-        * @return int                                          項目数
-        */
-       function getMessageCount($boardId)
-       {
-               $queryStr = 'SELECT * FROM bbs_2ch_thread_message LEFT JOIN bbs_2ch_thread ON te_board_id = th_board_id AND te_thread_id = th_id AND th_deleted = false ';
-               $queryStr .=  'WHERE te_board_id = ? ';
-               $queryStr .=    'AND te_deleted = false ';              // 削除されていない
-               return $this->selectRecordCount($queryStr, array($boardId));
-       }
-       /**
-        * メッセージをシリアル番号で取得(管理用)
-        *
-        * @param string        $serial                         シリアル番号
-        * @param array     $row                                レコード
-        * @return bool                                                 取得 = true, 取得なし= false
-        */
-       function getMessageBySerial($serial, &$row)
-       {
-               $queryStr = 'SELECT * FROM bbs_2ch_thread_message LEFT JOIN bbs_2ch_thread ON te_board_id = th_board_id AND te_thread_id = th_id AND th_deleted = false ';
-               $queryStr .=   'WHERE te_serial = ? ';
-               $ret = $this->selectRecord($queryStr, array($serial), $row);
-               return $ret;
-       }
-       /**
-        * メッセージ項目の削除
-        *
-        * @param array $serial                 シリアルNo
-        * @return                                              true=成功、false=失敗
-        */
-       function delMessage($serial)
-       {
-               $now = date("Y/m/d H:i:s");     // 現在日時
-               $userId = $this->gEnv->getCurrentUserId();      // 現在のユーザ
-               
-               if (!is_array($serial) || count($serial) <= 0) return true;
-               
-               // トランザクション開始
-               $this->startTransaction();
-               
-               // 指定のシリアルNoのレコードが削除状態でないかチェック
-               $delThread = array();                   // 削除するスレッドのID
-               for ($i = 0; $i < count($serial); $i++){
-                       $queryStr  = 'SELECT * FROM bbs_2ch_thread_message ';
-                       $queryStr .=   'WHERE te_deleted = false ';             // 未削除
-                       $queryStr .=     'AND te_serial = ? ';
-                       $ret = $this->selectRecord($queryStr, array($serial[$i]), $row);
-                       
-                       // 存在しない場合は、既に削除されたとして終了
-                       if ($ret){
-                               $boardId = $row['te_board_id'];
-                               $index = $row['te_index'];
-                               if ($index == 1) $delThread[] = $row['te_thread_id'];
-                       } else {
-                               $this->endTransaction();
-                               return false;
-                       }
-               }
-               
-               // レコードを削除
-               $queryStr  = 'UPDATE bbs_2ch_thread_message ';
-               $queryStr .=   'SET te_deleted = true, ';       // 削除
-               $queryStr .=     'te_update_user_id = ?, ';
-               $queryStr .=     'te_update_dt = ? ';
-               $queryStr .=   'WHERE te_serial in (' . implode($serial, ',') . ') ';
-               $this->execStatement($queryStr, array($userId, $now));
-               
-               // スレッド削除
-               if (count($delThread) > 0){
-                       $delId = '';
-                       for ($i = 0; $i < count($delThread); $i++){
-                               $delId .= '\'' . addslashes($delThread[$i]) . '\',';
-                       }
-                       $delId = rtrim($delId, ',');
-                       $queryStr  = 'UPDATE bbs_2ch_thread ';
-                       $queryStr .=   'SET th_deleted = true, ';       // 削除
-                       $queryStr .=     'th_update_user_id = ?, ';
-                       $queryStr .=     'th_update_dt = ? ';
-                       $queryStr .=   'WHERE th_board_id = ? ';
-                       $queryStr .=     'AND th_id in (' . $delId . ') ';
-                       $queryStr .=     'AND th_deleted = false ';
-                       $this->execStatement($queryStr, array($userId, $now, $boardId));
-                       
-                       // 削除するスレッドに属するメッセージはすべて削除
-                       $queryStr  = 'UPDATE bbs_2ch_thread_message ';
-                       $queryStr .=   'SET te_deleted = true, ';       // 削除
-                       $queryStr .=     'te_update_user_id = ?, ';
-                       $queryStr .=     'te_update_dt = ? ';
-                       $queryStr .=   'WHERE te_board_id = ? ';
-                       $queryStr .=     'AND te_thread_id in (' . $delId . ') ';
-                       $queryStr .=     'AND te_deleted = false ';
-                       $this->execStatement($queryStr, array($userId, $now, $boardId));
-               }
-
-               // トランザクション確定
-               $ret = $this->endTransaction();
-               return $ret;
-       }
-       /**
-        * メッセージ項目の更新
-        *
-        * @param int     $serial               シリアルNo
-        * @param string  $userName             投稿者名
-        * @param string  $email                Eメールアドレス
-        * @param string  $message              投稿メッセージ
-        * @return bool                                 true = 成功、false = 失敗
-        */
-       function updateMessage($serial, $userName, $email, $message)
-       {
-               $now = date("Y/m/d H:i:s");     // 現在日時
-               $userId = $this->gEnv->getCurrentUserId();      // 現在のユーザ
-                               
-               // トランザクション開始
-               $this->startTransaction();
-               
-               // メッセージを更新
-               $queryStr  = 'UPDATE bbs_2ch_thread_message ';
-               $queryStr .=   'SET te_user_name = ?, ';
-               $queryStr .=     'te_email = ?, ';
-               $queryStr .=     'te_message = ?, ';
-               $queryStr .=     'te_update_user_id = ?, ';
-               $queryStr .=     'te_update_dt = ? ';
-               $queryStr .=   'WHERE te_serial = ?';
-               $this->execStatement($queryStr, array($userName, $email, $message, $userId, $now, $serial));
-                       
-               // トランザクション確定
-               $ret = $this->endTransaction();
-               return $ret;
-       }
-}
-?>
diff --git a/widgets/m/bbs_2ch/include/help/index.php b/widgets/m/bbs_2ch/include/help/index.php
deleted file mode 100644 (file)
index 3d9354d..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-/**
- * ヘルプリソースファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2008 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 4028 2011-03-11 04:11:33Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-global $HELP;
-
-// ########## コンテンツ一覧 ##########
-$HELP['content']['title'] = 'コンテンツ一覧';
-$HELP['content']['body'] = 'コンテンツの一覧です。';
-$HELP['content_check']['title'] = '選択用チェックボックス';
-$HELP['content_check']['body'] = '編集や削除を行う項目を選択します。';
-$HELP['content_id']['title'] = 'コンテンツID';
-$HELP['content_id']['body'] = 'コンテンツを識別するためのIDです。新規追加時に自動的に設定されます。';
-$HELP['content_name']['title'] = '名前';
-$HELP['content_name']['body'] = 'コンテンツの名前です。コンテンツのタイトルとして表示されます。';
-$HELP['content_visible']['title'] = '公開';
-$HELP['content_visible']['body'] = 'コンテンツをユーザに公開するかどうかを制御します。非公開に設定の場合はユーザから参照することはできません。';
-$HELP['content_limited']['title'] = 'ユーザ制限';
-$HELP['content_limited']['body'] = 'コンテンツの参照をログインしたユーザに限定するかどうかを設定します。チェックが入っているコンテンツはログインユーザだけが参照可能です。';
-$HELP['content_active_term']['title'] = '公開期間';
-$HELP['content_active_term']['body'] = 'コンテンツをユーザに公開する期間を設定します。空の場合は制限なしを示します。';
-$HELP['content_default']['title'] = 'デフォルト項目';
-$HELP['content_default']['body'] = 'URLのパラメータでコンテンツIDが指定されていない場合に表示されるコンテンツを指定します。1つだけ設定可能です。';
-$HELP['content_update_user']['title'] = '更新者';
-$HELP['content_update_user']['body'] = 'コンテンツを更新したユーザです。';
-$HELP['content_update_dt']['title'] = '更新日時';
-$HELP['content_update_dt']['body'] = 'コンテンツを更新した日時です。';
-$HELP['content_view_count']['title'] = '閲覧数';
-$HELP['content_view_count']['body'] = 'コンテンツがユーザに閲覧された回数です。管理者の閲覧はカウントされません。';
-$HELP['content_act']['title'] = '操作';
-$HELP['content_act']['body'] = '各種操作を行います。<br />●メニューに追加<br />「メインメニュー」ウィジェットにコンテンツを表示するメニュー項目を追加します。';
-$HELP['content_html']['title'] = 'HTML';
-$HELP['content_html']['body'] = 'コンテンツの内容となるHTMLです。';
-$HELP['content_ref_custom']['title'] = '置換文字列を参照';
-$HELP['content_ref_custom']['body'] = 'コンテンツに埋め込んだ置換文字列はコンテンツ表示時に設定文字列に変換します。置換文字列の設定値を参照します。';
-$HELP['content_key']['title'] = '外部参照用キー';
-$HELP['content_key']['body'] = '外部ウィジェットからの取得用キーです。';
-$HELP['other_show_title']['title'] = 'コンテンツタイトルの表示';
-$HELP['other_show_title']['body'] = 'コンテンツのタイトルの表示制御を行います。';
-$HELP['other_show_message_deny']['title'] = '参照不可の場合はメッセージを表示';
-$HELP['other_show_message_deny']['body'] = 'ユーザが参照不可のコンテンツにアクセスした場合のメッセージを設定します。';
-$HELP['content_meta_title']['title'] = 'タイトル名';
-$HELP['content_meta_title']['body'] = 'ヘッダ部のtitleタグに設定される文字列です。Webブラウザの画面タイトルとして表示されます。';
-$HELP['content_meta_description']['title'] = 'ページ要約';
-$HELP['content_meta_description']['body'] = 'ヘッダ部のdescriptionタグに設定される文字列です。120文字程度で記述します。';
-$HELP['content_meta_keywords']['title'] = '検索キーワード';
-$HELP['content_meta_keywords']['body'] = 'ヘッダ部のkeywordsタグに設定される文字列です。検索エンジン用のキーワードを「,」区切りで10個以下で記述します。';
-
-$HELP['content_new_btn']['title'] = '新規ボタン';
-$HELP['content_new_btn']['body'] = '新規コンテンツを追加します。';
-$HELP['content_edit_btn']['title'] = '編集ボタン';
-$HELP['content_edit_btn']['body'] = '選択されているコンテンツを編集します。<br />コンテンツを選択するには、一覧の左端のチェックボックスにチェックを入れます。';
-$HELP['content_del_btn']['title'] = '削除ボタン';
-$HELP['content_del_btn']['body'] = '選択されているコンテンツを削除します。<br />コンテンツを選択するには、一覧の左端のチェックボックスにチェックを入れます。';
-$HELP['content_ret_btn']['title'] = '戻るボタン';
-$HELP['content_ret_btn']['body'] = 'コンテンツ一覧へ戻ります。';
-$HELP['content_preview_btn']['title'] = 'プレビューボタン';
-$HELP['content_preview_btn']['body'] = 'コンテンツを表示した実際の画面です。';
-?>
diff --git a/widgets/m/bbs_2ch/include/template/admin_other.tmpl.html b/widgets/m/bbs_2ch/include/template/admin_other.tmpl.html
deleted file mode 100644 (file)
index c0793fd..0000000
+++ /dev/null
@@ -1,204 +0,0 @@
-/**\r
- * 表示データ作成用テンプレート(patTemplate)\r
- *\r
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.\r
- *\r
- * @package    Magic3 Framework\r
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>\r
- * @copyright  Copyright 2006-2013 Magic3 Project.\r
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License\r
- * @version    SVN: $Id$\r
- * @link       http://www.magic3.org\r
- */\r
-<patTemplate:tmpl name="_widget">\r
-<link rel="stylesheet" href="{_ROOT_URL}/scripts/js_color_picker_v2/js_color_picker_v2.css" media="screen" />\r
-<script src="{_ROOT_URL}/scripts/js_color_picker_v2/color_functions.js"></script>\r
-<script type="text/javascript" src="{_ROOT_URL}/scripts/js_color_picker_v2/js_color_picker_v2.js"></script>\r
-<script type="text/javascript">\r
-//<![CDATA[\r
-var imageType = 0;     // 画像タイプ\r
-\r
-function updateItem(){\r
-       if (!window.confirm('設定を更新しますか?')) return false;\r
-       document.main.act.value = 'update';\r
-       document.main.submit();\r
-       return true;\r
-}\r
-// ファイルブラウザ起動\r
-function selectImage(type)\r
-{\r
-       imageType = type;\r
-       m3OpenImageFileBrowser(SetUrl);\r
-}\r
-// ファイルブラウザからの設定用\r
-function SetUrl(url)\r
-{\r
-       // URL設定\r
-       if (imageType == 0){\r
-               $('#top_image').val(url);\r
-       } else if (imageType == 1){\r
-               $('#bg_image').val(url);\r
-       }\r
-}\r
-$(function(){\r
-       // カラー設定\r
-       m3_tableWithScrollbar('item_list', -1, 0);\r
-       \r
-       // エディタ作成\r
-       m3_setHtmlEditor('bbs_guide');\r
-       m3_setHtmlEditor('bottom_message');\r
-});\r
-//]]>\r
-</script>\r
-<div align="center">\r
-{MENU_ITEMS}\r
-<!-- m3:ErrorMessage -->\r
-<form method="post" name="main">\r
-<input type="hidden" name="act" />\r
-<input type="hidden" name="task" value="other" />\r
-<br />\r
-<table><tr><td>\r
-<table id="item_list" class="simple-table" width="900">\r
-    <tbody>\r
-        <tr>\r
-           <td class="table-headside" width="150">掲示板タイトル</td>\r
-           <td colspan="3"><input type="text" name="bbs_title" value="{BBS_TITLE}" size="60" maxlength="100" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">トップ画像リンク先</td>\r
-           <td colspan="3"><input type="text" name="top_link" value="{TOP_LINK}" size="60" maxlength="100" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">トップ画像</td>\r
-           <td colspan="3"><input type="text" id="top_image" name="top_image" value="{TOP_IMAGE}" size="60" maxlength="100" /><input type="button" class="button" onclick="selectImage(0);" value="変更" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">背景画像</td>\r
-           <td colspan="3"><input type="text" id="bg_image" name="bg_image" value="{BG_IMAGE}" size="60" maxlength="100" /><input type="button" class="button" onclick="selectImage(1);" value="変更" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">掲示板規則</td>\r
-           <td colspan="3" height="150"><textarea name="bbs_guide" style="width:100%;height:100%;">{BBS_GUIDE}</textarea></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">画面下部メッセージ</td>\r
-           <td colspan="3" height="150"><textarea name="bottom_message" style="width:100%;height:100%;">{BOTTOM_MESSAGE}</textarea></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">文字色</td>\r
-           <td colspan="3"><input type="text" name="text_color" value="{TEXT_COLOR}" size="10" maxlength="10" /><input type="button" value="カラー" onclick="showColorPicker(this,document.forms[0].text_color);" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">背景色</td>\r
-           <td colspan="3"><input type="text" name="bg_color" value="{BG_COLOR}" size="10" maxlength="10" /><input type="button" value="カラー" onclick="showColorPicker(this,document.forms[0].bg_color);" /></td>\r
-       </tr>\r
-        <!--<tr>\r
-           <td class="table-headside">タイトルカラー</td>\r
-           <td colspan="3"><input type="text" name="title_color" value="{TITLE_COLOR}" size="10" maxlength="10" /><input type="button" value="カラー" onclick="showColorPicker(this,document.forms[0].title_color);" /></td>\r
-       </tr>-->\r
-        <tr>\r
-           <td class="table-headside">メニュー背景色</td>\r
-           <td colspan="3"><input type="text" name="menu_color" value="{MENU_COLOR}" size="10" maxlength="10" /><input type="button" value="カラー" onclick="showColorPicker(this,document.forms[0].menu_color);" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">スレッド表示部背景色</td>\r
-           <td colspan="3"><input type="text" name="thread_color" value="{THREAD_COLOR}" size="10" maxlength="10" /><input type="button" value="カラー" onclick="showColorPicker(this,document.forms[0].thread_color);" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">スレッド作成部背景色</td>\r
-           <td colspan="3"><input type="text" name="makethread_color" value="{MAKETHREAD_COLOR}" size="10" maxlength="10" /><input type="button" value="カラー" onclick="showColorPicker(this,document.forms[0].makethread_color);" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">リンク色</td>\r
-           <td colspan="3"><input type="text" name="link_color" value="{LINK_COLOR}" size="10" maxlength="10" /><input type="button" value="カラー" onclick="showColorPicker(this,document.forms[0].link_color);" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">リンク色(アクティブ)</td>\r
-           <td colspan="3"><input type="text" name="alink_color" value="{ALINK_COLOR}" size="10" maxlength="10" /><input type="button" value="カラー" onclick="showColorPicker(this,document.forms[0].alink_color);" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">リンク色(アクセス済み)</td>\r
-           <td colspan="3"><input type="text" name="vlink_color" value="{VLINK_COLOR}" size="10" maxlength="10" /><input type="button" value="カラー" onclick="showColorPicker(this,document.forms[0].vlink_color);" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">件名文字色</td>\r
-           <td colspan="3"><input type="text" name="subject_color" value="{SUBJECT_COLOR}" size="10" maxlength="10" /><input type="button" value="カラー" onclick="showColorPicker(this,document.forms[0].subject_color);" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">投稿者名文字色</td>\r
-           <td colspan="3"><input type="text" name="name_color" value="{NAME_COLOR}" size="10" maxlength="10" /><input type="button" value="カラー" onclick="showColorPicker(this,document.forms[0].name_color);" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">エラーメッセージ文字色</td>\r
-           <td colspan="3"><input type="text" name="err_message_color" value="{ERR_MESSAGE_COLOR}" size="10" maxlength="10" /><input type="button" value="カラー" onclick="showColorPicker(this,document.forms[0].err_message_color);" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">件名最大長</td>\r
-           <td colspan="3"><input type="text" name="subject_length" value="{SUBJECT_LENGTH}" size="3" maxlength="3" onkeypress="return m3_numericKey(event,true);" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">投稿者名最大長</td>\r
-           <td colspan="3"><input type="text" name="name_length" value="{NAME_LENGTH}" size="2" maxlength="2" onkeypress="return m3_numericKey(event,true);" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">emailアドレス最大長</td>\r
-           <td colspan="3"><input type="text" name="email_length" value="{EMAIL_LENGTH}" size="2" maxlength="2" onkeypress="return m3_numericKey(event,true);" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">投稿文最大長</td>\r
-           <td colspan="3"><input type="text" name="message_length" value="{MESSAGE_LENGTH}" size="4" maxlength="4" onkeypress="return m3_numericKey(event,true);" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">投稿文行長</td>\r
-           <td colspan="3"><input type="text" name="line_length" value="{LINE_LENGTH}" size="3" maxlength="3" onkeypress="return m3_numericKey(event,true);" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">投稿文行数</td>\r
-           <td colspan="3"><input type="text" name="line_count" value="{LINE_COUNT}" size="2" maxlength="2" onkeypress="return m3_numericKey(event,true);" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">レスアンカーリンク数</td>\r
-           <td colspan="3"><input type="text" name="res_anchor_link_count" value="{RES_ANCHOR_LINK_COUNT}" size="2" maxlength="2" onkeypress="return m3_numericKey(event,true);" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">トップ画面のスレッド最大数</td>\r
-           <td colspan="3"><input type="text" name="thread_count" value="{THREAD_COUNT}" size="2" maxlength="2" onkeypress="return m3_numericKey(event,true);" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">トップ画面のレス最大数</td>\r
-           <td colspan="3"><input type="text" name="res_count" value="{RES_COUNT}" size="2" maxlength="2" onkeypress="return m3_numericKey(event,true);" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">投稿可能なレス数の上限</td>\r
-           <td colspan="3"><input type="text" name="thread_res" value="{THREAD_RES}" size="4" maxlength="4" onkeypress="return m3_numericKey(event,true);" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">メニューのスレッド最大数</td>\r
-           <td colspan="3"><input type="text" name="menu_thread_count" value="{MENU_THREAD_COUNT}" size="2" maxlength="2" onkeypress="return m3_numericKey(event,true);" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">名前未設定時の表示名</td>\r
-           <td colspan="3"><input type="text" name="noname_name" value="{NONAME_NAME}" size="30" maxlength="30" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">サイト運営者名</td>\r
-           <td colspan="3"><input type="text" name="admin_name" value="{ADMIN_NAME}" size="30" maxlength="30" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">スレッド終了メッセージ</td>\r
-           <td colspan="3" height="50"><textarea name="thread_end_message" style="width:100%;height:100%;">{THREAD_END_MESSAGE}</textarea></td>\r
-       </tr>\r
-        <!--<tr>\r
-           <td class="table-headside">ファイルアップロード</td>\r
-           <td colspan="3"><input type="checkbox" name="item_required[]" {REQUIRED} /></td>\r
-       </tr>-->\r
-       \r
-    </tbody>\r
-</table>\r
-</td></tr>\r
-<tr><td align="right">\r
-<input type="button" class="button" onclick="updateItem();" value="更新" />\r
-</td></tr></table>\r
-</form>\r
-</div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/bbs_2ch/include/template/main.tmpl.html b/widgets/m/bbs_2ch/include/template/main.tmpl.html
deleted file mode 100644 (file)
index 1baab1a..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<div id="{CSS_ID}" style="padding:10px 0 10px 0;{BBS_STYLE}" >\r
-{TOP_IMAGE}\r
-<!-- m3:ErrorMessage -->\r
-<div style="{MENU_STYLE}">\r
-  <div style="text-align:left;float:left;">{BBS_TITLE}</div>\r
-  <div style="text-align:right;"><a href="{MENU_ANCHOR}">■</a>{FIRST_ANCHOR}</div>\r
-  <div style="clear:both;">{GUIDE}</div>\r
-{AD}\r
-<hr />\r
-<a name="{MENU_NAME}"></a>\r
-  <patTemplate:tmpl name="itemlist"><a href="{URL}" target="_blank">{SUBJECT}</a>&nbsp;</patTemplate:tmpl>\r
-  <div style="text-align:right;"><a href="{SUBJECT_URL}">スレッド一覧はこちら</a></div><br />\r
-</div>\r
-<patTemplate:tmpl name="thread_list">\r
-<div style="{THREAD_STYLE}">\r
-<a id="{INDEX}" name="{INDEX}"></a><div style="text-align:right;"><a href="{MENU_ANCHOR}">■</a><a href="{FORE_ANCHOR}">▲</a><a href="{NEXT_ANCHOR}">▼</a></div>[{INDEX}:{MESSAGE_COUNT}]<span style="color:{SUBJECT_COLOR}">{SUBJECT}</span><br />\r
-  <patTemplate:tmpl name="message_list">{NO} 名前:{NAME}<br />{DATE}<br />{MESSAGE}<br /><br /></patTemplate:tmpl>\r
-<form action="{POST_URL}" method="post" class="form bbs_form" enctype="{ENCTYPE}">\r
-  <input type="hidden" name="task" value="top" />\r
-  <input type="hidden" name="act" value="add" />\r
-  <input type="hidden" name="ticket" value="{TICKET}" />\r
-  <input type="hidden" name="threadid" value="{THREAD_ID}" />\r
-  名前:<br /><input type="text" name="bbs_name" value="{BBS_NAME}" size="19" /><br />E-mail(省略可):<br /><input type="text" name="bbs_email" value="{BBS_EMAIL}" size="19" /><br />\r
-  本文:<br />\r
-  <textarea rows="5" cols="64" wrap="off" name="bbs_message" style="width:100%;">{BBS_MESSAGE}</textarea><br />\r
-  <patTemplate:tmpl name="file_upload" visibility="hidden"><input type="file" name="bbs_file" size="50" /></patTemplate:tmpl>\r
-  <input type="submit" class="button" value="書き込む" /><br />\r
-  <a href="{THREAD_URL}">全部読む</a>\r
-  <a href="{THREAD50_URL}">最新50</a>\r
-  <a href="{THREAD100_URL}">1-100</a>\r
-  <a href="{MENU_ANCHOR}">板のトップ</a>\r
-  <a href="{RELOAD_URL}">リロード</a>\r
-</form>\r
-<hr />\r
-</div>\r
-</patTemplate:tmpl>\r
-<div style="{MAKE_THREAD_STYLE}">\r
-   <form action="{POST_URL}" method="post" class="form">\r
-   <input type="hidden" name="task" value="newthread" />\r
-   <input type="hidden" name="new" value="thread" />\r
-   <input type="submit" class="button" value="新規スレッド作成画面へ" />\r
-   </form>\r
-</div>\r
-{BOTTOM_MESSAGE}\r
-<br />\r
-<a href="{BBS_URL}" accesskey="0">BBSホームに戻る[0]</a>\r
-</div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/bbs_2ch/include/template/message.tmpl.html b/widgets/m/bbs_2ch/include/template/message.tmpl.html
deleted file mode 100644 (file)
index b03b51a..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<patTemplate:tmpl name="_widget">
-<div align="center">
-{MENU_ITEMS}
-<br />
-<h2>{MESSAGE}</h2>
-<!-- m3:ErrorMessage -->
-</div>
-</patTemplate:tmpl>
diff --git a/widgets/m/bbs_2ch/include/template/newthread.tmpl.html b/widgets/m/bbs_2ch/include/template/newthread.tmpl.html
deleted file mode 100644 (file)
index fa89edd..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<form action="{POST_URL}" method="post" class="form bbs_form" enctype="{ENCTYPE}">\r
-<input type="hidden" name="task" value="newthread" />\r
-<input type="hidden" name="act" value="add" />\r
-<input type="hidden" name="ticket" value="{TICKET}" />\r
-<div id="{CSS_ID}" style="padding:10px 0 10px 0;{BBS_STYLE}" >\r
-{TOP_IMAGE}\r
-<!-- m3:ErrorMessage -->\r
-<div style="{MAKE_THREAD_STYLE}">\r
-{BBS_TITLE}<br />\r
-{GUIDE}<br />\r
-<patTemplate:tmpl name="input_area" visibility="hidden">\r
-タイトル:<br />\r
-<input type="text" name="bbs_subject" size="40" value="{SUBJECT}" {SUBJECT_DISABLED}/><br />\r
-名前:<br />\r
-<input type="text" name="bbs_name" size="19" {NAME_DISABLED}/><br />\r
-E-mail(省略可):<br />\r
-<input type="text" name="bbs_email" size="19" {EMAIL_DISABLED}/><br />\r
-内容:<br />\r
-<textarea rows="5" cols="60" wrap="off" name="bbs_message" style="width:100%;" {MESSAGE_DISABLED}>{MESSAGE}</textarea><br />\r
-<patTemplate:tmpl name="file_upload" visibility="hidden"><input type="file" name="bbs_file" size="50" /></patTemplate:tmpl>\r
-<input type="submit" class="button" value="新規スレッド作成" {BUTTON_DISABLED}/>\r
-</patTemplate:tmpl>\r
-<patTemplate:tmpl name="result_area" visibility="hidden">\r
-タイトル:<br />\r
-{SUBJECT}<br />\r
-名前:<br />\r
-{NAME}<br />\r
-E-mail(省略可):<br />\r
-{EMAIL}<br />\r
-内容:<br />\r
-{MESSAGE}<br />\r
-</patTemplate:tmpl>\r
-</div>\r
-<br />\r
-<a href="{BBS_URL}" accesskey="0">BBSホームに戻る[0]</a>\r
-</div>\r
-</form>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/bbs_2ch/include/template/subject.tmpl.html b/widgets/m/bbs_2ch/include/template/subject.tmpl.html
deleted file mode 100644 (file)
index 06e8b89..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<!-- m3:ErrorMessage -->\r
-<div id="{CSS_ID}" style="padding:10px 0 10px 0;{BBS_STYLE}" >\r
-<div style="{MENU_STYLE}">\r
-  <patTemplate:tmpl name="itemlist"><a href="{URL}">{NO}:{SUBJECT}</a><br /></patTemplate:tmpl><br />\r
-</div>\r
-<br />\r
-<a href="{BBS_URL}" accesskey="0">BBSホームに戻る[0]</a>\r
-</div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/bbs_2ch/include/template/thread.tmpl.html b/widgets/m/bbs_2ch/include/template/thread.tmpl.html
deleted file mode 100644 (file)
index 97dcb90..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<div id="{CSS_ID}" style="padding:10px 0 10px 0;{BBS_STYLE}" >\r
-{TOP_IMAGE}\r
-<!-- m3:ErrorMessage -->\r
-<patTemplate:tmpl name="thread_area">\r
-<div style="{THREAD_STYLE}">\r
-  <a href="{THREAD_URL}">全部</a>&nbsp;<a href="{THREAD50_URL}">最新50</a><br />\r
-  <span style="color:{SUBJECT_COLOR}">{SUBJECT}</span><br />\r
-  <patTemplate:tmpl name="message_list">{NO} 名前:{NAME}<br />{DATE}<br />{MESSAGE}<br /><br /></patTemplate:tmpl>\r
-<hr />\r
-<a href="{THREADNEW_URL}">新着レスの表示</a>\r
-<hr />\r
-  <a href="{THREAD_URL}">全部読む</a>&nbsp;<a href="{THREAD50_URL}">最新50</a>&nbsp;<a href="{THREAD100_URL}">1-100</a><br />\r
-<form action="{POST_URL}" method="post" class="form bbs_form" enctype="{ENCTYPE}">\r
-  <input type="hidden" name="task" value="read" />\r
-  <input type="hidden" name="act" value="add" />\r
-  <input type="hidden" name="ticket" value="{TICKET}" />\r
-  <input type="hidden" name="threadid" value="{THREAD_ID}" />\r
-  名前:<br /><input type="text" name="bbs_name" value="{BBS_NAME}" size="19" {NAME_DISABLED}/><br />E-mail(省略可):<br /><input type="text" name="bbs_email" value="{BBS_EMAIL}" size="19" {EMAIL_DISABLED}/><br />\r
-  本文:<br />\r
-  <textarea rows="5" cols="64" wrap="off" name="bbs_message" style="width:100%;" {MESSAGE_DISABLED}>{BBS_MESSAGE}</textarea><br />\r
-  <patTemplate:tmpl name="file_upload" visibility="hidden"><input type="file" name="bbs_file" size="50" /></patTemplate:tmpl>\r
-  <input type="submit" class="button" value="書き込む" {BUTTON_DISABLED}/>\r
-</form>\r
-</div>\r
-</patTemplate:tmpl>\r
-<br />\r
-<a href="{BBS_URL}" accesskey="0">BBSホームに戻る[0]</a>\r
-</div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/bbs_2ch/index.php b/widgets/m/bbs_2ch/index.php
deleted file mode 100644 (file)
index 25e40ae..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2010 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 4028 2011-03-11 04:11:33Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/bbs_2ch_search_box/images/icon32.png b/widgets/m/bbs_2ch_search_box/images/icon32.png
deleted file mode 100644 (file)
index 84553c1..0000000
Binary files a/widgets/m/bbs_2ch_search_box/images/icon32.png and /dev/null differ
diff --git a/widgets/m/bbs_2ch_search_box/images/icon64.png b/widgets/m/bbs_2ch_search_box/images/icon64.png
deleted file mode 100644 (file)
index dd54d9c..0000000
Binary files a/widgets/m/bbs_2ch_search_box/images/icon64.png and /dev/null differ
diff --git a/widgets/m/bbs_2ch_search_box/include/container/m_bbs_2ch_search_boxWidgetContainer.php b/widgets/m/bbs_2ch_search_box/include/container/m_bbs_2ch_search_boxWidgetContainer.php
deleted file mode 100644 (file)
index 47f7e47..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2011 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_bbs_2ch_search_boxWidgetContainer.php 4047 2011-03-27 05:11:08Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath()          . '/baseMobileWidgetContainer.php');
-
-class m_bbs_2ch_search_boxWidgetContainer extends BaseMobileWidgetContainer
-{
-       const TARGET_WIDGET = 'm/bbs_2ch';              // 呼び出しウィジェットID
-       const DEFAULT_TITLE = '2ちゃんねる風BBS検索';           // デフォルトのウィジェットタイトル名
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {       
-               return 'index.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $act = $request->trimValueOf('act');
-               if ($act == 'bbs_search'){                      // ブログ検索のとき
-                       // キーワード取得
-                       $keyword = $request->mobileTrimValueOf('keyword');
-                       
-                       // ブログメインに検索結果を表示させる
-                       $url = $this->gPage->createWidgetCmdUrl(self::TARGET_WIDGET, $this->gEnv->getCurrentWidgetId(), M3_REQUEST_PARAM_KEYWORD . '=' . urlencode($keyword));
-                       $this->gPage->redirect($url, true/*遷移時のダイアログ表示を抑止*/);
-               }
-               // パラメータを埋め込む
-               $this->tmpl->addVar("_widget", "url", $this->gEnv->createCurrentPageUrlForMobile());
-       }
-       /**
-        * ウィジェットのタイトルを設定
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               ウィジェットのタイトル名
-        */
-       function _setTitle($request, &$param)
-       {
-               return self::DEFAULT_TITLE;
-       }
-}
-?>
diff --git a/widgets/m/bbs_2ch_search_box/include/template/index.tmpl.html b/widgets/m/bbs_2ch_search_box/include/template/index.tmpl.html
deleted file mode 100644 (file)
index 5e4969a..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<patTemplate:tmpl name="_widget">
-<form action="{URL}" method="post" name="bbs_2ch_search_box" class="form">
-<input type="hidden" name="act" value="bbs_search" />
-<div><input type="text" name="keyword" size="16" maxlength="16" /><input type="submit" value="検索" /></div>
-</form>
-</patTemplate:tmpl>
diff --git a/widgets/m/bbs_2ch_search_box/index.php b/widgets/m/bbs_2ch_search_box/index.php
deleted file mode 100644 (file)
index 29e9b14..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2011 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 4043 2011-03-23 11:23:26Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/blog/admin/index.php b/widgets/m/blog/admin/index.php
deleted file mode 100644 (file)
index d5bf05a..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 3452 2010-08-04 09:14:14Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/blog/images/icon32.png b/widgets/m/blog/images/icon32.png
deleted file mode 100644 (file)
index cc2ef6f..0000000
Binary files a/widgets/m/blog/images/icon32.png and /dev/null differ
diff --git a/widgets/m/blog/images/icon64.png b/widgets/m/blog/images/icon64.png
deleted file mode 100644 (file)
index b2b734e..0000000
Binary files a/widgets/m/blog/images/icon64.png and /dev/null differ
diff --git a/widgets/m/blog/include/container/admin_m_blogBaseWidgetContainer.php b/widgets/m/blog/include/container/admin_m_blogBaseWidgetContainer.php
deleted file mode 100644 (file)
index e505841..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2010 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: admin_m_blogBaseWidgetContainer.php 3836 2010-11-17 06:05:07Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseAdminWidgetContainer.php');
-require_once($gEnvManager->getCurrentWidgetDbPath() . '/blogDb.php');
-
-class admin_m_blogBaseWidgetContainer extends BaseAdminWidgetContainer
-{
-       protected $_db;                 // DB接続オブジェクト
-       protected $_blogId;     // ブログID
-       const DEFAULT_TOP_PAGE = 'config';              // デフォルトのトップページ
-       const WIDGET_TITLE_NAME = 'ブログ(携帯)';                          // ウィジェットタイトル名
-       const CF_ENTRY_VIEW_COUNT               = 'm:entry_view_count';                 // 記事表示数
-       const CF_ENTRY_VIEW_ORDER               = 'm:entry_view_order';                 // 記事表示方向
-       const CF_TITLE_COLOR                    = 'm:title_color';                      // タイトルの背景色
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-               
-               // サブウィジェット起動のときだけ初期処理実行
-               if ($this->gEnv->getIsSubWidget()){
-                       // DBオブジェクト作成
-                       $this->_db = new blogDb();
-               
-                       $this->_blogId = '';
-               
-                       // ブログ定義を読み込む
-                       $this->_loadConfig($this->_blogId);
-               }
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @return                                                              なし
-        */
-       function _postAssign($request, &$param)
-       {
-               // ウィンドウオープンタイプ取得
-               $openBy = $request->trimValueOf(M3_REQUEST_PARAM_OPEN_BY);              // ウィンドウオープンタイプ
-               if (!empty($openBy)) $this->addOptionUrlParam(M3_REQUEST_PARAM_OPEN_BY, $openBy);
-               
-               // 表示画面を決定
-               $task = $request->trimValueOf(M3_REQUEST_PARAM_OPERATION_TASK);
-               if (empty($task)) $task = self::DEFAULT_TOP_PAGE;
-               
-               // パンくずリストを作成
-               switch ($task){
-                       case 'config':          // 基本設定
-                               $linkList = ' &gt;&gt; 基本設定';// パンくずリスト
-                               break;
-               }
-               // ####### 上段メニューの作成 #######
-               $menuText = '<div id="configmenu-upper">' . M3_NL;
-               $menuText .= '<ul>' . M3_NL;
-               $baseUrl = $this->getAdminUrlWithOptionParam(true);// 画面定義ID付き
-
-               // その他設定
-               $current = '';
-               $link = $baseUrl . '&task=config';
-               if ($task == 'config'){         
-                       $current = 'id="current"';
-               }
-               $menuText .= '<li ' . $current . '><a href="'. $this->getUrl($link, true) .'"><span>基本設定</span></a></li>' . M3_NL;
-               
-               // 上段メニュー終了
-               $menuText .= '</ul>' . M3_NL;
-               $menuText .= '</div>' . M3_NL;
-               
-               // 作成データの埋め込み
-               $linkList = '<div id="configmenu-top"><label>' . self::WIDGET_TITLE_NAME . $linkList . '</div>';
-               $outputText .= '<table width="90%"><tr><td>' . $linkList . $menuText . '</td></tr></table>' . M3_NL;
-               $this->tmpl->addVar("_widget", "menu_items", $outputText);
-       }
-       /**
-        * ブログ定義値をDBから取得
-        *
-        * @param string $blogId        ブログID
-        * @return bool                         true=取得成功、false=取得失敗
-        */
-       function _loadConfig($blogId)
-       {
-               $this->_configArray = array();
-
-               // BBS定義を読み込み
-               $ret = $this->_db->getAllConfig($rows, $blogId);
-               if ($ret){
-                       // 取得データを連想配列にする
-                       $configCount = count($rows);
-                       for ($i = 0; $i < $configCount; $i++){
-                               $key = $rows[$i]['bg_id'];
-                               $value = $rows[$i]['bg_value'];
-                               $this->_configArray[$key] = $value;
-                       }
-               }
-               return $ret;
-       }
-}
-?>
diff --git a/widgets/m/blog/include/container/admin_m_blogConfigWidgetContainer.php b/widgets/m/blog/include/container/admin_m_blogConfigWidgetContainer.php
deleted file mode 100644 (file)
index 40cb5bf..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2010 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: admin_m_blogConfigWidgetContainer.php 3836 2010-11-17 06:05:07Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getCurrentWidgetContainerPath() . '/admin_m_blogBaseWidgetContainer.php');
-
-class admin_m_blogConfigWidgetContainer extends admin_m_blogBaseWidgetContainer
-{
-       const DEFAULT_VIEW_COUNT        = 3;                            // デフォルトの表示記事数
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'admin_config.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $defaultLang    = $this->gEnv->getDefaultLanguage();
-               
-               $act = $request->trimValueOf('act');
-               $entryViewCount = $request->trimValueOf('item_entry_view_count');               // 記事表示数
-               $entryViewOrder = $request->trimValueOf('item_entry_view_order');               // 記事表示順
-               $titleColor = $request->trimValueOf('item_title_color');                                        // タイトルの背景色
-               
-               $reloadData = false;            // データの再読み込み
-               if ($act == 'update'){          // 設定更新のとき
-                       // 入力値のエラーチェック
-                       $this->checkNumeric($entryViewCount, '記事表示順');
-                       
-                       if ($this->getMsgCount() == 0){                 // エラーのないとき
-                               $isErr = false;
-                               
-                               if (!$isErr){
-                                       if (!$this->_db->updateConfig(self::CF_ENTRY_VIEW_COUNT, $entryViewCount)) $isErr = true;// 記事表示数
-                               }
-                               if (!$isErr){
-                                       if (!$this->_db->updateConfig(self::CF_ENTRY_VIEW_ORDER, $entryViewOrder)) $isErr = true;// 記事表示順
-                               }
-                               if (!$isErr){
-                                       if (!$this->_db->updateConfig(self::CF_TITLE_COLOR, $titleColor)) $isErr = true;// タイトルの背景色
-                               }
-
-                               if ($isErr){
-                                       $this->setMsg(self::MSG_APP_ERR, 'データ更新に失敗しました');
-                               } else {
-                                       $this->setMsg(self::MSG_GUIDANCE, 'データを更新しました');
-                                       
-                                       // ブログ定義を読み込む
-                                       $this->_loadConfig($this->_blogId);
-                                       $reloadData = true;             // データの再読み込み
-                               }
-                       }
-               } else {                // 初期表示の場合
-                       $reloadData = true;             // データの再読み込み
-               }
-               // データ再取得
-               if ($reloadData){
-                       $entryViewCount = $this->_configArray[self::CF_ENTRY_VIEW_COUNT];// 記事表示数
-                       $entryViewOrder = $this->_configArray[self::CF_ENTRY_VIEW_ORDER];// 記事表示順
-                       $titleColor = $this->_configArray[self::CF_TITLE_COLOR];                // タイトルの背景色
-               }
-               // 画面に書き戻す
-               $this->tmpl->addVar("_widget", "view_count", $entryViewCount);// 記事表示数
-               if (empty($entryViewOrder)){    // 順方向
-                       $this->tmpl->addVar("_widget", "view_order_inc_selected", 'selected');// 記事表示順
-               } else {
-                       $this->tmpl->addVar("_widget", "view_order_dec_selected", 'selected');// 記事表示順
-               }
-               $this->tmpl->addVar("_widget", "title_color", $titleColor);// タイトルの背景色
-       }
-}
-?>
diff --git a/widgets/m/blog/include/container/admin_m_blogWidgetContainer.php b/widgets/m/blog/include/container/admin_m_blogWidgetContainer.php
deleted file mode 100644 (file)
index 1a26d3b..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2010 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: admin_m_blogWidgetContainer.php 3459 2010-08-07 08:04:18Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getCurrentWidgetContainerPath() . '/admin_m_blogBaseWidgetContainer.php');
-
-class admin_m_blogWidgetContainer extends admin_m_blogBaseWidgetContainer
-{
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * ディスパッチ処理(メインコンテナのみ実行)
-        *
-     * HTTPリクエストの内容を見て処理をコンテナに振り分ける
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return bool                                                 このクラスの_setTemplate(), _assign()へ処理を継続するかどうかを返す。
-        *                                      true=処理を継続、false=処理を終了
-        */
-       function _dispatch($request, &$param)
-       {
-               // 表示画面を決定
-               $task = $request->trimValueOf(M3_REQUEST_PARAM_OPERATION_TASK);
-               if (empty($task)) $task = self::DEFAULT_TOP_PAGE;
-               
-               // コンテナを起動
-               $goWidget = false;              // サブウィジェットを実行するかどうか
-               switch ($task){
-                       case 'config':          // 基本設定
-                               $goWidget = true;               // サブウィジェットを実行するかどうか
-                               break;
-                       default:
-                               break;
-               }
-               if ($goWidget){         // サブウィジェットを実行するかどうか
-                       $this->gLaunch->goSubWidget($task, true);               // 管理者機能で呼び出し
-                       return false;
-               } else {
-                       $this->SetMsg(self::MSG_APP_ERR, "画面が見つかりません");
-                       return true;
-               }
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'admin_message.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @return                                                              なし
-        */
-       function _assign($request, &$param)
-       {
-       }
-}
-?>
diff --git a/widgets/m/blog/include/container/m_blogBaseWidgetContainer.php b/widgets/m/blog/include/container/m_blogBaseWidgetContainer.php
deleted file mode 100644 (file)
index 76ec931..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2010 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_blogBaseWidgetContainer.php 3836 2010-11-17 06:05:07Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseMobileWidgetContainer.php');
-require_once($gEnvManager->getCurrentWidgetDbPath() . '/blogDb.php');
-
-class m_blogBaseWidgetContainer extends BaseMobileWidgetContainer
-{
-       protected $_db;                 // DB接続オブジェクト
-       protected $_mobileId;           // 携帯ID
-       protected $_blogId;     // ブログID
-       protected $_spacer;             // スペーサ
-       protected $_currentPageUrl;// 現在のページのURL(携帯用のパラメータ付き)
-       // 表示設定
-       const ERR_MESSAGE_COLOR = '#ff0000';                    // エラーメッセージカラー
-       const SPACER_FORMAT = '<div style="background-color:#aaaaaa;margin:1px 0;height:1px;"><img src="%s/images/system/spacer.gif" width="1" height="1" /></div>';            // スペーサフォーマット
-       const LINK_PAGE_COUNT           = 5;                    // リンクページ数
-       const SEARCH_BODY_SIZE = 200;                   // 検索結果の記事本文の文字列最大長
-       
-       // 値定義
-       const CF_ENTRY_VIEW_COUNT               = 'm:entry_view_count';                 // 記事表示数
-       const CF_ENTRY_VIEW_ORDER               = 'm:entry_view_order';                 // 記事表示方向
-       const CF_SEARCH_COUNT           = 'm:search_count';             // 検索記事数
-       const CF_SEARCH_ORDER           = 'm:search_order';             // 検索記事表示方向
-       const CF_TITLE_COLOR                    = 'm:title_color';                      // タイトルの背景色
-       
-       // 画面
-       const DEFAULT_TASK = 'read';            // デフォルトの画面
-       const TASK_READ = 'read';               // スレッド表示
-       // URL用パラメータ
-//     const URL_PARAM_MEMBER_ID = 'memberid';         // 会員ID
-//     const URL_PARAM_MESSAGE_ID = 'messageid';               // メッセージID
-       // 共通のCSS
-       const CSS_LINK_STYLE_BOTTOM = 'text-align:center;';                                     // 下のリンク部のスタイル
-       const CSS_LINK_STYLE_INNER_BOTTOM = 'text-align:right;';        // 内枠の下のリンク部のスタイル
-       // 画面タイトル
-       const DEFAULT_TITLE_SEARCH = '検索';          // 検索時のデフォルトタイトル
-       // 表示メッセージ
-       const MESSAGE_NO_ENTRY_TITLE = 'ブログ記事未登録';
-       const MESSAGE_NO_ENTRY          = 'ブログ記事は登録されていません';                              // ブログ記事が登録されていないメッセージ
-       const MESSAGE_FIND_NO_ENTRY     = 'ブログ記事が見つかりません';
-       const MESSAGE_EXT_ENTRY         = '続きを読む';                                    // 投稿記事に続きがある場合の表示
-       const MESSAGE_EXT_ENTRY_PRE     = '…&nbsp;';                                                  // 投稿記事に続きがある場合の表示
-       const MESSAGE_SEARCH_KEYWORD = '検索キーワード:&nbsp;';                               // 検索キーワード用ラベル
-       // アクセス分析用
-       const CONTENT_TYPE = 'bg';              // 参照数カウント用
-               
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-                               
-               // 端末IDを取得
-               $this->_mobileId = $this->gEnv->getMobileId();
-                                       
-               // サブウィジェット起動のときだけ初期処理実行
-               if ($this->gEnv->getIsSubWidget()){
-                       // DBオブジェクト作成
-                       $this->_db = new blogDb();
-               
-                       // 定義ID取得
-                       // 定義IDから掲示板IDを作成
-                       $configId = $this->gEnv->getCurrentWidgetConfigId();
-                       $this->_blogId = '';
-               
-                       // BBS定義を読み込む
-                       $this->_loadConfig($this->_blogId);
-               
-                       //$this->_currentPageUrl = $this->gEnv->createCurrentPageUrl(); // 現在のページのURL
-                       $this->_currentPageUrl = $this->gEnv->createCurrentPageUrlForMobile();// 現在のページのURL(携帯用のパラメータ付き)
-                       
-                       // スペーサ作成
-                       $this->_spacer = sprintf(self::SPACER_FORMAT, $this->getUrl($this->gEnv->getRootUrl()));
-               }
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @return                                                              なし
-        */
-       function _postAssign($request, &$param)
-       {
-               // 共通のリンク設定
-               $this->tmpl->addVar("_widget", "link_style_bottom", self::CSS_LINK_STYLE_BOTTOM);// 下のリンク部のスタイル
-               $this->tmpl->addVar("_widget", "link_style_inner_bottom", self::CSS_LINK_STYLE_INNER_BOTTOM);// 内枠下のリンク部のスタイル
-               $this->tmpl->addVar('_widget', 'top_url', $this->gEnv->createCurrentPageUrlForMobile(''));
-               
-               // メッセージカラーを設定
-               if ($this->getMsgCount(1) > 0 || $this->getMsgCount(2) > 0){            // エラーメッセージが出力されているとき
-                       $errMessageColor = self::ERR_MESSAGE_COLOR;             // エラーメッセージ色
-                       $errMessageStyle = '';
-                       if (!empty($errMessageColor)) $errMessageStyle .= 'color:' . $errMessageColor . ';';
-                       $attr = 'style="' . $errMessageStyle . 'text-align:center;"';
-                       $this->setMessageAttr($attr);
-               } else if ($this->getMsgCount(3) > 0){                  // ガイダンスメッセージが出力されているとき
-                       $attr = 'style="text-align:center;"';
-                       $this->setMessageAttr($attr);
-               }
-       }
-       /**
-        * ブログ定義値をDBから取得
-        *
-        * @param string $blogId        ブログID
-        * @return bool                         true=取得成功、false=取得失敗
-        */
-       function _loadConfig($blogId)
-       {
-               $this->_configArray = array();
-
-               // BBS定義を読み込み
-               $ret = $this->_db->getAllConfig($rows, $blogId);
-               if ($ret){
-                       // 取得データを連想配列にする
-                       $configCount = count($rows);
-                       for ($i = 0; $i < $configCount; $i++){
-                               $key = $rows[$i]['bg_id'];
-                               $value = $rows[$i]['bg_value'];
-                               $this->_configArray[$key] = $value;
-                       }
-               }
-               return $ret;
-       }
-       /**
-        * メッセージを表示用に変換
-        *
-        * @param string $message               変換元メッセージ
-        * @param string $threadId              スレッドID
-        * @return string                               変換後メッセージ
-        */
-       function convDispMessage($message, $threadId)
-       {
-               // リンク変換
-               /*if (!empty($this->_autolink)){                // 自動リンク作成のとき
-                       $message = preg_replace("/(https?):\/\/([\w;\/\?:\@&=\+\$,\-\.!~\*'\(\)%#]+)/", "<a href=\"$1://$2\" target=\"_blank\">$1://$2</a>", $message);
-               
-                       // メッセージへのリンク
-               //      $baseUrl = $this->convertUrlToHtmlEntity($this->getUrl($this->_currentPageUrl . '&' . M3_REQUEST_PARAM_BBS_THREAD_ID . '=' . $threadId, true));
-                       $messageUrl = $baseUrl . $this->convertUrlToHtmlEntity('&' . M3_REQUEST_PARAM_ITEM_NO . '=');
-                       $messageListUrl = $baseUrl . $this->convertUrlToHtmlEntity('&' . M3_REQUEST_PARAM_LIST_NO . '=');
-                       $message = preg_replace("/&gt;&gt;([0-9]+)(?![-\d])/", '<a href="' . $messageUrl . '$1" target="_blank">&gt;&gt;$1</a>', $message);
-                       $message = preg_replace("/&gt;&gt;([0-9]+)\-([0-9]+)/", '<a href="' . $messageListUrl . '$1-$2" target="_blank">&gt;&gt;$1-$2</a>', $message);
-               }*/
-               return $message;
-       }
-       /**
-        * テキストデータを表示用のテキストに変換
-        *
-        * 変換内容 ・改行コードをスペース「&nbsp;」に変換
-        *
-        * @param string $src                   変換するデータ
-        * @return string                               変換後データ
-        */
-       function _convertToPreviewTextWithSpace($src)
-       {
-               return preg_replace("/(\015\012)|(\015)|(\012)/", "&nbsp;", $src);
-       }
-}
-?>
diff --git a/widgets/m/blog/include/container/m_blogReadWidgetContainer.php b/widgets/m/blog/include/container/m_blogReadWidgetContainer.php
deleted file mode 100644 (file)
index 8a67c3d..0000000
+++ /dev/null
@@ -1,475 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2010 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_blogReadWidgetContainer.php 3836 2010-11-17 06:05:07Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getCurrentWidgetContainerPath() .   '/m_blogBaseWidgetContainer.php');
-
-class m_blogReadWidgetContainer extends m_blogBaseWidgetContainer
-{
-       private $messageCount;                  // メッセージ数
-       private $isExistsMessage;       // メッセージが存在するかどうか
-       private $isExistsNextPage;      // 次のページがあるかどうか
-       private $pageTitle;                             // 画面タイトル、パンくずリスト用タイトル
-       const DEFAULT_SEARCH_COUNT      = 5;                            // デフォルトの検索記事数
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'thread_read.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               // パラメータ初期化
-               $now = date("Y/m/d H:i:s");     // 現在日時
-               $this->currentDay = date("Y/m/d");              // 日
-               $this->currentHour = (int)date("H");            // 時間
-               $this->langId = $this->gEnv->getCurrentLanguage();
-               $this->pageTitle = '';          // 画面タイトル、パンくずリスト用タイトル
-               
-               // 定義値取得
-               $entryViewCount = $this->_configArray[self::CF_ENTRY_VIEW_COUNT];// 記事表示数
-               if (empty($entryViewCount)) $entryViewCount = self::DEFAULT_VIEW_COUNT;
-               $entryViewOrder = $this->_configArray[self::CF_ENTRY_VIEW_ORDER];// 記事表示順
-               $titleColor = $this->_configArray[self::CF_TITLE_COLOR];// タイトル背景色
-                       
-               // 入力値取得
-               $act = $request->trimValueOf('act');
-               $pageNo = $request->trimIntValueOf(M3_REQUEST_PARAM_PAGE_NO, '1');                              // ページ番号
-               $entryId = $request->trimValueOf('entryid');
-               $startDt = $request->trimValueOf('start');
-               $endDt = $request->trimValueOf('end');
-               $year = $request->trimValueOf('year');          // 年指定
-               $month = $request->trimValueOf('month');                // 月指定
-               $day = $request->trimValueOf('day');            // 日指定
-               //$keyword = $request->trimValueOf('keyword');// 検索キーワード
-               $keyword = $request->mobileTrimValueOf('keyword');// 検索キーワード
-               $category = $request->trimValueOf(M3_REQUEST_PARAM_CATEGORY_ID);                // カテゴリID
-
-               $showDefault = false;                   // デフォルト状態での表示
-               if ($act == 'search'){                  // 検索
-                       // キーワード検索のとき
-                       if (empty($keyword)){
-                               $message = '検索キーワードが入力されていません';
-                       } else {
-                               // 検索項目数
-                               $searchCount = self::DEFAULT_SEARCH_COUNT;              // 検索記事数
-                               
-                               // 検索キーワードを記録
-                               $this->gInstance->getAnalyzeManager()->logSearchWord($this->gEnv->getCurrentWidgetId(), $keyword);
-                               
-                               /*
-                               // 検索キーワードログを残す
-                               // スペース区切りの場合はワードを分割
-                                                               
-                               // 全角英数を半角に、半角カナ全角ひらがなを全角カナに変換
-                               $basicWord = $keyword;
-                               if (function_exists('mb_convert_kana')) $basicWord = mb_convert_kana($basicWord, 'aKCV');
-                               $basicWord = strtolower($basicWord);            // 大文字を小文字に変換
-                               
-                               // 検索キーワードログ書き込み
-                               $cid = $this->gAccess->getClientId();// クッキー値のクライアントID
-                               //$this->db->writeKeywordLog($cid, $this->gEnv->getCurrentWidgetId(), $keyword, $basicWord);
-                               */
-                               
-                               // 総数を取得
-                               $totalCount = $this->_db->searchEntryItemsCountByKeyword($now, $keyword, $this->langId);
-
-                               // リンク文字列作成、ページ番号調整
-                               $convKeyword = $request->convMobileText($keyword);              // 検索キーワードを携帯用のコードへ変換
-                               $pageLink = $this->createPageLink($pageNo, $totalCount, $searchCount, $this->_currentPageUrl . '&act=search&keyword=' . urlencode($convKeyword));
-                               
-                               // 記事一覧を表示
-                               $this->_db->searchEntryItemsByKeyword($searchCount, $pageNo, $now, $keyword, $this->langId, array($this, 'searchItemsLoop'));
-                               
-                               if ($this->isExistsViewData){
-                                       // ページリンクを埋め込む
-                                       if (!empty($pageLink)){
-                                               $this->tmpl->setAttribute('page_link', 'visibility', 'visible');                // リンク表示
-                                               $this->tmpl->addVar("page_link", "page_link", $pageLink);
-                                       }
-                                       $message = self::MESSAGE_SEARCH_KEYWORD . $keyword;
-                               } else {        // 検索結果なしの場合
-                                       $this->tmpl->setAttribute('entrylist', 'visibility', 'hidden');
-                                       $message = self::MESSAGE_FIND_NO_ENTRY;
-                               }
-                       }
-                       $this->setGuidanceMsg($message);                        // ユーザ向けメッセージ
-                       $this->pageTitle = self::DEFAULT_TITLE_SEARCH;          // 画面タイトル、パンくずリスト用タイトル
-               } else if ($act == 'view'){                     // 記事を表示のとき
-                       // コメントを受け付けるときは、コメント入力欄を表示
-                       // ***** 記事を表示する前に呼び出す必要あり *****
-                       /*if (!empty($receiveComment)){
-                               $this->tmpl->setAttribute('entry_footer', 'visibility', 'visible');             // コメントへのリンク
-                       }*/
-                       if (!empty($category)){                         // カテゴリー指定のとき
-                               // 総数を取得
-                               $totalCount = $this->_db->getEntryItemsCountByCategory($now, $category, $this->langId);
-
-                               // リンク文字列作成、ページ番号調整
-                               $pageLink = $this->createPageLink($pageNo, $totalCount, $entryViewCount, $this->_currentPageUrl . '&act=view&' . M3_REQUEST_PARAM_CATEGORY_ID . '=' . $category);
-                               
-                               // 記事一覧を表示
-                               $this->_db->getEntryItemsByCategory($entryViewCount, $pageNo, $now, $category, $this->langId, $entryViewOrder, array($this, 'itemsLoop'));
-
-                               // タイトルの設定
-                               $ret = $this->_db->getCategoryByCategoryId($category, $this->gEnv->getDefaultLanguage(), $row);
-                               if ($ret) $title = $row['bc_name'];
-                               
-                               // ブログ記事データがないときはデータなしメッセージ追加
-                               if ($this->isExistsViewData){
-                                       // ページリンクを埋め込む
-                                       if (!empty($pageLink)){
-                                               $this->tmpl->setAttribute('page_link', 'visibility', 'visible');                // リンク表示
-                                               $this->tmpl->addVar("page_link", "page_link", $pageLink);
-                                       }
-                               } else {
-                                       $title = self::MESSAGE_NO_ENTRY_TITLE;
-                                       $this->setGuidanceMsg(self::MESSAGE_NO_ENTRY);                  // ユーザ向けメッセージ
-                               }
-                       } else if (!empty($year) && !empty($month)){
-                               if (empty($day)){               // 月指定のとき
-                                       $startDt = $year . '/' . $month . '/1';
-                                       $endDt = $this->getNextMonth($year . '/' . $month) . '/1';
-                                       
-                                       // 総数を取得
-                                       $totalCount = $this->_db->getEntryItemsCount($now, $startDt, $endDt, $this->langId);
-
-                                       // リンク文字列作成、ページ番号調整
-                                       $pageLink = $this->createPageLink($pageNo, $totalCount, $entryViewCount, $this->_currentPageUrl . '&act=view&year=' . $year . '&month=' . $month);
-                               
-                                       // 記事一覧作成
-                                       $this->_db->getEntryItems($entryViewCount, $pageNo, $now, $entryId, $startDt/*期間開始*/, $endDt/*期間終了*/, $this->langId, $entryViewOrder, array($this, 'itemsLoop'));
-
-                                       if ($this->isExistsViewData){
-                                               // ページリンクを埋め込む
-                                               if (!empty($pageLink)){
-                                                       $this->tmpl->setAttribute('page_link', 'visibility', 'visible');                // リンク表示
-                                                       $this->tmpl->addVar("page_link", "page_link", $pageLink);
-                                               }
-                                       }
-                                       // 年月の表示
-                                       $title = $year . '年 ' . $month . '月';
-                                       
-                                       // ブログ記事データがないときはデータなしメッセージ追加
-                                       if (!$this->isExistsViewData) $this->setGuidanceMsg(self::MESSAGE_NO_ENTRY);                    // ユーザ向けメッセージ
-                               } else {
-                                       $startDt = $year . '/' . $month . '/' . $day;
-                                       $endDt = $this->getNextDay($year . '/' . $month . '/' . $day);
-                                       
-                                       // 総数を取得
-                                       $totalCount = $this->_db->getEntryItemsCount($now, $startDt, $endDt, $this->langId);
-
-                                       // リンク文字列作成、ページ番号調整
-                                       $pageLink = $this->createPageLink($pageNo, $totalCount, $entryViewCount, $this->_currentPageUrl . '&act=view&year=' . $year . '&month=' . $month . '&day=' . $day);
-                                       
-                                       // 記事一覧作成
-                                       $this->_db->getEntryItems($entryViewCount, $pageNo, $now, $entryId, $startDt/*期間開始*/, $endDt/*期間終了*/, $this->langId, $entryViewOrder, array($this, 'itemsLoop'));
-                                       
-                                       if ($this->isExistsViewData){
-                                               // ページリンクを埋め込む
-                                               if (!empty($pageLink)){
-                                                       $this->tmpl->setAttribute('page_link', 'visibility', 'visible');                // リンク表示
-                                                       $this->tmpl->addVar("page_link", "page_link", $pageLink);
-                                               }
-                                       }
-                                       
-                                       // 年月日の表示
-                                       $title = $year . '年 ' . $month . '月 ' . $day . '日';
-                                       
-                                       // ブログ記事データがないときはデータなしメッセージ追加
-                                       if (!$this->isExistsViewData) $this->setGuidanceMsg(self::MESSAGE_NO_ENTRY);                    // ユーザ向けメッセージ
-                               }
-                       }
-                       $this->pageTitle = $title;              // カテゴリー名を画面タイトルにする
-               } else {
-                       $showDefault = true;                    // デフォルト状態での表示
-               }
-               // ##### デフォルトの表示では、最新のn件の記事を表示または、記事ID指定で1つの記事を表示
-               if ($showDefault){
-                       // コメントを受け付けるときは、コメント入力欄を表示
-                       if (!empty($receiveComment)){
-                               if (empty($entryId)){           
-                                       $this->tmpl->setAttribute('entry_footer', 'visibility', 'visible');             // コメントへのリンク
-                               } else {                // 記事ID指定の場合のみコメント入力可能
-                                       $this->isOutputComment = true;// コメントを出力するかどうか
-                                       
-                                       $this->tmpl->setAttribute('show_comment', 'visibility', 'visible');             // 既存コメントを表示
-                                       $this->tmpl->addVar("_widget", "entry_id", $entryId);           // 記事を指定
-                                       
-                                       // ### コメント入力欄の表示 ###
-                                       $this->tmpl->setAttribute('add_comment', 'visibility', 'visible');
-                                       $this->tmpl->addVar("add_comment", "send_button_label", $sendButtonLabel);// 送信ボタンラベル
-                                       $this->tmpl->addVar("add_comment", "send_status", $sendStatus);// 送信状況
-                               }
-                       }
-                       if (empty($entryId)){
-                               // 総数を取得
-                               $totalCount = $this->_db->getEntryItemsCount($now, $startDt, $endDt, $this->langId);
-
-                               // リンク文字列作成、ページ番号調整
-                               $pageLink = $this->createPageLink($pageNo, $totalCount, $entryViewCount, $this->_currentPageUrl);
-                               
-                               // 記事一覧作成
-                               $this->_db->getEntryItems($entryViewCount, $pageNo, $now, 0/* 期間で指定 */, $startDt/*期間開始*/, $endDt/*期間終了*/, $this->langId, $entryViewOrder, array($this, 'itemsLoop'));
-                               
-                               if ($this->isExistsViewData){
-                                       // ページリンクを埋め込む
-                                       if (!empty($pageLink)){
-                                               $this->tmpl->setAttribute('page_link', 'visibility', 'visible');                // リンク表示
-                                               $this->tmpl->addVar("page_link", "page_link", $pageLink);
-                                       }
-                               }
-                       } else {
-                               $this->viewExtEntry = true;                     // 記事ID指定のときは続き(全文)を表示
-                               $this->_db->getEntryItems($entryViewCount, $pageNo, $now, $entryId, $startDt/*期間開始*/, $endDt/*期間終了*/, $this->langId, $entryViewOrder, array($this, 'itemsLoop'));
-                               
-                               // 記事がないときはコメントを隠す
-                               if (!$this->isExistsViewData){
-                                       $this->tmpl->setAttribute('entrylist', 'visibility', 'hidden');
-                                       //$this->tmpl->setAttribute('add_comment', 'visibility', 'hidden');
-                               }
-                       }
-                       
-                       // 年月日の表示
-                       // ブログ記事データがないときはデータなしメッセージ追加
-                       if (!$this->isExistsViewData){
-                               $title = self::MESSAGE_NO_ENTRY_TITLE;
-                               $this->pageTitle = $title;              // HTMLヘッダタイトル
-                               $this->setGuidanceMsg(self::MESSAGE_NO_ENTRY);                  // ユーザ向けメッセージ
-                       }
-               }
-               
-               // タイトルの設定
-               if (!empty($title)){
-                       // タイトル作成
-                       $titleStr = '<div align="center" style="text-align:center;';
-                       if (!empty($titleColor)) $titleStr .= 'background-color:' . $titleColor . ';';// タイトル背景色
-                       $titleStr .= '">' . $this->convertToDispString($title) . '</div>';
-
-                       $this->tmpl->setAttribute('show_title', 'visibility', 'visible');               // 年月表示
-                       $this->tmpl->addVar("show_title", "title", $titleStr);
-               }
-               
-               // HTMLサブタイトルを設定
-               $this->gPage->setHeadSubTitle($this->pageTitle);
-       }
-       /**
-        * 取得したコンテンツ項目をテンプレートに設定する
-        *
-        * @param int           $index                  行番号
-        * @param array         $fetchedRow             取得行
-        * @param object        $param                  任意使用パラメータ
-        * @return bool                                         trueを返すとループ続行。falseを返すとその時点で終了。
-        */
-       function itemsLoop($index, $fetchedRow)
-       {
-               // 参照ビューカウントを更新
-               if (!$this->gEnv->isSystemManageUser()){                // システム運用者以上の場合はカウントしない
-                       $this->gInstance->getAnalyzeManager()->updateContentViewCount(self::CONTENT_TYPE, $fetchedRow['be_serial'], $this->currentDay, $this->currentHour);
-               }
-
-               $entryId = $fetchedRow['be_id'];// 記事ID
-               $title = $fetchedRow['be_name'];// タイトル
-               $date = $fetchedRow['be_regist_dt'];// 日付
-               
-               // ページタイトルの設定
-               if (empty($this->pageTitle)) $this->pageTitle = $title;         // 画面タイトル、パンくずリスト用タイトル
-               
-               // コメントを取得
-               /*$commentCount = $this->commentDb->getCommentCountByEntryId($entryId, $this->langId);  // コメント総数
-               if ($this->isOutputComment){// コメントを出力のとき
-                       // コメントの内容を取得
-                       $ret = $this->commentDb->getCommentByEntryId($entryId, $this->langId, $row);
-                       if ($ret){
-                               $this->tmpl->clearTemplate('commentlist');
-                               for ($i = 0; $i < count($row); $i++){
-                                       $userName = $this->convertToDispString($row[$i]['bo_user_name']);       // 投稿ユーザは入力値を使用
-                                       $url = $this->convertToDispString($row[$i]['bo_url']);
-                                       $commentInfo = $this->convertToDispString($row[$i]['bo_regist_dt']) . '&nbsp;&nbsp;' . $userName;
-                                       if (!empty($url)) $commentInfo .= '<br />' . $url;
-                                       $comment = $this->convertToPreviewText($this->convertToDispString($row[$i]['bo_html']));                // 改行コードをbrタグに変換
-                                       $commentRow = array(
-                                               'comment_title'         => $this->convertToDispString($row[$i]['bo_name']),                     // コメントタイトル
-                                               'comment'               => $comment,                    // コメント内容
-                                               'user_name'             => $userName,                   // 投稿ユーザ名
-                                               'comment_info'  => $commentInfo                                         // コメント情報
-                                       );
-                                       $this->tmpl->addVars('commentlist', $commentRow);
-                                       $this->tmpl->parseTemplate('commentlist', 'a');
-                               }
-                       } else {        // コメントなしのとき
-                               $this->tmpl->clearTemplate('commentlist');
-                               $commentRow = array(
-                                       'comment'               => 'コメントはありません',                    // コメント内容
-                                       'comment_info'  => ''                                           // コメント情報
-                               );
-                               $this->tmpl->addVars('commentlist', $commentRow);
-                               $this->tmpl->parseTemplate('commentlist', 'a');
-                       }
-               }*/
-               
-               // 記事へのリンクを生成
-               $linkUrl = $this->getUrl($this->gEnv->getDefaultMobileUrl() . '?'. M3_REQUEST_PARAM_BLOG_ENTRY_ID . '=' . $entryId, true/*リンク用*/);
-               $link = '<a href="' . $this->convertUrlToHtmlEntity($linkUrl) . '" >コメント(' . $commentCount . ')</a>';
-               
-               // HTMLを出力(出力内容は特にエラーチェックしない)
-               $entryText = $fetchedRow['be_html'];
-               if ($this->viewExtEntry){                       // 続きを表示するかどうか
-                       if (!empty($fetchedRow['be_html_ext'])) $entryText = $fetchedRow['be_html_ext'];// 続きがある場合は続きを出力
-                       $entryText = str_replace(M3_TAG_START . M3_TAG_MACRO_ROOT_URL . M3_TAG_END, $this->getUrl($this->gEnv->getRootUrl()), $entryText);// アプリケーションルートを変換
-               } else {
-                       // 続きがある場合はリンクを付加
-                       $entryText = str_replace(M3_TAG_START . M3_TAG_MACRO_ROOT_URL . M3_TAG_END, $this->getUrl($this->gEnv->getRootUrl()), $entryText);// アプリケーションルートを変換
-                       if (!empty($fetchedRow['be_html_ext'])){
-                               $entryText .= self::MESSAGE_EXT_ENTRY_PRE . '<a href="' . $this->convertUrlToHtmlEntity($linkUrl) . '" >' . self::MESSAGE_EXT_ENTRY . '</a>';
-                       }
-               }
-               // 携帯用コンテンツに変換
-               $entryText = $this->gInstance->getTextConvManager()->autoConvPcContentToMobile($entryText, $this->currentRootUrl/*現在のページのルートURL*/, 
-                                                                                                                                                               M3_VIEW_TYPE_BLOG/*ブログコンテンツ*/, $fetchedRow['be_create_dt']/*コンテンツ作成日時*/);
-                                                                                                                                                               
-               // 記事のフッター部
-               $this->tmpl->clearTemplate('entry_footer');
-               $row = array(
-                       'permalink' => $this->convertUrlToHtmlEntity($linkUrl), // パーマリンク
-                       'link' => $link         // コメントへのリンク
-               );
-               $this->tmpl->addVars('entry_footer', $row);
-               $this->tmpl->parseTemplate('entry_footer', 'a');
-
-               $row = array(
-                       'permalink' => $this->convertUrlToHtmlEntity($linkUrl), // パーマリンク
-                       'title' => $title,
-                       'date' => $date,                        // 日付
-                       'entry' => $entryText   // 投稿記事
-               );
-               $this->tmpl->addVars('entrylist', $row);
-               $this->tmpl->parseTemplate('entrylist', 'a');
-               $this->isExistsViewData = true;                         // 表示データがあるかどうか
-               return true;
-       }
-       /**
-        * 取得したコンテンツ項目をテンプレートに設定する
-        *
-        * @param int           $index                  行番号
-        * @param array         $fetchedRow             取得行
-        * @param object        $param                  任意使用パラメータ
-        * @return bool                                         trueを返すとループ続行。falseを返すとその時点で終了。
-        */
-       function searchItemsLoop($index, $fetchedRow)
-       {
-               $entryId = $fetchedRow['be_id'];// 記事ID
-               $title = $fetchedRow['be_name'];// タイトル
-               $date = $fetchedRow['be_regist_dt'];// 日付
-               
-               // 記事へのリンクを生成
-               $linkUrl = $this->getUrl($this->gEnv->getDefaultMobileUrl() . '?'. M3_REQUEST_PARAM_BLOG_ENTRY_ID . '=' . $entryId, true/*リンク用*/);
-               $link = '<a href="' . $this->convertUrlToHtmlEntity($linkUrl) . '" >' . $title . '</a>';
-
-               // テキストに変換。HTMLタグ削除。
-               $entryText = $this->gInstance->getTextConvManager()->htmlToText($fetchedRow['be_html']);
-
-               // 検索結果用にテキストを詰める。改行、タブ、スペース削除。
-               $entryText = str_replace(array("\r", "\n", "\t", " "), '', $entryText);
-
-               // 文字列長を修正
-               if (function_exists('mb_strimwidth')){
-                       $entryText = mb_strimwidth($entryText, 0, self::SEARCH_BODY_SIZE, '…');
-               } else {
-                       $entryText = substr($entryText, 0, self::SEARCH_BODY_SIZE) . '...';
-               }
-
-               $row = array(
-                       'title' => $link,                       // リンク付きタイトル
-                       'date' => $date,                        // 日付
-                       'entry' => $entryText   // 投稿記事
-               );
-               $this->tmpl->addVars('entrylist', $row);
-               $this->tmpl->parseTemplate('entrylist', 'a');
-               $this->isExistsViewData = true;                         // 表示データがあるかどうか
-               return true;
-       }
-       /**
-        * ページリンク作成
-        *
-        * @param int $pageNo                   ページ番号(1~)。ページ番号が範囲外にある場合は自動的に調整
-        * @param int $totalCount               総項目数
-        * @param int $viewItemCount    1ページあたりの項目数
-        * @param string $baseUrl               リンク用のベースURL
-        * @return string                               リンクHTML
-        */
-       function createPageLink(&$pageNo, $totalCount, $viewItemCount, $baseUrl)
-       {
-               // 表示するページ番号の修正
-               $pageCount = (int)(($totalCount -1) / $viewItemCount) + 1;              // 総ページ数
-               if ($pageNo < 1) $pageNo = 1;
-               if ($pageNo > $pageCount) $pageNo = $pageCount;
-
-               // ページング用リンク作成
-               $pageLink = '';
-               if ($pageCount > 1){    // ページが2ページ以上のときリンクを作成
-                       // ページ数1から「LINK_PAGE_COUNT」までのリンクを作成
-                       $maxPageCount = $pageCount < self::LINK_PAGE_COUNT ? $pageCount : self::LINK_PAGE_COUNT;
-                       for ($i = 1; $i <= $maxPageCount; $i++){
-                               if ($i == $pageNo){
-                                       $link = '&nbsp;' . $i;
-                               } else {
-                                       $linkUrl = $this->getUrl($baseUrl . '&page=' . $i, true/*リンク用*/);
-                                       $link = '&nbsp;<a href="' . $this->convertUrlToHtmlEntity($linkUrl) . '" >' . $i . '</a>';
-                               }
-                               $pageLink .= $link;
-                       }
-                       // 残りは「...」表示
-                       if ($pageCount > self::LINK_PAGE_COUNT) $pageLink .= '&nbsp;...';
-               }
-               if ($pageNo > 1){               // 前ページがあるとき
-                       $linkUrl = $this->getUrl($baseUrl . '&page=' . ($pageNo -1), true/*リンク用*/);
-                       $link = '<a href="' . $this->convertUrlToHtmlEntity($linkUrl) . '" accesskey="1">前へ[1]</a>';
-                       $pageLink = $link . $pageLink;
-               }
-               if ($pageNo < $pageCount){              // 次ページがあるとき
-                       $linkUrl = $this->getUrl($baseUrl . '&page=' . ($pageNo +1), true/*リンク用*/);
-                       $link = '&nbsp;<a href="' . $this->convertUrlToHtmlEntity($linkUrl) . '" accesskey="2">次へ[2]</a>';
-                       $pageLink .= $link;
-               }
-               return $pageLink;
-       }
-}
-?>
diff --git a/widgets/m/blog/include/container/m_blogWidgetContainer.php b/widgets/m/blog/include/container/m_blogWidgetContainer.php
deleted file mode 100644 (file)
index 9955449..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2010 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_blogWidgetContainer.php 3463 2010-08-07 10:46:20Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getCurrentWidgetContainerPath() .   '/m_blogBaseWidgetContainer.php');
-
-class m_blogWidgetContainer extends m_blogBaseWidgetContainer
-{
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * ディスパッチ処理(メインコンテナのみ実行)
-        *
-     * HTTPリクエストの内容を見て処理をコンテナに振り分ける
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return bool                                                 このクラスの_setTemplate(), _assign()へ処理を継続するかどうかを返す。
-        *                                      true=処理を継続、false=処理を終了
-        */
-       function _dispatch($request, &$param)
-       {
-               // 実行処理を決定
-               $task = $request->trimValueOf(M3_REQUEST_PARAM_OPERATION_TASK);
-               if (empty($task)) $task = self::DEFAULT_TASK;
-
-               // アクセス権をチェック
-               switch ($task){
-                       case self::TASK_READ:                   // ブログ参照
-                               // 携帯以外からのアクセスの場合はエラー
-                               //if (empty($this->_mobileId)) return true;
-                               break;
-               }
-               
-               // ##### コンテナを起動 #####
-               switch ($task){
-                       case self::TASK_READ:                   // ブログ参照
-                               $this->gLaunch->goSubWidget($task);
-                               return false;
-                       default:
-                               $this->SetMsg(self::MSG_APP_ERR, "画面が見つかりません");
-                               return true;
-               }
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               $task = $request->trimValueOf(M3_REQUEST_PARAM_OPERATION_TASK);
-
-               // 要求画面によってテンプレートを変更
-               switch ($task){
-                       default:
-                               return 'message.tmpl.html';
-               }
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @return                                                              なし
-        */
-       function _assign($request, &$param)
-       {
-               $task = $request->trimValueOf(M3_REQUEST_PARAM_OPERATION_TASK);
-               if (empty($task)) $task = self::DEFAULT_TASK;
-
-               // 要求画面によってテンプレートを変更
-               switch ($task){
-                       case self::TASK_READ:                   // スレッド一覧画面
-                               $this->setUserErrorMsg('携帯電話以外からは実行できません');
-                               $this->tmpl->addVar('_widget', 'top_url', $this->_currentPageUrl);
-                               break;
-                       default:
-                               break;
-               }
-       }
-}
-?>
diff --git a/widgets/m/blog/include/db/blogDb.php b/widgets/m/blog/include/db/blogDb.php
deleted file mode 100644 (file)
index c5f8bd1..0000000
+++ /dev/null
@@ -1,401 +0,0 @@
-<?php
-/**
- * DBクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2016 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id$
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getDbPath() . '/baseDb.php');
-
-class blogDb extends BaseDb
-{
-       /**
-        * ブログ定義値をすべて取得
-        *
-        * 掲示板IDが空のデフォルト値は常に読み込む
-        *
-        * @param array  $rows                  レコード
-        * @param string $blogId                ブログID(空の場合はデフォルト値を取得)
-        * @return bool                                 1行以上取得 = true, 取得なし= false
-        */
-       function getAllConfig(&$rows, $blogId = '')
-       {
-               $queryStr  = 'SELECT * FROM blog_config ';
-               $queryStr .=  'WHERE bg_blog_id = \'\' ';
-               $queryStr .=   'OR bg_blog_id = ? ';
-               $queryStr .=   'ORDER BY bg_blog_id, bg_index';
-               $retValue = $this->selectRecords($queryStr, array($blogId), $rows);
-               return $retValue;
-       }
-       /**
-        * ブログ定義値を更新
-        *
-        * @param string $key           キーとなる項目値
-        * @param string $value         値
-        * @param string $blogId                掲示板ID
-        * @return                                      true = 正常、false=異常
-        */
-       function updateConfig($key, $value, $blogId = '')
-       {
-               // トランザクションスタート
-               $this->startTransaction();
-               
-               $queryStr  = 'SELECT bg_value FROM blog_config ';
-               $queryStr .=   'WHERE bg_blog_id = ? ';
-               $queryStr .=     'AND bg_id = ? ';
-               $ret = $this->selectRecord($queryStr, array($blogId, $key), $row);
-               if ($ret){
-                       $queryStr  = 'UPDATE blog_config ';
-                       $queryStr .=   'SET bg_value = ? ';
-                       $queryStr .=   'WHERE bg_blog_id = ? ';
-                       $queryStr .=     'AND bg_id = ? ';
-                       $ret = $this->execStatement($queryStr, array($value, $blogId, $key));                   
-               } else {
-                       $queryStr  = 'INSERT INTO blog_config (';
-                       $queryStr .=   'bg_blog_id, ';
-                       $queryStr .=   'bg_id, ';
-                       $queryStr .=   'bg_value ';
-                       $queryStr .= ') VALUES (';
-                       $queryStr .=   '?, ?, ?';
-                       $queryStr .= ')';
-                       $ret = $this->execStatement($queryStr, array($blogId, $key, $value));   
-               }
-               // トランザクション終了
-               $ret = $this->endTransaction();
-               return $ret;
-       }
-       /**
-        * エントリー項目を検索(表示用)
-        *
-        * @param int           $limit                          取得する項目数
-        * @param int           $page                           取得するページ(1~)
-        * @param timestamp $now                                現在日時(現在日時より未来の投稿日時の記事は取得しない)
-        * @param string        $keyword                        検索キーワード
-        * @param string        $langId                         言語
-        * @param function      $callback                       コールバック関数
-        * @return                      なし
-        */
-       function searchEntryItemsByKeyword($limit, $page, $now, $keyword, $langId, $callback)
-       {
-               $offset = $limit * ($page -1);
-               if ($offset < 0) $offset = 0;
-               $initDt = $this->gEnv->getInitValueOfTimestamp();               // 日時初期化値
-               $params = array();
-               
-               $queryStr = 'SELECT * FROM blog_entry ';
-               $queryStr .=  'WHERE be_language_id = ? ';      $params[] = $langId;
-               $queryStr .=    'AND be_deleted = false ';              // 削除されていない
-               $queryStr .=    'AND be_history_index >= 0 ';           // 正規(Regular)記事を対象
-               $queryStr .=    'AND be_regist_dt <= ? ';       $params[] = $now;       // 投稿日時が現在日時よりも過去のものを取得
-
-               // タイトルと記事を検索
-               if (!empty($keyword)){
-                       // 「'"\」文字をエスケープ
-                       $keyword = addslashes($keyword);
-                       
-                       $queryStr .=    'AND (be_name LIKE \'%' . $keyword . '%\' ';
-                       $queryStr .=    'OR be_html LIKE \'%' . $keyword . '%\' ';
-                       $queryStr .=    'OR be_html_ext LIKE \'%' . $keyword . '%\' ';
-                       $queryStr .=    'OR be_description LIKE \'%' . $keyword . '%\') ';
-               }
-               
-               // 公開期間を指定
-               $queryStr .=    'AND (be_active_start_dt = ? OR (be_active_start_dt != ? AND be_active_start_dt <= ?)) ';
-               $queryStr .=    'AND (be_active_end_dt = ? OR (be_active_end_dt != ? AND be_active_end_dt > ?)) ';
-               $params[] = $initDt;
-               $params[] = $initDt;
-               $params[] = $now;
-               $params[] = $initDt;
-               $params[] = $initDt;
-               $params[] = $now;
-               
-               $queryStr .=  'ORDER BY be_regist_dt desc limit ' . $limit . ' offset ' . $offset;
-               $this->selectLoop($queryStr, $params, $callback, null);
-       }
-       /**
-        * 検索条件のエントリー項目数を取得(表示用)
-        *
-        * @param timestamp $now                                現在日時(現在日時より未来の投稿日時の記事は取得しない)
-        * @param string        $keyword                        検索キーワード
-        * @param string        $langId                         言語
-        * @return int                                                  項目数
-        */
-       function searchEntryItemsCountByKeyword($now, $keyword, $langId)
-       {
-               $initDt = $this->gEnv->getInitValueOfTimestamp();               // 日時初期化値
-               $params = array();
-               
-               $queryStr = 'SELECT * FROM blog_entry ';
-               $queryStr .=  'WHERE be_language_id = ? ';      $params[] = $langId;
-               $queryStr .=    'AND be_deleted = false ';              // 削除されていない
-               $queryStr .=    'AND be_history_index >= 0 ';           // 正規(Regular)記事を対象
-               $queryStr .=    'AND be_regist_dt <= ? ';       $params[] = $now;       // 投稿日時が現在日時よりも過去のものを取得
-
-               // タイトルと記事を検索
-               if (!empty($keyword)){
-                       // 「'"\」文字をエスケープ
-                       $keyword = addslashes($keyword);
-                       
-                       $queryStr .=    'AND (be_name LIKE \'%' . $keyword . '%\' ';
-                       $queryStr .=    'OR be_html LIKE \'%' . $keyword . '%\' ';
-                       $queryStr .=    'OR be_html_ext LIKE \'%' . $keyword . '%\' ';
-                       $queryStr .=    'OR be_description LIKE \'%' . $keyword . '%\') ';
-               }
-               
-               // 公開期間を指定
-               $queryStr .=    'AND (be_active_start_dt = ? OR (be_active_start_dt != ? AND be_active_start_dt <= ?)) ';
-               $queryStr .=    'AND (be_active_end_dt = ? OR (be_active_end_dt != ? AND be_active_end_dt > ?)) ';
-               $params[] = $initDt;
-               $params[] = $initDt;
-               $params[] = $now;
-               $params[] = $initDt;
-               $params[] = $initDt;
-               $params[] = $now;
-               return $this->selectRecordCount($queryStr, $params);
-       }
-       /**
-        * エントリー項目を取得(表示用)
-        *
-        * @param int           $limit                          取得する項目数
-        * @param int           $page                           取得するページ(1~)
-        * @param timestamp $now                                現在日時(現在日時より未来の投稿日時の記事は取得しない)
-        * @param int           $entryId                        エントリーID(0のときは期間で取得)
-        * @param timestamp     $startDt                        期間(開始日)
-        * @param timestamp     $endDt                          期間(終了日)
-        * @param string        $langId                         言語
-        * @param int           $order                          取得順(0=昇順,1=降順)
-        * @param function      $callback                       コールバック関数
-        * @return                      なし
-        */
-       function getEntryItems($limit, $page, $now, $entryId, $startDt, $endDt, $langId, $order, $callback)
-       {
-               $offset = $limit * ($page -1);
-               if ($offset < 0) $offset = 0;
-               $initDt = $this->gEnv->getInitValueOfTimestamp();               // 日時初期化値
-               $params = array();
-               
-               // エントリーIDの指定がない場合は、期間で取得
-               if (empty($entryId)){
-                       $queryStr = 'SELECT * FROM blog_entry ';
-                       $queryStr .=  'WHERE be_deleted = false ';              // 削除されていない
-                       $queryStr .=    'AND be_history_index >= 0 ';           // 正規(Regular)記事を対象
-                       $queryStr .=    'AND be_status = ? ';           $params[] = 2;  // 「公開」(2)データを表示
-                       $queryStr .=    'AND be_language_id = ? ';      $params[] = $langId;
-                       $queryStr .=    'AND be_regist_dt <= ? ';       $params[] = $now;               // 投稿日時が現在日時よりも過去のものを取得
-                       
-                       // 検索条件
-                       if (!empty($startDt)){
-                               $queryStr .=    'AND ? <= be_regist_dt ';
-                               $params[] = $startDt;
-                       }
-                       if (!empty($endDt)){
-                               $queryStr .=    'AND be_regist_dt < ? ';
-                               $params[] = $endDt;
-                       }
-                       
-                       // 公開期間を指定
-                       $queryStr .=    'AND (be_active_start_dt = ? OR (be_active_start_dt != ? AND be_active_start_dt <= ?)) ';
-                       $queryStr .=    'AND (be_active_end_dt = ? OR (be_active_end_dt != ? AND be_active_end_dt > ?)) ';
-                       $params[] = $initDt;
-                       $params[] = $initDt;
-                       $params[] = $now;
-                       $params[] = $initDt;
-                       $params[] = $initDt;
-                       $params[] = $now;
-               
-                       $ord = '';
-                       if (!empty($order)) $ord = 'DESC ';
-                       $queryStr .=  'ORDER BY be_regist_dt ' . $ord . 'LIMIT ' . $limit . ' offset ' . $offset;// 投稿順
-                       $this->selectLoop($queryStr, $params, $callback, null);
-               } else {
-                       $queryStr = 'SELECT * FROM blog_entry ';
-                       $queryStr .=  'WHERE be_deleted = false ';              // 削除されていない
-                       $queryStr .=    'AND be_history_index >= 0 ';           // 正規(Regular)記事を対象
-                       $queryStr .=    'AND be_status = ? ';   $params[] = 2;  // 「公開」(2)データを表示
-                       $queryStr .=    'AND be_id = ? ';               $params[] = $entryId;
-                       $queryStr .=    'AND be_language_id = ? ';      $params[] = $langId;
-                       $queryStr .=    'AND be_regist_dt <= ? ';       $params[] = $now;               // 投稿日時が現在日時よりも過去のものを取得
-                       
-                       // 公開期間を指定
-                       $queryStr .=    'AND (be_active_start_dt = ? OR (be_active_start_dt != ? AND be_active_start_dt <= ?)) ';
-                       $queryStr .=    'AND (be_active_end_dt = ? OR (be_active_end_dt != ? AND be_active_end_dt > ?)) ';
-                       $params[] = $initDt;
-                       $params[] = $initDt;
-                       $params[] = $now;
-                       $params[] = $initDt;
-                       $params[] = $initDt;
-                       $params[] = $now;
-                       $this->selectLoop($queryStr, $params, $callback, null);         // 「公開」(2)データを表示
-               }
-       }
-       
-       /**
-        * エントリー項目数を取得(表示用)
-        *
-        * @param timestamp $now                                現在日時(現在日時より未来の投稿日時の記事は取得しない)
-        * @param timestamp     $startDt                        期間(開始日)
-        * @param timestamp     $endDt                          期間(終了日)
-        * @param string        $langId                         言語
-        * @return int                                                  項目数
-        */
-       function getEntryItemsCount($now, $startDt, $endDt, $langId)
-       {
-               $initDt = $this->gEnv->getInitValueOfTimestamp();               // 日時初期化値
-               $params = array();
-               
-               $queryStr = 'SELECT * FROM blog_entry ';
-               $queryStr .=  'WHERE be_deleted = false ';              // 削除されていない
-               $queryStr .=    'AND be_history_index >= 0 ';           // 正規(Regular)記事を対象
-               $queryStr .=    'AND be_status = ? ';           $params[] = 2;  // 「公開」(2)データを表示
-               $queryStr .=    'AND be_language_id = ? ';      $params[] = $langId;
-               $queryStr .=    'AND be_regist_dt <= ? ';       $params[] = $now;               // 投稿日時が現在日時よりも過去のものを取得
-               
-               // 検索条件
-               if (!empty($startDt)){
-                       $queryStr .=    'AND ? <= be_regist_dt ';
-                       $params[] = $startDt;
-               }
-               if (!empty($endDt)){
-                       $queryStr .=    'AND be_regist_dt < ? ';
-                       $params[] = $endDt;
-               }
-               
-               // 公開期間を指定
-               $queryStr .=    'AND (be_active_start_dt = ? OR (be_active_start_dt != ? AND be_active_start_dt <= ?)) ';
-               $queryStr .=    'AND (be_active_end_dt = ? OR (be_active_end_dt != ? AND be_active_end_dt > ?)) ';
-               $params[] = $initDt;
-               $params[] = $initDt;
-               $params[] = $now;
-               $params[] = $initDt;
-               $params[] = $initDt;
-               $params[] = $now;
-               return $this->selectRecordCount($queryStr, $params);
-       }
-       /**
-        * エントリー項目をカテゴリー指定で取得(表示用)
-        *
-        * @param int           $limit                          取得する項目数
-        * @param int           $page                           取得するページ(1~)
-        * @param timestamp $now                                現在日時(現在日時より未来の投稿日時の記事は取得しない)
-        * @param int           $categoryId                     カテゴリーID
-        * @param string        $langId                         言語
-        * @param int           $order                          取得順(0=昇順,1=降順)
-        * @param function      $callback                       コールバック関数
-        * @return                      なし
-        */
-       function getEntryItemsByCategory($limit, $page, $now, $categoryId, $langId, $order, $callback)
-       {
-               $offset = $limit * ($page -1);
-               if ($offset < 0) $offset = 0;
-               $initDt = $this->gEnv->getInitValueOfTimestamp();               // 日時初期化値
-               $params = array();
-               
-               $queryStr = 'SELECT distinct(be_serial) FROM blog_entry RIGHT JOIN blog_entry_with_category ON be_serial = bw_entry_serial ';
-               $queryStr .=  'WHERE be_language_id = ? '; $params[] = $langId;
-               $queryStr .=    'AND be_deleted = false ';              // 削除されていない
-               $queryStr .=    'AND be_history_index >= 0 ';           // 正規(Regular)記事を対象
-               $queryStr .=    'AND be_status = ? '; $params[] = 2;    // 「公開」(2)データ
-               $queryStr .=    'AND bw_category_id = ? ';      $params[] = $categoryId;// 記事カテゴリー
-               $queryStr .=    'AND be_regist_dt <= ? ';       $params[] = $now;                       // 投稿日時が現在日時よりも過去のものを取得
-               
-               // 公開期間を指定
-               $queryStr .=    'AND (be_active_start_dt = ? OR (be_active_start_dt != ? AND be_active_start_dt <= ?)) ';
-               $queryStr .=    'AND (be_active_end_dt = ? OR (be_active_end_dt != ? AND be_active_end_dt > ?)) ';
-               $params[] = $initDt;
-               $params[] = $initDt;
-               $params[] = $now;
-               $params[] = $initDt;
-               $params[] = $initDt;
-               $params[] = $now;
-               
-               // シリアル番号を取得
-               $serialArray = array();
-               $ret = $this->selectRecords($queryStr, $params, $serialRows);
-               if ($ret){
-                       for ($i = 0; $i < count($serialRows); $i++){
-                               $serialArray[] = $serialRows[$i]['be_serial'];
-                       }
-               }
-               $serialStr = implode(',', $serialArray);
-               if (empty($serialStr)) $serialStr = '0';        // 0レコードのときはダミー値を設定
-       
-               $queryStr = 'SELECT * FROM blog_entry ';
-               $queryStr .=  'WHERE be_serial in (' . $serialStr . ') ';
-               $ord = '';
-               if (!empty($order)) $ord = 'DESC ';
-               $queryStr .=  'ORDER BY be_regist_dt ' . $ord . 'LIMIT ' . $limit . ' offset ' . $offset;// 投稿順
-               $this->selectLoop($queryStr, array(), $callback, null);
-       }
-       /**
-        * エントリー項目数をカテゴリー指定で取得(表示用)
-        *
-        * @param timestamp $now                                現在日時(現在日時より未来の投稿日時の記事は取得しない)
-        * @param int           $categoryId                     カテゴリーID
-        * @param string        $langId                         言語
-        * @return int                                                  エントリー項目数
-        */
-       function getEntryItemsCountByCategory($now, $categoryId, $langId)
-       {
-               $initDt = $this->gEnv->getInitValueOfTimestamp();               // 日時初期化値
-               $params = array();
-               
-               $queryStr = 'SELECT distinct(be_serial) FROM blog_entry RIGHT JOIN blog_entry_with_category ON be_serial = bw_entry_serial ';
-               $queryStr .=  'WHERE be_language_id = ? '; $params[] = $langId;
-               $queryStr .=    'AND be_deleted = false ';              // 削除されていない
-               $queryStr .=    'AND be_history_index >= 0 ';           // 正規(Regular)記事を対象
-               $queryStr .=    'AND be_status = ? '; $params[] = 2;    // 「公開」(2)データ
-               $queryStr .=    'AND bw_category_id = ? ';      $params[] = $categoryId;// 記事カテゴリー
-               $queryStr .=    'AND be_regist_dt <= ? ';       $params[] = $now;                       // 投稿日時が現在日時よりも過去のものを取得
-               
-               // 公開期間を指定
-               $queryStr .=    'AND (be_active_start_dt = ? OR (be_active_start_dt != ? AND be_active_start_dt <= ?)) ';
-               $queryStr .=    'AND (be_active_end_dt = ? OR (be_active_end_dt != ? AND be_active_end_dt > ?)) ';
-               $params[] = $initDt;
-               $params[] = $initDt;
-               $params[] = $now;
-               $params[] = $initDt;
-               $params[] = $initDt;
-               $params[] = $now;
-               
-               // シリアル番号を取得
-               $serialArray = array();
-               $ret = $this->selectRecords($queryStr, $params, $serialRows);
-               if ($ret){
-                       for ($i = 0; $i < count($serialRows); $i++){
-                               $serialArray[] = $serialRows[$i]['be_serial'];
-                       }
-               }
-               $serialStr = implode(',', $serialArray);
-               if (empty($serialStr)) $serialStr = '0';        // 0レコードのときはダミー値を設定
-       
-               $queryStr = 'SELECT * FROM blog_entry ';
-               $queryStr .=  'WHERE be_serial in (' . $serialStr . ') ';
-               return $this->selectRecordCount($queryStr, array());
-       }
-       /**
-        * ブログカテゴリーをカテゴリーIDで取得
-        *
-        * @param int           $id                                     カテゴリーID
-        * @param string        $langId                         言語ID
-        * @param array     $row                                レコード
-        * @return bool                                                 取得 = true, 取得なし= false
-        */
-       function getCategoryByCategoryId($id, $langId, &$row)
-       {
-               $queryStr  = 'SELECT * FROM blog_category LEFT JOIN _login_user ON bc_create_user_id = lu_id AND lu_deleted = false ';
-               $queryStr .=   'WHERE bc_deleted = false ';     // 削除されていない
-               $queryStr .=   'AND bc_id = ? ';
-               $queryStr .=   'AND bc_language_id = ? ';
-               $ret = $this->selectRecord($queryStr, array($id, $langId), $row);
-               return $ret;
-       }
-}
-?>
diff --git a/widgets/m/blog/include/help/index.php b/widgets/m/blog/include/help/index.php
deleted file mode 100644 (file)
index ec1378f..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-/**
- * ヘルプリソースファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2010 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 3836 2010-11-17 06:05:07Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-global $HELP;
-
-// ########## ブログ設定 ##########
-$HELP['config_title']['title'] = 'ブログ設定';
-$HELP['config_title']['body'] = 'ブログ機能の携帯用の設定を行います。';
-$HELP['config_view_count']['title'] = '記事表示数';
-$HELP['config_view_count']['body'] = 'ブログ記事を一覧表示する場合の記事の表示数を設定します。';
-$HELP['config_view_order']['title'] = '記事表示順';
-$HELP['config_view_order']['body'] = 'ブログ記事を一覧表示する場合の記事の表示順を設定します。';
-$HELP['config_title_color']['title'] = 'タイトル背景色';
-$HELP['config_title_color']['body'] = 'タイトルの背景色を設定します。';
-?>
diff --git a/widgets/m/blog/include/template/admin_config.tmpl.html b/widgets/m/blog/include/template/admin_config.tmpl.html
deleted file mode 100644 (file)
index c0c699f..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<link rel="stylesheet" href="{_ROOT_URL}/scripts/js_color_picker_v2/js_color_picker_v2.css" media="screen" />\r
-<script src="{_ROOT_URL}/scripts/js_color_picker_v2/color_functions.js"></script>\r
-<script type="text/javascript" src="{_ROOT_URL}/scripts/js_color_picker_v2/js_color_picker_v2.js"></script>\r
-<script type="text/javascript">\r
-//<![CDATA[\r
-function updateItem(){\r
-       if (!window.confirm('設定を更新しますか?')) return false;\r
-       document.main.act.value = 'update';\r
-       document.main.submit();\r
-       return true;\r
-}\r
-//]]>\r
-</script>\r
-<div align="center">\r
-{MENU_ITEMS}\r
-<!-- m3:ErrorMessage -->\r
-<form method="post" name="main">\r
-<input type="hidden" name="act" />\r
-<input type="hidden" name="task" value="config" />\r
-<br>\r
-<table><tr><td>\r
-<table class="simple-table" width="500">\r
-<caption><span {_HELP_CONFIG_TITLE}>ブログ設定</span></caption>\r
-    <tbody>\r
-        <tr>\r
-           <td class="table-headside" width="150"><span {_HELP_CONFIG_VIEW_COUNT}>記事表示数</span></td>\r
-           <td><input type="text" name="item_entry_view_count" value="{VIEW_COUNT}" size="2" maxlength="2" onkeypress="return m3_numericKey(event,true);" /></td>\r
-       </tr>\r
-        <tr class="even">\r
-           <td class="table-headside"><span {_HELP_CONFIG_VIEW_ORDER}>記事表示順</span></td>\r
-           <td>\r
-           <select name="item_entry_view_order">\r
-               <option value="0" {VIEW_ORDER_INC_SELECTED}>昇順</option>\r
-               <option value="1" {VIEW_ORDER_DEC_SELECTED}>降順</option>\r
-           </select>\r
-           </td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside"><span {_HELP_CONFIG_TITLE_COLOR}>タイトル背景色</span></td>\r
-           <td>\r
-<input type="text" id="item_title_color" name="item_title_color" value="{TITLE_COLOR}" size="10" maxlength="10" /><input type="button" value="カラー" onclick="showColorPicker(this,document.forms[0].item_title_color);" />\r
-           </td>\r
-       </tr>\r
-    </tbody>\r
-</table>\r
-</td></tr>\r
-<tr><td align="right">\r
-<input type="button" class="button" onClick="updateItem()" value="更新" />\r
-</td></tr></table>\r
-\r
-</form>\r
-</div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/blog/include/template/admin_message.tmpl.html b/widgets/m/blog/include/template/admin_message.tmpl.html
deleted file mode 100644 (file)
index 653fc1c..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<patTemplate:tmpl name="_widget">
-<div align="center">
-<br />
-<h2>{MESSAGE}</h2>
-<!-- m3:ErrorMessage -->
-</div>
-</patTemplate:tmpl>
diff --git a/widgets/m/blog/include/template/message.tmpl.html b/widgets/m/blog/include/template/message.tmpl.html
deleted file mode 100644 (file)
index 6825e57..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<!--<div align="center" style="text-align:center;">{MESSAGE}</div>-->\r
-<!-- m3:ErrorMessage -->\r
-<div>&nbsp;</div>\r
-<div>&nbsp;</div>\r
-<div align="center" style="text-align:center;"><a href="{TOP_URL}" accesskey="0">トップページに戻る[0]</a></div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/blog/include/template/thread_read.tmpl.html b/widgets/m/blog/include/template/thread_read.tmpl.html
deleted file mode 100644 (file)
index 97f6eca..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<patTemplate:tmpl name="show_title" visibility="hidden">{TITLE}</patTemplate:tmpl>\r
-<!-- m3:ErrorMessage -->\r
-<patTemplate:tmpl name="entrylist">\r
-<div class="message_list">\r
-<div><a href="{PERMALINK}">{TITLE}</a></div>\r
-<div><span style="font-size:x-small;">{DATE}</span></div>\r
-<div>{ENTRY}</div>\r
-<patTemplate:tmpl name="entry_footer" visibility="hidden"><div>{LINK}</div></patTemplate:tmpl>\r
-</div>\r
-{SPACER}\r
-</patTemplate:tmpl>\r
-<div style="{LINK_STYLE_INNER_BOTTOM}"><patTemplate:tmpl name="page_link" visibility="hidden">{PAGE_LINK}</patTemplate:tmpl></div>\r
-<div><span style="font-size:x-small;">&nbsp;</span></div>\r
-<div style="{LINK_STYLE_BOTTOM}">\r
-<a href="{TOP_URL}" accesskey="0">ブログホームに戻る[0]</a></div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/blog/index.php b/widgets/m/blog/index.php
deleted file mode 100644 (file)
index d5bf05a..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 3452 2010-08-04 09:14:14Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/blog_category/admin/index.php b/widgets/m/blog_category/admin/index.php
deleted file mode 100644 (file)
index 8da1ffb..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 3833 2010-11-17 01:45:54Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/blog_category/images/icon32.png b/widgets/m/blog_category/images/icon32.png
deleted file mode 100644 (file)
index 58c1d16..0000000
Binary files a/widgets/m/blog_category/images/icon32.png and /dev/null differ
diff --git a/widgets/m/blog_category/images/icon64.png b/widgets/m/blog_category/images/icon64.png
deleted file mode 100644 (file)
index ce70280..0000000
Binary files a/widgets/m/blog_category/images/icon64.png and /dev/null differ
diff --git a/widgets/m/blog_category/include/container/m_blog_categoryWidgetContainer.php b/widgets/m/blog_category/include/container/m_blog_categoryWidgetContainer.php
deleted file mode 100644 (file)
index b46a589..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2010 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_blog_categoryWidgetContainer.php 3834 2010-11-17 04:17:07Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseMobileWidgetContainer.php');
-require_once($gEnvManager->getCurrentWidgetDbPath() . '/blog_categoryDb.php');
-
-class m_blog_categoryWidgetContainer extends BaseMobileWidgetContainer
-{
-       private $db;                    // DB接続オブジェクト
-       private $langId;                // 言語
-       const TARGET_WIDGET = 'm/blog';         // 呼び出しウィジェットID
-       const DEFAULT_TITLE = 'ブログカテゴリー';               // デフォルトのウィジェットタイトル名
-               
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-               
-               // DBオブジェクト作成
-               $this->db = new blog_categoryDb();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'menu.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $this->langId   = $this->gEnv->getCurrentLanguage();            // 表示言語を取得
-               
-               // #### カテゴリーリストを作成 ####
-               $this->db->getAllCategory(array($this, 'categoryListLoop'), $this->langId);// デフォルト言語で取得
-       }
-       /**
-        * ウィジェットのタイトルを設定
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               ウィジェットのタイトル名
-        */
-       function _setTitle($request, &$param)
-       {
-               return self::DEFAULT_TITLE;
-       }
-       /**
-        * 取得したデータをテンプレートに設定する
-        *
-        * @param int $index                    行番号(0~)
-        * @param array $fetchedRow             フェッチ取得した行
-        * @param object $param                 未使用
-        * @return bool                                 true=処理続行の場合、false=処理終了の場合
-        */
-       function categoryListLoop($index, $fetchedRow, $param)
-       {
-               // リンク先の作成
-               $name = $fetchedRow['bc_name'];
-               $linkUrl = $this->createCmdUrlToWidget(self::TARGET_WIDGET, 'act=view&' . M3_REQUEST_PARAM_CATEGORY_ID . '=' . $fetchedRow['bc_id']);
-               $row = array(
-                       'link_url' => $this->convertUrlToHtmlEntity($this->getUrl($linkUrl, true/*リンク用*/)),             // リンク
-                       'name' => $this->convertToDispString($name)                     // タイトル
-               );
-               $this->tmpl->addVars('itemlist', $row);
-               $this->tmpl->parseTemplate('itemlist', 'a');
-               return true;
-       }
-}
-?>
diff --git a/widgets/m/blog_category/include/db/blog_categoryDb.php b/widgets/m/blog_category/include/db/blog_categoryDb.php
deleted file mode 100644 (file)
index 86832aa..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-/**
- * DBクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2010 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: blog_categoryDb.php 3833 2010-11-17 01:45:54Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getDbPath() . '/baseDb.php');
-
-class blog_categoryDb extends BaseDb
-{
-       /**
-        * ブログカテゴリー一覧を取得
-        *
-        * @param function      $callback                       コールバック関数
-        * @param string        $lang                           言語
-        * @return                      なし
-        */
-       function getAllCategory($callback, $lang)
-       {
-               $queryStr = 'SELECT * FROM blog_category ';
-               $queryStr .=  'WHERE bc_language_id = ? ';
-               $queryStr .=    'AND bc_deleted = false ';              // 削除されていない
-               $queryStr .=    'AND bc_visible = true ';               // 表示状態
-               $queryStr .=  'ORDER BY bc_sort_order';
-               $this->selectLoop($queryStr, array($lang), $callback, null);
-       }
-}
-?>
diff --git a/widgets/m/blog_category/include/template/menu.tmpl.html b/widgets/m/blog_category/include/template/menu.tmpl.html
deleted file mode 100644 (file)
index fdbfb07..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<patTemplate:tmpl name="_widget">
-<patTemplate:tmpl name="itemlist"><a href="{LINK_URL}"><span>{NAME}</span></a><br /></patTemplate:tmpl>
-</patTemplate:tmpl>
diff --git a/widgets/m/blog_category/index.php b/widgets/m/blog_category/index.php
deleted file mode 100644 (file)
index 8da1ffb..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 3833 2010-11-17 01:45:54Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/blog_list/admin/index.php b/widgets/m/blog_list/admin/index.php
deleted file mode 100644 (file)
index 70b85d9..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 3740 2010-10-27 01:22:39Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/blog_list/images/icon32.png b/widgets/m/blog_list/images/icon32.png
deleted file mode 100644 (file)
index 58c1d16..0000000
Binary files a/widgets/m/blog_list/images/icon32.png and /dev/null differ
diff --git a/widgets/m/blog_list/images/icon64.png b/widgets/m/blog_list/images/icon64.png
deleted file mode 100644 (file)
index ce70280..0000000
Binary files a/widgets/m/blog_list/images/icon64.png and /dev/null differ
diff --git a/widgets/m/blog_list/include/container/m_blog_listWidgetContainer.php b/widgets/m/blog_list/include/container/m_blog_listWidgetContainer.php
deleted file mode 100644 (file)
index 8124ecd..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2010 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_blog_listWidgetContainer.php 3740 2010-10-27 01:22:39Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseWidgetContainer.php');
-require_once($gEnvManager->getCurrentWidgetDbPath() . '/blog_listDb.php');
-
-class m_blog_listWidgetContainer extends BaseWidgetContainer
-{
-       private $db;                    // DB接続オブジェクト
-       private $langId;                // 言語
-       const TARGET_WIDGET = 'blog_main';              // 呼び出しウィジェットID
-       const DEFAULT_TITLE = 'ブログリスト';             // デフォルトのウィジェットタイトル名
-               
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-               
-               // DBオブジェクト作成
-               $this->db = new blog_listDb();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'main.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $this->langId   = $this->gEnv->getCurrentLanguage();            // 表示言語を取得
-               
-               // ブログリストを作成
-               $this->db->getAllBlog(array($this, 'blogListLoop'));
-       }
-       /**
-        * ウィジェットのタイトルを設定
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               ウィジェットのタイトル名
-        */
-       function _setTitle($request, &$param)
-       {
-               return self::DEFAULT_TITLE;
-       }
-       /**
-        * 取得したデータをテンプレートに設定する
-        *
-        * @param int $index                    行番号(0~)
-        * @param array $fetchedRow             フェッチ取得した行
-        * @param object $param                 未使用
-        * @return bool                                 true=処理続行の場合、false=処理終了の場合
-        */
-       function blogListLoop($index, $fetchedRow, $param)
-       {
-               // リンク先の作成
-               $name = $fetchedRow['bl_name'];
-               $linkUrl = $this->gEnv->getDefaultUrl() . '?' . M3_REQUEST_PARAM_BLOG_ID . '=' . $fetchedRow['bl_id'];
-               $row = array(
-                       'link_url' => $this->convertUrlToHtmlEntity($this->getUrl($linkUrl, true/*リンク用*/)),             // リンク
-                       'name' => $this->convertToDispString($name)                     // タイトル
-               );
-               $this->tmpl->addVars('itemlist', $row);
-               $this->tmpl->parseTemplate('itemlist', 'a');
-               return true;
-       }
-}
-?>
diff --git a/widgets/m/blog_list/include/db/blog_listDb.php b/widgets/m/blog_list/include/db/blog_listDb.php
deleted file mode 100644 (file)
index 7422cbd..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-/**
- * DBクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2010 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: blog_listDb.php 3740 2010-10-27 01:22:39Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getDbPath() . '/baseDb.php');
-
-class blog_listDb extends BaseDb
-{
-       /**
-        * ブログ一覧を取得
-        *
-        * @param function      $callback                       コールバック関数
-        * @return                      なし
-        */
-       function getAllBlog($callback)
-       {
-               $queryStr  = 'SELECT * FROM blog_id ';
-               $queryStr .=   'WHERE bl_deleted = false ';             // 削除されていない
-               $queryStr .=     'AND bl_visible = true ';
-               $queryStr .=   'ORDER BY bl_index, bl_id';
-               $this->selectLoop($queryStr, array(), $callback);
-       }
-}
-?>
diff --git a/widgets/m/blog_list/include/template/main.tmpl.html b/widgets/m/blog_list/include/template/main.tmpl.html
deleted file mode 100644 (file)
index 1174fe8..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<patTemplate:tmpl name="_widget">
-<ul>
-  <patTemplate:tmpl name="itemlist"><li><a href="{LINK_URL}"><span>{NAME}</span></a></li></patTemplate:tmpl>
-</ul>
-</patTemplate:tmpl>
diff --git a/widgets/m/blog_list/index.php b/widgets/m/blog_list/index.php
deleted file mode 100644 (file)
index 70b85d9..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 3740 2010-10-27 01:22:39Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/blog_search/images/icon32.png b/widgets/m/blog_search/images/icon32.png
deleted file mode 100644 (file)
index 84553c1..0000000
Binary files a/widgets/m/blog_search/images/icon32.png and /dev/null differ
diff --git a/widgets/m/blog_search/images/icon64.png b/widgets/m/blog_search/images/icon64.png
deleted file mode 100644 (file)
index dd54d9c..0000000
Binary files a/widgets/m/blog_search/images/icon64.png and /dev/null differ
diff --git a/widgets/m/blog_search/include/container/m_blog_searchWidgetContainer.php b/widgets/m/blog_search/include/container/m_blog_searchWidgetContainer.php
deleted file mode 100644 (file)
index 519d99e..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2010 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_blog_searchWidgetContainer.php 3508 2010-08-18 11:05:42Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath()          . '/baseMobileWidgetContainer.php');
-//require_once($gEnvManager->getCommonPath()                   . '/htmlEdit.php');
-
-class m_blog_searchWidgetContainer extends BaseMobileWidgetContainer
-{
-       const TARGET_WIDGET = 'm/blog';         // 呼び出しウィジェットID
-       const DEFAULT_TITLE = 'ブログ検索';                // デフォルトのウィジェットタイトル名
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {       
-               return 'index.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $act = $request->trimValueOf('act');
-               if ($act == 'blog_search'){                     // ブログ検索のとき
-                       // キーワード取得
-                       $keyword = $request->mobileTrimValueOf('keyword');              // 一旦内部コードへ変換
-                       $keyword = $request->convMobileText($keyword);                  // 再度携帯用コードへ変換
-                       
-                       // ブログメインに検索結果を表示させる
-                       $url = $this->gPage->createWidgetCmdUrl(self::TARGET_WIDGET, $this->gEnv->getCurrentWidgetId(), 'act=search&keyword=' . urlencode($keyword));
-                       $this->redirect($url);
-               }
-               // パラメータ埋め込み
-               $this->tmpl->addVar('_widget', 'url', $this->gEnv->createCurrentPageUrlForMobile());
-               $this->tmpl->addVar('_widget', 'act', 'blog_search');
-       }
-       /**
-        * ウィジェットのタイトルを設定
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               ウィジェットのタイトル名
-        */
-       function _setTitle($request, &$param)
-       {
-               return self::DEFAULT_TITLE;
-       }
-}
-?>
diff --git a/widgets/m/blog_search/include/template/index.tmpl.html b/widgets/m/blog_search/include/template/index.tmpl.html
deleted file mode 100644 (file)
index 40bd5f9..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<patTemplate:tmpl name="_widget">
-<form action="{URL}" method="post" name="search" class="form">
-<input type="hidden" name="act" value="{ACT}" />
-<div><input type="text" name="keyword" size="16" maxlength="16" /><input type="submit" value="検索" /></div>
-</form>
-</patTemplate:tmpl>
diff --git a/widgets/m/blog_search/index.php b/widgets/m/blog_search/index.php
deleted file mode 100644 (file)
index 78d8a14..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 3502 2010-08-18 06:45:51Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/chacha/admin/index.php b/widgets/m/chacha/admin/index.php
deleted file mode 100644 (file)
index 99ff01c..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    マイクロブログ
- * @author     株式会社 毎日メディアサービス
- * @copyright  Copyright 2010 株式会社 毎日メディアサービス.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 3269 2010-06-21 08:15:41Z fishbone $
- * @link       http://www.m-media.co.jp
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/chacha/images/default_avatar32.gif b/widgets/m/chacha/images/default_avatar32.gif
deleted file mode 100644 (file)
index fe7d761..0000000
Binary files a/widgets/m/chacha/images/default_avatar32.gif and /dev/null differ
diff --git a/widgets/m/chacha/images/icon32.png b/widgets/m/chacha/images/icon32.png
deleted file mode 100644 (file)
index e6513e1..0000000
Binary files a/widgets/m/chacha/images/icon32.png and /dev/null differ
diff --git a/widgets/m/chacha/images/icon64.png b/widgets/m/chacha/images/icon64.png
deleted file mode 100644 (file)
index 11fb723..0000000
Binary files a/widgets/m/chacha/images/icon64.png and /dev/null differ
diff --git a/widgets/m/chacha/include/container/admin_m_chachaBaseWidgetContainer.php b/widgets/m/chacha/include/container/admin_m_chachaBaseWidgetContainer.php
deleted file mode 100644 (file)
index 3da6811..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    マイクロブログ
- * @author     株式会社 毎日メディアサービス
- * @copyright  Copyright 2010 株式会社 毎日メディアサービス.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: admin_m_chachaBaseWidgetContainer.php 3282 2010-06-23 05:58:43Z fishbone $
- * @link       http://www.m-media.co.jp
- */
-require_once($gEnvManager->getContainerPath() . '/baseAdminWidgetContainer.php');
-require_once($gEnvManager->getCurrentWidgetDbPath() . '/chachaDb.php');
-
-class admin_m_chachaBaseWidgetContainer extends BaseAdminWidgetContainer
-{
-       protected $_db;                 // DB接続オブジェクト
-       protected $_boardId;    // 掲示板ID
-       const DEFAULT_BBS_ID_HEAD = 'board';            // デフォルトの掲示板ID
-       const DEFAULT_TOP_PAGE = 'other';               // デフォルトのトップページ
-       const WIDGET_TITLE_NAME = 'マイクロブログ(携帯)';                              // ウィジェットタイトル名
-       const CF_TEXT_COLOR = 'text_color';     // 文字色
-       const CF_BG_COLOR = 'bg_color';         // 背景色
-       const CF_INNER_BG_COLOR = 'inner_bg_color';     // 内枠背景色
-       const CF_PROFILE_COLOR = 'profile_color';               // プロフィール背景色
-       const CF_ERR_MESSAGE_COLOR = 'err_message_color';               // エラーメッセージ文字色
-       const CF_MESSAGE_LENGTH = 'message_length';     // 最大メッセージ長
-       const CF_TOP_CONTENTS = 'm:top_contents';               // トップコンテンツ(携帯)
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-               
-               // サブウィジェット起動のときだけ初期処理実行
-               if ($this->gEnv->getIsSubWidget()){
-                       // DBオブジェクト作成
-                       $this->_db = new chachaDb();
-               
-                       $this->_boardId = self::DEFAULT_BBS_ID_HEAD . '0';
-               
-                       // BBS定義を読み込む
-                       $this->_loadConfig($this->_boardId);
-               }
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @return                                                              なし
-        */
-       function _postAssign($request, &$param)
-       {
-               // ウィンドウオープンタイプ取得
-               $openBy = $request->trimValueOf(M3_REQUEST_PARAM_OPEN_BY);              // ウィンドウオープンタイプ
-               if (!empty($openBy)) $this->addOptionUrlParam(M3_REQUEST_PARAM_OPEN_BY, $openBy);
-               
-               // 表示画面を決定
-               $task = $request->trimValueOf(M3_REQUEST_PARAM_OPERATION_TASK);
-               if (empty($task)) $task = self::DEFAULT_TOP_PAGE;
-               
-               // パンくずリストを作成
-               switch ($task){
-                       case 'other':           // その他設定
-                               $linkList = ' &gt;&gt; 基本設定';// パンくずリスト
-                               break;
-               }
-               // ####### 上段メニューの作成 #######
-               $menuText = '<div id="configmenu-upper">' . M3_NL;
-               $menuText .= '<ul>' . M3_NL;
-               $baseUrl = $this->getAdminUrlWithOptionParam(true);// 画面定義ID付き
-
-               // その他設定
-               $current = '';
-               $link = $baseUrl . '&task=other';
-               if ($task == 'other'){          
-                       $current = 'id="current"';
-               }
-               $menuText .= '<li ' . $current . '><a href="'. $this->getUrl($link, true) .'"><span>基本設定</span></a></li>' . M3_NL;
-               
-               // 上段メニュー終了
-               $menuText .= '</ul>' . M3_NL;
-               $menuText .= '</div>' . M3_NL;
-               
-               // 作成データの埋め込み
-               $linkList = '<div id="configmenu-top"><label>' . self::WIDGET_TITLE_NAME . $linkList . '</div>';
-               $outputText .= '<table width="90%"><tr><td>' . $linkList . $menuText . '</td></tr></table>' . M3_NL;
-               $this->tmpl->addVar("_widget", "menu_items", $outputText);
-       }
-       /**
-        * ブログ定義値をDBから取得
-        *
-        * @param string $boardId       掲示板ID
-        * @return bool                         true=取得成功、false=取得失敗
-        */
-       function _loadConfig($boardId)
-       {
-               $this->_configArray = array();
-
-               // BBS定義を読み込み
-               $ret = $this->_db->getAllConfig($rows, $boardId);
-               if ($ret){
-                       // 取得データを連想配列にする
-                       $configCount = count($rows);
-                       for ($i = 0; $i < $configCount; $i++){
-                               $key = $rows[$i]['mc_id'];
-                               $value = $rows[$i]['mc_value'];
-                               $this->_configArray[$key] = $value;
-                       }
-               }
-               return $ret;
-       }
-}
-?>
diff --git a/widgets/m/chacha/include/container/admin_m_chachaOtherWidgetContainer.php b/widgets/m/chacha/include/container/admin_m_chachaOtherWidgetContainer.php
deleted file mode 100644 (file)
index 7169de5..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    マイクロブログ
- * @author     株式会社 毎日メディアサービス
- * @copyright  Copyright 2010 株式会社 毎日メディアサービス.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: admin_m_chachaOtherWidgetContainer.php 3282 2010-06-23 05:58:43Z fishbone $
- * @link       http://www.m-media.co.jp
- */
-require_once($gEnvManager->getCurrentWidgetContainerPath() . '/admin_m_chachaBaseWidgetContainer.php');
-
-class admin_m_chachaOtherWidgetContainer extends admin_m_chachaBaseWidgetContainer
-{
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'admin_other.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $defaultLang    = $this->gEnv->getDefaultLanguage();
-               $act = $request->trimValueOf('act');
-               
-/*             $textColor = $request->trimValueOf('text_color');                               // 文字色
-               $bgColor = $request->trimValueOf('bg_color');                           // 背景色
-               $innerBgColor = $request->trimValueOf('inner_bg_color');                // 内枠背景色
-               $profileColor = $request->trimValueOf('profile_color');         // プロフィール背景色
-               $errMessageColor = $request->trimValueOf('err_message_color');  // エラーメッセージ文字色
-               $messageLength = $request->trimValueOf('message_length');       // 投稿文最大長
-               */
-               $topContents = $request->valueOf('top_contents');       // トップコンテンツ
-               
-               $reloadData = false;            // データの再読み込み
-               if ($act == 'update'){          // 設定更新のとき
-                       // 入力値のエラーチェック
-                       
-                       if ($this->getMsgCount() == 0){                 // エラーのないとき
-                               $ret = true;
-                       /*      if ($ret) $this->_db->updateConfig(self::CF_TEXT_COLOR, $textColor, $this->_boardId);   // 文字色
-                               if ($ret) $this->_db->updateConfig(self::CF_BG_COLOR, $bgColor, $this->_boardId);       // 背景色
-                               if ($ret) $this->_db->updateConfig(self::CF_INNER_BG_COLOR, $innerBgColor, $this->_boardId);    // 内枠背景色
-                               if ($ret) $this->_db->updateConfig(self::CF_PROFILE_COLOR, $profileColor, $this->_boardId);     // プロフィール背景色
-                               if ($ret) $this->_db->updateConfig(self::CF_ERR_MESSAGE_COLOR, $errMessageColor, $this->_boardId);      // エラーメッセージ文字色
-                               if ($ret) $this->_db->updateConfig(self::CF_MESSAGE_LENGTH, $messageLength, $this->_boardId);   // 投稿文最大長
-                               */
-                               if ($ret){
-                                       // 絵文字画像タグをMagic3内部タグに変換
-                                       $this->gInstance->getTextConvManager()->convToEmojiTag($topContents, $html);
-                                       
-                                       $this->_db->updateConfig(self::CF_TOP_CONTENTS, $html, $this->_boardId);        // トップコンテンツ
-                               }
-                               
-                               if ($ret){
-                                       $this->setMsg(self::MSG_GUIDANCE, 'データを更新しました');
-                               } else {
-                                       $this->setMsg(self::MSG_APP_ERR, 'データ更新に失敗しました');
-                               }
-                               $this->gPage->updateParentWindow();// 親ウィンドウを更新
-                       }
-               } else {                // 初期表示の場合
-                       $reloadData = true;             // データの再読み込み
-               }
-               if ($reloadData){
-/*                     $textColor = $this->_configArray[self::CF_TEXT_COLOR];  // 文字色
-                       $bgColor = $this->_configArray[self::CF_BG_COLOR];      // 背景色
-                       $innerBgColor = $this->_configArray[self::CF_INNER_BG_COLOR];   // 内枠背景色
-                       $profileColor = $this->_configArray[self::CF_PROFILE_COLOR];    // プロフィール背景色
-                       $errMessageColor = $this->_configArray[self::CF_ERR_MESSAGE_COLOR];     // エラーメッセージ文字色
-                       $messageLength = $this->_configArray[self::CF_MESSAGE_LENGTH];  // 投稿文最大長*/
-                       $topContents = $this->_configArray[self::CF_TOP_CONTENTS];      // トップコンテンツ
-                       
-                       // コンテンツの変換
-                       $topContents = str_replace(M3_TAG_START . M3_TAG_MACRO_ROOT_URL . M3_TAG_END, $this->getUrl($this->gEnv->getRootUrl()), $topContents);  // Magic3ルートURLの変換
-                       $this->gInstance->getTextConvManager()->convFromEmojiTag($topContents, $topContents);// Magic3内部タグから絵文字画像タグに変換
-               }
-               // 画面に書き戻す
-/*             $this->tmpl->addVar("_widget", "text_color", $textColor);               // 文字色
-               $this->tmpl->addVar("_widget", "bg_color", $bgColor);           // 背景色
-               $this->tmpl->addVar("_widget", "inner_bg_color", $innerBgColor);                // 内枠背景色
-               $this->tmpl->addVar("_widget", "profile_color", $profileColor);         // プロフィール背景色
-               $this->tmpl->addVar("_widget", "err_message_color", $errMessageColor);  // エラーメッセージ文字色
-               $this->tmpl->addVar("_widget", "message_length", $messageLength);       // 投稿文最大長
-               */
-               $this->tmpl->addVar("_widget", "top_contents", $topContents);   // トップコンテンツ
-       }
-}
-?>
diff --git a/widgets/m/chacha/include/container/admin_m_chachaWidgetContainer.php b/widgets/m/chacha/include/container/admin_m_chachaWidgetContainer.php
deleted file mode 100644 (file)
index 12a8e71..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    マイクロブログ
- * @author     株式会社 毎日メディアサービス
- * @copyright  Copyright 2010 株式会社 毎日メディアサービス.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: admin_m_chachaWidgetContainer.php 3282 2010-06-23 05:58:43Z fishbone $
- * @link       http://www.m-media.co.jp
- */
-require_once($gEnvManager->getCurrentWidgetContainerPath() . '/admin_m_chachaBaseWidgetContainer.php');
-
-class admin_m_chachaWidgetContainer extends admin_m_chachaBaseWidgetContainer
-{
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * ディスパッチ処理(メインコンテナのみ実行)
-        *
-     * HTTPリクエストの内容を見て処理をコンテナに振り分ける
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return bool                                                 このクラスの_setTemplate(), _assign()へ処理を継続するかどうかを返す。
-        *                                      true=処理を継続、false=処理を終了
-        */
-       function _dispatch($request, &$param)
-       {
-               // 表示画面を決定
-               $task = $request->trimValueOf(M3_REQUEST_PARAM_OPERATION_TASK);
-               if (empty($task)) $task = self::DEFAULT_TOP_PAGE;
-               
-               // コンテナを起動
-               $goWidget = false;              // サブウィジェットを実行するかどうか
-               switch ($task){
-                       case 'other':           // その他設定
-                               $goWidget = true;               // サブウィジェットを実行するかどうか
-                               break;
-                       default:
-                               break;
-               }
-               if ($goWidget){         // サブウィジェットを実行するかどうか
-                       $this->gLaunch->goSubWidget($task, true);               // 管理者機能で呼び出し
-                       return false;
-               } else {
-                       $this->SetMsg(self::MSG_APP_ERR, "画面が見つかりません");
-                       return true;
-               }
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'message.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @return                                                              なし
-        */
-       function _assign($request, &$param)
-       {
-       }
-}
-?>
diff --git a/widgets/m/chacha/include/container/m_chachaBaseWidgetContainer.php b/widgets/m/chacha/include/container/m_chachaBaseWidgetContainer.php
deleted file mode 100644 (file)
index a75480b..0000000
+++ /dev/null
@@ -1,211 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    マイクロブログ
- * @author     株式会社 毎日メディアサービス
- * @copyright  Copyright 2010 株式会社 毎日メディアサービス.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_chachaBaseWidgetContainer.php 3509 2010-08-19 03:18:16Z fishbone $
- * @link       http://www.m-media.co.jp
- */
-require_once($gEnvManager->getContainerPath() . '/baseMobileWidgetContainer.php');
-require_once($gEnvManager->getCurrentWidgetDbPath() . '/chachaDb.php');
-
-class m_chachaBaseWidgetContainer extends BaseMobileWidgetContainer
-{
-       protected $_db;                 // DB接続オブジェクト
-       protected $_mobileId;           // 携帯ID
-       protected $_boardId;    // 掲示板ID
-       protected $_autolink;           // リンクを自動作成
-       protected $_spacer;             // スペーサ
-       const ERR_MESSAGE_COLOR = '#ff0000';                    // エラーメッセージカラー
-       const SPACER_FORMAT = '<div style="background-color:#aaaaaa;margin:1px 0;height:1px;"><img src="%s/images/system/spacer.gif" width="1" height="1" /></div>';            // スペーサフォーマット
-       const CREATE_CODE_RETRY_COUNT = 10;                             // コード生成のリトライ数
-       const DEFAULT_BBS_ID_HEAD = 'board';            // デフォルトの掲示板ID
-       const AVATAR_DIR = '/widgets/chacha/avatar32';                  // アバター格納ディレクトリ
-       const DEFAULT_AVATAR_ICON_FILE = '/images/default_avatar32.gif';                // デフォルトのアバターアイコン(携帯)
-       const DEFAULT_AVATAR_FILE_EXT = 'gif';                  // アバターファイルのデフォルト拡張子
-       const AVATAR_SIZE = 32;                 // アバター画像のサイズ
-       // 値定義
-       const CF_AUTOLINK = 'autolink';                 // 自動的にリンクを作成
-       const CF_MESSAGE_COUNT_MYPAGE = 'm:message_count_mypage';       // マイページのメッセージ表示項目数(携帯)
-       const CF_TOP_CONTENTS = 'm:top_contents';               // トップコンテンツ(携帯)
-       const CF_MESSAGE_LENGTH = 'message_length';     // 最大メッセージ長
-       // 画面
-       const DEFAULT_TASK = 'top';             // デフォルトの画面
-       const TASK_TOP = 'top';                 // トップ画面
-       const TASK_THREAD = 'thread';                   // スレッド処理
-       const TASK_READ = 'read';               // スレッド表示
-       const TASK_PROFILE = 'profile';                 // プロフィール表示
-       const TASK_MYPAGE = 'mypage';                   // マイページ表示
-       // URL用パラメータ
-       const URL_PARAM_MEMBER_ID = 'memberid';         // 会員ID
-       const URL_PARAM_MESSAGE_ID = 'messageid';               // メッセージID
-       // 共通のCSS
-       const CSS_LINK_STYLE_TOP = 'text-align:right;'; // 上のリンク部のスタイル
-       const CSS_LINK_STYLE_BOTTOM = 'text-align:center;';                                     // 下のリンク部のスタイル
-//     const CSS_LINK_STYLE_BOTTOM_RIGHT = 'text-align:right;';// 下右のリンク部のスタイル
-       const CSS_LINK_STYLE_INNER_BOTTOM = 'text-align:right;';        // 内枠の下のリンク部のスタイル
-
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-                               
-               // 端末IDを取得
-               $this->_mobileId = $this->gEnv->getMobileId();
-                                       
-               // サブウィジェット起動のときだけ初期処理実行
-               if ($this->gEnv->getIsSubWidget()){
-                       // DBオブジェクト作成
-                       $this->_db = new chachaDb();
-               
-                       // 定義ID取得
-                       // 定義IDから掲示板IDを作成
-                       $configId = $this->gEnv->getCurrentWidgetConfigId();
-                       $this->_boardId = self::DEFAULT_BBS_ID_HEAD . intval($configId);
-               
-                       // BBS定義を読み込む
-                       $this->_loadConfig($this->_boardId);
-               
-                       //$this->_currentPageUrl = $this->gEnv->createCurrentPageUrl(); // 現在のページのURL
-                       $this->_currentPageUrl = $this->gEnv->createCurrentPageUrlForMobile();// 現在のページのURL(携帯用のパラメータ付き)
-                       $this->_autolink = $this->_configArray[self::CF_AUTOLINK];              // リンクを自動作成
-                       
-                       // スペーサ作成
-                       $this->_spacer = sprintf(self::SPACER_FORMAT, $this->getUrl($this->gEnv->getRootUrl()));
-               }
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @return                                                              なし
-        */
-       function _postAssign($request, &$param)
-       {
-               // 共通のリンク設定
-               $this->tmpl->addVar("_widget", "link_style_top", self::CSS_LINK_STYLE_TOP);// 上下のリンク部のスタイル
-               $this->tmpl->addVar("_widget", "link_style_bottom", self::CSS_LINK_STYLE_BOTTOM);// 下のリンク部のスタイル
-               //$this->tmpl->addVar("_widget", "link_style_bottom_right", self::CSS_LINK_STYLE_BOTTOM_RIGHT);// 下右のリンク部のスタイル
-               $this->tmpl->addVar("_widget", "link_style_inner_bottom", self::CSS_LINK_STYLE_INNER_BOTTOM);// 内枠下のリンク部のスタイル
-               $this->tmpl->addVar('_widget', 'top_url', $this->gEnv->createCurrentPageUrlForMobile(''));
-               
-               // メッセージカラーを設定
-               if ($this->getMsgCount(1) > 0 || $this->getMsgCount(2) > 0){            // エラーメッセージが出力されているとき
-                       $errMessageColor = self::ERR_MESSAGE_COLOR;             // エラーメッセージ色
-                       $errMessageStyle = '';
-                       if (!empty($errMessageColor)) $errMessageStyle .= 'color:' . $errMessageColor . ';';
-                       $attr = 'style="' . $errMessageStyle . 'text-align:center;"';
-                       $this->setMessageAttr($attr);
-               } else if ($this->getMsgCount(3) > 0){                  // ガイダンスメッセージが出力されているとき
-                       $attr = 'style="text-align:center;"';
-                       $this->setMessageAttr($attr);
-               }
-       }
-       /**
-        * ブログ定義値をDBから取得
-        *
-        * @param string $boardId       掲示板ID
-        * @return bool                         true=取得成功、false=取得失敗
-        */
-       function _loadConfig($boardId)
-       {
-               $this->_configArray = array();
-
-               // BBS定義を読み込み
-               $ret = $this->_db->getAllConfig($rows, $boardId);
-               if ($ret){
-                       // 取得データを連想配列にする
-                       $configCount = count($rows);
-                       for ($i = 0; $i < $configCount; $i++){
-                               $key = $rows[$i]['mc_id'];
-                               $value = $rows[$i]['mc_value'];
-                               $this->_configArray[$key] = $value;
-                       }
-               }
-               return $ret;
-       }
-       /**
-        * アバターファイルのURLを取得
-        *
-        * @param string $memberId              会員ID
-        * @return string                               URL
-        */
-       function getAvatarUrl($memberId)
-       {
-               $avatarImagePath = $this->gEnv->getResourcePath() . self::AVATAR_DIR . '/' . $memberId . '.' . self::DEFAULT_AVATAR_FILE_EXT;
-               if (file_exists($avatarImagePath)){             // アバターファイルが見つからないときはデフォルトを使用
-                       $avatarImageUrl = $this->gEnv->getResourceUrl() . self::AVATAR_DIR . '/' . $memberId . '.' . self::DEFAULT_AVATAR_FILE_EXT;
-               } else {
-                       $avatarImageUrl = $this->gEnv->getCurrentWidgetRootUrl() . self::DEFAULT_AVATAR_ICON_FILE;
-               }
-               return $avatarImageUrl;
-       }
-       /**
-        * メッセージを表示用に変換
-        *
-        * @param string $message               変換元メッセージ
-        * @param string $threadId              スレッドID
-        * @return string                               変換後メッセージ
-        */
-       function convDispMessage($message, $threadId)
-       {
-               // リンク変換
-               if (!empty($this->_autolink)){          // 自動リンク作成のとき
-                       $message = preg_replace("/(https?):\/\/([\w;\/\?:\@&=\+\$,\-\.!~\*'\(\)%#]+)/", "<a href=\"$1://$2\" target=\"_blank\">$1://$2</a>", $message);
-               
-                       // メッセージへのリンク
-               //      $baseUrl = $this->convertUrlToHtmlEntity($this->getUrl($this->_currentPageUrl . '&' . M3_REQUEST_PARAM_BBS_THREAD_ID . '=' . $threadId, true));
-                       $messageUrl = $baseUrl . $this->convertUrlToHtmlEntity('&' . M3_REQUEST_PARAM_ITEM_NO . '=');
-                       $messageListUrl = $baseUrl . $this->convertUrlToHtmlEntity('&' . M3_REQUEST_PARAM_LIST_NO . '=');
-                       $message = preg_replace("/&gt;&gt;([0-9]+)(?![-\d])/", '<a href="' . $messageUrl . '$1" target="_blank">&gt;&gt;$1</a>', $message);
-                       $message = preg_replace("/&gt;&gt;([0-9]+)\-([0-9]+)/", '<a href="' . $messageListUrl . '$1-$2" target="_blank">&gt;&gt;$1-$2</a>', $message);
-               }
-               return $message;
-       }
-       /**
-        * ランダム文字列を作成
-        *
-        * @param string $baseChars             使用する文字
-        * @param int $length                   作成する文字列の長さ
-        * @return string                               ランダム文字列。作成できなかった場合は空文字列。
-        */
-       function _createRandString($baseChars, $length)
-       {
-       // 文字列の初期化
-       $destStr = '';
-
-               if (!(is_numeric($length) && $length > 0)) return $destStr;
-    
-               for ($i = 0; $i < $length; $i++){
-                       $pos = rand(0, strlen($baseChars) -1);
-                       $destStr .= $baseChars[$pos];
-               }
-               return $destStr;
-       }
-       /**
-        * テキストデータを表示用のテキストに変換
-        *
-        * 変換内容 ・改行コードをスペース「&nbsp;」に変換
-        *
-        * @param string $src                   変換するデータ
-        * @return string                               変換後データ
-        */
-       function _convertToPreviewTextWithSpace($src)
-       {
-               return preg_replace("/(\015\012)|(\015)|(\012)/", "&nbsp;", $src);
-       }
-}
-?>
diff --git a/widgets/m/chacha/include/container/m_chachaMypageWidgetContainer.php b/widgets/m/chacha/include/container/m_chachaMypageWidgetContainer.php
deleted file mode 100644 (file)
index c9bca04..0000000
+++ /dev/null
@@ -1,257 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    マイクロブログ
- * @author     株式会社 毎日メディアサービス
- * @copyright  Copyright 2010 株式会社 毎日メディアサービス.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_chachaMypageWidgetContainer.php 3363 2010-07-10 05:12:31Z fishbone $
- * @link       http://www.m-media.co.jp
- */
-require_once($gEnvManager->getCurrentWidgetContainerPath() .   '/m_chachaBaseWidgetContainer.php');
-
-class m_chachaMypageWidgetContainer extends m_chachaBaseWidgetContainer
-{
-       private $messageCount;          // 表示メッセージ数
-       private $isExistsMessage;       // メッセージが存在するかどうか
-       private $isExistsNextPage;      // 次のページがあるかどうか
-       const THREAD_ID_LENGTH = 5;     // スレッドIDの長さ
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'mypage.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $act = $request->trimValueOf('act');
-               $pageNo = $request->trimIntValueOf(M3_REQUEST_PARAM_PAGE_NO, '1');                              // ページ番号
-               $postTicket = $request->trimValueOf('ticket');          // POST確認用
-               $memberId = $request->trimValueOf(self::URL_PARAM_MEMBER_ID);   // 会員ID
-               $message = $request->mobileTrimValueOf('message');              // 投稿メッセージ
-               
-               // 現在アクセス中の端末IDを取得
-               $canPost = false;                       // ブログ投稿可能かどうか
-               $clientId = $this->_mobileId;
-               
-               // 自分のブログページのときは投稿可能
-               $clientMemberId = '';                   // 現在の端末の会員ID
-               $ret = $this->_db->getMemberInfoByDeviceId($clientId, $row);
-               if ($ret) $clientMemberId = $row['mb_id'];
-               if (empty($memberId)){
-                       if (!empty($clientMemberId)){           // 登録メンバーのとき
-                               $memberId = $clientMemberId;
-                               $canPost = true;                        // ブログ投稿可能かどうか
-                       }
-               } else if ($memberId == $clientMemberId){
-                       $canPost = true;                        // ブログ投稿可能かどうか
-               }
-
-               if ($act == 'add'){             // 投稿追加のとき
-                       if (!empty($postTicket) && $postTicket == $request->getSessionValue(M3_SESSION_POST_TICKET)){           // 正常なPOST値のとき
-                               // 投稿権限のチェック
-                               if (!$canPost) $this->setUserErrorMsg('投稿権限がありません');
-                                               
-                               // 入力項目のエラーチェック
-                               //$this->checkMessageInput($this->_boardId, $threadId, $name, $email, $message);
-                               if ($this->checkInput($message, 'メッセージ')){
-                                       // 文字数のチェック
-                                       $messageLength = $this->_configArray[self::CF_MESSAGE_LENGTH];                  // 最大メッセージ長
-                                       if (getLetterCount($message) > $messageLength) $this->setUserErrorMsg('メッセージは' . $messageLength . '文字まで入力可能です');
-                               }
-                               if (empty($memberId)) $this->setUserErrorMsg('会員IDが不正です');
-                       
-                               // エラーなしの場合は、データを更新
-                               if ($this->getMsgCount() == 0){
-                                       // スレッドID作成
-                                       $threadId = $this->createThreadId();
-                                       if (empty($threadId)){
-                                               $this->setAppErrorMsg('スレッドIDが作成できません');
-                                       } else {
-                                               // 新規投稿文の追加
-                                               $ret = $this->_db->addNewThread($this->_boardId, $threadId, $memberId, ''/*件名*/, $message);
-
-                                               if ($ret){              // データ追加成功のとき
-                                                       $this->setGuidanceMsg('投稿完了しました');
-                                                       
-                                                       $message = '';                  // メッセージクリア
-                                               } else {
-                                                       $this->setAppErrorMsg('投稿に失敗しました');
-                                               }
-                                       }
-                               }
-                       }
-                       $request->unsetSessionValue(M3_SESSION_POST_TICKET);            // セッション値をクリア
-               }
-
-               // 会員情報を取得
-               $ret = $this->_db->getMemberInfoById($memberId, $row);
-               if ($ret){
-                       // アバターを設定
-                       $avatarImageUrl = $this->getAvatarUrl($memberId);// アバター画像URL
-                       $imageTag = '<img src="' . $this->getUrl($avatarImageUrl) . '" width="' . self::AVATAR_SIZE . '" height="' . self::AVATAR_SIZE .'" />';
-                       $this->tmpl->addVar("thread_area", "avatar_image", $imageTag);          // 画像
-
-                       // 投稿文を作成
-                       $this->messageCount = $this->_configArray[self::CF_MESSAGE_COUNT_MYPAGE];               // 最大項目数
-                       $this->_db->getThreadByMemberId($this->_boardId, $memberId, $this->messageCount, $pageNo, array($this, 'itemsLoop'), true);
-                       
-                       // 画面にデータを埋め込む
-                       $this->tmpl->addVar("thread_area", "name", $this->convertToDispString($row['mb_name']));                                // ユーザ名
-
-                       if ($canPost){                  // ブログ投稿可能なとき
-                               $this->tmpl->setAttribute('add_area', 'visibility', 'visible');// 投稿エリアを表示
-                               $this->tmpl->addVar("add_area", "member_id", $memberId);                        // 会員ID
-                               $this->tmpl->addVar('add_area', 'act', 'add');          // 新規登録
-                               $this->tmpl->addVar("add_area", "current_url", $this->gEnv->getCurrentRequestUri());
-                               
-                               // ハッシュキー作成
-                               $postTicket = md5(time() . $this->gAccess->getAccessLogSerialNo());
-                               $request->setSessionValue(M3_SESSION_POST_TICKET, $postTicket);         // セッションに保存
-                               $this->tmpl->addVar("add_area", "ticket", $postTicket);                         // 画面に書き出し
-                       }
-                       
-                       // スレッドが存在しないときはタグを非表示にする
-                       if (!$this->isExistsMessage){
-                               // 投稿なしのメッセージを表示。自分自身のマイページのときは表示しない。
-                               if (!$canPost) $this->tmpl->setAttribute('no_message_area', 'visibility', 'visible');
-                               
-                               $this->tmpl->setAttribute('message_list', 'visibility', 'hidden');
-                       }
-                       // リンク作成
-                       //$registLink = $this->convertUrlToHtmlEntity($this->getUrl($this->_currentPageUrl . '&task=' . self::TASK_PROFILE . '&' . self::URL_PARAM_MEMBER_ID . '=' . $memberId, true));
-                       $registLink = $this->convertUrlToHtmlEntity($this->getUrl($this->gEnv->createCurrentPageUrlForMobile('task=' . self::TASK_PROFILE . '&' . self::URL_PARAM_MEMBER_ID . '=' . $memberId)));
-                       $registName = 'プロフィール';
-                       $this->tmpl->addVar("_widget", "regist_url", $registLink);
-                       $this->tmpl->addVar("_widget", "regist_name", $registName);
-                       
-                       // ページ遷移用リンク
-                       $pageLink = '';
-                       if ($pageNo > 1){                       // 前のページがあるとき
-                               $foreLink = $this->convertUrlToHtmlEntity($this->getUrl($this->_currentPageUrl . '&' . self::URL_PARAM_MEMBER_ID . '=' . $memberId . '&page=' . ($pageNo -1), true));
-                               $pageLink .= '<a href="' . $foreLink . '" accesskey="1">前へ[1]</a>';
-                       }
-                       if ($this->isExistsNextPage){   // 次のページがあるとき
-                               if (!empty($pageLink)) $pageLink .= '&nbsp;&nbsp;';
-                               $nextLink = $this->convertUrlToHtmlEntity($this->getUrl($this->_currentPageUrl . '&' . self::URL_PARAM_MEMBER_ID . '=' . $memberId . '&page=' . ($pageNo +1), true));
-                               $pageLink .= '<a href="' . $nextLink . '" accesskey="2">次へ[2]</a>';
-                       }
-                       $this->tmpl->addVar("_widget", "page_link", $pageLink);
-               } else {
-                       $this->setUserErrorMsg('会員IDが不正です');
-                       
-                       // スレッド表示部を非表示にする
-                       $this->tmpl->setAttribute('thread_area', 'visibility', 'hidden');
-               }
-               
-               // 画面にデータを埋め込む
-               $this->tmpl->addVar("add_area", "message", $message);
-       }
-       /**
-        * 取得したコンテンツ項目をテンプレートに設定する
-        *
-        * @param int           $index                  行番号
-        * @param array         $fetchedRow             取得行
-        * @param object        $param                  任意使用パラメータ
-        * @return bool                                         trueを返すとループ続行。falseを返すとその時点で終了。
-        */
-       function itemsLoop($index, $fetchedRow)
-       {
-               // 最大表示数を超えたときは終了
-               if ($index >= $this->messageCount){
-                       $this->isExistsNextPage = true;                         // 次のページあり
-                       return false;
-               }
-               
-               // 日付作成
-               $weekDay = array('日', '月', '火', '水', '木', '金', '土');
-               $timestamp = strtotime($fetchedRow['mm_regist_dt']);
-               $weekNo = intval(date('w', $timestamp));
-               $date = date('m/d(' . $weekDay[$weekNo] . ') H:i:s', $timestamp);
-               
-               // 投稿文
-               $message = $this->convertToDispString($fetchedRow['mm_message']);// 文字エスケープ処理
-               $message = $this->convertToPreviewText($message);                       // 改行をBRタグに変換
-               if ($fetchedRow['mm_index'] == 1) $message .= '<br />';         // トップのメッセージは改行を追加
-               
-               // メッセージ変換
-               $message = $this->convDispMessage($message, $fetchedRow['mm_thread_id']);
-               
-               // メッセージID
-               $messageId = $fetchedRow['mm_thread_id'];
-               $messageCount = $fetchedRow['mt_message_count'] -1;             // メッセージ数
-               if ($messageCount <= 0) $messageCount = '';                             // 返信がないときはメッセージ数を表示しない
-               $messageLink = $this->convertUrlToHtmlEntity($this->getUrl($this->_currentPageUrl . '&' . self::URL_PARAM_MESSAGE_ID . '=' . $messageId));
-               $messageIdTag = '<a href="' . $messageLink  . '">#' . $messageId . '</a>';
-
-               // 削除メッセージのとき
-               /*if ($fetchedRow['mm_deleted']){
-                       $message = '参照できません。';
-               }*/
-               
-               $row = array(
-                       'id'            => $messageIdTag,               // メッセージID
-                       'message_count' => $messageCount,       // メッセージ数
-                       'date'          => $date,                       // 投稿日付
-                       'message'               => $message,            // 投稿文
-                       'spacer'        => $this->_spacer       // スペーサ
-               );
-               $this->tmpl->addVars('message_list', $row);
-               $this->tmpl->parseTemplate('message_list', 'a');
-               
-               // メッセージが存在するかどうか
-               $this->isExistsMessage = true;
-               return true;
-       }
-       /**
-        * スレッドIDを作成
-        *
-        * @return string                               スレッドID
-        */
-       function createThreadId()
-       {
-               $threadId = '';
-               
-               for ($i = 0; $i < self::CREATE_CODE_RETRY_COUNT; $i++){
-                       // 「0,I,L,O,i,l,o」除くランダム文字列を作成
-                       $threadId = $this->_createRandString('123456789ABCDEFGHJKMNPQRSTUVWXYZabcdefghjkmnpqrstuvwxyz', self::THREAD_ID_LENGTH);
-               
-                       // すでに登録済みかどうかチェック
-                       $ret = $this->_db->isExistsThreadId($threadId);
-                       if (!$ret) break;
-               }
-               return $threadId;
-       }
-}
-?>
diff --git a/widgets/m/chacha/include/container/m_chachaProfileWidgetContainer.php b/widgets/m/chacha/include/container/m_chachaProfileWidgetContainer.php
deleted file mode 100644 (file)
index 4c13f44..0000000
+++ /dev/null
@@ -1,377 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    マイクロブログ
- * @author     株式会社 毎日メディアサービス
- * @copyright  Copyright 2010 株式会社 毎日メディアサービス.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_chachaProfileWidgetContainer.php 3306 2010-06-28 07:07:39Z fishbone $
- * @link       http://www.m-media.co.jp
- */
-require_once($gEnvManager->getCurrentWidgetContainerPath() .   '/m_chachaBaseWidgetContainer.php');
-
-class m_chachaProfileWidgetContainer extends m_chachaBaseWidgetContainer
-{
-       const DEFAULT_PAGE_TITLE = 'プロフィール';
-       const MEMBER_ID_LENGTH = 5;             // 会員IDの桁数
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'profile.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $act = $request->trimValueOf('act');
-               $postTicket = $request->trimValueOf('ticket');          // POST確認用
-               $memberId = $request->trimValueOf(self::URL_PARAM_MEMBER_ID);   // 会員ID
-
-               // ##### ユーザの識別 #####
-               // ユーザIDでユーザのプロフィールを参照。ユーザIDがない場合は自分自身のプロフィールを表示。
-               // クライアントIDを取得
-               $canEdit = false;                       // データ編集可能かどうか
-               $isNew = false;                         // 新規登録かどうか
-               
-               // クライアントIDを取得
-               $clientId = $this->_mobileId;
-
-               // 会員情報が登録されている場合は更新。登録されていない場合は新規登録。
-               $clientMemberId = '';                   // 現在の端末の会員ID
-               $ret = $this->_db->getMemberInfoByDeviceId($clientId, $row);
-               if ($ret) $clientMemberId = $row['mb_id'];
-               if (empty($memberId)){
-                       if (empty($clientMemberId)){
-                               $isNew = true;                                  // 新規登録処理
-                       } else {
-                               $memberId = $clientMemberId;
-                       }
-                       $canEdit = true;                        // データ編集可能かどうか
-               } else if ($memberId == $clientMemberId){               // 自分自身のデータのとき
-                       $canEdit = true;                        // データ編集可能かどうか
-               }
-
-               $name = $request->mobileTrimValueOf('name');                                    // ユーザ名
-               $email = $request->mobileTrimValueOf('email');                          // Eメール
-               $url = $request->mobileTrimValueOf('url');                                      // URL
-               $avatar = '';                   // アバターファイル名
-               $showEmail = ($request->trimValueOf('show_email') == 'on') ? 1 : 0;             // Eメールアドレスを公開するかどうか
-               
-               $reloadData = false;            // データの再読み込み
-               if ($act == 'add'){             // 新規追加のとき
-                       if (!empty($postTicket) && $postTicket == $request->getSessionValue(M3_SESSION_POST_TICKET)){           // 正常なPOST値のとき
-                               // 入力チェック
-                               $this->checkInput($name, 'ニックネーム');
-                               $this->checkMailAddress($email, 'Eメール', true/*空OK*/);
-                               $this->checkInput($clientId, '端末ID');
-                       
-                               if ($this->_db->isExistsMemberName($name)) $this->setUserErrorMsg('このニックネームはすでに存在しています');
-                               
-                               // エラーなしの場合は、データを登録
-                               if ($this->getMsgCount() == 0){
-                                       // 会員ID作成
-                                       $memberId = $this->createMemberId();
-                                       if (empty($memberId)){
-                                               $this->setAppErrorMsg('IDが作成できません');
-                                       } else {
-                                               // 一般ユーザの場合はユーザIDも登録
-                                               $userId = 0;
-                                               $userInfo = $this->gEnv->getCurrentUserInfo();
-                                               if (!is_null($userInfo) && $userInfo->userType == UserInfo::USER_TYPE_NORMAL) $userId = $this->gEnv->getCurrentUserId();
-                                               
-                                               $ret = $this->_db->addMember($clientId, $memberId, $userId, $name, $email, $url, ''/*アバターファイル名*/, $showEmail);
-                                               if ($ret){
-                                                       $this->setGuidanceMsg('登録完了しました');
-                                                       $reloadData = true;             // データの再読み込み
-                                                       
-                                                       $isNew = false;                                 // 更新処理画面を表示
-                                               }
-                                       }
-                               }
-                       }
-                       $request->unsetSessionValue(M3_SESSION_POST_TICKET);            // セッション値をクリア
-               } else if ($act == 'update'){           // 設定更新のとき
-                       if (!empty($postTicket) && $postTicket == $request->getSessionValue(M3_SESSION_POST_TICKET)){           // 正常なPOST値のとき
-                               // 更新権限のチェック
-                               if (!$canEdit) $this->setUserErrorMsg('更新権限がありません');
-                               
-                               // 入力チェック
-                               $this->checkInput($name, 'ニックネーム');
-                               $this->checkMailAddress($email, 'Eメール', true/*空OK*/);
-                               $this->checkInput($clientId, '端末ID');
-                       
-                               $ret = $this->_db->getMemberInfoByDeviceId($clientId, $row);
-                               if ($ret){
-                                       if ($name != $row['mb_name'] && $this->_db->isExistsMemberName($name)) $this->setUserErrorMsg('このニックネームはすでに存在しています');
-                               }
-                                                               
-                               // エラーなしの場合は、データを更新
-                               if ($this->getMsgCount() == 0){
-                                       $ret = $this->_db->updateMember($clientId, $name, $email, $url, $avatar, $showEmail, $newSerial);
-                                       if ($ret){
-                                               $this->setGuidanceMsg('更新完了しました');
-                                               $reloadData = true;             // データの再読み込み
-                                       }
-                               }
-                       }
-                       $request->unsetSessionValue(M3_SESSION_POST_TICKET);            // セッション値をクリア
-               } else {
-                       $reloadData = true;             // データの再読み込み
-               }
-               
-               // データの再取得
-               if ($reloadData){
-                       $ret = $this->_db->getMemberInfoById($memberId, $row);
-                       if ($ret){
-                               $name = $row['mb_name'];                // ユーザ名
-                               $email = $row['mb_email'];      // Eメール
-                               $url = $row['mb_url'];          // URL
-                               $showEmail = $row['mb_show_email'];             // Eメールを公開するかどうか
-                       } else if (!empty($memberId)){
-                               $this->setUserErrorMsg('登録されていないユーザです');
-                               $memberId = '';         // 会員ID初期化
-                               $canEdit = false;                       // データ編集不可
-                       }
-               }
-               // リンク作成
-               $mypageUrl = '';
-               //if (!empty($memberId)) $mypageUrl = $this->convertUrlToHtmlEntity($this->getUrl($this->_currentPageUrl . '&' . self::URL_PARAM_MEMBER_ID . '=' . $memberId, true));
-               if (!empty($memberId)) $mypageUrl = $this->convertUrlToHtmlEntity($this->getUrl($this->gEnv->createCurrentPageUrlForMobile(self::URL_PARAM_MEMBER_ID . '=' . $memberId)));
-                                       
-               // 編集状態の設定
-               if ($canEdit){          // 編集可の場合
-                       // 各部の表示制御
-                       if ($isNew){            // 新規登録のとき
-                               // メッセージ
-                               if ($this->getMsgCount() == 0) $this->setGuidanceMsg('ユーザ登録して下さい');
-                               
-                               $this->tmpl->setAttribute('add_area', 'visibility', 'visible');// 新規登録ボタン表示
-                               $this->tmpl->addVar('_widget', 'act', 'add');           // 新規登録
-                       } else {                // 更新のとき
-                               $this->tmpl->setAttribute('update_area', 'visibility', 'visible');// 更新ボタン表示
-                               $this->tmpl->addVar('_widget', 'act', 'update');                // 更新
-                       }
-                       // 各入力部表示
-                       $this->tmpl->setAttribute('name_input_area', 'visibility', 'visible');  // 名前編集
-                       $this->tmpl->setAttribute('name_required_area', 'visibility', 'visible');               // 「必須」メッセージ
-                       $this->tmpl->setAttribute('email_area', 'visibility', 'visible');                               // Eメール入力
-                       $this->tmpl->setAttribute('url_area', 'visibility', 'visible');                         // URL入力
-                       $this->tmpl->setAttribute('show_email_area', 'visibility', 'visible');                  // Eメール公開
-                       
-                       // リンクを表示
-                       $mypageName = '';// マイページURL
-                       $mypageLink = '';
-                       if (!empty($mypageUrl)){
-                               $mypageName = '投稿[3]';
-                               $mypageLink = '<a href="' . $mypageUrl . '" accesskey="3">投稿[3]</a><br />';
-                       }
-                       $this->tmpl->addVar("_widget", "mypage_name", $mypageName);
-                       $this->tmpl->addVar("_widget", "mypage_link", $mypageLink);
-                       //$this->tmpl->setAttribute('top_link_area', 'visibility', 'visible');
-                       //$this->tmpl->addVar("_widget", "mypage_url", $mypageUrl);                     // マイページURL
-                       
-                       // 値の埋め込み
-                       $this->tmpl->addVar("name_input_area", "name", $name);          // ユーザ名
-                       $this->tmpl->addVar("show_email_area", "email", $email);        // Eメール
-                       $this->tmpl->addVar("url_area", "url", $url);           // URL
-                       if ($showEmail) $this->tmpl->addVar("show_email_area", "show_email", 'checked');                // Eメールを公開するかどうか
-                       $this->tmpl->addVar('_widget', 'current_url', $this->gEnv->createCurrentPageUrlForMobile('task=' . self::TASK_PROFILE));
-                       
-                       // ハッシュキー作成
-                       $postTicket = md5(time() . $this->gAccess->getAccessLogSerialNo());
-                       $request->setSessionValue(M3_SESSION_POST_TICKET, $postTicket);         // セッションに保存
-                       $this->tmpl->addVar("_widget", "ticket", $postTicket);                          // 画面に書き出し
-               } else {
-                       if (!empty($memberId)){
-                               // 各部の表示制御
-                               $this->tmpl->setAttribute('name_area', 'visibility', 'visible');        // 名前表示
-                               if ($showEmail) $this->tmpl->setAttribute('email_area', 'visibility', 'visible');
-                               
-                               // 値の埋め込み
-                               $this->tmpl->addVar("name_area", "name", $name);                // ユーザ名
-                               $this->tmpl->addVar("name_area", "mypage_url", $mypageUrl);                     // マイページURL
-                               $this->tmpl->addVar("email_area", "email", $email);                     // Eメール
-                               $urlStr = '';
-                               if (!empty($url)) $urlStr = '<a href="' . $this->convertUrlToHtmlEntity($url) . '">' . $this->convertToDispString($url) . '</a>';
-                               $this->tmpl->addVar("_widget", "url", $urlStr);         // URL
-                       }
-               }
-               
-               $this->tmpl->addVar("_widget", "page_title", self::DEFAULT_PAGE_TITLE);         // ページタイトル
-               
-               $memberIdStr = '';
-               if (!empty($mypageUrl)) $memberIdStr = '<a href="' . $mypageUrl . '">' . $this->convertToDispString($memberId) . '</a>';
-               $this->tmpl->addVar("_widget", "id", $memberIdStr);             // マイブログページへのリンク
-               
-               // アバター画像
-               $avatarImageUrl = $this->getAvatarUrl($memberId);// アバター画像URL
-               $imageTag = '<img src="' . $this->getUrl($avatarImageUrl) . '" width="' . self::AVATAR_SIZE . '" height="' . self::AVATAR_SIZE .'" />';
-               $this->tmpl->addVar("_widget", "avatar_img", $imageTag);                // 画像
-       }
-       /**
-        * 会員IDを作成
-        *
-        * @return string                               会員ID
-        */
-       function createMemberId()
-       {
-               $memberId = '';
-               
-               for ($i = 0; $i < self::CREATE_CODE_RETRY_COUNT; $i++){
-                       // 「0」除くランダム文字列を作成
-                       $memberId = $this->_createRandString('123456789', self::MEMBER_ID_LENGTH);
-               
-                       // すでに登録済みかどうかチェック
-                       $ret = $this->_db->isExistsMemberId($memberId);
-                       if (!$ret) break;
-               }
-               return $memberId;
-       }
-       /**
-        * 画像の種別を取得
-        *
-        * @param string $mime  MIMEコンテンツタイプ
-        * @return string               画像の種別
-        */
-       function getImageType($mime)
-       {
-               if ($mime != ''){
-                       if ($mime == 'image/gif')       return 'gif';
-                       if ($mime == 'image/jpeg')      return 'jpeg';
-                       if ($mime == 'image/jpg')       return 'jpeg';
-                       if ($mime == 'image/pjpeg')     return 'jpeg';
-                       if ($mime == 'image/png')       return 'png';
-               }
-               return '';
-       }               
-       /**
-        * サムネールを作成
-        *
-        * @param string $type  MIMEコンテンツタイプ
-        * @param string $path  拡張子
-        * @param int $size             サムネールの縦横サイズ
-        * @return object               画像オブジェクト
-        */
-       function createThumb($type, $path, $size)
-       {
-               // 画像作成
-               switch ($type){
-                       case "jpeg":
-                               $img = @imagecreatefromjpeg($path);
-                               break;
-                       case "gif":
-                               $img = @imagecreatefromgif($path);
-                               break;
-                       case "png":
-                               $img = @imagecreatefrompng($path);
-                               break;
-                       default:
-                               return false;
-               }
-               
-               // size for thumbnail
-               $width = imagesx($img);
-               $height = imagesy($img);
-               
-               if ($width > $height){
-                       $n_height = $height * ($size / $width);
-                       $n_width = $size;
-               } else {
-                       $n_width = $width * ($size / $height);
-                       $n_height = $size;
-               }
-               
-               $x = 0;
-               $y = 0;
-               if ($n_width < $size) $x = round(($size - $n_width) / 2);
-               if ($n_height < $size) $y = round(($size - $n_height) / 2);
-               
-               // imagecreatetruecolor
-               $thumb = imagecreatetruecolor($size, $size);
-               
-               $bgcolor = imagecolorallocate($thumb, 255, 255, 255);
-               imagefill($thumb, 0, 0, $bgcolor);
-               
-               // imagecopyresized (imagecopyresampled)
-               if (function_exists("imagecopyresampled")){
-                       if (!imagecopyresampled($thumb, $img, $x, $y, 0, 0, $n_width, $n_height, $width, $height)){
-                               if (!imagecopyresized($thumb, $img, $x, $y, 0, 0, $n_width, $n_height, $width, $height)) return false;
-                       }
-               } else {
-                       if (!imagecopyresized($thumb, $img, $x, $y, 0, 0, $n_width, $n_height, $width, $height)) return false;
-               }
-               return $thumb;
-       }
-       /**
-        * サムネールを出力
-        *
-        * @param string $type  MIMEコンテンツタイプ
-        * @param object $image 画像オブジェクト
-        * @param string $path  ファイル保存の場合のパス
-        * @return bool                 true=成功、false=失敗
-        */
-       function outputThumb($type, &$image, $path = null)
-       {
-               $ret = false;
-               if (is_null($path)){
-                       switch ($type){
-                               case "jpeg":
-                                       $ret = imagejpeg($image);
-                                       break;
-                               case "gif":
-                                       $ret = imagegif($image);
-                                       break;
-                               case "png":
-                                       $ret = imagepng($image);
-                                       break;
-                       }
-               } else {
-                       switch ($type){
-                               case "jpeg":
-                                       $ret = imagejpeg($image, $path);
-                                       break;
-                               case "gif":
-                                       $ret = imagegif($image, $path);
-                                       break;
-                               case "png":
-                                       $ret = imagepng($image, $path);
-                                       break;
-                       }
-               }
-               // イメージを破棄
-               imagedestroy($image);
-               
-               return $ret;
-       }
-}
-?>
diff --git a/widgets/m/chacha/include/container/m_chachaReadWidgetContainer.php b/widgets/m/chacha/include/container/m_chachaReadWidgetContainer.php
deleted file mode 100644 (file)
index 508fc36..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    マイクロブログ
- * @author     株式会社 毎日メディアサービス
- * @copyright  Copyright 2010 株式会社 毎日メディアサービス.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_chachaReadWidgetContainer.php 3363 2010-07-10 05:12:31Z fishbone $
- * @link       http://www.m-media.co.jp
- */
-require_once($gEnvManager->getCurrentWidgetContainerPath() .   '/m_chachaBaseWidgetContainer.php');
-
-class m_chachaReadWidgetContainer extends m_chachaBaseWidgetContainer
-{
-       private $messageCount;                  // メッセージ数
-       private $isExistsMessage;       // メッセージが存在するかどうか
-       private $isExistsNextPage;      // 次のページがあるかどうか
-
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'thread_read.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $act = $request->trimValueOf('act');
-               $pageNo = $request->trimIntValueOf(M3_REQUEST_PARAM_PAGE_NO, '1');                              // ページ番号
-               
-               // クライアントIDを取得
-               $clientId = $this->_mobileId;
-               
-               // 会員IDを取得
-               $clientMemberId = '';                   // 現在の端末の会員ID
-               $ret = $this->_db->getMemberInfoByDeviceId($clientId, $row);
-               if ($ret) $clientMemberId = $row['mb_id'];
-               
-               // 表示メッセージ取得
-               // 1つ多く呼び出し、次のページがあるか確認
-               $this->messageCount = $this->_configArray[self::CF_MESSAGE_COUNT_MYPAGE];               // 最大項目数
-               $this->_db->getThread($this->_boardId, $this->messageCount, $pageNo, array($this, 'itemsLoop'), true);
-       
-               // 登録用リンクを作成。会員として認識できないときはプロフィール画面へ、認識できる場合はマイページ画面へ遷移。
-               if (empty($clientMemberId)){
-                       //$registLink = $this->convertUrlToHtmlEntity($this->getUrl($this->_currentPageUrl . '&task=' . self::TASK_PROFILE, true));
-                       $registLink = $this->convertUrlToHtmlEntity($this->getUrl($this->gEnv->createCurrentPageUrlForMobile('task=' . self::TASK_PROFILE)));
-                       $registName = 'ユーザ登録';
-               } else {
-                       //$registLink = $this->convertUrlToHtmlEntity($this->getUrl($this->_currentPageUrl . '&task=' . self::TASK_MYPAGE . '&' . self::URL_PARAM_MEMBER_ID . '=' . $clientMemberId, true));
-                       $registLink = $this->convertUrlToHtmlEntity($this->getUrl($this->gEnv->createCurrentPageUrlForMobile('task=' . self::TASK_MYPAGE . '&' . self::URL_PARAM_MEMBER_ID . '=' . $clientMemberId)));
-                       $registName = '投稿';
-               }
-               $this->tmpl->addVar("_widget", "regist_url", $registLink);
-               $this->tmpl->addVar("_widget", "regist_name", $registName);
-               $this->tmpl->addVar("_widget", "current_url", $this->gEnv->getCurrentRequestUri());
-               
-               // スレッドが存在しないときは一覧を非表示にする
-               if (!$this->isExistsMessage){
-                       $this->setGuidanceMsg('メッセージが投稿されていません');
-                       
-                       $this->tmpl->setAttribute('message_list', 'visibility', 'hidden');
-               }
-                       
-               // ページ遷移用リンク
-               $pageLink = '';
-               if ($pageNo > 1){                       // 前のページがあるとき
-                       //$foreLink = $this->convertUrlToHtmlEntity($this->getUrl($this->_currentPageUrl . '&task=' . self::TASK_READ . '&page=' . ($pageNo -1), true));
-                       $foreLink = $this->convertUrlToHtmlEntity($this->getUrl($this->gEnv->createCurrentPageUrlForMobile('task=' . self::TASK_READ . '&page=' . ($pageNo -1), false/*セッションID削除*/)));
-                       $pageLink .= '<a href="' . $foreLink . '" accesskey="1">前へ[1]</a>';
-               }
-               if ($this->isExistsNextPage){   // 次のページがあるとき
-                       if (!empty($pageLink)) $pageLink .= '&nbsp;&nbsp;';
-                       //$nextLink = $this->convertUrlToHtmlEntity($this->getUrl($this->_currentPageUrl . '&task=' . self::TASK_READ . '&page=' . ($pageNo +1), true));
-                       $nextLink = $this->convertUrlToHtmlEntity($this->getUrl($this->gEnv->createCurrentPageUrlForMobile('task=' . self::TASK_READ . '&page=' . ($pageNo +1), false/*セッションID削除*/)));
-                       $pageLink .= '<a href="' . $nextLink . '" accesskey="2">次へ[2]</a>';
-               }
-               $this->tmpl->addVar("_widget", "page_link", $pageLink);
-       }
-       /**
-        * 取得したメッセージ項目をテンプレートに設定する
-        *
-        * @param int           $index                  行番号
-        * @param array         $fetchedRow             取得行
-        * @param object        $param                  任意使用パラメータ
-        * @return bool                                         trueを返すとループ続行。falseを返すとその時点で終了。
-        */
-       function itemsLoop($index, $fetchedRow)
-       {
-               // 最大表示数を超えたときは終了
-               if ($index >= $this->messageCount){
-                       $this->isExistsNextPage = true;                         // 次のページあり
-                       return false;
-               }
-               
-               // メッセージ用のデータを取得
-               $no = $fetchedRow['mt_update_no'];              // スレッド更新番号
-               $memberId = $fetchedRow['mb_id'];               // 会員ID
-               $memberName = $fetchedRow['mb_name'];   // 会員名
-               $messageId = $fetchedRow['mm_thread_id'];
-               $messageCount = $fetchedRow['mt_message_count'] -1;             // メッセージ数
-               if ($messageCount <= 0) $messageCount = '';                             // 返信がないときはメッセージ数を表示しない
-               $mypageLink = $this->convertUrlToHtmlEntity($this->getUrl($this->_currentPageUrl . '&' . self::URL_PARAM_MEMBER_ID . '=' . $memberId));
-               $messageLink = $this->convertUrlToHtmlEntity($this->getUrl($this->_currentPageUrl . '&' . self::URL_PARAM_MESSAGE_ID . '=' . $messageId));
-               
-               // 名前作成
-               $nameTag = '<a href="' . $mypageLink . '">' . $this->convertToDispString($memberName) . '</a>';
-               
-               // 日付作成
-               $weekDay = array('日', '月', '火', '水', '木', '金', '土');
-               $timestamp = strtotime($fetchedRow['mm_regist_dt']);
-               $weekNo = intval(date('w', $timestamp));
-               //$date = date('Y/m/d(' . $weekDay[$weekNo] . ') H:i:s', $timestamp);
-               $date = date('m/d(' . $weekDay[$weekNo] . ') H:i:s', $timestamp);
-               
-               // 投稿文
-               $message = $this->convertToDispString($fetchedRow['mm_message']);// 文字エスケープ処理
-               $message = $this->_convertToPreviewTextWithSpace($message);                     // 改行をスペースに変換
-               $message = $this->convDispMessage($message, $fetchedRow['mm_thread_id']);// メッセージ内のリンクを作成
-               
-               // メッセージID
-               $messageIdTag = '<a href="' . $messageLink  . '">#' . $messageId . '</a>';
-               
-               // 削除メッセージのとき
-               /*if ($fetchedRow['mm_deleted']){
-                       $message = '参照できません。';
-               }*/
-               // アバター画像を設定
-               $avatarImageUrl = $this->getAvatarUrl($memberId);
-               $avatarTag = '<img src="' . $this->getUrl($avatarImageUrl) . '" width="' . self::AVATAR_SIZE . '" height="' . self::AVATAR_SIZE .'" />';
-//             $avatarTag = '<a href="' . $mypageLink . '">' . $avatarTag . '</a>';
-               $row = array(
-                       'no'            => $no,                                 // 項目番号
-                       'id'            => $messageIdTag,               // メッセージID
-                       'message_count' => $messageCount,       // メッセージ数
-                       'name'          => $nameTag,                    // 会員名
-                       'date'          => $date,                       // 投稿日付
-                       'message'       => $message,            // 投稿文
-                       'avatar'        => $avatarTag,  // アバター画像
-                       'spacer'        => $this->_spacer       // スペーサ
-               );
-               $this->tmpl->addVars('message_list', $row);
-               $this->tmpl->parseTemplate('message_list', 'a');
-               
-               // メッセージが存在するかどうか
-               $this->isExistsMessage = true;
-               return true;
-       }
-}
-?>
diff --git a/widgets/m/chacha/include/container/m_chachaThreadWidgetContainer.php b/widgets/m/chacha/include/container/m_chachaThreadWidgetContainer.php
deleted file mode 100644 (file)
index 0a20a0e..0000000
+++ /dev/null
@@ -1,265 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    マイクロブログ
- * @author     株式会社 毎日メディアサービス
- * @copyright  Copyright 2010 株式会社 毎日メディアサービス.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_chachaThreadWidgetContainer.php 3363 2010-07-10 05:12:31Z fishbone $
- * @link       http://www.m-media.co.jp
- */
-require_once($gEnvManager->getCurrentWidgetContainerPath() .   '/m_chachaBaseWidgetContainer.php');
-
-class m_chachaThreadWidgetContainer extends m_chachaBaseWidgetContainer
-{
-       private $messageCount;                  // メッセージ数
-       private $isExistsMessage;       // メッセージが存在するかどうか
-       private $isExistsNextPage;      // 次のページがあるかどうか
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'thread.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $act = $request->trimValueOf('act');
-               $postTicket = $request->trimValueOf('ticket');          // POST確認用
-               $pageNo = $request->trimIntValueOf(M3_REQUEST_PARAM_PAGE_NO, '1');                              // ページ番号
-               $messageId = $request->trimValueOf(self::URL_PARAM_MESSAGE_ID);         // メッセージID
-               $message = $request->mobileTrimValueOf('message');              // 投稿メッセージ
-               
-               // 現在アクセス中の端末IDを取得
-               $canPost = false;                       // ブログ投稿可能かどうか
-               $clientId = $this->_mobileId;
-               
-               // 登録ユーザのときは投稿可能
-               $clientMemberId = '';                   // 現在の端末の会員ID
-               $ret = $this->_db->getMemberInfoByDeviceId($clientId, $row);
-               if ($ret) $clientMemberId = $row['mb_id'];
-               if (!empty($clientMemberId)) $canPost = true;                   // ブログ返信可能かどうか
-               
-               $reloadData = false;            // データの再読み込み
-               if ($act == 'add'){             // 新規追加のとき
-                       if (!empty($postTicket) && $postTicket == $request->getSessionValue(M3_SESSION_POST_TICKET)){           // 正常なPOST値のとき
-                               // 投稿権限のチェック
-                               if (!$canPost) $this->setUserErrorMsg('投稿権限がありません');
-                               
-                               // 入力項目のエラーチェック
-                               if ($this->checkInput($message, 'メッセージ')){
-                                       // 文字数のチェック
-                                       $messageLength = $this->_configArray[self::CF_MESSAGE_LENGTH];                  // 最大メッセージ長
-                                       if (getLetterCount($message) > $messageLength) $this->setUserErrorMsg('メッセージは' . $messageLength . '文字まで入力可能です');
-                               }
-                               if (empty($clientMemberId)) $this->setUserErrorMsg('会員IDが不正です');
-                       
-                               // エラーなしの場合は、データを更新
-                               if ($this->getMsgCount() == 0){
-                                       $ret = $this->_db->addNewReply($this->_boardId, $messageId, $clientMemberId, $message);
-                                       if ($ret){              // データ追加成功のとき
-                                               $this->setGuidanceMsg('投稿完了しました');
-                                               
-                                               $message = '';                  // メッセージクリア
-                                       } else {
-                                               $this->setAppErrorMsg('投稿に失敗しました');
-                                       }
-                               }
-                       }
-                       $request->unsetSessionValue(M3_SESSION_POST_TICKET);            // セッション値をクリア
-               } else {
-                       $reloadData = true;             // データの再読み込み
-               }
-               
-               // スレッド情報取得
-               $ret = $this->_db->getThreadInfo($this->_boardId, $messageId, $row);
-               if ($ret){
-                       // メッセージ用のデータを取得
-                       $memberId = $row['mb_id'];              // 会員ID
-                       $memberName = $row['mb_name'];  // 会員名
-                       $messageId = $row['mm_thread_id'];
-                       $messageCount = $row['mt_message_count'] -1;            // メッセージ数
-                       $mypageLink = $this->convertUrlToHtmlEntity($this->getUrl($this->_currentPageUrl . '&' . self::URL_PARAM_MEMBER_ID . '=' . $memberId, true));
-                       $messageLink = $this->convertUrlToHtmlEntity($this->getUrl($this->_currentPageUrl . '&' . self::URL_PARAM_MESSAGE_ID . '=' . $messageId, true));
-               
-                       // 名前作成
-                       $nameTag = '<a href="' . $mypageLink . '">' . $this->convertToDispString($memberName) . '</a>';
-               
-                       // 日付作成
-                       $weekDay = array('日', '月', '火', '水', '木', '金', '土');
-                       $timestamp = strtotime($row['mm_regist_dt']);
-                       $weekNo = intval(date('w', $timestamp));
-                       $date = date('m/d(' . $weekDay[$weekNo] . ') H:i:s', $timestamp);
-               
-                       // 投稿文
-                       $topMessage = $this->convertToDispString($row['mm_message']);// 文字エスケープ処理
-                       $topMessage = $this->_convertToPreviewTextWithSpace($topMessage);                       // 改行をスペースに変換
-                       $topMessage = $this->convDispMessage($topMessage, $row['mm_thread_id']);// メッセージ内のリンクを作成
-               
-                       // メッセージID
-                       $messageIdTag = '<a href="' . $messageLink  . '">#' . $messageId . '</a>';
-               
-                       // アバター画像を設定
-                       $avatarImageUrl = $this->getAvatarUrl($memberId);
-                       $avatarTag = '<img src="' . $this->getUrl($avatarImageUrl) . '" width="' . self::AVATAR_SIZE . '" height="' . self::AVATAR_SIZE .'" />';
-                       //$avatarTag = '<a href="' . $mypageLink . '">' . $avatarTag . '</a>';
-                       
-                       $this->tmpl->addVar("thread_area", "id", $messageIdTag);        // メッセージID
-                       $this->tmpl->addVar("thread_area", "thread_message_count", $messageCount);      // メッセージ数
-                       $this->tmpl->addVar("thread_area", "name", $nameTag);           // 会員名
-                       $this->tmpl->addVar("thread_area", "date", $date);                      // 投稿日付
-                       $this->tmpl->addVar("thread_area", "thread_message", $topMessage);              // 投稿文
-                       $this->tmpl->addVar("thread_area", "avatar", $avatarTag);               // アバター画像
-               
-                       // 登録用リンクを作成。会員として認識できないときはプロフィール画面。
-                       $registName = '';
-                       $registLink = '';
-                       if (empty($clientMemberId)){
-                               $registName = 'ユーザ登録[3]';
-                               $registUrl = $this->convertUrlToHtmlEntity($this->getUrl($this->_currentPageUrl . '&task=' . self::TASK_PROFILE, true));
-                               $registLink = '<a href="' . $registUrl . '" accesskey="3">' . $registName . '</a>';
-                       }
-                       $this->tmpl->addVar("_widget", "regist_name", $registName);
-                       $this->tmpl->addVar("_widget", "regist_link", $registLink);
-                       
-                       // 表示メッセージ取得
-                       // 1つ多く呼び出し、次のページがあるか確認
-                       $this->messageCount = $this->_configArray[self::CF_MESSAGE_COUNT_MYPAGE];               // 最大項目数
-                       $this->_db->getThreadReply(array($this, 'itemsLoop'), $this->_boardId, $messageId, $this->messageCount, $pageNo, true);
-               
-                       // スレッドが存在しないときは一覧を非表示にする
-                       if (!$this->isExistsMessage){
-                               // 投稿なしのメッセージを表示
-                               $this->tmpl->setAttribute('no_message_area', 'visibility', 'visible');
-                               $this->tmpl->setAttribute('message_list', 'visibility', 'hidden');
-                       }
-               
-                       // ページ遷移用リンク
-                       $pageLink = '';
-                       if ($pageNo > 1){                       // 前のページがあるとき
-                               $foreLink = $this->convertUrlToHtmlEntity($this->getUrl($this->_currentPageUrl . '&' . self::URL_PARAM_MESSAGE_ID . '=' . $messageId . '&page=' . ($pageNo -1), true));
-                               $pageLink .= '<a href="' . $foreLink . '" accesskey="1">前へ[1]</a>';
-                       }
-                       if ($this->isExistsNextPage){   // 次のページがあるとき
-                               if (!empty($pageLink)) $pageLink .= '&nbsp;&nbsp;';
-                               $nextLink = $this->convertUrlToHtmlEntity($this->getUrl($this->_currentPageUrl . '&' . self::URL_PARAM_MESSAGE_ID . '=' . $messageId . '&page=' . ($pageNo +1), true));
-                               $pageLink .= '<a href="' . $nextLink . '" accesskey="2">次へ[2]</a>';
-                       }
-                       $this->tmpl->addVar("_widget", "page_link", $pageLink);
-                       
-                       if ($canPost){                  // ブログ返信可能なとき
-                               $this->tmpl->setAttribute('add_area', 'visibility', 'visible');// 投稿エリアを表示
-                               $this->tmpl->addVar('add_area', 'act', 'add');          // 登録
-                               $this->tmpl->addVar("add_area", "member_id", $memberId);                        // 会員ID
-                               $this->tmpl->addVar("add_area", "message", $message);
-                               $this->tmpl->addVar("add_area", "current_url", $this->gEnv->getCurrentRequestUri());
-                               
-                               // ハッシュキー作成
-                               $postTicket = md5(time() . $this->gAccess->getAccessLogSerialNo());
-                               $request->setSessionValue(M3_SESSION_POST_TICKET, $postTicket);         // セッションに保存
-                               $this->tmpl->addVar("add_area", "ticket", $postTicket);                         // 画面に書き出し
-                       }
-               } else {
-                       $this->setUserErrorMsg('メッセージIDが不正です');
-                       
-                       // スレッド表示部を非表示にする
-                       $this->tmpl->setAttribute('thread_area', 'visibility', 'hidden');
-               }
-       }
-       /**
-        * 取得したメッセージ項目をテンプレートに設定する
-        *
-        * @param int           $index                  行番号
-        * @param array         $fetchedRow             取得行
-        * @param object        $param                  任意使用パラメータ
-        * @return bool                                         trueを返すとループ続行。falseを返すとその時点で終了。
-        */
-       function itemsLoop($index, $fetchedRow)
-       {
-               // 最大表示数を超えたときは終了
-               if ($index >= $this->messageCount){
-                       $this->isExistsNextPage = true;                         // 次のページあり
-                       return false;
-               }
-               
-               // メッセージ用のデータを取得
-               $memberId = $fetchedRow['mb_id'];               // 会員ID
-               $memberName = $fetchedRow['mb_name'];   // 会員名
-               $messageId = $fetchedRow['mm_thread_id'];
-               $messageId .= '-' . $fetchedRow['mm_index'];
-               $mypageLink = $this->convertUrlToHtmlEntity($this->getUrl($this->_currentPageUrl . '&' . self::URL_PARAM_MEMBER_ID . '=' . $memberId, true));
-               $messageLink = $this->convertUrlToHtmlEntity($this->getUrl($this->_currentPageUrl . '&' . self::URL_PARAM_MESSAGE_ID . '=' . $messageId, true));
-               
-               // 名前作成
-               $nameTag = '<a href="' . $mypageLink . '">' . $this->convertToDispString($memberName) . '</a>';
-               
-               // 日付作成
-               $weekDay = array('日', '月', '火', '水', '木', '金', '土');
-               $timestamp = strtotime($fetchedRow['mm_regist_dt']);
-               $weekNo = intval(date('w', $timestamp));
-               $date = date('m/d(' . $weekDay[$weekNo] . ') H:i:s', $timestamp);
-               
-               // 投稿文
-               $message = $this->convertToDispString($fetchedRow['mm_message']);// 文字エスケープ処理
-               $message = $this->_convertToPreviewTextWithSpace($message);                     // 改行をスペースに変換
-               $message = $this->convDispMessage($message, $fetchedRow['mm_thread_id']);// メッセージ内のリンクを作成
-               
-               // メッセージID
-               $messageIdTag = '<a href="' . $messageLink  . '">#' . $messageId . '</a>';
-               
-               // 削除メッセージのとき
-               /*if ($fetchedRow['mm_deleted']){
-                       $message = '参照できません。';
-               }*/
-               // アバター画像を設定
-               $avatarImageUrl = $this->getAvatarUrl($memberId);
-               $avatarTag = '<img src="' . $this->getUrl($avatarImageUrl) . '" width="' . self::AVATAR_SIZE . '" height="' . self::AVATAR_SIZE .'" />';
-               //$avatarTag = '<a href="' . $mypageLink . '">' . $avatarTag . '</a>';
-                       
-               $row = array(
-                       'id'            => $messageIdTag,               // メッセージID
-                       'name'          => $nameTag,                    // 会員名
-                       'date'          => $date,                       // 投稿日付
-                       'message'       => $message,            // 投稿文
-                       'avatar'        => $avatarTag,  // アバター画像
-                       'spacer'        => $this->_spacer       // スペーサ
-               );
-               $this->tmpl->addVars('message_list', $row);
-               $this->tmpl->parseTemplate('message_list', 'a');
-               
-               // メッセージが存在するかどうか
-               $this->isExistsMessage = true;
-               return true;
-       }
-}
-?>
diff --git a/widgets/m/chacha/include/container/m_chachaTopWidgetContainer.php b/widgets/m/chacha/include/container/m_chachaTopWidgetContainer.php
deleted file mode 100644 (file)
index 1ccf288..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    マイクロブログ
- * @author     株式会社 毎日メディアサービス
- * @copyright  Copyright 2010 株式会社 毎日メディアサービス.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_chachaTopWidgetContainer.php 3296 2010-06-26 06:59:12Z fishbone $
- * @link       http://www.m-media.co.jp
- */
-require_once($gEnvManager->getCurrentWidgetContainerPath() .   '/m_chachaBaseWidgetContainer.php');
-
-class m_chachaTopWidgetContainer extends m_chachaBaseWidgetContainer
-{
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {       
-               return 'top.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               // トップコンテンツ
-               $topContents = $this->_configArray[self::CF_TOP_CONTENTS];
-               $topContents = str_replace(M3_TAG_START . M3_TAG_MACRO_ROOT_URL . M3_TAG_END, $this->getUrl($this->gEnv->getRootUrl()), $topContents);  // Magic3ルートURLの変換
-               $this->gInstance->getTextConvManager()->convFromEmojiTag($topContents, $topContents);// Magic3内部タグから絵文字画像タグに変換
-               $this->tmpl->addVar("_widget", "top_contents", $topContents);
-               
-               // URL
-               $this->tmpl->addVar('_widget', 'read_url', $this->gEnv->createCurrentPageUrlForMobile('task=' . self::TASK_READ));
-               $registLink = $this->convertUrlToHtmlEntity($this->getUrl($this->gEnv->createCurrentPageUrlForMobile('task=' . self::TASK_MYPAGE)));
-               $registName = '投稿する';
-               $this->tmpl->addVar("_widget", "regist_url", $registLink);
-               $this->tmpl->addVar("_widget", "regist_name", $registName);
-       }
-}
-?>
diff --git a/widgets/m/chacha/include/container/m_chachaWidgetContainer.php b/widgets/m/chacha/include/container/m_chachaWidgetContainer.php
deleted file mode 100644 (file)
index 7f461c9..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    マイクロブログ
- * @author     株式会社 毎日メディアサービス
- * @copyright  Copyright 2010 株式会社 毎日メディアサービス.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_chachaWidgetContainer.php 3356 2010-07-08 13:40:58Z fishbone $
- * @link       http://www.m-media.co.jp
- */
-require_once($gEnvManager->getCurrentWidgetContainerPath() .   '/m_chachaBaseWidgetContainer.php');
-
-class m_chachaWidgetContainer extends m_chachaBaseWidgetContainer
-{
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * ディスパッチ処理(メインコンテナのみ実行)
-        *
-     * HTTPリクエストの内容を見て処理をコンテナに振り分ける
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return bool                                                 このクラスの_setTemplate(), _assign()へ処理を継続するかどうかを返す。
-        *                                      true=処理を継続、false=処理を終了
-        */
-       function _dispatch($request, &$param)
-       {
-               $memberId = $request->trimValueOf(self::URL_PARAM_MEMBER_ID);   // 会員ID
-                       
-               // 実行処理を決定
-               $task = $request->trimValueOf(M3_REQUEST_PARAM_OPERATION_TASK);
-               if (empty($task)){
-                       // 会員IDを取得
-                       $memberId = $request->trimValueOf(self::URL_PARAM_MEMBER_ID);
-                       $messageId = $request->trimValueOf(self::URL_PARAM_MESSAGE_ID);         // メッセージID
-                       
-                       // 会員IDが設定されているときはマイページを表示
-                       if (empty($memberId)){
-                               if (empty($messageId)){
-                                       $task = self::DEFAULT_TASK;
-                               } else {
-                                       $task = self::TASK_THREAD;              // スレッド表示
-                               }
-                       } else {
-                               $task = self::TASK_MYPAGE;              // マイページ表示
-                       }
-               }
-
-               // アクセス権をチェック
-               switch ($task){
-                       case self::TASK_THREAD:         // スレッド処理
-                       case self::TASK_READ:                   // スレッド一覧画面
-                       case self::TASK_PROFILE:                        // プロフィール入力画面
-                       case self::TASK_MYPAGE:                 // マイページ画面
-                               // 携帯以外からのアクセスの場合はエラー
-                               if (empty($this->_mobileId)) return true;
-                               break;
-               }
-
-               // ユーザ登録されていない場合はユーザ登録へ
-               if ($task == self::TASK_MYPAGE && empty($memberId)){                    // マイページ画面
-                       $db = new chachaDb();           // DBオブジェクト作成
-                       $ret = $db->getMemberInfoByDeviceId($this->_mobileId, $row);
-                       if (!$ret){
-                               $nextPage = $this->gEnv->createCurrentPageUrlForMobile('task=' . self::TASK_PROFILE);
-                               $this->gPage->redirect($nextPage, true/*遷移時のダイアログ表示を抑止*/);
-                               return true;
-                       }
-               }
-               
-               // ##### コンテナを起動 #####
-               switch ($task){
-                       case self::TASK_TOP:                    // トップ画面
-                       case self::TASK_THREAD:         // スレッド処理
-                       case self::TASK_READ:                   // スレッド一覧画面
-                       case self::TASK_PROFILE:                        // プロフィール入力画面
-                       case self::TASK_MYPAGE:                 // マイページ画面
-                               $this->gLaunch->goSubWidget($task);
-                               return false;
-                       default:
-                               $this->SetMsg(self::MSG_APP_ERR, "画面が見つかりません");
-                               return true;
-               }
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               $task = $request->trimValueOf(M3_REQUEST_PARAM_OPERATION_TASK);
-
-               // 要求画面によってテンプレートを変更
-               switch ($task){
-                       default:
-                               return 'message.tmpl.html';
-               }
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @return                                                              なし
-        */
-       function _assign($request, &$param)
-       {
-               $task = $request->trimValueOf(M3_REQUEST_PARAM_OPERATION_TASK);
-               if (empty($task)) $task = self::DEFAULT_TASK;
-
-               // 要求画面によってテンプレートを変更
-               switch ($task){
-                       case self::TASK_THREAD:         // スレッド処理
-                       case self::TASK_READ:                   // スレッド一覧画面
-                       case self::TASK_PROFILE:                        // プロフィール入力画面
-                       case self::TASK_MYPAGE:                 // マイページ画面
-                               $this->setUserErrorMsg('携帯電話以外からは実行できません');
-                               $this->tmpl->addVar('_widget', 'top_url', $this->gEnv->createCurrentPageUrlForMobile(''));
-                               break;
-                       default:
-                               break;
-               }
-       }
-}
-?>
diff --git a/widgets/m/chacha/include/db/chachaDb.php b/widgets/m/chacha/include/db/chachaDb.php
deleted file mode 100644 (file)
index f04f116..0000000
+++ /dev/null
@@ -1,565 +0,0 @@
-<?php
-/**
- * DBクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    マイクロブログ
- * @author     株式会社 毎日メディアサービス
- * @copyright  Copyright 2010 株式会社 毎日メディアサービス.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: chachaDb.php 3363 2010-07-10 05:12:31Z fishbone $
- * @link       http://www.m-media.co.jp
- */
-require_once($gEnvManager->getDbPath() . '/baseDb.php');
-
-class chachaDb extends BaseDb
-{
-       /**
-        * マイクロブログ定義値をすべて取得
-        *
-        * 掲示板IDが空のデフォルト値は常に読み込む
-        *
-        * @param array  $rows                  レコード
-        * @param string $boardId               掲示板ID
-        * @return bool                                 1行以上取得 = true, 取得なし= false
-        */
-       function getAllConfig(&$rows, $boardId = '')
-       {
-               $queryStr  = 'SELECT * FROM mblog_config ';
-               $queryStr .=  'WHERE mc_board_id = \'\' ';
-               $queryStr .=   'OR mc_board_id = ? ';
-               $queryStr .=   'ORDER BY mc_board_id, mc_index';
-               $retValue = $this->selectRecords($queryStr, array($boardId), $rows);
-               return $retValue;
-       }
-       /**
-        * マイクロブログ定義値を更新
-        *
-        * @param string $key           キーとなる項目値
-        * @param string $value         値
-        * @param string $boardId               掲示板ID
-        * @return                                      true = 正常、false=異常
-        */
-       function updateConfig($key, $value, $boardId = '')
-       {
-               // トランザクションスタート
-               $this->startTransaction();
-               
-               $queryStr  = 'SELECT mc_value FROM mblog_config ';
-               $queryStr .=   'WHERE mc_board_id = ? ';
-               $queryStr .=     'AND mc_id = ? ';
-               $ret = $this->selectRecord($queryStr, array($boardId, $key), $row);
-               if ($ret){
-                       $queryStr  = 'UPDATE mblog_config ';
-                       $queryStr .=   'SET mc_value = ? ';
-                       $queryStr .=   'WHERE mc_board_id = ? ';
-                       $queryStr .=     'AND mc_id = ? ';
-                       $ret = $this->execStatement($queryStr, array($value, $boardId, $key));                  
-               } else {
-                       $queryStr  = 'INSERT INTO mblog_config (';
-                       $queryStr .=   'mc_board_id, ';
-                       $queryStr .=   'mc_id, ';
-                       $queryStr .=   'mc_value ';
-                       $queryStr .= ') VALUES (';
-                       $queryStr .=   '?, ?, ?';
-                       $queryStr .= ')';
-                       $ret = $this->execStatement($queryStr, array($boardId, $key, $value));  
-               }
-               // トランザクション終了
-               $ret = $this->endTransaction();
-               return $ret;
-       }
-       /**
-        * 端末IDから会員情報の取得
-        *
-        * @param string $deviceId              端末ID
-        * @param array  $row                   取得データ
-        * @return                                              true=正常、false=異常
-        */
-       function getMemberInfoByDeviceId($deviceId, &$row)
-       {
-               // 引数エラーチェック
-               if (empty($deviceId)) return false;
-               
-               $queryStr  = 'SELECT * FROM mblog_member ';
-               $queryStr .=   'WHERE mb_device_id = ? ';
-               $queryStr .=     'AND mb_deleted = false ';             // 削除されていない
-               $ret = $this->selectRecord($queryStr, array($deviceId), $row);
-               return $ret;
-       }
-       /**
-        * 会員IDから会員情報の取得
-        *
-        * @param string $id                    会員ID
-        * @param array  $row                   取得データ
-        * @return                                              true=正常、false=異常
-        */
-       function getMemberInfoById($id, &$row)
-       {
-               // 引数エラーチェック
-               if (empty($id)) return false;
-               
-               $queryStr  = 'SELECT * FROM mblog_member ';
-               $queryStr .=   'WHERE mb_id = ? ';
-               $queryStr .=     'AND mb_deleted = false ';             // 削除されていない
-               $ret = $this->selectRecord($queryStr, array($id), $row);
-               return $ret;
-       }
-       /**
-        * 会員IDが存在するかチェック
-        *
-        * @param string $id    会員ID
-        * @return                              true=存在する、false=存在しない
-        */
-       function isExistsMemberId($id)
-       {
-               $queryStr = 'SELECT * FROM mblog_member ';
-               $queryStr .=  'WHERE mb_id = ? ';
-               return $this->isRecordExists($queryStr, array($id));
-       }
-       /**
-        * 名前が存在するかチェック
-        *
-        * @param string $name          名前
-        * @return                                      true=存在する、false=存在しない
-        */
-       function isExistsMemberName($name)
-       {
-               $queryStr = 'SELECT * FROM mblog_member ';
-               $queryStr .=  'WHERE mb_name = ? ';
-               $queryStr .=    'AND mb_deleted = false';
-               return $this->isRecordExists($queryStr, array($name));
-       }
-       /**
-        * Eメールが存在するかチェック
-        *
-        * @param string $email         Eメール
-        * @return                                      true=存在する、false=存在しない
-        */
-       function isExistsMemberEmail($email)
-       {
-               $queryStr = 'SELECT * FROM mblog_member ';
-               $queryStr .=  'WHERE mb_email = ? ';
-               $queryStr .=    'AND mb_deleted = false';
-               return $this->isRecordExists($queryStr, array($email));
-       }
-       /**
-        * 会員情報の新規追加
-        *
-        * @param string  $deviceId             端末ID
-        * @param string  $memberId             会員ID
-        * @param int     $userId               ユーザID
-        * @param string  $name                 投稿者名
-        * @param string  $email                Eメールアドレス
-        * @param string  $url                  URL
-        * @param string  $avatar               アバターファイル名
-        * @param bool    $showEmail    Eメールアドレスを公開するかどうか
-        * @return bool                                 true = 成功、false = 失敗
-        */
-       function addMember($deviceId, $memberId, $userId, $name, $email, $url, $avatar, $showEmail)
-       {
-               $now = date("Y/m/d H:i:s");     // 現在日時
-//             $userId = $this->gEnv->getCurrentUserId();      // 現在のユーザ
-                               
-               // トランザクション開始
-               $this->startTransaction();
-               
-               // 会員IDの存在をチェック
-               if ($this->isExistsMemberId($memberId)){                // 会員IDが登録されているときは異常終了
-                       $this->endTransaction();
-                       return false;
-               }
-               
-               // データを追加
-               $queryStr  = 'INSERT INTO mblog_member ';
-               $queryStr .=   '(';
-               $queryStr .=   'mb_id, ';
-               $queryStr .=   'mb_device_id, ';
-               $queryStr .=   'mb_user_id, ';
-               $queryStr .=   'mb_name, ';
-               $queryStr .=   'mb_email, ';
-               $queryStr .=   'mb_url, ';
-               $queryStr .=   'mb_avatar, ';
-               $queryStr .=   'mb_show_email, ';
-               $queryStr .=   'mb_regist_dt, ';
-               $queryStr .=   'mb_last_access_dt, ';
-               $queryStr .=   'mb_create_user_id, ';
-               $queryStr .=   'mb_create_dt) ';
-               $queryStr .=  'VALUES ';
-               $queryStr .=  '(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
-               $this->execStatement($queryStr, array($memberId, $deviceId, $userId, $name, $email, $url, $avatar, intval($showEmail), $now, $now, $userId, $now));
-                       
-               // トランザクション確定
-               $ret = $this->endTransaction();
-               return $ret;
-       }
-       /**
-        * 会員情報を更新
-        *
-        * @param string  $deviceId             端末ID
-        * @param string  $name                 投稿者名
-        * @param string  $email                Eメールアドレス
-        * @param string  $url                  URL
-        * @param string  $avatar               アバターファイル名
-        * @param bool    $showEmail    Eメールアドレスを公開するかどうか
-        * @param int $newSerial        新規シリアル番号
-        * @return                                      true = 正常、false=異常
-        */
-       function updateMember($deviceId, $name, $email, $url, $avatar, $showEmail, &$newSerial)
-       {
-               $now = date("Y/m/d H:i:s");     // 現在日時
-               $userId = $this->gEnv->getCurrentUserId();      // 現在のユーザ
-               
-               // 引数エラーチェック
-               if (empty($deviceId)) return false;
-               
-               // トランザクション開始
-               $this->startTransaction();
-
-               // 指定の端末IDのレコードが削除状態でないかチェック
-               $queryStr  = 'SELECT * FROM mblog_member ';
-               $queryStr .=   'WHERE mb_device_id = ? ';
-               $queryStr .=     'AND mb_deleted = false ';             // 削除されていない
-               $ret = $this->selectRecord($queryStr, array($deviceId), $row);
-               if (!$ret){             // 登録レコードが存在しない場合は終了
-                       $this->endTransaction();
-                       return false;
-               }
-               $historyIndex = $row['mb_history_index'] + 1;
-               
-               // 古いレコードを削除
-               $queryStr  = 'UPDATE mblog_member ';
-               $queryStr .=   'SET mb_deleted = true, ';       // 削除
-               $queryStr .=     'mb_update_user_id = ?, ';
-               $queryStr .=     'mb_update_dt = ? ';
-               $queryStr .=   'WHERE mb_serial = ?';
-               $ret = $this->execStatement($queryStr, array($userId, $now, $row['mb_serial']));
-               if (!$ret){
-                       $this->endTransaction();
-                       return false;
-               }
-               
-               // データを追加
-               // 識別ID、会員No、登録日時の変更は不可
-               $queryStr  = 'INSERT INTO mblog_member ';
-               $queryStr .=   '(';
-               $queryStr .=   'mb_id, ';
-               $queryStr .=   'mb_history_index, ';
-               $queryStr .=   'mb_device_id, ';
-               $queryStr .=   'mb_user_id, ';
-               $queryStr .=   'mb_name, ';
-               $queryStr .=   'mb_email, ';
-               $queryStr .=   'mb_url, ';
-               $queryStr .=   'mb_avatar, ';
-               $queryStr .=   'mb_show_email, ';
-               $queryStr .=   'mb_regist_dt, ';
-               $queryStr .=   'mb_last_access_dt, ';
-               $queryStr .=   'mb_create_user_id, ';
-               $queryStr .=   'mb_create_dt) ';
-               $queryStr .=  'VALUES ';
-               $queryStr .=  '(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
-               $this->execStatement($queryStr, array($row['mb_id'], $historyIndex, $deviceId, $row['mb_user_id'], $name, $email, $url, $avatar, intval($showEmail),
-                                                                                               $row['mb_regist_dt'], $row['mb_last_access_dt'], $userId, $now));
-               
-               // 新規のシリアル番号取得
-               $queryStr = 'SELECT MAX(mb_serial) AS ns FROM mblog_member ';
-               $ret = $this->selectRecord($queryStr, array(), $row);
-               if ($ret) $newSerial = $row['ns'];
-               
-               // トランザクション確定
-               $ret = $this->endTransaction();
-               return $ret;
-       }
-       /**
-        * スレッドIDが存在するかチェック
-        *
-        * @param string $id    スレッドID
-        * @return                              true=存在する、false=存在しない
-        */
-       function isExistsThreadId($id)
-       {
-               $queryStr = 'SELECT * FROM mblog_thread ';
-               $queryStr .=  'WHERE mt_id = ? ';
-               return $this->isRecordExists($queryStr, array($id));
-       }
-       /**
-        * スレッドの新規追加
-        *
-        * @param string  $boardId              掲示板ID
-        * @param array   $threadId             スレッドID
-        * @param string  $memberId             会員ID
-        * @param string  $subject              スレッド件名
-        * @param string  $message              投稿メッセージ
-        * @return bool                                 true = 成功、false = 失敗
-        */
-       function addNewThread($boardId, $threadId, $memberId, $subject, $message)
-       {
-               $now = date("Y/m/d H:i:s");     // 現在日時
-               $userId = $this->gEnv->getCurrentUserId();      // 現在のユーザ
-               $accessLog = $this->gEnv->getCurrentAccessLogSerial();
-
-               // 引数エラーチェック
-               if (empty($threadId) || empty($memberId)) return false;
-               
-               // トランザクション開始
-               $this->startTransaction();
-               
-               // スレッドIDの存在をチェック
-               if ($this->isExistsThreadId($threadId)){                // スレッドIDが登録されているときは異常終了
-                       $this->endTransaction();
-                       return false;
-               }
-               // スレッド番号作成
-               $queryStr = 'SELECT MAX(mt_no) AS mn FROM mblog_thread ';
-               $ret = $this->selectRecord($queryStr, array(), $row);
-               if ($ret){
-                       $threadNo = $row['mn'] + 1;
-               } else {
-                       $threadNo = 1;
-               }
-               $queryStr = 'SELECT MAX(mt_update_no) AS mn FROM mblog_thread ';
-               $ret = $this->selectRecord($queryStr, array(), $row);
-               if ($ret){
-                       $threadUpdateNo = $row['mn'] + 1;
-               } else {
-                       $threadUpdateNo = 1;
-               }
-               
-               // データを追加
-               $queryStr  = 'INSERT INTO mblog_thread ';
-               $queryStr .=   '(';
-               $queryStr .=   'mt_board_id, ';
-               $queryStr .=   'mt_id, ';
-               $queryStr .=   'mt_no, ';
-               $queryStr .=   'mt_update_no, ';
-               $queryStr .=   'mt_subject, ';
-               $queryStr .=   'mt_message_count, ';
-               $queryStr .=   'mt_dt, ';
-               $queryStr .=   'mt_log_serial, ';
-               $queryStr .=   'mt_create_user_id, ';
-               $queryStr .=   'mt_create_dt) ';
-               $queryStr .=  'VALUES ';
-               $queryStr .=  '(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
-               $this->execStatement($queryStr, array($boardId, $threadId, $threadNo, $threadUpdateNo, $subject, 1, $now, $accessLog, $userId, $now));
-               
-               $queryStr  = 'INSERT INTO mblog_thread_message ';
-               $queryStr .=   '(';
-               $queryStr .=   'mm_board_id, ';
-               $queryStr .=   'mm_thread_id, ';
-               $queryStr .=   'mm_index, ';
-               $queryStr .=   'mm_message, ';
-               $queryStr .=   'mm_regist_member_id, ';
-               $queryStr .=   'mm_regist_dt, ';
-               $queryStr .=   'mm_log_serial, ';
-               $queryStr .=   'mm_create_user_id, ';
-               $queryStr .=   'mm_create_dt) ';
-               $queryStr .=  'VALUES ';
-               $queryStr .=  '(?, ?, ?, ?, ?, ?, ?, ?, ?)';
-               $this->execStatement($queryStr, array($boardId, $threadId, 1, $message, $memberId, $now, $accessLog, $userId, $now));
-                       
-               // トランザクション確定
-               $ret = $this->endTransaction();
-               return $ret;
-       }
-       /**
-        * 返信メッセージの追加
-        *
-        * @param string  $boardId              掲示板ID
-        * @param array   $threadId             スレッドID
-        * @param string  $memberId             会員ID
-        * @param string  $message              投稿メッセージ
-        * @return bool                                 true = 成功、false = 失敗
-        */
-       function addNewReply($boardId, $threadId, $memberId, $message)
-       {
-               $now = date("Y/m/d H:i:s");     // 現在日時
-               $userId = $this->gEnv->getCurrentUserId();      // 現在のユーザ
-               $accessLog = $this->gEnv->getCurrentAccessLogSerial();
-
-               // 引数エラーチェック
-               if (empty($threadId) || empty($memberId)) return false;
-               
-               // トランザクション開始
-               $this->startTransaction();
-               
-               // スレッド情報取得
-               $queryStr  = 'SELECT * FROM mblog_thread ';
-               $queryStr .=   'WHERE mt_board_id = ? ';
-               $queryStr .=     'AND mt_id = ? ';
-               $queryStr .=     'AND mt_deleted = false ';             // 削除されていない
-               $ret = $this->selectRecord($queryStr, array($boardId, $threadId), $row);
-               if (!$ret){             // スレッドが登録されていないときは異常終了
-                       $this->endTransaction();
-                       return false;
-               }
-               $serial = $row['mt_serial'];
-               $historyIndex = $row['mt_history_index'] + 1;
-               $subject = $row['mt_subject'];
-               $threadNo = $row['mt_no'];
-               $messageCount = $row['mt_message_count'] + 1;
-
-               // スレッド更新番号作成
-               $queryStr = 'SELECT MAX(mt_update_no) AS mn FROM mblog_thread ';
-               $ret = $this->selectRecord($queryStr, array(), $row);
-               if ($ret){
-                       $threadUpdateNo = $row['mn'] + 1;
-               } else {
-                       $threadUpdateNo = 1;
-               }
-               
-               // 古いレコードを削除
-               $queryStr  = 'UPDATE mblog_thread ';
-               $queryStr .=   'SET mt_deleted = true, ';       // 削除
-               $queryStr .=     'mt_update_user_id = ?, ';
-               $queryStr .=     'mt_update_dt = ? ';
-               $queryStr .=   'WHERE mt_serial = ?';
-               $this->execStatement($queryStr, array($userId, $now, $serial));
-               
-               // データを追加
-               $queryStr  = 'INSERT INTO mblog_thread ';
-               $queryStr .=   '(';
-               $queryStr .=   'mt_board_id, ';
-               $queryStr .=   'mt_id, ';
-               $queryStr .=   'mt_history_index, ';
-               $queryStr .=   'mt_no, ';
-               $queryStr .=   'mt_update_no, ';
-               $queryStr .=   'mt_subject, ';
-               $queryStr .=   'mt_message_count, ';
-               $queryStr .=   'mt_dt, ';
-               $queryStr .=   'mt_log_serial, ';
-               $queryStr .=   'mt_create_user_id, ';
-               $queryStr .=   'mt_create_dt) ';
-               $queryStr .=  'VALUES ';
-               $queryStr .=  '(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
-               $this->execStatement($queryStr, array($boardId, $threadId, $historyIndex, $threadNo, $threadUpdateNo, $subject, $messageCount, $now, $accessLog, $userId, $now));
-               
-               $queryStr  = 'INSERT INTO mblog_thread_message ';
-               $queryStr .=   '(';
-               $queryStr .=   'mm_board_id, ';
-               $queryStr .=   'mm_thread_id, ';
-               $queryStr .=   'mm_index, ';
-               $queryStr .=   'mm_message, ';
-               $queryStr .=   'mm_regist_member_id, ';
-               $queryStr .=   'mm_regist_dt, ';
-               $queryStr .=   'mm_log_serial, ';
-               $queryStr .=   'mm_create_user_id, ';
-               $queryStr .=   'mm_create_dt) ';
-               $queryStr .=  'VALUES ';
-               $queryStr .=  '(?, ?, ?, ?, ?, ?, ?, ?, ?)';
-               $this->execStatement($queryStr, array($boardId, $threadId, $messageCount, $message, $memberId, $now, $accessLog, $userId, $now));
-                       
-               // トランザクション確定
-               $ret = $this->endTransaction();
-               return $ret;
-       }
-       /**
-        * 会員IDでスレッドを取得
-        *
-        * @param string    $boardId            掲示板ID
-        * @param string    $memberId           会員ID
-        * @param int           $limit                  取得する項目数
-        * @param int           $page                   取得するページ(1~)
-        * @param function      $callback               コールバック関数
-        * @param bool      $plusRecord         次のページ判断用に1レコード多く読み込むかどうか
-        * @return                      なし
-        */
-       function getThreadByMemberId($boardId, $memberId, $limit, $page, $callback, $plusRecord = false)
-       {
-               $offset = $limit * ($page -1);
-               if ($offset < 0) $offset = 0;
-               
-               // 次ページがあるか判断するために1レコード追加
-               if ($plusRecord) $limit++;
-               
-               $queryStr = 'SELECT * FROM mblog_thread LEFT JOIN mblog_thread_message ON mt_board_id = mm_board_id AND mt_id = mm_thread_id AND mm_deleted = false AND mm_index = 1 ';
-               $queryStr .=  'WHERE mt_board_id = ? ';
-               $queryStr .=    'AND mt_deleted = false ';              // 削除されていない
-               $queryStr .=    'AND mm_regist_member_id = ? ';
-               $queryStr .=  'ORDER BY mt_dt DESC ';                   // 投稿順に取得
-               $queryStr .=  'LIMIT ' . $limit . ' OFFSET ' . $offset;
-               $this->selectLoop($queryStr, array($boardId, $memberId), $callback);
-       }
-       /**
-        * 最新のスレッドメッセージを取得
-        *
-        * @param string    $boardId            掲示板ID
-        * @param int       $limit                      取得数
-        * @param int           $page                   取得するページ(1~)
-        * @param function      $callback               コールバック関数
-        * @param bool      $plusRecord         次のページ判断用に1レコード多く読み込むかどうか
-        * @return                      なし
-        */
-       function getThread($boardId, $limit, $page, $callback, $plusRecord = false)
-       {
-               if ($limit < 0) $limit = 0;
-               
-               $offset = $limit * ($page -1);
-               if ($offset < 0) $offset = 0;
-               
-               // 次ページがあるか判断するために1レコード追加
-               if ($plusRecord) $limit++;
-               
-               $queryStr = 'SELECT * FROM mblog_thread LEFT JOIN mblog_thread_message ON mt_board_id = mm_board_id AND mt_id = mm_thread_id AND mm_deleted = false AND mm_index = 1 ';
-               $queryStr .=  'LEFT JOIN mblog_member ON mm_regist_member_id = mb_id AND mb_deleted = false ';
-               $queryStr .=  'WHERE mt_board_id = ? ';
-               $queryStr .=    'AND mt_deleted = false ';              // 削除されていない
-               //$queryStr .=  'ORDER BY mt_dt DESC ';
-               $queryStr .=  'ORDER BY mt_update_no DESC ';
-               $queryStr .=  'LIMIT ' . $limit . ' OFFSET ' . $offset;
-               $this->selectLoop($queryStr, array($boardId), $callback);
-       }
-       /**
-        * スレッド情報の取得
-        *
-        * @param string $boardId               掲示板ID
-        * @param string $threadId              スレッドID
-        * @param array  $row                   取得データ
-        * @return                                              true=正常、false=異常
-        */
-       function getThreadInfo($boardId, $threadId, &$row)
-       {
-               $queryStr  = 'SELECT * FROM mblog_thread LEFT JOIN mblog_thread_message ON mt_board_id = mm_board_id AND mt_id = mm_thread_id AND mm_deleted = false AND mm_index = 1 ';
-               $queryStr .=   'LEFT JOIN mblog_member ON mm_regist_member_id = mb_id AND mb_deleted = false ';
-               $queryStr .=   'WHERE mt_board_id = ? ';
-               $queryStr .=     'AND mt_id = ? ';
-               $queryStr .=     'AND mt_deleted = false ';             // 削除されていない
-               $ret = $this->selectRecord($queryStr, array($boardId, $threadId), $row);
-               return $ret;
-       }
-       /**
-        * 返信メッセージを取得
-        *
-        * @param function      $callback               コールバック関数
-        * @param string    $boardId            掲示板ID
-        * @param array     $threadId           スレッドID
-        * @param int       $limit                      取得数(0のときすべて)
-        * @param int           $page                   取得するページ(1~)
-        * @param bool      $plusRecord         次のページ判断用に1レコード多く読み込むかどうか
-        * @return                      なし
-        */
-       function getThreadReply($callback, $boardId, $threadId, $limit, $page, $plusRecord = false)
-       {
-               if ($limit < 0) $limit = 0;
-               
-               $offset = $limit * ($page -1);
-               if ($offset < 0) $offset = 0;
-               
-               // 次ページがあるか判断するために1レコード追加
-               if ($plusRecord) $limit++;
-               
-               $queryStr  = 'SELECT * FROM mblog_thread_message LEFT JOIN mblog_member ON mm_regist_member_id = mb_id AND mb_deleted = false ';
-               $queryStr .=   'WHERE mm_board_id = ? ';
-               $queryStr .=     'AND mm_thread_id = ? ';
-               $queryStr .=     'AND mm_index > 1 ';           // 返信のみ
-               if ($limit <= 0){
-                       $queryStr .=  'ORDER BY mm_index';
-               } else {
-                       $queryStr .=  'ORDER BY mm_index LIMIT ' . intval($limit) . ' OFFSET ' . intval($offset);
-               }
-               $this->selectLoop($queryStr, array($boardId, $threadId), $callback);
-       }
-}
-?>
diff --git a/widgets/m/chacha/include/template/admin_other.tmpl.html b/widgets/m/chacha/include/template/admin_other.tmpl.html
deleted file mode 100644 (file)
index d6a47dd..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<link rel="stylesheet" href="{_ROOT_URL}/scripts/js_color_picker_v2/js_color_picker_v2.css" media="screen" />\r
-<script src="{_ROOT_URL}/scripts/js_color_picker_v2/color_functions.js"></script>\r
-<script type="text/javascript" src="{_ROOT_URL}/scripts/js_color_picker_v2/js_color_picker_v2.js"></script>\r
-<script type="text/javascript">\r
-//<![CDATA[\r
-function updateItem(){\r
-       if (!window.confirm('設定を更新しますか?')) return false;\r
-       document.main.act.value = 'update';\r
-       document.main.submit();\r
-       return true;\r
-}\r
-$(function(){\r
-       // カラー設定\r
-       m3_tableWithScrollbar('item_list', -1, 0);\r
-       \r
-       // エディタ作成\r
-       m3_setHtmlEditor('top_contents', true);\r
-});\r
-//]]>\r
-</script>\r
-<div align="center">\r
-{MENU_ITEMS}\r
-<!-- m3:ErrorMessage -->\r
-<form method="post" name="main">\r
-<input type="hidden" name="act" />\r
-<input type="hidden" name="task" value="other" />\r
-<br />\r
-<table width="90%"><tr><td>\r
-<table id="item_list" class="simple-table" width="100%">\r
-    <tbody>\r
-        <tr>\r
-           <td class="table-headside" width="150">トップコンテンツ</td>\r
-           <td colspan="3" height="200"><textarea name="top_contents" style="width:100%;height:100%;">{TOP_CONTENTS}</textarea></td>\r
-       </tr>\r
-<!--\r
-        <tr>\r
-           <td class="table-headside">背景色</td>\r
-           <td colspan="3"><input type="text" name="bg_color" value="{BG_COLOR}" size="10" maxlength="10" /><input type="button" value="カラー" onclick="showColorPicker(this,document.forms[0].bg_color);" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">内枠背景色</td>\r
-           <td colspan="3"><input type="text" name="inner_bg_color" value="{INNER_BG_COLOR}" size="10" maxlength="10" /><input type="button" value="カラー" onclick="showColorPicker(this,document.forms[0].inner_bg_color);" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">プロフィール背景色</td>\r
-           <td colspan="3"><input type="text" name="profile_color" value="{PROFILE_COLOR}" size="10" maxlength="10" /><input type="button" value="カラー" onclick="showColorPicker(this,document.forms[0].profile_color);" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">エラーメッセージ文字色</td>\r
-           <td colspan="3"><input type="text" name="err_message_color" value="{ERR_MESSAGE_COLOR}" size="10" maxlength="10" /><input type="button" value="カラー" onclick="showColorPicker(this,document.forms[0].err_message_color);" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">投稿文文字数</td>\r
-           <td colspan="3"><input type="text" name="message_length" value="{MESSAGE_LENGTH}" size="4" maxlength="4" onkeypress="return m3_numericKey(event,true);" /></td>\r
-       </tr>\r
--->\r
-    </tbody>\r
-</table>\r
-</td></tr>\r
-<tr><td align="right">\r
-<input type="button" class="button" onclick="updateItem();" value="更新" />\r
-</td></tr></table>\r
-</form>\r
-</div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/chacha/include/template/message.tmpl.html b/widgets/m/chacha/include/template/message.tmpl.html
deleted file mode 100644 (file)
index 6825e57..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<!--<div align="center" style="text-align:center;">{MESSAGE}</div>-->\r
-<!-- m3:ErrorMessage -->\r
-<div>&nbsp;</div>\r
-<div>&nbsp;</div>\r
-<div align="center" style="text-align:center;"><a href="{TOP_URL}" accesskey="0">トップページに戻る[0]</a></div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/chacha/include/template/mypage.tmpl.html b/widgets/m/chacha/include/template/mypage.tmpl.html
deleted file mode 100644 (file)
index b7b042e..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<div align="center" style="text-align:center;background-color:#ffcc99;">{TITLE}</div>\r
-<div style="{LINK_STYLE_TOP}">{REGIST_NAME}[9]</div>\r
-<!-- m3:ErrorMessage -->\r
-<patTemplate:tmpl name="thread_area">\r
-<div>{AVATAR_IMAGE}&nbsp;{NAME}</div>\r
-<patTemplate:tmpl name="add_area" visibility="hidden">\r
-<form action="{CURRENT_URL}" method="post" class="form">\r
-    <input type="hidden" name="act" value="{ACT}" />\r
-    <input type="hidden" name="ticket" value="{TICKET}" />\r
-    <input type="hidden" name="memberid" value="{MEMBER_ID}" />\r
-    <textarea rows="5" name="message">{MESSAGE}</textarea><br />\r
-    <div align="center" style="text-align:center;"><input type="submit" value="投稿" /></div>\r
-</form>\r
-</patTemplate:tmpl>\r
-<hr />\r
-<patTemplate:tmpl name="no_message_area" visibility="hidden"><div>メッセージが投稿されていません</div></patTemplate:tmpl>\r
-<patTemplate:tmpl name="message_list">\r
-<div class="chacha_message_list">\r
-<div>{MESSAGE}</div>\r
-<div><span style="font-size:x-small;">{DATE}</span><span style="font-size:x-small;">&nbsp;{ID}&nbsp;{MESSAGE_COUNT}</span></div>\r
-</div>\r
-{SPACER}\r
-</patTemplate:tmpl>\r
-</patTemplate:tmpl>\r
-<div style="{LINK_STYLE_INNER_BOTTOM}">{PAGE_LINK}</div>\r
-<div><span style="font-size:x-small;">&nbsp;</span></div>\r
-<div style="{LINK_STYLE_BOTTOM}">\r
-<a href="{REGIST_URL}" accesskey="9">{REGIST_NAME}[9]</a><br />\r
-<a href="{TOP_URL}" accesskey="0">ブログホームに戻る[0]</a></div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/chacha/include/template/profile.tmpl.html b/widgets/m/chacha/include/template/profile.tmpl.html
deleted file mode 100644 (file)
index d3f87b7..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<div align="center" style="text-align:center;background-color:#ffcc99;">{TITLE}</div>\r
-<div style="{LINK_STYLE_TOP}">{MYPAGE_NAME}</div>\r
-<!-- m3:ErrorMessage -->\r
-<div>{AVATAR_IMG}&nbsp;ID:&nbsp;{ID}</div>\r
-<form action="{CURRENT_URL}" method="post" class="form">\r
-<input type="hidden" name="act" value="{ACT}" />\r
-<input type="hidden" name="ticket" value="{TICKET}" />\r
-ニックネーム:&nbsp;<patTemplate:tmpl name="name_area" visibility="hidden"><a href="{MYPAGE_URL}">{NAME}</a></patTemplate:tmpl>\r
-<patTemplate:tmpl name="name_required_area" visibility="hidden"><span style="color:#ff0000"><font color="#ff0000">*必須</font></span><br /></patTemplate:tmpl>\r
-<patTemplate:tmpl name="name_input_area" visibility="hidden"><input type="text" name="name" size="40" maxlength="40" value="{NAME}" /></patTemplate:tmpl>\r
-<div><span style="font-size:x-small;">&nbsp;</span></div>\r
-<patTemplate:tmpl name="email_area" visibility="hidden">\r
-Eメール:<br />\r
-<patTemplate:tmpl name="show_email_area" visibility="hidden"><input type="text" name="email" size="40" maxlength="40" value="{EMAIL}" /><br />\r
-<input type="checkbox" name="show_email" {SHOW_EMAIL} />公開する<br /></patTemplate:tmpl>{EMAIL}\r
-<div><span style="font-size:x-small;">&nbsp;</span></div>\r
-</patTemplate:tmpl>\r
-URL:<br />\r
-<patTemplate:tmpl name="url_area" visibility="hidden"><input type="text" name="url" size="40" maxlength="100" value="{URL}" /></patTemplate:tmpl>{URL}<br />\r
-<patTemplate:tmpl name="add_area" visibility="hidden"><div align="center" style="text-align:center;"><input type="submit" class="button" value="登録" /></div></patTemplate:tmpl>\r
-<patTemplate:tmpl name="update_area" visibility="hidden"><div align="center" style="text-align:center;"><input type="submit" class="button" value="更新" /></div></patTemplate:tmpl>\r
-</form>\r
-<div><span style="font-size:x-small;">&nbsp;</span></div>\r
-<div style="{LINK_STYLE_BOTTOM}">\r
-{MYPAGE_LINK}\r
-<a href="{TOP_URL}" accesskey="0">ブログホームに戻る[0]</a></div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/chacha/include/template/thread.tmpl.html b/widgets/m/chacha/include/template/thread.tmpl.html
deleted file mode 100644 (file)
index 13e0706..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<div style="{LINK_STYLE_TOP}">更新[5]&nbsp;{REGIST_NAME}</div>\r
-<!-- m3:ErrorMessage -->\r
-<patTemplate:tmpl name="thread_area">\r
-<div class="message_list">\r
-<div>{AVATAR}&nbsp;{NAME}</div>\r
-<div>{THREAD_MESSAGE}</div>\r
-<div><span style="font-size:x-small;">{DATE}</span><span style="font-size:x-small;">&nbsp;{ID}&nbsp;{THREAD_MESSAGE_COUNT}</span></div>\r
-</div>\r
-<hr />\r
-</patTemplate:tmpl>\r
-<patTemplate:tmpl name="message_list">\r
-<div class="message_list">\r
-<div>{AVATAR}&nbsp;{NAME}</div>\r
-<div>{MESSAGE}</div>\r
-<div><span style="font-size:x-small;">{DATE}</span><span style="font-size:x-small;">&nbsp;{ID}</span></div>\r
-</div>\r
-{SPACER}\r
-</patTemplate:tmpl>\r
-<patTemplate:tmpl name="no_message_area" visibility="hidden"><div>返信メッセージがありません</div></patTemplate:tmpl>\r
-<div style="{LINK_STYLE_INNER_BOTTOM}">{PAGE_LINK}</div>\r
-<patTemplate:tmpl name="add_area" visibility="hidden">\r
-<div><span style="font-size:x-small;">&nbsp;</span></div>\r
-<form action="{CURRENT_URL}" method="post" class="form">\r
-    <input type="hidden" name="task" value="thread" />\r
-    <input type="hidden" name="act" value="{ACT}" />\r
-    <input type="hidden" name="ticket" value="{TICKET}" />\r
-    <input type="hidden" name="memberid" value="{MEMBER_ID}" />\r
-    <textarea rows="5" name="message">{MESSAGE}</textarea><br />\r
-    <div align="center" style="text-align:center;"><input type="submit" value="投稿" /></div>\r
-</form>\r
-</patTemplate:tmpl>\r
-<div><span style="font-size:x-small;">&nbsp;</span></div>\r
-<div style="{LINK_STYLE_BOTTOM}">\r
-<a href="{CURRENT_URL}" accesskey="5">更新[5]</a>&nbsp;{REGIST_LINK}<br />\r
-<a href="{TOP_URL}" accesskey="0">ブログホームに戻る[0]</a></div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/chacha/include/template/thread_read.tmpl.html b/widgets/m/chacha/include/template/thread_read.tmpl.html
deleted file mode 100644 (file)
index 46a148b..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<div style="{LINK_STYLE_TOP}">更新[5]&nbsp;{REGIST_NAME}[3]</div>\r
-<!-- m3:ErrorMessage -->\r
-<patTemplate:tmpl name="message_list">\r
-<div class="chacha_message_list">\r
-<div>{AVATAR}&nbsp;{NAME}</div>\r
-<div>{MESSAGE}</div>\r
-<div><span style="font-size:x-small;">{DATE}</span><span style="font-size:x-small;">&nbsp;{ID}&nbsp;{MESSAGE_COUNT}</span></div>\r
-</div>\r
-{SPACER}\r
-</patTemplate:tmpl>\r
-<div style="{LINK_STYLE_INNER_BOTTOM}">{PAGE_LINK}</div>\r
-<div><span style="font-size:x-small;">&nbsp;</span></div>\r
-<div style="{LINK_STYLE_BOTTOM}">\r
-<a href="{CURRENT_URL}" accesskey="5">更新[5]</a>&nbsp;<a href="{REGIST_URL}" accesskey="3">{REGIST_NAME}[3]</a><br />\r
-<a href="{TOP_URL}" accesskey="0">ブログホームに戻る[0]</a></div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/chacha/include/template/top.tmpl.html b/widgets/m/chacha/include/template/top.tmpl.html
deleted file mode 100644 (file)
index d52fcc7..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-{TOP_CONTENTS}\r
-<div align="center" style="text-align:center;"><a href="{READ_URL}" accesskey="1">メッセージを読む[1]</a><br />\r
-<a href="{REGIST_URL}" accesskey="3">{REGIST_NAME}[3]</a></div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/chacha/index.php b/widgets/m/chacha/index.php
deleted file mode 100644 (file)
index 99ff01c..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    マイクロブログ
- * @author     株式会社 毎日メディアサービス
- * @copyright  Copyright 2010 株式会社 毎日メディアサービス.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 3269 2010-06-21 08:15:41Z fishbone $
- * @link       http://www.m-media.co.jp
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/contactus/admin/index.php b/widgets/m/contactus/admin/index.php
deleted file mode 100644 (file)
index 393e9bd..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 426 2008-03-24 02:50:30Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/contactus/images/icon32.gif b/widgets/m/contactus/images/icon32.gif
deleted file mode 100644 (file)
index 7bc6b0b..0000000
Binary files a/widgets/m/contactus/images/icon32.gif and /dev/null differ
diff --git a/widgets/m/contactus/images/icon64.gif b/widgets/m/contactus/images/icon64.gif
deleted file mode 100644 (file)
index 58e801c..0000000
Binary files a/widgets/m/contactus/images/icon64.gif and /dev/null differ
diff --git a/widgets/m/contactus/include/container/admin_m_contactusWidgetContainer.php b/widgets/m/contactus/include/container/admin_m_contactusWidgetContainer.php
deleted file mode 100644 (file)
index 89c249c..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2008 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: admin_m_contactusWidgetContainer.php 867 2008-07-28 09:04:54Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() .                        '/baseWidgetContainer.php');
-require_once($gEnvManager->getCurrentWidgetDbPath() .  '/contactus_mainDb.php');
-
-class admin_m_contactusWidgetContainer extends BaseWidgetContainer
-{
-       private $db;    // DB接続オブジェクト
-       const DEFAULT_SEND_MESSAGE = 1;         // メール送信機能を使用するかどうか(デフォルト使用)
-                                       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-               
-               // DBオブジェクト作成
-               $this->db = new contactus_mainDb();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'admin.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               global $gEnvManager;
-               global $gPageManager;
-               
-               $defaultLang    = $gEnvManager->getDefaultLanguage();
-               $act = $request->trimValueOf('act');
-               if ($act == 'update'){          // 設定更新のとき
-                       $sendMessage = ($request->trimValueOf('send_message') == 'on') ? 1 : 0;         // メール送信機能を使用するかどうか
-                       //$emailReceiver = $request->trimValueOf('email_receiver');                     // メール受信者
-                       $emailReceiver = trim($request->valueOf('email_receiver'));                     // メール受信者(aaaa<xxx@xxx.xxx>形式が可能)
-                       $companyVisible = ($request->trimValueOf('company_visible') == 'on') ? 1 : 0;           // 会社名入力フィールドの表示
-                       $addressVisible = ($request->trimValueOf('address_visible') == 'on') ? 1 : 0;           // 住所入力フィールドの表示
-                       $telVisible = ($request->trimValueOf('tel_visible') == 'on') ? 1 : 0;           // 電話番号入力フィールドの表示
-                       // 入力値のエラーチェック
-                       if ($this->getMsgCount() == 0){                 // エラーのないとき
-                               $paramObj->sendMessage = $sendMessage;                  // メール送信機能を使用するかどうか
-                               $paramObj->emailReceiver = $emailReceiver;              // メール受信者
-                               $paramObj->companyVisible = $companyVisible;    // 会社名入力フィールドの表示
-                               $paramObj->addressVisible = $addressVisible;    // 住所入力フィールドの表示
-                               $paramObj->telVisible = $telVisible;    // 電話番号入力フィールドの表示
-                               $ret = $this->updateWidgetParamObj($paramObj);
-                               if ($ret){
-                                       $this->setMsg(self::MSG_GUIDANCE, 'データを更新しました');
-                               } else {
-                                       $this->setMsg(self::MSG_APP_ERR, 'データ更新に失敗しました');
-                               }
-                               $gPageManager->updateParentWindow();// 親ウィンドウを更新
-                       }
-               } else {                // 初期表示の場合
-                       // デフォルト値の設定
-                       $sendMessage = self::DEFAULT_SEND_MESSAGE;                      // メール送信機能を使用するかどうか
-                       $emailReceiver = '';            // メール受信者
-                       $companyVisible = 0;    // 会社名入力フィールドの表示
-                       $addressVisible = 0;    // 住所入力フィールドの表示
-                       $telVisible = 0;                // 電話番号入力フィールドの表示
-                       $paramObj = $this->getWidgetParamObj();
-                       if (!empty($paramObj)){
-                               $sendMessage = $paramObj->sendMessage;                  // メール送信機能を使用するかどうか
-                               $emailReceiver = $paramObj->emailReceiver;              // メール受信者
-                               $companyVisible = $paramObj->companyVisible;    // 会社名入力フィールドの表示
-                               $addressVisible = $paramObj->addressVisible;    // 住所入力フィールドの表示
-                               $telVisible = $paramObj->telVisible;            // 電話番号入力フィールドの表示
-                       }
-               }
-               // 画面に書き戻す
-               $checked = '';
-               if ($sendMessage) $checked = 'checked';
-               $this->tmpl->addVar("_widget", "send_message", $checked);
-               $this->tmpl->addVar("_widget", "email_receiver", $emailReceiver);               // メール受信者
-               $checked = '';
-               if ($companyVisible) $checked = 'checked';
-               $this->tmpl->addVar("_widget", "company_visible", $checked);// 会社名入力フィールドの表示
-               $checked = '';
-               if ($addressVisible) $checked = 'checked';
-               $this->tmpl->addVar("_widget", "address_visible", $checked);// 住所入力フィールドの表示
-               $checked = '';
-               if ($telVisible) $checked = 'checked';
-               $this->tmpl->addVar("_widget", "tel_visible", $checked);// 電話番号入力フィールドの表示
-       }
-}
-?>
diff --git a/widgets/m/contactus/include/container/m_contactusWidgetContainer.php b/widgets/m/contactus/include/container/m_contactusWidgetContainer.php
deleted file mode 100644 (file)
index b92dd09..0000000
+++ /dev/null
@@ -1,231 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2008 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_contactusWidgetContainer.php 2363 2009-09-26 14:45:44Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() .                        '/baseWidgetContainer.php');
-require_once($gEnvManager->getCurrentWidgetDbPath() .  '/contactus_mainDb.php');
-
-class m_contactusWidgetContainer extends BaseWidgetContainer
-{
-       private $db;    // DB接続オブジェクト
-       private $sysDb;         // システムDBオブジェクト
-       private $langId;        // 表示言語
-       private $state;         // 都道府県
-       const CONTACTUS_FORM = 'contact_us';            // お問い合わせフォーム
-       const DEFAULT_SEND_MESSAGE = 1;         // メール送信機能を使用するかどうか(デフォルト使用)
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               global $gInstanceManager;
-                       
-               // 親クラスを呼び出す
-               parent::__construct();
-               
-               // DBオブジェクト作成
-               $this->db = new contactus_mainDb();
-               $this->sysDb = $gInstanceManager->getSytemDbObject();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'index.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               global $gEnvManager;
-               global $gErrorManager;
-               
-               $now = date("Y/m/d H:i:s");     // 現在日時
-               $this->langId   = $gEnvManager->getCurrentLanguage();           // 表示言語を取得
-               
-               // 設定値の取得
-               $sendMessage = self::DEFAULT_SEND_MESSAGE;                      // メール送信機能を使用するかどうか
-               $emailReceiver = '';            // メール受信者
-               $companyVisible = 0;    // 会社名入力フィールドの表示
-               $addressVisible = 0;    // 住所入力フィールドの表示
-               $telVisible = 0;                // 電話番号入力フィールドの表示
-               $paramObj = $this->getWidgetParamObj();
-               if (!empty($paramObj)){
-                       $sendMessage = $paramObj->sendMessage;                  // メール送信機能を使用するかどうか
-                       $emailReceiver = $paramObj->emailReceiver;              // メール受信者
-                       $companyVisible = $paramObj->companyVisible;    // 会社名入力フィールドの表示
-                       $addressVisible = $paramObj->addressVisible;    // 住所入力フィールドの表示
-                       $telVisible = $paramObj->telVisible;            // 電話番号入力フィールドの表示
-               }
-               
-               // 入力値を取得
-               $act = $request->mobileTrimValueOf('act');
-               $this->state = $request->mobileTrimValueOf('item_state');               // 都道府県
-               $name = $request->mobileTrimValueOf('item_name');               // 名前
-               $nameKana = $request->mobileTrimValueOf('item_name_kana');              // 名前(カナ)
-               $email = $request->mobileTrimValueOf('item_email');             // Eメール
-               $email2 = $request->mobileTrimValueOf('item_email2');           // Eメール確認用
-               $companyName = $request->mobileTrimValueOf('item_company_name');                // 会社名
-               $zipcode = $request->mobileTrimValueOf('item_zipcode');         // 郵便番号
-               $address = $request->mobileTrimValueOf('item_address');         // 住所
-               $phone = $request->mobileTrimValueOf('item_phone');             // 電話番号
-               $body = $request->mobileTrimValueOf('item_body');               // 問い合わせ内容
-               if ($act == 'send'){            // お問い合わせメール送信
-                       // 入力チェック
-                       $this->checkInput($name, 'お名前');
-                       $this->checkInput($nameKana, 'お名前(カナ)');
-                       $this->checkMailAddress($email, 'Eメール');
-                       $this->checkInput($body, 'お問い合わせ内容');
-                       if ($companyVisible){   // 会社名入力フィールドの表示
-                               $this->checkInput($companyName, '会社名');
-                       }
-                       if ($addressVisible){   // 住所入力フィールドの表示
-                               $this->checkInput($zipcode, '郵便番号');
-                               $this->checkInput($this->state, '都道府県');
-                               $this->checkInput($address, '住所');
-                       }                                       
-                       if ($telVisible){               // 電話番号入力フィールドの表示
-                               $this->checkInput($phone, '電話番号');
-                       }
-                       if ($this->getMsgCount() == 0){                 // メールアドレスのチェック
-                               if ($email != $email2){
-                                       $this->setAppErrorMsg('Eメールアドレスに誤りがあります');
-                               }
-                       }
-                       // エラーなしの場合はメール送信
-                       if ($this->getMsgCount() == 0){
-                               $this->setGuidanceMsg('送信完了しました');
-                               
-                               // メール送信設定のときはメールを送信
-                               if ($sendMessage){
-                                       // メール本文の作成
-                                       $mailBody = 'お名前     : ' . $name . "\n";
-                                       $mailBody .= 'お名前(カナ) : ' . $nameKana . "\n";
-                                       $mailBody .= 'Eメールアドレス: ' . $email . "\n";
-                                       if ($companyVisible){   // 会社名入力フィールドの表示
-                                               $mailBody .= '会社名     : ' . $companyName . "\n";
-                                       }
-                                       if ($addressVisible){   // 住所入力フィールドの表示
-                                               $stateName = $this->db->getStateName('JPN', $this->langId, $this->state);
-                                               $mailBody .= '郵便番号    : ' . $zipcode . "\n";
-                                               $mailBody .= '都道府県    : ' . $stateName . "\n";
-                                               $mailBody .= '住所      : ' . $address . "\n";
-                                       }
-                                       if ($telVisible){               // 電話番号入力フィールドの表示
-                                               $mailBody .= '電話番号    : ' . $phone . "\n";
-                                       }
-                                       $mailBody .= 'お問い合わせ内容: ' . $body . "\n";
-                                       
-                                       // 送信元、送信先
-                                       $fromAddress = $gEnvManager->getSiteEmail();    // 送信元はサイト情報のEメールアドレス
-                                       $toAddress = $gEnvManager->getSiteEmail();              // デフォルトのサイト向けEメールアドレス
-                                       if (!empty($emailReceiver)) $toAddress = $emailReceiver;                // 受信メールアドレスが設定されている場合
-                                       
-                                       // メールを送信
-                                       if (empty($toAddress)){
-                                               $gErrorManager->writeError(__METHOD__, "基本情報のEメールアドレスが設定されていません。\n(メール本文)\n" . $mailBody);
-                                       } else {
-                                               $mailParam = array();
-                                               $mailParam['BODY'] = $mailBody;
-                                               $ret = $this->gInstance->getMailManager()->sendFormMail(2/*手動送信*/, $gEnvManager->getCurrentWidgetId(), $toAddress, $fromAddress, $email, '', self::CONTACTUS_FORM, $mailParam);
-                                       }
-                               }
-
-                               $this->tmpl->addVar("_widget", "name_disabled", 'disabled');
-                               $this->tmpl->addVar("_widget", "name_kana_disabled", 'disabled');
-                               $this->tmpl->addVar("_widget", "email_disabled", 'disabled');
-                               $this->tmpl->addVar("_widget", "email2_disabled", 'disabled');
-                               $this->tmpl->addVar("_widget", "body_disabled", 'disabled');
-                               
-                               $this->tmpl->addVar("show_company_name", "company_name_disabled", 'disabled');
-                               $this->tmpl->addVar("show_address", "zipcode_disabled", 'disabled');
-                               $this->tmpl->addVar("show_address", "state_disabled", 'disabled');
-                               $this->tmpl->addVar("show_address", "address_disabled", 'disabled');
-                               $this->tmpl->addVar("show_tel", "phone_disabled", 'disabled');
-                               
-                               $this->tmpl->addVar("_widget", "send_button_disabled", 'disabled');// 送信ボタン
-                       }
-                       $this->tmpl->addVar("_widget", "name", $name);
-                       $this->tmpl->addVar("_widget", "name_kana", $nameKana);
-                       $this->tmpl->addVar("_widget", "email", $email);
-                       $this->tmpl->addVar("_widget", "email2", $email2);
-                       $this->tmpl->addVar("_widget", "body", $body);
-                       $this->tmpl->addVar("show_company_name", "company_name", $companyName);
-                       $this->tmpl->addVar("show_address", "zipcode", $zipcode);
-                       $this->tmpl->addVar("show_address", "address", $address);
-                       $this->tmpl->addVar("show_tel", "phone", $phone);
-                       $this->tmpl->addVar("_widget", "send_button_label", '送信する');// 送信ボタンラベル
-               } else {
-                       // メール送信不可の場合はボタンを使用不可にする
-                       if ($sendMessage){
-                               $this->tmpl->addVar("_widget", "send_button_label", '送信する');// 送信ボタンラベル
-                       } else {
-                               $this->tmpl->addVar("_widget", "send_button_label", '送信停止中');// 送信ボタンラベル
-                               $this->tmpl->addVar("_widget", "send_button_disabled", 'disabled');// 送信ボタン
-                       }
-               }
-               // 入力フィールドの表示制御
-               if ($companyVisible) $this->tmpl->setAttribute('show_company_name', 'visibility', 'visible');// 会社名入力フィールドの表示
-               if ($addressVisible){   // 住所入力フィールドの表示
-                       // 都道府県メニュー
-                       $this->db->getAllState('JPN', $this->langId, array($this, 'stateLoop'));
-                       $this->tmpl->setAttribute('show_address', 'visibility', 'visible');// 住所入力フィールドの表示
-               }                                       
-               if ($telVisible) $this->tmpl->setAttribute('show_tel', 'visibility', 'visible');// 住所入力フィールドの表示
-               $this->tmpl->addVar("_widget", "url", $gEnvManager->createCurrentPageUrlForMobile());
-       }
-       /**
-        * 取得した都道府県をテンプレートに設定する
-        *
-        * @param int $index                    行番号(0~)
-        * @param array $fetchedRow             フェッチ取得した行
-        * @param object $param                 未使用
-        * @return bool                                 true=処理続行の場合、false=処理終了の場合
-        */
-       function stateLoop($index, $fetchedRow, $param)
-       {
-               global $gEnvManager;
-
-               $selected = '';
-               if ($fetchedRow['gz_id'] == $this->state){              // 選択中の都道府県
-                       $selected = 'selected';
-               }
-
-               $row = array(
-                       'value'    => $this->convertToDispString($fetchedRow['gz_id']),                 // ID
-                       'name'     => $this->convertToDispString($fetchedRow['gz_name']),                       // 表示名
-                       'selected' => $selected                                                                                                         // 選択中かどうか
-               );
-               $this->tmpl->addVars('state_list', $row);
-               $this->tmpl->parseTemplate('state_list', 'a');
-               return true;
-       }
-}
-?>
diff --git a/widgets/m/contactus/include/db/contactus_mainDb.php b/widgets/m/contactus/include/db/contactus_mainDb.php
deleted file mode 100644 (file)
index 85cb048..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-/**
- * DBクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: contactus_mainDb.php 426 2008-03-24 02:50:30Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getDbPath() . '/baseDb.php');
-
-class contactus_mainDb extends BaseDb
-{
-       /**
-        * 都道府県を取得
-        *
-        * @param string        $coutryId                       国ID
-        * @param string        $lang                           言語
-        * @param function      $callback                       コールバック関数
-        * @return                      なし
-        */
-       function getAllState($coutryId, $lang, $callback)
-       {
-               $queryStr = 'SELECT * FROM geo_zone ';
-               $queryStr .=  'WHERE gz_country_id = ? AND gz_type = 1 AND gz_language_id = ? ';
-               $queryStr .=  'ORDER BY gz_index ';
-               $this->selectLoop($queryStr, array($coutryId, $lang), $callback, null);
-       }
-       /**
-        * 都道府県名を取得
-        *
-        * @param string        $coutryId                       国ID
-        * @param string        $lang                           言語
-        * @param string $stateId    都道府県ID
-        * @return string               値
-        */
-       function getStateName($coutryId, $lang, $stateId)
-       {
-               $retValue = '';
-               $queryStr = 'SELECT * FROM geo_zone ';
-               $queryStr .=  'WHERE gz_country_id = ? AND gz_type = 1 AND gz_language_id = ? AND gz_id = ?';
-               $ret = $this->selectRecord($queryStr, array($coutryId, $lang, $stateId), $row);
-               if ($ret) $retValue = $row['gz_name'];
-               return $retValue;
-       }
-}
-?>
diff --git a/widgets/m/contactus/include/template/admin.tmpl.html b/widgets/m/contactus/include/template/admin.tmpl.html
deleted file mode 100644 (file)
index 77d30b9..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<script type="text/javascript">\r
-<!--\r
-function updateItem(){\r
-    if (!window.confirm('設定を更新しますか?')) return false;\r
-    document.main.act.value = 'update';\r
-    document.main.submit();\r
-    return true;\r
-}\r
-// -->\r
-</script>\r
-<div align="center">\r
-<!-- m3:ErrorMessage -->\r
-<form method="post" name="main">\r
-<input type="hidden" name="act" />\r
-<table width="100%">\r
-<tr><td align="left"></td></tr>\r
-</table>\r
-<table class="simple-table">\r
-<caption>お問い合わせ設定</caption>\r
-    <tbody>\r
-        <tr>\r
-           <td class="table-head" style="text-align:left;">メール送信機能を使用</td>\r
-           <td><input type="checkbox" name="send_message" {SEND_MESSAGE} /></td>\r
-       </tr>\r
-        <tr class="even">\r
-           <td class="table-head" style="text-align:left;">お問い合わせ受信者のメールアドレス<br />空の場合はサイト情報のE-mailアドレス</td>\r
-           <td><input type="text" name="email_receiver" value="{EMAIL_RECEIVER}" size="25" maxlength="40" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-head" style="text-align:left;">入力フィールドの表示 - 会社名</td>\r
-           <td><input type="checkbox" name="company_visible" {COMPANY_VISIBLE} /></td>\r
-       </tr>\r
-        <tr class="even">\r
-           <td class="table-head" style="text-align:left;">入力フィールドの表示 - 住所</td>\r
-           <td><input type="checkbox" name="address_visible" {ADDRESS_VISIBLE} /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-head" style="text-align:left;">入力フィールドの表示 - 電話番号</td>\r
-           <td><input type="checkbox" name="tel_visible" {TEL_VISIBLE} /></td>\r
-       </tr>\r
-       <tr class="even">\r
-       <td></td>\r
-       <td align="right">\r
-               <input type="button" class="button" onclick="updateItem();" value="更新" />\r
-       </td>\r
-       </tr>\r
-    </tbody>\r
-</table>\r
-\r
-</form>\r
-</div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/contactus/include/template/index.tmpl.html b/widgets/m/contactus/include/template/index.tmpl.html
deleted file mode 100644 (file)
index b288b0d..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<!-- m3:ErrorMessage -->\r
-<form action="{URL}" method="post" name="contactus_main" class="form">\r
-<input type="hidden" name="act" value="send" />\r
-お問い合わせ<br>\r
-お名前<font color="red">*必須</font><br>\r
-<input type="text" name="item_name" value="{NAME}" size="25" maxlength="50" {NAME_DISABLED} /><br>\r
-お名前(フリガナ)<font color="red">*必須</font><br>\r
-<input type="text" name="item_name_kana" value="{NAME_KANA}" size="25" maxlength="50" {NAME_KANA_DISABLED} /><br>\r
-Eメール<font color="red">*必須</font><br>\r
-<input type="text" name="item_email" value="{EMAIL}" size="25" maxlength="50" {EMAIL_DISABLED} /><br>\r
-Eメール(確認)<font color="red">*必須</font><br>\r
-<input type="text" name="item_email2" value="{EMAIL2}" size="25" maxlength="50" {EMAIL2_DISABLED} /><br>\r
-<patTemplate:tmpl name="show_company_name" visibility="hidden">\r
-会社名<font color="red">*必須</font><br>\r
-<input type="text" name="item_company_name" value="{COMPANY_NAME}" size="25" maxlength="50" {COMPANY_NAME_DISABLED} /><br>\r
-</patTemplate:tmpl>\r
-<patTemplate:tmpl name="show_address" visibility="hidden">\r
-郵便番号<font color="red">*必須</font><br>\r
-<input type="text" name="item_zipcode" value="{ZIPCODE}" size="10" maxlength="10" {ZIPCODE_DISABLED} /><br>\r
-都道府県<br>\r
-<select name="item_state" {STATE_DISABLED}>\r
-<option value=""> </option>\r
-<patTemplate:tmpl name="state_list">\r
-<option value="{VALUE}" {SELECTED}>{NAME}</option>\r
-</patTemplate:tmpl>\r
-</select><font color="red">*必須</font><br>\r
-住所<font color="red">*必須</font><br>\r
-<input type="text" name="item_address" value="{ADDRESS}" size="50" maxlength="50" {ADDRESS_DISABLED} /><br>\r
-</patTemplate:tmpl>\r
-<patTemplate:tmpl name="show_tel" visibility="hidden">\r
-電話番号<font color="red">*必須</font><br>\r
-<input type="text" name="item_phone" value="{PHONE}" size="20" maxlength="20" {PHONE_DISABLED} /><br>\r
-</patTemplate:tmpl>\r
-内容<font color="red">*必須</font><br>\r
-<textarea name="item_body" rows="5" {BODY_DISABLED}>{BODY}</textarea><br>\r
-<input type="submit" value="{SEND_BUTTON_LABEL}" {SEND_BUTTON_DISABLED} /><br>\r
-{MESSAGE}<br>\r
-</form>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/contactus/index.php b/widgets/m/contactus/index.php
deleted file mode 100644 (file)
index 393e9bd..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 426 2008-03-24 02:50:30Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/contactus_custom/admin/index.php b/widgets/m/contactus_custom/admin/index.php
deleted file mode 100644 (file)
index b95e2eb..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 2116 2009-07-14 09:50:17Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/contactus_custom/images/icon32.gif b/widgets/m/contactus_custom/images/icon32.gif
deleted file mode 100644 (file)
index 7bc6b0b..0000000
Binary files a/widgets/m/contactus_custom/images/icon32.gif and /dev/null differ
diff --git a/widgets/m/contactus_custom/images/icon64.gif b/widgets/m/contactus_custom/images/icon64.gif
deleted file mode 100644 (file)
index 58e801c..0000000
Binary files a/widgets/m/contactus_custom/images/icon64.gif and /dev/null differ
diff --git a/widgets/m/contactus_custom/include/container/admin_m_contactus_customWidgetContainer.php b/widgets/m/contactus_custom/include/container/admin_m_contactus_customWidgetContainer.php
deleted file mode 100644 (file)
index 9128dcc..0000000
+++ /dev/null
@@ -1,471 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2009 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: admin_m_contactus_customWidgetContainer.php 2307 2009-09-13 04:03:00Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseAdminWidgetContainer.php');
-require_once($gEnvManager->getCurrentWidgetDbPath() . '/contactus_customDb.php');
-
-class admin_m_contactus_customWidgetContainer extends BaseAdminWidgetContainer
-{
-       private $db;    // DB接続オブジェクト
-       private $sysDb; // DB接続オブジェクト
-       private $serialNo;              // 選択中の項目のシリアル番号
-       private $serialArray = array();                 // 表示中のシリアル番号
-       private $langId;
-       private $configId;              // 定義ID
-       private $paramObj;              // パラメータ保存用オブジェクト
-       private $typeArray;             // 項目タイプ
-       private $fieldInfoArray = array();                      // お問い合わせ項目情報
-       const DEFAULT_NAME_HEAD = '名称未設定';                    // デフォルトの設定名
-       const DEFAULT_TITLE_NAME = 'お問い合わせ';        // デフォルトのタイトル名
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-               
-               // DBオブジェクト作成
-               $this->db = new contactus_customDb();
-               $this->sysDb = $this->gInstance->getSytemDbObject();
-               
-               // お問い合わせ項目タイプ
-               $this->typeArray = array(       array(  'name' => 'テキストボックス',   'value' => 'text'),
-                                                                       array(  'name' => 'テキストエリア',              'value' => 'textarea'),
-                                                                       array(  'name' => 'セレクトメニュー',   'value' => 'select'),
-                                                                       array(  'name' => 'チェックボックス',   'value' => 'checkbox'),
-                                                                       array(  'name' => 'ラジオボタン',         'value' => 'radio'));
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               $task = $request->trimValueOf('task');
-               if ($task == 'list'){           // 一覧画面
-                       return 'admin_list.tmpl.html';
-               } else {                        // 一覧画面
-                       return 'admin.tmpl.html';
-               }
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $task = $request->trimValueOf('task');
-               if ($task == 'list'){           // 一覧画面
-                       return $this->createList($request);
-               } else {                        // 詳細設定画面
-                       return $this->createDetail($request);
-               }
-       }
-       /**
-        * 詳細画面作成
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param                                                               なし
-        */
-       function createDetail($request)
-       {
-               // ページ定義IDとページ定義のレコードシリアル番号を取得
-               $this->startPageDefParam($defSerial, $defConfigId, $this->paramObj);
-               
-               $userId         = $this->gEnv->getCurrentUserId();
-               $this->langId   = $this->gEnv->getCurrentLanguage();            // 表示言語を取得
-               $act = $request->trimValueOf('act');
-               $this->serialNo = $request->trimValueOf('serial');              // 選択項目のシリアル番号
-               $this->configId = $request->trimValueOf('item_id');             // 定義ID
-               if (empty($this->configId)) $this->configId = $defConfigId;             // 呼び出しウィンドウから引き継いだ定義ID
-               
-               // 入力値を取得
-               $name   = $request->trimValueOf('item_name');                   // 定義名
-               $showTitle = ($request->trimValueOf('show_title') == 'on') ? 1 : 0;             // タイトルの表示
-               $titleName = $request->trimValueOf('title_name');                               // タイトル名
-               $titleBgColor = $request->trimValueOf('item_title_bgcolor');            // タイトルバックグランドカラー
-               $explanation = trim($request->valueOf('explanation'));                          // 説明
-               $fieldCount = $request->trimValueOf('fieldcount');              // お問い合わせ項目数
-               $titles = $request->trimValueOf('item_title');          // お問い合わせ項目タイトル
-               $descs = $request->trimValueOf('item_desc');            // お問い合わせ項目説明
-               $types  = $request->trimValueOf('item_type');           // お問い合わせ項目タイプ
-               $defs = $request->trimValueOf('item_def');              // お問い合わせ項目定義
-               $values = $request->trimValueOf('required');            // お問い合わせ項目必須入力
-               $requireds = array();
-               if (!empty($values)) $requireds = explode(',', $values);
-               $emailSubject = $request->trimValueOf('email_subject');         // メールタイトル
-               $emailReceiver = trim($request->valueOf('email_receiver'));     // メール受信者(aaaa<xxx@xxx.xxx>形式が可能)
-               
-               $replaceNew = false;            // データを再取得するかどうか
-               if ($act == 'add'){// 新規追加
-                       // 入力値のエラーチェック
-                       
-                       // 設定名の重複チェック
-                       for ($i = 0; $i < count($this->paramObj); $i++){
-                               $targetObj = $this->paramObj[$i]->object;
-                               if ($name == $targetObj->name){         // 定義名
-                                       $this->setUserErrorMsg('名前が重複しています');
-                                       break;
-                               }
-                       }
-                       
-                       // エラーなしの場合は、データを登録
-                       if ($this->getMsgCount() == 0){
-                               // 追加オブジェクト作成
-                               $newObj = new stdClass;
-                               $newObj->name           = $name;// 表示名
-                               $newObj->showTitle              = $showTitle;           // タイトルの表示
-                               $newObj->titleName              = $titleName;                           // タイトル名
-                               $newObj->titleBgColor           = $titleBgColor;                // タイトルバックグランドカラー
-                               $newObj->explanation    = $explanation;                         // 説明
-                               $newObj->emailSubject = $emailSubject;          // メールタイトル
-                               $newObj->emailReceiver = $emailReceiver;        // メール受信者(aaaa<xxx@xxx.xxx>形式が可能)
-                               $newObj->fieldInfo      = array();
-                               
-                               for ($i = 0; $i < $fieldCount; $i++){
-                                       $newInfoObj = new stdClass;
-                                       $newInfoObj->title      = $titles[$i];
-                                       $newInfoObj->desc       = $descs[$i];
-                                       $newInfoObj->type       = $types[$i];
-                                       $newInfoObj->def        = $defs[$i];
-                                       $newInfoObj->required   = $requireds[$i];
-                                       $newObj->fieldInfo[] = $newInfoObj;
-                               }
-                               
-                               $ret = $this->addPageDefParam($defSerial, $defConfigId, $this->paramObj, $newObj);
-                               if ($ret){
-                                       $this->setGuidanceMsg('データを追加しました');
-                                       
-                                       $this->configId = $defConfigId;         // 定義定義IDを更新
-                                       $replaceNew = true;                     // データ再取得
-                               } else {
-                                       $this->setAppErrorMsg('データ追加に失敗しました');
-                               }
-                       }
-               } else if ($act == 'update'){           // 設定更新のとき
-                       // 入力値のエラーチェック
-                       
-                       if ($this->getMsgCount() == 0){                 // エラーのないとき
-                               // 現在の設定値を取得
-                               $ret = $this->getPageDefParam($defSerial, $defConfigId, $this->paramObj, $this->configId, $targetObj);
-                               if ($ret){
-                                       // ウィジェットオブジェクト更新
-                                       $targetObj->showTitle           = $showTitle;           // タイトルの表示
-                                       $targetObj->titleName           = $titleName;                           // タイトル名
-                                       $targetObj->titleBgColor                = $titleBgColor;                // タイトルバックグランドカラー
-                                       $targetObj->explanation = $explanation;                         // 説明
-                                       $targetObj->emailSubject = $emailSubject;               // メールタイトル
-                                       $targetObj->emailReceiver = $emailReceiver;     // メール受信者(aaaa<xxx@xxx.xxx>形式が可能)
-                                       $targetObj->fieldInfo   = array();
-                               
-                                       for ($i = 0; $i < $fieldCount; $i++){
-                                               $newInfoObj = new stdClass;
-                                               $newInfoObj->title      = $titles[$i];
-                                               $newInfoObj->desc       = $descs[$i];
-                                               $newInfoObj->type       = $types[$i];
-                                               $newInfoObj->def        = $defs[$i];
-                                               $newInfoObj->required   = $requireds[$i];
-                                               $targetObj->fieldInfo[] = $newInfoObj;
-                                       }
-                               }
-                               
-                               // 設定値を更新
-                               if ($ret) $ret = $this->updatePageDefParam($defSerial, $defConfigId, $this->paramObj, $this->configId, $targetObj);
-                               if ($ret){
-                                       $this->setMsg(self::MSG_GUIDANCE, 'データを更新しました');
-                                       $replaceNew = true;                     // データ再取得
-                               } else {
-                                       $this->setMsg(self::MSG_APP_ERR, 'データ更新に失敗しました');
-                               }
-                       }
-               } else if ($act == 'select'){   // 定義IDを変更
-                       $replaceNew = true;                     // データ再取得
-               } else {        // 初期起動時、または上記以外の場合
-                       // デフォルト値設定
-                       $this->configId = $defConfigId;         // 呼び出しウィンドウから引き継いだ定義ID
-                       $replaceNew = true;                     // データ再取得
-               }
-               // 設定項目選択メニュー作成
-               $this->createItemMenu();
-                               
-               // 表示用データを取得
-               if (empty($this->configId)){            // 新規登録の場合
-                       $this->tmpl->setAttribute('item_name_visible', 'visibility', 'visible');// 名前入力フィールド表示
-                       if ($replaceNew){               // データ再取得時
-                               $name = $this->createDefaultName();                     // デフォルト登録項目名
-                               $showTitle = 0;         // タイトルの表示
-                               $titleName = self::DEFAULT_TITLE_NAME;                          // タイトル名
-                               $titleBgColor = '';             // タイトルバックグランドカラー
-                               $explanation = '';                              // 説明
-                               $emailSubject = '';             // メールタイトル
-                               $emailReceiver = '';    // メール受信者(aaaa<xxx@xxx.xxx>形式が可能)
-                               $this->fieldInfoArray = array();                        // お問い合わせ項目情報
-                       }
-                       $this->serialNo = 0;
-               } else {
-                       if ($replaceNew){// データ再取得時
-                               $ret = $this->getPageDefParam($defSerial, $defConfigId, $this->paramObj, $this->configId, $targetObj);
-                               if ($ret){
-                                       $name   = $targetObj->name;// 名前
-                                       $showTitle = $targetObj->showTitle;             // タイトルの表示
-                                       $titleName = $targetObj->titleName;                             // タイトル名
-                                       $titleBgColor = $targetObj->titleBgColor;               // タイトルバックグランドカラー
-                                       $explanation = $targetObj->explanation;                         // 説明
-                                       $emailSubject = $targetObj->emailSubject;               // メールタイトル
-                                       $emailReceiver = $targetObj->emailReceiver;     // メール受信者(aaaa<xxx@xxx.xxx>形式が可能)
-                                       if (!empty($targetObj->fieldInfo)) $this->fieldInfoArray = $targetObj->fieldInfo;                       // お問い合わせ項目情報
-                               }
-                       }
-                       $this->serialNo = $this->configId;
-                               
-                       // 新規作成でないときは、メニューを変更不可にする(画面作成から呼ばれている場合のみ)
-                       if (!empty($defConfigId) && !empty($defSerial)) $this->tmpl->addVar("_widget", "id_disabled", 'disabled');
-               }
-               
-               // 追加用タイプメニュー作成
-               $this->createTypeMenu1();
-               
-               // お問い合わせ項目一覧作成
-               $this->createFieldList();
-               if (empty($this->fieldInfoArray)) $this->tmpl->setAttribute('field_list', 'visibility', 'hidden');// お問い合わせ項目情報一覧
-               
-               // 画面にデータを埋め込む
-               if (!empty($this->configId)) $this->tmpl->addVar("_widget", "id", $this->configId);             // 定義ID
-               $this->tmpl->addVar("item_name_visible", "name",        $name);
-               if (!empty($showTitle)) $this->tmpl->addVar("_widget", "show_title",    'checked');             // タイトルの表示
-               $this->tmpl->addVar("_widget", "title_name",    $this->convertToDispString($titleName));                                // タイトル名
-               $this->tmpl->addVar("_widget", "title_bgcolor", $titleBgColor);         // タイトルバックグランドカラー
-               $this->tmpl->addVar("_widget", "explanation",   $explanation);                          // 説明
-               $this->tmpl->addVar("_widget", "email_subject", $emailSubject);         // メールタイトル
-               $this->tmpl->addVar("_widget", "email_receiver",        $emailReceiver);        // メール受信者(aaaa<xxx@xxx.xxx>形式が可能)
-               $this->tmpl->addVar("_widget", "serial", $this->serialNo);// 選択中のシリアル番号、IDを設定
-               
-               // ボタンの表示制御
-               if (empty($this->serialNo)){            // 新規追加項目を選択しているとき
-                       $this->tmpl->setAttribute('add_button', 'visibility', 'visible');// 「新規追加」ボタン
-               } else {
-                       $this->tmpl->setAttribute('update_button', 'visibility', 'visible');// 「更新」ボタン
-               }
-               
-               // ページ定義IDとページ定義のレコードシリアル番号を更新
-               $this->endPageDefParam($defSerial, $defConfigId, $this->paramObj);
-       }
-       /**
-        * 選択用メニューを作成
-        *
-        * @return なし                                               
-        */
-       function createItemMenu()
-       {
-               for ($i = 0; $i < count($this->paramObj); $i++){
-                       $id = $this->paramObj[$i]->id;// 定義ID
-                       $targetObj = $this->paramObj[$i]->object;
-                       $name = $targetObj->name;// 定義名
-                       $selected = '';
-                       if ($this->configId == $id) $selected = 'selected';
-
-                       $row = array(
-                               'name' => $name,                // 名前
-                               'value' => $id,         // 定義ID
-                               'selected' => $selected // 選択中の項目かどうか
-                       );
-                       $this->tmpl->addVars('title_list', $row);
-                       $this->tmpl->parseTemplate('title_list', 'a');
-               }
-       }
-       /**
-        * お問い合わせ項目一覧を作成
-        *
-        * @return なし                                               
-        */
-       function createFieldList()
-       {
-               $fieldCount = count($this->fieldInfoArray);
-               for ($i = 0; $i < $fieldCount; $i++){
-                       $infoObj = $this->fieldInfoArray[$i];
-                       $title = $infoObj->title;// タイトル名
-                       $desc = $infoObj->desc;         // 説明
-                       $type = $infoObj->type;         // 項目タイプ
-                       $def = $infoObj->def;           // 項目定義
-                       $requiredCheck = '';
-                       if (!empty($infoObj->required)) $requiredCheck = 'checked';
-                       
-                       // 行を作成
-                       $this->tmpl->clearTemplate('type_list2');
-                       
-                       for ($j = 0; $j < count($this->typeArray); $j++){
-                               $value = $this->typeArray[$j]['value'];
-                               $name = $this->typeArray[$j]['name'];
-
-                               $selected = '';
-                               if ($value == $type) $selected = 'selected';
-
-                               $tableLine = array(
-                                       'value'    => $value,                   // タイプ値
-                                       'name'     => $this->convertToDispString($name),                        // タイプ名
-                                       'selected' => $selected                 // 選択中かどうか
-                               );
-                               $this->tmpl->addVars('type_list2', $tableLine);
-                               $this->tmpl->parseTemplate('type_list2', 'a');
-                       }
-                       $rootUrl = $this->convertToDispString($this->getUrl($this->gEnv->getRootUrl()));
-                       $row = array(
-                               'title' => $this->convertToDispString($title),  // タイトル名
-                               'desc' => $this->convertToDispString($desc),    // 説明
-                               'def' => $this->convertToDispString($def),              // 定義情報
-                               'required' => $requiredCheck,                                                   // 必須入力
-                               'root_url' => $rootUrl
-                       );
-                       $this->tmpl->addVars('field_list', $row);
-                       $this->tmpl->parseTemplate('field_list', 'a');
-               }
-       }
-       /**
-        * デフォルトの名前を取得
-        *
-        * @return string       デフォルト名                                              
-        */
-       function createDefaultName()
-       {
-               $name = self::DEFAULT_NAME_HEAD;
-               for ($j = 1; $j < 100; $j++){
-                       $name = self::DEFAULT_NAME_HEAD . $j;
-                       // 設定名の重複チェック
-                       for ($i = 0; $i < count($this->paramObj); $i++){
-                               $targetObj = $this->paramObj[$i]->object;
-                               if ($name == $targetObj->name){         // 定義名
-                                       break;
-                               }
-                       }
-                       // 重複なしのときは終了
-                       if ($i == count($this->paramObj)) break;
-               }
-               return $name;
-       }
-       /**
-        * 一覧画面作成
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param                                                               なし
-        */
-       function createList($request)
-       {
-               // ページ定義IDとページ定義のレコードシリアル番号を取得
-               $this->startPageDefParam($defSerial, $defConfigId, $this->paramObj);
-               
-               $userId         = $this->gEnv->getCurrentUserId();
-               $langId = $this->gEnv->getCurrentLanguage();            // 表示言語を取得
-               $act = $request->trimValueOf('act');
-               
-               if ($act == 'delete'){          // メニュー項目の削除
-                       $listedItem = explode(',', $request->trimValueOf('seriallist'));
-                       $delItems = array();
-                       for ($i = 0; $i < count($listedItem); $i++){
-                               // 項目がチェックされているかを取得
-                               $itemName = 'item' . $i . '_selected';
-                               $itemValue = ($request->trimValueOf($itemName) == 'on') ? 1 : 0;
-                               
-                               if ($itemValue){                // チェック項目
-                                       $delItems[] = $listedItem[$i];
-                               }
-                       }
-                       if (count($delItems) > 0){
-                               $ret = $this->delPageDefParam($defSerial, $defConfigId, $this->paramObj, $delItems);
-                               if ($ret){              // データ削除成功のとき
-                                       $this->setGuidanceMsg('データを削除しました');
-                               } else {
-                                       $this->setAppErrorMsg('データ削除に失敗しました');
-                               }
-                       }
-               }
-               // 定義一覧作成
-               $this->createItemList();
-               
-               $this->tmpl->addVar("_widget", "serial_list", implode($this->serialArray, ','));// 表示項目のシリアル番号を設定
-               
-               // ページ定義IDとページ定義のレコードシリアル番号を更新
-               $this->endPageDefParam($defSerial, $defConfigId, $this->paramObj);
-       }
-       /**
-        * 定義一覧作成
-        *
-        * @return なし                                               
-        */
-       function createItemList()
-       {
-               for ($i = 0; $i < count($this->paramObj); $i++){
-                       $id                     = $this->paramObj[$i]->id;// 定義ID
-                       $targetObj      = $this->paramObj[$i]->object;
-                       $name = $targetObj->name;// 定義名
-                       $emailReceiver  = $targetObj->emailReceiver;            // 受信メールアドレス
-               
-                       // 使用数
-                       $defCount = 0;
-                       if (!empty($id)){
-                               $defCount = $this->sysDb->getPageDefCount($this->gEnv->getCurrentWidgetId(), $id);
-                       }
-                       $operationDisagled = '';
-                       if ($defCount > 0) $operationDisagled = 'disabled';
-                       
-                       $row = array(
-                               'index' => $i,
-                               'id' => $id,
-                               'ope_disabled' => $operationDisagled,                   // 選択可能かどうか
-                               'name' => $this->convertToDispString($name),            // 名前
-                               'email_receiver' => $this->convertToDispString($emailReceiver), // 受信メールアドレス
-                               'def_count' => $defCount                                                        // 使用数
-                       );
-                       $this->tmpl->addVars('itemlist', $row);
-                       $this->tmpl->parseTemplate('itemlist', 'a');
-                       
-                       // シリアル番号を保存
-                       $this->serialArray[] = $id;
-               }
-       }
-       /**
-        * タイプ選択メニュー作成
-        *
-        * @return なし
-        */
-       function createTypeMenu1()
-       {
-               for ($i = 0; $i < count($this->typeArray); $i++){
-                       $value = $this->typeArray[$i]['value'];
-                       $name = $this->typeArray[$i]['name'];
-                       
-                       $row = array(
-                               'value'    => $value,                   // タイプ値
-                               'name'     => $this->convertToDispString($name),                        // タイプ名
-                               'selected' => $selected                 // 選択中かどうか
-                       );
-                       $this->tmpl->addVars('type_list1', $row);
-                       $this->tmpl->parseTemplate('type_list1', 'a');
-               }
-       }
-}
-?>
diff --git a/widgets/m/contactus_custom/include/container/m_contactus_customWidgetContainer.php b/widgets/m/contactus_custom/include/container/m_contactus_customWidgetContainer.php
deleted file mode 100644 (file)
index 660b41e..0000000
+++ /dev/null
@@ -1,347 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2009 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_contactus_customWidgetContainer.php 2363 2009-09-26 14:45:44Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseMobileWidgetContainer.php');
-require_once($gEnvManager->getCurrentWidgetDbPath() . '/contactus_customDb.php');
-
-class m_contactus_customWidgetContainer extends BaseMobileWidgetContainer
-{
-       private $db;                    // DB接続オブジェクト
-       private $fieldInfoArray = array();                      // お問い合わせ項目情報
-       private $valueArray;            // 項目入力値
-       const DEFAULT_CONFIG_ID = 0;
-       const CONTACTUS_FORM = 'contact_us';            // お問い合わせフォーム
-       const DEFAULT_SEND_MESSAGE = 1;         // メール送信機能を使用するかどうか(デフォルト使用)
-       const DEFAULT_TITLE_NAME = 'お問い合わせ';        // デフォルトのタイトル名
-       const DEFAULT_STR_REQUIRED = '<span style="color:#ff0000"><font color="#ff0000">*必須</font></span>';         // 「必須」表示用テキスト
-       const FIELD_HEAD = 'item';                      // フィールド名の先頭文字列
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-               
-               // DBオブジェクト作成
-               $this->db = new contactus_customDb();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'index.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               // 定義ID取得
-               $configId = $this->gEnv->getCurrentWidgetConfigId();
-               if (empty($configId)) $configId = self::DEFAULT_CONFIG_ID;
-       
-               // パラメータオブジェクトを取得
-               $targetObj = $this->getWidgetParamObjByConfigId($configId);
-               if (empty($targetObj)) return;          // 定義データが取得できないときは終了
-               
-               // デフォルト値設定
-               $inputEnabled = true;                   // 入力の許可状態
-               $now = date("Y/m/d H:i:s");     // 現在日時
-               $this->langId   = $this->gEnv->getCurrentLanguage();            // 表示言語を取得
-               $sendMessage = self::DEFAULT_SEND_MESSAGE;                      // メール送信機能を使用するかどうか
-               $showTitle = 0;                         // タイトルを表示するかどうか
-               $titleName = self::DEFAULT_TITLE_NAME;                  // タイトル名
-               $titleBgColor = '';             // タイトルバックグランドカラー
-               $explanation = '';                      // 説明
-               
-               //$sendMessage = $targetObj->sendMessage;                       // メール送信機能を使用するかどうか
-               $emailReceiver = $targetObj->emailReceiver;             // メール受信者
-               $emailSubject = $targetObj->emailSubject;               // メール件名
-               $showTitle = $targetObj->showTitle;                             // タイトルを表示するかどうか
-               if (!empty($targetObj->titleName)) $titleName = $targetObj->titleName;                  // タイトル名
-               $titleBgColor = $targetObj->titleBgColor;               // タイトルバックグランドカラー
-               $explanation = $targetObj->explanation;                 // 説明
-               $name   = $targetObj->name;// 名前
-               if (!empty($targetObj->fieldInfo)) $this->fieldInfoArray = $targetObj->fieldInfo;                       // お問い合わせフィールド情報
-               
-               // 入力値を取得
-               $this->valueArray = array();
-               $fieldCount = count($this->fieldInfoArray);
-               for ($i = 0; $i < $fieldCount; $i++){
-                       $itemName = self::FIELD_HEAD . ($i + 1);
-                       $itemValue = $request->mobileTrimValueOf($itemName);
-                       $this->valueArray[] = $itemValue;
-               }
-               $act = $request->trimValueOf('act');
-               
-               if ($act == 'send'){            // お問い合わせメール送信
-                       $postTicket = $request->trimValueOf('ticket');          // POST確認用
-                       if (!empty($postTicket) && $postTicket == $request->getSessionValue(M3_SESSION_POST_TICKET)){           // 正常なPOST値のとき
-                               // 入力状況のチェック
-                               for ($i = 0; $i < $fieldCount; $i++){
-                                       $infoObj = $this->fieldInfoArray[$i];
-                                       $title = $infoObj->title;// タイトル名
-                                       $type = $infoObj->type;         // 項目タイプ
-                                       $required = $infoObj->required;         // 必須入力
-                                       if (!empty($required) && empty($this->valueArray[$i])) $this->setUserErrorMsg('「' . $title . '」は必須入力項目です');
-                               }
-
-                               // エラーなしの場合はメール送信
-                               if ($this->getMsgCount() == 0){
-                                       $this->setGuidanceMsg('送信完了しました');
-                               
-                                       // メール送信設定のときはメールを送信
-                                       if ($sendMessage){
-                                               // メール本文の作成
-                                               $mailBody = '';
-                                               for ($i = 0; $i < $fieldCount; $i++){
-                                                       $infoObj = $this->fieldInfoArray[$i];
-                                                       $title = $infoObj->title;// タイトル名
-                                                       $type = $infoObj->type;         // 項目タイプ
-                                               
-                                                       $mailBody .= $title . "\n";
-                                                       if (!empty($this->valueArray[$i])){
-                                                               if (is_array($this->valueArray[$i])){           // 配列データのとき
-                                                                       for ($j = 0; $j < count($this->valueArray[$i]); $j++){
-                                                                               $mailBody .= $this->valueArray[$i][$j] . "\n";
-                                                                       }
-                                                               } else {
-                                                                       $mailBody .= $this->valueArray[$i] . "\n";
-                                                               }
-                                                       }
-                                                       $mailBody .= "\n";
-                                               }
-                                       
-                                               // 送信元、送信先
-                                               $fromAddress = $this->gEnv->getSiteEmail();     // 送信元はサイト情報のEメールアドレス
-                                               $toAddress = $this->gEnv->getSiteEmail();               // デフォルトのサイト向けEメールアドレス
-                                               if (!empty($emailReceiver)) $toAddress = $emailReceiver;                // 受信メールアドレスが設定されている場合
-
-                                               // メールを送信
-                                               if (empty($toAddress)){
-                                                       $this->gOpeLog->writeError(__METHOD__, 'メール送信に失敗しました。基本情報のEメールアドレスが設定されていません。', 1100, 'body=[' . $mailBody . ']');
-                                               } else {
-                                                       $mailParam = array();
-                                                       $mailParam['BODY'] = $mailBody;
-                                                       $email = '';            // 返信先は空にする(暫定)
-                                                       $ret = $this->gInstance->getMailManager()->sendFormMail(2/*手動送信*/, $this->gEnv->getCurrentWidgetId(), $toAddress, $fromAddress, $email, $emailSubject, self::CONTACTUS_FORM, $mailParam);
-                                               }
-                                       }
-                                       // 項目を入力不可に設定
-                                       $inputEnabled = false;                  // 入力の許可状態
-
-                                       //$this->tmpl->addVar("_widget", "message", '送信しました');// 送信ボタンラベル
-                               } else {
-                                       $this->tmpl->addVar("show_send_button", "send_button_label", '送信する');// 送信ボタンラベル
-                                       $this->tmpl->setAttribute('show_send_button', 'visibility', 'visible');
-                               }
-                       }
-               } else {
-                       // ハッシュキー作成
-                       $postTicket = md5(time() . $this->gAccess->getAccessLogSerialNo());
-                       $request->setSessionValue(M3_SESSION_POST_TICKET, $postTicket);         // セッションに保存
-                       $this->tmpl->addVar("_widget", "ticket", $postTicket);                          // 画面に書き出し
-                       
-                       // メール送信不可の場合はボタンを使用不可にする
-                       if ($sendMessage){
-                               $this->tmpl->addVar("show_send_button", "send_button_label", '送信する');// 送信ボタンラベル
-                       } else {
-                               $this->tmpl->addVar("show_send_button", "send_button_label", '送信停止中');// 送信ボタンラベル
-                               //$this->tmpl->addVar("_widget", "send_button_disabled", 'disabled');// 送信ボタン
-                       }
-                       $this->tmpl->setAttribute('show_send_button', 'visibility', 'visible');
-               }
-               
-               // HTMLサブタイトルを設定
-               //$this->gPage->setHeadSubTitle(self::DEFAULT_TITLE_NAME);
-               $this->gPage->setHeadSubTitle($this->gEnv->getCurrentWidgetHeadTitle());                        // 共通設定画面の「タイトル」値を使用する
-
-               // パラメータ埋め込み
-               $this->tmpl->addVar('_widget', 'url', $this->gEnv->createCurrentPageUrlForMobile());            // Post用URL
-               $this->tmpl->addVar('_widget', 'act', 'send');
-               
-               // タイトルの表示
-               if ($showTitle){
-                       $titleClassStr = 'align="center" style="text-align:center;';
-                       if (!empty($titleBgColor)) $titleClassStr .= 'background-color:' . $titleBgColor . ';';// タイトルバックグランドカラー
-                       $titleClassStr .= '"';
-                       $this->tmpl->addVar("show_title", "class", $titleClassStr);
-                       $this->tmpl->setAttribute('show_title', 'visibility', 'visible');
-                       $this->tmpl->addVar("show_title", "title_name", $this->convertToDispString($titleName));// タイトル名
-               }
-               // 説明の表示
-               if (!empty($explanation)){
-                       $this->tmpl->setAttribute('show_explanation', 'visibility', 'visible');
-                       $this->tmpl->addVar("show_explanation", "explanation", $explanation);// 説明
-               }
-               // お問い合わせフィールド作成
-               $fieldCount = $this->createFieldList($inputEnabled);
-               if ($fieldCount == 0) $this->tmpl->setAttribute('field_list', 'visibility', 'hidden');
-               
-               $this->tmpl->addVar("_widget", "field_count", $fieldCount);// お問い合わせ項目数
-       }
-       /**
-        * お問い合わせフィールド作成
-        *
-        * @param bool $enabled         項目の入力許可状態
-        * @return int  フィールド項目数
-        */
-       function createFieldList($enabled)
-       {
-               $fieldCount = count($this->fieldInfoArray);
-               for ($i = 0; $i < $fieldCount; $i++){
-                       $infoObj = $this->fieldInfoArray[$i];
-                       $title = $infoObj->title;// タイトル名
-                       $desc = $infoObj->desc;         // 説明
-                       $type = $infoObj->type;         // 項目タイプ
-                       $def = $infoObj->def;           // 項目定義
-                       $required = '';
-                       if (!empty($infoObj->required)) $required = '&nbsp;' . self::DEFAULT_STR_REQUIRED;// 必須表示
-                       
-                       // 入力フィールドの作成
-                       $fieldName = self::FIELD_HEAD . ($i + 1);
-                       $inputValue = $this->valueArray[$i];            // 入力値
-                       $inputTag = '';
-                       switch ($type){
-                               case 'text':            // テキストボックス
-                                       $param = array();
-                                       $paramStr = '';
-                                       $size = 0;
-                                       $defArray = explode(';', $def);
-                                       for ($j = 0; $j < count($defArray); $j++){
-                                               list($key, $value) = explode('=', $defArray[$j]);
-                                               $key = trim($key);
-                                               $value = trim($value);
-                                               if (strcasecmp($key, 'size') == 0){
-                                                       $size = intval($value);
-                                                       break;
-                                               }
-                                       }
-                                       if ($size > 0) $param[] = 'size="' . $size . '"';
-                                       if (!empty($inputValue)){
-                                               $param[] = 'value="' . $inputValue . '"';
-                                       }
-                                       if (!$enabled) $param[] = 'disabled';           // 使用不可
-                                       if (count($param) > 0) $paramStr = ' ' . implode($param, ' ');
-                                       $inputTag = '<input type="text" name="' . $fieldName . '"' . $paramStr . ' /><br />' . M3_NL;
-                                       break;
-                               case 'textarea':        // テキストエリア
-                                       $param = array();
-                                       $paramStr = '';
-                                       $row = 0;
-                                       $col = 0;
-                                       $defArray = explode(';', $def);
-                                       for ($j = 0; $j < count($defArray); $j++){
-                                               list($key, $value) = explode('=', $defArray[$j]);
-                                               $key = trim($key);
-                                               $value = trim($value);
-                                               if (strcasecmp($key, 'rows') == 0){
-                                                       $row = intval($value);
-                                               } else if (strcasecmp($key, 'cols') == 0){
-                                                       $col = intval($value);
-                                               }
-                                       }
-                                       if ($row > 0) $param[] = 'rows="' . $row . '"';
-                                       if ($col > 0) $param[] = 'cols="' . $col . '"';
-                                       if (!$enabled) $param[] = 'disabled';           // 使用不可
-                                       if (count($param) > 0) $paramStr = ' ' . implode($param, ' ');
-                                       $inputTag = '<textarea name="' . $fieldName . '"' . $paramStr . '>' . $this->convertToDispString($inputValue) . '</textarea><br />' . M3_NL;
-                                       break;
-                               case 'select':  // セレクトメニュー
-                                       $param = array();
-                                       $paramStr = '';
-                                       if (!$enabled) $param[] = 'disabled';           // 使用不可
-                                       if (count($param) > 0) $paramStr = ' ' . implode($param, ' ');
-                                       $inputTag = '<select name="' . $fieldName . '"'. $paramStr . '>' . M3_NL;
-                                       $inputTag .= '<option value="">&nbsp;</option>' . M3_NL;
-                                       $defArray = explode(';', $def);
-                                       for ($j = 0; $j < count($defArray); $j++){
-                                               $param = array();
-                                               $paramStr = '';
-                                               list($key, $value) = explode('=', $defArray[$j]);
-                                               $key = trim($key);
-                                               $value = trim($value);
-                                               if (empty($value)) $value = $key;
-                                               if (!empty($key)){
-                                                       if (!empty($inputValue) && strcmp($inputValue, $value) == 0) $param[] = 'selected';
-                                                       if (count($param) > 0) $paramStr = ' ' . implode($param, ' ');
-                                                       $inputTag .= '<option value="' . $this->convertToDispString($value) . '"' . $paramStr . '>' . $this->convertToDispString($key) . '</option>' . M3_NL;
-                                               }
-                                       }
-                                       $inputTag .= '</select><br />' . M3_NL;
-                                       break;
-                               case 'checkbox':        // チェックボックス
-                               case 'radio':   // ラジオボタン
-                                       $fieldName .= '[]';
-                                       $defArray = explode(';', $def);
-                                       for ($j = 0; $j < count($defArray); $j++){
-                                               $param = array();
-                                               $paramStr = '';
-                                               list($key, $value) = explode('=', $defArray[$j]);
-                                               $key = trim($key);
-                                               $value = trim($value);
-                                               if (empty($value)) $value = $key;
-                                               if (!empty($key) && !empty($value)){
-                                                       for ($k = 0; $k < count($inputValue); $k++){
-                                                               if (!empty($inputValue[$k]) && strcmp($inputValue[$k], $value) == 0) $param[] = 'checked';
-                                                       }
-                                                       if (!$enabled) $param[] = 'disabled';           // 使用不可
-                                                       if (count($param) > 0) $paramStr = ' ' . implode($param, ' ');
-                                                       $inputTag .= '<input type="' . $type . '" name="' . $fieldName . '" value="' . $this->convertToDispString($value) . '"' . $paramStr . ' />' . $this->convertToDispString($key) . '<br />' . M3_NL;
-                                               }
-                                       }
-                                       break;
-                       }
-
-                       // 改行の設定
-                       $titleBr = '';
-                       if (!empty($title) || !empty($required)) $titleBr = '<br />';
-                       $descBr = '';
-                       if (!empty($desc)) $descBr = '<br />';
-                       $inputBr = '';
-                       if (!empty($inputTag)) $inputBr = '<br />';
-                       
-                       $row = array(
-                               'title' => $this->convertToDispString($title),                  // タイトル名
-                               'desc' => $this->convertToDispString($desc),                            // 説明
-                               'title_br' => $titleBr,                 // タイトル名改行
-                               'desc_br' => $descBr,                   // 説明改行
-                               'input_br' => $inputBr,                 // 入力フィールド改行
-                               'required' => $required,                        // 必須表示
-                               'input' => $inputTag                    // 入力フィールド
-                       );
-                       $this->tmpl->addVars('field_list', $row);
-                       $this->tmpl->parseTemplate('field_list', 'a');
-               }
-               return $fieldCount;
-       }
-}
-?>
diff --git a/widgets/m/contactus_custom/include/db/contactus_customDb.php b/widgets/m/contactus_custom/include/db/contactus_customDb.php
deleted file mode 100644 (file)
index 9f71a48..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-/**
- * DBクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2009 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: contactus_customDb.php 2116 2009-07-14 09:50:17Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getDbPath() . '/baseDb.php');
-
-class contactus_customDb extends BaseDb
-{
-
-}
-?>
diff --git a/widgets/m/contactus_custom/include/help/index.php b/widgets/m/contactus_custom/include/help/index.php
deleted file mode 100644 (file)
index c133fc5..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-/**
- * ヘルプリソースファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2009 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 2116 2009-07-14 09:50:17Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-global $HELP;
-
-// ########## 設定項目一覧 ##########
-$HELP['contactus_list']['title'] = '設定一覧';
-$HELP['contactus_list']['body'] = '登録されている設定の一覧です。';
-$HELP['contactus_detail']['title'] = '設定';
-$HELP['contactus_detail']['body'] = 'お問い合わせについての設定を行います。';
-$HELP['contactus_preview']['title'] = 'プレビュー';
-$HELP['contactus_preview']['body'] = 'プレビューを表示します。項目の行をマウスクリックして選択します。';
-$HELP['contactus_check']['title'] = '選択用チェックボックス';
-$HELP['contactus_check']['body'] = '削除を行う項目を選択します。';
-$HELP['contactus_name']['title'] = '名前';
-$HELP['contactus_name']['body'] = '設定名です。';
-$HELP['contactus_name_input']['title'] = '名前';
-$HELP['contactus_name_input']['body'] = '設定名です。新規に登録するか、登録済みの設定を選択します。';
-$HELP['contactus_id']['title'] = '設定ID';
-$HELP['contactus_id']['body'] = '自動的に振られる設定IDです。';
-$HELP['contactus_title']['title'] = 'トップタイトル';
-$HELP['contactus_title']['body'] = '先頭の位置に表示するタイトルを設定します。';
-$HELP['contactus_explanation']['title'] = '説明';
-$HELP['contactus_explanation']['body'] = 'トップタイトルの下に位置する説明を設定します。';
-$HELP['contactus_field']['title'] = 'お問い合わせ項目';
-$HELP['contactus_field']['body'] = 'お問い合わせ項目を定義します。「定義」の記述方法は以下の通りです。(m,nは数値、str,valは文字列を示します。)<br />●テキストボックス<br />「size=m」でフィールドサイズを設定します。<br />●テキストエリア<br />「rows=m;cols=n」で行、列数を設定します。<br />●セレクトメニュー,チェックボックス,ラジオボタン<br />「str1;str2;str3;...」<br />表示値、送信値が異なる場合は「str1=val1;str2=val2;str3=val3;...」';
-$HELP['contactus_email']['title'] = 'メール送信';
-$HELP['contactus_email']['body'] = 'お問い合わせメールの件名と送信先メールアドレスを設定します。メールアドレスが空の場合は基本情報のメールアドレスへ送信されます。';
-$HELP['contactus_ref']['title'] = '使用';
-$HELP['contactus_ref']['body'] = '設定を使用しているウィジェット数を示します。使用が0の設定のみ削除可能です。';
-$HELP['contactus_list_btn']['title'] = '一覧ボタン';
-$HELP['contactus_list_btn']['body'] = '設定一覧を表示します。';
-$HELP['contactus_del_btn']['title'] = '削除ボタン';
-$HELP['contactus_del_btn']['body'] = '選択されている設定を削除します。<br />項目を選択するには、一覧の左端のチェックボックスにチェックを入れます。';
-$HELP['contactus_ret_btn']['title'] = '戻るボタン';
-$HELP['contactus_ret_btn']['body'] = '設定詳細へ戻ります。';
-?>
diff --git a/widgets/m/contactus_custom/include/template/admin.tmpl.html b/widgets/m/contactus_custom/include/template/admin.tmpl.html
deleted file mode 100644 (file)
index 5469da2..0000000
+++ /dev/null
@@ -1,205 +0,0 @@
-/**\r
- * 表示データ作成用テンプレート(patTemplate)\r
- *\r
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.\r
- *\r
- * @package    Magic3 Framework\r
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>\r
- * @copyright  Copyright 2006-2016 Magic3 Project.\r
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License\r
- * @version    SVN: $Id$\r
- * @link       http://www.magic3.org\r
- */\r
-<patTemplate:tmpl name="_widget">\r
-<link rel="stylesheet" href="{_ROOT_URL}/scripts/js_color_picker_v2/js_color_picker_v2.css" media="screen" />\r
-<script src="{_ROOT_URL}/scripts/js_color_picker_v2/color_functions.js"></script>\r
-<script type="text/javascript" src="{_ROOT_URL}/scripts/js_color_picker_v2/js_color_picker_v2.js"></script>\r
-<script type="text/javascript">\r
-<!--\r
-function addItem(){\r
-       if (!window.confirm('項目を新規追加しますか?')) return false;\r
-       document.main.fieldcount.value = $('#field_list').find('.m3drag_row').length;\r
-       var requiredArray = new Array();\r
-       $("#field_list input:checkbox").each(function(index){\r
-               if (this.checked){\r
-                       requiredArray.push('1');\r
-               } else {\r
-                       requiredArray.push('0');\r
-               }\r
-       });\r
-       document.main.required.value = requiredArray.join(',');\r
-       document.main.act.value = 'add';\r
-       document.main.submit();\r
-       return true;\r
-}\r
-function updateItem(){\r
-       if (!window.confirm('設定を更新しますか?')) return false;\r
-       document.main.fieldcount.value = $('#field_list').find('.m3drag_row').length;\r
-       var requiredArray = new Array();\r
-       $("#field_list input:checkbox").each(function(index){\r
-               if (this.checked){\r
-                       requiredArray.push('1');\r
-               } else {\r
-                       requiredArray.push('0');\r
-               }\r
-       });\r
-       document.main.required.value = requiredArray.join(',');\r
-       document.main.act.value='update';\r
-       document.main.submit();\r
-       return true;\r
-}\r
-function selectItem()\r
-{\r
-       document.main.act.value = 'select';\r
-       document.main.submit();\r
-       return true;\r
-}\r
-function listItem(){\r
-       document.main.task.value = 'list';\r
-       document.main.submit();\r
-       return true;\r
-}\r
-// お問い合わせ項目を追加\r
-function addLine()\r
-{\r
-       var lineText = '<tr class="m3drag_row"><td class="m3drag_handle"></td><td align="center"><span class="m3drag_rowno"></span></td>';\r
-       lineText += '<td><input type="text" name="item_title[]" size="20" maxlength="60" style="width:100%;" /><br />';\r
-       lineText += '<select name="item_type[]"><patTemplate:tmpl name="type_list1"><option value="{VALUE}" {SELECTED}>{NAME}</option></patTemplate:tmpl></select>';\r
-       lineText += '&nbsp;&nbsp;<input type="checkbox" name="item_required[]" />必須</td>';\r
-       lineText += '<td><input type="text" name="item_desc[]" size="30" maxlength="100" style="width:100%;" /><br /><input type="text" name="item_def[]" size="20" maxlength="60" style="width:100%;" /></td>';\r
-       lineText += '<td align="center"><a class="m3drag_delrow" href="#"><img src="{_ROOT_URL}/images/system/delete.png" width="16" height="16" border="0" alt="削除" title="削除" /></a></td></tr>';\r
-       $('#field_list').append(lineText);\r
-       \r
-       // お問い合わせ項目部作成\r
-       m3SetDragDropTable('field_list');\r
-}\r
-/*\r
-function setupList()\r
-{\r
-       $("#field_list").tableDnD({\r
-               onDrop: function(table, row){\r
-                       setupNo();\r
-               },\r
-               dragHandle: ".m3drag_handle"\r
-       });\r
-       $("#field_list tr").hover(function(){\r
-               $(this.cells[0]).addClass('m3drag_current');\r
-       }, function() {\r
-               $(this.cells[0]).removeClass('m3drag_current');\r
-       });\r
-       // 画像項目削除処理\r
-       $("#field_list tr .m3drag_delrow").click(function(){\r
-               $(this).parents('.m3drag_row').remove();\r
-               setupNo();\r
-       });\r
-       // インデックスNo再設定\r
-       setupNo();\r
-}\r
-function setupNo()\r
-{\r
-       // インデックスNo再設定\r
-       $("#field_list tr .m3drag_rowno").each(function(index){\r
-               $(this).text(index + 1);\r
-       });\r
-}\r
-*/\r
-$(function(){\r
-       m3_setHtmlEditor('explanation', true);\r
-       \r
-       // お問い合わせ項目部作成\r
-       m3SetDragDropTable('field_list');\r
-});\r
-// -->\r
-</script>\r
-<div align="center">\r
-<br />\r
-<!-- m3:ErrorMessage -->\r
-<form method="post" name="main">\r
-<input type="hidden" name="task" />\r
-<input type="hidden" name="act" />\r
-<input type="hidden" name="serial" value="{SERIAL}" />\r
-<input type="hidden" name="fieldcount" />\r
-<input type="hidden" name="required" />\r
-<!-- m3:PostParam -->\r
-<table width="90%">\r
-<tr><td><span {_HELP_CONTACTUS_DETAIL}><label>設定詳細</label></span></td>\r
-<td align="right"><span {_HELP_CONTACTUS_LIST_BTN}><input type="button" class="button" onclick="listItem();" value="一覧" /></span>\r
-</td></tr>\r
-<tr><td colspan="2">\r
-\r
-<table class="simple-table" width="100%">\r
-    <tbody>\r
-        <tr>\r
-           <td class="table-headside" width="100"><span {_HELP_CONTACTUS_NAME_INPUT}>名前</span></td>\r
-           <td width="500">\r
-           <select name="item_id" onchange="selectItem();" {ID_DISABLED}>\r
-               <option value="0">-- 新規 --</option>\r
-               <patTemplate:tmpl name="title_list">\r
-               <option value="{VALUE}" {SELECTED}>{NAME}</option>\r
-               </patTemplate:tmpl>\r
-           </select>\r
-           <patTemplate:tmpl name="item_name_visible" visibility="hidden">\r
-           <input type="text" name="item_name" value="{NAME}" size="40" maxlength="40" />\r
-           </patTemplate:tmpl>\r
-           </td>\r
-           <td class="table-headside" width="100"><span {_HELP_CONTACTUS_ID}>ID</span></td>\r
-           <td align="center">{ID}</td>\r
-       </tr>\r
-        <tr class="even">\r
-           <td class="table-headside"><span {_HELP_CONTACTUS_TITLE}>トップタイトル</span></td>\r
-           <td colspan="3"><input type="checkbox" name="show_title" {SHOW_TITLE} />表示&nbsp;&nbsp;&nbsp;&nbsp;タイトル名:<input type="text" name="title_name" value="{TITLE_NAME}" size="25" maxlength="40" />&nbsp;&nbsp;&nbsp;&nbsp;タイトル背景色:<input type="text" id="item_title_bgcolor" name="item_title_bgcolor" value="{TITLE_BGCOLOR}" size="10" maxlength="10" /><input type="button" value="カラー" onclick="showColorPicker(this,document.forms[0].item_title_bgcolor);" />&nbsp;&nbsp;</td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside"><span {_HELP_CONTACTUS_EXPLANATION}>説明</span></td>\r
-           <td colspan="3"><textarea name="explanation">{EXPLANATION}</textarea></td>\r
-       </tr>\r
-        <tr class="even">\r
-           <td class="table-headside"><span {_HELP_CONTACTUS_FIELD}>お問い合わせ<br />項目</span></td>\r
-           <td colspan="3">\r
-           <table id="field_list" class="simple-table-inner" width="100%">\r
-           <thead>\r
-           <tr><th rowspan="2" width="35">移動</th><th rowspan="2" width="30">No</th><th width="200">タイトル名</th><th>説明</th><th rowspan="2" width="40">操作</th></tr>\r
-           <tr><th>タイプ</th><th>定義</th></tr>\r
-           </thead><tbody>\r
-           <patTemplate:tmpl name="field_list">\r
-            <tr class="m3drag_row">\r
-           <td class="m3drag_handle"></td>\r
-           <td align="center"><span class="m3drag_rowno"></span></td>\r
-           <td><input type="text" name="item_title[]" value="{TITLE}" size="20" maxlength="60" style="width:100%" /><br />\r
-           <select name="item_type[]">\r
-              <patTemplate:tmpl name="type_list2">\r
-               <option value="{VALUE}" {SELECTED}>{NAME}</option>\r
-              </patTemplate:tmpl>\r
-            </select>&nbsp;&nbsp;<input type="checkbox" name="item_required[]" {REQUIRED} />必須\r
-           </td>\r
-           <td><input type="text" name="item_desc[]" value="{DESC}" size="30" maxlength="100" style="width:100%" /><br />\r
-           <input type="text" name="item_def[]" value="{DEF}" size="20" maxlength="60" style="width:100%" /></td>\r
-           <td align="center"><a class="m3drag_delrow" href="#"><img src="{ROOT_URL}/images/system/delete.png" width="16" height="16" border="0" alt="削除" title="削除" /></a></td>\r
-           </tr>\r
-           </patTemplate:tmpl>\r
-           </tbody></table>\r
-           <div><input type="button" class="button" onclick="addLine();" value="追加" /></div>\r
-           </td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside"><span {_HELP_CONTACTUS_EMAIL}>メール送信</span></td>\r
-           <td colspan="3">件名:<input type="text" name="email_subject" value="{EMAIL_SUBJECT}" size="40" maxlength="60" />&nbsp;&nbsp;&nbsp;&nbsp;\r
-           メールアドレス:<input type="text" name="email_receiver" value="{EMAIL_RECEIVER}" size="25" maxlength="40" /></td>\r
-       </tr>\r
-       <tr class="even">\r
-           <td align="right" colspan="4">\r
-<patTemplate:tmpl name="update_button" visibility="hidden">\r
-               <input type="button" class="button" onclick="updateItem();" value="更新" />\r
-</patTemplate:tmpl>\r
-<patTemplate:tmpl name="add_button" visibility="hidden">\r
-               <input type="button" class="button" onclick="addItem();" value="新規追加" />\r
-</patTemplate:tmpl>\r
-           </td>\r
-       </tr>\r
-    </tbody>\r
-</table>\r
-</td></tr>\r
-</table>\r
-</form>\r
-</div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/contactus_custom/include/template/admin_list.tmpl.html b/widgets/m/contactus_custom/include/template/admin_list.tmpl.html
deleted file mode 100644 (file)
index 0e19744..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<script type="text/javascript">\r
-<!--\r
-function delItem(){\r
-    if (document.main.seriallist.value){\r
-        var items = document.main.seriallist.value.split(",");\r
-       for (var i = 0; i < items.length; i++){\r
-           var name = "document.main.item" + i + "_selected";\r
-           var itemObj = eval(name);\r
-           // チェックありのときは終了\r
-           if (itemObj && itemObj.checked) break;\r
-       }\r
-       if (i == items.length){                 \r
-           window.alert('削除する項目を選択してください');\r
-       } else {\r
-            if (!window.confirm('選択項目を削除しますか?')) return false;\r
-            document.main.act.value = 'delete';\r
-            document.main.submit();\r
-       }\r
-    }\r
-    return true;\r
-}\r
-function cancelItem(){\r
-    document.main.task.value = '';\r
-    document.main.submit();\r
-    return true;\r
-}\r
-function showPreview(url, width, height){\r
-       // プレビュー画像の設定\r
-       var innerText;\r
-       var preOuter = $('#preview_contactus');\r
-       innerText = '<img src="' + url + '"';\r
-       if (width != '') innerText += ' width="' + width + '"';\r
-       if (height != '') innerText += ' height="' + height + '"';\r
-       innerText += ' />';\r
-       preOuter.html(innerText);\r
-}\r
-$(function(){\r
-       // スクロールバー付きのテーブルを作成\r
-       m3_tableWithScrollbar('itemlist', -1, 0);\r
-});\r
-// -->\r
-</script>\r
-<div align="center">\r
-<br />\r
-<!-- m3:ErrorMessage -->\r
-<form method="post" name="main">\r
-<input type="hidden" name="task" value="list" />\r
-<input type="hidden" name="act" />\r
-<input type="hidden" name="serial" />\r
-<input type="hidden" name="seriallist" value="{SERIAL_LIST}" />\r
-<!-- m3:PostParam -->\r
-<table width="90%">\r
-<tr><td>\r
-<span {_HELP_CONTACTUS_LIST}><label>設定一覧</label></span>\r
-</td><td align="right"><span {_HELP_CONTACTUS_DEL_BTN}><input type="button" class="button" onclick="delItem();" value="削除" /></span>\r
-<span {_HELP_CONTACTUS_RET_BTN}><input type="button" class="button" onclick="cancelItem();" value="戻る" /></span>\r
-</td></tr>\r
-<tr><td colspan="2">\r
-<table id="itemlist" class="simple-table" width="100%">\r
-    <thead>\r
-        <tr>\r
-           <th width="35" align="center"><span {_HELP_CONTACTUS_CHECK}>選択</span></th>\r
-           <th width="35" align="center"><span {_HELP_CONTACTUS_ID}>ID</span></th>\r
-           <th width="40%" align="center"><span {_HELP_CONTACTUS_NAME}>名前</span></th>\r
-           <th width="20%"><span {_HELP_CONTACTUS_EMAIL_RECEIVER}>メールアドレス</span></th>\r
-           <th align="center"><span {_HELP_CONTACTUS_REF}>使用</span></th>\r
-       </tr>\r
-    </thead>\r
-    <tbody>\r
-        <patTemplate:tmpl name="itemlist">\r
-        <tr>\r
-            <td align="center"><input type="checkbox" name="item{INDEX}_selected" {OPE_DISABLED} /></td>\r
-           <td align="center">{ID}</td>\r
-           <td>{NAME}</td>\r
-           <td>{EMAIL_RECEIVER}</td>\r
-           <td align="center">{DEF_COUNT}</td>\r
-       </tr>\r
-       </patTemplate:tmpl>\r
-    </tbody>\r
-</table>\r
-\r
-<tr><td colspan="2">\r
-<!--<label><span {_HELP_CONTACTUS_PREVIEW}>画像プレビュー</span></label>-->\r
-</td></tr>\r
-<tr><td colspan="2">\r
-<div id="preview_contactus"></div>\r
-</td></tr>\r
-</table>\r
-\r
-</form>\r
-</div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/contactus_custom/include/template/index.tmpl.html b/widgets/m/contactus_custom/include/template/index.tmpl.html
deleted file mode 100644 (file)
index 7be99e2..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<patTemplate:tmpl name="_widget">
-<form action="{URL}" method="post" name="contactus_main" class="form">
-<input type="hidden" name="act" value="{ACT}" />
-<input type="hidden" name="ticket" value="{TICKET}" />
-<input type="hidden" name="fieldcount" value="{FIELD_COUNT}" />
-<patTemplate:tmpl name="show_title" visibility="hidden"><div {CLASS}>{TITLE_NAME}</div></patTemplate:tmpl>
-<!-- m3:ErrorMessage -->
-<patTemplate:tmpl name="show_explanation" visibility="hidden"><div>{EXPLANATION}</div></patTemplate:tmpl>
-<patTemplate:tmpl name="field_list">
-<div>{TITLE}{REQUIRED}{TITLE_BR}{DESC}{DESC_BR}{INPUT}{INPUT_BR}</div>
-</patTemplate:tmpl>
-<div align="center" style="text-align:center;">{MESSAGE}</div>
-<patTemplate:tmpl name="show_send_button" visibility="hidden"><div align="center" style="text-align:center;"><input type="submit" value="{SEND_BUTTON_LABEL}" /></div></patTemplate:tmpl>
-</form>
-</patTemplate:tmpl>
diff --git a/widgets/m/contactus_custom/index.php b/widgets/m/contactus_custom/index.php
deleted file mode 100644 (file)
index b95e2eb..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 2116 2009-07-14 09:50:17Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/content/admin/index.php b/widgets/m/content/admin/index.php
deleted file mode 100644 (file)
index 029bd59..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 474 2008-04-04 11:34:11Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/content/images/icon32.png b/widgets/m/content/images/icon32.png
deleted file mode 100644 (file)
index 4d028c3..0000000
Binary files a/widgets/m/content/images/icon32.png and /dev/null differ
diff --git a/widgets/m/content/images/icon64.png b/widgets/m/content/images/icon64.png
deleted file mode 100644 (file)
index 4e158f9..0000000
Binary files a/widgets/m/content/images/icon64.png and /dev/null differ
diff --git a/widgets/m/content/include/container/admin_m_contentWidgetContainer.php b/widgets/m/content/include/container/admin_m_contentWidgetContainer.php
deleted file mode 100644 (file)
index 767f460..0000000
+++ /dev/null
@@ -1,403 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2011 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: admin_m_contentWidgetContainer.php 4249 2011-08-12 03:43:57Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseAdminWidgetContainer.php');
-require_once($gEnvManager->getCurrentWidgetDbPath() . '/contentDb.php');
-require_once($gEnvManager->getCommonPath() . '/valueCheck.php');
-
-class admin_m_contentWidgetContainer extends BaseAdminWidgetContainer
-{
-       private $db;    // DB接続オブジェクト
-       private $serialNo;              // 選択中の項目のシリアル番号
-       private $serialArray = array();         // 表示されているコンテンツシリアル番号
-       const MAIN_MENU_ID = 'mobile_menu';                     // メニューID
-       const INC_INDEX = 1;            // メニュー項目表示順の増加分
-       const ADMIN_WIDGET_ID = 'admin_main';           // 管理ウィジェットのウィジェットID
-       const CONTENT_TYPE = 'mobile';                  // コンテンツタイプ
-       const VIEW_CONTENT_TYPE = 'mc';                 // 参照数カウント用
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-               
-               // DBオブジェクト作成
-               $this->db = new contentDb();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               $task = $request->trimValueOf('task');
-               if ($task == 'detail'){         // 詳細画面
-                       return 'admin_main_detail.tmpl.html';
-               } else {                        // 一覧画面
-                       return 'admin_main.tmpl.html';
-               }
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $task = $request->trimValueOf('task');
-               if ($task == 'detail'){ // 詳細画面
-                       return $this->createDetail($request);
-               } else {                        // 一覧画面
-                       return $this->createList($request);
-               }
-       }
-       /**
-        * コンテンツ一覧画面作成
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param                                                               なし
-        */
-       function createList($request)
-       {
-               // ユーザ情報、表示言語
-               $userId = $this->gEnv->getCurrentUserId();
-               $langId = $this->gEnv->getDefaultLanguage();
-               
-               $act = $request->trimValueOf('act');
-               if ($act == 'addtomenu'){                       // メニューに項目を追加
-                       $contentId = $request->trimValueOf('contentid');                // コンテンツID
-                       
-                       // このウィジェットがマップされているページサブIDを取得
-                       $subPageId = $this->gPage->getPageSubIdByWidget($this->gEnv->getDefaultMobilePageId(), $this->gEnv->getCurrentWidgetId());
-                       $sub = '';
-                       if (!empty($subPageId)) $sub = 'sub=' . $subPageId . '&';
-                       
-                       // URLの作成
-                       $url = M3_TAG_START . M3_TAG_MACRO_ROOT_URL . M3_TAG_END . '/m/index.php?' . $sub . 'contentid=' . $contentId;
-
-                       // コンテンツ名を取得
-                       $menutItemName = '';
-                       $ret = $this->db->getContentByContentId(self::CONTENT_TYPE, $contentId, $langId, $row);
-                       if ($ret){
-                               // 取得値を設定
-                               $menutItemName = $row['cn_name'];               // 名前
-                       }
-                       
-                       // メニュー項目追加
-                       $ret = $this->db->addMenuItem(self::MAIN_MENU_ID, $langId, $menutItemName, $url, self::INC_INDEX, $userId);
-                       if ($ret){
-                               $this->setGuidanceMsg('メインメニューに項目を追加しました');
-                       } else {
-                               $this->setAppErrorMsg('メインメニューの項目追加に失敗しました');
-                       }
-               } else if ($act == 'delete'){           // 項目削除の場合
-                       $listedItem = explode(',', $request->trimValueOf('seriallist'));
-                       $delItems = array();
-                       for ($i = 0; $i < count($listedItem); $i++){
-                               // 項目がチェックされているかを取得
-                               $itemName = 'item' . $i . '_selected';
-                               $itemValue = ($request->trimValueOf($itemName) == 'on') ? 1 : 0;
-                               
-                               if ($itemValue){                // チェック項目
-                                       $delItems[] = $listedItem[$i];
-                               }
-                       }
-                       if (count($delItems) > 0){
-                               // 表示属性を削除
-                               for ($i = 0; $i < count($delItems); $i++){
-                                       // コンテンツIDを取得
-                                       $contentId = 0;
-                                       $ret = $this->db->getContentBySerial($delItems[$i], $row);
-                                       if ($ret) $contentId = $row['cn_id'];           // コンテンツID
-
-                                       // 表示属性を削除
-                                       if ($ret) $ret = $this->updateWidgetParamObjByConfigId($contentId, null);
-                               }
-                               
-                               $ret = $this->db->delContentItem($delItems, $userId);
-                               if ($ret){              // データ削除成功のとき
-                                       $this->setGuidanceMsg('データを削除しました');
-                               } else {
-                                       $this->setAppErrorMsg('データ削除に失敗しました');
-                               }
-                       }
-                       $this->gPage->updateParentWindow();// 親ウィンドウを更新
-               }
-               // コンテンツ項目リストをデフォルト言語で取得
-               $this->db->getAllContentItems(self::CONTENT_TYPE, array($this, 'itemListLoop'), $langId);
-               if (empty($this->serialArray)) $this->tmpl->setAttribute('itemlist', 'visibility', 'hidden');// コンテンツ項目がないときは、一覧を表示しない
-               $this->tmpl->addVar("_widget", "serial_list", implode($this->serialArray, ','));// 表示項目のシリアル番号を設定
-       }
-       /**
-        * コンテンツ詳細画面作成
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param                                                               なし
-        */
-       function createDetail($request)
-       {
-               // ユーザ情報、表示言語
-               $userId = $this->gEnv->getCurrentUserId();
-               $langId = $this->gEnv->getDefaultLanguage();
-               
-               // ウィンドウ表示状態
-               $openby = $request->trimValueOf(M3_REQUEST_PARAM_OPEN_BY);
-               
-               $act = $request->trimValueOf('act');
-               $this->serialNo = $request->trimValueOf('serial');              // 選択項目のシリアル番号
-               $name = $request->trimValueOf('item_name');
-               $showTitle = ($request->trimValueOf('show_title') == 'on') ? 1 : 0;             // タイトルの表示
-               $titleBgColor = $request->trimValueOf('item_title_bgcolor');            // タイトルバックグランドカラー
-               $html = $request->valueOf('item_html');         // HTMLタグを可能とする
-               $key = $request->valueOf('item_key');           // 外部参照用キー
-               $visible = ($request->trimValueOf('item_visible') == 'on') ? 1 : 0;             // チェックボックス
-               $default = ($request->trimValueOf('item_default') == 'on') ? 1 : 0;             // チェックボックス
-               
-               $reloadData = false;            // データの再読み込み
-               if ($act == 'add'){             // 項目追加の場合
-                       // 入力チェック
-                       $this->checkInput($name, '名前');
-                                       
-                       // エラーなしの場合は、データを登録
-                       if ($this->getMsgCount() == 0){
-                               $contentId = 0;// コンテンツID初期化
-                               $key = '';
-                               
-                               // 絵文字画像タグをMagic3内部タグに変換
-                               $this->gInstance->getTextConvManager()->convToEmojiTag($html, $html);
-                               
-                               $ret = $this->db->updateContentItem(self::CONTENT_TYPE, $contentId, $langId, $name, $html, 1/*コンテンツ表示*/, $default, $key, $userId, $newContentId, $newSerial);
-                               
-                               // 表示属性はコンテンツIDを定義IDにして、ウィジェットパラメータとして保存
-                               if ($ret){
-                                       $paramObj = new stdClass;
-                                       $paramObj->showTitle    = $showTitle;           // タイトルの表示
-                                       $paramObj->titleBgColor = $titleBgColor;                // タイトルバックグランドカラー
-                                       $ret = $this->updateWidgetParamObjByConfigId($newContentId, $paramObj);
-                               }
-                               if ($ret){
-                                       $this->setGuidanceMsg('データを追加しました');
-                                       // シリアル番号更新
-                                       $this->serialNo = $newSerial;
-                                       $reloadData = true;             // データの再読み込み
-                               } else {
-                                       $this->setAppErrorMsg('データ追加に失敗しました');
-                               }
-                               $this->gPage->updateParentWindow();// 親ウィンドウを更新
-                       }
-               } else if ($act == 'update'){           // 項目更新の場合
-                       // 入力チェック
-                       $this->checkInput($name, '名前');
-                       
-                       // エラーなしの場合は、データを更新
-                       if ($this->getMsgCount() == 0){
-                               // 絵文字画像タグをMagic3内部タグに変換
-                               $this->gInstance->getTextConvManager()->convToEmojiTag($html, $html);
-                               
-                               $contentId = $request->trimValueOf('contentid');                // コンテンツID
-                               $ret = $this->db->updateContentItem(self::CONTENT_TYPE, $contentId, $langId, $name, $html, 1/*コンテンツ表示*/, $default, $key, $userId, $newContentId, $newSerial);
-                               
-                               // 表示属性はコンテンツIDを定義IDにして、ウィジェットパラメータとして保存
-                               if ($ret){
-                                       $paramObj = $this->getWidgetParamObjByConfigId($contentId);
-                                       if (empty($paramObj)) $paramObj = new stdClass;
-                                       $paramObj->showTitle    = $showTitle;           // タイトルの表示
-                                       $paramObj->titleBgColor = $titleBgColor;                // タイトルバックグランドカラー
-                                       $ret = $this->updateWidgetParamObjByConfigId($contentId, $paramObj);
-                               }
-                               if ($ret){
-                                       $this->setGuidanceMsg('データを更新しました');
-                                       // シリアル番号更新
-                                       $this->serialNo = $newSerial;
-                                       $reloadData = true;             // データの再読み込み
-                               } else {
-                                       $this->setAppErrorMsg('データ更新に失敗しました');
-                               }
-                               $this->gPage->updateParentWindow();// 親ウィンドウを更新
-                       }                               
-               } else if ($act == 'delete'){           // 項目削除の場合
-                       if (empty($this->serialNo)){
-                               $this->setUserErrorMsg('削除項目が選択されていません');
-                       }
-                       // エラーなしの場合は、データを削除
-                       if ($this->getMsgCount() == 0){
-                               // コンテンツIDを取得
-                               $contentId = 0;
-                               $ret = $this->db->getContentBySerial($this->serialNo, $row);
-                               if ($ret) $contentId = $row['cn_id'];           // コンテンツID
-                               
-                               $ret = $this->db->delContentItem(array($this->serialNo), $userId);
-                               
-                               // 表示属性を削除
-                               if ($ret) $ret = $this->updateWidgetParamObjByConfigId($contentId, null);
-
-                               if ($ret){              // データ削除成功のとき
-                                       $this->setGuidanceMsg('データを削除しました');
-                                       $reloadData = true;             // データの再読み込み
-                               } else {
-                                       $this->setAppErrorMsg('データ削除に失敗しました');
-                               }
-                               $this->gPage->updateParentWindow();// 親ウィンドウを更新
-                       }
-               } else {
-                       // コンテンツIDが設定されているとき(他ウィジェットからの表示)は、データを取得
-                       $contentId = $request->trimValueOf('contentid');                // コンテンツID
-                       if (empty($contentId)){
-                               if (empty($this->serialNo)){            // 新規項目追加のとき
-                                       $visible = 1;           // 初期状態は表示
-                                       // デフォルトの設定項目がないときはデフォルトに設定
-                                       $contentCount = $this->db->getDefaultContentCount(self::CONTENT_TYPE, $langId);
-                                       if ($contentCount == 0) $default = 1;
-                               } else {
-                                       $reloadData = true;             // データの再読み込み
-                               }
-                       } else {
-                               // コンテンツを取得
-                               $ret = $this->db->getContentByContentId(self::CONTENT_TYPE, $contentId, $langId, $row);
-                               if ($ret){
-                                       $this->serialNo = $row['cn_serial'];            // コンテンツシリアル番号
-                                       $reloadData = true;             // データの再読み込み
-                               } else {
-                                       $this->serialNo = 0;
-                               }
-                       }
-               }
-               if ($reloadData){               // データの再読み込み
-                       $ret = $this->db->getContentBySerial($this->serialNo, $row);
-                       if ($ret){
-                               $contentId = $row['cn_id'];             // コンテンツID
-                               $name = $row['cn_name'];                // コンテンツ名前
-                               $key = $row['cn_key'];                                  // 外部参照用キー
-                               $update_user = $this->convertToDispString($row['lu_name']);// 更新者
-                               $update_dt = $this->convertToDispDateTime($row['cn_create_dt']);
-                       
-                               // 項目表示、デフォルト値チェックボックス
-                               $visible = $row['cn_visible'];
-                               $default = $row['cn_default'];
-                               
-                               // コンテンツの変換
-                               $html = str_replace(M3_TAG_START . M3_TAG_MACRO_ROOT_URL . M3_TAG_END, $this->getUrl($this->gEnv->getRootUrl()), $row['cn_html']);      // Magic3ルートURLの変換
-                               $this->gInstance->getTextConvManager()->convFromEmojiTag($html, $html);// Magic3内部タグから絵文字画像タグに変換
-                               
-                               // 表示属性を取得
-                               $paramObj = $this->getWidgetParamObjByConfigId($contentId);
-                               if (!empty($paramObj)){
-                                       $showTitle = $paramObj->showTitle;              // タイトルの表示
-                                       $titleBgColor = $paramObj->titleBgColor;                // タイトルバックグランドカラー
-                               }
-                       } else {
-                               $this->serialNo = 0;
-                       }
-               }
-               
-               // ### 入力値を再設定 ###
-               if (!empty($showTitle)) $this->tmpl->addVar("_widget", "show_title",    'checked');             // タイトルの表示
-               $this->tmpl->addVar("_widget", "title_bgcolor", $titleBgColor);         // タイトルバックグランドカラー
-               $this->tmpl->addVar("_widget", "sel_item_name", $name);         // 名前
-               $this->tmpl->addVar("_widget", "sel_item_html", $html);         // HTML
-               $this->tmpl->addVar("_widget", "sel_item_key", $key);           // 外部参照用キー
-               $this->tmpl->addVar("_widget", "update_user", $update_user);    // 更新者
-               $this->tmpl->addVar("_widget", "update_dt", $update_dt);        // 更新日時
-       
-               // 項目表示、項目利用可否チェックボックス
-               $visibleStr = '';
-               if ($visible){
-                       $visibleStr = 'checked';
-               }
-               $defaultStr = '';
-               if ($default){
-                       $defaultStr = 'checked';
-               }
-               $this->tmpl->addVar("_widget", "sel_item_visible", $visibleStr);
-               $this->tmpl->addVar("_widget", "sel_item_default", $defaultStr);
-       
-               // 選択中のシリアル番号を設定
-               $this->tmpl->addVar("_widget", "serial", $this->serialNo);
-                       
-               // パスの設定
-               $this->tmpl->addVar('_widget', 'admin_url', $this->getUrl($this->gEnv->getDefaultAdminUrl()));// 管理者URL
-               $this->tmpl->addVar('_widget', 'custom_value_task', 'usercustom');              // ユーザ定義値参照用
-               $this->tmpl->addVar('_widget', 'admin_widget_id', self::ADMIN_WIDGET_ID);// ユーザ定義値参照用(管理ウィジェットのウィジェットID)
-               
-               // ボタンの表示制御
-               if (empty($this->serialNo)){            // 新規追加項目を選択しているとき
-                       $this->tmpl->addVar("_widget", "sel_item_id", '新規');                        // コンテンツID
-                       $this->tmpl->setAttribute('add_button', 'visibility', 'visible');// 「新規追加」ボタン
-               } else {
-                       $this->tmpl->addVar("_widget", "sel_item_id", $contentId);                      // コンテンツID
-                       $this->tmpl->setAttribute('del_button', 'visibility', 'visible');// 「削除」ボタン
-               }
-               // 「戻る」ボタンの表示
-               if ($openby == 'simple') $this->tmpl->setAttribute('cancel_button', 'visibility', 'hidden');            // 詳細画面のみの表示のときは戻るボタンを隠す
-       }
-       /**
-        * 取得したデータをテンプレートに設定する
-        *
-        * @param int $index                    行番号(0~)
-        * @param array $fetchedRow             フェッチ取得した行
-        * @param object $param                 未使用
-        * @return bool                                 true=処理続行の場合、false=処理終了の場合
-        */
-       function itemListLoop($index, $fetchedRow, $param)
-       {
-               $serial = $this->convertToDispString($fetchedRow['cn_serial']);
-               
-               // 表示状態
-               $visible = '';
-               if ($fetchedRow['cn_visible']){
-                       $visible = 'checked';
-               }
-               // デフォルト時の項目かどうか
-               $default = '';
-               if ($fetchedRow['cn_default']){
-                       $default = 'checked';
-               }
-               // 総参照数
-               $totalViewCount = $this->gInstance->getAnalyzeManager()->getTotalContentViewCount(self::VIEW_CONTENT_TYPE, $serial);
-               
-               $row = array(
-                       'index' => $index,                                                                                                      // 項目番号
-                       'serial' => $serial,                    // シリアル番号
-                       'id' => $this->convertToDispString($fetchedRow['cn_id']),                       // ID
-                       'name' => $this->convertToDispString($fetchedRow['cn_name']),           // 名前
-                       'lang' => $lang,                                                                                                        // 対応言語
-                       'view_count' => $totalViewCount,                                                                        // 総参照数
-                       'update_user' => $this->convertToDispString($fetchedRow['lu_name']),    // 更新者
-                       'update_dt' => $this->convertToDispDateTime($fetchedRow['cn_create_dt']),       // 更新日時
-                       'visible' => $visible,                                                                                  // メニュー項目表示制御
-                       'default' => $default                                                                                   // デフォルト項目
-               );
-               $this->tmpl->addVars('itemlist', $row);
-               $this->tmpl->parseTemplate('itemlist', 'a');
-               
-               // 表示中のコンテンツIDを保存
-               $this->serialArray[] = $fetchedRow['cn_serial'];
-               return true;
-       }
-}
-?>
diff --git a/widgets/m/content/include/container/m_contentWidgetContainer.php b/widgets/m/content/include/container/m_contentWidgetContainer.php
deleted file mode 100644 (file)
index 299d4dd..0000000
+++ /dev/null
@@ -1,231 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2009 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_contentWidgetContainer.php 3749 2010-10-27 12:09:56Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseWidgetContainer.php');
-require_once($gEnvManager->getCurrentWidgetDbPath() . '/contentDb.php');
-require_once($gEnvManager->getCommonPath() . '/valueCheck.php');
-
-class m_contentWidgetContainer extends BaseWidgetContainer
-{
-       private $db;                    // DB接続オブジェクト
-       private $_contentCreated;       // コンテンツが取得できたかどうか
-       private $currentDay;            // 現在日
-       private $currentHour;           // 現在時間
-       private $headTitle;             // HTMLヘッダタイトル
-       const CONTENT_TYPE = 'mobile';                  // コンテンツタイプ
-       const VIEW_CONTENT_TYPE = 'mc';                 // 参照数カウント用
-       const DEFAULT_SEARCH_LIST_COUNT = 10;                   // 最大リスト表示数
-       const MESSAGE_NO_CONTENT                = 'コンテンツが見つかりません';
-       const CONTENT_SIZE = 100;                       // 検索結果コンテンツの文字列最大長
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-               
-               // DBオブジェクト作成
-               $this->db = new contentDb();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               $act = $request->trimValueOf('act');
-               if ($act == 'search'){
-                       return 'search.tmpl.html';
-               } else {
-                       return 'main.tmpl.html';
-               }
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               // 現在日時を取得
-               $this->currentDay = date("Y/m/d");              // 日
-               $this->currentHour = (int)date("H");            // 時間
-               $this->currentPageUrl = $this->gEnv->createCurrentPageUrl();// 現在のページURL
-
-               // ログインユーザでないときは、ユーザ制限のない項目だけ表示
-               $all = false;
-               if ($this->gEnv->isCurrentUserLogined()) $all = true;
-               
-               $act = $request->trimValueOf('act');
-               $keyword = $request->mobileTrimValueOf('keyword');
-               $contentid = $request->trimValueOf('contentid');
-               
-               if ($act == 'search'){                  // 検索
-                       $itemCount = self::DEFAULT_SEARCH_LIST_COUNT;           // 取得数
-                       
-                       // キーワード検索のとき
-                       if (empty($keyword)){
-                               $msg = '検索キーワードが入力されていません';
-                               $this->headTitle = 'コンテンツ検索';
-                       } else {
-                               $this->db->searchContentByKeyword(self::CONTENT_TYPE, $itemCount, 1, $keyword, $this->gEnv->getCurrentLanguage(), $all, array($this, 'searchItemsLoop'));
-                               $this->headTitle = 'コンテンツ検索[' . $keyword . ']';
-                               if (!$this->isExistsViewData) $msg = self::MESSAGE_NO_CONTENT;
-                       }
-                       $this->tmpl->addVar("_widget", "keyword", $keyword);
-                       if (!empty($msg)){
-                               $this->tmpl->setAttribute('message', 'visibility', 'visible');// メッセージ表示
-                               $this->tmpl->addVar("message", "msg", $msg);
-                       }
-               } else if (empty($contentid)){  // コンテンツIDがないときはデフォルトデータを取得
-                       $this->db->getContentItems(self::CONTENT_TYPE, array($this, 'itemsLoop'), null, $this->gEnv->getCurrentLanguage());
-                       if (!$this->_contentCreated){           // コンテンツが取得できなかったときはデフォルト言語で取得
-                               $this->db->getContentItems(self::CONTENT_TYPE, array($this, 'itemsLoop'), null, $this->gEnv->getDefaultLanguage());
-                       }
-               } else {
-                       // データエラーチェック
-                       $contentIdArray = explode(',', $contentid);
-                       if (ValueCheck::isNumeric($contentIdArray)){            // すべて数値であるかチェック
-                               $this->db->getContentItems(self::CONTENT_TYPE, array($this, 'itemsLoop'), $contentIdArray, $this->gEnv->getCurrentLanguage());
-                               if (!$this->_contentCreated){           // コンテンツが取得できなかったときはデフォルト言語で取得
-                                       $this->db->getContentItems(self::CONTENT_TYPE, array($this, 'itemsLoop'), $contentIdArray, $this->gEnv->getDefaultLanguage());
-                               }
-                       } else {
-                               $this->setAppErrorMsg('IDにエラー値があります');
-                       }
-               }
-               // HTMLサブタイトルを設定
-               if (!empty($this->headTitle)) $this->gPage->setHeadSubTitle($this->headTitle);
-       }
-       /**
-        * 取得したコンテンツ項目をテンプレートに設定する
-        *
-        * @param int           $index                  行番号
-        * @param array         $fetchedRow             取得行
-        * @param object        $param                  任意使用パラメータ
-        * @return bool                                         trueを返すとループ続行。falseを返すとその時点で終了。
-        */
-       function itemsLoop($index, $fetchedRow)
-       {
-               // ビューカウントを更新
-               if (!$this->gEnv->isSystemManageUser()){                // システム運用者以上の場合はカウントしない
-                       $this->gInstance->getAnalyzeManager()->updateContentViewCount(self::VIEW_CONTENT_TYPE, $fetchedRow['cn_serial'], $this->currentDay, $this->currentHour);
-               }
-
-               // タイトルを設定
-               $title = $fetchedRow['cn_name'];
-               if (empty($this->headTitle)) $this->headTitle = $title;
-               
-               // HTMLを出力
-               // 出力内容は特にエラーチェックしない
-               $contentText = $fetchedRow['cn_html'];
-               $contentText = str_replace(M3_TAG_START . M3_TAG_MACRO_ROOT_URL . M3_TAG_END, $this->gEnv->getRootUrl(), $contentText);// アプリケーションルートを変換
-               
-               // 登録したキーワードを変換
-               $this->gInstance->getTextConvManager()->convByKeyValue($contentText, $contentText, true/*改行コーをbrタグに変換*/);
-               
-               // 携帯用HTMLをきれいにする
-               $contentText = $this->gInstance->getTextConvManager()->cleanMobileTag($contentText);
-               
-               // 表示属性を取得
-               $showTitle = 0;
-               $titleBgColor = '';
-               $contentId = $fetchedRow['cn_id'];
-               $paramObj = $this->getWidgetParamObjByConfigId($contentId);
-               if (!empty($paramObj)){
-                       $showTitle = $paramObj->showTitle;              // タイトルの表示
-                       $titleBgColor = $paramObj->titleBgColor;                // タイトルバックグランドカラー
-               }
-               // タイトルの表示
-               $titleStr = '';
-               if ($showTitle){
-                       $titleStr = '<div align="center" style="text-align:center;';
-                       if (!empty($titleBgColor)) $titleStr .= 'background-color:' . $titleBgColor . ';';// タイトルバックグランドカラー
-                       $titleStr .= '">' . $this->convertToDispString($title) . '</div>';
-               }
-               $row = array(
-                       'title' => $titleStr,
-                       'content' => $contentText       // コンテンツ
-               );
-               $this->tmpl->addVars('contentlist', $row);
-               $this->tmpl->parseTemplate('contentlist', 'a');
-               
-               // コンテンツが取得できた
-               $this->_contentCreated = true;
-               return true;
-       }
-       /**
-        * 取得したコンテンツ項目をテンプレートに設定する
-        *
-        * @param int           $index                  行番号
-        * @param array         $fetchedRow             取得行
-        * @param object        $param                  任意使用パラメータ
-        * @return bool                                         trueを返すとループ続行。falseを返すとその時点で終了。
-        */
-       function searchItemsLoop($index, $fetchedRow)
-       {
-               // タイトルを設定
-               $title = $fetchedRow['cn_name'];
-
-               // 記事へのリンクを生成
-               $linkUrl = $this->currentPageUrl . '&contentid=' . $fetchedRow['cn_id'];
-               $link = '<a href="' . $this->convertUrlToHtmlEntity($linkUrl) . '" >' . $title . '</a>';
-
-               // テキストに変換
-               //$contentText = strip_tags($fetchedRow['cn_html']);
-               $contentText = $this->gInstance->getTextConvManager()->htmlToText($fetchedRow['cn_html']);
-               
-               // アプリケーションルートを変換
-               $contentText = str_replace(M3_TAG_START . M3_TAG_MACRO_ROOT_URL . M3_TAG_END, $this->gEnv->getRootUrl(), $contentText);
-               
-               // 登録したキーワードを変換
-               $this->gInstance->getTextConvManager()->convByKeyValue($contentText, $contentText);
-               
-               // Magic3タグ削除(絵文字タグ削除)
-               $contentText = $this->gInstance->getTextConvManager()->deleteM3Tag($contentText);
-               
-               // 検索結果用にテキストを詰める。改行、タブ、スペース削除。
-               $contentText = str_replace(array("\r", "\n", "\t", " "), '', $contentText);
-               
-               // 文字列長を修正
-               if (function_exists('mb_strimwidth')){
-                       $contentText = mb_strimwidth($contentText, 0, self::CONTENT_SIZE, '…');
-               } else {
-                       $contentText = substr($contentText, 0, self::CONTENT_SIZE) . '...';
-               }
-
-               $row = array(
-                       'title' => $link,                       // リンク付きタイトル
-                       'content' => $this->convertToDispString($contentText)   // コンテンツ
-               );
-               $this->tmpl->addVars('contentlist', $row);
-               $this->tmpl->parseTemplate('contentlist', 'a');
-               $this->isExistsViewData = true;                         // 表示データがあるかどうか
-               return true;
-       }
-}
-?>
diff --git a/widgets/m/content/include/db/contentDb.php b/widgets/m/content/include/db/contentDb.php
deleted file mode 100644 (file)
index 76a1f72..0000000
+++ /dev/null
@@ -1,327 +0,0 @@
-<?php
-/**
- * DBクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2008 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: contentDb.php 1340 2008-12-11 09:41:24Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getDbPath() . '/baseDb.php');
-
-class contentDb extends BaseDb
-{
-       /**
-        * コンテンツ項目を取得
-        *
-        * @param string        $contentType            コンテンツタイプ
-        * @param function      $callback                       コールバック関数
-        * @param array         $contentIdArray         コンテンツID
-        * @param string        $lang                           言語
-        * @return                      なし
-        */
-       function getContentItems($contentType, $callback, $contentIdArray, $lang)
-       {
-               // コンテンツIDの指定がない場合は、デフォルト値を取得
-               if ($contentIdArray == null){
-                       $queryStr = 'SELECT * FROM content ';
-                       $queryStr .=  'WHERE cn_visible = true ';
-                       $queryStr .=    'AND cn_default = true ';
-                       $queryStr .=    'AND cn_deleted = false ';              // 削除されていない
-                       $queryStr .=    'AND cn_type = ? ';
-                       $queryStr .=    'AND cn_language_id = ? ';
-                       $queryStr .=  'ORDER BY cn_serial';
-                       $this->selectLoop($queryStr, array($contentType, $lang), $callback, null);
-               } else {
-                       $contentId = implode(',', $contentIdArray);
-                       
-                       // CASE文作成
-                       $caseStr = 'CASE cn_id ';
-                       for ($i = 0; $i < count($contentIdArray); $i++){
-                               $caseStr .= 'WHEN ' . $contentIdArray[$i] . ' THEN ' . $i . ' ';
-                       }
-                       $caseStr .= 'END AS no';
-
-                       $queryStr = 'SELECT *, ' . $caseStr . ' FROM content ';
-                       $queryStr .=  'WHERE cn_visible = true ';
-                       $queryStr .=    'AND cn_deleted = false ';              // 削除されていない
-                       $queryStr .=    'AND cn_type = ? ';
-                       $queryStr .=    'AND cn_id in (' . $contentId . ') ';
-                       $queryStr .=    'AND cn_language_id = ? ';
-                       $queryStr .=  'ORDER BY no';
-                       $this->selectLoop($queryStr, array($contentType, $lang), $callback, null);
-               }
-       }
-       /**
-        * コンテンツ項目を検索
-        *
-        * @param string        $contentType            コンテンツタイプ
-        * @param int           $limit                          取得する項目数
-        * @param int           $page                           取得するページ(1~)
-        * @param string        $keyword                        検索キーワード
-        * @param string        $langId                         言語
-        * @param bool          $all                            すべてのデータを取得するか、ユーザ制限のないデータを取得するかを指定
-        * @param function      $callback                       コールバック関数
-        * @return                      なし
-        */
-       function searchContentByKeyword($contentType, $limit, $page, $keyword, $langId, $all, $callback)
-       {
-               $offset = $limit * ($page -1);
-               if ($offset < 0) $offset = 0;
-               
-               $params = array();
-               $queryStr = 'SELECT * FROM content ';
-               $queryStr .=  'WHERE cn_visible = true ';
-               $queryStr .=    'AND cn_deleted = false ';              // 削除されていない
-               $queryStr .=    'AND cn_type = ? ';$params[] = $contentType;
-               $queryStr .=    'AND cn_language_id = ? ';$params[] = $langId;
-               if (!$all) $queryStr .=    'AND cn_user_limited = false ';              // ユーザ制限のないデータ
-
-               // タイトルと記事を検索
-               if (!empty($keyword)){
-                       // 「'"\」文字をエスケープ
-                       $keyword = addslashes($keyword);
-                       $queryStr .=    'AND (cn_name LIKE \'%' . $keyword . '%\' ';
-                       $queryStr .=    'OR cn_html LIKE \'%' . $keyword . '%\' ';
-                       $queryStr .=    'OR cn_description LIKE \'%' . $keyword . '%\') ';
-               }
-               $queryStr .=  'ORDER BY cn_create_dt desc limit ' . $limit . ' offset ' . $offset;
-               $this->selectLoop($queryStr, $params, $callback, null);
-       }
-       /**
-        * コンテンツ項目一覧を取得(管理用)
-        
-        * @param string        $contentType            コンテンツタイプ
-        * @param function      $callback                       コールバック関数
-        * @param string        $lang                           言語
-        * @return                      なし
-        */
-       function getAllContentItems($contentType, $callback, $lang)
-       {
-               $queryStr = 'SELECT * FROM content LEFT JOIN _login_user ON cn_create_user_id = lu_id AND lu_deleted = false ';
-               $queryStr .=  'WHERE cn_type = ? ';
-               $queryStr .=    'AND cn_language_id = ? ';
-               $queryStr .=    'AND cn_deleted = false ';              // 削除されていない
-               $queryStr .=  'ORDER BY cn_id';
-               $this->selectLoop($queryStr, array($contentType, $lang), $callback, null);
-       }
-       /**
-        * コンテンツ項目をコンテンツIDで取得
-        *
-        * @param string        $contentType            コンテンツタイプ
-        * @param string        $contentId                      コンテンツID
-        * @param string        $langId                         言語ID
-        * @param array     $row                                レコード
-        * @return bool                                                 取得 = true, 取得なし= false
-        */
-       function getContentByContentId($contentType, $contentId, $langId, &$row)
-       {
-               $queryStr  = 'SELECT * FROM content ';
-               $queryStr .=   'WHERE cn_deleted = false ';     // 削除されていない
-               $queryStr .=    'AND cn_type = ? ';
-               $queryStr .=   'AND cn_id = ? ';
-               $queryStr .=   'AND cn_language_id = ? ';
-               $ret = $this->selectRecord($queryStr, array($contentType, $contentId, $langId), $row);
-               return $ret;
-       }
-       /**
-        * コンテンツ項目の更新
-        *
-        * @param string  $contentType  コンテンツタイプ
-        * @param string  $contentId    コンテンツID(0のとき新規)
-        * @param string  $lang                 言語ID
-        * @param string  $name                 コンテンツ名
-        * @param string  $html                 HTML
-        * @param bool    $visible              表示状態
-        * @param string  $key                  外部参照用キー
-        * @param int     $userId               更新者ユーザID
-        * @param int     $newContentId 新規コンテンツID
-        * @param int     $newSerial    新規シリアル番号
-        * @return bool                                 true = 成功、false = 失敗
-        */
-       function updateContentItem($contentType, $contentId, $lang, $name, $html, $visible, $default, $key, $userId, &$newContentId, &$newSerial)
-       {
-               $historyIndex = 0;              // 履歴番号
-               $now = date("Y/m/d H:i:s");     // 現在日時
-               
-               if (empty($contentId)){                 // 新規コンテンツ追加のとき
-                       // コンテンツIDを決定する
-                       $queryStr = 'select max(cn_id) as mid from content ';
-                       $queryStr .=  'WHERE cn_type = ? ';
-                       $ret = $this->selectRecord($queryStr, array($contentType), $row);
-                       if ($ret){
-                               $contId = $row['mid'] + 1;
-                       } else {
-                               $contId = 1;
-                       }
-                       $desc = '';
-               } else {
-                       // 前レコードの削除状態チェック
-                       $queryStr = 'SELECT * FROM content ';
-                       $queryStr .=  'WHERE cn_type = ? ';
-                       $queryStr .=    'AND cn_id = ? ';
-                       $queryStr .=    'AND cn_language_id = ? ';
-                       $queryStr .=  'ORDER BY cn_history_index DESC ';
-                       $ret = $this->selectRecord($queryStr, array($contentType, $contentId, $lang), $row);
-                       if ($ret){
-                               if ($row['cn_deleted']){                // レコードが削除されていれば終了
-                                       return false;
-                               }
-                       } else {
-                               return false;
-                       }
-                       $historyIndex = $row['cn_history_index'] + 1;
-                       $contId = $row['cn_id'];
-                       $desc = $row['cn_description'];
-                               
-                       // 古いレコードを削除
-                       $queryStr  = 'UPDATE content ';
-                       $queryStr .=   'SET cn_deleted = true, ';       // 削除
-                       $queryStr .=     'cn_update_user_id = ?, ';
-                       $queryStr .=     'cn_update_dt = ? ';
-                       $queryStr .=   'WHERE cn_serial = ?';
-                       $this->execStatement($queryStr, array($userId, $now, $row['cn_serial']));
-               }
-               
-               // 新規レコード追加
-               $queryStr = 'INSERT INTO content ';
-               $queryStr .=  '(cn_type, cn_id, cn_language_id, cn_history_index, cn_name, cn_description, cn_html, cn_visible, cn_default, cn_key, cn_create_user_id, cn_create_dt) ';
-               $queryStr .=  'VALUES ';
-               $queryStr .=  '(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
-               $this->execStatement($queryStr, array($contentType, $contId, $lang, $historyIndex, $name, $desc, $html, $visible, $default, $key, $userId, $now));
-
-               // 新規のシリアル番号取得
-               $queryStr = 'SELECT max(cn_serial) as ns FROM content ';
-               $queryStr .=  'WHERE cn_type = ? ';
-               $ret = $this->selectRecord($queryStr, array($contentType), $row);
-               if ($ret) $newSerial = $row['ns'];
-               
-               $newContentId = $contId;                // 新規コンテンツID
-               return $ret;
-       }
-       /**
-        * コンテンツ項目の削除
-        *
-        * @param array $serial                 シリアルNo
-        * @param int $userId                   ユーザID(データ更新者)
-        * @return                                              true=成功、false=失敗
-        */
-       function delContentItem($serial, $userId)
-       {
-               $now = date("Y/m/d H:i:s");     // 現在日時
-               
-               // 引数エラーチェック
-               if (!is_array($serial) || count($serial) <= 0) return true;
-
-               // トランザクション開始
-               $this->startTransaction();
-               
-               // 指定のシリアルNoのレコードが削除状態でないかチェック
-               for ($i = 0; $i < count($serial); $i++){
-                       $queryStr  = 'SELECT * FROM content ';
-                       $queryStr .=   'WHERE cn_deleted = false ';             // 未削除
-                       $queryStr .=     'AND cn_serial = ? ';
-                       $ret = $this->isRecordExists($queryStr, array($serial[$i]));
-                       // 存在しない場合は、既に削除されたとして終了
-                       if (!$ret){
-                               $this->endTransaction();
-                               return false;
-                       }
-               }
-               
-               // レコードを削除
-               $queryStr  = 'UPDATE content ';
-               $queryStr .=   'SET cn_deleted = true, ';       // 削除
-               $queryStr .=     'cn_update_user_id = ?, ';
-               $queryStr .=     'cn_update_dt = ? ';
-               $queryStr .=   'WHERE cn_serial in (' . implode($serial, ',') . ') ';
-               $this->execStatement($queryStr, array($userId, $now));
-
-               // トランザクション確定
-               $ret = $this->endTransaction();
-               return $ret;
-       }
-       /**
-        * コンテンツ項目をシリアル番号で取得
-        *
-        * @param string        $serial                         シリアル番号
-        * @param array     $row                                レコード
-        * @return bool                                                 取得 = true, 取得なし= false
-        */
-       function getContentBySerial($serial, &$row)
-       {
-               $queryStr  = 'select * from content LEFT JOIN _login_user ON cn_create_user_id = lu_id AND lu_deleted = false ';
-               $queryStr .=   'WHERE cn_serial = ? ';
-               $ret = $this->selectRecord($queryStr, array($serial), $row);
-               return $ret;
-       }
-       /**
-        * デフォルトのコンテンツ項目総数取得
-        *
-        * @param string        $contentType            コンテンツタイプ
-        * @param string        $lang                           言語
-        * @return int                                  総数
-        */
-       function getDefaultContentCount($contentType, $lang)
-       {
-               $queryStr = 'SELECT * FROM content ';
-               $queryStr .=  'WHERE cn_visible = true ';
-               $queryStr .=    'AND cn_default = true ';
-               $queryStr .=    'AND cn_deleted = false ';              // 削除されていない
-               $queryStr .=    'AND cn_type = ? ';
-               $queryStr .=    'AND cn_language_id = ? ';
-               return $this->selectRecordCount($queryStr, array($contentType, $lang));
-       }
-       /**
-        * メニュー項目の追加
-        *
-        * @param string  $menuId               メニューID
-        * @param string  $lang                 言語ID
-        * @param string  $name                 メニュー名
-        * @param string  $url                  URL
-        * @param int     $incIndex             表示順増加分
-        * @param int     $userId               更新者ユーザID
-        * @return bool                                 true = 成功、false = 失敗
-        */
-       function addMenuItem($menuId, $lang, $name, $url, $incIndex, $userId)
-       {
-               // トランザクション開始
-               $this->startTransaction();
-               
-               // メニュー項目IDを作成
-               $queryStr = 'select max(mi_id) as mid from menu_item ';
-               $ret = $this->selectRecord($queryStr, array(), $row);
-               if ($ret){
-                       $menuItemId = $row['mid'] + 1;
-               } else {
-                       $menuItemId = 1;
-               }
-               // インデックス番号を作成
-               $queryStr = 'SELECT max(mi_index) as m FROM menu_item ';
-               $queryStr .=  'WHERE mi_menu_id = ? ';
-               $queryStr .=    'AND mi_language_id = ? ';
-               $ret = $this->selectRecord($queryStr, array($menuId, $lang), $row);
-               if ($ret){
-                       $index = $row['m'] + $incIndex;
-               } else {
-                       $index = 1;
-               }
-               
-               $queryStr = 'INSERT INTO menu_item ';
-               $queryStr .=  '(mi_menu_id, mi_id, mi_language_id, mi_name, mi_index, mi_link_type, mi_link_url, mi_visible, mi_enable, mi_update_user_id, mi_update_dt) ';
-               $queryStr .=  'VALUES ';
-               $queryStr .=  '(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now())';
-               $this->execStatement($queryStr, array($menuId, $menuItemId, $lang, $name, $index, 0, $url, true, true, $userId));
-               
-               // トランザクション確定
-               $ret = $this->endTransaction();
-               return $ret;
-       }
-}
-?>
diff --git a/widgets/m/content/include/template/admin_main.tmpl.html b/widgets/m/content/include/template/admin_main.tmpl.html
deleted file mode 100644 (file)
index 60a1ed6..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<script type="text/javascript">\r
-<!--\r
-function newItem(){\r
-    document.main.task.value = 'detail';\r
-    document.main.act.value = 'new';\r
-    document.main.submit();\r
-    return true;\r
-}\r
-function editItem(){\r
-    if (document.main.seriallist.value){\r
-        var items = document.main.seriallist.value.split(",");\r
-       for (var i = 0; i < items.length; i++){\r
-           var name = "document.main.item" + i + "_selected";\r
-           var itemObj = eval(name);\r
-           // チェックありのときは終了\r
-           if (itemObj && itemObj.checked) break;\r
-       }\r
-       if (i == items.length){                 \r
-           window.alert('編集する項目を選択してください');\r
-       } else {\r
-            document.main.task.value = 'detail';\r
-            document.main.act.value = 'edit';\r
-           document.main.serial.value = items[i];\r
-            document.main.submit();\r
-       }\r
-    }\r
-    return true;\r
-}\r
-function editItemBySerial(serial){\r
-    document.main.task.value = 'detail';\r
-    document.main.act.value = 'edit';\r
-    document.main.serial.value = serial;\r
-    document.main.submit();\r
-}\r
-function delItem(){\r
-    if (document.main.seriallist.value){\r
-        var items = document.main.seriallist.value.split(",");\r
-       for (var i = 0; i < items.length; i++){\r
-           var name = "document.main.item" + i + "_selected";\r
-           var itemObj = eval(name);\r
-           // チェックありのときは終了\r
-           if (itemObj && itemObj.checked) break;\r
-       }\r
-       if (i == items.length){                 \r
-           window.alert('削除する項目を選択してください');\r
-       } else {\r
-            if (!window.confirm('選択項目を削除しますか?')) return false;\r
-            document.main.act.value = 'delete';\r
-            document.main.submit();\r
-       }\r
-    }\r
-    return true;\r
-}\r
-// メニューに追加\r
-function addToMenu(selId){\r
-    if (!window.confirm('この項目をメインメニューに追加しますか?')) return false;\r
-    document.main.act.value = 'addtomenu';\r
-    document.main.contentid.value = selId;\r
-    document.main.submit();\r
-    return true;\r
-}\r
-$(function(){\r
-    // スクロールバー付きのテーブルを作成\r
-    m3_tableWithScrollbar('contlist', 10, 0);  // データは10行表示\r
-});\r
-// -->\r
-</script>\r
-<div align="center">\r
-<br />\r
-<!-- m3:ErrorMessage -->\r
-<form method="post" name="main">\r
-<input type="hidden" name="task" value="list" />\r
-<input type="hidden" name="act" />\r
-<input type="hidden" name="serial" />\r
-<input type="hidden" name="seriallist" value="{SERIAL_LIST}" />\r
-<input type="hidden" name="contentid" />\r
-<table width="90%">\r
-<tr><td>\r
-<label>コンテンツ一覧</label>\r
-</td>\r
-<td align="right"><input type="button" class="button" onclick="newItem();" value="新規" /><input type="button" class="button" onclick="editItem();" value="編集" /><input type="button" class="button" onclick="delItem();" value="削除" />\r
-</td></tr>\r
-<tr><td colspan="2">\r
-<table id="contlist" class="simple-table" width="100%">\r
-    <thead>\r
-        <tr>\r
-            <th width="40">選択</th>\r
-            <th width="30">ID</th>\r
-            <th width="30%">名前</th>\r
-           <th width="50">公開</th>\r
-           <th width="70">デフォルト</th>\r
-           <th width="100">更新者</th>\r
-           <th width="120">更新日時</th>\r
-           <th width="50">参照数</th>\r
-           <th></th>\r
-       </tr>\r
-    </thead>\r
-    <tbody>\r
-        <patTemplate:tmpl name="itemlist">\r
-        <tr {LINE_COLOR}>\r
-           <td align="center"><input type="checkbox" name="item{INDEX}_selected" /></td>\r
-           <td align="center">{ID}</td>\r
-           <td><a href="#" onclick="editItemBySerial({SERIAL});">{NAME}</a></td>\r
-           <td align="center"><input type="checkbox" disabled {VISIBLE} /></td>\r
-           <td align="center"><input type="checkbox" disabled {DEFAULT} /></td>\r
-           <td align="center">{UPDATE_USER}</td>\r
-           <td align="center">{UPDATE_DT}</td>\r
-           <td align="center">{VIEW_COUNT}</td>\r
-           <td align="right"><input type="button" class="button" onclick="addToMenu('{ID}');" value="メインメニューに追加" /></td>\r
-       </tr>\r
-       </patTemplate:tmpl>\r
-    </tbody>\r
-</table>\r
-</td></tr>\r
-</table>\r
-</form>\r
-</div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/content/include/template/admin_main_detail.tmpl.html b/widgets/m/content/include/template/admin_main_detail.tmpl.html
deleted file mode 100644 (file)
index 639a98f..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<link rel="stylesheet" href="{_ROOT_URL}/scripts/js_color_picker_v2/js_color_picker_v2.css" media="screen" />\r
-<script src="{_ROOT_URL}/scripts/js_color_picker_v2/color_functions.js"></script>\r
-<script type="text/javascript" src="{_ROOT_URL}/scripts/js_color_picker_v2/js_color_picker_v2.js"></script>\r
-<script type="text/javascript">\r
-<!--\r
-function addItem(){\r
-    if (!window.confirm('項目を新規追加しますか?')) return false;\r
-    document.main.act.value = 'add';\r
-    document.main.submit();\r
-    return true;\r
-}\r
-function updateItem(serialNo){\r
-    if (!window.confirm('項目を更新しますか?')) return false;\r
-    document.main.act.value = 'update';\r
-    document.main.submit();\r
-    return true;\r
-}\r
-function delItem(serialNo){\r
-    if (!window.confirm('項目を削除しますか?')) return false;\r
-    document.main.act.value = 'delete';\r
-    document.main.submit();\r
-    return true;\r
-}\r
-function cancelItem(){\r
-    document.main.task.value = 'list';\r
-    document.main.submit();\r
-    return true;\r
-}\r
-function viewCustomValue(){\r
-    window.open("{ADMIN_URL}?cmd=showwidget&widget={ADMIN_WIDGET_ID}&task={CUSTOM_VALUE_TASK}&openby=other","","toolbar=no,menubar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=1000,height=900");\r
-    return false;\r
-}\r
-$(document).ready(function(){\r
-       m3_setHtmlEditor('item_html', true);\r
-});\r
-// -->\r
-</script>\r
-<div align="center">\r
-<br />\r
-<!-- m3:ErrorMessage -->\r
-<form method="post" name="main">\r
-<input type="hidden" name="task" value="detail" />\r
-<input type="hidden" name="act" />\r
-<input type="hidden" name="serial" value="{SERIAL}" />\r
-<input type="hidden" name="contentid" value="{SEL_ITEM_ID}" />\r
-<table width="90%">\r
-<tr><td><label>コンテンツ詳細</label></td><td align="right">\r
-<patTemplate:tmpl name="cancel_button" visibility="visible">\r
-<input type="button" class="button" onclick="cancelItem();" value="戻る" />\r
-</patTemplate:tmpl>\r
-</td></tr>\r
-<tr><td colspan="2">\r
-<table class="simple-table">\r
-    <tbody>\r
-        <tr>\r
-           <td class="table-headside" width="100">ID</td>\r
-           <td width="100" align="center">{SEL_ITEM_ID}</td>\r
-           <td class="table-headside" width="100">名前</td>\r
-           <td><input type="text" name="item_name" value="{SEL_ITEM_NAME}" size="40" maxlength="40" /></td>\r
-           <td class="table-headside" width="100">公開</td>\r
-           <td><input type="checkbox" name="item_visible" {SEL_ITEM_VISIBLE} /></td>\r
-           <td class="table-headside" width="100">デフォルト項目</td>\r
-           <td><input type="checkbox" name="item_default" {SEL_ITEM_DEFAULT} /></td>       \r
-       </tr>\r
-        <tr class="even">\r
-           <td class="table-headside"><span {_HELP_CONTACTUS_TITLE}>タイトル</span></td>\r
-           <td colspan="7"><input type="checkbox" name="show_title" {SHOW_TITLE} />表示&nbsp;&nbsp;&nbsp;&nbsp;タイトル背景色:<input type="text" id="item_title_bgcolor" name="item_title_bgcolor" value="{TITLE_BGCOLOR}" size="10" maxlength="10" /><input type="button" value="カラー" onclick="showColorPicker(this,document.forms[0].item_title_bgcolor);" />&nbsp;&nbsp;</td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside">HTML<br /><input type="button" class="button" style="width:110px;" onclick="viewCustomValue();" value="置換文字列を参照" /></td>\r
-           <td colspan="7" width="800" height="450">\r
-           <textarea name="item_html">{SEL_ITEM_HTML}</textarea>\r
-           </td>\r
-       </tr>\r
-       <!--<tr>\r
-           <td class="table-headside">外部参照用キー</td>\r
-           <td colspan="7"><input type="text" name="item_key" value="{SEL_ITEM_KEY}" size="20" maxlength="20" /></td>\r
-       </tr>-->\r
-       <tr class="even">\r
-           <td class="table-headside">更新者</td>\r
-           <td>{UPDATE_USER}</td>\r
-           <td class="table-headside">更新日時</td>\r
-           <td colspan="5">{UPDATE_DT}</td>\r
-       </tr>\r
-       <tr>\r
-       <td colspan="8" align="right">\r
-<patTemplate:tmpl name="del_button" visibility="hidden">\r
-               <input type="button" class="button" onclick="delItem();" value="削除" />\r
-               <input type="button" class="button" onclick="updateItem();" value="更新" />\r
-</patTemplate:tmpl>\r
-<patTemplate:tmpl name="add_button" visibility="hidden">\r
-               <input type="button" class="button" onclick="addItem();" value="新規追加" />\r
-</patTemplate:tmpl>\r
-       </td>\r
-       </tr>\r
-    </tbody>\r
-</table>\r
-</td></tr>\r
-</table>\r
-</form>\r
-</div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/content/include/template/main.tmpl.html b/widgets/m/content/include/template/main.tmpl.html
deleted file mode 100644 (file)
index 8e58960..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<patTemplate:tmpl name="_widget">
-<!-- m3:ErrorMessage -->
-<patTemplate:tmpl name="contentlist">{TITLE}{CONTENT}<br /></patTemplate:tmpl>
-</patTemplate:tmpl>
diff --git a/widgets/m/content/include/template/search.tmpl.html b/widgets/m/content/include/template/search.tmpl.html
deleted file mode 100644 (file)
index 3672495..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<!-- m3:ErrorMessage -->\r
-コンテンツ検索結果<br />\r
-検索語:{KEYWORD}<br />\r
-<patTemplate:tmpl name="message" visibility="hidden">{MSG}<br /></patTemplate:tmpl>\r
-<patTemplate:tmpl name="contentlist">\r
-{TITLE}<br />\r
-{CONTENT}<br />\r
-</patTemplate:tmpl>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/content/index.php b/widgets/m/content/index.php
deleted file mode 100644 (file)
index 029bd59..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 474 2008-04-04 11:34:11Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/content_search_box/images/icon32.png b/widgets/m/content_search_box/images/icon32.png
deleted file mode 100644 (file)
index 84553c1..0000000
Binary files a/widgets/m/content_search_box/images/icon32.png and /dev/null differ
diff --git a/widgets/m/content_search_box/images/icon64.png b/widgets/m/content_search_box/images/icon64.png
deleted file mode 100644 (file)
index dd54d9c..0000000
Binary files a/widgets/m/content_search_box/images/icon64.png and /dev/null differ
diff --git a/widgets/m/content_search_box/include/container/m_content_search_boxWidgetContainer.php b/widgets/m/content_search_box/include/container/m_content_search_boxWidgetContainer.php
deleted file mode 100644 (file)
index d708e54..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_content_search_boxWidgetContainer.php 4048 2011-03-27 05:11:31Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath()          . '/baseWidgetContainer.php');
-
-class m_content_search_boxWidgetContainer extends BaseWidgetContainer
-{
-       const TARGET_WIDGET = 'm/content';              // 呼び出しウィジェットID
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {       
-               return 'index.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $act = $request->trimValueOf('act');
-               if ($act == 'content_search'){                  // コンテンツ検索のとき
-                       // キーワード取得
-                       $keyword = $request->mobileTrimValueOf('keyword');
-                       
-                       // ブログメインに検索結果を表示させる
-                       $url = $this->gPage->createWidgetCmdUrl(self::TARGET_WIDGET, $this->gEnv->getCurrentWidgetId(), 'act=search&keyword=' . urlencode($keyword));
-                       $this->gPage->redirect($url, true/*遷移時のダイアログ表示を抑止*/);
-               }
-               // パラメータを埋め込む
-               $this->tmpl->addVar("_widget", "url", $this->gEnv->createCurrentPageUrlForMobile());
-       }
-}
-?>
diff --git a/widgets/m/content_search_box/include/template/index.tmpl.html b/widgets/m/content_search_box/include/template/index.tmpl.html
deleted file mode 100644 (file)
index e77987b..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<patTemplate:tmpl name="_widget">
-<form action="{URL}" method="post" name="content_search_box" class="form">
-<input type="hidden" name="act" value="search" />
-<div><input type="text" name="keyword" size="16" maxlength="16" /><input type="submit" value="検索" /></div>
-</form>
-</patTemplate:tmpl>
diff --git a/widgets/m/content_search_box/index.php b/widgets/m/content_search_box/index.php
deleted file mode 100644 (file)
index e5ed439..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 1331 2008-12-09 06:45:21Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/custom_footer/admin/index.php b/widgets/m/custom_footer/admin/index.php
deleted file mode 100644 (file)
index e125fbc..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 439 2008-03-28 14:54:43Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/custom_footer/images/icon32.png b/widgets/m/custom_footer/images/icon32.png
deleted file mode 100644 (file)
index e49bca6..0000000
Binary files a/widgets/m/custom_footer/images/icon32.png and /dev/null differ
diff --git a/widgets/m/custom_footer/images/icon64.png b/widgets/m/custom_footer/images/icon64.png
deleted file mode 100644 (file)
index 07138f4..0000000
Binary files a/widgets/m/custom_footer/images/icon64.png and /dev/null differ
diff --git a/widgets/m/custom_footer/include/container/admin_m_custom_footerWidgetContainer.php b/widgets/m/custom_footer/include/container/admin_m_custom_footerWidgetContainer.php
deleted file mode 100644 (file)
index 5aec253..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2009 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: admin_m_custom_footerWidgetContainer.php 2271 2009-08-31 07:00:18Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseAdminWidgetContainer.php');
-
-class admin_m_custom_footerWidgetContainer extends BaseAdminWidgetContainer
-{
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {       
-               return 'admin.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $act = $request->trimValueOf('act');
-               if ($act == 'update'){          // 設定更新のとき
-                       // 入力値を取得
-                       $footContent    = $request->valueOf('item_content');                    // フッタコンテンツ
-                       
-                       if ($this->getMsgCount() == 0){                 // エラーのないとき
-                               $paramObj->footContent  = $footContent;         // フッタコンテンツ
-                               $ret = $this->updateWidgetParamObj($paramObj);
-                               if ($ret){
-                                       $this->setMsg(self::MSG_GUIDANCE, 'データを更新しました');
-                               } else {
-                                       $this->setMsg(self::MSG_APP_ERR, 'データ更新に失敗しました');
-                               }                               
-                       }
-                       $this->gPage->updateParentWindow();// 親ウィンドウを更新
-               } else {                // 初期表示の場合
-                       // デフォルト値設定
-                       $footContent = '';      // フッタコンテンツ
-                       $footContent .= '<hr />' . M3_NL;
-                       $footContent .= '<div align="center">(C) ' . date("Y") . ' Magic3.org</div>' . M3_NL;
-                       $footContent .= '<div align="center"><a href="http://www.magic3.org">Magic3 ' . M3_SYSTEM_VERSION . '</a> is licensed under the terms of the GNU General Public License.</div>' . M3_NL;
-                       $paramObj = $this->getWidgetParamObj();
-                       if (!empty($paramObj)){
-                               $footContent    = $paramObj->footContent;                       // フッタコンテンツ
-                       }
-               }
-               
-               // 画面にデータを埋め込む
-               $this->tmpl->addVar("_widget", "content",       $footContent);
-       }
-}
-?>
diff --git a/widgets/m/custom_footer/include/container/m_custom_footerWidgetContainer.php b/widgets/m/custom_footer/include/container/m_custom_footerWidgetContainer.php
deleted file mode 100644 (file)
index bce6a04..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2009 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_custom_footerWidgetContainer.php 2271 2009-08-31 07:00:18Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseWidgetContainer.php');
-
-class m_custom_footerWidgetContainer extends BaseWidgetContainer
-{
-       var $db;                        // DB接続オブジェクト
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'index.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $footContent = '';      // フッタコンテンツ
-               
-               $showFooter = $request->trimValueOf(M3_REQUEST_PARAM_SHOW_FOOTER);
-               
-               if ($showFooter != M3_REQUEST_VALUE_OFF){               // フッタを表示するとき
-                       $footContent .= '<hr />' . M3_NL;
-                       $footContent .= '<div align="center">(C) ' . date("Y") . ' Magic3.org</div>' . M3_NL;
-                       $footContent .= '<div align="center"><a href="http://www.magic3.org">Magic3 ' . M3_SYSTEM_VERSION . '</a> is licensed under the terms of the GNU General Public License.</div>' . M3_NL;
-                       $paramObj = $this->getWidgetParamObj();
-                       if (!empty($paramObj)){
-                               $footContent    = $paramObj->footContent;                       // フッタコンテンツ
-                       }
-               }
-
-               $this->tmpl->addVar("_widget", "content",       $footContent);
-       }
-}
-?>
diff --git a/widgets/m/custom_footer/include/template/admin.tmpl.html b/widgets/m/custom_footer/include/template/admin.tmpl.html
deleted file mode 100644 (file)
index f508a61..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<link rel="stylesheet" href="{_ROOT_URL}/scripts/js_color_picker_v2/js_color_picker_v2.css" media="screen">\r
-<script src="{_ROOT_URL}/scripts/js_color_picker_v2/color_functions.js"></script>\r
-<script type="text/javascript" src="{_ROOT_URL}/scripts/js_color_picker_v2/js_color_picker_v2.js"></script>\r
-<script type="text/javascript">\r
-<!--\r
-function updateItem(){\r
-       if (!window.confirm('設定を更新しますか?')) return false;\r
-       document.main.act.value='update';\r
-       document.main.submit();\r
-       return true;\r
-}\r
-$(document).ready(function(){\r
-       m3_setHtmlEditor('item_content', true);\r
-});\r
-// -->\r
-</script>\r
-<div align="center">\r
-<br />\r
-<!-- m3:ErrorMessage -->\r
-<form method="post" name="main">\r
-<input type="hidden" name="act" />\r
-<table border="0" cellpadding="0" cellspacing="0">\r
-<tbody>\r
-<tr><td>\r
-<table class="simple-table">\r
-    <tbody>\r
-        <tr>\r
-           <td class="table-head" width="100">内容</td><td width="800" height="200"><textarea name="item_content">{CONTENT}</textarea></td>\r
-       </tr>\r
-        <tr class="even">\r
-           <td colspan="2" align="right"><input type="button" class="button" onclick="updateItem();" value="更新" /></td>\r
-       </tr>\r
-    </tbody>\r
-</table>\r
-</td></tr>\r
-<tr><td align="center"><img id="preview" style="display:none;"/>\r
-\r
-</td></tr>\r
-</tbody>\r
-</table>\r
-\r
-</form>\r
-</div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/custom_footer/include/template/index.tmpl.html b/widgets/m/custom_footer/include/template/index.tmpl.html
deleted file mode 100644 (file)
index 0a69e43..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<patTemplate:tmpl name="_widget">
-{CONTENT}
-</patTemplate:tmpl>
diff --git a/widgets/m/custom_footer/index.php b/widgets/m/custom_footer/index.php
deleted file mode 100644 (file)
index e125fbc..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 439 2008-03-28 14:54:43Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/custom_header/admin/index.php b/widgets/m/custom_header/admin/index.php
deleted file mode 100644 (file)
index 9a9f9ca..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 1887 2009-05-12 19:09:58Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/custom_header/images/icon32.gif b/widgets/m/custom_header/images/icon32.gif
deleted file mode 100644 (file)
index e8be3f0..0000000
Binary files a/widgets/m/custom_header/images/icon32.gif and /dev/null differ
diff --git a/widgets/m/custom_header/images/icon64.gif b/widgets/m/custom_header/images/icon64.gif
deleted file mode 100644 (file)
index bcbffbe..0000000
Binary files a/widgets/m/custom_header/images/icon64.gif and /dev/null differ
diff --git a/widgets/m/custom_header/include/container/admin_m_custom_headerWidgetContainer.php b/widgets/m/custom_header/include/container/admin_m_custom_headerWidgetContainer.php
deleted file mode 100644 (file)
index 9e9ebbf..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2009 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: admin_m_custom_headerWidgetContainer.php 1889 2009-05-13 02:43:00Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseWidgetContainer.php');
-
-class admin_m_custom_headerWidgetContainer extends BaseWidgetContainer
-{
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {       
-               return 'admin.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $act = $request->trimValueOf('act');
-               if ($act == 'update'){          // 設定更新のとき
-                       // 入力値を取得
-                       $content        = $request->valueOf('item_content');                    // ヘッダコンテンツ
-                       
-                       if ($this->getMsgCount() == 0){                 // エラーのないとき
-                               $paramObj->content      = $content;             // ヘッダコンテンツ
-                               $ret = $this->updateWidgetParamObj($paramObj);
-                               if ($ret){
-                                       $this->setMsg(self::MSG_GUIDANCE, 'データを更新しました');
-                               } else {
-                                       $this->setMsg(self::MSG_APP_ERR, 'データ更新に失敗しました');
-                               }                               
-                       }
-                       $this->gPage->updateParentWindow();// 親ウィンドウを更新
-               } else {                // 初期表示の場合
-                       // デフォルト値設定
-                       $content = '<div align="center"><h1>サイト名</h1></div>' . M3_NL;// ヘッダコンテンツ
-                       $paramObj = $this->getWidgetParamObj();
-                       if (!empty($paramObj)){
-                               $content        = $paramObj->content;                   // ヘッダコンテンツ
-                       }
-               }
-               
-               // 画面にデータを埋め込む
-               $this->tmpl->addVar("_widget", "content",       $content);
-       }
-}
-?>
diff --git a/widgets/m/custom_header/include/container/m_custom_headerWidgetContainer.php b/widgets/m/custom_header/include/container/m_custom_headerWidgetContainer.php
deleted file mode 100644 (file)
index fb10685..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2009 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_custom_headerWidgetContainer.php 1889 2009-05-13 02:43:00Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseWidgetContainer.php');
-
-class m_custom_headerWidgetContainer extends BaseWidgetContainer
-{
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'index.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $content = '<div align="center"><h1>サイト名</h1></div>' . M3_NL;// ヘッダコンテンツ
-               $paramObj = $this->getWidgetParamObj();
-               if (!empty($paramObj)){
-                       $content        = $paramObj->content;                   // ヘッダコンテンツ
-               }
-
-               $this->tmpl->addVar("_widget", "content",       $content);
-       }
-}
-?>
diff --git a/widgets/m/custom_header/include/template/admin.tmpl.html b/widgets/m/custom_header/include/template/admin.tmpl.html
deleted file mode 100644 (file)
index a2d2e6f..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<script type="text/javascript">\r
-<!--\r
-function updateItem(){\r
-       if (!window.confirm('設定を更新しますか?')) return false;\r
-       document.main.act.value='update';\r
-       document.main.submit();\r
-       return true;\r
-}\r
-$(document).ready(function(){\r
-       m3_setHtmlEditor('item_content', true);\r
-});\r
-// -->\r
-</script>\r
-<div align="center">\r
-<br />\r
-<!-- m3:ErrorMessage -->\r
-<form method="post" name="main">\r
-<input type="hidden" name="act" />\r
-<table class="simple-table">\r
-    <tbody>\r
-        <tr>\r
-           <td class="table-head" width="100">内容</td><td width="800" height="200"><textarea name="item_content">{CONTENT}</textarea></td>\r
-       </tr>\r
-        <tr class="even">\r
-           <td colspan="2" align="right"><input type="button" class="button" onclick="updateItem();" value="更新" /></td>\r
-       </tr>\r
-    </tbody>\r
-</table>\r
-</form>\r
-</div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/custom_header/include/template/index.tmpl.html b/widgets/m/custom_header/include/template/index.tmpl.html
deleted file mode 100644 (file)
index 0a69e43..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<patTemplate:tmpl name="_widget">
-{CONTENT}
-</patTemplate:tmpl>
diff --git a/widgets/m/custom_header/index.php b/widgets/m/custom_header/index.php
deleted file mode 100644 (file)
index 9a9f9ca..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 1887 2009-05-12 19:09:58Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/default_login/images/icon32.png b/widgets/m/default_login/images/icon32.png
deleted file mode 100644 (file)
index 3a53701..0000000
Binary files a/widgets/m/default_login/images/icon32.png and /dev/null differ
diff --git a/widgets/m/default_login/images/icon64.png b/widgets/m/default_login/images/icon64.png
deleted file mode 100644 (file)
index ffc7d12..0000000
Binary files a/widgets/m/default_login/images/icon64.png and /dev/null differ
diff --git a/widgets/m/default_login/include/container/m_default_loginWidgetContainer.php b/widgets/m/default_login/include/container/m_default_loginWidgetContainer.php
deleted file mode 100644 (file)
index f1cfe2e..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2009 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_default_loginWidgetContainer.php 2007 2009-06-26 16:00:54Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseMobileWidgetContainer.php');
-
-class m_default_loginWidgetContainer extends BaseMobileWidgetContainer
-{
-       private $db;    // DB接続オブジェクト
-       private $sysDb;         // システムDBオブジェクト
-       const DEFAULT_TITLE = 'ログイン';                   // デフォルトのウィジェットタイトル
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-               
-               // DB接続オブジェクト作成
-               $this->sysDb = $this->gInstance->getSytemDbObject();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {       
-               return 'index.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $act = $request->trimValueOf('act');
-               if ($act == 'login'){                   // ログインのとき
-                       // アカウント、パスワード取得
-                       $account = $request->trimValueOf('account');
-                       $password = $request->trimValueOf('password');
-                       if (!empty($password)) $password = md5($password);              // パスワードはプレーンで送られてくる
-               
-                       // ユーザ認証
-                       if ($this->gAccess->userLoginByAccount($account, $password)){
-                               // 画面を全体を再表示する
-                               $this->gPage->redirect($this->gEnv->createCurrentPageUrlForMobile(), true/*遷移時のダイアログ表示を抑止*/);                       // セッションを維持
-                               return;
-                       } else {                // ログイン失敗の場合
-                               // ログイン状態を削除
-                               $this->gAccess->userLogout();
-                               
-                               $this->tmpl->addVar('login_status', 'message', 'ログインに失敗しました');         // メッセージ
-                               $this->tmpl->setAttribute('login_status', 'visibility', 'visible');             // ログイン状況
-                       }
-               } else if ($act == 'logout'){                   // ログアウトのとき
-                       $this->gAccess->userLogout();
-                       
-                       // 画面を全体を再表示する
-                       $this->gPage->redirect($this->gEnv->createCurrentPageUrl(), true/*遷移時のダイアログ表示を抑止*/);                // セッションを終了する
-                       return;
-               }
-               
-               // ログイン状態を取得
-               $userName = $this->gEnv->getCurrentUserName();
-               if (empty($userName)){          // ユーザがログインしていないとき
-                       // ログイン入力部、ログインボタン表示
-                       $this->tmpl->setAttribute('login_field', 'visibility', 'visible');
-                       $this->tmpl->setAttribute('login_button', 'visibility', 'visible');
-                       $this->tmpl->addVar("_widget", "act", 'login');                 // ログイン処理
-               } else {                // ユーザがログイン中のとき
-                       $this->tmpl->addVar("login_status", "user_name", 'ログイン:' . $userName . '様');
-                       
-                       // 会員情報、ログアウトボタン表示
-                       $this->tmpl->setAttribute('login_status', 'visibility', 'visible');             // ログイン状況
-                       $this->tmpl->setAttribute('logout_button', 'visibility', 'visible');
-                       $this->tmpl->addVar("_widget", "act", 'logout');                        // ログアウト処理
-               }
-               
-               // パラメータ埋め込み
-               $this->tmpl->addVar('_widget', 'url', $this->gEnv->createCurrentPageUrlForMobile());
-       }
-       /**
-        * ウィジェットのタイトルを設定
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               ウィジェットのタイトル名
-        */
-       function _setTitle($request, &$param)
-       {
-               return self::DEFAULT_TITLE;
-       }
-}
-?>
diff --git a/widgets/m/default_login/include/template/index.tmpl.html b/widgets/m/default_login/include/template/index.tmpl.html
deleted file mode 100644 (file)
index 553de66..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<form action="{URL}" method="post" name="login" class="form">\r
-<input type="hidden" name="act" value="{ACT}" />\r
-<patTemplate:tmpl name="login_status" visibility="hidden">\r
-<div>{MESSAGE}{USER_NAME}</div>\r
-</patTemplate:tmpl>\r
-<patTemplate:tmpl name="login_field" visibility="hidden">\r
-<div>アカウント:&nbsp;&nbsp;<input type="text" name="account" size="10" maxlength="40" /></div>\r
-<div>パスワード:<input type="password" name="password" size="10" maxlength="10" /></div>\r
-</patTemplate:tmpl>\r
-<patTemplate:tmpl name="logout_button" visibility="hidden">\r
-<div align="center" style="text-align:center;"><input type="submit" value="ログアウト" /></div>\r
-</patTemplate:tmpl>\r
-<patTemplate:tmpl name="login_button" visibility="hidden">\r
-<div align="center" style="text-align:center;"><input type="submit" value="ログイン" /></div>\r
-</patTemplate:tmpl>\r
-</form>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/default_login/index.php b/widgets/m/default_login/index.php
deleted file mode 100644 (file)
index 8e0bf02..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 2003 2009-06-26 00:42:58Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/g_analytics/admin/index.php b/widgets/m/g_analytics/admin/index.php
deleted file mode 100644 (file)
index 39d279c..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 3717 2010-10-19 07:28:14Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/g_analytics/ga.php b/widgets/m/g_analytics/ga.php
deleted file mode 100644 (file)
index 3134165..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-<?php
-
-/**
-  Copyright 2009 Google Inc. All Rights Reserved.
-**/
-
-  // Tracker version.
-  define("VERSION", "4.4sh");
-
-  define("COOKIE_NAME", "__utmmobile");
-
-  // The path the cookie will be available to, edit this to use a different
-  // cookie path.
-  define("COOKIE_PATH", "/");
-
-  // Two years in seconds.
-  define("COOKIE_USER_PERSISTENCE", 63072000);
-
-  // 1x1 transparent GIF
-  $GIF_DATA = array(
-      chr(0x47), chr(0x49), chr(0x46), chr(0x38), chr(0x39), chr(0x61),
-      chr(0x01), chr(0x00), chr(0x01), chr(0x00), chr(0x80), chr(0xff),
-      chr(0x00), chr(0xff), chr(0xff), chr(0xff), chr(0x00), chr(0x00),
-      chr(0x00), chr(0x2c), chr(0x00), chr(0x00), chr(0x00), chr(0x00),
-      chr(0x01), chr(0x00), chr(0x01), chr(0x00), chr(0x00), chr(0x02),
-      chr(0x02), chr(0x44), chr(0x01), chr(0x00), chr(0x3b)
-  );
-
-  // The last octect of the IP address is removed to anonymize the user.
-  function getIP($remoteAddress) {
-    if (empty($remoteAddress)) {
-      return "";
-    }
-
-    // Capture the first three octects of the IP address and replace the forth
-    // with 0, e.g. 124.455.3.123 becomes 124.455.3.0
-    $regex = "/^([^.]+\.[^.]+\.[^.]+\.).*/";
-    if (preg_match($regex, $remoteAddress, $matches)) {
-      return $matches[1] . "0";
-    } else {
-      return "";
-    }
-  }
-
-  // Generate a visitor id for this hit.
-  // If there is a visitor id in the cookie, use that, otherwise
-  // use the guid if we have one, otherwise use a random number.
-  function getVisitorId($guid, $account, $userAgent, $cookie) {
-
-    // If there is a value in the cookie, don't change it.
-    if (!empty($cookie)) {
-      return $cookie;
-    }
-
-    $message = "";
-    if (!empty($guid)) {
-      // Create the visitor id using the guid.
-      $message = $guid . $account;
-    } else {
-      // otherwise this is a new user, create a new random id.
-      $message = $userAgent . uniqid(getRandomNumber(), true);
-    }
-
-    $md5String = md5($message);
-
-    return "0x" . substr($md5String, 0, 16);
-  }
-
-  // Get a random number string.
-  function getRandomNumber() {
-    return rand(0, 0x7fffffff);
-  }
-
-  // Writes the bytes of a 1x1 transparent gif into the response.
-  function writeGifData() {
-    global $GIF_DATA;
-    header("Content-Type: image/gif");
-    header("Cache-Control: " .
-           "private, no-cache, no-cache=Set-Cookie, proxy-revalidate");
-    header("Pragma: no-cache");
-    header("Expires: Wed, 17 Sep 1975 21:32:10 GMT");
-    echo join($GIF_DATA);
-  }
-
-  // Make a tracking request to Google Analytics from this server.
-  // Copies the headers from the original request to the new one.
-  // If request containg utmdebug parameter, exceptions encountered
-  // communicating with Google Analytics are thown.
-  function sendRequestToGoogleAnalytics($utmUrl) {
-    $options = array(
-      "http" => array(
-          "method" => "GET",
-          "user_agent" => $_SERVER["HTTP_USER_AGENT"],
-          "header" => ("Accepts-Language: " . $_SERVER["HTTP_ACCEPT_LANGUAGE"]))
-    );
-    if (!empty($_GET["utmdebug"])) {
-      $data = file_get_contents(
-          $utmUrl, false, stream_context_create($options));
-    } else {
-      $data = @file_get_contents(
-          $utmUrl, false, stream_context_create($options));
-    }
-  }
-
-  // Track a page view, updates all the cookies and campaign tracker,
-  // makes a server side request to Google Analytics and writes the transparent
-  // gif byte data to the response.
-  function trackPageView() {
-    $timeStamp = time();
-    $domainName = $_SERVER["SERVER_NAME"];
-    if (empty($domainName)) {
-      $domainName = "";
-    }
-
-    // Get the referrer from the utmr parameter, this is the referrer to the
-    // page that contains the tracking pixel, not the referrer for tracking
-    // pixel.
-    $documentReferer = $_GET["utmr"];
-    if (empty($documentReferer) && $documentReferer !== "0") {
-      $documentReferer = "-";
-    } else {
-      $documentReferer = urldecode($documentReferer);
-    }
-    $documentPath = $_GET["utmp"];
-    if (empty($documentPath)) {
-      $documentPath = "";
-    } else {
-      $documentPath = urldecode($documentPath);
-    }
-
-    $account = $_GET["utmac"];
-    $userAgent = $_SERVER["HTTP_USER_AGENT"];
-    if (empty($userAgent)) {
-      $userAgent = "";
-    }
-
-    // Try and get visitor cookie from the request.
-    $cookie = $_COOKIE[COOKIE_NAME];
-
-    $guidHeader = $_SERVER["HTTP_X_DCMGUID"];
-    if (empty($guidHeader)) {
-      $guidHeader = $_SERVER["HTTP_X_UP_SUBNO"];
-    }
-    if (empty($guidHeader)) {
-      $guidHeader = $_SERVER["HTTP_X_JPHONE_UID"];
-    }
-    if (empty($guidHeader)) {
-      $guidHeader = $_SERVER["HTTP_X_EM_UID"];
-    }
-
-    $visitorId = getVisitorId($guidHeader, $account, $userAgent, $cookie);
-
-    // Always try and add the cookie to the response.
-    setrawcookie(
-        COOKIE_NAME,
-        $visitorId,
-        $timeStamp + COOKIE_USER_PERSISTENCE,
-        COOKIE_PATH);
-
-    $utmGifLocation = "http://www.google-analytics.com/__utm.gif";
-
-    // Construct the gif hit url.
-    $utmUrl = $utmGifLocation . "?" .
-        "utmwv=" . VERSION .
-        "&utmn=" . getRandomNumber() .
-        "&utmhn=" . urlencode($domainName) .
-        "&utmr=" . urlencode($documentReferer) .
-        "&utmp=" . urlencode($documentPath) .
-        "&utmac=" . $account .
-        "&utmcc=__utma%3D999.999.999.999.999.1%3B" .
-        "&utmvid=" . $visitorId .
-        "&utmip=" . getIP($_SERVER["REMOTE_ADDR"]);
-
-    sendRequestToGoogleAnalytics($utmUrl);
-
-    // If the debug parameter is on, add a header to the response that contains
-    // the url that was used to contact Google Analytics.
-    if (!empty($_GET["utmdebug"])) {
-      header("X-GA-MOBILE-URL:" . $utmUrl);
-    }
-    // Finally write the gif data to the response.
-    writeGifData();
-  }
-?><?php
-  trackPageView();
-?>
diff --git a/widgets/m/g_analytics/images/icon32.png b/widgets/m/g_analytics/images/icon32.png
deleted file mode 100644 (file)
index 206f857..0000000
Binary files a/widgets/m/g_analytics/images/icon32.png and /dev/null differ
diff --git a/widgets/m/g_analytics/images/icon64.png b/widgets/m/g_analytics/images/icon64.png
deleted file mode 100644 (file)
index 279f0ae..0000000
Binary files a/widgets/m/g_analytics/images/icon64.png and /dev/null differ
diff --git a/widgets/m/g_analytics/include/container/admin_m_g_analyticsWidgetContainer.php b/widgets/m/g_analytics/include/container/admin_m_g_analyticsWidgetContainer.php
deleted file mode 100644 (file)
index 3ebacbe..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2010 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: admin_m_g_analyticsWidgetContainer.php 3717 2010-10-19 07:28:14Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseAdminWidgetContainer.php');
-
-class admin_m_g_analyticsWidgetContainer extends BaseAdminWidgetContainer
-{
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {       
-               return 'admin.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $act = $request->trimValueOf('act');
-               if ($act == 'update'){          // 設定更新のとき
-                       // 入力値を取得
-                       $account        = $request->valueOf('account_no');                      // Google Analyticsアカウント番号
-                       
-                       if ($this->getMsgCount() == 0){                 // エラーのないとき
-                               $paramObj->account      = $account;
-                               $ret = $this->updateWidgetParamObj($paramObj);
-                               if ($ret){
-                                       $this->setMsg(self::MSG_GUIDANCE, 'データを更新しました');
-                               } else {
-                                       $this->setMsg(self::MSG_APP_ERR, 'データ更新に失敗しました');
-                               }
-                               $this->gPage->updateParentWindow();// 親ウィンドウを更新
-                       }
-               } else {                // 初期表示の場合
-                       // デフォルト値設定
-                       $account = '';  // Google Analyticsアカウント番号
-                       $paramObj = $this->getWidgetParamObj();
-                       if (!empty($paramObj)){
-                               $account        = $paramObj->account;
-                       }
-               }
-               
-               // 画面にデータを埋め込む
-               $this->tmpl->addVar("_widget", "account_no",    $account);
-       }
-}
-?>
diff --git a/widgets/m/g_analytics/include/container/m_g_analyticsWidgetContainer.php b/widgets/m/g_analytics/include/container/m_g_analyticsWidgetContainer.php
deleted file mode 100644 (file)
index 6ff2cff..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2010 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_g_analyticsWidgetContainer.php 3719 2010-10-19 08:39:44Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseWidgetContainer.php');
-
-class m_g_analyticsWidgetContainer extends BaseWidgetContainer
-{
-       private $account;               // Google AnalyticsのプロファイルのID
-       const ACCOUNT_HEAD = 'MO-';             // 携帯用アカウントヘッダ
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'main.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $this->account = '';    // Google AnalyticsのプロファイルのID
-               $paramObj = $this->getWidgetParamObj();
-               if (!empty($paramObj)){
-                       $this->account  = $paramObj->account;
-               }
-
-               // アカウント番号が空のときは出力しない
-               if (empty($this->account)){
-                       $this->cancelParse();
-               } else {
-                       $imageUrl = $this->googleAnalyticsGetImageUrl();
-                       $this->tmpl->addVar("_widget", "image", $imageUrl);
-               }
-       }
-       function googleAnalyticsGetImageUrl()
-       {
-               //global $GA_ACCOUNT, $GA_PIXEL;
-               $GA_ACCOUNT = self::ACCOUNT_HEAD . $this->account;
-               $GA_PIXEL = $this->gEnv->getCurrentWidgetRootUrl() . '/ga.php';
-               
-               $url = "";
-               $url .= $GA_PIXEL . "?";
-               $url .= "utmac=" . $GA_ACCOUNT;
-               $url .= "&utmn=" . rand(0, 0x7fffffff);
-               $referer = $_SERVER["HTTP_REFERER"];
-               $query = $_SERVER["QUERY_STRING"];
-               $path = $_SERVER["REQUEST_URI"];
-               if (empty($referer)) {
-                 $referer = "-";
-               }
-               $url .= "&utmr=" . urlencode($referer);
-               if (!empty($path)) {
-                 $url .= "&utmp=" . urlencode($path);
-               }
-               $url .= "&guid=ON";
-               return str_replace("&", "&amp;", $url);
-       }
-}
-?>
diff --git a/widgets/m/g_analytics/include/help/index.php b/widgets/m/g_analytics/include/help/index.php
deleted file mode 100644 (file)
index 0b1076e..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-/**
- * ヘルプリソースファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2008 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 3717 2010-10-19 07:28:14Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-global $HELP;
-
-// ########## ユーザ一覧 ##########
-$HELP['account_no']['title'] = 'アカウント番号';
-$HELP['account_no']['body'] = 'Google Analyticsから取得した「xxxx-x」形式のアカウント番号を設定します。アカウント番号はトラッキングコードに埋め込まれます。この値が空の場合はトラッキングコードを出力しません。';
-?>
diff --git a/widgets/m/g_analytics/include/template/admin.tmpl.html b/widgets/m/g_analytics/include/template/admin.tmpl.html
deleted file mode 100644 (file)
index 8153536..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<script type="text/javascript">\r
-<!--\r
-function updateItem(){\r
-       if (!window.confirm('設定を更新しますか?')) return false;\r
-       document.main.act.value='update';\r
-       document.main.submit();\r
-       return true;\r
-}\r
-// -->\r
-</script>\r
-<div align="center">\r
-<br />\r
-<!-- m3:ErrorMessage -->\r
-<form method="post" name="main">\r
-<input type="hidden" name="act" />\r
-<table class="simple-table">\r
-    <caption>Google Analytics 設定</caption>\r
-    <tbody>\r
-        <tr>\r
-           <td class="table-headside" width="100"><span {_HELP_ACCOUNT_NO}>アカウント番号</span></td><td width="500">UA-&nbsp;<input type="text" name="account_no" value="{ACCOUNT_NO}" size="15" maxlength="15" /></td>\r
-       </tr>\r
-        <tr class="even">\r
-           <td colspan="2" align="right"><input type="button" class="button" onclick="updateItem();" value="更新" /></td>\r
-       </tr>\r
-    </tbody>\r
-</table>\r
-</form>\r
-</div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/g_analytics/include/template/main.tmpl.html b/widgets/m/g_analytics/include/template/main.tmpl.html
deleted file mode 100644 (file)
index 388cbb1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-<patTemplate:tmpl name="_widget"><img src="{IMAGE}" /></patTemplate:tmpl>
diff --git a/widgets/m/g_analytics/index.php b/widgets/m/g_analytics/index.php
deleted file mode 100644 (file)
index 39d279c..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 3717 2010-10-19 07:28:14Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/googlemaps/admin/index.php b/widgets/m/googlemaps/admin/index.php
deleted file mode 100644 (file)
index bfc3d4d..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2010 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 3731 2010-10-25 06:29:17Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/googlemaps/images/icon32.gif b/widgets/m/googlemaps/images/icon32.gif
deleted file mode 100644 (file)
index b6fce39..0000000
Binary files a/widgets/m/googlemaps/images/icon32.gif and /dev/null differ
diff --git a/widgets/m/googlemaps/images/icon64.gif b/widgets/m/googlemaps/images/icon64.gif
deleted file mode 100644 (file)
index 0e2355d..0000000
Binary files a/widgets/m/googlemaps/images/icon64.gif and /dev/null differ
diff --git a/widgets/m/googlemaps/include/container/admin_m_googlemapsWidgetContainer.php b/widgets/m/googlemaps/include/container/admin_m_googlemapsWidgetContainer.php
deleted file mode 100644 (file)
index ea32855..0000000
+++ /dev/null
@@ -1,452 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2012 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: admin_m_googlemapsWidgetContainer.php 4770 2012-03-19 12:15:19Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseAdminWidgetContainer.php');
-
-class admin_m_googlemapsWidgetContainer extends BaseAdminWidgetContainer
-{
-       private $serialNo;              // 選択中の項目のシリアル番号
-       private $serialArray = array();                 // 表示中のシリアル番号
-       private $langId;
-       private $configId;              // 定義ID
-       private $paramObj;              // パラメータ保存用オブジェクト
-       const DEFAULT_NAME_HEAD = '名称未設定';                    // デフォルトの設定名
-       const DEFAULT_WIDTH = 240;              // デフォルトの幅
-       const DEFAULT_HEIGHT = 320;             // デフォルトの高さ
-       const CODING_URL = 'http://www.geocoding.jp/';                  // 緯度経度取得用URL
-       const DEFAULT_POS_LAT = '35.594757';                            // デフォルト緯度
-       const DEFAULT_POS_LNG = '139.620739';                   // デフォルト経度
-       const DEFAULT_ZOOM = 13;                        // デフォルトのズームレベル
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               $task = $request->trimValueOf('task');
-               if ($task == 'list'){           // 一覧画面
-                       return 'admin_list.tmpl.html';
-               } else {                        // 一覧画面
-                       return 'admin.tmpl.html';
-               }
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @return                                                              なし
-        */
-       function _assign($request, &$param)
-       {
-               $task = $request->trimValueOf('task');
-               if ($task == 'list'){           // 一覧画面
-                       return $this->createList($request);
-               } else {                        // 詳細設定画面
-                       return $this->createDetail($request);
-               }
-       }
-       /**
-        * 詳細画面作成
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @return                                                              なし
-        */
-       function createDetail($request)
-       {
-               // ページ定義IDとページ定義のレコードシリアル番号を取得
-               $this->startPageDefParam($defSerial, $defConfigId, $this->paramObj);
-               
-               $userId         = $this->gEnv->getCurrentUserId();
-               $this->langId   = $this->gEnv->getCurrentLanguage();            // 表示言語を取得
-               $act = $request->trimValueOf('act');
-               $this->serialNo = $request->trimValueOf('serial');              // 選択項目のシリアル番号
-
-               // 入力値を取得
-               $name   = $request->trimValueOf('item_name');                   // ヘッダタイトル
-               $width  = $request->trimValueOf('item_width');          // 画像の幅
-               $height = $request->trimValueOf('item_height');         // 画像の高さ
-               $lat    = $request->trimValueOf('item_lat');            // 緯度
-               $lng    = $request->trimValueOf('item_lng');            // 経度
-               $markerLat      = $request->trimValueOf('item_marker_lat');             // マーカー緯度
-               $markerLng      = $request->trimValueOf('item_marker_lng');             // マーカー経度
-               $zoom   = $request->trimValueOf('item_zoom');           // ズームレベル
-               $showMarker = ($request->trimValueOf('item_show_marker') == 'on') ? 1 : 0;              // マーカーを表示するかどうか
-               $alt    = $request->trimValueOf('item_alt');            // 代替テキスト
-               
-               $this->configId = $request->trimValueOf('item_id');             // 定義ID
-               if (empty($this->configId)) $this->configId = $defConfigId;             // 呼び出しウィンドウから引き継いだ定義ID
-               
-               $replaceNew = false;            // データを再取得するかどうか
-               if (empty($act)){// 初期起動時
-                       // デフォルト値設定
-                       $this->configId = $defConfigId;         // 呼び出しウィンドウから引き継いだ定義ID
-                       $replaceNew = true;                     // データ再取得
-               } else if ($act == 'add'){// 新規追加
-                       // 入力チェック
-                       $this->checkInput($name, '名前');
-                       $this->checkNumeric($width, '幅');
-                       $this->checkNumeric($height, '高さ');
-                       $this->checkNumber($lat, '緯度');
-                       $this->checkNumber($lng, '経度');
-                       $this->checkNumber($zoom, 'ズームレベル');
-                       if ($showMarker){                       // マーカーを表示するかどうか
-                               $this->checkNumber($markerLat, 'マーカー緯度');
-                               $this->checkNumber($markerLng, 'マーカー経度');
-                       } else {
-                               $this->checkNumber($markerLat, 'マーカー緯度', true);
-                               $this->checkNumber($markerLng, 'マーカー経度', true);
-                       }
-                       
-                       // 設定名の重複チェック
-                       for ($i = 0; $i < count($this->paramObj); $i++){
-                               $targetObj = $this->paramObj[$i]->object;
-                               if ($name == $targetObj->name){         // 定義名
-                                       $this->setUserErrorMsg('名前が重複しています');
-                                       break;
-                               }
-                       }
-                       
-                       // エラーなしの場合は、データを登録
-                       if ($this->getMsgCount() == 0){
-                               // 追加オブジェクト作成
-                               $newObj = new stdClass;
-                               $newObj->name   = $name;        // 表示名
-                               $newObj->width  = $width;               // 幅
-                               $newObj->height = $height;              // 高さ
-                               $newObj->lat    = $lat;         // 緯度
-                               $newObj->lng    = $lng;         // 経度
-                               $newObj->markerLat      = $markerLat;           // マーカー緯度
-                               $newObj->markerLng      = $markerLng;           // マーカー経度
-                               
-                               $newObj->zoom   = $zoom;                // ズームレベル
-                               $newObj->showMarker = $showMarker;              // マーカーを表示するかどうか
-                               $newObj->alt    = $alt;         // 代替テキスト
-                               
-                               $ret = $this->addPageDefParam($defSerial, $defConfigId, $this->paramObj, $newObj);
-                               
-                               if ($ret){
-                                       $this->setGuidanceMsg('データを追加しました');
-                                       
-                                       $this->configId = $defConfigId;         // 定義定義IDを更新
-                                       $replaceNew = true;                     // データ再取得
-                               } else {
-                                       $this->setAppErrorMsg('データ追加に失敗しました');
-                               }
-                       }
-               } else if ($act == 'update'){           // 設定更新のとき
-                       // 入力値のエラーチェック
-                       $this->checkNumeric($width, '幅');
-                       $this->checkNumeric($height, '高さ');
-                       $this->checkNumber($lat, '緯度');
-                       $this->checkNumber($lng, '経度');
-                       $this->checkNumber($zoom, 'ズームレベル');
-                       if ($showMarker){                       // マーカーを表示するかどうか
-                               $this->checkNumber($markerLat, 'マーカー緯度');
-                               $this->checkNumber($markerLng, 'マーカー経度');
-                       } else {
-                               $this->checkNumber($markerLat, 'マーカー緯度', true);
-                               $this->checkNumber($markerLng, 'マーカー経度', true);
-                       }
-                       
-                       if ($this->getMsgCount() == 0){                 // エラーのないとき
-                               // 現在の設定値を取得
-                               $ret = $this->getPageDefParam($defSerial, $defConfigId, $this->paramObj, $this->configId, $targetObj);
-                               if ($ret){
-                                       // ウィジェットオブジェクト更新
-                                       $targetObj->width       = $width;               // ヘッダの幅
-                                       $targetObj->height      = $height;              // ヘッダの高さ
-                                       $targetObj->lat         = $lat;         // 緯度
-                                       $targetObj->lng         = $lng;         // 経度
-                                       $targetObj->markerLat           = $markerLat;           // マーカー緯度
-                                       $targetObj->markerLng           = $markerLng;           // マーカー経度
-                                       $targetObj->zoom        = $zoom;                // ズームレベル
-                                       $targetObj->showMarker = $showMarker;           // マーカーを表示するかどうか
-                                       $targetObj->alt = $alt;         // 代替テキスト
-                               }
-                               
-                               // 設定値を更新
-                               if ($ret) $ret = $this->updatePageDefParam($defSerial, $defConfigId, $this->paramObj, $this->configId, $targetObj);
-                               
-                               if ($ret){
-                                       $this->setMsg(self::MSG_GUIDANCE, 'データを更新しました');
-                                       
-                                       $replaceNew = true;                     // データ再取得
-                               } else {
-                                       $this->setMsg(self::MSG_APP_ERR, 'データ更新に失敗しました');
-                               }
-                       }
-               } else if ($act == 'select'){   // 定義IDを変更
-                       $replaceNew = true;                     // データ再取得
-               }
-               
-               // 設定項目選択メニュー作成
-               $this->createItemMenu();
-               
-               // 表示用データを取得
-               if (empty($this->configId)){            // 新規登録の場合
-                       $this->tmpl->setAttribute('item_name_visible', 'visibility', 'visible');// 名前入力フィールド表示
-                       if ($replaceNew){               // データ再取得時
-                               $name = $this->createDefaultName();                     // デフォルト登録項目名
-                               $width  = self::DEFAULT_WIDTH;          // 幅
-                               $height = self::DEFAULT_HEIGHT;         // 高さ
-                               $lat    = self::DEFAULT_POS_LAT;                // 緯度
-                               $lng    = self::DEFAULT_POS_LNG;                // 経度
-                               $markerLat      = self::DEFAULT_POS_LAT;                // マーカー緯度
-                               $markerLng      = self::DEFAULT_POS_LNG;                // マーカー経度
-                               $zoom   = self::DEFAULT_ZOOM;           // ズームレベル
-                               $showMarker = 0;                // マーカーを表示するかどうか
-                               $alt    = '';           // 代替テキスト
-                       }
-                       $this->serialNo = 0;
-               } else {
-                       if ($replaceNew){
-                               $ret = $this->getPageDefParam($defSerial, $defConfigId, $this->paramObj, $this->configId, $targetObj);
-                               if ($ret){
-                                       $name = $targetObj->name;// 名前
-                                       $width  = $targetObj->width;            // 幅
-                                       $height = $targetObj->height;           // 高さ
-                                       $lat    = $targetObj->lat;              // 緯度
-                                       $lng    = $targetObj->lng;              // 経度
-                                       $markerLat      = $targetObj->markerLat;                // マーカー緯度
-                                       $markerLng      = $targetObj->markerLng;                // マーカー経度
-                                       $zoom   = $targetObj->zoom;             // ズームレベル
-                                       $showMarker = $targetObj->showMarker;           // マーカーを表示するかどうか
-                                       $alt    = $targetObj->alt;              // 代替テキスト
-                               }
-                       }
-                       $this->serialNo = $this->configId;
-                               
-                       // 新規作成でないときは、メニューを変更不可にする(画面作成から呼ばれている場合のみ)
-                       if (!empty($defConfigId) && !empty($defSerial)) $this->tmpl->addVar("_widget", "id_disabled", 'disabled');
-               }
-               
-               // プレビュー表示
-               if (is_numeric($lat) && is_numeric($lng) && is_numeric($zoom)) $this->tmpl->setAttribute('show_script', 'visibility', 'visible');// 緯度経度が入力されている場合
-               
-               // 画面にデータを埋め込む
-               $this->tmpl->addVar("item_name_visible", "name", $name);                // 名前
-               $this->tmpl->addVar("_widget", "width", $width);
-               $this->tmpl->addVar("_widget", "height",        $height);
-               $this->tmpl->addVar("_widget", "lat",   $lat);          // 緯度
-               $this->tmpl->addVar("_widget", "lng",   $lng);          // 経度
-               $this->tmpl->addVar("_widget", "zoom",  $zoom);         // ズームレベル
-               $this->tmpl->addVar("_widget", "marker_lat",    $markerLat);            // マーカー緯度
-               $this->tmpl->addVar("_widget", "marker_lng",    $markerLng);            // マーカー経度
-               $this->tmpl->addVar("_widget", "alt",   $alt);          // 代替テキスト
-               $this->tmpl->addVar("show_script", "lat",       $lat);          // 緯度
-               $this->tmpl->addVar("show_script", "lng",       $lng);          // 経度
-               $this->tmpl->addVar("show_script", "zoom",      $zoom);         // ズームレベル
-               $this->tmpl->addVar("show_marker", "marker_lat",        $markerLat);            // マーカー緯度
-               $this->tmpl->addVar("show_marker", "marker_lng",        $markerLng);            // マーカー経度
-               
-               $checked = '';
-               if ($showMarker){                       // マーカーを表示するかどうか
-                       $checked = 'checked';
-                       
-                       // 緯度経度が入力されている場合はスクリプトを表示
-                       if (is_numeric($markerLat) && is_numeric($markerLng)) $this->tmpl->setAttribute('show_marker', 'visibility', 'visible');// マーカーを表示
-               }
-               $this->tmpl->addVar("_widget", "show_marker_checked", $checked);        // マーカーを表示するかどうか
-               
-               $this->tmpl->addVar("_widget", "coding_url",    self::CODING_URL);              // 緯度経度取得用URL
-                               
-               $this->tmpl->addVar("_widget", "serial", $this->serialNo);// 選択中のシリアル番号、IDを設定
-               
-               // ボタンの表示制御
-               if (empty($this->serialNo)){            // 新規追加項目を選択しているとき
-                       $this->tmpl->setAttribute('add_button', 'visibility', 'visible');// 「新規追加」ボタン
-               } else {
-                       $this->tmpl->setAttribute('update_button', 'visibility', 'visible');// 「更新」ボタン
-               }
-               // ページ定義IDとページ定義のレコードシリアル番号を更新
-               $this->endPageDefParam($defSerial, $defConfigId, $this->paramObj);
-       }
-       /**
-        * 選択用メニューを作成
-        *
-        * @return なし                                               
-        */
-       function createItemMenu()
-       {
-               for ($i = 0; $i < count($this->paramObj); $i++){
-                       $id = $this->paramObj[$i]->id;// 定義ID
-                       $targetObj = $this->paramObj[$i]->object;
-                       $name = $targetObj->name;// 定義名
-                       $selected = '';
-
-                       if (empty($id)) continue;// 定義ID=0は一覧表示しない
-                       
-                       if ($this->configId == $id) $selected = 'selected';
-                       $row = array(
-                               'name' => $name,                // 名前
-                               'value' => $id,         // 定義ID
-                               'selected' => $selected // 選択中の項目かどうか
-                       );
-                       $this->tmpl->addVars('title_list', $row);
-                       $this->tmpl->parseTemplate('title_list', 'a');
-               }
-       }
-       /**
-        * デフォルトの名前を取得
-        *
-        * @return string       デフォルト名                                              
-        */
-       function createDefaultName()
-       {
-               $name = self::DEFAULT_NAME_HEAD;
-               for ($j = 1; $j < 100; $j++){
-                       $name = self::DEFAULT_NAME_HEAD . $j;
-                       // 設定名の重複チェック
-                       for ($i = 0; $i < count($this->paramObj); $i++){
-                               $targetObj = $this->paramObj[$i]->object;
-                               if ($name == $targetObj->name){         // 定義名
-                                       break;
-                               }
-                       }
-                       // 重複なしのときは終了
-                       if ($i == count($this->paramObj)) break;
-               }
-               return $name;
-       }
-       /**
-        * 一覧画面作成
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @return                                                              なし
-        */
-       function createList($request)
-       {
-               // ページ定義IDとページ定義のレコードシリアル番号を取得
-               $this->startPageDefParam($defSerial, $defConfigId, $this->paramObj);
-               
-               $userId         = $this->gEnv->getCurrentUserId();
-               $langId = $this->gEnv->getCurrentLanguage();            // 表示言語を取得
-               $act = $request->trimValueOf('act');
-               
-               if ($act == 'delete'){          // メニュー項目の削除
-                       $listedItem = explode(',', $request->trimValueOf('seriallist'));
-                       $delItems = array();
-                       for ($i = 0; $i < count($listedItem); $i++){
-                               // 項目がチェックされているかを取得
-                               $itemName = 'item' . $i . '_selected';
-                               $itemValue = ($request->trimValueOf($itemName) == 'on') ? 1 : 0;
-                               
-                               if ($itemValue){                // チェック項目
-                                       $delItems[] = $listedItem[$i];
-                               }
-                       }
-                       if (count($delItems) > 0){
-                               $ret = $this->delPageDefParam($defSerial, $defConfigId, $this->paramObj, $delItems);
-                               if ($ret){              // データ削除成功のとき
-                                       $this->setGuidanceMsg('データを削除しました');
-                               } else {
-                                       $this->setAppErrorMsg('データ削除に失敗しました');
-                               }
-                       }
-               }
-                                       
-               // 定義一覧作成
-               $this->createItemList();
-               
-               $this->tmpl->addVar("_widget", "serial_list", implode($this->serialArray, ','));// 表示項目のシリアル番号を設定
-               
-               // ページ定義IDとページ定義のレコードシリアル番号を更新
-               $this->endPageDefParam($defSerial, $defConfigId, $this->paramObj);
-       }
-       /**
-        * 定義一覧作成
-        *
-        * @return なし                                               
-        */
-       function createItemList()
-       {
-               $index = 0;
-               for ($i = 0; $i < count($this->paramObj); $i++){
-                       $id = $this->paramObj[$i]->id;// 定義ID
-                       $targetObj = $this->paramObj[$i]->object;
-                       $name = $targetObj->name;// 定義名
-                       
-                       if (empty($id)) continue;// 定義ID=0は一覧表示しない
-                       
-                       $defCount = 0;
-                       if (!empty($id)){
-                               $defCount = $this->_db->getPageDefCount($this->gEnv->getCurrentWidgetId(), $id);
-                       }
-                       $operationDisagled = '';
-                       if ($defCount > 0) $operationDisagled = 'disabled';
-                       
-                       // 値が設定されていないときはデフォルト値を設定
-                       $markerLat = $targetObj->markerLat;
-                       if ($markerLat == '')   $markerLat      = 0;            // マーカー緯度
-                       $markerLng = $targetObj->markerLng;
-                       if ($markerLng == '')   $markerLng      = 0;            // マーカー経度
-
-                       $row = array(
-                               'index' => $index,
-                               'ope_disabled' => $operationDisagled,                   // 選択可能かどうか
-                               'name' => $this->convertToDispString($name),            // 名前
-                               'width' => $targetObj->width,                                   // 動画幅
-                               'height' => $targetObj->height,                                 // 動画高さ
-                               'lat' => $targetObj->lat,               // 緯度
-                               'lng' => $targetObj->lng,               // 経度
-                               'marker_lat' => $markerLat,             // マーカー緯度
-                               'marker_lng' => $markerLng,             // マーカー経度
-                               'zoom' => $targetObj->zoom,             // ズームレベル
-                               'marker' => $targetObj->showMarker,             // マーカーを表示するかどうか
-                               'def_count' => $defCount                                                        // 使用数
-                       );
-                       $this->tmpl->addVars('itemlist', $row);
-                       $this->tmpl->parseTemplate('itemlist', 'a');
-                       
-                       // シリアル番号を保存
-                       $this->serialArray[] = $id;
-                       $index++;               // 項目番号更新
-               }
-       }
-       /**
-        * JavascriptファイルをHTMLヘッダ部に設定
-        *
-        * JavascriptファイルをHTMLのheadタグ内に追加出力する。
-        * _assign()よりも後に実行される。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。
-        * @return string                                               Javascriptファイル。出力しない場合は空文字列を設定。
-        */
-       function _addScriptFileToHead($request, &$param)
-       {
-               $scriptUrl = $this->getUrl('http://maps.google.com/maps/api/js?sensor=false');
-               return $scriptUrl;
-       }
-}
-?>
diff --git a/widgets/m/googlemaps/include/container/m_googlemapsWidgetContainer.php b/widgets/m/googlemaps/include/container/m_googlemapsWidgetContainer.php
deleted file mode 100644 (file)
index 98da46b..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2012 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_googlemapsWidgetContainer.php 4770 2012-03-19 12:15:19Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseWidgetContainer.php');
-
-class m_googlemapsWidgetContainer extends BaseWidgetContainer
-{
-       private $langId;                // 現在の言語
-       const DEFAULT_CONFIG_ID = 0;
-       const DEFAULT_TITLE = 'Googleマップ';                        // デフォルトのウィジェットタイトル
-       const MIN_ZOOM_LEVEL = 1;                       // ズーム値最小
-       const MAX_ZOOM_LEVEL = 21;                      // ズーム値最大
-       const MOVE_RATIO = 0.4;                 // 地図を移動する場合の移動比率
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'index.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @return                                                              なし
-        */
-       function _assign($request, &$param)
-       {
-               $this->langId = $this->gEnv->getCurrentLanguage();
-               
-               // 定義ID取得
-               $configId = $this->gEnv->getCurrentWidgetConfigId();
-               if (empty($configId)) $configId = self::DEFAULT_CONFIG_ID;
-               
-               // パラメータオブジェクトを取得
-               $targetObj = $this->getWidgetParamObjByConfigId($configId);
-               if (empty($targetObj)){                 // 定義データが取得できないとき
-                       $this->cancelParse();// 出力しない
-                       return;
-               }
-               
-               // 初期値取得
-               $name = $targetObj->name;// 定義名
-               $width  = $targetObj->width;            // 幅
-               $height = $targetObj->height;           // 高さ
-               $lat    = $targetObj->lat;              // 緯度
-               $lng    = $targetObj->lng;              // 経度
-               $markerLat      = $targetObj->markerLat;                // マーカー緯度
-               $markerLng      = $targetObj->markerLng;                // マーカー経度
-               $zoom   = intval($targetObj->zoom);             // ズームレベル
-               $showMarker = $targetObj->showMarker;           // マーカーを表示するかどうか
-               $alt    = $targetObj->alt;              // 代替テキスト
-               $pixelX = 0;            // 経度移動ピクセル値
-               $pixelY = 0;            // 緯度移動ピクセル値
-               
-               // URLからパラメータを取得
-               $value  = $request->trimValueOf('center');              // 中心点
-               if (!empty($value)){
-                       list($lat, $lng) = explode(',', $value, 2);
-                       $lat = floatval(trim($lat));
-                       $lng = floatval(trim($lng));
-               }
-               $value  = $request->trimValueOf('zoom');                // ズームレベル
-               if (!empty($value)) $zoom = intval($value);
-               $value  = $request->trimValueOf('move');                // 地図移動方向
-               if (!empty($value)){
-                       switch ($value){
-                               case 'left':
-                                       $pixelX = $width * self::MOVE_RATIO * (-1);
-                                       break;
-                               case 'right':
-                                       $pixelX = $width * self::MOVE_RATIO;
-                                       break;
-                               case 'up':
-                                       $pixelY = $height * self::MOVE_RATIO * (-1);
-                                       break;
-                               case 'down':
-                                       $pixelY = $height * self::MOVE_RATIO;
-                                       break;
-                       }
-               }
-               
-               // 値の修正
-               if ($zoom < self::MIN_ZOOM_LEVEL) $zoom = self::MIN_ZOOM_LEVEL;
-               if ($zoom > self::MAX_ZOOM_LEVEL) $zoom = self::MAX_ZOOM_LEVEL;
-               
-               // 中心点の移動
-               if ($pixelX != 0 || $pixelY != 0) list($lng, $lat) = $this->moveByPixel($lng, $lat, $pixelX, $pixelY, $zoom);
-
-               // 画像URL作成
-//             $url = 'http://maps.google.com/maps/api/staticmap?center=' . $lat . ',' . $lng . '&zoom=' . $zoom . '&size=' . $width . 'x' . $height . '&format=gif&mobile=true&sensor=true';  // docomo携帯では「format」が必須
-               $url = 'http://maps.googleapis.com/maps/api/staticmap?center=' . $lat . ',' . $lng . '&zoom=' . $zoom . '&size=' . $width . 'x' . $height . '&format=gif&mobile=true';  // docomo携帯では「format」が必須              // 2016/9/19更新
-               if ($showMarker){// マーカー表示
-                       $url .= '&markers=' . $markerLat . ',' . $markerLng;
-               }
-               $option = 'width="' . $width . '" height="' . $height . '" ';
-               if (!empty($alt)) $option .= 'alt="' . $this->convertToDispString($alt) . '" ';
-               
-               // 地図操作用URL作成
-               $paramBase = 'center=' . $lat . ',' . $lng;
-               $zoomSmall = $zoom -1;
-               if ($zoomSmall < self::MIN_ZOOM_LEVEL) $zoomSmall = self::MIN_ZOOM_LEVEL;
-               $param = $paramBase . '&zoom=' . $zoomSmall;
-               $smallUrlLink = $this->convertUrlToHtmlEntity($this->getUrl($this->gEnv->createCurrentPageUrlForMobile($param)));
-               $zoomLarge = $zoom +1;
-               if ($zoomLarge > self::MAX_ZOOM_LEVEL) $zoomLarge = self::MAX_ZOOM_LEVEL;
-               $param = $paramBase . '&zoom=' . $zoomLarge;
-               $largeUrlLink = $this->convertUrlToHtmlEntity($this->getUrl($this->gEnv->createCurrentPageUrlForMobile($param)));
-               $param = $paramBase . '&zoom=' . $zoom . '&move=left';
-               $leftUrlLink = $this->convertUrlToHtmlEntity($this->getUrl($this->gEnv->createCurrentPageUrlForMobile($param)));
-               $param = $paramBase . '&zoom=' . $zoom . '&move=right';
-               $rightUrlLink = $this->convertUrlToHtmlEntity($this->getUrl($this->gEnv->createCurrentPageUrlForMobile($param)));
-               $param = $paramBase . '&zoom=' . $zoom . '&move=up';
-               $upUrlLink = $this->convertUrlToHtmlEntity($this->getUrl($this->gEnv->createCurrentPageUrlForMobile($param)));
-               $param = $paramBase . '&zoom=' . $zoom . '&move=down';
-               $downUrlLink = $this->convertUrlToHtmlEntity($this->getUrl($this->gEnv->createCurrentPageUrlForMobile($param)));
-
-               // 表示データ埋め込み
-               $this->tmpl->addVar("_widget", "url",           $this->getUrl($url));
-               $this->tmpl->addVar("_widget", "option",        $option);
-               $this->tmpl->addVar("_widget", "url_small",     $smallUrlLink);
-               $this->tmpl->addVar("_widget", "url_large",     $largeUrlLink);
-               $this->tmpl->addVar("_widget", "url_left",      $leftUrlLink);
-               $this->tmpl->addVar("_widget", "url_right",     $rightUrlLink);
-               $this->tmpl->addVar("_widget", "url_up",        $upUrlLink);
-               $this->tmpl->addVar("_widget", "url_down",      $downUrlLink);
-       }
-       /**
-        * ウィジェットのタイトルを設定
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               ウィジェットのタイトル名
-        */
-       function _setTitle($request, &$param)
-       {
-               return self::DEFAULT_TITLE;
-       }
-       /**
-        * Googleマップの中心点をピクセル値で移動
-        *
-        * @param float $x              中心点経度
-        * @param float $y              中心点緯度
-        * @param int $pixelX   移動ピクセル値経度
-        * @param int $pixelY   移動ピクセル値緯度
-        * @param int $zoom             ズームレベル
-        * @return array                x,yの配列で新規の中心点の緯度経度が返る
-        */
-       function moveByPixel($x, $y, $pixelX, $pixelY, $zoom)
-       {
-               $offset = 268435456;
-               $radius = $offset / pi();
-               $newX = ((round(round($offset + $radius * $x * pi() / 180) + ($pixelX << (21 - $zoom))) - $offset) / $radius) * 180 / pi();
-               $newY = (pi() / 2 - 2 * atan(exp((round(round($offset - $radius * log((1 + sin($y * pi() / 180)) / (1 - sin($y * pi() / 180))) / 2) + ($pixelY << (21 - $zoom))) - $offset) / $radius))) * 180 / pi();
-               return array($newX, $newY);
-       }
-}
-?>
diff --git a/widgets/m/googlemaps/include/help/index.php b/widgets/m/googlemaps/include/help/index.php
deleted file mode 100644 (file)
index b5f0109..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-/**
- * ヘルプリソースファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2010 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 3734 2010-10-26 02:47:54Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-global $HELP;
-
-// ########## 設定項目一覧 ##########
-$HELP['item_list']['title'] = '設定一覧';
-$HELP['item_list']['body'] = '登録されている設定の一覧です。';
-$HELP['item_detail']['title'] = '設定詳細';
-$HELP['item_detail']['body'] = '詳細設定を行います。';
-$HELP['item_check']['title'] = '選択用チェックボックス';
-$HELP['item_check']['body'] = '削除を行う項目を選択します。';
-$HELP['item_name']['title'] = '名前';
-$HELP['item_name']['body'] = '設定名です。';
-$HELP['item_name_input']['title'] = '名前';
-$HELP['item_name_input']['body'] = '設定名です。新規に登録するか、登録済みの設定を選択します。';
-$HELP['item_map_key']['title'] = 'Googleマップ利用キー';
-$HELP['item_map_key']['body'] = 'Googleマップを利用するにはドメイン登録してキーを入手する必要があります。';
-$HELP['item_map_pos']['title'] = 'マップ表示位置(中心)';
-$HELP['item_map_pos']['body'] = '地図の中心の位置の緯度、経度を指定します。';
-$HELP['item_map_size']['title'] = '表示サイズ';
-$HELP['item_map_size']['body'] = '地図の幅、高さをpxで指定します。ズームレベルは1~21まで設定可能です。';
-$HELP['item_marker']['title'] = 'マーカー';
-$HELP['item_marker']['body'] = '緯度、経度指定でマーカーが表示できます。';
-$HELP['item_alt']['title'] = '代替テキスト';
-$HELP['item_alt']['body'] = 'マップが表示できないときの代替テキストです。';
-$HELP['item_map_preview']['title'] = 'Googleマッププレビュー';
-$HELP['item_map_preview']['body'] = '実際に表示されるGoogleマップです。';
-$HELP['item_id']['title'] = '設定ID';
-$HELP['item_id']['body'] = '自動的に振られる設定IDです。';
-$HELP['item_ref']['title'] = '使用';
-$HELP['item_ref']['body'] = '設定を使用しているウィジェット数を示します。使用が0の設定のみ削除可能です。';
-$HELP['item_list_btn']['title'] = '一覧ボタン';
-$HELP['item_list_btn']['body'] = '設定一覧を表示します。';
-$HELP['item_del_btn']['title'] = '削除ボタン';
-$HELP['item_del_btn']['body'] = '選択されている設定を削除します。<br />項目を選択するには、一覧の左端のチェックボックスにチェックを入れます。';
-$HELP['item_ret_btn']['title'] = '戻るボタン';
-$HELP['item_ret_btn']['body'] = '設定詳細へ戻ります。';
-?>
diff --git a/widgets/m/googlemaps/include/template/admin.tmpl.html b/widgets/m/googlemaps/include/template/admin.tmpl.html
deleted file mode 100644 (file)
index 8a93700..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-/**\r
- * 表示データ作成用テンプレート(patTemplate)\r
- *\r
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.\r
- *\r
- * @package    Magic3 Framework\r
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>\r
- * @copyright  Copyright 2006-2012 Magic3 Project.\r
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License\r
- * @version    SVN: $Id: admin.tmpl.html 4770 2012-03-19 12:15:19Z fishbone $\r
- * @link       http://www.magic3.org\r
- */\r
-<patTemplate:tmpl name="_widget">\r
-<script type="text/javascript">\r
-//<![CDATA[\r
-function addItem(){\r
-       if (!window.confirm('項目を新規追加しますか?')) return false;\r
-       document.main.act.value = 'add';\r
-       document.main.submit();\r
-       return true;\r
-}\r
-function updateItem(){\r
-       if (!window.confirm('設定を更新しますか?')) return false;\r
-       document.main.act.value='update';\r
-       document.main.submit();\r
-       return true;\r
-}\r
-function selectItem()\r
-{\r
-       document.main.act.value = 'select';\r
-       document.main.submit();\r
-       return true;\r
-}\r
-function listItem(){\r
-       document.main.task.value = 'list';\r
-       document.main.submit();\r
-       return true;\r
-}\r
-<patTemplate:tmpl name="show_script" visibility="hidden">\r
-$(function(){\r
-       var centerPos = new google.maps.LatLng({LAT}, {LNG});\r
-       var opts = {    zoom: {ZOOM},\r
-                       center: centerPos,\r
-                       mapTypeId: google.maps.MapTypeId.ROADMAP        };\r
-       var map = new google.maps.Map(document.getElementById("preview_map"), opts);\r
-<patTemplate:tmpl name="show_marker" visibility="hidden">\r
-       var markerPos = new google.maps.LatLng({MARKER_LAT}, {MARKER_LNG});\r
-       var marker = new google.maps.Marker({ position: markerPos, map: map });</patTemplate:tmpl>\r
-});\r
-</patTemplate:tmpl>\r
-//]]>\r
-</script>\r
-<div align="center">\r
-<br />\r
-<!-- m3:ErrorMessage -->\r
-<form method="post" name="main" class="form">\r
-<input type="hidden" name="task" />\r
-<input type="hidden" name="act" />\r
-<input type="hidden" name="serial" value="{SERIAL}" />\r
-<!-- m3:PostParam -->\r
-<table width="90%">\r
-<tr><td><span {_HELP_ITEM_DETAIL}><label>Googleマップ項目</label></span></td>\r
-<td align="right"><span {_HELP_ITEM_LIST_BTN}><input type="button" class="button" onclick="listItem();" value="一覧" /></span>\r
-</td></tr>\r
-<tr><td colspan="2">\r
-\r
-<table class="simple-table" width="100%">\r
-    <tbody>\r
-        <tr>\r
-           <td class="table-headside" width="150"><span {_HELP_ITEM_NAME_INPUT}>名前</span></td>\r
-           <td>\r
-           <select name="item_id" onchange="selectItem();" {ID_DISABLED}>\r
-               <option value="0">-- 新規登録 --</option>\r
-               <patTemplate:tmpl name="title_list">\r
-               <option value="{VALUE}" {SELECTED}>{NAME}</option>\r
-               </patTemplate:tmpl>\r
-           </select>\r
-           <patTemplate:tmpl name="item_name_visible" visibility="hidden">\r
-           <input type="text" name="item_name" value="{NAME}" size="40" maxlength="40" />\r
-           </patTemplate:tmpl>\r
-           </td>\r
-       </tr>\r
-        <tr class="even">\r
-           <td class="table-headside"><span {_HELP_ITEM_MAP_POS}>マップ表示位置(中心)</span></td>\r
-           <td>緯度:<input type="text" name="item_lat" value="{LAT}" size="15" maxlength="20" />&nbsp;&nbsp;経度:<input type="text" name="item_lng" value="{LNG}" size="15" maxlength="20" /><a href="{CODING_URL}" target="_blank">緯度経度を取得</a></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside"><span {_HELP_ITEM_MAP_SIZE}>表示サイズ</span></td>\r
-           <td>幅:<input type="text" name="item_width" value="{WIDTH}" size="3" maxlength="3" />\r
-           &nbsp;&nbsp;高さ:<input type="text" name="item_height" value="{HEIGHT}" size="3" maxlength="3" />\r
-           &nbsp;&nbsp;ズームレベル:<input type="text" name="item_zoom" value="{ZOOM}" size="3" maxlength="3" />\r
-           </td>\r
-       </tr>\r
-        <tr class="even">\r
-           <td class="table-headside"><span {_HELP_ITEM_MARKER}>マーカー</span></td>\r
-           <td><input type="checkbox" name="item_show_marker" {SHOW_MARKER_CHECKED} />表示&nbsp;&nbsp;緯度:<input type="text" name="item_marker_lat" value="{MARKER_LAT}" size="15" maxlength="20" />&nbsp;&nbsp;経度:<input type="text" name="item_marker_lng" value="{MARKER_LNG}" size="15" maxlength="20" /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside"><span {_HELP_ITEM_ALT}>代替テキスト</span></td>\r
-           <td><input type="text" name="item_alt" value="{ALT}" size="40" maxlength="40" /></td>\r
-       </tr>\r
-       <tr class="even">\r
-           <td align="right" colspan="2">\r
-<patTemplate:tmpl name="del_button" visibility="hidden">\r
-               <input type="button" class="button" onclick="deleteItem();" value="削除" />\r
-</patTemplate:tmpl>\r
-<patTemplate:tmpl name="update_button" visibility="hidden">\r
-               <input type="button" class="button" onclick="updateItem();" value="更新" />\r
-</patTemplate:tmpl>\r
-<patTemplate:tmpl name="add_button" visibility="hidden">\r
-               <input type="button" class="button" onclick="addItem();" value="新規追加" />\r
-</patTemplate:tmpl>\r
-           </td>\r
-       </tr>\r
-    </tbody>\r
-</table>\r
-</td></tr>\r
-<tr><td colspan="2">\r
-<br />\r
-<div><span {_HELP_ITEM_MAP_PREVIEW}><label>Googleマッププレビュー</label></span></div>\r
-<div id="preview_map" style="width:{WIDTH}px;height:{HEIGHT}px;"></div>\r
-<br />\r
-</td></tr>\r
-</table>\r
-\r
-</form>\r
-</div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/googlemaps/include/template/admin_list.tmpl.html b/widgets/m/googlemaps/include/template/admin_list.tmpl.html
deleted file mode 100644 (file)
index beb5d4c..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/**\r
- * 表示データ作成用テンプレート(patTemplate)\r
- *\r
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.\r
- *\r
- * @package    Magic3 Framework\r
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>\r
- * @copyright  Copyright 2006-2012 Magic3 Project.\r
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License\r
- * @version    SVN: $Id: admin_list.tmpl.html 4770 2012-03-19 12:15:19Z fishbone $\r
- * @link       http://www.magic3.org\r
- */\r
-<patTemplate:tmpl name="_widget">\r
-<script type="text/javascript">\r
-//<![CDATA[\r
-function delItem(){\r
-       if (document.main.seriallist.value){\r
-               var items = document.main.seriallist.value.split(",");\r
-               for (var i = 0; i < items.length; i++){\r
-                       var name = "document.main.item" + i + "_selected";\r
-                       var itemObj = eval(name);\r
-                       // チェックありのときは終了\r
-                       if (itemObj && itemObj.checked) break;\r
-               }\r
-               if (i == items.length){                 \r
-                       window.alert('削除する項目を選択してください');\r
-               } else {\r
-                       if (!window.confirm('選択項目を削除しますか?')) return false;\r
-                       document.main.act.value = 'delete';\r
-                       document.main.submit();\r
-               }\r
-       }\r
-       return true;\r
-}\r
-function cancelItem(){\r
-       document.main.task.value = '';\r
-       document.main.submit();\r
-       return true;\r
-}\r
-function showPreview(width, height, lat, lng, zoom, markerLat, markerLng, marker){\r
-       // 表示エリアのサイズ調整\r
-       var preview = $('#preview_map');\r
-       preview.width(width);\r
-       preview.height(height);\r
-       \r
-       // プレビューの更新\r
-       var centerPos = new google.maps.LatLng(lat, lng);\r
-       var opts = {    zoom: zoom,\r
-                       center: centerPos,\r
-                       mapTypeId: google.maps.MapTypeId.ROADMAP        };\r
-       var map = new google.maps.Map(document.getElementById("preview_map"), opts);\r
-       if (marker){\r
-               var markerPos = new google.maps.LatLng(markerLat, markerLng);\r
-               var marker = new google.maps.Marker({ position: markerPos, map: map });\r
-       }\r
-}\r
-$(function(){\r
-       // スクロールバー付きのテーブルを作成\r
-       m3_tableWithScrollbar('itemlist', -1, 0);\r
-});\r
-//]]>\r
-</script>\r
-<div align="center">\r
-<br />\r
-<!-- m3:ErrorMessage -->\r
-<form method="post" name="main">\r
-<input type="hidden" name="task" value="list" />\r
-<input type="hidden" name="act" />\r
-<input type="hidden" name="serial" />\r
-<input type="hidden" name="seriallist" value="{SERIAL_LIST}" />\r
-<!-- m3:PostParam -->\r
-<table width="90%">\r
-<tr><td>\r
-<span {_HELP_ITEM_LIST}><label>Googleマップ定義一覧</label></span>\r
-</td><td align="right"><span {_HELP_ITEM_DEL_BTN}><input type="button" class="button" onclick="delItem();" value="削除" /></span>\r
-<span {_HELP_ITEM_RET_BTN}><input type="button" class="button" onclick="cancelItem();" value="戻る" /></span>\r
-</td></tr>\r
-<tr><td colspan="2">\r
-<table id="itemlist" class="simple-table" width="100%">\r
-    <thead>\r
-        <tr>\r
-           <th width="35" align="center"><span {_HELP_ITEM_CHECK}>選択</span></th>\r
-           <th width="40%" align="center"><span {_HELP_ITEM_NAME}>名前</span></th>\r
-           <th align="center"><span {_HELP_ITEM_REF}>使用</span></th>\r
-       </tr>\r
-    </thead>\r
-    <tbody>\r
-        <patTemplate:tmpl name="itemlist">\r
-        <tr onclick="showPreview({WIDTH}, {HEIGHT}, {LAT}, {LNG}, {ZOOM}, {MARKER_LAT}, {MARKER_LNG}, {MARKER});">\r
-            <td align="center"><input type="checkbox" name="item{INDEX}_selected" {OPE_DISABLED} /></td>\r
-           <td>{NAME}</td>\r
-           <td align="center">{DEF_COUNT}</td>\r
-       </tr>\r
-       </patTemplate:tmpl>\r
-    </tbody>\r
-</table>\r
-</td></tr>\r
-<tr><td colspan="2">\r
-<br />\r
-<div><span {_HELP_ITEM_MAP_PREVIEW}><label>Googleマッププレビュー</label></span></div>\r
-<div id="preview_map"></div>\r
-<br />\r
-</td></tr>\r
-</table>\r
-\r
-</form>\r
-</div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/googlemaps/include/template/index.tmpl.html b/widgets/m/googlemaps/include/template/index.tmpl.html
deleted file mode 100644 (file)
index 68c64f1..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/**\r
- * 表示データ作成用テンプレート(patTemplate)\r
- *\r
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.\r
- *\r
- * @package    Magic3 Framework\r
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>\r
- * @copyright  Copyright 2006-2012 Magic3 Project.\r
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License\r
- * @version    SVN: $Id: index.tmpl.html 4771 2012-03-19 12:20:05Z fishbone $\r
- * @link       http://www.magic3.org\r
- */\r
-<patTemplate:tmpl name="_widget">\r
-<div><img src="{URL}" {OPTION}/></div>\r
-<div><a href="{URL_LARGE}" accesskey="*">詳細</a>[*]&nbsp;<a href="{URL_SMALL}" accesskey="#">広域</a>[#]</div>\r
-<div>移動<a href="{URL_LEFT}" accesskey="4">←</a>[#M3_EMOJI:128#]&nbsp;<a href="{URL_RIGHT}" accesskey="6">→</a>[#M3_EMOJI:130#]&nbsp;<a href="{URL_UP}" accesskey="2">↑</a>[#M3_EMOJI:126#]&nbsp;<a href="{URL_DOWN}" accesskey="8">↓</a>[#M3_EMOJI:132#]</div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/googlemaps/index.php b/widgets/m/googlemaps/index.php
deleted file mode 100644 (file)
index bfc3d4d..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2010 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 3731 2010-10-25 06:29:17Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/menu/admin/index.php b/widgets/m/menu/admin/index.php
deleted file mode 100644 (file)
index 7329894..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 1345 2008-12-12 10:02:42Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/menu/images/icon32.png b/widgets/m/menu/images/icon32.png
deleted file mode 100644 (file)
index 58c1d16..0000000
Binary files a/widgets/m/menu/images/icon32.png and /dev/null differ
diff --git a/widgets/m/menu/images/icon64.png b/widgets/m/menu/images/icon64.png
deleted file mode 100644 (file)
index ce70280..0000000
Binary files a/widgets/m/menu/images/icon64.png and /dev/null differ
diff --git a/widgets/m/menu/include/container/admin_m_menuWidgetContainer.php b/widgets/m/menu/include/container/admin_m_menuWidgetContainer.php
deleted file mode 100644 (file)
index 0d9ab1c..0000000
+++ /dev/null
@@ -1,429 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2014 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id$
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseAdminWidgetContainer.php');
-require_once($gEnvManager->getCurrentWidgetDbPath() . '/menuDb.php');
-
-class admin_m_menuWidgetContainer extends BaseAdminWidgetContainer
-{
-       private $db;    // DB接続オブジェクト
-       private $serialNo;              // 選択中の項目のシリアル番号
-       private $serialArray = array();                 // 表示中のシリアル番号
-       private $langId;
-       private $configId;              // 定義ID
-       private $paramObj;              // パラメータ保存用オブジェクト
-       private $menuId;                // メニューID
-       const DEFAULT_NAME_HEAD = '名称未設定';                    // デフォルトの設定名
-       const DEFAULT_MENU_ID = 'm_main_menu';                  // デフォルトメニューID
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-               
-               // DBオブジェクト作成
-               $this->db = new menuDb();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               $task = $request->trimValueOf('task');
-               if ($task == 'list'){           // 一覧画面
-                       return 'admin_list.tmpl.html';
-               } else {                        // 一覧画面
-                       return 'admin.tmpl.html';
-               }
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $task = $request->trimValueOf('task');
-               if ($task == 'list'){           // 一覧画面
-                       $this->createList($request);
-               } else {                        // 詳細設定画面
-                       $this->createDetail($request);
-               }
-       }
-       /**
-        * 詳細画面作成
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param                                                               なし
-        */
-       function createDetail($request)
-       {
-               // ページ定義IDとページ定義のレコードシリアル番号を取得
-               $this->startPageDefParam($defSerial, $defConfigId, $this->paramObj);
-               
-               $userId         = $this->gEnv->getCurrentUserId();
-               $this->langId   = $this->gEnv->getCurrentLanguage();            // 表示言語を取得
-               $anchor = $request->trimValueOf('anchor');
-               $act = $request->trimValueOf('act');
-               $this->serialNo = $request->trimValueOf('serial');              // 選択項目のシリアル番号
-
-               $this->configId = $request->trimValueOf('item_id');             // 定義ID
-               if (empty($this->configId)) $this->configId = $defConfigId;             // 呼び出しウィンドウから引き継いだ定義ID
-               $this->menuId = $request->trimValueOf('menuid');
-               if (empty($this->menuId)) $this->menuId = self::DEFAULT_MENU_ID;
-               $name   = $request->trimValueOf('item_name');                   // ヘッダタイトル
-               $limitUser = ($request->trimValueOf('item_limituser') == 'on') ? 1 : 0;         // ユーザを制限するかどうか
-               
-               $replaceNew = false;            // データを再取得するかどうか
-               if (empty($act)){// 初期起動時
-                       // デフォルト値設定
-                       $this->configId = $defConfigId;         // 呼び出しウィンドウから引き継いだ定義ID
-                       $replaceNew = true;                     // データ再取得
-               } else if ($act == 'add'){// 新規追加
-                       // 入力チェック
-                       $this->checkInput($name, '名前');
-                       
-                       // エラーなしの場合は、データを登録
-                       if ($this->getMsgCount() == 0){
-                               // 追加オブジェクト作成
-                               $newObj = new stdClass;
-                               $newObj->menuId = $this->menuId;                // メニューID
-                               $newObj->name   = $name;// 表示名
-                               $newObj->limitUser = $limitUser;                                        // ユーザを制限するかどうか
-                               
-                               $ret = $this->addPageDefParam($defSerial, $defConfigId, $this->paramObj, $newObj, $this->menuId);
-                               if ($ret){
-                                       $this->setGuidanceMsg('データを追加しました');
-                                       
-                                       $this->configId = $defConfigId;         // 定義定義IDを更新
-                                       $replaceNew = true;                     // データ再取得
-                               } else {
-                                       $this->setAppErrorMsg('データ追加に失敗しました');
-                               }
-                       }
-               } else if ($act == 'update'){           // 設定更新のとき
-                       // 入力値のエラーチェック
-                       
-                       if ($this->getMsgCount() == 0){                 // エラーのないとき
-                               // 現在の設定値を取得
-                               $ret = $this->getPageDefParam($defSerial, $defConfigId, $this->paramObj, $this->configId, $targetObj);
-                               if ($ret){
-                                       // ウィジェットオブジェクト更新。更新値のみ再設定。
-                                       if (!empty($defConfigId) && !empty($defSerial)){                // 設定再選択不可の場合
-                                               // 取得値で更新
-                                               $this->menuId = $targetObj->menuId;             // メニューID
-                                       } else {                        // 新規で既存設定の更新
-                                               $targetObj->menuId      = $this->menuId;                // メニューID
-                                       }
-                                       $targetObj->limitUser = $limitUser;                                     // ユーザを制限するかどうか
-                               }
-
-                               // 設定値を更新
-                               if ($ret) $ret = $this->updatePageDefParam($defSerial, $defConfigId, $this->paramObj, $this->configId, $targetObj, $this->menuId);
-                               if ($ret){
-                                       $this->setMsg(self::MSG_GUIDANCE, 'データを更新しました');
-                                       
-                                       $replaceNew = true;                     // データ再取得
-                               } else {
-                                       $this->setMsg(self::MSG_APP_ERR, 'データ更新に失敗しました');
-                               }
-                       }
-               } else if ($act == 'select'){   // 定義IDを変更
-                       $replaceNew = true;                     // データ再取得
-               }
-               
-               // 表示用データを取得
-               if (empty($this->configId)){            // 新規登録の場合
-                       $this->tmpl->setAttribute('item_name_visible', 'visibility', 'visible');// 名前入力フィールド表示
-                       
-                       if ($replaceNew){               // データ再取得時
-                               $this->menuId = self::DEFAULT_MENU_ID;
-                               $name = $this->createDefaultName();                     // デフォルト登録項目名
-                               $limitUser = 0;                                 // ユーザを制限するかどうか
-                       }
-                       $this->serialNo = 0;
-               } else {
-                       if ($replaceNew){
-                               $ret = $this->getPageDefParam($defSerial, $defConfigId, $this->paramObj, $this->configId, $targetObj);
-                               if ($ret){
-                                       $this->menuId   = $targetObj->menuId;           // メニューID
-                                       $name                   = $targetObj->name;// 名前
-                                       $limitUser              = $targetObj->limitUser;                                        // ユーザを制限するかどうか
-                               }
-                       }
-                       $this->serialNo = $this->configId;
-                               
-                       // 新規作成でないときは、メニューを変更不可にする(画面作成から呼ばれている場合のみ)
-                       if (!empty($defConfigId) && !empty($defSerial)) $this->tmpl->addVar("_widget", "id_disabled", 'disabled');
-               }
-               // 設定項目選択メニュー作成
-               $this->createItemMenu();
-               
-               // メニューID選択メニュー作成
-               $this->db->getMenuIdList(1/*携帯用*/, array($this, 'menuIdListLoop'));
-               
-               // 一度設定を保存している場合は、メニュー定義を前面にする(初期起動時のみ)
-               $activeIndex = 0;
-               if (empty($act) && !empty($this->configId)) $activeIndex = 1;
-               // 一覧画面からの戻り画面が指定されてる場合は優先する
-               if ($anchor == 'widget_config') $activeIndex = 0;
-               
-               // ナビゲーションタブ作成
-               $tabItemIndex = 0;
-               $tabDef = array();
-               $tabItem = new stdClass;
-               $tabItem->name  = 'ウィジェット設定';
-               $tabItem->task  = '';
-               $tabItem->url   = '#widget_config';
-               $tabItem->parent        = 0;
-//             $tabItem->active        = ($tabItemIndex == $activeIndex) ? true : false;
-               $tabItem->active        = false;
-               $tabDef[] = $tabItem; $tabItemIndex++;
-               $tabItem = new stdClass;
-               $tabItem->name  = 'メニュー定義';
-               $tabItem->task  = '';
-               $tabItem->url   = '#menu_define';
-               $tabItem->parent        = 0;
-//             $tabItem->active        = ($tabItemIndex == $activeIndex) ? true : false;
-               $tabItem->active        = false;
-               $tabDef[] = $tabItem; $tabItemIndex++;
-               $tabHtml = $this->gDesign->createConfigNavTab($tabDef);
-               $this->tmpl->addVar("_widget", "nav_tab", $tabHtml);
-               if (empty($activeIndex)){               // タブの選択
-                       $this->tmpl->addVar("_widget", "active_tab", 'widget_config');
-               } else {
-                       $this->tmpl->addVar("_widget", "active_tab", 'menu_define');
-               }
-               
-               // 画面にデータを埋め込む
-               $this->tmpl->addVar("item_name_visible", "name", $name);                // 名前
-               if (!empty($this->configId)) $this->tmpl->addVar("_widget", "id", $this->configId);             // 定義ID
-               
-               $this->tmpl->addVar("_widget", "limit_user", $this->convertToCheckedString($limitUser));        // ユーザを制限するかどうか
-               
-               $this->tmpl->addVar("_widget", "serial", $this->serialNo);// 選択中のシリアル番号、IDを設定
-               
-               // ボタンの表示制御
-               if (empty($this->serialNo)){            // 新規追加項目を選択しているとき
-                       $this->tmpl->setAttribute('add_button', 'visibility', 'visible');// 「新規追加」ボタン
-               } else {
-                       $this->tmpl->setAttribute('update_button', 'visibility', 'visible');// 「更新」ボタン
-               }
-               
-               // ページ定義IDとページ定義のレコードシリアル番号を更新
-               $this->endPageDefParam($defSerial, $defConfigId, $this->paramObj);
-       }
-       /**
-        * 選択用メニューを作成
-        *
-        * @return なし                                               
-        */
-       function createItemMenu()
-       {
-               for ($i = 0; $i < count($this->paramObj); $i++){
-                       $id = $this->paramObj[$i]->id;// 定義ID
-                       $targetObj = $this->paramObj[$i]->object;
-                       $name = $targetObj->name;// 定義名
-                       $selected = '';
-                       if ($this->configId == $id) $selected = 'selected';
-
-                       $row = array(
-                               'name' => $name,                // 名前
-                               'value' => $id,         // 定義ID
-                               'selected' => $selected // 選択中の項目かどうか
-                       );
-                       $this->tmpl->addVars('title_list', $row);
-                       $this->tmpl->parseTemplate('title_list', 'a');
-               }
-       }
-       /**
-        * デフォルトの名前を取得
-        *
-        * @return string       デフォルト名                                              
-        */
-       function createDefaultName()
-       {
-               $name = self::DEFAULT_NAME_HEAD;
-               for ($j = 1; $j < 100; $j++){
-                       $name = self::DEFAULT_NAME_HEAD . $j;
-                       // 設定名の重複チェック
-                       for ($i = 0; $i < count($this->paramObj); $i++){
-                               $targetObj = $this->paramObj[$i]->object;
-                               if ($name == $targetObj->name){         // 定義名
-                                       break;
-                               }
-                       }
-                       // 重複なしのときは終了
-                       if ($i == count($this->paramObj)) break;
-               }
-               return $name;
-       }
-       /**
-        * 取得したデータをテンプレートに設定する
-        *
-        * @param int $index                    行番号(0~)
-        * @param array $fetchedRow             フェッチ取得した行
-        * @param object $param                 未使用
-        * @return bool                                 true=処理続行の場合、false=処理終了の場合
-        */
-       function menuIdListLoop($index, $fetchedRow, $param)
-       {
-               $value = $fetchedRow['mn_id'];
-               $name = $fetchedRow['mn_name'] . '(' . $value . ')';
-                       
-               $selected = '';
-               if ($value == $this->menuId) $selected = 'selected';
-               
-               $row = array(
-                       'value'    => $value,                   // ページID
-                       'name'     => $name,                    // ページ名
-                       'selected' => $selected                                                                                                         // 選択中かどうか
-               );
-               $this->tmpl->addVars('menu_id_list', $row);
-               $this->tmpl->parseTemplate('menu_id_list', 'a');
-               return true;
-       }
-       /**
-        * 一覧画面作成
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param                                                               なし
-        */
-       function createList($request)
-       {
-               // ページ定義IDとページ定義のレコードシリアル番号を取得
-               $this->startPageDefParam($defSerial, $defConfigId, $this->paramObj);
-               
-               $userId         = $this->gEnv->getCurrentUserId();
-               $langId = $this->gEnv->getCurrentLanguage();            // 表示言語を取得
-               $act = $request->trimValueOf('act');
-
-               // 詳細画面からの引継ぎデータ
-               $menuId = $request->trimValueOf('menuid');
-               
-               if ($act == 'delete'){          // メニュー項目の削除
-                       $listedItem = explode(',', $request->trimValueOf('seriallist'));
-                       $delItems = array();
-                       for ($i = 0; $i < count($listedItem); $i++){
-                               // 項目がチェックされているかを取得
-                               $itemName = 'item' . $i . '_selected';
-                               $itemValue = ($request->trimValueOf($itemName) == 'on') ? 1 : 0;
-                               
-                               if ($itemValue){                // チェック項目
-                                       $delItems[] = $listedItem[$i];
-                               }
-                       }
-                       if (count($delItems) > 0){
-                               $ret = $this->delPageDefParam($defSerial, $defConfigId, $this->paramObj, $delItems);
-                               if ($ret){              // データ削除成功のとき
-                                       $this->setGuidanceMsg('データを削除しました');
-                               } else {
-                                       $this->setAppErrorMsg('データ削除に失敗しました');
-                               }
-                       }
-               }
-               // 定義一覧作成
-               $this->createItemList();
-               if (count($this->serialArray) <= 0) $this->tmpl->setAttribute('itemlist', 'visibility', 'hidden');// 一覧非表示
-               
-               // 選択状態はメニュー設定に固定
-               $activeIndex = 0;
-               
-               // ナビゲーションタブ作成
-               $tabItemIndex = 0;
-               $tabDef = array();
-               $tabItem = new stdClass;
-               $tabItem->name  = 'ウィジェット設定';
-               $tabItem->task  = '';
-               $tabItem->url   = '#widget_config';
-               $tabItem->parent        = 0;
-               $tabItem->active        = false;
-               $tabDef[] = $tabItem; $tabItemIndex++;
-               $tabItem = new stdClass;
-               $tabItem->name  = 'メニュー定義';
-               $tabItem->task  = '';
-               $tabItem->url   = '#menu_define';
-               $tabItem->parent        = 0;
-               $tabItem->active        = false;
-               $tabDef[] = $tabItem; $tabItemIndex++;
-               $tabHtml = $this->gDesign->createConfigNavTab($tabDef);
-               $this->tmpl->addVar("_widget", "nav_tab", $tabHtml);
-               
-               // メニュー定義画面のURLを作成
-               $taskValue = 'smenudef';
-               $menuDefUrl = $this->gEnv->getDefaultAdminUrl() . '?' . 'task=' . $taskValue . '&openby=tabs&menuid=' . $menuId;
-               $this->tmpl->addVar("_widget", "url", $this->getUrl($menuDefUrl));
-               $this->tmpl->addVar("_widget", "menu_id", $menuId);
-                                       
-               $this->tmpl->addVar("_widget", "serial_list", implode($this->serialArray, ','));// 表示項目のシリアル番号を設定
-               
-               // ページ定義IDとページ定義のレコードシリアル番号を更新
-               $this->endPageDefParam($defSerial, $defConfigId, $this->paramObj);
-       }
-       /**
-        * 定義一覧作成
-        *
-        * @return なし                                               
-        */
-       function createItemList()
-       {
-               for ($i = 0; $i < count($this->paramObj); $i++){
-                       $id                     = $this->paramObj[$i]->id;// 定義ID
-                       $targetObj      = $this->paramObj[$i]->object;
-                       $name = $targetObj->name;// 定義名
-                       
-                       // メニュー定義名を取得
-                       $menuName = '';
-                       if ($this->db->getMenu($targetObj->menuId, $row)){
-                               $menuName = $row['mn_name'] . '(' . $row['mn_id'] . ')';
-                       }
-                       
-                       $defCount = 0;
-                       if (!empty($id)){
-                               $defCount = $this->_db->getPageDefCount($this->gEnv->getCurrentWidgetId(), $id);
-                       }
-                       $operationDisagled = '';
-                       if ($defCount > 0) $operationDisagled = 'disabled';
-                       $row = array(
-                               'index' => $i,
-                               'id' => $id,
-                               'ope_disabled' => $operationDisagled,                   // 選択可能かどうか
-                               'name' => $this->convertToDispString($name),            // 名前
-                               'menu_name' => $this->convertToDispString($menuName),           // メニュー定義名
-                               'def_count' => $defCount                                                        // 使用数
-                       );
-                       $this->tmpl->addVars('itemlist', $row);
-                       $this->tmpl->parseTemplate('itemlist', 'a');
-                       
-                       // シリアル番号を保存
-                       $this->serialArray[] = $id;
-               }
-       }
-}
-?>
diff --git a/widgets/m/menu/include/container/m_menuWidgetContainer.php b/widgets/m/menu/include/container/m_menuWidgetContainer.php
deleted file mode 100644 (file)
index 3062573..0000000
+++ /dev/null
@@ -1,232 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2013 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id$
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseWidgetContainer.php');
-require_once($gEnvManager->getCurrentWidgetDbPath() . '/menuDb.php');
-
-class m_menuWidgetContainer extends BaseWidgetContainer
-{
-       private $db;                    // DB接続オブジェクト
-       private $langId;                // 現在の言語
-       private $paramObj;              // 定義取得用
-       private $templateType;          // テンプレートのタイプ
-       private $currentUserLogined;    // 現在のユーザはログイン中かどうか
-       const DEFAULT_CONFIG_ID = 0;
-       const MAX_MENU_TREE_LEVEL = 5;                  // メニュー階層最大数
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-               
-               // DBオブジェクト作成
-               $this->db = new menuDb();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'index.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $this->langId = $this->gEnv->getCurrentLanguage();
-               $this->currentUserLogined = $this->gEnv->isCurrentUserLogined();        // 現在のユーザはログイン中かどうか
-               
-               // 定義ID取得
-               $configId = $this->gEnv->getCurrentWidgetConfigId();
-               if (empty($configId)) $configId = self::DEFAULT_CONFIG_ID;
-               
-               // パラメータオブジェクトを取得
-               $targetObj = $this->getWidgetParamObjByConfigId($configId);
-               if (empty($targetObj)){         // 定義データが取得できないとき
-                       // 出力抑止
-                       $this->cancelParse();
-               } else {
-                       $menuId         = $targetObj->menuId;   // メニューID
-                       $name           = $targetObj->name;// 定義名
-                       $limitUser      = $targetObj->limitUser;// ユーザを制限するかどうか
-
-                       // ユーザ制限があるときはログイン時のみ表示
-                       if (!$limitUser || $this->currentUserLogined){
-                               // メニュー作成
-                               $parentTree = array();                  // 選択されている項目までの階層パス
-                               $menuHtml = $this->createMenu($menuId, 0, 0, $tmp, $parentTree);
-                               
-                               if (!empty($menuHtml)) $this->tmpl->addVar("_widget", "menu_html", $menuHtml);
-                       } else {
-                               // 出力抑止
-                               $this->cancelParse();
-                       }
-               }
-       }
-       /**
-        * メニューツリー作成
-        *
-        * @param string        $menuId         メニューID
-        * @param int           $parantId       親メニュー項目ID
-        * @param int           $level          階層数
-        * @param bool          $hasSelectedChild       現在選択状態の子項目があるかどうか
-        * @param array     $parentTree 現在の階層パス
-        * @return string                               ツリーメニュータグ
-        */
-       function createMenu($menuId, $parantId, $level, &$hasSelectedChild, &$parentTree)
-       {
-               static $index = 0;              // インデックス番号
-               $hasSelectedChild = false;
-
-               // メニューの階層を制限
-               if ($level >= self::MAX_MENU_TREE_LEVEL) return '';
-               
-               $treeHtml = '';
-               if ($this->db->getChildMenuItems($menuId, $parantId, $this->langId, $rows)){
-                       $itemCount = count($rows);
-                       for ($i = 0; $i < $itemCount; $i++){
-                               $row = $rows[$i];
-                                                                       
-                               // 非表示のときは処理を飛ばす
-                               if (!$row['md_visible']) continue;
-                               
-                               // ユーザ制限がある場合はログイン状態をチェック
-                               if ($row['md_user_limited'] && !$this->currentUserLogined) continue;
-               
-                               // リンク先のコンテンツの表示状況に合わせる
-                               if ($row['md_content_type'] == M3_VIEW_TYPE_CONTENT){           // 汎用コンテンツの場合
-                                       // ログインユーザに表示制限されている場合はメニューを追加しない
-                                       if (!empty($row['cn_user_limited']) && !$this->currentUserLogined) continue;
-                               }
-                               
-                               // リンク先の作成
-                               $linkUrl = $row['md_link_url'];
-                               $linkUrl = $this->getUrl($linkUrl, true/*リンク用*/);
-                               if (empty($linkUrl)) $linkUrl = '#';
-                               
-                               // 選択状態の設定
-                               if ($this->checkMenuItemUrl($linkUrl)){
-                                       $hasSelectedChild = true;
-                               }
-                               
-                               // メニュー項目を作成
-                               $name = $this->getCurrentLangString($row['md_name']);
-                               $title = $this->getCurrentLangString($row['md_title']);         // タイトル(HTML可)
-                               if (empty($title)) $title = $name;
-                               if (empty($title)) continue;
-                               
-                               // メニュータイトルの処理。タグが含まれていない場合は文字をエスケープする。
-                               $stripName = strip_tags($title);
-                               if (strlen($stripName) == strlen($title)) $title = $this->convertToDispString($title);          // 文字列長が同じとき
-                               
-                               $index++;               // インデックス番号更新
-                                                               
-                               switch ($row['md_type']){
-                                       case 0:                 // リンク項目のとき
-                                       default:                // フォルダ等
-                                               $treeHtml .= '<a href="' . $this->convertUrlToHtmlEntity($linkUrl) . '" >' . $title . '</a><br />' . M3_NL;
-                                               break;
-                                       case 2:                 // テキストのとき
-                                               $treeHtml .= $title . '<br />' . M3_NL;
-                                               break;
-                                       case 3:                 // セパレータのとき
-                                               // ##### タグ作成 #####
-                                               $treeHtml .= '<hr />' . M3_NL;
-                                               break;
-                               }
-                       }
-               }
-               return $treeHtml;
-       }
-       /**
-        * メニュー項目の選択条件をチェック
-        *
-        * @param string $url   チェック対象のURL
-        * @return bool                 true=アクティブ、false=非アクティブ
-        */
-       function checkMenuItemUrl($url)
-       {
-               $currentUrl = $this->gEnv->getCurrentRequestUri();
-               
-               // 同じURLのとき
-               if ($url == $currentUrl) return true;
-               
-               // URLを解析
-               $queryArray = array();
-               $parsedUrl = parse_url($url);
-               if (!empty($parsedUrl['query'])) parse_str($parsedUrl['query'], $queryArray);           // クエリーの解析
-               
-               // ルートかどうかチェック(クエリー文字列なし)
-               if ($this->isRootUrl($url)){
-                       // ページサブIDで比較
-                       if ($this->gEnv->getCurrentPageSubId() == $this->gEnv->getDefaultPageSubId()) return true;
-               }
-               
-               // パラメータがサブページIDだけの場合はページサブIDで比較
-               if (count($queryArray) == 1 && isset($queryArray[M3_REQUEST_PARAM_PAGE_SUB_ID])){
-                       if ($this->gEnv->getCurrentPageSubId() == $queryArray[M3_REQUEST_PARAM_PAGE_SUB_ID]) return true;
-               }
-               return false;
-       }
-       /**
-        * URLがルートを指しているかどうか取得
-        *
-        * @param string $url   チェック対象のURL
-        * @return bool                 true=ルート、false=ルート以外
-        */
-       function isRootUrl($url)
-       {
-               $url = str_replace('https://', 'http://', $url);                // 一旦httpに統一
-               $systemUrl = str_replace('https://', 'http://', $this->gEnv->getRootUrl());             // 一旦httpに統一
-               $systemSslUrl = str_replace('https://', 'http://', $this->gEnv->getSslRootUrl());               // 一旦httpに統一
-
-               $parsedUrl = parse_url($url);
-               if (empty($parsedUrl['query'])){                // クエリ文字列がないことが条件。「#」はあっても良い。
-                       // パスを解析
-                       $relativePath = str_replace($systemUrl, '', $url);              // ルートURLからの相対パスを取得
-                       if (empty($relativePath)){                      // Magic3のルートURLの場合
-                               return true;
-                       } else if (strStartsWith($relativePath, '/') || strStartsWith($relativePath, '/' . M3_FILENAME_INDEX)){         // ルートURL配下のとき
-                               return true;
-                       } else {                // ルートURL以外のURLのとき(SSL用のURL以下かどうかチェック)
-                               $relativePath = str_replace($systemSslUrl, '', $url);           // ルートURLからの相対パスを取得
-                               if (empty($relativePath)){                      // Magic3のルートURLの場合
-                                       return true;
-                               } else if (strStartsWith($relativePath, '/') || strStartsWith($relativePath, '/' . M3_FILENAME_INDEX)){         // ルートURL配下のとき
-                                       return true;
-                               }
-                       }
-               }
-               return false;
-       }
-}
-?>
diff --git a/widgets/m/menu/include/db/menuDb.php b/widgets/m/menu/include/db/menuDb.php
deleted file mode 100644 (file)
index 970a5cf..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-<?php
-/**
- * DBクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2013 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id$
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getDbPath() . '/baseDb.php');
-
-class menuDb extends BaseDb
-{
-       /**
-        * メニューIDのリストを取得
-        *
-        * @param int $deviceType               端末タイプ(0=PC、1=携帯、2=スマートフォン)
-        * @param function $callback    コールバック関数
-        * @return                                              なし
-        */
-       function getMenuIdList($deviceType, $callback)
-       {
-               $queryStr  = 'SELECT * FROM _menu_id ';
-               $queryStr .=   'WHERE mn_widget_id = \'\' ';            // ウィジェット制限されていないメニュー
-               $queryStr .=     'AND mn_device_type = ? ';
-               $queryStr .=   'ORDER BY mn_sort_order';
-               $this->selectLoop($queryStr, array($deviceType), $callback);
-       }
-       /**
-        * メニュー項目を取得
-        *
-        * @param string $menuId                メニュー識別ID
-        * @param string $parentId              親項目ID
-        * @param string $langId                言語ID
-        * @param array  $rows                  取得レコード
-        * @return                                              true=取得、false=取得せず
-        */
-       function getChildMenuItems($menuId, $parentId, $langId, &$rows)
-       {
-               $now = date("Y/m/d H:i:s");     // 現在日時
-               $initDt = $this->gEnv->getInitValueOfTimestamp();
-               $params = array();
-               
-               //$queryStr  = 'SELECT md_id, md_name, md_type, md_link_type, md_link_url, md_visible, md_content_type, cn_user_limited FROM _menu_def ';
-               $queryStr  = 'SELECT * FROM _menu_def ';
-               if ($this->getDbType() == M3_DB_TYPE_PGSQL){            // PostgreSQLの場合
-                       $queryStr .=   'LEFT JOIN content ON md_content_type = ? AND md_content_id = cn_id::text AND cn_type = ? AND cn_language_id = ? AND cn_deleted = false ';
-               } else {                // MySQLの場合
-                       $queryStr .=   'LEFT JOIN content ON md_content_type = ? AND md_content_id = cn_id AND cn_type = ? AND cn_language_id = ? AND cn_deleted = false ';
-               }
-               $params[] = M3_VIEW_TYPE_CONTENT;               // 汎用コンテンツ
-               $params[] = '';                         // PC用コンテンツ
-               $params[] = $langId;
-               
-               // 共通の取得条件
-               $queryStr .=   'WHERE md_menu_id = ? ';
-               $queryStr .=     'AND md_parent_id = ? ';
-               $params[] = $menuId;
-               $params[] = $parentId;
-               
-               // 汎用コンテンツの表示条件
-               $queryStr .=    'AND (md_content_type != ? OR (md_content_type = ? ';
-               $queryStr .=    'AND cn_visible = true ';
-               $queryStr .=    'AND (cn_active_start_dt = ? OR (cn_active_start_dt != ? AND cn_active_start_dt <= ?)) ';
-               $queryStr .=    'AND (cn_active_end_dt = ? OR (cn_active_end_dt != ? AND cn_active_end_dt > ?)))) ';
-               $params[] = M3_VIEW_TYPE_CONTENT;               // 汎用コンテンツ
-               $params[] = M3_VIEW_TYPE_CONTENT;               // 汎用コンテンツ
-               $params[] = $initDt;
-               $params[] = $initDt;
-               $params[] = $now;
-               $params[] = $initDt;
-               $params[] = $initDt;
-               $params[] = $now;
-               
-               $queryStr .=   'ORDER BY md_index';
-               $retValue = $this->selectRecords($queryStr, $params, $rows);
-               return $retValue;
-       }
-       /**
-        * メニュー情報の取得
-        *
-        * @param string  $id                   メニューID
-        * @return                                              true=正常、false=異常
-        */
-       function getMenu($id, &$row)
-       {
-               $queryStr  = 'SELECT * FROM _menu_id ';
-               $queryStr .=   'WHERE mn_id = ? ';
-               $ret = $this->selectRecord($queryStr, array($id), $row);
-               return $ret;
-       }
-}
-?>
diff --git a/widgets/m/menu/include/help/index.php b/widgets/m/menu/include/help/index.php
deleted file mode 100644 (file)
index 0d47632..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-/**
- * ヘルプリソースファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2013 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id$
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-global $HELP;
-
-// ########## メインメニュー項目一覧 ##########
-$HELP['menu_list']['title'] = 'メニュー設定一覧';
-$HELP['menu_list']['body'] = '登録されているメニュー設定の一覧です。';
-$HELP['menu_detail']['title'] = 'メニュー設定';
-$HELP['menu_detail']['body'] = 'メニューについての設定を行います。';
-$HELP['menu_check']['title'] = '選択用チェックボックス';
-$HELP['menu_check']['body'] = '削除を行う項目を選択します。';
-$HELP['menu_name']['title'] = '名前';
-$HELP['menu_name']['body'] = 'メニュー設定名です。メニューのタイトルにも使用されます。';
-$HELP['menu_name_input']['title'] = '名前';
-$HELP['menu_name_input']['body'] = 'メニュー設定名です。新規に登録するか、登録済みの設定を選択します。';
-$HELP['menu_id']['title'] = 'メニュー設定ID';
-$HELP['menu_id']['body'] = '自動的に振られるメニュー設定IDです。';
-$HELP['menu_limit_user']['title'] = 'ユーザ制限';
-$HELP['menu_limit_user']['body'] = 'メニューの表示をログインしたユーザに限定するかどうかを設定します。';
-$HELP['menu_def']['title'] = 'メニュー定義';
-$HELP['menu_def']['body'] = 'メニュー項目で使用するメニュー定義を選択します。定義データはシステムで共通です。<br />単階層でメニューを定義します。<br />メニューIDは管理機能の「システムマスター管理/メンテナンス/マスター管理/メニューID」で管理します。';
-$HELP['menu_ref']['title'] = '使用';
-$HELP['menu_ref']['body'] = 'メニュー設定を使用しているウィジェット数を示します。使用が0のメニュー設定のみ削除可能です。';
-$HELP['menu_list_btn']['title'] = '一覧ボタン';
-$HELP['menu_list_btn']['body'] = 'メニュー設定一覧を表示します。';
-$HELP['menu_del_btn']['title'] = '削除ボタン';
-$HELP['menu_del_btn']['body'] = '選択されているメニュー設定を削除します。<br />項目を選択するには、一覧の左端のチェックボックスにチェックを入れます。';
-$HELP['menu_ret_btn']['title'] = '戻るボタン';
-$HELP['menu_ret_btn']['body'] = 'メニュー設定へ戻ります。';
-$HELP['menu_edit_def_btn']['title'] = 'メニュー定義を編集ボタン';
-$HELP['menu_edit_def_btn']['body'] = '選択されているメニュー定義を編集します。';
-?>
diff --git a/widgets/m/menu/include/template/admin.tmpl.html b/widgets/m/menu/include/template/admin.tmpl.html
deleted file mode 100644 (file)
index 68f56d4..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * 表示データ作成用テンプレート(patTemplate)
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2014 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id$
- * @link       http://www.magic3.org
- */
-<patTemplate:tmpl name="_widget">
-<script type="text/javascript">
-//<![CDATA[
-function addItem(){
-       if (!window.confirm('項目を新規追加しますか?')) return false;
-       document.main.act.value = 'add';
-       document.main.submit();
-       return true;
-}
-function updateItem(){
-       if (!window.confirm('設定を更新しますか?')) return false;
-       document.main.act.value='update';
-       document.main.submit();
-       return true;
-}
-function selectItem()
-{
-       document.main.act.value = 'select';
-       document.main.submit();
-       return true;
-}
-function listItem(){
-       document.main.task.value = 'list';
-       document.main.submit();
-       return true;
-}
-function reloadMenuDef()
-{
-       var url = '';
-       var id = document.main.menuid.value;
-       url = "?task=smenudef&openby=tabs&menuid=" + id;
-       document.getElementById("menu_def").src = url;
-}
-function activateTab(tab)
-{
-       $('.nav-tabs a[href="#' + tab + '"]').tab('show');
-}
-$(function(){
-       // メニュー定義画面作成
-       reloadMenuDef();
-
-       // タブを選択
-       activateTab('{ACTIVE_TAB}');
-       
-       // 階層化の種別選択
-       $('#is_hier').click(function(){
-               reloadMenuDef();
-       });
-});
-//]]>
-</script>
-{NAV_TAB}
-<div class="m3config_tabs tab-content">
-<div id="widget_config" class="tab-pane">
-<!-- m3:ErrorMessage -->
-<form method="post" name="main">
-<input type="hidden" name="task" />
-<input type="hidden" name="act" />
-<input type="hidden" name="serial" value="{SERIAL}" />
-<!-- m3:PostParam -->
-<table style="margin: 0 auto;">
-<tr><td><span {_HELP_MENU_DETAIL}>メニュー設定</span></td>
-<td align="right"><span {_HELP_MENU_LIST_BTN}><input type="button" class="button" onclick="listItem();" value="設定一覧" /></span>
-</td></tr>
-<tr><td colspan="2">
-<table class="simple-table" style="margin:0 auto;width:950px;">
-    <tbody>
-        <tr>
-           <td class="table-headside" width="150"><span {_HELP_MENU_NAME_INPUT}>名前</span></td>
-           <td width="500">
-           <select name="item_id" onchange="selectItem();" {ID_DISABLED}>
-               <option value="0">-- 新規 --</option>
-               <patTemplate:tmpl name="title_list">
-               <option value="{VALUE}" {SELECTED}>{NAME}</option>
-               </patTemplate:tmpl>
-           </select>
-           <patTemplate:tmpl name="item_name_visible" visibility="hidden">
-           <input type="text" name="item_name" value="{NAME}" size="40" maxlength="40" style="width:50%;" />
-           </patTemplate:tmpl>
-           </td>
-           <td class="table-headside" width="150"><span {_HELP_MENU_ID}>ID</span></td>
-           <td align="center">{ID}
-           </td>
-       </tr>
-    <tr>
-           <td class="table-headside"><span {_HELP_MENU_DEF}>メニュー定義</span></td>
-           <td colspan="3">
-           <select name="menuid" {ID_DISABLED}>
-               <patTemplate:tmpl name="menu_id_list">
-               <option value="{VALUE}" {SELECTED}>{NAME}</option>
-               </patTemplate:tmpl>
-           </select>
-           <!--<span {_HELP_MENU_EDIT_DEF_BTN}><input id="edit_menu" type="button" class="button" value="メニュー定義を編集" /></span>-->
-           </td>
-       </tr>
-        <tr>
-           <td class="table-headside"><span {_HELP_MENU_LIMIT_USER}>ユーザ制限</span></td>
-           <td colspan="3"><input type="checkbox" name="item_limituser" {LIMIT_USER} />
-           </td>
-       </tr>
-       <tr>
-           <td align="right" colspan="4">
-<patTemplate:tmpl name="update_button" visibility="hidden">
-               <input type="button" class="button" onclick="updateItem();" value="更新" />
-</patTemplate:tmpl>
-<patTemplate:tmpl name="add_button" visibility="hidden">
-               <input type="button" class="button" onclick="addItem();" value="新規追加" />
-</patTemplate:tmpl>
-           </td>
-       </tr>
-    </tbody>
-</table>
-
-</td></tr>
-</table>
-</form>
-           </div>
-           <div id="menu_define" class="tab-pane m3config_fullwidth">
-           <iframe id="menu_def" name="menu_def" style="width:100%; height:2000px; border:none;" allowTransparency="true" frameborder="0">{_LC_LABEL_NENU_DEF}</iframe>
-           </div>
-</div>
-</patTemplate:tmpl>
diff --git a/widgets/m/menu/include/template/admin_list.tmpl.html b/widgets/m/menu/include/template/admin_list.tmpl.html
deleted file mode 100644 (file)
index 6d5eea1..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/**
- * 表示データ作成用テンプレート(patTemplate)
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2014 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id$
- * @link       http://www.magic3.org
- */
-<patTemplate:tmpl name="_widget">
-<script type="text/javascript">
-//<![CDATA[
-function delItem(){
-       if (document.main.seriallist.value){
-               var items = document.main.seriallist.value.split(",");
-               for (var i = 0; i < items.length; i++){
-                       var name = "document.main.item" + i + "_selected";
-                       var itemObj = eval(name);
-                       // チェックありのときは終了
-                       if (itemObj && itemObj.checked) break;
-               }
-               if (i == items.length){                 
-                       window.alert('削除する項目を選択してください');
-               } else {
-                       if (!window.confirm('選択項目を削除しますか?')) return false;
-                       document.main.act.value = 'delete';
-                       document.main.submit();
-               }
-       }
-       return true;
-}
-function cancelItem(){
-       document.main.task.value = '';
-       document.main.submit();
-       return true;
-}
-function reloadMenuDef()
-{
-       document.getElementById("menu_def").src = '{URL}';
-}
-function activateTab(tab)
-{
-       $('.nav-tabs a[href="#' + tab + '"]').tab('show');
-}
-$(function(){
-       // メニュー定義画面作成
-       reloadMenuDef();
-
-       // タブを選択
-       activateTab('widget_config');
-       
-       $('#m3navtab a[href="#widget_config"]').click(function(e){
-               e.preventDefault();
-               
-               cancelItem();
-               return false;
-       });
-       
-       // スクロールバー付きのテーブルを作成
-       m3_tableWithScrollbar('itemlist', -1, 0);
-});
-//]]>
-</script>
-{NAV_TAB}
-<div class="m3config_tabs tab-content">
-<div id="widget_config" class="tab-pane">
-<!-- m3:ErrorMessage -->
-<form method="post" name="main">
-<input type="hidden" name="task" value="list" />
-<input type="hidden" name="anchor" value="widget_config" />
-<input type="hidden" name="act" />
-<input type="hidden" name="serial" />
-<input type="hidden" name="seriallist" value="{SERIAL_LIST}" />
-<input type="hidden" name="menuid" value="{MENU_ID}" />
-<!-- m3:PostParam -->
-<table style="margin: 0 auto;">
-<tr><td>
-<span {_HELP_MENU_LIST}><label>メニュー設定一覧</label></span>
-</td><td align="right"><span {_HELP_MENU_DEL_BTN}><input type="button" class="button" onclick="delItem();" value="削除" /></span>
-<span {_HELP_MENU_RET_BTN}><input type="button" class="button" onclick="cancelItem();" value="戻る" /></span>
-</td></tr>
-<tr><td colspan="2">
-<table id="itemlist" class="simple-table" width="950">
-    <thead>
-        <tr>
-           <th width="35" align="center"><span {_HELP_MENU_CHECK}>選択</span></th>
-           <th width="35" align="center"><span {_HELP_MENU_ID}>ID</span></th>
-           <th width="40%" align="center"><span {_HELP_MENU_NAME}>名前</span></th>
-           <th width="40%" align="center"><span {_HELP_MENU_DEF}>メニュー定義</span></th>
-           <th align="center"><span {_HELP_MENU_REF}>使用</span></th>
-       </tr>
-    </thead>
-    <tbody>
-        <patTemplate:tmpl name="itemlist">
-        <tr>
-            <td align="center"><input type="checkbox" name="item{INDEX}_selected" {OPE_DISABLED} /></td>
-           <td align="center">{ID}</td>
-           <td>{NAME}</td>
-           <td>{MENU_NAME}</td>
-           <td align="center">{DEF_COUNT}</td>
-       </tr>
-       </patTemplate:tmpl>
-    </tbody>
-</table>
-</td></tr>
-</table>
-</form>
-           </div>
-        <div id="menu_define" class="tab-pane m3config_fullwidth">
-           <iframe id="menu_def" name="menu_def" style="width:100%; height:2000px; border:none;" allowTransparency="true" frameborder="0">{_LC_LABEL_NENU_DEF}</iframe>
-        </div>
-</div>
-</patTemplate:tmpl>
diff --git a/widgets/m/menu/include/template/index.tmpl.html b/widgets/m/menu/include/template/index.tmpl.html
deleted file mode 100644 (file)
index ef14a8b..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * 表示データ作成用テンプレート(patTemplate)
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2013 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id$
- * @link       http://www.magic3.org
- */
-<patTemplate:tmpl name="_widget">
-{MENU_HTML}
-</patTemplate:tmpl>
diff --git a/widgets/m/menu/index.php b/widgets/m/menu/index.php
deleted file mode 100644 (file)
index ea816fa..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2013 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id$
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/pc_content/admin/index.php b/widgets/m/pc_content/admin/index.php
deleted file mode 100644 (file)
index 6cfdcd6..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 876 2008-08-04 08:37:17Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/pc_content/images/icon32.png b/widgets/m/pc_content/images/icon32.png
deleted file mode 100644 (file)
index 4d028c3..0000000
Binary files a/widgets/m/pc_content/images/icon32.png and /dev/null differ
diff --git a/widgets/m/pc_content/images/icon64.png b/widgets/m/pc_content/images/icon64.png
deleted file mode 100644 (file)
index 4e158f9..0000000
Binary files a/widgets/m/pc_content/images/icon64.png and /dev/null differ
diff --git a/widgets/m/pc_content/include/container/admin_m_pc_contentWidgetContainer.php b/widgets/m/pc_content/include/container/admin_m_pc_contentWidgetContainer.php
deleted file mode 100644 (file)
index cd64838..0000000
+++ /dev/null
@@ -1,374 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2009 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: admin_m_pc_contentWidgetContainer.php 2568 2009-11-18 13:05:26Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseAdminWidgetContainer.php');
-require_once($gEnvManager->getCurrentWidgetDbPath() . '/pc_contentDb.php');
-
-class admin_m_pc_contentWidgetContainer extends BaseAdminWidgetContainer
-{
-       private $db;    // DB接続オブジェクト
-       private $serialNo;              // 選択中の項目のシリアル番号
-       private $serialArray = array();         // 表示されているコンテンツシリアル番号
-       private $_menuId = 'mobile_menu';                               // メインメニューID
-       private $isExistsContent;               // コンテンツ項目が存在するかどうか
-       const INC_INDEX = 1;            // メニュー項目表示順の増加分
-       const ADMIN_WIDGET_ID = 'admin_main';           // 管理ウィジェットのウィジェットID
-       const CONTENT_TYPE = 'ct';              // 参照数カウント用
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-               
-               // DBオブジェクト作成
-               $this->db = new pc_contentDb();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               $task = $request->trimValueOf('task');
-               if ($task == 'detail'){         // 詳細画面
-                       return 'admin_main_detail.tmpl.html';
-               } else {                        // 一覧画面
-                       return 'admin_main.tmpl.html';
-               }
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $task = $request->trimValueOf('task');
-               if ($task == 'detail'){ // 詳細画面
-                       return $this->createDetail($request);
-               } else {                        // 一覧画面
-                       return $this->createList($request);
-               }
-       }
-       /**
-        * コンテンツ一覧画面作成
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param                                                               なし
-        */
-       function createList($request)
-       {
-               // ユーザ情報、表示言語
-               $userId = $this->gEnv->getCurrentUserId();
-               $langId = $this->gEnv->getDefaultLanguage();
-               
-               $act = $request->trimValueOf('act');
-               if ($act == 'addtomenu'){                       // メニューに項目を追加
-                       $contentId = $request->trimValueOf('contentid');                // コンテンツID
-                       
-                       /*
-                       // このウィジェットがマップされているページサブIDを取得
-                       $subPageId = $this->gPage->getPageSubIdByWidget($this->gEnv->getDefaultPageId(), $this->gEnv->getCurrentWidgetId());
-                       $sub = '';
-                       if (!empty($subPageId)) $sub = 'sub=' . $subPageId . '&';
-                       
-                       // URLの作成
-                       $url = M3_TAG_START . M3_TAG_MACRO_ROOT_URL . M3_TAG_END . '/index.php?' . $sub . 'contentid=' . $contentId;*/
-                       // このウィジェットがマップされているページサブIDを取得
-                       $subPageId = $this->gPage->getPageSubIdByWidget($this->gEnv->getDefaultMobilePageId(), $this->gEnv->getCurrentWidgetId());
-                       $sub = '';
-                       if (!empty($subPageId)) $sub = 'sub=' . $subPageId . '&';
-                       
-                       // URLの作成
-                       $url = M3_TAG_START . M3_TAG_MACRO_ROOT_URL . M3_TAG_END . '/m/index.php?' . $sub . 'contentid=' . $contentId;
-
-                       // コンテンツ名を取得
-                       $menutItemName = '';
-                       $ret = $this->db->getContentByContentId($contentId, $langId, $row);
-                       if ($ret){
-                               // 取得値を設定
-                               $menutItemName = $row['cn_name'];               // 名前
-                       }
-                       
-                       // メニュー項目追加
-                       $ret = $this->db->addMenuItem($this->_menuId, $langId, $menutItemName, $url, self::INC_INDEX, $userId);
-                       if ($ret){
-                               $this->setGuidanceMsg('メインメニューに項目を追加しました');
-                       } else {
-                               $this->setAppErrorMsg('メインメニューの項目追加に失敗しました');
-                       }
-               } else if ($act == 'delete'){           // 項目削除の場合
-                       $listedItem = explode(',', $request->trimValueOf('seriallist'));
-                       $delItems = array();
-                       for ($i = 0; $i < count($listedItem); $i++){
-                               // 項目がチェックされているかを取得
-                               $itemName = 'item' . $i . '_selected';
-                               $itemValue = ($request->trimValueOf($itemName) == 'on') ? 1 : 0;
-                               
-                               if ($itemValue){                // チェック項目
-                                       $delItems[] = $listedItem[$i];
-                               }
-                       }
-                       if (count($delItems) > 0){
-                               $ret = $this->db->delContentItem($delItems);
-                               if ($ret){              // データ削除成功のとき
-                                       $this->setGuidanceMsg('データを削除しました');
-                               } else {
-                                       $this->setAppErrorMsg('データ削除に失敗しました');
-                               }
-                       }
-               }
-               
-               // コンテンツ項目リストをデフォルト言語で取得
-               $this->db->getAllContentItems(array($this, 'itemListLoop'), $langId);
-               $this->tmpl->addVar("_widget", "serial_list", implode($this->serialArray, ','));// 表示項目のシリアル番号を設定
-               // コンテンツ項目がないときは、一覧を表示しない
-               if (!$this->isExistsContent) $this->tmpl->setAttribute('itemlist', 'visibility', 'hidden');             
-       }
-       /**
-        * コンテンツ詳細画面作成
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param                                                               なし
-        */
-       function createDetail($request)
-       {
-               // ユーザ情報、表示言語
-               $langId = $this->gEnv->getDefaultLanguage();
-               
-               // ウィンドウ表示状態
-               $openby = $request->trimValueOf(M3_REQUEST_PARAM_OPEN_BY);
-               
-               $act = $request->trimValueOf('act');
-               $this->serialNo = $request->trimValueOf('serial');              // 選択項目のシリアル番号
-               $name = $request->trimValueOf('item_name');
-               $showTitle = ($request->trimValueOf('show_title') == 'on') ? 1 : 0;             // タイトルの表示
-               $titleBgColor = $request->trimValueOf('item_title_bgcolor');            // タイトルバックグランドカラー
-               $html = $request->valueOf('item_html');         // HTMLタグを可能とする
-               $key = $request->valueOf('item_key');           // 外部参照用キー
-               $visible = ($request->trimValueOf('item_visible') == 'on') ? 1 : 0;             // チェックボックス
-               $limited = ($request->trimValueOf('item_limited') == 'on') ? 1 : 0;             // チェックボックス
-               $default = ($request->trimValueOf('item_default') == 'on') ? 1 : 0;             // チェックボックス
-               
-               $reloadData = false;            // データの再読み込み
-               if ($act == 'add'){             // 項目追加の場合
-                       // 入力チェック
-                       $this->checkInput($name, '名前');
-                                       
-                       // エラーなしの場合は、データを登録
-                       if ($this->getMsgCount() == 0){
-                               $ret = $this->db->addContentItem(0, $langId, $name, ''/*説明*/, $html, $visible, $default, $limited, $key, $newSerial);
-                               
-                               // 表示属性はコンテンツIDを定義IDにして、ウィジェットパラメータとして保存
-                               /*if ($ret){
-                                       $paramObj = new stdClass;
-                                       $paramObj->showTitle    = $showTitle;           // タイトルの表示
-                                       $paramObj->titleBgColor = $titleBgColor;                // タイトルバックグランドカラー
-                                       $ret = $this->updateWidgetParamObjByConfigId($newContentId, $paramObj);
-                               }*/
-                               if ($ret){
-                                       $this->setGuidanceMsg('データを追加しました');
-                                       // シリアル番号更新
-                                       $this->serialNo = $newSerial;
-                                       $reloadData = true;             // データの再読み込み
-                               } else {
-                                       $this->setAppErrorMsg('データ追加に失敗しました');
-                               }
-                       }
-               } else if ($act == 'update'){           // 項目更新の場合
-                       // 入力チェック
-                       $this->checkInput($name, '名前');
-                       
-                       // エラーなしの場合は、データを更新
-                       if ($this->getMsgCount() == 0){
-                               $ret = $this->db->updateContentItem($this->serialNo, $name, $html, $visible, $default, $limited, $key, $newSerial);
-                               if ($ret){
-                                       $this->setGuidanceMsg('データを更新しました');
-                                       // シリアル番号更新
-                                       $this->serialNo = $newSerial;
-                                       $reloadData = true;             // データの再読み込み
-                               } else {
-                                       $this->setAppErrorMsg('データ更新に失敗しました');
-                               }
-                       }                               
-               } else if ($act == 'delete'){           // 項目削除の場合
-                       if (empty($this->serialNo)){
-                               $this->setUserErrorMsg('削除項目が選択されていません');
-                       }
-                       // エラーなしの場合は、データを削除
-                       if ($this->getMsgCount() == 0){
-                               $ret = $this->db->delContentItem(array($this->serialNo));
-                               if ($ret){              // データ削除成功のとき
-                                       $this->setGuidanceMsg('データを削除しました');
-                                       $reloadData = true;             // データの再読み込み
-                               } else {
-                                       $this->setAppErrorMsg('データ削除に失敗しました');
-                               }
-                       }
-               } else {
-                       // コンテンツIDが設定されているとき(他ウィジェットからの表示)は、データを取得
-                       $contentId = $request->trimValueOf('contentid');                // コンテンツID
-                       if (empty($contentId)){
-                               if (empty($this->serialNo)){            // 新規項目追加のとき
-                                       $visible = 1;           // 初期状態は表示
-                               } else {
-                                       $reloadData = true;             // データの再読み込み
-                               }
-                       } else {
-                               // コンテンツを取得
-                               $ret = $this->db->getContentByContentId($contentId, $langId, $row);
-                               if ($ret){
-                                       $this->serialNo = $row['cn_serial'];            // コンテンツシリアル番号
-                                       $reloadData = true;             // データの再読み込み
-                               } else {
-                                       $this->serialNo = 0;
-                               }
-                       }
-               }
-               if ($reloadData){               // データの再読み込み
-                       $ret = $this->db->getContentBySerial($this->serialNo, $row);
-                       if ($ret){
-                               $contentId = $row['cn_id'];             // コンテンツID
-                               $name = $row['cn_name'];                // コンテンツ名前
-                               $html = str_replace(M3_TAG_START . M3_TAG_MACRO_ROOT_URL . M3_TAG_END, $this->gEnv->getRootUrl(), $row['cn_html']);                             // HTML
-                               $key = $row['cn_key'];                                  // 外部参照用キー
-                               $update_user = $this->convertToDispString($row['lu_name']);// 更新者
-                               $update_dt = $this->convertToDispDateTime($row['cn_create_dt']);
-                       
-                               // 項目表示、デフォルト値チェックボックス
-                               $visible = $row['cn_visible'];
-                               $default = $row['cn_default'];
-                               $limited = $row['cn_user_limited'];             // ユーザ制限
-                       } else {
-                               $this->serialNo = 0;
-                       }
-               }
-               
-               // ### 入力値を再設定 ###
-               $this->tmpl->addVar("_widget", "sel_item_name", $name);         // 名前
-               $this->tmpl->addVar("_widget", "sel_item_html", $html);         // HTML
-               $this->tmpl->addVar("_widget", "sel_item_key", $key);           // 外部参照用キー
-               $this->tmpl->addVar("_widget", "update_user", $update_user);    // 更新者
-               $this->tmpl->addVar("_widget", "update_dt", $update_dt);        // 更新日時
-       
-               // 項目表示、項目利用可否チェックボックス
-               $visibleStr = '';
-               if ($visible) $visibleStr = 'checked';
-               $this->tmpl->addVar("_widget", "sel_item_visible", $visibleStr);
-               $defaultStr = '';
-               if ($default) $defaultStr = 'checked';
-               $this->tmpl->addVar("_widget", "sel_item_default", $defaultStr);
-               $limitedStr = '';
-               if ($limited) $limitedStr = 'checked';
-               $this->tmpl->addVar("_widget", "sel_item_limited", $limitedStr);
-       
-               // 選択中のシリアル番号を設定
-               $this->tmpl->addVar("_widget", "serial", $this->serialNo);
-                       
-               // パスの設定
-               $this->tmpl->addVar('_widget', 'admin_url', $this->getUrl($this->gEnv->getDefaultAdminUrl()));// 管理者URL
-               $this->tmpl->addVar('_widget', 'custom_value_task', 'usercustom');              // ユーザ定義値参照用
-               $this->tmpl->addVar('_widget', 'admin_widget_id', self::ADMIN_WIDGET_ID);// ユーザ定義値参照用(管理ウィジェットのウィジェットID)
-               
-               // ボタンの表示制御
-               if (empty($this->serialNo)){            // 新規追加項目を選択しているとき
-                       $this->tmpl->addVar("_widget", "sel_item_id", '新規');                        // コンテンツID
-                       $this->tmpl->setAttribute('add_button', 'visibility', 'visible');// 「新規追加」ボタン
-               } else {
-                       $this->tmpl->addVar("_widget", "sel_item_id", $contentId);                      // コンテンツID
-                       $this->tmpl->setAttribute('del_button', 'visibility', 'visible');// 「削除」ボタン
-               }
-               // 「戻る」ボタンの表示
-               if ($openby == 'simple') $this->tmpl->setAttribute('cancel_button', 'visibility', 'hidden');            // 詳細画面のみの表示のときは戻るボタンを隠す
-       }
-       /**
-        * 取得したデータをテンプレートに設定する
-        *
-        * @param int $index                    行番号(0~)
-        * @param array $fetchedRow             フェッチ取得した行
-        * @param object $param                 未使用
-        * @return bool                                 true=処理続行の場合、false=処理終了の場合
-        */
-       function itemListLoop($index, $fetchedRow, $param)
-       {
-               $serial = $this->convertToDispString($fetchedRow['cn_serial']);
-               
-               // 表示状態
-               $visible = '';
-               if ($fetchedRow['cn_visible']) $visible = 'checked';
-
-               // ユーザ制限
-               $limited = '';
-               if ($fetchedRow['cn_user_limited']) $limited = 'checked';
-
-               // デフォルト時の項目かどうか
-               $default = '';
-               if ($fetchedRow['cn_default']) $default = 'checked';
-               
-               // 対応言語を取得
-               $lang = '';
-               $ret = $this->db->getLangByContentId($fetchedRow['cn_id'], $rows);
-               if ($ret){
-                       $count = count($rows);
-                       for ($i = 0; $i < $count; $i++){
-                               if ($this->gEnv->getCurrentLanguage() == 'ja'){ // 日本語の場合
-                                       $lang .= $rows[$i]['ln_name'];
-                                       if ($i != $count -1) $lang .= ',';
-                               } else {
-                                       $lang .= $rows[$i]['ln_name_en'];
-                                       if ($i != $count -1) $lang .= ',';
-                               }
-                       }
-               }
-               // 総参照数
-               $totalViewCount = $this->gInstance->getAnalyzeManager()->getTotalContentViewCount(self::CONTENT_TYPE, $serial);
-               
-               $row = array(
-                       'index' => $index,                                                                                                      // 項目番号
-                       'serial' => $serial,                    // シリアル番号
-                       'id' => $this->convertToDispString($fetchedRow['cn_id']),                       // ID
-                       'name' => $this->convertToDispString($fetchedRow['cn_name']),           // 名前
-                       'lang' => $lang,                                                                                                        // 対応言語
-                       'view_count' => $totalViewCount,                                                                        // 総参照数
-                       'update_user' => $this->convertToDispString($fetchedRow['lu_name']),    // 更新者
-                       'update_dt' => $this->convertToDispDateTime($fetchedRow['cn_create_dt']),       // 更新日時
-                       'visible' => $visible,                                                                                  // メニュー項目表示制御
-                       'limited' => $limited,                                                                                  // ユーザ制限
-                       'default' => $default                                                                                   // デフォルト項目
-               );
-               $this->tmpl->addVars('itemlist', $row);
-               $this->tmpl->parseTemplate('itemlist', 'a');
-               
-               // 表示中のコンテンツIDを保存
-               $this->serialArray[] = $fetchedRow['cn_serial'];
-               
-               $this->isExistsContent = true;          // コンテンツ項目が存在するかどうか
-               return true;
-       }
-}
-?>
diff --git a/widgets/m/pc_content/include/container/m_pc_contentWidgetContainer.php b/widgets/m/pc_content/include/container/m_pc_contentWidgetContainer.php
deleted file mode 100644 (file)
index 03d4284..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2010 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_pc_contentWidgetContainer.php 3728 2010-10-24 09:16:35Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseWidgetContainer.php');
-require_once($gEnvManager->getCurrentWidgetDbPath() . '/pc_contentDb.php');
-require_once($gEnvManager->getCommonPath() . '/valueCheck.php');
-
-class m_pc_contentWidgetContainer extends BaseWidgetContainer
-{
-       private $db;                    // DB接続オブジェクト
-       private $_contentCreated;       // コンテンツが取得できたかどうか
-       private $currentDay;            // 現在日
-       private $currentHour;           // 現在時間
-       private $headTitle;             // HTMLヘッダタイトル
-       private $currentRootUrl;                // 現在のページのルートURL
-       const CONTENT_TYPE = 'ct';              // 参照数カウント用
-               
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-               
-               // DBオブジェクト作成
-               $this->db = new pc_contentDb();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'main.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               // 現在日時を取得
-               $this->currentDay = date("Y/m/d");              // 日
-               $this->currentHour = (int)date("H");            // 時間
-
-               // 現在のページのルートURL
-               $this->currentRootUrl = $this->gEnv->getRootUrlByCurrentPage();
-               
-               // ログインユーザでないときは、ユーザ制限のない項目だけ表示
-               $all = false;
-               if ($this->gEnv->isCurrentUserLogined()) $all = true;
-               
-               $contentid = $request->trimValueOf('contentid');
-               if (empty($contentid)){ // コンテンツIDがないときはデフォルトデータを取得
-                       $this->db->getContentItems(array($this, 'itemsLoop'), null, $this->gEnv->getCurrentLanguage(), $all);
-                       if (!$this->_contentCreated){           // コンテンツが取得できなかったときはデフォルト言語で取得
-                               $this->db->getContentItems(array($this, 'itemsLoop'), null, $this->gEnv->getDefaultLanguage(), $all);
-                       }
-               } else {
-                       // データエラーチェック
-                       $contentIdArray = explode(',', $contentid);
-                       if (ValueCheck::isNumeric($contentIdArray)){            // すべて数値であるかチェック
-                               $this->db->getContentItems(array($this, 'itemsLoop'), $contentIdArray, $this->gEnv->getCurrentLanguage(), $all);
-                               if (!$this->_contentCreated){           // コンテンツが取得できなかったときはデフォルト言語で取得
-                                       $this->db->getContentItems(array($this, 'itemsLoop'), $contentIdArray, $this->gEnv->getDefaultLanguage(), $all);
-                               }
-                       } else {
-                               $this->setAppErrorMsg('IDにエラー値があります');
-                       }
-               }
-               // HTMLサブタイトルを設定
-               if (!empty($this->headTitle)) $this->gPage->setHeadSubTitle($this->headTitle);
-       }
-       /**
-        * 取得したコンテンツ項目をテンプレートに設定する
-        *
-        * @param int           $index                  行番号
-        * @param array         $fetchedRow             取得行
-        * @param object        $param                  任意使用パラメータ
-        * @return bool                                         trueを返すとループ続行。falseを返すとその時点で終了。
-        */
-       function itemsLoop($index, $fetchedRow)
-       {
-               // ビューカウントを更新
-               if (!$this->gEnv->isSystemManageUser()){                // システム運用者以上の場合はカウントしない
-                       $this->gInstance->getAnalyzeManager()->updateContentViewCount(self::CONTENT_TYPE, $fetchedRow['cn_serial'], $this->currentDay, $this->currentHour);
-               }
-
-               // タイトルを設定
-               $title = $fetchedRow['cn_name'];
-               if (empty($this->headTitle)) $this->headTitle = $title;
-               
-               // HTMLを出力
-               // 出力内容は特にエラーチェックしない
-               $contentText = $fetchedRow['cn_html'];
-               $contentText = str_replace(M3_TAG_START . M3_TAG_MACRO_ROOT_URL . M3_TAG_END, $this->gEnv->getRootUrl(), $contentText);// アプリケーションルートを変換
-               
-               // 登録したキーワードを変換
-               $this->gInstance->getTextConvManager()->convByKeyValue($contentText, $contentText, true/*改行コーをbrタグに変換*/);
-               
-               // 携帯用コンテンツに変換
-               $contentText = $this->gInstance->getTextConvManager()->autoConvPcContentToMobile($contentText, $this->currentRootUrl/*現在のページのルートURL*/, 
-                                                                                                                                                               M3_VIEW_TYPE_CONTENT/*汎用コンテンツ*/, $fetchedRow['cn_create_dt']/*コンテンツ作成日時*/);
-               
-               $row = array(
-                       'title' => $title,
-                       'content' => $contentText       // コンテンツ
-               );
-               $this->tmpl->addVars('contentlist', $row);
-               $this->tmpl->parseTemplate('contentlist', 'a');
-               
-               // コンテンツが取得できた
-               $this->_contentCreated = true;
-               return true;
-       }
-}
-?>
diff --git a/widgets/m/pc_content/include/db/pc_contentDb.php b/widgets/m/pc_content/include/db/pc_contentDb.php
deleted file mode 100644 (file)
index cee33d8..0000000
+++ /dev/null
@@ -1,478 +0,0 @@
-<?php
-/**
- * DBクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2008 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: pc_contentDb.php 1253 2008-11-19 05:43:26Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getDbPath() . '/baseDb.php');
-
-class pc_contentDb extends BaseDb
-{
-       /**
-        * コンテンツ項目を取得
-        *
-        * @param function      $callback                       コールバック関数
-        * @param array         $contentIdArray         コンテンツID
-        * @param string        $lang                           言語
-        * @param bool          $all                            すべてのデータを取得するか、ユーザ制限のないデータを取得するかを指定
-        * @return                      なし
-        */
-       function getContentItems($callback, $contentIdArray, $lang, $all=true)
-       {
-               $contentType = '';
-               
-               // コンテンツIDの指定がない場合は、デフォルト値を取得
-               if ($contentIdArray == null){
-                       $queryStr = 'SELECT * FROM content ';
-                       $queryStr .=  'WHERE cn_visible = true ';
-                       $queryStr .=    'AND cn_default = true ';
-                       $queryStr .=    'AND cn_deleted = false ';              // 削除されていない
-                       $queryStr .=    'AND cn_type = ? ';
-                       $queryStr .=    'AND cn_language_id = ? ';
-                       if (!$all) $queryStr .=    'AND cn_user_limited = false ';              // ユーザ制限のないデータ
-                       $queryStr .=  'ORDER BY cn_serial';
-                       $this->selectLoop($queryStr, array($contentType, $lang), $callback, null);
-               } else {
-                       $contentId = implode(',', $contentIdArray);
-                       
-                       // CASE文作成
-                       $caseStr = 'CASE cn_id ';
-                       for ($i = 0; $i < count($contentIdArray); $i++){
-                               $caseStr .= 'WHEN ' . $contentIdArray[$i] . ' THEN ' . $i . ' ';
-                       }
-                       $caseStr .= 'END AS no';
-
-                       $queryStr = 'SELECT *, ' . $caseStr . ' FROM content ';
-                       $queryStr .=  'WHERE cn_visible = true ';
-                       $queryStr .=    'AND cn_deleted = false ';              // 削除されていない
-                       $queryStr .=    'AND cn_type = ? ';
-                       $queryStr .=    'AND cn_id in (' . $contentId . ') ';
-                       $queryStr .=    'AND cn_language_id = ? ';
-                       if (!$all) $queryStr .=    'AND cn_user_limited = false ';              // ユーザ制限のないデータ
-                       $queryStr .=  'ORDER BY no';
-                       $this->selectLoop($queryStr, array($contentType, $lang), $callback, null);
-               }
-       }
-       /**
-        * コンテンツ項目一覧を取得(管理用)
-        *
-        * @param function      $callback                       コールバック関数
-        * @param string        $lang                           言語
-        * @return                      なし
-        */
-       function getAllContentItems($callback, $lang)
-       {
-               $contentType = '';
-               $queryStr = 'SELECT * FROM content LEFT JOIN _login_user ON cn_create_user_id = lu_id AND lu_deleted = false ';
-               $queryStr .=  'WHERE cn_type = ? ';
-               $queryStr .=    'AND cn_language_id = ? ';
-               $queryStr .=    'AND cn_deleted = false ';              // 削除されていない
-               $queryStr .=  'ORDER BY cn_id';
-               $this->selectLoop($queryStr, array($contentType, $lang), $callback, null);
-       }
-       /**
-        * コンテンツの対応言語を取得(管理用)
-        *
-        * @param string        $contentId                      コンテンツID
-        * @return                      true=取得、false=取得せず
-        */
-       function getLangByContentId($contentId, &$rows)
-       {
-               $contentType = '';
-               $queryStr = 'SELECT ln_id, ln_name, ln_name_en FROM content LEFT JOIN _language ON cn_language_id = ln_id ';
-               $queryStr .=  'WHERE cn_deleted = false ';      // 削除されていない
-               $queryStr .=    'AND cn_type = ? ';
-               $queryStr .=    'AND cn_id = ? ';
-               $queryStr .=  'ORDER BY cn_id, ln_priority';
-               $retValue = $this->selectRecords($queryStr, array($contentType, $contentId), $rows);
-               return $retValue;
-       }
-       /**
-        * コンテンツの対応言語を取得(管理用)
-        *
-        * @param function      $callback                       コールバック関数
-        * @param string        $contentId                      コンテンツID
-        * @return                      なし
-        */
-       function getLangLoopByContentId($callback, $contentId)
-       {
-               // コンテンツIDがないときは終了
-               if (empty($contentId)) return;
-               
-               $contentType = '';
-               $queryStr = 'SELECT ln_id, ln_name, ln_name_en FROM content LEFT JOIN _language ON cn_language_id = ln_id ';
-               $queryStr .=  'WHERE cn_deleted = false ';      // 削除されていない
-               $queryStr .=    'AND cn_type = ? ';
-               $queryStr .=    'AND cn_id = ? ';
-               $queryStr .=  'ORDER BY cn_id, ln_priority';
-               $this->selectLoop($queryStr, array($contentType, $contentId), $callback, null);
-       }
-       /**
-        * コンテンツ項目をコンテンツIDで取得
-        *
-        * @param string        $contentId                      コンテンツID
-        * @param string        $langId                         言語ID
-        * @param array     $row                                レコード
-        * @return bool                                                 取得 = true, 取得なし= false
-        */
-       function getContentByContentId($contentId, $langId, &$row)
-       {
-               $contentType = '';
-               $queryStr  = 'SELECT * FROM content LEFT JOIN _login_user ON cn_create_user_id = lu_id AND lu_deleted = false ';
-               $queryStr .=   'WHERE cn_deleted = false ';     // 削除されていない
-               $queryStr .=    'AND cn_type = ? ';
-               $queryStr .=   'AND cn_id = ? ';
-               $queryStr .=   'AND cn_language_id = ? ';
-               $ret = $this->selectRecord($queryStr, array($contentType, $contentId, $langId), $row);
-               return $ret;
-       }
-       /**
-        * コンテンツ項目をシリアル番号で取得
-        *
-        * @param string        $serial                         シリアル番号
-        * @param array     $row                                レコード
-        * @return bool                                                 取得 = true, 取得なし= false
-        */
-       function getContentBySerial($serial, &$row)
-       {
-               $queryStr  = 'select * from content LEFT JOIN _login_user ON cn_create_user_id = lu_id AND lu_deleted = false ';
-               $queryStr .=   'WHERE cn_serial = ? ';
-               $ret = $this->selectRecord($queryStr, array($serial), $row);
-               return $ret;
-       }
-       
-       /**
-        * コンテンツ項目の新規追加
-        *
-        * @param string  $contentid    コンテンツID
-        * @param string  $lang                 言語ID
-        * @param string  $name                 コンテンツ名
-        * @param string  $desc                 説明
-        * @param string  $html                 HTML
-        * @param bool    $visible              表示状態
-        * @param bool    $default              デフォルトで使用するかどうか
-        * @param bool    $limited              ユーザ制限するかどうか
-        * @param string  $key                  外部参照用キー
-        * @param int     $newSerial    新規シリアル番号
-        * @return bool                                 true = 成功、false = 失敗
-        */
-       function addContentItem($contentid, $lang, $name, $desc, $html, $visible, $default, $limited, $key, &$newSerial)
-       {
-               global $gEnvManager;
-               $now = date("Y/m/d H:i:s");     // 現在日時
-               $user = $gEnvManager->getCurrentUserId();       // 現在のユーザ
-               $contentType = '';
-                               
-               // トランザクション開始
-               $this->startTransaction();
-               
-               if ($contentid == 0){           // コンテンツIDが0のときは、コンテンツIDを新規取得
-                       // コンテンツIDを決定する
-                       $queryStr = 'select max(cn_id) as mid from content ';
-                       $queryStr .=  'WHERE cn_type = ? ';
-                       $ret = $this->selectRecord($queryStr, array($contentType), $row);
-                       if ($ret){
-                               $contId = $row['mid'] + 1;
-                       } else {
-                               $contId = 1;
-                       }
-               } else {
-                       $contId = $contentid;
-               }
-               
-               // 前レコードの削除状態チェック
-               $historyIndex = 0;
-               $queryStr = 'SELECT * FROM content ';
-               $queryStr .=  'WHERE cn_type = ? ';
-               $queryStr .=    'AND cn_id = ? ';
-               $queryStr .=    'AND cn_language_id = ? ';
-               $queryStr .=  'ORDER BY cn_history_index DESC ';
-               $ret = $this->selectRecord($queryStr, array($contentType, $contId, $lang), $row);
-               if ($ret){
-                       if (!$row['cn_deleted']){               // レコード存在していれば終了
-                               $this->endTransaction();
-                               return false;
-                       }
-                       $historyIndex = $row['cn_history_index'] + 1;
-               }
-               // デフォルトを設定のときは他のデフォルトを解除
-               if ($default){
-                       $queryStr  = 'UPDATE content ';
-                       $queryStr .=   'SET cn_default = false, ';              // デフォルトをクリア
-                       $queryStr .=     'cn_update_user_id = ?, ';
-                       $queryStr .=     'cn_update_dt = ? ';
-                       $queryStr .=   'WHERE cn_deleted = false ';
-                       $queryStr .=     'AND cn_type = ? ';
-                       $queryStr .=     'AND cn_language_id = ? ';
-                       $this->execStatement($queryStr, array($user, $now, $contentType, $lang));
-               }
-               // データを追加
-               $queryStr = 'INSERT INTO content ';
-               $queryStr .=  '(cn_type, cn_id, cn_language_id, cn_history_index, cn_name, cn_description, cn_html, cn_visible, cn_default, cn_user_limited, cn_key, cn_create_user_id, cn_create_dt) ';
-               $queryStr .=  'VALUES ';
-               $queryStr .=  '(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
-               $this->execStatement($queryStr, array($contentType, $contId, $lang, $historyIndex, $name, $desc, $html, intval($visible), intval($default), intval($limited), $key, $user, $now));
-               
-               // 新規のシリアル番号取得
-               $queryStr = 'select max(cn_serial) as ns from content ';
-               $ret = $this->selectRecord($queryStr, array(), $row);
-               if ($ret) $newSerial = $row['ns'];
-                       
-               // トランザクション確定
-               $ret = $this->endTransaction();
-               return $ret;
-       }
-       
-       /**
-        * コンテンツ項目の更新
-        *
-        * @param int     $serial               シリアル番号
-        * @param string  $name                 コンテンツ名
-        * @param string  $html                 HTML
-        * @param bool    $visible              表示状態
-        * @param bool    $default              デフォルトで使用するかどうか
-        * @param bool    $limited              ユーザ制限するかどうか
-        * @param string  $key                  外部参照用キー
-        * @param int     $newSerial    新規シリアル番号
-        * @return bool                                 true = 成功、false = 失敗
-        */
-       function updateContentItem($serial, $name, $html, $visible, $default, $limited, $key, &$newSerial)
-       {
-               global $gEnvManager;
-               $now = date("Y/m/d H:i:s");     // 現在日時
-               $user = $gEnvManager->getCurrentUserId();       // 現在のユーザ
-               $contentType = '';
-                               
-               // トランザクション開始
-               $this->startTransaction();
-               
-               // 指定のシリアルNoのレコードが削除状態でないかチェック
-               $historyIndex = 0;              // 履歴番号
-               $queryStr  = 'select * from content ';
-               $queryStr .=   'where cn_serial = ? ';
-               $ret = $this->selectRecord($queryStr, array($serial), $row);
-               if ($ret){              // 既に登録レコードがあるとき
-                       if ($row['cn_deleted']){                // レコードが削除されていれば終了
-                               $this->endTransaction();
-                               return false;
-                       }
-                       $historyIndex = $row['cn_history_index'] + 1;
-               } else {                // 存在しない場合は終了
-                       $this->endTransaction();
-                       return false;
-               }
-               // デフォルトを設定のときは他のデフォルトを解除
-               if ($default){
-                       $queryStr  = 'UPDATE content ';
-                       $queryStr .=   'SET cn_default = false, ';              // デフォルトをクリア
-                       $queryStr .=     'cn_update_user_id = ?, ';
-                       $queryStr .=     'cn_update_dt = ? ';
-                       $queryStr .=   'WHERE cn_deleted = false ';
-                       $queryStr .=     'AND cn_type = ? ';
-                       $queryStr .=     'AND cn_language_id = ? ';
-                       $this->execStatement($queryStr, array($user, $now, $contentType, $row['cn_language_id']));
-               }
-               
-               // 古いレコードを削除
-               $queryStr  = 'UPDATE content ';
-               $queryStr .=   'SET cn_deleted = true, ';       // 削除
-               $queryStr .=     'cn_update_user_id = ?, ';
-               $queryStr .=     'cn_update_dt = ? ';
-               $queryStr .=   'WHERE cn_serial = ?';
-               $this->execStatement($queryStr, array($user, $now, $serial));
-               
-               // 新規レコード追加
-               $queryStr = 'INSERT INTO content ';
-               $queryStr .=  '(cn_type, cn_id, cn_language_id, cn_history_index, cn_name, cn_description, cn_html, cn_visible, cn_default, cn_user_limited, cn_key, cn_create_user_id, cn_create_dt) ';
-               $queryStr .=  'VALUES ';
-               $queryStr .=  '(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
-               $this->execStatement($queryStr, array($row['cn_type'], $row['cn_id'], $row['cn_language_id'], $historyIndex, $name, $row['cn_description'], $html, intval($visible), intval($default), intval($limited), $key, $user, $now));
-
-               // 新規のシリアル番号取得
-               $queryStr = 'select max(cn_serial) as ns from content ';
-               $ret = $this->selectRecord($queryStr, array(), $row);
-               if ($ret) $newSerial = $row['ns'];
-               
-               // トランザクション確定
-               $ret = $this->endTransaction();
-               return $ret;
-       }
-       
-       /**
-        * コンテンツ項目の削除
-        *
-        * @param array $serial                 シリアルNo
-        * @return                                              true=成功、false=失敗
-        */
-       function delContentItem($serial)
-       {
-               global $gEnvManager;
-               $now = date("Y/m/d H:i:s");     // 現在日時
-               $user = $gEnvManager->getCurrentUserId();       // 現在のユーザ
-               
-               if (!is_array($serial) || count($serial) <= 0) return true;
-               
-               // トランザクション開始
-               $this->startTransaction();
-               
-               // 指定のシリアルNoのレコードが削除状態でないかチェック
-               for ($i = 0; $i < count($serial); $i++){
-                       $queryStr  = 'SELECT * FROM content ';
-                       $queryStr .=   'WHERE cn_deleted = false ';             // 未削除
-                       $queryStr .=     'AND cn_serial = ? ';
-                       $ret = $this->isRecordExists($queryStr, array($serial[$i]));
-                       // 存在しない場合は、既に削除されたとして終了
-                       if (!$ret){
-                               $this->endTransaction();
-                               return false;
-                       }
-               }
-               
-               // レコードを削除
-               $queryStr  = 'UPDATE content ';
-               $queryStr .=   'SET cn_deleted = true, ';       // 削除
-               $queryStr .=     'cn_update_user_id = ?, ';
-               $queryStr .=     'cn_update_dt = now() ';
-               $queryStr .=   'WHERE cn_serial in (' . implode($serial, ',') . ') ';
-               $this->execStatement($queryStr, array($user));
-               
-               // トランザクション確定
-               $ret = $this->endTransaction();
-               return $ret;
-       }
-       /**
-        * コンテンツIDでコンテンツ項目を削除
-        *
-        * @param int $serial                   シリアルNo
-        * @param int $userId                   ユーザID(データ更新者)
-        * @return                                              true=成功、false=失敗
-        */
-       function delContentItemById($serial, $userId)
-       {
-               $contentType = '';
-                               
-               // トランザクション開始
-               $this->startTransaction();
-               
-               // コンテンツIDを取得
-               $queryStr  = 'select * from content ';
-               $queryStr .=   'where cn_deleted = false ';             // 未削除
-               $queryStr .=     'and cn_serial = ? ';
-               $ret = $this->selectRecord($queryStr, array($serial), $row);
-               if ($ret){              // 既に登録レコードがあるとき
-                       if ($row['cn_deleted']){                // レコードが削除されていれば終了
-                               $this->endTransaction();
-                               return false;
-                       }
-               } else {                // 存在しない場合は終了
-                       $this->endTransaction();
-                       return false;
-               }
-               $contId = $row['cn_id'];
-               
-               // レコードを削除
-               $queryStr  = 'UPDATE content ';
-               $queryStr .=   'SET cn_deleted = true, ';       // 削除
-               $queryStr .=     'cn_update_user_id = ?, ';
-               $queryStr .=     'cn_update_dt = now() ';
-               $queryStr .=   'WHERE cn_type = ? ';
-               $queryStr .=     'AND cn_id = ? ';
-               $this->execStatement($queryStr, array($userId, $contentType, $contId));
-               
-               // トランザクション確定
-               $ret = $this->endTransaction();
-               return $ret;
-       }
-       /**
-        * コンテンツ項目をすべて削除
-        *
-        * @param int $userId                   ユーザID(データ更新者)
-        * @return                                              true=成功、false=失敗
-        */
-       function delAllContentItems($userId)
-       {
-               $contentType = '';
-                       
-               // トランザクション開始
-               $this->startTransaction();
-               
-               // レコードを削除
-               $queryStr  = 'UPDATE content ';
-               $queryStr .=   'SET cn_deleted = true, ';       // 削除
-               $queryStr .=     'cn_update_user_id = ?, ';
-               $queryStr .=     'cn_update_dt = now() ';
-               $queryStr .=   'WHERE cn_type = ? AND cn_deleted = false';
-               $this->execStatement($queryStr, array($userId, $contentType));
-               
-               // トランザクション確定
-               $ret = $this->endTransaction();
-               return $ret;
-       }       
-       /**
-        * すべての言語を取得
-        *
-        * @param function      $callback                       コールバック関数
-        * @return                      true=取得、false=取得せず
-        */
-       function getAllLang($callback)
-       {
-               $queryStr = 'SELECT * FROM _language ORDER BY ln_priority';
-               $this->selectLoop($queryStr, array(), $callback, null);
-       }
-       
-       /**
-        * メニュー項目の追加
-        *
-        * @param string  $menuId               メニューID
-        * @param string  $lang                 言語ID
-        * @param string  $name                 メニュー名
-        * @param string  $url                  URL
-        * @param int     $incIndex             表示順増加分
-        * @param int     $userId               更新者ユーザID
-        * @return bool                                 true = 成功、false = 失敗
-        */
-       function addMenuItem($menuId, $lang, $name, $url, $incIndex, $userId)
-       {
-               // トランザクション開始
-               $this->startTransaction();
-               
-               // メニュー項目IDを作成
-               $queryStr = 'select max(mi_id) as mid from menu_item ';
-               $ret = $this->selectRecord($queryStr, array(), $row);
-               if ($ret){
-                       $menuItemId = $row['mid'] + 1;
-               } else {
-                       $menuItemId = 1;
-               }
-               // インデックス番号を作成
-               $queryStr = 'SELECT max(mi_index) as m FROM menu_item ';
-               $queryStr .=  'WHERE mi_menu_id = ? ';
-               $queryStr .=    'AND mi_language_id = ? ';
-               $ret = $this->selectRecord($queryStr, array($menuId, $lang), $row);
-               if ($ret){
-                       $index = $row['m'] + $incIndex;
-               } else {
-                       $index = 1;
-               }
-               
-               $queryStr = 'INSERT INTO menu_item ';
-               $queryStr .=  '(mi_menu_id, mi_id, mi_language_id, mi_name, mi_index, mi_link_type, mi_link_url, mi_visible, mi_enable, mi_update_user_id, mi_update_dt) ';
-               $queryStr .=  'VALUES ';
-               $queryStr .=  '(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now())';
-               $this->execStatement($queryStr, array($menuId, $menuItemId, $lang, $name, $index, 0, $url, true, true, $userId));
-               
-               // トランザクション確定
-               $ret = $this->endTransaction();
-               return $ret;
-       }
-}
-?>
diff --git a/widgets/m/pc_content/include/help/index.php b/widgets/m/pc_content/include/help/index.php
deleted file mode 100644 (file)
index 37eb660..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-/**
- * ヘルプリソースファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2008 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 1253 2008-11-19 05:43:26Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-global $HELP;
-
-// ########## コンテンツ一覧 ##########
-$HELP['content']['title'] = 'コンテンツ一覧';
-$HELP['content']['body'] = 'コンテンツの一覧です。';
-$HELP['content_check']['title'] = '選択用チェックボックス';
-$HELP['content_check']['body'] = '編集や削除を行う項目を選択します。';
-$HELP['content_id']['title'] = 'コンテンツID';
-$HELP['content_id']['body'] = 'コンテンツを識別するためのIDです。新規追加時に自動的に設定されます。';
-$HELP['content_name']['title'] = '名前';
-$HELP['content_name']['body'] = 'コンテンツの名前です。コンテンツのタイトルとして表示されます。';
-$HELP['content_visible']['title'] = '公開';
-$HELP['content_visible']['body'] = 'コンテンツをユーザに公開するかどうかを制御します。非公開に設定の場合はユーザから参照することはできません。';
-$HELP['content_limited']['title'] = 'ユーザ制限';
-$HELP['content_limited']['body'] = 'コンテンツの参照をログインしたユーザに限定するかどうかを設定します。チェックが入っているコンテンツはログインユーザだけが参照可能です。';
-$HELP['content_default']['title'] = 'デフォルト項目';
-$HELP['content_default']['body'] = 'URLのパラメータでコンテンツIDが指定されていない場合に表示されるコンテンツを指定します。1つだけ設定可能です。';
-$HELP['content_update_user']['title'] = '更新者';
-$HELP['content_update_user']['body'] = 'コンテンツを更新したユーザです。';
-$HELP['content_update_dt']['title'] = '更新日時';
-$HELP['content_update_dt']['body'] = 'コンテンツを更新した日時です。';
-$HELP['content_view_count']['title'] = '参照数';
-$HELP['content_view_count']['body'] = 'コンテンツがユーザに参照された回数です。管理者の参照はカウントされません。';
-$HELP['content_act']['title'] = '操作';
-$HELP['content_act']['body'] = '各種操作を行います。<br />●メニューに追加<br />「メインメニュー」ウィジェットにコンテンツを表示するメニュー項目を追加します。';
-$HELP['content_html']['title'] = 'HTML';
-$HELP['content_html']['body'] = 'コンテンツの内容となるHTMLです。';
-$HELP['content_ref_custom']['title'] = '置換文字列を参照';
-$HELP['content_ref_custom']['body'] = 'コンテンツに埋め込んだ置換文字列はコンテンツ表示時に設定文字列に変換します。置換文字列の設定値を参照します。';
-$HELP['content_key']['title'] = '外部参照用キー';
-$HELP['content_key']['body'] = '外部ウィジェットからの取得用キーです。';
-
-$HELP['content_new_btn']['title'] = '新規ボタン';
-$HELP['content_new_btn']['body'] = '新規コンテンツを追加します。';
-$HELP['content_edit_btn']['title'] = '編集ボタン';
-$HELP['content_edit_btn']['body'] = '選択されているコンテンツを編集します。<br />コンテンツを選択するには、一覧の左端のチェックボックスにチェックを入れます。';
-$HELP['content_del_btn']['title'] = '削除ボタン';
-$HELP['content_del_btn']['body'] = '選択されているコンテンツを削除します。<br />コンテンツを選択するには、一覧の左端のチェックボックスにチェックを入れます。';
-$HELP['content_ret_btn']['title'] = '戻るボタン';
-$HELP['content_ret_btn']['body'] = 'コンテンツ一覧へ戻ります。';
-?>
diff --git a/widgets/m/pc_content/include/template/admin_main.tmpl.html b/widgets/m/pc_content/include/template/admin_main.tmpl.html
deleted file mode 100644 (file)
index 121d51e..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<script type="text/javascript">\r
-<!--\r
-function newItem(){\r
-    document.main.task.value = 'detail';\r
-    document.main.act.value = 'new';\r
-    document.main.submit();\r
-    return true;\r
-}\r
-function editItem(){\r
-    if (document.main.seriallist.value){\r
-        var items = document.main.seriallist.value.split(",");\r
-       for (var i = 0; i < items.length; i++){\r
-           var name = "document.main.item" + i + "_selected";\r
-           var itemObj = eval(name);\r
-           // チェックありのときは終了\r
-           if (itemObj && itemObj.checked) break;\r
-       }\r
-       if (i == items.length){                 \r
-           window.alert('編集する項目を選択してください');\r
-       } else {\r
-            document.main.task.value = 'detail';\r
-            document.main.act.value = 'edit';\r
-           document.main.serial.value = items[i];\r
-            document.main.submit();\r
-       }\r
-    }\r
-    return true;\r
-}\r
-function editItemBySerial(serial){\r
-    document.main.task.value = 'detail';\r
-    document.main.act.value = 'edit';\r
-    document.main.serial.value = serial;\r
-    document.main.submit();\r
-}\r
-function delItem(){\r
-    if (document.main.seriallist.value){\r
-        var items = document.main.seriallist.value.split(",");\r
-       for (var i = 0; i < items.length; i++){\r
-           var name = "document.main.item" + i + "_selected";\r
-           var itemObj = eval(name);\r
-           // チェックありのときは終了\r
-           if (itemObj && itemObj.checked) break;\r
-       }\r
-       if (i == items.length){                 \r
-           window.alert('削除する項目を選択してください');\r
-       } else {\r
-            if (!window.confirm('選択項目を削除しますか?')) return false;\r
-            document.main.act.value = 'delete';\r
-            document.main.submit();\r
-       }\r
-    }\r
-    return true;\r
-}\r
-// メニューに追加\r
-function addToMenu(selId){\r
-    if (!window.confirm('この項目をメインメニューに追加しますか?')) return false;\r
-    document.main.act.value = 'addtomenu';\r
-    document.main.contentid.value = selId;\r
-    document.main.submit();\r
-    return true;\r
-}\r
-$(function(){\r
-    // スクロールバー付きのテーブルを作成\r
-    m3_tableWithScrollbar('contlist', 10, 0);  // データは10行表示\r
-});\r
-// -->\r
-</script>\r
-<div align="center">\r
-<br />\r
-<!-- m3:ErrorMessage -->\r
-<form method="post" name="main">\r
-<input type="hidden" name="task" value="list"/>\r
-<input type="hidden" name="act" />\r
-<input type="hidden" name="serial" />\r
-<input type="hidden" name="seriallist" value="{SERIAL_LIST}" />\r
-<input type="hidden" name="contentid" />\r
-<table width="90%">\r
-<tr><td>\r
-<label><span {_HELP_CONTENT}>コンテンツ一覧</span></label>\r
-</td>\r
-<td align="right"><span {_HELP_CONTENT_NEW_BTN}><input type="button" class="button" onclick="newItem();" value="新規" /></span><span {_HELP_CONTENT_EDIT_BTN}><input type="button" class="button" onclick="editItem();" value="編集" /></span><span {_HELP_CONTENT_DEL_BTN}><input type="button" class="button" onclick="delItem();" value="削除" /></span>\r
-</td></tr>\r
-<tr><td colspan="2">\r
-<table id="contlist" class="simple-table" width="100%">\r
-    <thead>\r
-        <tr>\r
-            <th width="40"><span {_HELP_CONTENT_CHECK}>選択</span></th>\r
-            <th width="30"><span {_HELP_CONTENT_ID}>ID</span></th>\r
-            <th width="30%"><span {_HELP_CONTENT_NAME}>名前</span></th>\r
-           <th width="50"><span {_HELP_CONTENT_VISIBLE}>公開</span></th>\r
-           <th width="70"><span {_HELP_CONTENT_LIMITED}>ユーザ制限</span></th>\r
-           <th width="70"><span {_HELP_CONTENT_DEFAULT}>デフォルト</span></th>\r
-           <th width="100"><span {_HELP_CONTENT_UPDATE_USER}>更新者</span></th>\r
-           <th width="120"><span {_HELP_CONTENT_UPDATE_DT}>更新日時</span></th>\r
-           <th width="50"><span {_HELP_CONTENT_VIEW_COUNT}>参照数</span></th>\r
-           <th><span {_HELP_CONTENT_ACT}>操作</span></th>\r
-       </tr>\r
-    </thead>\r
-    <tbody>\r
-        <patTemplate:tmpl name="itemlist">\r
-        <tr {LINE_COLOR}>\r
-           <td align="center"><input type="checkbox" name="item{INDEX}_selected" /></td>\r
-           <td align="center">{ID}</td>\r
-           <td><a href="#" onclick="editItemBySerial({SERIAL});">{NAME}</a></td>\r
-           <td align="center"><input type="checkbox" disabled {VISIBLE} /></td>\r
-           <td align="center"><input type="checkbox" disabled {LIMITED} /></td>\r
-           <td align="center"><input type="checkbox" disabled {DEFAULT} /></td>\r
-           <td align="center">{UPDATE_USER}</td>\r
-           <td align="center">{UPDATE_DT}</td>\r
-           <td align="center">{VIEW_COUNT}</td>\r
-           <td align="right"><input type="button" class="button" onclick="addToMenu('{ID}');" value="メニューに追加" /></td>\r
-       </tr>\r
-       </patTemplate:tmpl>\r
-    </tbody>\r
-</table>\r
-</td></tr>\r
-</table>\r
-</form>\r
-</div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/pc_content/include/template/admin_main_detail.tmpl.html b/widgets/m/pc_content/include/template/admin_main_detail.tmpl.html
deleted file mode 100644 (file)
index aa357dc..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<script type="text/javascript">\r
-//<![CDATA[\r
-function addItem(){\r
-       if (!window.confirm('項目を新規追加しますか?')) return false;\r
-       document.main.act.value = 'add';\r
-       document.main.submit();\r
-       return true;\r
-}\r
-function updateItem(serialNo){\r
-       if (!window.confirm('項目を更新しますか?')) return false;\r
-       document.main.act.value = 'update';\r
-       document.main.submit();\r
-       return true;\r
-}\r
-function delItem(serialNo){\r
-       if (!window.confirm('項目を削除しますか?')) return false;\r
-       document.main.act.value = 'delete';\r
-       document.main.submit();\r
-       return true;\r
-}\r
-function cancelItem(){\r
-       document.main.task.value = 'list';\r
-       document.main.submit();\r
-       return true;\r
-}\r
-function viewCustomValue(){\r
-       m3ShowStandardWindow("{ADMIN_URL}?cmd=showwidget&widget={ADMIN_WIDGET_ID}&task={CUSTOM_VALUE_TASK}&openby=other");\r
-       return false;\r
-}\r
-$(function(){\r
-       m3_setHtmlEditor('item_html');\r
-});\r
-//]]>\r
-</script>\r
-<div align="center">\r
-<br />\r
-<!-- m3:ErrorMessage -->\r
-<form method="post" name="main">\r
-<input type="hidden" name="task" value="detail" />\r
-<input type="hidden" name="act" />\r
-<input type="hidden" name="serial" value="{SERIAL}" />\r
-<table width="90%">\r
-<tr><td><label>コンテンツ詳細</label></td><td align="right">\r
-<patTemplate:tmpl name="cancel_button" visibility="visible">\r
-<span {_HELP_CONTENT_RET_BTN}><input type="button" class="button" onclick="cancelItem();" value="戻る" /></span>\r
-</patTemplate:tmpl>\r
-</td></tr>\r
-<tr><td colspan="2">\r
-<table class="simple-table">\r
-    <tbody>\r
-        <tr>\r
-           <td class="table-headside" width="100"><span {_HELP_CONTENT_ID}>ID</span></td>\r
-           <td width="100" align="center">{SEL_ITEM_ID}</td>\r
-           <td class="table-headside" width="100"><span {_HELP_CONTENT_NAME}>名前</span></td>\r
-           <td><input type="text" name="item_name" value="{SEL_ITEM_NAME}" size="40" maxlength="40" /></td>\r
-           <td class="table-headside" width="100"><span {_HELP_CONTENT_DEFAULT}>デフォルト項目</span></td>\r
-           <td><input type="checkbox" name="item_default" {SEL_ITEM_DEFAULT} /></td>\r
-       </tr>\r
-        <tr class="even">\r
-           <td class="table-headside"><span {_HELP_CONTENT_VISIBLE}>公開</span></td>\r
-           <td><input type="checkbox" name="item_visible" {SEL_ITEM_VISIBLE} /></td>\r
-           <td class="table-headside"><span {_HELP_CONTENT_LIMITED}>ユーザ制限</span></td>\r
-           <td colspan="3"><input type="checkbox" name="item_limited" {SEL_ITEM_LIMITED} /></td>\r
-       </tr>\r
-        <tr>\r
-           <td class="table-headside"><span {_HELP_CONTENT_HTML}>HTML</span><br />\r
-           <span {_HELP_CONTENT_REF_CUSTOM}><input type="button" class="button" onclick="viewCustomValue();" value="置換文字列を参照" /></span></td>\r
-           <td colspan="5" width="800" height="450">\r
-           <textarea name="item_html">{SEL_ITEM_HTML}</textarea>\r
-           </td>\r
-       </tr>\r
-       <tr class="even">\r
-           <td class="table-headside"><span {_HELP_CONTENT_KEY}>外部参照用キー</span></td>\r
-           <td colspan="5"><input type="text" name="item_key" value="{SEL_ITEM_KEY}" size="20" maxlength="20" /></td>\r
-       </tr>\r
-       <tr>\r
-           <td class="table-headside"><span {_HELP_CONTENT_UPDATE_USER}>更新者</span></td>\r
-           <td>{UPDATE_USER}</td>\r
-           <td class="table-headside"><span {_HELP_CONTENT_UPDATE_DT}>更新日時</span></td>\r
-           <td>{UPDATE_DT}</td>\r
-       <td colspan="2" align="right">\r
-<patTemplate:tmpl name="del_button" visibility="hidden">\r
-               <input type="button" class="button" onclick="delItem();" value="削除" />\r
-               <input type="button" class="button" onclick="updateItem();" value="更新" />\r
-</patTemplate:tmpl>\r
-<patTemplate:tmpl name="add_button" visibility="hidden">\r
-               <input type="button" class="button" onclick="addItem();" value="新規追加" />\r
-</patTemplate:tmpl>\r
-       </td>\r
-       </tr>\r
-    </tbody>\r
-</table>\r
-</td></tr>\r
-</table>\r
-</form>\r
-</div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/pc_content/include/template/main.tmpl.html b/widgets/m/pc_content/include/template/main.tmpl.html
deleted file mode 100644 (file)
index b3bd04b..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<patTemplate:tmpl name="_widget">
-<!-- m3:ErrorMessage -->
-<patTemplate:tmpl name="contentlist">
-{TITLE}<br />
-{CONTENT}<br />
-</patTemplate:tmpl>
-</patTemplate:tmpl>
diff --git a/widgets/m/pc_content/index.php b/widgets/m/pc_content/index.php
deleted file mode 100644 (file)
index 6cfdcd6..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 876 2008-08-04 08:37:17Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/quizk/admin/index.php b/widgets/m/quizk/admin/index.php
deleted file mode 100644 (file)
index 45af596..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 1920 2009-05-23 04:01:26Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/quizk/include/container/admin_m_quizkBaseWidgetContainer.php b/widgets/m/quizk/include/container/admin_m_quizkBaseWidgetContainer.php
deleted file mode 100644 (file)
index 4e80cd9..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2009 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: admin_m_quizkBaseWidgetContainer.php 2458 2009-10-24 07:26:44Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseAdminWidgetContainer.php');
-
-class admin_m_quizkBaseWidgetContainer extends BaseAdminWidgetContainer
-{
-       const DEFAULT_TASK = 'operation';               // デフォルトの画面
-
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @return                                                              なし
-        */
-       function _postAssign($request, &$param)
-       {
-               // ウィンドウオープンタイプ取得
-               $openBy = $request->trimValueOf(M3_REQUEST_PARAM_OPEN_BY);              // ウィンドウオープンタイプ
-               if (!empty($openBy)) $this->addOptionUrlParam(M3_REQUEST_PARAM_OPEN_BY, $openBy);
-                               
-               // 表示画面を決定
-               $task = $request->trimValueOf(M3_REQUEST_PARAM_OPERATION_TASK);
-               if (empty($task)) $task = self::DEFAULT_TASK;           // デフォルト画面を設定
-               
-               // パンくずリストを作成
-               $createList = true;             // パンくずリストを作成するかどうか
-               switch ($task){
-                       case 'operation':                       // 運用管理
-                               $linkList = ' &gt;&gt; 運用管理';// パンくずリスト
-                               break;
-                       case 'csv':             // アンケートデータアップロード
-                               $linkList = ' &gt;&gt; CSVデータ';// パンくずリスト
-                               break;
-                       case 'total':                   // 集計画面
-                               $linkList = ' &gt;&gt; 集計';// パンくずリスト
-                               break;
-                       default:
-                               break;
-               }
-
-               if ($createList){                               // パンくずリストを作成するとき
-                       // ####### 上段メニューの作成 #######
-                       $menuText = '<div id="configmenu-upper">' . M3_NL;
-                       $menuText .= '<ul>' . M3_NL;
-               
-                       $current = '';
-                       $baseUrl = $this->getAdminUrlWithOptionParam(true);// 画面定義ID付き
-               
-                       // 運用管理
-                       $current = '';
-                       $link = $baseUrl . '&task=operation';
-                       if ($task == 'operation'){
-                               $current = 'id="current"';
-                       }
-                       $menuText .= '<li ' . $current . '><a href="'. $this->convertUrlToHtmlEntity($link) .'"><span>運用管理</span></a></li>' . M3_NL;
-                       
-                       // CSVデータ管理
-                       $current = '';
-                       $link = $baseUrl . '&task=csv';
-                       if ($task == 'csv'){
-                               $current = 'id="current"';
-                       }
-                       $menuText .= '<li ' . $current . '><a href="'. $this->convertUrlToHtmlEntity($link) .'"><span>CSVデータ</span></a></li>' . M3_NL;
-                       
-                       // 集計
-                       /*$current = '';
-                       $link = $baseUrl . '&task=total';
-                       if ($task == 'total'){
-                               $current = 'id="current"';
-                       }
-                       $menuText .= '<li ' . $current . '><a href="'. $this->convertUrlToHtmlEntity($link) .'"><span>集計</span></a></li>' . M3_NL;
-                       */
-                       
-                       // 上段メニュー終了
-                       $menuText .= '</ul>' . M3_NL;
-                       $menuText .= '</div>' . M3_NL;
-               
-                       // 作成データの埋め込み
-                       $linkList = '<div id="configmenu-top"><label>' . '携帯クイズ' . $linkList . '</div>';
-                       $outputText .= '<table width="90%"><tr><td>' . $linkList . $menuText . '</td></tr></table>' . M3_NL;
-                       $this->tmpl->addVar("_widget", "menu_items", $outputText);
-               } else {
-                       $this->tmpl->addVar("_widget", "menu_items", '');
-               }
-       }
-}
-?>
diff --git a/widgets/m/quizk/include/container/admin_m_quizkCsvWidgetContainer.php b/widgets/m/quizk/include/container/admin_m_quizkCsvWidgetContainer.php
deleted file mode 100644 (file)
index 8a45e07..0000000
+++ /dev/null
@@ -1,265 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2009 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: admin_m_quizkCsvWidgetContainer.php 1931 2009-05-28 08:43:03Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getCurrentWidgetContainerPath() .   '/admin_m_quizkBaseWidgetContainer.php');
-require_once($gEnvManager->getCurrentWidgetDbPath() .  '/quizkDb.php');
-
-class admin_m_quizkCsvWidgetContainer extends admin_m_quizkBaseWidgetContainer
-{
-       private $db;    // DB接続オブジェクト
-       private $csvData;               // CSV作成用
-       private $setId;                 // 現在選択中のセットID
-       private $defaultSetId;          // 現在運用中のセットID
-       const CFG_DEFAULT_SET_ID_KEY = 'current_set_id';                // 現在の選択中のセットID取得用キー
-       const CSV_QUIZ_DEF_HEAD = 'quiz_def_';                          // CSVファイル名
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-               
-               // DBオブジェクト作成
-               $this->db = new quizkDb();
-               
-               // デフォルト値取得
-               $this->defaultSetId = $this->db->getConfig(self::CFG_DEFAULT_SET_ID_KEY);               // 定義セットID
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'admin_csv.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $dataReplace = ($request->trimValueOf('item_replace') == 'on') ? 1 : 0;         // データの入れ替えを行うかどうか
-               $this->setId = $request->trimValueOf('setid');          // 定義セットID
-               $act = $request->trimValueOf('act');
-               if ($act == 'upload'){          // CSVアップロード
-                       // ファイル名からアップロードするデータの種別を判断
-                       $uploadFilename = $_FILES['upfile']['name'];            // アップロードされたファイルのファイル名取得
-
-                       $skipField      = '項目ID';   // ヘッダ部認識用文字列
-                       $badField       = '';                           // 不正なヘッダ文字列
-
-                       if (is_uploaded_file($_FILES['upfile']['tmp_name'])) {
-                               // ファイルを保存するサーバディレクトリを指定
-                               $tmpFile = tempnam($this->gEnv->getWorkDirPath(), M3_SYSTEM_WORK_UPLOAD_FILENAME_HEAD);
-
-                               // アップされたテンポラリファイルを保存ディレクトリにコピー
-                               $ret = move_uploaded_file($_FILES['upfile']['tmp_name'], $tmpFile);
-                               if ($ret){
-                                       $addCount = 0;          // 追加項目数
-                                       $updateCount = 0;       // 更新項目数
-                                       $colCount = 0;          // カラム数
-                                       $lineCount = 0;         // 行数
-                                       $message = '';          // 追加メッセージ
-
-                                       // トランザクションスタート
-                                       $this->db->startTransaction();
-                               
-                                       if ($dataReplace){              // データ入れ替えの場合は既存データを削除
-                                               $this->db->deleteAllItems($this->setId);
-                                       }
-                                       // ファイルオープン
-                                       $fp = fopen($tmpFile, "r");
-                               
-                                       // データ読み込み
-                                       $delimType = 0;         // カンマ区切り
-                                       if ($this->gEnv->getDefaultCsvDelimCode() == "\t") $delimType = 1;              // タブ区切り
-                                       while (($data = fgetByCsv($fp, $delimType)) !== false){
-                                               if ($colCount == 0) $colCount = count($data);           // カラム数取得
-                                               $lineCount++;           // 行番号更新
-                                       
-                                               // ヘッダ読み飛ばし
-                                               if (trim($data[0]) == $skipField){
-                                                       continue;
-                                               } else if (trim($data[0]) == $badField){
-                                                       $this->setAppErrorMsg('不正なヘッダを検出しました');
-                                               }
-                                               $newColCount = count($data);
-                                               if ($newColCount == 0 || ($newColCount == 1 && $data[0] == "")) continue;               // 空行は読み飛ばす
-                                               if ($colCount != $newColCount){
-                                                       $message .= $lineCount . '行目のカラム数が異常です。この行は読み飛ばしました。<br />';
-                                                       continue;               // カラム数が合わない行も読み飛ばす
-                                               }
-                                       
-                                               // データをDBに格納する
-                                               $id                     = trim($data[0]);                               // 項目ID
-                                               $type           = trim($data[1]);                       // 項目タイプ
-                                               $index          = trim($data[2]);                       // 項目順
-                                               $selAnswer      = trim($data[3]);               // 選択用回答
-                                               $answer         = trim($data[4]);                       // 回答値
-                                               $title          = trim($data[5]);                       // タイトル
-                                               $content        = trim($data[6]);                       // 内容
-                                               $visible        = trim($data[7]);                       // 表示制御
-                                       
-                                               // データのエラーチェック
-                                               // エラーなしの場合は、データを登録
-                                               if ($this->getMsgCount() == 0){
-                                                       // フィールドIDを見て、新規登録か更新かを判断
-                                                       $updateRecord = false;
-                                                       if ($this->db->isExistsItem($this->setId, $id)) $updateRecord = true;
-                                               
-                                                       // データを更新
-                                                       $ret = $this->db->updateItem($this->setId, $id, $type, $index, $selAnswer, $answer, $title, $content, $visible, $serial);
-                                                       if ($updateRecord){             // 既存項目の更新のとき
-                                                               if ($ret) $updateCount++;       // 更新項目数
-                                                       } else {                        // 新規項目の追加のとき
-                                                               if ($ret) $addCount++;
-                                                       }
-                                               }
-                                       }
-                                       // ファイルを閉じる
-                                       fclose($fp);
-                               
-                                       // トランザクション終了
-                                       $ret = $this->db->endTransaction();
-                                       if ($ret && $this->getMsgCount() == 0){
-                                               $this->setGuidanceMsg('データを' . $addCount . '件追加しました');
-                                               $this->setGuidanceMsg('データを' . $updateCount . '件更新しました');
-                                               $this->setGuidanceMsg($message);
-                                       } else {
-                                               $this->setAppErrorMsg('データ追加に失敗しました');
-                                       }
-                               }
-                               // テンポラリファイル削除
-                               unlink($tmpFile);
-                       } else {
-                               $msg = 'アップロードファイルが見つかりません(要因:アップロード可能なファイルのMaxサイズを超えている可能性があります - ' . $gSystemManager->getMaxFileSizeForUpload() . 'バイト)';
-                               $this->setAppErrorMsg($msg);
-                       }
-               } else if ($act == 'download'){         // CSVダウンロード
-                       // ダウンロード時のデフォルトファイル名
-                       $down_file = self::CSV_QUIZ_DEF_HEAD . date("YmdHi") . $this->gEnv->getDefaultCsvFileSuffix();
-               
-                       // ヘッダ部を作成
-                       $buf = array();
-                       $buf[] = '項目ID';
-                       $buf[] = '項目タイプ';
-                       $buf[] = '項目順';
-                       $buf[] = '選択用回答ID';
-                       $buf[] = '正解回答ID';
-                       $buf[] = 'タイトル';
-                       $buf[] = '内容';
-                       $buf[] = '表示制御';
-
-                       $delim = $this->gEnv->getDefaultCsvDelimCode();         // CSV区切りコードを取得
-                       $this->csvData[] = implode($delim, $buf) . $this->gEnv->getDefaultCsvNLCode();
-               
-                       // クイズ定義データを取得
-                       $this->db->getAllItems($this->setId, array($this, 'fieldCsvLoop'));
-                       
-                       // CSVの出力
-                       ob_end_clean();
-                       header("Content-Type: application/force-download");
-                       header("Content-Disposition: attachment; filename=" . $down_file);
-                       header("Content-Description: File Transfer");
-                       header("Content-Length: " . strlen(join("", $this->csvData)));
-                       
-                       $encoding = $this->gEnv->getCsvDownloadEncoding();              // デフォルトのダウンロードエンコーディング取得
-                       foreach ($this->csvData as $mval){
-                           echo mb_convert_encoding($mval, $encoding);
-                           flush();
-                           ob_flush();
-                           usleep(10000);
-                       }
-                       ob_end_flush();
-                       exit();         // スクリプト終了
-               }
-               // 定義セットIDの選択メニュー作成
-               $this->db->getAllSetId(array($this, 'setIdListLoop'));
-       }
-       /**
-        * 取得したデータをCSV形式で出力する
-        *
-        * @param int $index                    行番号(0~)
-        * @param array $fetchedRow             フェッチ取得した行
-        * @param object $param                 未使用
-        * @return bool                                 true=処理続行の場合、false=処理終了の場合
-        */
-       function fieldCsvLoop($index, $fetchedRow, $param)
-       {
-               $buf = array();
-               $delim = $this->gEnv->getDefaultCsvDelimCode();         // CSV区切りコードを取得
-               if ($delim == "\t"){    // タブ区切りのCSVフォーマットのとき
-                       $buf[] = $fetchedRow['qd_id'];                          // 項目ID
-                       $buf[] = $fetchedRow['qd_type'];                        // 項目タイプ
-                       $buf[] = $fetchedRow['qd_index'];                       // 項目順
-                       $buf[] = $fetchedRow['qd_select_answer_id'];    // 選択用回答
-                       $buf[] = $fetchedRow['qd_answer_id'];                   // 回答ID
-                       $buf[] = $fetchedRow['qd_title'];                       // タイトル
-                       $buf[] = $fetchedRow['qd_content'];                     // 内容
-                       $buf[] = $fetchedRow['qd_visible'];                     // 表示制御
-               } else {
-                       $buf[] = $this->convertToEscapedCsv($fetchedRow['qd_id']);                              // 項目ID
-                       $buf[] = $this->convertToEscapedCsv($fetchedRow['qd_type']);                    // 項目タイプ
-                       $buf[] = $this->convertToEscapedCsv($fetchedRow['qd_index']);                   // 項目順
-                       $buf[] = $this->convertToEscapedCsv($fetchedRow['qd_select_answer_id']);        // 選択用回答
-                       $buf[] = $this->convertToEscapedCsv($fetchedRow['qd_answer_id']);                       // 回答ID
-                       $buf[] = $this->convertToEscapedCsv($fetchedRow['qd_title']);                   // タイトル
-                       $buf[] = $this->convertToEscapedCsv($fetchedRow['qd_content']);                 // 内容
-                       $buf[] = $this->convertToEscapedCsv($fetchedRow['qd_visible']);                 // 表示制御
-               }
-               $this->csvData[] = implode($delim, $buf) . $this->gEnv->getDefaultCsvNLCode();
-               return true;
-       }
-       /**
-        * セットIDリスト、取得したデータをテンプレートに設定する
-        *
-        * @param int $index                    行番号(0~)
-        * @param array $fetchedRow             フェッチ取得した行
-        * @param object $param                 未使用
-        * @return bool                                 true=処理続行の場合、false=処理終了の場合
-        */
-       function setIdListLoop($index, $fetchedRow, $param)
-       {
-               $id = $fetchedRow['qs_id'];
-               $name = $fetchedRow['qs_name'];
-               
-               $selected = '';
-               if ($id == $this->setId) $selected = 'selected';                // 現在操作対象のセットID
-               if ($id == $this->defaultSetId) $name .= '(現在運用中)';
-               $row = array(
-                       'value'    => $this->convertToDispString($id),                  // セットID
-                       'name'     => $this->convertToDispString($name),                        // セットID名
-                       'selected' => $selected                                                                                                         // 選択中かどうか
-               );
-               $this->tmpl->addVars('set_id_list', $row);
-               $this->tmpl->parseTemplate('set_id_list', 'a');
-               return true;
-       }
-}
-?>
diff --git a/widgets/m/quizk/include/container/admin_m_quizkOperationWidgetContainer.php b/widgets/m/quizk/include/container/admin_m_quizkOperationWidgetContainer.php
deleted file mode 100644 (file)
index f62c50c..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2009 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: admin_m_quizkOperationWidgetContainer.php 1923 2009-05-25 11:43:17Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getCurrentWidgetContainerPath() .   '/admin_m_quizkBaseWidgetContainer.php');
-require_once($gEnvManager->getCurrentWidgetDbPath() .  '/quizkDb.php');
-
-class admin_m_quizkOperationWidgetContainer extends admin_m_quizkBaseWidgetContainer
-{
-       private $db;    // DB接続オブジェクト
-       private $defaultSetId;          // 現在選択中のセットID
-       const CFG_DEFAULT_SET_ID_KEY = 'current_set_id';                // 現在の選択中のセットID取得用キー
-       const CFG_FIELD_PATH_KEY = 'field_path';                                // 上位のフィールド階層固定の場合のパス
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-               
-               // DBオブジェクト作成
-               $this->db = new quizkDb();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'admin_operation.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $this->defaultSetId = $request->trimValueOf('item_setid');              // 定義セットID
-               $path = $request->trimValueOf('item_path');             // 上位のフィールド階層固定の場合のパス
-               $act = $request->trimValueOf('act');
-               if ($act == 'update'){          // 設定更新のとき
-                       $isErr = false;
-                       if (!$isErr){
-                               if (!$this->db->updateConfig(self::CFG_DEFAULT_SET_ID_KEY, $this->defaultSetId)) $isErr = true;
-                       }
-                       if (!$isErr){
-                               if (!$this->db->updateConfig(self::CFG_FIELD_PATH_KEY, $path)) $isErr = true;
-                       }
-                       
-                       if ($isErr){
-                               $this->setMsg(self::MSG_APP_ERR, 'データ更新に失敗しました');
-                       } else {
-                               $this->setMsg(self::MSG_GUIDANCE, 'データを更新しました');
-                       }
-                       // 値を再取得
-                       $this->defaultSetId = $this->db->getConfig(self::CFG_DEFAULT_SET_ID_KEY);               // 定義セットID
-                       $path = $this->db->getConfig(self::CFG_FIELD_PATH_KEY);         // 上位のフィールド階層固定の場合のパス
-               } else {
-                       // 値を取得
-                       $this->defaultSetId = $this->db->getConfig(self::CFG_DEFAULT_SET_ID_KEY);               // 定義セットID
-                       $path = $this->db->getConfig(self::CFG_FIELD_PATH_KEY);         // 上位のフィールド階層固定の場合のパス
-               }
-               // パターンセットメニュー作成
-               $this->db->getAllSetId(array($this, 'setIdListLoop'));
-               
-               $this->tmpl->addVar("_widget", "path", $path);
-       }
-       /**
-        * パターンセットIDリスト、取得したデータをテンプレートに設定する
-        *
-        * @param int $index                    行番号(0~)
-        * @param array $fetchedRow             フェッチ取得した行
-        * @param object $param                 未使用
-        * @return bool                                 true=処理続行の場合、false=処理終了の場合
-        */
-       function setIdListLoop($index, $fetchedRow, $param)
-       {
-               $id = $fetchedRow['qs_id'];
-               $name = $fetchedRow['qs_name'];
-               
-               $selected = '';
-               if ($id == $this->defaultSetId) $selected = 'selected';
-               $row = array(
-                       'value'    => $this->convertToDispString($id),                  // セットID
-                       'name'     => $this->convertToDispString($name),                        // セットID名
-                       'selected' => $selected                                                                                                         // 選択中かどうか
-               );
-               $this->tmpl->addVars('set_id_list', $row);
-               $this->tmpl->parseTemplate('set_id_list', 'a');
-               return true;
-       }
-}
-?>
diff --git a/widgets/m/quizk/include/container/admin_m_quizkWidgetContainer.php b/widgets/m/quizk/include/container/admin_m_quizkWidgetContainer.php
deleted file mode 100644 (file)
index 0d51c32..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2009 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: admin_m_quizkWidgetContainer.php 2936 2010-03-17 14:20:08Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getCurrentWidgetContainerPath() . '/admin_m_quizkBaseWidgetContainer.php');
-
-class admin_m_quizkWidgetContainer extends admin_m_quizkBaseWidgetContainer
-{
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * ディスパッチ処理(メインコンテナのみ実行)
-        *
-     * HTTPリクエストの内容を見て処理をコンテナに振り分ける
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return bool                                                 このクラスの_setTemplate(), _assign()へ処理を継続するかどうかを返す。
-        *                                      true=処理を継続、false=処理を終了
-        */
-       function _dispatch($request, &$param)
-       {
-               // 表示画面を決定
-               $task = $request->trimValueOf(M3_REQUEST_PARAM_OPERATION_TASK);
-               if (empty($task)) $task = self::DEFAULT_TASK;           // デフォルトの画面
-
-               // コンテナを起動
-               $goWidget = false;              // サブウィジェットを実行するかどうか
-               switch ($task){
-                       case 'csv':                     // CSVデータアップロードダウンロード
-                       case 'operation':                       // 運用管理
-                       case 'total':                   // 集計
-                               $goWidget = true;               // サブウィジェットを実行するかどうか
-                               break;
-                       default:
-                               break;
-               }
-               if ($goWidget){         // サブウィジェットを実行するかどうか
-                       $this->gLaunch->goSubWidget($task, true);               // 管理者機能で呼び出し
-                       return false;
-               } else {
-                       $this->SetMsg(self::MSG_APP_ERR, "画面が見つかりません");
-                       return true;
-               }
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               return 'message.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @return                                                              なし
-        */
-       function _assign($request, &$param)
-       {
-       }
-}
-?>
diff --git a/widgets/m/quizk/include/container/m_quizkBaseWidgetContainer.php b/widgets/m/quizk/include/container/m_quizkBaseWidgetContainer.php
deleted file mode 100644 (file)
index f83c701..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2009 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_quizkBaseWidgetContainer.php 1930 2009-05-27 16:44:57Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseMobileWidgetContainer.php');
-
-class m_quizkBaseWidgetContainer extends BaseMobileWidgetContainer
-{
-       protected $mobileId;            // 携帯ID
-       const ERR_MESSAGE_FORMAT = '<span style="color:#ff0000"><font color="#ff0000">%s</font></span>';        //      エラーメッセージのフォーマット
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-               
-               $this->mobileId = $this->gEnv->getMobileId();// 端末IDを取得
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @return                                                              なし
-        */
-       function _postAssign($request, &$param)
-       {
-       }
-}
-?>
diff --git a/widgets/m/quizk/include/container/m_quizkCompleteWidgetContainer.php b/widgets/m/quizk/include/container/m_quizkCompleteWidgetContainer.php
deleted file mode 100644 (file)
index ab4c626..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2009 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_quizkCompleteWidgetContainer.php 1933 2009-05-28 10:54:45Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getCurrentWidgetContainerPath() .   '/m_quizkBaseWidgetContainer.php');
-require_once($gEnvManager->getCurrentWidgetDbPath() .  '/quizkDb.php');
-
-class m_quizkCompleteWidgetContainer extends m_quizkBaseWidgetContainer
-{
-       private $db;    // DB接続オブジェクト
-       private $setId;                         // 定義セットID
-       const CFG_DEFAULT_SET_ID_KEY = 'current_set_id';                // 現在の選択中のセットID取得用キー
-       
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-               
-               // DBオブジェクト作成
-               $this->db = new quizkDb();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {       
-               return 'complete.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $this->setId = $this->db->getConfig(self::CFG_DEFAULT_SET_ID_KEY);              // パターンセットID
-               $ret = $this->db->getAnswerResult($this->setId, $this->mobileId, $rows);
-               if ($ret){
-                       $totalCount = count($rows);
-                       $rightCount = 0;
-                       for ($i = 0; $i < $totalCount; $i++){
-                               if ($rows[$i]['qp_result']) $rightCount++;
-                       }
-                       $resutlStr = $totalCount . '問中&nbsp;' . $rightCount . '問正解';
-                       $resutlRatioStr = '正解率&nbsp;0%';
-                       if ($totalCount > 0) $resutlRatioStr = '正解率&nbsp;' . sprintf("%01.1f", round($rightCount / $totalCount * 100, 1)) . '%';
-                       $this->tmpl->addVar('_widget', 'result', $resutlStr);
-                       $this->tmpl->addVar('_widget', 'result_ratio', $resutlRatioStr);
-               }
-               $this->tmpl->addVar('_widget', 'top_url', $this->gEnv->createCurrentPageUrlForMobile(''));
-       }
-}
-?>
diff --git a/widgets/m/quizk/include/container/m_quizkProgressWidgetContainer.php b/widgets/m/quizk/include/container/m_quizkProgressWidgetContainer.php
deleted file mode 100644 (file)
index d20cd63..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2009 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_quizkProgressWidgetContainer.php 1933 2009-05-28 10:54:45Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getCurrentWidgetContainerPath() .   '/m_quizkBaseWidgetContainer.php');
-require_once($gEnvManager->getCurrentWidgetDbPath() .  '/quizkDb.php');
-
-class m_quizkProgressWidgetContainer extends m_quizkBaseWidgetContainer
-{
-       private $db;    // DB接続オブジェクト
-       private $setId;                         // 定義セットID
-       const CFG_DEFAULT_SET_ID_KEY = 'current_set_id';                // 現在の選択中のセットID取得用キー
-       const CURRENT_TASK = 'progress';                // 現在の画面
-       const NEXT_TASK = 'complete';           // 次の画面
-
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-               
-               // DBオブジェクト作成
-               $this->db = new quizkDb();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {       
-               return 'progress.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $this->setId = $this->db->getConfig(self::CFG_DEFAULT_SET_ID_KEY);              // パターンセットID
-               $act = $request->trimValueOf('act');
-               
-               if ($act == 'answer'){          // 回答したとき
-                       $postSetId = $request->trimValueOf('sid');
-                       $questionId = $request->trimValueOf('qid');
-                       $answer = $request->trimValueOf('answer');
-
-                       // 回答状況をチェック
-                       $isErr = false;         // エラー発生状況
-                       $isRight = false;       // 正解かどうか
-                       $ret = $this->db->getItem($postSetId, $questionId, $row);
-                       if ($ret){
-                               if ($row['qd_type'] != 0) $isErr = true;                // エラー発生状況
-                               $answerId = $row['qd_answer_id'];
-                       } else {
-                               $isErr = true;          // エラー発生状況
-                       }
-                       if (!$isErr){
-                               if (strcmp($answerId, $answer) == 0) $isRight = true;   // 正解かどうか
-                               
-                               $logSerial = $this->gEnv->getCurrentAccessLogSerial();
-                               $ret = $this->db->addPostData($this->mobileId, $postSetId, $questionId, $answer, $isRight, $logSerial);
-                               if (!$ret) $isErr = true;
-                       }
-                       // 回答を表示
-                       if (!$isErr){
-                               $ret = $this->db->getItem($postSetId, $answerId, $row);
-                               if ($ret){
-                                       // 選択結果を表示
-                                       if ($isRight){
-                                               $result = '正解';
-                                       } else {
-                                               $result = '不正解';
-                                               $this->tmpl->setAttribute('result_msg', 'visibility', 'visible');
-                                       }
-                                       $this->tmpl->setAttribute('result_area', 'visibility', 'visible');
-                                       $this->tmpl->addVar("result_area", "result", $result);
-                                       $this->tmpl->addVar("result_area", "title", $row['qd_title']);
-                                       $this->tmpl->addVar("result_area", "content", $row['qd_content']);
-                               } else {
-                                       $isErr = true;
-                               }
-                       }
-                       // 次の問題へのリンクを作成
-                       if (!$isErr){
-                               $ret = $this->db->getNextQuestion($this->setId, $this->mobileId, $row);
-                               if ($ret){              // 問題が残っているとき
-                                       $this->tmpl->addVar("result_area", "next_name", '次へ');
-                                       $this->tmpl->addVar('result_area', 'next_url', $this->gEnv->createCurrentPageUrlForMobile('task=' . self::CURRENT_TASK));
-                               } else {
-                                       $this->tmpl->addVar("result_area", "next_name", '終了');
-                                       $this->tmpl->addVar('result_area', 'next_url', $this->gEnv->createCurrentPageUrlForMobile('task=' . self::NEXT_TASK));
-                               }                                       
-                       }
-                       
-                       if ($isErr){
-                               $message = sprintf(self::ERR_MESSAGE_FORMAT, 'エラーが発生しました');
-                               $this->tmpl->addVar("_widget", "message", $message);
-                       }
-               } else {
-                       // 問題を取得
-                       $ret = $this->db->getNextQuestion($this->setId, $this->mobileId, $row);
-                       if ($ret){              // 問題が残っているとき
-                               $this->tmpl->setAttribute('question_area', 'visibility', 'visible');
-                       
-                               // クイズ問題を作成
-                               $this->createQuestion($row);
-                       } else {                // 次の問題がないとき
-                               $count = $this->db->getQuestionCount($this->setId);
-                               if ($count == 0){
-                                       $message = '問題が登録されていません';
-                               } else {
-                                       $message = '全問回答しました';
-                               }
-                               $this->tmpl->addVar("_widget", "message", $message);
-                               $this->tmpl->setAttribute('view_status_area', 'visibility', 'visible');
-                       }
-               }
-               $this->tmpl->addVar('question_area', 'act', 'answer');
-               $this->tmpl->addVar('question_area', 'url', $this->gEnv->createCurrentPageUrlForMobile('task=' . self::CURRENT_TASK));
-               $this->tmpl->addVar('_widget', 'top_url', $this->gEnv->createCurrentPageUrlForMobile(''));
-               $this->tmpl->addVar('_widget', 'start_url', $this->gEnv->createCurrentPageUrlForMobile('task=' . self::NEXT_TASK));
-       }
-       /**
-        * クイズ問題、回答を作成
-        *
-        * @param array $row                    クイズ問題項目レコード
-        * @return                                              なし
-        */
-       function createQuestion($row)
-       {
-               $answer = $row['qd_select_answer_id'];          // 回答ID
-               $answerArray = array();
-               if (!empty($answer)) $answerArray = explode(';', $answer);
-               
-               // 問題を作成
-               $title = $this->convertToDispString($row['qd_title']);
-               $content = $this->convertToDispString($row['qd_content']);
-               $this->tmpl->addVar('question_area', 'title', $title);
-               $this->tmpl->addVar('question_area', 'content', $content);
-               $this->tmpl->addVar('question_area', 'sid', $this->setId);
-               $this->tmpl->addVar('question_area', 'qid', $this->convertToDispString($row['qd_id']));
-               
-               if (count($answerArray) == 0) return;
-               
-               // 回答を作成
-               $ret = $this->db->getAnswers($this->setId, $answerArray, $rows);
-               if ($ret){
-                       $inputTag = '';
-                       for ($i = 0; $i < count($rows); $i++){
-                               $title = $this->convertToDispString($rows[$i]['qd_title']);
-                               $value = $this->convertToDispString($rows[$i]['qd_id']);
-                               $inputTag .= '<input type="radio" name="answer" value="' . $value . '" />' . $title . '<br />' . M3_NL;
-                       }
-                       $this->tmpl->addVar('question_area', 'answer', $inputTag);
-               }
-       }
-}
-?>
diff --git a/widgets/m/quizk/include/container/m_quizkTopWidgetContainer.php b/widgets/m/quizk/include/container/m_quizkTopWidgetContainer.php
deleted file mode 100644 (file)
index a6d135b..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2009 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_quizkTopWidgetContainer.php 1928 2009-05-26 09:24:18Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getCurrentWidgetContainerPath() .   '/m_quizkBaseWidgetContainer.php');
-
-class m_quizkTopWidgetContainer extends m_quizkBaseWidgetContainer
-{
-       const NEXT_TASK = 'progress';           // 次の画面
-
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {       
-               return 'top.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $this->tmpl->addVar('_widget', 'start_url', $this->gEnv->createCurrentPageUrlForMobile('task=' . self::NEXT_TASK));
-       }
-}
-?>
diff --git a/widgets/m/quizk/include/container/m_quizkWidgetContainer.php b/widgets/m/quizk/include/container/m_quizkWidgetContainer.php
deleted file mode 100644 (file)
index a4f0ce6..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2009 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_quizkWidgetContainer.php 2936 2010-03-17 14:20:08Z fishbone $
- * @link       http://www.magic3.org
- */
-//require_once($gEnvManager->getContainerPath() . '/baseMobileWidgetContainer.php');
-require_once($gEnvManager->getCurrentWidgetContainerPath() .   '/m_quizkBaseWidgetContainer.php');
-
-class m_quizkWidgetContainer extends m_quizkBaseWidgetContainer
-{
-       const DEFAULT_TASK = 'top';             // デフォルトの画面
-
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * ディスパッチ処理(メインコンテナのみ実行)
-        *
-     * HTTPリクエストの内容を見て処理をコンテナに振り分ける
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return bool                                                 このクラスの_setTemplate(), _assign()へ処理を継続するかどうかを返す。
-        *                                      true=処理を継続、false=処理を終了
-        */
-       function _dispatch($request, &$param)
-       {
-               // 実行処理を決定
-               $task = $request->trimValueOf(M3_REQUEST_PARAM_OPERATION_TASK);
-               if (empty($task)) $task = self::DEFAULT_TASK;
-
-               // ログインが必要な処理の場合は、ログイン状況をチェックする
-               switch ($task){
-                       case 'member':                  // 会員情報変更
-                               // ログイン状態を取得
-                               if (!$this->gEnv->isCurrentUserLogined()){              // ログインされていない場合
-                                       $this->SetMsg(self::MSG_APP_ERR, "ログインが必要です");
-                                       return true;
-                               }
-                               break;
-                       default:
-                               break;
-               }
-               // アクセス権をチェック
-               switch ($task){
-                       case 'progress':                        // クイズ質問回答画面
-                       case 'complete':                        // 受付完了画面
-                               // 携帯以外からのアクセスの場合はエラー
-                               if (empty($this->mobileId)) return true;
-                               break;
-               }
-               
-               // ##### コンテナを起動 #####
-               switch ($task){
-                       case 'top':                     // トップ画面
-                       case 'profile':                 // プロフィール入力画面
-                       case 'progress':                        // クイズ質問回答画面
-                       case 'complete':                        // 受付完了画面
-                               $this->gLaunch->goSubWidget($task);
-                               return false;
-                       default:
-                               $this->SetMsg(self::MSG_APP_ERR, "画面が見つかりません");
-                               return true;
-               }
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {
-               $task = $request->trimValueOf(M3_REQUEST_PARAM_OPERATION_TASK);
-
-               // 要求画面によってテンプレートを変更
-               switch ($task){
-                       case 'member':                  // 会員情報変更
-                               // ログインが必要であるメッセージを表示
-                               return 'message_login.tmpl.html';
-                       default:
-                               return 'message.tmpl.html';
-               }
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @return                                                              なし
-        */
-       function _assign($request, &$param)
-       {
-               $task = $request->trimValueOf(M3_REQUEST_PARAM_OPERATION_TASK);
-
-               // 要求画面によってテンプレートを変更
-               switch ($task){
-                       case 'member':                  // 会員情報変更
-                               // ログインが必要であるメッセージを表示
-                               $this->tmpl->addVar("_widget", "login_url", $this->gEnv->createCurrentPageUrl() . '&task=login');               // ログイン用URL
-                               break;
-                       case 'progress':                        // クイズ質問回答画面
-                       case 'complete':                        // 受付完了画面
-                               $message = sprintf(self::ERR_MESSAGE_FORMAT, '携帯電話以外からは実行できません');
-                               $this->tmpl->addVar("_widget", "message", $message);
-                               $this->tmpl->addVar('_widget', 'top_url', $this->gEnv->createCurrentPageUrlForMobile(''));
-                               break;
-                       default:
-                               break;
-               }
-       }
-}
-?>
diff --git a/widgets/m/quizk/include/db/quizkDb.php b/widgets/m/quizk/include/db/quizkDb.php
deleted file mode 100644 (file)
index 144ec75..0000000
+++ /dev/null
@@ -1,414 +0,0 @@
-<?php
-/**
- * DBクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2009 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: quizkDb.php 1934 2009-05-28 11:09:45Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getDbPath() . '/baseDb.php');
-
-class quizkDb extends BaseDb
-{
-       /**
-        * 設定値を取得
-        *
-        * @param string $key           キーとなる項目値
-        * @return string $value        値
-        */
-       function getConfig($key)
-       {
-               $retValue = '';
-               $queryStr = 'SELECT qc_value FROM quiz_config ';
-               $queryStr .=  'WHERE qc_id  = ?';
-               $ret = $this->selectRecord($queryStr, array($key), $row);
-               if ($ret) $retValue = $row['qc_value'];
-               return $retValue;
-       }
-       /**
-        * 設定値を更新
-        *
-        * @param string $key           キーとなる項目値
-        * @param string $value         値
-        * @return                                      true = 正常、false=異常
-        */
-       function updateConfig($key, $value)
-       {
-               // トランザクションスタート
-               $this->startTransaction();
-               
-               // データの確認
-               $queryStr = 'SELECT qc_value FROM quiz_config ';
-               $queryStr .=  'WHERE qc_id  = ?';
-               $ret = $this->isRecordExists($queryStr, array($key));
-               if ($ret){
-                       $queryStr = "UPDATE quiz_config SET qc_value = ? WHERE qc_id = ?";
-                       $this->execStatement($queryStr, array($value, $key));
-               } else {
-                       $queryStr = "INSERT INTO quiz_config (qc_id, qc_value) VALUES (?, ?)";
-                       $this->execStatement($queryStr, array($key, $value));
-               }
-               
-               // トランザクション終了
-               $ret = $this->endTransaction();
-               return $ret;
-       }
-       /**
-        * 定義セットIDリスト取得
-        *
-        * @param function $callback    コールバック関数
-        * @return                                              なし
-        */
-       function getAllSetId($callback)
-       {
-               $queryStr  = 'SELECT * FROM quiz_set_id ';
-               $queryStr .=   'WHERE qs_deleted = false ';             // 未削除
-               $queryStr .=   'ORDER BY qs_index';
-               $this->selectLoop($queryStr, array(), $callback);
-       }
-       /**
-        * 定義セットID情報取得
-        *
-        * @param string        $id                             定義セットID
-        * @param array         $row                    取得レコード
-        * @return                                                      true=取得、false=取得せず
-        */
-       function getSetId($id, &$row)
-       {
-               $queryStr  = 'SELECT * FROM quiz_set_id ';
-               $queryStr .=   'WHERE qs_deleted = false ';             // 未削除
-               $queryStr .=   'AND qs_id  = ? ';
-               $ret = $this->selectRecord($queryStr, array($id), $row);
-               return $ret;
-       }
-       /**
-        * 定義セットIDを更新
-        *
-        * @param string        $id                             定義セットID
-        * @param date          $totalDate              集計日付
-        * @return                                                      true = 正常、false=異常
-        */
-       function updateSetId($id, $totalDate)
-       {
-               // トランザクションスタート
-               $this->startTransaction();
-               
-               // データの確認
-               $queryStr = 'SELECT * FROM quiz_set_id ';
-               $queryStr .=  'WHERE qs_id  = ? ';
-               $ret = $this->selectRecord($queryStr, array($id), $row);
-               if ($ret){
-                       $queryStr  = 'UPDATE quiz_set_id ';
-                       $queryStr .=   'SET qs_total_date = ? ';
-                       $queryStr .=   'WHERE qs_id = ?';
-                       $ret = $this->execStatement($queryStr, array($totalDate, $id));                 
-               } else {
-                       $queryStr = 'INSERT INTO quiz_set_id (';
-                       $queryStr .=  'qs_id, ';
-                       $queryStr .=  'qs_total_date ';
-                       $queryStr .=  ') VALUES (';
-                       $queryStr .=  '?, ?';
-                       $queryStr .=  ')';
-                       $ret = $this->execStatement($queryStr, array($id, $totalDate));
-               }
-               // トランザクション終了
-               $ret = $this->endTransaction();
-               return $ret;
-       }
-       /**
-        * すべてのクイズ定義を取得
-        *
-        * @param string $setId                 パターンセットID
-        * @param function      $callback       コールバック関数
-        * @return                      なし
-        */
-       function getAllItems($setId, $callback)
-       {
-               $queryStr  = 'SELECT * FROM quiz_item_def ';
-               $queryStr .=   'WHERE qd_deleted = false ';             // 未削除
-               $queryStr .=     'AND qd_set_id = ? ';
-               $queryStr .=   'ORDER BY qd_id';
-               $this->selectLoop($queryStr, array($setId), $callback);
-       }
-       /**
-        * クイズ定義を取得
-        *
-        * @param string $setId         パターンセットID
-        * @param string $id            クイズ項目ID
-        * @param array  $row           取得レコード
-        * @return bool                         true=取得、false=取得せず
-        */
-       function getItem($setId, $id, &$row)
-       {
-               $queryStr  = 'SELECT * FROM quiz_item_def ';
-               $queryStr .=   'WHERE qd_deleted = false ';             // 未削除
-               $queryStr .=     'AND qd_set_id = ? ';
-               $queryStr .=     'AND qd_id = ? ';
-               $ret = $this->selectRecord($queryStr, array($setId, $id), $row);
-               return $ret;
-       }
-       /**
-        * すべてのクイズ定義を削除
-        *
-        * @param string $setId                 パターンセットID
-        * @return                                              true=成功、false=失敗
-        */
-       function deleteAllItems($setId)
-       {
-               $now = date("Y/m/d H:i:s");     // 現在日時
-               $userId = $this->gEnv->getCurrentUserId();      // 現在のユーザ
-               
-               // トランザクションスタート
-               $startTran = false;                     // この関数でトランザクションを開始したかどうか
-               if (!$this->isInTransaction()){
-                       $this->startTransaction();
-                       $startTran = true;
-               }
-               
-               // レコードを削除
-               $queryStr  = 'UPDATE quiz_item_def ';
-               $queryStr .=   'SET qd_deleted = true, ';       // 削除
-               $queryStr .=     'qd_update_user_id = ?, ';
-               $queryStr .=     'qd_update_dt = ? ';
-               $queryStr .=   'WHERE qd_set_id = ? AND qd_deleted = false';
-               $ret = $this->execStatement($queryStr, array($userId, $now, $setId));
-
-               // トランザクション確定
-               if ($startTran) $ret = $this->endTransaction();
-               return $ret;
-       }
-       /**
-        * クイズ定義項目が存在しているかチェック
-        *
-        * @param string $setId                 定義セットID
-        * @param string $id                    ID
-        * @return bool                                 true=存在する、false=存在しない
-        */
-       function isExistsItem($setId, $id)
-       {
-               $queryStr = 'SELECT * FROM quiz_item_def ';
-               $queryStr .=  'WHERE qd_deleted = false ';              // 未削除
-               $queryStr .=     'AND qd_set_id = ? ';
-               $queryStr .=     'AND qd_id = ? ';
-               return $this->isRecordExists($queryStr, array($setId, $id));
-       }
-       /**
-        * 次の問題を取得
-        *
-        * @param string $setId                 定義セットID
-        * @param string $mobileId              携帯ID
-        * @param array         $row            取得レコード
-        * @return bool                                 true=取得、false=取得せず
-        */
-       function getNextQuestion($setId, $mobileId, &$row)
-       {
-               $queryStr  = 'SELECT * FROM quiz_item_def LEFT JOIN quiz_user_post ON qd_set_id = qp_set_id AND qd_id = qp_question_id AND qd_type = 0 AND qp_mobile_id = ? ';
-               $queryStr .=   'WHERE qd_deleted = false ';             // 未削除
-               $queryStr .=     'AND qd_set_id = ? ';
-               $queryStr .=     'AND qd_type = 0 ';            // 問題
-               $queryStr .=     'AND qd_visible = true ';              // 表示
-               $queryStr .=     'AND qp_mobile_id IS NULL ';
-               $queryStr .=   'ORDER BY qd_index';
-               $ret = $this->selectRecord($queryStr, array($mobileId, $setId), $row);
-               return $ret;
-       }
-       /**
-        * 問題数を取得
-        *
-        * @param string $setId                 定義セットID
-        * @param bool $visibleOnly             表示項目のみかどうか
-        * @return int                                  問題数
-        */
-       function getQuestionCount($setId, $visibleOnly = true)
-       {
-               $queryStr = 'SELECT * FROM quiz_item_def ';
-               $queryStr .=  'WHERE qd_deleted = false ';              // 未削除
-               $queryStr .=     'AND qd_set_id = ? ';
-               $queryStr .=     'AND qd_visible = true ';
-               return $this->selectRecordCount($queryStr, array($setId));
-       }
-       /**
-        * クイズ回答を取得
-        *
-        * @param string $setId                 定義セットID
-        * @param array $answerIdArray  回答の配列
-        * @param array         $rows           取得レコード
-        * @return bool                                 true=取得、false=取得せず
-        */
-       function getAnswers($setId, $answerIdArray, &$rows)
-       {
-               if (count($answerIdArray) == 0) return false;
-               
-               $answerStr = '';
-               for ($i = 0; $i < count($answerIdArray); $i++){
-                       $answerStr .= '\'' . addslashes($answerIdArray[$i]) . '\',';
-               }
-               $answerStr = trim($answerStr, ',');
-               
-               // CASE文作成
-               $caseStr = 'CASE qd_id ';
-               for ($i = 0; $i < count($answerIdArray); $i++){
-                       $caseStr .= 'WHEN \'' . addslashes($answerIdArray[$i]) . '\' THEN ' . $i . ' ';
-               }
-               $caseStr .= 'END AS no';
-
-               $queryStr  = 'SELECT *, ' . $caseStr . ' FROM quiz_item_def ';
-               $queryStr .=   'WHERE qd_visible = true ';
-               $queryStr .=     'AND qd_deleted = false ';             // 削除されていない
-               $queryStr .=     'AND qd_type = 1 ';            // 回答
-               $queryStr .=     'AND qd_id in (' . $answerStr . ') ';
-               $queryStr .=     'AND qd_set_id = ? ';
-               $queryStr .=   'ORDER BY no';
-               $retValue = $this->selectRecords($queryStr, array($setId), $rows);
-               return $retValue;
-       }
-       /**
-        * クイズ定義項目の更新
-        *
-        * @param string $setId                 定義セットID
-        * @param string $id                    項目ID
-        * @param int $type                             項目タイプ
-        * @param int $index                    項目順
-        * @param string $selAnswer             選択用回答
-        * @param string $answer                回答値
-        * @param string $title                 タイトル
-        * @param string $content               内容
-        * @param bool $visible                 表示制御
-        * @param int $newSerial                新規シリアル番号
-        * @return bool                                 true = 成功、false = 失敗
-        */
-       function updateItem($setId, $id, $type, $index, $selAnswer, $answer, $title, $content, $visible, &$newSerial)
-       {
-               $now = date("Y/m/d H:i:s");     // 現在日時
-               $userId = $this->gEnv->getCurrentUserId();      // 現在のユーザ
-               
-               // トランザクション開始
-               //$this->startTransaction();
-               
-               // 指定のレコードの履歴インデックス取得
-               $historyIndex = 0;              // 履歴番号
-               $queryStr  = 'SELECT * FROM quiz_item_def ';
-               $queryStr .=   'WHERE qd_set_id = ? ';
-               $queryStr .=     'AND qd_id = ? ';
-               $queryStr .=  'ORDER BY qd_history_index DESC ';
-               $ret = $this->selectRecord($queryStr, array($setId, $id), $row);
-               if ($ret){
-                       $historyIndex = $row['qd_history_index'] + 1;
-               
-                       // レコードが削除されていない場合は削除
-                       if (!$row['qd_deleted']){
-                               // 古いレコードを削除
-                               $queryStr  = 'UPDATE quiz_item_def ';
-                               $queryStr .=   'SET qd_deleted = true, ';       // 削除
-                               $queryStr .=     'qd_update_user_id = ?, ';
-                               $queryStr .=     'qd_update_dt = ? ';
-                               $queryStr .=   'WHERE qd_serial = ?';
-                               $ret = $this->execStatement($queryStr, array($userId, $now, $row['qd_serial']));
-                               if (!$ret) return false;
-                       }
-               }
-               
-               // 新規レコード追加
-               $queryStr  = 'INSERT INTO quiz_item_def (';
-               $queryStr .=   'qd_set_id, ';
-               $queryStr .=   'qd_id, ';
-               $queryStr .=   'qd_history_index, ';
-               $queryStr .=   'qd_type, ';
-               $queryStr .=   'qd_select_answer_id, ';
-               $queryStr .=   'qd_answer_id, ';
-               $queryStr .=   'qd_title, ';
-               $queryStr .=   'qd_content, ';
-               $queryStr .=   'qd_index, ';
-               $queryStr .=   'qd_visible, ';
-               $queryStr .=   'qd_create_user_id, ';
-               $queryStr .=   'qd_create_dt ';
-               $queryStr .=   ') VALUES ';
-               $queryStr .=   '(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
-               $ret =$this->execStatement($queryStr, array($setId, $id, $historyIndex, $type, $selAnswer, $answer, $title, $content, $index, intval($visible), $userId, $now));
-               if (!$ret) return false;
-               
-               // 新規のシリアル番号取得
-               $queryStr = 'SELECT MAX(qd_serial) AS ns FROM quiz_item_def ';
-               $ret = $this->selectRecord($queryStr, array(), $row);
-               if ($ret) $newSerial = $row['ns'];
-               
-               // トランザクション確定
-               //$ret = $this->endTransaction();
-               return $ret;
-       }
-       /**
-        * 回答データを追加
-        *
-        * @param string        $mobileId               携帯ID
-        * @param string        $setId                  パターンセットID
-        * @param string        $id                             回答ID
-        * @param string        $value                  入力値
-        * @param bool      $result                     回答結果
-        * @param int           $logSerial              アクセスログシリアル番号
-        * @return                                                      true = 正常、false=異常
-        */
-       function addPostData($mobileId, $setId, $id, $value, $result, $logSerial)
-       {
-               $now = date("Y/m/d H:i:s");     // 現在日時
-               
-               // トランザクションスタート
-               $this->startTransaction();
-               
-               // 既に登録されている場合はエラー
-               $queryStr = 'SELECT * FROM quiz_user_post ';
-               $queryStr .=  'WHERE qp_mobile_id = ? ';
-               $queryStr .=     'AND qp_set_id = ? ';
-               $queryStr .=     'AND qp_question_id = ? ';
-               $ret = $this->isRecordExists($queryStr, array($mobileId, $setId, $id));
-               if ($ret){
-                       // トランザクション終了
-                       $ret = $this->endTransaction();
-                       return false;
-               }
-               
-               $queryStr = 'INSERT INTO quiz_user_post (';
-               $queryStr .=  'qp_mobile_id, ';
-               $queryStr .=  'qp_set_id, ';
-               $queryStr .=  'qp_question_id, ';
-               $queryStr .=  'qp_answer_id, ';
-               $queryStr .=  'qp_result, ';
-               $queryStr .=  'qp_access_log_serial, ';
-               $queryStr .=  'qp_dt ';
-               $queryStr .=  ') VALUES (';
-               $queryStr .=  '?, ?, ?, ?, ?, ?, ?';
-               $queryStr .=  ')';
-               $ret = $this->execStatement($queryStr, array($mobileId, $setId, $id, $value, intval($result), $logSerial, $now));
-               
-               // トランザクション終了
-               $ret = $this->endTransaction();
-               return $ret;
-       }
-       /**
-        * 回答状況を取得
-        *
-        * @param string $setId                 定義セットID
-        * @param string $mobileId              携帯ID
-        * @param array         $rows           取得レコード
-        * @return bool                                 true=取得、false=取得せず
-        */
-       function getAnswerResult($setId, $mobileId, &$rows)
-       {
-               $queryStr  = 'SELECT * FROM quiz_item_def LEFT JOIN quiz_user_post ON qd_set_id = qp_set_id AND qd_id = qp_question_id AND qd_type = 0 AND qp_mobile_id = ? ';
-               $queryStr .=   'WHERE qd_deleted = false ';             // 未削除
-               $queryStr .=     'AND qd_set_id = ? ';
-               $queryStr .=     'AND qd_type = 0 ';            // 問題
-               $queryStr .=     'AND qd_visible = true ';              // 表示
-               $queryStr .=     'AND qp_mobile_id IS NOT NULL ';
-               $queryStr .=   'ORDER BY qd_index';
-               $retValue = $this->selectRecords($queryStr, array($mobileId, $setId), $rows);
-               return $retValue;
-       }
-}
-?>
diff --git a/widgets/m/quizk/include/template/admin_csv.tmpl.html b/widgets/m/quizk/include/template/admin_csv.tmpl.html
deleted file mode 100644 (file)
index e2e0b75..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<script type="text/javascript">\r
-<!--\r
-function uploadCheck(){\r
-       if (!document.upload.setid.value){\r
-               alert('操作対象のパターンセットが選択されていません');\r
-               return;\r
-       }\r
-       if (!document.upload.upfile.value){\r
-               alert('アップロードするファイルが選択されていません');\r
-               return;\r
-       }\r
-       document.upload.act.value = 'upload';\r
-       if (window.confirm('ファイルをアップロードします')){\r
-               document.upload.submit();\r
-       }\r
-}\r
-// CSVダウンロード\r
-function downloadCSV(){\r
-       if (!document.upload.setid.value){\r
-               alert('操作対象のパターンセットが選択されていません');\r
-               return;\r
-       }\r
-       document.upload.act.value = 'download';\r
-       document.upload.submit();\r
-       return true;\r
-}\r
-$(function(){\r
-       // スクロールバー付きのテーブルを作成\r
-       //m3_tableWithScrollbar('widgetlist', 15, 0);\r
-});\r
-// -->\r
-</script>\r
-<div align="center">\r
-{MENU_ITEMS}\r
-<br />\r
-<!-- m3:ErrorMessage -->\r
-<form method="post" name="main">\r
-<input type="hidden" name="act" />\r
-</form>\r
-<form enctype="multipart/form-data" method="post" name="upload">\r
-<input type="hidden" name="act" />\r
-<input type="hidden" name="datatype" />\r
-<table><tr><td>\r
-<label>操作対象のパターンセット:</label>\r
-    <select name="setid">\r
-       <option value="">-- 未選択 --</option>\r
-        <patTemplate:tmpl name="set_id_list">\r
-        <option value="{VALUE}" {SELECTED}>{NAME}</option>\r
-        </patTemplate:tmpl>\r
-    </select><br /><br />\r
-</td></tr>\r
-<tr><td>\r
-<table class="simple-table" width="400">\r
-    <tbody>\r
-        <tr>\r
-           <td class="table-head" colspan="2">CSVアップロード</td>\r
-       </tr>\r
-        <tr>\r
-           <td colspan="2"><input type="file" name="upfile" size="50" /></td>\r
-       </tr>\r
-       <tr class="even">\r
-       <td><input type="checkbox" name="item_replace" />既存データをすべて削除</td>\r
-       <td align="right"><input type="button" class="button" onclick="uploadCheck();" value="アップロード" /></td>\r
-       </tr>\r
-    </tbody>\r
-</table>\r
-<br />\r
-</td></tr>\r
-<tr><td>\r
-<table class="simple-table" width="400">\r
-    <tbody>\r
-        <tr>\r
-           <td class="table-head" colspan="2">CSVダウンロード</td>\r
-       </tr>\r
-       <tr>\r
-       <td>クイズ定義データ</td>\r
-       <td align="right">\r
-           <input type="button" class="button" onclick="downloadCSV();" value="ダウンロード" />\r
-       </td>\r
-       </tr>\r
-    </tbody>\r
-</table>\r
-</td></tr>\r
-</table>\r
-</form>\r
-</div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/quizk/include/template/admin_operation.tmpl.html b/widgets/m/quizk/include/template/admin_operation.tmpl.html
deleted file mode 100644 (file)
index 7464afc..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<script type="text/javascript">\r
-<!--\r
-function updateItem(){\r
-    if (!window.confirm('設定を更新しますか?')) return false;\r
-    document.main.act.value = 'update';\r
-    document.main.submit();\r
-    return true;\r
-}\r
-// -->\r
-</script>\r
-<div align="center">\r
-{MENU_ITEMS}\r
-<br />\r
-<!-- m3:ErrorMessage -->\r
-<form method="post" name="main">\r
-<input type="hidden" name="act" />\r
-<table class="simple-table">\r
-<caption>クイズサイト運用設定</caption>\r
-    <tbody>\r
-        <tr>\r
-           <td class="table-headside" width="200"><span {_HELP_OPERATION_SET_ID}>運用中のクイズパターンセット</span></td>\r
-           <td>\r
-    <select name="item_setid">\r
-        <patTemplate:tmpl name="set_id_list">\r
-        <option value="{VALUE}" {SELECTED}>{NAME}</option>\r
-        </patTemplate:tmpl>\r
-    </select>\r
-           </td>\r
-       </tr>\r
-       <tr class="even">\r
-       <td colspan="2" align="right">\r
-               <input type="button" class="button" onclick="updateItem();" value="更新" />\r
-       </td>\r
-       </tr>\r
-    </tbody>\r
-</table>\r
-</form>\r
-</div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/quizk/include/template/complete.tmpl.html b/widgets/m/quizk/include/template/complete.tmpl.html
deleted file mode 100644 (file)
index 8475bb9..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<div>&nbsp;</div>\r
-<div align="center" style="text-align:center;">{RESULT}</div>\r
-<div>&nbsp;</div>\r
-<div align="center" style="text-align:center;">{RESULT_RATIO}</div>\r
-<div>&nbsp;</div>\r
-<div align="center" style="text-align:center;"><a href="{TOP_URL}">トップページに戻る</a></div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/quizk/include/template/main.tmpl.html b/widgets/m/quizk/include/template/main.tmpl.html
deleted file mode 100644 (file)
index b3bd04b..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<patTemplate:tmpl name="_widget">
-<!-- m3:ErrorMessage -->
-<patTemplate:tmpl name="contentlist">
-{TITLE}<br />
-{CONTENT}<br />
-</patTemplate:tmpl>
-</patTemplate:tmpl>
diff --git a/widgets/m/quizk/include/template/message.tmpl.html b/widgets/m/quizk/include/template/message.tmpl.html
deleted file mode 100644 (file)
index fad5872..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<div align="center" style="text-align:center;">{MESSAGE}</div>\r
-<div>&nbsp;</div>\r
-<div>&nbsp;</div>\r
-<div align="center" style="text-align:center;"><a href="{TOP_URL}" accesskey="0">トップページに戻る[0]</a></div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/quizk/include/template/progress.tmpl.html b/widgets/m/quizk/include/template/progress.tmpl.html
deleted file mode 100644 (file)
index 6c194e7..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<div align="center" style="text-align:center;">{MESSAGE}</div>\r
-<patTemplate:tmpl name="question_area" visibility="hidden">\r
-<form action="{URL}" method="post" class="form">\r
-<input type="hidden" name="act" value="{ACT}" />\r
-<input type="hidden" name="sid" value="{SID}" />\r
-<input type="hidden" name="qid" value="{QID}" />\r
-<input type="hidden" name="no" value="{NO}" />\r
-<div>{TITLE}</div>\r
-<div><span style="font-size:x-small;">&nbsp;</span></div>\r
-<div>{CONTENT}</div>\r
-<div><span style="font-size:x-small;">&nbsp;</span></div>\r
-<div>{ANSWER}</div>\r
-<div><span style="font-size:x-small;">&nbsp;</span></div>\r
-<div align="center" style="text-align:center;"><input type="submit" value="送信" /></div>\r
-</form>\r
-</patTemplate:tmpl>\r
-<patTemplate:tmpl name="result_area" visibility="hidden">\r
-<div align="center" style="text-align:center;">{RESULT}</div>\r
-<div><span style="font-size:x-small;">&nbsp;</span></div>\r
-<patTemplate:tmpl name="result_msg" visibility="hidden"><div>正解は</div></patTemplate:tmpl>\r
-<div>{TITLE}</div>\r
-<div><span style="font-size:x-small;">&nbsp;</span></div>\r
-<div>{CONTENT}</div>\r
-<div><span style="font-size:x-small;">&nbsp;</span></div>\r
-<div align="center" style="text-align:center;"><a href="{NEXT_URL}">{NEXT_NAME}</a></div>\r
-</patTemplate:tmpl>\r
-<patTemplate:tmpl name="view_status_area" visibility="hidden">\r
-<div>&nbsp;</div>\r
-</patTemplate:tmpl>\r
-<div>&nbsp;</div>\r
-<div align="center" style="text-align:center;"><a href="{TOP_URL}" accesskey="0">トップページに戻る[0]</a></div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/quizk/include/template/top.tmpl.html b/widgets/m/quizk/include/template/top.tmpl.html
deleted file mode 100644 (file)
index 13f363f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<div>&nbsp;</div>\r
-<div>&nbsp;</div>\r
-<div align="center" style="text-align:center;"><a href="{START_URL}">スタート</a></div>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/quizk/index.php b/widgets/m/quizk/index.php
deleted file mode 100644 (file)
index 45af596..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 1920 2009-05-23 04:01:26Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/sample/index.php b/widgets/m/sample/index.php
deleted file mode 100644 (file)
index 3a70eb5..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-<?php
-/**
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2009 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 2040 2009-07-03 07:50:09Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-echo '<form action="must_input" method="post">';
-echo '<h1>表示テスト(h1)</h1>';
-echo date("Y/m/d H:i:s") . '<br />';
-echo '<br />';
-echo '<div style="font-size:xx-small;">';
-echo 'メニュー(xx-small)<br />';
-echo '<select name="test">';
-echo '<option value="0">-- 未選択 --</option>';
-echo '<option value="1">ダミー1</option>';
-echo '<option value="2">ダミー2</option>';
-echo '<option value="3">ダミー3</option>';
-echo '<option value="4">ダミー4</option>';
-echo '<option value="5">ダミー5</option>';
-echo '<option value="6">ダミー6</option>';
-echo '<option value="7">ダミー7</option>';
-echo '<option value="8">ダミー8</option>';
-echo '<option value="9">ダミー9</option>';
-echo '<option value="10">ダミー10</option>';
-echo '</select><br /><br />';
-echo '</div>';
-echo '<div style="font-size:small;">';
-echo 'メニュー(small)<br />';
-echo '<select name="test">';
-echo '<option value="0">-- 未選択 --</option>';
-echo '<option value="1">ダミー1</option>';
-echo '<option value="2">ダミー2</option>';
-echo '<option value="3">ダミー3</option>';
-echo '<option value="4">ダミー4</option>';
-echo '<option value="5">ダミー5</option>';
-echo '<option value="6">ダミー6</option>';
-echo '<option value="7">ダミー7</option>';
-echo '<option value="8">ダミー8</option>';
-echo '<option value="9">ダミー9</option>';
-echo '<option value="10">ダミー10</option>';
-echo '</select><br /><br />';
-echo '</div>';
-echo '<div style="font-size:medium;">';
-echo 'メニュー(medium)<br />';
-echo '<select name="test">';
-echo '<option value="0">-- 未選択 --</option>';
-echo '<option value="1">ダミー1</option>';
-echo '<option value="2">ダミー2</option>';
-echo '<option value="3">ダミー3</option>';
-echo '<option value="4">ダミー4</option>';
-echo '<option value="5">ダミー5</option>';
-echo '<option value="6">ダミー6</option>';
-echo '<option value="7">ダミー7</option>';
-echo '<option value="8">ダミー8</option>';
-echo '<option value="9">ダミー9</option>';
-echo '<option value="10">ダミー10</option>';
-echo '</select><br /><br />';
-echo '</div>';
-echo '複数選択<br />';
-echo '<select name="test2" size="5" multiple>';
-echo '<option value="1">ダミー1</option>';
-echo '<option value="2">ダミー2</option>';
-echo '<option value="3">ダミー3</option>';
-echo '<option value="4">ダミー4</option>';
-echo '<option value="5">ダミー5</option>';
-echo '<option value="6">ダミー6</option>';
-echo '<option value="7">ダミー7</option>';
-echo '<option value="8">ダミー8</option>';
-echo '<option value="9">ダミー9</option>';
-echo '<option value="10">ダミー10</option>';
-echo '</select>';
-echo '</form><br />';
-?>
diff --git a/widgets/m/sample2/include/container/m_sample2WidgetContainer.php b/widgets/m/sample2/include/container/m_sample2WidgetContainer.php
deleted file mode 100644 (file)
index a2f212e..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2009 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_sample2WidgetContainer.php 2039 2009-07-03 07:41:12Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath()          . '/baseMobileWidgetContainer.php');
-
-class m_sample2WidgetContainer extends BaseMobileWidgetContainer
-{
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {       
-               return 'index.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-       }
-}
-?>
diff --git a/widgets/m/sample2/include/template/index.tmpl.html b/widgets/m/sample2/include/template/index.tmpl.html
deleted file mode 100644 (file)
index eb4a5ed..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<form action="must_input" method="post">\r
-●スペーサ画像による行間の作成<br />\r
-()内数値は次行とのピクセル間隔<br />\r
-■■■行間(なし)■■<br />\r
-■■■行間(1)■■■<br />\r
-<div><img src="{_ROOT_URL}/images/system/spacer.gif" width="1" height="1" /></div>\r
-■■■行間(2)■■■<br />\r
-<div><img src="{_ROOT_URL}/images/system/spacer.gif" width="1" height="2" /></div>\r
-■■■行間(3)■■■<br />\r
-<div><img src="{_ROOT_URL}/images/system/spacer.gif" width="1" height="3" /></div>\r
-■■■行間(5)■■■<br />\r
-<div><img src="{_ROOT_URL}/images/system/spacer.gif" width="1" height="5" /></div>\r
-■■■行間(7)■■■<br />\r
-<div><img src="{_ROOT_URL}/images/system/spacer.gif" width="1" height="7" /></div>\r
-■■■行間(10)■■■<br />\r
-<div><img src="{_ROOT_URL}/images/system/spacer.gif" width="1" height="10" /></div>\r
-■■■行間(15)■■■<br />\r
-<div><img src="{_ROOT_URL}/images/system/spacer.gif" width="1" height="15" /></div>\r
-■■■行間(20)■■■<br />\r
-<div><img src="{_ROOT_URL}/images/system/spacer.gif" width="1" height="20" /></div>\r
-■メニュー<br />\r
-<div><select name="test"><option value="0">メニュー(なし)</option></select></div>\r
-<div><select name="test"><option value="0">メニュー(1)</option></select></div>\r
-<div><img src="{_ROOT_URL}/images/system/spacer.gif" width="1" height="1" /></div>\r
-<div><select name="test"><option value="0">メニュー(2)</option></select></div>\r
-<div><img src="{_ROOT_URL}/images/system/spacer.gif" width="1" height="2" /></div>\r
-<div><select name="test"><option value="0">メニュー(3)</option></select></div>\r
-<div><img src="{_ROOT_URL}/images/system/spacer.gif" width="1" height="3" /></div>\r
-<div><select name="test"><option value="0">メニュー(5)</option></select></div>\r
-<div><img src="{_ROOT_URL}/images/system/spacer.gif" width="1" height="5" /></div>\r
-<div><select name="test"><option value="0">メニュー(7)</option></select></div>\r
-<div><img src="{_ROOT_URL}/images/system/spacer.gif" width="1" height="7" /></div>\r
-<div><select name="test"><option value="0">メニュー(10)</option></select></div>\r
-<div><img src="{_ROOT_URL}/images/system/spacer.gif" width="1" height="10" /></div>\r
-<div><select name="test"><option value="0">メニュー(15)</option></select></div>\r
-<div><img src="{_ROOT_URL}/images/system/spacer.gif" width="1" height="15" /></div>\r
-<div><select name="test"><option value="0">メニュー(20)</option></select></div>\r
-<div><img src="{_ROOT_URL}/images/system/spacer.gif" width="1" height="20" /></div>\r
-■■■終了■■■<br />\r
-●スペーサ画像によるラインの作成<br />\r
-■サイズ(1)上下(1)■<br />\r
-<div style="background-color:#ff0000;margin:1px 0;"><img src="{_ROOT_URL}/images/system/spacer.gif" width="1" height="1" /></div>\r
-■サイズ(2)上下(2)■<br />\r
-<div style="background-color:#00ff00;margin:2px 0"><img src="{_ROOT_URL}/images/system/spacer.gif" width="1" height="2" /></div>\r
-■サイズ(3)上下(3)■<br />\r
-<div style="background-color:#0000ff;margin:3px 0"><img src="{_ROOT_URL}/images/system/spacer.gif" width="1" height="3" /></div>\r
-●マーキー<br />\r
-<marquee>DoCoMo未対応</marquee>\r
-<div style="display:-wap-marquee; -wap-marquee-loop:infinite; background-color:blue; color:white;">DoCoMo対応</div>\r
-●センターリング<br />\r
-<div style="text-align: center;">divタグ</div>\r
-■■■■■■<br />\r
-<p style="text-align: center;">pタグ</p>\r
-■■■終了■■■<br />\r
-</form>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/sample2/index.php b/widgets/m/sample2/index.php
deleted file mode 100644 (file)
index b659383..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 2039 2009-07-03 07:41:12Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
diff --git a/widgets/m/sample_input/include/container/m_sample_inputWidgetContainer.php b/widgets/m/sample_input/include/container/m_sample_inputWidgetContainer.php
deleted file mode 100644 (file)
index 2100e54..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2009 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: m_sample_inputWidgetContainer.php 1857 2009-05-06 09:23:04Z fishbone $
- * @link       http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath()          . '/baseMobileWidgetContainer.php');
-
-class m_sample_inputWidgetContainer extends BaseMobileWidgetContainer
-{
-       /**
-        * コンストラクタ
-        */
-       function __construct()
-       {
-               // 親クラスを呼び出す
-               parent::__construct();
-       }
-       /**
-        * テンプレートファイルを設定
-        *
-        * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
-        * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。そのまま_assign()に渡る
-        * @return string                                               テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
-        */
-       function _setTemplate($request, &$param)
-       {       
-               return 'index.tmpl.html';
-       }
-       /**
-        * テンプレートにデータ埋め込む
-        *
-        * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
-        *
-        * @param RequestManager $request               HTTPリクエスト処理クラス
-        * @param object         $param                 任意使用パラメータ。_setTemplate()と共有。
-        * @param                                                               なし
-        */
-       function _assign($request, &$param)
-       {
-               $msg = '';
-               $input = $request->mobileTrimValueOf('msg');
-               if (!empty($input)){
-                       $msg = '送信文字は[' . $input . ']です<br /><br />';
-               }
-               
-               // 入力値を戻す
-               $this->tmpl->addVar("_widget", "msg", $msg);
-               $this->tmpl->addVar("_widget", "home_url", $this->gEnv->getDefaultMobileUrl(true));
-               $url = $this->gEnv->createCurrentPageUrlForMobile();
-               $this->tmpl->addVar("_widget", "url", $url);
-               
-               // 携帯キャリア、機種
-               $this->tmpl->addVar("_widget", "carrier", $this->agent->getCarrierLongName());
-               $this->tmpl->addVar("_widget", "type", $this->agent->getModel());
-               $this->tmpl->addVar("_widget", "serial", $this->gEnv->getMobileId());
-       }
-}
-?>
diff --git a/widgets/m/sample_input/include/template/index.tmpl.html b/widgets/m/sample_input/include/template/index.tmpl.html
deleted file mode 100644 (file)
index cc9d6a2..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<patTemplate:tmpl name="_widget">\r
-<form action="{URL}" method="post" class="form">\r
-{MSG}\r
-携帯キャリア:{CARRIER}<br />\r
-携帯機種:{TYPE}<br />\r
-端末ID:{SERIAL}<br /><br />\r
-メッセージ送信<br />\r
-<input type="text" name="msg" size="20" maxlength="20" /><br />\r
-<input type="text" name="msg2" size="16" maxlength="16" /><input type="submit" value="送信" /><br />\r
-</form><br />\r
-ファイルアップロード<br />\r
-<form action="{URL}" enctype="multipart/form-data" method="post">\r
-<input type="file" name="upfile" size="50" /><br />\r
-<input type="submit" value="送信" />\r
-</form><br />\r
-<a href="{HOME_URL}">ホーム</a>\r
-</patTemplate:tmpl>\r
diff --git a/widgets/m/sample_input/index.php b/widgets/m/sample_input/index.php
deleted file mode 100644 (file)
index 11aaf33..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package    Magic3 Framework
- * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2007 Magic3 Project.
- * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: index.php 328 2008-02-22 10:41:33Z fishbone $
- * @link       http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
index e948e56..f388ea7 100644 (file)
@@ -70,7 +70,7 @@ class admin_qrcodeWidgetContainer extends BaseAdminWidgetContainer
                        }
                } else {                // 初期表示の場合
                        // デフォルト値の設定
-                       $qrData = $this->gEnv->getDefaultMobileUrl();                   // QRコード化するデータ、デフォルト値は携帯サイトURL
+                       $qrData = 'http://example.com';                 // QRコード化するデータデフォルト
                        $desc = '';                             // 説明
                        $paramObj = $this->getWidgetParamObj();
                        if (!empty($paramObj)){