37 lines
1.1 KiB
PHP
37 lines
1.1 KiB
PHP
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||
|
|
||
|
// ============================================================================
|
||
|
// Functions
|
||
|
// ============================================================================
|
||
|
|
||
|
// ============================================================================
|
||
|
// Main before POST
|
||
|
// ============================================================================
|
||
|
$_Plugin = false;
|
||
|
|
||
|
foreach($plugins['all'] as $P)
|
||
|
{
|
||
|
if($P->className()==$layout['parameters']) {
|
||
|
$_Plugin = $P;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// Check if the plugin exists.
|
||
|
if($_Plugin===false) {
|
||
|
Redirect::page('admin', 'plugins');
|
||
|
}
|
||
|
|
||
|
// ============================================================================
|
||
|
// POST Method
|
||
|
// ============================================================================
|
||
|
|
||
|
if( $_SERVER['REQUEST_METHOD'] == 'POST' )
|
||
|
{
|
||
|
Alert::set('Configuration saved successfuly');
|
||
|
$_Plugin->setDb($_POST);
|
||
|
}
|
||
|
|
||
|
// ============================================================================
|
||
|
// Main after POST
|
||
|
// ============================================================================
|