File size: 3.01Kb
<?php
/************************************
Script : Adnetwork
Website : http://facebook.com/pranto007
Script is created and provided by Pranto (http://facebook.com/pranto007)
**************************************/
include '../db.php';
include '../functions.php';
headtag("$SiteName - Edit Site Settings");
if($adminlog==1){
echo '<div class="title">Edit Site Settings</div>';
if(isset($_POST['sitename']) AND isset($_POST['adminmail']) AND isset($_POST['noreplymail']) AND isset($_POST['dollarrate']) AND isset($_POST['whatsapp']) AND isset($_POST['mobile']) AND isset($_POST['clicksip'])){
$sitename=formpost("sitename");
$adminmail=formpost("adminmail");
$noreplymail=formpost("noreplymail");
$dollarrate=formpost("dollarrate");
$whatsapp=formpost("whatsapp");
$mobile=formpost("mobile");
$clicksip=formpost("clicksip");
if(strlen($sitename)<1){
$errors[]='SiteName field left empty!';
}
if(strlen($adminmail)<1){
$errors[]='Admin Mail field left empty!';
}
if(strlen($noreplymail)<1){
$errors[]='No Reply Mail left empty!';
}
if(strlen($dollarrate)<1){
$errors[]='Dollar Rate field left empty!';
}
if(!is_numeric($dollarrate)){
$errors[]='Dollar Rate must be a numeric value';
}
if(strlen($whatsapp)<1){
$errors[]='Whatsapp Support field left empty!';
}
if(strlen($mobile)<1){
$errors[]='Mobile Support field left empty!';
}
if(strlen($clicksip)<1){
$errors[]='Please Select Clicks IP.!';
}
if(empty($errors)){
$edac=mysql_query("UPDATE settings SET sitename='$sitename',adminmail='$adminmail',noreplymail='$noreplymail',dollarrate='$dollarrate',whatsapp='$whatsapp',mobile='$mobile',clicksip='$clicksip'");
if($edac){
echo '<div class="success">Settings Successfully Edited! <a href="settings.php">Continue</a></div>';
}
else {
echo 'unk';
}
}
else {
dump_error($errors);
}
}
$ars = mysql_query("SELECT * FROM settings");
$had = mysql_fetch_array($ars);
$SiteName=$had["sitename"];
$Adminmail=$had["adminmail"];
$noreplymail=$had["noreplymail"];
$dollarrate=$had["dollarrate"];
$earnbuzzwhatsapp=$had["whatsapp"];
$earnbuzzmobile=$had["mobile"];
echo '<div class="form"><form method="post">
Site Name:<br/><input type="text" name="sitename" value="'.$SiteName.'"/><br/>
Admin Mail:<br/><input type="text" name="adminmail" value="'.$Adminmail.'"/><br/>
No Reply Mail:<br/><input type="text" name="noreplymail" value="'.$noreplymail.'"/><br/>
Dollar Rate:<br/><input type="text" name="dollarrate" value="'.$dollarrate.'"/><br/>
Whatsapp Support:<br/><input type="text" name="whatsapp" value="'.$earnbuzzwhatsapp.'"/><br/>
Mobile Support:<br/><input type="text" name="mobile" value="'.$earnbuzzmobile.'"/><br/>
Clicks IP:<br/><select name="clicksip" style="width:170px">
<option value="0" selected="yes">REMOTE ADDR IP</option>
<option value="1">Real IP</option></select><br/>
<input type="submit" value="Edit Settings"/></form></div>';
echo '<div class="page"><a href="index.php"> Go Back To Home</a></div>';
include '../foot.php';
}
else {
header('Location:/');
}
?>