Files
WrenchBoradWeb/www/application/views/bko/view_bko_library.php
T
2019-05-31 11:26:35 -04:00

151 lines
5.6 KiB
PHP

<!-- Main content -->
<div class="content-wrapper">
<!-- Dashboard content -->
<div class="row">
<div class="col-lg-6">
<!-- Marketing campaigns -->
<div class="panel panel-flat">
<div class="panel-heading">
<h6 class="panel-title"> <b>Add Library Items</b></h6>
<div class="heading-elements">
</div>
</div>
<form method="post" name="postfaq" action="/bkouser/library">
<input type="hidden" name="lib_id" value="<?=$lib_id?>">
<?
if ($lib_id != 0 )
{
?>
<div class="table-responsive">
<table class='table table-sm table-hover table-bordered table-condensed'>
<tr>
<td style='width:100px;'>Flag[numbers]</td><td><input type="text" class="form-control" id="lib_flag2" name="lib_flag" value="<?php echo $lib_flag; ?>"></td></tr>
<td style='width:100px;'>Title</td><td><input type="text" class="form-control" id="lib_title2" name="lib_title" readonly value="<?php echo $lib_title; ?>"></td></tr>
<tr> <td colspan='2'>Detail<br><textarea class="wysihtml5-min form-control" rows="15" id="lib_detail2" name="lib_detail"> <?php echo $lib_detail; ?></textarea> </td>
</tr>
<tr><td><a href="/bkouser/library"> <=Add New </a></td><td><input type='submit' class='btn btn-success btn-sm' name='save_faq' value='Update'></td></tr>
</table>
</div>
<?
}
else
{
?>
<div class="table-responsive">
<table class='table table-sm table-hover table-bordered table-condensed'>
<tr>
<td style='width:100px;'>Flag[numbers]</td><td><input type="text" class="form-control" id="lib_flag" name="lib_flag" value="<?php echo $lib_flag; ?>"></td></tr>
<td style='width:100px;'>Title</td><td><input type="text" class="form-control" id="lib_title" name="lib_title" value="<?php echo $lib_title; ?>"></td></tr>
<tr> <td colspan='2'>Detail<br><textarea class="wysihtml5-min form-control" rows="15" id="lib_detail" name="lib_detail"> <?php echo $lib_detail; ?></textarea> </td>
</tr>
<tr><td></td><td><input type='submit' class='btn btn-success btn-sm' name='save_faq' value='Save'></td></tr>
</table>
</div>
<?
}
?>
</form>
</div>
<!-- /marketing campaigns -->
</div>
<div class="col-lg-6">
<!-- Daily sales -->
<div class="panel panel-flat">
<div class="panel-heading">
<h6 class="panel-title"><b>Library</b></h6>
<div class="heading-elements">
</div>
</div>
<div class="panel-body">
<div id="sales-heatmap"></div>
</div>
<div class="table-responsive">
<?php echo $lib_table; ?>
</div>
</div>
<!-- /daily sales -->
</div>
</div>
<!-- /dashboard content -->
</div>
<script type="text/javascript">
<!--
function editLibItem(link_id) {
//$('#sdd'+link_id).html('Processing...');
$('#dacc' + link_id).prop('disabled', true);
$.ajax({
url: "/bkouser/libraryedit?proc=EDIT&lib_id=" + link_id
}).done(function (data) {
$('#subedit_' + link_id).html(data);
$('#dacc' + link_id).prop('disabled', false);
});
return false;
}
function deleteFaq(link_id) {
if (confirm("Are you sure you want to delete this library item?")) {
// do something
} else {
return false;
}
//$('#sdd'+link_id).html('Processing...');
$('#dacc' + link_id).prop('disabled', true);
$.ajax({
url: "/bkouser/deletelibrary?proc=SEL&lib_id=" + link_id
}).done(function (data) {
$('#subdel_' + link_id).html(data);
$('#dacc' + link_id).prop('disabled', false);
});
return false;
}
// -->
</script>
<script>
$('.textarea').wysihtml5({
"font-styles": true, //Font styling, e.g. h1, h2, etc. Default true
"emphasis": true, //Italics, bold, etc. Default true
"lists": true, //(Un)ordered lists, e.g. Bullets, Numbers. Default true
"html": true, //Button which allows you to edit the generated HTML. Default false
"link": true, //Button to insert a link. Default true
"image": true, //Button to insert an image. Default true,
"color": true, //Button to change color of font
"size": 'xs', // buttons size
});
</script>