public function request($arg) { $this->cache = false; if (!tguard::post()) { return; } $antispam = isset($_POST['antispam']) ? $_POST['antispam'] : ''; if (!$this->checkspam($antispam)) { return 403; } $password = isset($_POST['password']) ? trim($_POST['password']) : ''; if ($password == '') { return; } if (!isset($this->perm)) { $idperm = isset($_GET['idperm']) ? (int) $_GET['idperm'] : 0; $perms = tperms::i(); if (!$perms->itemexists($idperm)) { return 403; } $this->perm = tperm::i($idperm); } $backurl = isset($_GET['backurl']) ? $_GET['backurl'] : ''; if ($this->perm->checkpassword($password)) { if ($backurl != '') { litepublisher::$urlmap->redir($backurl); } } else { $this->formresult = $this->invalidpassword; } }
public function request($arg) { $this->cache = false; tlocal::usefile('admin'); $this->formresult = ''; if (tguard::post()) { $this->formresult = $this->processform(); } }
public function request($arg) { if (litepublisher::$options->commentsdisabled) { return 404; } if ('POST' != $_SERVER['REQUEST_METHOD']) { return "<?php\n header('HTTP/1.1 405 Method Not Allowed', true, 405);\n header('Allow: POST');\n header('Content-Type: text/plain');\n ?>"; } tguard::post(); return $this->dorequest($_POST); }
public function getargs() { if (isset($_GET['method'])) { return $_GET; } if (isset($_POST['method'])) { tguard::post(); return $_POST; } if (isset($_POST['json'])) { tguard::post(); if (($s = trim($_POST['json'])) && ($args = json_decode($s, true))) { if (isset($args['method'])) { return $args; } } } if ($args = $this->get_json_args()) { if (isset($args['method'])) { return $args; } } return false; }
protected function doprocessform() { if (tguard::post()) { litepublisher::$urlmap->clearcache(); } return parent::doprocessform(); }
protected function doprocessform() { if (tguard::post()) { $this->formresult .= $this->processform(); } }