Browse Source

Formatting

pull/660/head
danpros 2 years ago
parent
commit
f7e2bc9281
20 changed files with 601 additions and 601 deletions
  1. +125
    -125
      system/admin/views/add-content.html.php
  2. +74
    -74
      system/admin/views/add-page.html.php
  3. +38
    -38
      system/admin/views/backup.html.php
  4. +9
    -9
      system/admin/views/category-list.html.php
  5. +1
    -1
      system/admin/views/config-metatags.html.php
  6. +4
    -4
      system/admin/views/config-performance.html.php
  7. +3
    -3
      system/admin/views/config-reading.html.php
  8. +5
    -5
      system/admin/views/config-widget.html.php
  9. +7
    -7
      system/admin/views/config.html.php
  10. +130
    -130
      system/admin/views/edit-page.html.php
  11. +42
    -42
      system/admin/views/layout.html.php
  12. +2
    -2
      system/admin/views/login.html.php
  13. +30
    -30
      system/admin/views/main.html.php
  14. +66
    -66
      system/admin/views/menu.html.php
  15. +2
    -2
      system/admin/views/popular-posts.html.php
  16. +6
    -6
      system/admin/views/posts-list.html.php
  17. +6
    -6
      system/admin/views/scheduled.html.php
  18. +38
    -38
      system/admin/views/static-pages.html.php
  19. +6
    -6
      system/admin/views/user-draft.html.php
  20. +7
    -7
      system/admin/views/user-posts.html.php

+ 125
- 125
system/admin/views/add-content.html.php View File

@ -83,137 +83,137 @@ $( function() {
<?php } ?> <?php } ?>
<div class="row"> <div class="row">
<div class="wmd-panel" style="width:100%;">
<form method="POST">
<div class="row">
<div class="col-sm-6">
<label for="pTitle"><?php echo i18n('Title');?> <span class="required">*</span></label>
<input autofocus type="text" class="form-control text <?php if (isset($postTitle)) { if (empty($postTitle)) { echo 'error';}} ?>" id="pTitle" name="title" value="<?php if (isset($postTitle)) { echo $postTitle;} ?>"/>
<br>
<label for="pCategory"><?php echo i18n('Category');?> <span class="required">*</span></label>
<select id="pCategory" class="form-control" name="category">
<option value="uncategorized"><?php echo i18n("Uncategorized");?></option>
<?php foreach ($desc as $d):?>
<option value="<?php echo $d->md;?>"><?php echo $d->title;?></option>
<?php endforeach;?>
</select>
<br>
<label for="pTag"><?php echo i18n('Tags');?> <span class="required">*</span></label>
<input type="text" class="form-control text <?php if (isset($postTag)) { if (empty($postTag)) { echo 'error';}} ?>" id="pTag" name="tag" value="<?php if (isset($postTag)) { echo $postTag; } ?>" placeholder="<?php echo i18n('Comma_separated_values');?>"/>
<br>
<label for="pMeta"><?php echo i18n('Meta_description');?> (<?php echo i18n('optional');?>)</label>
<textarea id="pMeta" class="form-control" name="description" rows="3" cols="20" placeholder="<?php echo i18n('If_leave_empty_we_will_excerpt_it_from_the_content_below');?>"><?php if (isset($p->description)) { echo $p->description;} ?></textarea>
<br>
</div>
<div class="col-sm-6">
<div class="form-row">
<div class="col">
<label for="pDate"><?php echo i18n('Date');?></label>
<input type="date" id="pDate" name="date" class="form-control text" value="<?php echo date('Y-m-d'); ?>">
</div>
<div class="col">
<label for="pTime"><?php echo i18n('Time');?></label>
<input step="1" type="time" id="pTime" name="time" class="form-control text" value="<?php echo date('H:i:s'); ?>">
</div>
<small style="margin-top:10px;"><em><?php echo i18n('Scheduled_tips');?></em></small>
</div>
<br>
<label for="pURL"><?php echo i18n('Slug');?> (<?php echo i18n('optional');?>)</label>
<input type="text" class="form-control text" id="pURL" name="url" value="<?php if (isset($postUrl)) { echo $postUrl;} ?>" placeholder="<?php echo i18n('If_the_url_leave_empty_we_will_use_the_post_title');?>"/>
<br>
<?php if ($type == 'is_audio'):?>
<label for="pAudio"><?php echo i18n('Featured_Audio');?> <span class="required">*</span> (e.g Soundcloud)</label>
<textarea rows="2" cols="20" class="form-control text <?php if (isset($postAudio)) { if (empty($postAudio)) { echo 'error';} } ?>" id="pAudio" name="audio"><?php if (isset($postAudio)) { echo $postAudio;} ?></textarea>
<input type="hidden" name="is_audio" value="is_audio">
<br>
<?php endif;?>
<div class="wmd-panel" style="width:100%;">
<form method="POST">
<div class="row">
<div class="col-sm-6">
<label for="pTitle"><?php echo i18n('Title');?> <span class="required">*</span></label>
<input autofocus type="text" class="form-control text <?php if (isset($postTitle)) { if (empty($postTitle)) { echo 'error';}} ?>" id="pTitle" name="title" value="<?php if (isset($postTitle)) { echo $postTitle;} ?>"/>
<br>
<label for="pCategory"><?php echo i18n('Category');?> <span class="required">*</span></label>
<select id="pCategory" class="form-control" name="category">
<option value="uncategorized"><?php echo i18n("Uncategorized");?></option>
<?php foreach ($desc as $d):?>
<option value="<?php echo $d->md;?>"><?php echo $d->title;?></option>
<?php endforeach;?>
</select>
<br>
<label for="pTag"><?php echo i18n('Tags');?> <span class="required">*</span></label>
<input type="text" class="form-control text <?php if (isset($postTag)) { if (empty($postTag)) { echo 'error';}} ?>" id="pTag" name="tag" value="<?php if (isset($postTag)) { echo $postTag; } ?>" placeholder="<?php echo i18n('Comma_separated_values');?>"/>
<br>
<label for="pMeta"><?php echo i18n('Meta_description');?> (<?php echo i18n('optional');?>)</label>
<textarea id="pMeta" class="form-control" name="description" rows="3" cols="20" placeholder="<?php echo i18n('If_leave_empty_we_will_excerpt_it_from_the_content_below');?>"><?php if (isset($p->description)) { echo $p->description;} ?></textarea>
<br>
</div>
<div class="col-sm-6">
<div class="form-row">
<div class="col">
<label for="pDate"><?php echo i18n('Date');?></label>
<input type="date" id="pDate" name="date" class="form-control text" value="<?php echo date('Y-m-d'); ?>">
</div>
<div class="col">
<label for="pTime"><?php echo i18n('Time');?></label>
<input step="1" type="time" id="pTime" name="time" class="form-control text" value="<?php echo date('H:i:s'); ?>">
</div>
<small style="margin-top:10px;"><em><?php echo i18n('Scheduled_tips');?></em></small>
</div>
<br>
<label for="pURL"><?php echo i18n('Slug');?> (<?php echo i18n('optional');?>)</label>
<input type="text" class="form-control text" id="pURL" name="url" value="<?php if (isset($postUrl)) { echo $postUrl;} ?>" placeholder="<?php echo i18n('If_the_url_leave_empty_we_will_use_the_post_title');?>"/>
<br>
<?php if ($type == 'is_audio'):?>
<label for="pAudio"><?php echo i18n('Featured_Audio');?> <span class="required">*</span> (e.g Soundcloud)</label>
<textarea rows="2" cols="20" class="form-control text <?php if (isset($postAudio)) { if (empty($postAudio)) { echo 'error';} } ?>" id="pAudio" name="audio"><?php if (isset($postAudio)) { echo $postAudio;} ?></textarea>
<input type="hidden" name="is_audio" value="is_audio">
<br>
<?php endif;?>
<?php if ($type == 'is_video'):?>
<label for="pVideo"><?php echo i18n('Featured_Video');?> <span class="required">*</span> (e.g Youtube)</label>
<textarea rows="2" cols="20" class="form-control text <?php if (isset($postVideo)) { if (empty($postVideo)) { echo 'error';} } ?>" id="pVideo" name="video"><?php if (isset($postVideo)) { echo $postVideo;} ?></textarea>
<input type="hidden" name="is_video" value="is_video">
<br>
<?php endif;?>
<?php if ($type == 'is_video'):?>
<label for="pVideo"><?php echo i18n('Featured_Video');?> <span class="required">*</span> (e.g Youtube)</label>
<textarea rows="2" cols="20" class="form-control text <?php if (isset($postVideo)) { if (empty($postVideo)) { echo 'error';} } ?>" id="pVideo" name="video"><?php if (isset($postVideo)) { echo $postVideo;} ?></textarea>
<input type="hidden" name="is_video" value="is_video">
<br>
<?php endif;?>
<?php if ($type == 'is_image'):?>
<label for="pImage"><?php echo i18n('Featured_Image');?> <span class="required">*</span></label>
<textarea rows="2" cols="20" class="form-control text <?php if (isset($postImage)) { if (empty($postImage)) { echo 'error';} } ?>" id="pImage" name="image"><?php if (isset($postImage)) { echo $postImage;} ?></textarea>
<input type="hidden" name="is_image" value="is_image">
<br>
<?php endif;?>
<?php if ($type == 'is_image'):?>
<label for="pImage"><?php echo i18n('Featured_Image');?> <span class="required">*</span></label>
<textarea rows="2" cols="20" class="form-control text <?php if (isset($postImage)) { if (empty($postImage)) { echo 'error';} } ?>" id="pImage" name="image"><?php if (isset($postImage)) { echo $postImage;} ?></textarea>
<input type="hidden" name="is_image" value="is_image">
<br>
<?php endif;?>
<?php if ($type == 'is_quote'):?>
<label for="pQuote"><?php echo i18n('Featured_Quote');?> <span class="required">*</span></label>
<textarea rows="3" cols="20" class="form-control text <?php if (isset($postQuote)) { if (empty($postQuote)) { echo 'error';} } ?>" id="pQuote" name="quote"><?php if (isset($postQuote)) { echo $postQuote;} ?></textarea>
<input type="hidden" name="is_quote" value="is_quote">
<br>
<?php endif;?>
<?php if ($type == 'is_quote'):?>
<label for="pQuote"><?php echo i18n('Featured_Quote');?> <span class="required">*</span></label>
<textarea rows="3" cols="20" class="form-control text <?php if (isset($postQuote)) { if (empty($postQuote)) { echo 'error';} } ?>" id="pQuote" name="quote"><?php if (isset($postQuote)) { echo $postQuote;} ?></textarea>
<input type="hidden" name="is_quote" value="is_quote">
<br>
<?php endif;?>
<?php if ($type == 'is_link'):?>
<label for="pLink"><?php echo i18n('Featured_Link');?> <span class="required">*</span></label>
<textarea rows="2" cols="20" class="form-control text <?php if (isset($postLink)) { if (empty($postLink)) { echo 'error';} } ?>" id="pLink" name="link"><?php if (isset($postLink)) { echo $postLink;} ?></textarea>
<input type="hidden" name="is_link" value="is_link">
<br>
<?php endif;?>
<?php if ($type == 'is_link'):?>
<label for="pLink"><?php echo i18n('Featured_Link');?> <span class="required">*</span></label>
<textarea rows="2" cols="20" class="form-control text <?php if (isset($postLink)) { if (empty($postLink)) { echo 'error';} } ?>" id="pLink" name="link"><?php if (isset($postLink)) { echo $postLink;} ?></textarea>
<input type="hidden" name="is_link" value="is_link">
<br>
<?php endif;?>
<?php if ($type == 'is_post'):?>
<input type="hidden" name="is_post" value="is_post">
<?php endif;?>
<input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>">
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div>
<label for="wmd-input"><?php echo i18n('Content');?></label>
<div id="wmd-button-bar" class="wmd-button-bar"></div>
<textarea id="wmd-input" class="form-control wmd-input <?php if (isset($postContent)) { if (empty($postContent)) { echo 'error'; } } ?>" name="content" cols="20" rows="15"><?php if (isset($postContent)) { echo $postContent;} ?></textarea><br>
<input type="submit" name="publish" class="btn btn-primary submit" value="<?php echo i18n('Publish');?>"/> <input type="submit" name="draft" class="btn btn-primary draft" value="<?php echo i18n('Save_as_draft');?>"/>
<br><br>
</div>
</div>
<div class="col-sm-6">
<label><?php echo i18n('Preview');?></label>
<br>
<div id="wmd-preview" class="wmd-panel wmd-preview" style="width:100%;overflow:auto;"></div>
</div>
</div>
</form>
</div>
<?php if ($type == 'is_post'):?>
<input type="hidden" name="is_post" value="is_post">
<?php endif;?>
<input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>">
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div>
<label for="wmd-input"><?php echo i18n('Content');?></label>
<div id="wmd-button-bar" class="wmd-button-bar"></div>
<textarea id="wmd-input" class="form-control wmd-input <?php if (isset($postContent)) { if (empty($postContent)) { echo 'error'; } } ?>" name="content" cols="20" rows="15"><?php if (isset($postContent)) { echo $postContent;} ?></textarea><br>
<input type="submit" name="publish" class="btn btn-primary submit" value="<?php echo i18n('Publish');?>"/> <input type="submit" name="draft" class="btn btn-primary draft" value="<?php echo i18n('Save_as_draft');?>"/>
<br><br>
</div>
</div>
<div class="col-sm-6">
<label><?php echo i18n('Preview');?></label>
<br>
<div id="wmd-preview" class="wmd-panel wmd-preview" style="width:100%;overflow:auto;"></div>
</div>
</div>
</form>
</div>
<style>
.wmd-prompt-background {z-index:10!important;}
#wmd-preview img {max-width:100%;}
</style>
<div class="modal fade" id="insertImageDialog" tabindex="-1" role="dialog" aria-labelledby="insertImageDialogTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="insertImageDialogTitle"><?php echo i18n('Insert_Image');?></h5>
<button type="button" class="close" id="insertImageDialogClose" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="form-group">
<label for="insertImageDialogURL">URL</label>
<input type="text" class="form-control" id="insertImageDialogURL" size="48" placeholder="<?php echo i18n('Enter_image_URL');?>" />
</div>
<hr>
<div class="form-group">
<label for="insertImageDialogFile"><?php echo i18n('Upload');?></label>
<input type="file" class="form-control-file" name="file" id="insertImageDialogFile" accept="image/png,image/jpeg,image/gif" />
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="insertImageDialogInsert"><?php echo i18n('Insert_Image');?></button>
<button type="button" class="btn btn-secondary" id="insertImageDialogCancel" data-dismiss="modal"><?php echo i18n('Cancel');?></button>
</div>
</div>
</div>
</div>
<style>
.wmd-prompt-background {z-index:10!important;}
#wmd-preview img {max-width:100%;}
</style>
<div class="modal fade" id="insertImageDialog" tabindex="-1" role="dialog" aria-labelledby="insertImageDialogTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="insertImageDialogTitle"><?php echo i18n('Insert_Image');?></h5>
<button type="button" class="close" id="insertImageDialogClose" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="form-group">
<label for="insertImageDialogURL">URL</label>
<input type="text" class="form-control" id="insertImageDialogURL" size="48" placeholder="<?php echo i18n('Enter_image_URL');?>" />
</div>
<hr>
<div class="form-group">
<label for="insertImageDialogFile"><?php echo i18n('Upload');?></label>
<input type="file" class="form-control-file" name="file" id="insertImageDialogFile" accept="image/png,image/jpeg,image/gif" />
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="insertImageDialogInsert"><?php echo i18n('Insert_Image');?></button>
<button type="button" class="btn btn-secondary" id="insertImageDialogCancel" data-dismiss="modal"><?php echo i18n('Cancel');?></button>
</div>
</div>
</div>
</div>
</div> </div>
<!-- Declare the base path. Important --> <!-- Declare the base path. Important -->


+ 74
- 74
system/admin/views/add-page.html.php View File

@ -13,80 +13,80 @@
<?php } ?> <?php } ?>
<div class="row"> <div class="row">
<div class="wmd-panel" style="width:100%;">
<form method="POST">
<div class="row">
<div class="col-sm-6">
<label for="pTitle"><?php echo i18n('Title');?> <span class="required">*</span></label>
<input type="text" class="form-control text <?php if (isset($postTitle)) {if (empty($postTitle)) {echo 'error';}} ?>" id="pTitle" name="title" value="<?php if (isset($postTitle)) {echo $postTitle;} ?>"/>
<br>
<label for="pMeta"><?php echo i18n('Meta_description');?> (<?php echo i18n('optional');?>)</label>
<textarea id="pMeta" class="form-control" name="description" rows="3" cols="20" placeholder="<?php echo i18n('If_leave_empty_we_will_excerpt_it_from_the_content_below');?>"><?php if (isset($p->description)) {echo $p->description;} ?></textarea>
<br>
</div>
<div class="col-sm-6">
<?php if ($type == 'is_page') :?>
<label for="pURL"><?php echo i18n('Slug');?> (<?php echo i18n('optional');?>)</label>
<input type="text" class="form-control text" id="pURL" name="url" value="<?php if (isset($postUrl)) {echo $postUrl;} ?>" placeholder="<?php echo i18n('If_the_url_leave_empty_we_will_use_the_page_title');?>"/>
<br>
<?php endif;?>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<label for="wmd-input"><?php echo i18n('Content');?></label>
<div id="wmd-button-bar" class="wmd-button-bar"></div>
<textarea id="wmd-input" class="form-control wmd-input <?php if (isset($postContent)) {if (empty($postContent)) {echo 'error';}} ?>" name="content" cols="20" rows="10"><?php if (isset($postContent)) {echo $postContent;} ?></textarea>
<br>
<input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>">
<?php if ($type == 'is_page') :?>
<input type="submit" name="submit" class="btn btn-primary submit" value="<?php echo i18n('Publish');?>"/>
<?php endif;?>
<?php if ($type == 'is_category') :?>
<input type="submit" name="submit" class="btn btn-primary submit" value="<?php echo i18n('Add_category');?>"/>
<?php endif;?>
</div>
<div class="col-sm-6">
<label><?php echo i18n('Preview');?></label>
<br>
<div id="wmd-preview" class="wmd-panel wmd-preview" style="width:100%;overflow:auto;"></div>
</div>
</div>
</form>
</div>
<style>
.wmd-prompt-background {z-index:10!important;}
#wmd-preview img {max-width:100%;}
</style>
<div class="modal fade" id="insertImageDialog" tabindex="-1" role="dialog" aria-labelledby="insertImageDialogTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="insertImageDialogTitle"><?php echo i18n('Insert_Image');?></h5>
<button type="button" class="close" id="insertImageDialogClose" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="form-group">
<label for="insertImageDialogURL">URL</label>
<input type="text" class="form-control" id="insertImageDialogURL" size="48" placeholder="<?php echo i18n('Enter_image_URL');?>" />
</div>
<hr>
<div class="form-group">
<label for="insertImageDialogFile"><?php echo i18n('Upload');?></label>
<input type="file" class="form-control-file" name="file" id="insertImageDialogFile" accept="image/png,image/jpeg,image/gif" />
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="insertImageDialogInsert"><?php echo i18n('Insert_Image');?></button>
<button type="button" class="btn btn-secondary" id="insertImageDialogCancel" data-dismiss="modal"><?php echo i18n('Cancel');?></button>
</div>
</div>
</div>
</div>
<div class="wmd-panel" style="width:100%;">
<form method="POST">
<div class="row">
<div class="col-sm-6">
<label for="pTitle"><?php echo i18n('Title');?> <span class="required">*</span></label>
<input type="text" class="form-control text <?php if (isset($postTitle)) {if (empty($postTitle)) {echo 'error';}} ?>" id="pTitle" name="title" value="<?php if (isset($postTitle)) {echo $postTitle;} ?>"/>
<br>
<label for="pMeta"><?php echo i18n('Meta_description');?> (<?php echo i18n('optional');?>)</label>
<textarea id="pMeta" class="form-control" name="description" rows="3" cols="20" placeholder="<?php echo i18n('If_leave_empty_we_will_excerpt_it_from_the_content_below');?>"><?php if (isset($p->description)) {echo $p->description;} ?></textarea>
<br>
</div>
<div class="col-sm-6">
<?php if ($type == 'is_page') :?>
<label for="pURL"><?php echo i18n('Slug');?> (<?php echo i18n('optional');?>)</label>
<input type="text" class="form-control text" id="pURL" name="url" value="<?php if (isset($postUrl)) {echo $postUrl;} ?>" placeholder="<?php echo i18n('If_the_url_leave_empty_we_will_use_the_page_title');?>"/>
<br>
<?php endif;?>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<label for="wmd-input"><?php echo i18n('Content');?></label>
<div id="wmd-button-bar" class="wmd-button-bar"></div>
<textarea id="wmd-input" class="form-control wmd-input <?php if (isset($postContent)) {if (empty($postContent)) {echo 'error';}} ?>" name="content" cols="20" rows="10"><?php if (isset($postContent)) {echo $postContent;} ?></textarea>
<br>
<input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>">
<?php if ($type == 'is_page') :?>
<input type="submit" name="submit" class="btn btn-primary submit" value="<?php echo i18n('Publish');?>"/>
<?php endif;?>
<?php if ($type == 'is_category') :?>
<input type="submit" name="submit" class="btn btn-primary submit" value="<?php echo i18n('Add_category');?>"/>
<?php endif;?>
</div>
<div class="col-sm-6">
<label><?php echo i18n('Preview');?></label>
<br>
<div id="wmd-preview" class="wmd-panel wmd-preview" style="width:100%;overflow:auto;"></div>
</div>
</div>
</form>
</div>
<style>
.wmd-prompt-background {z-index:10!important;}
#wmd-preview img {max-width:100%;}
</style>
<div class="modal fade" id="insertImageDialog" tabindex="-1" role="dialog" aria-labelledby="insertImageDialogTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="insertImageDialogTitle"><?php echo i18n('Insert_Image');?></h5>
<button type="button" class="close" id="insertImageDialogClose" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="form-group">
<label for="insertImageDialogURL">URL</label>
<input type="text" class="form-control" id="insertImageDialogURL" size="48" placeholder="<?php echo i18n('Enter_image_URL');?>" />
</div>
<hr>
<div class="form-group">
<label for="insertImageDialogFile"><?php echo i18n('Upload');?></label>
<input type="file" class="form-control-file" name="file" id="insertImageDialogFile" accept="image/png,image/jpeg,image/gif" />
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="insertImageDialogInsert"><?php echo i18n('Insert_Image');?></button>
<button type="button" class="btn btn-secondary" id="insertImageDialogCancel" data-dismiss="modal"><?php echo i18n('Cancel');?></button>
</div>
</div>
</div>
</div>
</div> </div>
<!-- Declare the base path. Important --> <!-- Declare the base path. Important -->
<script type="text/javascript">var base_path = '<?php echo site_url() ?>';</script> <script type="text/javascript">var base_path = '<?php echo site_url() ?>';</script>

+ 38
- 38
system/admin/views/backup.html.php View File

@ -18,54 +18,54 @@ Please install the ZIP extension to use the backup feature.
</div> </div>
<?php } ?> <?php } ?>
<h2><?php echo i18n('Your_backups');?></h2> <h2><?php echo i18n('Your_backups');?></h2>
<br>
<br>
<a class="btn btn-primary <?php if (!extension_loaded('zip')) { ?>disabled<?php } ?>" href="<?php echo site_url() ?>admin/backup-start"><?php echo i18n('Create_backup');?></a> <a class="btn btn-primary <?php if (!extension_loaded('zip')) { ?>disabled<?php } ?>" href="<?php echo site_url() ?>admin/backup-start"><?php echo i18n('Create_backup');?></a>
<br><br>
<br><br>
<?php <?php
if (isset($_SESSION[config("site.url")]['user'])) { if (isset($_SESSION[config("site.url")]['user'])) {
$files = get_zip_files();
if (!empty($files)) {
krsort($files);
echo '<table class="table backup-list">';
echo '<tr class="head"><th>' . i18n('Filename') . '</th><th>'.i18n('Date').'</th><th>' . i18n('Operations') . '</th></tr>';
$i = 0;
$len = count($files);
foreach ($files as $file) {
$files = get_zip_files();
if (!empty($files)) {
krsort($files);
echo '<table class="table backup-list">';
echo '<tr class="head"><th>' . i18n('Filename') . '</th><th>'.i18n('Date').'</th><th>' . i18n('Operations') . '</th></tr>';
$i = 0;
$len = count($files);
foreach ($files as $file) {
if ($i == 0) {
$class = 'item first';
} elseif ($i == $len - 1) {
$class = 'item last';
} else {
$class = 'item';
}
$i++;
if ($i == 0) {
$class = 'item first';
} elseif ($i == $len - 1) {
$class = 'item last';
} else {
$class = 'item';
}
$i++;
// Extract the date
$arr = explode('_', $file);
// Extract the date
$arr = explode('_', $file);
// Replaced string
$replaced = substr($arr[0], 0, strrpos($arr[0], '/')) . '/';
// Replaced string
$replaced = substr($arr[0], 0, strrpos($arr[0], '/')) . '/';
$name = str_replace($replaced, '', $file);
$name = str_replace($replaced, '', $file);
$date = str_replace('.zip', '', $arr[1]);
$t = str_replace('-', '', $date);
$time = new DateTime($t);
$timestamp = $time->format("D, d F Y, H:i:s");
$date = str_replace('.zip', '', $arr[1]);
$t = str_replace('-', '', $date);
$time = new DateTime($t);
$timestamp = $time->format("D, d F Y, H:i:s");
$url = site_url() . $file;
echo '<tr class="' . $class . '">';
echo '<td>' . $name . '</td>';
echo '<td>' . $timestamp . '</td>';
echo '<td><a class="btn btn-primary btn-xs" target="_blank" href="' . $url . '">Download</a> <form method="GET"><input type="hidden" name="file" value="' . $name . '"/><input type="submit" class="btn btn-danger btn-xs" name="submit" value="Delete"/></form></td>';
echo '</tr>';
}
echo '</table>';
} else {
echo i18n('No_available_backup');
}
$url = site_url() . $file;
echo '<tr class="' . $class . '">';
echo '<td>' . $name . '</td>';
echo '<td>' . $timestamp . '</td>';
echo '<td><a class="btn btn-primary btn-xs" target="_blank" href="' . $url . '">Download</a> <form method="GET"><input type="hidden" name="file" value="' . $name . '"/><input type="submit" class="btn btn-danger btn-xs" name="submit" value="Delete"/></form></td>';
echo '</tr>';
}
echo '</table>';
} else {
echo i18n('No_available_backup');
}
} }
?> ?>

+ 9
- 9
system/admin/views/category-list.html.php View File

@ -30,30 +30,30 @@
<?php if ($category->url !== site_url() . 'category/uncategorized') {?> <?php if ($category->url !== site_url() . 'category/uncategorized') {?>
<td><a class="btn btn-primary btn-xs" href="<?php echo $p->url ?>/edit?destination=admin/categories/<?php echo $category->md;?>"><?php echo i18n('Edit');?></a> <a <td><a class="btn btn-primary btn-xs" href="<?php echo $p->url ?>/edit?destination=admin/categories/<?php echo $category->md;?>"><?php echo i18n('Edit');?></a> <a
class="btn btn-danger btn-xs" href="<?php echo $p->url ?>/delete?destination=admin/categories/<?php echo $category->md;?>"><?php echo i18n('Delete');?></a></td> class="btn btn-danger btn-xs" href="<?php echo $p->url ?>/delete?destination=admin/categories/<?php echo $category->md;?>"><?php echo i18n('Delete');?></a></td>
<?php } else {?>
<?php } else {?>
<td><a class="btn btn-primary btn-xs" href="<?php echo $p->url ?>/edit?destination=admin/categories/uncategorized"><?php echo i18n('Edit');?></a> <a <td><a class="btn btn-primary btn-xs" href="<?php echo $p->url ?>/edit?destination=admin/categories/uncategorized"><?php echo i18n('Edit');?></a> <a
class="btn btn-danger btn-xs" href="<?php echo $p->url ?>/delete?destination=admin/categories/uncategorized"><?php echo i18n('Delete');?></a></td>
class="btn btn-danger btn-xs" href="<?php echo $p->url ?>/delete?destination=admin/categories/uncategorized"><?php echo i18n('Delete');?></a></td>
<?php } ?> <?php } ?>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
</table> </table>
<?php if (!empty($pagination['prev']) || !empty($pagination['next'])): ?> <?php if (!empty($pagination['prev']) || !empty($pagination['next'])): ?>
<br> <br>
<div class="pager"> <div class="pager">
<ul class="pagination">
<ul class="pagination">
<?php if (!empty($pagination['prev'])) { ?> <?php if (!empty($pagination['prev'])) { ?>
<li class="newer page-item"><a class="page-link" href="?page=<?php echo $page - 1 ?>" rel="prev">&#8592; <?php echo i18n('Newer');?></a></li> <li class="newer page-item"><a class="page-link" href="?page=<?php echo $page - 1 ?>" rel="prev">&#8592; <?php echo i18n('Newer');?></a></li>
<?php } else { ?> <?php } else { ?>
<li class="page-item disabled" ><span class="page-link">&#8592; <?php echo i18n('Newer');?></span></li>
<?php } ?>
<li class="page-item disabled" ><span class="page-link">&#8592; <?php echo i18n('Newer');?></span></li>
<?php } ?>
<li class="page-number page-item disabled"><span class="page-link"><?php echo $pagination['pagenum'];?></span></li> <li class="page-number page-item disabled"><span class="page-link"><?php echo $pagination['pagenum'];?></span></li>
<?php if (!empty($pagination['next'])) { ?> <?php if (!empty($pagination['next'])) { ?>
<li class="older page-item" ><a class="page-link" href="?page=<?php echo $page + 1 ?>" rel="next"><?php echo i18n('Older');?> &#8594;</a></li> <li class="older page-item" ><a class="page-link" href="?page=<?php echo $page + 1 ?>" rel="next"><?php echo i18n('Older');?> &#8594;</a></li>
<?php } else { ?> <?php } else { ?>
<li class="page-item disabled" ><span class="page-link"><?php echo i18n('Older');?> &#8594;</span></li>
<?php } ?>
</ul>
<li class="page-item disabled" ><span class="page-link"><?php echo i18n('Older');?> &#8594;</span></li>
<?php } ?>
</ul>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php } else { <?php } else {


+ 1
- 1
system/admin/views/config-metatags.html.php View File

@ -38,7 +38,7 @@ if (file_exists($config_file)) {
</label> </label>
</div> </div>
</div> </div>
</div>
</div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="description.char" class="col-sm-2 col-form-label"><?php echo i18n('Meta_description_character');?></label> <label for="description.char" class="col-sm-2 col-form-label"><?php echo i18n('Meta_description_character');?></label>


+ 4
- 4
system/admin/views/config-performance.html.php View File

@ -37,7 +37,7 @@
</label> </label>
</div> </div>
</div> </div>
</div>
</div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-2 col-form-label"><?php echo i18n('Cache_timestamp');?></label> <label class="col-sm-2 col-form-label"><?php echo i18n('Cache_timestamp');?></label>
@ -56,7 +56,7 @@
</label> </label>
</div> </div>
</div> </div>
</div>
</div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-2 col-form-label"><?php echo i18n('Page_generation_time');?></label> <label class="col-sm-2 col-form-label"><?php echo i18n('Page_generation_time');?></label>
@ -75,7 +75,7 @@
</label> </label>
</div> </div>
</div> </div>
</div>
</div>
</div> </div>
<br> <br>
<h4><?php echo i18n('Github_pre_release');?></h4> <h4><?php echo i18n('Github_pre_release');?></h4>
@ -97,7 +97,7 @@
</label> </label>
</div> </div>
</div> </div>
</div>
</div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<div class="col-sm-10"> <div class="col-sm-10">


+ 3
- 3
system/admin/views/config-reading.html.php View File

@ -31,7 +31,7 @@
</label> </label>
</div> </div>
</div> </div>
</div>
</div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-2 col-form-label"><?php echo i18n('Enable_blog_URL');?></label> <label class="col-sm-2 col-form-label"><?php echo i18n('Enable_blog_URL');?></label>
@ -50,7 +50,7 @@
</label> </label>
</div> </div>
</div> </div>
</div>
</div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="posts.perpage" class="col-sm-2 col-form-label"><?php echo i18n('Posts_in_front_page_show_at_most');?></label> <label for="posts.perpage" class="col-sm-2 col-form-label"><?php echo i18n('Posts_in_front_page_show_at_most');?></label>
@ -75,7 +75,7 @@
</label> </label>
</div> </div>
</div> </div>
</div>
</div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="teaser.char" class="col-sm-2 col-form-label"><?php echo i18n('Summary_character');?></label> <label for="teaser.char" class="col-sm-2 col-form-label"><?php echo i18n('Summary_character');?></label>


+ 5
- 5
system/admin/views/config-widget.html.php View File

@ -43,7 +43,7 @@
</label> </label>
</div> </div>
</div> </div>
</div>
</div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="popular.count" class="col-sm-2 col-form-label"><?php echo i18n('Popular_posts_widget_at_most');?></label> <label for="popular.count" class="col-sm-2 col-form-label"><?php echo i18n('Popular_posts_widget_at_most');?></label>
@ -84,7 +84,7 @@
</label> </label>
</div> </div>
</div> </div>
</div>
</div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="disqus.shortname" class="col-sm-2 col-form-label"><?php echo i18n('Disqus_shortname');?></label> <label for="disqus.shortname" class="col-sm-2 col-form-label"><?php echo i18n('Disqus_shortname');?></label>
@ -119,7 +119,7 @@
</label> </label>
</div> </div>
</div> </div>
</div>
</div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="google.reCaptcha.public" class="col-sm-2 col-form-label"><?php echo i18n('Site_Key');?></label> <label for="google.reCaptcha.public" class="col-sm-2 col-form-label"><?php echo i18n('Site_Key');?></label>
@ -146,14 +146,14 @@
<label for="google.analytics.id" class="col-sm-2 col-form-label"><?php echo i18n('Google_Analytics_legacy');?></label> <label for="google.analytics.id" class="col-sm-2 col-form-label"><?php echo i18n('Google_Analytics_legacy');?></label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="text" name="-config-google.analytics.id" class="form-control" id="google.analytics.id" value="<?php echo valueMaker(config('google.analytics.id'));?>" placeholder="<?php echo i18n('widget_key_placeholder');?>"> <input type="text" name="-config-google.analytics.id" class="form-control" id="google.analytics.id" value="<?php echo valueMaker(config('google.analytics.id'));?>" placeholder="<?php echo i18n('widget_key_placeholder');?>">
<small><em><?php echo i18n('This_is_legacy_code_usually_new_created_analytics_using_gtag_js');?></em></small>
<small><em><?php echo i18n('This_is_legacy_code_usually_new_created_analytics_using_gtag_js');?></em></small>
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="google.wmt.id" class="col-sm-2 col-form-label"><?php echo i18n('Google_Search_Console');?></label> <label for="google.wmt.id" class="col-sm-2 col-form-label"><?php echo i18n('Google_Search_Console');?></label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="text" name="-config-google.wmt.id" class="form-control" id="google.wmt.id" value="<?php echo valueMaker(config('google.wmt.id'));?>" placeholder="<?php echo i18n('widget_key_placeholder');?>"> <input type="text" name="-config-google.wmt.id" class="form-control" id="google.wmt.id" value="<?php echo valueMaker(config('google.wmt.id'));?>" placeholder="<?php echo i18n('widget_key_placeholder');?>">
<small><em><?php echo i18n('For_google_site_verification_meta');?></em></small>
<small><em><?php echo i18n('For_google_site_verification_meta');?></em></small>
</div> </div>
</div> </div>
<br> <br>


+ 7
- 7
system/admin/views/config.html.php View File

@ -36,14 +36,14 @@ Please install and enable the INTL extension to format the date format to your l
<label for="blog.tagline" class="col-sm-2 col-form-label"><?php echo i18n('Tagline');?></label> <label for="blog.tagline" class="col-sm-2 col-form-label"><?php echo i18n('Tagline');?></label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="text" name="-config-blog.tagline" class="form-control" id="blog.tagline" value="<?php echo valueMaker(config('blog.tagline'));?>" placeholder="<?php echo i18n('Tagline_Placeholder');?>"> <input type="text" name="-config-blog.tagline" class="form-control" id="blog.tagline" value="<?php echo valueMaker(config('blog.tagline'));?>" placeholder="<?php echo i18n('Tagline_Placeholder');?>">
<small><em><?php echo i18n('Tagline_description');?></em></small>
<small><em><?php echo i18n('Tagline_description');?></em></small>
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="blog.description" class="col-sm-2 col-form-label"><?php echo i18n('Description');?></label> <label for="blog.description" class="col-sm-2 col-form-label"><?php echo i18n('Description');?></label>
<div class="col-sm-10"> <div class="col-sm-10">
<textarea id="blog.description" name="-config-blog.description" class="form-control"><?php echo valueMaker(config('blog.description'));?></textarea> <textarea id="blog.description" name="-config-blog.description" class="form-control"><?php echo valueMaker(config('blog.description'));?></textarea>
<small><em><?php echo i18n('Blog_Description');?></em></small>
<small><em><?php echo i18n('Blog_Description');?></em></small>
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
@ -54,7 +54,7 @@ Please install and enable the INTL extension to format the date format to your l
<option value="<?php echo pathinfo($file)['filename'];?>" <?php if (config('language') === pathinfo($file)['filename']):?>selected<?php endif;?>><?php echo pathinfo($file)['filename'];?></option> <option value="<?php echo pathinfo($file)['filename'];?>" <?php if (config('language') === pathinfo($file)['filename']):?>selected<?php endif;?>><?php echo pathinfo($file)['filename'];?></option>
<?php } ?> <?php } ?>
</select> </select>
</div>
</div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="timezone" class="col-sm-2 col-form-label"><?php echo i18n('Timezone');?></label> <label for="timezone" class="col-sm-2 col-form-label"><?php echo i18n('Timezone');?></label>
@ -64,7 +64,7 @@ Please install and enable the INTL extension to format the date format to your l
<option value="<?php echo $zone;?>" <?php if (config('timezone') === $zone):?>selected<?php endif;?>><?php echo $zone;?></option> <option value="<?php echo $zone;?>" <?php if (config('timezone') === $zone):?>selected<?php endif;?>><?php echo $zone;?></option>
<?php } ?> <?php } ?>
</select> </select>
</div>
</div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<?php $time = new DateTime('NOW'); $date = $time->format("Y-m-d H:i:s");?> <?php $time = new DateTime('NOW'); $date = $time->format("Y-m-d H:i:s");?>
@ -120,18 +120,18 @@ Please install and enable the INTL extension to format the date format to your l
</label> </label>
</div> </div>
</div> </div>
</div>
</div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="views.root" class="col-sm-2 col-form-label"><?php echo i18n('Blog_Theme');?></label> <label for="views.root" class="col-sm-2 col-form-label"><?php echo i18n('Blog_Theme');?></label>
<div class="col-sm-10"> <div class="col-sm-10">
<select class="form-control" id="views.root" name="-config-views.root"> <select class="form-control" id="views.root" name="-config-views.root">
<?php foreach (glob('themes/*/layout.html.php') as $folder) { ?> <?php foreach (glob('themes/*/layout.html.php') as $folder) { ?>
<?php $theme = explode('/',pathinfo($folder)['dirname']); global $config_file; $this_config = parse_ini_file($config_file, true);?>
<?php $theme = explode('/',pathinfo($folder)['dirname']); global $config_file; $this_config = parse_ini_file($config_file, true);?>
<option value="<?php echo pathinfo($folder)['dirname'];?>" <?php if ($this_config['views.root'] === pathinfo($folder)['dirname']):?>selected<?php endif;?>><?php echo $theme['1'];?></option> <option value="<?php echo pathinfo($folder)['dirname'];?>" <?php if ($this_config['views.root'] === pathinfo($folder)['dirname']):?>selected<?php endif;?>><?php echo $theme['1'];?></option>
<?php } ?> <?php } ?>
</select> </select>
</div>
</div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="blog.copyright" class="col-sm-2 col-form-label"><?php echo i18n('Copyright_Line');?></label> <label for="blog.copyright" class="col-sm-2 col-form-label"><?php echo i18n('Copyright_Line');?></label>


+ 130
- 130
system/admin/views/edit-page.html.php View File

@ -2,65 +2,65 @@
<?php <?php
if ($type == 'is_frontpage') { if ($type == 'is_frontpage') {
$filename = 'content/data/frontpage/frontpage.md';
$filename = 'content/data/frontpage/frontpage.md';
if (file_exists($filename)) {
$content = file_get_contents($filename);
$oldtitle = get_content_tag('t', $content, 'Welcome');
$oldcontent = remove_html_comments($content);
} else {
$oldtitle = 'Welcome';
$oldcontent = 'Welcome to our website.';
}
if (file_exists($filename)) {
$content = file_get_contents($filename);
$oldtitle = get_content_tag('t', $content, 'Welcome');
$oldcontent = remove_html_comments($content);
} else {
$oldtitle = 'Welcome';
$oldcontent = 'Welcome to our website.';
}
} elseif ($type == 'is_profile') { } elseif ($type == 'is_profile') {
if (isset($_SESSION[config("site.url")]['user'])) {
$user = $_SESSION[config("site.url")]['user'];
}
if (isset($_SESSION[config("site.url")]['user'])) {
$user = $_SESSION[config("site.url")]['user'];
}
$filename = 'content/' . $user . '/author.md';
$filename = 'content/' . $user . '/author.md';
if (file_exists($filename)) {
$content = file_get_contents($filename);
$oldtitle = get_content_tag('t', $content, 'user');
$oldcontent = remove_html_comments($content);
} else {
$oldtitle = $user;
$oldcontent = i18n('Author_Description');
}
if (file_exists($filename)) {
$content = file_get_contents($filename);
$oldtitle = get_content_tag('t', $content, 'user');
$oldcontent = remove_html_comments($content);
} else {
$oldtitle = $user;
$oldcontent = i18n('Author_Description');
}
} else { } else {
if (isset($p->file)) {
$url = $p->file;
} else {
$url = $oldfile;
}
$content = file_get_contents($url);
$oldtitle = get_content_tag('t', $content, 'Untitled');
$olddescription = get_content_tag('d', $content);
$oldcontent = remove_html_comments($content);
if (isset($p->file)) {
$url = $p->file;
} else {
$url = $oldfile;
}
$content = file_get_contents($url);
$oldtitle = get_content_tag('t', $content, 'Untitled');
$olddescription = get_content_tag('d', $content);
$oldcontent = remove_html_comments($content);
if (isset($_GET['destination'])) {
$destination = _h($_GET['destination']);
} else {
$destination = 'admin';
}
$dir = substr($url, 0, strrpos($url, '/'));
$oldurl = str_replace($dir . '/', '', $url);
$oldmd = str_replace('.md', '', $oldurl);
if (isset($_GET['destination'])) {
$destination = _h($_GET['destination']);
} else {
$destination = 'admin';
}
$dir = substr($url, 0, strrpos($url, '/'));
$oldurl = str_replace($dir . '/', '', $url);
$oldmd = str_replace('.md', '', $oldurl);
if (isset($p->url)) {
$delete = $p->url . '/delete?destination=' . $destination;
}
else {
if(empty($sub)) {
$delete = site_url() . $oldmd . '/delete?destination=' . $destination;
}
else {
$delete = site_url() . $static .'/'. $sub . '/delete?destination=' . $destination;
}
}
if (isset($p->url)) {
$delete = $p->url . '/delete?destination=' . $destination;
}
else {
if(empty($sub)) {
$delete = site_url() . $oldmd . '/delete?destination=' . $destination;
}
else {
$delete = site_url() . $static .'/'. $sub . '/delete?destination=' . $destination;
}
}
} }
?> ?>
@ -78,87 +78,87 @@ if ($type == 'is_frontpage') {
<?php } ?> <?php } ?>
<div class="row"> <div class="row">
<div class="wmd-panel" style="width:100%;">
<form method="POST">
<div class="row">
<div class="col-sm-6">
<label for="pTitle"><?php echo i18n('Title');?> <span class="required">*</span></label>
<input type="text" id="pTitle" name="title" class="form-control text <?php if (isset($postTitle)) { if (empty($postTitle)) { echo 'error'; } } ?>" value="<?php echo $oldtitle ?>"/>
<br>
<?php if($type != 'is_frontpage' && $type != 'is_profile') { ?>
<label for="pMeta"><?php echo i18n('Meta_description');?> <?php echo i18n('optional');?></label>
<br />
<textarea id="pMeta" class="form-control" name="description" rows="3" cols="20" placeholder="<?php echo i18n('If_leave_empty_we_will_excerpt_it_from_the_content_below');?>"><?php if (isset($p->description)) { echo $p->description;} else {echo $olddescription;}?></textarea>
<br /><br />
<?php } ?>
</div>
<div class="col-sm-6">
<?php if($type != 'is_frontpage' && $type != 'is_profile') { ?>
<label for="pURL"><?php echo i18n('Slug');?> (<?php echo i18n('optional');?>)</label>
<br>
<input type="text" id="pURL" name="url" class="form-control text" value="<?php echo $oldmd ?>" placeholder="<?php echo i18n('If_the_url_leave_empty_we_will_use_the_page_title');?>"/>
<br>
<?php } ?>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<label for="wmd-input"><?php echo i18n('Content');?></label>
<div id="wmd-button-bar" class="wmd-button-bar"></div>
<textarea id="wmd-input" class="form-control wmd-input <?php if (isset($postContent)) {if (empty($postContent)) {echo 'error';}} ?>" name="content" cols="20" rows="10"><?php echo $oldcontent ?></textarea>
<br>
<input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>">
<?php if($type == 'is_frontpage' || $type == 'is_profile') { ?>
<input type="submit" name="submit" class="btn btn-primary submit" value="<?php echo i18n('Save');?>"/>
<?php } elseif ($type == 'is_category') {?>
<input type="hidden" name="oldfile" class="text" value="<?php echo $url ?>"/>
<input type="submit" name="submit" class="btn btn-primary submit" value="<?php echo i18n('Save_category');?>"/>
<?php } else {?>
<input type="hidden" name="oldfile" class="text" value="<?php echo $url ?>"/>
<input type="submit" name="submit" class="btn btn-primary submit" value="<?php echo i18n('Save');?>"/> <a class="btn btn-danger" href="<?php echo $delete ?>"><?php echo i18n('Delete');?></a>
<?php } ?>
</div>
<div class="col-sm-6">
<label><?php echo i18n('Preview');?></label>
<br>
<div id="wmd-preview" class="wmd-panel wmd-preview" style="width:100%;overflow:auto;"></div>
</div>
</div>
</form>
</div>
<style>
.wmd-prompt-background {z-index:10!important;}
#wmd-preview img {max-width:100%;}
</style>
<div class="modal fade" id="insertImageDialog" tabindex="-1" role="dialog" aria-labelledby="insertImageDialogTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="insertImageDialogTitle"><?php echo i18n('Insert_Image');?></h5>
<button type="button" class="close" id="insertImageDialogClose" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="form-group">
<label for="insertImageDialogURL">URL</label>
<input type="text" class="form-control" id="insertImageDialogURL" size="48" placeholder="<?php echo i18n('Enter_image_URL');?>" />
</div>
<hr>
<div class="form-group">
<label for="insertImageDialogFile"><?php echo i18n('Upload');?></label>
<input type="file" class="form-control-file" name="file" id="insertImageDialogFile" accept="image/png,image/jpeg,image/gif" />
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="insertImageDialogInsert"><?php echo i18n('Insert_Image');?></button>
<button type="button" class="btn btn-secondary" id="insertImageDialogCancel" data-dismiss="modal"><?php echo i18n('Cancel');?></button>
</div>
</div>
</div>
</div>
<div class="wmd-panel" style="width:100%;">
<form method="POST">
<div class="row">
<div class="col-sm-6">
<label for="pTitle"><?php echo i18n('Title');?> <span class="required">*</span></label>
<input type="text" id="pTitle" name="title" class="form-control text <?php if (isset($postTitle)) { if (empty($postTitle)) { echo 'error'; } } ?>" value="<?php echo $oldtitle ?>"/>
<br>
<?php if($type != 'is_frontpage' && $type != 'is_profile') { ?>
<label for="pMeta"><?php echo i18n('Meta_description');?> <?php echo i18n('optional');?></label>
<br />
<textarea id="pMeta" class="form-control" name="description" rows="3" cols="20" placeholder="<?php echo i18n('If_leave_empty_we_will_excerpt_it_from_the_content_below');?>"><?php if (isset($p->description)) { echo $p->description;} else {echo $olddescription;}?></textarea>
<br /><br />
<?php } ?>
</div>
<div class="col-sm-6">
<?php if($type != 'is_frontpage' && $type != 'is_profile') { ?>
<label for="pURL"><?php echo i18n('Slug');?> (<?php echo i18n('optional');?>)</label>
<br>
<input type="text" id="pURL" name="url" class="form-control text" value="<?php echo $oldmd ?>" placeholder="<?php echo i18n('If_the_url_leave_empty_we_will_use_the_page_title');?>"/>
<br>
<?php } ?>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<label for="wmd-input"><?php echo i18n('Content');?></label>
<div id="wmd-button-bar" class="wmd-button-bar"></div>
<textarea id="wmd-input" class="form-control wmd-input <?php if (isset($postContent)) {if (empty($postContent)) {echo 'error';}} ?>" name="content" cols="20" rows="10"><?php echo $oldcontent ?></textarea>
<br>
<input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>">
<?php if($type == 'is_frontpage' || $type == 'is_profile') { ?>
<input type="submit" name="submit" class="btn btn-primary submit" value="<?php echo i18n('Save');?>"/>
<?php } elseif ($type == 'is_category') {?>
<input type="hidden" name="oldfile" class="text" value="<?php echo $url ?>"/>
<input type="submit" name="submit" class="btn btn-primary submit" value="<?php echo i18n('Save_category');?>"/>
<?php } else {?>
<input type="hidden" name="oldfile" class="text" value="<?php echo $url ?>"/>
<input type="submit" name="submit" class="btn btn-primary submit" value="<?php echo i18n('Save');?>"/> <a class="btn btn-danger" href="<?php echo $delete ?>"><?php echo i18n('Delete');?></a>
<?php } ?>
</div>
<div class="col-sm-6">
<label><?php echo i18n('Preview');?></label>
<br>
<div id="wmd-preview" class="wmd-panel wmd-preview" style="width:100%;overflow:auto;"></div>
</div>
</div>
</form>
</div>
<style>
.wmd-prompt-background {z-index:10!important;}
#wmd-preview img {max-width:100%;}
</style>
<div class="modal fade" id="insertImageDialog" tabindex="-1" role="dialog" aria-labelledby="insertImageDialogTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="insertImageDialogTitle"><?php echo i18n('Insert_Image');?></h5>
<button type="button" class="close" id="insertImageDialogClose" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="form-group">
<label for="insertImageDialogURL">URL</label>
<input type="text" class="form-control" id="insertImageDialogURL" size="48" placeholder="<?php echo i18n('Enter_image_URL');?>" />
</div>
<hr>
<div class="form-group">
<label for="insertImageDialogFile"><?php echo i18n('Upload');?></label>
<input type="file" class="form-control-file" name="file" id="insertImageDialogFile" accept="image/png,image/jpeg,image/gif" />
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="insertImageDialogInsert"><?php echo i18n('Insert_Image');?></button>
<button type="button" class="btn btn-secondary" id="insertImageDialogCancel" data-dismiss="modal"><?php echo i18n('Cancel');?></button>
</div>
</div>
</div>
</div>
</div> </div>
<!-- Declare the base path. Important --> <!-- Declare the base path. Important -->
<script type="text/javascript">var base_path = '<?php echo site_url() ?>';</script> <script type="text/javascript">var base_path = '<?php echo site_url() ?>';</script>


+ 42
- 42
system/admin/views/layout.html.php View File

@ -6,10 +6,10 @@
<title><?php echo $title;?></title> <title><?php echo $title;?></title>
<meta name="description" content="<?php echo $description; ?>"/> <meta name="description" content="<?php echo $description; ?>"/>
<link rel="canonical" href="<?php echo $canonical; ?>" /> <link rel="canonical" href="<?php echo $canonical; ?>" />
<link rel="stylesheet" href="<?php echo site_url() ?>system/resources/css/font-awesome.css">
<link href="<?php echo site_url() ?>system/resources/css/adminlte.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
<script src="<?php echo site_url() ?>system/resources/js/jquery.min.js"></script>
<link rel="stylesheet" href="<?php echo site_url() ?>system/resources/css/font-awesome.css">
<link href="<?php echo site_url() ?>system/resources/css/adminlte.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
<script src="<?php echo site_url() ?>system/resources/js/jquery.min.js"></script>
</head> </head>
<?php <?php
if (isset($_GET['search'])) { if (isset($_GET['search'])) {
@ -84,36 +84,36 @@
<li class="nav-item"> <li class="nav-item">
<a href="<?php echo site_url();?>admin/posts" class="nav-link"> <a href="<?php echo site_url();?>admin/posts" class="nav-link">
<p> <p>
<?php echo i18n('Posts_list'); ?>
</p>
<?php echo i18n('Posts_list'); ?>
</p>
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a href="<?php echo site_url();?>admin/scheduled" class="nav-link"> <a href="<?php echo site_url();?>admin/scheduled" class="nav-link">
<p> <p>
<?php echo i18n('Scheduled'); ?>
</p>
<?php echo i18n('Scheduled'); ?>
</p>
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a href="<?php echo site_url();?>admin/draft" class="nav-link"> <a href="<?php echo site_url();?>admin/draft" class="nav-link">
<p> <p>
<?php echo i18n('Posts_draft'); ?>
</p>
<?php echo i18n('Posts_draft'); ?>
</p>
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a href="<?php echo site_url();?>admin/pages" class="nav-link"> <a href="<?php echo site_url();?>admin/pages" class="nav-link">
<p> <p>
<?php echo i18n('Static_pages'); ?>
</p>
<?php echo i18n('Static_pages'); ?>
</p>
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a href="<?php echo site_url();?>admin/categories" class="nav-link"> <a href="<?php echo site_url();?>admin/categories" class="nav-link">
<p> <p>
<?php echo i18n('Categories');?>
</p>
<?php echo i18n('Categories');?>
</p>
</a> </a>
</li> </li>
</ul> </ul>
@ -130,15 +130,15 @@
<li class="nav-item"> <li class="nav-item">
<a href="<?php echo site_url();?>admin/config" class="nav-link"> <a href="<?php echo site_url();?>admin/config" class="nav-link">
<p> <p>
<?php echo i18n('Config'); ?>
</p>
<?php echo i18n('Config'); ?>
</p>
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a href="<?php echo site_url();?>admin/menu" class="nav-link"> <a href="<?php echo site_url();?>admin/menu" class="nav-link">
<p> <p>
<?php echo i18n('Menus');?>
</p>
<?php echo i18n('Menus');?>
</p>
</a> </a>
</li> </li>
</ul> </ul>
@ -155,40 +155,40 @@
<li class="nav-item"> <li class="nav-item">
<a href="<?php echo site_url();?>admin/clear-cache" class="nav-link"> <a href="<?php echo site_url();?>admin/clear-cache" class="nav-link">
<p> <p>
<?php echo i18n('Clear_cache');?>
</p>
<?php echo i18n('Clear_cache');?>
</p>
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a href="<?php echo site_url();?>admin/update" class="nav-link"> <a href="<?php echo site_url();?>admin/update" class="nav-link">
<p> <p>
<?php echo i18n('Check_update'); ?>
</p>
<?php echo i18n('Check_update'); ?>
</p>
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a href="<?php echo site_url();?>admin/backup" class="nav-link"> <a href="<?php echo site_url();?>admin/backup" class="nav-link">
<p> <p>
<?php echo i18n('Backup');?>
</p>
<?php echo i18n('Backup');?>
</p>
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a href="<?php echo site_url();?>admin/import" class="nav-link"> <a href="<?php echo site_url();?>admin/import" class="nav-link">
<p> <p>
<?php echo i18n('Import_RSS');?>
</p>
<?php echo i18n('Import_RSS');?>
</p>
</a> </a>
</li> </li>
<?php if (config('views.counter') == 'true') { ?>
<?php if (config('views.counter') == 'true') { ?>
<li class="nav-item"> <li class="nav-item">
<a href="<?php echo site_url();?>admin/popular" class="nav-link"> <a href="<?php echo site_url();?>admin/popular" class="nav-link">
<p> <p>
<?php echo i18n('Popular_posts');?>
</p>
<?php echo i18n('Popular_posts');?>
</p>
</a> </a>
</li> </li>
<?php } ?>
<?php } ?>
</ul> </ul>
</li> </li>
<li class="nav-item has-treeview menu-open"> <li class="nav-item has-treeview menu-open">
@ -203,22 +203,22 @@
<li class="nav-item"> <li class="nav-item">
<a href="<?php echo site_url();?>admin/mine" class="nav-link"> <a href="<?php echo site_url();?>admin/mine" class="nav-link">
<p> <p>
<?php echo i18n('My_posts');?>
</p>
<?php echo i18n('My_posts');?>
</p>
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a href="<?php echo site_url();?>edit/profile" class="nav-link"> <a href="<?php echo site_url();?>edit/profile" class="nav-link">
<p> <p>
<?php echo i18n('Edit_profile');?>
</p>
<?php echo i18n('Edit_profile');?>
</p>
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a href="<?php echo site_url();?>logout" class="nav-link"> <a href="<?php echo site_url();?>logout" class="nav-link">
<p> <p>
<?php echo i18n('Logout'); ?>
</p>
<?php echo i18n('Logout'); ?>
</p>
</a> </a>
</li> </li>
</ul> </ul>
@ -236,10 +236,10 @@
<div class="container-fluid"> <div class="container-fluid">
<div class="row mb-2"> <div class="row mb-2">
<div class="col"> <div class="col">
<?php if (!empty($breadcrumb)): ?>
<style>.breadcrumb a {margin:0 5px;}</style>
<div class="breadcrumb"><?php echo $breadcrumb ?></div>
<?php endif; ?>
<?php if (!empty($breadcrumb)): ?>
<style>.breadcrumb a {margin:0 5px;}</style>
<div class="breadcrumb"><?php echo $breadcrumb ?></div>
<?php endif; ?>
</div><!-- /.col --> </div><!-- /.col -->
</div><!-- /.row --> </div><!-- /.row -->
</div><!-- /.container-fluid --> </div><!-- /.container-fluid -->
@ -253,7 +253,7 @@
<div class="col" > <div class="col" >
<div class="card card-primary card-outline"> <div class="card card-primary card-outline">
<div class="card-body"> <div class="card-body">
<?php echo content() ?>
<?php echo content() ?>
</div> </div>
</div><!-- /.card --> </div><!-- /.card -->
</div> </div>
@ -297,7 +297,7 @@
<div class="card"> <div class="card">
<div class="card-body login-card-body"> <div class="card-body login-card-body">
<p class="login-box-msg"><?php echo i18n('Sign_in_to_start_your_session');?></p> <p class="login-box-msg"><?php echo i18n('Sign_in_to_start_your_session');?></p>
<?php echo content();?>
<?php echo content();?>
</div> </div>
<!-- /.login-card-body --> <!-- /.login-card-body -->
</div> </div>


+ 2
- 2
system/admin/views/login.html.php View File

@ -12,14 +12,14 @@
echo 'error'; echo 'error';
} }
} ?>" name="user" placeholder="<?php echo i18n('User'); ?>"/> } ?>" name="user" placeholder="<?php echo i18n('User'); ?>"/>
<br>
<br>
<label><?php echo i18n('Password');?> <span class="required">*</span></label> <label><?php echo i18n('Password');?> <span class="required">*</span></label>
<input type="password" class="form-control <?php if (isset($password)) { <input type="password" class="form-control <?php if (isset($password)) {
if (empty($password)) { if (empty($password)) {
echo 'error'; echo 'error';
} }
} ?>" name="password" placeholder="<?php echo i18n('Password'); ?>"/> } ?>" name="password" placeholder="<?php echo i18n('Password'); ?>"/>
<br>
<br>
<input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>"> <input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>">
<?php if (config('google.reCaptcha') === 'true'): ?> <?php if (config('google.reCaptcha') === 'true'): ?>
<script src='https://www.google.com/recaptcha/api.js'></script> <script src='https://www.google.com/recaptcha/api.js'></script>


+ 30
- 30
system/admin/views/main.html.php View File

@ -6,36 +6,36 @@
<?php <?php
if (isset($_SESSION[config("site.url")]['user'])) { if (isset($_SESSION[config("site.url")]['user'])) {
$posts = get_profile_posts($_SESSION[config("site.url")]['user'], 1, 5);
if (!empty($posts)) {
echo '<table class="table post-list">';
echo '<tr class="head"><th>' . i18n('Title') . '</th><th>' . i18n('Published') . '</th>';
if (config("views.counter") == "true")
echo '<th>'.i18n('Views').'</th>';
echo '<th>' . i18n('Category') . '</th><th>' . i18n('Tags') . '</th><th>' . i18n('Operations') . '</th></tr>';
$i = 0;
$len = count($posts);
foreach ($posts as $p) {
if ($i == 0) {
$class = 'item first';
} elseif ($i == $len - 1) {
$class = 'item last';
} else {
$class = 'item';
}
$i++;
echo '<tr class="' . $class . '">';
echo '<td><a target="_blank" href="' . $p->url . '">' . $p->title . '</a></td>';
echo '<td>' . format_date($p->date) . '</td>';
if (config("views.counter") == "true")
echo '<td>' . $p->views . '</td>';
echo '<td><a href="' . str_replace('category', 'admin/categories', $p->categoryUrl) . '">'. strip_tags($p->category) .'</a></td>';
echo '<td>' . $p->tag . '</td>';
echo '<td><a class="btn btn-primary btn-xs" href="' . $p->url . '/edit?destination=admin">' . i18n('Edit') . '</a> <a class="btn btn-danger btn-xs" href="' . $p->url . '/delete?destination=admin">' . i18n('Delete') . '</a></td>';
echo '</tr>';
}
echo '</table>';
}
$posts = get_profile_posts($_SESSION[config("site.url")]['user'], 1, 5);
if (!empty($posts)) {
echo '<table class="table post-list">';
echo '<tr class="head"><th>' . i18n('Title') . '</th><th>' . i18n('Published') . '</th>';
if (config("views.counter") == "true")
echo '<th>'.i18n('Views').'</th>';
echo '<th>' . i18n('Category') . '</th><th>' . i18n('Tags') . '</th><th>' . i18n('Operations') . '</th></tr>';
$i = 0;
$len = count($posts);
foreach ($posts as $p) {
if ($i == 0) {
$class = 'item first';
} elseif ($i == $len - 1) {
$class = 'item last';
} else {
$class = 'item';
}
$i++;
echo '<tr class="' . $class . '">';
echo '<td><a target="_blank" href="' . $p->url . '">' . $p->title . '</a></td>';
echo '<td>' . format_date($p->date) . '</td>';
if (config("views.counter") == "true")
echo '<td>' . $p->views . '</td>';
echo '<td><a href="' . str_replace('category', 'admin/categories', $p->categoryUrl) . '">'. strip_tags($p->category) .'</a></td>';
echo '<td>' . $p->tag . '</td>';
echo '<td><a class="btn btn-primary btn-xs" href="' . $p->url . '/edit?destination=admin">' . i18n('Edit') . '</a> <a class="btn btn-danger btn-xs" href="' . $p->url . '/delete?destination=admin">' . i18n('Delete') . '</a></td>';
echo '</tr>';
}
echo '</table>';
}
} }
?> ?>

+ 66
- 66
system/admin/views/menu.html.php View File

@ -3,86 +3,86 @@
$menu = ''; $menu = '';
$filename = "content/data/menu.json"; $filename = "content/data/menu.json";
if (file_exists($filename)) { if (file_exists($filename)) {
$json = json_decode(file_get_contents('content/data/menu.json', true));
$menus = json_decode($json);
$json = json_decode(file_get_contents('content/data/menu.json', true));
$menus = json_decode($json);
if (!empty($menus)) { if (!empty($menus)) {
$menu = parseMenus($menus);
$menu = parseMenus($menus);
} }
} }
function parseMenus($menus) { function parseMenus($menus) {
$ol = '<ol class="dd-list">';
foreach ($menus as $menu) {
$ol .= parseMenu($menu);
}
$ol .= '</ol>';
return $ol;
$ol = '<ol class="dd-list">';
foreach ($menus as $menu) {
$ol .= parseMenu($menu);
}
$ol .= '</ol>';
return $ol;
} }
function parseMenu($menu) { function parseMenu($menu) {
$li = '<li class="dd-item" data-class="'. $menu->class .'" data-id="'. $menu->id .'" data-name="'.$menu->name.'" data-slug="'.htmlspecialchars($menu->slug, FILTER_SANITIZE_URL).'">';
$li .= '<div class="dd-handle">'.$menu->name.'</div>';
$li .= '<span class="button-delete btn btn-danger btn-xs" style="margin-right:0.5rem" data-owner-id="'.$menu->id.'">'.i18n('Delete').'</span>';
$li .= '<span class="button-edit btn btn-primary btn-xs" data-owner-id="'.$menu->id.'">'.i18n('Edit').'</span>';
if (isset($menu->children)) {
$li .= parseMenus($menu->children);
}
$li .= '</li>';
return $li;
$li = '<li class="dd-item" data-class="'. $menu->class .'" data-id="'. $menu->id .'" data-name="'.$menu->name.'" data-slug="'.htmlspecialchars($menu->slug, FILTER_SANITIZE_URL).'">';
$li .= '<div class="dd-handle">'.$menu->name.'</div>';
$li .= '<span class="button-delete btn btn-danger btn-xs" style="margin-right:0.5rem" data-owner-id="'.$menu->id.'">'.i18n('Delete').'</span>';
$li .= '<span class="button-edit btn btn-primary btn-xs" data-owner-id="'.$menu->id.'">'.i18n('Edit').'</span>';
if (isset($menu->children)) {
$li .= parseMenus($menu->children);
}
$li .= '</li>';
return $li;
} }
?> ?>
<div class="row"> <div class="row">
<div class="col-md-6">
<div class="dd nestable"><?php if (!empty($menu)) {echo $menu;} else {echo '<span>'.i18n('At_the_moment_you_are_using_auto_generated_menu').'</span><ol class="dd-list"></ol>';}?></div>
</div>
<div class="col-md-6">
<form id="menu-add">
<h4><?php echo i18n('Add_menu');?></h4>
<div class="form-group">
<label for="addInputName"><?php echo i18n('Name');?></label>
<input type="text" class="form-control" id="addInputName" placeholder="<?php echo i18n('Link_name')?>" required>
</div>
<div class="form-group">
<label for="addInputSlug"><?php echo i18n('Slug');?></label>
<input type="text" class="form-control" id="addInputSlug" placeholder="<?php echo i18n('item_slug');?>" required>
</div>
<div class="form-group">
<label for="addInputClass"><?php echo i18n('CSS_Class_Optional');?></label>
<input type="text" class="form-control" id="addInputClass" placeholder="<?php echo i18n('item_class');?>">
</div>
<button class="btn btn-primary btn-sm" id="addButton"><?php echo i18n('Add_link');?></button>
</form>
<form id="menu-editor" style="display: none;">
<h4>Editing <span id="currentEditName"></span></h4>
<div class="form-group">
<label for="addInputName"><?php echo i18n('Name')?></label>
<input type="text" class="form-control" id="editInputName" placeholder="<?php echo i18n('Link_name')?>" required>
</div>
<div class="form-group">
<label for="addInputSlug"><?php echo i18n('Slug');?></label>
<input type="text" class="form-control" id="editInputSlug" placeholder="<?php echo i18n('item_slug');?>">
</div>
<div class="form-group">
<label for="addInputClass"><?php echo i18n('CSS_Class_Optional');?></label>
<input type="text" class="form-control" id="editInputClass" placeholder="<?php echo i18n('item_class');?>">
</div>
<button class="btn btn-primary btn-sm" id="editButton"><?php echo i18n('Save_Edit');?></button>
</form>
</div>
<div class="col-md-6">
<div class="dd nestable"><?php if (!empty($menu)) {echo $menu;} else {echo '<span>'.i18n('At_the_moment_you_are_using_auto_generated_menu').'</span><ol class="dd-list"></ol>';}?></div>
</div>
<div class="col-md-6">
<form id="menu-add">
<h4><?php echo i18n('Add_menu');?></h4>
<div class="form-group">
<label for="addInputName"><?php echo i18n('Name');?></label>
<input type="text" class="form-control" id="addInputName" placeholder="<?php echo i18n('Link_name')?>" required>
</div>
<div class="form-group">
<label for="addInputSlug"><?php echo i18n('Slug');?></label>
<input type="text" class="form-control" id="addInputSlug" placeholder="<?php echo i18n('item_slug');?>" required>
</div>
<div class="form-group">
<label for="addInputClass"><?php echo i18n('CSS_Class_Optional');?></label>
<input type="text" class="form-control" id="addInputClass" placeholder="<?php echo i18n('item_class');?>">
</div>
<button class="btn btn-primary btn-sm" id="addButton"><?php echo i18n('Add_link');?></button>
</form>
<form id="menu-editor" style="display: none;">
<h4>Editing <span id="currentEditName"></span></h4>
<div class="form-group">
<label for="addInputName"><?php echo i18n('Name')?></label>
<input type="text" class="form-control" id="editInputName" placeholder="<?php echo i18n('Link_name')?>" required>
</div>
<div class="form-group">
<label for="addInputSlug"><?php echo i18n('Slug');?></label>
<input type="text" class="form-control" id="editInputSlug" placeholder="<?php echo i18n('item_slug');?>">
</div>
<div class="form-group">
<label for="addInputClass"><?php echo i18n('CSS_Class_Optional');?></label>
<input type="text" class="form-control" id="editInputClass" placeholder="<?php echo i18n('item_class');?>">
</div>
<button class="btn btn-primary btn-sm" id="editButton"><?php echo i18n('Save_Edit');?></button>
</form>
</div>
</div> </div>
<div class="row"> <div class="row">
<div class="output-container">
<div class="col">
<button class="btn btn-primary" id="saveButton"><?php echo i18n('Save_Menu');?></button>
<form class="form" style="display:none;">
<textarea class="form-control" id="json-output" rows="5"></textarea>
</form>
</div>
</div>
<div class="output-container">
<div class="col">
<button class="btn btn-primary" id="saveButton"><?php echo i18n('Save_Menu');?></button>
<form class="form" style="display:none;">
<textarea class="form-control" id="json-output" rows="5"></textarea>
</form>
</div>
</div>
</div> </div>
<script src="<?php echo site_url() ?>system/resources/js/jquery.nestable.js"></script> <script src="<?php echo site_url() ?>system/resources/js/jquery.nestable.js"></script>
<script src="<?php echo site_url() ?>system/resources/js/jquery.nestable++.js"></script> <script src="<?php echo site_url() ?>system/resources/js/jquery.nestable++.js"></script>
@ -96,7 +96,7 @@ function parseMenu($menu) {
$('#addMenu').click(function() { $('#addMenu').click(function() {
$('#menu-add').fadeIn(); $('#menu-add').fadeIn();
}); });
$("#saveButton").click(function(){ $("#saveButton").click(function(){
updateOutput($('.dd.nestable').data('output', $('#json-output'))); updateOutput($('.dd.nestable').data('output', $('#json-output')));
var js = $('#json-output').val(); var js = $('#json-output').val();
@ -108,7 +108,7 @@ function parseMenu($menu) {
success: function (response) { success: function (response) {
alert(response.message); alert(response.message);
}, },
});
});
}); });
</script> </script>
<style> <style>


+ 2
- 2
system/admin/views/popular-posts.html.php View File

@ -15,7 +15,7 @@
<th><?php echo i18n('Operations');?></th> <th><?php echo i18n('Operations');?></th>
</tr> </tr>
<?php foreach ($posts as $p): ?> <?php foreach ($posts as $p): ?>
<?php if (strpos($p->file, '/scheduled/') == false && strpos($p->file, '/draft/') == false) { ?>
<?php if (strpos($p->file, '/scheduled/') == false && strpos($p->file, '/draft/') == false) { ?>
<tr> <tr>
<td><a target="_blank" href="<?php echo $p->url ?>"><?php echo $p->title ?></a></td> <td><a target="_blank" href="<?php echo $p->url ?>"><?php echo $p->title ?></a></td>
<td><?php echo format_date($p->date) ?></td> <td><?php echo format_date($p->date) ?></td>
@ -27,7 +27,7 @@
<td><a class="btn btn-primary btn-xs" href="<?php echo $p->url ?>/edit?destination=admin/posts"><?php echo i18n('Edit');?></a> <a <td><a class="btn btn-primary btn-xs" href="<?php echo $p->url ?>/edit?destination=admin/posts"><?php echo i18n('Edit');?></a> <a
class="btn btn-danger btn-xs" href="<?php echo $p->url ?>/delete?destination=admin/posts"><?php echo i18n('Delete');?></a></td> class="btn btn-danger btn-xs" href="<?php echo $p->url ?>/delete?destination=admin/posts"><?php echo i18n('Delete');?></a></td>
</tr> </tr>
<?php } ?>
<?php } ?>
<?php endforeach; ?> <?php endforeach; ?>
</table> </table>
<?php } else { <?php } else {


+ 6
- 6
system/admin/views/posts-list.html.php View File

@ -31,19 +31,19 @@
<?php if (!empty($pagination['prev']) || !empty($pagination['next'])): ?> <?php if (!empty($pagination['prev']) || !empty($pagination['next'])): ?>
<br> <br>
<div class="pager"> <div class="pager">
<ul class="pagination">
<ul class="pagination">
<?php if (!empty($pagination['prev'])) { ?> <?php if (!empty($pagination['prev'])) { ?>
<li class="newer page-item"><a class="page-link" href="?page=<?php echo $page - 1 ?>" rel="prev">&#8592; <?php echo i18n('Newer');?></a></li> <li class="newer page-item"><a class="page-link" href="?page=<?php echo $page - 1 ?>" rel="prev">&#8592; <?php echo i18n('Newer');?></a></li>
<?php } else { ?> <?php } else { ?>
<li class="page-item disabled" ><span class="page-link">&#8592; <?php echo i18n('Newer');?></span></li>
<?php } ?>
<li class="page-item disabled" ><span class="page-link">&#8592; <?php echo i18n('Newer');?></span></li>
<?php } ?>
<li class="page-number page-item disabled"><span class="page-link"><?php echo $pagination['pagenum'];?></span></li> <li class="page-number page-item disabled"><span class="page-link"><?php echo $pagination['pagenum'];?></span></li>
<?php if (!empty($pagination['next'])) { ?> <?php if (!empty($pagination['next'])) { ?>
<li class="older page-item" ><a class="page-link" href="?page=<?php echo $page + 1 ?>" rel="next"><?php echo i18n('Older');?> &#8594;</a></li> <li class="older page-item" ><a class="page-link" href="?page=<?php echo $page + 1 ?>" rel="next"><?php echo i18n('Older');?> &#8594;</a></li>
<?php } else { ?> <?php } else { ?>
<li class="page-item disabled" ><span class="page-link"><?php echo i18n('Older');?> &#8594;</span></li>
<?php } ?>
</ul>
<li class="page-item disabled" ><span class="page-link"><?php echo i18n('Older');?> &#8594;</span></li>
<?php } ?>
</ul>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php } else { <?php } else {


+ 6
- 6
system/admin/views/scheduled.html.php View File

@ -25,19 +25,19 @@
<?php if (!empty($pagination['prev']) || !empty($pagination['next'])): ?> <?php if (!empty($pagination['prev']) || !empty($pagination['next'])): ?>
<br> <br>
<div class="pager"> <div class="pager">
<ul class="pagination">
<ul class="pagination">
<?php if (!empty($pagination['prev'])) { ?> <?php if (!empty($pagination['prev'])) { ?>
<li class="newer page-item"><a class="page-link" href="?page=<?php echo $page - 1 ?>" rel="prev">&#8592; <?php echo i18n('Newer');?></a></li> <li class="newer page-item"><a class="page-link" href="?page=<?php echo $page - 1 ?>" rel="prev">&#8592; <?php echo i18n('Newer');?></a></li>
<?php } else { ?> <?php } else { ?>
<li class="page-item disabled" ><span class="page-link">&#8592; <?php echo i18n('Newer');?></span></li>
<?php } ?>
<li class="page-item disabled" ><span class="page-link">&#8592; <?php echo i18n('Newer');?></span></li>
<?php } ?>
<li class="page-number page-item disabled"><span class="page-link"><?php echo $pagination['pagenum'];?></span></li> <li class="page-number page-item disabled"><span class="page-link"><?php echo $pagination['pagenum'];?></span></li>
<?php if (!empty($pagination['next'])) { ?> <?php if (!empty($pagination['next'])) { ?>
<li class="older page-item" ><a class="page-link" href="?page=<?php echo $page + 1 ?>" rel="next"><?php echo i18n('Older');?> &#8594;</a></li> <li class="older page-item" ><a class="page-link" href="?page=<?php echo $page + 1 ?>" rel="next"><?php echo i18n('Older');?> &#8594;</a></li>
<?php } else { ?> <?php } else { ?>
<li class="page-item disabled" ><span class="page-link"><?php echo i18n('Older');?> &#8594;</span></li>
<?php } ?>
</ul>
<li class="page-item disabled" ><span class="page-link"><?php echo i18n('Older');?> &#8594;</span></li>
<?php } ?>
</ul>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php } else { <?php } else {


+ 38
- 38
system/admin/views/static-pages.html.php View File

@ -6,47 +6,47 @@
<?php <?php
if (isset($_SESSION[config("site.url")]['user'])) { if (isset($_SESSION[config("site.url")]['user'])) {
$posts = get_static_post(null);
if (!empty($posts)) {
krsort($posts);
echo '<table class="table post-list">';
echo '<tr class="head"><th>' . i18n('Title') . '</th>';
if (config("views.counter") == "true")
echo '<th>'.i18n('Views').'</th>';
echo '<th>' . i18n('Operations') . '</th></tr>';
$i = 0;
$len = count($posts);
foreach ($posts as $p) {
if ($i == 0) {
$class = 'item first';
} elseif ($i == $len - 1) {
$class = 'item last';
} else {
$class = 'item';
}
$i++;
$posts = get_static_post(null);
if (!empty($posts)) {
krsort($posts);
echo '<table class="table post-list">';
echo '<tr class="head"><th>' . i18n('Title') . '</th>';
if (config("views.counter") == "true")
echo '<th>'.i18n('Views').'</th>';
echo '<th>' . i18n('Operations') . '</th></tr>';
$i = 0;
$len = count($posts);
foreach ($posts as $p) {
if ($i == 0) {
$class = 'item first';
} elseif ($i == $len - 1) {
$class = 'item last';
} else {
$class = 'item';
}
$i++;
echo '<tr class="' . $class . '">';
echo '<td><a target="_blank" href="' . $p->url . '">' . $p->title . '</a></td>';
if (config("views.counter") == "true")
echo '<td>' . $p->views . '</td>';
echo '<td><a class="btn btn-primary btn-xs" href="' . $p->url . '/add?destination=admin/pages">' . i18n('Add_sub') . '</a> <a class="btn btn-primary btn-xs" href="' . $p->url . '/edit?destination=admin/pages">' . i18n('Edit') . '</a> <a class="btn btn-danger btn-xs" href="' . $p->url . '/delete?destination=admin/pages">' . i18n('Delete') . '</a></td>';
echo '</tr>';
echo '<tr class="' . $class . '">';
echo '<td><a target="_blank" href="' . $p->url . '">' . $p->title . '</a></td>';
if (config("views.counter") == "true")
echo '<td>' . $p->views . '</td>';
echo '<td><a class="btn btn-primary btn-xs" href="' . $p->url . '/add?destination=admin/pages">' . i18n('Add_sub') . '</a> <a class="btn btn-primary btn-xs" href="' . $p->url . '/edit?destination=admin/pages">' . i18n('Edit') . '</a> <a class="btn btn-danger btn-xs" href="' . $p->url . '/delete?destination=admin/pages">' . i18n('Delete') . '</a></td>';
echo '</tr>';
$shortUrl = substr($p->url, strrpos($p->url, "/") + 1);
$subPages = get_static_sub_post($shortUrl, null);
$shortUrl = substr($p->url, strrpos($p->url, "/") + 1);
$subPages = get_static_sub_post($shortUrl, null);
foreach ($subPages as $sp) {
echo '<tr class="' . $class . '">';
echo '<td> <span style="margin-left:30px;">&raquo; <a target="_blank" href="' . $sp->url . '">' . $sp->title . '</a></span></td>';
if (config("views.counter") == "true")
echo '<td>' . $sp->views . '</td>';
echo '<td><a class="btn btn-primary btn-xs" href="' . $sp->url . '/edit?destination=admin/pages">' . i18n('Edit') . '</a> <a class="btn btn-danger btn-xs" href="' . $sp->url . '/delete?destination=admin/pages">' . i18n('Delete') . '</a></td>';
echo '</tr>';
}
}
echo '</table>';
}
foreach ($subPages as $sp) {
echo '<tr class="' . $class . '">';
echo '<td> <span style="margin-left:30px;">&raquo; <a target="_blank" href="' . $sp->url . '">' . $sp->title . '</a></span></td>';
if (config("views.counter") == "true")
echo '<td>' . $sp->views . '</td>';
echo '<td><a class="btn btn-primary btn-xs" href="' . $sp->url . '/edit?destination=admin/pages">' . i18n('Edit') . '</a> <a class="btn btn-danger btn-xs" href="' . $sp->url . '/delete?destination=admin/pages">' . i18n('Delete') . '</a></td>';
echo '</tr>';
}
}
echo '</table>';
}
} }
?> ?>

+ 6
- 6
system/admin/views/user-draft.html.php View File

@ -25,19 +25,19 @@
<?php if (!empty($pagination['prev']) || !empty($pagination['next'])): ?> <?php if (!empty($pagination['prev']) || !empty($pagination['next'])): ?>
<br> <br>
<div class="pager"> <div class="pager">
<ul class="pagination">
<ul class="pagination">
<?php if (!empty($pagination['prev'])) { ?> <?php if (!empty($pagination['prev'])) { ?>
<li class="newer page-item"><a class="page-link" href="?page=<?php echo $page - 1 ?>" rel="prev">&#8592; <?php echo i18n('Newer');?></a></li> <li class="newer page-item"><a class="page-link" href="?page=<?php echo $page - 1 ?>" rel="prev">&#8592; <?php echo i18n('Newer');?></a></li>
<?php } else { ?> <?php } else { ?>
<li class="page-item disabled" ><span class="page-link">&#8592; <?php echo i18n('Newer');?></span></li>
<?php } ?>
<li class="page-item disabled" ><span class="page-link">&#8592; <?php echo i18n('Newer');?></span></li>
<?php } ?>
<li class="page-number page-item disabled"><span class="page-link"><?php echo $pagination['pagenum'];?></span></li> <li class="page-number page-item disabled"><span class="page-link"><?php echo $pagination['pagenum'];?></span></li>
<?php if (!empty($pagination['next'])) { ?> <?php if (!empty($pagination['next'])) { ?>
<li class="older page-item" ><a class="page-link" href="?page=<?php echo $page + 1 ?>" rel="next"><?php echo i18n('Older');?> &#8594;</a></li> <li class="older page-item" ><a class="page-link" href="?page=<?php echo $page + 1 ?>" rel="next"><?php echo i18n('Older');?> &#8594;</a></li>
<?php } else { ?> <?php } else { ?>
<li class="page-item disabled" ><span class="page-link"><?php echo i18n('Older');?> &#8594;</span></li>
<?php } ?>
</ul>
<li class="page-item disabled" ><span class="page-link"><?php echo i18n('Older');?> &#8594;</span></li>
<?php } ?>
</ul>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php } else { <?php } else {


+ 7
- 7
system/admin/views/user-posts.html.php View File

@ -8,7 +8,7 @@
<tr class="head"> <tr class="head">
<th><?php echo i18n('Title');?></th> <th><?php echo i18n('Title');?></th>
<th><?php echo i18n('Published');?></th> <th><?php echo i18n('Published');?></th>
<?php if (config("views.counter") == "true"): ?>
<?php if (config("views.counter") == "true"): ?>
<th>Views</th> <th>Views</th>
<?php endif; ?> <?php endif; ?>
<th><?php echo i18n('Category');?></th> <th><?php echo i18n('Category');?></th>
@ -31,19 +31,19 @@
<?php if (!empty($pagination['prev']) || !empty($pagination['next'])): ?> <?php if (!empty($pagination['prev']) || !empty($pagination['next'])): ?>
<br> <br>
<div class="pager"> <div class="pager">
<ul class="pagination">
<ul class="pagination">
<?php if (!empty($pagination['prev'])) { ?> <?php if (!empty($pagination['prev'])) { ?>
<li class="newer page-item"><a class="page-link" href="?page=<?php echo $page - 1 ?>" rel="prev">&#8592; <?php echo i18n('Newer');?></a></li> <li class="newer page-item"><a class="page-link" href="?page=<?php echo $page - 1 ?>" rel="prev">&#8592; <?php echo i18n('Newer');?></a></li>
<?php } else { ?> <?php } else { ?>
<li class="page-item disabled" ><span class="page-link">&#8592; <?php echo i18n('Newer');?></span></li>
<?php } ?>
<li class="page-item disabled" ><span class="page-link">&#8592; <?php echo i18n('Newer');?></span></li>
<?php } ?>
<li class="page-number page-item disabled"><span class="page-link"><?php echo $pagination['pagenum'];?></span></li> <li class="page-number page-item disabled"><span class="page-link"><?php echo $pagination['pagenum'];?></span></li>
<?php if (!empty($pagination['next'])) { ?> <?php if (!empty($pagination['next'])) { ?>
<li class="older page-item" ><a class="page-link" href="?page=<?php echo $page + 1 ?>" rel="next"><?php echo i18n('Older');?> &#8594;</a></li> <li class="older page-item" ><a class="page-link" href="?page=<?php echo $page + 1 ?>" rel="next"><?php echo i18n('Older');?> &#8594;</a></li>
<?php } else { ?> <?php } else { ?>
<li class="page-item disabled" ><span class="page-link"><?php echo i18n('Older');?> &#8594;</span></li>
<?php } ?>
</ul>
<li class="page-item disabled" ><span class="page-link"><?php echo i18n('Older');?> &#8594;</span></li>
<?php } ?>
</ul>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php } else { <?php } else {


Loading…
Cancel
Save