$GLOBALS['links']['annuaire-ajout']['linkvalue']); $content='
'.$GLOBALS['lang']['yp']['add_public'].'
'.END_LINE; echo $content; } /** * DisplayListYellowPages() * affichage de l'annuaire * @param $debut * @param unknown $limite * @param integer $filter * @param integer $search * @return **/ function DisplayListYellowPages($debut, $limite = SELECT_LIMIT, $filter= -1, $search= -1){ $result_yp = $GLOBALS['sql_object'] -> DBSelect(SQL_get_Display_ypList($debut, $limite, $filter, $search)); $result_nb_yp = $GLOBALS['sql_object'] -> DBSelect(SQL_get_Display_CountypList($filter, $search)); $bdd_nb_yp=$result_nb_yp[0]['num_rows']; //DisplayAlphaBeta($filter,$search); if ($filter==-1) $table_link=array('rub' => $GLOBALS['links']['annuaire']['linkvalue']); else $table_link=array('rub' => $GLOBALS['links']['annuaire']['linkvalue'],'id' => $search, 'filter' => $filter); $bdd_nb_yp_display = $bdd_nb_yp; echo DisplayUrlAddYellowpages(); //echo "

".$bdd_nb_yp_display." ".$GLOBALS['lang']['yp']['nb_total']."

\n"; echo '

'.$GLOBALS['lang']['yp']['list'].'

'.END_LINE; echo '
'.$GLOBALS['lang']['yp']['h1_public_comment'].'
'; DisplayAlphaBeta($filter,$search); echo Display_linkin_page($table_link, $bdd_nb_yp, $debut); $content='
'.END_LINE; if($result_yp!=0) { for($i=0; $i $GLOBALS['links']['annuaire-detail']['linkvalue'],'id'=>$result_yp[$i]['yellowp_id']); $link_table2= array('rub'=> $GLOBALS['links']['annuaire']['linkvalue'],'filter'=> $GLOBALS['filter']['theme']['linkvalue'],'id'=>$result_yp[$i]['sdtheme_id']); $yp_name=formatText($result_yp[$i]['yellowp_name'], '2HTML'); $yp_activity=formatText(cutText($result_yp[$i]['yellowp_activity'],150), '2HTML'); $yp_sdtheme=formatText($result_yp[$i]['sdtheme_name'], '2HTML'); $yp_theme=formatText($result_yp[$i]['theme_name'], '2HTML'); $content.='

'.$yp_name.''.END_LINE; $content.='

'.END_LINE; $content.='

'.$GLOBALS['lang']['yp']['activity'].' : '.$yp_activity.'

'.END_LINE; if ($yp_sdtheme<>""){ $content.='

'.$GLOBALS['lang']['divers']['themeref'].' : '.$yp_sdtheme.' '.$GLOBALS['lang']['divers']['sousthemeref'].': '.$yp_theme.'

'.END_LINE; } else { $content.='

'.$GLOBALS['lang']['divers']['themeref'].' : '.empty_nc($yp_sdtheme).' '.$GLOBALS['lang']['divers']['sousthemeref'].': '.empty_nc($yp_sdtheme).'

'.END_LINE; } /* $content.='

'.$GLOBALS['lang']['divers']['themeref'].': '.$yp_sdtheme.' '.$GLOBALS['lang']['divers']['sousthemeref'].' : '.$yp_theme.'

'.END_LINE; * */ $content.='
'.END_LINE; } } else { $content.='

'.$GLOBALS['lang']['yp']['noresult'].'

'; } echo $content; echo Display_linkin_page($table_link, $bdd_nb_yp, $debut)."
"; } /** * DisplayAlphaBeta() * affichage de la liste alphabétique * @param $filter * @param $filter_id * @return **/ function DisplayAlphaBeta($filter,$filter_id){ $result_alphabetical = $GLOBALS['sql_object'] -> DBSelect(SQL_get_req_alphabetical()); $content='
'.END_LINE; $content.=$GLOBALS['lang']['divers']['trialpha'].' :'; for($i=0; $i$GLOBALS['links']['annuaire']['linkvalue'], 'filter'=>"alpha", 'id'=>$result_alphabetical[$i]['first_letter'])); if ($i==0) $separator=""; else $separator="-"; if ($result_alphabetical[$i]['first_letter']==strtoupper($filter_id)) $content.=$separator.' '.$result_alphabetical[$i]['first_letter'].' '.END_LINE; else $content.=$separator.' '.$result_alphabetical[$i]['first_letter'].' '.END_LINE; } $content.='
'.END_LINE; echo $content; } /** * DisplayOneYellowPages() * affichage d'une organisation * @param $yp_id * @return **/ function DisplayOneYellowPages($yp_id){ $data= $GLOBALS['sql_object'] -> DBSelect(SQL_getdetyp($yp_id)); if($data!=0) { $content= ''; for($i=0; $i $GLOBALS['links']['annuaire']['linkvalue'],'filter'=> $GLOBALS['filter']['theme']['linkvalue'],'id'=>$data[0]['sdtheme_id']); $yp_name=formatText($data[$i]['yellowp_name'], '2HTML'); $yp_activity=formatText(cutText($data[0]['yellowp_activity'],150), '2HTML'); $yp_sdtheme=formatText($data[0]['sdtheme_name'], '2HTML'); $yp_theme=formatText($data[0]['theme_name'], '2HTML'); $yp_street=formatText($data[0]['yellowp_street'], '2HTML'); $yp_postal_code=formatText($data[0]['yellowp_postal_code'], '2HTML'); $yp_city=formatText($data[0]['yellowp_city'], '2HTML'); $yp_country=formatText($data[0]['yellowp_country'], '2HTML'); $yp_phone=formatText($data[0]['yellowp_phone'], '2HTML'); $yp_fax=formatText($data[0]['yellowp_fax'], '2HTML'); $yp_email=formatText($data[0]['yellowp_email'], '2HTML'); $yp_website=formatText($data[0]['yellowp_website'], '2HTML'); $content.='

'.$yp_name.'

'.END_LINE; $content.='
'.$GLOBALS['lang']['yp']['adresse'].' :
'.$yp_street.' '.$yp_postal_code.' '.$yp_city.' '.$yp_country.'
'.END_LINE; $content.='
'.$GLOBALS['lang']['yp']['phone'].' :
'.empty_nc($yp_phone).'
'.END_LINE; $content.='
'.$GLOBALS['lang']['yp']['fax'].':
'.empty_nc($yp_fax).'
'.END_LINE; $content.='
'.$GLOBALS['lang']['yp']['email'].' :
'.$yp_email.'
'.END_LINE; if ($data[0]['yellowp_website']<>"") $content.='
'.$GLOBALS['lang']['yp']['website'].' :
'.$yp_website.'
'.END_LINE; else $content.='
'.$GLOBALS['lang']['yp']['website'].' :
'.empty_nc($yp_website).'
'.END_LINE; $content.='
'.$GLOBALS['lang']['yp']['activity'].' :
'.$yp_activity.'
'.END_LINE; if ($yp_sdtheme<>""){ $content.='
'.$GLOBALS['lang']['divers']['themeref'].' :
'.$yp_sdtheme.'
'.$GLOBALS['lang']['divers']['sousthemeref'].':
'.$yp_theme.'
'.END_LINE; } else { $content.='
'.$GLOBALS['lang']['divers']['themeref'].' :
'.empty_nc($yp_sdtheme).'
'.$GLOBALS['lang']['divers']['sousthemeref'].':
'.empty_nc($yp_sdtheme).'
'.END_LINE; } $content.='
'.END_LINE; } } else { $content.='

'.$GLOBALS['lang']['yp']['noresult'].'

'; } echo $content; } /** * DisplayConfirmAdd() * affichage confirmation de l'ajout * @return **/ function DisplayConfirmAdd() { $link_table= array('rub'=> $GLOBALS['links']['annuaire']['linkvalue']); $content='

'.$GLOBALS['lang']['yp']['confirm_pub'].' '.$GLOBALS['lang']['yp']['confirm_pub2'].''.END_LINE; $content.='

'.END_LINE; echo $content; } /** * DisplayAddYellowPages() * affichage formulaire d'ajout * @param integer $btn * @param $table * @return **/ function DisplayAddYellowPages($btn=-1, $table){ include_once('../lib/select_box.php'); include_once('../class/class.yellowpages.php'); $form_name=''; $form_activity=''; $form_theme=''; $form_street=''; $form_postal_code=''; $form_city=''; $form_country=''; $form_phone=''; $form_fax=''; $form_email=''; $form_website='http://'; $data= $GLOBALS['sql_object'] -> DBSelect(SQL_get_req_list_theme()); $select_theme=ThemeSelectBox($data, "yp_theme", $form_theme); if($btn<>-1) { $table[0]=$table['yp_name']; $table[1]=$table['yp_activity']; $table[2]=$table['yp_theme']; $table[3]=$table['yp_street']; $table[4]=$table['yp_postal_code']; $table[5]=$table['yp_city']; $table[6]=$table['yp_country']; $table[7]=$table['yp_phone']; $table[8]=$table['yp_fax']; $table[9]=$table['yp_email']; $table[10]=$table['yp_website']; $table[11]="D"; $yp_object= new yellowpages; $integrity=$yp_object->CheckDataIntegrity($table); if (is_string($integrity)) { echo "

".$integrity."

"; $form_name=formatText($table['yp_name'], '2FIELD'); $form_activity=formatText($table['yp_activity'], '2FIELD'); $form_theme=$table['yp_theme']; $form_street=formatText($table['yp_street'], '2FIELD'); $form_postal_code=$table['yp_postal_code']; $form_city=formatText($table['yp_city'], '2FIELD'); $form_country=formatText($table['yp_country'], '2FIELD'); $form_phone=$table['yp_phone']; $form_fax=$table['yp_fax']; $form_email=formatText($table['yp_email'], '2FIELD'); $form_website=formatText($table['yp_website'], '2FIELD'); } else{ $yp_object= new yellowpages; $result=$yp_object->AddYellowPages($table, $GLOBALS['sql_object']); $link_confirm=HrefMaker(array('rub'=> $GLOBALS['links']['annuaire']['linkvalue'])); if(is_numeric($result)) DisplayConfirmAdd(); else echo "

".system_error()."

"; } } if (!isset($integrity) || is_string($integrity)){ $action=HrefMaker(array('rub'=> $GLOBALS['links']['annuaire-ajout']['linkvalue'])); $form='

'.$GLOBALS['lang']['yp']['add_public'].'

'.END_LINE; $form.='
'.$GLOBALS['lang']['yp']['h1_public_add'].'
'; $form.='
'.END_LINE; $form.='
'.END_LINE; $form.='

'.END_LINE; $form.='

'.END_LINE; $form.='

'.END_LINE; $form.='

'.END_LINE; $form.='

'.END_LINE; $form.=$select_theme.'

'.END_LINE; $form.='

'.END_LINE; $form.='

'.END_LINE; $form.='

'.END_LINE; $form.='

'.END_LINE; $form.='

'.END_LINE; $form.='

'.END_LINE; $form.='

'.END_LINE; $form.='

'.END_LINE; $form.='

'.END_LINE; $form.='

'.END_LINE; $form.='

'.END_LINE; $form.='

'.END_LINE; $form.='

'.END_LINE; $form.='

'.END_LINE; $form.='

'.END_LINE; $form.='

'.END_LINE; $form.=''.END_LINE; //$form.=''.END_LINE; $form.='
'.END_LINE; $form.='
'.END_LINE; echo $form; } } ?>