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

1: 2: ob_start(); 3: require("include.php"); 4: $NATS->Start(); 5: if (!$NATS_Session->Check($NATS->DB)) 6: { 7: header("Location: ./?login_msg=Invalid+Or+Expired+Session"); 8: exit(); 9: } 10: if ($NATS_Session->userlevel<9) UL_Error("Test Run"); 11: 12: 13: 14: ob_end_flush(); 15: Screen_Header("Test Run: test/".$_REQUEST['trid'],1); 16: 17: if (isset($_REQUEST['message'])) echo "".$_REQUEST['message']."
";
18: if (isset($amsg)) echo "".$amsg."
";
19: 20: 21: echo "
Test Run test/".$_REQUEST['trid']."

";
22: 23: $q="SELECT * FROM fntestrun WHERE trid=".ss($_REQUEST['trid'])." LIMIT 0,1"; 24: $r=$NATS->DB->Query($q); 25: if (!$row=$NATS->DB->Fetch_Array($r)) 26: { 27: echo "Error fetching test run data

";
28: Screen_Footer(); 29: exit(); 30: } 31: $NATS->DB->Free($r); 32: 33: echo ""; 34: echo ""; 35: echo ""; 36: echo ""; 37: echo ""; 41: 42: echo ""; 43: echo ""; 46: 47: echo "
Started : ".nicedt($row['startx'])." (".dtago($row['startx']).")
Finished : "; 38: if ($row['finishx']>0) echo nicedt($row['finishx'])." (".dtago($row['finishx']).")"; 39: else echo "Still Running"; 40: echo "
Output : "; 44: echo $row['routput']; 45: echo "
";
48: ?> 49: 50: 51: 52: Screen_Footer(); 53: ?> 54: