True, "nonavbar" => True);
}
$phpgw_info["flags"]["currentapp"] = "admin";
include("../header.inc.php");
if (! $submit) {
?>
common->phpgw_footer();
} else {
if (! $n_display)
$error = "
" . lang("You must enter a display");
if (! $n_base_url)
$error = "
" . lang("You must enter a base url");
if (! $n_newsfile)
$error = "
" . lang("You must enter a news url");
if (! $n_cachetime)
$error = "
" . lang("You must enter the number of minutes between reload");
if (! $n_listings)
$error = "
" . lang("You must enter the number of listings display");
if (! $n_newstype)
$error = "
" . lang("You must select a file type");
if ($error)
exit;
$phpgw->db->query("select display from news_site where base_url='"
. addslashes(strtolower($n_base_url)) . "' and newsfile='"
. addslashes(strtolower($n_newsfile)) . "'");
$phpgw->db->next_record();
if ($phpgw->db->f("display")) {
navigation_bar();
echo "" . lang("That site has already been entered") . "";
exit;
}
$phpgw->db->lock("news_site");
$sql = "insert into news_site (display,base_url,newsfile,"
. "lastread,newstype,cachetime,listings) "
. "values ('" . addslashes($n_display) . "','"
. addslashes(strtolower($n_base_url)) . "','"
. addslashes(strtolower($n_newsfile)) . "',0,'"
. $n_newstype . "',$n_cachetime,$n_listings)";
$phpgw->db->query($sql);
$phpgw->db->unlock();
Header("Location: " . $phpgw->link($directorys["webserver_url"]
. "/admin/headlines.php", "cd=28"));
}
?>