| Server IP : 10.200.247.200 / Your IP : 216.73.217.19 Web Server : Apache System : Linux synergy-usa-sites 6.8.0-138-generic #138-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 22:41:49 UTC 2026 x86_64 User : jeremy ( 1001) PHP Version : 8.4.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/usa_sites/governmentgrants.us/vx/usa/account/ |
Upload File : |
<?php
session_start();
include_once($_SERVER['DOCUMENT_ROOT'].'/vx/lib/ua.php');
include_once($_SERVER['DOCUMENT_ROOT'].'/vx/lib/func.php');
include_once($_SERVER['DOCUMENT_ROOT'].'/vx_/site_info.php');
include_once($_SERVER['DOCUMENT_ROOT'].'/vx/lib/mysql.php');
include_once($_SERVER['DOCUMENT_ROOT'].'/vx/lib/States.php');
track_member_action('Page Visit','Account Settings');
$user = $_SESSION['user'];
$client_info = (object) array();
if(!empty($user)) {
$res = $db->get_results("SELECT first,last,address1,city,state,zip,phone_1,phone_2,email,user,password
FROM lc2{$siteCode}_lc.lc_reseller WHERE id='".$db->clean($user)."'");
if(!empty($res)) {
$client_info = $res[0];
}
}
ob_start();
?>
<script type="text/javascript">
function save_account_info(me) {
$('#accountSaving').show();
var str = "";
$(me).find('input,select').each(function() {
str += (str=='') ? '' : '&';
str += encodeURIComponent(this.name) + '=' + encodeURIComponent($(this).val());
});
$.ajax({
method: "POST",
url: "/vx/usa/account/functions/saveAccount.php",
data: str
}).done(function( msg ) {
$('#accountSaving').hide();
$('#info_saved').show();
});
}
function check_password_match() {
if($('[name=confirmPassword]').val()==$('[name=password]').val()) {
$('#passwords_dont_match').hide();
} else {
$('#passwords_dont_match').show();
}
}
$('document').ready(function() {
$('.phone_number').formatter({
'pattern': '({{999}}) {{999}}-{{9999}}',
'persistent': false
});
});
</script>
<div class="rb white-bg p20">
<div class="rb">
<div class="rb <?=$phone ? 'pt20' : ''?> f24 bold left">
<div class="relative iblock glyphicons glyphicons-cogwheel f26" style="top:-4px;"></div>
<div class="relative iblock" style="top:-1px; margin-left:7px;">
Account Settings
</div>
</div>
</div>
<div class="rb p20">
<div class="rb center">
<form method="post" enctype="multipart/form-data" style="width:100%; height:100%;"
name="accountInformation"
onsubmit="save_account_info(this); return false;">
<div id="info_saved" class="f12 bold green pt10" style="display:none; padding-left:4px;">
Information Saved
</div>
<div class="relative iblock left p20" style="padding-top:10px; width:100%; max-width:700px;">
<div class="rb f18 bold dark-gray">
<div class="relative iblock glyphicons glyphicons-user f24"></div>
<div class="relative iblock" style="top:7px;">
Login Information
</div>
</div>
<br>
<div class="rb">
<div class="relative iblock">
<label>
Email Address
<br>
<input type="email" name="email" value="<?= (empty($client_info->email)) ? '' : $client_info->email;?>" required />
</label>
</div>
<br>
<div class="relative iblock">
<label>
Password
<br>
<input type="password" name="password" />
</label>
</div>
<div class="relative iblock">
<label>
Confirm Password
<br>
<input type="password" name="confirmPassword" value="" onkeyup="check_password_match(); return true;" />
</label>
<div id="passwords_dont_match" class="absolute block p10 red-bg white f14 bold center" style="width:100%; display:none;">
Passwords Do Not Match
</div>
</div>
</div>
</div>
<hr style="border-color:#BCBCBC; background-color:#BCBCBC;">
<div class="relative iblock left p20" style="padding-top:10px; width:100%; max-width:700px;">
<div class="rb f18 bold dark-gray">
<div class="relative iblock glyphicons glyphicons-nameplate f24"></div>
<div class="relative iblock" style="top:7px;">
Contact Information
</div>
</div>
<br>
<div class="rb">
<div class="relative iblock">
<label>
First Name
<br>
<input type="text" name="first" value="<?= (empty($client_info->first)) ? '' : $client_info->first;?>" required />
</label>
</div>
<div class="relative iblock">
<label>
Last Name
<br>
<input type="text" name="last" value="<?= (empty($client_info->last)) ? '' : $client_info->last;?>" required style="width:<?=$phone ? 235 : 300?>px;"/>
</label>
</div>
<br>
<div class="relative iblock">
<label>
Street Address
<br>
<input type="text" name="address1" value="<?= (empty($client_info->address1)) ? '' : $client_info->address1;?>" required
style="width:<?=$phone ? 235 : 300?>px;"/>
</label>
</div>
<div class="relative iblock">
<label>
City
<br>
<input type="text" name="city" value="<?= (empty($client_info->city)) ? '' : $client_info->city;?>" required />
</label>
</div>
<div class="relative iblock">
<label>
State
<br>
<select name="state" required>
<?php foreach($_STATES as $k=>$v) { ?>
<option value="<?= $k;?>" <?= ($client_info->state==$k) ? 'selected' : '';?>><?= $v;?></option>
<?php } ?>
</select>
</label>
</div>
<br>
<div class="relative iblock">
<label>
Phone Number
<br>
<input type="text" name="phone_1" value="<?= (empty($client_info->phone_1)) ? '' : phone_number($client_info->phone_1);?>" required class="phone_number" />
</label>
</div>
<div class="relative iblock">
<label>
Mobile Phone
<br>
<input type="text" name="phone_2" value="<?= (empty($client_info->phone_2)) ? '' : phone_number($client_info->phone_2);?>" class="phone_number" />
</label>
</div>
</div>
</div>
<div class="rb right p20">
<button type="submit" class="btn btn-primary btn-lg">
<div class="relative iblock fa fa-floppy-o"></div>
<div class="relative iblock" style="top:0px; margin-right:2px; margin-left:5px;">
Save
</div>
</button>
</div>
</form>
<div id="accountSaving" class="absolute block cc"
style="top:0px; left:0px; width:100%; height:100%; background-color:rgba(255,255,255,0.8); display:none;">
<div class="cd f18 bold red">
<i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i>
<br>
Saving...
</div>
<div class="cdl"></div>
</div>
</div>
</div>
</div>
<?php
$body = ob_get_clean();
$title = "Account Settings : ".$_SESSION['site_name'];
include($_SERVER['DOCUMENT_ROOT'].'/vx/usa/layout/non_angular_layout.php');
?>