function display($var) { if ($var === "logintime") { return lxgettime($this->{$var}); } if ($var === 'logouttime') { if ($this->{$var} !== 'Still Logged') { return lxgettime($this->{$var}); } } return parent::display($var); }
function updateform($subaction, $param) { global $gbl, $sgbl, $login, $ghtml; $vlist['payment_url'] = array('M', $this->getPaymentUrl()); $vlist['month'] = array('M', null); $total = $this->getTotalPaid(); $vlist['paid'] = array('M', $total); $vlist['ddate'] = array('M', lxgettime($this->ddate)); if ($login->isAdmin()) { $vlist['total'] = null; $vlist['text_invoice'] = array('t', null); } else { $vlist['total'] = array('M', "\${$this->total}"); $this->m_text_invoice_f = preg_replace("+(https://[^ \n]*)+", "[b] (Please Use the Link at the Top) [/b] ", $this->text_invoice); $vlist['m_text_invoice_f'] = array('M', $this->m_text_invoice_f); $vlist['__v_button'] = array(); } return $vlist; }
function display($var) { global $gbl, $sgbl, $login, $ghtml; if ($var === "logintime" || $var === "timeout" || $var === 'last_access') { return " " . lxgettime($this->{$var}) . " "; } if ($var === 'current_f') { if ($gbl->c_session->nname === $this->nname) { return 'on'; } return 'dull'; } if ($var === 'ip_address') { if (if_demo()) { return 'Masked in Demo'; } } return parent::display($var); }
function if_not_admin_complain_and_exit() { global $gbl, $sgbl, $login, $ghtml; $progname = $sgbl->__var_program_name; if ($login->isLteAdmin()) { return; } print "You are trying to access Protected Area. This incident will be reported\n <br> "; debugBacktrace(); $message = "At " . lxgettime(time()) . " {$login->nname} tried to Access a region that is prohibited for Normal Users\n. Click here to See what this means. http://lxlabs.com/software/{$progname}/docs/security/unauthorized-access/\n"; send_mail_to_admin("{$progname} Warning: Unauthorized Access by {$login->nname}", $message); exit(0); }
function display($var) { if (csb($var, "__v_priv_used_")) { $v = strfrom($var, "__v_priv_used_"); return " {$this->used->{$v}} / {$this->priv->{$v}}"; } if (csa($var, "_q_")) { $v = strfrom($var, "_q_"); $c = strtil($var, "_q_"); return $this->{$c}->{$v}; } if ($var === "status") { if (!$this->status) { dprint("Status not set for {$this->getClass()}:{$this->nname}"); return "on"; } } /* It is very wrong to play with nname. Instead you shoudl just use some other variable. if ($var === "nname") { if (csa($this->nname, "_s_vv_p_")) { return strfrom($this->nname, "_s_vv_p_"); } else { return $this->nname; } } */ if ($var === "ddate" || $var === 'date_modified') { return " " . lxgettime($this->{$var}) . ""; } if ($var === "validity_time") { if (isset($this->validity_time)) { return $this->validity_time; } else { return lxgettime(time()); } } if ($var == 'parent_name') { return $this->getParentName(); } if ($var === 'parent_name_f') { return $this->getParentName(); } if (cse($var, "_f")) { return null; } if (csb($var, "abutton_")) { return null; } if (isset($this->{$var})) { return $this->{$var}; } else { return NULL; } }
function display($var) { switch ($var) { case "sizeper": return $this->size; case "pvrename": return "rename"; case "pvdownload": return "download"; case "nname": if ($this->base === ".trash") { return "Trash"; } if ($this->nname === '/') { return $this->getParentO()->nname; } if (isset($this->linkto)) { return "{$this->base} -> {$this->linkto}"; } return $this->base; break; case "mode": if ($this->base === ".." || $this->base === ".trash") { return ""; } return $this->getPermissions($dummy); break; case "realsize": case "size": if ($this->size < 1024) { return $this->size . 'B'; } if ($this->size < 1024 * 1024) { return round($this->size / 1024, 0) . "K"; } if ($this->size < 1024 * 1024 * 1024) { return round($this->size / (1024 * 1024), 1) . "M"; } return round($this->size / (1024 * 1024 * 1024), 3) . "G"; case "mtime": return lxgettime($this->mtime); default: return parent::display($var); break; } }
function updateform($subaction, $param) { $vlist['made_by'] = array('M', $this->getParentName('made_by')); $vlist['subject'] = array('M', Htmllib::fix_lt_gt($this->subject)); $vlist['ddate'] = array('M', lxgettime($this->ddate)); if ($this->getParentO()->getClName() === $this->made_by) { $sent = $this->convertClCmToNameCm($this->text_sent_to_cmlist); $vlist['text_sent_to_cmlist'] = array('M', $sent); } else { $sent = $this->getParentO()->nname; } $vlist['text_description'] = array('t', null); if (!$this->isRightParent()) { $vlist['__v_button'] = array(); } return $vlist; }