private function postContactInfo(\Request $request) { $values = $request->getVars(); Factory::post(Factory::load(), $values['vars']); $response = new \Http\SeeOtherResponse(\Server::getCurrentUrl(false)); return $response; }
/** * * @staticvar int $default_id Helps in the creation of form ids if none is set */ public function __construct() { parent::__construct('form'); $this->action = \Server::getCurrentUrl(); static $default_id = 1; $this->setId('form-' . $default_id); $default_id++; $this->addClass('phpws-form'); }
/** * Trying to find out why Users changes authentication script. If cause * is found, this will be removed. */ public static function trackAuthentication($message) { $url = \Server::getCurrentUrl(false, false); $request = \Server::getCurrentRequest(); if ($request->isPost()) { $type = 'POST'; } else { $type = 'GET'; } $vars = $request->getVars(); if (empty($vars)) { $variables = 'No variables'; } else { foreach ($vars['vars'] as $k => $v) { if (is_array($v)) { $v = serialize($v); } $varlist[] = "{$k}: {$v}"; } $variables = implode("\n", $varlist); } $content = <<<EOF MESSAGE: {$message} REQUEST TYPE: {$type} VARIABLES: {$variables} ---- EOF; \PHPWS_Core::log($content, 'default_authorization.log'); }