예제 #1
0
function Reload_Report($name)
{
    if (!$name) {
        if (isset($_SESSION['webreports'])) {
            return true;
        } else {
            HeaderRedirect("webreport");
        }
    }
    if (postvalue("edit") == "style" && isset($_SESSION['webreports'])) {
        return true;
    }
    $arr = getReportArray($name);
    if (!count($arr)) {
        HeaderRedirect("webreport");
    }
    if (!$arr["table_type"]) {
        if ($arr["db_based"]) {
            $arr["table_type"] = "db";
        } else {
            $arr["table_type"] = "project";
        }
    }
    $_SESSION['webreports'] = $arr;
    $_SESSION["webobject"]["table_type"] = $_SESSION['webreports']["table_type"];
    $_SESSION["webobject"]["name"] = $_SESSION['webreports']['settings']['name'];
}
예제 #2
0
add_nocache_headers();

set_magic_quotes_runtime(0);

include("include/reportfunctions.php");
$strTableName="";

//$conn=db_connect();

$xml_array=array();

$sessPrefix = "";

if (postvalue("rname")) 
{
	$xml_array = getReportArray(postvalue("rname"));
	if(!is_wr_project())
	{
		$sessPrefix = "webreport".postvalue("rname");
	}
} 
elseif (postvalue("cname")) 
{
	$xml_array = getChartArray(postvalue("cname"));
	$sessPrefix = "webchart".postvalue("cname");
}

	/*if(!isLogged()) {					
		$_SESSION["MyURL"]=$_SERVER["SCRIPT_NAME"]."?".$_SERVER["QUERY_STRING"];
		header("Location: ".GetTableLink("login", "", "message=expired"));
		return;
예제 #3
0
ini_set("display_errors", "1");
ini_set("display_startup_errors", "1");
include "include/dbcommon.php";
header("Expires: Thu, 01 Jan 1970 00:00:01 GMT");
include "include/reportfunctions.php";
if (isset($_POST['type']) && isset($_POST['web'])) {
    if ($_POST['type'] == "new") {
        unset($_SESSION[$_POST['web']]);
        $_SESSION[$_POST['web']]['table_type'] = "db";
        echo "OK";
    } elseif ($_POST['type'] == "open") {
        $xml = new xml();
        $arr = array();
        if ($_POST['web'] == "webreports") {
            $arr = getReportArray($_POST['name']);
            if (!$arr["table_type"]) {
                if ($arr["db_based"]) {
                    $arr["table_type"] = "db";
                } else {
                    $arr["table_type"] = "project";
                }
            }
            $_SESSION['webreports'] = $arr;
            update_report_totals();
            $_SESSION["webobject"]["table_type"] = $_SESSION['webreports']["table_type"];
            $_SESSION["webobject"]["name"] = $_SESSION['webreports']['settings']['name'];
        } else {
            $arr = getChartArray($_POST['name']);
            if (!$arr["table_type"]) {
                if ($arr["db_based"]) {