Skip to content

Commit

Permalink
Create example.php
Browse files Browse the repository at this point in the history
  • Loading branch information
MeganPie authored Oct 18, 2017
1 parent 091f41d commit 8b84259
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions ExampleModule/pages/example.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?php
/*
* Made by MeganPie :: https://meganpie.github.io
* Based off the Web Server Stats Module, created by Samerton.
*
* AdminCP page
*/
// Can the user view the AdminCP?
if($user->isLoggedIn()){
if(!$user->canViewACP()){
// No
Redirect::to(URL::build('/'));
die();
} else {
// Check the user has re-authenticated
if(!$user->isAdmLoggedIn()){
// They haven't, do so now
Redirect::to(URL::build('/admin/auth'));
die();
}
}
} else {
// Not logged in
Redirect::to(URL::build('/login'));
die();
}


$page = 'admin';
$admin_page = 'server';
?>
<!DOCTYPE html>
<html>
<head>
<!-- Standard Meta -->
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">

<?php
$title = $language->get('admin', 'admin_cp');
require('core/templates/admin_header.php');
?>

</head>
<body>
<?php require('modules/Core/pages/admin/navbar.php'); ?>
<div class="container">
<div class="row">
<div class="col-md-3">
<?php require('modules/Core/pages/admin/sidebar.php'); ?>
</div>
<div class="col-md-9">
<div class="card">
<div class="card-block">
<h3><?php echo $ss_language->get('language', 'example_module'); ?></h3>

<hr/>

<p>This is the example module AdminCP Page! Feel free to use this as your base for your modules configs!!</p>

</div></div></div></div></div>

<?php require('modules/Core/pages/admin/footer.php'); ?>

<?php require('modules/Core/pages/admin/scripts.php'); ?>

</body>
</html>

0 comments on commit 8b84259

Please sign in to comment.