Files
zoneminder/web/skins/xml/includes/functions.php
jaidhar d6575d90e1 XML Plugin: Split off actions from console.php into it's own file, actions.php
- Fixed bug where authentication wasn't being handled properly



git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@3175 e3e1d417-86f3-4887-817a-d78f3d33393f
2010-11-05 16:48:57 +00:00

59 lines
1.2 KiB
PHP

<?php
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 "&lt;".$tag."&gt;".$val."&lt;/".$tag."&gt<br>";
}
function xml_tag_sec($tag, $open)
{
if ($open) $tok = "<";
else $tok = "</";
echo $tok.$tag.">";
}
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>
<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>
</head>
<?php
}
?>