Пример #1
0
    $str = "";
    foreach ($_GET as $key => $value) {
        if ($key == "nick" || $key == "ip" || $key == "type" || $key == "score" || $key == "flag") {
            $str = $str . $value;
        }
    }
    if (strcmp(md5($str), $_GET['key']) != 0) {
        die('HACK!!!');
    }
}
checkGETkey();
switch ($type) {
    case 'IS_AVAILABLE':
        $data['available'] = isAvailable();
        break;
    case 'INSERT':
        if (isAvailable()) {
            insert();
        } else {
            update();
        }
        break;
    case 'LIST_BEST':
        listBest();
        break;
    case 'LIST_LAST':
        listLast();
        break;
}
print $_GET['callback'] . '(' . json_encode($data) . ')';
mysql_close();
Пример #2
0
 public function getName()
 {
     return listLast($this->path, "/");
 }