-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathppc-change-details-action.php
84 lines (79 loc) · 2.05 KB
/
ppc-change-details-action.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
include("extended-config.inc.php");
include($GLOBALS['admin_folder']."/config.inc.php");
includeClass("User");
includeClass("Form");
includeClass("Template");
$ini_error_status=ini_get('error_reporting');
$user=new User("ppc_users");
$advid=$user->getUserID();
$commonid=$mysql->echo_one("select common_account_id from ppc_users where uid=$advid");
if(($commonid!=0))
{
if($_COOKIE['io_type']==md5("Common"))
{
header("Location: change-details.php");
exit(0);
}
}
if(!$user->validateUser())
{
header("Location:show-message.php?id=1006");
exit(0);
}
$email=$_POST['email'];
$country=trim($_POST['country']);
$domain=trim($_POST['domain']);
$firstname=trim($_POST['firstname']);
$lastname=trim($_POST['lastname']);
$phone_no=trim($_POST['phone_no']);
$address=trim($_POST['address']);
$taxid=trim($_POST['taxidentification']);
phpSafe($email);
phpSafe($country);
phpSafe($domain);
phpSafe($firstname);
phpSafe($lastname);
phpSafe($phone_no);
phpSafe($address);
phpSafe($taxid);
if($email=="" || $country=="" || $domain=="" || $firstname=="" || $lastname=="" || $address=="" || $phone_no=="")
{
header("Location:show-message.php?id=1001");
exit(0);
}
$uid=$user->getUserID();
if($user->emailExists($email,$uid))
{
header("Location:show-message.php?id=5019");
exit(0);
}
if(!($user->isValidEmail($email)))
{
header("Location:show-message.php?id=6009");
exit(0);
}
//if(is_numeric($phone_no) !=1 ||$phone_no<=0 || !((string)$phone_no === (string)(int)$phone_no) )
if(!isPositiveInteger($phone_no))
{
header("Location:show-message.php?id=1032");
exit(0);
}
if(!checkSpace($domain))
{
header("Location:show-message.php?id=1031");
exit(0);
}
if(!isDomain($domain))
{
header("Location:show-message.php?id=1030");
exit(0);
}
mysql_query("update ppc_users set email='$email',country='$country',domain='$domain',firstname='$firstname',lastname='$lastname',address='$address',phone_no='$phone_no',taxidentification='$taxid' where uid='$uid'");
if($ini_error_status!=0)
{
echo mysql_error();
}
header("Location:show-success.php?id=1007");
exit(0);
?>