segue-1.x /delete_site.inc.php

Language PHP Lines 26
MD5 Hash f336bc5ab6e28bc1998d81909d4fca6a Estimated Cost $398 (why?)
Repository https://github.com/adamfranco/segue-1.x.git View Raw File View Project SPDX
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<? /* $Id$ */

$pagetitle = "Delete Site";

$s =& new site($_REQUEST['name']);
$s->fetchDown(1);
/* print "<pre>"; print_r($s); print "</pre>"; */

if (sitenamevalid($_REQUEST['name'])) {
	if ($_REQUEST[confirm]) {
		$s->delete();
		log_entry("delete_site",$_SESSION['auser']." deleted site ".$_REQUEST['name'],$s->getField("name"),$s->id,"site");
	} else {
		printc("Are you <b>SURE</b> you want to delete the site <i>".$s->getField("title")."</i>?? This operation is <b>irreversable</b>. You will <b>never</b> see any of the content of this site again, including all sections, pages, content, and discussions. You better be <b>ABSOLUTELY SURE</b> you want to do this! If so, hit 'Delete'.<br /><br />");
		printc("<form action='$PHP_SELF?$sid&amp;action=delete_site&amp;name=".$_REQUEST['name']."'><input type='hidden' name='confirm' value='1' />");
		printc("<input type='hidden' name='name' value='".$_REQUEST['name']."' />");
		printc("<input type='hidden' name='action' value='delete_site' />");
		printc("<input type='button' value='&lt;&lt; Back' onclick='history.go(-1)' /> <input type='submit' value='Delete' />");
		printc("</form>");
/* 		print "<pre>"; print_r($s); print "</pre>"; */
		return;
	}
} else log_entry("delete_site", $_SESSION['auser']." deleting site '".$_REQUEST['name']."' failed",$s->getField("name"),$s->id,"site");

header("Location: $PHP_SELF?$sid");
exit;
Back to Top