public function editProcess($actionurl = false) { global $callbackId; if (PPostHandler::isHandling()) { $vars =& PPostHandler::getVars(); if ($vars) { // Populate the _REQUEST array with the Post-Vars, so the wiki can use them :-/ foreach ($vars as $key => $value) { $_REQUEST[$key] = $value; } } $url = $this->parseRequest(); $this->no_output = true; ob_start(); $this->getWiki($url); ob_end_clean(); PPostHandler::clearVars(); $url = str_replace('edit/', '', $url); if ($actionurl) { header('Location: ' . PVars::getObj('env')->baseuri . $actionurl); PPHP::PExit(); } header('Location: ' . PVars::getObj('env')->baseuri . 'wiki/' . $url); PPHP::PExit(); //return PVars::getObj('env')->baseuri.'wiki'; } else { $callbackId = PFunctions::hex2base64(sha1(__METHOD__)); PPostHandler::setCallback($callbackId, __CLASS__, __FUNCTION__); return $callbackId; } }
/** * */ public function activitylogs($level) { $callbackId = PFunctions::hex2base64(sha1(__METHOD__)); if (PPostHandler::isHandling()) { $vars =& PPostHandler::getVars(); } else { $vars = $this->_gainGetParams(); } $result = $this->_model->procActivitylogs($vars, $level); $tData = current($result); $totalNumber = key($result); PPostHandler::setCallback($callbackId, __CLASS__, __FUNCTION__); require 'templates/activitylogs.php'; }
/** * Processing registration * * This is a POST callback function * * @see /htdocs/bw/signup.php * @param void */ public function registerProcess() { $c = PFunctions::hex2base64(sha1(__METHOD__)); if (PPostHandler::isHandling()) { $vars =& PPostHandler::getVars(); $errors = $this->checkRegistrationForm($vars); if (count($errors) > 0) { $vars['errors'] = $errors; return false; } $this->polishFormValues($vars); $idTB = $this->registerTBMember($vars); if (!$idTB) { MOD_log::get()->write("TB registration failed", "Signup"); return false; } $id = $this->registerBWMember($vars); $_SESSION['IdMember'] = $id; $vars['feedback'] .= $this->takeCareForNonUniqueEmailAddress($vars['email']); $vars['feedback'] .= $this->takeCareForComputerUsedByBWMember(); $this->writeFeedback($vars['feedback']); if (!empty($vars['feedback'])) { MOD_log::get()->write("feedback[<b>" . stripslashes($vars['feedback']) . "</b>] IdMember=#" . $_SESSION['IdMember'] . " (With New Signup !)", "Signup"); } $View = new SignupView($this); // TODO: BW 2007-08-19: $_SYSHCVOL['EmailDomainName'] define('DOMAIN_MESSAGE_ID', 'bewelcome.org'); // TODO: config $View->registerMail($vars, $id, $idTB); $View->signupTeamMail($vars); // PPostHandler::clearVars(); return PVars::getObj('env')->baseuri . 'signup/register/finish'; } else { PPostHandler::setCallback($c, __CLASS__, __FUNCTION__); return $c; } }
public function groupChangeProcess() { $callbackId = PFunctions::hex2base64(sha1(__METHOD__)); if (PPostHandler::isHandling()) { if (!($User = APP_User::login())) { throw new PException('Access should not have been possible'); } if ($User->hasRight('groupchange@user')) { $vars =& PPostHandler::getVars(); $query = sprintf("UPDATE `user` SET `auth_id` = '%d' WHERE `id` = '%d'", $vars['newgroup'], $vars['userid']); $this->dao->query($query); } else { throw new PException('Access should not have been possible'); } } else { PPostHandler::setCallback($callbackId, __CLASS__, __FUNCTION__); return $callbackId; } }
/** * Handles the post request of the forums search box */ public function searchProcess() { $callbackId = PFunctions::hex2base64(sha1(__METHOD__)); if (PPostHandler::isHandling()) { $this->parseRequest(); return $this->_model->searchProcess(); } else { PPostHandler::setCallback($callbackId, __CLASS__, __METHOD__); return $callbackId; } }
/** * A tiny wee quicksearch box */ protected function quicksearch() { $words = $this->getWords(); $logged_in = APP_User::isBWLoggedIn('NeedMore,Pending'); if (!$logged_in) { $request = PRequest::get()->request; if (!isset($request[0])) { $login_url = 'login'; } else { switch ($request[0]) { case 'login': case 'main': case 'start': $login_url = 'login'; break; default: $login_url = 'login/' . htmlspecialchars(implode('/', $request), ENT_QUOTES); } } } else { $username = isset($_SESSION['Username']) ? $_SESSION['Username'] : ''; } if (class_exists('MOD_online')) { $who_is_online_count = MOD_online::get()->howManyMembersOnline(); } else { // echo 'MOD_online not active'; if (isset($_SESSION['WhoIsOnlineCount'])) { $who_is_online_count = $_SESSION['WhoIsOnlineCount']; // MOD_whoisonline::get()->whoIsOnlineCount(); } else { $who_is_online_count = 0; } } PPostHandler::setCallback('quicksearch_callbackId', 'SearchmembersController', 'index'); require TEMPLATE_DIR . 'shared/roxpage/quicksearch.php'; }
public function editProcess() { $callbackId = PFunctions::hex2base64(sha1(__METHOD__)); if (PPostHandler::isHandling()) { return $this->_model->editProcess($callbackId); } else { PPostHandler::setCallback($callbackId, __CLASS__, __METHOD__); return $callbackId; } }
<div id="teaser" class="clearfix"> <h1><?php echo $words->getFormatted('quicksearchTitle'); ?> </h1> <div> <div id="searchteaser" style="width: 40%" class="float_left"> <fieldset id="searchtop" name="searchtop"> <strong class="small"><?php echo $words->getFormatted('FindPeopleEnterSomething'); ?> </strong><br /> <form action="searchmembers/quicksearch" method="get"> <input type="text" name="searchtext" size="25" maxlength="30" id="text-field" value="Search...." onfocus="this.value='';"/> <?php PPostHandler::setCallback('quicksearch_callbackId', 'SearchmembersController', 'index'); ?> <input type="hidden" name="quicksearch_callbackId" value="1"/> <input type="submit" value="<?php echo $words->getBuffered('FindPeopleSubmitSearch'); ?> " id="submit-button" class="button" /> </form> </fieldset> </div> <div id="searchteaser2" style="width: 40%" class="float_left"> <p><a href="searchmembers/mapon"><?php echo $words->getFormatted('TryMapSearch'); ?> !</a></p>
/** * Processing creation of a comment * * This is a POST callback function. * * Sets following errors in POST vars: * title - invalid(empty) title. * textlen - too short or long text. * inserror - db error while inserting. */ public function shoutProcess($table = false, $table_id = false) { $callbackId = PFunctions::hex2base64(sha1(__METHOD__)); if (PPostHandler::isHandling()) { if (!$_SESSION['IdMember']) { return false; } $vars =& PPostHandler::getVars(); $request = PRequest::get()->request; if (!$table) { $table = $vars['table']; } if (!$table_id) { $table_id = $vars['table_id']; } // validate if (!isset($vars['ctxt']) || strlen($vars['ctxt']) == 0 || strlen($vars['ctxt']) > 5000) { $vars['errors'] = array('textlen'); return false; } $shoutId = $this->dao->nextId('shouts'); $query = ' INSERT INTO `shouts` SET `id`=' . $shoutId . ', `table`=\'' . $table . '\', `table_id`=\'' . $table_id . '\', `member_id_foreign`=' . $_SESSION['IdMember'] . ', `title`=\'' . (isset($vars['ctit']) ? $this->dao->escape($vars['ctit']) : '') . '\', `text`=\'' . $this->dao->escape($vars['ctxt']) . '\', `created`=NOW()'; $s = $this->dao->query($query); if (!$s) { $vars['errors'] = array('inserror'); return false; } PPostHandler::clearVars(); return PVars::getObj('env')->baseuri . implode('/', $request) . '#c' . $shoutId; } else { PPostHandler::setCallback($callbackId, __CLASS__, __FUNCTION__); return $callbackId; } }
public function uploadProcess() { $callbackId = PFunctions::hex2base64(sha1(__METHOD__)); $vars =& PPostHandler::getVars($callbackId); if (PPostHandler::isHandling()) { $this->_model->uploadProcess($vars); } else { PPostHandler::setCallback($callbackId, __CLASS__, __FUNCTION__); return $callbackId; } }
<input type="hidden" name="mapsearch" id="mapsearch" value="0" /> <input type="hidden" name="bounds_zoom" id="bounds_zoom" /> <input type="hidden" name="bounds_center_lat" id="bounds_center_lat" /> <input type="hidden" name="bounds_center_lng" id="bounds_center_lng" /> <input type="hidden" name="bounds_sw_lat" id="bounds_sw_lat" /> <input type="hidden" name="bounds_ne_lat" id="bounds_ne_lat" /> <input type="hidden" name="bounds_sw_lng" id="bounds_sw_lng" /> <input type="hidden" name="bounds_ne_lng" id="bounds_ne_lng" /> <input type="hidden" name="CityName" id="CityName" /> <input type="hidden" name="CityNameOrg" id="CityNameOrg" /> <input type="hidden" name="accuracy_level" id="accuracy_level" /> <input type="hidden" name="place_coordinates" id="place_coordinates" /> <input type="hidden" name="IdCountry" id="IdCountry" /> <input type="hidden" name="start_rec" id="start_rec" /> <?php PPostHandler::setCallback("searchmembers_callbackId", "SearchmembersController", "index"); ?> <input type="hidden" name="searchmembers_callbackId" value="1" /> <div id="FindPeopleFilter"> <table class="float_left"><tr><td> <strong class="small"><?php echo $words->getFormatted('Username'); ?> </strong><br /> <input type="text" name="Username" id="UsernameField" size="30" maxlength="30" value="" onfocus="getFieldHelp(this.name);" onkeypress="if(chkEnt(this, event)) if(CheckEmpty(getElementById('Address'))) {searchGlobal(0)} else {searchByText(get_val('Address'), 0)};" /> </td><td> <strong class="small"><?php echo $words->getFormatted('TextToFind'); ?> </strong><br /> <input type="text" name="TextToFind" id="TextToFindField" size="30" maxlength="30" value="" onfocus="getFieldHelp(this.name);" onkeypress="if(chkEnt(this, event)) if(CheckEmpty(getElementById('Address'))) {searchGlobal(0)} else {searchByText(get_val('Address'), 0)};" />