annotate admin.inc.php @ 106:324f3a415237

Add extra HTML + sponsors box to layout.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 21 Oct 2013 22:11:40 +0300
parents a85f258f6beb
children 6e076b3630a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 <?
32
36392d1d6b5f Moar work.
Matti Hamalainen <ccr@tnsp.org>
parents: 30
diff changeset
2 $sessionType = "admin";
36392d1d6b5f Moar work.
Matti Hamalainen <ccr@tnsp.org>
parents: 30
diff changeset
3
14
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
4 function stCreateSettingsData()
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
5 {
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
6 $args = array();
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
7
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
8 if (($res = stExecSQL("SELECT * FROM settings")) !== FALSE)
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
9 {
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
10 foreach ($res as $item)
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
11 {
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
12 switch ($item["vtype"])
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
13 {
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
14 case VT_STR:
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
15 case VT_TEXT: $type = 0; break;
105
a85f258f6beb Move some things around and modularize the code.
Matti Hamalainen <ccr@tnsp.org>
parents: 86
diff changeset
16 case VT_INT: $type = 4; break;
14
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
17 case VT_BOOL: $type = 3; break;
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
18 }
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
19 $args[] = "\"".$item["key"]."\":".$type;
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
20 }
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
21 }
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
22
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
23 echo
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
24 "\n".
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
25 "function updateSettings()\n".
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
26 "{\n".
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
27 " var args = makePostArgs({".implode(",", $args)."}, \"st\", \"\");\n".
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
28 " sendPOSTRequest(\"action=update&type=settings&\"+args);\n".
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
29 " return false;\n".
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
30 "}\n";
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
31 }
e36c4d2b09c4 Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 10
diff changeset
32
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33 // Check if sessions are enabled
5
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
34 if (!stChkSetting("admPassword"))
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35 {
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36 echo "<h1>Oh noes, admin configuration not done!</h1>\n".
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
37 "<p>Better go and prod that, so you get to use the fine admin interface.</p>\n";
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
38 $authState = "error";
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
39 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
40 else
5
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
41 if (stAdmSessionAuth())
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
42 {
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
43 $authState = "ok";
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
44 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
45 else
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
46 {
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
47 // Perform authentication if we are not in session already
5
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
48 echo
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
49 "<h1>Party admin login</h1>\n".
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
50 "<p>Please use illegal telepathy over HTTP to provide a password to enter the party administration systembolaget.</p>\n".
32
36392d1d6b5f Moar work.
Matti Hamalainen <ccr@tnsp.org>
parents: 30
diff changeset
51 stGetFormStart("admlogin", "admlogin.php").
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
52 stGetFormHiddenInput("mode", "check")."\n".
32
36392d1d6b5f Moar work.
Matti Hamalainen <ccr@tnsp.org>
parents: 30
diff changeset
53 stGetFormPasswordInput("admpass", "", "")."\n".
36392d1d6b5f Moar work.
Matti Hamalainen <ccr@tnsp.org>
parents: 30
diff changeset
54 stGetFormSubmitInput("submit", "Login").
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
55 "</form>\n";
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
56
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
57 $authState = "login";
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
58 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
59
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
60 if ($authState == "ok")
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
61 {
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
62 ?>
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
63 <script type="text/javascript">
105
a85f258f6beb Move some things around and modularize the code.
Matti Hamalainen <ccr@tnsp.org>
parents: 86
diff changeset
64 // <? stCreateSettingsData(); include "ajax.js"; ?>
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
65
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
66
8
4c5f651aa107 Migrate certain settings to SQL database, cleanups, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 7
diff changeset
67 function refreshSettings()
4c5f651aa107 Migrate certain settings to SQL database, cleanups, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 7
diff changeset
68 {
10
11816aad6967 Start work on settings interface.
Matti Hamalainen <ccr@tnsp.org>
parents: 8
diff changeset
69 refreshItems("nsettings", "settings", "General settings");
8
4c5f651aa107 Migrate certain settings to SQL database, cleanups, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 7
diff changeset
70 }
4c5f651aa107 Migrate certain settings to SQL database, cleanups, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 7
diff changeset
71
4c5f651aa107 Migrate certain settings to SQL database, cleanups, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 7
diff changeset
72
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
73 function refreshNews()
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
74 {
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
75 refreshItems("nnews", "news", "News list");
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
76 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
77
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
78
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
79 function refreshAttendees()
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
80 {
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
81 refreshItems("nattendees", "attendees", "Attendees list");
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
82 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
83
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
84
86
4684336cec09 Some work.
Matti Hamalainen <ccr@tnsp.org>
parents: 61
diff changeset
85 function refreshVoters()
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
86 {
86
4684336cec09 Some work.
Matti Hamalainen <ccr@tnsp.org>
parents: 61
diff changeset
87 refreshItems("nvoters", "voters", "Voters list");
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
88 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
89
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
90
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
91 function refreshCompos()
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
92 {
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
93 refreshItems("ncompos", "compos", "Compo list");
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
94 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
95
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
96
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
97 function refreshEntries()
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
98 {
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
99 refreshItems("nentries", "entries", "Entry list");
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
100 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
101
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
102
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
103 function addNews()
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
104 {
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
105 var args = makePostArgs({"title":1,"text":1,"author":1}, "nn", "");
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
106
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
107 var msuccess = function(txt)
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
108 {
7
d76020022881 Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
109 setTimeout("refreshNews();", 50);
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
110 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
111
61
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
112 if (args != "")
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
113 sendPOSTRequest("action=add&type=news&"+args, msuccess);
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
114
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
115 return false;
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
116 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
117
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
118
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
119 function deleteNews(id)
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
120 {
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
121 deleteItem(id, "news", "news", "refreshNews();", "news item");
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
122 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
123
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
124
61
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
125 function addAttendee()
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
126 {
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
127 var args = makePostArgs({"name":1,"groups":0,"oneliner":0,"email":0}, "ne", "x");
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
128
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
129 var msuccess = function(txt)
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
130 {
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
131 setTimeout("refreshAttendees();", 50);
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
132 }
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
133
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
134 if (args != "")
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
135 sendPOSTRequest("action=add&type=attendees&"+args, msuccess);
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
136
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
137 return false;
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
138 }
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
139
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
140
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
141 function deleteAttendee(id)
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
142 {
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
143 deleteItem(id, "attendee", "attendees", "refreshAttendees();", "attendee");
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
144 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
145
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
146
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
147 function updateAttendee(id)
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
148 {
52
cba0b944da79 Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents: 33
diff changeset
149 var args = makePostArgs({"oneliner":0,"email":0,"active":3}, "at", id);
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
150
53
71256605546b More work on admin interface.
Matti Hamalainen <ccr@tnsp.org>
parents: 52
diff changeset
151 var msuccess = function(txt)
71256605546b More work on admin interface.
Matti Hamalainen <ccr@tnsp.org>
parents: 52
diff changeset
152 {
71256605546b More work on admin interface.
Matti Hamalainen <ccr@tnsp.org>
parents: 52
diff changeset
153 setTimeout("refreshAttendees();", 50);
71256605546b More work on admin interface.
Matti Hamalainen <ccr@tnsp.org>
parents: 52
diff changeset
154 }
71256605546b More work on admin interface.
Matti Hamalainen <ccr@tnsp.org>
parents: 52
diff changeset
155
61
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
156 if (args != "")
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
157 sendPOSTRequest("action=update&type=attendees&id="+id+"&"+args, msuccess);
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
158 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
159
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
160
52
cba0b944da79 Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents: 33
diff changeset
161 function updateAttendee2(id)
cba0b944da79 Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents: 33
diff changeset
162 {
cba0b944da79 Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents: 33
diff changeset
163 var elem = document.getElementById("atactive"+id);
cba0b944da79 Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents: 33
diff changeset
164 if (elem && !elem.checked)
cba0b944da79 Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents: 33
diff changeset
165 {
cba0b944da79 Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents: 33
diff changeset
166 if (confirm("Are you sure you want deactivate vote ID #"+id+"?"))
cba0b944da79 Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents: 33
diff changeset
167 updateAttendee(id);
cba0b944da79 Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents: 33
diff changeset
168 else
cba0b944da79 Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents: 33
diff changeset
169 setTimeout("refreshAttendees();", 50);
cba0b944da79 Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents: 33
diff changeset
170 }
cba0b944da79 Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents: 33
diff changeset
171 else
cba0b944da79 Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents: 33
diff changeset
172 updateAttendee(id);
cba0b944da79 Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents: 33
diff changeset
173 }
cba0b944da79 Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents: 33
diff changeset
174
cba0b944da79 Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents: 33
diff changeset
175
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
176 function addCompo()
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
177 {
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
178 var args = makePostArgs({"name":1, "description":1}, "nc", "");
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
179
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
180 var msuccess = function(txt)
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
181 {
7
d76020022881 Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
182 setTimeout("refreshCompos();", 50);
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
183 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
184
61
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
185 if (args != "")
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
186 sendPOSTRequest("action=add&type=compo&"+args, msuccess);
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
187 return false;
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
188 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
189
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
190
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
191 function updateCompo(id)
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
192 {
55
4fac95384753 Make visibility of entry authors per compo.
Matti Hamalainen <ccr@tnsp.org>
parents: 53
diff changeset
193 var args = makePostArgs({"name":1, "description":1, "visible":3, "voting":3, "showAuthors":3}, "co", id);
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
194
61
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
195 if (args != "")
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
196 sendPOSTRequest("action=update&type=compo&id="+id+"&"+args);
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
197 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
198
59
e5e38ed4e837 Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents: 55
diff changeset
199
e5e38ed4e837 Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents: 55
diff changeset
200 function addEntry(id)
e5e38ed4e837 Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents: 55
diff changeset
201 {
e5e38ed4e837 Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents: 55
diff changeset
202 var args = makePostArgs({"name":1, "author":1, "filename":0}, "ne", id);
e5e38ed4e837 Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents: 55
diff changeset
203
e5e38ed4e837 Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents: 55
diff changeset
204 var msuccess = function(txt)
e5e38ed4e837 Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents: 55
diff changeset
205 {
e5e38ed4e837 Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents: 55
diff changeset
206 setTimeout("refreshEntries();", 50);
e5e38ed4e837 Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents: 55
diff changeset
207 }
e5e38ed4e837 Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents: 55
diff changeset
208
61
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
209 if (args != "")
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
210 sendPOSTRequest("action=add&type=entry&compo_id="+id+"&"+args, msuccess);
59
e5e38ed4e837 Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents: 55
diff changeset
211 return false;
e5e38ed4e837 Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents: 55
diff changeset
212 }
e5e38ed4e837 Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents: 55
diff changeset
213
e5e38ed4e837 Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents: 55
diff changeset
214
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
215 function updateEntry(id)
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
216 {
59
e5e38ed4e837 Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents: 55
diff changeset
217 var args = makePostArgs({"name":1, "author":1, "filename":0, "compo_id":2}, "en", id);
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
218
59
e5e38ed4e837 Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents: 55
diff changeset
219 var msuccess = function(txt)
e5e38ed4e837 Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents: 55
diff changeset
220 {
e5e38ed4e837 Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents: 55
diff changeset
221 setTimeout("refreshEntries();", 50);
e5e38ed4e837 Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents: 55
diff changeset
222 }
e5e38ed4e837 Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents: 55
diff changeset
223
61
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
224 if (args != "")
e85ed35585fc Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 59
diff changeset
225 sendPOSTRequest("action=update&type=entry&id="+id+"&"+args, msuccess);
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
226 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
227
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
228
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
229 function deleteEntry(id)
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
230 {
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
231 deleteItem(id, "entry", "entries", "refreshEntries();", "entry");
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
232 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
233
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
234
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
235 var registeredTabs = Object();
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
236
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
237
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
238 function updateTabList()
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
239 {
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
240 var item = document.getElementById("pageTabs");
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
241 var str = "";
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
242 for (var id in registeredTabs)
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
243 {
7
d76020022881 Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
244 str += "<a id=\"cc"+id+
d76020022881 Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
245 "\"href=\"#\" onClick=\"switchActiveTab('"+id+
d76020022881 Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
246 "')\">"+registeredTabs[id]+"</a>";
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
247 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
248
32
36392d1d6b5f Moar work.
Matti Hamalainen <ccr@tnsp.org>
parents: 30
diff changeset
249 str += "<a class=\"admin\" href=\"admlogout.php\">Logout</a>";
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
250
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
251 item.innerHTML = str;
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
252 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
253
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
254
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
255 function registerTab(id, name)
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
256 {
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
257 registeredTabs[id] = name;
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
258 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
259
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
260
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
261 function refreshTabs()
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
262 {
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
263 for (var id in registeredTabs)
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
264 {
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
265 setTimeout("refresh"+ registeredTabs[id] +"();", 10);
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
266 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
267 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
268
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
269
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
270 function switchActiveTab(tab)
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
271 {
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
272 for (var id in registeredTabs)
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
273 {
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
274 var ob = document.getElementById(id);
7
d76020022881 Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
275 var ccob = document.getElementById("cc"+id);
d76020022881 Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
276 if (ob && ccob)
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
277 {
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
278 ob.style.display = (tab == id) ? "block" : "none";
7
d76020022881 Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
279 ccob.style.borderTop = (tab == id) ? "4px solid white" : "none";
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
280 if (tab == id)
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
281 {
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
282 setTimeout("refresh"+ registeredTabs[id] +"();", 10);
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
283 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
284 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
285 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
286 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
287 </script>
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
288
5
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
289 <!-- ========================== -->
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
290
5
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
291 <div id="nstatus">-</div>
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
292
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
293 <div id="pageTabs"></div>
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
294
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
295 <!-- ========================== -->
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
296
8
4c5f651aa107 Migrate certain settings to SQL database, cleanups, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 7
diff changeset
297 <div id="tabSettings">
10
11816aad6967 Start work on settings interface.
Matti Hamalainen <ccr@tnsp.org>
parents: 8
diff changeset
298 <form method="post" action="" onsubmit="return updateSettings()">
11816aad6967 Start work on settings interface.
Matti Hamalainen <ccr@tnsp.org>
parents: 8
diff changeset
299 <div id="nsettings"></div>
11816aad6967 Start work on settings interface.
Matti Hamalainen <ccr@tnsp.org>
parents: 8
diff changeset
300 </form>
7
d76020022881 Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
301 </div>
d76020022881 Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
302
d76020022881 Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
303 <!-- ========================== -->
d76020022881 Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
304
d76020022881 Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
305 <div id="tabNews">
5
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
306 <form method="post" action="" onsubmit="return addNews()">
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
307 <input id="nntitle" type="text" size="40" /><br />
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
308 <textarea id="nntext" rows="5" cols="60"></textarea><br />
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
309 <input id="nnauthor" type="text" value="orgaz" />
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
310 <input id="nnadd" type="submit" value=" Add post " />
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
311 <input type="button" value=" Clear " onClick="this.form.reset()" />
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
312 </form>
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
313 <hr />
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
314 <div id="nnews"></div>
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
315 </div>
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
316
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
317 <!-- ========================== -->
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
318
7
d76020022881 Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
319 <div id="tabAttendees">
d76020022881 Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
320 <div id="nattendees"></div>
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
321 </div>
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
322
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
323 <!-- ========================== -->
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
324
86
4684336cec09 Some work.
Matti Hamalainen <ccr@tnsp.org>
parents: 61
diff changeset
325 <div id="tabVoters">
4684336cec09 Some work.
Matti Hamalainen <ccr@tnsp.org>
parents: 61
diff changeset
326 <div id="nvoters"></div>
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
327 </div>
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
328
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
329 <!-- ========================== -->
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
330
7
d76020022881 Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
331 <div id="tabCompos">
5
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
332 <form method="post" action="" onsubmit="return addCompo()">
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
333 <input id="ncname" type="text" size="64" /><br />
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
334 <textarea id="ncdescription" rows="5" cols="60"></textarea><br />
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
335 <input id="nccompo" type="submit" value=" Add compo " />
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
336 <input type="button" value=" Clear " onClick="this.form.reset()" />
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
337 </form>
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
338 <hr />
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
339 <div id="ncompos"></div>
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
340 </div>
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
341
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
342 <!-- ========================== -->
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
343
7
d76020022881 Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
344 <div id="tabEntries">
5
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
345 <div id="nentries"></div>
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
346 </div>
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
347
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
348 <!-- ========================== -->
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
349
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
350 <script type="text/javascript">
8
4c5f651aa107 Migrate certain settings to SQL database, cleanups, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 7
diff changeset
351 registerTab("tabSettings", "Settings");
7
d76020022881 Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
352 registerTab("tabNews", "News");
d76020022881 Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
353 registerTab("tabAttendees", "Attendees");
86
4684336cec09 Some work.
Matti Hamalainen <ccr@tnsp.org>
parents: 61
diff changeset
354 registerTab("tabVoters", "Voters");
7
d76020022881 Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
355 registerTab("tabCompos", "Compos");
d76020022881 Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
356 registerTab("tabEntries", "Entries");
5
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
357 updateTabList();
17
b015c0dea42c Minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 16
diff changeset
358 switchActiveTab("tabSettings");
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
359 </script>
5
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
360 <? } ?>