Ejemplo n.º 1
0
$totalfiles->free();
$last24bytes->free();



// report_select.tpl & last_run_report.tpl
$res = $dbSql->link->query("select Name from Job group by Name");
$a_jobs = array();
while ( $tmp = $res->fetchRow() )
        array_push($a_jobs, $tmp[0]);
$smarty->assign('total_name_jobs',$a_jobs);
$smarty->assign('time2',( (time())-2678400) );                                                                  // Current time - 1 month. <select> date
$res->free();

// volumes.tpl
$volumes = $dbSql->GetDataVolumes();                                                                                    // Obtain array with info
$pools = array_keys($volumes);                                                                                                  // Extract Pools
$smarty->assign('pools',$pools);        
$smarty->assign('volumes',$volumes);

// last_run_report.tpl
if ($mode == "Lite" && $_GET['Full_popup'] != "yes") {
        $tmp = array();
        if ( $dbSql->driver == "mysql" )
          $status = $dbSql->link->query("select JobId,Name,EndTime,JobStatus from Job where EndTime <= NOW() and UNIX_TIMESTAMP(EndTime) >UNIX_TIMESTAMP(NOW())-86400 and JobStatus!='T'" )               
                or die ("Error: query at row 95");
        if ( $dbSql->driver == "pgsql" )
          $status = $dbSql->link->query("select JobId,Name,EndTime,JobStatus from Job where EndTime <= NOW() and EndTime >NOW() - 86400 * interval '1 second' and JobStatus!= 'T'")
                or die ( "Error: query at row 98" );
        $smarty->assign('status', $status->numRows());
        if ( $status->numRows() ) {