<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2011 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: infusion.php
| Author: Andre Krell (systemweb.de)
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }

include "infusion_db.php";

// Check if locale file is available matching the current site locale setting.
if (file_exists(INFUSIONS."sw_streamstatus".$sw_streamstatus_number."_panel/locale/".$settings['locale'].".php")) {
	// Load the locale file matching the current site locale setting.
	include INFUSIONS."sw_streamstatus".$sw_streamstatus_number."_panel/locale/".$settings['locale'].".php";
} else {
	// Load the infusion's default locale file.
	include INFUSIONS."sw_streamstatus".$sw_streamstatus_number."_panel/locale/English.php";
}

// Infusion general information
$inf_title = "SW Streamstatus".$sw_streamstatus_number;
//$inf_description = $sw_streamstatus_locale['description'];
$inf_description = "Voraussetzung ist der Systemweb-Sendeplan ab v3.02 | Weitere Infos: www.systemweb.de";
$inf_version = "2.2";
$inf_developer = "Andre Krell | Systemweb";
$inf_email = "support@systemweb.de";
$inf_weburl = "http://www.systemweb.de";

$inf_folder = "sw_streamstatus".$sw_streamstatus_number."_panel";

if(!FUSION_V6) {
	$inf_adminpanel[1] = array(
	"title" => "SW Streamstatus".$sw_streamstatus_number,
	"image" => "infusions.gif",
	"panel" => "sw_streamstatus_admin.php",
	"rights" => "SSP".($sw_streamstatus_number!='' && IsNum($sw_streamstatus_number) && strlen($sw_streamstatus_number)==1 ? $sw_streamstatus_number : '0')
	);

	$inf_newtable[1] = $streamstatus_db[$sw_streamstatus_number]['table_settings']." (
	`profile` varchar(25) NOT NULL,
	`sp_folder` varchar(50) NOT NULL,
	`sp_number` smallint(1) NOT NULL DEFAULT '0',
	`listeners_visible` varchar(10) NOT NULL DEFAULT '0',
	`sc_name_1` varchar(50) NOT NULL,
	`sc_server_1` varchar(100) NOT NULL,
	`sc_port_1` int(5) NOT NULL,
	`sc_id_1` tinyint(3) NOT NULL,
	`sc_adminpw_1` varchar(25) NOT NULL,
	`enable_streamkick_1` smallint(1) NOT NULL DEFAULT '0',
	`enable_songupdate_1` smallint(1) NOT NULL DEFAULT '0',
	`use_winamp_1` smallint(1) NOT NULL DEFAULT '0',
	`use_mediaplayer_1` smallint(1) NOT NULL DEFAULT '0',
	`use_realplayer_1` smallint(1) NOT NULL DEFAULT '0',
	`use_flashplayer_1` varchar(150) NOT NULL,
	`use_flashplayer_1_popup` smallint(1) NOT NULL DEFAULT '0',
	`use_flashplayer_1_popup_width` int(4) NOT NULL DEFAULT '400',
	`use_flashplayer_1_popup_height` int(4) NOT NULL DEFAULT '300',
	`use_javaplayer_1` varchar(150) NOT NULL,
	`use_javaplayer_1_popup` smallint(1) NOT NULL DEFAULT '0',
	`use_javaplayer_1_popup_width` int(4) NOT NULL DEFAULT '400',
	`use_javaplayer_1_popup_height` int(4) NOT NULL DEFAULT '300',
	`use_nsvplayer_1` varchar(150) NOT NULL,
	`use_nsvplayer_1_popup` smallint(1) NOT NULL DEFAULT '0',
	`use_nsvplayer_1_popup_width` int(4) NOT NULL DEFAULT '400',
	`use_nsvplayer_1_popup_height` int(4) NOT NULL DEFAULT '300',
	`sc_name_2` varchar(50) NOT NULL,
	`sc_server_2` varchar(100) NOT NULL,
	`sc_port_2` int(5) NOT NULL,
	`sc_id_2` tinyint(3) NOT NULL,
	`sc_adminpw_2` varchar(25) NOT NULL,
	`enable_streamkick_2` smallint(1) NOT NULL DEFAULT '0',
	`enable_songupdate_2` smallint(1) NOT NULL DEFAULT '0',
	`use_winamp_2` smallint(1) NOT NULL DEFAULT '0',
	`use_mediaplayer_2` smallint(1) NOT NULL DEFAULT '0',
	`use_realplayer_2` smallint(1) NOT NULL DEFAULT '0',
	`use_flashplayer_2` varchar(150) NOT NULL,
	`use_flashplayer_2_popup` smallint(1) NOT NULL DEFAULT '0',
	`use_flashplayer_2_popup_width` int(4) NOT NULL DEFAULT '400',
	`use_flashplayer_2_popup_height` int(4) NOT NULL DEFAULT '300',
	`use_javaplayer_2` varchar(150) NOT NULL,
	`use_javaplayer_2_popup` smallint(1) NOT NULL DEFAULT '0',
	`use_javaplayer_2_popup_width` int(4) NOT NULL DEFAULT '400',
	`use_javaplayer_2_popup_height` int(4) NOT NULL DEFAULT '300',
	`use_nsvplayer_2` varchar(150) NOT NULL,
	`use_nsvplayer_2_popup` smallint(1) NOT NULL DEFAULT '0',
	`use_nsvplayer_2_popup_width` int(4) NOT NULL DEFAULT '400',
	`use_nsvplayer_2_popup_height` int(4) NOT NULL DEFAULT '300',
	`sc_name_3` varchar(50) NOT NULL,
	`sc_server_3` varchar(100) NOT NULL,
	`sc_port_3` int(5) NOT NULL,
	`sc_id_3` tinyint(3) NOT NULL,
	`sc_adminpw_3` varchar(25) NOT NULL,
	`enable_streamkick_3` smallint(1) NOT NULL DEFAULT '0',
	`enable_songupdate_3` smallint(1) NOT NULL DEFAULT '0',
	`use_winamp_3` smallint(1) NOT NULL DEFAULT '0',
	`use_mediaplayer_3` smallint(1) NOT NULL DEFAULT '0',
	`use_realplayer_3` smallint(1) NOT NULL DEFAULT '0',
	`use_flashplayer_3` varchar(150) NOT NULL,
	`use_flashplayer_3_popup` smallint(1) NOT NULL DEFAULT '0',
	`use_flashplayer_3_popup_width` int(4) NOT NULL DEFAULT '400',
	`use_flashplayer_3_popup_height` int(4) NOT NULL DEFAULT '300',
	`use_javaplayer_3` varchar(150) NOT NULL,
	`use_javaplayer_3_popup` smallint(1) NOT NULL DEFAULT '0',
	`use_javaplayer_3_popup_width` int(4) NOT NULL DEFAULT '400',
	`use_javaplayer_3_popup_height` int(4) NOT NULL DEFAULT '300',
	`use_nsvplayer_3` varchar(150) NOT NULL,
	`use_nsvplayer_3_popup` smallint(1) NOT NULL DEFAULT '0',
	`use_nsvplayer_3_popup_width` int(4) NOT NULL DEFAULT '400',
	`use_nsvplayer_3_popup_height` int(4) NOT NULL DEFAULT '300',
	`phonostar_id` int(6) NOT NULL,
	`studiobox` varchar(50) NOT NULL,
	`phonepublisher_live` varchar(50) NOT NULL,
	`dj_group` varchar(3) NOT NULL DEFAULT '-1',
	`refresh_time` int(5) NOT NULL DEFAULT '30000',
	UNIQUE KEY `profile_2` (`profile`),
	KEY `profile` (`profile`)
	) ENGINE=MyISAM";

	$inf_insertdbrow[1] = DB_PANELS." (panel_name, panel_filename, panel_content, panel_side, panel_order, panel_type, panel_access, panel_display, panel_status)
	VALUES('Systemweb Streamstatus".$sw_streamstatus_number."', 'sw_streamstatus".$sw_streamstatus_number."_panel', '', '2', '3', 'file', '0', '0', '1')";

	$inf_insertdbrow[2] = $streamstatus_db[$sw_streamstatus_number]['table_settings']."
	(`profile`)
	VALUES
	('default')";

	$inf_droptable[1] = $streamstatus_db[$sw_streamstatus_number]['table_settings'];
	
	$inf_altertable[1] = $streamstatus_db[$sw_streamstatus_number]['table_settings']." CHANGE `use_flashplayer_1` `use_flashplayer_1` VARCHAR(250) NOT NULL;";
	$inf_altertable[2] = $streamstatus_db[$sw_streamstatus_number]['table_settings']." CHANGE `use_flashplayer_2` `use_flashplayer_2` VARCHAR(250) NOT NULL;";
	$inf_altertable[3] = $streamstatus_db[$sw_streamstatus_number]['table_settings']." CHANGE `use_flashplayer_3` `use_flashplayer_3` VARCHAR(250) NOT NULL;";
	$inf_altertable[4] = $streamstatus_db[$sw_streamstatus_number]['table_settings']." CHANGE `use_javaplayer_1` `use_javaplayer_1` VARCHAR(250) NOT NULL;";
	$inf_altertable[5] = $streamstatus_db[$sw_streamstatus_number]['table_settings']." CHANGE `use_javaplayer_2` `use_javaplayer_2` VARCHAR(250) NOT NULL;";
	$inf_altertable[6] = $streamstatus_db[$sw_streamstatus_number]['table_settings']." CHANGE `use_javaplayer_3` `use_javaplayer_3` VARCHAR(250) NOT NULL;";
	$inf_altertable[7] = $streamstatus_db[$sw_streamstatus_number]['table_settings']." CHANGE `use_nsvplayer_1` `use_nsvplayer_1` VARCHAR(250) NOT NULL;";
	$inf_altertable[8] = $streamstatus_db[$sw_streamstatus_number]['table_settings']." CHANGE `use_nsvplayer_2` `use_nsvplayer_2` VARCHAR(250) NOT NULL;";
	$inf_altertable[9] = $streamstatus_db[$sw_streamstatus_number]['table_settings']." CHANGE `use_nsvplayer_3` `use_nsvplayer_3` VARCHAR(250) NOT NULL;";

	$inf_deldbrow[1] = DB_PANELS." WHERE `panel_filename`='sw_streamstatus".$sw_streamstatus_number."_panel'";
}
?>
