summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: beab7aa)
raw | patch | inline | side by side (parent: beab7aa)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 19 Jul 2010 05:38:45 +0000 (05:38 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 19 Jul 2010 05:38:45 +0000 (05:38 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19016 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/rsyslog/addons/rsyslog/class_rsyslog.inc | patch | blob | history |
diff --git a/gosa-plugins/rsyslog/addons/rsyslog/class_rsyslog.inc b/gosa-plugins/rsyslog/addons/rsyslog/class_rsyslog.inc
index 9fce8c7682a446dbda7d991ed33fba7e9d0bfd59..9c36dc1a68c26e6aaed360bc63fed12683233275 100644 (file)
$result =$this->get_result();
- $smarty->assign("servers",$this->servers);
- $smarty->assign("hosts",$hosts);
- $smarty->assign("priorities",$priorities);
- $smarty->assign("selected_server",$this->selected_server);
- $smarty->assign("selected_host",$this->selected_host);
- $smarty->assign("selected_priority",$this->selected_priority);
- $smarty->assign("search_for",$this->search_for);
- $smarty->assign("startTime", $this->startTime);
- $smarty->assign("stopTime", $this->stopTime);
- $smarty->assign("sort_type", $this->sort_type);
- $smarty->assign("sort_value", $this->sort_value);
- $smarty->assign("limits", $this->limits);
- $smarty->assign("limit", $this->limit);
- $smarty->assign("page", $this->page);
- $smarty->assign("plug_id", $_GET['plug']);
- $smarty->assign("downimg", image('images/lists/sort-down.png'));
- $smarty->assign("upimg", image('images/lists/sort-up.png'));
+ $smarty->assign("servers", set_post($this->servers));
+ $smarty->assign("hosts", set_post($hosts));
+ $smarty->assign("priorities", set_post($priorities));
+ $smarty->assign("selected_server", set_post($this->selected_server));
+ $smarty->assign("selected_host", set_post($this->selected_host));
+ $smarty->assign("selected_priority",set_post($this->selected_priority));
+ $smarty->assign("search_for", set_post($this->search_for));
+ $smarty->assign("startTime", set_post($this->startTime));
+ $smarty->assign("stopTime", set_post($this->stopTime));
+ $smarty->assign("sort_type", set_post($this->sort_type));
+ $smarty->assign("sort_value", set_post($this->sort_value));
+ $smarty->assign("limits", set_post($this->limits));
+ $smarty->assign("limit", set_post($this->limit));
+ $smarty->assign("page", set_post($this->page));
+ $smarty->assign("plug_id", set_post($_GET['plug']));
+ $smarty->assign("downimg", image('images/lists/sort-down.png'));
+ $smarty->assign("upimg", image('images/lists/sort-up.png'));
$smarty->assign("result", $result);
$smarty->assign("matches", sprintf(_("%s entries match the filter"), $result["count"]));
if($this->limits[$this->limit] != '-'){
$filter = "FROM SystemEvents WHERE 1=1 ";
if($host != "%%"){
- $filter.= " AND FromHost like '{$host}' ";
+ $filter.= " AND FromHost like '".mysql_real_escape_string($host)."' ";
}
if($prio != "%%"){
- $filter.= "AND Priority like '{$prio}' ";
+ $filter.= "AND Priority like '".mysql_real_escape_string($prio)."' ";
}
$filter.= "AND DeviceReportedTime >= '".(date("Y.m.d 00:00:00", strtotime($this->startTime)))."' ";
$filter.= "AND DeviceReportedTime <= '".(date("Y.m.d 23:59:59", strtotime($this->stopTime)))."' ";
if(!empty($this->search_for)){
- $filter.= "AND ( ( SysLogTag like '%".$this->search_for."%' ) OR ( Message like '%".$this->search_for."%' ) ) ";
+ $filter.= "AND ( ( SysLogTag like '%".mysql_real_escape_string($this->search_for).
+ "%' ) OR ( Message like '%".mysql_real_escape_string($this->search_for)."%' ) ) ";
}
// Detect amount of matching entries
// Get server from post
if( isset($_POST['selected_server']) && isset($this->servers[$_POST['selected_server']])){
- $this->selected_server = $_POST['selected_server'];
+ $this->selected_server = get_post('selected_server');
}
// Get Host
if( isset($this->servers[$this->selected_server]['Hosts']) && isset($_POST['selected_host']) &&
($_POST['selected_host'] == "all" ||
in_array($_POST['selected_host'],$this->servers[$this->selected_server]['Hosts']))){
- $this->selected_host = $_POST['selected_host'];
+ $this->selected_host = get_post('selected_host');
}
// Get priority from post
if( isset($this->servers[$this->selected_server]['Priorities']) && isset($_POST['selected_priority']) &&
($_POST['selected_priority'] == "all" ||
in_array($_POST['selected_priority'],$this->servers[$this->selected_server]['Priorities']))){
- $this->selected_priority = $_POST['selected_priority'];
+ $this->selected_priority = get_post('selected_priority');
}
// Get serach string
// Get page navigation attributes
if(isset($_GET['start'])) $this->page = $_GET['start'];
if(isset($_POST['limit']) && isset($this->limits[$_POST['limit']])){
- $this->limit = $_POST['limit'];
+ $this->limit = get_post('limit');
}
// Get sorting attributes