1024 )) // array_push($errors, l10n('Forced width is out of range (Correct range: 90-1024)')); // if ( $charlie['forced_height']!='' and (!is_numeric($charlie['forced_height']) or $charlie['forced_height'] < 90 or $charlie['forced_height'] > 1024 )) // array_push($errors, l10n('Forced height is out of range (Correct range: 90-1024)')); // if (!is_numeric($charlie['video_default_width']) or $charlie['video_default_width'] < 90 or $charlie['video_default_width'] > 1024 ) // array_push($errors, l10n('Default width is out of range (Correct range: 90-1024)')); // } // Submit and errors if ( $sub ) { if ( count($errors) > 0 ) array_push($errors, l10n('Your configuration is NOT saved due to above reasons.')); } // Submit and Advisor => Thanks if ( $sub and is_adviser() and count($errors) == 0 ) array_push($infos, l10n('You are Adviser and you are not authorized to change this configuration.')); // Submit and not Advisor => Update Config table if ( $sub and !is_adviser() and count($errors) == 0 ) { $dir = $conf['local_data_dir'].'/plugins/'; @mkdir($dir); //var_dump($_POST); $file = fopen( $dir.STEREO_DIR.'.dat', 'w' ); fwrite($file, serialize($stereo)); fclose( $file ); array_push($infos, l10n('Your configuration is saved.')); } // Send data $template->set_filenames(array( 'plugin_admin_content' => dirname(__FILE__) . '/config.tpl')); if (count($errors) != 0) $template->assign('errors', $errors); if (count($infos) != 0) $template->assign('infos', $infos); //if ($stereo['onclick']==0) $stereo['onclick'] = 'playpause'; // ??? $template->assign(array( 'stereo' => $stereo, 'STEREO_PATH' => STEREO_PATH, ) ); $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); //var_dump($stereo); ?>