Files
WrenchBoradWeb/www/application/views/users/view_yourpage-BAK.php
T
2019-05-31 11:26:35 -04:00

170 lines
6.1 KiB
PHP

<!-- Main content -->
<div class="content-wrapper">
<?php include('common/userstrip.php'); ?>
<!-- Marketing campaigns -->
<div class="panel panel-flat">
<div class="panel-heading">
<h5 class="panel-title">Showcase Yourself </h5>
</div>
</div>
<div class="panel panel-flat">
<div class="panel-heading">
<form method="POST" action="/member/yourpage">
<div class="form-group"> <b>Describe Yourself :</b></div>
<div class="form-group">
<textarea rows="3" cols="5" class="form-control" name='description' placeholder="Your best professional description" onkeydown="textCounter(this, this.form.remLen, 500);" onkeyup="textCounter(this, this.form.remLen, 500);"><?php echo $description; ?></textarea>
</div>
<div class="form-group">
<div class="text-left">
Characters left <input type="text" name="remLen" id="remLen" value="<?php echo 500 - strlen($description) ?>" style="border:none">
</div>
<div class="text-right">
<button type="submit" class="btn btn-primary btn-sm">Update </button>
</div>
</div>
</form>
</div>
</div>
<div class="row">
<div class="col-lg-9 col-sm-6">
<div class="thumbnail">
<div class="row" style="height: 610px;">
<div class="col-md-7 col-md-offset-1" >
<form id="skillform" name="skillform" action="">
<div class="form-group"><b>Skills :</b> </div>
<div class="form-group">
<?php echo $skill_combo; ?>
</div>
<div class="form-group">
<table style="width: 100%;" class="table-responsive" >
<tr>
<td><?php echo $skill_types; ?></td>
<td style="width: 50px;"><button id="add_skill" class="btn btn-info btn-xs">Add</button></td>
</tr>
</table>
</div>
<b>Your Selection(s)[Max 6]:</b>
<div id="save_skill_result" class="form-group"><?= $member_skills ?></div>
</form>
</div>
<div class="col-md-3 col-md-offset-1">
</div>
</div>
</div>
</div>
<div class="col-lg-3 col-sm-6">
<div class="thumbnail">
<div class="thumb">
<a href="/member/profile"><img src="<? echo $_SESSION['profile_picture']; ?>" class="img-circle img-responsive" alt=""></a>
</div>
<div class="caption">
<h6 class="no-margin-top text-semibold"><a class="btn btn-primary btn-lg btn-block btn-sm" href="/member/picture" class="text-default">Change Picture</a> <a href="#" class="text-muted"></a></h6>
Expose your capabilities and interest to clients and connect professionally.
</div>
</div>
</div>
</div>
</div>
<!-- /main content -->
<script type="text/javascript">
<!--
var skill_categories = {};
<? foreach ($skill_types_data as $skill_category => $skill_types) { ?>
skill_categories[<?= $skill_category ?>] = {
<? $i = 0;
foreach ($skill_types as $id => $skill) {
?>
<?= $i > 0 ? ',' : '' ?>'<?= $id ?>': '<?= str_replace("'", "\\'", stripslashes($skill)) ?>'
<? $i++;
}
?>};
<? } ?>
$(document).ready(function () {
$("#skillform select[name=skill_combo]").change(function () {
var val = $(this).val();
if (val < 1) {
return false;
}
var skills = skill_categories[val];
var skill_type = $("#skillform select[name=skill_type_combo]");
skill_type.html("");
$.each(skills, function (index, value) {
skill_type.append($("<option>", {value: index, html: value}));
});
});
$("#add_skill").click(function () {
$(this).prop('disabled', true);
var skill_combo = $("#skillform select[name=skill_combo]").val();
var skill_type = $("#skillform select[name=skill_type_combo]").val();
$.ajax({
url: "/member/saveuserskill?skill_combo=" + skill_combo + "&skill_type_combo=" + skill_type
}).done(function (data) {
$('#save_skill_result').html(data);
$('#add_skill').prop('disabled', false);
});
return false;
});
});
// -->
</script>
<script type="text/javascript">
<!--
function delAccountSkill(interest_id) {
if (confirm("Are you sure you want to remove this skillfrom your profile ?")) {
// do something
} else {
return false;
}
//$('#req_completion').html('Processing...');
//$('#req_completion_submit').prop('disabled', true);
$('#del_acc' + interest_id).prop('disabled', true);
$.ajax({
url: "/member/deleteskill?proc=ACCEPT&savedskill_id=" + interest_id
}).done(function (data) {
$('#deldiv' + interest_id).html(data);
$('#del_acc' + interest_id).prop('disabled', false);
});
return false;
}
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else
countfield.value = maxlimit - field.value.length;
}
// -->
</script>