<?php
/*
 **************************************************************************************************
 *    Copyright (c) 2010-2012 Just Another Video script
 *
 * 	  This file is part of Just Another Video Script.
 *    Version 1.4.3
 *    info@justanothervideoscript.com
 **************************************************************************************************
 *    Come to website for support or buying additional plugins/modules.
 *    http://justanothervideoscript.com/
 **************************************************************************************************
 *    By using this software you agree that you have read and acknowledged our End-User License
 *    Agreement available at http://justanothervideoscript.com/license and can be bound by it.
 **********************************************************************************
 */
include_once("adminfunctions.inc");

	if (isset($_POST['submit'])) { 
		$mobilevideo = $_POST['mobilevideo'] == 'on' ? 1 : 0 ;
		$db->query("UPDATE `setting` SET `value` = '".$mobilevideo."' WHERE `setting` = 'mobilevideo'") ;
		$mobile_encodesize_width = $_POST['mobile_encodesize_width'] ;
		$db->query("UPDATE `setting` SET `value` = '".$mobile_encodesize_width."' WHERE `setting` = 'mobile_encodesize_width'") ;
		$mobile_encodesize_height = $_POST['mobile_encodesize_height'] ;
		$db->query("UPDATE `setting` SET `value` = '".$mobile_encodesize_height."' WHERE `setting` = 'mobile_encodesize_height'") ;
		$submitmsg = "Everything has been updated now." ;
		
	}
	$mobilevideo = getSetting(mobilevideo, $db) == 1 ? 'CHECKED' : '' ;
	$mobile_encodesize_width = getSetting(mobile_encodesize_width, $db) ;
	$mobile_encodesize_height = getSetting(mobile_encodesize_height, $db) ;
?>


<h2>Mobile Settings</h2>
<div class="settings">

	<fieldset>
		<form action="" method="post" enctype="multipart/form-data">
		<table>
			<tr>
				<h3><?=$submitmsg?><h3>
			</tr>
			<tr>
					<td>Enable Mobile video:</td>
					<td><input type="checkbox" name="mobilevideo" <?=$mobilevideo?>></td>
			</tr>
			<tr>
					<td>Enconding Height:</td>
					<td><input type="text" size="5" name="mobile_encodesize_height" value="<?=$mobile_encodesize_height?>"></td>
			</tr>	
			<tr>
					<td>Enconding Width:</td>
					<td><input type="text" size="5" name="mobile_encodesize_width" value="<?=$mobile_encodesize_width?>"></td>
			</tr>			
			<tr>	
				<td><input class="submitbutton" type="submit" name="submit" value="Submit" /></td>
			</tr>
		</table>
		</form>

	</fieldset>
</div>



