<?php
require 'config.php';
session_start();
error_reporting(0);
if ($_SESSION['script_user'] != "CART Administrator"){
header("Location: admin_login.php");
exit;
}
$dbts_site = 'https://'.$_SERVER['HTTP_HOST'];
@$dbts_password1 = @$dbts_password;
if($_SERVER['REQUEST_METHOD'] == 'POST'){
@$dbts_username = $_POST['dbts_username'];
@$dbts_password = $_POST['dbts_password'];
@$dbts_password1 = $_POST['dbts_password1'];
@$dbts_owner = $_POST['dbts_owner'];
@$dbts_site = $_POST['dbts_site'];
@$dbts_title = $_POST['dbts_title'];
@$dbts_contactemail = $_POST['dbts_contactemail'];
@$dbts_contacturl = $_POST['dbts_contacturl'];
@$dbts_country = $_POST['dbts_country'];
@$dbts_timezone = $_POST['dbts_timezone'];
if($_POST['todo'] != "return" and $_POST['form_to'] == "set_pass.php")
{
//-- Field Validation ------
echo "DBTS Username string length =".strlen($dbts_username)."<br>";
if (strlen($dbts_username) < "6" )
{
$error .= "The field Username is shorter than 6 chrs!\n";
}
if (strlen($dbts_username) > 16)
{
$error .= "The field Username is longer than 16 chrs!\n";
}
if (strlen($dbts_password) < 6)
{
$error .= "The field Password is shorter than 6 chrs!\n";
}
if (strlen($dbts_password) > 16)
{
$error .= "The field Password is longer than 16 chrs!\n";
}
if ($dbts_password != $dbts_password1)
{
$error .= "The two password fields are not the same: Please enter again your password!\n";
}
if ($dbts_contactemail == "")
{
$error .= "The field Email is missing!\n";
}
if ($dbts_contactemail != "")
{
if (! ereg('[A-Za-z0-9_-]+\@[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+', $dbts_contactemail)) {
$error .= "Your Email seems incorrect!\n";
}
}
if ($dbts_site == "")
{
$error .= "The site URL is missing. Please fill in the correct site URL or the script will NOT work!\n";
}
if ($dbts_title == "")
{
$error .= "The site Title is missing. Please fill in the correct site Title or the script will NOT work properly!\n";
}
if ($error != "") {
{
include 'dbts_errorpage.php';
exit;
}
}
include 'save_config.php';
$message = "Details correctly updated.";
include 'message_page.php';
exit;
}
}
?>
<!doctype html>
<html lang="en-us">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="UTF-8">
<title>DB Technosystems Webshop 3.0 Admin Settings</title>
<meta name="keywords" content=" ">
<meta http-equiv="imagetoolbar" content="no">
<meta name="generator" content="DBTechnosystems.com Web Shop
http://www.dbtechnosystems.com">
<style type="text/css">
div#container
{
width: 900px;
position: relative;
margin-top: 0px;
margin-left: auto;
margin-right: auto;
text-align: left;
}
body
{
font-size: 8px;
line-height: 1.1875;
text-align: center;
margin: 0;
background-color: #666666;
color: #000000;
}
</style>
<link rel="stylesheet" href="./webshop3_2_admin.css" type="text/css">
<style type="text/css">
#Table2
{
border: 0px #C0C0C0 solid;
background-color: #C0C0C0;
border-spacing: 0px;
}
#Table2 td
{
padding: 0px 0px 0px 0px;
}
#Table2 td div
{
white-space: nowrap;
}
#Image1
{
border: 0px #000000 solid;
}
#wb_Text1
{
background-color: transparent;
border: 0px #000000 none;
padding: 0;
}
#wb_Text1 div
{
text-align: left;
}
#wb_Text2
{
background-color: transparent;
border: 0px #000000 none;
padding: 0;
}
#wb_Text2 div
{
text-align: left;
}
#wb_Text4
{
background-color: transparent;
border: 0px #000000 none;
padding: 0;
}
#wb_Text4 div
{
text-align: left;
}
#wb_Text3
{
background-color: transparent;
border: 0px #000000 none;
padding: 0;
}
#wb_Text3 div
{
text-align: left;
}
#wb_Text6
{
background-color: transparent;
border: 0px #000000 none;
padding: 0;
}
#wb_Text6 div
{
text-align: left;
}
#wb_Text7
{
background-color: transparent;
border: 0px #000000 none;
padding: 0;
}
#wb_Text7 div
{
text-align: left;
}
#wb_Text9
{
background-color: transparent;
border: 0px #000000 none;
padding: 0;
}
#wb_Text9 div
{
text-align: left;
}
#wb_Text11
{
background-color: transparent;
border: 0px #000000 none;
padding: 0;
}
#wb_Text11 div
{
text-align: left;
}
#wb_Text12
{
background-color: transparent;
border: 0px #000000 none;
padding: 0;
}
#wb_Text12 div
{
text-align: left;
}
#Button1
{
color: #000000;
font-family: Verdana;
font-size: 13px;
}
#wb_Text5
{
background-color: transparent;
border: 0px #000000 none;
padding: 0;
}
#wb_Text5 div
{
text-align: left;
}
#wb_Form2
{
background-color: #FFFFFF;
border: 1px #666666 solid;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
border-radius: 6px;
}
#wb_Text1
{
background-color: transparent;
border: 0px #000000 none;
padding: 0;
}
#wb_Text1 div
{
text-align: left;
}
#Table1
{
border: 0px #FFFFFF solid;
background-color: #666666;
border-spacing: 0px;
}
#Table1 td
{
padding: 0px 0px 0px 0px;
}
#wb_TextMenu2
{
color :#000000;
font-family: Verdana;
font-size: 13px;
}
#wb_TextMenu2 span
{
display: block;
margin: 0px 0px 3px 0px;
}
#wb_Text10
{
background-color: transparent;
border: 0px #000000 none;
padding: 0;
}
#wb_Text10 div
{
text-align: left;
}
#wb_Text13
{
background-color: transparent;
border: 0px #000000 none;
padding: 0;
}
#wb_Text13 div
{
text-align: justify;
}
</style>
<script type="text/javascript">
<!--
function ValidateAdmin_settings(theForm)
{
var regexp;
if (theForm.Editbox2.value == "")
{
alert("Please enter a value for the \"dbts_username\" field.");
theForm.Editbox2.focus();
return false;
}
if (theForm.Editbox2.value.length < 6)
{
alert("Please enter at least 6 characters in the \"dbts_username\" field.");
theForm.Editbox2.focus();
return false;
}
if (theForm.Editbox2.value.length > 16)
{
alert("Please enter at most 16 characters in the \"dbts_username\" field.");
theForm.Editbox2.focus();
return false;
}
if (theForm.Editbox1.value == "")
{
alert("Please enter a value for the \"dbts_password\" field.");
theForm.Editbox1.focus();
return false;
}
if (theForm.Editbox1.value.length < 6)
{
alert("Please enter at least 6 characters in the \"dbts_password\" field.");
theForm.Editbox1.focus();
return false;
}
if (theForm.Editbox1.value.length > 16)
{
alert("Please enter at most 16 characters in the \"dbts_password\" field.");
theForm.Editbox1.focus();
return false;
}
if (theForm.Editbox4.value == "")
{
alert("Please enter a value for the \"dbts_password1\" field.");
theForm.Editbox4.focus();
return false;
}
if (theForm.Editbox4.value.length < 6)
{
alert("Please enter at least 6 characters in the \"dbts_password1\" field.");
theForm.Editbox4.focus();
return false;
}
if (theForm.Editbox4.value.length > 16)
{
alert("Please enter at most 16 characters in the \"dbts_password1\" field.");
theForm.Editbox4.focus();
return false;
}
if (theForm.Editbox4.value != theForm.Editbox1.value)
{
alert("Password and Confirm Password fields must be identical");
theForm.Editbox4.focus();
return false;
}
regexp = /(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
if (!regexp.test(theForm.Editbox6.value))
{
alert("The specified value is invalid.");
theForm.Editbox6.focus();
return false;
}
regexp = /^([0-9a-z]([-.\w]*[0-9a-z])*@(([0-9a-z])+([-\w]*[0-9a-z])*\.)+[a-z]{2,6})$/i;
if (theForm.Editbox7.value.length != 0 && !regexp.test(theForm.Editbox7.value))
{
alert("Please enter a valid email address.");
theForm.Editbox7.focus();
return false;
}
return true;
}
//-->
</script>
</head>
<body>
<div id="container">
<table style="position:absolute;left:0px;top:285px;width:900px;height:596px;z-index:26;" id="Table2">
<tr>
<td style="background-color:#222224;text-align:center;vertical-align:middle;width:160px;height:36px;">
<div><span style="color:#FFFFFF;font-family:Verdana;font-size:19px;">Menu</span></div>
</td>
<td style="background-color:#222224;text-align:center;vertical-align:middle;height:36px;">
<div><span style="color:#FFFFFF;font-family:Verdana;font-size:19px;">Administrator and General details</span></div>
</td>
</tr>
<tr>
<td style="background-color:#282828;text-align:left;vertical-align:top;width:160px;height:560px;">
<div><span style="color:#000000;font-family:Arial;font-size:13px;"> </span></div>
</td>
<td style="background-color:#999999;text-align:left;vertical-align:top;height:560px;">
<div><span style="color:#000000;font-family:Arial;font-size:13px;"> </span></div>
</td>
</tr>
</table>
<div id="wb_MasterPage1" style="position:absolute;left:0px;top:0px;width:900px;height:286px;z-index:27;padding:0;">
<div id="wb_Image1" style="position:absolute;left:0px;top:0px;width:900px;height:286px;z-index:0;padding:0;">
<img src="images/webshop_plus_cart_log.jpg" id="Image1" alt="" style="width:900px;height:286px;"></div>
</div>
<div id="wb_Form2" style="position:absolute;left:184px;top:339px;width:691px;height:521px;z-index:28;">
<form name="Admin_settings" method="post" action="set_pass.php" enctype="multipart/form-data" accept-charset="<?php echo $form_accept_chr_set;?>" id="Form2" onsubmit="return ValidateAdmin_settings(this)" dir="<?php echo $text_direction;?>">
<input type="hidden" name="form_to" value="set_pass.php">
<div id="wb_Text1" style="position:absolute;left:89px;top:65px;width:163px;height:16px;z-index:1;">
<span style="color:#282828;font-family:Verdana;font-size:13px;">Cart Admin Username :</span></div>
<div id="wb_Text2" style="position:absolute;left:89px;top:93px;width:166px;height:16px;z-index:2;">
<span style="color:#282828;font-family:Verdana;font-size:13px;">Cart Admin Password:</span></div>
<div id="wb_Text4" style="position:absolute;left:89px;top:121px;width:140px;height:16px;z-index:3;">
<span style="color:#282828;font-family:Verdana;font-size:13px;">Confirm Password:</span></div>
<div id="wb_Text3" style="position:absolute;left:89px;top:178px;width:140px;height:16px;z-index:4;">
<span style="color:#282828;font-family:Verdana;font-size:13px;">Your Site Title:</span></div>
<div id="wb_Text6" style="position:absolute;left:89px;top:236px;width:140px;height:16px;z-index:5;">
<span style="color:#282828;font-family:Verdana;font-size:13px;">Your Email Address:</span></div>
<div id="wb_Text7" style="position:absolute;left:89px;top:149px;width:140px;height:16px;z-index:6;">
<span style="color:#282828;font-family:Verdana;font-size:13px;">Your Full Name:</span></div>
<div id="wb_Text9" style="position:absolute;left:550px;top:68px;width:104px;height:16px;z-index:7;">
<span style="color:#282828;font-family:Verdana;font-size:13px;">6-16 chrs</span></div>
<div id="wb_Text11" style="position:absolute;left:550px;top:96px;width:104px;height:16px;z-index:8;">
<span style="color:#282828;font-family:Verdana;font-size:13px;">6-16 chrs</span></div>
<div id="wb_Text12" style="position:absolute;left:89px;top:207px;width:140px;height:16px;z-index:9;">
<span style="color:#282828;font-family:Verdana;font-size:13px;">Your Site URL:</span></div>
<input type="text" id="Editbox2" class="form_fields" style="position:absolute;left:298px;top:64px;width:242px;height:20px;line-height:20px;z-index:10;" name="dbts_username" value="<?php echo $dbts_username;?>" maxlength="16" placeholder="Please type your Username">
<input type="password" id="Editbox1" class="form_fields" style="position:absolute;left:298px;top:92px;width:242px;height:20px;line-height:20px;z-index:11;" name="dbts_password" value="<?php echo $dbts_password;?>">
<input type="password" id="Editbox4" class="form_fields" style="position:absolute;left:298px;top:120px;width:242px;height:20px;line-height:20px;z-index:12;" name="dbts_password1" value="<?php echo $dbts_password1;?>">
<input type="text" id="Editbox3" class="form_fields" style="position:absolute;left:297px;top:148px;width:242px;height:20px;line-height:20px;z-index:13;" name="dbts_owner" value="<?php echo $dbts_owner;?>" placeholder="Please type your full name">
<input type="text" id="Editbox5" class="form_fields" style="position:absolute;left:298px;top:177px;width:242px;height:20px;line-height:20px;z-index:14;" name="dbts_title" value="<?php echo $dbts_title;?>" placeholder="Please type your site title">
<input type="text" id="Editbox6" class="form_fields" style="position:absolute;left:298px;top:206px;width:242px;height:20px;line-height:20px;z-index:15;" name="dbts_site" value="<?php echo "https://".$_SERVER['HTTP_HOST'];?>" readonly="readonly" placeholder="Please type your site FULL url" readonly>
<input type="text" id="Editbox7" class="form_fields" style="position:absolute;left:298px;top:235px;width:242px;height:20px;line-height:20px;z-index:16;" name="dbts_contactemail" value="<?php echo $dbts_contactemail;?>" placeholder="Please type your email address">
<input type="submit" id="Button1" name="submit" value="Save Changes!" style="position:absolute;left:298px;top:469px;width:140px;height:25px;z-index:17;">
<select name="dbts_country" size="5" id="Combobox1" class="form_fields" style="position:absolute;left:298px;top:263px;width:244px;height:85px;z-index:18;" ><?
include 'countries.php';
echo '<option value="">Please select</option>';
for ($i = 0; $i < count($countries); $i++){
echo '<option ';
if ($dbts_country == $countries[$i]) {
echo 'selected ';
}
echo 'value="'.$countries[$i].'">'.$countries[$i].'</option>';
}
?>
</select>
<div id="wb_Text5" style="position:absolute;left:89px;top:266px;width:140px;height:16px;z-index:19;">
<span style="color:#282828;font-family:Verdana;font-size:13px;">Your Country:</span></div>
<div id="wb_Text10" style="position:absolute;left:89px;top:349px;width:140px;height:16px;z-index:20;">
<span style="color:#282828;font-family:Verdana;font-size:13px;">Your Timezone:</span></div>
<select name="dbts_timezone" size="5" id="Combobox2" class="form_fields" style="position:absolute;left:298px;top:352px;width:244px;height:85px;z-index:21;" ><?php
if (trim($dbts_timezone) != ""){
echo "<option selected value=\"".$dbts_timezone."\">".$dbts_timezone."</option>
";
}
?>
<option value=" ">Please select Time zone</option>
<option value="Africa/Abidjan">Africa/Abidjan</option>
<option value="Africa/Accra">Africa/Accra</option>
<option value="Africa/Addis_Ababa">Africa/Addis_Ababa</option>
removed options here for posting reasons
<option value="US/Alaska">US/Alaska</option>
<option value="US/Aleutian">US/Aleutian</option>
<option value="US/Arizona">US/Arizona</option>
<option value="US/Central">US/Central</option>
<option value="US/East-Indiana">US/East-Indiana</option>
<option value="US/Eastern">US/Eastern</option>
<option value="US/Hawaii">US/Hawaii</option>
<option value="US/Indiana-Starke">US/Indiana-Starke</option>
<option value="US/Michigan">US/Michigan</option>
<option value="US/Mountain">US/Mountain</option>
<option value="US/Pacific">US/Pacific</option>
<option value="US/Pacific-New">US/Pacific-New</option>
<option value="US/Samoa">US/Samoa</option>
<option value="UTC">UTC</option>
<option value="W-SU">W-SU</option>
<option value="WET">WET</option>
<option value="Zulu">Zulu</option>
</select>
<div id="wb_Text13" style="position:absolute;left:59px;top:12px;width:576px;height:32px;text-align:justify;z-index:22;">
<span style="color:#282828;font-family:Verdana;font-size:13px;">Here you can change your Administration login details, as well as some of the basic details of the site/script.</span></div>
</form>
</div>
<div id="wb_MasterPage5" style="position:absolute;left:0px;top:884px;width:900px;height:32px;z-index:29;padding:0;">
<div id="wb_Text1" style="position:absolute;left:5px;top:9px;width:42px;height:14px;z-index:23;">
<span style="color:#000000;font-family:Arial;font-size:11px;"><a href="#" class="footer">footer</a></span></div>
<table style="position:absolute;left:0px;top:0px;width:900px;height:32px;z-index:24;" id="Table1">
<tr>
<td style="background-color:#222224;text-align:center;vertical-align:middle;height:32px;">
<font style="FONT-SIZE: 11px" face="Arial" color="#ffffff"><a href="
http://www.dbtechnosystems.com" class="footer">WebShop Plus v.3.0 Copyright 2006-<? echo date('Y');?> DBTechnosystems.com All rights reserved.</a></font><span style="color:#000000;font-family:Arial;font-size:13px;"> </span></td>
</tr>
</table>
</div>
<div id="wb_MasterPage3" style="position:absolute;left:0px;top:334px;width:160px;height:304px;z-index:30;padding:0;">
<div id="wb_TextMenu2" style="position:absolute;left:0px;top:0px;width:160px;height:304px;text-align:center;z-index:25;padding:0;">
<span><a href="./set_pass.php" class="left_menu" title="Admin Details">Admin Details</a></span>
<span><a href="./set_script.php" class="left_menu" title="Script Details">Script Details</a></span>
<span><a href="./set_custom_fields.php" class="left_menu" title="Custom field settings">Custom field settings</a></span>
<span><a href="./set_visual.php" class="left_menu" title="Visual Details">Visual Details</a></span>
<span><a href="./set_paypal.php" class="left_menu" title="PayPal Details">PayPal Details</a></span>
<span><a href="" class="left_menu" title=" "> </a></span>
<span><a href="./set_promo.php" class="left_menu" title="Coupons">Coupons</a></span>
<span><a href="./set_taxes.php" class="left_menu" title="Taxes">Taxes</a></span>
<span><a href="./set_shipping.php" class="left_menu" title="Shipping">Shipping</a></span>
<span><a href="./set_countries.php" class="left_menu" title="Country Settings">Country Settings</a></span>
<span><a href="" class="left_menu" title=" "> </a></span>
<span><a href="./orders.php" class="left_menu" title="Orders">Orders</a></span>
<span><a href="" class="left_menu" title=" "> </a></span>
<span><a href="
http://www.dbtechnosystems.com/support.php" class="left_menu" title="Support">Support</a></span>
<span><a href="
http://www.dbtechnosystems.com/productregistration.php" class="left_menu" title="Register">Register</a></span>
<span><a href="./logout.php" class="left_menu" title="Logout">Logout</a></span>
</div>
</div>
</div>
</body>
</html>