mirror of
https://github.com/e107inc/e107.git
synced 2025-08-07 07:06:30 +02:00
Gui fixes in newsfeed plugin.
This commit is contained in:
@@ -25,6 +25,9 @@ require_once(e_ADMIN."auth.php");
|
|||||||
|
|
||||||
define('NEWSFEED_LIST_CACHE_TAG', 'nomd5_newsfeeds');
|
define('NEWSFEED_LIST_CACHE_TAG', 'nomd5_newsfeeds');
|
||||||
|
|
||||||
|
$frm = e107::getForm();
|
||||||
|
$mes = e107::getMessage();
|
||||||
|
|
||||||
if (e_QUERY)
|
if (e_QUERY)
|
||||||
{
|
{
|
||||||
list($action, $id) = explode(".", e_QUERY);
|
list($action, $id) = explode(".", e_QUERY);
|
||||||
@@ -90,7 +93,8 @@ if($action == "delete")
|
|||||||
|
|
||||||
if (isset($message))
|
if (isset($message))
|
||||||
{
|
{
|
||||||
$ns->tablerender("", "<div style='text-align:center'><b>".$message."</b></div>");
|
$mes->addInfo($message);
|
||||||
|
// $ns->tablerender("", "<div style='text-align:center'><b>".$message."</b></div>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -99,13 +103,21 @@ if($headline_total = $sql->db_Select("newsfeed"))
|
|||||||
$nfArray = $sql -> db_getList();
|
$nfArray = $sql -> db_getList();
|
||||||
|
|
||||||
$text = "<div style='text-align:center'>
|
$text = "<div style='text-align:center'>
|
||||||
<table class='fborder' style='".ADMIN_WIDTH.";'>
|
<table class='table adminform'>
|
||||||
|
<colgroup>
|
||||||
|
<col style='width: 5%; text-align: center;' />
|
||||||
|
<col style='width: 50%;' />
|
||||||
|
<col style='width: 10%; text-align: center;' />
|
||||||
|
<col style='width: 25%; text-align: center;' />
|
||||||
|
<col style='width: 10%; text-align: center;' />
|
||||||
|
</colgroup>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class='forumheader' style='width: 5%; text-align: center;'>ID</td>
|
<td>ID</td>
|
||||||
<td class='forumheader' style='width: 50%;'>".NFLAN_30."</td>
|
<td>".NFLAN_30."</td>
|
||||||
<td class='forumheader' style='width: 10%; text-align: center;'>".NFLAN_26."</td>
|
<td>".NFLAN_26."</td>
|
||||||
<td class='forumheader' style='width: 25%; text-align: center;'>".NFLAN_12."</td>
|
<td>".NFLAN_12."</td>
|
||||||
<td class='forumheader' style='width: 10%; text-align: center;'>".NFLAN_27."</td>
|
<td>".NFLAN_27."</td>
|
||||||
</tr>\n";
|
</tr>\n";
|
||||||
|
|
||||||
$active = array(NFLAN_13,NFLAN_14,NFLAN_20,NFLAN_21);
|
$active = array(NFLAN_13,NFLAN_14,NFLAN_20,NFLAN_21);
|
||||||
@@ -114,11 +126,11 @@ if($headline_total = $sql->db_Select("newsfeed"))
|
|||||||
{
|
{
|
||||||
extract($newsfeed);
|
extract($newsfeed);
|
||||||
|
|
||||||
$text .= "<tr><td class='forumheader3' style='width: 5%; text-align: center;'>$newsfeed_id</td>
|
$text .= "<tr><td>$newsfeed_id</td>
|
||||||
<td class='forumheader3' style='width: 50%;'><a href='$newsfeed_url' rel='external'>$newsfeed_name</a></td>
|
<td><a href='$newsfeed_url' rel='external'>$newsfeed_name</a></td>
|
||||||
<td class='forumheader3' style='width: 10%; text-align: center;'>".($newsfeed_updateint ? $newsfeed_updateint : "3600")."</td>
|
<td>".($newsfeed_updateint ? $newsfeed_updateint : "3600")."</td>
|
||||||
<td class='forumheader3' style='width: 25%; text-align: center;'>".$active[$newsfeed_active]."</td>
|
<td>".$active[$newsfeed_active]."</td>
|
||||||
<td class='forumheader3' style='width: 10%; text-align: center;'><a href='".e_SELF."?edit.".$newsfeed_id."'>".ADMIN_EDIT_ICON."</a> <a href='".e_SELF."?delete.".$newsfeed_id."'>".ADMIN_DELETE_ICON."</a></td>
|
<td><a href='".e_SELF."?edit.".$newsfeed_id."'>".ADMIN_EDIT_ICON."</a> <a href='".e_SELF."?delete.".$newsfeed_id."'>".ADMIN_DELETE_ICON."</a></td>
|
||||||
</tr>\n";
|
</tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,9 +138,10 @@ if($headline_total = $sql->db_Select("newsfeed"))
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$text = NFLAN_41;
|
$mes->addInfo(NFLAN_41);
|
||||||
|
// $text = NFLAN_41;
|
||||||
}
|
}
|
||||||
$ns->tablerender(NFLAN_07, $text);
|
$ns->tablerender(NFLAN_07, $mes->render(). $text);
|
||||||
|
|
||||||
if($action == "edit")
|
if($action == "edit")
|
||||||
{
|
{
|
||||||
@@ -144,13 +157,17 @@ else
|
|||||||
unset($newsfeed_showmenu, $newsfeed_showmain, $newsfeed_name, $newsfeed_url, $newsfeed_image, $newsfeed_description, $newsfeed_updateint, $newsfeed_active);
|
unset($newsfeed_showmenu, $newsfeed_showmain, $newsfeed_name, $newsfeed_url, $newsfeed_image, $newsfeed_description, $newsfeed_updateint, $newsfeed_active);
|
||||||
}
|
}
|
||||||
|
|
||||||
$text = "<div style='text-align:center'>
|
$text = "
|
||||||
<form method='post' action='".e_SELF."'>\n
|
<form method='post' action='".e_SELF."'>\n
|
||||||
<table style='".ADMIN_WIDTH."' class='fborder'>
|
<table class='table adminform'>
|
||||||
|
<colgroup>
|
||||||
|
<col class='col-label' />
|
||||||
|
<col style='col-control' />
|
||||||
|
</colgroup>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:50%' class='forumheader3'>".NFLAN_30."</td>
|
<td>".NFLAN_30."</td>
|
||||||
<td style='width:50%; text-align: left;' class='forumheader3'>
|
<td>
|
||||||
<input class='tbox' type='text' name='newsfeed_name' size='80' value='$newsfeed_name' maxlength='200' />
|
<input class='tbox' type='text' name='newsfeed_name' size='80' value='$newsfeed_name' maxlength='200' />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -158,36 +175,36 @@ $text = "<div style='text-align:center'>
|
|||||||
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:50%' class='forumheader3'>".NFLAN_10."</td>
|
<td>".NFLAN_10."</td>
|
||||||
<td style='width:50%; text-align: left;' class='forumheader3'>
|
<td>
|
||||||
<input class='tbox' type='text' name='newsfeed_url' size='80' value='$newsfeed_url' maxlength='250' />
|
<input class='tbox' type='text' name='newsfeed_url' size='80' value='$newsfeed_url' maxlength='250' />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:50%' class='forumheader3'>".NFLAN_11."<br /><span class='smalltext'>".NFLAN_17."</span></td>
|
<td>".NFLAN_11."<br /><span class='smalltext'>".NFLAN_17."</span></td>
|
||||||
<td style='width:50%; text-align: left;' class='forumheader3'>
|
<td>
|
||||||
<input class='tbox' type='text' name='newsfeed_image' size='80' value='$newsfeed_image' maxlength='200' />
|
<input class='tbox' type='text' name='newsfeed_image' size='80' value='$newsfeed_image' maxlength='200' />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:50%' class='forumheader3'>".NFLAN_36."<br /><span class='smalltext'>".NFLAN_37."</span></td>
|
<td>".NFLAN_36."<br /><span class='smalltext'>".NFLAN_37."</span></td>
|
||||||
<td style='width:50%; text-align: left;' class='forumheader3'>
|
<td>
|
||||||
<input class='tbox' type='text' name='newsfeed_description' size='80' value='$newsfeed_description' maxlength='200' />
|
<input class='tbox' type='text' name='newsfeed_description' size='80' value='$newsfeed_description' maxlength='200' />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:50%' class='forumheader3'>".NFLAN_18."<br /><span class='smalltext'>".NFLAN_19."</span></td>
|
<td>".NFLAN_18."<br /><span class='smalltext'>".NFLAN_19."</span></td>
|
||||||
<td style='width:50%; text-align: left;' class='forumheader3'>
|
<td>
|
||||||
<input class='tbox' type='text' name='newsfeed_updateint' size='5' value='".($newsfeed_updateint ? $newsfeed_updateint : "3600")."' maxlength='200' />
|
<input class='tbox' type='text' name='newsfeed_updateint' size='5' value='".($newsfeed_updateint ? $newsfeed_updateint : "3600")."' maxlength='200' />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:50%' class='forumheader3'>".NFLAN_12."<br /><span class='smalltext'>".NFLAN_22."</span></td>
|
<td>".NFLAN_12."<br /><span class='smalltext'>".NFLAN_22."</span></td>
|
||||||
<td style='width:50%; text-align: left;' class='forumheader3'>
|
<td>
|
||||||
|
|
||||||
<input type='radio' name='newsfeed_active' value='0'".(!$newsfeed_active ? " checked='checked'" : "")." /> ".NFLAN_13." <br />
|
<input type='radio' name='newsfeed_active' value='0'".(!$newsfeed_active ? " checked='checked'" : "")." /> ".NFLAN_13." <br />
|
||||||
<input type='radio' name='newsfeed_active' value='1'".($newsfeed_active == 1 ? " checked='checked'" : "")." /> ".NFLAN_14." <br />
|
<input type='radio' name='newsfeed_active' value='1'".($newsfeed_active == 1 ? " checked='checked'" : "")." /> ".NFLAN_14." <br />
|
||||||
@@ -197,31 +214,28 @@ $text = "<div style='text-align:center'>
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:50%' class='forumheader3'>".NFLAN_45."<br /><span class='smalltext'>".NFLAN_47."</span></td>
|
<td>".NFLAN_45."<br /><span class='smalltext'>".NFLAN_47."</span></td>
|
||||||
<td style='width:50%; text-align: left;' class='forumheader3'>
|
<td>
|
||||||
<input class='tbox' type='text' name='newsfeed_showmenu' size='5' value='".($newsfeed_showmenu ? $newsfeed_showmenu : "0")."' maxlength='200' />
|
<input class='tbox' type='text' name='newsfeed_showmenu' size='5' value='".($newsfeed_showmenu ? $newsfeed_showmenu : "0")."' maxlength='200' />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:50%' class='forumheader3'>".NFLAN_46."<br /><span class='smalltext'>".NFLAN_47."</span></td>
|
<td>".NFLAN_46."<br /><span class='smalltext'>".NFLAN_47."</span></td>
|
||||||
<td style='width:50%; text-align: left;' class='forumheader3'>
|
<td>
|
||||||
<input class='tbox' type='text' name='newsfeed_showmain' size='5' value='".($newsfeed_showmain ? $newsfeed_showmain : "0")."' maxlength='200' />
|
<input class='tbox' type='text' name='newsfeed_showmain' size='5' value='".($newsfeed_showmain ? $newsfeed_showmain : "0")."' maxlength='200' />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr style='vertical-align:top'>
|
|
||||||
<td colspan='2' style='text-align:center' class='forumheader'>
|
|
||||||
<input class='button' type='submit' name='".($action == "edit" ? "updateFeed" : "createFeed")."' value='".($action == "edit" ? NFLAN_16 : NFLAN_15)."' />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
<div class='buttons-bar center'>
|
||||||
|
".$frm->admin_button(($action == "edit" ? "updateFeed" : "createFeed"),($action == "edit" ? NFLAN_16 : NFLAN_15),'update')."
|
||||||
|
</div>
|
||||||
".($action == "edit" ? "<input type='hidden' name='newsfeed_id' value='$newsfeed_id' />" : "")."
|
".($action == "edit" ? "<input type='hidden' name='newsfeed_id' value='$newsfeed_id' />" : "")."
|
||||||
</form>
|
</form>
|
||||||
</div>";
|
";
|
||||||
|
|
||||||
$ns->tablerender(NFLAN_09, $text);
|
$ns->tablerender(NFLAN_09, $mes->render(). $text);
|
||||||
|
|
||||||
require_once(e_ADMIN."footer.php");
|
require_once(e_ADMIN."footer.php");
|
||||||
?>
|
?>
|
Reference in New Issue
Block a user