File: 1.09.3a/server/web/view.link.php (View as HTML)

  1: <?php
  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<1) UL_Error("View Link");
 32: ob_end_flush();
 33: Screen_Header("View Links",1);
 34: $vid=$_REQUEST['viewid'];
 35: echo "<b class=\"subtitle\">Linking to View # ".$vid."</b><br>";
 36: echo "<a href=view.php?viewid=".$vid.">Preview View</a> | <a href=view.edit.php?viewid=".$vid.">Edit View Settings</a><br><br>";
 37: 
 38: $base=GetAbsolute("view.php?viewid=".$vid);
 39: echo "<b>URL:</b> ".$base."<br>";
 40: echo "<b>URL:</b> <input type=text size=80 value=\"".$base."\"><br><br>";
 41: 
 42: echo "<b>JavaScript Include Example</b> (Copy and paste into your page)<br>";
 43: echo "<textarea cols=80 rows=8>";
 44: echo "&lt;script type=\"text/javascript\" src=\"".$base."&mode=js\"&gt;\n";
 45: echo "&lt;/script&gt;\n";
 46: echo "</textarea>";
 47: if (!isset($_REQUEST['jsdemo']))
 48: 	{
 49: 	echo "<br><br><a href=view.link.php?viewid=".$vid."&jsdemo=1>Demo this working</a><br><br>";
 50: 	}
 51: else
 52: 	{
 53: 	echo "<br><br>";
 54: 	echo "<script type=\"text/javascript\" src=\"view.php?mode=js&viewid=".$vid."\"></script>\n";
 55: 	echo "<br><br>";
 56: 	}
 57: /*
 58: echo "<pre>";
 59: var_dump($_SERVER);
 60: echo "</pre>";
 61: */
 62: 
 63: echo "<br><br>";
 64: Screen_Footer();
 65: ?>