File: 0.02.53a/server/web/localtest.edit.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<5) UL_Error("Edit Local Test"); 32: ob_end_flush(); 33: Screen_Header("Local Test Editor",1); 34: ?> 35:
36: 37: $q="SELECT * FROM fnlocaltest WHERE localtestid=".ss($_REQUEST['localtestid'])." LIMIT 0,1"; 38: $r=$NATS->DB->Query($q); 39: if (!$row=$NATS->DB->Fetch_Array($r)) 40: { 41: echo "No such test!

";
42: Screen_Footer(); 43: exit(); 44: } 45: 46: echo "Editing Test on NodeID: ".$row['nodeid']."

";
47: 48: if (isset($_REQUEST['message'])) 49: { 50: echo "".$_REQUEST['message']."

";
51: $poplist[]=$_REQUEST['message']; 52: } 53: 54: echo ""; 55: echo "
";
56: echo ""; 57: echo ""; 58: echo ""; 59: echo ""; 61: echo ""; 64: echo ""; 69: echo ""; 74: echo ""; 76: 77: echo ""; 84: 85: $q="SELECT * FROM fneval WHERE testid=\"L".ss($_REQUEST['localtestid'])."\" ORDER BY weight ASC"; 86: $r=$NATS->DB->Query($q); 87: while ($row=$NATS->DB->Fetch_Array($r)) 88: { 89: echo ""; 90: echo ""; 93: } 94: 95: echo "
";
96: echo ""; 97: echo ""; 98: echo ""; 99: echo ""; 100: echo ""; 107: echo ""; 108: 109: 110: echo "
Test Type :".lText($row['testtype']); 60: echo "
Parameters :"; 62: echo ""; 63: echo "
Recorded :"; 65: if ($row['testrecord']==1) $s=" checked"; 66: else $s=""; 67: echo ""; 68: echo "
Simple Evaluation :"; 70: if ($row['simpleeval']==1) $s=" checked"; 71: else $s=""; 72: echo ""; 73: echo "
Abandon Changes"; 75: echo "
 
"; 78: echo "Test Evaluators

";
79: if ($row['simpleeval']==1) 80: { 81: echo "Custom evaluators will not be processed as
Simple Evaluation is checked (above)

";
82: } 83: echo "
".$row['eoperator']." ".$row['evalue']." => ".oText($row['eoutcome'])."Delete"; 91: //echo " | Up/Down"; 92: echo "
 
Add New : => "; 103: echo "
";
111: 112: ?> 113: 114: 115: Screen_Footer(); 116: ?> 117: