mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 14:03:27 +00:00
V 3.5 RC 1
This commit is contained in:
@@ -1,34 +1,42 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2010 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
*/
|
||||
//SPECIAL ZINO
|
||||
ini_set('display_errors','off');
|
||||
ini_set('display_startup_errors','off');
|
||||
ini_set('log_errors','off');
|
||||
ini_set('display_errors', 'off');
|
||||
ini_set('display_startup_errors', 'off');
|
||||
ini_set('log_errors', 'off');
|
||||
//SPECIAL ZINO
|
||||
|
||||
|
||||
$request = httpRequest::getInstance();
|
||||
$request = http_request::getInstance();
|
||||
$parm = $request->get_parms('p', 'ses_id', 'usr_id', 'debug');
|
||||
|
||||
$ses_id = $parm['ses_id'];
|
||||
$usr_id = $parm['usr_id'];
|
||||
|
||||
if(!$parm['debug'])
|
||||
if (!$parm['debug'])
|
||||
{
|
||||
header('Content-Type: text/xml; charset=UTF-8');
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache'); // HTTP/1.0
|
||||
phrasea::headers(200, true, 'text/xml', 'UTF-8', false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
$sxParms = simplexml_load_string($parm['p']);
|
||||
|
||||
|
||||
|
||||
$action = (string)$sxParms['action'];
|
||||
$action = (string) $sxParms['action'];
|
||||
|
||||
$dom = new DOMDocument('1.0', 'UTF-8');
|
||||
$dom->preserveWhiteSpace = false;
|
||||
@@ -38,28 +46,26 @@ $result->setAttribute('action', $action);
|
||||
|
||||
$status = 'OK';
|
||||
|
||||
$f = '_'.mb_strtolower($action).'.php';
|
||||
if(file_exists($f))
|
||||
$f = '_' . mb_strtolower($action) . '.php';
|
||||
if (file_exists($f))
|
||||
{
|
||||
include($f);
|
||||
include($f);
|
||||
}
|
||||
else
|
||||
{
|
||||
err('bad action');
|
||||
err('bad action');
|
||||
}
|
||||
|
||||
$result->appendChild($dom->createElement('status'))->appendChild($dom->createTextNode($status));
|
||||
|
||||
if($parm['debug'])
|
||||
echo('<pre>' . htmlentities($dom->saveXML()) . '</pre>');
|
||||
if ($parm['debug'])
|
||||
echo('<pre>' . htmlentities($dom->saveXML()) . '</pre>');
|
||||
else
|
||||
echo $dom->saveXML();
|
||||
|
||||
echo $dom->saveXML();
|
||||
|
||||
function err($msg)
|
||||
{
|
||||
global $dom, $result, $status;
|
||||
$result->appendChild($dom->createElement('err_msg'))->appendChild($dom->createTextNode($msg));
|
||||
$status = 'ERR';
|
||||
global $dom, $result, $status;
|
||||
$result->appendChild($dom->createElement('err_msg'))->appendChild($dom->createTextNode($msg));
|
||||
$status = 'ERR';
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user