<?php
/*
Plugin Name: FLV Plugin Free Version
Plugin URI: http://flvplugin.com/
Description: Provides an easy way to insert videos created by FLV Producer - compatible with Wordpress 2.3.3 and 2.5
Version: 0.20
Author: Athens Development Incorporated
Author URI: http://athensdevelopment.com/
*/

$flvproducerid = '359766';  // <- place your affiliate ID inside the single quotes

// do not touch anything below
$flvproducerpoweredbylink = 'http://flvplugin.com/';

require_once ('getid3/getid3.php');
require_once ('flashcode.php');

$flverrorreporting = error_reporting ();
error_reporting (0);

function flvproducer_content ($content) {
	global $flvproducerplugincode;
	
	$flvproducerplayer = get_option ('default_flvproducer_player');
	if ($flvproducerplayer == '') update_option ('default_flvproducer_player', $flvproducerplayer = '17-Bonus_Player_7');

	$xcode = $flvproducerplugincode;
	$content = preg_replace ('/\[flvproducer ([^\]]*)]/i', '[flvplugin \1]', $content);
	while (preg_match ("/\[flvplugin ([^\]]*)]/i", $content, $matches)) {
		$search = $matches[0];
		$attrs = ' ' . $matches[1];
		
		$findreplace = array ();
		
		preg_match ("/flv=([^ ]*)/i", $attrs, $m);
		list ($s, $flv) = $m;

		preg_match ("/player=([^ ]*)/i", $attrs, $m);
		list ($s, $player) = $m;

		preg_match ("/buffer=([^ ]*)/i", $attrs, $m);
		list ($s, $data) = $m;
		$findreplace['{buffer}'] = $data;

		preg_match ("/autoplay=([^ ]*)/i", $attrs, $m);
		list ($s, $data) = $m;
		$findreplace['{autoplay}'] = $data;

		preg_match ("/loop=([^ ]*)/i", $attrs, $m);
		list ($s, $data) = $m;
		$findreplace['{loop}'] = $data;

		/*
		preg_match ("/infobutton=([^ ]*)/i", $attrs, $m);
		list ($s, $data) = $m;
		$findreplace['{infobutton}'] = $data;
		*/
		
		preg_match ("/preload=([^ ]*)/i", $attrs, $m);
		list ($s, $data) = $m;
		$findreplace['{preload}'] = $data;

		preg_match ("/border=([^ ]*)/i", $attrs, $m);
		list ($s, $data) = $m;
		$findreplace['{border}'] = $data;

		preg_match ("/redirect=([^ ]*)/i", $attrs, $m);
		list ($s, $data) = $m;
		$x = strtolower ($data);
		if (substr ($x, 0, 7) != 'http://' && substr ($x, 0, 8) != 'https://' && $x != '') $data = 'http://' . $data;
		$findreplace['{redirect}'] = $data;

		$affid = get_option ('default_flvproducer_affid');
		if ($affid != '' && $GLOBALS['flvproducerid'] != '') update_option ('default_flvproducer_affid', $affid = $GLOBALS['flvproducerid']);
		$findreplace['{affid}'] = $affid;

		if ($player == '') $player = $flvproducerplayer;

		$flvplayerini = parse_ini_file ('wp-content/plugins/flvplugin-free/players/' . $player . '.ini', true);

		$player = get_bloginfo ('url') . '/wp-content/plugins/flvplugin-free/players/' . $player . '.swf';
		$getID3 = new getID3;
		
		if (substr (strtolower ($flv), 0, 7) == 'http://' || substr (strtolower ($flv), 0, 8) == 'https://') {
			$flvfile = $flv;
			$md5url = ABSPATH . flvplugin_get_upload_dir ('/') . md5 (strtolower ($flv));
			$width = 0;
			$height = 0;
			$cnt = 0;
			while ((!$width || !$height) && $cnt < 3) {
				$cnt++;
				$xxx = fopen ($md5url, 'wb');
				$flvxxx = fopen ($flv, 'r');
				fwrite ($xxx, fread ($flvxxx, 2048));
				fclose ($flvxxx);
				fclose ($xxx);
				
				$info = $getID3->analyze ($md5url);
				
				$xxx = fopen ($md5url, 'w');
				fwrite ($xxx, 'width=' . abs ($info['video']['resolution_x']) . '&height=' . ($info['video']['resolution_y']));
				fclose ($xxx);
				
				parse_str (file_get_contents ($md5url), $array);
				$width = (int) $array['width'];
				$height = (int) $array['height'];
			}
		} else {
			$flvfile = get_bloginfo ('url') . '/' . flvplugin_get_upload_dir ('/') . urldecode ($flv);
			$info = $getID3->analyze (ABSPATH . flvplugin_get_upload_dir ('/') . $flv);
			$width = abs ($info['video']['resolution_x']);
			$height = ($info['video']['resolution_y']);
		}
		$findreplace['{flvfile}'] = $flvfile;
		$findreplace['{player}'] = $player;

		$minwidth = $flvplayerini['Minimal Dimensions']['Width'];
		$minheight = $flvplayerini['Minimal Dimensions']['Height'];

		// height and width pads
		$height += $flvplayerini['Increments']['Height'];
		$width += $flvplayerini['Increments']['Width'];
		
		if ($width < $minwidth) $width = $minwidth;
		if ($height < $minheight) $height = $minheight;
		
		$findreplace['{height}'] = $height;
		$findreplace['{width}'] = $width;

		$jsparam = array ();
		foreach ($findreplace AS $k => $v) $jsparam[] = $k . '=' . $v;
		$jsparam = urlencode (implode ('&', $jsparam));

		$code = str_replace (array_keys ($findreplace), $findreplace, $xcode);
		$code = '<script type="text/javascript" src="' . get_bloginfo ('url') . '/wp-content/plugins/flvplugin-free/js.php?' . $jsparam . '"></script><noscript>' . $code . '</noscript>';
		$content = str_replace ($search, $code, $content);
	}
	return $content;
}

function flvproducer_footer ($content) {
	global $flvproducerpoweredbylink;
	$flvproducerid = get_option ('default_flvproducer_affid') + 0;
	if ($flvproducerid) {
 		$flvproducerpoweredbylink = str_replace ('//cmd.php', '/cmd.php', $flvproducerpoweredbylink . '/cmd.php?af=' . $flvproducerid);
	}
	echo '<div align="center">Videos powered by <a href="' . $flvproducerpoweredbylink . '" title="FLVProducer">FLV Player Plugin</a></div>';
}

function flvproducer_upload ($array) {
	if (substr ($GLOBALS['wp_version'], 0, 3) < 2.5) {
		return array_merge ($array, array ('flvproducer_upload' => array ('FLV Plugin', 'upload_files', 'flvproducer_upload2', array (), array ())));
	} else {
		$upload_iframe_src = apply_filters('flvp_upload_iframe_src', "media-upload.php?type=flvp");
		echo '<a href="' . $upload_iframe_src . '&amp;TB_iframe=true&amp;height=250&amp;width=640" class="thickbox">FLV Plugin</a>&nbsp;&nbsp;';
	}
}

function flvproducer_upload2 () {
	$flvs = array ();
	$d = dir($path = ABSPATH . flvplugin_get_upload_dir ('/'));
	while (false !== ($file = $d->read ())) {
		if (is_file ($path . $file) && substr (strtolower ($file), -4) == '.flv') {
			$flvs[] = $file;
			$jpg = $path . $file . '.jpg';
			if (!file_exists ($jpg)) {
				shell_exec ("ffmpeg -i \"" . $path . $file . "\" -an -ss 00:00:03 -an -r 1 -vframes 1 -s 110x110 -f image2 -y \"" . $jpg . "\"");
			}
		}
	}
	$d->close ();
	
	if (count ($flvs) || true) { // <-- always true
	?>
	<style type="text/css">
		.flvlist {
			height: 130px;
			overflow: auto;
			margin: 0 15px;
			padding: 0;
			list-style: none;
		}
		.flvlist li {
			margin: 0 5px 5px 0;
			padding: 5px;
			height: 110px;
			width: 110px;
			float: left;
			border: 1px solid #eee;
			background: #fff no-repeat center;
			overflow: hidden;
		}
		.flvlist a.big {
			width: 110px;
			height: 110px;
			display: table-cell;
			-display: block;
			vertical-align: middle;
			text-decoration: none;
			border: none;
			text-align: center;
			overflow: hidden;
		}
		.flvlist a.big span {
			overflow: hidden;
			background: #fff;
		}
		#flvproducerinsert {
			width: 100%;
			height: 200px;
			display: none;
			position: absolute;
			<?=(substr ($GLOBALS['wp_version'], 0, 3) >= 2.5) ? 'top:37px;' : 'top:0;'; ?>
			
			left: 0;
			background: #F9FCFE;
			overflow: hidden;
		}
		#flvproducer_playerlist {
			width: 120px;
			height: 120px;
			display: block;
			overflow: hidden;
		}
		#flvpmain {
			font-family: Arial, sans-serif;
			font-size: 9pt;
		}
		#flvh2 {
			font-size: 14pt;
			font-family: 'Georgia', 'Times New Roman', 'Times', serif;
			font-weight: normal;
		}
		#flvpmain h1 {
			font-size: 20px;
			line-height: 20px;
			margin: 0;
			padding: 3px;
			background: #aaf;
		}
	</style>
	<script language="javascript">
		function flvproducer_insertcode (form) {
			var flv = form.flvfile.value;
			var player = form.flvplayer.value;
			
			insertCode = '[flvplugin flv=' + flv.replace(' ', '%20') + ' player=' + player.replace(' ', '%20') + ' buffer=' + form.buffersize.value + ' autoplay=' + !form.paused.checked + ' loop=' + form.loop.checked + ' border=' + form.border.checked + ' preload=' + form.preload.checked + ' redirect=' + form.redirect.value.replace(/^\s+|\s+$/g,"").replace(' ', '%20') + ']';
			
			myField = parent.document.getElementById('content');
			xval = myField.value;
			
			var wpeditor = parent.tinyMCE.getInstanceById ('content');
			
			if (wpeditor) {
				wpeditor.execCommand ("mceInsertContent", true, insertCode);
			}
			if (myField) {
				if (xval == myField.value) {
					var selstart = 1;
					try {
						myField.selectionStart;
					} catch (err) {selstart = 0;}
					if (document.selection) {
						try {
							myField.focus ()
							sel = parent.document.selection.createRange();
							sel.text = insertCode;
						} catch (err) {}
					} else if (selstart) {
						try {
							var startPos = myField.selectionStart;
							var endPos = myField.selectionEnd;
							myField.value = myField.value.substring (0, startPos) + insertCode + myField.value.substring (endPos, myField.value.length);
						} catch (err) {}
					} else {
						try {
							myField.value += insertCode;
						} catch (err) {}
					}
				}
			}
		}
		function flvproducer_insertform (flv) {
			var flvtext = (flv == 'fromurl') ? 'Insert From URL' : flv;
			while (flv == 'fromurl') {
				flv = prompt ('Enter the URL of your FLV file below', '');
				if (flv == null) return false;
				if (flv.substring (0, 7).toLowerCase () != 'http://' && flv.substring (0, 8).toLowerCase () != 'https://') {
					alert ('Invalid URL');
					flv = 'fromurl';
				}
			}
			document.getElementById('flvh2').innerHTML = flvtext;
			document.getElementById('flvproducerinsert').style.display = 'block';
			document.getElementById('flvproducerform').flvfile.value = flv;
			if (flv != flvtext) {
				document.getElementById('externalflv').innerHTML = flv;
				document.getElementById('externalflvrow').style.visibility = 'visible';
			} else {
				document.getElementById('externalflvrow').style.visibility = 'hidden';
			}
		
		}
		
		var flvproducer_players = new Array ();
		
		<?php
			$players = array_merge (array (get_option ('default_flvproducer_player')), flvproducer_getplayers ());
			foreach ($players AS $player) {
				echo "flvproducer_players[flvproducer_players.length] = '{$player}';\n";
			}
			
		?>
		var flvproducer_player = 0;
		
		function flvproducer_chooseplayer (idx) {
			flvproducer_player += idx;
			if (flvproducer_player < 0) flvproducer_player = 0;
			if (flvproducer_player >= flvproducer_players.length) flvproducer_player = flvproducer_players.length - 1;
			document.getElementById('flvproducerform').flvplayer.value = (flvproducer_player) ? flvproducer_players[flvproducer_player] : '';
			var img = document.getElementById('flvproducer_playerthumb'); img.src = '<?=get_bloginfo ('url')?>/wp-content/plugins/flvplugin-free/players/' + flvproducer_players[flvproducer_player] + '.jpg';
			var pname = document.getElementById('flvproducer_playername');
			pname.innerHTML = (flvproducer_player) ? flvproducer_players[flvproducer_player] : 'Default';
		}
	</script>
	<div id="flvpmain">

	<?php
		if (substr ($GLOBALS['wp_version'], 0, 3) >= 2.5) {
			echo "<h1>FLV Plugin</h1>";
		}
		echo "<br /><ul class='flvlist'>";
		$ctr = 1;
		echo "<li>
			<a class='big' href='javascript:void(flvproducer_insertform(\"fromurl\"))' title='Insert from URL'><span>Insert FLV <br />From URL</span></a>
		</li>";
		foreach ($flvs AS $flv) {
			$ctr++;
			echo "<li style='background-image:url(" . get_bloginfo ('url') . '/' . flvplugin_get_upload_dir ('/'). "{$flv}.jpg)'>
				<a class='big' href='javascript:void(flvproducer_insertform(\"{$flv}\"))' title='{$flv}'><span>{$flv}</span></a>
			</li>";
		}
		echo "</ul><br clear='all' />";
	}
	?>
	<div id="flvproducerinsert">
	<form method='post' id='flvproducerform' style="margin:0;padding:0">
		<table cellspacing="10">
			<tr>
				<td valign="top" style="font-size:16px;text-align: center;">
					<div style="width:200px; overflow:hidden;"><h2 id='flvh2'></h2></div>
					<div style="font-size: 10pt; width: 120px; margin: 0 auto">
					<b>Choose Player</b>
					<br />
					<div style='float:right'><a href="#" onclick="flvproducer_chooseplayer (1)">&middot;&middot;&raquo;</a></div>
					<div style='float:left'><a href="#" onclick="flvproducer_chooseplayer (-1)">&laquo;&middot;&middot;</a></div>
					<small><a href="#" onclick="flvproducer_chooseplayer (-100000)">Reset</a></small>
					<br clear="all" />
					<div id="flvproducer_playerlist">
						<img id="flvproducer_playerthumb" src="<?=get_bloginfo ('url')?>/wp-content/plugins/flvplugin-free/players/<?=get_option ('default_flvproducer_player')?>.jpg" height="100" /><br />
						<small id="flvproducer_playername">Default</small>
					</div>
					</div>
				</td>
				<td align="center" valign="top">
				</td>
				<td></td>
				<td valign="top" nowrap="true">
					<table cellpadding="0" cellspacing="0" border="0">
						<tr>
							<td valign="top">
								<input type="checkbox" name="paused" id="paused" value="" checked="true" />
								<label for="paused">Paused at Start</label><br />
			
								<input type="checkbox" name="loop" id="loop" value="" />
								<label for="loop">Loop Video</label><br />
								
								Buffer Size <select name="buffersize">
								<option>2</option>
								<option selected='true'>5</option>
								<option>7</option>
								<option>10</option>
								<option>15</option>
								<option>20</option>
								<option>30</option>
								<option>45</option>
								<option>60</option>
								</select> Secs<br />
							</td>
							<td>&nbsp;&nbsp;&nbsp;</td>
							<td valign="top">
								<input type="checkbox" name="border" id="border" value="" checked="true" />
								<label for="border">Show border around movie</label><br />
			
								<input type="checkbox" name="preload" id="preload" value="" />
								<label for="preload">Preload Movie</label><br />
<?php /*			
								<input type="checkbox" name="infobutton" id="infobutton" value="" />
								<label for="infobutton">Disable 'I' Button</label><br />
*/ ?>
							</td>
						</tr>
					</table>

					<br />
					<table cellpadding=0 cellspacing=0>
						<tr>
							<td nowrap="true">Redirect URL:&nbsp;</td>
							<td><input type="text" size="45" name="redirect" /></td>
						</tr>
						<tr id="externalflvrow">
							<td nowrap="true">External FLV:&nbsp;</td>
							<td><div id="externalflv"></div></td>
						</tr>
						
					</table>
					
					<input type='hidden' name='action' value='flvproducerdelete' />
					<input type='hidden' name='flvfile' value="" />
					<input type='hidden' name='flvplayer' value="" />
					<p class="submit" style="text-align:left">
						<a onclick="document.getElementById('flvproducerinsert').style.display='none'" href="#">&laquo;&nbsp;Back</a>
						&nbsp; &nbsp;
						
						<input type="button" value="<?php _e ('Insert Code »') ?>" onclick='flvproducer_insertcode (this.form)' />
						&nbsp;
						<input type="button" value="<?php _e ('Delete »') ?>" onclick="if (confirm ('Are you sure you want to delete this file?')) this.form.submit()" />

						&nbsp; &nbsp;
						<a href="http://www.flvplugin.com/upgrade" target="_blank">Upgrade</a>
						|
						<a href="http://www.flvplugin.com/help" target="_blank">Help</a>
					</p>
				</td>
				<td valign="top" nowrap="true" style="font-size: 1.2em; font-weight: bold">
				</td>
			</tr>
		</table>
	</form>
	</div>
	
	<form enctype="multipart/form-data" id="upload-flv" method="post">
		<input type="hidden" name="MAX_FILE_SIZE" value="<?=(1024 * 1000 * 15)?>" />
		<input type="hidden" name="action" value="flvproducerupload" />
		<table>
			<tr>
				<td><label for="upload">Upload FLV File</label></td>
				<td><input type="file" id="upload" name="flv" /></td>
				<td class="submit" align="left"><input type="submit" value="Upload &raquo;" /></td>
				<td>
					&nbsp; &nbsp;
					<a href="http://www.flvplugin.com/upgrade" target="_blank">Upgrade</a>
					|
					<a href="http://www.flvplugin.com/help" target="_blank">Help</a>
				</td>
			</tr>
		</table>
	</form>
	</div>
	<?php
	echo "<script language='javascript'>";
	switch ($GLOBALS['flvproducerstatus']) {
		case 1 :
			echo 'alert ("FLV File Uploaded");';
		break;
		case 2 :
			echo 'alert ("Error saving file to FLV Plugin\'s upload folder");';
		break;
		case 3 :
			echo 'alert ("Error uploading file");';
		break;
	}
	if ($GLOBALS['flvproducerdelete'] == 1) {
		echo 'alert ("FLV File Deleted");';
	}
	echo "</script>";
}

function flvproducer_getplayers () {
	$d = dir(ABSPATH . 'wp-content/plugins/flvplugin-free/players/');
	$ctr = 0;
	$values = array ();
	while (false !== ($entry = $d->read ())) {
		if (substr ($entry, -4) == '.swf') $values[] = substr ($entry, 0, -4);
	}
	$d->close ();
	sort ($values);
	return $values;
}

function flvproducer_adminmenu () {
	add_options_page ('FLV Plugin', 'FLV Plugin', 8, __FILE__, 'flvproducer_optionspage');
}

function flvproducer_optionspage () {
	$values = flvproducer_getplayers ();
	
	flvproducer_install ();
		
	$selected = get_option ('default_flvproducer_player');
	
	?>
<style type="text/css">
	.flvproducer {
		display: block;
		float: left;
		padding: 3px;
		margin: 3px;
		border: 1px solid #eee;
		width: 250px;
		height: 200px;
		text-align: center;
	}
</style>
<div class="wrap">
<h2>FLV Plugin Options</h2>
<form method="post" action="options.php">
<?php wp_nonce_field ('update-options') ?>

<p class="submit">
<a href="http://www.flvplugin.com/upgrade" target="_blank">Upgrade and Get More Players</a>
|
<a href="http://www.flvplugin.com/help" target="_blank">Help</a>
&nbsp; &nbsp;
<input type="submit" name="Submit" value="<?php _e ('Update Options »') ?>" />
</p>
<input type="hidden" name="action" value="update" />
<?php /*
<fieldset class="options">
<legend>Default Affiliate ID</legend>
<p>
	Enter the affiliate ID to use: <input type="text" name="default_flvproducer_affid" value="<?=get_option ('default_flvproducer_affid')?>" />
</p>
</fieldset>
*/ ?>
<fieldset class="options">
<legend>Default FLV Player</legend>
<?php
	$ctr = 0;
	foreach ($values AS $value) {
		$ctr++;
		?>
<div class='flvproducer'>
	<input name="default_flvproducer_player" type="radio" id="default_flvproducer_player<?=$ctr?>" value="<?=$value?>"<?php if ($selected == $value) echo " checked='true'"; ?>  />
	&nbsp;
	<label for="default_flvproducer_player<?=$ctr?>">
		<?=$value?><br /><br />
		<img src="<?=get_bloginfo ('url')?>/wp-content/plugins/flvplugin-free/players/<?=$value?>.jpg" align="absmiddle" />
	</label>
</div>
		<?php
	}
?>
</fieldset>
<input type="hidden" name="page_options" value="default_flvproducer_player,default_flvproducer_affid" />
<p class="submit">
<a href="http://www.flvplugin.com/upgrade" target="_blank">Upgrade and Get More Players</a>
|
<a href="http://www.flvplugin.com/help" target="_blank">Help</a>
&nbsp; &nbsp;
<input type="submit" name="Submit" value="<?php _e ('Update Options »') ?>" />
</p>
</form>
</div>
	<?php
}

function flvproducer_install () {
	$x = flvplugin_make_upload_dir ();
	if ($GLOBALS['flvproducerid'] != '') update_option ('default_flvproducer_affid', $GLOBALS['flvproducerid']);
	$flvproducerplayer = get_option ('default_flvproducer_player');
	if ($flvproducerplayer == '') update_option ('default_flvproducer_player', '17-Bonus_Player_7');
	$footer = get_option ('default_flvproducer_footer');
	if ($footer == '') update_option ('default_flvproducer_footer', 1);
}

function flvplugin_make_upload_dir () {
	@mkdir (ABSPATH . get_option ('upload_path'));
	return @mkdir (ABSPATH . get_option ('upload_path') . "/flvplugin");
}
function flvplugin_get_upload_dir ($end = '') {
	return get_option ('upload_path') . "/flvplugin" . $end;
}

function flvplugin_error () {
	if (!is_writeable (ABSPATH . flvplugin_get_upload_dir ())) {
		if (!flvplugin_make_upload_dir ()) {
			echo '<div class="updated fade-ff0000" id="flvplugin-warning"><p><strong>FLVPlugin Error:</strong> ' . get_option ('upload_path') . ' is not writeable.  You may need to create the folder yourself and chmod it.</p></div>';
		}
	}
}

register_activation_hook (__FILE__, 'flvproducer_install');

add_filter ('the_content', 'flvproducer_content');
add_action ('wp_footer', 'flvproducer_footer');
add_action ('admin_menu', 'flvproducer_adminmenu');
add_action ('admin_notices', 'flvplugin_error');

if (substr ($GLOBALS['wp_version'], 0, 3) >= 2.5) {
	add_action ('media_buttons', 'flvproducer_upload');
	add_action ('media_upload_flvp', 'flvproducer_upload2');
} else {
	add_filter ('wp_upload_tabs', 'flvproducer_upload');
}
/* upload */
if ($_POST['action'] == 'flvproducerupload') {
	$return = $_SERVER['HTTP_REFERER'];
	$allowed = array ('video/flv', 'video/x-flv');
//	if (in_array ($_FILES['flv']['type'], $allowed) && @is_uploaded_file ($_FILES['flv']['tmp_name'])) {
	if (strtolower (substr ($_FILES['flv']['name'], -4)) == '.flv' && @is_uploaded_file ($_FILES['flv']['tmp_name'])) {
		if (@move_uploaded_file ($_FILES['flv']['tmp_name'], ABSPATH . flvplugin_get_upload_dir ('/') . $_FILES['flv']['name'])) {
			$flvproducerstatus = 1;
		} else {
			$flvproducerstatus = 2;
		}
	} else {
		$flvproducerstatus = 3;
	}
}
if ($_POST['action'] == 'flvproducerdelete') {
	$return = $_SERVER['HTTP_REFERER'];
	@unlink (ABSPATH . flvplugin_get_upload_dir ('/') . $_POST['flvfile']);
	$flvproducerdelete = 1;
}

if ($_GET['flvplugin'] == 'clear') {
	$flvdir = ABSPATH . flvplugin_get_upload_dir ('/');
	$flvd = dir ($flvdir);
	while (false !== ($entry = $flvd->read ())) {
		$entry = $flvdir . $entry;
		if (is_file ($entry)) {
			$flvf = fopen ($entry, 'r');
			if (fread ($flvf, 6) == 'width=') {
				unlink ($entry);
			}
			fclose ($f);
		}
	}
}

error_reporting ($flverrorreporting);

?>