var $subst; // substatus for each status
var $step; // step of the current status
var $trans_step; // step to enable transition between pages (disable == -1)
+ var $cl_step; // current step returned by client
var $rd_socket; // socket handle of push stream
var $rd_endtime; // end time for push stream
var $rd_scristp; // current script step (for each session)
var $rd_kalive; // if no message are sent after RD_KEEPALIVE_TOUT secs we send a keepalive from server
var $rd_cache; // place where store failed fwrite data
+ var $rd_toflush; // bool to inform about unfflushed socket
var $rd_zls; // zlibstream object handle if compressed stream, else FALSE
var $rd_transp; // class that define stream encapsulation type (iframe, xhr, ...)
var $rd_is_chunked; // is the transport chunked or not ?
$thiz->subst = $subst;
$thiz->step = 1;
$thiz->trans_step = -1;
+ $thiz->cl_step = -1;
$thiz->comm = array();
$thiz->rd_socket = NULL;
$thiz->rd_scristp = -1;
$thiz->rd_kalive = -1;
$thiz->rd_cache = "";
+ $thiz->td_toflush = FALSE;
$thiz->rd_zls = FALSE;
$thiz->rd_transp = NULL;
$thiz->rd_is_chunked = FALSE;
$this->subst = $from->subst;
$this->step = $from->step;
$this->trans_step = $from->trans_step;
+ $this->cl_step = $from->cl_step;
$this->comm = array();
$i_start = (1 > ($from->step - COMM_N) ? 1 : ($from->step - COMM_N));
$thiz->subst = $from->subst;
$thiz->step = $from->step;
$thiz->trans_step = $from->trans_step;
+ $thiz->cl_step = $from->cl_step;
$thiz->comm = array();
/*
// 4 -> is certified
// 2 -> is authorized
// 1 -> is myself
- $class_id = (($this->flags & USER_FLAG_TY_CERT) >> 16) | ($this->flags & USER_FLAG_AUTH) | 1;
-
- return (sprintf('$("myname").innerHTML = "<span class=\"au%d\">%s</span>";', $class_id,
+ $class_ids = (($this->flags & USER_FLAG_TY_CERT) >> 16) | ($this->flags & USER_FLAG_AUTH) | 1;
+ $sp = "";
+ $cl = "";
+
+ for ($i = 0 ; $i < 3 ; $i++) {
+ if ($class_ids & (1 << $i)) {
+ $cl .= sprintf("%sau%d", $sp, $i);
+ $sp = " ";
+ }
+ }
+ return (sprintf('$("myname").innerHTML = "<span class=\"%s\">%s</span>";', $cl,
xcape($this->name,ENT_COMPAT,"UTF-8")));
}
$ret = FALSE;
$curtime = time();
-
+
/* Nothing changed, return. */
if ($this->rd_step == $this->step)
return (FALSE);
log_rd2("LOGOUT BYE BYE!!");
log_auth($this->sess, "Explicit logout.");
- if ($this->the_end == TRUE) {
- $this->reset();
-
- if ($this->subst == 'sitdown') {
- log_load("ROOM WAKEUP");
- $this->room->room_wakeup($this);
- }
- else if ($this->subst == 'standup')
- $this->room->room_outstandup($this);
- else
- log_rd2("LOGOUT FROM WHAT ???");
-
- } /* if ($this->the_end == TRUE) { ... */
+ $this->reset();
+
+ if ($this->subst == 'sitdown') {
+ log_load("ROOM WAKEUP");
+ $this->room->room_wakeup($this);
+ }
+ else if ($this->subst == 'standup')
+ $this->room->room_outstandup($this);
+ else
+ log_rd2("LOGOUT FROM WHAT ???");
} /* if ($this->the_end == TRUE) { ... */
} /* if ($this->rd_step < $this->step) { */
} /* else of if ($this->rd_step == -1) { */