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