Mini Shell

Direktori : /home/admin/web/mcpv.demarco.ddnsfree.com/public_html/external/prestataires/_include/
Upload File :
Current File : /home/admin/web/mcpv.demarco.ddnsfree.com/public_html/external/prestataires/_include/functions.php

<?php
require "_include/Exception.php";
require "_include/PHPMailer.php";
require "_include/SMTP.php";
require "_include/init.php";

use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
use PHPMailer\PHPMailer\SMTP;

function send_conf_email($to,$date,$periode) {

	set_time_limit(1500); // Gérer timeout SMTP
	
	$smtpserver = $GLOBALS['smtpserver'];
	$smtpproto = $GLOBALS['smtpproto'];        
	$smtpport = $GLOBALS['smtpport'];                    
	$smtpuser = $GLOBALS['smtpuser'];
	$smtppassword = $GLOBALS['smtppassword'];     
	$msgfrom = $GLOBALS['msgfrom'];
	$replyto = $GLOBALS['replyto'];	
	$telreply = $GLOBALS['telreply'];	
	
	$date_de = new DateTime($date . substr($periode,0,5));
	$date_a = new DateTime($date . substr($periode,8));
	$start = $date_de->format('Ymd').'T'.$date_de->format('His');
	$end = $date_a->format('Ymd').'T'.$date_a->format('His');
	$subject = 'Prochain cours informatique ADCN';
	$crlf = "\r\n";
	
	// Préparer attachement iCalendar
	
	$vcal  = 'BEGIN:VCALENDAR' . $crlf;	 
	$vcal .= 'PRODID:-//CompanyName//ProductName//EN' . $crlf;	 
	$vcal .= 'VERSION:2.0' . $crlf;
	$vcal .= 'CALSCALE:GREGORIAN' . $crlf;
	$vcal .= 'METHOD:REQUEST' . $crlf;
	$vcal .= 'BEGIN:VEVENT' . $crlf;
	$vcal .= 'DTSTAMP:'.date('Ymd').'T'.date('His').'Z' . $crlf;
	$vcal .= 'DTSTART:' . $start . $crlf; 	// YYYYMMDDTHHMMSS;
	$vcal .= 'DTEND:' . $end . $crlf; 		// YYYYMMDDTHHMMSS;
	$vcal .= 'UID:'.date('Ymd').'T'.date('His').'-'.rand().'-adcn.ch' . $crlf;
	$vcal .= 'CREATED:'.date('Ymd').'T'.date('His').'Z' . $crlf;
	$vcal .= 'LOCATION:Bureau ADCN - Rue Louis Favre 1 - 2000 Neuchâtel' . $crlf;
	$vcal .= 'SUMMARY:Prochain cours info ADCN' . $crlf;
	$vcal .= 'BEGIN:VALARM' . $crlf;
	$vcal .= 'TRIGGER:-PT1H' . $crlf;
	$vcal .= 'ACTION:DISPLAY' . $crlf;
	$vcal .= 'DESCRIPTION:Prochain cours info ADCN' . $crlf;
	$vcal .= 'END:VALARM' . $crlf;
	$vcal .= 'END:VEVENT' . $crlf;
	$vcal .= 'END:VCALENDAR' . $crlf;

	// Prepare EMail text
	
	$email_text  = '<img src="cid:logo_adcn"></img><br />';
	$email_text .= 'Vous êtes inscrit(e) au cours d\'informatique de l\'ADCN qui aura lieu le :<br /><br />';
	$email_text .= '<b>Mercredi ' . $date . ' de ' . $periode . ' au bureau de l\'ADCN, rue Louis Favre 1 - 2000 Neuchâtel</b><br /><br />';
	$email_text .= 'Merci de bien vouloir nous informer au <b>' . $telreply . '</b> si vous deviez avoir un empêchement<br /><br />';
	$email_text .= 'Salutations cordiales<br />';
	$email_text .= 'ADCN Neuchâtel<br /><br />';
	$email_text .= '<i>Clicker sur la pièce jointe pour ajouter cet évènement à votre calendrier</i>';
	
	$mail = new PHPMailer();

	$mail->IsSMTP();               
	$mail->SMTPDebug = 1; 					// 0 = aucune sortie, 1 = erreurs & messages, 2 = messages seul.                
	$mail->SMTPAuth = true;                	
	$mail->SMTPSecure = $smtpproto;        
	$mail->Host = $smtpserver;  
	$mail->Port = $smtpport;                    
	$mail->Username = $smtpuser;
	$mail->Password = $smtppassword;     
	$mail->CharSet = 'UTF-8';
	$mail->SetFrom($msgfrom);
	$mail->Subject = $subject;
	$mail->ContentType = 'text/plain';
	$mail->IsHTML(true);
	$mail->Body = $email_text; 
	$mail->AddAddress ($to);
	$mail->AddStringAttachment($vcal,'Cours info ADCN.ics');
	$mail->AddEmbeddedImage('_img/adcn-logo.png', 'logo_adcn');

	if(!$mail->Send())
	{
			$error_message = "Erreur : " . $mail->ErrorInfo;
	}
}

function send_conf_email_instructeur($email_instructeur, $fulldate, $fullname_utilisateur, $fullname_apprenant, $tel, $email_apprenant) {
	
	set_time_limit(1500); // Gérer timeout SMTP
	
	$smtpserver = $GLOBALS['smtpserver'];
	$smtpproto = $GLOBALS['smtpproto'];        
	$smtpport = $GLOBALS['smtpport'];                    
	$smtpuser = $GLOBALS['smtpuser'];
	$smtppassword = $GLOBALS['smtppassword'];     
	$msgfrom = $GLOBALS['msgfrom'];
	$replyto = $GLOBALS['replyto'];	
	$telreply = $GLOBALS['telreply'];
	$subject = 'ADCN - Annonce d\'inscription au cours d\'informatique';
	
	// Prepare EMail text
	
	$email_text  = '<img src="cid:logo_adcn"></img><br />';
	$email_text .= 'L\'inscription de l\'apprenant <b>' . $fullname_apprenant . ' </b> au cours d\'informatique de l\'ADCN du <b>' 
					. $fulldate . '</b> a été confirmée ce jour par <b>' . $fullname_utilisateur . '</b><br /><br />';
	$email_text .= 'Il est joignable par email <a href="mailto:' . $email_apprenant . '">' . $email_apprenant . 
					'</a> ou par téléphone au <b>' . $tel . '</b><br /><br />';
	$email_text .= 'ADCN Neuchâtel<br /><br />';
	
	$mail = new PHPMailer();

	$mail->IsSMTP();               
	$mail->SMTPDebug = 0; 					// 0 = aucune sortie, 1 = erreurs & messages, 2 = messages seul.                
	$mail->SMTPAuth = true;                	
	$mail->SMTPSecure = $smtpproto;        
	$mail->Host = $smtpserver;  
	$mail->Port = $smtpport;                    
	$mail->Username = $smtpuser;
	$mail->Password = $smtppassword;     
	$mail->CharSet = 'UTF-8';
	$mail->SetFrom($msgfrom);
	$mail->Subject = $subject;
	$mail->ContentType = 'text/plain';
	$mail->IsHTML(true);
	$mail->Body = $email_text; 
	$mail->AddAddress ($email_instructeur);
	$mail->AddEmbeddedImage('_img/adcn-logo.png', 'logo_adcn');

	if(!$mail->Send())
	{
			$error_message = "Erreur : " . $mail->ErrorInfo;
	} 
}

function nbDays($thedate) {
	return cal_days_in_month(CAL_GREGORIAN, $thedate->format("m"),$thedate->format("Y"));
}

function moisFrancais($nomMois) {
	$translate = str_replace("January","Janvier",$nomMois);
	$translate = str_replace("February","Février",$translate);
	$translate = str_replace("March","Mars",$translate);
	$translate = str_replace("April","Avril",$translate);
	$translate = str_replace("May","Mai",$translate);
	$translate = str_replace("June","Juin",$translate);
	$translate = str_replace("July","Juillet",$translate);
	$translate = str_replace("August","Août",$translate);
	$translate = str_replace("September","Septembre",$translate);
	$translate = str_replace("October","Octobre",$translate);
	$translate = str_replace("November","Novembre",$translate);
	$translate = str_replace("December","Décembre",$translate);
	return $translate;
}

function afficheDate($jour, $start_of_month, $DB) {
	$fulldate = $start_of_month->format("Y-m") . "-" . substr(str_repeat(0, 2).$jour, - 2);
	$today = (date("Y-m-d") == $fulldate) ? "true" : false;

	$html = "<td class=' " . ($today == true ? "text-light bg-info" : "text-primary") . "'>
			<div class='row'>
				<div class='col text-center'>
					<b>" . $jour . "</b>
				</div>
			</row>";
	if(date_create($fulldate)->format("N") == $GLOBALS["jour_cours"]) { // Si jour du cours 
		$req = $DB->prepare("select id from cours_sessions where date = STR_TO_DATE(:date, '%Y-%m-%d')");
		$req->bindParam(":date",$fulldate); 
		$req->execute();
		if($req->rowCount() <> 0) { // Si sessions existent pour le mercredi 
			$req = $DB->prepare("select id from cours_inscriptions where session_id in 
								(select id from cours_sessions where date = STR_TO_DATE(:date, '%Y-%m-%d'))");
			$req->bindParam(":date",$fulldate); 
			$req->execute();
			if($req->rowCount() == 0) // Si sessions existent le mercredi et aucune inscription -> Afficher suppression
			{
				$html = '<td hidden class="fulldate">' . $fulldate . '</td>
						<td class=" ' . ($today == true ? "text-light bg-info" : "text-primary") .'">
							<div class="row">
								<div class="col  text-center">
									<b>' . $jour . '</b>
								</div>
								<div class="col">
									<button type="button" title="Supprimer sessions" class="del_btn btn btn-outline-danger btn-sm" role="button">
									<i class="fa fa-xs fa-trash"></i></button>
								</div>
							</div>
						</td>'; 
			}
			else {
				$html = "<td class=' " . ($today == true ? "text-light bg-info" : "text-primary") . "'>
				<div class='row'>
					<div class='col text-center'>
						<b>" . $jour . "</b>
					</div>
					<div class='col'>
						<i title='" . $req->rowCount() . " inscriptions enregistrées' class='fa fa-xs fa-users'></i>
					</div>
				</row>";
			}
		}
		else  { // Aucune session pour le mercredi -> Afficher création
			$html = '<td hidden class="fulldate">' . $fulldate . '</td>
					<td class= "' . ($today == true ? "text-light bg-info" : "text-primary") .'">
						<div class="row">
						<div class="col text-center">
							<b>' . $jour . '</b>
						</div>
						<div class="col">
							<button type="button" title="Ajouter sessions" class="add_btn btn btn-outline-primary btn-sm" role="button">
							<i class="fa fa-xs fa-calendar-plus-o"></i></button>
						</div>
						</div>
					</td>'; 
		}
	} 
	return $html;          
}
?>







Many top casino sites now offer mobile platforms with diverse – Base de données MCPV "Prestataires"

Many top casino sites now offer mobile platforms with diverse

10 Best Casinos Near Me: Ultimate Local Casino Guide for 2025

This daily no-deposit bonus allows players to walk away with up to $3k each day, making every login worthwhile. Hard Rock Casino is available to players located in New Jersey and those residents can claim the deposit match and free spin bonus. Florida does have several casinos, with some of the popular ones located in cities like Miami and Tampa.

The lure of the spinning reels, the anticipation as they come to a stop, and the thrill of hitting a winning combination – these are experiences that make casinos worthwhile. And when it comes to top-rated slot havens, Cafe Casino and Slots LV stand out with their significant jackpot potential and vast range of slot machines. Ignition Casino stands as a beacon for gamblers seeking a vibrant gaming experience. This casino is renowned for its dynamic range of games that cater to all types of players.

BetMGM Casino should also be on your radar if you’re gunning for jackpots. Beyond their eye-watering proprietary progressives, such as MGM Grand Million, they offer a nice range of must-hit-by daily jackpots named Lion’s Share. Online gambling is currently legal in Connecticut, Delaware, Michigan, Nevada, New Jersey, Pennsylvania, Rhode Island, and West Virginia. Other states such as California, Illinois ohjoycasino.com, Indiana, Massachusetts ルーレット, and New York are expected to pass similar legislation soon.

NY and its wide range of casinos offer an interesting and pleasing medley of gambling options. The state reach passes through slot machines, poker, blackjack and many more. The next table is combining every betting possibility, so you can have a look and decide if the state of New York is your next casino destination. The traditional charm of classic three-reel slots at Big Spin Casino offers a nostalgic experience for those who appreciate the simpler times. On the other hand, its adventure-themed slots provide an engaging and immersive experience, featuring modern video slot elements that attract players seeking innovative gameplay. A wide array of slot machines is a must-have for slot enthusiasts seeking a diverse and thrilling gaming experience in a local casino.

There are strong opinions on each side of the issue – with those that vocally support it, and those that vehemently detest the very notion of gambling in the Branson area. Because a majority of tax revenues in Nevada are generated from the tourism and gaming industries, Nevada’s tax burden is one of the lightest in the nation. Nevada is one of only seven states without a personal income tax and one of only three without a corporate income tax.

The advent of mobile technology has revolutionized the online gambling industry, facilitating convenient access to favorite casino games anytime, anywhere. Many top casino sites now offer mobile platforms with diverse game selections and user-friendly interfaces ジョイカジノ, making online casino gambling more accessible than ever. This allows players to access their favorite games from anywhere, at any time. Identifying the perfect casino site is a vital step in the process of online gambling.

10 Best Casinos Near Me: Ultimate Local Casino Guide for 2025 This daily no-deposit bonus allows players to walk away with up to $3k each day, making every login worthwhile. Hard Rock Casino is available to players located in New Jersey and those residents can claim the deposit match and free spin bonus. Florida does…

Leave a Reply

Your email address will not be published. Required fields are marked *