plugins/SpecialAdmin.php
changeset 504 bc8e0e9ee01d
parent 473 518bc2b214f1
child 511 f88c8c79d784
equal deleted inserted replaced
503:f205f4b201ed 504:bc8e0e9ee01d
     2 /*
     2 /*
     3 Plugin Name: plugin_specialadmin_title
     3 Plugin Name: plugin_specialadmin_title
     4 Plugin URI: http://enanocms.org/
     4 Plugin URI: http://enanocms.org/
     5 Description: plugin_specialadmin_desc
     5 Description: plugin_specialadmin_desc
     6 Author: Dan Fuhry
     6 Author: Dan Fuhry
     7 Version: 1.1.1
     7 Version: 1.1.3
     8 Author URI: http://enanocms.org/
     8 Author URI: http://enanocms.org/
     9 */
     9 */
    10 
    10 
    11 /*
    11 /*
    12  * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
    12  * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
    13  * Version 1.1.2 (Caoineag alpha 2)
    13  * Version 1.1.3 (Caoineag alpha 3)
    14  * Copyright (C) 2006-2007 Dan Fuhry
    14  * Copyright (C) 2006-2007 Dan Fuhry
    15  *
    15  *
    16  * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
    16  * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
    17  * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
    17  * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
    18  *
    18  *
  1195           }
  1195           }
  1196           else 
  1196           else 
  1197           {
  1197           {
  1198             echo '<h3>' . $lang->get('acppl_err_heading') . '</h3>
  1198             echo '<h3>' . $lang->get('acppl_err_heading') . '</h3>
  1199                    <p>' . $lang->get('acppl_err_system_plugin') . '</p>';
  1199                    <p>' . $lang->get('acppl_err_system_plugin') . '</p>';
       
  1200           }
       
  1201           break;
       
  1202         case "reimport":
       
  1203           $plugin_id = substr($plugin, 0, -4);
       
  1204           if ( isset($plugins->loaded_plugins[$plugin_id]) )
       
  1205           {
       
  1206             // plugin file is safe, call import
       
  1207             $lang->import_plugin( ENANO_ROOT . "/plugins/$plugin" );
       
  1208             echo '<div class="info-box">' . $lang->get('acppl_msg_reimport_success') . '</div>';
  1200           }
  1209           }
  1201           break;
  1210           break;
  1202       }
  1211       }
  1203     }
  1212     }
  1204   }
  1213   }
  1291               <td class="'.$cls.'"'.$bgcolor.'>'.$plugin_files[$i].'</td>
  1300               <td class="'.$cls.'"'.$bgcolor.'>'.$plugin_files[$i].'</td>
  1292               <td class="'.$cls.'"'.$bgcolor.'><a href="'.$this_plugin['uri'].'">'.$this_plugin['name'].'</a></td>
  1301               <td class="'.$cls.'"'.$bgcolor.'><a href="'.$this_plugin['uri'].'">'.$this_plugin['name'].'</a></td>
  1293               <td class="'.$cls.'"'.$bgcolor.'>'.$this_plugin['desc'].'</td>
  1302               <td class="'.$cls.'"'.$bgcolor.'>'.$this_plugin['desc'].'</td>
  1294               <td class="'.$cls.'"'.$bgcolor.'><a href="'.$this_plugin['aweb'].'">'.$this_plugin['auth'].'</a></td>
  1303               <td class="'.$cls.'"'.$bgcolor.'><a href="'.$this_plugin['aweb'].'">'.$this_plugin['auth'].'</a></td>
  1295               <td class="'.$cls.'"'.$bgcolor.'>'.$this_plugin['vers'].'</td>
  1304               <td class="'.$cls.'"'.$bgcolor.'>'.$this_plugin['vers'].'</td>
  1296               <td class="'.$cls.'"'.$bgcolor.'>';
  1305               <td class="'.$cls.'"'.( $bgcolor != '' ? str_replace_once(';', '; text-align: center;', $bgcolor) : ' style="text-align: center;"' ).' nowrap="nowrap">';
  1297       if ( !in_array($plugin_files[$i], $plugins->system_plugins) )
  1306       if ( !in_array($plugin_files[$i], $plugins->system_plugins) )
  1298       {
  1307       {
  1299         if ( getConfig('plugin_'.$plugin_files[$i]) == '1' )
  1308         if ( getConfig('plugin_'.$plugin_files[$i]) == '1' )
  1300         {
  1309         {
  1301           echo '<a href="'.makeUrl($paths->nslist['Special'].'Administration', 'module='.$paths->cpage['module']).'&amp;show_system=' . ( $show_system ? 'yes' : 'no' ) . '&amp;action=disable&amp;plugin='.$plugin_files[$i].'">' . $lang->get('acppl_btn_disable') . '</a>';
  1310           echo '<a href="'.makeUrl($paths->nslist['Special'].'Administration', 'module='.$paths->cpage['module']).'&amp;show_system=' . ( $show_system ? 'yes' : 'no' ) . '&amp;action=disable&amp;plugin='.$plugin_files[$i].'">' . $lang->get('acppl_btn_disable') . '</a>';
       
  1311           echo ' | ';
       
  1312           echo '<a title="' . $lang->get('acppl_btn_reimport_tip') . '" href="'.makeUrl($paths->nslist['Special'].'Administration', 'module='.$paths->cpage['module']).'&amp;show_system=' . ( $show_system ? 'yes' : 'no' ) . '&amp;action=reimport&amp;plugin='.$plugin_files[$i].'">' . $lang->get('acppl_btn_reimport') . '</a>';
  1302         }
  1313         }
  1303         else
  1314         else
  1304         {
  1315         {
  1305           echo '<a href="'.makeUrl($paths->nslist['Special'].'Administration', 'module='.$paths->cpage['module']).'&amp;show_system=' . ( $show_system ? 'yes' : 'no' ) . '&amp;action=enable&amp;plugin='.$plugin_files[$i].'">' . $lang->get('acppl_btn_enable') . '</a>';
  1316           echo '<a href="'.makeUrl($paths->nslist['Special'].'Administration', 'module='.$paths->cpage['module']).'&amp;show_system=' . ( $show_system ? 'yes' : 'no' ) . '&amp;action=enable&amp;plugin='.$plugin_files[$i].'">' . $lang->get('acppl_btn_enable') . '</a>';
  1306         }
  1317         }