Skip to content
Snippets Groups Projects
Commit dc966a41 authored by Tim Repke's avatar Tim Repke
Browse files

added some attributes für eine fahrt

parent f70d3fd0
No related branches found
No related tags found
No related merge requests found
......@@ -22,11 +22,18 @@ if(isset($_POST['note-content'])){
"leiter" => $_REQUEST['leiter'],
"kontakt" => $_REQUEST['kontakt'],
"max_bachelor" => $_REQUEST['max_bachelor'],
"regopen" => isset($_REQUEST['regopen']) ? 1 : 0],
"regopen" => isset($_REQUEST['regopen']) ? 1 : 0,
"wikilink" => $_REQUEST['wikilink'],
"paydeadline" => $_REQUEST['paydeadline'],
"payinfo" => $_REQUEST['payinfo']],
array("fahrt_id"=>$config_current_fahrt_id));
}
$data = $admin_db->get("fahrten", ["beschreibung", "titel", "von", "bis", "ziel", "map_pin", "leiter", "kontakt", "regopen", "max_bachelor"], array("fahrt_id"=>$config_current_fahrt_id));
$data = $admin_db->get("fahrten", ["beschreibung", "titel", "von", "bis", "ziel", "map_pin", "leiter", "kontakt", "regopen", "max_bachelor", "wikilink", "paydeadline", "payinfo"], array("fahrt_id"=>$config_current_fahrt_id));
if(!preg_match('/\d{2}\.\d+ \d{2}\.\d+/', $data['map_pin'])){
$data['map_pin'] = '52.4263218 13.5223815';
}
$headers .="<!-- wysihtml5 parser rules -->
<script src=\"../view/js/wysihtml5-0.3.0_rc2.min.js\"></script>
......@@ -59,10 +66,11 @@ section{
clear: both;
height: 30px;
}
.formlist input{
.formlist input, .formlist textarea {
float: right;
width: 300px;
}
.formlist label{
float:left;
}
......@@ -91,6 +99,12 @@ $text .= '
<input type="text" name="leiter" id="leiter" value="'.$data["leiter"].'" /></li>
<li><label>E-Mail</label>
<input type="text" name="kontakt" id="kontakt" value="'.$data["kontakt"].'" /></li>
<li><label>Wiki-Link</label>
<input type="text" name="wikilink" id="wikilink" value="'.$data["wikilink"].'" /></li>
<li><label>Zahlung bis</label>
<input type="text" name="paydeadline" id="paydeadline" value="'.$data["paydeadline"].'" /></li>
<li><label>Zahlungsdetails</label>
<textarea style="border:1px dotted grey;height: 6em; padding: 0 0 0 0.4em" rows="4" name="payinfo" id="payinfo">'.$data["payinfo"].'</textarea></li>
</ul>
</div>
<div style="float:left">
......@@ -112,6 +126,7 @@ $text .= '
$(function() {
$( "#von" ).datepicker( { dateFormat: "yy-mm-dd"} );
$( "#bis" ).datepicker( { dateFormat: "yy-mm-dd"} );
$( "#paydeadline" ).datepicker( { dateFormat: "yy-mm-dd"} );
});
</script>
</div>
......
......@@ -99,7 +99,7 @@ function comm_generate_key($db_handle, $check, $conditions){
*
* returns true/false depending on success
*/
function comm_send_mail($db_handle, $addr, $cont, $from = NULL){
function comm_send_mail($db_handle, $addr, $cont, $from = NULL, $bcc = false){
global $config_current_fahrt_id, $config_mailtag;
if(is_null($from))
$from = $db_handle->get("fahrten", "kontakt", array("fahrt_id"=>$config_current_fahrt_id));
......@@ -111,6 +111,7 @@ function comm_send_mail($db_handle, $addr, $cont, $from = NULL){
$subj = $tmp[0];
$mess = $tmp[1];
}
$subj = $config_mailtag.$subj;
$headers = 'From: ' . $from . "\r\n" .
'Reply-To: ' . $from. "\r\n" .
......@@ -118,7 +119,7 @@ function comm_send_mail($db_handle, $addr, $cont, $from = NULL){
comm_verbose(3, "sending mail... from: ".$from."<br/>to:".$addr."<br />subject: ".$subj."<br/>content:".$mess);
return mail($addr, $config_mailtag.$subj, $mess, $headers);
return mail($addr, $subj, $mess, $headers);
}
function comm_get_lang($lang, $replace){
......
......@@ -232,9 +232,13 @@ class Environment {
private function feedbackHelper($mail_lang, $to, $hash, $fid) {
global $config_baseurl;
$from = $this->database->get("fahrten", ["kontakt","leiter"], ["fahrt_id"=>$fid]);
// send mail to newly registered person
$from = $this->database->get("fahrten", ["kontakt","leiter", "paydeadline", "payinfo", "wikilink"], ["fahrt_id"=>$fid]);
$mail = comm_get_lang($mail_lang, array( "{{url}}" => $config_baseurl."status.php?hash=".$hash,
"{{organisator}}" => $from['leiter']));
comm_send_mail($this->database, $to, $mail, $from['kontakt']);
// send mail to admin
}
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: tim
* Date: 8/16/14
* Time: 5:02 PM
*/
static $lang_regmail = "
Deine Anmeldung zur Fachschaftsfahrt\\\\
......@@ -47,4 +41,23 @@ Viele Grüße,
{{organisator}}!
";
static $lang_payinfomail = "
Zusatzinformationen zur Fachschaftsfahrt und Zahlungsaufforderung\\\\
Hallo,
du solltest bereits eine Anmeldebestätigung erhalten haben. Hier folgen jetzt noch ein paar kurze Infos:
Wie bereits angekündigt sammeln wir zunächst 60,-€ pro Person ein.
Diesen Betrag bitte bis zum {{paydeadline}} an folgendes Konto überweisen:
{{payinfo}}
Den Differenzbetrag bekommst du *nach* der Fahrt zusammen mit der Förderung wieder zurück. Die effektiven Kosten belaufen sich am Ende auf <25€.
Alle Informationen findest du weiterhin hier:
{{wikilink}}
Bis dann,
{{organisator}}!
";
?>
-- this adds new attributes to a trip
ALTER TABLE `fahrten`
ADD `wikilink` VARCHAR(255) NOT NULL DEFAULT 'https://wiki.fachschaft.informatik.hu-berlin.de/wiki/Erstsemesterfahrt',
ADD `paydeadline` DATE NOT NULL,
ADD `payinfo` TEXT NOT NULL DEFAULT '';
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment