1 ===== Sparse documentation about Brisk. =====
4 spush::garbage_manager()
8 brisk->users_cleanup() to reset all users with the_end set
10 ==== brisk/table/user relationships ====
12 === points management ===
25 bri->user[user_idx] = user
27 user->idx_orig = user_idx
30 table->player[player_idx] = user_idx
31 user->table_pos = player_idx
35 bin5->user[user_idx] = user
36 table->player[player_idx] = user_idx
37 user->table_pos = player_idx
40 Many things aren't documented at all, but I start with authentication workflow.
42 ==== MODIFY USERS TABLE ====
46 web/Obj/dbase_base.phh
47 function LoginDBItem -> args & body
48 function LoginDBItemFromRecord -> args & body
51 sql/sql.d/nnn-name-patch.sql
54 AUTHENTICATION WORKFLOW
58 onsubmit="return j_login_manager(this);" ->
59 sync xhr(index_wr.php?mesg=getchallenge&cli_name=<username>)
62 GET index_wr.php send the string: "1|<tokens>"
65 POST index.php with passid_private field equal to calcMD5(tokens[1]+calcMD5(form.elements['passid'].value))
66 add_user -> validate_name, login_verify
69 ===== Game Lifecycle =====
71 -> bin5/index_wr.php + argz[0] == 'logout'
72 - bri->table_wakeup($user)
73 - set users subst to "shutdowner" and "shutdowned"
74 - save this: "gst.st_loc++; the_end=true; window.onbeforeunload = null; \
75 window.onunload = null; document.location.assign("../index.php");"
76 in user->comm var for client xhr
77 - set $bri->the_end = TRUE
80 -> index.php (after verify session value: ~L250)
81 - garbage_manager(TRUE)
82 - align many status var with briskin5 user values
88 $ret = $user->maincheck($old_stat, $old_subst, $old_step, $this->rd_stat, $this->rd_subst, $this->rd_step,
89 $splashdate, $table_idx, $table_token))
90 $user->rd_transp->chunk($this->rd_scristp++, $ret);
93 ===== New users workflow =====
96 -------------------------------------------------------------------------
104 -------------------------------------------------------------------------
117 -------------------------------------------------------------------------
126 -------------------------------------------------------------------------
129 -------------------------------------------------------------------------