git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-264
Header('Content-type: image/'.$myphoto->mimetype);
echo $myphoto->data;
} else {
- if(preg_match('/^\d*$/', Env::get('x'))) {
- $res = $globals->xdb->query('SELECT attachmime, attach FROM photo WHERE uid = {?}', Env::getInt('x'));
- } else {
- $res = $globals->xdb->query(
- "SELECT attachmime, attach
- FROM photo AS p
- INNER JOIN aliases AS a ON p.uid=a.id
- WHERE alias={?}", Env::get('x'));
- }
+ $res = $globals->xdb->query(
+ "SELECT attachmime, attach
+ FROM photo AS p
+ INNER JOIN aliases AS a ON p.uid=a.id
+ WHERE alias={?}", Env::get('x'));
if( list($type,$data) = $res->fetchOneRow() ) {
Header( "Content-type: image/$type");
Photo actuelle de {$forlife}
</p>
-<img src="../getphoto.php?x={$smarty.request.uid}" alt="[ PHOTO ]" />
+<img src="../getphoto.php?x={$forlife}" alt="[ PHOTO ]" />
<br />
<p>
-<a href="{$smarty.server.PHP_SELF}?uid={$smarty.request.uid}&action=supprimer">Supprimer cette photo</a>
+<a href="?uid={$smarty.request.uid}&action=supprimer">Supprimer cette photo</a>
</p>
<p>
-<a href="{$smarty.server.PHP_SELF}?uid={$smarty.request.uid}&action=ecole">Voir sa photo de trombi récupérée à l'école (si disponible)</a>
+<a href="?uid={$smarty.request.uid}&action=ecole">Voir sa photo de trombi récupérée à l'école (si disponible)</a>
</p>
<form action="{$smarty.server.PHP_SELF}" method="post" enctype="multipart/form-data">
<tr class="pair">
<td class="titre">Photos</td>
<td>
- <img src="{rel}/getphoto.php?x={$valid->uid}" style="width:110px;" alt=" [ PHOTO ] " />
+ <img src="{rel}/getphoto.php?x={$valid->forlife}" style="width:110px;" alt=" [ PHOTO ] " />
- <img src="{rel}/getphoto.php?x={$valid->uid}&req=true" style="width:110px;" alt=" [ PHOTO ] " />
+ <img src="{rel}/getphoto.php?x={$valid->forlife}&req=true" style="width:110px;" alt=" [ PHOTO ] " />
</td>
</tr>
{/if}.
</td>
<td class="dcolg">
- <img src="getphoto.php?x={$smarty.session.uid}{*{if $smarty.cookies|@count == 0}&{php}echo SID;{/php}{/if}*}" alt=" [ PHOTO ] " />
+ <img src="getphoto.php?x={$smarty.session.forlife}" alt=" [ PHOTO ] " />
</td>
</tr>
</table>
</tr>
<tr>
<td class="center">
- <img src="{rel}/getphoto.php?x={$smarty.session.uid}" width="200" alt=" [ PHOTO ] " />
+ <img src="{rel}/getphoto.php?x={$smarty.session.forlife}" width="200" alt=" [ PHOTO ] " />
</td>
<td class="center half">
{if $submited}
- <img src="{rel}/getphoto.php?x={$smarty.session.uid}&req=true" width="200" alt=" [ PHOTO ] " />
+ <img src="{rel}/getphoto.php?x={$smarty.session.forlife}&req=true" width="200" alt=" [ PHOTO ] " />
{else}
Pas d'image soumise
{/if}