0337d704 |
1 | <?php |
2 | /*************************************************************************** |
5ddeb07c |
3 | * Copyright (C) 2003-2007 Polytechnique.org * |
0337d704 |
4 | * http://opensource.polytechnique.org/ * |
5 | * * |
6 | * This program is free software; you can redistribute it and/or modify * |
7 | * it under the terms of the GNU General Public License as published by * |
8 | * the Free Software Foundation; either version 2 of the License, or * |
9 | * (at your option) any later version. * |
10 | * * |
11 | * This program is distributed in the hope that it will be useful, * |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
14 | * GNU General Public License for more details. * |
15 | * * |
16 | * You should have received a copy of the GNU General Public License * |
17 | * along with this program; if not, write to the Free Software * |
18 | * Foundation, Inc., * |
19 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * |
20 | ***************************************************************************/ |
21 | |
22 | require_once('geoloc.inc.php'); |
23 | require_once('secteur.emploi.inc.php'); |
24 | require_once('fonction.emploi.inc.php'); |
25 | |
08cce2ff |
26 | $res = XDB::iterRow("SELECT entrid, entreprise, secteur, ss_secteur, poste, fonction, |
0337d704 |
27 | adr1, adr2, adr3, postcode, city, country, region, tel, fax, mobile, |
28 | pub, adr_pub, tel_pub, email, email_pub, web |
29 | FROM entreprises |
cab08090 |
30 | WHERE uid = {?} ORDER BY entrid",S::v('uid', -1)); |
0337d704 |
31 | |
32 | $nb_res = $res->total(); |
33 | for($i = 0; $i < $nb_res ; $i++){ |
34 | list($endrid[$i], $entreprise[$i], $secteur[$i], $ss_secteur[$i], $poste[$i], $fonction[$i], |
35 | $adrpro1[$i], $adrpro2[$i], $adrpro3[$i], $postcodeppro[$i], $citypro[$i], $countrypro[$i], $regionpro[$i], |
36 | $telpro[$i], $faxpro[$i], $mobilepro[$i], $pubpro[$i], $adr_pubpro[$i], |
37 | $tel_pubpro[$i], $emailpro[$i], $email_pubpro[$i], $webpro[$i]) = $res->next(); |
38 | } |
39 | //limite dure a 2 |
40 | for($i = $nb_res; $i < 2 ; $i++){ |
41 | $endrid[$i] = $i; |
42 | $entreprise[$i] = ''; |
43 | $secteur[$i] = ''; |
44 | $ss_secteur[$i] = ''; |
45 | $poste[$i] = ''; |
46 | $fonction[$i] = '0'; |
47 | $adrpro1[$i] = ''; |
48 | $adrpro2[$i] = ''; |
49 | $adrpro3[$i] = ''; |
50 | $postcodepro[$i] = ''; |
51 | $citypro[$i] = ''; |
52 | $countrypro[$i] = '00'; |
53 | $regionpro[$i] = ''; |
54 | $telpro[$i] = ''; |
55 | $faxpro[$i] = ''; |
56 | $mobilepro[$i] = ''; |
57 | $pubpro[$i] = ''; |
58 | $adr_pubpro[$i] = ''; |
59 | $tel_pubpro[$i] = ''; |
60 | $emailpro[$i] = ''; |
61 | $email_pubpro[$i] = ''; |
62 | $webpro[$i] = ''; |
63 | } |
64 | |
65 | //recuperation des donnees sur les secteurs : |
66 | |
08cce2ff |
67 | $res = XDB::iterRow("SELECT id, label FROM emploi_secteur"); |
0337d704 |
68 | |
69 | while(list($tmp_secteur_id, $tmp_secteur_label) = $res->next()){ |
70 | $secteurs[$tmp_secteur_id] = $tmp_secteur_label; |
71 | } |
72 | |
73 | //recuperation des donnees sur les fonctions : |
08cce2ff |
74 | $res = XDB::iterRow("SELECT id, fonction_fr, FIND_IN_SET('titre', flags) FROM fonctions_def ORDER BY id"); |
0337d704 |
75 | |
76 | while(list($tmp_fonction_id, $tmp_fonction_label, $tmp_fonction_titre) = $res->next()){ |
77 | $fonctions[$tmp_fonction_id] = $tmp_fonction_label; |
78 | $fonctions_titre[$tmp_fonction_id] = $tmp_fonction_titre; |
79 | } |
80 | |
81 | //recuperation du CV |
cab08090 |
82 | $res = XDB::query("SELECT cv FROM auth_user_md5 WHERE user_id = {?}", S::v('uid', -1)); |
0337d704 |
83 | $cv = $res->fetchOneCell(); |
84 | |
a7de4ef7 |
85 | // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: |
0337d704 |
86 | ?> |