Implemented linker - class for admin_admins.php
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
This commit is contained in:
@@ -35,6 +35,7 @@ class linker
|
||||
$this->hostname = $hostname;
|
||||
$this->port = $port;
|
||||
$this->filename = $file;
|
||||
# @TODO: Remove this
|
||||
$this->args['s'] = $sessionid;
|
||||
}
|
||||
|
||||
@@ -72,6 +73,7 @@ class linker
|
||||
{
|
||||
# Just resetting the array
|
||||
# Until the sessionid can be removed: save it
|
||||
# @TODO: Remove this
|
||||
$this->args = array('s' => $this->args['s']);
|
||||
}
|
||||
|
||||
@@ -122,10 +124,12 @@ class linker
|
||||
}
|
||||
|
||||
# temporary until frontcontroller exists
|
||||
# We got a section in the URL -> add area and section as filename
|
||||
# We got a section in the URL -> morph AREA and section into filename
|
||||
# @TODO: Remove this
|
||||
if (isset($this->args['section']))
|
||||
{
|
||||
$link .= AREA . '_' . $this->args['section'] . '.php';
|
||||
unset($this->args['section']);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -144,10 +148,10 @@ class linker
|
||||
# Loop through arguments and add them to the link
|
||||
foreach ($this->args as $key => $value)
|
||||
{
|
||||
# For all but the first argument, prepend "&"
|
||||
# For all but the first argument, prepend "&"
|
||||
if (substr($link, -1) != "?")
|
||||
{
|
||||
$link .= "&";
|
||||
$link .= "&";
|
||||
}
|
||||
|
||||
# Encode parameters and add them to the link
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
$header
|
||||
<form action="$filename" method="post">
|
||||
<form action="{$linker->getLink(array('section' => 'admins'))}" method="post">
|
||||
<input type="hidden" name="s" value="$s"/>
|
||||
<input type="hidden" name="page" value="$page"/>
|
||||
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
|
||||
@@ -36,7 +36,7 @@ $header
|
||||
</tr>
|
||||
</if>
|
||||
<tr>
|
||||
<td class="field_display_border_left" colspan="<if ($settings['ticket']['enabled'] == 1 || $settings['autoresponder']['autoresponder_active'] == 1) >10<else>9</if>"><a href="$filename?page=$page&action=add&s=$s">{$lng['admin']['admin_add']}</a></td>
|
||||
<td class="field_display_border_left" colspan="<if ($settings['ticket']['enabled'] == 1 || $settings['autoresponder']['autoresponder_active'] == 1) >10<else>9</if>"><a href="{$linker->getLink(array('section' => 'admins', 'page' => $page, 'action' => 'add'))}">{$lng['admin']['admin_add']}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
$header
|
||||
<form method="post" action="$filename">
|
||||
<form method="post" action="{$linker->getLink(array('section' => 'admins'))}">
|
||||
<input type="hidden" name="s" value="$s" />
|
||||
<input type="hidden" name="page" value="$page" />
|
||||
<input type="hidden" name="action" value="$action" />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<tr class="" onmouseover="this.className='RowOverSelected';" onmouseout="this.className='';">
|
||||
<td class="field_name_border_left"><if $row['adminid'] != $userinfo['userid']><a href="$filename?s=$s&page=$page&action=su&id={$row['adminid']}" target="_blank">{$row['loginname']}</a></if><if $row['adminid'] == $userinfo['userid']>{$row['loginname']}</if></td>
|
||||
<td class="field_name_border_left"><if $row['adminid'] != $userinfo['userid']><a href="{$linker->getLink(array('section' => 'admins', 'page' => $page, 'action' => 'su', 'id' => $row['adminid']))}" target="_blank">{$row['loginname']}</a></if><if $row['adminid'] == $userinfo['userid']>{$row['loginname']}</if></td>
|
||||
<td class="field_name">{$row['name']}</td>
|
||||
<td class="field_name"><b><font color="green">{$row['customers_used']}</font></b>/<b><font color="#FD6204">{$row['customers']}</font></b><br /><b><font color="green">{$row['domains_used']}</font></b>/<b><font color="#FD6204">{$row['domains']}</font></b></td>
|
||||
<td class="field_name"><b><font color="green">{$row['diskspace_used']}</font></b>/<b><font color="#FD6204">{$row['diskspace']}</font></b> (MB)<br /><b><font color="green">{$row['traffic_used']}</font></b>/<b><font color="#FD6204">{$row['traffic']}</font></b> (GB)</td>
|
||||
@@ -22,5 +22,5 @@
|
||||
<td class="field_name"><b><font color="green">{$row['emails_used']}</font></b>/<b><font color="#FD6204">{$row['emails']}</font></b><br /><b><font color="green">{$row['subdomains_used']}</font></b>/<b><font color="#FD6204">{$row['subdomains']}</font></b></td>
|
||||
<td class="field_name"><b><font color="green">{$row['email_accounts_used']}</font></b>/<b><font color="#FD6204">{$row['email_accounts']}</font></b><br /><b><font color="green">{$row['email_forwarders_used']}</font></b>/<b><font color="#FD6204">{$row['email_forwarders']}</font></b></td>
|
||||
<td class="field_name" style=" text-align: center; "><if $row['deactivated'] == '1'>{$lng['panel']['yes']}<else>{$lng['panel']['no']}</if></td>
|
||||
<td class="field_name"><a href="$filename?s=$s&page=$page&action=edit&id={$row['adminid']}">{$lng['panel']['edit']}</a><br /><a href="$filename?s=$s&page=$page&action=delete&id={$row['adminid']}">{$lng['panel']['delete']}</a></td>
|
||||
<td class="field_name"><a href="{$linker->getLink(array('section' => 'admins', 'page' => $page, 'action' => 'edit', 'id' => $row['adminid']))}">{$lng['panel']['edit']}</a><br /><a href="{$linker->getLink(array('section' => 'admins', 'page' => $page, 'action' => 'delete', 'id' => $row['adminid']))}">{$lng['panel']['delete']}</a></td>
|
||||
</tr>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
$header
|
||||
<form method="post" action="$filename">
|
||||
<form method="post" action="{$linker->getLink(array('section' => 'admins'))}">
|
||||
<input type="hidden" name="s" value="$s" />
|
||||
<input type="hidden" name="page" value="$page" />
|
||||
<input type="hidden" name="action" value="$action" />
|
||||
|
||||
@@ -9,7 +9,7 @@ $header
|
||||
|
||||
<section>
|
||||
|
||||
<form action="$filename" method="post" enctype="application/x-www-form-urlencoded">
|
||||
<form action="{$linker->getLink(array('section' => 'admins'))}" method="post" enctype="application/x-www-form-urlencoded">
|
||||
|
||||
<div class="overviewsearch">
|
||||
{$searchcode}
|
||||
@@ -18,7 +18,7 @@ $header
|
||||
<if 15 < $count >
|
||||
<div class="overviewadd">
|
||||
<img src="images/Froxlor/icons/user_add.png" alt="" />
|
||||
<a href="$filename?page=$page&action=add&s=$s">{$lng['admin']['admin_add']}</a>
|
||||
<a href="{$linker->getLink(array('section' => 'admins', 'page' => $page, 'action' => 'add'))}">{$lng['admin']['admin_add']}</a>
|
||||
</div>
|
||||
</if>
|
||||
|
||||
@@ -53,7 +53,7 @@ $header
|
||||
|
||||
<div class="overviewadd">
|
||||
<img src="images/Froxlor/icons/user_add.png" alt="" />
|
||||
<a href="$filename?page=$page&action=add&s=$s">{$lng['admin']['admin_add']}</a>
|
||||
<a href="{$linker->getLink(array('section' => 'admins', 'page' => $page, 'action' => 'add'))}">{$lng['admin']['admin_add']}</a>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
@@ -9,7 +9,7 @@ $header
|
||||
|
||||
<section class="fullform bradiusodd">
|
||||
|
||||
<form action="$filename" method="post" enctype="application/x-www-form-urlencoded">
|
||||
<form action="{$linker->getLink(array('section' => 'admins'))}" method="post" enctype="application/x-www-form-urlencoded">
|
||||
<fieldset>
|
||||
<legend>Froxlor - {$title}</legend>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<strong>
|
||||
{$row['name']}
|
||||
<if $row['adminid'] != $userinfo['userid']>
|
||||
(<a href="$filename?s=$s&page=$page&action=su&id={$row['adminid']}" rel="external">{$row['loginname']}</a>)
|
||||
(<a href="{$linker->getLink(array('section' => 'admins', 'page' => $page, 'action' => 'su', 'id' => $row['adminid']))}" rel="external">{$row['loginname']}</a>)
|
||||
</if>
|
||||
<if $row['adminid'] == $userinfo['userid']>
|
||||
({$row['loginname']})
|
||||
@@ -50,10 +50,10 @@
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<a href="$filename?s=$s&page=$page&action=edit&id={$row['adminid']}" style="text-decoration:none;">
|
||||
<a href="{$linker->getLink(array('section' => 'admins', 'page' => $page, 'action' => 'edit', 'id' => $row['adminid']))}" style="text-decoration:none;">
|
||||
<img src="images/Froxlor/icons/edit.png" alt="{$lng['panel']['edit']}" />
|
||||
</a>
|
||||
<a href="$filename?s=$s&page=$page&action=delete&id={$row['adminid']}" style="text-decoration:none;">
|
||||
<a href="{$linker->getLink(array('section' => 'admins', 'page' => $page, 'action' => 'delete', 'id' => $row['adminid']))}" style="text-decoration:none;">
|
||||
<img src="images/Froxlor/icons/delete.png" alt="{$lng['panel']['delete']}" />
|
||||
</a>
|
||||
</td>
|
||||
|
||||
@@ -15,7 +15,7 @@ $header
|
||||
|
||||
<section class="fullform bradiusodd">
|
||||
|
||||
<form action="$filename" method="post" enctype="application/x-www-form-urlencoded">
|
||||
<form action="{$linker->getLink(array('section' => 'admins'))}" method="post" enctype="application/x-www-form-urlencoded">
|
||||
<fieldset>
|
||||
<legend>Froxlor - {$title}</legend>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user