* @version $Id$ * @access public * @license http://opensource.org/licenses/gpl-3.0.html */ //////////// Check Inclusion de pages //////////// if (!class_exists('auth')){ include_once("../lib/lib_common.php"); ReloadIndex('admin'); } //////////// //////////// Check Droits utilisateur //////////// if (!$l21auth->isSuperAdmin()) ReloadIndex('admin'); //////////// if(!isset($_GET['statut']) || $_GET['statut']==-1) $statut=-1; elseif($_GET['statut']!=-1) { $statut=$_GET['statut']; $alphabeta=-1; } if(!isset($_GET['alphabeta']) || $_GET['alphabeta']==-1) $alphabeta=-1; elseif($_GET['alphabeta']!=-1) { $alphabeta=$_GET['alphabeta']; $statut=-1; } if(!isset($_GET['debut'])) $debut=0; else $debut=$_GET['debut']; $mask_statut_1=''; $mask_statut_2=''; $mask_statut_3=''; 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." "._t('yp','nb_total')."
\n"; if($statut!=-1 || $alphabeta!=-1) { $link_back="
"._t('yp','all')."
"; if($statut!=-1) { $req_count_yp=SQL_getCountypList($statut); $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, $statut); $result_yp_list=$sql_object->DBSelect($req_list_yp); } if($alphabeta!=-1) { $req_count_yp=SQL_getCountypList('ALPHA', $alphabeta); $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); } } else { $link_back=''; $count_request=$bdd_nb_yp; $req_list_yp=SQL_getypList($debut, SELECT_LIMIT, $statut); $result_yp_list=$sql_object->DBSelect($req_list_yp); } if($count_request<=1) $count_request_display = _t('divers','query_result')." : ".$count_request." "._t('divers','record')."
\n"; else $count_request_display = _t('divers','query_result')." : ".$count_request." "._t('divers','records')."
\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="\n"; $js = " $('#statut_filter').change(function() { if($(this).val() != -1) window.location = $(this).val(); });"; footerAddInlineJS($js); // Liste alphabetique $result_alphabetical=$sql_object->DBSelect($req_alphabetical); $select_alphabetical="\n"; $js = " $('#alhpabetical_filter').change(function() { if($(this).val() != -1) window.location = $(this).val(); });"; footerAddInlineJS($js); // handle directory exports $data = $sql_object->DBSelect(SQL_get_Display_ypList($debut, 999, -1)); if(is_array($data)) { $content = ''; foreach ($data as $d) { $content .=''; // $content .= '' . $d['yellowp_id']. ''; $content .= '' . formatText($d['yellowp_name']). ''; $content .= '' . formatText($d['yellowp_activity']). ''; $content .= '' . formatText($d['level_name']). ''; $content .= '' . formatText($d['yellowp_street']). ''; $content .= '' . formatText($d['yellowp_postal_code']). ''; $content .= '' . formatText($d['yellowp_city']). ''; $content .= '' . formatText($d['yellowp_phone']). ''; $content .= '' . formatText($d['yellowp_fax']). ''; $content .= '' . formatText($d['yellowp_email']). ''; $content .= '' . formatText($d['yellowp_website']). ''; $content .= '' . formatText($d['yellowp_date_crea_display']). ''; $content .= '' . display_statut($d['yellowp_statut']). ''; $content .=''; } $table_export = ''; $table_export .= ''; $table_export .= ''; $table_export .= ''; $table_export .= ''; $table_export .= ''; $table_export .= ''; $table_export .= ''; $table_export .= ''; $table_export .= ''; $table_export .= ''; $table_export .= ''; $table_export .= ''; $table_export .= ''; $table_export .= ''; $table_export .= ''; $table_export .= ''; $table_export .= ''; $table_export .= $content; $table_export .= ''; $table_export .= '
'. mb_ucfirst(_t('yp', 'name2')) . ''. mb_ucfirst(_t('yp', 'activity')) . ''. mb_ucfirst(_t('yp', 'level')) . '' . mb_ucfirst(_t('yp', 'street')) .'' . mb_ucfirst(_t('yp', 'postal_code')) .'' . mb_ucfirst(_t('yp', 'city')) .' ' . mb_ucfirst(_t('yp', 'phone')) .'' . mb_ucfirst(_t('yp', 'fax')) .''. mb_ucfirst(_t('yp', 'email')) . ''. mb_ucfirst(_t('yp', 'website')) . ''. mb_ucfirst(_t('divers', 'date_crea')) . ''. mb_ucfirst(_t('divers', 'statut')) . '
'; // Insert Javascript instructions to allow client Excel export footerAddJS('../lib/js/tableExport.jquery.plugin/tableExport.min.js'); footerAddJS('../lib/js/tableExport.jquery.plugin/libs/html2canvas/html2canvas.min.js'); $str = '$("#export-values li a").click(function() { var format = $(this).attr("data-format"); var ignoreCol = []; // set columns to ignore $el = $("#export-directory"); $el.tableExport( {tableName:"'.mb_ucfirst(_t('yp', 'section') . ' : '. count($data) . ' ' . _t('divers','records')). '",type:format,escape:\'false\',ignoreColumn: ignoreCol,displayTableName:\'true\',htmlContent:\'false\',fileName:\'' . _t('yp', 'section') . '\'}); return false; });'; footerAddInlineJS($str); } ?>

'; echo linkin_page($link_self, $count_request, $debut); if($result_yp_list!=0) { echo "\n"; echo "\n"; echo "\n"; echo "\n";; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; for($i=0; $i' : $suffix = ''; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } echo ""; echo "
".mb_ucfirst(_t('yp','name2'))."".mb_ucfirst(_t('divers','date_crea'))." ".mb_ucfirst(_t('divers','actions'))."
".$yp_title." ".$suffix."".$result_yp_list[$i]['yellowp_date_crea_display']."
"; } else { echo "
"._t('yp','noresult')."
"; } echo linkin_page($link_self, $count_request, $debut); // Ability to sort table addDynamicCSS('../lib/js/jquery.tablesorter/theme.default.css'); footerAddJS('../lib/js/jquery.tablesorter/jquery.tablesorter.min.js'); $str = '$("table.multisort").tablesorter({ });'; footerAddInlineJS($str); ?>