File: 0.02.74a/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 FreeNATS. 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 ""; 65: echo ""; 67: echo ""; 72: echo ""; 77: echo ""; 78: echo ""; 80: echo ""; 81: echo ""; 83: echo ""; 85: 86: echo ""; 93: 94: $q="SELECT * FROM fneval WHERE testid=\"L".ss($_REQUEST['localtestid'])."\" ORDER BY weight ASC"; 95: $r=$NATS->DB->Query($q); 96: while ($row=$NATS->DB->Fetch_Array($r)) 97: { 98: echo ""; 99: echo ""; 102: } 103: 104: echo "
";
105: echo ""; 106: echo ""; 107: echo ""; 108: echo ""; 109: echo ""; 116: echo ""; 117: 118: 119: echo "
Test Type :".lText($row['testtype']); 60: echo "
Parameters :"; 62: echo ""; 63: echo "
Custom Name : ".hlink("Test:Name"); 66: echo "
Recorded :"; 68: if ($row['testrecord']==1) $s=" checked"; 69: else $s=""; 70: echo " ",hlink("Test:Recorded"); 71: echo "
Simple Evaluation :"; 73: if ($row['simpleeval']==1) $s=" checked"; 74: else $s=""; 75: echo " ".hlink("Test:SimpleEvaluation"); 76: echo "
Custom Attempts : ".hlink("Test:Attempts"); 79: echo "
Custom Timeout : ".hlink("Test:Timeout"); 82: echo "
Abandon Changes"; 84: echo "
 
"; 87: echo "Test Evaluators

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

";
91: } 92: echo "
".$row['eoperator']." ".$row['evalue']." => ".oText($row['eoutcome'])."Delete"; 100: //echo " | Up/Down"; 101: echo "
 
Add New : => "; 112: echo "
";
120: 121: ?> 122: 123: 124: Screen_Footer(); 125: ?> 126: