okay .... here goes
new file:
admin/subscriber_list.php
Code:
<?
/***************************\
a funkydunk creation : 2003
just cos i was taking a tea break - yes I know heather...it's not allowed :) - well it isn't tea really...beer
*/
require "../smarty.php";
require "../config.php";
require "./auth.php";
require "../include/security.php";
// put this to select all subscribers - that was the original post request
// this is the vastly complex query
$query = "SELECT * FROM $sql_tbl[maillist]";
// assign the results of the query to a variable thereby making it an array
$subscribers = func_query($query);
// give it to smarty to play with
$smarty->assign("subscribers",$subscribers);
// assign a value to $main so that the home.tpl knows you want to look at the right template
$smarty->assign("main", "subscribers");
// tell it what template is the placeholder
$smarty->display("single/home.tpl");
?>
in skin1/single/home.tpl
add in to the central area:
Code:
{elseif $main eq "subscribers"}
{include file="admin/main/subscriber_list.tpl"}
new template:
admin/main/subscriber_list.tpl
Code:
{* subscriber_list.tpl - funkydunk 2003 *}
{include file="location.tpl" last_location="Subscriber List"}
{if $smarty.get.usertype eq ""}
{capture name=dialog}
<table border="0" cellpadding="2" cellspacing="0" width="100%">
{section name=subscriber loop=$subscribers}
<tr>
<td valign="top">
<a href=mailto:{$subscribers[subscriber].email}>{$subscribers[subscriber].email}</a>
</td>
</tr>
{/section}
</table>
{/capture}
{include file="dialog.tpl" title="Subscriber List" content=$smarty.capture.dialog extra="width=100%"}
{/if}