<h3>{#admin#}</h3>
{if hasPerm('node', 'change') }
<a name="network"></a>
<table class="tab">
<tr>
<td nowrap class="tab">{#Node_network#}</td>
</tr>
</table>
<table class="tabarea">
<tr>
<td class="tabarea">
<form>
<table>
<tr>
<td>{#node_id#}:</td><td> {$LOCAL_NODE.node_id}</td>
</tr>
<tr>
<td>{#node_name#}:</td><td> {$LOCAL_NODE.name}</td>
</tr>
<tr>
<td>{#node_desc#}:</td>
<td><textarea onChange="if(value != defaultValue) data_changed++;" cols="50" rows="3" name="desc">{$LOCAL_NODE.description}</textarea>
</td>
</tr>
</table>
<input type="submit" name="save" value="{#save#}">
</form>
<form>
{if $NEIGHBOURS}
<table>
<tr class="listhead">
<th>{#node#}</th>
<th>{#accept_incoming#}</th>
<th>{#use_for_outgoing#}</th>
<th>{#last_sync_in#}</th>
<th>{#last_sync_out#}</th>
<th>{#err_succ#}</th>
</tr>
{cycle name="roles" values="list1,list2" print=false advance=false}
{foreach item=item from=$NEIGHBOURS}
<tr class="{cycle name=roles}">
<td>
{if $item.pending_url}
<a href="{$item.pending_url}">{#pending#}: {$item.node_id}</a>
{else}
<a href="{$item.node.url}">{$item.node.name}</a>
{/if}
</td>
<td>
{if $item.accept_incoming eq 't'}{#Yes#}{else}{#No#}{/if}
</td>
<td>
{if $item.use_for_outgoing eq 't'}{#Yes#}{else}{#No#}{/if}
</td>
<td>
{$item.last_sync_in}
</td>
<td>
{$item.last_sync_out}
</td>
<td>
{$item.success}/{$item.errors}
</td>
<td nowrap>
<input class="action" type="button" name="b1" value="{#sync#}" onClick="redir(this.form, 'admin.php?sync=1&nodeid={$item.node_id}')" />
<input class="action" type="button" name="b1" value="{#change#}" onClick="popup('editNeighbour.php?nodeid={$item.node_id}','EditNeighbour',350,400,false)" />
<input class="action" type="button" name="b1" value="{#delete#}" onClick="redir(this.form, 'admin.php?delneighbour=1&nodeid={$item.node_id}')" />
<!-- <a href="admin.php?sync=1&full=1&nodeid={$item.node_id}">{#full_sync#}</a> {#full_sync_expl#} -->
</td>
</tr>
{/foreach}
</table>
{else}
<p>{#standalone_node#}</p>
{/if}
<p>
<input class="action" type="button" name="b1" value="{#add_neighbour#}" onClick="popup('createNeighbour.php','CreateNeighbour',400,400,false)" />
</p>
</form>
</td>
</tr>
</table>
{/if}
<p></p>
{if hasPerm('node', 'authorize') }
<a name="perms"></a>
<table class="tab">
<tr>
<td nowrap class="tab">{#access_permissions#}</td>
</tr>
</table>
<table class="tabarea">
<tr>
<td class="tabarea">
{if $PERMISSIONS}
<form>
<table>
<tr class="listhead"><th>{#username#}</th><th>{#permissions#}</th><th>{#actions#}</th></tr>
{cycle name="perms" values="list1,list2" print=false advance=false}
{foreach item=user key=userid from=$PERMISSIONS}
<tr class="{cycle name=perms}">
<td>{$user.name}</td>
<td>
{section name=i loop=$user.permissions}
{$user.permissions[i]}{if ! $smarty.section.i.last}, {/if}
{/section}
</td>
<td nowrap>
{if $USERNAME ne $user.name}
<input class="action" type="button" name="b1" value="{#change#}" onClick="popup('editPermissions.php?context=node&objectid=node&objectname={#node#}&userid={$userid}','Permissions',350,400,false)" />
<input class="action" type="button" name="b1" value="{#delete#}" onClick="redir(this.form, 'admin.php?delperm=1&userid={$userid}')" />
{/if}
</td>
</tr>
{/foreach}
</table>
</form>
{else}
<p>{#no_users#}</p>
{/if}
<input type="button" name="addperm" value="{#change_perm#}" onClick="popup('editPermissions.php?context=node&objectid=node&objectname={#node#}','Permissions',450,450, false)">
</td>
</tr>
</table>
{/if}
<p></p>
{if hasPerm('node', 'change') }
<a name="xbmf"></a>
<table class="tab">
<tr>
<td nowrap class="tab">{#arrived_xbmf#}</td>
</tr>
</table>
<table class="tabarea">
<tr>
<td class="tabarea">
{if $XBMF}
<form>
<table>
<!-- <tr class="listhead"><th>{#username#}</th><th>{#permissions#}</th><th>{#actions#}</th></tr> -->
{cycle name="perms" values="list1,list2" print=false advance=false}
{foreach item=xbmf from=$XBMF}
<tr class="{cycle name=perms}">
<td>{$xbmf}</td>
<td nowrap>
<input class="action" type="button" name="b1" value="{#import#}" onClick="popup('admin.php?import_xbmf={$xbmf|escape}','XBMF',350,400,true)" />
</td>
</tr>
{/foreach}
</table>
</form>
{/if}
</td>
</tr>
</table>
<p></p>
<table class="tab">
<tr>
<td nowrap class="tab">{#debug_log#}</td>
</tr>
</table>
<table class="tabarea">
<tr>
<td class="tabarea">
<table width="100%">
<tr><td>
<form method="post">
<table>
<tr>
<td>
<input type="checkbox" name="debug" {if $VARS.debug}CHECKED{/if} >
</td>
<td>{#debug_expl#}</td>
</tr>
<tr>
<td>
<input type="checkbox" name="debug_sql" {if $VARS.debug_sql}CHECKED{/if} >
</td>
<td>{#debug_sql_expl#}</td>
</tr>
<tr>
<td>
<input type="checkbox" name="debug_smarty" {if $VARS.debug_smarty}CHECKED{/if} >
</td>
<td>{#debug_smarty_expl#}</td>
</tr>
<tr>
<td>
<input type="checkbox" name="smarty_compile_check" {if $VARS.smarty_compile_check}CHECKED{/if} >
</td>
<td>{#compile_check_expl#}</td>
</tr>
</table>
<input type="submit" name="save_debug" value="{#save#}">
</form>
</td>
<td>
<a target="log" href="log.php#end">{#view_log#}</a>
<br /><a target="config" href="viewConfig.php">{#view_config#}</a>
<br /><a href="admin.php?retemplate=1">{#recompile_templates#}</a>
<br /><a href="admin.php?updatetopics=1">{#update_topic_counts#}</a>
<br /><a href="phpinfo.php">phpinfo()</a>
<br /><a href="admin.php?updatecvs=1">{#update_from_cvs#}</a>
</td></tr>
</table>
</td>
</tr>
</table>
<p></p>
{/if}