<?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'])) { 
		$mp_allvideos = $_POST['mp_allvideos'] ;
		$db->query("UPDATE `setting` SET `value` = '".$mp_allvideos."' WHERE `setting` = 'mp_allvideos'") ;
		$mp_category = $_POST['mp_category'] ;
		$db->query("UPDATE `setting` SET `value` = '".$mp_category."' WHERE `setting` = 'mp_category'") ;
		$mp_mostviewed = $_POST['mp_mostviewed'] ;
		$db->query("UPDATE `setting` SET `value` = '".$mp_mostviewed."' WHERE `setting` = 'mp_mostviewed'") ;
		$mp_mediasearch = $_POST['mp_mediasearch'] ;
		$db->query("UPDATE `setting` SET `value` = '".$mp_mediasearch."' WHERE `setting` = 'mp_mediasearch'") ;
		$mp_toprated = $_POST['mp_toprated'] ;
		$db->query("UPDATE `setting` SET `value` = '".$mp_toprated."' WHERE `setting` = 'mp_toprated'") ;
		$mp_community = $_POST['mp_community'] ;
		$db->query("UPDATE `setting` SET `value` = '".$mp_community."' WHERE `setting` = 'mp_community'") ;
		$mp_friend = $_POST['mp_friend'] ;
		$db->query("UPDATE `setting` SET `value` = '".$mp_friend."' WHERE `setting` = 'mp_friend'") ;
		$mp_fav = $_POST['mp_fav'] ;
		$db->query("UPDATE `setting` SET `value` = '".$mp_fav."' WHERE `setting` = 'mp_fav'") ;
		$mp_media = $_POST['mp_media'] ;
		$db->query("UPDATE `setting` SET `value` = '".$mp_media."' WHERE `setting` = 'mp_media'") ;
		$mp_sub = $_POST['mp_sub'] ;
		$db->query("UPDATE `setting` SET `value` = '".$mp_sub."' WHERE `setting` = 'mp_sub'") ;
		$mp_uploadedvideos = $_POST['mp_uploadedvideos'] ;
		$db->query("UPDATE `setting` SET `value` = '".$mp_uploadedvideos."' WHERE `setting` = 'mp_uploadedvideos'") ;
		$mp_favoritevideos = $_POST['mp_favoritevideos'] ;
		$db->query("UPDATE `setting` SET `value` = '".$mp_favoritevideos."' WHERE `setting` = 'mp_favoritevideos'") ;
		$mp_viewinghistory = $_POST['mp_viewinghistory'] ;
		$db->query("UPDATE `setting` SET `value` = '".$mp_viewinghistory."' WHERE `setting` = 'mp_viewinghistory'") ;
		$mp_inbox = $_POST['mp_inbox'] ;
		$db->query("UPDATE `setting` SET `value` = '".$mp_inbox."' WHERE `setting` = 'mp_inbox'") ;
		$mp_outbox = $_POST['mp_outbox'] ;
		$db->query("UPDATE `setting` SET `value` = '".$mp_outbox."' WHERE `setting` = 'mp_outbox'") ;
		$mp_friends = $_POST['mp_friends'] ;
		$db->query("UPDATE `setting` SET `value` = '".$mp_friends."' WHERE `setting` = 'mp_friends'") ;
		$mp_receivedrequests = $_POST['mp_receivedrequests'] ;
		$db->query("UPDATE `setting` SET `value` = '".$mp_receivedrequests."' WHERE `setting` = 'mp_receivedrequests'") ;
		$mp_sentrequests = $_POST['mp_sentrequests'] ;
		$db->query("UPDATE `setting` SET `value` = '".$mp_sentrequests."' WHERE `setting` = 'mp_sentrequests'") ;
		$mp_profileviews = $_POST['mp_profileviews'] ;
		$db->query("UPDATE `setting` SET `value` = '".$mp_profileviews."' WHERE `setting` = 'mp_profileviews'") ;
		$mp_blockedmembers = $_POST['mp_blockedmembers'] ;
		$db->query("UPDATE `setting` SET `value` = '".$mp_blockedmembers."' WHERE `setting` = 'mp_blockedmembers'") ;
		$relateduserpage = $_POST['relateduserpage'] ;
		$db->query("UPDATE `setting` SET `value` = '".$relateduserpage."' WHERE `setting` = 'relateduserpage'") ;
		$submitmsg = "Everything has been updated now." ;

	}
//front site
	$mp_allvideos = getSetting(mp_allvideos, $db) ;
	$mp_category = getSetting(mp_category, $db) ;
	$mp_mostviewed = getSetting(mp_mostviewed, $db) ;
	$mp_mediasearch = getSetting(mp_mediasearch, $db) ;
	$mp_toprated = getSetting(mp_toprated, $db) ;
	$mp_community = getSetting(mp_community, $db) ;
//member section
	$mp_favoritevideos = getSetting(mp_favoritevideos, $db) ;
	$mp_friends = getSetting(mp_friends, $db) ;
	$mp_inbox = getSetting(mp_inbox, $db) ;
	$mp_blockedmembers = getSetting(mp_blockedmembers, $db) ;
	$mp_outbox = getSetting(mp_outbox, $db) ;
	$mp_profileviews = getSetting(mp_profileviews, $db) ;
	$mp_receivedrequests = getSetting(mp_receivedrequests, $db) ;
	$mp_sentrequests = getSetting(mp_sentrequests, $db) ;
	$mp_uploadedvideos = getSetting(mp_uploadedvideos, $db) ;
	$mp_viewinghistory = getSetting(mp_viewinghistory, $db) ;	
//profile settings
	$mp_friend = getSetting(mp_friend, $db) ;
	$mp_fav = getSetting(mp_fav, $db) ;
	$mp_media = getSetting(mp_media, $db) ;	
	$mp_sub = getSetting(mp_sub, $db) ;
//related
	$relateduserpage = getSetting(relateduserpage, $db) ;
?>

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

	<fieldset>
		<form action="" method="post" enctype="multipart/form-data">
		<table>
			<tr>
				<h3><?=$submitmsg?><h3>
			</tr>
			<tr>
					<td class="bigtext">Front site</td>
			</tr>
			<tr>
					<td>Page items Allvideos:</td>
					<td><input type="text" size="3" name="mp_allvideos" value="<?=$mp_allvideos?>"></td>
			</tr>

			<tr>
					<td>Page items Mostviewed:</td>
					<td><input type="text" size="3" name="mp_mostviewed" value="<?=$mp_mostviewed?>"></td>
			</tr>
			<tr>
					<td>Page items Top Rated:</td>
					<td><input type="text" size="3" name="mp_toprated" value="<?=$mp_toprated?>"></td>
			</tr>
			<tr>
					<td>Page items community:</td>
					<td><input type="text" size="3" name="mp_community" value="<?=$mp_community?>"></td>
			</tr>
			<tr>
					<td>Page items Mediasearch:</td>
					<td><input type="text" size="3" name="mp_mediasearch" value="<?=$mp_mediasearch?>"></td>
			</tr>
			<tr>
					<td>Page items Category:</td>
					<td><input type="text" size="3" name="mp_category" value="<?=$mp_category?>"></td>
			</tr>
			<tr>
					<td class="bigtext">Member section</td>
			</tr>
			<tr>
					<td>Page items profile Media:</td>
					<td><input type="text" size="3" name="mp_media" value="<?=$mp_media?>"></td>
			</tr>		
			<tr>
					<td>Page items profile Favorites:</td>
					<td><input type="text" size="3" name="mp_fav" value="<?=$mp_fav?>"></td>
			</tr>		
			<tr>
					<td>Page items profile Subscriptions:</td>
					<td><input type="text" size="3" name="mp_sub" value="<?=$mp_sub?>"></td>
			</tr>		
			<tr>
					<td>Page items profile Friends:</td>
					<td><input type="text" size="3" name="mp_friend" value="<?=$mp_friend?>"></td>
			</tr>		
			<tr>
					<td class="bigtext">Profile section</td>
			</tr>
			<tr>
					<td>Page items members Uploadedvideos:</td>
					<td><input type="text" size="3" name="mp_uploadedvideos" value="<?=$mp_uploadedvideos?>"></td>
			</tr>			
			<tr>
					<td>Page items members favoritevideos:</td>
					<td><input type="text" size="3" name="mp_favoritevideos" value="<?=$mp_favoritevideos?>"></td>
			</tr>			
			<tr>
					<td>Page items members Viewinghistory:</td>
					<td><input type="text" size="3" name="mp_viewinghistory" value="<?=$mp_viewinghistory?>"></td>
			</tr>			
			<tr>
					<td>Page items members inbox:</td>
					<td><input type="text" size="3" name="mp_inbox" value="<?=$mp_inbox?>"></td>
			</tr>
			<tr>
					<td>Page items members outbox:</td>
					<td><input type="text" size="3" name="mp_outbox" value="<?=$mp_outbox?>"></td>
			</tr>			
			<tr>
					<td>Page items members friends:</td>
					<td><input type="text" size="3" name="mp_friends" value="<?=$mp_friends?>"></td>
			</tr>			
			<tr>
					<td>Page items members receivedrequests:</td>
					<td><input type="text" size="3" name="mp_receivedrequests" value="<?=$mp_receivedrequests?>"></td>
			</tr>			
			<tr>
					<td>Page items members Sentrequests:</td>
					<td><input type="text" size="3" name="mp_sentrequests" value="<?=$mp_sentrequests?>"></td>
			</tr>	
			<tr>
					<td>Page items members Profileviews:</td>
					<td><input type="text" size="3" name="mp_profileviews" value="<?=$mp_profileviews?>"></td>
			</tr>			
			<tr>
					<td>Page items members Blockedmembers:</td>
					<td><input type="text" size="3" name="mp_blockedmembers" value="<?=$mp_blockedmembers?>"></td>
			</tr>		
			<tr>
					<td class="bigtext">Related userpage</td>
			</tr>
			<tr>
					<td>Page items Related:</td>
					<td><input type="text" size="3" name="relateduserpage" value="<?=$relateduserpage?>"></td>
			</tr>
			<tr>	
				<td><input class="submitbutton" type="submit" name="submit" value="Submit" /></td>
			</tr>
		</table>
		</form>

	</fieldset>
</div>



