+ else if ($argz[0] == 'tosmgr') {
+ // check IF is authnticated user, both terms of service versions matches
+ if ($user->flags & USER_FLAG_AUTH && count($argz) == 5) {
+ $f_type = $argz[1]; $f_code = $argz[2];
+ $f_tos_curr = $argz[3]; $f_tos_vers = $argz[4];
+
+ if ("$f_tos_curr" == $user->rec->tos_vers_get() &&
+ "$f_tos_vers" == "$G_tos_vers") {
+ if ("$f_type" == "soft" || "$f_type" == "hard") {
+ $res = 100;
+ switch ($f_code) {
+ case LICMGR_CHO_ACCEPT:
+ $user->rec->tos_vers_set($G_tos_vers);
+ $res = $user->tos_store();
+ break;
+ case LICMGR_CHO_REFUSE:
+ $user->flags_set(USER_FLAG_TY_DISABLE, USER_FLAG_TY_ALL);
+ $user->rec->disa_reas_set(USER_DIS_REA_LICENCE);
+ $res = $user->state_store();
+
+ $user->comm[$user->step % COMM_N] = $user->blocking_error(TRUE);
+ $user->the_end = TRUE;
+ $user->step_inc();
+ break;
+ }
+ }
+ }
+ }
+ }