diff --git a/registration-system/admin/index.php b/registration-system/admin/index.php index 9168e52dd9c1643265ce4a70ddd7b1e100016658..33ac97f7124963e2cb57e857a75ac8d9f4885bab 100644 --- a/registration-system/admin/index.php +++ b/registration-system/admin/index.php @@ -59,13 +59,17 @@ class AdminBase extends DefaultAdmin { $list = 0; $jumpOf = 0; foreach($people as $b) { + // print_r($b); if(!$b['on_waitlist'] || $b['on_waitlist'] && $b['transferred']) { $list++; - }else if($b['backstepped'] && !$b['on_waitlist']) { + } + if($b['backstepped']) { $jumpOf++; - }else if($b['on_waitlist'] && !$b['transferred'] && $b['studityp'] == "ALUMN") { + } + if($b['on_waitlist'] && !$b['transferred'] && $b['studityp'] == "ALUMN") { $wl_al++; - }else if($b['on_waitlist'] && !$b['transferred'] && $b['studityp'] != "ALUMN") { + } + if($b['on_waitlist'] && !$b['transferred'] && $b['studityp'] != "ALUMN") { $wl++; } } diff --git a/registration-system/admin/pages_list.php b/registration-system/admin/pages_list.php index 2b6cf202641caf12e961a38e0a0024efb8edff03..eec8fa7f48e3aee5a30e5339190f64870fbd70bc 100644 --- a/registration-system/admin/pages_list.php +++ b/registration-system/admin/pages_list.php @@ -136,7 +136,7 @@ class AdminListPage extends AdminPage { $tbody .= ' <tr> <td><a href="#" class="edit_bachelor">'.$b['bachelor_id'].'</a></td> - <td>'.$this->mysql2german($b['anm_time']).'</td> + <td>'.date('d.m.Y - G:i.s', $b['anm_time']).'</td> <td><a href="mailto:'.$b['mehl'].'?subject=FS-Fahrt">' . $b['forname'] . ' ' . $b['sirname'] .'</a></td> <td>'.$b['pseudo'].'</td> <td>'.$b['antyp'].'</td> @@ -221,7 +221,6 @@ class AdminListPage extends AdminPage { { type: "dedate", targets: [1,5,6]}, { type: "link", targets: [0, 2] }, { type: "prb", targets: ' . $buttoncol . ' }, - { targets: 7, visible: false, searchable: true }, { targets: 16, visible: false, searchable: false } ], diff --git a/registration-system/admin/pages_overview.php b/registration-system/admin/pages_overview.php index ec018aae7076873cc684cd131bb91c09affd4379..528b1c2e1e5571d553e4d5ad6dcc8550a3e81218 100644 --- a/registration-system/admin/pages_overview.php +++ b/registration-system/admin/pages_overview.php @@ -37,7 +37,10 @@ class AdminOverviewPage extends AdminPage { ['essen' => 'VEGA', 'fahrt_id'=>$fid, 'backstepped'=>null, 'OR' => $notwaiting]]), 'backstepped' => $db->count('bachelor', ['AND' => ['fahrt_id' => $fid, 'backstepped[!]' => null]]), 'treffpunkt' => $db->count('bachelor', ['AND' => array_merge($baseW, ['antyp' => 'BUSBAHN'])]), + 'berstis' => $db->count('bachelor', ['AND' => array_merge($baseW, ['studityp' => 'B_ERSTI'])]), + 'merstis' => $db->count('bachelor', ['AND' => array_merge($baseW, ['studityp' => 'M_ERSTI'])]), 'erstis' => $db->count('bachelor', ['AND' => array_merge($baseW, ['studityp' => 'ERSTI'])]), + 'orgas' => $db->count('bachelor', ['AND' => array_merge($baseW, ['isOrga' => 1])]), 'alumni' => $db->count('bachelor', ['AND' => array_merge($baseW, ['studityp' => 'ALUMN'])]), 'mentor' => $db->count('bachelor', ['AND' => array_merge($baseW, ['studityp' => 'MENTO'])]), 'hoerstis' => $db->count('bachelor', ['AND' => array_merge($baseW, ['studityp' => 'HOERS'])]), @@ -55,12 +58,24 @@ class AdminOverviewPage extends AdminPage { 'out_ausstehend' => $db->count('bachelor', ['AND' => array_merge($baseW, ['repaid' => null])]), ] ]; + $this->data['mitfahrer']['erstis'] = $this->data['mitfahrer']['merstis']+$this->data['mitfahrer']['berstis']+$this->data['mitfahrer']['erstis']; $this->data['ratio'] = ['sum' => ($this->data['mitfahrer']['mentor']+$this->data['mitfahrer']['alumni']+$this->data['mitfahrer']['erstis']+$this->data['mitfahrer']['hoerstis'])]; + if ($this->data['ratio']['sum'] > 0) $this->data['ratio']['ratioErsti'] = round($this->data['mitfahrer']['erstis']/$this->data['ratio']['sum']*100, 2); else $this->data['ratio']['ratioErsti'] = round(100, 2); + if ($this->data['ratio']['sum'] > 0) + $this->data['ratio']['ratioBErsti'] = round($this->data['mitfahrer']['berstis']/$this->data['ratio']['sum']*100, 2); + else + $this->data['ratio']['ratioBErsti'] = round(100, 2); + + if ($this->data['ratio']['sum'] > 0) + $this->data['ratio']['ratioMErsti'] = round($this->data['mitfahrer']['merstis']/$this->data['ratio']['sum']*100, 2); + else + $this->data['ratio']['ratioMErsti'] = round(100, 2); + if ($this->data['ratio']['sum'] > 0) $this->data['ratio']['ratioHoerst'] = round($this->data['mitfahrer']['hoerstis']/$this->data['ratio']['sum']*100, 2); else @@ -125,7 +140,10 @@ class AdminOverviewPage extends AdminPage { <li>= Anteil Alumnis: '.$this->data['ratio']['ratioAlumn'].'%</li> <li>= Anteil Hörstis + Mentoren: '.$this->data['ratio']['ratioHoerstMentoren'].'%</li> <li>= Anteil Erstis: '.$this->data['ratio']['ratioErsti'].'%</li> + <li>=> Anteil Bachelor Erstis: '.$this->data['ratio']['ratioBErsti'].'%</li> + <li>=> Anteil Master Erstis: '.$this->data['ratio']['ratioMErsti'].'%</li> </ul> + <li>Orgas: '.$this->data['mitfahrer']['orgas'].'</li> </ul> </div> <div style="float:left; margin-left: 15px"><h2>Zahlungen</h2> diff --git a/registration-system/config.inc.php b/registration-system/config.inc.php index 5088de09d7e1e057c6b57f6003cb67a04c2dba73..8c22f863f75efeb158b4ee20aa12ffa1be9795d2 100644 --- a/registration-system/config.inc.php +++ b/registration-system/config.inc.php @@ -19,7 +19,8 @@ require("config.local.php"); $config_invalidCharsRegEx = "/^[^0-9<>!?.::,#*@^_$\\\"'%;()&+]{2,50}$/"; // d©_©b $config_studitypen_o = array( - "ERSTI" => "Ersti", + "B_ERSTI" => "Bachelor Ersti", + "M_ERSTI" => "Master Ersti", "HOERS" => "Hörsti", "MENTO" => "MentorIn", "ALUMN" => "Alumni" diff --git a/registration-system/frameworks/Bachelor.php b/registration-system/frameworks/Bachelor.php index 84d98cd7b312f5e1507bfdf09bde0ffa87447a6d..61d490ce680101a83c74722fa65c4228e39c7ff5 100644 --- a/registration-system/frameworks/Bachelor.php +++ b/registration-system/frameworks/Bachelor.php @@ -172,7 +172,7 @@ class Bachelor { $lang_payinfomail_selector = 'lang_payinfomail_winter'; if ($this->fahrt->get('isSummer') == 1) $lang_payinfomail_selector = 'lang_payinfomail_summer'; - $this->feedbackHelper(['lang_waittoregmail', $lang_payinfomail_selector]); + $this->feedbackHelper($lang_payinfomail_selector); } return $code; } else { @@ -267,7 +267,7 @@ class Bachelor { $this->data['anday'] = date('Y-m-d', DateTime::createFromFormat('d.m.Y', $this->data['anday'])->getTimestamp()); if (preg_match('/\d{1,2}\.\d{1,2}\.\d{4}/', $this->data['abday'])) $this->data['abday'] = date('Y-m-d', DateTime::createFromFormat('d.m.Y', $this->data['abday'])->getTimestamp()); - + $code = $this->environment->database->update('bachelor', $this->data, ['AND' => ['fahrt_id' => $this->fahrt->getID(), 'bachelor_id' => $this->data['bachelor_id']]]); @@ -370,6 +370,10 @@ class Bachelor { $this->validateField('comment', 'comment', 'Trollololol'); $this->validateField('isOrga', 'isOrga', 'OrgaCode ist falsch!'); $this->validateField('mGame', 'mGame', '!'); + $tmp = trim($_REQUEST['studityp']); + if($tmp == 'ALUMN') { + $this->data['on_waitlist'] = 1; + } if (!$admincheck) { $this->validateField('captcha', 'captcha', 'Captcha falsch eingegeben.'); if (!isset($_REQUEST['disclaimer'])) diff --git a/registration-system/view/default_admin.php b/registration-system/view/default_admin.php index 7d650ae4a0fc40224e6af145b4ea2ff302010795..1fb57a8c2efc4ed1e1e391dba117e009ac2e267d 100644 --- a/registration-system/view/default_admin.php +++ b/registration-system/view/default_admin.php @@ -83,7 +83,7 @@ abstract class DefaultAdmin { </div> <div id="linkbar"> <?php $this->echoNavigation(); ?> - <a href="?logout" id="logout">.</a> + <a href="?logout">Ausloggen</a> </div> </body> </html> diff --git a/registration-system/view/signups/game1/js/story.js b/registration-system/view/signups/game1/js/story.js index 4920f3f496129b5bea95d99cbb4c10f937b1298d..f552bc12606df1478204751b9c73ea7f85c7a594 100644 --- a/registration-system/view/signups/game1/js/story.js +++ b/registration-system/view/signups/game1/js/story.js @@ -176,10 +176,16 @@ Story.actions = { Environment.fapi.data.setValue('studityp', 'MENTO'); } }, { - message: 'Nein, bin neu hier', + message: 'Nein, bin neu hier (Bachelor)', action: function () { state.studityp = true; - Environment.fapi.data.setValue('studityp', 'ERSTI'); + Environment.fapi.data.setValue('studityp', 'BERSTI'); + } + }, { + message: 'Nein, bin neu hier (Master)', + action: function () { + state.studityp = true; + Environment.fapi.data.setValue('studityp', 'MERSTI'); } }], condition: !state.studityp