Implemented linker - class for admin_index.php -> change_[theme|language|password], more to come
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
This commit is contained in:
@@ -114,7 +114,6 @@ class linker
|
|||||||
$link .= '/';
|
$link .= '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
$link .= $this->filename;
|
|
||||||
|
|
||||||
# Overwrite $this->args with parameters of this function (if necessary)
|
# Overwrite $this->args with parameters of this function (if necessary)
|
||||||
if(func_num_args() == 1 && is_array(func_get_arg(0)))
|
if(func_num_args() == 1 && is_array(func_get_arg(0)))
|
||||||
@@ -122,6 +121,17 @@ class linker
|
|||||||
$this->args = array_merge($this->args, func_get_arg(0));
|
$this->args = array_merge($this->args, func_get_arg(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# temporary until frontcontroller exists
|
||||||
|
# We got a section in the URL -> add area and section as filename
|
||||||
|
if (isset($this->args['section']))
|
||||||
|
{
|
||||||
|
$link .= AREA . '_' . $this->args['section'] . '.php';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$link .= $this->filename;
|
||||||
|
}
|
||||||
|
|
||||||
# Let's see if we are done (no arguments in query)
|
# Let's see if we are done (no arguments in query)
|
||||||
if (count($this->args) == 0)
|
if (count($this->args) == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -306,6 +306,10 @@ if($language != 'English')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Initialize our new link - class
|
||||||
|
|
||||||
|
$linker = new linker('index.php', $s);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* global Theme-variable
|
* global Theme-variable
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
$header
|
$header
|
||||||
<form method="post" action="$filename">
|
<form method="post" action="{$linker->getLink(array('section' => 'index'))}">
|
||||||
<input type="hidden" name="s" value="$s" />
|
<input type="hidden" name="s" value="$s" />
|
||||||
<input type="hidden" name="page" value="$page" />
|
<input type="hidden" name="page" value="$page" />
|
||||||
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_60">
|
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_60">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
$header
|
$header
|
||||||
<form method="post" action="$filename">
|
<form method="post" action="{$linker->getLink(array('section' => 'index'))}">
|
||||||
<input type="hidden" name="s" value="$s" />
|
<input type="hidden" name="s" value="$s" />
|
||||||
<input type="hidden" name="page" value="$page" />
|
<input type="hidden" name="page" value="$page" />
|
||||||
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_60">
|
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_60">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
$header
|
$header
|
||||||
<form method="post" action="$filename">
|
<form method="post" action="{$linker->getLink(array('section' => 'index'))}">
|
||||||
<input type="hidden" name="s" value="$s" />
|
<input type="hidden" name="s" value="$s" />
|
||||||
<input type="hidden" name="page" value="$page" />
|
<input type="hidden" name="page" value="$page" />
|
||||||
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_60">
|
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_60">
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ $header
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<section class="tinyform bradiusodd">
|
<section class="tinyform bradiusodd">
|
||||||
<form method="post" action="$filename" enctype="application/x-www-form-urlencoded">
|
<form method="post" action="{$linker->getLink(array('section' => 'index'))}" enctype="application/x-www-form-urlencoded">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>Froxlor - {$lng['menue']['main']['changelanguage']}</legend>
|
<legend>Froxlor - {$lng['menue']['main']['changelanguage']}</legend>
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ $header
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<section class="tinyform bradiusodd">
|
<section class="tinyform bradiusodd">
|
||||||
<form method="post" action="$filename" enctype="application/x-www-form-urlencoded">
|
<form method="post" action="{$linker->getLink(array('section' => 'index'))}" enctype="application/x-www-form-urlencoded">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>Froxlor - {$lng['menue']['main']['changepassword']}</legend>
|
<legend>Froxlor - {$lng['menue']['main']['changepassword']}</legend>
|
||||||
<p>
|
<p>
|
||||||
<label for="old_password">{$lng['changepassword']['old_password']}:</label>
|
<label for="old_password">{$lng['changepassword']['old_password']}:</label>
|
||||||
<input type="password" id="old_password" name="old_password" />
|
<input type="password" id="old_password" name="old_password" />
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ $header
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<section class="tinyform bradiusodd">
|
<section class="tinyform bradiusodd">
|
||||||
<form method="post" action="$filename" enctype="application/x-www-form-urlencoded">
|
<form method="post" action="{$linker->getLink(array('section' => 'index'))}" enctype="application/x-www-form-urlencoded">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>Froxlor - {$lng['menue']['main']['changetheme']}</legend>
|
<legend>Froxlor - {$lng['menue']['main']['changetheme']}</legend>
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
Reference in New Issue
Block a user