require_once("../database.php");
require_once("adminfuncties.php");
if(isset($_POST[s1]))
{
$NewPassword1 = strip_tags($_POST[NewPass1]);
$NewPassword2 = strip_tags($_POST[NewPass2]);
$NewMerchantName = strip_tags($_POST[MerchantName]);
$NewMerchantEmail = strip_tags($_POST[MerchantEmail]);
$NewMerchantPayPal = strip_tags($_POST[MerchantPayPal]);
$NewSalesTax1 = strip_tags($_POST[SalesTax1]);
$NewTitle = strip_tags($_POST[MerchantSiteTitle]);
$NewKeywords = strip_tags($_POST[MerchantSiteKeywords]);
$NewDesc = strip_tags($_POST[MerchantSiteDesc]);
$NewHelp = strip_tags($_POST[Help]);
if($_POST[NewAdmin] != $_SESSION[mun])
{
$NewMerchantID = $_POST[NewAdmin];
$_SESSION[mun] = $NewMerchantID;
}
else
{
$NewMerchantID = $_SESSION[mun];
}
if(!empty($NewPassword1))
{
if(empty($NewPassword2) || ($NewPassword1 != $NewPassword2))
{
$up_error = "
Paswoorden controleren...";
}
elseif($NewPassword1 == $NewPassword2)
{
$NewPassword = md5($NewPassword1);
}
}
elseif(empty($NewMerchantName))
{
$up_error = "Uw naam?";
}
elseif(empty($NewMerchantEmail) || !ereg("@", $NewMerchantEmail))
{
$up_error = "Uw e-mail adres?";
}
elseif(!empty($NewSalesTax1))
{
if($_POST[SalesTax2] == "no sales tax")
{
$up_error = "BTW is niet correct...";
}
else
{
$MySalesTax = "$NewSalesTax1|$_POST[SalesTax2]";
}
}
if(!isset($up_error))
{
if(isset($NewPassword))
{
$q1 = "update oneshop_handel set
MerchantID = '$NewMerchantID',
MerchantPass = '$NewPassword',
MerchantName = '$NewMerchantName',
MerchantEmail = '$NewMerchantEmail',
MerchantPayPal = '$NewMerchantPayPal',
SellerID = '$_POST[SellerID]',
MerchantSiteTitle = '$NewTitle',
MerchantSiteKeywords = '$NewKeywords',
MerchantSiteDesc = '$NewDesc',
SalesTax = '$MySalesTax',
Help = '$NewHelp' ";
}
else
{
$q1 = "update oneshop_handel set
MerchantID = '$NewMerchantID',
MerchantName = '$NewMerchantName',
MerchantEmail = '$NewMerchantEmail',
MerchantPayPal = '$NewMerchantPayPal',
SellerID = '$_POST[SellerID]',
MerchantSiteTitle = '$NewTitle',
MerchantSiteKeywords = '$NewKeywords',
MerchantSiteDesc = '$NewDesc',
SalesTax = '$MySalesTax',
Help = '$NewHelp' ";
}
mysql_query($q1);
if(!mysql_error())
{
$up_error = "De update werd succesvol uitgevoerd.";
}
}
}
$q1 = "select * from oneshop_handel where MerchantID = '$_SESSION[mun]' ";
$r1 = mysql_query($q1) or die(mysql_error());
$a1 = mysql_fetch_array($r1);
?>