Cheetah
XML.php
Go to the documentation of this file.
1 <?php
2 
8 $sModule = isset($_REQUEST['module']) ? $_REQUEST['module'] : "";
9 $sAction = isset($_REQUEST['action']) ? $_REQUEST['action'] : "";
10 
11 if(($sModule == "mp3" && $sAction == "screenshot")
12 || ($sModule == "board" && $sAction == "transmit")
13 || ($sModule == "games" && $sAction == "makeShot")
14 || ($sModule == "livecam" && $sAction == "channelShot")
15 || ($sModule == "photo" && $sAction == "transmit"))
16 {
17  define('CH_SECURITY_EXCEPTIONS', true);
18  $aChSecurityExceptions = array(
19  'POST.data',
20  'REQUEST.data',
21  );
22 }
23 
24 $sGlobalHeader = "modules/global/inc/header.inc.php";
25 if(!file_exists($sGlobalHeader)){ header("Location:install/index.php"); exit;}
26 
27 require_once('../inc/header.inc.php');
28 require_once($sGlobalHeader);
29 require_once($sIncPath . "constants.inc.php");
30 require_once($sIncPath . "db.inc.php");
31 require_once($sIncPath . "xml.inc.php");
32 require_once($sIncPath . "functions.inc.php");
33 require_once($sIncPath . "apiFunctions.inc.php");
34 require_once($sIncPath . "customFunctions.inc.php");
35 
37 
39 $sContentsType = CONTENTS_TYPE_XML;
40 
41 if($sModule == GLOBAL_MODULE) {
42  require_once($sIncPath . "xmlTemplates.inc.php");
43  require_once($sIncPath . "actions.inc.php");
44 } else {
46  require_once($sModuleIncPath . "header.inc.php");
47  require_once($sModuleIncPath . "constants.inc.php");
48  require_once($sModuleIncPath . "xmlTemplates.inc.php");
49  require_once($sModuleIncPath . "customFunctions.inc.php");
50  require_once($sModuleIncPath . "functions.inc.php");
51  require_once($sModuleIncPath . "actions.inc.php");
52 }
53 
54 switch($sContentsType) {
55  case CONTENTS_TYPE_XML:
56  //--- Print Results in XML Format ---//
57  header("Cache-Control: no-store, no-cache, must-revalidate");
58  header("Cache-Control: post-check=0, pre-check=0", false);
59  header("Pragma: no-cache");
60  header ('Content-Type: application/xml');
61  $sContents = "<?xml version='1.0' encoding='UTF-8'?>" . makeGroup($sContents);
62  break;
63  case CONTENTS_TYPE_SWF:
64  header("Content-Type: application/x-shockwave-flash");
65  break;
66  default:
67  break;
68 }
69 echo $sContents;
header
</code > Be careful enabling this directive if you have a redirector script that does not use the< code > Location</code > HTTP header
Definition: URI.MungeResources.txt:10
$sContentsType
$sContentsType
Definition: XML.php:39
$sIncPath
$sIncPath
Definition: header.inc.php:64
$sModuleIncPath
$sModuleIncPath
Definition: ChWsbCronMp3.php:27
php
$sAction
$sAction
Definition: XML.php:9
$sModulesPath
$sModulesPath
Definition: header.inc.php:53
secureCheckWidgetName
secureCheckWidgetName($sWidget)
Definition: functions.inc.php:8
exit
exit
Definition: cart.php:21
$_REQUEST
$_REQUEST['action']
Definition: cmd.php:11
$sGlobalHeader
if(($sModule=="mp3" && $sAction=="screenshot")||($sModule=="board" && $sAction=="transmit")||($sModule=="games" && $sAction=="makeShot")||($sModule=="livecam" && $sAction=="channelShot")||($sModule=="photo" && $sAction=="transmit")) $sGlobalHeader
Definition: XML.php:24
makeGroup
makeGroup($sXmlContent, $sXmlGroup="ray")
Definition: apiFunctions.inc.php:32
$sModule
$sModule
Definition: XML.php:8
$aChSecurityExceptions
$aChSecurityExceptions
Definition: banners.php:9
$sContents
$sContents
Definition: XML.php:38
empty
Attr AllowedRel this is empty
Definition: Attr.AllowedRel.txt:7