Permalink
Browse files

Adds visibility and final keyword to Admin_SecurityTools module and i…

…ts libraries. Also does some optimisations, and cleanings.
  • Loading branch information...
JB Lebrun
JB Lebrun committed Mar 12, 2018
1 parent 71bf3d6 commit ff38573a3c379674c8cbcee843330d257a1c477d

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -31,16 +31,12 @@ $file_ = $this->theme->get_pictURL('file', 12, 'ovr');
$valid = $this->theme->get_pictURL('valid', 12, 'std');
$empty = $this->theme->get_pictURL('empty', 12, 'std');
?>
<?=$this->theme->get_boxHeader('width:600px;margin:0 auto;');?>
<?=$this->theme->get_boxHeader(array('class'=>'adminEditorModule'));?>
<?=$this->theme->get_boxTitleBar($this->title);?>
<?=$this->theme->get_boxTabsBar($this->tabs,
$this->tabObject.'.mouseclick',
$this->tabObject.'.mouseover',
$this->tabObject.'.mouseout',
'main');?>
<?=$camyks->theme->get_boxContent2Header()?>
<?=$this->theme->get_boxTabsBar($this->tabBuilder->tabs, $this->tabBuilder->jsParams);?>
<?=$this->theme->get_boxContent2Header();?>

<div id="itemmain" style="display:block;" class="adminContentPanel">
<div id="itemConfiguration" style="display:<?=$this->tabBuilder->get_tabDisplay('Configuration')?>;" class="adminContentPanel">
<table cellspacing="0" cellpadding="0" border="0">

<tr>
@@ -49,7 +45,7 @@ $empty = $this->theme->get_pictURL('empty', 12, 'std');
</td>
</tr>

<?php foreach ( $this->tools as $tool ) : ?>
<?php foreach ($this->tools as $tool) : ?>
<tr>
<td class="eTableLine0 eContent1" style="width:12px;">
&nbsp;
@@ -73,7 +69,7 @@ $empty = $this->theme->get_pictURL('empty', 12, 'std');
</div>

<?php if ($this->config->vars['ipfilter']) : ?>
<div id="itemipfilter" style="display:none;" class="adminContentPanel">
<div id="itemIPFilter" style="display:<?=$this->tabBuilder->get_tabDisplay('IPFilter')?>;" class="adminContentPanel">
<div class="eTitle3">
<?=$this->get_translation('ipfilter_therules');?>
</div>
@@ -234,7 +230,7 @@ onmouseover="this.src='<?=$del_?>';" onmouseout="this.src='<?=$del?>';" />
<?php endif; ?>

<?php if ( $this->config->vars['backup'] ) : ?>
<div id="itembackup" style="display:none;" class="adminContentPanel">
<div id="itemBackup" style="display:<?=$this->tabBuilder->get_tabDisplay('Backup')?>;" class="adminContentPanel">
<table cellspacing="0" cellpadding="0" border="0" style="width:100%;">
<tr>
<td class="eTitle3" colspan="3">
@@ -391,6 +387,6 @@ onmouseover="this.src='<?=$del_?>';" onmouseout="this.src='<?=$del?>';" />
</div>
<?php endif; ?>

<?=$this->theme->get_boxContent2Footer(); ?>
<?=$this->theme->get_boxButtonsBar( $this->buttons ); ?>
<?=$this->theme->get_boxFooter(); ?>
<?=$this->theme->get_boxContent2Footer();?>
<?=$this->theme->get_boxButtonsBar($this->buttons);?>
<?=$this->theme->get_boxFooter();?>
@@ -2,22 +2,22 @@
/*
* CaMykS Engine
* Developed by : camyks.net
* Author : CaMykS team <camyks.contact@gmail.com>
* CaMykS Version : 1.0a2
* Object Version : 1.0
* Object Type : Plugin / Module Layout
* Create Date : Oct 2007
* Last Modif Date : Mar 2009
* Author : CaMykS team <camyks.contact@gmail.com>
* CaMykS Version : 1.0
* Object Version : 1.0
* Object Type : Plugin / Module Layout
* Creation Date : Oct 2007
* Last Modif Date : Mar 2018
*
* Admin_SecurityTools Module Admin Layout : edit backup config
*/
global $camyks;
?>
<?=$this->theme->get_boxHeader('width:600px;margin:0 auto;');?>
<?=$this->theme->get_boxTitleBar ( $this->title.' : '.$this->get_translation('backup_modifyconfig') ) ?>
<?=$this->theme->get_boxContent2Header( )?>
<?=$this->form->display_header(); ?>
<?=$this->form->display_hiddens(); ?>
<?=$this->theme->get_boxHeader(array('class'=>'adminEditorModule'));?>
<?=$this->theme->get_boxTitleBar($this->title.' : '.$this->get_translation('backup_modifyconfig'));?>
<?=$this->theme->get_boxContent2Header();?>
<?=$this->form->display_header();?>
<?=$this->form->display_hiddens();?>
<div class="adminContentPanel">
<table cellspacing="0" cellpadding="0" border="0" style="width:100%;">
<tr>
@@ -31,15 +31,15 @@ global $camyks;

<tr>
<td class="eTableLine1 eContent2">
<?=$this->get_translation('backup_compression'); ?>
<?=$this->get_translation('backup_compression'); ?>
</td>
<td class="eTableLine1 eContent1">
<?=$this->form->display_selectInput(array('name'=>'backup_compression', 'values'=>$this->backup_compressions, 'default'=>$this->config->vars['backup_compression']));?>
</td>
</tr>
<tr>
<td class="eTableLine0 eContent2">
<?=$this->get_translation('backup_type'); ?>
<?=$this->get_translation('backup_type'); ?>
</td>
<td class="eTableLine0 eContent1">
<?=$this->form->display_selectInput(array('name'=>'backup_type', 'values'=>$this->backup_types, 'default'=>$this->config->vars['backup_type']));?>
@@ -48,18 +48,18 @@ global $camyks;

<tr>
<td class="eTableLine1 eContent2">
<?=$this->get_translation('backup_temp'); ?>
<?=$this->get_translation('backup_temp'); ?>
</td>
<td class="eTableLine1 eContent1">
<input type="text" name="backup_temp" value="<?=$this->config->vars['backup_temp']?>" maxlength="128" class="inputs" />
<input type="text" name="backup_temp" value="<?=$this->config->vars['backup_temp']?>" maxlength="128" class="inputs" />
</td>
</tr>
<tr>
<td class="eContent1">
&nbsp;
&nbsp;
</td>
<td class="eContent3">
<?=$this->get_translation('backup_nulltempissystemfolder');?>
<?=$this->get_translation('backup_nulltempissystemfolder');?>
</td>
</tr>
</table>
@@ -1,26 +1,26 @@
<?php
/*
* CaMykS Engine
* Developed by : camyks.net
* Author : CaMykS team <camyks.contact@gmail.com>
* CaMykS Version : 1.0a
* Object Version : 1.0
* Object Type : Plugin / Module Layout
* Create Date : Oct 2007
* Last Modif Date : Oct 2007
* Developed by : camyks.net
* Author : CaMykS team <camyks.contact@gmail.com>
* CaMykS Version : 1.0
* Object Version : 1.0
* Object Type : Plugin / Module Layout
* Creation Date : Oct 2007
* Last Modif Date : Mar 2018
*
* Admin_SecurityTools module admin layout : edit filter ip rule
*/
global $camyks;
?>
<?=$this->theme->get_boxHeader('width:600px;margin:0 auto;');?>
<?=$this->theme->get_boxTitleBar($this->title.' : '.$this->get_translation('ipfilter_editruleid', $this->ipfilterrule->id) ) ?>
<?=$this->theme->get_boxContent2Header( )?>
<?=$this->form->display_header(); ?>
<?=$this->form->display_hiddens(); ?>
<?=$this->theme->get_boxHeader(array('class'=>'adminEditorModule'));?>
<?=$this->theme->get_boxTitleBar($this->title.' : '.$this->get_translation('ipfilter_editruleid', $this->ipfilterrule->id));?>
<?=$this->theme->get_boxContent2Header();?>
<?=$this->form->display_header();?>
<?=$this->form->display_hiddens();?>
<div class="adminContentPanel">
<table cellspacing="0" cellpadding="0" border="0" style="width:100%">
<?php if ( isset( $this->ipfilterrule->_libError ) ) : ?>
<?php if (isset($this->ipfilterrule->_libError)) : ?>
<tr>
<td class="error" colspan="3">
<?=$this->ipfilterrule->_libError?>
@@ -1,44 +1,44 @@
<?php
/*
* CaMykS Engine
* Developed by : camyks.net
* Author : CaMykS team <camyks.contact@gmail.com>
* CaMykS Version : 1.0a2
* Object Version : 1.0
* Object Type : Plugin / Module Layout
* Create Date : Oct 2007
* Last Modif Date : Mar 2009
* Developed by : camyks.net
* Author : CaMykS team <camyks.contact@gmail.com>
* CaMykS Version : 1.0
* Object Version : 1.0
* Object Type : Plugin / Module Layout
* Creation Date : Oct 2007
* Last Modif Date : Mar 2018
*
* Admin_SecurityTools Module Admin Layout : edit new backup file
*/
global $camyks;
?>
<?=$this->theme->get_boxHeader('width:600px;margin:0 auto;');?>
<?=$this->theme->get_boxHeader(array('class'=>'adminEditorModule'));?>
<?=$this->theme->get_boxTitleBar($this->title.' : '.$this->get_translation('backup_newbackup'));?>
<?=$this->theme->get_boxContent2Header();?>
<?=$this->form->display_header(); ?>
<?=$this->form->display_hiddens(); ?>
<?=$this->form->display_header();?>
<?=$this->form->display_hiddens();?>
<div class="adminContentPanel">
<table cellspacing="0" cellpadding="0" border="0" style="width:100%;">
<tr>
<td class="eTableLine0 eContent2">
<?=$this->get_translation('backup_compression'); ?>
<?=$this->get_translation('backup_compression'); ?>
</td>
<td class="eTableLine0 eContent1">
<?=$this->form->display_selectInput(array('name'=>'backup_compression', 'values'=>$this->backup_compressions, 'default'=>$this->config->vars['backup_compression']));?>
<?=$this->form->display_selectInput(array('name'=>'backup_compression', 'values'=>$this->backup_compressions, 'default'=>$this->config->vars['backup_compression']));?>
</td>
</tr>
<tr>
<td class="eTableLine1 eContent2">
<?=$this->get_translation('backup_type'); ?>
<?=$this->get_translation('backup_type'); ?>
</td>
<td class="eTableLine1 eContent1">
<?=$this->form->display_selectInput(array('name'=>'backup_type', 'values'=>$this->backup_types, 'default'=>$this->config->vars['backup_type']));?>
<?=$this->form->display_selectInput(array('name'=>'backup_type', 'values'=>$this->backup_types, 'default'=>$this->config->vars['backup_type']));?>
</td>
</tr>
</table>
</div>
<?=$this->form->display_footer(); ?>
<?=$this->theme->get_boxContent2Footer();?>
<?=$this->theme->get_boxButtonsBar( $this->buttons );?>
<?=$this->theme->get_boxButtonsBar($this->buttons);?>
<?=$this->theme->get_boxFooter();?>
@@ -2,13 +2,13 @@
/*
* CaMykS Engine
* Developed by : camyks.net
* Author : CaMykS Team <camyks.contact@gmail.com>
* CaMykS Version : 1.0a
* Author : CaMykS Team <camyks.contact@gmail.com>
* CaMykS Version : 1.0
* Object Version : 1.0
* Object Type : Plugin / Module Library
* Creation Date : Oct 2007
* Last Modif Date : Oct 2007
*
* Object Type : Plugin / Module Config
* Creation Date : Oct 2007
* Last Modif Date : Mar 2018
* *
* Admin_SecurityBackUpFile Library Object for Admin_SecurityTools Module
* Items :
* - name : file name
@@ -19,7 +19,7 @@
* -- file : var folder
*/
class Admin_SecurityBackUpFile extends ModuleLibrary {
final class Admin_SecurityBackUpFile extends ModuleLibrary {
/* variables */
var $backupdir;
@@ -28,15 +28,16 @@ class Admin_SecurityBackUpFile extends ModuleLibrary {
* @param integer $id
* @param Module $parent
*/
function Admin_SecurityBackUpFile ( $id, &$parent ) {
global $camyks;
parent::ModuleLibrary( $id, $parent );
function __construct($id, &$parent) {
parent::__construct($id, $parent);
/* library items */
$this->add_newItem('name', 'db', 'text', 'varchar', 32, '');
$this->add_newItem('ndate', 'db', 'date', 'bigint unsigned', '', time());
$this->add_newItem('type', 'db', 'text', 'varchar', '8', 0);
$this->add_newItem('type', 'db', 'text', 'varchar', '8', 0);
/* variables */
$this->backupdir = 'backups';
/* generic library initialisation */
parent::init_library();
}
@@ -46,10 +47,10 @@ class Admin_SecurityBackUpFile extends ModuleLibrary {
/*
* return current backup file size display
* @return string
* @access private
* @access public
*/
function get_fileSize() {
$f = new FSFile( $this->_libParent->plugin_var_path.'/'.$this->backupdir, $this->vars['name'] );
public function get_fileSize() {
$f = new FSFile($this->_libParent->plugin_var_path.'/'.$this->backupdir, $this->vars['name']);
return $f->hsize;
}
@@ -59,9 +60,9 @@ class Admin_SecurityBackUpFile extends ModuleLibrary {
* @param string $type
* @param string $compression
* @return boolean success
* @access private
* @access public
*/
function backup( $method=null, $type=null, $compression=null ) {
public function backup($method=null, $type=null, $compression=null) {
global $camyks;
/* extends script time limitation */
Oops, something went wrong.

0 comments on commit ff38573

Please sign in to comment.