<legend><img src="<?php echo CTemplate::get_url_vignette($nom); ?>"/></legend> <div class="floatleft"> <p> <label>Nom</label> <input name="nom" type="text" value="<?php echo $nom?>" readonly="readonly" /> <?php echo CHtml::get_msginfo($error_signe['nom'])?></p> <?php foreach($design as $parametre=>$valeur) { ?> <p> <label><?php echo $parametre ?></label> <?php echo $template_objet->get_element_form($parametre) ?> </p> <?php } ?> <p> <input name="modifier" type="submit" value="Modifier >>"/> </p> </div> <div class="floatright"> <h2>Lisez moi</h2> <?php CFunction::print_r($template_objet->get_lisez_moi()) ?> </div> <hr class="clearfloat"/> </fieldset> </form> <?php } ?> <!-- InstanceEndEditable --></div> </div> <hr class="clearfloat" /> </div> </div> </body> <!-- InstanceEnd --></html>
<?php include("../inc/init.php"); $imap = new CImap("cyber-consult.ch", "*****@*****.**", "n8bk0QaE"); $imap->connect(); CFunction::print_r($imap->download_file($_GET['message_number'], $_GET['filename'])); ?>
<?php include("../inc/init.php"); //boucler pour voir tous les emails non envoyés $sql = "SELECT * FROM email WHERE etat = 3 AND DATE_FORMAT(date, '%Y-%m-%d') <= DATE_FORMAT(date, '%Y-%m-%d') LIMIT " . CTableConfiguration::get_value_by_element('MAIL_MAX_SEND'); $res = CBdd::select($sql); while($email = mysql_fetch_array($res)) { //à chaque résultat, envoyer l'email $liste_email = CTableGroupe::get_liste_email($email['destinataire']); $tdes = new CTableTexte(array('id'=>$email['id_text'])); $texte = $tdes->select_row(); $body = CNmail::build_html_body($texte['style'], CFunction::stripslashes($text)); $arr_pj = explode("|", @$email['pj']); if(CMail::send_mail($email['expediteur'], stripslashes($email['nom']), $body, $email['expediteur'], $arr_pj, 'Bcc: ' . $liste_email)) { //save $obj = new CTableEmail(array('id'=>$email['id'], 'expediteur'=>$email['expediteur'], 'destinataire'=>$email['destinataire'], 'nom'=>addslashes($email['nom']), 'text'=>addslashes($email['text']), 'pj'=>$email['pj'], 'etat'=>1, 'date'=>date("Y-m-d H:i:s"))); $obj->update(); } CFunction::print_r($email['destinataire']); } ?>