egroupware/admin/editheadline.php

93 lines
3.3 KiB
PHP
Raw Normal View History

2000-08-18 05:24:22 +02:00
<?php
/**************************************************************************\
* phpGroupWare - administration *
* http://www.phpgroupware.org *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
if ($submit) {
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
2000-08-18 05:24:22 +02:00
}
$phpgw_info["flags"]["currentapp"] = "admin";
2000-08-18 05:24:22 +02:00
include("../header.inc.php");
if (! $con)
Header("Location: " . $phpgw->link("headlines.php"));
if ((! $submit) && ($con)) {
$phpgw->db->query("select * from news_site where con=$con");
$phpgw->db->next_record();
?>
2000-09-03 22:25:31 +02:00
<form method="POST" action="<?php echo $phpgw->link("editheadline.php"); ?>">
2000-08-18 05:24:22 +02:00
<input type="hidden" name="o_con" value="<? echo $con; ?>">
<center>
<table border=0 width=65%>
<tr>
2000-09-07 22:49:55 +02:00
<td><?php echo lang("Display"); ?></td>
2000-08-18 05:24:22 +02:00
<td><input name="n_display" value="<?echo $phpgw->db->f("display"); ?>"></td>
</tr>
<tr>
2000-09-07 22:49:55 +02:00
<td><?php echo lang("Base URL"); ?></td>
2000-08-18 05:24:22 +02:00
<td><input name="n_base_url" value="<? echo $phpgw->db->f("base_url"); ?>"></td>
</tr>
<tr>
2000-09-07 22:49:55 +02:00
<td><?php echo lang("News File"); ?></td>
2000-08-18 05:24:22 +02:00
<td><input name="n_newsfile" value="<? echo $phpgw->db->f("newsfile"); ?>"></td>
</tr>
<tr>
2000-09-07 22:49:55 +02:00
<td><?php echo lang("Minutes between Reloads"); ?></td>
2000-08-18 05:24:22 +02:00
<td><input name="n_cachetime" value="<? echo $phpgw->db->f("cachetime"); ?>"></td>
</tr>
<tr>
2000-09-07 22:49:55 +02:00
<td><?php echo lang("Listings Displayed"); ?></td>
2000-08-18 05:24:22 +02:00
<td><input name="n_listings" value="<? echo $phpgw->db->f("listings"); ?>"></td>
</tr>
<tr>
2000-09-07 22:49:55 +02:00
<td><?php echo lang("News Type"); ?></td>
2000-08-18 05:24:22 +02:00
<td>
<?
$news_type = array('rdf','fm','lt','sf','rdf-chan');
for ($i=0;$i<count($news_type);$i++) {
echo "<input type=\"radio\" name=\"n_newstype\" value=\"" . $news_type[$i] . "\"";
if($phpgw->db->f("newstype") == $news_type[$i]) echo " checked";
echo ">&nbsp;$news_type[$i]<br>";
}
?>
</td>
</tr>
<tr>
2000-09-07 22:49:55 +02:00
<td colspan=2><input type="submit" name="submit" value="<?php echo lang("submit"); ?>"></td>
2000-08-18 05:24:22 +02:00
</tr>
</table>
</center>
</form>
<?php
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
} else {
$phpgw->db->lock("news_site");
$phpgw->db->query("UPDATE news_site SET display='" . addslashes($n_display) . "', "
. "base_url='" . addslashes($n_base_url) . "', "
. "newsfile='" . addslashes($n_newsfile) . "', "
. "lastread=0, newstype='" . $n_newstype . "', "
. "cachetime=$n_cachetime, listings=$n_listings "
. "WHERE con=$o_con");
$phpgw->db->unlock();
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]
. "/admin/headlines.php", "cd=27"));
}
?>