#!/usr/bin/perl

#############################################################################
# PROGRAMME : 
#             -> 
#             -> 
# PARAMETRES :  * login
#               * mot de passe
#               * type en francais
#               * reference du type               
# AUTEUR : Franck Charbonneau  
# DATE :15 decembre 1999
#############################################################################

#programme basé sur le module DBD::Mysql du DBI
use DBI;
use DBD::mysql;
#fonction de decodage CGI
#require ("../decode_cgi.pl");
# module CGI qw/:standard/ utilise pour la recuperation des donnees
# du formulaire envoye
use CGI qw/:standard/;  

require "../caddie_config.pl";
require "../executionRequete.pl";     
require "../tailleTableau.pl";

##########################################
#
#       RECEPTION DES DONNEES CGI
#
#$cgi = new CGI qw/:standard/;           # nouveau CGI_Lite utilise pour decoder les donnees du formulaire
@parametre = param();
foreach $p (@parametre) {$in{$p} = param($p);};
                            
#############################################
#
#	CONNEXION A LA BASE DE DONNEES
#
& connexionBD($user, $pass,$nom_base, $host); 

#    # cette requete permet de recuperer l'ensemble des postes
#$ma_requete = "SELECT * FROM postes ORDER BY ref_rubrique,libelle";

#############################################
#
#	EXECUTION DE LA REQUETE
#
#$sth = & executionRequete($ma_requete); 

& affichPostes();

# en-tete commun pour que ce qui suit soit interprete comme du HTML
printf("Content-type: text/html\n\n");

print << "CODE_HTML";     
<html>
<head>
<title>DELSYS</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="/sitefr/sty.css" type="text/css">
</head>

<body bgcolor="#003DA3" text="#000000" background="/sitefr/img/fond.gif" topmargin=0 leftmargin=0 marginheight=0 marginwidth=0>
<A name="top"></A>
<table width="764" border="0" cellspacing="0" cellpadding="0" align=center>
  <tr>
    <td>
      <table width="764" border="0" cellspacing="0" cellpadding="0">
        <tr valign=top> 
          <td width="97" height="76"><a href="../../index.htm"><img src="/sitefr/img/logo.gif" width="97" height="76" border="0"></a></td>
          <td width="111"> 
            <table width="111" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="111" height="26"><img src="/sitefr/img/societe.gif" width="111" height="26"></td>
              </tr>
              <tr> 
                <td width="111" height="12"><A HREF="/sitefr/societe.htm" onMouseOver="img1.src='/sitefr/img/societe_on.gif' "onMouseOut="img1.src='/sitefr/img/societe_off.gif' "TARGET="_top"><IMG NAME="img1" BORDER=0 width="111" height="12" SRC="/sitefr/img/societe_off.gif" onLoad="tempImg=new Image(0,0); tempImg.src='/sitefr/img/societe_on.gif'"></A></td>
              </tr>
              <tr> 
                <td width="111" height="12"><A HREF="/sitefr/origines.htm" onMouseOver="img2.src='/sitefr/img/origines_on.gif' "onMouseOut="img2.src='/sitefr/img/origines_off.gif' "TARGET="_top"><IMG NAME="img2" BORDER=0 width="111" height="12" SRC="/sitefr/img/origines_off.gif" onLoad="tempImg=new Image(0,0); tempImg.src='/sitefr/img/origines_on.gif'"></A></td>
              </tr>
              <tr> 
                <td width="111" height="12"><A HREF="/sitefr/philo.htm" onMouseOver="img3.src='/sitefr/img/philo_on.gif' "onMouseOut="img3.src='/sitefr/img/philo_off.gif' "TARGET="_top"><IMG NAME="img3" BORDER=0 width="111" height="12" SRC="/sitefr/img/philo_off.gif" onLoad="tempImg=new Image(0,0); tempImg.src='/sitefr/img/philo_on.gif'"></A></td>
              </tr>
              <tr> 
                <td width="111" height="12"><img src="/sitefr/img/vierge.gif" width="111" height="12"></td>
              </tr>
              <tr> 
                <td width="111" height="2"><img src="/sitefr/img/vierge2.gif" width="111" height="2"></td>
              </tr>
            </table>
          </td>
          <td width="111"> 
            <table width="111" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="111" height="26"><img src="/sitefr/img/emploi1.gif" width="111" height="26"></td>
              </tr>
              <tr> 
                <td width="111" height="12"><A HREF="/sitefr/emploi.htm" onMouseOver="img4.src='/sitefr/img/emploi_on.gif' "onMouseOut="img4.src='/sitefr/img/emploi_off.gif' "TARGET="_top"><IMG NAME="img4" BORDER=0 width="111" height="12" SRC="/sitefr/img/emploi_off.gif" onLoad="tempImg=new Image(0,0); tempImg.src='/sitefr/img/emploi_on.gif'"></A></td>
              </tr>
              <tr> 
                <td width="111" height="12"><IMG BORDER=0 width="111" height="12" SRC="/sitefr/img/annonces_on.gif"></td>
              </tr>
              <tr> 
                <td width="111" height="12"><A HREF="/sitefr/cv.htm" onMouseOver="img6.src='/sitefr/img/cv_on.gif' "onMouseOut="img6.src='/sitefr/img/cv_off.gif' "TARGET="_top"><IMG NAME="img6" BORDER=0 width="111" height="12" SRC="/sitefr/img/cv_off.gif" onLoad="tempImg=new Image(0,0); tempImg.src='/sitefr/img/cv_on.gif'"></A></td>
              </tr>
              <tr> 
                <td width="111" height="12"><img src="/sitefr/img/vierge.gif" width="111" height="12"></td>
              </tr>
              <tr> 
                <td width="111" height="2"><img src="/sitefr/img/vierge2.gif" width="111" height="2"></td>
              </tr>
            </table>
          </td>
          <td width="111"> 
            <table width="111" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="111" height="26"><img src="/sitefr/img/services.gif" width="111" height="26"></td>
              </tr>
              <tr> 
                <td width="111" height="12"><A HREF="/sitefr/services.htm" onMouseOver="img7.src='/sitefr/img/services_on.gif' "onMouseOut="img7.src='/sitefr/img/services_off.gif' "TARGET="_top"><IMG NAME="img7" BORDER=0 width="111" height="12" SRC="/sitefr/img/services_off.gif" onLoad="tempImg=new Image(0,0); tempImg.src='/sitefr/img/services_on.gif'"></A></td>
              </tr>
              <tr> 
                <td width="111" height="12"><A HREF="/sitefr/assistance.htm" onMouseOver="img8.src='/sitefr/img/assistance_on.gif' "onMouseOut="img8.src='/sitefr/img/assistance_off.gif' "TARGET="_top"><IMG NAME="img8" BORDER=0 width="111" height="12" SRC="/sitefr/img/assistance_off.gif" onLoad="tempImg=new Image(0,0); tempImg.src='/sitefr/img/assistance_on.gif'"></A></td>
              </tr>
              <tr> 
                <td width="111" height="12"><A HREF="/sitefr/reseaux.htm" onMouseOver="img9.src='/sitefr/img/reseaux_on.gif' "onMouseOut="img9.src='/sitefr/img/reseaux_off.gif' "TARGET="_top"><IMG NAME="img9" BORDER=0 width="111" height="12" SRC="/sitefr/img/reseaux_off.gif" onLoad="tempImg=new Image(0,0); tempImg.src='/sitefr/img/reseaux_on.gif'"></A></td>
              </tr>
              <tr> 
                <td width="111" height="12"><img src="/sitefr/img/vierge.gif" width="111" height="12"></td>
              </tr>
              <tr> 
                <td width="111" height="2"><img src="/sitefr/img/vierge2.gif" width="111" height="2"></td>
              </tr>
            </table>
          </td>
          <td width="111"> 
            <table width="111" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="111" height="26"><img src="/sitefr/img/internet.gif" width="111" height="26"></td>
              </tr>
              <tr> 
                <td width="111" height="12"><A HREF="/sitefr/internet.htm" onMouseOver="img10.src='/sitefr/img/internet_on.gif' "onMouseOut="img10.src='/sitefr/img/internet_off.gif' "TARGET="_top"><IMG NAME="img10" BORDER=0 width="111" height="12" SRC="/sitefr/img/internet_off.gif" onLoad="tempImg=new Image(0,0); tempImg.src='/sitefr/img/internet_on.gif'"></A></td>
              </tr>
              <tr> 
                <td width="111" height="12"><A HREF="/sitefr/flying.htm" onMouseOver="img11.src='/sitefr/img/flying_on.gif' "onMouseOut="img11.src='/sitefr/img/flying_off.gif' "TARGET="_top"><IMG NAME="img11" BORDER=0 width="111" height="12" SRC="/sitefr/img/flying_off.gif" onLoad="tempImg=new Image(0,0); tempImg.src='/sitefr/img/flying_on.gif'"></A></td>
              </tr>
              <tr> 
                <td width="111" height="12"><img src="/sitefr/img/vierge.gif" width="111" height="12"></td>
              </tr>
              <tr> 
                <td width="111" height="12"><img src="/sitefr/img/vierge.gif" width="111" height="12"></td>
              </tr>
              <tr> 
                <td width="111" height="2"><img src="/sitefr/img/vierge2.gif" width="111" height="2"></td>
              </tr>
            </table>
          </td>
          <td width="111"> 
            <table width="111" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="111" height="26"><img src="/sitefr/img/refs.gif" width="111" height="26"></td>
              </tr>
              <tr> 
                <td width="111" height="12"><A HREF="/sitefr/refs.htm" onMouseOver="img13.src='/sitefr/img/refs_on.gif' "onMouseOut="img13.src='/sitefr/img/refs_off.gif' "TARGET="_top"><IMG NAME="img13" BORDER=0 width="111" height="12" SRC="/sitefr/img/refs_off.gif" onLoad="tempImg=new Image(0,0); tempImg.src='/sitefr/img/refs_on.gif'"></A></td>
              </tr>
              <tr> 
                <td width="111" height="12"><A HREF="/sitefr/realisations.htm" onMouseOver="img14.src='/sitefr/img/realisations_on.gif' "onMouseOut="img14.src='/sitefr/img/realisations_off.gif' "TARGET="_top"><IMG NAME="img14" BORDER=0 width="111" height="12" SRC="/sitefr/img/realisations_off.gif" onLoad="tempImg=new Image(0,0); tempImg.src='/sitefr/img/realisations_on.gif'"></A></td>
              </tr>
              <tr> 
                <td width="111" height="12"><img src="/sitefr/img/vierge.gif" width="111" height="12"></td>
              </tr>
              <tr> 
                <td width="111" height="12"><img src="/sitefr/img/vierge.gif" width="111" height="12"></td>
              </tr>
              <tr> 
                <td width="111" height="2"><img src="/sitefr/img/vierge2.gif" width="111" height="2"></td>
              </tr>
            </table>
          </td>
          <td width="112"> 
            <table width="112" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="112" height="26"><img src="/sitefr/img/contacts.gif" width="112" height="26"></td>
              </tr>
              <tr> 
                <td width="112" height="12"><A HREF="/sitefr/direction.htm" onMouseOver="img15.src='/sitefr/img/direction_on.gif' "onMouseOut="img15.src='/sitefr/img/direction_off.gif' "TARGET="_top"><IMG NAME="img15" BORDER=0 width="112" height="12" SRC="/sitefr/img/direction_off.gif" onLoad="tempImg=new Image(0,0); tempImg.src='/sitefr/img/direction_on.gif'"></A></td>
              </tr>
              <tr> 
                <td width="112" height="12"><A HREF="/sitefr/administration.htm" onMouseOver="img16.src='/sitefr/img/admin_on.gif' "onMouseOut="img16.src='/sitefr/img/admin_off.gif' "TARGET="_top"><IMG NAME="img16" BORDER=0 width="112" height="12" SRC="/sitefr/img/admin_off.gif" onLoad="tempImg=new Image(0,0); tempImg.src='/sitefr/img/admin_on.gif'"></A></td>
              </tr>
              <tr> 
                <td width="112" height="12"><A HREF="/sitefr/commercial.htm" onMouseOver="img17.src='/sitefr/img/commercial_on.gif' "onMouseOut="img17.src='/sitefr/img/commercial_off.gif' "TARGET="_top"><IMG NAME="img17" BORDER=0 width="112" height="12" SRC="/sitefr/img/commercial_off.gif" onLoad="tempImg=new Image(0,0); tempImg.src='/sitefr/img/commercial_on.gif'"></A></td>
              </tr>
              <tr> 
                <td width="112" height="12"><A HREF="/sitefr/recrute.htm" onMouseOver="img18.src='/sitefr/img/recrute_on.gif' "onMouseOut="img18.src='/sitefr/img/recrute_off.gif' "TARGET="_top"><IMG NAME="img18" BORDER=0 width="112" height="12" SRC="/sitefr/img/recrute_off.gif" onLoad="tempImg=new Image(0,0); tempImg.src='/sitefr/img/recrute_on.gif'"></A></td>
              </tr>
              <tr> 
                <td width="112" height="2"><img src="/sitefr/img/vierge3.gif" width="112" height="2"></td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>


<tr valign=top>
    <td>
      <table width="764" border="0" cellspacing="0" cellpadding="0">
        <tr valign=top>
          <td bgcolor="#CCE4F9" width="20" background="/sitefr/img/b1.gif"><img src="/sitefr/img/b1.gif" width="20" height="30"></td>
          <td>
            <table width="724" border="0" cellspacing="0" cellpadding="0"><!-- BEFORE <FORM NAME="annonces" ACTION="../anncv.cgi" METHOD="get"> --> <FORM NAME="annonces" ACTION="../saisir_cv.cgi" METHOD="get"><tr valign=top>
                <td colspan="3" bgcolor="#CCE4F9"><img src="/sitefr/img/pix.gif" width="1" height="1"></td>
              </tr>
              <tr valign=top>
                <td width="735" bgcolor="#CCE4F9">
				
				 <!-- ANNONCES COURTES -->
					<table width="718" border="0" cellspacing="12" cellpadding="0">
						<tr valign=top>
						<td>
							<table width="692" border="0" cellspacing="0" cellpadding="0" bgcolor="#7B94FF">
							<tr>
								<td width="692" height="16" colspan="3"><img src="/sitefr/img/c10.gif" width="692" height="16"></td>
							</tr>
							<tr valign=top>
								<td background="/sitefr/img/c2.gif" width="20" height="30"><img src="/sitefr/img/c2.gif" width="11" height="30"></td>
								<td width="670"> 
								<table width="670" border="0" cellspacing="3" cellpadding="0">
                              $prechaine
                            </table>
                          </td>
                          <td background="/sitefr/img/c3.gif" width="11" height="30" align=right><img src="/sitefr/img/c3.gif" width="11" height="30"></td>
                        </tr>
                        <tr>
                            <td width="692" height="10" colspan="3"><img src="/sitefr/img/c40.gif" width="692" height="10"></td>
                        </tr>
                      </table>
                    </td>
                  </tr>
                </table>
				<!-- FIN ANNONCES COURTES -->

				<!-- ANNONCES DETAILLEES -->
				<table width="720" border="0" cellspacing="12" cellpadding="0">
                    <tr valign=top>
                    <td class="textenoir">
						
						$chaine
                                
                          <table width="267" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="36"><img src="/sitefr/img/fleche3.gif" width="30" height="7"></td>
                              <td width="99"> 
                                <input type="SUBMIT" value="Saisir le cv" name="SUBMIT">
                              </td>
                              <td width="132"> 
                                <input type="RESET" value="refaites votre choix" name="RESET">
                              </td>
                            </tr>
                          </table>
                          <p>Si aucune annonce ne vous concerne, n'hesitez pas 
                            a nous <A HREF="/sitefr/cv.htm">envoyer votre cv </A>de fa&ccedil;on 
                            spontan&eacute;e</p>
                    </td>
                  </tr></table>


				<!-- FIN ANNONCES DETAILLEES -->
				
				</td>
              </tr></FORM>
            </table>
			</td>
          <td bgcolor="#CCE4F9" width="20" background="/sitefr/img/b2.gif"><img src="/sitefr/img/b2.gif" width="20" height="30"></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td bgcolor="#CCE4F9" width="764" height="25"><a href="infos@delsys.fr"><img src="/sitefr/img/adresse.gif" width="764" height="25" border="0"></a></td>
  </tr>
</table>
</body>
</html>
CODE_HTML

sub affichPostes
  {
    # cette requete permet de recuperer l'ensemble des postes
    $ma_requete = "SELECT  * FROM postes ORDER BY libelle";
    $sth = & executionRequete($ma_requete); 
      
    while(@ligne=$sth->fetchrow)
      {

		 
                                 
		$prechaine .="<tr valign=\"top\">\n"
		."<td class=\"textenoir\" width=\"190\"><a href=\"#$ligne[$eq_postes{'ref_poste'}]\"><img src=\"/sitefr/img/fleches.gif\" width=\"34\" height=\"10\" align=\"right\" border=\"0\"></a>Ref:&nbsp;$ligne[$eq_postes{'ref_poste'}]</td>\n"
		."<td class=\"textenoir\" width=\"480\">$ligne[$eq_postes{'libelle'}]</td>\n"
        ."</tr>\n";

#	$prechaine .="<tr valign=\"top\">\n"
#	."<TD WIDTH=\"25\">&nbsp;</TD>\n"
#	."<TD WIDTH=\"170\"><FONT COLOR=\"#800000\"><B><U>Ref:</U></B>&nbsp;$ligne[$eq_postes{'ref_poste'}]</FONT></TD>\n"
#	."<TD WIDTH=\"500\"><FONT COLOR=\"#0000FF\"><B><U><a href=\"#$ligne[$eq_postes{'ref_poste'}]\">$ligne[$eq_postes{'libelle'}]</FONT></A></U></B> </TD>\n"
#	."</TR>\n";
	


	$chaine .="<p align=\"center\">\n"
            ." <img src=\"/sitefr/img/filet1.gif\" width=\"480\" height=\"1\"> \n"
            ."</p>\n"
			."<p><a name=\"2\"></a><a href=\"#top\"><img src=\"/sitefr/img/top.gif\" width=\"9\" height=\"9\" border=\"0\"></a> <input type=\"checkbox\" name=\"choix\" value=\"$ligne[$eq_postes{'ref_poste'}]\">\n"
            ."              Ref : $ligne[$eq_postes{'ref_poste'}]<br>\n"
            ."<span class=\"titrebleu\">$ligne[$eq_postes{'libelle'}] :</span>\n"
			."$ligne[$eq_postes{'description'}] </p>\n"
            ."<p class=\"textegris\">$ligne[$eq_postes{'divers'}]</p>\n";
		
	
	
	


#	$chaine .="<P><TABLE BORDER=\"0\" CELLPADDING=\"2\" CELLSPACING=\"0\" WIDTH=\"481\">\n"
#	."<TR>\n"
#	."<TD WIDTH=\"25\"><INPUT TYPE=\"CHECKBOX\" VALUE=\"$ligne[$eq_postes{'ref_poste'}]\" NAME=\"choix\"></TD>\n"
#	."<TD WIDTH=\"100\"><FONT COLOR=\"#800000\"><B><U><A NAME=\"$ligne[$eq_postes{'ref_poste'}]\">Ref</A> :</U></B><br>$ligne[$eq_postes{'ref_poste'}]</FONT></TD>\n"
#	."<TD WIDTH=\"346\"><FONT COLOR=\"#0000FF\"><B><U><A>$ligne[$eq_postes{'libelle'}] :</FONT></A></U></B> </TD>\n"
#	."</TR>\n"
#	."<TR>\n"
#	."<TD WIDTH=\"25\"></TD>\n"
#	."<TD WIDTH=\"100\"></TD>\n"
#	."<TD WIDTH=\"346\"></TD>\n"
#	."</TR>\n"
#	."<TR>\n"
#	."<TD WIDTH=\"25\"></TD>\n"
#	."<TD WIDTH=\"100\" VALIGN=\"TOP\"><FONT COLOR=\"#800000\"><TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"0\" WIDTH=\"95\">\n"
#	."<TR>\n"
#	."<TD></TD>\n"
#	."<TD></TD>\n"
#	."</TR>\n"
#	."</TABLE>\n"
#	."</FONT></TD>\n"
#	."<TD WIDTH=\"346\">\n"
#	."<FONT FACE=\"Times New Roman,Times,Times NewRoman\" ROW=1><BR>$ligne[$eq_postes{'description'}]</FONT>\n" 
#	."</TD>\n"
#	."</TR>\n"
#	."<TR HEIGHT=\"16\">\n"
#	."<TD WIDTH=\"25\" HEIGHT=\"16\"></TD>\n"
#	."<TD WIDTH=\"100\" HEIGHT=\"16\" VALIGN=\"TOP\"></TD>\n"
#	."<TD WIDTH=\"346\" HEIGHT=\"16\"></TD>\n"
#	."</TR>\n"
#	."<TR>\n"
#	."<TD WIDTH=\"25\"></TD>\n"
#	."<TD WIDTH=\"100\"><TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"0\" WIDTH=\"93\">\n"
#	."<TR>\n"
#	."<TD WIDTH=\"80\"></TD>\n"
#	."<TD WIDTH=\"5\" ALIGN=\"RIGHT\" VALIGN=\"TOP\"></TD>\n"
#	."</TR>\n"
#	."</TABLE>\n"
#	."</TD>\n"
#	."<TD WIDTH=\"346\">\n"
#	."<FONT FACE=\"Times New Roman,Times,Times NewRoman\" COLOR=\"#FF0000\">$ligne[$eq_postes{'divers'}]</FONT>\n"
#	."</TR>\n"
#	."</TABLE>\n"
#	."</P>\n"
#	."<P ALIGN=\"CENTER\">&nbsp;<A HREF=\"#TOP\">Retour</A></P>\n"
#	."<P>\n"
#	."<HR NOSHADE SIZE=\"3\">\n"
#	."</P>\n";


#END OF BODY
#<!-- annonce en détail -->
#<P><FORM NAME="annonces" ACTION="../anncv.cgi" METHOD="get">
#
#$chaine
#
#<P><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" width="319">
#
#<TR>
#<TD WIDTH="178" ALIGN="RIGHT"><INPUT TYPE="SUBMIT" VALUE="Saisir le cv"></TD>
#<TD WIDTH="26"></TD>
#<TD><INPUT TYPE="RESET" VALUE="refaites votre choix"></TD>
#</TR>
#<TR>
#<TD WIDTH="178" ALIGN="RIGHT"></TD>
#<TD WIDTH="26"></TD>
#<TD>Si aucune annonce ne vous concerne, n'hesitez pas a nous <A
#HREF="../anncv.cgi">envoyer votre cv </A>de fa&ccedil;on
#spontan&eacute;e</TD>
#</TR>
#</TABLE>
#</P>        
#</FORM>
#</BODY>
#</HTML>
	 
      }
  }


