'.$LANG['BADPASS'].''; $log = file_exists(LOG_DIR) ? unserialize(file_get_contents(LOG_DIR)) : array(); if (isset($log[$_SERVER['REMOTE_ADDR']]) === false) { $log[$_SERVER['REMOTE_ADDR']] = array('num' => 0, 'time' => 0); } $log[$_SERVER['REMOTE_ADDR']]['num'] += 1; $log[$_SERVER['REMOTE_ADDR']]['time'] = time(); file_put_contents(LOG_DIR, serialize($log)); } } else $content='

'.$LANG['NOPASS'].'

'; } else if (ACCESS_PRIVATE) switch ($_POST['action']) { case 'allchildren': case 'children': print('{ "id" : "id1", "icon" : "fas fa-atlas", "parent" : "#", "text" : "'.$_SERVER["SERVER_NAME"].'" }'); exit; default: $content=specialurl(":ADMIN",true); } } switch ($_POST['action']) { case 'children': print(json_encode(filesJSON(CONTENT_DIR,false))); exit; case 'allchildren': print(json_encode(filesJSON(CONTENT_DIR,true))); exit; case 'open': $file=urldecode($_POST['file']); if (substr($file,0,1)==":") specialurl($file,true); else { $md=strpos('.md',$file)>=0; print(getcontent($file,$md,true)); exit; } case 'realopen': $file=urldecode($_POST['file']); print(getcontent($file,false,true)); exit; case 'save': $file=urldecode($_POST['file']); print(setcontent($file,$_POST['data'])); exit; case 'search': $results=searchstr(CONTENT_DIR,$_POST['search']); $content=sprintf($LANG['FOUND'],$results['totalFiles']); foreach($results['files'] as $key => $value) $content.='

'.$key.'

'.$value.'

'; if ($_POST['type']=="js") { print($content); exit; } } } else if (ACCESS_PRIVATE && !isset($_SESSION['md_admin'])) { $content=specialurl(":ADMIN",false); } else if (substr($file,0,1)==":") { $content=specialurl($file,false); } else if ($filedetail['extension']=="md") { $content=getcontent($file); } else if ($filedetail['extension']!="" && strpos(ALLOWED_EXT, $filedetail['extension']) !== false) { if (file_exists(CONTENT_DIR . $file)) { header('Content-type: '.mime_content_type(CONTENT_DIR . $file),true); print file_get_contents(CONTENT_DIR . $file, false); exit; } else { http_response_code(404); $content=getcontent("/special/404.md"); } exit; } else { $content=getcontent("/special/404.md"); } ?> <?php echo TITLE." - ".$file; ?> ':''); ?>
Documentations


':''); ?>