IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

HTML Discussion :

Liens mail et téléphone cliquable


Sujet :

HTML

  1. #1
    Membre averti
    Homme Profil pro
    aux études mais 40 ans
    Inscrit en
    Juin 2004
    Messages
    2 016
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations professionnelles :
    Activité : aux études mais 40 ans

    Informations forums :
    Inscription : Juin 2004
    Messages : 2 016
    Points : 308
    Points
    308
    Par défaut Liens mail et téléphone cliquable
    Bonjour,

    J'ai un petit code tout simple qui va lire un fichier excel et l'affiche d'une manière qui me convient :

    Résultat ici : http://www.espaceimagi.be/wp_jerome_...es-spectacles/

    Code ici :

    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>AGENDA DES SPECTACLES</title>
    <meta name="viewport" content="initial-scale = 1.0, maximum-scale = 1.0, user-scalable = no, width = device-width">
    <link rel="stylesheet" href="style.css" media="screen">
    </head>
    <body bgcolor="#ACACAC" background="./images/fond.jpg">
    <body>
    <table width="900" border="0" align="center">
      <tr bgcolor="#FFFFFF">
      <!-- première colonne avec l'AGENDA-->
        <td width="60%" height="779" align="center" valign="middle">
    <!-- Je fais un tableau de deux colonnes-->
     
    <!--   DEBUT DU PHP ***********-->
    <?php
    $artout="jdw";
    /** Charger la bibliothèque **/ 
    set_include_path(get_include_path() . PATH_SEPARATOR . './Classes/');
    include 'PHPExcel/IOFactory.php';
    /** définir le fichier à examiner*/ 
    $inputFileName = './dates.xlsx';
    /** On "charge le fichier excel*/
    $objPHPExcel = PHPExcel_IOFactory::load($inputFileName);
    /** On dit que c'est la feuille 0 du fichier excell qu'on va utiliser*/
    $worksheet=$objPHPExcel->getSheet(0);
    /** je met à zero la variable qui va compter les lignes*/
    $i=1;
    /** On boucle pour passer les lignes en revue*/
    foreach ($worksheet->getRowIterator() as $row) {
            $i = $row->getrowindex();       
            /** Ici je met dans les différentes variables le contenu de la cellule concernée pour la ligne en cours*/
                                                                                                    $affiche    =$worksheet->getCellByColumnAndRow('0',$i)->getCalculatedValue();
                                                                                                    $lieu       =$worksheet->getCellByColumnAndRow('1',$i)->getCalculatedValue();
                                                                                                    $datu       =$worksheet->getCellByColumnAndRow('2',$i)->getCalculatedValue();
                                                                                                    $heure      =$worksheet->getCellByColumnAndRow('3',$i)->getCalculatedValue();
                                                                                                    $site       =$worksheet->getCellByColumnAndRow('4',$i)->getCalculatedValue();
                                                                                                    $mail       =$worksheet->getCellByColumnAndRow('5',$i)->getCalculatedValue();
                                                                                                    $telephone  =$worksheet->getCellByColumnAndRow('6',$i)->getCalculatedValue();
                                                                                                    $reserve    =$worksheet->getCellByColumnAndRow('7',$i)->getCalculatedValue();
                                                                                                    $coment     =$worksheet->getCellByColumnAndRow('8',$i)->getCalculatedValue();
                                                                                                    $artiste    =$worksheet->getCellByColumnAndRow('9',$i)->getCalculatedValue();
                                                                                                    $spectacle  =$worksheet->getCellByColumnAndRow('10',$i)->getCalculatedValue();
                                                                                                    $dati           = PHPExcel_Shared_Date::ExcelToPHP($datu);
                                                                                                    $dati       =date('d-m-Y',$dati);
                                                                                                    $dato       =date('d-m-Y');
    if ($artiste=="all") 
    {
    $artiste=$artout;
    }
    if ((strtotime($dati)>=strtotime($dato) && $artout==$artiste) or (strtotime($dati)>=strtotime($dato) && $artout=="all")) /** on regarde si la date de la ligne Excell est dans le passé, si pas on affiche le contenu des variables */
    {
    echo /** On envoi du HTML pour exploiter le contenu des différentes variables et que ça s'affiche bien*/
    <<<HTML
    <table width="80%" border="1"><tr>
                                                                            <td width="12%"><img src="$affiche" width="114" height="152" /></td>
                                                                            <td width="85%">
                                                                                                            <span style='font-family:Comic Sans MS; text-align:left; font-size:23px; line-height:25px;'>{$lieu}</span>
                                                                                                            <br>
                                                                                                            <span style='font-family:Arial; text-align:left; font-size:19px; line-height:20px;'>{$spectacle}</span> 
                                                                                                            <table width="100%" border="0"><tr>
                                                                                                            <td width="80%">
                                                                                                                                                                            <span style='font-family:Arial; text-align:left; font-size:15px; line-height:15px;'>Le {$dati} à {$heure}</span> 
                                                                                                                                                                            <BR>
                                                                                                                                                                            <span style='font-family:Arial; text-align:left; font-size:15px; line-height:15px;'>MAIL :{$mail} TELEPHONE : {$telephone}</span> 
                                                                                                                                                                            <BR>
                                                                                                                                                                            <BR>    
                                                                                                                                                                                                                                                                            
                                                                                                                                                                            <a href="$reserve" target="_blank">
                                                                                                                                                                            <img src="./images/btn3.png" align="right" width="150" height="45" "></a>
                                                                                                            </td>
                                                                                                            </tr> 
                                                                                                            </td>
                                                                                                            </table>
                                                            </tr>
    </table>
    </html>
    HTML;
    }
    }
    $closeFileName = './dates.xlsx';
    ?>  
     
    </body>
    </html>

    Mon souci :
    Je voudrais que le mail et le numéro de téléphone soient cliquables mais je n'y arrive pas.

    Merci de votre aide.

    A fort bientôt.

  2. #2
    Membre averti
    Homme Profil pro
    aux études mais 40 ans
    Inscrit en
    Juin 2004
    Messages
    2 016
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations professionnelles :
    Activité : aux études mais 40 ans

    Informations forums :
    Inscription : Juin 2004
    Messages : 2 016
    Points : 308
    Points
    308
    Par défaut
    Question débile, ça me semblait trop simple pour être ça... bah c'était ça

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 1
    Dernier message: 04/11/2012, 15h01
  2. Réponses: 0
    Dernier message: 29/12/2011, 09h49
  3. Remplacer des boutons par des liens cliquables
    Par voyageurdumonde dans le forum Général JavaScript
    Réponses: 3
    Dernier message: 20/04/2011, 04h26
  4. perte des liens images lors d'un transfert de mail
    Par jem27 dans le forum Thunderbird
    Réponses: 0
    Dernier message: 17/12/2009, 14h04
  5. sécuriser des liens dans des mails
    Par agrotic dans le forum ASP
    Réponses: 7
    Dernier message: 29/05/2007, 14h53

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo