-
Notifications
You must be signed in to change notification settings - Fork 0
/
clienteditpublic.php
129 lines (107 loc) · 2.36 KB
/
clienteditpublic.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<?php
require_once("./stpiadmin/includes/includes.php");
require_once("./stpiadmin/includes/classes/security/clslock.php");
require_once("./stpiadmin/includes/classes/client/clsclient.php");
require_once("./stpiadmin/includes/classes/user/clsuser.php");
$strPage = basename($_SERVER["SCRIPT_NAME"]);
$objTexte = new clstexte("./texte/client");
$objLock = new clslock($strPage, "login.php");
$objLock->stpi_run();
$objClient = new clsclient();
$objUser = new clsuser();
$objCountry =& $objClient->stpi_getObjCountry();
$objProvince =& $objCountry->stpi_getObjProvince();
$objUser = $objUser->stpi_getObjUserFromSession();
if ($objUser->stpi_getNbTypeUserID() != 2)
{
exit;
}
if (!$objClient->stpi_setNbID($objUser->stpi_getNbID()))
{
exit;
}
if (!$objClient->stpi_setStrCourriel($_POST["strCourriel"]))
{
exit;
}
if (!$objClient->stpi_setStrNom($_POST["strNom"]))
{
exit;
}
if (!$objClient->stpi_setStrPrenom($_POST["strPrenom"]))
{
exit;
}
if (!$objClient->stpi_setStrCie($_POST["strCie"]))
{
exit;
}
if (!$objClient->stpi_setStrTel($_POST["strTel"]))
{
exit;
}
if (!$objClient->stpi_setStrAdresse($_POST["strAdresse"]))
{
exit;
}
if (!$objClient->stpi_setStrVille($_POST["strVille"]))
{
exit;
}
if (!$objCountry->stpi_setStrID($_POST["strCountryID"]))
{
exit;
}
if (!$objClient->stpi_setStrCountryID($_POST["strCountryID"]))
{
exit;
}
if (isset($_POST["strProvinceID"]))
{
$strProvince = $_POST["strProvinceID"];
}
else
{
$strProvince = "";
}
if (!empty($strProvince))
{
if (!$objProvince->stpi_chkStrProvinceID($strProvince))
{
exit;
}
if (!$objCountry->stpi_chkProvinceInCountry($strProvince))
{
print("<span style=\"color:#FF0000;\">" . $objTexte->stpi_getArrErrTxt("countryprovince") . "</span><br/>\n");
exit;
}
if (!$objClient->stpi_setStrProvinceID($strProvince))
{
exit;
}
}
else
{
if (!$objCountry->stpi_chkProvinceInCountry($strProvince))
{
print("<span style=\"color:#FF0000;\">" . $objTexte->stpi_getArrErrTxt("countryprovince") . "</span><br/>\n");
exit;
}
if (!$objClient->stpi_setStrProvinceID(""))
{
exit;
}
}
if (!$objClient->stpi_setStrCodePostal($_POST["strCodePostal"]))
{
exit;
}
if (!$objClient->stpi_setStrLangID(LG))
{
exit;
}
if ($objClient->stpi_update())
{
print("redirect");
}
?>