egroupware/admin/deleteheadline.php

65 lines
2.1 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 ($confirm) {
$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");
function remove_account_data($query,$t)
{
global $phpgw;
2000-08-18 05:24:22 +02:00
$phpgw->db->query("delete from $t where $query");
}
if (($con) && (! $confirm)) {
?>
<center>
<table border=0 with=65%>
<tr colspan=2>
<td align=center>
2000-09-07 22:49:55 +02:00
<?php echo lang("Are you sure you want to delete this news site ?"); ?>
2000-08-18 05:24:22 +02:00
<td>
</tr>
<tr colspan=2>
<td align=center>
2000-09-07 22:49:55 +02:00
<?php echo lang("All records and account information will be lost!"); ?>
2000-08-18 05:24:22 +02:00
</td>
</tr>
<tr>
<td>
2000-09-07 22:49:55 +02:00
<a href="<?php echo $phpgw->link("headlines.php") . "\">" . lang("No"); ?></a>
2000-08-18 05:24:22 +02:00
</td>
<td>
2000-09-07 22:49:55 +02:00
<a href="<?php echo $phpgw->link("deleteheadline.php","con=$con&confirm=true") . "\">" . lang("Yes"); ?></a>
2000-08-18 05:24:22 +02:00
</td>
</tr>
</table>
</center>
<?php
$phpgw->common->phpgw_footer();
2000-08-18 05:24:22 +02:00
}
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"));
}