Viewing file: archives.php (2.68 KB) -rw-rw-rw- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
include("include/config.php");
include("include/lib/libconfig.php");
include("include/db/db_".$db_type.".inc.php");
include("include/interface.php");
include("include/lib/libnewsletter.php");
include("admin/include/function.php");
$list_id = (isset($_POST['list_id']) ? $_POST['list_id'] : "");
$list_id = (!isset($_POST['list_id']) && isset($_GET['list_id']) ? $_GET['list_id'] : $list_id);
$msg_id = (isset($_POST['msg_id']) ? $_POST['msg_id'] : "");
$msg_id = (!isset($_POST['msg_id']) && isset($_GET['msg_id']) ? $_GET['msg_id'] : $msg_id);
$conf = new config();
$conf->getConfig($hostname,$login ,$pass,$database, $table_global_config);
include("include/lang/".$conf->language.".php");
html_header(translate("ARCHIVE_TITLE"));
echo "<div class='content'>";
$list = list_newsletter($conf->db_host, $conf->db_login, $conf->db_pass, $conf->db_name, $conf->table_listsconfig);
if(sizeof($list)){
echo "<div class='subsection'>\n";
echo "<div class='subtitle'>".translate("ARCHIVE_TITLE")."</div>\n";
echo "<div class='subcontent' align='center'>\n";
echo "\t<form action='archives.php' method='post' name='archive_form' class='form-light'>\n";
echo "\t\t".translate("ARCHIVE_CHOOSE")."\n <select name='list_id' onchange='document.archive_form.submit()'>\n";
for($i=0; $i<sizeof($list); $i++){
echo "\t\t\t<option value='".$list[$i][0]."' ";
if($list_id==$list[$i][0]) echo "selected='selected' ";
echo ">".$list[$i][1]."</option>\n";
}
echo "\t\t</select>\n";
echo "<input type='submit' value=' O K ' /> ";
echo "</form>\n\n";
if(isset($list_id) && !empty($list_id)){
$newsletter = new Newsletter();
$newsletter->getConfig($conf->db_host, $conf->db_login, $conf->db_pass, $conf->db_name, $list_id,$conf->table_listsconfig);
echo "<form action='archives.php' method='post' name='archive_form2' class='form-light'>\n";
$newsletter = new Newsletter();
$newsletter->getConfig($conf->db_host, $conf->db_login, $conf->db_pass, $conf->db_name, $list_id,$conf->table_listsconfig);
if($newsletter->getArchivesSelectList($conf->table_archives, $msg_id)!=-1){
echo "<br /><br />";
echo "<input type='submit' value='".translate("ARCHIVE_DISPLAY")."' /> ";
echo "<input type='hidden' name='list_id' value='$list_id' /> ";
}
else
echo "<div align='center' class='error'>".translate("ARCHIVE_NOT_FOUND")."</div>\n";
echo "</form>\n";
echo "</div></div>\n";
if(isset($msg_id) && !empty($msg_id)){
$newsletter->getArchiveMsg($conf->table_archives, $msg_id);
}
} else { echo "</div></div>"; }
}
echo "</div>";
html_footer();
?>
|