Initial commit

Functional, without SSO
This commit is contained in:
Jimmy Monin
2016-09-18 11:03:26 +02:00
commit 57708e3169
253 changed files with 30787 additions and 0 deletions

View File

@ -0,0 +1,70 @@
<form action="" method="post">
<h2>Génération d'un flux RSS</h2>
<dl>
<dt><label for="url">
Indiquer l'adresse de recherche</label></dt>
<dd><input type="text" id="url" name="url" value="<?php
echo $values["url"]; ?>" size="75" placeholder="Ex: <?php
echo htmlspecialchars("https://www.leboncoin.fr/ventes_immobilieres/offres/champagne_ardenne/?f=a&th=1&pe=7&ret=1");
?>" /></dd>
</dl>
<?php $isOpen = $values["price_min"] || $values["price_max"]
|| $values["price_strict"] || !empty($values["cities"]); ?>
<h2 id="morefilters" class="formbox">Filtres supplémentaires <span>(cliquez pour <?php
echo $isOpen ? "fermer" : "ouvrir"
?>)</span></h2>
<dl id="morefilters-content" style="display: <?php
echo $isOpen ? "block" : "none"
?>;">
<dt>
<label>Filtre sur le prix</label>
<dt>
<dd>
<label for="price_min">
Prix min :
<input type="text" id="price_min" name="price_min" value="<?php
echo $values["price_min"]; ?>" size="6" />
</label>
<label for="price_max">
Prix max :
<input type="text" id="price_max" name="price_max" value="<?php
echo $values["price_max"]; ?>" size="6" />
</label>
<?php if (isset($errors["price"])) : ?>
<p class="error"><?php echo $errors["price"]; ?></p>
<?php endif; ?>
</dd>
<dt style="margin-bottom: 10px;">
<input type="hidden" name="price_strict" value="0" />
<label for="price_strict">
<input type="checkbox" id="price_strict" name="price_strict" value="1"<?php
echo $values["price_strict"]?' checked="checked"':''
?> style="margin-left: 0;" />
cochez cette case pour exclure les annonces sans prix d'indiqué de votre recherche.
</label>
</dt>
<dt><label for="cities">Filtre sur les villes ou départements (un par ligne)</label></dt>
<dd>
<textarea id="cities" name="cities" cols="30" rows="10"><?php
echo htmlspecialchars($values["cities"]) ?></textarea>
</dd>
<dt><label>Filtre multi-catégorie</label></dt>
<dd class="categories">
<p class="warning"><span>Attention : </span>
ce filtre ne doit être utilisé que pour les recherches sur "toutes les catégories".</p>
<?php $i = 1; ?>
<?php foreach ($categoryCollection->fetchAll() AS $group => $categories) : ?>
<div class="categories-list categories-list-<?php echo $i++; ?>">
<h3><?php echo htmlspecialchars($group); ?></h3>
<?php foreach ($categories AS $id => $category) : ?>
<label for="category-<?php echo $id; ?>"><input id="category-<?php
echo $id; ?>" type="checkbox" name="categories[]" value="<?php
echo htmlspecialchars($category); ?>" /><?php
echo htmlspecialchars($category); ?></label>
<?php endforeach; ?>
</div>
<?php endforeach; ?>
</dd>
</dl>
<p><input type="submit" value="Générer le flux" /></p>
</form>

View File

@ -0,0 +1,45 @@
<?php
ob_start();
?>
<?php if ($ad->getDate()) : ?>
Publié le <strong><?php echo date("d/m/Y H:i", $ad->getDate()); ?></strong>
<br />
<br />
<?php endif; ?>
<strong>Nom</strong> : <?php echo $ad->getTitle(); ?>
<?php if ($ad->getPrice()) : ?>
&nbsp;&nbsp;&nbsp;&nbsp;<strong>Prix</strong> : <?php echo number_format($ad->getPrice(), 0, ',', ' '); ?> <?php echo $ad->getCurrency(); ?>
<?php endif; ?>
<?php if ($ad->getCategory()) : ?>
<br />
<strong>Catégorie</strong> : <?php echo $ad->getCategory(); ?>
<?php endif; ?>
<br />
<?php if ($ad->getCountry()) : ?>
<strong>Département</strong> : <?php echo $ad->getCountry(); ?>
&nbsp;&nbsp;&nbsp;&nbsp;
<?php endif; ?>
<?php if ($ad->getCity()) : ?><strong>Ville</strong> : <a href="https://maps.google.fr/?z=9&q=<?php
echo htmlspecialchars($ad->getCountry().' '.$ad->getCity());
?>" title="Localiser sur Google Map" target="_blank"><?php echo $ad->getCity(); ?></a>
<?php endif; ?>
<?php if ($siteConfig->getOption("pro_visible")) : ?>
<br />Annonce de <?php echo $ad->getProfessional()?'professionnel':'particulier.'; ?>
<?php endif; ?>
<br />
<?php if ($ad->getUrgent()) : ?>
<strong style="color: #FF8900;">urgent</strong>
<?php endif; ?>
<?php if ($ad->getThumbnailLink()) : ?>
<br /><img src="<?php echo str_replace('/thumbs/', '/images/', $ad->getThumbnailLink()); ?>"
alt="" style="max-width: 600px; float: left; display: block;" />
<?php else : ?>
<br />Pas de photo disponible.
<?php endif; ?>
<?php
return ob_get_clean();