1 ===== Sparse documentation about Brisk. =====
3 ==== Form Workflow ====
9 spush::garbage_manager()
13 brisk->users_cleanup() to reset all users with the_end set
15 ==== brisk/table/user relationships ====
17 === points management ===
30 bri->user[user_idx] = user
32 user->idx_orig = user_idx
35 table->player[player_idx] = user_idx
36 user->table_pos = player_idx
40 bin5->user[user_idx] = user
41 table->player[player_idx] = user_idx
42 user->table_pos = player_idx
45 Many things aren't documented at all, but I start with authentication workflow.
47 ==== MODIFY USERS TABLE ====
51 web/Obj/dbase_base.phh
52 function LoginDBItem -> args & body
53 function LoginDBItemFromRecord -> args & body
56 sql/sql.d/nnn-name-patch.sql
59 AUTHENTICATION WORKFLOW
63 onsubmit="return j_login_manager(this);" ->
64 sync xhr(index_wr.php?mesg=getchallenge&cli_name=<username>)
67 GET index_wr.php send the string: "1|<tokens>"
70 POST index.php with passid_private field equal to calcMD5(tokens[1]+calcMD5(form.elements['passid'].value))
71 add_user -> validate_name, login_verify
74 ===== Game Lifecycle =====
76 -> bin5/index_wr.php + argz[0] == 'logout'
77 - bri->table_wakeup($user)
78 - set users subst to "shutdowner" and "shutdowned"
79 - save this: "gst.st_loc++; the_end=true; window.onbeforeunload = null; \
80 window.onunload = null; document.location.assign("../index.php");"
81 in user->comm var for client xhr
82 - set $bri->the_end = TRUE
85 -> index.php (after verify session value: ~L250)
86 - garbage_manager(TRUE)
87 - align many status var with briskin5 user values
93 $ret = $user->maincheck($old_stat, $old_subst, $old_step, $this->rd_stat, $this->rd_subst, $this->rd_step,
94 $splashdate, $table_idx, $table_token))
95 $user->rd_transp->chunk($this->rd_scristp++, $ret);
98 ===== New users workflow =====
101 -------------------------------------------------------------------------
109 -------------------------------------------------------------------------
122 -------------------------------------------------------------------------
131 -------------------------------------------------------------------------
134 -------------------------------------------------------------------------