Enfin si possible envoyer un email grace au bouton "valider demande" avec comme sujet "Entrer votre nom ici" et comme corps du message le texte contenu dans la zone de texte
Enfin vous comprendrer mieux avec ce screenshot :
Voici mon code:
Code: Select all
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
exclude-result-prefixes="msxsl"
version="1.0">
<xsl:output omit-xml-declaration="yes" indent="yes" />
<xsl:preserve-space elements="all"/>
<xsl:param name="selected_category" select="'All'" />
<xsl:param name="sort_by" select="'title'" />
<xsl:param name="sort_data_type" select="'text'" />
<xsl:param name="sort_order" select="'ascending'" />
<xsl:param name="mode" select="'normal_view'" />
<xsl:param name="movie_number" select="'1'" />
<xsl:param name="search" select="'false'" />
<xsl:param name="search_string" select="''" />
<xsl:param name="application_type" select="'html'" />
<xsl:template match="/">
<xsl:choose>
<xsl:when test="$mode = 'normal_view'">
<table cellpadding="0" cellspacing="0" border="0" id="mainTable" height="100%">
<tr><td valign="top" id="leftTD">
<div class="intWindow">
<div class="windowTitle">
Recherche
</div>
<div class="windowContent">
Recherche par <i>acteurs</i>, <i>réalisateurs</i> et <i>titres</i>.
<table cellpadding="0" cellspacing="0" border="0">
<tr><td valign="top">
<input type="text" id="searchField"/>
</td><td valign="top">
<a class="button" href="javascript:search(document.all.searchField.value)">Ok</a>
</td></tr></table>
</div>
</div>
<div class="intWindow">
<div class="windowTitle">
Catégories
</div>
<div class="windowContent">
<xsl:apply-templates select="movies" mode="create_topbar" />
</div>
</div>
<div class="intWindow">
<div class="windowTitle">
Statistiques
</div>
<div class="windowContent">
<xsl:apply-templates select="movies" mode="statistique" />
</div>
</div>
<div class="intWindow">
<div class="windowTitle">
Sites des amis
</div>
<div class="windowContent">
<xsl:apply-templates select="movies" mode="liens" />
</div>
</div>
<div class="intWindow">
<div class="windowTitle">
Webmaster
</div>
<div class="windowContent">
<xsl:apply-templates select="movies" mode="webmaster" />
</div>
</div>
<div class="intWindow">
<div class="windowTitle">
Liste des films demandés
</div>
<div class="windowContent">
<xsl:apply-templates select="movies" mode="panier" />
</div>
</div>
</td><td valign="top">
<xsl:apply-templates select="//movies" mode="normal_view" />
</td></tr>
</table>
</xsl:when>
<xsl:when test="$mode = 'info_view'">
<xsl:apply-templates select="//movies" mode="info_view" />
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template match="movies" mode="create_topbar">
<a href="javascript:showCategory('All')">
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="$selected_category='All'">
filterSelected
</xsl:when>
<xsl:otherwise>
filter
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
Toutes
</a><br />
<xsl:variable name="single_categories">
<xsl:apply-templates select="movie/category" mode="find_categories" />
</xsl:variable>
<xsl:for-each select="msxsl:node-set($single_categories)//subcategory[not(. = preceding::subcategory)]">
<xsl:sort select="." data-type="text" />
<a>
<xsl:attribute name="href">
javascript:showCategory('<xsl:value-of select="." />')
</xsl:attribute>
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test=". = $selected_category">
filterSelected
</xsl:when>
<xsl:otherwise>
filter
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:value-of select="." />
</a><br />
</xsl:for-each>
</xsl:template>
<xsl:template match="movies" mode="normal_view">
<xsl:param name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZÅÄÖ'" />
<xsl:param name="lower" select="'abcdefghijklmnopqrstuvwxyzåäö'" />
<table cellspacing="0" class="movieList">
<thead>
<th><a href="javascript:sortBy('title')" class="tHead">Titre</a></th>
<th><a href="javascript:sortBy('rating')" class="tHead">Notation</a></th>
<th><a href="javascript:sortBy('type')" class="tHead">Type</a></th>
<th><a href="javascript:sortBy('nbcd')" class="tHead">CD</a></th>
<th><a href="javascript:sortBy('director')" class="tHead">Réalisateur</a></th>
<th><a href="javascript:sortBy('category')" class="tHead">Catégorie</a></th>
<th><a href="javascript:sortBy('year')" class="tHead">Année</a></th>
<th><a href="javascript:sortBy('pret')" class="tHead">Dispo</a></th>
</thead>
<xsl:choose>
<xsl:when test="$search = 'true'">
<xsl:apply-templates select="movie[contains(translate(actors, $upper, $lower), $search_string) or
contains(translate(director, $upper, $lower), $search_string) or
contains(translate(title, $upper, $lower), $search_string)
]" mode="normal_view">
<xsl:sort select="*[name() = $sort_by]" order="{$sort_order}" data-type="{$sort_data_type}" />
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="movie[contains(./category, $selected_category) or $selected_category='All']" mode="normal_view">
<xsl:sort select="*[name() = $sort_by]" order="{$sort_order}" data-type="{$sort_data_type}" />
</xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
</table>
</xsl:template>
<xsl:template match="movie" mode="normal_view">
<tr class="movieList">
<xsl:attribute name="onclick">
showMovieInfo(<xsl:value-of select="number" />);
</xsl:attribute>
<td width="100%" class="movieList">
<span class="title" id="col_title">
<xsl:number value="position()"/>.
<xsl:value-of select="titre" />
<img src="images/blank.gif">
<xsl:attribute name="style">
width: 50px; height: 12px; border: none;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(
src='images/new<xsl:value-of select="origine" />.gif', sizingMethod='scale')
</xsl:attribute>
</img>
</span>
</td>
<td class="movieList">
<img src="images/blank.gif">
<xsl:attribute name="style">
width: 52px; height: 12px; border: none;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(
src='images/<xsl:value-of select="rating" />.png', sizingMethod='scale')
</xsl:attribute>
</img>
</td>
<td class="movieList" >
<span id="col_type">
<xsl:value-of select="type" />
</span>
</td>
<td class="movieList" >
<span id="col_nbcd">
<xsl:value-of select="nbcd" /> CD
</span>
</td>
<td class="movieList" >
<span id="col_director">
<xsl:value-of select="director" />
</span>
</td>
<td class="movieList">
<span id="col_category">
<xsl:value-of select="category" />
</span>
</td>
<td class="movieList">
<span id="col_year">
<xsl:value-of select="year" />
</span>
</td>
<td class="movieList">
<span id="col_pret">
<img src="images/blank.gif">
<xsl:attribute name="style">
width: 10px; height: 10px; border: none;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(
src='images/ok<xsl:value-of select="pret" />.gif', sizingMethod='scale')
</xsl:attribute>
</img>
</span>
</td>
</tr>
</xsl:template>
<xsl:template match="movies" mode="info_view">
<div class="windowContent">
<table class="infoViewTable" height="100%" width="100%" cellpadding="0" cellspacing="0" border="0">
<xsl:apply-templates select="movie[number=$movie_number]" mode="info_view" />
</table>
</div>
</xsl:template>
<xsl:template match="movie" mode="info_view">
<tr>
<td class="infoViewTable" valign="top" width="333">
<img class="largePicture">
<xsl:attribute name="src">
data/<xsl:value-of select="picture" />
</xsl:attribute>
</img>
</td>
<td valign="top" class="infoViewTable">
<div class="infoViewText">
<p class="infoView">
<span class="largeTitle">
<xsl:value-of select="title" />
</span>
<img src="images/blank.gif">
<xsl:attribute name="style">
width: 52px; height: 12px; border: none;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(
src='images/<xsl:value-of select="rating" />.png', sizingMethod='scale')
</xsl:attribute>
</img>
</p>
<p class="infoView">
<b><u><font color="#000080">Infos Film:</font></u></b><br />
</p>
<p class="infoView">
<b>Categorie:</b> <xsl:value-of select="category" />
<br class="infoViewTable" />
<b>Pays - Année:</b> <xsl:value-of select="country" /> - <xsl:value-of select="year" />
<br class="infoViewTable" />
<b>Durée:</b> <xsl:value-of select="length" /> min
<br class="infoViewTable" />
<b>Réalisateur:</b> <xsl:value-of select="director" />
</p><p class="infoView">
<b>Acteurs:</b><br />
<xsl:call-template name="commas_to_br">
<xsl:with-param name="src" select="actors" />
</xsl:call-template>
</p>
<p class="infoView">
<b>Description:</b><br /><xsl:call-template name="html_br">
<xsl:with-param name="src" select="description" />
</xsl:call-template>
</p>
<p class="infoView">
<b>Commentaires:</b><br /><xsl:call-template name="html_br">
<xsl:with-param name="src" select="commentaire" />
</xsl:call-template>
</p>
<p class="infoView">
<b><u><font color="#000080">Infos DivX:</font></u></b><br />
</p>
<p class="infoView">
<b>Nombre de CD:</b> <xsl:value-of select="nbcd" />
<br class="infoViewTable" />
<b>Langue:</b> <xsl:value-of select="langue" />
<br class="infoViewTable" />
<b>Codec Vidéo:</b> <xsl:value-of select="codecvid" /> - <xsl:value-of select="bitratevid" /> Kbit/s
<br class="infoViewTable" />
<b>Codec Audio:</b> <xsl:value-of select="codecson" /> - <xsl:value-of select="bitrateson" /> Kbit/s
<br class="infoViewTable" />
<b>Résolution:</b> <xsl:value-of select="resolution" />
<br class="infoViewTable" />
<b>Taille:</b> <xsl:value-of select="taille" /> Mo
<br class="infoViewTable" />
</p>
</div>
<p align="right" style="margin-top:10px;padding:0px;">
<a class="button" href="">Demmander</a>
<a class="button" href="javascript:hideMovieInfo()">Fermer</a>
</p>
</td>
</tr>
</xsl:template>
<xsl:template name="html_br">
<xsl:param name="src" />
<xsl:choose>
<xsl:when test="contains($src, '<br>')">
<xsl:value-of select="substring-before($src, '<br>')" />
<br />
<xsl:call-template name="html_br">
<xsl:with-param name="src" select="substring-after($src, '<br>')" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$src" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="commas_to_br">
<xsl:param name="src" />
<xsl:choose>
<xsl:when test="contains($src, ',')">
<xsl:value-of select="substring-before($src, ',')" />
<br />
<xsl:call-template name="commas_to_br">
<xsl:with-param name="src" select="substring-after($src, ',')" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$src" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="category" mode="find_categories">
<xsl:call-template name="split_categories">
<xsl:with-param name="src" select="." />
</xsl:call-template>
</xsl:template>
<xsl:template name="split_categories">
<xsl:param name="src" />
<xsl:param name="delimiter" select="'/'" />
<xsl:choose>
<xsl:when test="contains($src, $delimiter)">
<subcategory><xsl:value-of select="normalize-space(substring-before($src, $delimiter))" /></subcategory>
<xsl:call-template name="split_categories">
<xsl:with-param name="src" select="substring-after($src, $delimiter)" />
</xsl:call-template>
</xsl:when>
<xsl:when test="$src != ''">
<subcategory><xsl:value-of select="normalize-space($src)" /></subcategory>
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template match="movies" mode="statistique">
Nombre total de films: <xsl:value-of select="totalfilm" /><br/>
Dont:<br/>
<xsl:value-of select="totaldivx3" /> DivX 3<br/>
<xsl:value-of select="totaldivx4" /> DivX 4<br/>
<xsl:value-of select="totaldivx5" /> DivX 5<br/>
<xsl:value-of select="totalxvid" /> Xvid<br/>
<xsl:value-of select="totalvcd" /> Vcd<br/>
<xsl:value-of select="totalautre" /> Divers<br/>
----------------------------------------<br/>
Durée moyenne d'un film: <xsl:value-of select="dureemoy" /> min
</xsl:template>
<xsl:template match="movies" mode="webmaster">
Nom: Blackhawk<br/>
<a href="mailto:blackhawk63@free.fr?subject=Question pour la liste de film">E-mail</a><br/>
<a href="http://www.hawk63.free.fr">Site internet</a><br/>
----------------------------------------<br/>
Mis à jour le: <xsl:value-of select="maj" />
</xsl:template>
<xsl:template match="movies" mode="liens">
<a href="http://clan.taz.free.fr">Clan Taz</a>
</xsl:template>
<xsl:template match="movies" mode="panier">
<form name="history">
<textarea name="fafalist" cols="17" rows="5"></textarea>
</form>
<br/>
<a class="button" href="mailto:blackhawk63@free.fr">Valider demmande</a>
</xsl:template>
</xsl:stylesheet>