define('LEGAL_PATH', "/tmp/legal_brisk");
define('PROXY_PATH', "/var/lib/brisk_proxy");
define('TABLES_N', 36);
+define('TABLES_APPR_N', 12);
define('TABLES_AUTH_N', 8);
define('TABLES_CERT_N', 4);
define('PLAYERS_N', 3);
}
define('TABLE_AUTH_TY_PUBL', 0);
-define('TABLE_AUTH_TY_AUTH', 1);
-define('TABLE_AUTH_TY_CERT', 2);
+define('TABLE_AUTH_TY_APPR', 1);
+define('TABLE_AUTH_TY_AUTH', 2);
+define('TABLE_AUTH_TY_CERT', 3);
class Table {
$thiz->auth_type = TABLE_AUTH_TY_CERT;
else if ($idx < TABLES_AUTH_N)
$thiz->auth_type = TABLE_AUTH_TY_AUTH;
+ else if ($idx < TABLES_APPR_N)
+ $thiz->auth_type = TABLE_AUTH_TY_APPR;
else
$thiz->auth_type = TABLE_AUTH_TY_PUBL;
else
$act = 'reserved';
break;
+ case TABLE_AUTH_TY_APPR:
+ if ($user->is_auth())
+ $act = "sitappr";
+ else
+ $act = 'reserved';
+ break;
default:
$act = 'sit';
break;
$user_code = -1;
$ret = 0;
-
do {
if (($json = json_decode($json_s)) == FALSE) {
$ret = 1;
break;
}
- if (($user_item = $bdb->usersnet_save($user->code, $json)) == FALSE) {
- $ret = 4;
+ if (($user_item = $bdb->usersnet_save($user->code, $json)) != 0) {
+ $ret = 4000 + $user_item;
break;
}
- return (TRUE);
} while(0);
- return (FALSE);
+
+ return ($ret);
}
function room_outstandup($user)
else if (strncmp($msg, "/info ", 6) == 0) {
$info_user = substr($msg, 6);
- error_log("here [" . $info_user."][".escsql(urldecode($info_user)). "]");
echo $this->info_show($user, urldecode($info_user), $dt);
}
else if (strncmp($msg, "/st ", 4) == 0) {