File: 0.02.28a/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'])) echo "".$_REQUEST['message']."

";
49: 50: echo ""; 51: echo "
";
52: echo ""; 53: echo ""; 54: echo ""; 55: echo ""; 57: echo ""; 60: echo ""; 65: echo ""; 70: echo ""; 72: 73: echo ""; 80: 81: $q="SELECT * FROM fneval WHERE testid=\"L".ss($_REQUEST['localtestid'])."\" ORDER BY weight ASC"; 82: $r=$NATS->DB->Query($q); 83: while ($row=$NATS->DB->Fetch_Array($r)) 84: { 85: echo ""; 86: echo ""; 89: } 90: 91: echo "
";
92: echo ""; 93: echo ""; 94: echo ""; 95: echo ""; 96: echo ""; 103: echo ""; 104: 105: 106: echo "
Test Type :".lText($row['testtype']); 56: echo "
Parameters :"; 58: echo ""; 59: echo "
Recorded :"; 61: if ($row['testrecord']==1) $s=" checked"; 62: else $s=""; 63: echo ""; 64: echo "
Simple Evaluation :"; 66: if ($row['simpleeval']==1) $s=" checked"; 67: else $s=""; 68: echo ""; 69: echo "
Abandon Changes"; 71: echo "
 
"; 74: echo "Test Evaluators

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

";
78: } 79: echo "
".$row['eoperator']." ".$row['evalue']." => ".oText($row['eoutcome'])."Delete"; 87: //echo " | Up/Down"; 88: echo "
 
Add New : => "; 99: echo "
";
107: 108: ?> 109: 110: 111: Screen_Footer(); 112: ?> 113: