-
Notifications
You must be signed in to change notification settings - Fork 0
/
update.php
40 lines (24 loc) · 849 Bytes
/
update.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
<?php
include ("include/config.php");
if(!isset($_SESSION[uid])) {
header("location: account.php");
exit();
}
$msg = "";
if($_SERVER['REQUEST_METHOD']=='POST'){
if(update_user($_POST))
$msg = "Account update successful!";
else $msg = "There was a server error right this moment. Please try again later...";
}
$ui = mysql_fetch_assoc(mysql_query("select * from users where uid = '$_SESSION[uid]' "));
foreach($ui as $key => $val)
eval ("\$_POST['".$key."'] = \"".stripslashes($val)."\";");
$country = get_list('country','country');
$smarty->assign('country',$country['country']);
$smarty->assign('msg',$msg);
$smarty->assign('payment_methods',get_payment_methods());
$smarty->assign('right_panel','off');
$content = $smarty->fetch('update.tpl');
$smarty->assign('content',$content);
$smarty->display('master_page.tpl');
?>