<?php
session_start();

include "../config.php";
include "../header.php";
include "../style.php";
if( isset($_SESSION["alogin"]) ) {

?><table>

<tr>

<td width="15%" valign=top><br>

<? include("adminnavigation.php"); ?>

</td>

<td valign="top" align="center"><br><br> <?

echo "<font size=2 face='$fonttype' color='$fontcolour'><p><center>";



echo "<center><H2>Edit OTO</H2></center>";



if($_POST['action'] == "update") {



mysql_query("UPDATE oto SET price = '".dbput($_POST['price'])."', points = '".dbput($_POST['points'])."', banner_num = '".dbput($_POST['banner_num'])."', 
banner_views = '".dbput($_POST['banner_views'])."', solo_num = '".dbput($_POST['solo_num'])."', hheadlinead_num = '".dbput($_POST['hheadlinead_num'])."', 
hheadlinead_views = '".dbput($_POST['hheadlinead_views'])."', hheaderad_num = '".dbput($_POST['hheaderad_num'])."', hheaderad_views = '".dbput($_POST['hheaderad_views'])."', 
traffic_num = '".dbput($_POST['traffic_num'])."', traffic_views = '".dbput($_POST['traffic_views'])."', 
upgrade_pro = '".dbput($_POST['upgrade_pro'])."', upgrade_jv = '".dbput($_POST['upgrade_jv'])."', login_num = '".dbput($_POST['login_num'])."', login_views = '".dbput($_POST['login_views'])."', 
hotlink_num = '".dbput($_POST['hotlink_num'])."', hotlink_views = '".dbput($_POST['hotlink_views'])."', button_num = '".dbput($_POST['button_num'])."', 
button_views = '".dbput($_POST['button_views'])."', headline_num = '".dbput($_POST['headline_num'])."', headline_views = '".dbput($_POST['headline_views'])."', ptc_num = '".dbput($_POST['ptc_num'])."', ptc_views = '".dbput($_POST['ptc_views'])."',
procommission = '".dbput($_POST['procommission'])."', jvcommission = '".dbput($_POST['jvcommission'])."', superjvcommission = '".dbput($_POST['superjvcommission'])."', cashsolo_num = '".dbput($_POST['cashsolo_num'])."',
upgrade1_price = '".dbput($_POST['upgrade1_price'])."', upgrade1_text = '".dbput($_POST['upgrade1_text'])."', upgrade1_points = '".dbput($_POST['upgrade1_points'])."', 
upgrade2_price = '".dbput($_POST['upgrade2_price'])."', upgrade2_text = '".dbput($_POST['upgrade2_text'])."', upgrade2_solos = '".dbput($_POST['upgrade2_solos'])."',
upgrade3_price = '".dbput($_POST['upgrade3_price'])."', upgrade3_text = '".dbput($_POST['upgrade3_text'])."', upgrade3_banners = '".dbput($_POST['upgrade3_banners'])."', upgrade3_views = '".dbput($_POST['upgrade3_views'])."', 
upgrade4_price = '".dbput($_POST['upgrade4_price'])."', upgrade4_text = '".dbput($_POST['upgrade4_text'])."', upgrade4_traffic = '".dbput($_POST['upgrade4_traffic'])."', upgrade4_views = '".dbput($_POST['upgrade4_views'])."', 
upgrade5_price = '".dbput($_POST['upgrade5_price'])."', upgrade5_text = '".dbput($_POST['upgrade5_text'])."', upgrade5_login = '".dbput($_POST['upgrade5_login'])."', upgrade5_views = '".dbput($_POST['upgrade5_views'])."', 
upgrade6_price = '".dbput($_POST['upgrade6_price'])."', upgrade6_text = '".dbput($_POST['upgrade6_text'])."', upgrade6_hotlink = '".dbput($_POST['upgrade6_hotlink'])."', upgrade6_views = '".dbput($_POST['upgrade6_views'])."', 
upgrade7_price = '".dbput($_POST['upgrade7_price'])."', upgrade7_text = '".dbput($_POST['upgrade7_text'])."', upgrade7_button = '".dbput($_POST['upgrade7_button'])."', upgrade7_views = '".dbput($_POST['upgrade7_views'])."', 
upgrade8_price = '".dbput($_POST['upgrade8_price'])."', upgrade8_text = '".dbput($_POST['upgrade8_text'])."', upgrade8_headline = '".dbput($_POST['upgrade8_headline'])."', upgrade8_views = '".dbput($_POST['upgrade8_views'])."', 
upgrade9_price = '".dbput($_POST['upgrade9_price'])."', upgrade9_text = '".dbput($_POST['upgrade9_text'])."', upgrade9_ptc = '".dbput($_POST['upgrade9_ptc'])."', upgrade9_views = '".dbput($_POST['upgrade9_views'])."', 
upgrade10_price = '".dbput($_POST['upgrade10_price'])."', upgrade10_text = '".dbput($_POST['upgrade10_text'])."', upgrade10_cashsolos = '".dbput($_POST['upgrade10_cashsolos'])."' WHERE 1");



echo "<font color=red>The settings have been updated.</font><br><br>";



}





$sql = mysql_query("SELECT * FROM oto LIMIT 1");

$oto = mysql_fetch_array($sql);





?>



<form method="POST" action="editoto.php">

<input type="hidden" name="action" value="update">

<table>

<tr><td>Price:</td><td><input type="text" name="price" value="<? echo $oto['price']; ?>">$</td></tr>

<tr><td>Points to add:</td><td><input type="text" name="points" value="<? echo $oto['points']; ?>"> points</td></tr>

<tr><td>Solo to add:</td><td><input type="text" name="solo_num" value="<? echo $oto['solo_num']; ?>"> solos</td></tr>

<tr><td>Hot Headline Adz to add:</td><td><input type="text" name="hheadlinead_num" value="<? echo $oto['hheadlinead_num']; ?>"> hot headline ads</td></tr>
<tr><td>Clicks per Hot Headline Ad:</td><td><input type="text" name="hheadlinead_views" value="<? echo $oto['hheadlinead_views']; ?>"> clicks</td></tr>
<tr><td>Hot Header Ads to add:</td><td><input type="text" name="hheaderad_num" value="<? echo $oto['hheaderad_num']; ?>"> hot header ads</td></tr>
<tr><td>Clicks per Hot Header Ad:</td><td><input type="text" name="hheaderad_views" value="<? echo $oto['hheaderad_views']; ?>"> clicks</td></tr>
<tr><td>Cash Solo to add:</td><td><input type="text" name="cashsolo_num" value="<? echo $oto['cashsolo_num']; ?>"> cash solos</td></tr>

<tr><td>Banners to add:</td><td><input type="text" name="banner_num" value="<? echo $oto['banner_num']; ?>"> banners</td></tr>

<tr><td>Views per banner:</td><td><input type="text" name="banner_views" value="<? echo $oto['banner_views']; ?>"> views</td></tr>

<tr><td>Traffic links to add:</td><td><input type="text" name="traffic_num" value="<? echo $oto['traffic_num']; ?>"> traffic links</td></tr>

<tr><td>Views per traffic link:</td><td><input type="text" name="traffic_views" value="<? echo $oto['traffic_views']; ?>"> views</td></tr>

<tr><td>Login ads to add:</td><td><input type="text" name="login_num" value="<? echo $oto['login_num']; ?>"> login ads</td></tr>

<tr><td>Views per login ad:</td><td><input type="text" name="login_views" value="<? echo $oto['login_views']; ?>"> views</td></tr>

<tr><td>Hotlinks to add:</td><td><input type="text" name="hotlink_num" value="<? echo $oto['hotlink_num']; ?>"> hotlinks</td></tr>
<tr><td>Views per hotlink:</td><td><input type="text" name="hotlink_views" value="<? echo $oto['hotlink_views']; ?>"> views</td></tr>

<tr><td>Button ads to add:</td><td><input type="text" name="button_num" value="<? echo $oto['button_num']; ?>"> button ads</td></tr>
<tr><td>Views per button ad:</td><td><input type="text" name="button_views" value="<? echo $oto['button_views']; ?>"> views</td></tr>
<tr><td>Headline ads to add:</td><td><input type="text" name="headline_num" value="<? echo $oto['headline_num']; ?>"> headline ads</td></tr>
<tr><td>Views per headline ad:</td><td><input type="text" name="headline_views" value="<? echo $oto['headline_views']; ?>"> views</td></tr>
<tr><td>PTC ads to add:</td><td><input type="text" name="ptc_num" value="<? echo $oto['ptc_num']; ?>"> ptc ads</td></tr>
<tr><td>Views per PTC ad:</td><td><input type="text" name="ptc_views" value="<? echo $oto['ptc_views']; ?>"> views</td></tr>

<tr><td>Pro commission:</td><td>$<input type="text" name="procommission" value="<? echo $oto['procommission']; ?>"></td></tr>

<tr><td>JV commission:</td><td>$<input type="text" name="jvcommission" value="<? echo $oto['jvcommission']; ?>"></td></tr>
<tr><td>Super JV commission:</td><td>$<input type="text" name="superjvcommission" value="<? echo $oto['superjvcommission']; ?>"></td></tr>  

<tr><td>Upgrade:</td><td><input type="radio" name="upgrade_pro" value="1"<? if($oto['upgrade_pro'] == "1") echo " CHECKED"; ?>> JV Member <input type="radio" name="upgrade_pro" value="2"<? if($oto['upgrade_pro'] == "2") echo " CHECKED"; ?>> SUPER JV <input type="radio" name="upgrade_pro" value="0"<? if($oto['upgrade_pro'] == 0) echo " CHECKED"; ?>> no</td></tr> 

<tr><td colspan=2 align=center><br><br><b>Upgrade 1</b></td></tr>
<tr><td>Text:</td><td><input type="text" name="upgrade1_text" value="<? echo dbget($oto['upgrade1_text']); ?>"></td></tr>
<tr><td>Price:</td><td>$<input type="text" name="upgrade1_price" value="<? echo $oto['upgrade1_price']; ?>"></td></tr>
<tr><td>Points to add:</td><td><input type="text" name="upgrade1_points" value="<? echo $oto['upgrade1_points']; ?>"> points</td></tr>


<tr><td colspan=2 align=center><br><br><b>Upgrade 2</b></td></tr>
<tr><td>Text:</td><td><input type="text" name="upgrade2_text" value="<? echo dbget($oto['upgrade2_text']); ?>"></td></tr>
<tr><td>Price:</td><td>$<input type="text" name="upgrade2_price" value="<? echo $oto['upgrade2_price']; ?>"></td></tr>
<tr><td>Solos to add:</td><td><input type="text" name="upgrade2_solos" value="<? echo $oto['upgrade2_solos']; ?>"> solos</td></tr>		


<tr><td colspan=2 align=center><br><br><b>Upgrade 3</b></td></tr>
<tr><td>Text:</td><td><input type="text" name="upgrade3_text" value="<? echo dbget($oto['upgrade3_text']); ?>"></td></tr>
<tr><td>Price:</td><td>$<input type="text" name="upgrade3_price" value="<? echo $oto['upgrade3_price']; ?>"></td></tr>
<tr><td>Banners to add:</td><td><input type="text" name="upgrade3_banners" value="<? echo $oto['upgrade3_banners']; ?>"> banners</td></tr>		 
<tr><td>Views per banner:</td><td><input type="text" name="upgrade3_views" value="<? echo $oto['upgrade3_views']; ?>"> views</td></tr>		 


<tr><td colspan=2 align=center><br><br><b>Upgrade 4</b></td></tr>
<tr><td>Text:</td><td><input type="text" name="upgrade4_text" value="<? echo dbget($oto['upgrade4_text']); ?>"></td></tr>
<tr><td>Price:</td><td>$<input type="text" name="upgrade4_price" value="<? echo $oto['upgrade4_price']; ?>"></td></tr>
<tr><td>Traffic links to add:</td><td><input type="text" name="upgrade4_traffic" value="<? echo $oto['upgrade4_traffic']; ?>"> traffic links</td></tr>		 
<tr><td>Views per traffic link:</td><td><input type="text" name="upgrade4_views" value="<? echo $oto['upgrade4_views']; ?>"> views</td></tr>	

<tr><td colspan=2 align=center><br><br><b>Upgrade 5</b></td></tr>
<tr><td>Text:</td><td><input type="text" name="upgrade5_text" value="<? echo dbget($oto['upgrade5_text']); ?>"></td></tr>
<tr><td>Price:</td><td>$<input type="text" name="upgrade5_price" value="<? echo $oto['upgrade5_price']; ?>"></td></tr>
<tr><td>Login ads to add:</td><td><input type="text" name="upgrade5_login" value="<? echo $oto['upgrade5_login']; ?>"> login ads</td></tr>		 
<tr><td>Views per login ad:</td><td><input type="text" name="upgrade5_views" value="<? echo $oto['upgrade5_views']; ?>"> views</td></tr>

<tr><td colspan=2 align=center><br><br><b>Upgrade 6</b></td></tr>
<tr><td>Text:</td><td><input type="text" name="upgrade6_text" value="<? echo dbget($oto['upgrade6_text']); ?>"></td></tr>
<tr><td>Price:</td><td>$<input type="text" name="upgrade6_price" value="<? echo $oto['upgrade6_price']; ?>"></td></tr>
<tr><td>Hotlinks to add:</td><td><input type="text" name="upgrade6_hotlink" value="<? echo $oto['upgrade6_hotlink']; ?>"> hotlinks</td></tr>		 
<tr><td>Views per hotlink:</td><td><input type="text" name="upgrade6_views" value="<? echo $oto['upgrade6_views']; ?>"> views</td></tr>

<tr><td colspan=2 align=center><br><br><b>Upgrade 7</b></td></tr>
<tr><td>Text:</td><td><input type="text" name="upgrade7_text" value="<? echo dbget($oto['upgrade7_text']); ?>"></td></tr>
<tr><td>Price:</td><td>$<input type="text" name="upgrade7_price" value="<? echo $oto['upgrade7_price']; ?>"></td></tr>
<tr><td>Button ads to add:</td><td><input type="text" name="upgrade7_button" value="<? echo $oto['upgrade7_button']; ?>"> button ads</td></tr>		 
<tr><td>Views per button ad:</td><td><input type="text" name="upgrade7_views" value="<? echo $oto['upgrade7_views']; ?>"> views</td></tr>			   

<tr><td colspan=2 align=center><br><br><b>Upgrade 8</b></td></tr>
<tr><td>Text:</td><td><input type="text" name="upgrade8_text" value="<? echo dbget($oto['upgrade8_text']); ?>"></td></tr>
<tr><td>Price:</td><td>$<input type="text" name="upgrade8_price" value="<? echo $oto['upgrade8_price']; ?>"></td></tr>
<tr><td>Headline ads to add:</td><td><input type="text" name="upgrade8_headline" value="<? echo $oto['upgrade8_headline']; ?>"> headline ads</td></tr>		 
<tr><td>Views per headline ad:</td><td><input type="text" name="upgrade8_views" value="<? echo $oto['upgrade8_views']; ?>"> views</td></tr>

<tr><td colspan=2 align=center><br><br><b>Upgrade 9</b></td></tr>
<tr><td>Text:</td><td><input type="text" name="upgrade9_text" value="<? echo dbget($oto['upgrade9_text']); ?>"></td></tr>
<tr><td>Price:</td><td>$<input type="text" name="upgrade9_price" value="<? echo $oto['upgrade9_price']; ?>"></td></tr>
<tr><td>PTC ads to add:</td><td><input type="text" name="upgrade9_ptc" value="<? echo $oto['upgrade9_ptc']; ?>"> ptc ads</td></tr>		 
<tr><td>Views per PTC ad:</td><td><input type="text" name="upgrade9_views" value="<? echo $oto['upgrade9_views']; ?>"> views</td></tr>

<tr><td colspan=2 align=center><br><br><b>Upgrade 10</b></td></tr>
<tr><td>Text:</td><td><input type="text" name="upgrade10_text" value="<? echo dbget($oto['upgrade10_text']); ?>"></td></tr>
<tr><td>Price:</td><td>$<input type="text" name="upgrade10_price" value="<? echo $oto['upgrade10_price']; ?>"></td></tr>
<tr><td>Cash Solos to add:</td><td><input type="text" name="upgrade10_cashsolos" value="<? echo $oto['upgrade10_cashsolos']; ?>"> cash solos</td></tr>

<tr><td colspan="2" align="center"><input type="submit" value="Update All Settings"></td></tr>

</table>

</form>







<?

echo "</td></tr></table>";

}

else

echo "Unauthorised Access!";



include "../footer.php";



?>