Mercurial > hg > fapweb
annotate admin.php @ 174:63c840590476
Move common code from mcommon.inc.php to msitegen module.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 06 Nov 2013 10:21:11 +0200 |
parents | 705dabdc37d4 |
children | 8df523e6326a |
rev | line source |
---|---|
0 | 1 <? |
136
aeebfedb5709
Add some copyright headers.
Matti Hamalainen <ccr@tnsp.org>
parents:
126
diff
changeset
|
2 // |
aeebfedb5709
Add some copyright headers.
Matti Hamalainen <ccr@tnsp.org>
parents:
126
diff
changeset
|
3 // FAPWeb Simple Demoparty System |
aeebfedb5709
Add some copyright headers.
Matti Hamalainen <ccr@tnsp.org>
parents:
126
diff
changeset
|
4 // Party administration page frontend module |
aeebfedb5709
Add some copyright headers.
Matti Hamalainen <ccr@tnsp.org>
parents:
126
diff
changeset
|
5 // (C) Copyright 2012-2013 Tecnic Software productions (TNSP) |
aeebfedb5709
Add some copyright headers.
Matti Hamalainen <ccr@tnsp.org>
parents:
126
diff
changeset
|
6 // |
32 | 7 $sessionType = "admin"; |
171
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
8 require "mconfig.inc.php"; |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
9 require "msite.inc.php"; |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
10 require "msession.inc.php"; |
126
71c35d5302c2
More work on cleanups, and AJAX modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
11 require "majax.php"; |
32 | 12 |
174
63c840590476
Move common code from mcommon.inc.php to msitegen module.
Matti Hamalainen <ccr@tnsp.org>
parents:
171
diff
changeset
|
13 cmLocaleInit(); |
171
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
14 |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
15 // Switch to https first, if needed |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
16 if (!stCheckHTTPS()) |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
17 { |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
18 header("Location: https://".$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]); |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
19 exit; |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
20 } |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
21 |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
22 // Start output |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
23 cmPrintPageHeader("FAPWeb Administration", |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
24 " <meta http-equiv=\"Pragma\" content=\"no-cache\" />", |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
25 FALSE); |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
26 |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
27 echo "<div id=\"admCont\">\n"; |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
28 |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
29 // Initiate SQL database connection |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
30 if (!stConnectSQLDB()) |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
31 { |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
32 // Error occured, bail out early |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
33 cmPrintPageFooter(); |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
34 exit; |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
35 } |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
36 |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
37 // Fetch non-"hardcoded" settings from SQL database |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
38 stReloadSettings(); |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
39 |
14
e36c4d2b09c4
Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
40 function stCreateSettingsData() |
e36c4d2b09c4
Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
41 { |
e36c4d2b09c4
Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
42 $args = array(); |
e36c4d2b09c4
Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
43 |
e36c4d2b09c4
Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
44 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
|
45 { |
e36c4d2b09c4
Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
46 foreach ($res as $item) |
e36c4d2b09c4
Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
47 { |
e36c4d2b09c4
Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
48 switch ($item["vtype"]) |
e36c4d2b09c4
Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
49 { |
e36c4d2b09c4
Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
50 case VT_STR: |
e36c4d2b09c4
Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
51 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
|
52 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
|
53 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
|
54 } |
e36c4d2b09c4
Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
55 $args[] = "\"".$item["key"]."\":".$type; |
e36c4d2b09c4
Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
56 } |
e36c4d2b09c4
Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
57 } |
e36c4d2b09c4
Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
58 |
e36c4d2b09c4
Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
59 echo |
e36c4d2b09c4
Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
60 "\n". |
e36c4d2b09c4
Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
61 "function updateSettings()\n". |
e36c4d2b09c4
Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
62 "{\n". |
e36c4d2b09c4
Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
63 " 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
|
64 " 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
|
65 " return false;\n". |
e36c4d2b09c4
Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
66 "}\n"; |
e36c4d2b09c4
Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
67 } |
e36c4d2b09c4
Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
68 |
0 | 69 // Check if sessions are enabled |
5
76c3b89d7b11
Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
70 if (!stChkSetting("admPassword")) |
0 | 71 { |
171
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
72 echo |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
73 "<h1>Oh noes, admin configuration not done!</h1>\n". |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
74 "<p>Better go and prod that, so you get to use the fine admin interface.</p>\n"; |
0 | 75 } |
76 else | |
107 | 77 if (!stAdmSessionAuth(FALSE)) |
0 | 78 { |
79 // 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
|
80 echo |
76c3b89d7b11
Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
81 "<h1>Party admin login</h1>\n". |
0 | 82 "<p>Please use illegal telepathy over HTTP to provide a password to enter the party administration systembolaget.</p>\n". |
32 | 83 stGetFormStart("admlogin", "admlogin.php"). |
0 | 84 stGetFormHiddenInput("mode", "check")."\n". |
32 | 85 stGetFormPasswordInput("admpass", "", "")."\n". |
86 stGetFormSubmitInput("submit", "Login"). | |
0 | 87 "</form>\n"; |
88 } | |
107 | 89 else |
0 | 90 { |
91 ?> | |
92 <script type="text/javascript"> | |
126
71c35d5302c2
More work on cleanups, and AJAX modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
93 // <? stCreateSettingsData(); stCommonAJAX("admajax.php", "admlogout.php", FALSE); ?> |
124
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
94 |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
95 |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
96 function refreshItems(id,name,msgname) |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
97 { |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
98 var msuccess = function(txt) |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
99 { |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
100 var nitem = document.getElementById(id); |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
101 nitem.innerHTML = txt; |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
102 } |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
103 |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
104 sendPOSTRequest("action=get&type="+name, msuccess); |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
105 } |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
106 |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
107 |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
108 function deleteItem(id,prefix,type,func,dsc) |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
109 { |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
110 var msuccess = function(txt) |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
111 { |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
112 var item = document.getElementById(prefix+id); |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
113 item.style.display = "none"; |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
114 setTimeout(func, 50); |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
115 } |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
116 |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
117 // Clearly mark the element when asking confirmation |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
118 var item = document.getElementById(prefix+id); |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
119 var tmp = item.style.background; |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
120 item.style.background = "red"; |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
121 |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
122 // Ask confirmation for deletion |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
123 if (confirm("Are you sure you want to delete "+dsc+" #"+id+"?")) |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
124 { |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
125 // Okay, delete |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
126 sendPOSTRequest("action=delete&type="+type+"&id="+id, msuccess); |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
127 } |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
128 |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
129 // Restore background |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
130 item.style.background = tmp; |
986c25c2e2bc
Move some relevant javascript code from ajax.js to admin module.
Matti Hamalainen <ccr@tnsp.org>
parents:
107
diff
changeset
|
131 } |
0 | 132 |
133 | |
8
4c5f651aa107
Migrate certain settings to SQL database, cleanups, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
7
diff
changeset
|
134 function refreshSettings() |
4c5f651aa107
Migrate certain settings to SQL database, cleanups, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
7
diff
changeset
|
135 { |
10
11816aad6967
Start work on settings interface.
Matti Hamalainen <ccr@tnsp.org>
parents:
8
diff
changeset
|
136 refreshItems("nsettings", "settings", "General settings"); |
8
4c5f651aa107
Migrate certain settings to SQL database, cleanups, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
7
diff
changeset
|
137 } |
4c5f651aa107
Migrate certain settings to SQL database, cleanups, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
7
diff
changeset
|
138 |
4c5f651aa107
Migrate certain settings to SQL database, cleanups, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
7
diff
changeset
|
139 |
0 | 140 function refreshNews() |
141 { | |
142 refreshItems("nnews", "news", "News list"); | |
143 } | |
144 | |
145 | |
146 function refreshAttendees() | |
147 { | |
148 refreshItems("nattendees", "attendees", "Attendees list"); | |
149 } | |
150 | |
151 | |
86 | 152 function refreshVoters() |
0 | 153 { |
86 | 154 refreshItems("nvoters", "voters", "Voters list"); |
0 | 155 } |
156 | |
157 | |
158 function refreshCompos() | |
159 { | |
160 refreshItems("ncompos", "compos", "Compo list"); | |
161 } | |
162 | |
163 | |
164 function refreshEntries() | |
165 { | |
166 refreshItems("nentries", "entries", "Entry list"); | |
167 } | |
168 | |
169 | |
170 function addNews() | |
171 { | |
172 var args = makePostArgs({"title":1,"text":1,"author":1}, "nn", ""); | |
173 | |
174 var msuccess = function(txt) | |
175 { | |
7
d76020022881
Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
176 setTimeout("refreshNews();", 50); |
0 | 177 } |
178 | |
61
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
179 if (args != "") |
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
180 sendPOSTRequest("action=add&type=news&"+args, msuccess); |
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
181 |
0 | 182 return false; |
183 } | |
184 | |
185 | |
186 function deleteNews(id) | |
187 { | |
188 deleteItem(id, "news", "news", "refreshNews();", "news item"); | |
189 } | |
190 | |
191 | |
61
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
192 function addAttendee() |
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
193 { |
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
194 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
|
195 |
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
196 var msuccess = function(txt) |
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
197 { |
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
198 setTimeout("refreshAttendees();", 50); |
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
199 } |
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
200 |
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
201 if (args != "") |
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
202 sendPOSTRequest("action=add&type=attendees&"+args, msuccess); |
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
203 |
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
204 return false; |
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
205 } |
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
206 |
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
207 |
0 | 208 function deleteAttendee(id) |
209 { | |
210 deleteItem(id, "attendee", "attendees", "refreshAttendees();", "attendee"); | |
211 } | |
212 | |
213 | |
214 function updateAttendee(id) | |
215 { | |
52
cba0b944da79
Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents:
33
diff
changeset
|
216 var args = makePostArgs({"oneliner":0,"email":0,"active":3}, "at", id); |
0 | 217 |
53
71256605546b
More work on admin interface.
Matti Hamalainen <ccr@tnsp.org>
parents:
52
diff
changeset
|
218 var msuccess = function(txt) |
71256605546b
More work on admin interface.
Matti Hamalainen <ccr@tnsp.org>
parents:
52
diff
changeset
|
219 { |
71256605546b
More work on admin interface.
Matti Hamalainen <ccr@tnsp.org>
parents:
52
diff
changeset
|
220 setTimeout("refreshAttendees();", 50); |
71256605546b
More work on admin interface.
Matti Hamalainen <ccr@tnsp.org>
parents:
52
diff
changeset
|
221 } |
71256605546b
More work on admin interface.
Matti Hamalainen <ccr@tnsp.org>
parents:
52
diff
changeset
|
222 |
61
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
223 if (args != "") |
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
224 sendPOSTRequest("action=update&type=attendees&id="+id+"&"+args, msuccess); |
0 | 225 } |
226 | |
227 | |
52
cba0b944da79
Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents:
33
diff
changeset
|
228 function updateAttendee2(id) |
cba0b944da79
Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents:
33
diff
changeset
|
229 { |
cba0b944da79
Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents:
33
diff
changeset
|
230 var elem = document.getElementById("atactive"+id); |
cba0b944da79
Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents:
33
diff
changeset
|
231 if (elem && !elem.checked) |
cba0b944da79
Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents:
33
diff
changeset
|
232 { |
cba0b944da79
Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents:
33
diff
changeset
|
233 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
|
234 updateAttendee(id); |
cba0b944da79
Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents:
33
diff
changeset
|
235 else |
cba0b944da79
Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents:
33
diff
changeset
|
236 setTimeout("refreshAttendees();", 50); |
cba0b944da79
Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents:
33
diff
changeset
|
237 } |
cba0b944da79
Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents:
33
diff
changeset
|
238 else |
cba0b944da79
Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents:
33
diff
changeset
|
239 updateAttendee(id); |
cba0b944da79
Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents:
33
diff
changeset
|
240 } |
cba0b944da79
Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents:
33
diff
changeset
|
241 |
cba0b944da79
Start combining "users" with "attendees".
Matti Hamalainen <ccr@tnsp.org>
parents:
33
diff
changeset
|
242 |
0 | 243 function addCompo() |
244 { | |
245 var args = makePostArgs({"name":1, "description":1}, "nc", ""); | |
246 | |
247 var msuccess = function(txt) | |
248 { | |
7
d76020022881
Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
249 setTimeout("refreshCompos();", 50); |
0 | 250 } |
251 | |
61
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
252 if (args != "") |
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
253 sendPOSTRequest("action=add&type=compo&"+args, msuccess); |
0 | 254 return false; |
255 } | |
256 | |
257 | |
258 function updateCompo(id) | |
259 { | |
55
4fac95384753
Make visibility of entry authors per compo.
Matti Hamalainen <ccr@tnsp.org>
parents:
53
diff
changeset
|
260 var args = makePostArgs({"name":1, "description":1, "visible":3, "voting":3, "showAuthors":3}, "co", id); |
0 | 261 |
61
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
262 if (args != "") |
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
263 sendPOSTRequest("action=update&type=compo&id="+id+"&"+args); |
0 | 264 } |
265 | |
59
e5e38ed4e837
Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents:
55
diff
changeset
|
266 |
e5e38ed4e837
Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents:
55
diff
changeset
|
267 function addEntry(id) |
e5e38ed4e837
Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents:
55
diff
changeset
|
268 { |
e5e38ed4e837
Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents:
55
diff
changeset
|
269 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
|
270 |
e5e38ed4e837
Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents:
55
diff
changeset
|
271 var msuccess = function(txt) |
e5e38ed4e837
Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents:
55
diff
changeset
|
272 { |
e5e38ed4e837
Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents:
55
diff
changeset
|
273 setTimeout("refreshEntries();", 50); |
e5e38ed4e837
Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents:
55
diff
changeset
|
274 } |
e5e38ed4e837
Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents:
55
diff
changeset
|
275 |
61
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
276 if (args != "") |
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
277 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
|
278 return false; |
e5e38ed4e837
Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents:
55
diff
changeset
|
279 } |
e5e38ed4e837
Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents:
55
diff
changeset
|
280 |
e5e38ed4e837
Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents:
55
diff
changeset
|
281 |
0 | 282 function updateEntry(id) |
283 { | |
59
e5e38ed4e837
Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents:
55
diff
changeset
|
284 var args = makePostArgs({"name":1, "author":1, "filename":0, "compo_id":2}, "en", id); |
0 | 285 |
59
e5e38ed4e837
Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents:
55
diff
changeset
|
286 var msuccess = function(txt) |
e5e38ed4e837
Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents:
55
diff
changeset
|
287 { |
e5e38ed4e837
Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents:
55
diff
changeset
|
288 setTimeout("refreshEntries();", 50); |
e5e38ed4e837
Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents:
55
diff
changeset
|
289 } |
e5e38ed4e837
Work on compo entry addition and editing.
Matti Hamalainen <ccr@tnsp.org>
parents:
55
diff
changeset
|
290 |
61
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
291 if (args != "") |
e85ed35585fc
Work on attendee editing, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
292 sendPOSTRequest("action=update&type=entry&id="+id+"&"+args, msuccess); |
0 | 293 } |
294 | |
295 | |
296 function deleteEntry(id) | |
297 { | |
298 deleteItem(id, "entry", "entries", "refreshEntries();", "entry"); | |
299 } | |
300 | |
301 | |
302 var registeredTabs = Object(); | |
303 | |
304 | |
305 function updateTabList() | |
306 { | |
307 var item = document.getElementById("pageTabs"); | |
308 var str = ""; | |
309 for (var id in registeredTabs) | |
310 { | |
7
d76020022881
Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
311 str += "<a id=\"cc"+id+ |
d76020022881
Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
312 "\"href=\"#\" onClick=\"switchActiveTab('"+id+ |
d76020022881
Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
313 "')\">"+registeredTabs[id]+"</a>"; |
0 | 314 } |
315 | |
32 | 316 str += "<a class=\"admin\" href=\"admlogout.php\">Logout</a>"; |
0 | 317 |
318 item.innerHTML = str; | |
319 } | |
320 | |
321 | |
322 function registerTab(id, name) | |
323 { | |
324 registeredTabs[id] = name; | |
325 } | |
326 | |
327 | |
328 function refreshTabs() | |
329 { | |
330 for (var id in registeredTabs) | |
331 { | |
332 setTimeout("refresh"+ registeredTabs[id] +"();", 10); | |
333 } | |
334 } | |
335 | |
336 | |
337 function switchActiveTab(tab) | |
338 { | |
339 for (var id in registeredTabs) | |
340 { | |
341 var ob = document.getElementById(id); | |
7
d76020022881
Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
342 var ccob = document.getElementById("cc"+id); |
d76020022881
Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
343 if (ob && ccob) |
0 | 344 { |
345 ob.style.display = (tab == id) ? "block" : "none"; | |
7
d76020022881
Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
346 ccob.style.borderTop = (tab == id) ? "4px solid white" : "none"; |
0 | 347 if (tab == id) |
348 { | |
349 setTimeout("refresh"+ registeredTabs[id] +"();", 10); | |
350 } | |
351 } | |
352 } | |
353 } | |
354 </script> | |
355 | |
5
76c3b89d7b11
Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
356 <!-- ========================== --> |
0 | 357 |
5
76c3b89d7b11
Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
358 <div id="nstatus">-</div> |
76c3b89d7b11
Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
359 |
76c3b89d7b11
Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
360 <div id="pageTabs"></div> |
0 | 361 |
171
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
362 <div id="admin"> |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
363 <div> |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
364 |
0 | 365 <!-- ========================== --> |
366 | |
8
4c5f651aa107
Migrate certain settings to SQL database, cleanups, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
7
diff
changeset
|
367 <div id="tabSettings"> |
10
11816aad6967
Start work on settings interface.
Matti Hamalainen <ccr@tnsp.org>
parents:
8
diff
changeset
|
368 <form method="post" action="" onsubmit="return updateSettings()"> |
11816aad6967
Start work on settings interface.
Matti Hamalainen <ccr@tnsp.org>
parents:
8
diff
changeset
|
369 <div id="nsettings"></div> |
11816aad6967
Start work on settings interface.
Matti Hamalainen <ccr@tnsp.org>
parents:
8
diff
changeset
|
370 </form> |
7
d76020022881
Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
371 </div> |
d76020022881
Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
372 |
d76020022881
Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
373 <!-- ========================== --> |
d76020022881
Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
374 |
d76020022881
Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
375 <div id="tabNews"> |
5
76c3b89d7b11
Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
376 <form method="post" action="" onsubmit="return addNews()"> |
76c3b89d7b11
Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
377 <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
|
378 <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
|
379 <input id="nnauthor" type="text" value="orgaz" /> |
76c3b89d7b11
Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
380 <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
|
381 <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
|
382 </form> |
76c3b89d7b11
Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
383 <hr /> |
76c3b89d7b11
Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
384 <div id="nnews"></div> |
0 | 385 </div> |
386 | |
387 <!-- ========================== --> | |
388 | |
7
d76020022881
Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
389 <div id="tabAttendees"> |
d76020022881
Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
390 <div id="nattendees"></div> |
0 | 391 </div> |
392 | |
393 <!-- ========================== --> | |
394 | |
86 | 395 <div id="tabVoters"> |
396 <div id="nvoters"></div> | |
0 | 397 </div> |
398 | |
399 <!-- ========================== --> | |
400 | |
7
d76020022881
Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
401 <div id="tabCompos"> |
5
76c3b89d7b11
Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
402 <form method="post" action="" onsubmit="return addCompo()"> |
76c3b89d7b11
Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
403 <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
|
404 <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
|
405 <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
|
406 <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
|
407 </form> |
76c3b89d7b11
Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
408 <hr /> |
76c3b89d7b11
Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
409 <div id="ncompos"></div> |
0 | 410 </div> |
411 | |
412 <!-- ========================== --> | |
413 | |
7
d76020022881
Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
414 <div id="tabEntries"> |
5
76c3b89d7b11
Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
415 <div id="nentries"></div> |
0 | 416 </div> |
417 | |
418 <!-- ========================== --> | |
419 | |
171
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
420 <div id="tabInfo"> |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
421 <div id="ninfo"></div> |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
422 </div> |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
423 |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
424 <!-- ========================== --> |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
425 |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
426 </div> |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
427 </div> |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
428 |
0 | 429 <script type="text/javascript"> |
8
4c5f651aa107
Migrate certain settings to SQL database, cleanups, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
7
diff
changeset
|
430 registerTab("tabSettings", "Settings"); |
7
d76020022881
Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
431 registerTab("tabNews", "News"); |
d76020022881
Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
432 registerTab("tabAttendees", "Attendees"); |
86 | 433 registerTab("tabVoters", "Voters"); |
7
d76020022881
Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
434 registerTab("tabCompos", "Compos"); |
d76020022881
Various fixes, cleanups and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
435 registerTab("tabEntries", "Entries"); |
171
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
436 registerTab("tabInfo", "Party Info"); |
5
76c3b89d7b11
Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
437 updateTabList(); |
17 | 438 switchActiveTab("tabSettings"); |
0 | 439 </script> |
171
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
440 <? |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
441 } |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
442 |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
443 cmPrintPageFooter(); |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
444 |
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
445 ?> |