Estoy realizando un módulo para la edición de PHP Nuke ETruzone y me he topado con un problemilla. Bien el módulo es un boletín al que los usuarios se subscriben y se le envía por medio del Portal semanalmente. Ahora ya casi tengo completado el script. Ahora tengo una duda. Yo he realizado una función que contiene una variable $textbody que se le va agregando texto HTML miren este ejemplo:
Código PHP:
if ($moddescargas >= 1) {
$textbody = "<table width=\"95%\" align=\"center\">"
."<tr>"
."<td width=\"100%\" height=\"20\" bgcolor=\"#6699CC\"><img src=\"".$nukeurl."/modules/".$module_name."/images/boletin/icon_www.jpg\" border=0 align='absmiddle'> <a href=\"".$nukeurl."/modules.php?name=Downloads\" title=\"Our latest downloads\" target=\"_blank\"><b><font size='3' color='#FFFFFF'>".$moddescargas." "._NBMDOWN."</font></b></a></td>"
."</tr>"
."</table>\n";
$textbody .= "<table width=\"95%\" align=\"center\">"
."<tr bgcolor=\"#ABABAB\">"
."<td width=\"100%\"> <font size='2' color='#ffffff'><b>"._NBMELTITLE."</b></font></td>"
."<td width=\"45\" align='center' nowrap><font size='2' color='#FFFFFF'><b>"._NBMDOWNVISITAS."</b></font></td>"
."</tr>"
."</table>\n";
$querydown = $db->sql_query("select lid, cid, sid, title, description, date, hits from ".$prefix."_downloads_downloads order by lid desc limit 0, $moddescargas");
$numdown = $db->sql_numrows($querydown);
for($i = 0; $i < $numero; $i++){
list($lid, $cid, $sid, $title, $description, $time, $hits)= $db->sql_fetchrow($querydown);
$d = $i+1;
$textbody .= "<table width=\"95%\" align=\"center\">"
."<tr bgcolor='#F3F3F3'>"
."<td width=\"100%\"> <font size='3' color='#000000'>".$d." - </font><a href=\"".$nukeurl."/modules.php?name=Downloads&d_op=viewdownloaddetails&lid=".$lid."&ttitle=".strtr($title," ","_")."#dldetails\" target=\"_blank\" style=\"text-decoration: none; color: black; font-size: 10px\">".$title."</a></td>"
."<td width=\"45\" align='center' nowrap><font size='3' color='#000000'>".$hits."</font></td>"
."</tr>"
."</table>\n";
}
$textbody .= "<br>";
}
y eso mismo se repite para varios módulos, como puedo retornar esa variable para poder usarla en otra función que es la que se encarga de enviarme el correo? Puedo hacer un campo de tipo hidden y poner todo ese contenido y entonces en el correo usar $_POST['campo']? Cual sería la solución a este problema?
Salu2