Changeset 6360 for extensions/charlies_content/charlies_config.php
- Timestamp:
- May 25, 2010, 10:54:34 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/charlies_content/charlies_config.php
r4175 r6360 5 5 if (!defined('IN_ADMIN') or !IN_ADMIN) die('Hacking attempt!'); 6 6 load_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 8 global $charlie; 9 9 $errors = array(); 10 10 $infos = array(); … … 17 17 $extensions = array(); 18 18 foreach ($charlie as $tpl => $ext) { 19 if (is_array($ext) ) {19 if (is_array($ext) and $tpl != 'all') { 20 20 $players[] = array( 'name' => $tpl, 'ext' => $ext); 21 21 $extensions = array_merge($extensions, $ext); … … 131 131 } 132 132 $charlie['title'] = stripslashes(htmlspecialchars(strip_tags($charlie['title']))); 133 133 134 // Submit and errors 134 135 if ( $sub ) … … 140 141 if ( $sub and is_adviser() and count($errors) == 0 ) 141 142 array_push($infos, l10n('You are Adviser and you are not authorized to change this configuration.')); 142 143 unset ( $charlie['all'] ); 143 144 // Submit and not Advisor => Update Config table 144 145 if ( $sub and !is_adviser() and count($errors) == 0 ) … … 152 153 } 153 154 // Send data 155 154 156 $template->set_filenames(array( 155 157 'plugin_admin_content' => dirname(__FILE__) . '/charlies_config.tpl')); … … 157 159 if (count($infos) != 0) $template->assign('infos', $infos); 158 160 if ($charlie['onclick']==0) $charlie['onclick'] = 'playpause'; // ??? 161 159 162 $template->assign(array( 160 163 'Charlies' => $charlie, … … 165 168 ) ); 166 169 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); 170 167 171 //var_dump($charlie); 168 172 ?>
Note: See TracChangeset
for help on using the changeset viewer.