Initial commit
Couldnt keep the history unfortunately.
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="content shadow p-4 mb-4">
|
||||
<?= $this->partial('../app/views/partials/message.php'); ?>
|
||||
|
||||
<h3>Create</h3>
|
||||
|
||||
<form action="<?= $this->url; ?>" method="post">
|
||||
<?php foreach($this->attributes as $key => $attribute) { ?>
|
||||
<?php
|
||||
if ($attribute[3] == 1) { continue; }
|
||||
if ($attribute[2] == 1) { $required = 'required'; } else { $required = ''; }
|
||||
|
||||
$name = $attribute[0];
|
||||
$title = ucfirst($attribute[0]);
|
||||
$title = str_replace('_', ' ', $title);
|
||||
$autofocus = $key == 0 ? 'autofocus' : '';
|
||||
?>
|
||||
<div class="form-group">
|
||||
<label for="<?= $name; ?>"><?= $title;?></label><br>
|
||||
<?php if ($attribute[1] == 'text') { ?>
|
||||
|
||||
<input type="text" class="form-control"
|
||||
<?= $autofocus; ?>
|
||||
<?= $required; ?>
|
||||
name="<?= $name; ?>"
|
||||
placeholder="<?= $title; ?>">
|
||||
|
||||
<?php } else if ($attribute[1] == 'textarea') { ?>
|
||||
|
||||
<textarea id="summernote" rows="18" cols="1" class="form-control"
|
||||
<?= $autofocus; ?>
|
||||
<?= $required; ?>
|
||||
name="<?= $name; ?>"
|
||||
placeholder="<?= $title; ?>"
|
||||
></textarea>
|
||||
|
||||
<?php } else if ($attribute[1] == 'checkbox') { ?>
|
||||
|
||||
<input type="hidden" name="<?= $name; ?>" value="0">
|
||||
<input type="checkbox" name="<?= $name; ?>" value="1">
|
||||
|
||||
<?php } else if ($attribute[1] == 'dropdown') { ?>
|
||||
|
||||
<select name="<?= $name; ?>" class="custom-select">
|
||||
<?php foreach($this->dropdownData[$key] as $dropdownKey => $value) { ?>
|
||||
<option value="<?= $dropdownKey; ?>"><?= $value; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<button type="submit" class="btn btn-dark">Create</button>
|
||||
|
||||
<input type="hidden" name="_token" value="<?= $this->csrfToken; ?>" />
|
||||
</form>
|
||||
|
||||
<div class="pb-5"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,66 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="content shadow p-4 mb-4">
|
||||
<?= $this->partial('../app/views/partials/message.php'); ?>
|
||||
|
||||
<h3>Edit</h3>
|
||||
|
||||
<form id="form-edit" action="<?= $this->url; ?>" method="post">
|
||||
<?php foreach($this->attributes as $key => $attribute) { ?>
|
||||
<?php
|
||||
if ($attribute[3] == 1) { continue; }
|
||||
if ($attribute[2] == 1) { $required = 'required'; } else { $required = ''; }
|
||||
|
||||
$name = $attribute[0];
|
||||
$title = ucfirst($attribute[0]);
|
||||
$title = str_replace('_', ' ', $title);
|
||||
$autofocus = $key == 0 ? 'autofocus' : '';
|
||||
?>
|
||||
<div class="form-group">
|
||||
<label for="<?= $name; ?>"><?= $title;?></label><br>
|
||||
<?php if ($attribute[1] == 'text') { ?>
|
||||
|
||||
<input type="text" class="form-control"
|
||||
<?= $autofocus; ?>
|
||||
<?= $required; ?>
|
||||
name="<?= $name; ?>"
|
||||
placeholder="<?= $title; ?>"
|
||||
value="<?= ($this->escape)($this->model->$name); ?>">
|
||||
|
||||
<?php } else if ($attribute[1] == 'textarea') { ?>
|
||||
|
||||
<textarea id="summernote" rows="18" cols="1" class="form-control"
|
||||
<?= $autofocus; ?>
|
||||
<?= $required; ?>
|
||||
name="<?= $name; ?>"
|
||||
placeholder="<?= $title; ?>"
|
||||
><?= ($this->escape)($this->model->$name); ?></textarea>
|
||||
|
||||
<?php } else if ($attribute[1] == 'checkbox') { ?>
|
||||
|
||||
<input type="hidden" name="<?= $name; ?>" value="0">
|
||||
<input type="checkbox" name="<?= $name; ?>" value="1"
|
||||
<?= $this->model->$name == '1' ? 'checked' : ''; ?>>
|
||||
|
||||
<?php } else if ($attribute[1] == 'dropdown') { ?>
|
||||
|
||||
<select name="<?= $name; ?>" class="custom-select">
|
||||
<?php foreach($this->dropdownData[$key] as $dropdownKey => $value) { ?>
|
||||
<option value="<?= $dropdownKey; ?>"
|
||||
<?= $this->model->$name == $dropdownKey ? 'selected' : ''; ?>>
|
||||
<?= $value; ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<input type="hidden" name="_token" value="<?= $this->csrfToken; ?>" />
|
||||
</form>
|
||||
<button class="js-edit btn btn-dark" href="<?= $this->url . '/' . $this->model->id; ?>">Edit</button>
|
||||
|
||||
<div class="pb-5"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,71 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="content shadow p-4 mb-4">
|
||||
<?= $this->partial('../app/views/partials/message.php'); ?>
|
||||
|
||||
<h3><?= $this->title; ?></h3>
|
||||
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<?php foreach($this->attributes as $attribute) { ?>
|
||||
<?php
|
||||
if ($attribute[3] == 1) { continue; }
|
||||
|
||||
$title = ucfirst($attribute[0]);
|
||||
$title = str_replace('_', ' ', $title);
|
||||
?>
|
||||
<th><?= $title; ?></th>
|
||||
<?php } ?>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($this->rows as $key => $row) { ?>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="<?= $this->url . '/' . $row['id']; ?>">
|
||||
<?= $key + 1; ?>
|
||||
</a>
|
||||
</td>
|
||||
<?php foreach($this->attributes as $attribute) { ?>
|
||||
<?php
|
||||
// Skip filtered
|
||||
if ($attribute[3] == 1) { continue; }
|
||||
?>
|
||||
<td>
|
||||
<?php $value = $row[$attribute[0]]; ?>
|
||||
<?php if ($attribute[1] == 'checkbox' && is_numeric($value)) { ?>
|
||||
<i class="fa <?= $value ? 'fa-check text-success' : 'fa-times text-danger'; ?>"></i>
|
||||
<?php } else { ?>
|
||||
<?= ($this->escape)(substr($value, 0, 47)); ?>
|
||||
<?= strlen($value) > 47 ? '...' : ''; ?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<?php } ?>
|
||||
<td>
|
||||
<a href="<?= $this->url . '/' . $row['id']; ?>/edit">
|
||||
<i class="fa fa-pencil" aria-hidden="true"></i>
|
||||
</a>
|
||||
<a class="js-delete" href="<?= $this->url . '/' . $row['id']; ?>" data-token="<?= $this->csrfToken; ?>">
|
||||
<i class="fa fa-trash text-danger" aria-hidden="true"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?= $this->partial('../app/views/partials/pagination.php'); ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<a class="btn btn-dark" href="<?= $this->url ?>/create">New <?= $this->title; ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pb-5"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,40 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="content shadow p-4 mb-4">
|
||||
<h3><?= _exists([$this->model->title]) ? ($this->escape)($this->model->title) : 'Show'; ?></h3>
|
||||
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr class="d-flex">
|
||||
<th class="col-4">Column</th>
|
||||
<th class="col-8">Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($this->attributes as $attribute) { ?>
|
||||
<?php
|
||||
// Skip filtered
|
||||
if ($attribute[3] == 1) { continue; }
|
||||
|
||||
$title = ucfirst($attribute[0]);
|
||||
$title = str_replace('_', ' ', $title);
|
||||
?>
|
||||
<tr class="d-flex">
|
||||
<td class="col-4"><?= $title; ?></td>
|
||||
<td class="col-8">
|
||||
<?php $value = $this->model->{$attribute[0]}; ?>
|
||||
<?php if ($attribute[1] == 'checkbox' && is_numeric($value)) { ?>
|
||||
<i class="fa <?= $value ? 'fa-check text-success' : 'fa-times text-danger'; ?>"></i>
|
||||
<?php } else { ?>
|
||||
<?= ($this->escape)($value); ?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="pb-5"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,13 @@
|
||||
<div class="content shadow p-4 mb-4">
|
||||
<div id="home">
|
||||
<h3>
|
||||
Welcome back,
|
||||
</h3>
|
||||
<h3>
|
||||
<?= $this->user->first_name; ?>
|
||||
<?= !empty($this->user->last_name) ? ' ' . $this->user->last_name : ''; ?>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="pb-5"></div>
|
||||
</div>
|
||||
@@ -0,0 +1,90 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="content shadow p-4 mb-4">
|
||||
<?= $this->partial('../app/views/partials/message.php'); ?>
|
||||
|
||||
<h3>Media file manager</h3>
|
||||
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<th scope="col">Thumbnail</th>
|
||||
<th scope="col">URL</th>
|
||||
<th scope="col">Uploaded by</th>
|
||||
<th scope="col">Modifier</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php foreach($this->media as $media) { ?>
|
||||
<?php
|
||||
$filename = $media['filename'] . '.' . $media['extension'];
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<?php if (in_array($media['extension'], ['jpg', 'jpeg', 'png', 'gif'])) { ?>
|
||||
<img src="<?= $this->fileUrl . $filename; ?>"
|
||||
title="<?= $filename; ?>" alt="<?= $filename; ?>"
|
||||
class="img-thumbnail" width="100px">
|
||||
<?php } else { ?>
|
||||
No thumbnail available.
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?= $this->fileUrl . $filename; ?>" target="_blank">
|
||||
<?= $this->fileUrl . $filename; ?>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
$idx = array_search( $media['log_id'], array_column($this->log, 'id'));
|
||||
$idx = array_search($this->log[$idx]['user_id'], array_column($this->user, 'id'));
|
||||
echo $this->user[$idx]['username'];
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<a class="js-delete" href="<?= $this->url . '/' . $media['id']; ?>">
|
||||
<button type="button" class="btn btn-danger">
|
||||
Delete
|
||||
</button>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<form method="POST" action="<?= $this->url; ?>" enctype="multipart/form-data">
|
||||
<td colspan="2" class="js-upload p-0 middle">
|
||||
<input type="file" id="file" class="d-none" name="file[]" required multiple>
|
||||
|
||||
<table class="table mb-0">
|
||||
<thead></thead>
|
||||
<tbody>
|
||||
<tr class="bg-transparent">
|
||||
<td class="border-0 middle text-center">
|
||||
<i class="fa fa-cloud-upload"></i>
|
||||
<span class="">Drag files here</span>
|
||||
</td>
|
||||
<td class="border-0 middle text-center">
|
||||
<label for="file" class="btn btn-light border px-3 py-1 mb-0">Select files</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
<td>
|
||||
<input type="hidden" name="overwrite" value="0">
|
||||
<input type="checkbox" name="overwrite" value="1"> Overwrite
|
||||
</td>
|
||||
<td>
|
||||
<button type="submit" class="btn btn-success">Upload</button>
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?= $this->partial('../app/views/partials/pagination.php'); ?>
|
||||
|
||||
<div class="pb-5"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,33 @@
|
||||
<div class="content shadow p-4 mb-4">
|
||||
<h3>Syntax Highlighting</h3>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="language">Select Language:</label><br>
|
||||
<!-- https://prismjs.com/#languages-list -->
|
||||
<select id="syntax-language" name="language">
|
||||
<option value="c">C</option>
|
||||
<option value="cpp">C++</option>
|
||||
<option value="css">CSS</option>
|
||||
<option value="html">HTML</option>
|
||||
<option value="javascript">JavaScript</option>
|
||||
<option value="php">PHP</option>
|
||||
<option value="python">Python</option>
|
||||
<option value="shell">Shell</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="code">Code:</label><br>
|
||||
<textarea id="syntax-code" name="code" rows="12" cols="1" class="form-control" autofocus></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<a id="syntax-highlight" class="btn btn-dark" href="#">Highlight</a>
|
||||
<a id="syntax-copy" class="btn btn-dark" href="#">Copy</a>
|
||||
</div>
|
||||
|
||||
<div id="syntax-parse"><pre class="line-numbers mb-4"><code class=""></code></pre></div>
|
||||
<textarea id="syntax-parse-copy" class="admin-hidden"></textarea>
|
||||
|
||||
<div class="pb-5"></div>
|
||||
</div>
|
||||
@@ -0,0 +1,44 @@
|
||||
<div class="row">
|
||||
<?php $size = $this->sideContent ? '8' : '12'; ?>
|
||||
<div class="col-12 col-md-<?= $size; ?> col-lg-<?= $size; ?>">
|
||||
<?php foreach ($this->contents as $key => $content) { ?>
|
||||
<?php if ($content['type'] == '1') { ?>
|
||||
|
||||
<div class="<?= !$content['hide_background'] ? 'content shadow p-4' : ''; ?> mb-4">
|
||||
<?php if ($key === array_key_first($this->contents)) { ?>
|
||||
<?= $this->partial('../app/views/partials/message.php'); ?>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($content['hide_title'] == 0) { ?>
|
||||
<h1><?= ($this->escape)($content['title']); ?></h1>
|
||||
<?php } ?>
|
||||
<?= $content['content']; ?>
|
||||
|
||||
<?php if ($this->injectView != '') { ?>
|
||||
<?= $this->partial($this->injectView); ?>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($key === array_key_last($this->contents)) { ?>
|
||||
<div class="pb-5"></div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->sideContent) { ?>
|
||||
<div class="col-8 col-md-4 col-lg-4">
|
||||
<?php foreach ($this->contents as $content) { ?>
|
||||
<?php if ($content['type'] == '2') { ?>
|
||||
|
||||
<div class="content content-side shadow p-3 mb-4">
|
||||
<h3><?= ($this->escape)($content['title']); ?></h3>
|
||||
<?= $content['content']; ?>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
@@ -0,0 +1,8 @@
|
||||
<div class="content shadow p-4 mb-4">
|
||||
<div class="navbar-padding">
|
||||
<p>Error <strong>404</strong>.</p>
|
||||
<p>requested URL <?= $_SERVER["REQUEST_URI"] ?> was not found on this server.</p>
|
||||
</div>
|
||||
|
||||
<div class="pb-5"></div>
|
||||
</div>
|
||||
@@ -0,0 +1,96 @@
|
||||
<form action="<?= $this->url; ?>" method="post">
|
||||
|
||||
<?php $count = 0; ?>
|
||||
<?php foreach ($this->form->getFields() as $name => $field) { ?>
|
||||
|
||||
<?php if ($field[1] == 'comment') { ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= $field[0]; ?>
|
||||
</div>
|
||||
|
||||
<?php } else if ($field[1] == 'radio') { ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?php $radioCount = 0; ?>
|
||||
|
||||
<?php if ($field[0] != '') { ?>
|
||||
<label><?= $field[0]; ?></label><br>
|
||||
<?php } ?>
|
||||
|
||||
<input type="hidden" name="<?= $name; ?>" value="">
|
||||
<?php foreach ($field[2] as $value => $label) { ?>
|
||||
|
||||
<input type="radio" name="<?= $name; ?>" id="<?= $value; ?>"
|
||||
<?= strstr($field[3], 'required') ? 'required' : ''; ?>
|
||||
<?= $this->{$name} == $value || (!isset($this->{$name}) && $radioCount == 0 && $field[0] == '') ? 'checked' : ''; ?>
|
||||
<?= $count == 0 && $radioCount == 0 ? 'autofocus' : ''; ?>
|
||||
value="<?= $value; ?>">
|
||||
<label for="<?= $value; ?>"><?= $label; ?> </label>
|
||||
<?= $field[0] != '' ? '<br>' : ''; ?>
|
||||
|
||||
<?php $radioCount++; ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php } else if ($field[1] == 'text' || $field[1] == 'email' ||
|
||||
$field[1] == 'tel' || $field[1] == 'password') { ?>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="<?= $name; ?>"><?= $field[0]; ?></label>
|
||||
<input type="<?= $field[1]; ?>" name="<?= $name; ?>" id="<?= $name; ?>" class="form-control"
|
||||
<?= strstr($field[3], 'required') ? 'required' : ''; ?>
|
||||
<?= _exists($field, 5) ? "pattern='$field[5]'" : ''; ?>
|
||||
<?= _exists($field, 6) ? "title='$field[6]'" : ''; ?>
|
||||
<?= strstr($field[3], 'captcha') ? 'autocomplete="off"' : '' ?>
|
||||
<?= $count == 0 ? 'autofocus' : ''; ?>
|
||||
value="<?= $this->{$name}; ?>">
|
||||
|
||||
<?php if (strstr($field[3], 'captcha')) { ?>
|
||||
<img src="/img/captcha.jpg" class="img-fluid pt-2">
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php } else if ($field[1] == 'textarea') { ?>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="<?= $name; ?>"><?= $field[0]; ?></label>
|
||||
<textarea name="<?= $name; ?>" cols="1" rows="5" id="<?= $name; ?>" class="form-control"
|
||||
<?= strstr($field[3], 'required') ? 'required' : ''; ?>
|
||||
<?= $count == 0 ? 'autofocus' : ''; ?>
|
||||
><?= $this->{$name}; ?></textarea>
|
||||
</div>
|
||||
|
||||
<?php } else if ($field[1] == 'checkbox') { ?>
|
||||
|
||||
<div class="form-group form-check">
|
||||
|
||||
<?php $checkboxCount = 0; ?>
|
||||
<input name="<?= $name; ?>" type="hidden" value="0">
|
||||
<?php foreach ($field[2] as $value => $label) { ?>
|
||||
|
||||
<input type="checkbox" name="<?= $name; ?>" id="<?= $value; ?>" class="form-check-input"
|
||||
<?= strstr($field[3], 'required') ? 'required' : ''; ?>
|
||||
<?= $this->{$name} == $value ? 'checked' : ''; ?>
|
||||
<?= $count == 0 && $checkboxCount == 0 ? 'autofocus' : ''; ?>
|
||||
value="<?= $value; ?>">
|
||||
<label for="<?= $value; ?>" class="form-check-label"><?= $label; ?></label><br>
|
||||
|
||||
<?php $checkboxCount++; ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php $count++; ?>
|
||||
<?php } ?>
|
||||
|
||||
<p class="mb-0">
|
||||
<?php if (_exists([$this->form->getReset()])) { ?>
|
||||
<button type="reset" class="btn btn-dark"><?= $this->form->getReset(); ?></button>
|
||||
<?php } ?>
|
||||
<button type="submit" class="btn btn-dark"><?= $this->form->getSubmit(); ?></button>
|
||||
</p>
|
||||
|
||||
<input type="hidden" name="_token" value="<?= $this->csrfToken; ?>" />
|
||||
</form>
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
use App\Classes\Config;
|
||||
use App\Classes\User;
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="<?= $this->metaDescription; ?>">
|
||||
|
||||
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
|
||||
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
|
||||
|
||||
<?php if ($this->adminSection) { ?>
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.59.4/codemirror.min.css" rel="stylesheet" integrity="sha384-K/FfhVUneW5TdId1iTRDHsOHhLGHoJekcX6UThyJhMRctwRxlL3XmSnTeWX2k3Qe" crossorigin="anonymous">
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.59.4/theme/tomorrow-night-eighties.min.css" rel="stylesheet" integrity="sha384-zTCWZYMg963D68otcZCn2SQ2SBwih+lCwYxWqvx6xH8/Wt6+NN+giHIvcMpN4cPD" crossorigin="anonymous">
|
||||
|
||||
<link href="https://cdn.jsdelivr.net/npm/summernote@0.8.15/dist/summernote-bs4.min.css" rel="stylesheet" integrity="sha384-JNFvp1YkK/DsvVg1KxCYX/jfLcrqFkwUE1+4kt+Zpkhvfeetb13H+j2ZZhrTJwRy" crossorigin="anonymous">
|
||||
<?php } ?>
|
||||
|
||||
<link href="https://cdn.jsdelivr.net/npm/prismjs@1.22.0/themes/prism-tomorrow.min.css" rel="stylesheet" integrity="sha384-rG0ypOerdVJPawfZS6juq8t8GVE9oCCPJbOXV/bF+e61zYW9Ib6u9WwSbTOK6CKA" crossorigin="anonymous">
|
||||
<link href="https://cdn.jsdelivr.net/npm/prismjs@1.22.0/plugins/line-numbers/prism-line-numbers.min.css" rel="stylesheet" integrity="sha384-n3/UuPVL3caytud/opHXuyFoezGp2oAUB0foYaCAIs2QwGv/nV0kULHS2WAaJuxR" crossorigin="anonymous">
|
||||
|
||||
<link href="<?= Config::c('APP_URL'); ?>/css/style.css?v=<?= rand(); ?>" rel="stylesheet">
|
||||
|
||||
<title><?= ($this->escape)($this->pageTitle); ?><?= $this->pageTitle != '' ? ' - ' : '' ?>Rick van Vonderen</title>
|
||||
<link rel="icon" type="image/png" href="<?= Config::c('APP_URL'); ?>/img/favicon.png">
|
||||
</head>
|
||||
<body>
|
||||
<?= $this->partial('../app/views/partials/header.php'); ?>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="js-main-content col-<?= User::getToggle() ? '9' : '12'; ?>">
|
||||
<?= $this->yieldView(); ?>
|
||||
<?= $this->partial('../app/views/partials/footer.php'); ?>
|
||||
</div>
|
||||
<?php if ($this->loggedIn) { ?>
|
||||
<?= $this->partial('../app/views/partials/admin.php'); ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div id="isMobile" class="d-md-none d-lg-none d-xl-none"></div>
|
||||
</div>
|
||||
|
||||
<?= $this->partial('../app/views/partials/script.php'); ?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
use App\Classes\Config;
|
||||
use App\Classes\User;
|
||||
?>
|
||||
|
||||
<div class="content shadow p-4 mb-4">
|
||||
<?= $this->partial('../app/views/partials/message.php'); ?>
|
||||
|
||||
<?php if (User::check()) { ?>
|
||||
You're already logged in. Click to <a href="<?= \App\Classes\Config::c('APP_URL'); ?>/logout">log out</a>.
|
||||
|
||||
<?php if ($this->redirectURL) { ?>
|
||||
<script type="text/javascript">
|
||||
setTimeout(function() {
|
||||
window.location.replace("<?= $this->redirectURL; ?>");
|
||||
}, 3000);
|
||||
</script>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<h1>Sign in</h1>
|
||||
<?= $this->partial($this->injectView); ?>
|
||||
<br>
|
||||
<a href="<?= Config::c('APP_URL'); ?>/reset-password">Forgot password</a>?
|
||||
<?php } ?>
|
||||
|
||||
<div class="pb-5"></div>
|
||||
</div>
|
||||
@@ -0,0 +1,31 @@
|
||||
<div class="js-admin-menu admin-menu col-3 <?= \App\Classes\User::getToggle() ? 'd-block' : 'd-none'; ?>">
|
||||
<div class="content admin-content shadow p-4">
|
||||
<a href="<?= \App\Classes\Config::c('APP_URL'); ?>/admin"><h4>Admin panel</h4></a>
|
||||
|
||||
<hr>
|
||||
<h5>Navigation</h5>
|
||||
- <a href="<?= \App\Classes\Config::c('APP_URL'); ?>/admin/section">Section</a>
|
||||
<br>
|
||||
- <a href="<?= \App\Classes\Config::c('APP_URL'); ?>/admin/page">Page</a>
|
||||
|
||||
<hr>
|
||||
<h5>Link</h5>
|
||||
- <a href="<?= \App\Classes\Config::c('APP_URL'); ?>/admin/section-has-content">SectionHasContent</a>
|
||||
<br>
|
||||
- <a href="<?= \App\Classes\Config::c('APP_URL'); ?>/admin/page-has-content">PageHasContent</a>
|
||||
|
||||
<hr>
|
||||
<h5>Content</h5>
|
||||
- <a href="<?= \App\Classes\Config::c('APP_URL'); ?>/admin/content">Content</a>
|
||||
<br>
|
||||
- <a href="<?= \App\Classes\Config::c('APP_URL'); ?>/admin/media">Media</a>
|
||||
<br>
|
||||
- <a href="<?= \App\Classes\Config::c('APP_URL'); ?>/admin/syntax-highlighting">Syntax Highlighting</a>
|
||||
|
||||
<hr>
|
||||
- <a href="<?= \App\Classes\Config::c('APP_URL'); ?>/logout">Log out</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="js-admin-toggle admin-toggle fixed-bottom btn btn-dark">
|
||||
<i class="fa fa-bars" aria-hidden="true"></i>
|
||||
</div>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
use App\Classes\Config;
|
||||
?>
|
||||
|
||||
<footer class="mb-4">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-12">
|
||||
© <?= date('Y'); ?> Rick van Vonderen
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
use App\Classes\Config;
|
||||
?>
|
||||
|
||||
<nav class="navbar navbar-expand-lg fixed-top navbar-dark bg-dark shadow">
|
||||
<a class="navbar-brand" href="<?= Config::c('APP_URL'); ?>/"><i class="fa fa-home"></i> Home</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
|
||||
<?php foreach ($this->navigation as $section) { ?>
|
||||
<?php if (count($section) < 3) { continue; } ?>
|
||||
<?php if (count($section) == 3) { ?>
|
||||
<a class="nav-link mx-lg-2"
|
||||
href="<?= Config::c('APP_URL'); ?>/<?= $section[0] . '/' . $section[2][0]; ?>"
|
||||
><?= ($this->escape)($section[2][1]); ?></a>
|
||||
<?php continue; ?>
|
||||
<?php } ?>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle mx-lg-3 purple" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown">
|
||||
<?= ($this->escape)($section[1]); ?>
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
|
||||
<?php foreach ($section as $key => $page) { ?>
|
||||
<?php if ($key == 0 || $key == 1) { continue; } ?>
|
||||
<a class="dropdown-item purple"
|
||||
href="<?= Config::c('APP_URL'); ?>/<?= $section[0] . '/' . $page[0]; ?>"
|
||||
><?= ($this->escape)($page[1]); ?></a>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
</ul>
|
||||
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://git.riyyi.com/riyyi" target="_blank"><i class="fa fa-coffee"></i> Gitea</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://github.com/riyyi" target="_blank"><i class="fa fa-github"></i> GitHub</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://gitlab.com/riyyi" target="_blank"><i class="fa fa-gitlab"></i> GitLab</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php if ($this->type != '') { ?>
|
||||
<div class="alert alert-<?= $this->type; ?> alert-dismissible fade show" role="alert">
|
||||
<?= $this->message; ?>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<?php } ?>
|
||||
@@ -0,0 +1,25 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<nav class="pb-2" aria-label="Page navigation">
|
||||
<ul class="pagination justify-content-center">
|
||||
<li class="page-item <?= $this->page <= 1 ? 'disabled' : ''; ?>">
|
||||
<a class="page-link" href="<?= $this->url . '?page=' . ($this->page - 1); ?>" aria-label="Previous">
|
||||
<span aria-hidden="true">«</span>
|
||||
<span class="sr-only">Previous</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php for($i = 1; $i <= $this->pages; $i++) { ?>
|
||||
<li class="page-item <?= $this->page == $i ? 'active' : ''; ?>">
|
||||
<a class="page-link" href="<?= $this->url . '?page=' . $i; ?>"><?= $i; ?></a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<li class="page-item <?= $this->page >= $this->pages ? 'disabled' : ''; ?>">
|
||||
<a class="page-link" href="<?= $this->url . '?page=' . ($this->page + 1); ?>" aria-label="Next">
|
||||
<span aria-hidden="true">»</span>
|
||||
<span class="sr-only">Next</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
use App\Classes\Config;
|
||||
?>
|
||||
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
|
||||
<?php if ($this->adminSection) { ?>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.59.4/codemirror.min.js" integrity="sha384-v0AyVIspkm1uirQ6Nsmr90ScryXAWf+xv0DlNrNo1BkSY3sqr7tsUKLZyTMHqy2G" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.59.4/mode/clike/clike.min.js" integrity="sha384-7LfH34Nu+Rz2rkqh9L9Okzi17vt5/sX9YZvMjHgRhwH94EdtzCaQ5SpIkXfn80/2" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.59.4/mode/xml/xml.min.js" integrity="sha384-Fohp26Rl1xXN67RS6nTZ+s+DEgvUoMZGBTzPuAwW/tjDMtaL27W3b4Irtxtf9KPw" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.59.4/mode/javascript/javascript.min.js" integrity="sha384-QPVXEBl5e4kOafHL/KBYAhkf9c7iaD6svR+RGt92QYCbdJiKcmfC4weMMPLif77e" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.59.4/mode/css/css.min.js" integrity="sha384-3UHVlVGKahbp3CTUk/YC+ICeNAx8Na6vIIrmH18NimXtGR/zF4Ce4F1d+gNPFh9a" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.59.4/mode/htmlmixed/htmlmixed.min.js" integrity="sha384-C4oV1iL5nO+MmIRm+JoD2sZ03wIafv758LRO92kyg7AFvpvn8oQAra4g3mrw5+53" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.59.4/mode/php/php.min.js" integrity="sha384-WFPjfiKs+lVB1vp9fq9wEhsgi/5Z86jVLyaGMe2wnxa/3o8SEUCySeqglAaRqxnI" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.59.4/mode/shell/shell.min.js" integrity="sha384-VzBcr5K83ctjdWufr/bGFmHLB7LbEhdN5dhKWvE3Q/H5Qfvz9dKPJgfHXeaq74da" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.59.4/mode/python/python.min.js" integrity="sha384-Wh2d9/yLlLvOQErKI4FDPRJXSklc6GlymSMyq37kJcVmfB73bJ33OqA2TpVHBisf" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.59.4/keymap/vim.min.js" integrity="sha384-MTJMQ129Rzid0TmDEIKZomitzagfahspgvwEWmm1s2ReXw8Evv5NTVf77JlmAOOM" crossorigin="anonymous"></script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/summernote@0.8.15/dist/summernote-bs4.min.js" integrity="sha384-sH3/pYu1soe3hR5e4aLT8/9wusU2x7Xt10VNfJ6n0VbsUkmkPf+3jI7So6USyROv" crossorigin="anonymous"></script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.22.0/components/prism-core.min.js" data-manual integrity="sha384-BhpFhn+hhQohKi2ygOAJsVKyJu2q+QYydLKC7rqeMZLyEJFQl1DZieRX4/WxKUsJ" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.22.0/plugins/autoloader/prism-autoloader.min.js" integrity="sha384-FIz0ezhzXpErvkjCsQ+74Je6cuWUBoVubidnSGt498wjjEBaAV27BAISa0/GaAFq" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.22.0/plugins/line-numbers/prism-line-numbers.min.js" integrity="sha384-xktrwc/DkME39VrlkNS1tFEeq/S0JFbc8J9Q8Bjx7Xy16Z3NnmUi+94RuffrOQZR" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.22.0/plugins/highlight-keywords/prism-highlight-keywords.min.js" integrity="sha384-Rk2xv6YOAfQH8z3ZAK37pgnQihXfgkER8B5EYhoFc+mMNPzf+t7g2J9U74FAvy2T" crossorigin="anonymous"></script>
|
||||
|
||||
<script src="<?= Config::c('APP_URL'); ?>/js/app.js?v=<?= rand(); ?>"></script>
|
||||
<?php } ?>
|
||||
<script src="<?= Config::c('APP_URL'); ?>/js/site.js?v=<?= rand(); ?>"></script>
|
||||
@@ -0,0 +1,14 @@
|
||||
<div class="content shadow p-4 mb-4">
|
||||
<?= $this->partial('../app/views/partials/message.php'); ?>
|
||||
|
||||
<?php if (!$this->newPassword) { ?>
|
||||
<h1>Reset password</h1>
|
||||
<p>Please fill in one of the fields.</p>
|
||||
<?php } else { ?>
|
||||
<h1>Set new password</h1>
|
||||
<?php } ?>
|
||||
|
||||
<?= $this->partial($this->injectView); ?>
|
||||
|
||||
<div class="pb-5"></div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user