예제 #1
0
function processaRelatorioHost($id, $host)
{
    $html = "";
    $html .= getHeaderHTML($host->headerPrincipal);
    $codhost = $host->codhost;
    $tracking = isTracking();
    $total_categorias = count($host->categoria);
    $total_subcategoria = count($host->subcategoria);
    $total_json = count($host->ArrayJson);
    $total_eventos = count($host->ArrayEventos);
    debugl("total_categorias-> {$total_categorias}");
    debugl("total_subcategoria -> {$total_subcategoria}");
    debugl("total_json -> {$total_json}");
    debugl("total_eventos -> {$total_eventos}");
    //simula 2 instancias
    //$host->subcategoria[2] = 'produtttt';
    $cria_header_categoria = false;
    $old_categoria = null;
    $cria_header_subcategoria = false;
    $old_subcategoria = null;
    for ($x = 0; $x < $total_categorias; $x++) {
        if (strcmp($old_categoria, $host->categoria[$x]) == 0) {
            $cria_header_categoria = false;
        } else {
            $cria_header_categoria = true;
        }
        if ($cria_header_categoria) {
            debugl("[CRIAR HEADER]" . $host->categoria[$x]);
            $host->categoria[$x] = $host->categoria[$x];
            $html .= getCategoriaHeaderHTML($host->categoria[$x]);
            //echo "[CRIAR HEADER]". $host->categoria[$x] . "</br>";
            $old_categoria = $host->categoria[$x];
            $cria_header_categoria = false;
        }
        if (is_null($host->subcategoria[$x])) {
            $cria_header_subcategoria = false;
        }
        if (strcmp($old_subcategoria, $host->subcategoria[$x]) == 0) {
            $cria_header_subcategoria = false;
        } else {
            $cria_header_subcategoria = true;
        }
        if ($cria_header_subcategoria) {
            debugl("[CRIAR SUBHEADER]" . $host->subcategoria[$x]);
            //echo "[CRIAR SUBHEADER]". $host->subcategoria[$x];
            $host->subcategoria[$x] = $host->subcategoria[$x];
            $html .= getSubCategoriaHeaderHTML($host->subcategoria[$x]);
            $old_subcategoria = $host->subcategoria[$x];
            $cria_header_subcategoria = false;
        }
        //$html .= getBodyHTML($x,$host->ArrayJson[$x],$host->ArrayEventos[$x]);
        $html .= getBodyHTML($x, $host->images[$x], $host->ArrayEventos[$x]);
    }
    $html .= getFooterHTML($host->nomeEmpresa, $host->responsavel);
    //adiciona uma imagem com id
    $html .= getTrackingHTML($id, $tracking);
    return $html;
}
예제 #2
0
파일: index.php 프로젝트: RichardRanft/cash
$navigationTitle = "";
$navigationItems = "";
echo getAllScriptDeclarations();
/*
      echo generateScriptHTML('resources/css');
      echo generateScriptHTML('resources/scripts');
      echo generateScriptHTML('');
      echo generateScriptHTML('css');
*/
//Get what we need
$contentXML = initializeMainContent();
if ($contentXML == null) {
    echo "<h1>Failed to load content xml file. Make sure it is properly " . "defined in config.xml.</h1>";
} else {
    $title = getTitleHTML($contentXML);
    $header = getHeaderHTML($contentXML);
    //Use what we have
    echo $title;
}
?>
  </head>
  
  <body>
    <div class="content page_background">
      
      <!--TOP NAVBAR-->
      <div class="top">
      <div class="top_block block_2 navbar_background">
            <!--<a href="http://www.jpl.nasa.gov/"><img src="resources/images/JPL_Logo.png"
            height="43" width="110"></a>
            <ul class="navlist">-->