Files
ppeasy7_4/resources/views/user/partials/details.blade.php
T
2026-09-09 14:32:53 +00:00

99 lines
4.2 KiB
PHP

<?php require_once('../Connections/cmctrfdb.php'); ?>
<?php require_once('../webassist/mysqli/rsobj.php'); ?>
<?php
$langselect = new WA_MySQLi_RS("langselect",$cmctrfdb,0);
$langselect->setQuery("SELECT * FROM languages");
$langselect->execute();
$lang=$langselect->getColumnVal("acronym_languages");
$user = Auth::user();
?>
<?php
$langidsel=$user->present()->langid;
$langintable = new WA_MySQLi_RS("langselect",$cmctrfdb,0);
$langintable->setQuery("SELECT * FROM languages WHERE idlanguages='$langidsel'");
$langintable->execute();
?>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="first_name">@lang('Role')</label>
{!! Form::select('role_id', $roles, $edit ? $user->role->id : '',
['class' => 'form-control input-solid', 'id' => 'role_id', $profile ? 'disabled' : '']) !!}
</div>
<div class="form-group">
<label for="status">@lang('Status')</label>
{!! Form::select('status', $statuses, $edit ? $user->status : '',
['class' => 'form-control input-solid', 'id' => 'status', $profile ? 'disabled' : '']) !!}
</div>
<div class="form-group">
<label for="first_name">@lang('First Name')</label>
<input type="text" class="form-control input-solid" id="first_name"
name="first_name" placeholder="@lang('First Name')" value="{{ $edit ? $user->first_name : '' }}">
</div>
<div class="form-group">
<label for="last_name">@lang('Last Name')</label>
<input type="text" class="form-control input-solid" id="last_name"
name="last_name" placeholder="@lang('Last Name')" value="{{ $edit ? $user->last_name : '' }}">
</div>
<div class="form-group">
<label for="langid">@lang('Language')</label>
<select class="form-control input-solid" id="langid"
name="langid" placeholder="@lang('Language')">
<?php
while(!$langselect->atEnd()) { //dyn select
?>
<option value="<?php echo($langselect->getColumnVal("idlanguages")); ?>"<?php if (!(strcmp($langselect->getColumnVal("idlanguages"), ($langintable->getColumnVal("idlanguages"))))) {echo "selected=\"selected\"";} ?>><?php echo($langselect->getColumnVal("name_languages")); ?></option>
<?php
$langselect->moveNext();
} //dyn select
$langselect->moveFirst();
?>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="birthday">@lang('Date of Birth')</label>
<div class="form-group">
<input type="text"
name="birthday"
id='birthday'
value="{{ $edit && $user->birthday ? $user->present()->birthday : '' }}"
class="form-control input-solid" />
</div>
</div>
<div class="form-group">
<label for="phone">@lang('Phone')</label>
<input type="text" class="form-control input-solid" id="phone"
name="phone" placeholder="@lang('Phone')" value="{{ $edit ? $user->phone : '' }}">
</div>
<div class="form-group">
<label for="address">@lang('Address')</label>
<input type="text" class="form-control input-solid" id="address"
name="address" placeholder="@lang('Address')" value="{{ $edit ? $user->address : '' }}">
</div>
<div class="form-group">
<label for="address">@lang('Country')</label>
{!! Form::select('country_id', $countries, $edit ? $user->country_id : '', ['class' => 'form-control input-solid']) !!}
</div>
</div>
@if ($edit)
<div class="col-md-12 mt-2">
<button type="submit" class="btn btn-primary" id="update-details-btn">
<i class="fa fa-refresh"></i>
@lang('Update Details')
</button>
</div>
@endif
</div>