Ticket #773 -> No permitir más de una inscripción por email (da igual el nº de plazas que tenga la inscripción)
git-svn-id: https://192.168.0.254/svn/Proyectos.FundacionLQDVI_WebCongresos/trunk@6 94ccb1af-fd9d-d947-8d90-7f70ea60afc8
This commit is contained in:
parent
e9affed5ae
commit
7f99020943
@ -1749,12 +1749,14 @@ function sem_f050($cid,$uid,$art) {
|
||||
$row = &$rows[0];
|
||||
$database->setQuery("SELECT * FROM #__sembookings WHERE id='$uid'");
|
||||
$rows = $database->loadObjectList();
|
||||
if($rows[0]->userid==0) {
|
||||
|
||||
//if($rows[0]->userid==0) {
|
||||
$user->name = $rows[0]->name;
|
||||
$user->email = $rows[0]->email;
|
||||
} else {
|
||||
/*} else {
|
||||
$user = &JFactory::getuser($rows[0]->userid);
|
||||
}
|
||||
}*/
|
||||
|
||||
$publisher = &JFactory::getuser($row->publisher);
|
||||
$body1 = "<p><span style=\"font-size:10pt;\">".JTEXT::_('SEM_0076')."</span><p>";
|
||||
$body2 = $body1;
|
||||
@ -1830,11 +1832,13 @@ function sem_f050($cid,$uid,$art) {
|
||||
}
|
||||
$subject = JTEXT::_('SEM_0048').$htxt.": ".$row->title;
|
||||
$subject = JMailHelper::cleanSubject($subject);
|
||||
|
||||
if($config->get('sem_p010',0)>0 OR $art<11) {
|
||||
$replyname = $publisher->name;
|
||||
$replyto = $publisher->email;
|
||||
$email = $user->email;
|
||||
$body = $abody.$body1.sem_f049($row, $rows[0], $user);
|
||||
|
||||
JUtility::sendMail($from, $sender, $email, $subject, $body, 1, null, null, null, $replyto, $replyname);
|
||||
}
|
||||
if($config->get('sem_p009',0)>0 AND $art<11) {
|
||||
@ -1842,6 +1846,7 @@ function sem_f050($cid,$uid,$art) {
|
||||
$replyto = $user->email;
|
||||
$email = $publisher->email;
|
||||
$body = $abody.$body2.sem_f049($row, $rows[0], $user);
|
||||
|
||||
JUtility::sendMail($from, $sender, $email, $subject, $body, 1, null, null, null, $replyto, $replyname);
|
||||
}
|
||||
}
|
||||
|
||||
@ -618,24 +618,27 @@ function sem_g004() {
|
||||
$name = JRequest::getVar('name','');
|
||||
$email = JRequest::getVar('email','');
|
||||
$reason = JTEXT::_('SEM_0086');
|
||||
|
||||
$mandar_email = 1;
|
||||
|
||||
|
||||
// Werte des angegebenen Kurses ermitteln
|
||||
$row = new mosSeminar($database);
|
||||
$row->load($cid);
|
||||
|
||||
$usrid = $my->id;
|
||||
$art = 2;
|
||||
if($uid>0) {
|
||||
/*if($uid>0) {
|
||||
$usrid = $uid;
|
||||
$art = 4;
|
||||
}
|
||||
}*/
|
||||
$sqlid = $usrid;
|
||||
/*if(($name!="" AND $email!="") OR $usrid==0) {
|
||||
if(($name!="" AND $email!="")) { // OR $usrid==0) {
|
||||
$usrid = 0;
|
||||
$sqlid = -1;
|
||||
}*/
|
||||
}
|
||||
|
||||
// Pruefung ob Buchung erfolgreich durchfuehrbar
|
||||
//Check if successful feasibility booking
|
||||
$database->setQuery( "SELECT * FROM #__sembookings WHERE semid='$cid' AND userid='$sqlid'" );
|
||||
$temp = $database->loadObjectList();
|
||||
$gebucht = sem_f020($row);
|
||||
@ -667,6 +670,7 @@ function sem_g004() {
|
||||
$temp = $database->loadObjectList();
|
||||
if( count( $temp ) > 0 ) {
|
||||
$allesok = 0;
|
||||
$mandar_email = 0;
|
||||
$ueber1 = JTEXT::_('SEM_1009'); // error en inscripción
|
||||
$reason = JTEXT::_('SEM_1003'); // inscripción duplicada para mismo usuario
|
||||
}
|
||||
@ -677,6 +681,7 @@ function sem_g004() {
|
||||
$ueber1 = JTEXT::_('SEM_1011'); // Inscripción realizada
|
||||
}
|
||||
|
||||
|
||||
// Alles in Ordnung
|
||||
if($allesok > 0) { //guardar la inscripción
|
||||
|
||||
@ -723,23 +728,27 @@ function sem_g004() {
|
||||
$neu->checkin();
|
||||
} // guardar la inscripción
|
||||
|
||||
|
||||
// Mandar e-mail
|
||||
if($art == 4) {
|
||||
sem_f050($cid,$neu->id,8); // Mandar e-mail
|
||||
sem_g010(2);
|
||||
} else {
|
||||
sem_f050($cid,$neu->id,1); // Mandar e-mail con inscripción OK
|
||||
$ueberschrift = array($ueber1,$reason);
|
||||
// Mandar e-mail
|
||||
|
||||
if ($art == 4) {
|
||||
if ($mandar_email == 1) {
|
||||
sem_f050($cid,$neu->id,8); // Mandar e-mail OK a usuario registrado
|
||||
}
|
||||
sem_g010(2);
|
||||
} else {
|
||||
if ($mandar_email == 1) {
|
||||
sem_f050($cid,$neu->id,1); // Mandar e-mail OK a usuario no registrado
|
||||
}
|
||||
$ueberschrift = array($ueber1,$reason);
|
||||
|
||||
// Ausgabe des Kurses
|
||||
sem_f019(JTEXT::_('SEM_0083'),"javascript:auf('','','');");
|
||||
sem_f019($row->title,"");
|
||||
if($usrid==0) {
|
||||
$usrid = $neu->id * -1;
|
||||
// Ausgabe des Kurses
|
||||
sem_f019(JTEXT::_('SEM_0083'),"javascript:auf('','','');");
|
||||
sem_f019($row->title,"");
|
||||
if($usrid==0) {
|
||||
$usrid = $neu->id * -1;
|
||||
}
|
||||
HTML_FrontSeminar::sem_g002($art,$row,$usrid,$search,$catid,$limit,$limitstart,$dateid,$ueberschrift);
|
||||
}
|
||||
HTML_FrontSeminar::sem_g002($art,$row,$usrid,$search,$catid,$limit,$limitstart,$dateid,$ueberschrift);
|
||||
}
|
||||
}
|
||||
|
||||
// +++++++++++++++++++++++++++++++++++++
|
||||
|
||||
Loading…
Reference in New Issue
Block a user