// | | // | You should have received a copy of the GNU General Public License | // | along with this program; if not, write to the Free Software | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | // | USA. | // +-----------------------------------------------------------------------+ //----------------------------------------------------------- include define('PHPWG_ROOT_PATH', './'); include_once PHPWG_ROOT_PATH . 'include/common.inc.php'; // +-----------------------------------------------------------------------+ // | Check Access and exit when user status is not ok | // +-----------------------------------------------------------------------+ check_status(ACCESS_FREE); //----------------------------------------------------------- user registration if (!$conf['allow_user_registration']) { page_forbidden('User registration closed'); } trigger_notify('loc_begin_register'); if (isset($_POST['submit'])) { if (!verify_ephemeral_key(@$_POST['key'])) { set_status_header(403); $page['errors'][] = l10n('Invalid/expired form key'); } if (empty($_POST['password'])) { $page['errors'][] = l10n('Password is missing. Please enter the password.'); } else { if (empty($_POST['password_conf'])) { $page['errors'][] = l10n('Password confirmation is missing. Please confirm the chosen password.'); } else { if ($_POST['password'] != $_POST['password_conf']) { $page['errors'][] = l10n('The passwords do not match');
// | This program is distributed in the hope that it will be useful, but | // | WITHOUT ANY WARRANTY; without even the implied warranty of | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | // | General Public License for more details. | // | | // | You should have received a copy of the GNU General Public License | // | along with this program; if not, write to the Free Software | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | // | USA. | // +-----------------------------------------------------------------------+ define('PHPWG_ROOT_PATH', './'); define('IN_WS', true); include_once PHPWG_ROOT_PATH . 'include/common.inc.php'; check_status(ACCESS_FREE); if (!$conf['allow_web_services']) { page_forbidden('Web services are disabled'); } include_once PHPWG_ROOT_PATH . 'include/ws_core.inc.php'; add_event_handler('ws_add_methods', 'ws_addDefaultMethods'); add_event_handler('ws_invoke_allowed', 'ws_isInvokeAllowed', EVENT_HANDLER_PRIORITY_NEUTRAL, 3); $requestFormat = 'rest'; $responseFormat = null; if (isset($_GET['format'])) { $responseFormat = $_GET['format']; } if (!isset($responseFormat) and isset($requestFormat)) { $responseFormat = $requestFormat; } $service = new PwgServer(); if (!is_null($requestFormat)) { $handler = null;