2010-11-04 15:07:40 +08:00
|
|
|
<?php
|
2010-11-07 12:05:16 +08:00
|
|
|
function getEventPathSafe($event)
|
|
|
|
{
|
|
|
|
if (strcmp(ZM_VERSION, "1.24.3") == 0) {
|
|
|
|
$ret = ZM_DIR_EVENTS."/".getEventPath($event);
|
|
|
|
} else {
|
|
|
|
$ret = getEventPath($event);
|
|
|
|
}
|
|
|
|
return $ret;
|
|
|
|
}
|
2010-11-06 07:41:09 +08:00
|
|
|
function getset($varname, $defval)
|
|
|
|
{
|
|
|
|
if (isset($_GET[$varname])) return $_GET[$varname];
|
|
|
|
return $defval;
|
|
|
|
}
|
2010-11-04 15:07:40 +08:00
|
|
|
function xml_header()
|
|
|
|
{
|
|
|
|
header ("content-type: text/xml");
|
|
|
|
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
|
|
|
|
}
|
|
|
|
function xml_tag_val($tag, $val)
|
|
|
|
{
|
|
|
|
echo "<".$tag.">".$val."</".$tag.">";
|
|
|
|
//echo "<".$tag.">".$val."</".$tag."><br>";
|
|
|
|
}
|
|
|
|
function xml_tag_sec($tag, $open)
|
|
|
|
{
|
|
|
|
if ($open) $tok = "<";
|
|
|
|
else $tok = "</";
|
|
|
|
echo $tok.$tag.">";
|
|
|
|
}
|
2010-11-05 03:25:34 +08:00
|
|
|
function xhtmlHeaders( $file, $title )
|
|
|
|
{
|
|
|
|
?>
|
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
|
<head>
|
|
|
|
<style type="text/css">
|
|
|
|
body {
|
|
|
|
border: 0px solid;
|
|
|
|
margin: 0px;
|
|
|
|
padding: 0px;
|
|
|
|
}
|
|
|
|
</style>
|
2010-11-06 00:48:57 +08:00
|
|
|
<script type="text/javascript">
|
|
|
|
function ajax(str) {
|
|
|
|
var xmlhttp;
|
|
|
|
if (window.XMLHttpRequest) {
|
|
|
|
xmlhttp = new XMLHttpRequest();
|
|
|
|
} else if (window.ActiveXObject) {
|
|
|
|
xmlhttp = new ActiveXObject("Microsoft.XMLHttp");
|
|
|
|
} else {
|
|
|
|
}
|
|
|
|
if (xmlhttp == null) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
var url = str;
|
|
|
|
xmlhttp.onreadystatechange=function() {
|
|
|
|
if (xmlhttp.readyState == 4 || xmlhttp.readyState == "complete") {
|
|
|
|
alert('done');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
alert('sending url ' + str);
|
|
|
|
xmlhttp.open("GET", str, true);
|
|
|
|
xmlhttp.send(null);
|
|
|
|
}
|
|
|
|
</script>
|
2010-11-05 03:25:34 +08:00
|
|
|
</head>
|
|
|
|
<?php
|
|
|
|
}
|
2010-11-04 15:07:40 +08:00
|
|
|
?>
|