egroupware_official/admin/deleteheadline.php
sjb4891 263fdedd2a Added $phpgw->common->phpgw_footer() function, and changed all
places that were including the footer.inc.php to use the function.

Re-arrange phpgw.inc.php to include optional classes after reading the DB config
misc bugfixes.
2000-09-29 05:24:18 +00:00

65 lines
2.1 KiB
PHP
Executable File

<?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 ($confirm) {
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
}
$phpgw_info["flags"]["currentapp"] = "admin";
include("../header.inc.php");
function remove_account_data($query,$t)
{
global $phpgw;
$phpgw->db->query("delete from $t where $query");
}
if (($con) && (! $confirm)) {
?>
<center>
<table border=0 with=65%>
<tr colspan=2>
<td align=center>
<?php echo lang("Are you sure you want to delete this news site ?"); ?>
<td>
</tr>
<tr colspan=2>
<td align=center>
<?php echo lang("All records and account information will be lost!"); ?>
</td>
</tr>
<tr>
<td>
<a href="<?php echo $phpgw->link("headlines.php") . "\">" . lang("No"); ?></a>
</td>
<td>
<a href="<?php echo $phpgw->link("deleteheadline.php","con=$con&confirm=true") . "\">" . lang("Yes"); ?></a>
</td>
</tr>
</table>
</center>
<?php
$phpgw->common->phpgw_footer();
}
else {
$table_locks = array('news_site','news_headlines','users_headlines');
$phpgw->db->lock($table_locks);
remove_account_data("con=$con","news_site");
remove_account_data("site=$con","news_headlines");
remove_account_data("site=$con","users_headlines");
$phpgw->db->unlock();
Header("Location: " . $phpgw->link("headlines.php","cd=29"));
}