first commit
This commit is contained in:
15
application/views/admin/check.php
Executable file
15
application/views/admin/check.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="login-panel panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<img src="<?php echo ADMIN_THEME; ?>/images/large_logo.png" class="login_logo" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<h3><?php echo $this->lang->line('forgot_check_email'); ?></h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
16
application/views/admin/comment_delete.php
Executable file
16
application/views/admin/comment_delete.php
Executable file
@@ -0,0 +1,16 @@
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title"><?php echo $this->lang->line('comments_delete').": ".$form[0]['commentID'] ?>?</h4>
|
||||
</div> <!-- /modal-header -->
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<strong>WARNING: </strong><p><?php echo $this->lang->line('comments_delete_message'); ?></p>
|
||||
</div>
|
||||
</div> <!-- /modal-body -->
|
||||
<div class="modal-footer">
|
||||
<form ACTION="<?php echo BASE_URL.'/admin/comments/delete/'.$form[0]['commentID']; ?>" method="POST" name="pageform" id="pageform">
|
||||
<input name="deleteid" type="hidden" id="deleteid" value="<?php echo $form[0]['commentID'] ?>" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo $this->lang->line('btn_cancel'); ?></button>
|
||||
<input class="btn btn-danger" type="submit" value="<?php echo $this->lang->line('btn_delete'); ?>"/>
|
||||
</form>
|
||||
</div> <!-- /modal-footer -->
|
||||
149
application/views/admin/comments.php
Executable file
149
application/views/admin/comments.php
Executable file
@@ -0,0 +1,149 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<h1 class="page-header">
|
||||
<?php echo $this->lang->line('comments_header'); ?>
|
||||
</h1>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<form action="/admin/comments">
|
||||
<div class="input-group searchContainer">
|
||||
<input type="text" class="form-control" id="searchString" name="term"
|
||||
placeholder="<?php echo getSearchTerm()?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="submit" id="searchBtn"><span
|
||||
class="fa fa-search"></span></button>
|
||||
</span>
|
||||
</div><!-- /input-group -->
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-newspaper-o"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/posts"><?php echo $this->lang->line('nav_posts_all'); ?></a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> ID </th>
|
||||
<th> Comment </th>
|
||||
<th> User </th>
|
||||
<th> Posted Date </th>
|
||||
<th class="td-actions"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="postContainer">
|
||||
<?php
|
||||
foreach ($comments as $c) {
|
||||
echo '<tr>';
|
||||
echo '<td>'.$c->commentID.'</td>';
|
||||
echo '<td>'.$c->comment.'</td>';
|
||||
echo '<td>'.$c->nickname.'</td>';
|
||||
echo '<td>'.$c->datePosted.'</td>';
|
||||
echo '<td class="td-actions"><a href="'.BASE_URL.'/admin/comments/edit/'.$c->commentID.'" class="btn btn-small btn-success"><i class="fa fa-pencil"> </i></a> <a data-toggle="modal" data-target="#ajaxModal" class="btn btn-danger btn-small" href="'.BASE_URL.'/admin/comments/delete/'.$c->commentID.'"><i class="fa fa-remove"> </i></a></td>';
|
||||
echo '</tr>';
|
||||
} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="text-center" id="loadingSpinner">
|
||||
<i class="fa fa-cog fa-spin fa-3x fa-fw"></i>
|
||||
</div>
|
||||
<div id="paginationContainer">
|
||||
<?php echo $this->pagination->create_links(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal fade schedule-publish-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">New message</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label for="postID" class="col-form-label">PostID:</label>
|
||||
<input type="text" class="form-control" name="postID" readonly>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="postTitle" class="col-form-label">Post Title:</label>
|
||||
<input type="text" class="form-control" name="postTitle" readonly>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="run_at" class="col-form-label">Reserved Date:</label>
|
||||
<div class="form-group">
|
||||
<div class='input-group date' id='datetimepicker1'>
|
||||
<input type='text' class="form-control" name="run_at" />
|
||||
<span class="input-group-addon">
|
||||
<span class="fa fa-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary submit-schedule">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
$('#datetimepicker1').datetimepicker({
|
||||
format: 'YYYY-MM-DD HH:mm',
|
||||
dayViewHeaderFormat: 'YYYY-MM-DD',
|
||||
sideBySide: true,
|
||||
icons: {
|
||||
up: "fa fa-chevron-circle-up",
|
||||
down: "fa fa-chevron-circle-down",
|
||||
next: 'fa fa-chevron-circle-right',
|
||||
previous: 'fa fa-chevron-circle-left'
|
||||
}
|
||||
});
|
||||
$('.settime-publish').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
$('.schedule-publish-modal form input[name=postID]').val($(this).prop('tabindex'));
|
||||
$('.schedule-publish-modal form input[name=postTitle]').val($(this).parent().siblings().eq(0)
|
||||
.text());
|
||||
$('.schedule-publish-modal').modal('show')
|
||||
});
|
||||
$('.submit-schedule').on('click', function(e) {
|
||||
var frm = $('.schedule-publish-modal form').get(0);
|
||||
var params = {
|
||||
postID: frm.postID.value,
|
||||
run_at: frm.run_at.value
|
||||
};
|
||||
$.post('/admin/posts/schedule/' + params.postID, params, function(res) {
|
||||
if (res.code == 200) {
|
||||
alert('Saved!');
|
||||
$('.schedule-publish-modal').modal('hide')
|
||||
}
|
||||
}, 'json')
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<?php echo $footer; ?>
|
||||
84
application/views/admin/data_chdaily.php
Executable file
84
application/views/admin/data_chdaily.php
Executable file
@@ -0,0 +1,84 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<h1 class="page-header">
|
||||
Chdaily Global News Feed
|
||||
</h1>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<select class="form-control cm-section-selector">
|
||||
<?php foreach(['nation','world','church', 'mission', 'ministries', 'society', 'life', 'entertainment', 'comment', 'it'] as $s) echo '<option'.($this->uri->segment(4) == $s? ' selected':'').'>'.$s.'</option>';?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-file"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/pages">Chdaily Global News Feed</a>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox"></th>
|
||||
<th> Image </th>
|
||||
<th> Title </th>
|
||||
<th class="td-actions"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="postContainer">
|
||||
<tr class="hide">
|
||||
<td><input type="checkbox"></td>
|
||||
<td width="90"><img src="" width="80"></td>
|
||||
<td><a href="" target="_blank" class="news-item-title"></a></td>
|
||||
<td class="td-actions"><a href="/admin/data/chdaily/"
|
||||
class="btn btn-small btn-success"><i class="fa fa-pencil"> </i></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="text-center" id="loadingSpinner">
|
||||
<i class="fa fa-cog fa-spin fa-3x fa-fw"></i>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /colmd12 -->
|
||||
</div>
|
||||
<!-- /row -->
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
$('.cm-section-selector').on('change', function() {
|
||||
$('#postContainer').find('.cm-row').remove();
|
||||
$('#loadingSpinner').show();
|
||||
var section = this.value;
|
||||
$.get('/admin/data/chdaily/' + section, function(res) {
|
||||
for (i in res) {
|
||||
var r = res[i];
|
||||
var row = $('#postContainer').find('tr').eq(0).clone(true);
|
||||
row.find('img').prop('src', r.img);
|
||||
row.find('td').eq(2).find('a').prop('href', r.url).text(r.title);
|
||||
row.find('td').eq(3).find('a').prop('href', '/admin/data/chdaily/'+section+'/'+(i-1+2))
|
||||
row.removeClass('hide').addClass('cm-row');
|
||||
$('#postContainer').append(row);
|
||||
}
|
||||
$('#loadingSpinner').hide();
|
||||
}, 'json')
|
||||
}).trigger('change');
|
||||
|
||||
})
|
||||
</script>
|
||||
<!-- /container -->
|
||||
<?php echo $footer; ?>
|
||||
84
application/views/admin/data_chdailykr.php
Executable file
84
application/views/admin/data_chdailykr.php
Executable file
@@ -0,0 +1,84 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<h1 class="page-header">
|
||||
Chdaily Korea News Feed
|
||||
</h1>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<select class="form-control cm-section-selector">
|
||||
<?php foreach(['church','denomination','mission', 'pastoral_theology', 'intl', 'opinion'] as $s) echo '<option'.($this->uri->segment(4) == $s? ' selected':'').'>'.$s.'</option>';?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-file"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/pages">Chdaily Korea News Feed</a>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox"></th>
|
||||
<th> Image </th>
|
||||
<th> Title </th>
|
||||
<th class="td-actions"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="postContainer">
|
||||
<tr class="hide">
|
||||
<td><input type="checkbox"></td>
|
||||
<td width="90"><img src="" width="80"></td>
|
||||
<td></td>
|
||||
<td class="td-actions"><a href="/admin/data/chdailykr/"
|
||||
class="btn btn-small btn-success"><i class="fa fa-pencil"> </i></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="text-center" id="loadingSpinner">
|
||||
<i class="fa fa-cog fa-spin fa-3x fa-fw"></i>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /colmd12 -->
|
||||
</div>
|
||||
<!-- /row -->
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
$('.cm-section-selector').on('change', function() {
|
||||
$('#postContainer').find('.cm-row').remove();
|
||||
$('#loadingSpinner').show();
|
||||
var section = this.value;
|
||||
$.get('/admin/data/chdailykr/' + section, function(res) {
|
||||
for (i in res) {
|
||||
var r = res[i];
|
||||
var row = $('#postContainer').find('tr').eq(0).clone(true);
|
||||
row.find('img').prop('src', r.img);
|
||||
row.find('td').eq(2).text(r.title);
|
||||
row.find('td').eq(3).find('a').prop('href', '/admin/data/chdailykr/'+section+'/'+(i-1+2))
|
||||
row.removeClass('hide').addClass('cm-row');
|
||||
$('#postContainer').append(row);
|
||||
}
|
||||
$('#loadingSpinner').hide();
|
||||
}, 'json')
|
||||
}).trigger('change');
|
||||
|
||||
})
|
||||
</script>
|
||||
<!-- /container -->
|
||||
<?php echo $footer; ?>
|
||||
84
application/views/admin/data_chtoday.php
Executable file
84
application/views/admin/data_chtoday.php
Executable file
@@ -0,0 +1,84 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<h1 class="page-header">
|
||||
Chtoday Korea News Feed
|
||||
</h1>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<select class="form-control cm-section-selector">
|
||||
<?php foreach(['cg','pd','mission', 'inter', 'sn', 'cul', 'oc', 'edu', 'lif'] as $s) echo '<option'.($this->uri->segment(4) == $s? ' selected':'').'>'.$s.'</option>';?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-file"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/pages">Chtoday Korea News Feed</a>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox"></th>
|
||||
<th> Image </th>
|
||||
<th> Title </th>
|
||||
<th class="td-actions"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="postContainer">
|
||||
<tr class="hide">
|
||||
<td><input type="checkbox"></td>
|
||||
<td width="90"><img src="" width="80"></td>
|
||||
<td><a href="" target="_blank" class="news-item-title"></a></td>
|
||||
<td class="td-actions"><a href="/admin/data/chtoday/"
|
||||
class="btn btn-small btn-success"><i class="fa fa-pencil"> </i></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="text-center" id="loadingSpinner">
|
||||
<i class="fa fa-cog fa-spin fa-3x fa-fw"></i>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /colmd12 -->
|
||||
</div>
|
||||
<!-- /row -->
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
$('.cm-section-selector').on('change', function() {
|
||||
$('#postContainer').find('.cm-row').remove();
|
||||
$('#loadingSpinner').show();
|
||||
var section = this.value;
|
||||
$.get('/admin/data/chtoday/' + section, function(res) {
|
||||
for (i in res) {
|
||||
var r = res[i];
|
||||
var row = $('#postContainer').find('tr').eq(0).clone(true);
|
||||
row.find('img').prop('src', r.img);
|
||||
row.find('td').eq(2).find('a').prop('href', r.url).text(r.title);
|
||||
row.find('td').eq(3).find('a').prop('href', '/admin/data/chtoday/'+section+'/'+(i-1+2))
|
||||
row.removeClass('hide').addClass('cm-row');
|
||||
$('#postContainer').append(row);
|
||||
}
|
||||
$('#loadingSpinner').hide();
|
||||
}, 'json')
|
||||
}).trigger('change');
|
||||
|
||||
})
|
||||
</script>
|
||||
<!-- /container -->
|
||||
<?php echo $footer; ?>
|
||||
23
application/views/admin/data_post.php
Executable file
23
application/views/admin/data_post.php
Executable file
@@ -0,0 +1,23 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<form method="post" action="/admin/posts/new">
|
||||
<textarea style="display:none" name="content">
|
||||
<?php echo $article['article']?>
|
||||
</textarea>
|
||||
<input type="hidden" name="postTitle" value="<?php echo addslashes(trim($article['title']))?>">
|
||||
<input type="hidden" name="postImage" value="<?php echo addslashes(trim($article['img']))?>">
|
||||
<textarea style="display:none" name="postExcerpt">
|
||||
<?php echo trim($article['postExcerpt'])?>
|
||||
</textarea>
|
||||
</form>
|
||||
<script>
|
||||
document.forms[0].submit();
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
41
application/views/admin/email_check.php
Executable file
41
application/views/admin/email_check.php
Executable file
@@ -0,0 +1,41 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="login-panel panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<img src="<?php echo ADMIN_THEME; ?>/images/large_logo.png" class="login_logo" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<h3><?php echo $this->lang->line('forgot_reset'); ?></h3>
|
||||
<?php echo form_open(BASE_URL.'/admin/user/forgot'); ?>
|
||||
<div class="form-group">
|
||||
<?php echo form_error('email', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label" for="email"><?php echo $this->lang->line('forgot_email'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'email',
|
||||
'id' => 'email',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('email')
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /control-group -->
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<?php $data = array(
|
||||
'name' => 'submit',
|
||||
'id' => 'submit',
|
||||
'class' => 'btn btn-primary',
|
||||
'value' => $this->lang->line('forgot_btn'),
|
||||
);
|
||||
echo form_submit($data); ?>
|
||||
</div> <!-- /form-actions -->
|
||||
<?php echo form_close(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
32
application/views/admin/error.php
Executable file
32
application/views/admin/error.php
Executable file
@@ -0,0 +1,32 @@
|
||||
<?php echo $header; ?>
|
||||
|
||||
<div class="main">
|
||||
<div class="main-inner">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<div class="widget">
|
||||
<div class="widget-header"> <i class="icon-user"></i>
|
||||
<h3>Password Reset</h3>
|
||||
</div>
|
||||
<!-- /widget-header -->
|
||||
<div class="widget-content">
|
||||
<p>The URL you have entered is invalid, please check and try again.</p>
|
||||
|
||||
<!-- /widget-content -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /widget -->
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /span12 -->
|
||||
|
||||
</div>
|
||||
<!-- /row -->
|
||||
</div>
|
||||
<!-- /container -->
|
||||
</div>
|
||||
<!-- /main-inner -->
|
||||
</div>
|
||||
<?php echo $footer; ?>
|
||||
80
application/views/admin/footer.php
Executable file
80
application/views/admin/footer.php
Executable file
@@ -0,0 +1,80 @@
|
||||
<div class="push"></div>
|
||||
<input type="hidden" id="URLStore" value="">
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="footer-inner pull-right hidden-xs">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12"> © <?php echo date("Y"); ?> <a>crossmap.co.kr</a></div>
|
||||
<!-- /span12 -->
|
||||
</div>
|
||||
<!-- /row -->
|
||||
</div>
|
||||
<!-- /container -->
|
||||
</div>
|
||||
<!-- /footer-inner -->
|
||||
</div>
|
||||
<!-- /footer -->
|
||||
<!-- remote modals -->
|
||||
<div id="remote-modals">
|
||||
<div class="modal fade" id="ajaxModal" aria-labelledby="ajaxModal" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
</div> <!-- /.modal-content -->
|
||||
</div> <!-- /.modal-dialog -->
|
||||
</div> <!-- /.modal -->
|
||||
</div>
|
||||
<!-- Modal -->
|
||||
<div id="loginModal" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title"><?php echo $this->lang->line('login_signin'); ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-warning">
|
||||
<p><?php echo $this->lang->line('login_expired'); ?></p>
|
||||
</div>
|
||||
<div id="loginError" class='alert alert-danger'><?php echo $this->lang->line('login_incorrect'); ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="username"><?php echo $this->lang->line('login_username'); ?></label>
|
||||
<?php $data = array(
|
||||
'name' => 'username',
|
||||
'id' => 'username',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('username'),
|
||||
'placeholder' => $this->lang->line('login_username')
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password"><?php echo $this->lang->line('login_password'); ?>:</label>
|
||||
<?php $data = array(
|
||||
'name' => 'password',
|
||||
'id' => 'password',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('password'),
|
||||
'placeholder' => $this->lang->line('login_password')
|
||||
);
|
||||
|
||||
echo form_password($data); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a id="ajaxLoginbtn" class="btn btn-primary"><?php echo $this->lang->line('login_signin'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
$('.select2').select2()
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
248
application/views/admin/header.php
Executable file
248
application/views/admin/header.php
Executable file
@@ -0,0 +1,248 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Crossmap Admin - <?php echo SITE_NAME; ?></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.7/css/select2.min.css" />
|
||||
<link href="<?php echo ADMIN_THEME; ?>/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="<?php echo ADMIN_THEME; ?>/css/sb-admin.css" rel="stylesheet">
|
||||
<link href="<?php echo ADMIN_THEME; ?>/css/crossmap-adm.css" rel="stylesheet">
|
||||
<link href="<?php echo ADMIN_THEME; ?>/css/jquery.fancybox-1.3.4.css" rel="stylesheet">
|
||||
<link href="<?php echo ADMIN_THEME; ?>/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tag-editor/1.0.20/jquery.tag-editor.min.css" />
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/jquery-1.10.2.min.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/jquery.fancybox-1.3.4.pack.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/jquery-ui-1.9.2.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/jquery.nestable.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/excanvas.min.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/bootstrap.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/base.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/css/bootstrap-datetimepicker.min.css" />
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.7/js/select2.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/tag-editor/1.0.20/jquery.tag-editor.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/caret/1.3.4/jquery.caret.min.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<!-- Navigation -->
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="<?php echo BASE_URL;?>/admin"><img
|
||||
src="<?php echo ADMIN_THEME; ?>/images/logo.svg" class="logo-icon" alt="Hoosk CMS"></a>
|
||||
</div>
|
||||
<!-- Top Menu Items -->
|
||||
<ul class="nav navbar-right top-nav">
|
||||
<li>
|
||||
<a href="<?php echo BASE_URL; ?>" target="_blank"><i class="fa fa-home"></i></a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i>
|
||||
<?php echo $this->session->userdata('userName'); ?> <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="<?php echo BASE_URL ; ?>/admin/logout"><i class="fa fa-fw fa-power-off"></i>
|
||||
<?php echo $this->lang->line('nav_logout'); ?></a> </li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
|
||||
<div class="collapse navbar-collapse navbar-ex1-collapse">
|
||||
<ul class="nav navbar-nav side-nav">
|
||||
<li class="<?php if ($current == "") { echo "active"; } ?>">
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><i class="fa fa-dashboard"></i>
|
||||
<span><?php echo $this->lang->line('nav_dash'); ?></span> </a>
|
||||
</li>
|
||||
<li class="dropdown <?php if ($current == "pages") { echo "active"; } ?>">
|
||||
<a href="javascript:;" data-toggle="collapse" data-target="#pagesmenu"> <i class="fa fa-file">
|
||||
</i> <span><?php echo $this->lang->line('nav_pages'); ?></span> <i
|
||||
class="fa fa-fw fa-caret-down"></i></a>
|
||||
<ul id="pagesmenu" class="collapse<?php if ($current == "pages") { echo " in"; } ?>">
|
||||
<li
|
||||
<?php if (($current == "pages")&&($this->uri->segment(3)=="")) { echo ' class="active"'; } ?>>
|
||||
<a
|
||||
href="<?php echo BASE_URL; ?>/admin/pages"><?php echo $this->lang->line('nav_pages_all'); ?></a>
|
||||
</li>
|
||||
<li
|
||||
<?php if (($current == "pages")&&($this->uri->segment(3)=="new")) { echo ' class="active"'; } ?>>
|
||||
<a
|
||||
href="<?php echo BASE_URL; ?>/admin/pages/new"><?php echo $this->lang->line('nav_pages_new'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown <?php if ($current == "posts") { echo "active"; } ?>">
|
||||
<a href="javascript:;" data-toggle="collapse" data-target="#postsmenu"> <i
|
||||
class="fa fa-newspaper-o"></i>
|
||||
<span><?php echo $this->lang->line('nav_posts'); ?></span> <b class="caret"></b></a>
|
||||
<ul id="postsmenu" class="collapse<?php if ($current == "posts") { echo " in"; } ?>">
|
||||
<li
|
||||
<?php if (($current == "posts")&&($this->uri->segment(3)=="")) { echo ' class="active"'; } ?>>
|
||||
<a
|
||||
href="<?php echo BASE_URL; ?>/admin/posts"><?php echo $this->lang->line('nav_posts_all'); ?></a>
|
||||
</li>
|
||||
<li
|
||||
<?php if (($current == "posts")&&($this->uri->segment(3)=="new")) { echo ' class="active"'; } ?>>
|
||||
<a
|
||||
href="<?php echo BASE_URL; ?>/admin/posts/new"><?php echo $this->lang->line('nav_posts_new'); ?></a>
|
||||
</li>
|
||||
<li
|
||||
<?php if (($current == "posts")&&($this->uri->segment(3)=="categories")&&($this->uri->segment(4)=="")) { echo ' class="active"'; } ?>>
|
||||
<a
|
||||
href="<?php echo BASE_URL; ?>/admin/posts/categories"><?php echo $this->lang->line('nav_categories_all'); ?></a>
|
||||
</li>
|
||||
<li
|
||||
<?php if (($current == "posts")&&($this->uri->segment(3)=="categories")&&($this->uri->segment(4)=="new")) { echo ' class="active"'; } ?>>
|
||||
<a
|
||||
href="<?php echo BASE_URL; ?>/admin/posts/categories/new"><?php echo $this->lang->line('nav_categories_new'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown <?php if ($current == "comments") { echo "active"; } ?>">
|
||||
<a href="javascript:;" data-toggle="collapse" data-target="#commentsmenu"> <i
|
||||
class="fa fa-newspaper-o"></i>
|
||||
<span>Comments</span> <b class="caret"></b></a>
|
||||
<ul id="commentsmenu" class="collapse<?php if ($current == "comments") { echo " in"; } ?>">
|
||||
|
||||
<li
|
||||
<?php if ($current == "comments") { echo ' class="active"'; } ?>>
|
||||
<a
|
||||
href="<?php echo BASE_URL; ?>/admin/comments">All Comments</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown <?php if ($current == "pray") { echo "active"; } ?>">
|
||||
<a href="javascript:;" data-toggle="collapse" data-target="#praymenu"> <i
|
||||
class="fa fa-newspaper-o"></i>
|
||||
<span>Pray</span> <b class="caret"></b></a>
|
||||
<ul id="praymenu" class="collapse<?php if ($current == "pray") { echo " in"; } ?>">
|
||||
|
||||
<li
|
||||
<?php if ($current == "pray") { echo ' class="active"'; } ?>>
|
||||
<a
|
||||
href="<?php echo BASE_URL; ?>/admin/pray">All Pray</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown <?php if ($current == "users") { echo "active"; } ?>">
|
||||
<a href="javascript:;" data-toggle="collapse" data-target="#usersmenu"> <i
|
||||
class="fa fa-user"></i>
|
||||
<span><?php echo $this->lang->line('nav_users'); ?></span> <b class="caret"></b></a>
|
||||
<ul id="usersmenu" class="collapse<?php if ($current == "users") { echo " in"; } ?>">
|
||||
<li
|
||||
<?php if (($current == "users")&&($this->uri->segment(3)=="")) { echo ' class="active"'; } ?>>
|
||||
<a
|
||||
href="<?php echo BASE_URL; ?>/admin/users"><?php echo $this->lang->line('nav_users_all'); ?></a>
|
||||
</li>
|
||||
<li
|
||||
<?php if (($current == "users")&&($this->uri->segment(3)=="new")) { echo ' class="active"'; } ?>>
|
||||
<a
|
||||
href="<?php echo BASE_URL; ?>/admin/users/new"><?php echo $this->lang->line('nav_users_new'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown <?php if ($current == "navigation") { echo "active"; } ?>">
|
||||
<a href="javascript:;" data-toggle="collapse" data-target="#navigationmenu"> <i
|
||||
class="fa fa-list-alt"></i>
|
||||
<span><?php echo $this->lang->line('nav_navigation'); ?></span> <b class="caret"></b></a>
|
||||
<ul id="navigationmenu" class="collapse<?php if ($current == "navigation") { echo " in"; } ?>">
|
||||
<li
|
||||
<?php if (($current == "navigation")&&($this->uri->segment(3)=="")) { echo ' class="active"'; } ?>>
|
||||
<a
|
||||
href="<?php echo BASE_URL; ?>/admin/navigation"><?php echo $this->lang->line('nav_navigation_all'); ?></a>
|
||||
</li>
|
||||
<li
|
||||
<?php if (($current == "navigation")&&($this->uri->segment(3)=="new")) { echo ' class="active"'; } ?>>
|
||||
<a
|
||||
href="<?php echo BASE_URL; ?>/admin/navigation/new"><?php echo $this->lang->line('nav_navigation_new'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown <?php if ($current == "data") { echo "active"; } ?>">
|
||||
<a href="javascript:;" data-toggle="collapse" data-target="#datamenu"> <i
|
||||
class="fa fa-cogs"></i>
|
||||
<span>Data<?php echo $this->lang->line('nav_data'); ?></span> <b class="caret"></b></a>
|
||||
<ul id="datamenu" class="collapse<?php if ($current == "data") { echo " in"; } ?>">
|
||||
<li
|
||||
<?php if (($current == "data")&&($this->uri->segment(3)=="chtoday")) { echo ' class="active"'; } ?>>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/data/chtoday">
|
||||
<span>Chtoday<?php echo $this->lang->line('nav_data_chtoday'); ?></span> </a>
|
||||
</li>
|
||||
<li
|
||||
<?php if (($current == "data")&&($this->uri->segment(3)=="chdaily")) { echo ' class="active"'; } ?>>
|
||||
<a
|
||||
href="<?php echo BASE_URL; ?>/admin/data/chdaily">Chdaily<?php echo $this->lang->line('nav_data_chdaily'); ?></a>
|
||||
</li>
|
||||
<li
|
||||
<?php if (($current == "data")&&($this->uri->segment(3)=="chdailykr")) { echo ' class="active"'; } ?>>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/data/chdailykr">
|
||||
<span>Chdaily KR<?php echo $this->lang->line('nav_data_chdailykr'); ?></span> </a> </li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="dropdown <?php if ($current == "data") { echo "active"; } ?>">
|
||||
<a href="javascript:;" data-toggle="collapse" data-target="#datamenu"> <i
|
||||
class="fa fa-cogs"></i>
|
||||
<span>Data<?php echo $this->lang->line('nav_data'); ?></span> <b class="caret"></b></a>
|
||||
<ul id="datamenu" class="collapse<?php if ($current == "data") { echo " in"; } ?>">
|
||||
<li
|
||||
<?php if (($current == "data")&&($this->uri->segment(3)=="chtoday")) { echo ' class="active"'; } ?>>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/data/chtoday">
|
||||
<span>Chtoday<?php echo $this->lang->line('nav_data_chtoday'); ?></span> </a>
|
||||
</li>
|
||||
<li
|
||||
<?php if (($current == "data")&&($this->uri->segment(3)=="chdaily")) { echo ' class="active"'; } ?>>
|
||||
<a
|
||||
href="<?php echo BASE_URL; ?>/admin/data/chdaily">Chdaily<?php echo $this->lang->line('nav_data_chdaily'); ?></a>
|
||||
</li>
|
||||
<li
|
||||
<?php if (($current == "data")&&($this->uri->segment(3)=="chdailykr")) { echo ' class="active"'; } ?>>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/data/chdailykr">
|
||||
<span>Chdaily KR<?php echo $this->lang->line('nav_data_chdailykr'); ?></span> </a> </li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="dropdown <?php if ($current == "settings") { echo "active"; } ?>">
|
||||
<a href="javascript:;" data-toggle="collapse" data-target="#settingsmenu"> <i
|
||||
class="fa fa-cogs"></i>
|
||||
<span><?php echo $this->lang->line('nav_settings'); ?></span> <b class="caret"></b></a>
|
||||
<ul id="settingsmenu" class="collapse<?php if ($current == "settings") { echo " in"; } ?>">
|
||||
<li
|
||||
<?php if (($current == "settings")&&($this->uri->segment(3)=="default")) { echo ' class="active"'; } ?>>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/settings/default">
|
||||
<span>Default<?php echo $this->lang->line('nav_settings_default'); ?></span> </a>
|
||||
</li>
|
||||
<li
|
||||
<?php if (($current == "settings")&&($this->uri->segment(3)=="roles")) { echo ' class="active"'; } ?>>
|
||||
<a
|
||||
href="<?php echo BASE_URL; ?>/admin/settings/roles">Roles<?php echo $this->lang->line('nav_settings_roles'); ?></a>
|
||||
</li>
|
||||
<li
|
||||
<?php if (($current == "settings")&&($this->uri->segment(3)=="social")) { echo ' class="active"'; } ?>>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/settings/social">
|
||||
<span><?php echo $this->lang->line('nav_social'); ?></span> </a> </li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<!-- /.navbar-collapse -->
|
||||
</nav>
|
||||
|
||||
<div id="page-wrapper">
|
||||
14
application/views/admin/headerlog.php
Executable file
14
application/views/admin/headerlog.php
Executable file
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Hoosk Dash - <?php echo SITE_NAME; ?></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
|
||||
<link href="<?php echo ADMIN_THEME; ?>/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="<?php echo ADMIN_THEME; ?>/css/sb-admin.css" rel="stylesheet">
|
||||
<link href="<?php echo ADMIN_THEME; ?>/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="<?php echo ADMIN_THEME; ?>/css/crossmap-adm.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body class="login">
|
||||
86
application/views/admin/home.php
Executable file
86
application/views/admin/home.php
Executable file
@@ -0,0 +1,86 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?php echo $this->lang->line('dash_welcome'); ?>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li class="active">
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<?php echo $this->lang->line('nav_dash'); ?>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<?php if($maintenaceActive){ ?>
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-warning">
|
||||
<p><?php echo $this->lang->line('dash_maintenance_message'); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<p><?php echo $this->lang->line('dash_message'); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(RSS_FEED) { ?>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<i class="fa fa-newspaper-o fa-fw"></i>
|
||||
<?php echo $this->lang->line('feed_heading'); ?>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<ul class="list-group">
|
||||
<?php
|
||||
if($hooskFeed) {
|
||||
foreach ($hooskFeed as $item) {
|
||||
$date = date_create($item['pubDate']);
|
||||
echo '<li class="list-group-item"><span class="badge">' . date_format($date, "jS M y") . '</span>';
|
||||
echo '<p><a href="' . $item['link'] . '" class="news-item-title" target="_blank">' . $item['title'] . '</a></p>';
|
||||
echo '<p>' . wordlimit($item['description']) . '</p>';
|
||||
echo '</li>';
|
||||
}
|
||||
} else {
|
||||
echo '<p>'.$this->lang->line('dash_unreachable').'</p>';
|
||||
}?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<!-- /colmd6 -->
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<i class="fa fa-long-arrow-right fa-fw"></i>
|
||||
<?php echo $this->lang->line('dash_recent'); ?>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<ul class="list-group">
|
||||
<?php
|
||||
foreach ($recenltyUpdated as $p) {
|
||||
echo '<li class="list-group-item"><span class="badge">'.date("jS", strtotime($p["pageUpdated"])).' '.date("M", strtotime($p["pageUpdated"])).'</span>';
|
||||
echo '<p><a href="'.BASE_URL.'/admin/pages/edit/'.$p['pageID'].'" class="news-item-title" target="_blank">'.$p['pageTitle'].'</a></p>';
|
||||
echo '<p>'.wordlimit($p['pageContentHTML']).'</p>';
|
||||
echo '</li>';
|
||||
} ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /colmd6 -->
|
||||
</div>
|
||||
<!-- /row -->
|
||||
</div>
|
||||
<!-- /container -->
|
||||
<?php echo $footer; ?>
|
||||
10
application/views/admin/index.html
Executable file
10
application/views/admin/index.html
Executable file
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
444
application/views/admin/jumbotron_edit.php
Executable file
444
application/views/admin/jumbotron_edit.php
Executable file
@@ -0,0 +1,444 @@
|
||||
<?php echo $header; ?>
|
||||
<link href="<?php echo ADMIN_THEME; ?>/js/trevor/sir-trevor.css" rel="stylesheet">
|
||||
<link href="<?php echo ADMIN_THEME; ?>/js/trevor/sir-trevor-bootstrap.css" rel="stylesheet">
|
||||
<link href="<?php echo ADMIN_THEME; ?>/js/trevor/sir-trevor-icons.css" rel="stylesheet">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?php echo $this->lang->line('pages_jumbo_edit'); ?>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-fw fa-file"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/pages"><?php echo $this->lang->line('nav_pages_all'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-pencil"></i>
|
||||
<?php echo $this->lang->line('pages_jumbo_edit'); ?>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-info"><?php echo $this->lang->line('pages_jumbo_intro'); ?></div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<i class="fa fa-pencil fa-fw"></i>
|
||||
<?php echo $this->lang->line('pages_slider_header'); ?>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-actions">
|
||||
<a class="btn btn-primary" data-toggle="modal" href="#slider"><?php echo $this->lang->line('pages_slider_btn'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<i class="fa fa-pencil fa-fw"></i>
|
||||
<?php echo $this->lang->line('pages_jumbo_header'); ?>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body text-center">
|
||||
<?php foreach ($pages as $p) {
|
||||
echo form_error('pageTitle', '<div class="alert">', '</div>');
|
||||
$attr = "id='contentForm'";
|
||||
echo form_open(BASE_URL.'/admin/pages/jumbotron/'.$this->uri->segment(4), $attr); ?>
|
||||
<?php $data = array(
|
||||
'id' => 'jumbotron',
|
||||
'name' => 'jumbotron',
|
||||
'class' => 'js-st-instance',
|
||||
);
|
||||
|
||||
echo form_textarea($data, set_value('jumbotron', $p['jumbotron'], FALSE)); ?>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<a class="btn btn-primary" data-toggle="modal" href="#attributes"><?php echo $this->lang->line('btn_next'); ?></a>
|
||||
<a class="btn" href="<?php echo BASE_URL; ?>/admin/pages"><?php echo $this->lang->line('btn_cancel'); ?></a>
|
||||
</div> <!-- /form-actions -->
|
||||
</div>
|
||||
<div id="attributes" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title"><?php echo $this->lang->line('pages_jumbo_header_att'); ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<?php echo form_error('enableJumbotron', '<div class="alert">', '</div>'); ?>
|
||||
<label class="control-label" for="enableJumbotron"><?php echo $this->lang->line('pages_jumbo_enable'); ?></label>
|
||||
|
||||
<?php
|
||||
$att = 'id="enableJumbotron" class="form-control"';
|
||||
$data = array(
|
||||
'1' => $this->lang->line('option_yes'),
|
||||
'0' => $this->lang->line('option_no'),
|
||||
);
|
||||
|
||||
echo form_dropdown('enableJumbotron', $data, $p['enableJumbotron'], $att); ?>
|
||||
|
||||
</div> <!-- /form-group -->
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn" data-dismiss="modal" aria-hidden="true"><?php echo $this->lang->line('btn_back'); ?></button>
|
||||
<a class="btn btn-primary" onClick="formSubmit()"><?php echo $this->lang->line('btn_save'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="slider" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title"><?php echo $this->lang->line('pages_slider_header'); ?></h4>
|
||||
</div>
|
||||
<div class="modal-body" id="pic_container">
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('enableSlider', '<div class="alert">', '</div>'); ?>
|
||||
|
||||
<label class="control-label" for="enableJumbotron"><?php echo $this->lang->line('pages_slider_enable'); ?></label>
|
||||
<?php
|
||||
$att = 'id="enableSlider" class="form-control"';
|
||||
$data = array(
|
||||
'1' => $this->lang->line('option_yes'),
|
||||
'0' => $this->lang->line('option_no'),
|
||||
);
|
||||
|
||||
echo form_dropdown('enableSlider', $data, $p['enableSlider'], $att); ?>
|
||||
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<button onclick="addNewPic();" class="btn btn-primary" type="button"><?php echo $this->lang->line('pages_slider_add'); ?></button>
|
||||
<hr />
|
||||
<div class="slider">
|
||||
<?php $i=0;
|
||||
|
||||
foreach ($slides as $s) {
|
||||
$i++;?>
|
||||
<div class="control-group" id="pic_element<?php echo $i; ?>">
|
||||
<label class="control-label">
|
||||
<span><?php echo $this->lang->line('pages_slider_title'); ?></span>
|
||||
|
||||
<button id="delete<?php echo $i; ?>" class="close" type="button" onClick="removePrePic('<?php echo $i; ?>');">×</button>
|
||||
</label>
|
||||
<div class="controls">
|
||||
<div><img src="<?php if ($s['slideImage'] != "") { echo BASE_URL.'/uploads/'.$s['slideImage']; } ?>" id="logo_preloaded<?php echo $i; ?>" <?php if ($s['slideImage'] == "") { echo "style='display:none;'"; } ?>></div>
|
||||
<img src="<?php echo BASE_URL; ?>/theme/admin/images/ajax-loader.gif" style="margin:-7px 5px 0 5px;display:none;" id="loading_pic<?php echo $i; ?>" />
|
||||
<?php
|
||||
$data = array(
|
||||
'name' => 'file_upload'.$i,
|
||||
'id' => 'file_upload'.$i,
|
||||
'class' => 'span5',
|
||||
);
|
||||
echo form_upload($data);
|
||||
?>
|
||||
<p><?php echo $this->lang->line('pages_slider_alt'); ?></p>
|
||||
<input class="form-control" type="text" id="alt<?php echo $i; ?>" name="alt<?php echo $i; ?>" <?php if ($s['slideAlt'] != "") { echo 'value="'.$s['slideAlt'].'"'; } else { echo ''; } ?> />
|
||||
<p><?php echo $this->lang->line('pages_slider_link'); ?></p>
|
||||
<input class="form-control" type="text" id="link<?php echo $i; ?>" name="link<?php echo $i; ?>" <?php if ($s['slideLink'] != "") { echo 'value="'.$s['slideLink'].'"'; } else { echo ''; } ?> />
|
||||
|
||||
<input type="hidden" id="slide<?php echo $i; ?>" name="slide<?php echo $i; ?>" value="<?php echo $s['slideImage']; ?>" />
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /control-group -->
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
<input type="hidden" id="pics" name="pics" value="" />
|
||||
|
||||
|
||||
</div><!-- /modal-body -->
|
||||
<div class="modal-footer">
|
||||
<button class="btn" data-dismiss="modal" aria-hidden="true"><?php echo $this->lang->line('btn_back'); ?></button>
|
||||
<a class="btn btn-primary" onClick="formSubmit()"><?php echo $this->lang->line('btn_save'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo form_close();
|
||||
} ?>
|
||||
</div>
|
||||
<!-- /colmd12 -->
|
||||
|
||||
</div>
|
||||
<!-- /row -->
|
||||
</div>
|
||||
<!-- /container -->
|
||||
|
||||
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/trevor/underscore.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/trevor/eventable.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/trevor/sortable.min.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/trevor/sir-trevor.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/trevor/sir-trevor-bootstrap.js"></script>
|
||||
<script type="text/javascript">
|
||||
new SirTrevor.Editor({ el: $('.js-st-instance'),
|
||||
blockTypes: ["Columns", "Heading", "Text", "ImageExtended", "Accordion", "Button", "Video", "List", "Iframe"]
|
||||
});
|
||||
SirTrevor.onBeforeSubmit();
|
||||
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
function formSubmit(){
|
||||
$.ajax({
|
||||
url: "/admin/check/session",
|
||||
}).done(function(data) {
|
||||
sessionExist = data;
|
||||
if(sessionExist==0){
|
||||
$('.modal').modal('hide');
|
||||
$('#loginModal').modal({
|
||||
backdrop: 'static',
|
||||
keyboard: false
|
||||
}).modal('show');
|
||||
} else {
|
||||
data_to_post = '';
|
||||
for(i=1;i<=total_pics;i++)
|
||||
{
|
||||
if(document.getElementById('slide' + i))
|
||||
{
|
||||
slide = document.getElementById('slide' + i).value;
|
||||
link = document.getElementById('link' + i).value;
|
||||
alt = document.getElementById('alt' + i).value;
|
||||
data_to_post += '{' + slide + '|' + link + '|' + alt + '}';
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('pics').value = data_to_post;
|
||||
|
||||
SirTrevor.onBeforeSubmit();
|
||||
document.getElementById("contentForm").submit();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
function removePrePic(actual_pic)
|
||||
{
|
||||
return (elem=document.getElementById('pic_element' + actual_pic)).parentNode.removeChild(elem);
|
||||
}
|
||||
function removePic(id_in)
|
||||
{
|
||||
n = id_in.split('delete');
|
||||
actual_pic = n[1];
|
||||
return (elem=document.getElementById('pic_element' + actual_pic)).parentNode.removeChild(elem);
|
||||
}
|
||||
|
||||
function addNewPic()
|
||||
{
|
||||
total_pics++;
|
||||
|
||||
|
||||
new_div = document.createElement('div');
|
||||
new_div.className = 'panel panel-default';
|
||||
new_div.id = 'pic_element' + total_pics;
|
||||
|
||||
new_div_holder = document.createElement('div');
|
||||
new_div_holder.className = 'panel-body';
|
||||
new_div_holder.id = 'element' + total_pics;
|
||||
|
||||
|
||||
new_form_holder = document.createElement('div');
|
||||
new_form_holder.className = 'form-group';
|
||||
new_form_holder.id = 'pic' + total_pics;
|
||||
|
||||
|
||||
new_form_holder2 = document.createElement('div');
|
||||
new_form_holder2.className = 'form-group';
|
||||
new_form_holder2.id = 'pic2' + total_pics;
|
||||
|
||||
new_form_holder3 = document.createElement('div');
|
||||
new_form_holder3.className = 'form-group';
|
||||
new_form_holder3.id = 'pic2' + total_pics;
|
||||
|
||||
new_label = document.createElement('div');
|
||||
new_label.for = 'file_upload' + total_pics;
|
||||
new_label.className = 'panel-heading';
|
||||
|
||||
new_span = document.createElement('span');
|
||||
new_span.innerHTML = '<?php echo $this->lang->line('pages_slider_title'); ?>';
|
||||
|
||||
new_button = document.createElement('button');
|
||||
new_button.type = 'button';
|
||||
new_button.className = 'close';
|
||||
new_button.id = 'delete' + total_pics;
|
||||
new_button.innerHTML = '×';
|
||||
new_button.onclick = function(){ removePic(this.id); }
|
||||
|
||||
new_label.appendChild(new_span);
|
||||
new_label.appendChild(new_button);
|
||||
|
||||
new_div2 = document.createElement('div');
|
||||
new_div2.className = 'controls';
|
||||
|
||||
new_div3 = document.createElement('div');
|
||||
|
||||
new_img = document.createElement('img');
|
||||
new_img.id = 'logo_preloaded' + total_pics;
|
||||
new_img.style.display = 'none';
|
||||
|
||||
new_div3.appendChild(new_img);
|
||||
|
||||
new_img2 = document.createElement('img');
|
||||
new_img2.id = 'loading_pic' + total_pics;
|
||||
new_img2.src = '<?php echo BASE_URL; ?>/theme/admin/images/ajax-loader.gif';
|
||||
new_img2.style.margin = '-7px 5px 0 5px';
|
||||
new_img2.style.display = 'none';
|
||||
|
||||
new_file = document.createElement('input');
|
||||
new_file.type = 'file';
|
||||
new_file.name = 'file_upload' + total_pics;
|
||||
new_file.id = 'file_upload' + total_pics;
|
||||
|
||||
new_hidden = document.createElement('input');
|
||||
new_hidden.type = 'hidden';
|
||||
new_hidden.id = 'slide' + total_pics;
|
||||
new_hidden.name = 'slide' + total_pics;
|
||||
|
||||
new_alt_span = document.createElement('label');
|
||||
new_alt_span.innerHTML = '<?php echo $this->lang->line('pages_slider_alt'); ?>';
|
||||
|
||||
|
||||
new_alt = document.createElement('input');
|
||||
new_alt.type = 'text';
|
||||
new_alt.id = 'alt' + total_pics;
|
||||
new_alt.name = 'alt' + total_pics;
|
||||
new_alt.className = 'form-control';
|
||||
|
||||
new_link_span = document.createElement('label');
|
||||
new_link_span.innerHTML = '<?php echo $this->lang->line('pages_slider_link'); ?>';
|
||||
|
||||
new_link = document.createElement('input');
|
||||
new_link.type = 'text';
|
||||
new_link.id = 'link' + total_pics;
|
||||
new_link.name = 'link' + total_pics;
|
||||
new_link.className = 'form-control';
|
||||
|
||||
new_form_holder.appendChild(new_alt_span);
|
||||
new_form_holder.appendChild(new_alt);
|
||||
|
||||
new_form_holder2.appendChild(new_link_span);
|
||||
new_form_holder2.appendChild(new_link);
|
||||
|
||||
|
||||
new_form_holder3.appendChild(new_file);
|
||||
|
||||
new_div2.appendChild(new_div3);
|
||||
new_div2.appendChild(new_img2);
|
||||
new_div2.appendChild(new_form_holder3);
|
||||
new_div2.appendChild(new_form_holder);
|
||||
new_div2.appendChild(new_form_holder2);
|
||||
new_div2.appendChild(new_hidden);
|
||||
|
||||
new_div_holder.appendChild(new_div2);
|
||||
|
||||
new_div.appendChild(new_label);
|
||||
new_div.appendChild(new_div_holder);
|
||||
|
||||
document.getElementById('pic_container').appendChild(new_div);
|
||||
|
||||
$('input[type=file]').on('change', prepareUpload);
|
||||
}
|
||||
|
||||
function prepareUpload(event)
|
||||
{
|
||||
files = event.target.files;
|
||||
uploadFiles(event, this.id);
|
||||
}
|
||||
|
||||
function uploadFiles(event, id_in)
|
||||
{
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
||||
n = id_in.split('file_upload');
|
||||
actual_pic = n[1];
|
||||
|
||||
$('#loading_pic' + actual_pic).show();
|
||||
|
||||
var data = new FormData();
|
||||
$.each(files, function(key, value){ data.append(key, value); });
|
||||
|
||||
$.ajax({
|
||||
url: '<?php echo BASE_URL; ?>/admin/settings/submit/?files',
|
||||
type: 'POST',
|
||||
data: data,
|
||||
cache: false,
|
||||
dataType: 'json',
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(data, textStatus, jqXHR){
|
||||
if(data!='0')
|
||||
{
|
||||
$('#logo_preloaded' + actual_pic).show();
|
||||
document.getElementById('logo_preloaded' + actual_pic).src = '<?php echo BASE_URL; ?>/uploads/' + data;
|
||||
document.getElementById('slide' + actual_pic).value = data;
|
||||
$('#loading_pic' + actual_pic).hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
alert('Error! The file is not an image.');
|
||||
$('#loading_pic' + actual_pic).hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function submitForm(event, data)
|
||||
{
|
||||
$form = $(event.target);
|
||||
var formData = $form.serialize();
|
||||
$.each(data.files, function(key, value){ formData = formData + '&filenames[]=' + value; });
|
||||
|
||||
$.ajax({
|
||||
url: '<?php echo BASE_URL; ?>/admin/settings/submit',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
cache: false,
|
||||
dataType: 'json',
|
||||
success: function(data, textStatus, jqXHR){
|
||||
if(typeof data.error === 'undefined')
|
||||
console.log('SUCCESS: ' + data.success);
|
||||
else
|
||||
console.log('ERRORS: ' + data.error);
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown){
|
||||
console.log('ERRORS: ' + textStatus);
|
||||
},
|
||||
complete: function()
|
||||
{
|
||||
$('#loading_pic').hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var files;
|
||||
$('input[type=file]').on('change', prepareUpload);
|
||||
|
||||
var total_pics;
|
||||
total_pics = <?php echo $i; ?>;
|
||||
</script>
|
||||
<?php echo $footer; ?>
|
||||
62
application/views/admin/login.php
Executable file
62
application/views/admin/login.php
Executable file
@@ -0,0 +1,62 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="login-panel panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<img src="<?php echo ADMIN_THEME; ?>/images/logo.svg" class="login_logo" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php if (isset($error)){
|
||||
if ($error == "1"){
|
||||
echo "<div class='alert alert-danger'>".$this->lang->line('login_incorrect')."</div>";
|
||||
}
|
||||
} ?>
|
||||
<?php echo form_open(BASE_URL.'/admin/login/check'); ?>
|
||||
<fieldset>
|
||||
<div class="form-group">
|
||||
<label for="username"><?php echo $this->lang->line('login_username'); ?></label>
|
||||
<?php $data = array(
|
||||
'name' => 'username',
|
||||
'id' => 'username',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('username'),
|
||||
'placeholder' => $this->lang->line('login_username')
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password"><?php echo $this->lang->line('login_password'); ?>:</label>
|
||||
<?php $data = array(
|
||||
'name' => 'password',
|
||||
'id' => 'password',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('password'),
|
||||
'placeholder' => $this->lang->line('login_password')
|
||||
);
|
||||
|
||||
echo form_password($data); ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input type="submit" class="btn btn-success btn-block" value="<?php echo $this->lang->line('login_signin'); ?>">
|
||||
</div>
|
||||
<hr>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/user/forgot"><?php echo $this->lang->line('login_reset'); ?></a>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- jQuery -->
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/jquery.js"></script>
|
||||
|
||||
<!-- Bootstrap Core JavaScript -->
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/bootstrap.min.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
3
application/views/admin/nav_add.php
Executable file
3
application/views/admin/nav_add.php
Executable file
@@ -0,0 +1,3 @@
|
||||
<?php foreach ($page as $p){
|
||||
echo "<li class='dd-item' data-href='".$p['pageURL']."' data-title='".$p['navTitle']."'><a class='right' onclick='var li = this.parentNode; var ul = li.parentNode; ul.removeChild(li);'><i class='fa fa-remove'></i></a><div class='dd-handle'>".$p['navTitle']."</div></li>";
|
||||
}?>
|
||||
18
application/views/admin/nav_delete.php
Executable file
18
application/views/admin/nav_delete.php
Executable file
@@ -0,0 +1,18 @@
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title"><?php echo $this->lang->line('menu_delete').": ".$form[0]['navTitle'] ?>?</h4>
|
||||
</div> <!-- /modal-header -->
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-danger" role="alert"><strong>WARNING: </strong><?php if ($form[0]['navSlug'] == "header") { echo '<p>'.$this->lang->line('menu_delete_message_header').'</p>'; } else {
|
||||
echo '<p>'.$this->lang->line('menu_delete_message').'</p>';
|
||||
} ?></div>
|
||||
</div> <!-- /modal-body -->
|
||||
<div class="modal-footer">
|
||||
<form ACTION="<?php echo BASE_URL.'/admin/navigation/delete/'.$form[0]['navSlug']; ?>" method="POST" name="pageform" id="pageform">
|
||||
<input name="deleteid" type="hidden" id="deleteid" value="<?php echo $form[0]['navSlug'] ?>" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo $this->lang->line('btn_cancel'); ?></button>
|
||||
<?php if ($form[0]['navSlug'] != "header") { ?>
|
||||
<input class="btn btn-danger" type="submit" value="<?php echo $this->lang->line('btn_delete'); ?>"/>
|
||||
<?php } ?>
|
||||
</form>
|
||||
</div> <!-- /modal-footer -->
|
||||
303
application/views/admin/nav_edit.php
Executable file
303
application/views/admin/nav_edit.php
Executable file
@@ -0,0 +1,303 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?php echo $this->lang->line('menu_new_nav'); ?>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-list-alt"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/navigation"><?php echo $this->lang->line('menu_header'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-pencil"></i>
|
||||
<?php echo $this->lang->line('menu_new_pages'); ?>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<i class="fa fa-pencil fa-fw"></i>
|
||||
<?php echo $this->lang->line('menu_new_pages'); ?>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php foreach ($nav as $n) { ?>
|
||||
<div class="form-group">
|
||||
|
||||
<?php $attr = array('id' => 'navForm');
|
||||
echo form_open(BASE_URL.'/admin/navigation/update/'.$n['navSlug'], $attr); ?>
|
||||
|
||||
<label class="control-label" for="pageTitle"><?php echo $this->lang->line('menu_new_nav_slug'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'navSlug',
|
||||
'id' => 'navSlug',
|
||||
'class' => 'form-control URLField disabled',
|
||||
'disabled' => '',
|
||||
'value' => set_value('navSlug', $n['navSlug'])
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('navTitle', '<div class="alert">', '</div>'); ?>
|
||||
<label class="control-label" for="navTitle"><?php echo $this->lang->line('menu_new_nav_title'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'navTitle',
|
||||
'id' => 'navTitle',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('navTitle', $n['navTitle'])
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<hr />
|
||||
<h3><?php echo $this->lang->line('menu_new_add_page'); ?></h3>
|
||||
<hr />
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="pagesList"><?php echo $this->lang->line('menu_new_select_page'); ?></label>
|
||||
<div class="controls">
|
||||
|
||||
<?php $att = 'id="pagesList" class="form-control"';
|
||||
$data = array();
|
||||
foreach ($pages as $p){
|
||||
$data[$p['pageURL']] = $p['navTitle'];
|
||||
}
|
||||
echo form_dropdown('pagesList', $data, '1', $att); ?>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<div class="form-group">
|
||||
<div class="controls">
|
||||
<a class="btn btn-primary" onClick="addNav()"><?php echo $this->lang->line('btn_add'); ?></a>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<hr />
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="customlinkTitle"><?php echo $this->lang->line('menu_new_custom_title'); ?></label>
|
||||
<div class="controls">
|
||||
|
||||
<input type="text" id="customlinkTitle" value="" class="form-control"/>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="customURLHREF"><?php echo $this->lang->line('menu_new_custom_link'); ?></label>
|
||||
<div class="controls">
|
||||
|
||||
<input type="text" id="customURLHREF" value="http://" class="form-control" />
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<div class="form-group">
|
||||
<div class="controls">
|
||||
<a class="btn btn-primary" onClick="addCustomURL()"><?php echo $this->lang->line('btn_add'); ?></a>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<hr />
|
||||
<h3><?php echo $this->lang->line('menu_new_drop_down'); ?></h3>
|
||||
<hr />
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="parent"><?php echo $this->lang->line('menu_new_drop_title'); ?></label>
|
||||
<div class="controls">
|
||||
<input type="text" id="parentTitle" value="" class="form-control"/>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="parent"><?php echo $this->lang->line('menu_new_drop_link'); ?></label>
|
||||
<div class="controls">
|
||||
<input type="text" id="parentSlug" value="" class="form-control URLField"/>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<div class="form-group">
|
||||
<div class="controls">
|
||||
<a class="btn btn-primary" onClick="addDropDown()"><?php echo $this->lang->line('btn_add'); ?></a>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<?php echo $this->lang->line('menu_new_nav'); ?>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="dd" id="navHolder">
|
||||
<ul class="dd-list" id="mainNav">
|
||||
<?php echo $n['navEdit'] ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<input type="hidden" id="seriaNav" name="seriaNav"/>
|
||||
<input type="hidden" name="convertedNav" id="convertedNav"/>
|
||||
<div class="controls">
|
||||
<a class="btn btn-primary" onClick="serializeNav()"><?php echo $this->lang->line('btn_save'); ?></a>
|
||||
</div> <!-- /controls -->
|
||||
<?php echo form_close() ?>
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
</div>
|
||||
<!-- /widget -->
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /row -->
|
||||
</div>
|
||||
<!-- /container -->
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function addNav(){
|
||||
var navHolder = document.getElementById("mainNav").innerHTML;
|
||||
var navSelected = $('#pagesList').val();
|
||||
$.ajax({
|
||||
url: "<?php echo BASE_URL; ?>/admin/navadd/" + navSelected,
|
||||
type: "POST",
|
||||
success: function(html){
|
||||
var navContainer = $('#navContainer'); //jquery selector (get element by id)
|
||||
if(html){
|
||||
document.getElementById("mainNav").innerHTML += html;
|
||||
}
|
||||
},
|
||||
error: function (html){
|
||||
alert('error');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function addCustomURL(){
|
||||
var navHolder = document.getElementById("mainNav").innerHTML;
|
||||
var customlinkTitle = document.getElementById("customlinkTitle").value;
|
||||
var customURLHREF = document.getElementById("customURLHREF").value;
|
||||
if (customlinkTitle != ""){
|
||||
newLink = "<li class='dd-item' data-href='" + customURLHREF +"' data-title='" + customlinkTitle +"' data-type='1'><a class='right' onclick='var li = this.parentNode; var ul = li.parentNode; ul.removeChild(li);'><i class='fa fa-remove'></i></a><div class='dd-handle'>" + customlinkTitle +"</div></li>";
|
||||
document.getElementById("mainNav").innerHTML += newLink;
|
||||
}
|
||||
}
|
||||
|
||||
function addDropDown(){
|
||||
var navHolder = document.getElementById("mainNav").innerHTML;
|
||||
var parentTitle = document.getElementById("parentTitle").value;
|
||||
var parentSlug = document.getElementById("parentSlug").value;
|
||||
var regexp = /^[a-zA-Z0-9-_]+$/;
|
||||
if (parentSlug.search(regexp) == -1)
|
||||
{ alert('<?php echo $this->lang->line('menu_new_drop_error'); ?>'); }
|
||||
else
|
||||
{
|
||||
if (parentTitle != "" && parentSlug != ""){
|
||||
newLink = "<li class='dd-item parent' data-href='" + parentSlug + "' data-title='" + parentTitle +"'><a class='right' onclick='var li = this.parentNode; var ul = li.parentNode; ul.removeChild(li);'><i class='fa fa-remove'></i></a><div class='dd-handle'>" + parentTitle +" <b class='caret dd-caret'></b></div></li>";
|
||||
document.getElementById("mainNav").innerHTML += newLink;
|
||||
}}
|
||||
}
|
||||
|
||||
function updateOutput(e)
|
||||
{
|
||||
var list = e.length ? e : $(e.target),
|
||||
output = list.data('output');
|
||||
if (window.JSON) {
|
||||
output.val(window.JSON.stringify(list.nestable('serialize')));//, null, 2));
|
||||
} else {
|
||||
output.val('JSON browser support required for this demo.');
|
||||
}
|
||||
};
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
|
||||
|
||||
|
||||
// activate Nestable for list 1
|
||||
$('.dd').nestable({
|
||||
group: 1,
|
||||
listNodeName:'ul',
|
||||
maxDepth: 2,
|
||||
})
|
||||
.on('change', updateOutput);
|
||||
// output initial serialised data
|
||||
updateOutput($('.dd').data('output', $('#seriaNav')));
|
||||
});
|
||||
|
||||
function serializeNav(){
|
||||
|
||||
$.ajax({
|
||||
url: "/admin/check/session",
|
||||
}).done(function(data) {
|
||||
sessionExist = data;
|
||||
if(sessionExist==0){
|
||||
$('.modal').modal('hide');
|
||||
$('#loginModal').modal({
|
||||
backdrop: 'static',
|
||||
keyboard: false
|
||||
}).modal('show');
|
||||
} else {
|
||||
updateOutput($('.dd').data('output', $('#seriaNav')));
|
||||
var jsn = JSON.parse(document.getElementById('seriaNav').value);
|
||||
var parentHREF = '';
|
||||
var parseJsonAsHTMLTree = function(jsn) {
|
||||
var result = '';
|
||||
|
||||
jsn.forEach(function(item) {
|
||||
if (item.title && item.children) {
|
||||
result += '<li class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">' + item.title + '<b class="caret"></b></a><ul class="dropdown-menu">';
|
||||
parentHREF = item.href;
|
||||
result += parseJsonAsHTMLTree(item.children);
|
||||
parentHREF = "";
|
||||
result += '</ul></li>';
|
||||
} else {
|
||||
if (parentHREF == ""){
|
||||
if (item.href != "home"){
|
||||
if (item.type != "1"){
|
||||
result += '<li><a href="/' + item.href + '">' + item.title + '</a></li>';
|
||||
} else {
|
||||
result += '<li><a href="' + item.href + '">' + item.title + '</a></li>';
|
||||
}
|
||||
} else {
|
||||
result += '<li><a href="<?php echo BASE_URL; ?>">' + item.title + '</a></li>';
|
||||
}
|
||||
} else {
|
||||
if (item.type != "1"){
|
||||
result += '<li><a href="/' + parentHREF + "/" + item.href + '">' + item.title + '</a></li>';
|
||||
} else {
|
||||
result += '<li><a href="' + item.href + '">' + item.title + '</a></li>';
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return result + '';
|
||||
};
|
||||
|
||||
var result = '<ul class="nav navbar-nav">' + parseJsonAsHTMLTree(jsn) + '</ul>';
|
||||
document.getElementById('convertedNav').value = result;
|
||||
document.getElementById('seriaNav').value = document.getElementById("mainNav").innerHTML;
|
||||
document.getElementById("navForm").submit();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<?php echo $footer; ?>
|
||||
297
application/views/admin/nav_new.php
Executable file
297
application/views/admin/nav_new.php
Executable file
@@ -0,0 +1,297 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?php echo $this->lang->line('menu_new_nav'); ?>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-list-alt"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/navigation"><?php echo $this->lang->line('menu_header'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-pencil"></i>
|
||||
<?php echo $this->lang->line('menu_new_pages'); ?>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<i class="fa fa-pencil fa-fw"></i>
|
||||
<?php echo $this->lang->line('menu_new_pages'); ?>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
|
||||
<?php $attr = array('id' => 'navForm');
|
||||
echo form_open(BASE_URL.'/admin/navigation/insert', $attr); ?>
|
||||
|
||||
<?php echo form_error('navSlug', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label" for="navSlug"><?php echo $this->lang->line('menu_new_nav_slug'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'navSlug',
|
||||
'id' => 'navSlug',
|
||||
'class' => 'form-control URLField',
|
||||
'maxlength' => '10',
|
||||
'value' => set_value('navSlug', '', FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('navTitle', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label" for="navTitle"><?php echo $this->lang->line('menu_new_nav_title'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'navTitle',
|
||||
'id' => 'navTitle',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('navTitle', '', FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<hr />
|
||||
<h3><?php echo $this->lang->line('menu_new_add_page'); ?></h3>
|
||||
<hr />
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="pagesList"><?php echo $this->lang->line('menu_new_select_page'); ?></label>
|
||||
<div class="controls">
|
||||
|
||||
<?php $att = 'id="pagesList" class="form-control"';
|
||||
$data = array();
|
||||
foreach ($pages as $p){
|
||||
$data[$p['pageURL']] = $p['navTitle'];
|
||||
}
|
||||
echo form_dropdown('pagesList', $data, '1', $att); ?>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<div class="form-group">
|
||||
<div class="controls">
|
||||
<a class="btn btn-primary" onClick="addNav()"><?php echo $this->lang->line('btn_add'); ?></a>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<hr />
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="customlinkTitle"><?php echo $this->lang->line('menu_new_custom_title'); ?></label>
|
||||
<div class="controls">
|
||||
|
||||
<input type="text" id="customlinkTitle" value="" class="form-control" />
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="customURLHREF"><?php echo $this->lang->line('menu_new_custom_link'); ?></label>
|
||||
<div class="controls">
|
||||
|
||||
<input type="text" id="customURLHREF" value="http://" class="form-control" />
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<div class="form-group">
|
||||
<div class="controls">
|
||||
<a class="btn btn-primary" onClick="addCustomURL()"><?php echo $this->lang->line('btn_add'); ?></a>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<hr />
|
||||
<h3><?php echo $this->lang->line('menu_new_drop_down'); ?></h3>
|
||||
<hr />
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="parent"><?php echo $this->lang->line('menu_new_drop_title'); ?></label>
|
||||
<div class="controls">
|
||||
<input type="text" id="parentTitle" value="" class="form-control" />
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="parent"><?php echo $this->lang->line('menu_new_drop_link'); ?></label>
|
||||
<div class="controls">
|
||||
<input type="text" id="parentSlug" value="" class="form-control URLField" />
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<div class="form-group">
|
||||
<div class="controls">
|
||||
<a class="btn btn-primary" onClick="addDropDown()"><?php echo $this->lang->line('btn_add'); ?></a>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<?php echo $this->lang->line('menu_new_nav'); ?>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="dd" id="navHolder">
|
||||
<ul class="dd-list list-group" id="mainNav">
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<input type="hidden" id="seriaNav" name="seriaNav"/>
|
||||
<input type="hidden" name="convertedNav" id="convertedNav"/>
|
||||
<div class="controls">
|
||||
<a class="btn btn-primary" onClick="serializeNav()"><?php echo $this->lang->line('btn_save'); ?></a>
|
||||
</div> <!-- /controls -->
|
||||
<?php echo form_close() ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /row -->
|
||||
</div>
|
||||
<!-- /container -->
|
||||
<script type="text/javascript">
|
||||
|
||||
function addNav(){
|
||||
var navHolder = document.getElementById("mainNav").innerHTML;
|
||||
var navSelected = $('#pagesList').val();
|
||||
$.ajax({
|
||||
url: "<?php echo BASE_URL; ?>/admin/navadd/" + navSelected,
|
||||
type: "POST",
|
||||
success: function(html){
|
||||
var navContainer = $('#navContainer'); //jquery selector (get element by id)
|
||||
if(html){
|
||||
document.getElementById("mainNav").innerHTML += html;
|
||||
}
|
||||
},
|
||||
error: function (html){
|
||||
alert('error');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function addCustomURL(){
|
||||
var navHolder = document.getElementById("mainNav").innerHTML;
|
||||
var customlinkTitle = document.getElementById("customlinkTitle").value;
|
||||
var customURLHREF = document.getElementById("customURLHREF").value;
|
||||
if (customlinkTitle != ""){
|
||||
newLink = "<li class='dd-item' data-href='" + customURLHREF +"' data-title='" + customlinkTitle +"' data-type='1'><a class='right' onclick='var li = this.parentNode; var ul = li.parentNode; ul.removeChild(li);'><i class='fa fa-remove'></i></a><div class='dd-handle'>" + customlinkTitle +"</div></li>";
|
||||
document.getElementById("mainNav").innerHTML += newLink;
|
||||
}
|
||||
}
|
||||
|
||||
function addDropDown(){
|
||||
var navHolder = document.getElementById("mainNav").innerHTML;
|
||||
var parentTitle = document.getElementById("parentTitle").value;
|
||||
var parentSlug = document.getElementById("parentSlug").value;
|
||||
var regexp = /^[a-zA-Z0-9-_]+$/;
|
||||
if (parentSlug.search(regexp) == -1)
|
||||
{ alert('<?php echo $this->lang->line('menu_new_drop_error'); ?>'); }
|
||||
else
|
||||
{
|
||||
if (parentTitle != "" && parentSlug != ""){
|
||||
newLink = "<li class='dd-item parent' data-href='" + parentSlug + "' data-title='" + parentTitle +"'><a class='right' onclick='var li = this.parentNode; var ul = li.parentNode; ul.removeChild(li);'><i class='fa fa-remove'></i></a><div class='dd-handle'>" + parentTitle +" <b class='fa fa-caret-down'></b></div></li>";
|
||||
document.getElementById("mainNav").innerHTML += newLink;
|
||||
}}
|
||||
}
|
||||
|
||||
function updateOutput(e)
|
||||
{
|
||||
var list = e.length ? e : $(e.target),
|
||||
output = list.data('output');
|
||||
if (window.JSON) {
|
||||
output.val(window.JSON.stringify(list.nestable('serialize')));//, null, 2));
|
||||
} else {
|
||||
output.val('JSON browser support required for this demo.');
|
||||
}
|
||||
};
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
|
||||
|
||||
|
||||
// activate Nestable for list 1
|
||||
$('.dd').nestable({
|
||||
group: 1,
|
||||
listNodeName:'ul',
|
||||
maxDepth: 2,
|
||||
})
|
||||
.on('change', updateOutput);
|
||||
// output initial serialised data
|
||||
updateOutput($('.dd').data('output', $('#seriaNav')));
|
||||
});
|
||||
|
||||
function serializeNav(){
|
||||
|
||||
$.ajax({
|
||||
url: "/admin/check/session",
|
||||
}).done(function(data) {
|
||||
sessionExist = data;
|
||||
if(sessionExist==0){
|
||||
$('.modal').modal('hide');
|
||||
$('#loginModal').modal({
|
||||
backdrop: 'static',
|
||||
keyboard: false
|
||||
}).modal('show');
|
||||
} else {
|
||||
updateOutput($('.dd').data('output', $('#seriaNav')));
|
||||
var jsn = JSON.parse(document.getElementById('seriaNav').value);
|
||||
var parentHREF = '';
|
||||
var parseJsonAsHTMLTree = function(jsn) {
|
||||
var result = '';
|
||||
|
||||
jsn.forEach(function(item) {
|
||||
if (item.title && item.children) {
|
||||
result += '<li class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">' + item.title + '<b class="caret"></b></a><ul class="dropdown-menu">';
|
||||
parentHREF = item.href;
|
||||
result += parseJsonAsHTMLTree(item.children);
|
||||
parentHREF = "";
|
||||
result += '</ul></li>';
|
||||
} else {
|
||||
if (parentHREF == ""){
|
||||
if (item.href != "home"){
|
||||
if (item.type != "1"){
|
||||
result += '<li><a href="/' + item.href + '">' + item.title + '</a></li>';
|
||||
} else {
|
||||
result += '<li><a href="' + item.href + '">' + item.title + '</a></li>';
|
||||
}
|
||||
} else {
|
||||
result += '<li><a href="<?php echo BASE_URL; ?>">' + item.title + '</a></li>';
|
||||
}
|
||||
} else {
|
||||
if (item.type != "1"){
|
||||
result += '<li><a href="/' + parentHREF + "/" + item.href + '">' + item.title + '</a></li>';
|
||||
} else {
|
||||
result += '<li><a href="' + item.href + '">' + item.title + '</a></li>';
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return result + '';
|
||||
};
|
||||
|
||||
var result = '<ul class="nav navbar-nav">' + parseJsonAsHTMLTree(jsn) + '</ul>';
|
||||
document.getElementById('convertedNav').value = result;
|
||||
document.getElementById('seriaNav').value = document.getElementById("mainNav").innerHTML;
|
||||
document.getElementById("navForm").submit();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<?php echo $footer; ?>
|
||||
49
application/views/admin/navigation.php
Executable file
49
application/views/admin/navigation.php
Executable file
@@ -0,0 +1,49 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?php echo $this->lang->line('menu_header'); ?>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-list-alt"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/navigation"><?php echo $this->lang->line('menu_header'); ?></a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> <?php echo $this->lang->line('menu_table_title'); ?> </th>
|
||||
<th class="td-actions"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($nav as $n):?>
|
||||
<tr>
|
||||
<td><?php echo $n['navTitle']?></td>
|
||||
<td class="td-actions">
|
||||
<a href="<?php echo BASE_URL; ?>/admin/navigation/edit/<?php echo $n['navSlug']?>" class="btn btn-small btn-success"><i class="fa fa-pencil"> </i></a>
|
||||
<a data-toggle="modal" data-target="#ajaxModal" class="btn btn-danger btn-small" href="<?php echo BASE_URL.'/admin/navigation/delete/'.$n['navSlug']; ?>"><i class="fa fa-remove"> </i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php echo $this->pagination->create_links(); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo $footer; ?>
|
||||
18
application/views/admin/page_delete.php
Executable file
18
application/views/admin/page_delete.php
Executable file
@@ -0,0 +1,18 @@
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title"><?php echo $this->lang->line('pages_delete').": ".$form[0]['navTitle'] ?>?</h4>
|
||||
</div> <!-- /modal-header -->
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-danger" role="alert"><strong>WARNING: </strong><?php if ($form[0]['pageID'] == "1") { echo '<p>'.$this->lang->line('pages_delete_home').'</p>'; } else {
|
||||
echo '<p>'.$this->lang->line('pages_delete_message').'</p>';
|
||||
} ?></div>
|
||||
</div> <!-- /modal-body -->
|
||||
<div class="modal-footer">
|
||||
<form ACTION="<?php echo BASE_URL.'/admin/pages/delete/'.$form[0]['pageID']; ?>" method="POST" name="pageform" id="pageform">
|
||||
<input name="deleteid" type="hidden" id="deleteid" value="<?php echo $form[0]['pageID'] ?>" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo $this->lang->line('btn_cancel'); ?></button>
|
||||
<?php if ($form[0]['pageID'] != "1") { ?>
|
||||
<input class="btn btn-danger" type="submit" value="<?php echo $this->lang->line('btn_delete'); ?>"/>
|
||||
<?php } ?>
|
||||
</form>
|
||||
</div> <!-- /modal-footer -->
|
||||
296
application/views/admin/page_edit.php
Executable file
296
application/views/admin/page_edit.php
Executable file
@@ -0,0 +1,296 @@
|
||||
<?php echo $header; ?>
|
||||
<link href="<?php echo ADMIN_THEME; ?>/js/trevor/sir-trevor.css" rel="stylesheet">
|
||||
<link href="<?php echo ADMIN_THEME; ?>/js/trevor/sir-trevor-bootstrap.css" rel="stylesheet">
|
||||
<link href="<?php echo ADMIN_THEME; ?>/js/trevor/sir-trevor-icons.css" rel="stylesheet">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?php echo $this->lang->line('pages_edit_header'); ?>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-fw fa-file"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/pages"><?php echo $this->lang->line('nav_pages_all'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-pencil"></i>
|
||||
<?php echo $this->lang->line('pages_edit_header'); ?>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<?php echo form_error('pageTitle', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<?php echo form_error('pageURL', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<i class="fa fa-pencil fa-fw"></i>
|
||||
<?php echo $this->lang->line('pages_edit_header'); ?>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
||||
<?php foreach ($pages as $p) {?>
|
||||
|
||||
<?php
|
||||
$attr = array('id' => 'contentForm');
|
||||
echo form_open(BASE_URL.'/admin/pages/edited/'.$this->uri->segment(4), $attr); ?>
|
||||
<?php $data = array(
|
||||
'id' => 'content',
|
||||
'name' => 'content',
|
||||
'class' => 'js-st-instance',
|
||||
);
|
||||
|
||||
if ($this->input->post('content')){
|
||||
$set = $this->input->post('content');
|
||||
} else {
|
||||
$set = $p['pageContent'];
|
||||
}
|
||||
echo form_textarea($data, set_value('content',$set, FALSE)); ?>
|
||||
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<a class="btn btn-primary" data-toggle="modal"
|
||||
href="#attributes"><?php echo $this->lang->line('btn_next'); ?></a>
|
||||
<a class="btn"
|
||||
href="<?php echo BASE_URL; ?>/admin/pages"><?php echo $this->lang->line('btn_cancel'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="attributes" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title"><?php echo $this->lang->line('pages_new_attributes'); ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group">
|
||||
<div class="alert alert-info"><?php echo $this->lang->line('pages_new_required'); ?>
|
||||
</div>
|
||||
<?php echo form_error('pageTitle', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="pageTitle"><?php echo $this->lang->line('pages_new_title'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'pageTitle',
|
||||
'id' => 'pageTitle',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('pageTitle', $p['pageTitle'], FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('categoryID', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="categoryID"><?php echo $this->lang->line('cat_new_title'); ?></label>
|
||||
<div class="controls">
|
||||
<?php
|
||||
$att = 'id="categoryID" class="form-control"';
|
||||
$data = array('0'=>'Select Category');
|
||||
foreach ($categories as $ca){
|
||||
$data[$ca['categoryID']] = $ca['categoryTitle'];
|
||||
}
|
||||
echo form_dropdown('categoryID', $data, $p['categoryID'], $att);
|
||||
?>
|
||||
</div>
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('navTitle', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="navTitle"><?php echo $this->lang->line('pages_new_nav'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'navTitle',
|
||||
'id' => 'navTitle',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('navTitle', $p['navTitle'], FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"
|
||||
for="pageKeywords"><?php echo $this->lang->line('pages_new_keywords'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'pageKeywords',
|
||||
'id' => 'pageKeywords',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('pageKeywords', $p['pageKeywords'], FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"
|
||||
for="pageDescription"><?php echo $this->lang->line('pages_new_description'); ?></label>
|
||||
<div class="controls">
|
||||
<?php
|
||||
$data = array(
|
||||
'name' => 'pageDescription',
|
||||
'id' => 'pageDescription',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('pageDescription', $p['pageDescription'], FALSE)
|
||||
);
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('pageIcon', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="pageIcon"><?php echo $this->lang->line('posts_new_feature'); ?></label>
|
||||
<div class="controls">
|
||||
<div><img
|
||||
src="<?php if ($p['pageIcon'] != "") { echo BASE_URL.'/images/'.$p['pageIcon']; } ?>"
|
||||
id="logo_preloaded"
|
||||
<?php if ($p['pageIcon'] == "") { echo "style='display:none;'"; } ?>></div>
|
||||
<img src="<?php echo BASE_URL; ?>/theme/admin/images/ajax-loader.gif"
|
||||
style="margin:-7px 5px 0 5px;display:none;" id="loading_pic" />
|
||||
<?php
|
||||
$data = array(
|
||||
'name' => 'pageIcon',
|
||||
'id' => 'pageIcon',
|
||||
'class' => 'form-control'
|
||||
);
|
||||
echo form_upload($data);
|
||||
?>
|
||||
<input type="hidden" id="pageIcon" name="pageIcon" />
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('pageURL', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="pageURL"><?php echo $this->lang->line('pages_new_url'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'pageURL',
|
||||
'id' => 'pageURL',
|
||||
'value' => set_value('pageURL', $p['pageURL'], FALSE)
|
||||
);
|
||||
if ($p['pageURL'] == "home") { $data['disabled'] = ""; $data['class'] = "form-control URLField disabled"; } else { $data['class'] = "form-control URLField"; }
|
||||
|
||||
echo form_input($data); ?>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('pagePublished', '<div class="alert">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="pagePublished"><?php echo $this->lang->line('pages_new_publish'); ?></label>
|
||||
<div class="controls">
|
||||
|
||||
<?php
|
||||
$att = 'id="pagePublished" class="form-control"';
|
||||
$data = array(
|
||||
'1' => $this->lang->line('option_yes'),
|
||||
'0' => $this->lang->line('option_no'),
|
||||
);
|
||||
|
||||
echo form_dropdown('pagePublished', $data, $p['pagePublished'], $att); ?>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('pageTemplate', '<div class="alert">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="pageTemplate"><?php echo $this->lang->line('pages_new_template'); ?></label>
|
||||
<div class="controls">
|
||||
|
||||
<?php
|
||||
|
||||
$att = 'id="pageTemplate" class="form-control"';
|
||||
$data = array();
|
||||
foreach ($templates as $t){
|
||||
$t = str_replace(".php", "", $t);
|
||||
if (($t != "header") && ($t != "footer") && ($t != "error") && ($t != "article") && ($t != "category") && ($t != "index.html")){
|
||||
$data[$t] = $t;
|
||||
}
|
||||
}
|
||||
|
||||
echo form_dropdown('pageTemplate', $data, $p['pageTemplate'], $att); ?>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn" data-dismiss="modal"
|
||||
aria-hidden="true"><?php echo $this->lang->line('btn_back'); ?></button>
|
||||
<a class="btn btn-primary"
|
||||
onClick="formSubmit()"><?php echo $this->lang->line('btn_save'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo form_close();
|
||||
} ?>
|
||||
</div>
|
||||
<!-- /colmd12 -->
|
||||
|
||||
</div>
|
||||
<!-- /row -->
|
||||
</div>
|
||||
<!-- /container -->
|
||||
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/trevor/underscore.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/trevor/eventable.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/trevor/sortable.min.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/trevor/sir-trevor.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/trevor/sir-trevor-bootstrap.js"></script>
|
||||
<script type="text/javascript">
|
||||
new SirTrevor.Editor({
|
||||
el: $('.js-st-instance'),
|
||||
blockTypes: ["Columns", "Heading", "Text", "ImageExtended", "Quote", "Accordion", "Button", "Video",
|
||||
"List", "Iframe"
|
||||
]
|
||||
});
|
||||
SirTrevor.onBeforeSubmit();
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
function formSubmit() {
|
||||
$.ajax({
|
||||
url: "/admin/check/session",
|
||||
}).done(function(data) {
|
||||
sessionExist = data;
|
||||
if (sessionExist == 0) {
|
||||
$('.modal').modal('hide');
|
||||
$('#loginModal').modal({
|
||||
backdrop: 'static',
|
||||
keyboard: false
|
||||
}).modal('show');
|
||||
} else {
|
||||
SirTrevor.onBeforeSubmit();
|
||||
document.getElementById("contentForm").submit();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<?php echo $footer; ?>
|
||||
233
application/views/admin/page_new.php
Executable file
233
application/views/admin/page_new.php
Executable file
@@ -0,0 +1,233 @@
|
||||
<?php echo $header; ?>
|
||||
<link href="<?php echo ADMIN_THEME; ?>/js/trevor/sir-trevor.css" rel="stylesheet">
|
||||
<link href="<?php echo ADMIN_THEME; ?>/js/trevor/sir-trevor-bootstrap.css" rel="stylesheet">
|
||||
<link href="<?php echo ADMIN_THEME; ?>/js/trevor/sir-trevor-icons.css" rel="stylesheet">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?php echo $this->lang->line('pages_new_header'); ?>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-fw fa-file"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/pages"><?php echo $this->lang->line('nav_pages_all'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-pencil"></i>
|
||||
<?php echo $this->lang->line('pages_new_header'); ?>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<?php echo form_error('pageTitle', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<?php echo form_error('pageURL', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<i class="fa fa-pencil fa-fw"></i>
|
||||
<?php echo $this->lang->line('pages_new_header'); ?>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
|
||||
<?php
|
||||
$attr = array('id' => 'contentForm');
|
||||
echo form_open(BASE_URL . '/admin/pages/new/add', $attr); ?>
|
||||
<?php $data = array(
|
||||
'name' => 'content',
|
||||
'id' => 'content',
|
||||
'class' => 'js-st-instance'
|
||||
);
|
||||
|
||||
echo form_textarea($data, set_value('content', $this->input->post('content'), FALSE)); ?>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<a class="btn btn-primary" data-toggle="modal" href="#attributes"><?php echo $this->lang->line('btn_next'); ?></a>
|
||||
<a class="btn" href="<?php echo BASE_URL; ?>/admin/pages"><?php echo $this->lang->line('btn_cancel'); ?></a>
|
||||
</div> <!-- /form-actions -->
|
||||
</div>
|
||||
|
||||
<div id="attributes" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title"><?php echo $this->lang->line('pages_new_attributes'); ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-info"><?php echo $this->lang->line('pages_new_required'); ?></div>
|
||||
<div class="form-group">
|
||||
<?php echo form_error('pageTitle', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label" for="pageTitle"><?php echo $this->lang->line('pages_new_title'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'pageTitle',
|
||||
'id' => 'pageTitle',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('pageTitle', '', FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('navTitle', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label" for="navTitle"><?php echo $this->lang->line('pages_new_nav'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'navTitle',
|
||||
'id' => 'navTitle',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('navTitle', '', FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="pageKeywords"><?php echo $this->lang->line('pages_new_keywords'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'pageKeywords',
|
||||
'id' => 'pageKeywords',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('pageKeywords', '', FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="pageDescription"><?php echo $this->lang->line('pages_new_description'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'pageDescription',
|
||||
'id' => 'pageDescription',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('pageDescription', '', FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('pageURL', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label" for="pageURL"><?php echo $this->lang->line('pages_new_url'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'pageURL',
|
||||
'id' => 'pageURL',
|
||||
'class' => 'form-control URLField',
|
||||
'value' => set_value('pageURL', '', FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('pagePublished', '<div class="alert">', '</div>'); ?>
|
||||
<label class="control-label" for="pagePublished"><?php echo $this->lang->line('pages_new_publish'); ?></label>
|
||||
<div class="controls">
|
||||
|
||||
<?php
|
||||
$att = 'id="pagePublished" class="form-control"';
|
||||
$data = array(
|
||||
'1' => $this->lang->line('option_yes'),
|
||||
'0' => $this->lang->line('option_no'),
|
||||
);
|
||||
|
||||
echo form_dropdown('pagePublished', $data, '1', $att); ?>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<div class="form-group">
|
||||
<?php echo form_error('pageTemplate', '<div class="alert">', '</div>'); ?>
|
||||
<label class="control-label" for="pageTemplate"><?php echo $this->lang->line('pages_new_template'); ?></label>
|
||||
<div class="controls">
|
||||
<?php
|
||||
$att = 'id="pageTemplate" class="form-control select2"';
|
||||
$data = array();
|
||||
foreach ($templates as $t) {
|
||||
$t = str_replace(".php", "", $t);
|
||||
if (($t != "header") && ($t != "footer") && ($t != "error") && ($t != "article") && ($t != "category") && ($t != "index.html")) {
|
||||
$data[$t] = $t;
|
||||
}
|
||||
}
|
||||
|
||||
echo form_dropdown('pageTemplate', $data, 'home', $att); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn" data-dismiss="modal" aria-hidden="true"><?php echo $this->lang->line('btn_back'); ?></button>
|
||||
<a class="btn btn-primary" onClick="formSubmit()"><?php echo $this->lang->line('btn_save'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo form_close(); ?>
|
||||
</div>
|
||||
<!-- /colmd12 -->
|
||||
|
||||
</div>
|
||||
<!-- /row -->
|
||||
</div>
|
||||
<!-- /container -->
|
||||
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/trevor/underscore.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/trevor/eventable.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/trevor/sortable.min.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/trevor/sir-trevor.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/trevor/sir-trevor-bootstrap.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
new SirTrevor.Editor({
|
||||
el: $('.js-st-instance'),
|
||||
blockTypes: ["Columns", "Heading", "Text", "ImageExtended", "Quote", "Accordion", "Button", "Video",
|
||||
"List", "Iframe"
|
||||
]
|
||||
});
|
||||
SirTrevor.onBeforeSubmit();
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
function formSubmit() {
|
||||
$.ajax({
|
||||
url: "/admin/check/session",
|
||||
}).done(function(data) {
|
||||
sessionExist = data;
|
||||
if (sessionExist == 0) {
|
||||
$('.modal').modal('hide');
|
||||
$('#loginModal').modal({
|
||||
backdrop: 'static',
|
||||
keyboard: false
|
||||
}).modal('show');
|
||||
} else {
|
||||
SirTrevor.onBeforeSubmit();
|
||||
document.getElementById("contentForm").submit();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<?php echo $footer; ?>
|
||||
74
application/views/admin/pages.php
Executable file
74
application/views/admin/pages.php
Executable file
@@ -0,0 +1,74 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<h1 class="page-header">
|
||||
<?php echo $this->lang->line('pages_header'); ?>
|
||||
</h1>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="input-group searchContainer">
|
||||
<input type="text" class="form-control" id="searchString">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" id="searchBtn" type="button" onClick="doPageSearch();"><span
|
||||
class="fa fa-search"></span></button>
|
||||
</span>
|
||||
</div><!-- /input-group -->
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-file"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/pages"><?php echo $this->lang->line('nav_pages_all'); ?></a>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> <?php echo $this->lang->line('pages_table_page'); ?> </th>
|
||||
<th> Category </th>
|
||||
<th> <?php echo $this->lang->line('pages_table_updated'); ?> </th>
|
||||
<th> <?php echo $this->lang->line('pages_table_created'); ?> </th>
|
||||
<th> <?php echo $this->lang->line('pages_table_published'); ?> </th>
|
||||
<th class="td-actions"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="pageContainer">
|
||||
<?php
|
||||
foreach ($pages as $p) {
|
||||
echo '<tr>';
|
||||
echo '<td>'.$p['navTitle'].'</td>';
|
||||
echo '<td>'.$p['categoryTitle'].'</td>';
|
||||
echo '<td>'.$p['pageUpdated'].'</td>';
|
||||
echo '<td>'.$p['pageCreated'].'</td>';
|
||||
echo '<td>'.($p['pagePublished'] ? '<span class="fa fa-2x fa-check-circle"></span>' : '<span class="fa fa-2x fa-times-circle"></span>').'</td>';
|
||||
echo '<td class="td-actions"><a href="'.BASE_URL.'/admin/pages/jumbo/'.$p['pageID'].'" class="btn btn-small btn-primary">'.$this->lang->line('btn_jumbotron').'</a> <a href="'.BASE_URL.'/admin/pages/edit/'.$p['pageID'].'" class="btn btn-small btn-success"><i class="fa fa-pencil"> </i></a> <a data-toggle="modal" data-target="#ajaxModal" class="btn btn-danger btn-small" href="'.BASE_URL.'/admin/pages/delete/'.$p['pageID'].'"><i class="fa fa-remove"> </i></a></td>';
|
||||
echo '</tr>';
|
||||
} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="text-center" id="loadingSpinner">
|
||||
<i class="fa fa-cog fa-spin fa-3x fa-fw"></i>
|
||||
</div>
|
||||
<div id="paginationContainer">
|
||||
<?php echo $this->pagination->create_links(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /colmd12 -->
|
||||
</div>
|
||||
<!-- /row -->
|
||||
</div>
|
||||
<!-- /container -->
|
||||
<?php echo $footer; ?>
|
||||
64
application/views/admin/post_categories.php
Executable file
64
application/views/admin/post_categories.php
Executable file
@@ -0,0 +1,64 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<h1 class="page-header">
|
||||
<?php echo $this->lang->line('cat_header'); ?>
|
||||
</h1>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="input-group searchContainer">
|
||||
<input type="text" class="form-control" id="searchString">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button" id="searchBtn" onClick="doCategorySearch();"><span
|
||||
class="fa fa-search"></span></button>
|
||||
</span>
|
||||
</div><!-- /input-group -->
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-newspaper-o"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/posts"><?php echo $this->lang->line('nav_posts_all'); ?></a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> ID </th>
|
||||
<th> <?php echo $this->lang->line('cat_table_category'); ?> </th>
|
||||
<th class="td-actions"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="categoryContainer">
|
||||
<?php
|
||||
foreach ($categories as $c) {
|
||||
echo '<tr>';
|
||||
echo '<td>'.$c['categoryID'].'</td>';
|
||||
echo '<td>'.$c['categoryTitle'].'</td>';
|
||||
echo '<td class="td-actions"><a href="'.BASE_URL.'/admin/posts/categories/edit/'.$c['categoryID'].'" class="btn btn-small btn-success"><i class="fa fa-pencil"> </i></a> <a data-toggle="modal" data-target="#ajaxModal" class="btn btn-danger btn-small" href="'.BASE_URL.'/admin/posts/categories/delete/'.$c['categoryID'].'"><i class="fa fa-remove"></i></a></td>';
|
||||
echo '</tr>';
|
||||
} ?>
|
||||
</tbody>
|
||||
<div class="text-center" id="loadingSpinner">
|
||||
<i class="fa fa-cog fa-spin fa-3x fa-fw"></i>
|
||||
</div>
|
||||
</table>
|
||||
<?php echo $this->pagination->create_links(); ?>
|
||||
</div>
|
||||
<!-- /colmd12 -->
|
||||
</div>
|
||||
<!-- /row -->
|
||||
</div>
|
||||
<!-- /container -->
|
||||
<?php echo $footer; ?>
|
||||
15
application/views/admin/post_category_delete.php
Executable file
15
application/views/admin/post_category_delete.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title"><?php echo $this->lang->line('cat_delete').": ".$form[0]['categoryTitle'] ?>?</h4>
|
||||
</div> <!-- /modal-header -->
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-danger" role="alert"><strong>WARNING: </strong><?php echo '<p>'.$this->lang->line('cat_delete_message').'</p>';
|
||||
?></div>
|
||||
</div> <!-- /modal-body -->
|
||||
<div class="modal-footer">
|
||||
<form ACTION="<?php echo BASE_URL.'/admin/posts/categories/delete/'.$form[0]['categoryID']; ?>" method="POST" name="pageform" id="pageform">
|
||||
<input name="deleteid" type="hidden" id="deleteid" value="<?php echo $form[0]['categoryID'] ?>" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo $this->lang->line('btn_cancel'); ?></button>
|
||||
<input class="btn btn-danger" type="submit" value="<?php echo $this->lang->line('btn_delete'); ?>"/>
|
||||
</form>
|
||||
</div> <!-- /modal-footer -->
|
||||
117
application/views/admin/post_category_edit.php
Executable file
117
application/views/admin/post_category_edit.php
Executable file
@@ -0,0 +1,117 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?php echo $this->lang->line('cat_edit_header'); ?>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-fw fa-list"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/posts/categories"><?php echo $this->lang->line('cat_header'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-pencil"></i>
|
||||
<?php echo $this->lang->line('cat_edit_header'); ?>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<i class="fa fa-pencil fa-fw"></i>
|
||||
<?php echo $this->lang->line('cat_edit_header'); ?>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<?php foreach ($category as $c) {
|
||||
echo form_open(BASE_URL.'/admin/posts/categories/edited/'.$c['categoryID']); ?>
|
||||
<div class="alert alert-info"><?php echo $this->lang->line('cat_new_required'); ?></div>
|
||||
<div class="form-group">
|
||||
<?php echo form_error('parentID', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label" for="parentID">Parent Category</label>
|
||||
<div class="controls">
|
||||
<?php
|
||||
$att = 'id="parentID" class="form-control"';
|
||||
$data = array();
|
||||
foreach ($categories as $ca){
|
||||
$data[$ca['categoryID']] = $ca['categoryTitle'];
|
||||
}
|
||||
echo form_dropdown('categoryID', $data, $c['parentID'], $att); ?>
|
||||
</div>
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('categoryTitle', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label" for="categoryTitle"><?php echo $this->lang->line('cat_new_title'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'categoryTitle',
|
||||
'id' => 'categoryTitle',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('categoryTitle', $c['categoryTitle'], FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('categorySlug', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label" for="categorySlug"><?php echo $this->lang->line('cat_new_url'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'categorySlug',
|
||||
'id' => 'categorySlug',
|
||||
'class' => 'form-control URLField',
|
||||
'value' => set_value('categorySlug', $c['categorySlug'], FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('categoryDescription', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label" for="categoryDescription"><?php echo $this->lang->line('cat_new_description'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'categoryDescription',
|
||||
'id' => 'categoryDescription',
|
||||
'class' => 'form-control',
|
||||
'rows' => '4',
|
||||
);
|
||||
|
||||
echo form_textarea($data, set_value('categoryDescription', $c['categoryDescription'], FALSE)); ?>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<?php $data = array(
|
||||
'name' => 'submit',
|
||||
'id' => 'submit',
|
||||
'class' => 'btn btn-primary',
|
||||
'value' => $this->lang->line('btn_save'),
|
||||
);
|
||||
echo form_submit($data); ?>
|
||||
<a class="btn" href="<?php echo BASE_URL; ?>/admin/posts/categories"><?php echo $this->lang->line('btn_cancel'); ?></a>
|
||||
</div>
|
||||
<?php echo form_close(); } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo $footer; ?>
|
||||
101
application/views/admin/post_category_new.php
Executable file
101
application/views/admin/post_category_new.php
Executable file
@@ -0,0 +1,101 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?php echo $this->lang->line('cat_new_header'); ?>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-fw fa-list"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/posts/categories"><?php echo $this->lang->line('cat_header'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-pencil"></i>
|
||||
<?php echo $this->lang->line('cat_new_header'); ?>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<i class="fa fa-pencil fa-fw"></i>
|
||||
<?php echo $this->lang->line('cat_new_header'); ?>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<?php echo form_open(BASE_URL.'/admin/posts/categories/new/add'); ?>
|
||||
<div class="alert alert-info"><?php echo $this->lang->line('cat_new_required'); ?></div>
|
||||
<div class="form-group">
|
||||
<?php echo form_error('categoryTitle', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label" for="categoryTitle"><?php echo $this->lang->line('cat_new_title'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'categoryTitle',
|
||||
'id' => 'categoryTitle',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('categoryTitle', '', FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('categorySlug', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label" for="categorySlug"><?php echo $this->lang->line('cat_new_url'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'categorySlug',
|
||||
'id' => 'categorySlug',
|
||||
'class' => 'form-control URLField',
|
||||
'value' => set_value('categorySlug', '', FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('categoryDescription', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label" for="categoryDescription"><?php echo $this->lang->line('cat_new_description'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'categoryDescription',
|
||||
'id' => 'categoryDescription',
|
||||
'class' => 'form-control',
|
||||
'rows' => '4',
|
||||
);
|
||||
|
||||
echo form_textarea($data, set_value('categoryDescription', '', FALSE)); ?>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<?php $data = array(
|
||||
'name' => 'submit',
|
||||
'id' => 'submit',
|
||||
'class' => 'btn btn-primary',
|
||||
'value' => $this->lang->line('btn_save'),
|
||||
);
|
||||
echo form_submit($data); ?>
|
||||
<a class="btn" href="<?php echo BASE_URL; ?>/admin/posts/categories"><?php echo $this->lang->line('btn_cancel'); ?></a>
|
||||
</div>
|
||||
<?php echo form_close(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo $footer; ?>
|
||||
16
application/views/admin/post_delete.php
Executable file
16
application/views/admin/post_delete.php
Executable file
@@ -0,0 +1,16 @@
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title"><?php echo $this->lang->line('posts_delete').": ".$form[0]['postTitle'] ?>?</h4>
|
||||
</div> <!-- /modal-header -->
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<strong>WARNING: </strong><p><?php echo $this->lang->line('posts_delete_message'); ?></p>
|
||||
</div>
|
||||
</div> <!-- /modal-body -->
|
||||
<div class="modal-footer">
|
||||
<form ACTION="<?php echo BASE_URL.'/admin/posts/delete/'.$form[0]['postID']; ?>" method="POST" name="pageform" id="pageform">
|
||||
<input name="deleteid" type="hidden" id="deleteid" value="<?php echo $form[0]['postID'] ?>" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo $this->lang->line('btn_cancel'); ?></button>
|
||||
<input class="btn btn-danger" type="submit" value="<?php echo $this->lang->line('btn_delete'); ?>"/>
|
||||
</form>
|
||||
</div> <!-- /modal-footer -->
|
||||
580
application/views/admin/post_edit.php
Executable file
580
application/views/admin/post_edit.php
Executable file
@@ -0,0 +1,580 @@
|
||||
<?php echo $header; ?>
|
||||
<link href="<?php echo ADMIN_THEME; ?>/js/trevor/sir-trevor.css" rel="stylesheet">
|
||||
<link href="<?php echo ADMIN_THEME; ?>/js/trevor/sir-trevor-bootstrap.css" rel="stylesheet">
|
||||
<link href="<?php echo ADMIN_THEME; ?>/js/trevor/sir-trevor-icons.css" rel="stylesheet">
|
||||
<link href="<?php echo ADMIN_THEME; ?>/js/datepicker/jquery.datetimepicker.css" rel="stylesheet">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?php echo $this->lang->line('posts_edit_header'); ?>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-fw fa-newspaper-o"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/posts"><?php echo $this->lang->line('nav_posts_all'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-pencil"></i>
|
||||
<?php echo $this->lang->line('posts_edit_header'); ?>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<?php echo form_error('postTitle', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<?php echo form_error('postURL', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<?php echo form_error('postExcerpt', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<i class="fa fa-pencil fa-fw"></i>
|
||||
<?php echo $this->lang->line('posts_edit_header'); ?>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
|
||||
<?php foreach ($posts as $p) {
|
||||
echo form_error('postTitle', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<?php echo form_error('postURL', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<?php
|
||||
$attr = array('id' => 'contentForm', 'class' => 'form-horizontal');
|
||||
echo form_open(BASE_URL . '/admin/posts/edited/' . $this->uri->segment(4), $attr); ?>
|
||||
<?php $data = array(
|
||||
'id' => 'content',
|
||||
'name' => 'content',
|
||||
'class' => 'js-st-instance',
|
||||
);
|
||||
if ($this->input->post('content')) {
|
||||
$set = $this->input->post('content');
|
||||
} else {
|
||||
$set = $p['postContentHTML'];
|
||||
}
|
||||
echo form_textarea($data, set_value('content', $set, FALSE)); ?>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<a class="btn btn-primary" data-toggle="modal"
|
||||
href="#attributes"><?php echo $this->lang->line('btn_next'); ?></a>
|
||||
<a class="btn"
|
||||
href="<?php echo BASE_URL; ?>/admin/posts"><?php echo $this->lang->line('btn_cancel'); ?></a>
|
||||
<a class="btn btn-info" target="_blank" href="<?php echo $posts[0]['articleURL'] ?>">미리보기</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="attributes" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title"><?php echo $this->lang->line('posts_new_attributes'); ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<div class="alert alert-info"><?php echo $this->lang->line('posts_new_required'); ?>
|
||||
</div>
|
||||
<?php echo form_error('postTitle', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="postTitle"><?php echo $this->lang->line('posts_new_title'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'postTitle',
|
||||
'id' => 'postTitle',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('postTitle', $p['postTitle'], FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('postSubTitle', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="postTitle"><?php echo $this->lang->line('posts_new_subtitle'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'postSubTitle',
|
||||
'id' => 'postSubTitle',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('postSubTitle', $p['postSubTitle'], FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('file_upload', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="file_upload"><?php echo $this->lang->line('posts_new_feature'); ?></label>
|
||||
<div class="controls">
|
||||
<div><img
|
||||
src="<?php echo !empty($p['postImage']) ? getImageUrl($p['postImage']) : '' ?>"
|
||||
id="logo_preloaded" class="logo_preloaded"
|
||||
<?php echo empty($p['postImage']) ? "style='display:none;'" : '' ?>>
|
||||
</div>
|
||||
<img src="<?php echo BASE_URL; ?>/theme/admin/images/ajax-loader.gif"
|
||||
style="margin:-7px 5px 0 5px;display:none;" id="loading_pic"
|
||||
class="loading_pic" />
|
||||
<?php
|
||||
$data = array(
|
||||
'name' => 'file_upload',
|
||||
'id' => 'file_upload',
|
||||
'class' => 'form-control file-upload'
|
||||
);
|
||||
echo form_upload($data);
|
||||
?>
|
||||
<input type="hidden" id="postImage" class="postImage" name="postImage" />
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('file_upload_thumb', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="file_upload_thumb"><?php echo $this->lang->line('posts_new_thumb'); ?></label>
|
||||
<div class="controls">
|
||||
<div>
|
||||
<img src="<?php echo getThumbUrl($p['postImage'], $p['postThumb']) ?>"
|
||||
id="logo_preloaded" class="logo_preloaded">
|
||||
</div>
|
||||
<img src="<?php echo BASE_URL; ?>/theme/admin/images/ajax-loader.gif"
|
||||
style="margin:-7px 5px 0 5px;display:none;" id="loading_pic"
|
||||
class="loading_pic" />
|
||||
<?php
|
||||
$data = array(
|
||||
'name' => 'file_upload_thumb',
|
||||
'id' => 'file_upload_thumb',
|
||||
'class' => 'form-control file-upload'
|
||||
);
|
||||
echo form_upload($data);
|
||||
?>
|
||||
<input type="hidden" id="postThumb" class="postImage" name="postThumb" />
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"
|
||||
for="postExcerpt"><?php echo $this->lang->line('posts_new_excerpt'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'postExcerpt',
|
||||
'id' => 'postExcerpt',
|
||||
'class' => 'form-control',
|
||||
'rows' => '4',
|
||||
);
|
||||
|
||||
echo form_textarea($data, set_value('postExcerpt', $p['postExcerpt'], FALSE)); ?>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group hide">
|
||||
<?php echo form_error('postURL', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="postURL"><?php echo $this->lang->line('posts_new_url'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'postURL',
|
||||
'id' => 'postURL',
|
||||
'class' => 'form-control URLField',
|
||||
'value' => set_value('postURL', $p['postURL'], FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('categoryID', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<div class="form-group">
|
||||
<label class="control-label"
|
||||
for="categoryID"><?php echo $this->lang->line('posts_new_category'); ?></label>
|
||||
<a class="btn btn-warning btn-sm add-category-select"><i class="fa fa-plus"></i> Add
|
||||
category</a>
|
||||
</div>
|
||||
<div class="category-control hide">
|
||||
<div class="col-sm-2"><a class="btn btn-danger btn-sm delete-category-select"><i
|
||||
class="fa fa-times"></i> Delete</a></div>
|
||||
<div class="controls col-sm-10">
|
||||
<?php
|
||||
$data = array();
|
||||
foreach ($categories as $c) {
|
||||
$data[$c['categoryID']] = $c['categoryTitle'];
|
||||
}
|
||||
echo form_dropdown('categoryID', $data, 0); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- /form-group -->
|
||||
<div class="form-group">
|
||||
<?php echo form_error('pageID', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<div class="form-group">
|
||||
<label class="control-label"
|
||||
for="pageID"><?php echo $this->lang->line('posts_new_page'); ?></label>
|
||||
<a class="btn btn-warning btn-sm add-page-select"><i class="fa fa-plus"></i> Add
|
||||
page</a>
|
||||
</div>
|
||||
<div class="page-control hide">
|
||||
<div class="col-sm-2"><a class="btn btn-danger btn-sm delete-page-select"><i
|
||||
class="fa fa-times"></i> Delete</a></div>
|
||||
<div class="controls col-sm-10">
|
||||
<?php
|
||||
$data = array();
|
||||
foreach ($pages as $c) {
|
||||
$data[$c['pageID']] = $c['pageTitle'];
|
||||
}
|
||||
echo form_dropdown('pageID', $data, 0); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('pageID', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="userID"><?php echo $this->lang->line('posts_new_user'); ?></label>
|
||||
<div class="controls">
|
||||
<?php
|
||||
$data = array();
|
||||
foreach ($users as $u) {
|
||||
$data[$u->userID] = $u->userName;
|
||||
}
|
||||
echo form_dropdown('userID', $data, (empty($posts[0]['userID']) ? $this->session->userdata('userID') : $posts[0]['userID']), ['class' => 'cm-writer']); ?>
|
||||
</div>
|
||||
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('published', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="published"><?php echo $this->lang->line('posts_new_published'); ?></label>
|
||||
<div class="controls">
|
||||
<?php
|
||||
$att = 'id="published" class="form-control"';
|
||||
$data = array(
|
||||
1 => 'Yes',
|
||||
0 => 'No'
|
||||
);
|
||||
|
||||
echo form_dropdown('published', $data, $p['published'], $att); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<div class="form-group">
|
||||
<div id="datetimepicker1" class="input-append date">
|
||||
<label class="control-label"
|
||||
for="dateReserved"><?php echo $this->lang->line('posts_reserved_date'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'dateReserved',
|
||||
'id' => 'datetimepicker',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('dateReserved', (empty($p['dateReserved']) ? 0:$p['dateReserved']) , FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
|
||||
|
||||
<?php $data = array(
|
||||
'name' => 'unixStamp',
|
||||
'id' => 'unixStamp',
|
||||
'style' => 'display:none;',
|
||||
'value' => set_value('unixStamp', $p['unixStamp'], FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"
|
||||
for="postTag"><?php echo $this->lang->line('posts_new_tag'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'postTag',
|
||||
'id' => 'postTag',
|
||||
'class' => 'form-control',
|
||||
'rows' => '4',
|
||||
);
|
||||
|
||||
echo form_textarea($data, set_value('postTag', '', FALSE)); ?>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn" data-dismiss="modal"
|
||||
aria-hidden="true"><?php echo $this->lang->line('btn_back'); ?></button>
|
||||
<a class="btn btn-primary"
|
||||
onClick="formSubmit()"><?php echo $this->lang->line('btn_save'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="categories">
|
||||
<input type="hidden" name="pages">
|
||||
<input type="hidden" name="video" value="<?php echo $video ?>">
|
||||
<?php echo form_close();
|
||||
} ?>
|
||||
</div>
|
||||
<!-- /colmd12 -->
|
||||
|
||||
</div>
|
||||
<!-- /row -->
|
||||
</div>
|
||||
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/datepicker/jquery.datetimepicker.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/trevor/underscore.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/trevor/eventable.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/trevor/sortable.min.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/trevor/sir-trevor.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/trevor/sir-trevor-bootstrap.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/date.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/tinymce/tinymce.min.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery('#datetimepicker').datetimepicker({
|
||||
format: 'm/d/Y H:m:s'
|
||||
});
|
||||
// new SirTrevor.Editor({ el: $('.js-st-instance'),
|
||||
// blockTypes: ["Columns", "Heading", "Text", "ImageExtended", "Quote", "Accordion", "Button", "Video", "List", "Iframe"]
|
||||
// });
|
||||
// SirTrevor.onBeforeSubmit();
|
||||
</script>
|
||||
<script>
|
||||
$(function() {
|
||||
tinyMCE.init({
|
||||
selector: '.js-st-instance',
|
||||
plugins: ['link image code fullscreen lineheight',
|
||||
'autolink lists link anchor table',
|
||||
'textcolor colorpicker textpattern'
|
||||
],
|
||||
file_browser_callback: RoxyFileBrowser,
|
||||
language: 'ko_KR',
|
||||
image_advtab: true,
|
||||
toolbar: 'codesample | bold italic sizeselect fontselect fontsizeselect | hr alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | insertfile undo redo | forecolor backcolor emoticons | code | lineheightselect | table tabledelete | tableprops tablerowprops tablecellprops | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol',
|
||||
fontsize_formats: "8pt 10pt 12pt 14pt 18pt 24pt 36pt",
|
||||
font_formats: '나눔고딕=나눔고딕코딩,NanumGothicCoding,sans-serif; Andale Mono=andale mono,times; Arial=arial,helvetica,sans-serif; Arial Black=arial black,avant garde; Book Antiqua=book antiqua,palatino; Comic Sans MS=comic sans ms,sans-serif; Courier New=courier new,courier; Georgia=georgia,palatino; Helvetica=helvetica; Impact=impact,chicago; Symbol=symbol; Tahoma=tahoma,arial,helvetica,sans-serif; Terminal=terminal,monaco; Times New Roman=times new roman,times; Trebuchet MS=trebuchet ms,geneva; Verdana=verdana,geneva; Webdings=webdings; Wingdings=wingdings,zapf dingbats',
|
||||
lineheight_formats: "1pt 2pt 3pt 4pt 5pt 6pt 7pt 8pt 9pt 10pt 11pt 12pt 14pt 16pt 18pt 20pt 22pt 24pt 26pt 36pt 48pt",
|
||||
setup: function(ed) {
|
||||
ed.on('init', function() {
|
||||
// this.getDoc().body.style.fontSize = '12';
|
||||
this.getDoc().body.style.fontFamily = '나눔고딕';
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function RoxyFileBrowser(field_name, url, type, win) {
|
||||
var roxyFileman = '/fileman/index.html?integration=tinymce4';
|
||||
if (roxyFileman.indexOf("?") < 0) {
|
||||
roxyFileman += "?type=" + type;
|
||||
} else {
|
||||
roxyFileman += "&type=" + type;
|
||||
}
|
||||
roxyFileman += '&input=' + field_name + '&value=' + win.document.getElementById(field_name).value;
|
||||
if (tinyMCE.activeEditor.settings.language) {
|
||||
roxyFileman += '&langCode=' + tinyMCE.activeEditor.settings.language;
|
||||
}
|
||||
tinyMCE.activeEditor.windowManager.open({
|
||||
file: roxyFileman,
|
||||
title: 'Crossmap File Manager',
|
||||
width: 850,
|
||||
height: 650,
|
||||
resizable: "yes",
|
||||
plugins: "media",
|
||||
inline: "yes",
|
||||
close_previous: "no"
|
||||
}, {
|
||||
window: win,
|
||||
input: field_name
|
||||
});
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
function formSubmit() {
|
||||
$.ajax({
|
||||
url: "/admin/check/session",
|
||||
}).done(function(data) {
|
||||
sessionExist = data;
|
||||
if (sessionExist == 0) {
|
||||
$('.modal').modal('hide');
|
||||
$('#loginModal').modal({
|
||||
backdrop: 'static',
|
||||
keyboard: false
|
||||
}).modal('show');
|
||||
} else {
|
||||
SirTrevor.onBeforeSubmit();
|
||||
var unixtime = Date.parse(document.getElementById('datetimepicker').value).getTime() / 1000;
|
||||
document.getElementById("unixStamp").value = unixtime;
|
||||
document.getElementById("contentForm").categories.value = $.map($(
|
||||
'.category-control select'), function(el, i) {
|
||||
if (i && el.value != '0') return el.value
|
||||
}).join(',');
|
||||
document.getElementById("contentForm").pages.value = $.map($(
|
||||
'.page-control select'), function(el, i) {
|
||||
if (i && el.value != '0') return el.value
|
||||
}).join(',');
|
||||
document.getElementById("contentForm").submit();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
var postPages = <?php echo json_encode($posts[0]['pages']) ?>;
|
||||
var postCategories = <?php echo json_encode($posts[0]['categories']) ?>;
|
||||
var addedElement = {
|
||||
category: null,
|
||||
page: null
|
||||
};
|
||||
$('.add-category-select').on('click', function(e) {
|
||||
addedElement.category = $(".category-control")
|
||||
.parent().append(
|
||||
$(".category-control")
|
||||
.first()
|
||||
.clone()
|
||||
).children('.category-control').last().removeClass('hide').find("select").select2({
|
||||
width: '100%'
|
||||
});
|
||||
$(".category-control")
|
||||
.parent().children('.category-control').last().find('.delete-category-select').on(
|
||||
'click',
|
||||
function(e) {
|
||||
$(this).parent().parent().remove();
|
||||
});
|
||||
});
|
||||
|
||||
$('.add-page-select').on('click', function(e) {
|
||||
addedElement.page = $(".page-control")
|
||||
.parent().append(
|
||||
$(".page-control")
|
||||
.first()
|
||||
.clone()
|
||||
).children('.page-control').last().removeClass('hide').find("select").select2({
|
||||
width: '100%'
|
||||
});
|
||||
$(".page-control")
|
||||
.parent().children('.page-control').last().find('.delete-page-select').on(
|
||||
'click',
|
||||
function(e) {
|
||||
$(this).parent().parent().remove();
|
||||
});
|
||||
});
|
||||
|
||||
$('.modal').on('shown.bs.modal', function(e) {
|
||||
if (postCategories.length) {
|
||||
$.map(postCategories, function(v, k) {
|
||||
$('.add-category-select').trigger('click');
|
||||
$('.category-control').last().find('select').val(v);
|
||||
$('.category-control').last().find('select').trigger('change');
|
||||
})
|
||||
} else {
|
||||
$('.add-category-select').trigger('click');
|
||||
$('.page-control').last().find('select').val(0);
|
||||
$('.page-control').last().find('select').trigger('change');
|
||||
}
|
||||
$('.cm-writer').select2({
|
||||
width: '100%'
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$('.modal').on('shown.bs.modal', function(e) {
|
||||
if (postPages.length) {
|
||||
$.map(postPages, function(v, k) {
|
||||
$('.add-page-select').trigger('click');
|
||||
$('.page-control').last().find('select').val(v);
|
||||
$('.page-control').last().find('select').trigger('change');
|
||||
})
|
||||
} else {
|
||||
$('.add-page-select').trigger('click');
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
// function submitForm(event, data) {
|
||||
// $form = $(event.target);
|
||||
// var formData = $form.serialize();
|
||||
// $.each(data.files, function(key, value) {
|
||||
// formData = formData + '&filenames[]=' + value;
|
||||
// });
|
||||
|
||||
// $.ajax({
|
||||
// url: '<?php echo BASE_URL; ?>/admin/settings/submit',
|
||||
// type: 'POST',
|
||||
// data: formData,
|
||||
// cache: false,
|
||||
// dataType: 'json',
|
||||
// success: function(data, textStatus, jqXHR) {
|
||||
// if (typeof data.error === 'undefined')
|
||||
// console.log('SUCCESS: ' + data.success);
|
||||
// else
|
||||
// console.log('ERRORS: ' + data.error);
|
||||
// },
|
||||
// error: function(jqXHR, textStatus, errorThrown) {
|
||||
// console.log('ERRORS: ' + textStatus);
|
||||
// },
|
||||
// complete: function() {
|
||||
// $('#loading_pic').hide();
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
$.map($('input[type=file]'), function(elem, k) {
|
||||
$(elem).on('change', function(e) {
|
||||
var elem = this;
|
||||
(function(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
if ($(elem).val()) {
|
||||
$('.loading_pic').eq(k).show();
|
||||
var data = new FormData();
|
||||
$.each(e.target.files, function(key, value) {
|
||||
data.append(key, value);
|
||||
});
|
||||
$.ajax({
|
||||
url: '<?php echo BASE_URL; ?>/admin/settings/submit/?files',
|
||||
type: 'POST',
|
||||
data: data,
|
||||
cache: false,
|
||||
dataType: 'json',
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(data, textStatus, jqXHR) {
|
||||
if (data != '0') {
|
||||
$('.logo_preloaded').eq(k).show();
|
||||
$('.logo_preloaded').eq(k).attr('src',
|
||||
'/uploads/' + data);
|
||||
$('.postImage').eq(k).val(data);
|
||||
$('.loading_pic').eq(k).hide();
|
||||
} else
|
||||
alert(
|
||||
'Error! The file is not an image.');
|
||||
}
|
||||
});
|
||||
}
|
||||
})(e);
|
||||
})
|
||||
});
|
||||
|
||||
$('textarea[name=postTag]').tagEditor({
|
||||
initialTags: <?php echo $posts[0]['postTag']?>
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php echo $footer; ?>
|
||||
530
application/views/admin/post_new.php
Executable file
530
application/views/admin/post_new.php
Executable file
@@ -0,0 +1,530 @@
|
||||
<?php echo $header; ?>
|
||||
<link href="<?php echo ADMIN_THEME; ?>/js/trevor/sir-trevor.css" rel="stylesheet">
|
||||
<link href="<?php echo ADMIN_THEME; ?>/js/trevor/sir-trevor-bootstrap.css" rel="stylesheet">
|
||||
<link href="<?php echo ADMIN_THEME; ?>/js/trevor/sir-trevor-icons.css" rel="stylesheet">
|
||||
<link href="<?php echo ADMIN_THEME; ?>/js/datepicker/jquery.datetimepicker.css" rel="stylesheet">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?php echo $this->lang->line('posts_new_header'); ?>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-fw fa-newspaper-o"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/posts"><?php echo $this->lang->line('nav_posts_all'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-pencil"></i>
|
||||
<?php echo $this->lang->line('posts_new_header'); ?>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<?php echo form_error('postTitle', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<?php echo form_error('postURL', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<?php echo form_error('postExcerpt', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<i class="fa fa-pencil fa-fw"></i>
|
||||
<?php echo $this->lang->line('posts_new_header'); ?>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
$attr = array('id' => 'contentForm');
|
||||
echo form_open(BASE_URL . '/admin/posts/new/add', $attr); ?>
|
||||
<?php $data = array(
|
||||
'name' => 'content',
|
||||
'id' => 'content',
|
||||
'class' => 'js-st-instance',
|
||||
);
|
||||
echo form_textarea($data, set_value('content', $this->input->post('content'), FALSE)); ?>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<a class="btn btn-primary" data-toggle="modal"
|
||||
href="#attributes"><?php echo $this->lang->line('btn_next'); ?></a>
|
||||
<a class="btn"
|
||||
href="<?php echo BASE_URL; ?>/admin/posts"><?php echo $this->lang->line('btn_cancel'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="attributes" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title"><?php echo $this->lang->line('posts_new_attributes'); ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-info"><?php echo $this->lang->line('posts_new_required'); ?></div>
|
||||
<div class="form-group">
|
||||
<?php echo form_error('postTitle', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="postTitle"><?php echo $this->lang->line('posts_new_title'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'postTitle',
|
||||
'id' => 'postTitle',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('postTitle', $this->input->post('postTitle'), FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('postSubTitle', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="postTitle"><?php echo $this->lang->line('posts_new_subtitle'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'postSubTitle',
|
||||
'id' => 'postSubTitle',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('postSubTitle', '', FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('file_upload', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="file_upload"><?php echo $this->lang->line('posts_new_feature'); ?></label>
|
||||
<div class="controls">
|
||||
<div><img src="" id="logo_preloaded" class="logo_preloaded" style='display:none;'>
|
||||
</div>
|
||||
<img src="<?php echo BASE_URL; ?>/theme/admin/images/ajax-loader.gif"
|
||||
style="margin:-7px 5px 0 5px;display:none;" id="loading_pic"
|
||||
class="loading_pic" />
|
||||
<?php
|
||||
$data = array(
|
||||
'name' => 'file_upload',
|
||||
'id' => 'file_upload',
|
||||
'class' => 'form-control'
|
||||
);
|
||||
echo form_upload($data);
|
||||
?>
|
||||
<input type="hidden" id="postImage" class="postImage" name="postImage" />
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('file_upload_thumb', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="file_upload_thumb"><?php echo $this->lang->line('posts_new_thumb'); ?></label>
|
||||
<div class="controls">
|
||||
<div><img src="<?php echo $this->input->post('postImage') ?>" id="logo_preloaded"
|
||||
class="logo_preloaded"
|
||||
<?php echo $this->input->post('postImage')? '':"style='display:none;'" ?>>
|
||||
</div>
|
||||
<img src="<?php echo BASE_URL; ?>/theme/admin/images/ajax-loader.gif"
|
||||
style="margin:-7px 5px 0 5px;display:none;" id="loading_pic"
|
||||
class="loading_pic" />
|
||||
<?php
|
||||
$data = array(
|
||||
'name' => 'file_upload_thumb',
|
||||
'id' => 'file_upload_thumb',
|
||||
'class' => 'form-control'
|
||||
);
|
||||
echo form_upload($data);
|
||||
?>
|
||||
<input type="hidden" name="postImageExternal"
|
||||
value="<?php echo $this->input->post('postImage') ?>">
|
||||
<input type="hidden" id="postThumb" class="postImage" name="postThumb" />
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('postExcerpt', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="postExcerpt"><?php echo $this->lang->line('posts_new_excerpt'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'postExcerpt',
|
||||
'id' => 'postExcerpt',
|
||||
'class' => 'form-control',
|
||||
'rows' => '4',
|
||||
);
|
||||
|
||||
echo form_textarea($data, set_value('postExcerpt', $this->input->post('postExcerpt'), FALSE)); ?>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group hide">
|
||||
<?php echo form_error('postURL', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="postURL"><?php echo $this->lang->line('posts_new_url'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'postURL',
|
||||
'id' => 'postURL',
|
||||
'class' => 'form-control URLField',
|
||||
'value' => set_value('postURL', '1', FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<div class="form-group">
|
||||
<?php echo form_error('categoryID', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<div class="form-group">
|
||||
<label class="control-label"
|
||||
for="categoryID"><?php echo $this->lang->line('posts_new_category'); ?></label>
|
||||
<a class="btn btn-warning btn-sm add-category-select"><i class="fa fa-plus"></i> Add
|
||||
category</a>
|
||||
</div>
|
||||
<div class="category-control hide">
|
||||
<div class="col-sm-2"><a class="btn btn-danger btn-sm delete-category-select"><i
|
||||
class="fa fa-times"></i> Delete</a></div>
|
||||
<div class="controls col-sm-10">
|
||||
<?php
|
||||
$data = array();
|
||||
foreach ($categories as $c) {
|
||||
$data[$c['categoryID']] = $c['categoryTitle'];
|
||||
}
|
||||
echo form_dropdown('categoryID', $data, 0); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- /form-group -->
|
||||
<div class="form-group">
|
||||
<?php echo form_error('pageID', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<div class="form-group">
|
||||
<label class="control-label"
|
||||
for="pageID"><?php echo $this->lang->line('posts_new_page'); ?></label>
|
||||
<a class="btn btn-warning btn-sm add-page-select"><i class="fa fa-plus"></i> Add
|
||||
page</a>
|
||||
</div>
|
||||
<div class="page-control hide">
|
||||
<div class="col-sm-2"><a class="btn btn-danger btn-sm delete-page-select"><i
|
||||
class="fa fa-times"></i> Delete</a></div>
|
||||
<div class="controls col-sm-10">
|
||||
<?php
|
||||
$data = array();
|
||||
foreach ($pages as $c) {
|
||||
$data[$c['pageID']] = $c['pageTitle'];
|
||||
}
|
||||
echo form_dropdown('pageID', $data, 0); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- /form-group -->
|
||||
<div class="form-group">
|
||||
<?php echo form_error('published', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="published"><?php echo $this->lang->line('posts_new_published'); ?></label>
|
||||
<div class="controls">
|
||||
<?php
|
||||
$att = 'id="published" class="form-control"';
|
||||
$data = array(
|
||||
1 => 'Yes',
|
||||
0 => 'No'
|
||||
);
|
||||
|
||||
echo form_dropdown('published', $data, '1', $att); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<div class="form-group">
|
||||
<div id="datetimepicker1" class="input-append date">
|
||||
<label class="control-label"
|
||||
for="datePosted"><?php echo $this->lang->line('posts_reserved_date'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'datePosted',
|
||||
'id' => 'datetimepicker',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('datePosted', '', FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
<?php $data = array(
|
||||
'name' => 'unixStamp',
|
||||
'id' => 'unixStamp',
|
||||
'style' => 'display:none;',
|
||||
'value' => set_value('unixStamp', '', FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"
|
||||
for="postTag"><?php echo $this->lang->line('posts_new_tag'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'postTag',
|
||||
'id' => 'postTag',
|
||||
'class' => 'form-control',
|
||||
'rows' => '4',
|
||||
);
|
||||
|
||||
echo form_textarea($data, set_value('postTag', '', FALSE)); ?>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn" data-dismiss="modal"
|
||||
aria-hidden="true"><?php echo $this->lang->line('btn_back'); ?></button>
|
||||
<a class="btn btn-primary"
|
||||
onClick="formSubmit()"><?php echo $this->lang->line('btn_save'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="categories">
|
||||
<input type="hidden" name="pages">
|
||||
<?php echo form_close(); ?>
|
||||
</div>
|
||||
<!-- /span12 -->
|
||||
|
||||
</div>
|
||||
<!-- /row -->
|
||||
</div>
|
||||
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/datepicker/jquery.datetimepicker.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/trevor/underscore.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/trevor/eventable.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/trevor/sortable.min.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/trevor/sir-trevor.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/trevor/sir-trevor-bootstrap.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/date.js"></script>
|
||||
<script src="<?php echo ADMIN_THEME; ?>/js/tinymce/tinymce.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
window.onload = function() {
|
||||
var now = new Date();
|
||||
var strDateTime = [
|
||||
[AddZero(now.getMonth() + 1), AddZero(now.getDate()), now.getFullYear()].join("/"), [AddZero(now
|
||||
.getHours()), AddZero(now.getMinutes()), AddZero(now.getSeconds())].join(":")
|
||||
].join(" ");
|
||||
document.getElementById("datetimepicker").value = strDateTime;
|
||||
};
|
||||
|
||||
function AddZero(num) {
|
||||
return (num >= 0 && num < 10) ? "0" + num : num + "";
|
||||
}
|
||||
jQuery('#datetimepicker').datetimepicker({
|
||||
format: 'm/d/Y H:m:s'
|
||||
});
|
||||
|
||||
// new SirTrevor.Editor({ el: $('.js-st-instance'),
|
||||
// blockTypes: ["Columns", "Heading", "Text", "ImageExtended", "Quote", "Accordion", "Button", "Video", "List", "Iframe"]
|
||||
// });
|
||||
// SirTrevor.onBeforeSubmit();
|
||||
</script>
|
||||
<script>
|
||||
$(function() {
|
||||
tinyMCE.init({
|
||||
selector: '.js-st-instance',
|
||||
plugins: ['link image code fullscreen lineheight',
|
||||
'autolink lists link anchor table',
|
||||
'textcolor colorpicker textpattern'
|
||||
],
|
||||
file_browser_callback: RoxyFileBrowser,
|
||||
language: 'ko_KR',
|
||||
image_advtab: true,
|
||||
toolbar: 'codesample | bold italic sizeselect fontselect fontsizeselect | hr alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | insertfile undo redo | forecolor backcolor emoticons | code | lineheightselect | table tabledelete | tableprops tablerowprops tablecellprops | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol',
|
||||
fontsize_formats: "8pt 10pt 12pt 14pt 18pt 24pt 36pt",
|
||||
font_formats: '나눔고딕=나눔고딕코딩,NanumGothicCoding,sans-serif; Andale Mono=andale mono,times; Arial=arial,helvetica,sans-serif; Arial Black=arial black,avant garde; Book Antiqua=book antiqua,palatino; Comic Sans MS=comic sans ms,sans-serif; Courier New=courier new,courier; Georgia=georgia,palatino; Helvetica=helvetica; Impact=impact,chicago; Symbol=symbol; Tahoma=tahoma,arial,helvetica,sans-serif; Terminal=terminal,monaco; Times New Roman=times new roman,times; Trebuchet MS=trebuchet ms,geneva; Verdana=verdana,geneva; Webdings=webdings; Wingdings=wingdings,zapf dingbats',
|
||||
lineheight_formats: "1pt 2pt 3pt 4pt 5pt 6pt 7pt 8pt 9pt 10pt 11pt 12pt 14pt 16pt 18pt 20pt 22pt 24pt 26pt 36pt 48pt",
|
||||
setup: function(ed) {
|
||||
ed.on('init', function() {
|
||||
// this.getDoc().body.style.fontSize = '12';
|
||||
this.getDoc().body.style.fontFamily = '나눔고딕';
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function RoxyFileBrowser(field_name, url, type, win) {
|
||||
var roxyFileman = '/fileman/index.html?integration=tinymce4';
|
||||
if (roxyFileman.indexOf("?") < 0) {
|
||||
roxyFileman += "?type=" + type;
|
||||
} else {
|
||||
roxyFileman += "&type=" + type;
|
||||
}
|
||||
roxyFileman += '&input=' + field_name + '&value=' + win.document.getElementById(field_name).value;
|
||||
if (tinyMCE.activeEditor.settings.language) {
|
||||
roxyFileman += '&langCode=' + tinyMCE.activeEditor.settings.language;
|
||||
}
|
||||
tinyMCE.activeEditor.windowManager.open({
|
||||
file: roxyFileman,
|
||||
title: 'Crossmap File Manager',
|
||||
width: 850,
|
||||
height: 650,
|
||||
resizable: "yes",
|
||||
plugins: "media",
|
||||
inline: "yes",
|
||||
close_previous: "no"
|
||||
}, {
|
||||
window: win,
|
||||
input: field_name
|
||||
});
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
function formSubmit() {
|
||||
$.ajax({
|
||||
url: "/admin/check/session",
|
||||
}).done(function(data) {
|
||||
sessionExist = data;
|
||||
if (sessionExist == 0) {
|
||||
$('.modal').modal('hide');
|
||||
$('#loginModal').modal({
|
||||
backdrop: 'static',
|
||||
keyboard: false
|
||||
}).modal('show');
|
||||
} else {
|
||||
SirTrevor.onBeforeSubmit();
|
||||
var unixtime = Date.parse(document.getElementById('datetimepicker').value).getTime() / 1000;
|
||||
document.getElementById("unixStamp").value = unixtime;
|
||||
document.getElementById("contentForm").categories.value = $.map($(
|
||||
'.category-control select'), function(el, i) {
|
||||
if (i && el.value != '0') return el.value
|
||||
}).join(',');
|
||||
document.getElementById("contentForm").pages.value = $.map($(
|
||||
'.page-control select'), function(el, i) {
|
||||
if (i && el.value != '0') return el.value
|
||||
}).join(',');
|
||||
document.getElementById("contentForm").submit();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
$('.add-category-select').on('click', function(e) {
|
||||
$(".category-control")
|
||||
.parent().append(
|
||||
$(".category-control")
|
||||
.first()
|
||||
.clone()
|
||||
).children('.category-control').last().removeClass('hide').find("select")
|
||||
.select2({
|
||||
width: '100%'
|
||||
});
|
||||
$(".category-control")
|
||||
.parent().children('.category-control').last().find('.delete-category-select').on(
|
||||
'click',
|
||||
function(e) {
|
||||
$(this).parent().parent().remove();
|
||||
});
|
||||
});
|
||||
$('.modal').on('shown.bs.modal', function(e) {
|
||||
$('.add-category-select').trigger('click')
|
||||
})
|
||||
|
||||
$('.add-page-select').on('click', function(e) {
|
||||
$(".page-control")
|
||||
.parent().append(
|
||||
$(".page-control")
|
||||
.first()
|
||||
.clone()
|
||||
).children('.page-control').last().removeClass('hide').find("select")
|
||||
.select2({
|
||||
width: '100%'
|
||||
});
|
||||
$(".page-control")
|
||||
.parent().children('.page-control').last().find('.delete-page-select').on(
|
||||
'click',
|
||||
function(e) {
|
||||
$(this).parent().parent().remove();
|
||||
});
|
||||
});
|
||||
$('.modal').on('shown.bs.modal', function(e) {
|
||||
$('.add-page-select').trigger('click')
|
||||
})
|
||||
|
||||
// function submitForm(event, data) {
|
||||
// $form = $(event.target);
|
||||
// var formData = $form.serialize();
|
||||
// $.each(data.files, function(key, value) {
|
||||
// formData = formData + '&filenames[]=' + value;
|
||||
// });
|
||||
|
||||
// $.ajax({
|
||||
// url: '<?php echo BASE_URL; ?>/admin/settings/submit',
|
||||
// type: 'POST',
|
||||
// data: formData,
|
||||
// cache: false,
|
||||
// dataType: 'json',
|
||||
// success: function(data, textStatus, jqXHR) {
|
||||
// if (typeof data.error === 'undefined')
|
||||
// console.log('SUCCESS: ' + data.success);
|
||||
// else
|
||||
// console.log('ERRORS: ' + data.error);
|
||||
// },
|
||||
// error: function(jqXHR, textStatus, errorThrown) {
|
||||
// console.log('ERRORS: ' + textStatus);
|
||||
// },
|
||||
// complete: function() {
|
||||
// $('#loading_pic').hide();
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
$.map($('input[type=file]'), function(elem, k) {
|
||||
$(elem).on('change', function(e) {
|
||||
var elem = this;
|
||||
(function(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
if ($(elem).val()) {
|
||||
$('.loading_pic').eq(k).show();
|
||||
var data = new FormData();
|
||||
$.each(e.target.files, function(key, value) {
|
||||
data.append(key, value);
|
||||
});
|
||||
$.ajax({
|
||||
url: '<?php echo BASE_URL; ?>/admin/settings/submit/?files',
|
||||
type: 'POST',
|
||||
data: data,
|
||||
cache: false,
|
||||
dataType: 'json',
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(data, textStatus, jqXHR) {
|
||||
if (data != '0') {
|
||||
$('.logo_preloaded').eq(k).show();
|
||||
$('.logo_preloaded').eq(k).attr('src',
|
||||
'/uploads/' + data);
|
||||
$('.postImage').eq(k).val(data);
|
||||
$('.loading_pic').eq(k).hide();
|
||||
} else
|
||||
alert(
|
||||
'Error! The file is not an image.');
|
||||
}
|
||||
});
|
||||
}
|
||||
})(e);
|
||||
})
|
||||
});
|
||||
$('textarea[name=postTag]').tagEditor();
|
||||
});
|
||||
</script>
|
||||
<?php echo $footer; ?>
|
||||
155
application/views/admin/posts.php
Executable file
155
application/views/admin/posts.php
Executable file
@@ -0,0 +1,155 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<h1 class="page-header">
|
||||
<?php echo $this->lang->line('posts_header'); ?>
|
||||
</h1>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<form action="/admin/posts">
|
||||
<div class="input-group searchContainer">
|
||||
<input type="text" class="form-control" id="searchString" name="term"
|
||||
placeholder="<?php echo getSearchTerm()?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="submit" id="searchBtn"><span
|
||||
class="fa fa-search"></span></button>
|
||||
</span>
|
||||
</div><!-- /input-group -->
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-newspaper-o"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/posts"><?php echo $this->lang->line('nav_posts_all'); ?></a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> ID </th>
|
||||
<th> <?php echo $this->lang->line('posts_table_post'); ?> </th>
|
||||
<th> <?php echo $this->lang->line('posts_table_category'); ?> </th>
|
||||
<th> <?php echo $this->lang->line('posts_table_page'); ?> </th>
|
||||
<th>Writer</th>
|
||||
<th> <?php echo $this->lang->line('posts_table_updated'); ?> </th>
|
||||
<th> <?php echo $this->lang->line('posts_table_published'); ?> </th>
|
||||
<th class="td-actions"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="postContainer">
|
||||
<?php
|
||||
foreach ($posts as $p) {
|
||||
echo '<tr>';
|
||||
echo '<td>'.$p['postID'].'</td>';
|
||||
echo '<td>'.$p['postTitle'].'</td>';
|
||||
echo '<td>'.$p['categoryTitle'].'</td>';
|
||||
echo '<td>'.$p['pageTitle'].'</td>';
|
||||
echo '<td>'.$p['userName'].'</td>';
|
||||
echo '<td>'.$p['dateUpdated'].'</td>';
|
||||
echo '<td>'.($p['published'] ? '<span class="fa fa-2x fa-check-circle"></span>' : '<span class="fa fa-2x fa-times-circle"></span> <a href="" class="settime-publish" tabindex="'.$p['postID'].'"><span class="fa fa-2x fa-clock-o"></span></a>').'</td>';
|
||||
echo '<td class="td-actions"><a href="'.BASE_URL.'/admin/posts/edit/'.$p['postID'].'" class="btn btn-small btn-success"><i class="fa fa-pencil"> </i></a> <a data-toggle="modal" data-target="#ajaxModal" class="btn btn-danger btn-small" href="'.BASE_URL.'/admin/posts/delete/'.$p['postID'].'"><i class="fa fa-remove"> </i></a></td>';
|
||||
echo '</tr>';
|
||||
} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="text-center" id="loadingSpinner">
|
||||
<i class="fa fa-cog fa-spin fa-3x fa-fw"></i>
|
||||
</div>
|
||||
<div id="paginationContainer">
|
||||
<?php echo $this->pagination->create_links(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal fade schedule-publish-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">New message</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label for="postID" class="col-form-label">PostID:</label>
|
||||
<input type="text" class="form-control" name="postID" readonly>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="postTitle" class="col-form-label">Post Title:</label>
|
||||
<input type="text" class="form-control" name="postTitle" readonly>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="run_at" class="col-form-label">Reserved Date:</label>
|
||||
<div class="form-group">
|
||||
<div class='input-group date' id='datetimepicker1'>
|
||||
<input type='text' class="form-control" name="run_at" />
|
||||
<span class="input-group-addon">
|
||||
<span class="fa fa-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary submit-schedule">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
$('#datetimepicker1').datetimepicker({
|
||||
format: 'YYYY-MM-DD HH:mm',
|
||||
dayViewHeaderFormat: 'YYYY-MM-DD',
|
||||
sideBySide: true,
|
||||
icons: {
|
||||
up: "fa fa-chevron-circle-up",
|
||||
down: "fa fa-chevron-circle-down",
|
||||
next: 'fa fa-chevron-circle-right',
|
||||
previous: 'fa fa-chevron-circle-left'
|
||||
}
|
||||
});
|
||||
$('.settime-publish').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
$('.schedule-publish-modal form input[name=postID]').val($(this).prop('tabindex'));
|
||||
$('.schedule-publish-modal form input[name=postTitle]').val($(this).parent().siblings().eq(0)
|
||||
.text());
|
||||
$('.schedule-publish-modal').modal('show')
|
||||
});
|
||||
$('.submit-schedule').on('click', function(e) {
|
||||
var frm = $('.schedule-publish-modal form').get(0);
|
||||
var params = {
|
||||
postID: frm.postID.value,
|
||||
run_at: frm.run_at.value
|
||||
};
|
||||
$.post('/admin/posts/schedule/' + params.postID, params, function(res) {
|
||||
if (res.code == 200) {
|
||||
alert('Saved!');
|
||||
$('.schedule-publish-modal').modal('hide')
|
||||
}
|
||||
}, 'json')
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<?php echo $footer; ?>
|
||||
149
application/views/admin/pray.php
Executable file
149
application/views/admin/pray.php
Executable file
@@ -0,0 +1,149 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<h1 class="page-header">
|
||||
<?php echo $this->lang->line('pray_header'); ?>
|
||||
</h1>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<form action="/admin/pray">
|
||||
<div class="input-group searchContainer">
|
||||
<input type="text" class="form-control" id="searchString" name="term"
|
||||
placeholder="<?php echo getSearchTerm()?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="submit" id="searchBtn"><span
|
||||
class="fa fa-search"></span></button>
|
||||
</span>
|
||||
</div><!-- /input-group -->
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-newspaper-o"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/posts"><?php echo $this->lang->line('nav_posts_all'); ?></a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> ID </th>
|
||||
<th> Comment </th>
|
||||
<th> User </th>
|
||||
<th> Posted Date </th>
|
||||
<th class="td-actions"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="postContainer">
|
||||
<?php
|
||||
foreach ($pray as $p) {
|
||||
echo '<tr>';
|
||||
echo '<td>'.$p->prayID.'</td>';
|
||||
echo '<td>'.$p->pray.'</td>';
|
||||
echo '<td>'.$p->nickname.'</td>';
|
||||
echo '<td>'.$p->dateUpdated.'</td>';
|
||||
echo '<td class="td-actions"><a href="'.BASE_URL.'/admin/pray/edit/'.$p->prayID.'" class="btn btn-small btn-success"><i class="fa fa-pencil"> </i></a> <a data-toggle="modal" data-target="#ajaxModal" class="btn btn-danger btn-small" href="'.BASE_URL.'/admin/pray/delete/'.$p->prayID.'"><i class="fa fa-remove"> </i></a></td>';
|
||||
echo '</tr>';
|
||||
} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="text-center" id="loadingSpinner">
|
||||
<i class="fa fa-cog fa-spin fa-3x fa-fw"></i>
|
||||
</div>
|
||||
<div id="paginationContainer">
|
||||
<?php echo $this->pagination->create_links(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal fade schedule-publish-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">New message</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label for="postID" class="col-form-label">PostID:</label>
|
||||
<input type="text" class="form-control" name="postID" readonly>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="postTitle" class="col-form-label">Post Title:</label>
|
||||
<input type="text" class="form-control" name="postTitle" readonly>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="run_at" class="col-form-label">Reserved Date:</label>
|
||||
<div class="form-group">
|
||||
<div class='input-group date' id='datetimepicker1'>
|
||||
<input type='text' class="form-control" name="run_at" />
|
||||
<span class="input-group-addon">
|
||||
<span class="fa fa-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary submit-schedule">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
$('#datetimepicker1').datetimepicker({
|
||||
format: 'YYYY-MM-DD HH:mm',
|
||||
dayViewHeaderFormat: 'YYYY-MM-DD',
|
||||
sideBySide: true,
|
||||
icons: {
|
||||
up: "fa fa-chevron-circle-up",
|
||||
down: "fa fa-chevron-circle-down",
|
||||
next: 'fa fa-chevron-circle-right',
|
||||
previous: 'fa fa-chevron-circle-left'
|
||||
}
|
||||
});
|
||||
$('.settime-publish').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
$('.schedule-publish-modal form input[name=postID]').val($(this).prop('tabindex'));
|
||||
$('.schedule-publish-modal form input[name=postTitle]').val($(this).parent().siblings().eq(0)
|
||||
.text());
|
||||
$('.schedule-publish-modal').modal('show')
|
||||
});
|
||||
$('.submit-schedule').on('click', function(e) {
|
||||
var frm = $('.schedule-publish-modal form').get(0);
|
||||
var params = {
|
||||
postID: frm.postID.value,
|
||||
run_at: frm.run_at.value
|
||||
};
|
||||
$.post('/admin/posts/schedule/' + params.postID, params, function(res) {
|
||||
if (res.code == 200) {
|
||||
alert('Saved!');
|
||||
$('.schedule-publish-modal').modal('hide')
|
||||
}
|
||||
}, 'json')
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<?php echo $footer; ?>
|
||||
16
application/views/admin/pray_delete.php
Executable file
16
application/views/admin/pray_delete.php
Executable file
@@ -0,0 +1,16 @@
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title"><?php echo $this->lang->line('comments_delete').": ".$form[0]['prayID'] ?>?</h4>
|
||||
</div> <!-- /modal-header -->
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<strong>WARNING: </strong><p><?php echo $this->lang->line('comments_delete_message'); ?></p>
|
||||
</div>
|
||||
</div> <!-- /modal-body -->
|
||||
<div class="modal-footer">
|
||||
<form ACTION="<?php echo BASE_URL.'/admin/pray/delete/'.$form[0]['prayID']; ?>" method="POST" name="pageform" id="pageform">
|
||||
<input name="deleteid" type="hidden" id="deleteid" value="<?php echo $form[0]['prayID'] ?>" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo $this->lang->line('btn_cancel'); ?></button>
|
||||
<input class="btn btn-danger" type="submit" value="<?php echo $this->lang->line('btn_delete'); ?>"/>
|
||||
</form>
|
||||
</div> <!-- /modal-footer -->
|
||||
18
application/views/admin/reset.php
Executable file
18
application/views/admin/reset.php
Executable file
@@ -0,0 +1,18 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="login-panel panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<img src="<?php echo ADMIN_THEME; ?>/images/large_logo.png" class="login_logo" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<h3><?php echo $this->lang->line('forgot_reset'); ?></h3>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<a class="button btn btn-success" href="<?php echo BASE_URL; ?>/admin/login"><?php echo $this->lang->line('login_signin'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
53
application/views/admin/resetform.php
Executable file
53
application/views/admin/resetform.php
Executable file
@@ -0,0 +1,53 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="login-panel panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<img src="<?php echo ADMIN_THEME; ?>/images/large_logo.png" class="login_logo" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<?php echo form_error('password', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label" for="password"><?php echo $this->lang->line('forgot_password'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'password',
|
||||
'id' => 'password',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('password')
|
||||
);
|
||||
|
||||
echo form_password($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('con_password', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label" for="con_password"><?php echo $this->lang->line('forgot_confirm'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'con_password',
|
||||
'id' => 'con_password',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('con_password')
|
||||
);
|
||||
|
||||
echo form_password($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<?php $data = array(
|
||||
'name' => 'submit',
|
||||
'id' => 'submit',
|
||||
'class' => 'btn btn-primary',
|
||||
'value' => $this->lang->line('forgot_btn'),
|
||||
);
|
||||
echo form_submit($data); ?>
|
||||
</div> <!-- /form-actions -->
|
||||
<?php echo form_close(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
15
application/views/admin/role_delete.php
Executable file
15
application/views/admin/role_delete.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title">Role delete<?php echo $this->lang->line('role_delete').": ".$form[0]['name'] ?>?</h4>
|
||||
</div> <!-- /modal-header -->
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-danger" role="alert"><strong>WARNING: </strong><?php echo '<p>Delete role!!'.$this->lang->line('role_delete_message').'</p>';
|
||||
?></div>
|
||||
</div> <!-- /modal-body -->
|
||||
<div class="modal-footer">
|
||||
<form ACTION="<?php echo BASE_URL.'/admin/settings/roles/delete/'.$form[0]['roleID']; ?>" method="POST" name="pageform" id="pageform">
|
||||
<input name="deleteid" type="hidden" id="deleteid" value="<?php echo $form[0]['roleID'] ?>" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo $this->lang->line('btn_cancel'); ?></button>
|
||||
<input class="btn btn-danger" type="submit" value="<?php echo $this->lang->line('btn_delete'); ?>"/>
|
||||
</form>
|
||||
</div> <!-- /modal-footer -->
|
||||
97
application/views/admin/role_edit.php
Executable file
97
application/views/admin/role_edit.php
Executable file
@@ -0,0 +1,97 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
Edit Role<?php echo $this->lang->line('role_edit_header'); ?>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-fw fa-user"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/users"><?php echo $this->lang->line('user_header'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-pencil"></i>
|
||||
Edit Role<?php echo $this->lang->line('role_edit_header'); ?>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<i class="fa fa-pencil fa-fw"></i>Edit Role
|
||||
<?php echo $this->lang->line('role_edit_header'); ?>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<?php foreach ($users as $u) {
|
||||
echo form_open(BASE_URL.'/admin/settings/roles/edited/'.$this->uri->segment(5)); ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('name', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label" for="name">Role
|
||||
name<?php echo $this->lang->line('role_new_name'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'name',
|
||||
'id' => 'role_name',
|
||||
'class' => 'form-control disabled',
|
||||
'value' => set_value('name', $u['name'])
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('slug', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label" for="slug">Role
|
||||
slug<?php echo $this->lang->line('role_new_slug'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'slug',
|
||||
'id' => 'role_slug',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('slug', $u['slug']),
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="panel-footer">
|
||||
<?php $data = array(
|
||||
'name' => 'submit',
|
||||
'id' => 'submit',
|
||||
'class' => 'btn btn-primary',
|
||||
'value' => $this->lang->line('btn_save'),
|
||||
);
|
||||
echo form_submit($data); ?>
|
||||
<a class="btn"
|
||||
href="<?php echo BASE_URL; ?>/admin/settings/roles"><?php echo $this->lang->line('btn_cancel'); ?></a>
|
||||
</div> <!-- /form-actions -->
|
||||
<?php echo form_close();
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo $footer; ?>
|
||||
87
application/views/admin/role_new.php
Executable file
87
application/views/admin/role_new.php
Executable file
@@ -0,0 +1,87 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
New Role<?php echo $this->lang->line('role_new_header'); ?>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-fw fa-user"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/users">Roles<?php echo $this->lang->line('roles_header'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-pencil"></i>
|
||||
New Role<?php echo $this->lang->line('role_new_header'); ?>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<i class="fa fa-pencil fa-fw"></i>
|
||||
<?php echo $this->lang->line('user_new_header'); ?>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<?php echo form_open(BASE_URL.'/admin/settings/roles/new/add'); ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('username', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label" for="username">Role name<?php echo $this->lang->line('role_new_name'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'name',
|
||||
'id' => 'role_name',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('name', '', FALSE)
|
||||
);
|
||||
echo form_input($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('email', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label" for="email">Role slug<?php echo $this->lang->line('role_new_slug'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'slug',
|
||||
'id' => 'role_slug',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('slug', '', FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<?php $data = array(
|
||||
'name' => 'submit',
|
||||
'id' => 'submit',
|
||||
'class' => 'btn btn-primary',
|
||||
'value' => $this->lang->line('btn_save'),
|
||||
);
|
||||
echo form_submit($data); ?>
|
||||
<a class="btn" href="<?php echo BASE_URL; ?>/admin/settings/roles"><?php echo $this->lang->line('btn_cancel'); ?></a>
|
||||
</div> <!-- /form-actions -->
|
||||
<?php echo form_close(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo $footer; ?>
|
||||
70
application/views/admin/roles.php
Executable file
70
application/views/admin/roles.php
Executable file
@@ -0,0 +1,70 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<h1 class="page-header">
|
||||
User Roles<?php echo $this->lang->line('setting_roles_header'); ?>
|
||||
</h1>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="input-group searchContainer">
|
||||
<input type="text" class="form-control" id="searchString">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button" id="searchBtn" onClick="doRoleSearch();"><span
|
||||
class="fa fa-search"></span></button>
|
||||
</span>
|
||||
</div><!-- /input-group -->
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-user"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/settings/roles">User
|
||||
Roles<?php echo $this->lang->line('setting_roles_header'); ?></a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="searchContainer">
|
||||
<a href="<?php echo BASE_URL.'/admin/settings/roles/new'?>" class="btn btn-primary"><span><i
|
||||
class="fa fa-edit"></i> New Role</span></a>
|
||||
|
||||
</div><!-- /input-group -->
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> Role name<?php echo $this->lang->line('role_name'); ?> </th>
|
||||
<th> Role Slug<?php echo $this->lang->line('role_slug'); ?> </th>
|
||||
<th> Created<?php echo $this->lang->line('role_created_at'); ?> </th>
|
||||
<th class="td-actions"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="roleContainer">
|
||||
<?php
|
||||
foreach ($roles as $r) {
|
||||
echo '<tr>';
|
||||
echo '<td>'.$r['name'].'</td>';
|
||||
echo '<td>'.$r['slug'].'</td>';
|
||||
echo '<td>'.$r['created_at'].'</td>';
|
||||
echo '<td class="td-actions"><a href="'.BASE_URL.'/admin/settings/roles/edit/'.$r['roleID']
|
||||
. '" class="btn btn-small btn-success"><i class="fa fa-pencil"> '
|
||||
. '</i></a> <a data-toggle="modal" data-target="#ajaxModal" class="btn btn-danger btn-small" href="'
|
||||
. BASE_URL.'/admin/settings/roles/delete/'.$r['roleID'].'"><i class="fa fa-remove"> </i></a></td>';
|
||||
echo '</tr>';
|
||||
} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php echo $this->pagination->create_links(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo $footer; ?>
|
||||
480
application/views/admin/settings.php
Executable file
480
application/views/admin/settings.php
Executable file
@@ -0,0 +1,480 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?php echo $this->lang->line('settings_header'); ?>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-cogs "></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/settings"><?php echo $this->lang->line('settings_header'); ?></a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<i class="fa fa-cogs fa-fw"></i>
|
||||
<?php echo $this->lang->line('settings_header'); ?>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php echo $this->lang->line('settings_message'); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<i class="fa fa-cogs fa-fw"></i>
|
||||
<?php echo $this->lang->line('settings_info'); ?>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<?php foreach ($settings as $s) {
|
||||
echo form_open_multipart(BASE_URL . '/admin/settings/update'); ?>
|
||||
<?php echo form_error('siteTitle', '<div class="alert">', '</div>'); ?>
|
||||
<label class="control-label" for="siteTitle"><?php echo $this->lang->line('settings_name'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'siteTitle',
|
||||
'id' => 'siteTitle',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('siteTitle', $s['siteTitle'], FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="siteFooter"><?php echo $this->lang->line('settings_footer'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'siteFooter',
|
||||
'id' => 'siteFooter',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('siteFooter', $s['siteFooter'], FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="themes"><?php echo $this->lang->line('settings_theme'); ?></label>
|
||||
<div class="controls">
|
||||
<?php
|
||||
$att = 'id="siteTheme" class="form-control"';
|
||||
$data = array();
|
||||
foreach ($themesdir as $t) {
|
||||
if (!is_dir($t)) {
|
||||
if (($t != "index.html") && ($t != "admin/") && ($t != "admin")) {
|
||||
$t = str_replace("/", "", $t);
|
||||
$data[$t] = $t;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo form_dropdown('siteTheme', $data, $s['siteTheme'], $att); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="siteLang"><?php echo $this->lang->line('settings_lang'); ?></label>
|
||||
<div class="controls">
|
||||
<?php
|
||||
$att = 'id="siteLang" class="form-control"';
|
||||
$data = array();
|
||||
foreach ($langdir as $l) {
|
||||
if (!is_dir($l)) {
|
||||
if ($l != "index.html") {
|
||||
$l = str_replace("/", "", $l);
|
||||
$data[$l] = $l;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo form_dropdown('siteLang', $data, $s['siteLang'], $att); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="siteAdditionalJS">웹마스터 이메일 주소 ( * 이메일 발송시 보내는 이메일 입니다. )</label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'webmaster_name',
|
||||
'id' => 'webmaster_name',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('webmaster_name', $s['webmaster_name'], FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="siteAdditionalJS">웹마스터 이메일 주소 ( * 이메일 발송시 보내는 이메일 입니다. )</label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'webmaster_email',
|
||||
'id' => 'webmaster_email',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('webmaster_email', $s['webmaster_email'], FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
|
||||
<hr />
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="siteAdditionalJS">금칙어설정</label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'banned_word',
|
||||
'id' => 'banned_word',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('banned_word', $s['banned_word'], FALSE)
|
||||
);
|
||||
|
||||
echo form_textarea($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('file_upload', '<div class="alert">', '</div>'); ?>
|
||||
<label class="control-label" for="file_upload"><?php echo $this->lang->line('settings_logo'); ?></label>
|
||||
<div class="controls">
|
||||
<div><img src="<?php if ($s['siteLogo'] != "") {
|
||||
echo BASE_URL . '/images/' . $s['siteLogo'];
|
||||
} ?>" id="logo_preloaded" <?php if ($s['siteLogo'] == "") {
|
||||
echo "style='display:none;'";
|
||||
} ?>></div>
|
||||
<img src="<?php echo BASE_URL; ?>/theme/admin/images/ajax-loader.gif" style="margin:-7px 5px 0 5px;display:none;" id="loading_pic" />
|
||||
<?php
|
||||
$data = array(
|
||||
'name' => 'file_upload',
|
||||
'id' => 'file_upload',
|
||||
'class' => 'form-control'
|
||||
);
|
||||
echo form_upload($data);
|
||||
?>
|
||||
<input type="hidden" id="siteLogo" name="siteLogo" />
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<hr />
|
||||
<div class="form-group">
|
||||
<?php echo form_error('file_upload', '<div class="alert">', '</div>'); ?>
|
||||
<label class="control-label" for="favicon_upload"><?php echo $this->lang->line('settings_favicon'); ?></label>
|
||||
<div class="controls">
|
||||
<div><img src="<?php if ($s['siteFavicon'] != "") {
|
||||
echo BASE_URL . '/images/' . $s['siteFavicon'];
|
||||
} ?>" id="favicon_preloaded" <?php if ($s['siteFavicon'] == "") {
|
||||
echo "style='display:none;'";
|
||||
} ?>></div>
|
||||
<img src="<?php echo BASE_URL; ?>/theme/admin/images/ajax-loader.gif" style="margin:-7px 5px 0 5px;display:none;" id="loading_pic_favicon" />
|
||||
<?php
|
||||
$data = array(
|
||||
'name' => 'favicon_upload',
|
||||
'id' => 'favicon_upload',
|
||||
'class' => 'form-control'
|
||||
);
|
||||
echo form_upload($data);
|
||||
?>
|
||||
<input type="hidden" id="siteFavicon" name="siteFavicon" />
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<hr />
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="siteMaintenance"><?php echo $this->lang->line('settings_maintenance'); ?></label>
|
||||
<div class="controls">
|
||||
<?php
|
||||
$att = 'id="siteMaintenance" class="form-control"';
|
||||
$data = array(
|
||||
"0" => "Disabled",
|
||||
"1" => "Enabled"
|
||||
);
|
||||
|
||||
|
||||
echo form_dropdown('siteMaintenance', $data, $s['siteMaintenance'], $att); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="siteMaintenanceHeading"><?php echo $this->lang->line('settings_maintenance_heading'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'siteMaintenanceHeading',
|
||||
'id' => 'siteMaintenanceHeading',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('siteMaintenanceHeading', $s['siteMaintenanceHeading'], FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="siteMaintenanceMeta"><?php echo $this->lang->line('settings_maintenance_meta'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'siteMaintenanceMeta',
|
||||
'id' => 'siteMaintenanceMeta',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('siteMaintenanceMeta', $s['siteMaintenanceMeta'], FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="siteMaintenanceContent"><?php echo $this->lang->line('settings_maintenance_content'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'siteMaintenanceContent',
|
||||
'id' => 'siteMaintenanceContent',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('siteMaintenanceContent', $s['siteMaintenanceContent'], FALSE)
|
||||
);
|
||||
|
||||
echo form_textarea($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
<hr />
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="siteAdditionalJS"><?php echo $this->lang->line('settings_additional_js'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'siteAdditionalJS',
|
||||
'id' => 'siteAdditionalJS',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('siteAdditionalJS', $s['siteAdditionalJS'], FALSE)
|
||||
);
|
||||
|
||||
echo form_textarea($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<hr />
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="legal_terms">이용약관</label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'legal_terms',
|
||||
'id' => 'legal_terms',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('legal_terms', preg_replace('#<br\s*/?>#i', "\n",$s['legal_terms']), FALSE)
|
||||
);
|
||||
|
||||
echo form_textarea($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<hr />
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="legal_privacy">개인정보 취급방침</label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'legal_privacy',
|
||||
'id' => 'legal_privacy',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('legal_privacy', preg_replace('#<br\s*/?>#i', "\n",$s['legal_privacy']), FALSE)
|
||||
);
|
||||
|
||||
echo form_textarea($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<hr />
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="legal_privatedata">개인정보 수집 이용동의</label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'legal_privatedata',
|
||||
'id' => 'legal_privatedata',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('legal_privatedata', preg_replace('#<br\s*/?>#i', "\n",$s['legal_privatedata']), FALSE)
|
||||
);
|
||||
|
||||
echo form_textarea($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
|
||||
|
||||
<?php $data = array(
|
||||
'name' => 'submit',
|
||||
'id' => 'submit',
|
||||
'class' => 'btn btn-primary',
|
||||
'value' => $this->lang->line('btn_save'),
|
||||
);
|
||||
echo form_submit($data); ?>
|
||||
<?php echo form_close();
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
if (document.getElementById('file_upload')) {
|
||||
function prepareUpload(event) {
|
||||
files = event.target.files;
|
||||
uploadFiles(event);
|
||||
}
|
||||
|
||||
function uploadFiles(event) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
||||
$('#loading_pic').show();
|
||||
|
||||
var data = new FormData();
|
||||
$.each(files, function(key, value) {
|
||||
data.append(key, value);
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: '<?php echo BASE_URL; ?>/admin/settings/submit/?files',
|
||||
type: 'POST',
|
||||
data: data,
|
||||
cache: false,
|
||||
dataType: 'json',
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(data, textStatus, jqXHR) {
|
||||
if (data != '0') {
|
||||
$('#logo_preloaded').show();
|
||||
document.getElementById('logo_preloaded').src = '<?php echo BASE_URL; ?>/uploads/' + data;
|
||||
document.getElementById('siteLogo').value = data;
|
||||
$('#loading_pic').hide();
|
||||
} else
|
||||
alert('<?php echo $this->lang->line('settings_image_error'); ?>');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function submitForm(event, data) {
|
||||
$form = $(event.target);
|
||||
var formData = $form.serialize();
|
||||
$.each(data.files, function(key, value) {
|
||||
formData = formData + '&filenames[]=' + value;
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: '<?php echo BASE_URL; ?>/admin/settings/submit',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
cache: false,
|
||||
dataType: 'json',
|
||||
success: function(data, textStatus, jqXHR) {
|
||||
if (typeof data.error === 'undefined')
|
||||
console.log('SUCCESS: ' + data.success);
|
||||
else
|
||||
console.log('ERRORS: ' + data.error);
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
console.log('ERRORS: ' + textStatus);
|
||||
},
|
||||
complete: function() {
|
||||
$('#loading_pic').hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var files;
|
||||
$('input[name=file_upload]').on('change', prepareUpload);
|
||||
}
|
||||
if (document.getElementById('favicon_upload')) {
|
||||
function prepareUploadFavi(event) {
|
||||
files = event.target.files;
|
||||
uploadFilesFavi(event);
|
||||
}
|
||||
|
||||
function uploadFilesFavi(event) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
||||
$('#loading_pic_favicon').show();
|
||||
|
||||
var data = new FormData();
|
||||
$.each(files, function(key, value) {
|
||||
data.append(key, value);
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: '<?php echo BASE_URL; ?>/admin/settings/submit/?files',
|
||||
type: 'POST',
|
||||
data: data,
|
||||
cache: false,
|
||||
dataType: 'json',
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(data, textStatus, jqXHR) {
|
||||
if (data != '0') {
|
||||
$('#favicon_preloaded').show();
|
||||
document.getElementById('favicon_preloaded').src = '<?php echo BASE_URL; ?>/uploads/' + data;
|
||||
document.getElementById('siteFavicon').value = data;
|
||||
$('#loading_pic_favicon').hide();
|
||||
} else
|
||||
alert('<?php echo $this->lang->line('settings_image_error'); ?>');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function submitForm(event, data) {
|
||||
$form = $(event.target);
|
||||
var formData = $form.serialize();
|
||||
$.each(data.files, function(key, value) {
|
||||
formData = formData + '&filenames[]=' + value;
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: '<?php echo BASE_URL; ?>/admin/settings/submit',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
cache: false,
|
||||
dataType: 'json',
|
||||
success: function(data, textStatus, jqXHR) {
|
||||
if (typeof data.error === 'undefined')
|
||||
console.log('SUCCESS: ' + data.success);
|
||||
else
|
||||
console.log('ERRORS: ' + data.error);
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
console.log('ERRORS: ' + textStatus);
|
||||
},
|
||||
complete: function() {
|
||||
$('#loading_pic_favicon').hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var files;
|
||||
$('input[name=favicon_upload]').on('change', prepareUploadFavi);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<?php echo $footer; ?>
|
||||
88
application/views/admin/social.php
Executable file
88
application/views/admin/social.php
Executable file
@@ -0,0 +1,88 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?php echo $this->lang->line('social_header'); ?>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-share-alt"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/social"><?php echo $this->lang->line('social_header'); ?></a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<i class="fa fa-share-alt fa-fw"></i>
|
||||
<?php echo $this->lang->line('social_header'); ?>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php echo $this->lang->line('social_message'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<i class="fa fa-share-alt fa-fw"></i>
|
||||
<?php echo $this->lang->line('social_header'); ?>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php echo form_open(BASE_URL.'/admin/social/update'); ?>
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> <?php echo $this->lang->line('social_table_title'); ?> </th>
|
||||
<th> <?php echo $this->lang->line('social_table_link'); ?> </th>
|
||||
<th> <?php echo $this->lang->line('social_table_enabled'); ?> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($social as $s){ ?>
|
||||
<tr>
|
||||
<td><?php echo $this->lang->line('social_'.$s['socialName']); ?></td>
|
||||
<td><?php $data = array(
|
||||
'name' => $s['socialName'],
|
||||
'id' => $s['socialName'],
|
||||
'class' => 'form-control ',
|
||||
'value' => set_value($s['socialName'], $s['socialLink'], FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?></td>
|
||||
<td><input type="checkbox" value="1" name="checkbox<?php echo $s['socialName']; ?>" <?php if ($s['socialEnabled']==1){ echo " checked ";} ?>></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<?php $data = array(
|
||||
'name' => 'submit',
|
||||
'id' => 'submit',
|
||||
'class' => 'btn btn-primary',
|
||||
'value' => $this->lang->line('btn_save'),
|
||||
);
|
||||
echo form_submit($data); ?>
|
||||
<?php echo form_close();
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo $footer; ?>
|
||||
23
application/views/admin/upload.php
Executable file
23
application/views/admin/upload.php
Executable file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
$attachment = $this->input->post('attachment');
|
||||
$uploadedFile = $_FILES['attachment']['tmp_name']['file'];
|
||||
|
||||
$path = $_SERVER["DOCUMENT_ROOT"].'/images';
|
||||
$url = BASE_URL.'/images';
|
||||
|
||||
// create an image name
|
||||
$fileName = $attachment['name'];
|
||||
|
||||
// upload the image
|
||||
move_uploaded_file($uploadedFile, $path.'/'.$fileName);
|
||||
|
||||
$this->output->set_output(json_encode(array('file' => array(
|
||||
'url' => $url . '/' . $fileName,
|
||||
'filename' => $fileName
|
||||
))),
|
||||
200,
|
||||
array('Content-Type' => 'application/json')
|
||||
);
|
||||
|
||||
exit;
|
||||
15
application/views/admin/user_delete.php
Executable file
15
application/views/admin/user_delete.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title"><?php echo $this->lang->line('user_delete').": ".$form[0]['userName'] ?>?</h4>
|
||||
</div> <!-- /modal-header -->
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-danger" role="alert"><strong>WARNING: </strong><?php echo '<p>'.$this->lang->line('user_delete_message').'</p>';
|
||||
?></div>
|
||||
</div> <!-- /modal-body -->
|
||||
<div class="modal-footer">
|
||||
<form ACTION="<?php echo BASE_URL.'/admin/users/delete/'.$form[0]['userID']; ?>" method="POST" name="pageform" id="pageform">
|
||||
<input name="deleteid" type="hidden" id="deleteid" value="<?php echo $form[0]['userID'] ?>" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo $this->lang->line('btn_cancel'); ?></button>
|
||||
<input class="btn btn-danger" type="submit" value="<?php echo $this->lang->line('btn_delete'); ?>"/>
|
||||
</form>
|
||||
</div> <!-- /modal-footer -->
|
||||
186
application/views/admin/user_edit.php
Executable file
186
application/views/admin/user_edit.php
Executable file
@@ -0,0 +1,186 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?php echo $this->lang->line('user_edit_header'); ?>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-fw fa-user"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/users"><?php echo $this->lang->line('user_header'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-pencil"></i>
|
||||
<?php echo $this->lang->line('user_edit_header'); ?>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<i class="fa fa-pencil fa-fw"></i>
|
||||
<?php echo $this->lang->line('user_edit_header'); ?>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<?php foreach ($users as $u) {
|
||||
echo form_open(BASE_URL.'/admin/users/edited/'.$this->uri->segment(4)); ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('username', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="username"><?php echo $this->lang->line('user_new_username'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'username',
|
||||
'id' => 'username',
|
||||
'class' => 'form-control disabled',
|
||||
'value' => set_value('username', $u['userName']),
|
||||
'disabled' => ''
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
|
||||
<p class="help-block"><?php echo $this->lang->line('user_new_message'); ?></p>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('role', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label" for="role"><?php echo $this->lang->line('user_role'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'role',
|
||||
'id' => 'role',
|
||||
'class' => 'form-control select2 ',
|
||||
'value' => set_value('role', '', FALSE)
|
||||
);
|
||||
|
||||
echo form_dropdown($data, $roles, $u['roleID']); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('email', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="email"><?php echo $this->lang->line('user_new_email'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'email',
|
||||
'id' => 'email',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('email', $u['email']),
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('password', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="password"><?php echo $this->lang->line('user_new_pass'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'password',
|
||||
'id' => 'password',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('password')
|
||||
);
|
||||
|
||||
echo form_password($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('con_password', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="con_password"><?php echo $this->lang->line('user_new_confirm'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'con_password',
|
||||
'id' => 'con_password',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('con_password')
|
||||
);
|
||||
|
||||
echo form_password($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('name', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label" for="name"><?php echo $this->lang->line('user_name'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'name',
|
||||
'id' => 'name',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('name', $u['name'], FALSE)
|
||||
);
|
||||
echo form_input($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('gender', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="gender"><?php echo $this->lang->line('user_gender'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'gender',
|
||||
'id' => 'gender',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('gender', $u['gender'], FALSE)
|
||||
);
|
||||
echo form_dropdown($data, ['M' => 'Male', 'F' => 'Female']); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('mobile', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="mobile"><?php echo $this->lang->line('user_mobile'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'mobile',
|
||||
'id' => 'mobile',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('mobile', $u['mobile'], FALSE)
|
||||
);
|
||||
echo form_input($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
</div>
|
||||
|
||||
<div class="panel-footer">
|
||||
<?php $data = array(
|
||||
'name' => 'submit',
|
||||
'id' => 'submit',
|
||||
'class' => 'btn btn-primary',
|
||||
'value' => $this->lang->line('btn_save'),
|
||||
);
|
||||
echo form_submit($data); ?>
|
||||
<a class="btn"
|
||||
href="<?php echo BASE_URL; ?>/admin/users"><?php echo $this->lang->line('btn_cancel'); ?></a>
|
||||
</div> <!-- /form-actions -->
|
||||
<?php echo form_close();
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo $footer; ?>
|
||||
184
application/views/admin/user_new.php
Executable file
184
application/views/admin/user_new.php
Executable file
@@ -0,0 +1,184 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?php echo $this->lang->line('user_new_header'); ?>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-fw fa-user"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/users"><?php echo $this->lang->line('user_header'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-pencil"></i>
|
||||
<?php echo $this->lang->line('user_new_header'); ?>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<i class="fa fa-pencil fa-fw"></i>
|
||||
<?php echo $this->lang->line('user_new_header'); ?>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<?php echo form_open(BASE_URL.'/admin/users/new/add'); ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('username', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="username"><?php echo $this->lang->line('user_new_username'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'username',
|
||||
'id' => 'username',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('username', '', FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
|
||||
<p class="help-block"><?php echo $this->lang->line('user_new_message'); ?></p>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('role', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="role"><?php echo $this->lang->line('user_role'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'role',
|
||||
'id' => 'role',
|
||||
'class' => 'form-control select2 ',
|
||||
'value' => set_value('role', '', FALSE)
|
||||
);
|
||||
|
||||
echo form_dropdown($data, $roles); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('email', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="email"><?php echo $this->lang->line('user_new_email'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'email',
|
||||
'id' => 'email',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('email', '', FALSE)
|
||||
);
|
||||
|
||||
echo form_input($data); ?>
|
||||
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('password', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="password"><?php echo $this->lang->line('user_new_pass'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'password',
|
||||
'id' => 'password',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('password', '', FALSE)
|
||||
);
|
||||
|
||||
echo form_password($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('con_password', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="con_password"><?php echo $this->lang->line('user_new_confirm'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'con_password',
|
||||
'id' => 'con_password',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('con_password', '', FALSE)
|
||||
);
|
||||
|
||||
echo form_password($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('name', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="name"><?php echo $this->lang->line('user_name'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'name',
|
||||
'id' => 'name',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('name', '', FALSE)
|
||||
);
|
||||
echo form_input($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('gender', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="gender"><?php echo $this->lang->line('user_gender'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'gender',
|
||||
'id' => 'gender',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('gender', '', FALSE)
|
||||
);
|
||||
echo form_dropdown($data, ['M' => 'Male', 'F' => 'Female']); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo form_error('mobile', '<div class="alert alert-danger">', '</div>'); ?>
|
||||
<label class="control-label"
|
||||
for="mobile"><?php echo $this->lang->line('user_mobile'); ?></label>
|
||||
<div class="controls">
|
||||
<?php $data = array(
|
||||
'name' => 'mobile',
|
||||
'id' => 'mobile',
|
||||
'class' => 'form-control',
|
||||
'value' => set_value('mobile', '', FALSE)
|
||||
);
|
||||
echo form_input($data); ?>
|
||||
</div> <!-- /controls -->
|
||||
</div> <!-- /form-group -->
|
||||
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<?php $data = array(
|
||||
'name' => 'submit',
|
||||
'id' => 'submit',
|
||||
'class' => 'btn btn-primary',
|
||||
'value' => $this->lang->line('btn_save'),
|
||||
);
|
||||
echo form_submit($data); ?>
|
||||
<a class="btn"
|
||||
href="<?php echo BASE_URL; ?>/admin/users"><?php echo $this->lang->line('btn_cancel'); ?></a>
|
||||
</div> <!-- /form-actions -->
|
||||
<?php echo form_close(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo $footer; ?>
|
||||
67
application/views/admin/users.php
Executable file
67
application/views/admin/users.php
Executable file
@@ -0,0 +1,67 @@
|
||||
<?php echo $header; ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<h1 class="page-header">
|
||||
<?php echo $this->lang->line('user_header'); ?>
|
||||
</h1>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="container-fluid">
|
||||
<form action="">
|
||||
<div class="input-group searchContainer">
|
||||
|
||||
<input type="text" class="form-control" id="searchString" name="term">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" id="searchBtn" type="submit"><span
|
||||
class="fa fa-search"></span></button>
|
||||
</span>
|
||||
|
||||
</div><!-- /input-group -->
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<i class="fa fa-fw fa-user"></i>
|
||||
<a href="<?php echo BASE_URL; ?>/admin/users"><?php echo $this->lang->line('user_header'); ?></a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> <?php echo $this->lang->line('user_username'); ?> </th>
|
||||
<th> Group </th>
|
||||
<th> <?php echo $this->lang->line('user_email'); ?> </th>
|
||||
<th class="td-actions"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="userContainer">
|
||||
<?php
|
||||
foreach ($users as $u) {
|
||||
echo '<tr>';
|
||||
echo '<td>'.$u['userName'].'</td>';
|
||||
echo '<td>'.$u['groupName'].'</td>';
|
||||
echo '<td>'.$u['email'].'</td>';
|
||||
echo '<td class="td-actions"><a href="'.BASE_URL.'/admin/users/edit/'.$u['userID'].'" class="btn btn-small btn-success"><i class="fa fa-pencil"> </i></a> <a data-toggle="modal" data-target="#ajaxModal" class="btn btn-danger btn-small" href="'.BASE_URL.'/admin/users/delete/'.$u['userID'].'"><i class="fa fa-remove"> </i></a></td>';
|
||||
echo '</tr>';
|
||||
} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php echo $this->pagination->create_links(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo $footer; ?>
|
||||
2
application/views/admin/youtube-iframe.php
Executable file
2
application/views/admin/youtube-iframe.php
Executable file
@@ -0,0 +1,2 @@
|
||||
<iframe width="560" height="315" src="<?php echo $videoURL?>" frameborder="0"
|
||||
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
||||
8
application/views/errors/cli/error_404.php
Executable file
8
application/views/errors/cli/error_404.php
Executable file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
echo "\nERROR: ",
|
||||
$heading,
|
||||
"\n\n",
|
||||
$message,
|
||||
"\n\n";
|
||||
8
application/views/errors/cli/error_db.php
Executable file
8
application/views/errors/cli/error_db.php
Executable file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
echo "\nDatabase error: ",
|
||||
$heading,
|
||||
"\n\n",
|
||||
$message,
|
||||
"\n\n";
|
||||
25
application/views/errors/cli/error_exception.php
Executable file
25
application/views/errors/cli/error_exception.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?>
|
||||
|
||||
An uncaught Exception was encountered
|
||||
|
||||
Type: <?php echo get_class($exception); ?>
|
||||
Message: <?php echo $message; ?>
|
||||
Filename: <?php echo $exception->getFile(); ?>
|
||||
Line Number: <?php echo $exception->getLine(); ?>
|
||||
|
||||
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
|
||||
|
||||
Backtrace:
|
||||
<?php foreach ($exception->getTrace() as $error): ?>
|
||||
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
|
||||
|
||||
File: <?php echo $error['file']; ?>
|
||||
Line: <?php echo $error['line']; ?>
|
||||
Function: <?php echo $error['function']; ?>
|
||||
|
||||
<?php endif ?>
|
||||
|
||||
<?php endforeach ?>
|
||||
<?php endif ?>
|
||||
8
application/views/errors/cli/error_general.php
Executable file
8
application/views/errors/cli/error_general.php
Executable file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
echo "\nERROR: ",
|
||||
$heading,
|
||||
"\n\n",
|
||||
$message,
|
||||
"\n\n";
|
||||
25
application/views/errors/cli/error_php.php
Executable file
25
application/views/errors/cli/error_php.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?>
|
||||
|
||||
A PHP Error was encountered
|
||||
|
||||
Severity: <?php echo $severity;?>
|
||||
Message: <?php echo $message;?>
|
||||
Filename: <?php echo $filepath;?>
|
||||
Line Number: <?php echo $line;?>
|
||||
|
||||
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
|
||||
|
||||
Backtrace:
|
||||
<?php foreach (debug_backtrace() as $error): ?>
|
||||
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
|
||||
|
||||
File: <?php echo $error['file'];?>
|
||||
Line: <?php echo $error['line'];?>
|
||||
Function: <?php echo $error['function'];?>
|
||||
|
||||
<?php endif ?>
|
||||
|
||||
<?php endforeach ?>
|
||||
<?php endif ?>
|
||||
11
application/views/errors/cli/index.html
Executable file
11
application/views/errors/cli/index.html
Executable file
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
65
application/views/errors/html/error_404.php
Executable file
65
application/views/errors/html/error_404.php
Executable file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?><!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="refresh" content="1; url=/">
|
||||
<title>404 Page Not Found</title>
|
||||
<style type="text/css">
|
||||
|
||||
::selection { background-color: #E13300; color: white; }
|
||||
::-moz-selection { background-color: #E13300; color: white; }
|
||||
|
||||
body {
|
||||
background-color: #fff;
|
||||
margin: 40px;
|
||||
font: 13px/20px normal Helvetica, Arial, sans-serif;
|
||||
color: #4F5155;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #003399;
|
||||
background-color: transparent;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #444;
|
||||
background-color: transparent;
|
||||
border-bottom: 1px solid #D0D0D0;
|
||||
font-size: 19px;
|
||||
font-weight: normal;
|
||||
margin: 0 0 14px 0;
|
||||
padding: 14px 15px 10px 15px;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
||||
font-size: 12px;
|
||||
background-color: #f9f9f9;
|
||||
border: 1px solid #D0D0D0;
|
||||
color: #002166;
|
||||
display: block;
|
||||
margin: 14px 0 14px 0;
|
||||
padding: 12px 10px 12px 10px;
|
||||
}
|
||||
|
||||
#container {
|
||||
margin: 10px;
|
||||
border: 1px solid #D0D0D0;
|
||||
box-shadow: 0 0 8px #D0D0D0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 12px 15px 12px 15px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<h1><?php echo $heading; ?></h1>
|
||||
<?php echo $message; ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
64
application/views/errors/html/error_db.php
Executable file
64
application/views/errors/html/error_db.php
Executable file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?><!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Database Error</title>
|
||||
<style type="text/css">
|
||||
|
||||
::selection { background-color: #E13300; color: white; }
|
||||
::-moz-selection { background-color: #E13300; color: white; }
|
||||
|
||||
body {
|
||||
background-color: #fff;
|
||||
margin: 40px;
|
||||
font: 13px/20px normal Helvetica, Arial, sans-serif;
|
||||
color: #4F5155;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #003399;
|
||||
background-color: transparent;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #444;
|
||||
background-color: transparent;
|
||||
border-bottom: 1px solid #D0D0D0;
|
||||
font-size: 19px;
|
||||
font-weight: normal;
|
||||
margin: 0 0 14px 0;
|
||||
padding: 14px 15px 10px 15px;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
||||
font-size: 12px;
|
||||
background-color: #f9f9f9;
|
||||
border: 1px solid #D0D0D0;
|
||||
color: #002166;
|
||||
display: block;
|
||||
margin: 14px 0 14px 0;
|
||||
padding: 12px 10px 12px 10px;
|
||||
}
|
||||
|
||||
#container {
|
||||
margin: 10px;
|
||||
border: 1px solid #D0D0D0;
|
||||
box-shadow: 0 0 8px #D0D0D0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 12px 15px 12px 15px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<h1><?php echo $heading; ?></h1>
|
||||
<?php echo $message; ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
32
application/views/errors/html/error_exception.php
Executable file
32
application/views/errors/html/error_exception.php
Executable file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?>
|
||||
|
||||
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
|
||||
|
||||
<h4>An uncaught Exception was encountered</h4>
|
||||
|
||||
<p>Type: <?php echo get_class($exception); ?></p>
|
||||
<p>Message: <?php echo $message; ?></p>
|
||||
<p>Filename: <?php echo $exception->getFile(); ?></p>
|
||||
<p>Line Number: <?php echo $exception->getLine(); ?></p>
|
||||
|
||||
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
|
||||
|
||||
<p>Backtrace:</p>
|
||||
<?php foreach ($exception->getTrace() as $error): ?>
|
||||
|
||||
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
|
||||
|
||||
<p style="margin-left:10px">
|
||||
File: <?php echo $error['file']; ?><br />
|
||||
Line: <?php echo $error['line']; ?><br />
|
||||
Function: <?php echo $error['function']; ?>
|
||||
</p>
|
||||
<?php endif ?>
|
||||
|
||||
<?php endforeach ?>
|
||||
|
||||
<?php endif ?>
|
||||
|
||||
</div>
|
||||
64
application/views/errors/html/error_general.php
Executable file
64
application/views/errors/html/error_general.php
Executable file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?><!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Error</title>
|
||||
<style type="text/css">
|
||||
|
||||
::selection { background-color: #E13300; color: white; }
|
||||
::-moz-selection { background-color: #E13300; color: white; }
|
||||
|
||||
body {
|
||||
background-color: #fff;
|
||||
margin: 40px;
|
||||
font: 13px/20px normal Helvetica, Arial, sans-serif;
|
||||
color: #4F5155;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #003399;
|
||||
background-color: transparent;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #444;
|
||||
background-color: transparent;
|
||||
border-bottom: 1px solid #D0D0D0;
|
||||
font-size: 19px;
|
||||
font-weight: normal;
|
||||
margin: 0 0 14px 0;
|
||||
padding: 14px 15px 10px 15px;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
||||
font-size: 12px;
|
||||
background-color: #f9f9f9;
|
||||
border: 1px solid #D0D0D0;
|
||||
color: #002166;
|
||||
display: block;
|
||||
margin: 14px 0 14px 0;
|
||||
padding: 12px 10px 12px 10px;
|
||||
}
|
||||
|
||||
#container {
|
||||
margin: 10px;
|
||||
border: 1px solid #D0D0D0;
|
||||
box-shadow: 0 0 8px #D0D0D0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 12px 15px 12px 15px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<h1><?php echo $heading; ?></h1>
|
||||
<?php echo $message; ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
33
application/views/errors/html/error_php.php
Executable file
33
application/views/errors/html/error_php.php
Executable file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?>
|
||||
|
||||
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
|
||||
|
||||
<h4>A PHP Error was encountered</h4>
|
||||
|
||||
<p>Severity: <?php echo $severity; ?></p>
|
||||
<p>Message: <?php echo $message; ?></p>
|
||||
<p>Filename: <?php echo $filepath; ?></p>
|
||||
<p>Line Number: <?php echo $line; ?></p>
|
||||
|
||||
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
|
||||
|
||||
<p>Backtrace:</p>
|
||||
<?php foreach (debug_backtrace() as $error): ?>
|
||||
|
||||
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
|
||||
|
||||
<p style="margin-left:10px">
|
||||
File: <?php echo $error['file'] ?><br />
|
||||
Line: <?php echo $error['line'] ?><br />
|
||||
Function: <?php echo $error['function'] ?>
|
||||
</p>
|
||||
|
||||
<?php endif ?>
|
||||
|
||||
<?php endforeach ?>
|
||||
|
||||
<?php endif ?>
|
||||
|
||||
</div>
|
||||
11
application/views/errors/html/index.html
Executable file
11
application/views/errors/html/index.html
Executable file
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
11
application/views/errors/index.html
Executable file
11
application/views/errors/index.html
Executable file
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
30
application/views/feed/atom.php
Executable file
30
application/views/feed/atom.php
Executable file
@@ -0,0 +1,30 @@
|
||||
<?php header('Content-Type: '.$ctype.'; charset='.$charset); ?>
|
||||
<?php echo '<?xml version="1.0" encoding="utf-8"?>'."\n"; ?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom"<?php foreach($namespaces as $n) echo " ".$n; ?>>
|
||||
<title type="text"><?php echo $channel['title'] ?></title>
|
||||
<subtitle type="html"><![CDATA[<?php echo $channel['description'] ?>]]></subtitle>
|
||||
<link href="<?php echo $channel['link'] ?>"></link>
|
||||
<id><?php echo $channel['link'] ?></id>
|
||||
<link rel="alternate" type="text/html" href="<?php echo $channel['link'] ?>" ></link>
|
||||
<link rel="self" type="application/atom+xml" href="<?php echo $channel['link'] ?>" ></link>
|
||||
<?php if (!empty($channel['logo'])) : ?>
|
||||
<logo><?php echo $channel['logo'] ?></logo>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($channel['icon'])) : ?>
|
||||
<icon><?php echo $channel['icon'] ?></icon>
|
||||
<?php endif; ?>
|
||||
<updated><?php echo $channel['pubdate'] ?></updated>
|
||||
<?php foreach($items as $item) : ?>
|
||||
<entry>
|
||||
<author>
|
||||
<name><?php echo $item['author'] ?></name>
|
||||
</author>
|
||||
<title type="text"><?php echo $item['title'] ?></title>
|
||||
<link rel="alternate" type="text/html" href="<?php echo $item['link'] ?>"></link>
|
||||
<id><?php echo $item['link'] ?></id>
|
||||
<summary type="html"><![CDATA[<?php echo $item['description'] ?>]]></summary>
|
||||
<content type="html"><![CDATA[<?php echo $item['content'] ?>]]></content>
|
||||
<updated><?php echo $item['pubdate'] ?></updated>
|
||||
</entry>
|
||||
<?php endforeach; ?>
|
||||
</feed>
|
||||
67
application/views/feed/rss.php
Executable file
67
application/views/feed/rss.php
Executable file
@@ -0,0 +1,67 @@
|
||||
<?php header('Content-Type: '.$ctype.'; charset='.$charset); ?>
|
||||
<?php echo '<?xml version="1.0" encoding="UTF-8"?>'."\n"; ?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:media="http://search.yahoo.com/mrss/"<?php foreach($namespaces as $n) echo " ".$n; ?>>
|
||||
<channel>
|
||||
<title><?php echo $channel['title'] ?></title>
|
||||
<link><![CDATA[<?php echo $channel['link'] ?>]]></link>
|
||||
<description><?php echo $channel['description'] ?></description>
|
||||
<atom:link href="<?php echo $channel['link'] ?>" rel="self"></atom:link>
|
||||
<?php if (!empty($channel['logo'])) : ?>
|
||||
<image>
|
||||
<url><?php echo $channel['logo'] ?></url>
|
||||
<title><?php echo $channel['title'] ?></title>
|
||||
<link><?php echo $channel['link'] ?></link>
|
||||
</image>
|
||||
<?php endif; ?>
|
||||
<lastBuildDate><?php echo $channel['pubdate'] ?></lastBuildDate>
|
||||
<?php foreach($items as $item) : ?>
|
||||
<item>
|
||||
<title><?php echo $item['title'] ?></title>
|
||||
<link><?php echo $item['link'] ?></link>
|
||||
<guid isPermaLink="true"><?php echo $item['link'] ?></guid>
|
||||
<description><![CDATA[<?php echo $item['description'] ?>]]></description>
|
||||
<?php if (!empty($item['content'])) : ?>
|
||||
<content:encoded><![CDATA[<?php echo $item['content'] ?>]]></content:encoded>
|
||||
<?php endif; ?>
|
||||
<dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/"><?php echo $item['author'] ?></dc:creator>
|
||||
<pubDate><?php echo $item['pubdate'] ?></pubDate>
|
||||
<?php if (!empty($item['enclosure'])) : ?>
|
||||
<enclosure
|
||||
<?php foreach ($item['enclosure'] as $k => $v) : ?>
|
||||
<?php echo $k.'="'.$v.'" ' ?>
|
||||
<?php endforeach; ?>
|
||||
/>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($item['media:content'])) : ?>
|
||||
<media:content
|
||||
<?php foreach ($item['media:content'] as $k => $v) : ?>
|
||||
<?php echo $k.'="'.$v.'" ' ?>
|
||||
<?php endforeach; ?>
|
||||
/>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($item['media:thumbnail'])) : ?>
|
||||
<media:thumbnail
|
||||
<?php foreach ($item['media:thumbnail'] as $k => $v) : ?>
|
||||
<?php $k.'="'.$v.'" ' ?>
|
||||
<?php endforeach; ?>
|
||||
/>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($item['media:title'])) : ?>
|
||||
<media:title type="plain"><?php echo $item['media:title'] ?></media:title>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($item['media:description'])) : ?>
|
||||
<media:description type="plain"><?php echo $item['media:description'] ?></media:description>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($item['media:keywords'])) : ?>
|
||||
<media:keywords><?php echo $item['media:title'] ?></media:keywords>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($item['media:rating'])) : ?>
|
||||
<media:rating><?php echo $item['media:rating'] ?></media:rating>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($item['creativeCommons:license'])) : ?>
|
||||
<creativeCommons:license><?php echo $item['creativeCommons:license'] ?></creativeCommons:license>
|
||||
<?php endif; ?>
|
||||
</item>
|
||||
<?php endforeach; ?>
|
||||
</channel>
|
||||
</rss>
|
||||
11
application/views/index.html
Executable file
11
application/views/index.html
Executable file
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user