diff options
Diffstat (limited to 'frontends')
| -rw-r--r-- | frontends/php/alarms.php | 10 | ||||
| -rw-r--r-- | frontends/php/alerts.php | 6 | ||||
| -rw-r--r-- | frontends/php/audit.php | 2 | ||||
| -rw-r--r-- | frontends/php/config.php | 6 | ||||
| -rw-r--r-- | frontends/php/graphs.php | 2 | ||||
| -rw-r--r-- | frontends/php/history.php | 2 | ||||
| -rw-r--r-- | frontends/php/hostprofiles.php | 2 | ||||
| -rw-r--r-- | frontends/php/hosts.php | 6 | ||||
| -rw-r--r-- | frontends/php/items.php | 2 | ||||
| -rw-r--r-- | frontends/php/latestalarms.php | 8 | ||||
| -rw-r--r-- | frontends/php/media.php | 2 | ||||
| -rw-r--r-- | frontends/php/overview.php | 14 | ||||
| -rw-r--r-- | frontends/php/popup.php | 2 | ||||
| -rw-r--r-- | frontends/php/queue.php | 2 | ||||
| -rw-r--r-- | frontends/php/report1.php | 2 | ||||
| -rw-r--r-- | frontends/php/report2.php | 2 | ||||
| -rw-r--r-- | frontends/php/report3.php | 2 | ||||
| -rw-r--r-- | frontends/php/screenconf.php | 2 | ||||
| -rw-r--r-- | frontends/php/sysmap.php | 4 | ||||
| -rw-r--r-- | frontends/php/sysmaps.php | 2 | ||||
| -rw-r--r-- | frontends/php/tr_status.php | 2 | ||||
| -rw-r--r-- | frontends/php/users.php | 10 |
22 files changed, 46 insertions, 46 deletions
diff --git a/frontends/php/alarms.php b/frontends/php/alarms.php index fd015dd3..43fa215c 100644 --- a/frontends/php/alarms.php +++ b/frontends/php/alarms.php @@ -69,7 +69,7 @@ $sql="select clock,value,triggerid from alarms where triggerid=".$_REQUEST["triggerid"]." order by clock desc $limit"; $result=DBselect($sql); - $table = new Ctable(); + $table = new CTableInfo(); $table->setHeader(array(S_TIME,S_STATUS,S_DURATION,S_SUM,"%")); $truesum=0; $falsesum=0; @@ -88,25 +88,25 @@ // table_td(date("Y.M.d H:i:s",$row["clock"]),""); if($row["value"]==1) { - $istrue=array("value"=>S_TRUE_BIG,"class"=>"on"); + $istrue=new CCol(S_TRUE_BIG,"on"); $truesum=$truesum+$leng; $sum=$truesum; } elseif($row["value"]==0) { - $istrue=array("value"=>S_FALSE_BIG,"class"=>"off"); + $istrue=new CCol(S_FALSE_BIG,"off"); $falsesum=$falsesum+$leng; $sum=$falsesum; } elseif($row["value"]==3) { - $istrue=array("value"=>S_DISABLED_BIG,"class"=>"unknown"); + $istrue=new CCol(S_DISABLED_BIG,"unknown"); $dissum=$dissum+$leng; $sum=$dissum; } elseif($row["value"]==2) { - $istrue=array("value"=>S_UNKNOWN_BIG,"class"=>"unknown"); + $istrue=new CCol(S_UNKNOWN_BIG,"unknown"); $dissum=$dissum+$leng; $sum=$dissum; } diff --git a/frontends/php/alerts.php b/frontends/php/alerts.php index 53b32116..7cfe3007 100644 --- a/frontends/php/alerts.php +++ b/frontends/php/alerts.php @@ -88,7 +88,7 @@ } $result=DBselect($sql); - $table = new Ctable(S_NO_ALERTS); + $table = new CTableInfo(S_NO_ALERTS); $table->setHeader(array(S_TIME, S_TYPE, S_STATUS, S_RECIPIENTS, S_SUBJECT, S_MESSAGE, S_ERROR)); $col=0; $zzz=0; @@ -106,11 +106,11 @@ if($row["status"] == 1) { - $status=array("value"=>S_SENT,"class"=>"off"); + $status=new CCol(S_SENT,"off"); } else { - $status=array("value"=>S_NOT_SENT,"class"=>"on"); + $status=new CCol(S_NOT_SENT,"on"); } $sendto=htmlspecialchars($row["sendto"]); $subject="<pre>".htmlspecialchars($row["subject"])."</pre>"; diff --git a/frontends/php/audit.php b/frontends/php/audit.php index 82cbaa32..a6f6abbb 100644 --- a/frontends/php/audit.php +++ b/frontends/php/audit.php @@ -87,7 +87,7 @@ } $result=DBselect($sql); - $table = new Ctable(); + $table = new CTableInfo(); $table->setHeader(array(S_TIME,S_USER,S_RESOURCE,S_ACTION,S_DETAILS)); $i=0; while($row=DBfetch($result)) diff --git a/frontends/php/config.php b/frontends/php/config.php index 8f48313d..c04ead03 100644 --- a/frontends/php/config.php +++ b/frontends/php/config.php @@ -251,7 +251,7 @@ echo "<br>"; show_table_header(S_IMAGES_BIG); - $table=new Ctable(S_NO_IMAGES_DEFINED); + $table=new CTableInfo(S_NO_IMAGES_DEFINED); $table->setHeader(array(S_ID,S_TYPE,S_NAME,S_ACTIONS)); $result=DBselect("select imageid,imagetype,name,image from images order by name"); @@ -295,7 +295,7 @@ echo "<br>"; show_table_header(S_MEDIA_TYPES_BIG); - $table=new CTable(S_NO_MEDIA_TYPES_DEFINED); + $table=new CTableInfo(S_NO_MEDIA_TYPES_DEFINED); $table->setHeader(array(S_ID,S_DESCRIPTION,S_TYPE)); $result=DBselect("select mt.mediatypeid,mt.type,mt.description,mt.smtp_server,mt.smtp_helo,mt.smtp_email,mt.exec_path from media_type mt order by mt.type"); @@ -407,7 +407,7 @@ echo "<br>"; show_table_header(S_AUTOREGISTRATION_RULES_BIG); - $table=new Ctable(S_NO_AUTOREGISTRATION_RULES_DEFINED); + $table=new CTableInfo(S_NO_AUTOREGISTRATION_RULES_DEFINED); $table->setHeader(array(S_ID,S_PRIORITY,S_PATTERN,S_HOST)); $result=DBselect("select * from autoreg order by priority"); diff --git a/frontends/php/graphs.php b/frontends/php/graphs.php index ed31226e..f5ffa60c 100644 --- a/frontends/php/graphs.php +++ b/frontends/php/graphs.php @@ -155,7 +155,7 @@ show_header2($h1,$h2,"<form name=\"form2\" method=\"get\" action=\"graphs.php\">","</form>"); ?> <?php - $table = new Ctable(S_NO_GRAPHS_DEFINED); + $table = new CTableInfo(S_NO_GRAPHS_DEFINED); $table->setHeader(array(S_ID,S_NAME,S_WIDTH,S_HEIGHT,S_ACTIONS)); if(isset($_REQUEST["hostid"])&&($_REQUEST["hostid"]!=0)) diff --git a/frontends/php/history.php b/frontends/php/history.php index 0678acd5..fc6ada99 100644 --- a/frontends/php/history.php +++ b/frontends/php/history.php @@ -267,7 +267,7 @@ if($_REQUEST["action"]=="showlatest") { - $table = new Ctable(); + $table = new CTableInfo(); $item=get_item_by_itemid($_REQUEST["itemid"]); if($item["value_type"]==ITEM_VALUE_TYPE_LOG) diff --git a/frontends/php/hostprofiles.php b/frontends/php/hostprofiles.php index ee3d4fb3..c7188153 100644 --- a/frontends/php/hostprofiles.php +++ b/frontends/php/hostprofiles.php @@ -116,7 +116,7 @@ } else { - $table = new Ctable(); + $table = new CTableInfo(); $header=array(); $header=array_merge($header,array(S_HOST,S_NAME,S_OS,S_SERIALNO,S_TAG,S_MACADDRESS)); diff --git a/frontends/php/hosts.php b/frontends/php/hosts.php index 3c10cdc3..2b5e506d 100644 --- a/frontends/php/hosts.php +++ b/frontends/php/hosts.php @@ -368,7 +368,7 @@ { echo "<br>"; show_table_header(S_HOST_GROUPS_BIG); - $table = new Ctable(S_NO_HOST_GROUPS_DEFINED); + $table = new CTableInfo(S_NO_HOST_GROUPS_DEFINED); $table->setHeader(array(S_ID,S_NAME,S_MEMBERS,S_ACTIONS)); $result=DBselect("select groupid,name from groups order by name"); @@ -413,7 +413,7 @@ <?php if(isset($_REQUEST["hostid"])&&($_REQUEST["config"]==2)) { - $table = new Ctable(S_NO_LINKAGES_DEFINED); + $table = new CTableInfo(S_NO_LINKAGES_DEFINED); $table->setHeader(array(S_HOST,S_TEMPLATE,S_ITEMS,S_TRIGGERS,S_GRAPHS,S_ACTIONS)); $result=DBselect("select * from hosts_templates where hostid=".$_REQUEST["hostid"]); @@ -482,7 +482,7 @@ ?> <?php - $table = new Ctable(S_NO_HOSTS_DEFINED); + $table = new CTableInfo(S_NO_HOSTS_DEFINED); $table->setHeader(array(S_ID,S_HOST,S_IP,S_PORT,S_STATUS,S_AVAILABILITY,S_ERROR,S_ACTIONS)); $table->setAfterHeader("<form method=\"get\" action=\"hosts.php\">"); diff --git a/frontends/php/items.php b/frontends/php/items.php index 0f4ffe7b..54dc3db2 100644 --- a/frontends/php/items.php +++ b/frontends/php/items.php @@ -243,7 +243,7 @@ if(isset($_REQUEST["hostid"])) { - $table = new Ctable(); + $table = new CTableInfo(); $table->setHeader(array(S_ID,S_KEY,S_DESCRIPTION,nbsp(S_UPDATE_INTERVAL),S_HISTORY,S_TRENDS,S_TYPE,S_STATUS,S_ERROR)); $h="<form method=\"get\" action=\"items.php\">"; $h=$h."<input class=\"biginput\" name=\"hostid\" type=hidden value=".$_REQUEST["hostid"]." size=8>"; diff --git a/frontends/php/latestalarms.php b/frontends/php/latestalarms.php index 745be4fa..6df99d75 100644 --- a/frontends/php/latestalarms.php +++ b/frontends/php/latestalarms.php @@ -148,7 +148,7 @@ $result=DBselect($sql); - $table = new Ctable(); + $table = new CTableInfo(); $table->setHeader(array(S_TIME, S_DESCRIPTION, S_VALUE, S_SEVERITY)); $col=0; $i=0; @@ -170,15 +170,15 @@ if($row["value"] == 0) { - $value=array("value"=>S_OFF,"class"=>"off"); + $value=new CCol(S_OFF,"off"); } elseif($row["value"] == 1) { - $value=array("value"=>S_ON,"class"=>"on"); + $value=new CCol(S_ON,"on"); } else { - $value=array("value"=>S_UNKNOWN_BIG,"class"=>"unknown"); + $value=new CCol(S_UNKNOWN_BIG,"unknown"); } if($row["priority"]==0) $priority=S_NOT_CLASSIFIED; elseif($row["priority"]==1) $priority=S_INFORMATION; diff --git a/frontends/php/media.php b/frontends/php/media.php index 6d1a3fa2..2373f461 100644 --- a/frontends/php/media.php +++ b/frontends/php/media.php @@ -100,7 +100,7 @@ $sql="select m.mediaid,mt.description,m.sendto,m.active,m.period from media m,media_type mt where m.mediatypeid=mt.mediatypeid and m.userid=".$_REQUEST["userid"]." order by mt.type,m.sendto"; $result=DBselect($sql); - $table = new Ctable(S_NO_MEDIA_DEFINED); + $table = new CTableInfo(S_NO_MEDIA_DEFINED); $table->setHeader(array(S_TYPE,S_SEND_TO,S_WHEN_ACTIVE,S_STATUS,S_ACTIONS)); $col=0; diff --git a/frontends/php/overview.php b/frontends/php/overview.php index 6aefbf1c..4e5e7115 100644 --- a/frontends/php/overview.php +++ b/frontends/php/overview.php @@ -104,7 +104,7 @@ if(isset($_REQUEST["groupid"])&&isset($_REQUEST["type"])&&($_REQUEST["type"]==SHOW_DATA)) { - $table = new Ctable(); + $table = new CTableInfo(); $header=array(" "); $hosts=array(); $sql="select h.hostid,h.host from hosts h,items i,hosts_groups hg where h.status=".HOST_STATUS_MONITORED." and h.hostid=i.hostid and hg.groupid=".$_REQUEST["groupid"]." and hg.hostid=h.hostid group by h.hostid,h.host order by h.host"; @@ -156,9 +156,9 @@ if(DBnum_rows($result3)>0) { if($row2["value_type"] == 0) - $value=array("value"=>nbsp(convert_units($row2["lastvalue"],$row2["units"])),"class"=>"high"); + $value=new CCol(nbsp(convert_units($row2["lastvalue"],$row2["units"])),"high"); else - $value=array("value"=>nbsp(htmlspecialchars(substr($row2["lastvalue"],0,20)." ...")),"class"=>"high"); + $value=new CCol(nbsp(htmlspecialchars(substr($row2["lastvalue"],0,20)." ...")),"high"); } else { @@ -182,7 +182,7 @@ } else if(isset($_REQUEST["groupid"])&&isset($_REQUEST["type"])&&($_REQUEST["type"]==SHOW_TRIGGERS)) { - $table = new Ctable(); + $table = new CTableInfo(); $header=array(" "); $hosts=array(); $sql="select h.hostid,h.host from hosts h,items i,hosts_groups hg,functions f,triggers t where h.status=".HOST_STATUS_MONITORED." and t.status=".TRIGGER_STATUS_ENABLED." and h.hostid=i.hostid and hg.groupid=".$_REQUEST["groupid"]." and hg.hostid=h.hostid and t.triggerid=f.triggerid and f.itemid=i.itemid group by h.hostid,h.host order by h.host"; @@ -230,11 +230,11 @@ if($row2["status"]==0) { if($row2["value"] == TRIGGER_VALUE_FALSE) - $value=array("value"=>" ","class"=>"normal"); + $value=new CCol(" ","normal"); else if($row2["value"] == TRIGGER_VALUE_UNKNOWN) - $value=array("value"=>" ","class"=>"unknown_trigger"); + $value=new CCol(" ","unknown_trigger"); else - $value=array("value"=>" ","class"=>"high"); + $value=new CCol(" ","high"); } else { diff --git a/frontends/php/popup.php b/frontends/php/popup.php index f1dcff92..7e5f2a29 100644 --- a/frontends/php/popup.php +++ b/frontends/php/popup.php @@ -74,7 +74,7 @@ ?> <?php - $table = new Ctable(S_NO_HOSTS_DEFINED); + $table = new CTableInfo(S_NO_HOSTS_DEFINED); $table->setHeader(array(S_HOST,S_IP,S_PORT,S_STATUS,S_AVAILABILITY)); if(isset($_REQUEST["groupid"])&&($_REQUEST["groupid"]!=0)) diff --git a/frontends/php/queue.php b/frontends/php/queue.php index dc9a1df2..dab3d76a 100644 --- a/frontends/php/queue.php +++ b/frontends/php/queue.php @@ -59,7 +59,7 @@ $now=time(); $result=DBselect("select i.itemid, i.nextcheck, i.description, h.host,h.hostid from items i,hosts h where i.status=0 and i.type not in (2) and ((h.status=".HOST_STATUS_MONITORED." and h.available!=".HOST_AVAILABLE_FALSE.") or (h.status=".HOST_STATUS_MONITORED." and h.available=".HOST_AVAILABLE_FALSE." and h.disable_until<=$now)) and i.hostid=h.hostid and i.nextcheck<$now and i.key_ not in ('status','icmpping','icmppingsec','zabbix[log]') order by i.nextcheck"); - $table=new Ctable(S_THE_QUEUE_IS_EMPTY); + $table=new CTableInfo(S_THE_QUEUE_IS_EMPTY); if($_REQUEST["show"]==0) { diff --git a/frontends/php/report1.php b/frontends/php/report1.php index ac086c0b..1ced2e06 100644 --- a/frontends/php/report1.php +++ b/frontends/php/report1.php @@ -32,7 +32,7 @@ <?php show_table_header(S_STATUS_OF_ZABBIX_BIG); - $table = new Ctable(); + $table = new CTableInfo(); $table->setHeader(array(S_PARAMETER,S_VALUE)); diff --git a/frontends/php/report2.php b/frontends/php/report2.php index 1cc9efa4..67d61a18 100644 --- a/frontends/php/report2.php +++ b/frontends/php/report2.php @@ -107,7 +107,7 @@ $result=DBselect("select distinct h.hostid,h.host,t.triggerid,t.expression,t.description,t.value from triggers t,hosts h,items i,functions f where f.itemid=i.itemid and h.hostid=i.hostid and t.status=0 and t.triggerid=f.triggerid and h.hostid=".$_REQUEST["hostid"]." and h.status=".HOST_STATUS_MONITORED." and i.status=0 order by h.host, t.description"); - $table = new Ctable(); + $table = new CTableInfo(); $table->setHeader(array(S_NAME,S_TRUE,S_FALSE,S_UNKNOWN,S_GRAPH)); while($row=DBfetch($result)) { diff --git a/frontends/php/report3.php b/frontends/php/report3.php index af17df35..0d787beb 100644 --- a/frontends/php/report3.php +++ b/frontends/php/report3.php @@ -78,7 +78,7 @@ ?> <?php - $table = new Ctable(); + $table = new CTableInfo(); if($_REQUEST["period"]=="yearly") { $table->setHeader(array(S_YEAR,S_OK,S_PROBLEMS,S_PERCENTAGE,S_SLA)); diff --git a/frontends/php/screenconf.php b/frontends/php/screenconf.php index e5abfadd..0a66d944 100644 --- a/frontends/php/screenconf.php +++ b/frontends/php/screenconf.php @@ -69,7 +69,7 @@ show_header2($h1, $h2, "<form name=\"selection\" method=\"get\" action=\"screenconf.php\">", "</form>"); - $table = new Ctable(S_NO_SCREENS_DEFINED); + $table = new CTableInfo(S_NO_SCREENS_DEFINED); $table->setHeader(array(S_ID,S_NAME,S_COLUMNS,S_ROWS,S_ACTIONS)); $result=DBselect("select screenid,name,cols,rows from screens order by name"); diff --git a/frontends/php/sysmap.php b/frontends/php/sysmap.php index 27f9dad6..bb2b4eed 100644 --- a/frontends/php/sysmap.php +++ b/frontends/php/sysmap.php @@ -115,7 +115,7 @@ echo "</TABLE>"; show_table_header("DISPLAYED HOSTS"); - $table = new Ctable(); + $table = new CTableInfo(); $table->setHeader(array(S_HOST,S_LABEL,S_X,S_Y,S_ICON,S_ACTIONS)); $result=DBselect("select h.host,sh.shostid,sh.sysmapid,sh.hostid,sh.label,sh.x,sh.y,sh.icon from sysmaps_hosts sh,hosts h where sh.sysmapid=".$_REQUEST["sysmapid"]." and h.status not in (".HOST_STATUS_DELETED.") and h.hostid=sh.hostid order by h.host"); @@ -135,7 +135,7 @@ <?php show_table_header("CONNECTORS"); - $table = new Ctable(); + $table = new CTableInfo(); $table->setHeader(array(S_HOST_1,S_HOST_2,S_LINK_STATUS_INDICATOR,S_ACTIONS)); $result=DBselect("select linkid,shostid1,shostid2,triggerid from sysmaps_links where sysmapid=".$_REQUEST["sysmapid"]." order by linkid"); diff --git a/frontends/php/sysmaps.php b/frontends/php/sysmaps.php index 5c43ea3a..6fc94385 100644 --- a/frontends/php/sysmaps.php +++ b/frontends/php/sysmaps.php @@ -66,7 +66,7 @@ <?php if(!isset($_REQUEST["form"])) { - $table = new Ctable(S_NO_MAPS_DEFINED); + $table = new CTableInfo(S_NO_MAPS_DEFINED); $table->setHeader(array(S_ID,S_NAME,S_WIDTH,S_HEIGHT,S_ACTIONS)); $result=DBselect("select s.sysmapid,s.name,s.width,s.height from sysmaps s order by s.name"); diff --git a/frontends/php/tr_status.php b/frontends/php/tr_status.php index 29f99cd2..db8b392e 100644 --- a/frontends/php/tr_status.php +++ b/frontends/php/tr_status.php @@ -414,7 +414,7 @@ // show_table_header("<A HREF=\"tr_status.php?onlytrue=$onlytrue&noactions=$noactions&compact=$compact&fullscreen=1&sort=$sort\">".S_TRIGGERS_BIG." $time</A>"); } - $table = new Ctable(); + $table = new CTableInfo(); $header=array(); echo "<TR ALIGN=CENTER BGCOLOR=\"#CCCCCC\">"; diff --git a/frontends/php/users.php b/frontends/php/users.php index b4fcbd80..84707d83 100644 --- a/frontends/php/users.php +++ b/frontends/php/users.php @@ -178,7 +178,7 @@ echo "<br>"; show_table_header(S_USER_GROUPS_BIG); - $table = new cTable(S_NO_USER_GROUPS_DEFINED); + $table = new CTableInfo(S_NO_USER_GROUPS_DEFINED); $table->setHeader(array(S_ID,S_NAME,S_MEMBERS)); $result=DBselect("select usrgrpid,name from usrgrp order by name"); @@ -224,7 +224,7 @@ { echo "<br>"; show_table_header(S_USERS_BIG); - $table=new Ctable(S_NO_USERS_DEFINED); + $table=new CTableInfo(S_NO_USERS_DEFINED); $table->setHeader(array(S_ID,S_ALIAS,S_NAME,S_SURNAME,S_IS_ONLINE_Q,S_ACTIONS)); $result=DBselect("select u.userid,u.alias,u.name,u.surname from users u order by u.alias"); @@ -242,9 +242,9 @@ $result2=DBselect($sql); $row2=DBfetch($result2); if($row2["count"]>0) - $online=array("value"=>S_YES,"class"=>"on"); + $online=new CCol(S_YES,"on"); else - $online=array("value"=>S_NO,"class"=>"off"); + $online=new CCol(S_NO,"off"); if(check_right("User","U",$row["userid"])) { @@ -287,7 +287,7 @@ echo "<a name=\"form\"></a>"; show_table_header("USER PERMISSIONS"); - $table = new Ctable(); + $table = new CTableInfo(); $table->setHeader(array(S_PERMISSION,S_RIGHT,S_RESOURCE_NAME,S_ACTIONS)); $result=DBselect("select rightid,name,permission,id from rights where userid=".$_REQUEST["userid"]." order by name,permission,id"); $col=0; |
