Beispiel #1
0
 * 
 * Configuration: you may edit the following section if necessary
 */
$szPHPMapScriptModule = 'php_mapscript.' . PHP_SHLIB_SUFFIX;
$szGDModule = 'php_gd2.' . PHP_SHLIB_SUFFIX;
/*
 * End of configurable items.
 *
 * The remainder of this file just sets up a common environment for server-side
 * scripts.
 */
include dirname(__FILE__) . '/Session.php';
installSessionDirectoryHandler();
/* merge request vars.  $_REQUEST includes cookies in preference to get/post,
 * which we don't like */
$REQUEST_VARS = array_merge($_GET, $_POST);
/* Load mapscript */
if (!extension_loaded('MapScript')) {
    dl($szPHPMapScriptModule);
    if (!extension_loaded('MapScript')) {
        die("Failed to load {$szPHPMapScriptModule}.  Please check configuration settings in " . __FILE__);
    }
}
/* handle restoring a session */
if (isset($REQUEST_VARS['session'])) {
    $sessionID = $REQUEST_VARS['session'];
    initializeSession("session", "", $sessionID);
}
if (isset($REQUEST_VARS['mapname'])) {
    $mapName = $REQUEST_VARS['mapname'];
}
Beispiel #2
0
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 */
/*****************************************************************************
 * Purpose: Create a session
 *****************************************************************************/
/* initialize a session and return the session id to the caller */
include dirname(__FILE__) . '/Common.php';
include '../../../common/php/Utilities.php';
$cookie = isset($_COOKIE['session']) ? $_COOKIE['session'] : "";
initializeSession("session", "", $cookie);
$sessionId = session_id();
loadFusionConfig();
header('Content-type: application/json');
header('X-JSON: true');
$result = null;
$result->sessionId = $sessionId;
$result->userName = '';
$result->acceptLanguage = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
echo var2json($result);
Beispiel #3
0
 * 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
 *
 */
/** CORE APPLICATION CONTROLLER **/
require_once 'bootstrap.php';
//Do additional tasks that are only needed when running the full website
loadModuleActionId();
spl_autoload_register('vufind_autoloader');
initializeSession();
if (isset($_REQUEST['test_role'])) {
    if ($_REQUEST['test_role'] == '') {
        setcookie('test_role', $_REQUEST['test_role'], time() - 1000, '/');
    } else {
        setcookie('test_role', $_REQUEST['test_role'], 0, '/');
    }
}
// Start Interface
$interface = new UInterface();
global $timer;
$timer->logTime('Create interface');
if (isset($configArray['Site']['responsiveLogo'])) {
    $interface->assign('responsiveLogo', $configArray['Site']['responsiveLogo']);
}
if (isset($configArray['Site']['smallLogo'])) {
Beispiel #4
0
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 */
/*****************************************************************************
 * Purpose: Create a session
 *****************************************************************************/
/* initialize a session and return the session id to the caller */
include dirname(__FILE__) . '/Common.php';
include '../../common/php/Utilities.php';
initializeSession("sid", "", "");
$sessionId = session_id();
loadFusionConfig();
header('Content-type: text/x-json');
header('X-JSON: true');
$result = null;
$result->sessionId = $sessionId;
$result->userName = '';
echo var2json($result);