-
Notifications
You must be signed in to change notification settings - Fork 6
/
change-zipcode.php
executable file
·36 lines (29 loc) · 1.41 KB
/
change-zipcode.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
<?php @session_start(); if ( isset( $_SESSION['IDCUSTOMER'] ) and !empty( $_SESSION['IDCUSTOMER'] )) { ?>
<?php
include "includes/config/config.php";
require "includes/Sql/sql.class.php";
include "includes/lang/pt-br.php";
$row = GenericSql::getCustomerById( $_SESSION['IDCUSTOMER'] );
?>
<form action="#" method="post">
<table border="0" cellspacing="0" cellpadding="3" width="100%">
<tr>
<td align="right"><small>ZIPCODE here: </small></td>
<td> </td>
<td><input type="text" style="width:75px;" name="postal" id="postal" maxlength="9" value="<?php echo $row['zipcode']; ?>" title="<?php echo INFO_CEP; ?>" alt="<?php echo INFO_CEP; ?>" readonly /></td>
<td><input type="submit" value="Change" name="BtnChangePostal" /></td>
</tr>
</table>
<script>setTimeout("document.getElementById('postal').focus();", 500);</script>
<?php } else { ?>
<form action="#" method="post">
<table border="0" cellspacing="0" cellpadding="3" width="100%">
<tr>
<td align="right"><small>ZIPCODE: </small></td>
<td width="7"> </td>
<td><input type="text" style="width:75px;" name="postal" id="postal" maxlength="9" value="" /></td>
<td><input type="submit" value="Change" name="BtnChangePostal" /></td>
</tr>
</table>
<script>setTimeout("document.getElementById('postal').focus();", 500);</script>
<?php } if ($_POST) { $_SESSION['zipcode'] = $_POST['postal']; } ?>