function getChartArray($name) { $arr = array(); $xml = new xml(); $chrt_strXML = LoadSelectedChart($name); $arr = $xml->xml_to_array($chrt_strXML); if (count($arr)) { $_SESSION["webobject"]["table_type"] = $arr["table_type"]; $_SESSION["object_sql"] = $arr["sql"]; if ($arr["table_type"] == "custom") { $connection = getWebreportConnection(); // #9875 $tables_query = $arr["tables"][0]; $strSQL = "SELECT " . $connection->addFieldWrappers("sqlcontent") . " FROM " . $connection->addTableWrappers("webreport_sql") . " WHERE " . $connection->addFieldWrappers("sqlname") . "='" . $tables_query . "'"; $row = $connection->query($strSQL)->fetchNumeric(); if ($row) { $_SESSION["object_sql"] = $row[0]; } } } return $arr; }
function getChartArray($name) { $arr = array(); $xml = new xml(); $chrt_strXML = LoadSelectedChart($name); $arr=$xml->xml_to_array($chrt_strXML); if(count($arr)) { $_SESSION["webobject"]["table_type"]=$arr["table_type"]; $_SESSION["object_sql"]=$arr["sql"]; if($arr["table_type"]=="custom") { global $conn; $tables_query=$arr["tables"][0]; $strSQL = "SELECT ".AddFieldWrappers("sqlcontent")." FROM ".AddTableWrappers("webreport_sql")." WHERE ".AddFieldWrappers("sqlname")."='".$tables_query."'"; $rs = db_query($strSQL,$conn); if($row = db_fetch_numarray($rs)) $_SESSION["object_sql"]=$row[0]; } } return $arr; }
HeaderRedirect("login", "", "message=expired"); return; } $xml = new xml(); $chrt_strXML = ""; if (checkTableName(postvalue("chartname"), titCHART)) { include_once "include/" . postvalue("chartname") . "_variables.php"; $chrt_strXML = GetChartXML(postvalue("chartname")); $chrt_array = $xml->xml_to_array($chrt_strXML); $_SESSION["webobject"]["table_type"] = "project"; $_SESSION["object_sql"] = ""; } $webchart = false; if (!$chrt_strXML) { $sessPrefix = "webchart" . postvalue('cname'); $chrt_strXML = LoadSelectedChart(postvalue('cname')); $webchart = true; $chrt_array = $xml->xml_to_array($chrt_strXML); if (is_wr_project()) { include_once "include/" . $chrt_array['settings']['short_table_name'] . "_variables.php"; } } $param = array(); $param["webchart"] = $webchart; $param["showDetails"] = postvalue('showDetails'); $param["chartPreview"] = postvalue('chartPreview'); $param["hasFlash"] = postvalue('hasFlash') == "true"; $param["dashChart"] = postvalue('dashChart'); $param["pageId"] = postvalue('pageId'); if ($param["dashChart"]) { $param["dashTName"] = postvalue('dashTName');