From: Michael Andreen
Date: Fri, 15 Dec 2006 11:47:03 +0000 (+0000)
Subject: initial commit of alliances
X-Git-Url: https://ruin.nu/git/?a=commitdiff_plain;h=38ca8c5683ec02a62badb6a0150e60a9a9338580;hp=9e7bc0a25ae14affe960a0606d0542677c51abd7;p=ndwebbie.git
initial commit of alliances
---
diff --git a/alliances.pl b/alliances.pl
new file mode 100644
index 0000000..101f2db
--- /dev/null
+++ b/alliances.pl
@@ -0,0 +1,123 @@
+#**************************************************************************
+# Copyright (C) 2006 by Michael Andreen *
+# *
+# 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. *
+# *
+# 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 should have received a copy of the GNU General Public License *
+# along with this program; if not, write to the *
+# Free Software Foundation, Inc., *
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+#**************************************************************************/
+
+use strict;
+use POSIX;
+our $BODY;
+our $DBH;
+our $LOG;
+my $error;
+
+$ND::TEMPLATE->param(TITLE => 'Alliances');
+
+die "You don't have access" unless isHC();
+
+my $alliance;
+if (param('alliance') =~ /^(\d+)$/){
+ my $query = $DBH->prepare(q{SELECT id,name, relationship FROM alliances WHERE id = ?});
+ $alliance = $DBH->selectrow_hashref($query,undef,$1);
+}
+if ($alliance && param ('cmd') eq 'coords'){
+ $DBH->begin_work;
+ $DBH->commit or $error .= "