<div id="message-global-wrap"><div id="message-global"></div></div> <table class="maxwidth page_header" cellspacing="0" cellpadding="5"><tr><td class="page_header_l"><a class="image" href="http://www.zabbix.com/" target="_blank"><div class="zabbix_logo"> </div></a></td><td class="maxwidth page_header_r"> </td></tr></table> <br/><br/> <center><h1>Generate PDF Report</h1></center> <br/> <?php // ERROR REPORTING error_reporting(E_ALL); set_time_limit(60); // ZabbixAPI Connection ZabbixAPI::debugEnabled(TRUE); ZabbixAPI::login($z_server, $z_user, $z_pass) or die('Unable to login: '******'host', 'get', array('output' => array('hostid', 'name'), 'sortfield' => 'host', 'with_graphs' => '1', 'sortfield' => 'name')) or die('Unable to get hosts: ' . print_r(ZabbixAPI::getLastError(), true)); $host_groups = ZabbixAPI::fetch_array('hostgroup', 'get', array('output' => array('groupid', 'name'), 'real_hosts' => '1', 'with_graphs' => '1', 'sortfield' => 'name')) or die('Unable to get hosts: ' . print_r(ZabbixAPI::getLastError(), true)); ZabbixAPI::logout($z_server, $z_user, $z_pass) or die('Unable to logout: ' . print_r(ZabbixAPI::getLastError(), true)); //var_dump($hosts); //var_dump($host_group); // Form dropdown boxes from Zabbix API Data ?> <center> <form class="cmxform" id="ReportForm" name="ReportForm" action='createpdf.php' method='GET'> <table border="1" rules="NONE" frame="BOX" width="600" cellpadding="10"> <tr><td valign="middle" align="left" width="115"> <label for="ReportType"><b>Report type</b></label> </td><td valign="center" align="left" height="30"> <p> <input id="ReportHost" type="radio" name="ReportType" value="host" title="Generate report on HOST" checked="checked" />Host <input id="ReportHostGroup" type="radio" name="ReportType" value="hostgroup" title="Generate report on GROUP" />Host Group </p> </td><td valign="middle" width="110">