#Getting selected pages or get default one
Private Static Function Pages($method){
switch($method){
#default [index]
Case "index":
if(!isset($_GET['page'])){
if(!is_dir("./Pages/")){
mkdir("./Pages/");
echo "Creating folder -> Pages, complete. Please, reload the page!";
}
else if(!is_file("./Pages/home.php")){
AiWeb::cFile("./Pages/","home.php","Please edit in folder -> Pages, 'home.php' file");
}
else{
include "./Pages/home.php";
}
}
else{
if(!is_file("./Pages/$_GET[page].php")){
echo "$_GET[page] not exists in folder -> Pages!";
}
else{
include "./Pages/$_GET[page].php";
}
}
break;
#follow the link [follow]
Case "follow":
if(!isset($_GET[page])){
include "./Pages/content.php";
}
else{
include "./Pages/$_GET[page].php";
}
break;
}
}