1"; }else { $reports_condition = " AND id_report IN (".implode(',',$userreports_id).")"; } $reports = false; if($searchReports) { $sql = "SELECT id_report, name, description FROM treport WHERE (name LIKE '%" . $stringSearchSQL . "%' OR description LIKE '%" . $stringSearchSQL . "%')".$reports_condition. " LIMIT " . $config['block_size'] . " OFFSET " . get_parameter ('offset',0); $reports = process_sql($sql); $sql = "SELECT COUNT(id_report) AS count FROM treport WHERE (name LIKE '%" . $stringSearchSQL . "%' OR description LIKE '%" . $stringSearchSQL . "%')"; $totalReports = get_db_row_sql($sql); $totalReports = $totalReports['count']; } if ($reports === false) { echo "
" . __("Zero results found") . "
\n"; } else { $table->cellpadding = 4; $table->cellspacing = 4; $table->width = "98%"; $table->class = "databox"; $table->head = array (); $table->head[0] = __('Report name'); $table->head[1] = __('Description'); $table->head[2] = __('HTML'); $table->head[3] = __('XML'); enterprise_hook ('load_custom_reporting_1'); $table->align = array (); $table->align[2] = "center"; $table->align[3] = "center"; $table->align[4] = "center"; $table->data = array (); foreach ($reports as $report) { if($linkReport) { $reportstring = "" . $report['name'] . ""; } else { $reportstring = $report['name']; } $data = array( $reportstring, $report['description'], '' . print_image("images/reporting.png", true) . '', '' . print_image("images/database_lightning.png", true) . '' ); enterprise_hook ('load_custom_reporting_2'); array_push($table->data, $data); } echo "
";pagination ($totalReports); print_table ($table); unset($table); pagination ($totalReports); } ?>