<?php 
	session_start();
	ob_start();

	include("../include/db.inc.php");
	$db1=new db;
	$db1->open();mysql_query("SET NAMES 'utf8'");
	$uid=$_SESSION['uname'];
	if($_SESSION['uname']=='' || $_SESSION['pwd']=='')
		{
			header("location:login.php");
		}
	
	if(isset($_POST['submit']))
		{
						extract($_POST);
						$sql_pay="update admin set email='$email', paypal_pay_id='$paypal_pay_id', google_pay_id='$google_pay_id', 
						google_key='$google_key', auth_login='$auth_login', auth_key='$auth_key' where type='superadmin'";
						mysql_query($sql_pay);
						//session_destroy();
						header("location:index.php");
						
		} 
		$admin_pay ="select email,paypal_pay_id,google_pay_id,google_key,auth_login,auth_key from admin where type='superadmin'";
   		$admin_query= mysql_query($admin_pay);
		$pay_row=mysql_fetch_array($admin_query);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Money Auctions | Admin Controls</title>
<link href="index.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="admin_wrapper">
<div class="logo_show"><? include("minorlogout.php");?></div>
<div style="float:left; width:200px">
<div class="topg_links_show"><? include("left.php");	?></div>
<div class="top_links_show"><? include("belowleft1.php");	?></div></div>
<div style="float:left; width:800px">
<div class="maximum">
<table width="70%" border="0" cellpadding="0" cellspacing="0" class="bodytxt">
              <tr> 
                <td width="33" valign="top"><img src="img/03.gif" width="33" height="23"></td>
                <td background="img/bg01.gif"><strong>&nbsp;Admin Pay Information</strong></td>
                <td width="35"><img src="img/04.gif" width="35" height="23"></td>
              </tr>
            </table>
			<table  width="70%" border="0" cellpadding="0" cellspacing="0" class="bodytxt">
              <tr> 
                <td width="22" valign="top" background="img/tbl-left04.gif"><img src="img/tbl-left04.gif" width="22" height="13"></td>
                <td valign="top" align="center"> <br> 
		<!--Start Main Body-->
		<form action="" method="post" name="admin_pay">
		
  <table width="73%" border="0" cellspacing="1" cellpadding="1">
    <tr> 
      <td width="66%">&nbsp;</td>
      <td width="34%">&nbsp;</td>
    </tr>
	
	<tr> 
      <td class="normaltextblackbold"><div align="center">Admin Email ID :</div></td>
      <td><input type="text" name="email" value="<?=$pay_row['email']?>" size="30"></td>
    </tr>
	<tr> 
      <td class="normaltextblackbold">Paypal Info :</td>
      <td >&nbsp;</td>
    </tr>
    <tr> 
      <td ><div align="center">Paypal Email ID :</div></td>
      <td><input type="text" name="paypal_pay_id" value="<?=$pay_row['paypal_pay_id']?>" size="30"></td>
    </tr>
	<tr> 
      <td class="normaltextblackbold">Google Info :</td>
      <td >&nbsp;</td>
    </tr>
    <tr> 
      <td ><div align="center">Google Merchant ID :</div></td>
      <td><input type="text" name="google_pay_id" value="<?=$pay_row['google_pay_id']?>" size="30"></td>
    </tr>
	<tr> 
      <td ><div align="center">Google Merchant Key :</div></td>
      <td><input type="text" name="google_key" value="<?=$pay_row['google_key']?>" size="30"></td>
    </tr>
	<tr> 
      <td class="normaltextblackbold">Authorized .Net :</td>
      <td >&nbsp;</td>
    </tr>
    <tr> 
      <td ><div align="center">Authorized ID :</div></td>
      <td><input type="text" name="auth_login" value="<?=$pay_row['auth_login']?>" size="30"></td>
    </tr>
	 <tr> 
      <td ><div align="center">Authorized Key :</div></td>
      <td><input type="text" name="auth_key" value="<?=$pay_row['auth_key']?>" size="30"></td>
    </tr>
	<TR><td>&nbsp;</td></TR>
    <tr>
      <td colspan="2" align="center"><input class="inputsubmitbig" type="submit" name="submit" value="Submit"></td>
    </tr>
  </table>
</form>

  </td>
                <td width="19" valign="top" background="img/tbl-right04.gif"><img src="img/tbl-right04.gif" width="19" height="9"></td>
              </tr>
            </table>
            <table width="70%" border="0" cellpadding="0" cellspacing="0" class="bodytxt" >
              <tr> 
                <td width="33"><img src="img/tbl-bot01.gif" width="33" height="12"></td>
                <td  width="460" align="right" background="img/tbl-bg.gif"></td>
				<td width="33"><img src="img/tbl-right05.gif" width="35" height="12"></td>
              </tr>
            </table>
         
</div></div>
<div class="bottom_links_show"><? include("footer.php");	?></div>
</div>
</body>
</html>
