Fetching contributors…
Cannot retrieve contributors at this time
executable file 65 lines (49 sloc) 1.92 KB
<?php /*
Copyright (c) ocProducts, 2004-2012
See text/EN/licence.txt for full licencing information.
Do not edit this file. If you need to make changes, save your changed file to the appropriate *_custom folder
**** If you ignore this advice, then your website upgrades (e.g. for bug fixes) will likely kill your changes ****
* @license Common Public Attribution License
* @copyright ocProducts Ltd
* @package msn
* Get a netlink block / direct to a netlink site.
* @param URLPATH The URL we grab our netlink from. If this is not blank, instead of getting a netlink block, we direct to a netlink site.
* @return tempcode The netlink block
function do_netlink($redir_url='')
header('Content-type: text/plain; charset='.get_charset());
// If we are redirecting
if ($redir_url!='')
if ((strpos($redir_url,chr(10))!==false) || (strpos($redir_url,chr(13))!==false))
header('Location: '.$redir_url);
// Ok we're displaying a netlink, which will be dumped right into the body of the reading site
// - this isn't actually a weburl that is actually displayed, its loaded by ocPortal and embedded-inline
// For all the names in our network
if (count($lines)==0) return new ocp_tempcode();
$content=new ocp_tempcode();
foreach ($lines as $line)
if (count($parts)!=2) continue;
// Are we looking at the source site in the network?
return do_template('NETLINK',array('_GUID'=>'180321222dc5dc99a231597c803f0726','CONTENT'=>$content));