Index: branches/version-2_12-dev/data/class/pages/admin/system/LC_Page_Admin_System_Plugin.php
===================================================================
--- branches/version-2_12-dev/data/class/pages/admin/system/LC_Page_Admin_System_Plugin.php	(revision 21490)
+++ branches/version-2_12-dev/data/class/pages/admin/system/LC_Page_Admin_System_Plugin.php	(revision 21501)
@@ -84,5 +84,5 @@
                     $plugin_file_name = $plugin_file['name'];
                     $plugin_code = $this->getPluginCode($plugin_file_name);
-
+                    
                     // 既に登録されていないか判定.
                     if ($this->isInstalledPlugin($plugin_code) === false) {
@@ -106,9 +106,9 @@
                     $plugin_code = $objFormParam->getValue('plugin_code');
                     $plugin_id = $objFormParam->getValue('plugin_id');
-
+                    $plugin = SC_Helper_Plugin_Ex::getPluginByPluginId($plugin_id);
+                    
                     $this->arrErr = $this->uninstallPlugin($plugin_id, $plugin_code);
                     // 完了メッセージアラート設定.
                     if ($this->isError($this->arrErr) === false) {
-                        $plugin = SC_Helper_Plugin_Ex::getPluginByPluginId($plugin_id);
                         // テンプレート再生成.
                         $this->remakeTemplate();
@@ -182,15 +182,17 @@
             // 優先度.
             case 'priority':
-                // TODO 優先度の変更処理.
-//                // 優先度を取得
-//                $priority_array = $objFormParam->getValue('priority');
-//                
-//                // 優先度の更新
-//                $objQuery =& SC_Query_Ex::getSingletonInstance();
-//                foreach ($priority_array as $key => $value) {
-//                    $sqlval['rank'] = $value;
-//                    $objQuery->update('dtb_plugin', $sqlval, "plugin_id = ?", array($key));
-//                }
-//                break;
+                // エラーチェック
+                $arrErr = $objFormParam->checkError();
+                $plugin_id = $objFormParam->getValue('plugin_id');
+                if ($this->isError($arrErr) === false) {
+                    // 優先度の更新
+                    $priority = $objFormParam->getValue('priority');
+                    $this->updatePriority($plugin_id, $priority);
+                } else {
+                    // エラーメッセージを詰め直す.
+                    $this->arrErr['priority'][$plugin_id] = $arrErr['priority'];
+                }
+                
+                break;
             default:
                 break;
@@ -231,5 +233,5 @@
         $objFormParam->addParam('plugin_id', 'plugin_id', INT_LEN, '', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
         $objFormParam->addParam('plugin_code', 'plugin_code', MTEXT_LEN, '', array('ALPHA_CHECK', 'MAX_LENGTH_CHECK'));
-        $objFormParam->addParam("優先順位", 'priority', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
+        $objFormParam->addParam('優先度', 'priority', INT_LEN, '', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
     }
 
@@ -287,8 +289,8 @@
     function checkPluginFile($file_path, $plugin_code, $key_file) {
         $arrErr = array();
-
+        
         // Archive_Tarを生成します.
         $tar_obj = new Archive_Tar($file_path);
-
+        
         // 圧縮ファイル名とディレクトリ名が同一であるかを判定します.
         if ($this->checkUploadFileName($tar_obj, $plugin_code) === false) {
@@ -383,5 +385,5 @@
             return $arrErr;
         }
-
+        
         // リフレクションオブジェクトを生成.
         $objReflection = new ReflectionClass($plugin_code);
@@ -404,8 +406,8 @@
         $plugin_html_dir = PLUGIN_HTML_REALDIR . $plugin_code;
         $this->makeDir($plugin_html_dir);
-
+        
         $plugin = SC_Helper_Plugin_Ex::getPluginByPluginCode($plugin_code);
         $arrErr = $this->execPlugin($plugin['plugin_id'], $plugin_code, 'install');
-
+        
         return $arrErr;
     }
@@ -535,5 +537,5 @@
         $this->makeDir($unpack_dir);
         $objUpFile->moveTempFile();
-
+        
         // 解凍
         $update_plugin_file_path = $unpack_dir . "/" . $unpack_file_name;
@@ -623,4 +625,22 @@
 
         return $arrErr;
+    }
+    
+    /**
+     * 優先度を更新します.
+     * 
+     * @param int $plugin_id プラグインID
+     * @param int $priority 優先度
+     * @return integer 更新件数
+     */
+    function updatePriority($plugin_id, $priority) {
+        $objQuery =& SC_Query_Ex::getSingletonInstance();
+        // UPDATEする値を作成する。
+        $sqlval['rank'] = $priority;
+        $sqlval['update_date'] = 'CURRENT_TIMESTAMP';
+        $where = "plugin_id = ?";
+        // UPDATEの実行
+        $ret = $objQuery->update('dtb_plugin', $sqlval, $where, array($plugin_id));
+        return $ret;
     }
 
@@ -703,11 +723,9 @@
     function execPlugin($plugin_id, $plugin_code, $exec_func) {
         $arrErr = array();
-            // インスタンスの生成.
-            $objPlugin = new $plugin_code();
-            if (method_exists($objPlugin, $exec_func) === true) {
-                $arrErr = $objPlugin->$exec_func($plugin_id);
-            } else {
-                $arrErr['plugin_error'] = "※ " . $plugin_code . ".php に" . $exec_func . "が見つかりません。<br/>";
-            }
+        if (method_exists($plugin_code, $exec_func) === true) {
+            call_user_func(array($plugin_code, $exec_func), $plugin_id);
+        } else {
+            $arrErr['plugin_error'] = "※ " . $plugin_code . ".php に" . $exec_func . "が見つかりません。<br/>";
+        }
 
         return $arrErr;
Index: branches/version-2_12-dev/data/Smarty/templates/admin/system/plugin.tpl
===================================================================
--- branches/version-2_12-dev/data/Smarty/templates/admin/system/plugin.tpl	(revision 21467)
+++ branches/version-2_12-dev/data/Smarty/templates/admin/system/plugin.tpl	(revision 21501)
@@ -27,22 +27,29 @@
         $('input[id^=plugin_enable]').change(function(event) {
             var data = {};
-            
             // モード(有効 or 無効)
             data.mode = event.target.name;
-            // プラグインID
-            data.plugin_id = event.target.value;
-            data['<!--{$smarty.const.TRANSACTION_ID_NAME}-->'] = '<!--{$transactionid}-->';
-            $.ajax({
-                type : 'POST',
-                url : location.pathname,
-                dataType : "json",
-                data: data,
-                cache : false,
-                error : remoteException,
-                success : function(data, dataType) {
-                        alert(data.message);
-                        location.href = location.pathname;
-                }
-            });
+            
+            if(data.mode === 'disable') {
+                result = window.confirm('プラグインを無効しても宜しいですか？');
+            } else if(data.mode === 'enable') {
+                result = window.confirm('プラグインを有効にしても宜しいですか？');
+            }
+            if(result){
+                // プラグインID
+                data.plugin_id = event.target.value;
+                data['<!--{$smarty.const.TRANSACTION_ID_NAME}-->'] = '<!--{$transactionid}-->';
+                $.ajax({
+                    type : 'POST',
+                    url : location.pathname,
+                    dataType : "json",
+                    data: data,
+                    cache : false,
+                    error : remoteException,
+                    success : function(data, dataType) {
+                            window.location.reload();
+                            alert(data.message);
+                    }
+                });
+            }
         });
 
@@ -65,4 +72,33 @@
         $('input[id="' + select_id + '"]').removeAttr("disabled");
     }
+    
+    function install() {
+        if (window.confirm('プラグインをインストールしても宜しいでしょうか？')){
+            fnModeSubmit('install', '', '');
+        }
+    }
+    
+    function uninstall(plugin_id, plugin_code) {
+        if (window.confirm('一度削除したデータは元に戻せません。\nプラグインを削除しても宜しいですか？')){
+           fnSetFormValue('plugin_id', plugin_id);
+           fnModeSubmit('uninstall', 'plugin_code', plugin_code);
+        }
+    }
+    
+    function update(plugin_id, plugin_code) {
+        if (window.confirm('プラグインをアップデートしても宜しいですか？')){
+           removeUpdateFile('update_file_' + plugin_id);
+           fnSetFormValue('plugin_id', plugin_id);
+           fnModeSubmit('update','plugin_code', plugin_code);
+        }
+    }
+    
+    function priority(plugin_id) {
+        if (window.confirm('プラグインをアップデートしても宜しいですか？')){
+           fnModeSubmit('priority','plugin_id',plugin_id);
+        }
+    }
+    
+    
 //]]>
 </script>
@@ -74,5 +110,5 @@
 <input type="hidden" name="plugin_id" value="" />
 <input type="hidden" name="plugin_code" value="" />
-
+<input type="hidden" name="priority" value="" />
 <div id="system" class="contents-main">
     <h2>プラグイン登録</h2>
@@ -84,5 +120,5 @@
                 <span class="attention"><!--{$arrErr[$key]}--></span>
                 <input type="file" name="<!--{ $key }-->" class="box45" size="43"  style="<!--{$arrErr[$key]|sfGetErrorColor}--> <!--{if $arrErr[$key]}--> background-color:<!--{$smarty.const.ERR_COLOR|h}--><!--{/if}-->">
-                <a class="btn-action" href="javascript:;" onclick="fnModeSubmit('install', '', '');return false;"><span class="btn-next">インストール</span></a>
+                <a class="btn-action" href="javascript:;" onclick="install(); return false;"><span class="btn-next">インストール</span></a>
             </td>
         </tr>
@@ -95,9 +131,9 @@
         <table class="system-plugin" width="900">
             <col width="10%" />
-            <col width="80%" />
-            <col width="10%" />
+            <col width="77" />
+            <col width="13%" />
             <tr>
                 <th colspan="2">機能説明</th>
-                <th>優先度<a class="btn-action" href="javascript:;" onclick="fnModeSubmit('priority','','');return false;"><span class="btn-next">反映</span></a></th>
+                <th>優先度</th>
             </tr>
             <!--{section name=data loop=$plugins}-->
@@ -150,10 +186,10 @@
                                 <a class="update_link" href="#" name="<!--{$plugin.plugin_id}-->">アップデート</a>&nbsp;|&nbsp;
                             <!-- 削除 -->
-                                <a  href="javascript:;" name="uninstall" onclick="fnSetFormValue('plugin_id', '<!--{$plugin.plugin_id}-->'); fnModeSubmit('uninstall','plugin_code','<!--{$plugin.plugin_code}-->'); return false;">削除</a>&nbsp;|&nbsp;
+                                <a  href="javascript:;" name="uninstall" onclick="uninstall(<!--{$plugin.plugin_id}-->, '<!--{$plugin.plugin_code}-->'); return false;">削除</a>&nbsp;|&nbsp;
                             <!-- 有効/無効 -->
                                 <!--{if $plugin.enable == $smarty.const.PLUGIN_ENABLE_TRUE}-->
                                     <input id="plugin_enable" type="checkbox" name="disable" value="<!--{$plugin.plugin_id}-->" id="login_memory" checked="checked">有効</input><br/>
                                 <!--{else}-->
-                                    <input id="plugin_enable" type="checkbox" name="enable" value="<!--{$plugin.plugin_id}-->" id="login_memory" onclick="fnSetFormValue('plugin_id', '<!--{$plugin.plugin_id}-->'); return false;">有効にする</input><br/>
+                                    <input id="plugin_enable" type="checkbox" name="enable" value="<!--{$plugin.plugin_id}-->" id="login_memory">有効にする</input><br/>
                                 <!--{/if}-->
 
@@ -161,5 +197,5 @@
                                 <div id="plugin_update_<!--{$plugin.plugin_id}-->" style="display: none">                                
                                     <input id="update_file_<!--{$plugin.plugin_id}-->" name="<!--{$plugin.plugin_code}-->" type="file" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" class="box30" size="30" <!--{if $arrErr[$key]}-->style="background-color:<!--{$smarty.const.ERR_COLOR|h}-->"<!--{/if}--> />
-                                    <a class="btn-action" href="javascript:;" onclick="removeUpdateFile('update_file_<!--{$plugin.plugin_id}-->'); fnSetFormValue('plugin_id', '<!--{$plugin.plugin_id}-->'); fnModeSubmit('update','plugin_code','<!--{$plugin.plugin_code}-->');return false;"><span class="btn-next">アップデート</span></a>
+                                    <a class="btn-action" href="javascript:;" onclick="update(<!--{$plugin.plugin_id}-->, '<!--{$plugin.plugin_code}-->'); return false;"><span class="btn-next">アップデート</span></a>
                                 </div>
                         </div>
@@ -168,5 +204,7 @@
                 <!--{assign var=key value="rank"}-->
                 <td class="center">
-                    <input type="text" name="priority[<!--{$plugin.plugin_id}-->]" value="<!--{$plugin.rank|h}-->" size="1" class="rank" /><br/>
+                    <span class="attention"><!--{$arrErr.priority[$plugin.plugin_id]}--></span>
+                    <input type="text" class="center" name="priority" value="<!--{$plugin.rank|h}-->" size="1" class="rank" />
+                    <a class="btn-action" href="javascript:;" onclick="priority(<!--{$plugin.plugin_id}-->);return false;"><span class="btn-next">変更</span></a><br/>
                 </td>
             </tr>
