<h2><?php echo $this->tIndexdUsers[$oPosts->user_id]->firstname ?> <?php echo $this->tIndexdUsers[$oPosts->user_id]->lastname ?></h2>
<h2><a href="<?php echo _root::getLink('mainShare::profil',array('user_id'=>$oPosts->user_id))?>"><?php echo $this->tIndexdUsers[$oPosts->user_id]->firstname ?> <?php echo $this->tIndexdUsers[$oPosts->user_id]->lastname ?></a></h2>
<hr/>
<h1>Rechercher</h1>
<form action="" method="POST">
<p>Rechercher <input type="text" name="pattern" /> <input type="submit"
value="Rechercher"/></p>
</form>
<?php if(_root::getRequest()->isPost() and _root::getParam('pattern')):?>
<h1>Résultat(s) de recherche</h1>
<?php if($this->tUserFound):?>
<table>
<?php foreach($this->tUserFound as $oUserFound):?>
<tr>
<td>
<a href="<?php echo _root::getLink('mainShare::profil',array('user_id'=>$oUserFound->id))?>">
<?php echo $oUserFound->lastname?> <?php echo $oUserFound->firstname?>
</a>
</td>
<td><a href="<?php echo _root::getLink('contacts::ask',
array('id'=>$oUserFound->id))
?>">demander en contact</a></td>
</tr>
<?php endforeach;?>
</table>
<?php else:?>
<p>Aucun résultats</p>
<?php endif;?>
<?php endif;?>
<?php if($this->tContacts):?>
<table>
<?php foreach($this->tContacts as $oContact):?>
<?php $sPicture=_root::getConfigVar('path.data').'/img/default.png'; if($oContact->profilPicture!=''){ $sPicture= $oContact->profilPicture;}?>
<tr>
<td><img style="height:20px" src="<?php echo $sPicture;?>"/></td>
<td><a href="<?php echo _root::getLink('mainShare::profil',array('user_id'=>$oContact->id))?>"><?php echo $oContact->lastname ?></a></td>
<td><a href="<?php echo _root::getLink('mainShare::profil',array('user_id'=>$oContact->id))?>"><?php echo $oContact->firstname ?></a></td>
</tr>
<?php endforeach;?>
</table>
<?php else:?>
Aucun pour le moment
<?php endif;?>
<?php if($this->tContacts):?>
<table>
<?php foreach($this->tContacts as $oContact):?>
<?php $sPicture=_root::getConfigVar('path.data').'/img/default.png'; if($oContact->profilPicture!=''){ $sPicture= $oContact->profilPicture;}?>
<tr>
<td><img style="height:20px" src="<?php echo $sPicture;?>"/></td>
<td><?php echo $oContact->lastname ?></td>
<td><?php echo $oContact->firstname ?></td>
<td>
<a href="<?php echo _root::getLink('contacts::accept',
array('id'=>$oContact->friend_id))
?>">Accepter</a>
</td>
<td>
<a href="<?php echo _root::getLink('contacts::refuse',
array('id'=>$oContact->friend_id))
?>">Refuser</a>
</td>
</tr>
<?php endforeach;?>
</table>
<?php else:?>
Aucun pour le moment
<?php endif;?>
<hr/>
<h1>Rechercher</h1>
<form action="" method="POST">
<p>Rechercher <input type="text" name="pattern" /> <input type="submit"
value="Rechercher"/></p>
</form>
<?php if(_root::getRequest()->isPost() and _root::getParam('pattern')):?>
<h1>Résultat(s) de recherche</h1>
<?php if($this->tUserFound):?>
<table>
<?php foreach($this->tUserFound as $oUserFound):?>
<?php $sPicture=_root::getConfigVar('path.data').'/img/default.png'; if($oUserFound->profilPicture!=''){ $sPicture= $oUserFound->profilPicture;}?>
<tr>
<td><img style="height:20px" src="<?php echo $sPicture;?>"/></td>
<td>
<a href="<?php echo _root::getLink('mainShare::profil',array('user_id'=>$oUserFound->id))?>">
<?php echo $oUserFound->lastname?> <?php echo $oUserFound->firstname?>
</a>
</td>
<td><a href="<?php echo _root::getLink('contacts::ask',
array('id'=>$oUserFound->id))
?>">demander en contact</a></td>
</tr>
<?php endforeach;?>
</table>
<?php else:?>
<p>Aucun résultats</p>
<?php endif;?>
<?php endif;?>
Lire la suite : III Ajoutons la possibilité de mettre des +1 à des posts