File: 0.02.52a/server/web/view.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 View"); 32: ob_end_flush(); 33: Screen_Header("View Editor",1); 34: ?> 35:
36: 37: 38: $q="SELECT * FROM fnview WHERE viewid=".ss($_REQUEST['viewid'])." LIMIT 0,1"; 39: $r=$NATS->DB->Query($q); 40: if (!$row=$NATS->DB->Fetch_Array($r)) 41: { 42: echo "No such view.

";
43: Screen_Footer(); 44: exit(); 45: } 46: $NATS->DB->Free($r); 47: echo "Editing View: ".$row['vtitle']."

";
48: 49: 50: echo ""; 51: echo "
";
52: echo ""; 53: echo ""; 54: 55: echo ""; 59: echo ""; 60: 61: echo ""; 62: echo ""; 67: echo ""; 68: 69: echo ""; 70: echo ""; 85: 86: echo ""; 87: echo ""; 106: echo ""; 110: 111: echo ""; 112: echo ""; 113: echo "
View Title"; 56: echo ""; 57: echo ""; 58: echo "
 
Public View"; 63: if ($row['vpublic']==1) $s=" checked"; 64: else $s=""; 65: echo " ".hlink("View:Public"); 66: echo "
 
Page Style"; 71: if ($row['vstyle']=="standard") $s=" checked"; 72: else $s=""; 73: echo " Standard
";
74: echo "Standard full-page headers and footers with "local" page and style includes

";
75: if ($row['vstyle']=="mobile") $s=" checked"; 76: else $s=""; 77: echo " Mobile/Minimal
";
78: echo "Very minimal and absolute page style suitable for mobile browser and/or inline JS usage

";
79: if ($row['vstyle']=="plain") $s=" checked"; 80: else $s=""; 81: echo " Plain
";
82: echo "Totally plain output

";
83: 84: echo "
Link Types"; 88: if ($row['vclick']=="standard") $s=" checked"; 89: else $s=""; 90: echo " Standard
";
91: echo "Standard a href links for same window/frame

";
92: if ($row['vclick']=="frametop") $s=" checked"; 93: else $s=""; 94: echo " Same Window (Frame Top)
";
95: echo "a href link to the window/frame top

";
96: if ($row['vclick']=="newwindow") $s=" checked"; 97: else $s=""; 98: echo " New Window
";
99: echo "Open a New Window

";
100: if ($row['vclick']=="disabled") $s=" checked"; 101: else $s=""; 102: echo " Disabled
";
103: echo "No links (disabled)

";
104: 105: echo "
Refresh"; 107: echo ""; 108: echo " ".hlink("View:Refresh"); 109: echo "
Save
";
114: 115: ?> 116: 117: 118: 119: Screen_Footer(); 120: ?> 121: