Viewing File server/base/screen.inc.php of 1.10.2a
|
1: <?php // screen.inc.php -- web page screen library 2: /* ------------------------------------------------------------- 3: This file is part of FreeNATS 4: 5: FreeNATS is (C) Copyright 2008 PurplePixie Systems 6: 7: FreeNATS is free software: you can redistribute it and/or modify 8: it under the terms of the GNU General Public License as published by 9: the Free Software Foundation, either version 3 of the License, or 10: (at your option) any later version. 11: 12: FreeNATS is distributed in the hope that it will be useful, 13: but WITHOUT ANY WARRANTY; without even the implied warranty of 14: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15: GNU General Public License for more details. 16: 17: You should have received a copy of the GNU General Public License 18: along with FreeNATS. If not, see www.gnu.org/licenses 19: 20: For more information see www.purplepixie.org/freenats 21: -------------------------------------------------------------- */ 22: 23: $menu=array(); 24: $menu[0]="<a href=http://www.purplepixie.org/freenats/>".$NATS->Lang->Item("homepage")."</a>"; 25: $menu[1]="<a href=monitor.php>".$NATS->Lang->Item("live.monitor")."</a> <a href=main.php>".$NATS->Lang->Item("configuration")."</a> "; 26: $menu[1].="<a href=http://www.purplepixie.org/freenats/support.php target=top>".$NATS->Lang->Item("help")."</a> <a href=logout.php>".$NATS->Lang->Item("logout")."</a>"; 27: $menu[2]=$menu[1]." <a href=admin.php>Admin</a>"; 28: 29: $menu[3]="<a href=iphone.php>".$NATS->Lang->Item("iphone")."</a> <a href=http://www.purplepixie.org/freenats/>".$NATS->Lang->Item("homepage")."</a>"; 30: /* 31: $pagemenu['main']="<a href=main.php?mode=overview>Overview</a> <a href=main.php?mode=nodes>Nodes</a> "; 32: $pagemenu['main'].="<a href=main.php?mode=groups>Groups</a> <a href=main.php?mode=views>Views & Reports</a> "; 33: $pagemenu['main'].="<a href=pref.php>User Options</a>"; 34: */ 35: $pagemenu=array(); 36: $pagemenu['main']=array( 37: array("overview","main.php?mode=overview",$NATS->Lang->Item("overview")), 38: array("nodes","main.php?mode=nodes",$NATS->Lang->Item("nodes")), 39: array("groups","main.php?mode=groups",$NATS->Lang->Item("groups")), 40: array("views","main.php?mode=views",$NATS->Lang->Item("views.reports")), 41: array("pref","pref.php?mode=pref",$NATS->Lang->Item("user.options")), 42: array("admin","admin.php",$NATS->Lang->Item("system.settings")) ); 43: 44: function PageMenu($name,$mode="") 45: { 46: global $pagemenu; 47: if (($mode=="")&&isset($_REQUEST['mode'])) $mode=$_REQUEST['mode']; 48: $out=""; 49: $first=true; 50: foreach($pagemenu[$name] as $opt) 51: { 52: if ($first) $first=false; 53: else $out.=" "; 54: if ($mode!=$opt[0]) $out.=" <a href=".$opt[1].">"; 55: else $out.="<b style=\"background-color: #ffffff;\"> <a href=\"".$opt[1]."\" style=\"color: black; text-decoration: none;\">"; 56: $out.=$opt[2]; 57: if ($mode!=$opt[0]) $out.="</a> "; 58: else $out.="</a> </b>"; 59: } 60: return $out; 61: } 62: 63: $poplist=array(); 64: 65: function Screen_Header($title,$menuindex=0,$alertpane=0,$ah="",$pagemenu="",$pagemenumode="") 66: { 67: global $menu,$NATS,$NATS_Session; 68: if ($NATS->Cfg->Get("site.enable.interactive")!=1) 69: { 70: echo "Sorry but FreeNATS interactive is disabled.<br>"; 71: echo "<i>site.enable.interactive</i> != 1<br><br>"; 72: echo "To resolve this issue your system administrator needs to set the FreeNATS system variable site.enable.interactive to 1.<br><br>"; 73: $NATS->Stop(); 74: exit(); 75: } 76: if ($menuindex==1) $alertpane=1; // bodge 77: 78: if ( ($menuindex==1) && ($pagemenu=="main") ) $secCheckFirstrun=true; 79: else $secCheckFirstrun=false; // KLUDGE 80: 81: //if ($NATS_Session->userlevel>9) $menuindex=2; // further bodge! 82: echo "<html><head><title>FreeNATS: ".$title."</title>\n"; 83: echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"css/main.css\">\n"; 84: /* 85: echo "<style type=\"text/css\">\n"; 86: require("css/main.css"); 87: echo "\n</style>\n"; 88: */ 89: if ($ah!="") echo $ah; 90: echo "</head>\n"; 91: echo "<script type=\"text/javascript\" src=\"js/freenats.js\"></script>\n"; 92: echo "<body>"; 93: 94: echo "<table class=\"maintitle\" cellspacing=0 cellpadding=0>\n"; 95: echo "<tr><td align=left valign=center class=\"mainleft\">\n"; 96: echo "<b class=\"maintitle\">".$title."</b>"; 97: if ($pagemenu!="") echo "<br> <b>".PageMenu($pagemenu,$pagemenumode)."</b>"; 98: echo "</td>\n"; 99: echo "<td class=\"titlelink\" align=right valign=center>\n"; 100: echo $menu[$menuindex]; 101: echo " </td></tr>\n"; 102: //echo "<tr><td align=left valign=bottom><img src=images/e0e0ff.10px.bl.jpg></td>"; 103: //echo "</tr>\n"; 104: echo "</table>\n"; 105: 106: if ($secCheckFirstrun && ( $NATS->Cfg->Get("site.firstrun.ignore",0) != 1 ) ) 107: { 108: if (file_exists("firstrun.php")) 109: { 110: echo "<div class=\"sec_warning\">"; 111: echo "<b>".$NATS->Lang->Item("sec.firstrun")."</b><br />"; 112: echo $NATS->Lang->Item("sec.firstrun.text")."<br />"; 113: echo $NATS->Lang->Item("sec.firstrun.ignore")."<BR />"; 114: echo "<a href=\"http://www.purplepixie.org/freenats/wiki/Firstrun_Warning\" target=\"top\">http://www.purplepixie.org/freenats/wiki/Firstrun_Warning</a>"; 115: 116: echo "</div>"; 117: } 118: } 119: 120: 121: if ($alertpane==1) 122: { 123: $alerts=$NATS->GetAlerts(); 124: if (is_array($alerts)) 125: { 126: echo "<div class=\"alertpane\" id=\"fn_alertpane\">"; 127: echo "<b><u>".$NATS->Lang->Item("nats.alerts")."</u></b><br><br>"; 128: foreach($alerts as $alert) 129: { 130: echo " <a href=node.php?nodeid=".$alert['nodeid'].">"; 131: echo "<b class=\"al".$alert['alertlevel']."\">".$alert['nodeid']."</b></a><br>"; 132: } 133: echo "<br>"; 134: echo "</div>"; 135: } 136: } 137: 138: } 139: 140: function Start_Round($title,$width="") 141: { 142: if ($width!="") $w=" width=".$width; 143: else $w=""; 144: echo "<table border=0".$w." cellspacing=0 cellpadding=0>\n"; 145: echo "<tr><td valign=top align=left width=11 style=\"background-color: #e0e0ff;\"><img src=images/e0e0ff.10px.tl.jpg></td>\n"; 146: echo "<td align=left valign=center style=\"background-color: #e0e0ff;\">\n"; 147: echo $title; 148: echo "\n</td><td align=right valign=top style=\"background-color: #e0e0ff;\"><img src=images/e0e0ff.10px.tr.jpg></td></tr>\n"; 149: echo "<tr><td colspan=3 style=\"border-left: solid 1px #e0e0ff; border-bottom: solid 1px #e0e0ff; border-right: solid 1px #e0e0ff; padding: 5px;\">\n"; 150: } 151: 152: function End_Round() 153: { 154: echo "\n</td></tr>\n"; 155: 156: echo "</table>"; 157: } 158: 159: function Screen_Footer($track_if_enabled=true) 160: { 161: global $NATS,$poplist; 162: echo "<br><br>\n"; 163: //$NATS->Cfg->DumpToScreen(); 164: echo "<div class=\"nfooter\">"; 165: echo "<div class=\"bl\"><div class=\"br\"><div class=\"tl\"><div class=\"tr\">"; 166: 167: echo "<div align=\"left\" class=\"nfootleft\"><a href=http://www.purplepixie.org/freenats/>FreeNATS</a>; © ".$NATS->Lang->Item("copyright")." 2008-2010 "; 168: echo "<a href=http://www.purplepixie.org/>PurplePixie Systems</a>"; 169: echo "</div><div class=\"nfootright\">"; 170: echo $NATS->Lang->Item("version").": ".$NATS->Version; 171: if ($NATS->Release!="") echo "/".$NATS->Release; 172: echo " </div>"; 173: 174: //echo "Hello"; 175: echo "</div></div></div></div>"; 176: echo "</div>"; 177: if (ini_get("freenats.rpath")==1) 178: { 179: echo "<i>FreeNATS Virtual Server Powered By <a href=http://www.rpath.org/>rPath</a> LAMP Appliance</i><br>"; 180: } 181: //echo "<i>This is alpha-test software - we would very much value your "; 182: //echo "<a href=http://www.purplepixie.org/freenats/feedback.php>feedback</a></i><br>"; 183: $autofeedback=false; 184: if ($track_if_enabled) 185: { 186: $t=$NATS->Cfg->Get("freenats.tracker"); 187: if ( ($t!="") && ($t>0) ) 188: { 189: $autofeedback=true; 190: $usid=$NATS->Cfg->Get("freenats.tracker.usid",""); 191: if ($usid=="") 192: { // generate usid if not already set 193: // usid form XYZ-XYZ-XYZ... 194: $allow="abcdef0123456789"; 195: $allow_len=strlen($allow); 196: mt_srand(microtime()*1000000); 197: $first_set=1; 198: for ($a=0; $a<5; $a++) // blocks 199: { 200: if ($first_set==1) $first_set=0; 201: else $usid.="-"; 202: for ($b=0; $b<10; $b++) 203: { 204: $c=mt_rand(0,$allow_len-1); 205: $usid.=$allow[$c]; 206: } 207: } 208: $NATS->Cfg->Set("freenats.tracker.usid",$usid); 209: } 210: 211: // get some more data 212: $sn=explode("/",$_SERVER['SCRIPT_NAME']); 213: $script=$sn[count($sn)-1]; 214: 215: // show tracking image 216: echo "<img src=\"http://www.purplepixie.org/freenats/report/ping.png.php?data=v=".$NATS->Version."+p=".$script."&type=ping&usid=".$usid."\" width=1 height=1>\n"; 217: } 218: } 219: 220: //$NATS->PageError("fish","swim in the sea"); 221: //$NATS->PageError("dogs","walk on the land"); 222: //$autofeedback=true; 223: 224: if (count($NATS->PageErrors)>0) // page errors reported 225: { 226: echo "<div class=\"page_error\">\n"; 227: echo "Errors detected on page: "; 228: $url=""; 229: $counter=0; 230: foreach($NATS->PageErrors as $PageError) 231: { 232: if ($counter>0) $url.="&"; 233: $url.="code[".$counter."]=".urlencode($PageError['code'])."&desc[".$counter."]=".urlencode($PageError['desc']); 234: $counter++; 235: } 236: 237: echo "<script type=\"text/javascript\">\n"; 238: echo "function report_error()\n"; 239: echo "{\n"; 240: echo "document.getElementById('error_report_result').innerHTML = 'Reporting Now...';\n"; 241: echo "var s = document.createElement(\"script\");\n"; 242: echo "s.src = \"http://www.purplepixie.org/freenats/report/error.php?".$url."\";\n"; 243: echo "document.body.appendChild(s);\n"; 244: echo "}\n"; 245: echo "</script>"; 246: 247: echo "<span id=\"error_report_result\">"; 248: if ($autofeedback) 249: { 250: echo "Reporting..."; 251: } 252: else 253: { 254: echo "<a href=\"javascript:report_error();\">Click to report to PurplePixie</a> | "; 255: echo "<a href=\"javascript:displayToggle('error_detail');\">Click to show/hide details</a>"; 256: } 257: echo "</span>"; 258: echo "<div id=\"error_detail\" style=\"display: none;\">\n"; 259: foreach($NATS->PageErrors as $PageError) 260: { 261: echo "# ".$PageError['code']." : ".$PageError['desc']."<BR />\n"; 262: } 263: echo "</div>"; 264: echo "</div>\n"; 265: if ($autofeedback) 266: { 267: //echo "<script src=\"http://www.purplepixie.org/freenats/report/error.php?".$url."\" type=\"text/javascript\"></script>\n"; 268: echo "<script type=\"text/javascript\">\n"; 269: echo "report_error();\n"; 270: echo "</script>\n"; 271: } 272: 273: } 274: 275: if ($NATS->Cfg->Get("site.popupmessage")=="1") 276: { 277: if (count($poplist)>0) 278: { 279: echo "\n<script type=\"text/javascript\">\n"; 280: 281: foreach($poplist as $pop) 282: { 283: echo "alert('".$pop."');\n"; 284: } 285: 286: echo "</script>\n"; 287: } 288: } 289: echo "\n</body></html>\n"; 290: } 291: 292: function UL_Error($task="") 293: { 294: global $NATS; 295: Screen_Header($NATS->Lang->Item("access.error")); 296: echo "<br>".$NATS->Lang->Item("access.error.detail")." (".$task.").<br><br>"; 297: echo "<a href=main.php>".$NATS->Lang->Item("click.continue")."</a><br><br>"; 298: Screen_Footer(); 299: exit(); 300: } 301: 302: function Session_Error() 303: { 304: global $REQUEST_URI; 305: header("Location: ./?login_msg=Invalid+or+Expired+Session&url=".urlencode($REQUEST_URI)); 306: exit(); 307: } 308: 309: function nicedt($ts) 310: { 311: global $NATS; 312: $form="H:i:s d/m/Y"; 313: if (isset($NATS)) $form=$NATS->Cfg->Get("site.dtformat","H:i:s d/m/Y"); 314: if ($ts<=0) return $NATS->Lang->Item("never"); 315: return date($form,$ts); 316: } 317: 318: function enicedt($ts) 319: { 320: echo nicedt($ts); 321: } 322: 323: function nicediff($diff) 324: { 325: $hr=0; 326: $mn=0; 327: $se=0; 328: if ($diff>59) 329: { 330: $mn=round($diff/60,0); 331: $se=$diff%60; 332: if ($mn>59) 333: { 334: $hr=round($mn/60,0); 335: $mn=$mn%60; 336: } 337: } 338: else $se=$diff; 339: $s=""; 340: if ($hr<10) $s="0"; 341: $s.=$hr.":"; 342: if ($mn<10) $s.="0"; 343: $s.=$mn.":"; 344: if ($se<10) $s.="0"; 345: $s.=$se; 346: return $s; 347: } 348: 349: function dtago($ts,$sayago=true) 350: { 351: global $NATS; 352: if ($ts<=0) return $NATS->Lang->Item("never"); 353: $now=time(); 354: $diff=$now-$ts; 355: $s=nicediff($diff); 356: if ($sayago) $s.=" ".$NATS->Lang->Item("ago"); 357: return $s; 358: } 359: 360: function nicenextx($nextx) 361: { 362: if ($nextx<=0) return "Now"; 363: $diff=$nextx-time(); 364: if ($diff<0) 365: { 366: $sign=" ago"; 367: $diff=0-$diff; 368: } 369: else $sign=""; 370: return nicediff($diff).$sign; 371: } 372: 373: function edtago($ts) 374: { 375: echo dtago($ts); 376: } 377: 378: function smartx($x) // smart handling of unixtime x variables 379: { 380: if ($x==0) return time(); // 0 = now 381: else if ($x<0) // -z = now - z seconds 382: return (time()+$x); // negative number so + 383: else // positive number so is a unixtime 384: return $x; 385: } 386: 387: $allowed="00123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz@_-.,:&/~%=+(){}[]#?$"; 388: 389: function nices($s) 390: { 391: global $allowed; 392: $o=""; 393: for ($a=0; $a<strlen($s); $a++) 394: { 395: $c=$s[$a]; 396: if (strpos($allowed,$c)===false) 397: { 398: // skip it 399: } 400: else $o.=$c; 401: } 402: return $o; 403: } 404: /* // Old Static List Function 405: function ShowIcons() 406: { 407: global $fnIcons,$fnIcon_DefNode,$fnIcon_DefGroup; 408: $c=0; 409: echo "<table border=0>"; 410: $cc=0; 411: for ($a=0; $a<count($fnIcons); $a++) 412: { 413: if ($cc==0) echo "<tr>"; 414: echo "<td valign=top align=center><img src=icons/".$fnIcons[$a]."><br>".$fnIcons[$a]."<br>"; 415: if ($a==$fnIcon_DefNode) echo "<i>Node Default</i> "; 416: if ($a==$fnIcon_DefGroup) echo "<i>Group Default</i>"; 417: echo "</td>"; 418: $cc++; 419: if ($cc>=5) 420: { 421: echo "</tr>"; 422: $cc=0; 423: } 424: } 425: if ($cc>0) echo "</tr>"; 426: echo "</table>"; 427: } 428: */ 429: 430: function GetIcons() 431: { 432: $iconFiles=glob("icons/{*.gif,*.GIF,*.jpg,*.JPG,*.jpeg,*.JPEG,*.png,*.PNG}", GLOB_BRACE); 433: for($a=0;$a<count($iconFiles);$a++) 434: $iconFiles[$a]=substr($iconFiles[$a],6); 435: return $iconFiles; 436: } 437: 438: 439: function ShowIcons() 440: { 441: global $fnIcons,$fnIcon_DefNode,$fnIcon_DefGroup,$NATS; 442: $c=0; 443: echo "<table border=0>"; 444: $cc=0; 445: $iconFiles=GetIcons(); 446: for ($a=0; $a<count($iconFiles); $a++) 447: { 448: $icon=$iconFiles[$a]; 449: if ($cc==0) echo "<tr>"; 450: echo "<td valign=top align=center><img src=icons/".$icon."><br>".$icon."<br>"; 451: if ($icon==$fnIcons[$fnIcon_DefNode]) echo "<i>".$NATS->Lang->Item("node.default")."</i> "; 452: if ($a==$fnIcons[$fnIcon_DefGroup]) echo "<i>".$NATS->Lang->Item("group.default")."</i>"; 453: echo "</td>"; 454: $cc++; 455: if ($cc>=5) 456: { 457: echo "</tr>"; 458: $cc=0; 459: } 460: } 461: if ($cc>0) echo "</tr>"; 462: echo "</table>"; 463: } 464: 465: 466: 467: function NodeIcon($nodeid) 468: { 469: global $NATS,$fnIcons,$fnIcon_DefNode; 470: $q="SELECT nodeicon FROM fnnode WHERE nodeid=\"".ss($nodeid)."\""; 471: $r=$NATS->DB->Query($q); 472: if ($row=$NATS->DB->Fetch_Array($r)) 473: { 474: if ($row['nodeicon']!="") return $row['nodeicon']; 475: } 476: return $fnIcons[$fnIcon_DefNode]; 477: } 478: 479: function GroupIcon($groupid) 480: { 481: global $NATS,$fnIcons,$fnIcon_DefGroup; 482: $q="SELECT groupicon FROM fngroup WHERE groupid=\"".ss($groupid)."\""; 483: $r=$NATS->DB->Query($q); 484: if ($row=$NATS->DB->Fetch_Array($r)) 485: { 486: if ($row['groupicon']!="") return $row['groupicon']; 487: } 488: return $fnIcons[$fnIcon_DefGroup]; 489: } 490: 491: function np_tiny($nodeid,$text=true,$nodename="",$jslink=false) 492: { 493: global $NATS; 494: $al=$NATS->NodeAlertLevel($nodeid); 495: echo "<table class=\"nptiny-al".$al."\">"; 496: echo "<tr><td valign=center align=center>"; 497: if ($jslink) echo "<a href=\"javascript:nodeClick('".$nodeid."');\">"; 498: else echo "<a href=node.php?nodeid=".$nodeid.">"; 499: echo "<img src=\"icons/".NodeIcon($nodeid)."\" border=0>"; 500: echo "</a>"; 501: if ($text) 502: { 503: if ($nodename=="") $nodename=$nodeid; 504: 505: //$words=explode(" ",$nodename); 506: 507: // messy but there you go... 508: 509: $max_on_line=7; 510: $max_lines=2; 511: $len=strlen($nodename); 512: $out=""; 513: $linecount=0; 514: $charcount=0; 515: for ($a=0; $a<$len; $a++) 516: { 517: 518: $char=$nodename[$a]; 519: 520: if ($char==" ") 521: { 522: $linecount++; 523: $charcount=0; 524: } 525: else $charcount++; 526: 527: if ($charcount>=$max_on_line) 528: { 529: $a=$len+10; 530: $out.=".."; 531: } 532: else if ($linecount>=$max_lines) 533: { 534: $a=$len+10; 535: $out.=".."; 536: } 537: else $out.=$char; 538: 539: } 540: //if ($a==($len+10)) $out.=".."; 541: $nodename=$out; 542: 543: $size=10; 544: 545: /* -- size-based 546: $len=strlen($nodename); 547: if ($len<9) $size=10; 548: else if ($len<15) $size=8; 549: else if ($len<20) $size=7; 550: else 551: { 552: $size=6; 553: $nodename=substr($nodename,0,18).".."; 554: } 555: */ 556: 557: echo "<br><b class=\"al".$al."\" style=\"font-size: ".$size."pt;\">".$nodename."</b>"; 558: } 559: echo "</td></tr></table>"; 560: } 561: 562: function ng_tiny($groupid,$groupname="",$text=true) 563: { 564: global $NATS; 565: // to do - get groupname if not sent but F--- it for now 566: $al=$NATS->GroupAlertLevel($groupid); 567: echo "<table class=\"nptiny-al".$al."\">"; 568: echo "<tr><td valign=center align=center>"; 569: echo "<a href=group.php?groupid=".$groupid.">"; 570: echo "<img src=\"icons/".GroupIcon($groupid)."\" border=0>"; 571: echo "</a>"; 572: if ($text) 573: { 574: echo "<br><b class=\"al".$al."\">".$groupname."</b>"; 575: } 576: echo "</td></tr></table>"; 577: } 578: 579: function ng_big($groupid,$groupname="",$groupdesc="",$groupicon="") 580: { 581: global $NATS; 582: if ($groupicon=="") $groupicon=GroupIcon($groupid); 583: $al=$NATS->GroupAlertLevel($groupid); 584: echo "<table class=\"npbig-al".$al."\">"; 585: echo "<tr><td align=left valign=top>"; 586: echo "<table class=\"nicetable\" width=300>"; 587: echo "<tr><td align=right>".$NATS->Lang->Item("group.name")." :"; 588: echo "</td><td align=left><a href=group.php?groupid=".$groupid.">".$groupname."</a></td></tr>"; 589: echo "<tr><td align=right>".$NATS->Lang->Item("description")." :"; 590: echo "</td><td align=left>".$groupdesc."</td></tr>"; 591: echo "<tr><td align=right>".$NATS->Lang->Item("status")."</td><td align=left>"; 592: echo "<b class=\"al".$al."\">".oText($al)."</b></td></tr>"; 593: echo "</table></td>"; 594: //echo "<td align=left valign=top align=right width=60>"; 595: //echo "<img src=icons/".GroupIcon($groupid).">"; 596: //echo "</td>"; 597: echo "</tr>"; 598: echo "</table>"; 599: } 600: 601: function np_big($nodeid,$nodename="",$nodedesc="",$nodeicon="",$jslink=false) 602: { 603: global $NATS; 604: if ($nodedesc=="") $nodedesc=" "; 605: if ($nodeicon=="") $nodeicon=NodeIcon($nodeid); 606: $al=$NATS->NodeAlertLevel($nodeid); 607: echo "<table class=\"npbig-al".$al."\">"; 608: echo "<tr><td align=left valign=top>"; 609: echo "<table class=\"nicetable\" width=300>"; 610: echo "<tr><td align=right>".$NATS->Lang->Item("node.name")." :"; 611: if ($nodename=="") $nodename=$nodeid; 612: echo "</td><td align=left>"; 613: if ($jslink) echo "<a href=\"javascript:nodeClick('".$nodeid."');\">"; 614: else echo "<a href=node.php?nodeid=".$nodeid.">"; 615: echo $nodename."</a></td></tr>"; 616: echo "<tr><td align=right>".$NATS->Lang->Item("description")." :"; 617: echo "</td><td align=left>".$nodedesc."</td></tr>"; 618: echo "<tr><td align=right>".$NATS->Lang->item("status")." :</td><td align=left>"; 619: echo "<b class=\"al".$al."\">".oText($al)."</b></td></tr>"; 620: echo "</table></td>"; 621: //echo "<td align=left valign=top align=right width=60>"; 622: //echo "<img src=icons/".GroupIcon($groupid).">"; 623: //echo "</td>"; 624: echo "</tr>"; 625: echo "</table>"; 626: } 627: 628: function GetAbsolute($filename="") 629: { // sooooooooo messy but looks like the ONLY FRICKIN' WAY! 630: if ((isset($_SERVER['HTTPS']))&&($_SERVER['HTTPS']!="")) $uri="https://"; 631: else $uri="http://"; 632: $uri.=$_SERVER['HTTP_HOST']; 633: $uri.=$_SERVER['REQUEST_URI']; 634: $pos=strripos($uri,"/"); 635: $rdir=substr($uri,0,$pos+1); 636: return $rdir.$filename; 637: } 638: 639: 640: ?> 641: