3f191f4e61c2c53d17e58c330add3e025bd53e6a
[memberdb.git] / index.php
1 <?php
2
3 header('Content-type: text/html; charset=utf-8');
4 if (function_exists('date_default_timezone_set')) date_default_timezone_set('UTC');
5 bcscale(2);
6
7 require_once('config.php');
8 require_once('include/database.php');
9 require_once('include/misc.php');
10 require_once('include/installation.php');
11 require_once('include/html.php');
12
13 require_once('include/finances.php');
14 require_once('include/fees.php');
15 require_once('include/cryptography.php');
16 require_once('include/earnings.php');
17 require_once('include/events.php');
18 require_once('include/expenses.php');
19 require_once('include/members.php');
20 require_once('include/payments.php');
21 require_once('include/dtaus.php');
22
23 db_connect();
24
25 if (!defined('IS_INSTALLED') || !IS_INSTALLED) install_database();
26
27 $action = 'list_members';
28 if (isset($_REQUEST['action'])) $action = $_REQUEST['action'];
29
30 ob_start();
31
32 switch ($action) {
33     case 'list_members'   : action_list_members();    break;
34     case 'view_member'    : action_view_member();     break;
35     case 'export_email'   : action_export_email();    break;
36     case 'create_member'  : action_create_member();   break;
37     case 'change_member'  : action_change_member();   break;
38     case 'create_event'   : action_create_event();    break;
39     case 'change_event'   : action_change_event();    break;
40     case 'delete_event'   : action_delete_event();    break;
41     case 'create_earnings': action_create_earnings(); break;
42     case 'create_earning' : action_create_earning();  break;
43     case 'change_earning' : action_change_earning();  break;
44     case 'delete_earning' : action_delete_earning();  break;
45     case 'create_expense' : action_create_expense();  break;
46     case 'change_expense' : action_change_expense();  break;
47     case 'delete_expense' : action_delete_expense();  break;
48     case 'cryptography'   : action_cryptography();    break;
49     case 'fees'           : action_fees();            break;
50     case 'dtaus'          : action_dtaus();           break;
51     case 'finances'       : action_finances();        break;
52     default: action_404();
53 }
54
55 $content = ob_get_contents();
56 ob_end_clean();
57
58 ?>
59 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
60
61 <html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de">
62     <head>
63         <title>Mitgliedsverwaltung - Chaos Computer Club Frankfurt am Main</title>
64         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
65         <style type="text/css">
66             form  { line-height: 2em; }
67             fieldset { line-height: 2em; border: 1px solid #ccc; margin-bottom: 1em; float:left; border-width: 1px 0 0 0; width: 27em; }
68             /*fieldset { border: 1px solid #ccc; margin-bottom: 1em; float:left; border-width: 1px 0 0 0; } */
69             legend { font-size: 1.4em; }
70             label { clear: left; display: block; width: 10em; float: left; }
71             input, select { display: block; width: 20em; float: left; }
72             form small { clear: left; display: block; text-align: right; margin-right: 1.8em; line-height: 1em; margin-bottom: 1.5em; }
73             fieldset small { clear: left; display: block; text-align: right; margin-right: 1.8em; line-height: 1em; margin-bottom: 1.5em; }
74             .checkbox label { clear: none; margin-left: 0.5em; }
75             .checkbox input { clear: left; width: auto;  }
76             #header { margin: 0; padding: 1px 0; background-color: #464646; }
77             #content { font-size: 1.4em; }
78             .content { margin: 0 auto; width: 960px; }
79             .submit { clear: left; }
80             h1 { color: #fff; }
81             body { margin: 0; padding: 0; font-family:  Arial, Verdana, Tahoma; font-size: 62.5%; color: #333; }
82             html { margin: 0; padding: 0; }
83             table { border-collapse: collapse; margin-bottom: 1em; border: 1px solid #ccc; }
84             th, td { padding: 0.3em 2em 0.3em 0.3em;}
85             tr:hover { background-color: #eee; }
86             tr.earning { background-color: #efe; }
87             tr.expense { background-color: #fee; }
88             tr.earning:hover { background-color: #dfd; }
89             tr.expense:hover { background-color: #fdd; }
90             tr.total { background-color: #eee; font-weight: bold; }
91             tr.current { background-color: #eee; font-weight: bold; }
92             th { text-align: left; background-color: #eee; font-weight: normal; border-bottom: 1px solid #ccc;  }
93             h1, h2, h3, legend { font-family: Georgia, Sans-Serif, Verdana; font-weight: normal; color: #333;}
94             #header h1 { font-size: 4em; color: #fff; }
95             h2 { font-size: 2.2em; }
96             h3 { font-size: 1.8em; }
97             #pagemenu { background-color: #e0e0e0; border-top: 1px solid #e4f2fd; font-size: 1.4em; }
98             #pagemenu ul { list-style: none; padding: 0px 10px; display:block; margin-top: 6px; }
99             #pagemenu li { line-height:28px; font-weight: bold; display: inline; float: left; margin-left: 5px; }
100             #pagemenu li a { display: block; color: #888; background-color: #eee; padding: 0px 20px; text-decoration: none; }
101             #pagemenu li a:hover { color: #000; background: #fff; }
102             #footer { background-color: #eee; border-top: 1px solid #ddd; height: 50px; margin-top: 3em; }
103             .clearfix:after { content: " "; display: block; clear: both; visibility: hidden; line-height: 0; height: 0; }
104             .clearfix { display: inline-block; }
105             html[xmlns] .clearfix { display: block; }
106             * html .clearfix { height: 1%; }
107             .log_messages { color: #cc0000; }
108             p.error { border: 1px solid #900;  padding: 1em; color: #cc0000; background-color: #fff9f9;}
109
110             #content a { text-decoration: none; padding: 0 1px; color: #21759B; border-bottom: 1px solid #ccc; }
111             #content a:hover { color: #D54E21; background: #F5D1C5; border-bottom: 1px solid #D54E21; }
112             .modal_window { position:absolute; display:none; background-color: #fff; padding: 1em; }
113             #mask { position:absolute; top:0px; left:0px; height:100%; width:100%; display:none; background-color: black; }
114
115             .pagination { text-align: center; margin: 10px 0; font-weight: bold; }
116             .pagination .prev { float: left; }
117             .pagination .next { float: right; }
118
119         </style>
120         <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
121         <script type="text/javascript" src="js/crypto-js/crypto/crypto-min.js"></script>
122         <script type="text/javascript" src="js/crypto-js/sha1/sha1-min.js"></script>
123         <script type="text/javascript" src="js/crypto-js/hmac/hmac-min.js"></script>
124         <script type="text/javascript" src="js/crypto-js/pbkdf2/pbkdf2-min.js"></script>
125         <script type="text/javascript" src="js/crypto-js/ofb/ofb-min.js"></script>
126         <script type="text/javascript" src="js/crypto-js/aes/aes_modified.js"></script>
127         <script type="text/javascript" src="js/dtaus.js"></script>
128     </head>
129     <body>
130     <div id="header"><div class="content"><h1>Mitgliedsverwaltung</h1></div></div>
131     <div id="pagemenu">
132         <ul class="content clearfix">
133             <li><a href="<?=link_to()?>">Mitglieder</a></li>
134             <li><a href="<?=link_to('finances')?>">Finanzen</a></li>
135             <li><a href="<?=link_to('fees')?>">Mitgliedsbeitr&auml;ge</a></li>
136             <li><a href="<?=link_to('dtaus')?>">Bankeinzug</a></li>
137             <li><a href="<?=link_to('cryptography')?>">Kryptographie</a></li>
138         </ul>
139     </div>
140     <div id="content" class="content"><?=$content?></div>
141     <div id="footer"></div>
142     </body>
143 </html>