checkpassword(); $_SESSION['logged'] = 'Y'; pj_session_regenerate_id(); mainpage(); } elseif ($action == 'save') { checklogin(); savelink(); } elseif ($action == 'edit') { checklogin(); editlink(); } elseif ($action == 'backup') { checklogin(); sendbackup(); } elseif ($action == 'remove') { checklogin(); removelink(); } elseif ($action == 'reset') { checklogin(); resetlink(); } elseif ($action == 'add') { checklogin(); add(); } elseif ($action == 'restore') { checklogin(); restore(); } elseif ($action == 'logout') { logout(); } else { login(); } exit;
mainpage(); } else { login(); } } else { $action = htmlspecialchars($_REQUEST['action']); } /* Do the action that is set in $action variable */ if ($action == "login") { checkpassword(); $_SESSION['logged'] = "Y"; mainpage("welcome"); } elseif ($action == "remove") { checklogin(); $id = checkid(); removelink($id); } elseif ($action == "reset") { checklogin(); $id = checkid(); resetlink($id); } elseif ($action == "add") { checklogin(); $url = checkurl($_POST['url']); add($url); } elseif ($action == "restore") { checklogin(); restore(); } elseif ($action == "logout") { logout(); } else { login();