File: 0.02.61a/server/web/testrun.php (View as Code)

1: 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 Foobar. If not, see www.gnu.org/licenses 19: 20: For more information see www.purplepixie.org/freenats 21: -------------------------------------------------------------- */ 22: 23: ob_start(); 24: require("include.php"); 25: $NATS->Start(); 26: if (!$NATS_Session->Check($NATS->DB)) 27: { 28: header("Location: ./?login_msg=Invalid+Or+Expired+Session"); 29: exit(); 30: } 31: if ($NATS_Session->userlevel<9) UL_Error("Test Run"); 32: 33: 34: 35: ob_end_flush(); 36: Screen_Header("Test Run: test/".$_REQUEST['trid'],1); 37: 38: if (isset($_REQUEST['message'])) echo "".$_REQUEST['message']."
";
39: if (isset($amsg)) echo "".$amsg."
";
40: 41: 42: echo "
Test Run test/".$_REQUEST['trid']."

";
43: 44: $q="SELECT * FROM fntestrun WHERE trid=".ss($_REQUEST['trid'])." LIMIT 0,1"; 45: $r=$NATS->DB->Query($q); 46: if (!$row=$NATS->DB->Fetch_Array($r)) 47: { 48: echo "Error fetching test run data

";
49: Screen_Footer(); 50: exit(); 51: } 52: $NATS->DB->Free($r); 53: 54: echo ""; 55: echo ""; 56: echo ""; 57: echo ""; 58: echo ""; 62: echo ""; 63: echo ""; 67: 68: echo ""; 69: echo ""; 71: 72: echo ""; 73: echo ""; 76: 77: echo "
Started : ".nicedt($row['startx'])." (".dtago($row['startx']).")
Finished : "; 59: if ($row['finishx']>0) echo nicedt($row['finishx'])." (".dtago($row['finishx']).")"; 60: else echo "Still Running"; 61: echo "
Node Filter :"; 64: if ($row['fnode']=="") echo "All Nodes"; 65: else echo "".$row['fnode'].""; 66: echo "
Sysem Log :Log Events for Tester ".$row['trid'].""; 70: echo "
Output : "; 74: echo $row['routput']; 75: echo "
";
78: ?> 79: 80: 81: 82: Screen_Footer(); 83: ?> 84: