1 | <!DOCTYPE HTML> |
||
2 | <!-- |
||
3 | Phantom by HTML5 UP |
||
4 | html5up.net | @ajlkn |
||
5 | Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) |
||
6 | --> |
||
7 | <html> |
||
8 | <?php Core\Viewer::file('../layouts/head', $data = ['title' => 'StupidlySimple PHP | Home']); ?> |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
9 | <body> |
||
10 | <!-- Wrapper --> |
||
11 | <div id="wrapper"> |
||
12 | |||
13 | <?php Viewer::file('layouts/top', $top_data = ['is_admin' => true]); ?> |
||
0 ignored issues
–
show
The type
Viewer was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
14 | |||
15 | <?php Viewer::file('layouts/menu') ?> |
||
16 | |||
17 | <!-- Main --> |
||
18 | <div id="main"> |
||
19 | <div class="inner"> |
||
20 | <div class="contents"> |
||
21 | <h1>Welcome to the Admin Area</h1> |
||
22 | <p>A very fresh start for the MVC framework with some basic CRUD functions</p> |
||
23 | |||
24 | <?php |
||
25 | if (Core\Request::get('delete') === 'success') { |
||
26 | echo '<p class="alert alert-success">User successfully deleted</p>'; |
||
27 | } elseif (Core\Request::get('edit') === 'success') { |
||
28 | echo '<p class="alert alert-success">User successfully updated</p>'; |
||
29 | } elseif (Core\Request::get('delete') === 'failed') { |
||
30 | echo '<p class="alert alert-danger">Failed to delete</p>'; |
||
31 | } elseif (Core\Request::get('edit') === 'failed') { |
||
32 | echo '<p class="alert alert-danger">Failed to update</p>'; |
||
33 | } |
||
34 | |||
35 | ?> |
||
36 | |||
37 | <ul class="nav nav-tabs" style="margin-top: 20px"> |
||
38 | <li class="active"><a data-toggle="tab" href="#Users">Users</a></li> |
||
39 | <li><a data-toggle="tab" href="#home">Profile</a></li> |
||
40 | </ul> |
||
41 | |||
42 | <div class="tab-content"> |
||
43 | <div id="Users" class="tab-pane fade in active"> |
||
44 | <div style="max-width:600px; padding: 10px;"> |
||
45 | <table class="table table-striped"> |
||
46 | <thead> |
||
47 | <tr> |
||
48 | <th>Firstname</th> |
||
49 | <th>Lastname</th> |
||
50 | <th>Username/Email</th> |
||
51 | <th>Actions</th> |
||
52 | </tr> |
||
53 | </thead> |
||
54 | <tbody> |
||
55 | <?php |
||
56 | foreach ($service->test->getRegisteredUsers() as $user) { |
||
57 | echo '<tr>'; |
||
58 | echo '<td>'.$user->first_name.'</td>'; |
||
59 | echo '<td>'.$user->last_name.'</td>'; |
||
60 | echo '<td>'.$user->email.'</td>'; |
||
61 | echo '<td><a onclick="return confirm(\'Are you sure?\');" href="deleteuser?id='.$user->id.'" class="btn btn-danger">Delete</a></td>'; |
||
62 | echo '</tr>'; |
||
63 | } |
||
64 | ?> |
||
65 | </tbody> |
||
66 | </table> |
||
67 | </div> |
||
68 | </div> |
||
69 | <div id="home" class="tab-pane fade"> |
||
70 | <div style="max-width:600px; padding: 50px 10px;"> |
||
71 | <form method="POST" action="updateuser"> |
||
72 | <input type="hidden" name="id" value="<?= Sentry::getUser()->id; ?>"> |
||
0 ignored issues
–
show
The type
Sentry was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
73 | <div class="form-group"> |
||
74 | First Name: <input type="text" name="first_name" value="<?= Sentry::getUser()->first_name; ?>" class="input-sm"> |
||
75 | </div> |
||
76 | <div class="form-group"> |
||
77 | Last Name: <input type="text" name="last_name" value="<?= Sentry::getUser()->last_name; ?>" class="input-sm"> |
||
78 | </div> |
||
79 | <div class="form-group"> |
||
80 | Email: <input type="text" name="email" value="<?= Sentry::getUser()->email; ?>" class="input-sm"> |
||
81 | </div> |
||
82 | <div class="form-group"> |
||
83 | Password: <input name="password" type="password" class="input-sm"> |
||
84 | </div> |
||
85 | <div class="form-group"> |
||
86 | <button class="button special">Change details</button> |
||
87 | <input class="button " value="Reset" type="reset"> |
||
88 | </div> |
||
89 | </form> |
||
90 | </div> |
||
91 | </div> |
||
92 | </div> |
||
93 | </div> |
||
94 | </div> |
||
95 | </div> |
||
96 | |||
97 | <?php Viewer::file('layouts/footer') ?> |
||
98 | |||
99 | </div> |
||
100 | |||
101 | <?php Viewer::file('layouts/scripts') ?> |
||
102 | </body> |
||
103 | </html> |