Ignore:
Timestamp:
May 25, 2010, 10:54:34 PM (14 years ago)
Author:
vdigital
Message:

Admin page design review mainly for the "clear" theme
Code review

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/charlies_content/charlies_config.php

    r4175 r6360  
    55if (!defined('IN_ADMIN') or !IN_ADMIN) die('Hacking attempt!');
    66load_language('plugin.lang', CHARLIES_PATH);
    7 $x = @file_get_contents( $conf['local_data_dir'].'/plugins/'.basename(dirname(__FILE__)).'.dat');
    8 if ($x!==false) $charlie = unserialize($x); else $charlie = array();
     7
     8global $charlie;
    99$errors = array();
    1010$infos = array();
     
    1717$extensions = array();
    1818foreach ($charlie as $tpl => $ext) {
    19         if (is_array($ext)) {
     19        if (is_array($ext) and $tpl != 'all') {
    2020                $players[] = array( 'name' => $tpl, 'ext' => $ext);
    2121                $extensions = array_merge($extensions, $ext);
     
    131131}
    132132$charlie['title'] = stripslashes(htmlspecialchars(strip_tags($charlie['title'])));
     133
    133134// Submit and errors
    134135if ( $sub )
     
    140141if ( $sub and is_adviser() and count($errors) == 0 )
    141142        array_push($infos, l10n('You are Adviser and you are not authorized to change this configuration.'));
    142 
     143unset ( $charlie['all'] );
    143144// Submit and not Advisor => Update Config table
    144145if ( $sub and !is_adviser() and count($errors) == 0 )
     
    152153}
    153154// Send data
     155
    154156$template->set_filenames(array(
    155157    'plugin_admin_content' => dirname(__FILE__) . '/charlies_config.tpl'));
     
    157159if (count($infos) != 0) $template->assign('infos', $infos);
    158160if ($charlie['onclick']==0) $charlie['onclick'] =  'playpause'; // ???
     161
    159162$template->assign(array(
    160163        'Charlies' => $charlie,
     
    165168        ) );
    166169$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
     170
    167171//var_dump($charlie);
    168172?>
Note: See TracChangeset for help on using the changeset viewer.