function __header__loadJSResources() { global $headerScripts; // Include resources for any JavaScript files, EXCLUDING JavaScript files which // are specified by full URL (look for the '://' protocol-host separator). if (isset($headerScripts) && is_array($headerScripts)) { $hsdr = rtrim(dirname(dirname(__FILE__)), "/\\"); foreach ($headerScripts as $headerScript) { // Skip URIs with protocols; those are (probably) external to this application. if (strpos($headerScript, '://') !== false) { continue; } $fn = strlen($headerScript) > 0 && $headerScript[0] == '/' ? $_SERVER['DOCUMENT_ROOT'] . $headerScript : APP_ROOT_DIR . '/' . $headerScript; loadResourceBundle($hsdr . '/' . ltrim($headerScript, "/\\")); } } }
<?php // Copyright (c) 2011-2016 Ronald B. Cemer // All rights reserved. // This software is released under the BSD license. // Please see the accompanying LICENSE.txt for details. // This file is part of the jaxframework project. if (!class_exists('Validator', false)) { include dirname(__FILE__) . '/Validator.class.php'; } loadResourceBundle(__FILE__); class NotEmptyValidator extends Validator { protected $valueName; public function __construct($params = array()) { parent::__construct($params); $this->valueName = isset($params['valueName']) ? $params['valueName'] : ''; if ($this->valueName == '') { throw new Exception('Missing or empty valueName parameter'); } } public function validate($db, &$row) { $vn = $this->valueName; $val = property_exists($row, $vn) ? $row->{$vn} : ''; if ($this->allowNULL && $val === null) { return ''; } $outOfRange = false; if ($val == '') {
// This file was generated by crudgen. // If you need to customize this file, please edit the corresponding // yaml file in the gencfg directory, and then re-generate this file // by running crudgen, passing in the table name. if (!isset($mainOk) || !$mainOk) { exit; } include dirname(dirname(__FILE__)) . '/jax/include/autoload.include.php'; include dirname(dirname(__FILE__)) . '/include/requireLogin.include.php'; include dirname(dirname(__FILE__)) . '/jax/include/validation.include.php'; include dirname(dirname(__FILE__)) . '/jax/include/l10n.include.php'; loadResourceBundle(dirname(dirname(__FILE__)) . '/jax/resources/system'); loadResourceBundle(dirname(dirname(__FILE__)) . '/resources/system'); loadResourceBundle(dirname(dirname(__FILE__)) . '/jax/resources/crud'); loadResourceBundle(dirname(dirname(__FILE__)) . '/resources/crud'); loadResourceBundle($_SERVER['SCRIPT_FILENAME']); Permissions::inScriptPermissionsCheck($loggedInUser->id, true); $params = FrontController::getRequestParams(); $command = isset($params['command']) ? $params['command'] : ''; if (function_exists('initHook')) { initHook(); } include dirname(dirname(__FILE__)) . '/include/search/acct_search.include.php'; include dirname(dirname(__FILE__)) . '/include/search/acct_load.include.php'; if ($_SERVER['REQUEST_METHOD'] == 'POST') { switch ($command) { case 'saveAcct': $justInsertedRowId = 0; $db = ConnectionFactory::getConnection(); $db->beginTransaction(); $committed = false;