blob: 387c5eb45684a136caf4c6dbc161a7190312a3ac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
<?php
// This file will act as a APIish thing
// Include core file
require_once('core.php');
if(isset($_GET['do'])){
$butt = $_GET['do'];
switch($butt){
case "login":
login($_POST['email'], $_POST['pass']);
break;
case "register":
register($_POST['email'], $_POST['pass']);
break;
case "cp":
header('Location: ../panel');
break;
case "search":
search($_GET['q']);
break;
case "delete":
delete($_GET['f'], $_GET['delid']);
break;
case "logout":
session_unset();
session_destroy();
session_write_close();
header('Location: ../login');
break;
default: echo "We could call this a 404 not found... Or what are you doing here?";
}
}
?>
|