atari-legend /
legacy
| 1 | <?php |
||
| 2 | /*************************************************************************** |
||
| 3 | * admin.php |
||
| 4 | * -------------------------- |
||
| 5 | * copyright : (C) 2015 Atari Legend |
||
| 6 | * email : [email protected] |
||
| 7 | * |
||
| 8 | * |
||
| 9 | ***************************************************************************/ |
||
| 10 | |||
| 11 | //Include this file if you want a page to require admin permission level |
||
| 12 | //Needs to be included after common.php is included. |
||
| 13 | |||
| 14 | //this include is a shortcut. I wanted to visitors also to be able to do bugreports at cpanel level. |
||
| 15 | //But I did not want to include this file in every single page, so I placed the include here. |
||
| 16 | include("../../common/tiles/tile_bug_report.php"); |
||
| 17 | |||
| 18 | // This is the actual authorization check |
||
| 19 | |||
| 20 | // We allow scripts running on the command line to run so that we can run the |
||
| 21 | // DB upgrade script when we auto-deploy on DEV |
||
| 22 | if (php_sapi_name() !== "cli" && login_check($mysqli) == false) { |
||
|
0 ignored issues
–
show
|
|||
| 23 | $_SESSION['edit_message'] = "Please log in to use this functionality"; |
||
| 24 | header('Location:../../main/front/front.php'); |
||
| 25 | } |
||
| 26 |
When comparing two booleans, it is generally considered safer to use the strict comparison operator.