Source for file list.php
Documentation is available at list.php
* @package linea21.modules
* @subpackage yellowpages
* @author linea21 <info@linea21.com>
* @license http://opensource.org/licenses/gpl-3.0.html
//////////// Check Inclusion de pages ////////////
include_once("../lib/lib_common.php");
if(!isset ($_GET['statut']) || $_GET['statut']==- 1) $statut=- 1;
elseif($_GET['statut']!=- 1) {
if(!isset ($_GET['alphabeta']) || $_GET['alphabeta']==- 1) $alphabeta=- 1;
elseif($_GET['alphabeta']!=- 1) {
$alphabeta= $_GET['alphabeta'];
if(!isset ($_GET['debut'])) $debut= 0;
else $debut= $_GET['debut'];
if($statut== 'P') $mask_statut_1= 'selected="selected"';
if($statut== 'AA') $mask_statut_2= 'selected="selected"';
if($statut== 'D') $mask_statut_3= 'selected="selected"';
// Nombre d'enregistrement total dans la bdd
$result_nb_req= $sql_object->DBSelect($req_count_yp);
$bdd_nb_yp= $result_nb_req[0]['num_rows'];
$bdd_nb_yp_display = $bdd_nb_yp. " ". $GLOBALS['lang']['yp']['nb_total']. "<br />\n";
if($statut!=- 1 || $alphabeta!=- 1) {
$link_back= "<div class=\"filter\"><a href=\"". $rub_link. "&todo=list\">". $GLOBALS['lang']['yp']['all']. "</a></div>";
$result_nb_req= $sql_object->DBSelect($req_count_yp);
$count_request= $result_nb_req[0]['num_rows'];
$result_yp_list= $sql_object->DBSelect($req_list_yp);
$result_nb_req= $sql_object->DBSelect($req_count_yp);
$count_request= $result_nb_req[0]['num_rows'];
$req_list_yp= SQL_getypList($debut, SELECT_LIMIT, 'ALPHA', $alphabeta);
$result_yp_list= $sql_object->DBSelect($req_list_yp);
$count_request= $bdd_nb_yp;
$result_yp_list= $sql_object->DBSelect($req_list_yp);
if($count_request<= 1) $count_request_display = $GLOBALS['lang']['divers']['query_result']. " : ". $count_request. " ". $GLOBALS['lang']['divers']['record']. "<br />\n";
else $count_request_display = $GLOBALS['lang']['divers']['query_result']. " : ". $count_request. " ". $GLOBALS['lang']['divers']['records']. "<br />\n";
$link_sup= $rub_link. "&todo=sup&id=";
$link_mod= $rub_link. "&todo=mod&id=";
$link_det= $rub_link. "&todo=det&id=";
$link_statut= $rub_link. "&todo=list&statut=";
$link_list_alphabetical= $rub_link. "&todo=list&alphabeta=";
//&groupe=".$groupe."&alphabeta=".$alphabeta;"
$link_self= $link_statut. $statut. "&alphabeta=". $alphabeta;
// Liste des statuts disponible
$select_statut= "<select name=\"statut_filter\" id=\"statut_filter\" onchange=\"ChangeLocation(this)\">\n";
$select_statut.= "<option value=\"-1\">". $GLOBALS['lang']['divers']['select_choice2']. "</option>\n";
$select_statut.= "<option value=\"". $link_statut. "D\"". $mask_statut_3. ">". $GLOBALS['lang']['yp']['preinscription']. "</option>\n";
$select_statut.= "<option value=\"". $link_statut. "P\"". $mask_statut_1. ">". display_statut('P'). "</option>\n";
$select_statut.= "<option value=\"". $link_statut. "AA\"". $mask_statut_2. ">". display_statut('AA'). "</option>\n";
$select_statut.= "</select>\n";
$result_alphabetical= $sql_object->DBSelect($req_alphabetical);
$select_alphabetical= "<select name=\"alhpabetical_filter\" id=\"alhpabetical_filter\" onchange=\"ChangeLocation(this)\">\n";
$select_alphabetical.= "<option value=\"-1\">". $GLOBALS['lang']['yp']['alphabetical']. "</option>\n";
for($i= 0; $i< count($result_alphabetical); $i++ ) {
if($alphabeta== $result_alphabetical[$i]['first_letter']) $mask= " selected=\"selected\""; else $mask= '';
$select_alphabetical.= "\t<option value=\"". $link_list_alphabetical. $result_alphabetical[$i]['first_letter']. "\"". $mask. ">". $result_alphabetical[$i]['first_letter']. "</option>\n";
$select_alphabetical.= "</select>\n";
<a href="index.php"> <? echo $GLOBALS['lang']['way']['home'] ?></a>
<a href=" <?php echo $rub_link; ?>"> <? echo $GLOBALS['lang']['menu']['yellowpages']?></a>
<span> <? echo $GLOBALS['lang']['yp']['list'] ?></span>
include_once("quickicons.php");
<div class="contentcontainer">
<?php include_once($dir. "/menurub.php"); ?>
<div class="filterselect">
echo $select_alphabetical;
echo $count_request_display;
echo "<table cellspacing=\"0\" cellpadding=\"3\">\n";
echo "<td style=\"width:40%\">". $GLOBALS['lang']['yp']['name2']. "</td>\n";;
echo "<td>". $GLOBALS['lang']['divers']['date_crea']. "</td>\n";
echo "<td> <span class=\"semnone\">". $GLOBALS['lang']['divers']['actions']. "</span></td>\n";
for($i= 0; $i< count($result_yp_list); $i++ ) {
$yp_title= formatText($result_yp_list[$i]['yellowp_name'], '2HTML');
$yp_title= cutText($yp_title, 35, 1);
echo "<td><a href=\"". $link_det. $result_yp_list[$i]['yellowp_id']. "\" title=\"". $GLOBALS['lang']['yp']['det']. "\">". $yp_title. "</a></td>\n";
echo "<td>". $result_yp_list[$i]['yellowp_date_crea_display']. "</td>\n";
echo "<td><div class=\"iconetab\"><a href=\"". $link_sup. $result_yp_list[$i]['yellowp_id']. "\" title=\"". $GLOBALS['lang']['yp']['sup']. "\" class=\"ico_sup\"></a>";
echo "<a href=\"". $link_mod. $result_yp_list[$i]['yellowp_id']. "\" title=\"". $GLOBALS['lang']['yp']['mod']. "\" class=\"ico_mod\"></a></div></td>\n";
echo "<div class=\"info\">". $GLOBALS['lang']['yp']['noresult']. "</div>";
<?php include_once($dir. "/help.php"); ?>
|