|
From: OryNider <ory...@us...> - 2008-04-29 02:40:21
|
Update of /cvsroot/mxbb/mx_shotcast/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19075/admin Modified Files: admin_shotcast.php Log Message: version 3.0.0-RC Index: admin_shotcast.php =================================================================== RCS file: /cvsroot/mxbb/mx_shotcast/admin/admin_shotcast.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** admin_shotcast.php 6 Mar 2008 03:09:17 -0000 1.6 --- admin_shotcast.php 29 Apr 2008 02:39:47 -0000 1.7 *************** *** 64,71 **** --- 64,73 ---- // $sql = "SELECT * FROM ".SHOTCAST_CONFIG_TABLE; + if(!$result = $db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, "Couldn't query shotcast config table", "", __LINE__, __FILE__, $sql); } + while( $row = $db->sql_fetchrow($result) ) { *************** *** 75,78 **** --- 77,81 ---- $new[$config_name] = ( isset($HTTP_POST_VARS[$config_name]) ) ? $HTTP_POST_VARS[$config_name] : $default_config[$config_name]; + if( isset($HTTP_POST_VARS['submit'])) { *************** *** 89,93 **** // Behave as per HTTP/1.1 spec for others echo '"<meta http-equiv="refresh" content="1;url="$file">"'; ! } } --- 92,96 ---- // Behave as per HTTP/1.1 spec for others echo '"<meta http-equiv="refresh" content="1;url="$file">"'; ! } } *************** *** 112,115 **** --- 115,122 ---- } + // ALLOW GUESTS? + $allow_guests_yes = ($new['allow_guests'] == 1) ? 'checked="checked"' : ''; + $allow_guests_no = ($new['allow_guests'] == 0) ? 'checked="checked"' : ''; + $show_listen_select_yes = ( $new['show_listen_select'] ) ? ' selected' : ''; $show_listen_select_no = ( !$new['show_listen_select'] ) ? ' selected' : ''; *************** *** 119,130 **** ); $template->assign_vars(array( ! 'S_ACTION' => append_sid("admin_shotcast.$phpEx"), ! 'L_SHOTCAST_SETTINGS' => $lang['shotcast_Settings'], ! 'L_SHOTCAST_SETTINGS_EXPLAIN' => $lang['shotcast_Settings_explain'], 'L_SHOTCAST' => $lang['Radio_name'], ! 'L_STREAM' => $lang['shotcast_host'], ! 'L_PORT' => $lang['shotcast_port'], ! 'L_PASS' => $lang['shotcast_pass'], 'L_PLAY_LIST' => $lang['play_list'], 'L_SHOW_STATUS' => $lang['Show_status'], --- 126,167 ---- ); + $dir = $module_root_path . 'images/'; + + $direct = @opendir($dir); + $file = @readdir($direct); + + while ($file) + { + $file = @readdir($direct); + $filetype = filetype($dir . $file); + + if ($file == ".." OR $file == "." OR $file == "" OR !file_exists($module_root_path . 'images/' . $file . '/shell.jpg')) + { + $stylelist_path = ""; + } + elseif (($filetype == "dir") && file_exists($module_root_path . 'images/' . $file . '/shell.jpg')) + { + if ($new['skin'] == $file) + { + $stylelist_path = "<option value=\"$file\" selected> $file \n"; + } + else + { + $stylelist_path = "<option value=\"$file\"> $file \n"; + } + } + + $array = "$array;$file"; + $template->assign_block_vars('stylelist', array('SKINPATH' => $stylelist_path)); + } + $template->assign_vars(array( ! 'S_ACTION' => mx_append_sid("admin_shotcast.$phpEx"), ! 'L_SHOTCAST_SETTINGS' => $lang['shotcast_Settings'], ! 'L_SHOTCAST_SETTINGS_EXPLAIN' => $lang['shotcast_Settings_explain'], 'L_SHOTCAST' => $lang['Radio_name'], ! 'L_STREAM' => $lang['shotcast_host'], ! 'L_PORT' => $lang['shotcast_port'], ! 'L_PASS' => $lang['shotcast_pass'], 'L_PLAY_LIST' => $lang['play_list'], 'L_SHOW_STATUS' => $lang['Show_status'], *************** *** 132,140 **** 'L_SUBMIT' => $lang['Submit'], 'L_RESET' => $lang['Reset'], ! 'L_CHECK_PERIOD' => $lang['Check_period'], ! 'L_CHECK_PERIOD_EXPLAIN' => $lang['Check_period_explain'], ! 'L_SHOW_LISTEN' => $lang['show_listen'], ! 'L_SHOW_LISTEN_INFO' => $lang['show_listen_info'], ! 'L_FORCE_ONLINE' => !empty($lang['Force_Online']) ? $lang['Force_Online'] : 'Force Online', "L_NO" => $lang['No'], "L_YES" => $lang['Yes'], --- 169,183 ---- 'L_SUBMIT' => $lang['Submit'], 'L_RESET' => $lang['Reset'], ! 'L_CHECK_PERIOD' => $lang['Check_period'], ! 'L_CHECK_PERIOD_EXPLAIN' => $lang['Check_period_explain'], ! 'L_SHOW_LISTEN' => $lang['show_listen'], ! 'L_SHOW_LISTEN_INFO' => $lang['show_listen_info'], ! ! 'L_FORCE_ONLINE' => !empty($lang['Force_Online']) ? $lang['Force_Online'] : 'Force Online', ! ! 'L_ALLOW_GUESTS' => $lang['Allow_guests'], ! 'L_GUESTNAME' => $lang['guestname'], ! 'L_GUESTNAME_EXPLAIN' => $lang['guestname_explain'], ! "L_NO" => $lang['No'], "L_YES" => $lang['Yes'], *************** *** 152,155 **** --- 195,207 ---- 'S_LISTEN_YES' => $show_listen_select_yes, 'S_LISTEN_NO' => $show_listen_select_no, + + 'ALLOW_GUESTS_YES' => $allow_guests_yes, + 'ALLOW_GUESTS_NO' => $allow_guests_no, + 'GUESTNAME' => $new['guestname'], + + 'L_SKINPATH' => $lang['skinpath'], + 'SKINPATH' => $stylelist_path, + 'SKIN' => $new['skin'], + 'FORCE_ON_ENABLED' => ($new['force_online'] == 1) ? 'checked="checked"' : '', 'FORCE_ON_DISABLED' => ($new['force_online'] == 0) ? 'checked="checked"' : '', |