public static function act_page($data = []) {
if (isset($_GET['act'])) {
switch ($_GET['act']) {
foreach($data as $key => $value) {
case $key:
self::$path .= '/act/'.$key;
self::display_page($value['title']);
exit;
break;
}
default:
self::display_error(404);
break;
}
}
return null;
}
public static function act_page($data, $key) {
if ($key && isset($data[$key])) {
self::$path .= '/act/'.$key;
self::display_page($data[$key]['title']);
} else {
self::display_error(404);
}
}