diff options
| author | Neku <neku@pomf.se> | 2013-12-15 04:02:11 +0100 |
|---|---|---|
| committer | Neku <neku@pomf.se> | 2013-12-15 04:02:11 +0100 |
| commit | a0544a9b609e0fa96d11ddbbe46c8e22d56ca1cc (patch) | |
| tree | eb266a7ba7fcccf5d487b11b98d3d685e388a159 /moe/api.php | |
| parent | b5fbd3e749fff7621ca2e0d7472a8f2627c2f32e (diff) | |
start of login/admin panel
Diffstat (limited to 'moe/api.php')
| -rw-r--r-- | moe/api.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/moe/api.php b/moe/api.php new file mode 100644 index 0000000..f9313f5 --- /dev/null +++ b/moe/api.php @@ -0,0 +1,28 @@ +<?php +// This file will act as a APIish thing + +// Include core file +require_once('core.php'); + +// Decode incoming json +$in = json_decode($_POST['in']); + +// Perform wanted function +if($in['action']['0']=='register'){ + + // Check if reg is open + if(reg=='1'){ + + // Perform register function with data from json string + register($in['info']['0'], $in['info']['1'], $in['info']['2']); + + }else{ + // Re-direct to closed-reg info page? + $return = array('action' => 'closedreg'); + json_encode($return); + } + +}elseif ($in['action']['0']=='login') { + login($in['info']['0'], $in['info']['1']); +} +?>
\ No newline at end of file |
