ajout saisieModification
This commit is contained in:
@ -11,23 +11,19 @@
|
||||
|
||||
<title>Lyon Association Libre Informatique Solidaire</title>
|
||||
|
||||
<!-- Bootstrap Core CSS - Uses Bootswatch Flatly Theme: http://bootswatch.com/flatly/ -->
|
||||
<link href="css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Bootstrap Core CSS - Uses Bootswatch Flatly Theme: http://bootswatch.com/flatly/ >
|
||||
<link href="css/bootstrap.min.css" rel="stylesheet"-->
|
||||
|
||||
<!-- Custom CSS -->
|
||||
<link href="css/freelancer.css" rel="stylesheet">
|
||||
|
||||
<!-- Custom Fonts -->
|
||||
<!-- Custom Fonts >
|
||||
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
|
||||
<link href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic" rel="stylesheet" type="text/css">
|
||||
<link href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic" rel="stylesheet" type="text/css"-->
|
||||
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
</head>
|
||||
|
||||
@ -51,22 +47,22 @@
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="hidden">
|
||||
<a href="<?php echo $site_path;?>/index.html#page-top"></a>
|
||||
<a href="<?php echo $webSite;?>/index.html#page-top"></a>
|
||||
</li>
|
||||
<li class="page-scroll">
|
||||
<a href="<?php echo $site_path;?>/index.html#content">Présentation</a>
|
||||
<a href="<?php echo $webSite;?>/index.html#content">Présentation</a>
|
||||
</li>
|
||||
<li class="page-scroll">
|
||||
<a href="<?php echo $site_path;?>/index.html#about">Nos engagements</a>
|
||||
<a href="<?php echo $webSite;?>/index.html#about">Nos engagements</a>
|
||||
</li>
|
||||
<li class="page-scroll">
|
||||
<a href="<?php echo $site_path;?>/index.html#horaires">Horaires</a>
|
||||
<a href="<?php echo $webSite;?>/index.html#horaires">Horaires</a>
|
||||
</li>
|
||||
<li class="page-scroll">
|
||||
<a href="<?php echo $site_path;?>/index.html#contact">Contact</a>
|
||||
<a href="<?php echo $webSite;?>/index.html#contact">Contact</a>
|
||||
</li>
|
||||
<li class="page-scroll">
|
||||
<a href="<?php echo $site_path;?>/votations.php">Votations</a>
|
||||
<a href="<?php echo $webSite;?>/votations.php">Votations</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div><div><a>Association loi 1901</a></div>
|
||||
|
@ -30,7 +30,7 @@ function getpost( $var )
|
||||
return $_POST[$var];
|
||||
}else
|
||||
{
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -44,28 +44,6 @@ function mb_ucfirst($str)
|
||||
return $char . $str;
|
||||
}
|
||||
|
||||
function getLang( $lang, $gestion=false )
|
||||
{
|
||||
$dico = array();
|
||||
if ( empty($lang) )
|
||||
{
|
||||
$lang="en";
|
||||
}
|
||||
$langPath ='lang/'.$lang;
|
||||
if ($gestion)
|
||||
$langPath = "../" . $langPath;
|
||||
if (($fh = fopen($langPath, 'r') ))
|
||||
{
|
||||
$str = fgets($fh);
|
||||
fclose($fh);
|
||||
$dico = json_decode($str, true);
|
||||
return $dico;
|
||||
}else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function choixVotation($path, $methode=2) //2 = toutes les votations 1 = votations en cours 0 = votations cloturées
|
||||
{
|
||||
global $db, $base_url, $action;
|
||||
@ -103,47 +81,17 @@ function choixVotation($path, $methode=2) //2 = toutes les votations 1 = votat
|
||||
</form>';
|
||||
}
|
||||
|
||||
/*
|
||||
function envoiMailold($destinataire, $sujet, $text, $html=false, $cc='', $bcc='')
|
||||
function votationForm($path, $titre="", $libelle="", $dateDebut="", $DateFin="", $status=0)
|
||||
{
|
||||
require_once 'swiftmailer/autoload.php';
|
||||
//require_once 'include/swiftmailer/swiftmailer/lib/swift_init.php';
|
||||
$transport = (new Swift_SmtpTransport('mail.gandi.net', 465, 'ssl'))
|
||||
->setUsername('contact@lalis.fr')
|
||||
->setPassword('Gu>V$fiM{bQ^!x+FAHF+R.}bl');
|
||||
$mailer = new Swift_Mailer($transport);
|
||||
$message = (new Swift_Message($sujet))
|
||||
->setFrom(["contact@lalis.fr"])
|
||||
->setTo([$destinataire])
|
||||
->setCharset('utf-8');
|
||||
$type = $message->getHeaders()->get('Content-Type');
|
||||
if ($html)
|
||||
{
|
||||
// setParameters() takes an associative array
|
||||
$type->setValue('text/html');
|
||||
$type->setParameter('charset', 'utf-8');
|
||||
$str = nl2br($text);
|
||||
$text = "<html><head></head>\n<body>" . $str . "</body></html>";
|
||||
log_write(__FILE__ . EOL . __LINE__ . EOL . wordwrap($text, 1000, "\r\n"), INFO);
|
||||
}else
|
||||
{
|
||||
$type->setValue('text/plain');
|
||||
$type->setParameter('charset', 'utf-8');
|
||||
$text = str_replace("\n","\r\n", $text);
|
||||
}
|
||||
$message->setBody($text);
|
||||
//add date header
|
||||
$headers = $message->getHeaders();
|
||||
$headers->addDateHeader('Your-Header', new DateTimeImmutable('3 days ago'));
|
||||
if (!$mailer->send($message, $failures))
|
||||
{
|
||||
echo "Failures:";
|
||||
print_r($failures);
|
||||
log_write(__FILE__ . EOL . __LINE__ . EOL . "Le courriel n'est pas parti:" . $destinataire . EOL . $sujet . EOL . print_r($failure, true) . EOL . wordwrap($text, 1000 , "\r\n"), ERROR);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}*/
|
||||
//TODO vérification du formulaire en javascript
|
||||
print('<form method="get" action="' . $path . '">');
|
||||
print('<label for="titre">' . _("Titre") .'</label><br><input type="text" id="titre" name="titre" value="'. $titre . '">') . EOLH;
|
||||
print('<label for="libelle">' . _("Description") . '</label><br><input type="text" id="libelle" name="libelle" value="'. $libelle . '">') . EOLH;
|
||||
print('<label for="dateDebut">' . _("Date de début de la période de vote") . '</label><br><input type="date" id="dateDebut" name="dateDebut" value="'. $dateDebut . '">') . EOLH;
|
||||
print('<label for="dateFin">' . _("Date de fin de la période de vote") . '</label><br><input type="date" id="dateFin" name="dateFin" value="'. $dateFin . '">') . EOLH;
|
||||
print('<input type="submit" formaction="index.php" value="' . _("Annuler") . '">') . EOLH;
|
||||
print('<input type="submit" value="' . _("Envoyer") . '">') . EOLH;
|
||||
}
|
||||
|
||||
function envoiMail($destinataire, $sujet, $text, $html=false, $cc='', $bcc='')
|
||||
{
|
||||
@ -166,7 +114,6 @@ function envoiMail($destinataire, $sujet, $text, $html=false, $cc='', $bcc='')
|
||||
$text = str_replace("\n","\r\n", $text);
|
||||
}
|
||||
|
||||
|
||||
//Server settings
|
||||
//$mail->SMTPDebug = SMTP::DEBUG_SERVER; //Enable verbose debug output
|
||||
$mail->isSMTP(); //Send using SMTP
|
||||
|
Reference in New Issue
Block a user