<?php
/****************************************************************************************/
/* ACollab */
/****************************************************************************************/
/* Copyright (c) 2002-2004 Adaptive Technology Resource Centre / University of Toronto */
/* */
/* http://atutor.ca/acollab */
/* */
/* This program is free software. You may 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. */
/* */
/* This program is distributed in the hope that it will be useful, but */
/* WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */
/* See the GNU General Public License for more details. */
/* */
/* You may access the GNU General Public License at: */
/* http://www.opensource.org/licenses/gpl-license.php */
/* */
/* You may contact the Adaptive Technology Resource Centre at */
/* Robarts Library, University of Toronto */
/* 130 St. George Street, Toronto, Ontario, Canada M5S 1A5 */
/* Further contact information is available at http://www.utoronto.ca/atrc/ */
/****************************************************************************************/
/* Programmer: */
/* Joel Kronenberg - ATRC */
/****************************************************************************************/
// $Id: tran_delete.php 228 2004-06-07 18:42:34Z boonhau $
define('AC_INCLUDE_PATH', '../include/');
require(AC_INCLUDE_PATH.'vitals.inc.php');
authenticate(USER_GROUP_ADMIN);
$t = str_replace('.', '', $_REQUEST['t']);
if ($_POST['cancel']) {
Header('Location: index.php');
exit;
}
$_SECTION[0][0] = _AC('home');
$_SECTION[0][1] = 'home.php';
$_SECTION[1][0] = _AC('chat');
$_SECTION[1][1] = 'chat/';
$_SECTION[2][0] = _AC('delete_transcript');
$_SECTION[2][1] = 'chat/tran_delete.php';
if ($_POST['submit']) {
unlink('tran/'.$_SESSION['group_id'].'/'.$t.'.html');
Header('Location: index.php?f='.F_TRAN_DELETED);
exit;
}
require(AC_INCLUDE_PATH.'header.inc.php');
if (!file_exists('tran/'.$_SESSION['group_id'].'/'.$t.'.html')) {
$errors[] = E_TRAN_NOT_FOUND;
print_errors($errors);
require (AC_INCLUDE_PATH.'footer.inc.php');
exit;
}
?>
<br />
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<input type="hidden" name="t" value="<?php echo $t; ?>">
<table border="0" cellspacing="0" cellpadding="2" align="center" class="box2">
<tr>
<th colspan="3" class="box"><h3><?php echo _AC('delete_transcript'); ?></h3></th>
</tr>
<tr bgcolor="white">
<td> </td>
<td><b><?php echo _AC('name'); ?>:</b> <?php echo $t; ?></td>
<td> </td>
</tr>
<tr>
<td class="row1"> </td>
<td class="row1"><img src="images/clr.gif" /><br /><?php echo _AC('confirm_delete_tran'); ?><br /></td>
<td class="row1"> </td>
</tr>
<tr bgcolor="white">
<td class="row1"> </td>
<td class="row1" align="right"><br /><input type="submit" name="submit" value="<?php echo _AC('delete'); ?>" class="submitY" onfocus="this.className='submitY highlight'" onblur="this.className='submitY'" /> <input type="submit" name="cancel" value="<?php echo _AC('cancel'); ?>" class="submitN" onfocus="this.className='submitN highlight'" onblur="this.className='submitN'" /><br /><br /></td>
<td class="row1"> </td>
</tr>
</table>
</form>
<?php
require(AC_INCLUDE_PATH.'footer.inc.php');
?>