-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.php
More file actions
28 lines (23 loc) · 684 Bytes
/
Copy pathapi.php
File metadata and controls
28 lines (23 loc) · 684 Bytes
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
<?php
require_once("initsession.php");
require_once('config.php');
require_once('initdb.php');
require_once("mods/ext_libs.php");
// die(0) --> error session
// die(1) --> token not defined
// die(10) --> fail to update
// die(100) --> no process made (no token match)
// VALIDASI ======================================
if(count($_SESSION)==0 && !isset($_GET['debug'])) {
die('0');
}
if(isset($_POST['token'])) {
$token = $_POST['token'];
} else {
die('1');
}
// END: VALIDASI =======================================
if($token=='test') {
die('ok');
}
die('100');