Skip to main content
Code Review

Return to Answer

Commonmark migration
Source Link

I can't say much on the functionality, but I got a small comment on your if-statements:

###Be consistent:

Be consistent:

In your "Function" you have the blocks clearly cut out (linebreak & indention), In your "index.php" they are inlined.

I suggest you always do it like in your "Function":

if(isset($_COOKIE["Cckiuas"]) && isset($_SESSION["loggedin")) {
 if(isset($_GET['page'])) {
 $page = trim(htmlentities($_GET['page']));
 }
 else {
 $page = 'dashboard';
 }
 //includes here
}

That btw. also applies for your usage of single and double quotes. Compare:

isset($_COOKIE["Ccuias"])
isset($_GET['page'])

Decide on one

I can't say much on the functionality, but I got a small comment on your if-statements:

###Be consistent:

In your "Function" you have the blocks clearly cut out (linebreak & indention), In your "index.php" they are inlined.

I suggest you always do it like in your "Function":

if(isset($_COOKIE["Cckiuas"]) && isset($_SESSION["loggedin")) {
 if(isset($_GET['page'])) {
 $page = trim(htmlentities($_GET['page']));
 }
 else {
 $page = 'dashboard';
 }
 //includes here
}

That btw. also applies for your usage of single and double quotes. Compare:

isset($_COOKIE["Ccuias"])
isset($_GET['page'])

Decide on one

I can't say much on the functionality, but I got a small comment on your if-statements:

Be consistent:

In your "Function" you have the blocks clearly cut out (linebreak & indention), In your "index.php" they are inlined.

I suggest you always do it like in your "Function":

if(isset($_COOKIE["Cckiuas"]) && isset($_SESSION["loggedin")) {
 if(isset($_GET['page'])) {
 $page = trim(htmlentities($_GET['page']));
 }
 else {
 $page = 'dashboard';
 }
 //includes here
}

That btw. also applies for your usage of single and double quotes. Compare:

isset($_COOKIE["Ccuias"])
isset($_GET['page'])

Decide on one

Source Link
Vogel612
  • 25.5k
  • 7
  • 59
  • 141

I can't say much on the functionality, but I got a small comment on your if-statements:

###Be consistent:

In your "Function" you have the blocks clearly cut out (linebreak & indention), In your "index.php" they are inlined.

I suggest you always do it like in your "Function":

if(isset($_COOKIE["Cckiuas"]) && isset($_SESSION["loggedin")) {
 if(isset($_GET['page'])) {
 $page = trim(htmlentities($_GET['page']));
 }
 else {
 $page = 'dashboard';
 }
 //includes here
}

That btw. also applies for your usage of single and double quotes. Compare:

isset($_COOKIE["Ccuias"])
isset($_GET['page'])

Decide on one

lang-php

AltStyle によって変換されたページ (->オリジナル) /