1"; }else { $graphs_condition = " AND id_graph IN (".implode(',',$usergraphs_id).")"; } $sql = "SELECT id_graph, name, description FROM tgraph WHERE (name LIKE '%" . $stringSearchSQL . "%' OR description LIKE '%" . $stringSearchSQL . "%')".$graphs_condition. " LIMIT " . $config['block_size'] . " OFFSET " . get_parameter ('offset',0); $graphs = process_sql($sql); if($graphs !== false) { $sql = "SELECT COUNT(id_graph) AS count FROM tgraph WHERE name LIKE '%" . $stringSearchSQL . "%' OR description LIKE '%" . $stringSearchSQL . "%'"; $totalGraphs = get_db_row_sql($sql); $totalGraphs = $totalGraphs['count']; } } if ($graphs === 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] = __('Graph name'); $table->head[1] = __('Description'); $table->data = array (); foreach ($graphs as $graph) { array_push($table->data, array( "" . $graph['name'] . "", $graph['description'] )); } echo "
";pagination ($totalGraphs); print_table ($table); unset($table); pagination ($totalGraphs); } switch ($searchTab) { case 'agents': require_once('search_agents.php'); break; case 'users': require_once('search_users.php'); break; case 'alerts': require_once('search_alerts.php'); break; } ?>