174 lines
9.2 KiB
PHP
174 lines
9.2 KiB
PHP
|
<div class="container">
|
||
|
<?php
|
||
|
if(!isset($_SESSION['user'])){
|
||
|
?>
|
||
|
<div class="row">
|
||
|
<div class="col-md-12">
|
||
|
<div class="panel panel-danger">
|
||
|
<div class="panel-body text-center">
|
||
|
<h4>
|
||
|
<?php
|
||
|
echo $oTrans->getTranslationWithData(
|
||
|
'message_noRightToAccessToThisPage',
|
||
|
$_SESSION['config']['default_lang_code'],
|
||
|
array(
|
||
|
'<a href="'.$oTrans->getTranslation('webpage_register_url', $_SESSION['config']['default_lang_code']).'">'.
|
||
|
$oTrans->getTranslation('webpage_register_name', $_SESSION['config']['default_lang_code']).'
|
||
|
</a>'
|
||
|
)
|
||
|
);
|
||
|
?>
|
||
|
<h4>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<?php
|
||
|
} else {
|
||
|
?>
|
||
|
|
||
|
<div class="row">
|
||
|
<div class="col-md-3">
|
||
|
<div class="panel panel-default">
|
||
|
<div class="panel-heading">
|
||
|
<span class="box-title"><?php echo $oTrans->getTranslation('myProfile_title_changePassword', $_SESSION['user']['lang_code']); ?></div></span>
|
||
|
<div class="panel-body">
|
||
|
<form class="form-horizontal" method="post" action="#">
|
||
|
<input class="form-control" type="password" id="oldPassword" name="oldPassword"
|
||
|
placeholder="<?php echo $oTrans->getTranslation('myProfile_placeholderOldPassword', $_SESSION['user']['lang_code']); ?>"/><br/>
|
||
|
<input class="form-control" type="password" id="newPassword" name="newPassword"
|
||
|
placeholder="<?php echo $oTrans->getTranslation('myProfile_placeholderNewPassword', $_SESSION['user']['lang_code']); ?>"/><br/>
|
||
|
<input class="form-control" type="password" id="confirmPassword" name="confirmPassword"
|
||
|
placeholder="<?php echo $oTrans->getTranslation('myProfile_placeholderConfirmPassword', $_SESSION['user']['lang_code']); ?>"/><br/>
|
||
|
<input class="form-control btn button_action" type="submit" id="submit_change_password" name="submit_change_password"
|
||
|
value="<?php echo $oTrans->getTranslation('myProfile_submitChangePassword', $_SESSION['user']['lang_code']); ?>"/>
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="col-md-6">
|
||
|
<div class="panel panel-default">
|
||
|
<div class="panel-heading">
|
||
|
<span class="box-title">
|
||
|
<?php
|
||
|
//echo $oTrans->getTranslation('myProfile_title_personalInformation', $_SESSION['user']['lang_code']).' <b>'. $_SESSION['user']['email'].'</b>';
|
||
|
echo $_SESSION['user']['email'];
|
||
|
?>
|
||
|
</span>
|
||
|
</div>
|
||
|
<?php
|
||
|
if(isset($_SESSION['data_updated']['state']) and $_SESSION['data_updated']['state'] == 'success'){
|
||
|
echo '<p class="text-center"><span class="'.$_SESSION['data_updated']['css_class'].'">'.$oTrans->getTranslation('message_successUpdatePersonalData', $_SESSION['user']['lang_code']).'</span></p>';
|
||
|
} elseif(isset($_SESSION['data_updated']['state']) and $_SESSION['data_updated']['state'] == 'failed'){
|
||
|
echo '<p class="text-center"><span class="'.$_SESSION['data_updated']['css_class'].'">'.$_SESSION['data_updated']['css_class'].'">'.$oTrans->getTranslation('message_successUpdatePersonalData', $_SESSION['user']['lang_code']).'</span></p>';
|
||
|
}
|
||
|
unset($_SESSION['data_updated']);
|
||
|
?>
|
||
|
<div class="panel-body">
|
||
|
<form action="#" class="form-horizontal form-personnal-data" id="personal_data_form" name="form-personnal-data" method="post">
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-4" for="firstname"><?php echo $oTrans->getTranslation('myProfile_firstName', $_SESSION['user']['lang_code']); ?></label>
|
||
|
<div class="col-sm-8">
|
||
|
<input class="form-control required_field" type="text" id="firstname" name="firstname" value="<?php echo $user['firstname']; ?>"/>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-4" for="lastname"><?php echo $oTrans->getTranslation('myProfile_lastName', $_SESSION['user']['lang_code']); ?></label>
|
||
|
<div class="col-sm-8">
|
||
|
<input class="form-control required_field" type="text" id="lastname" name="lastname" value="<?php echo $user['lastname']; ?>"/>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-4" for="phone"><?php echo $oTrans->getTranslation('myProfile_phone', $_SESSION['user']['lang_code']); ?></label>
|
||
|
<div class="col-sm-8">
|
||
|
<input class="form-control required_field" type="text" id="phone" name="phone" value="<?php echo $user['phone']; ?>"/>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-4" for="lang"><?php echo $oTrans->getTranslation('myProfile_language', $_SESSION['user']['lang_code']); ?></label>
|
||
|
<div class="col-sm-8">
|
||
|
<select class="form-control required_field" id="lang" name="lang">
|
||
|
<?php
|
||
|
foreach($languages as $k=>$v){
|
||
|
//IMP select currrent lang as checked lang
|
||
|
if ($languages[$k]['id'] == $_SESSION['user']['core_lang_id']){
|
||
|
echo '<option selected="selected" value="'.$languages[$k]['id'].'">'.$languages[$k]['name'].'</option>';
|
||
|
} else {
|
||
|
echo '<option value="'.$languages[$k]['id'].'">'.$languages[$k]['name'].'</option>';
|
||
|
}
|
||
|
}
|
||
|
?>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-4" for="country"><?php echo $oTrans->getTranslation('myProfile_country', $user['lang_code']); ?></label>
|
||
|
<div class="col-sm-8">
|
||
|
<select class="form-control required_field" id="country" name="country">
|
||
|
<?php
|
||
|
foreach($countries as $k=>$v){
|
||
|
if($countries[$k]['id'] == $_SESSION['user']['core_country_id']){
|
||
|
echo '<option selected="selected" value="'.$countries[$k]['id'].'">'.$countries[$k]['name'].'</option>';
|
||
|
} else {
|
||
|
echo '<option value="'.$countries[$k]['id'].'">'.$countries[$k]['name'].'</option>';
|
||
|
}
|
||
|
}
|
||
|
?>
|
||
|
</select>
|
||
|
<input type="number" hidden="hidden" id="currency" name="currency"/>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-4" for="city"><?php echo $oTrans->getTranslation('myProfile_city', $_SESSION['user']['lang_code']); ?></label>
|
||
|
<div class="col-sm-8">
|
||
|
<input class="form-control required_field" type="text" id="city" name="city" value="<?php echo $user['city']; ?>"/>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-4" for="postcode"><?php echo $oTrans->getTranslation('myProfile_postcode', $_SESSION['user']['lang_code']); ?></label>
|
||
|
<div class="col-sm-8">
|
||
|
<input class="form-control required_field" type="text" id="postcode" name="postcode" value="<?php echo $user['postcode']; ?>"/>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-4" for="currency"><?php echo $oTrans->getTranslation('myProfile_currency', $_SESSION['user']['lang_code']); ?></label>
|
||
|
<div class="col-sm-8">
|
||
|
<input class="form-control required_field" readonly="readonly" id="span_currency" name="span_currency" />
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<!--<input class="cols4" type="text" id="currency" name="currency" value="< ?php echo $user['currency_name']; ?>"/><br/>-->
|
||
|
<input class="btn btn-success"
|
||
|
type="submit"
|
||
|
id="submit_personal_data" name="submit_personal_data"
|
||
|
value="<?php echo $oTrans->getTranslation('myProfile_submitPersonalData', $_SESSION['user']['lang_code']); ?>"/>
|
||
|
</form>
|
||
|
</div>
|
||
|
</div> <!--ENDOF <div class="panel panel-default"> -->
|
||
|
</div> <!--ENDOF <div class="col-md-4"> -->
|
||
|
|
||
|
<div class="col-md-3">
|
||
|
<div class="panel panel-default">
|
||
|
<!--//TODO translating "Options" -->
|
||
|
<div class="panel-heading">
|
||
|
<span class="box-title">Options</span>
|
||
|
</div>
|
||
|
<div class="panel-body">
|
||
|
<form class="form-horizontal" method="post" action="#">
|
||
|
<div class="form-group col-md-12">
|
||
|
<label class="" for="postcode"><?php echo $oTrans->getTranslation('myProfile_options_maxDistance', $_SESSION['user']['lang_code']); ?></label>
|
||
|
<input class="form-control" type="integer" id="max_distance" name="max_distance" value="<?php echo $user['distance']; ?>"/>
|
||
|
</div>
|
||
|
<input class="btn btn-success" type="submit" id="submit_options" name="submit_options"
|
||
|
value="<?php echo $oTrans->getTranslation('myProfile_submitOptions', $_SESSION['user']['lang_code']); ?>"/>
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div> <!--ENDOF <div class="row"> -->
|
||
|
<?php
|
||
|
} //ENDOF else
|
||
|
?>
|
||
|
</div>
|