mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 03:40:37 +02:00
Reorder admin page a bit
This commit is contained in:
@@ -11,8 +11,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/linkwords/admin_config.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/linkwords/admin_config.php,v $
|
||||||
| $Revision: 1.3 $
|
| $Revision: 1.4 $
|
||||||
| $Date: 2007-02-08 20:18:33 $
|
| $Date: 2007-03-06 20:17:10 $
|
||||||
| $Author: e107steved $
|
| $Author: e107steved $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -99,8 +99,8 @@ if (isset($_POST['submit_linkword']))
|
|||||||
{
|
{
|
||||||
$word = $tp -> toDB($_POST['linkword_word']);
|
$word = $tp -> toDB($_POST['linkword_word']);
|
||||||
$link = $tp -> toDB($_POST['linkword_link']);
|
$link = $tp -> toDB($_POST['linkword_link']);
|
||||||
$active = $_POST['linkword_active'];
|
$active = intval($_POST['linkword_active']);
|
||||||
$sql -> db_Insert("linkwords", "0, $active, '$word', '$link' ");
|
$sql -> db_Insert("linkwords", "0, {$active}, '{$word}', '{$link}' ");
|
||||||
$message = LWLAN_2;
|
$message = LWLAN_2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -129,48 +129,6 @@ if (isset($message))
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (($action == 'words') || ($action == 'edit'))
|
|
||||||
{
|
|
||||||
$text = "<div class='center'>\n";
|
|
||||||
if(!$sql -> db_Select("linkwords"))
|
|
||||||
{
|
|
||||||
$text .= LWLAN_4;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$text = "
|
|
||||||
<table style='".ADMIN_WIDTH."' class='fborder'>
|
|
||||||
<tr>
|
|
||||||
<td class='forumheader' style='width: 20%;'>".LWLAN_5."</td>
|
|
||||||
<td class='forumheader' style='width: 40%;'>".LWLAN_6."</td>
|
|
||||||
<td class='forumheader' style='width: 10%; text-align: center;'>".LWLAN_7."</td>
|
|
||||||
<td class='forumheader' style='width: 30%; text-align: center;'>".LWLAN_8."</td>
|
|
||||||
</tr>\n";
|
|
||||||
|
|
||||||
while($row = $sql -> db_Fetch())
|
|
||||||
{
|
|
||||||
extract($row);
|
|
||||||
$text .= "
|
|
||||||
|
|
||||||
<form action='".e_SELF."' method='post' id='myform_$linkword_id' onsubmit=\"return jsconfirm('".LWLAN_18." [ID: $linkword_id ]')\">
|
|
||||||
<tr>
|
|
||||||
<td class='forumheader' style='width: 20%;'>$linkword_word</td>
|
|
||||||
<td class='forumheader' style='width: 40%;'>$linkword_link</td>
|
|
||||||
<td class='forumheader' style='width: 10%; text-align: center;'>".(!$linkword_active ? LWLAN_12 : LWLAN_13)."</td>
|
|
||||||
<td class='forumheader' style='width: 30%; text-align: center;'>
|
|
||||||
<input class='button' type='button' onclick=\"document.location='".e_SELF."?edit.$linkword_id'\" value='".LWLAN_16."' id='edit_$linkword_id' name='edit_linkword_id' />
|
|
||||||
<input class='button' type='submit' value='".LWLAN_17."' id='delete_$linkword_id' name='delete_$linkword_id' />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</form>\n";
|
|
||||||
}
|
|
||||||
$text .= "</table>";
|
|
||||||
}
|
|
||||||
|
|
||||||
$text .= "</div>";
|
|
||||||
$ns -> tablerender(LWLAN_11, $text);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if($action == "edit")
|
if($action == "edit")
|
||||||
{
|
{
|
||||||
@@ -230,6 +188,50 @@ $ns -> tablerender(LWLAN_31, $text);
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Now display existing linkwords
|
||||||
|
if (($action == 'words') || ($action == 'edit'))
|
||||||
|
{
|
||||||
|
$text = "<div class='center'>\n";
|
||||||
|
if(!$sql -> db_Select("linkwords"))
|
||||||
|
{
|
||||||
|
$text .= LWLAN_4;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$text = "
|
||||||
|
<table style='".ADMIN_WIDTH."' class='fborder'>
|
||||||
|
<tr>
|
||||||
|
<td class='forumheader' style='width: 20%;'>".LWLAN_5."</td>
|
||||||
|
<td class='forumheader' style='width: 40%;'>".LWLAN_6."</td>
|
||||||
|
<td class='forumheader' style='width: 10%; text-align: center;'>".LWLAN_7."</td>
|
||||||
|
<td class='forumheader' style='width: 30%; text-align: center;'>".LWLAN_8."</td>
|
||||||
|
</tr>\n";
|
||||||
|
|
||||||
|
while($row = $sql -> db_Fetch())
|
||||||
|
{
|
||||||
|
extract($row);
|
||||||
|
$text .= "
|
||||||
|
|
||||||
|
<form action='".e_SELF."' method='post' id='myform_$linkword_id' onsubmit=\"return jsconfirm('".LWLAN_18." [ID: $linkword_id ]')\">
|
||||||
|
<tr>
|
||||||
|
<td class='forumheader' style='width: 20%;'>$linkword_word</td>
|
||||||
|
<td class='forumheader' style='width: 40%;'>$linkword_link</td>
|
||||||
|
<td class='forumheader' style='width: 10%; text-align: center;'>".(!$linkword_active ? LWLAN_12 : LWLAN_13)."</td>
|
||||||
|
<td class='forumheader' style='width: 30%; text-align: center;'>
|
||||||
|
<input class='button' type='button' onclick=\"document.location='".e_SELF."?edit.$linkword_id'\" value='".LWLAN_16."' id='edit_$linkword_id' name='edit_linkword_id' />
|
||||||
|
<input class='button' type='submit' value='".LWLAN_17."' id='delete_$linkword_id' name='delete_$linkword_id' />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</form>\n";
|
||||||
|
}
|
||||||
|
$text .= "</table>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$text .= "</div>";
|
||||||
|
$ns -> tablerender(LWLAN_11, $text);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($action=='options')
|
if ($action=='options')
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user