$inMessage"; } //============================================== // Fonction check_email // Vérifie la validité de l'adresse e-mail // parametres : $var : adresse e-mail // retour : booléen // ============================================= function check_email($var) { $mail_valide = preg_match('`^[[:alnum:]]([-_.]?[[:alnum:]])*@[[:alnum:]]([-_.]?[[:alnum:]])*\.([a-z]{2,4})$`',$var); if ($mail_valide) return true; else return false; } //============================================== // Fonction chapeau // Pour afficher un extrait d'un texte // parametres : $inTexte : le message d'erreur // $limit : taille du chapeau // $param : 0/1 coupe le texte aux espaces ou non // retour : $inTexte // ============================================= function chapeau($inTexte, $limit, $param){ if(strlen($inTexte)>$limit){ $Str = substr($inTexte, 0, $limit); if($param) return $Str = substr($Str,0, strrpos($Str," "))."..."; else return $Str; }else return $inTexte; } //================================== // fin de la fonction chapeau //================================== //============================================= // Fonction AffichePhoto // Affiche une image en réduisant si besoin est // $type: retourne à l'écran ou retourne la chaine // $inCheminImage: chemin de l'image // $inLargeurMax : Largeur maximale des photos // $inHauteurMax : Hauteur maximale des photos // retour : -1 si erreur //============================================= function AffichePhoto ($type,$inCheminImage, $inLargeurMax, $inHauteurMax) { if ($inCheminImage == "") return -1; if ( file_exists($inCheminImage) ) { $Size = GetImageSize($inCheminImage); $LargeurOriginale = $Size[0]; $HauteurOriginale = $Size[1]; $Format = $LargeurOriginale / $HauteurOriginale; if ($LargeurOriginale <= $inLargeurMax && $HauteurOriginale <= $inHauteurMax) { $Largeur = $LargeurOriginale; $Hauteur = $HauteurOriginale; } else { if ($LargeurOriginale > $HauteurOriginale) { if($inLargeurMax < $LargeurOriginale){ $Largeur = $inLargeurMax; $Hauteur = intval($inLargeurMax / $LargeurOriginale * $HauteurOriginale); if ($Hauteur > $inHauteurMax) { $Hauteur = $inHauteurMax; $Largeur = intval($Hauteur / $HauteurOriginale * $LargeurOriginale); } } else{ $Hauteur = $inHauteurMax; $Largeur = intval($Hauteur / $HauteurOriginale * $LargeurOriginale); } } else { if($inHauteurMax < $HauteurOriginale){ $Largeur = intval($inHauteurMax / $HauteurOriginale * $LargeurOriginale); $Hauteur = $inHauteurMax; } else{ $Largeur = $inLargeurMax; $Hauteur = intval($Largeur / $LargeurOriginale * $HauteurOriginale); if ($Hauteur > $inHauteurMax) { $Hauteur = $inHauteurMax; $Largeur = intval($Hauteur / $HauteurOriginale * $LargeurOriginale); } } } } if($type == "html") echo ""; if($type == "php") return ""; } else return -1; } //================================== // fin de la fonction AffichePhoto //================================== // ======================== // Fonction Affiche_Texte // Affiche un texte formaté // Parametres : $inTexte : le texte a afficher // retour : rien // ======================== function AfficheTexte($inTexte) { // on remplace les /n par des BR $inTexte = str_replace("\n", "
", $inTexte); // on retire les / devant les caracteres speciaux $inTexte = stripslashes($inTexte); // on affiche le texte echo $inTexte; } //================================== // fin de la fonction Affiche_Texte //================================== // ============================================================================ // Fonction ArretExecution // Termine l'exécution de la page, écrit un log et redirige vers une autre page // Parametres : // $inMessage : message à inscrire dans les logs // $inRedirection : page de redirection // retour : rien // ============================================================================ function ArretExecution($inMessage, $inRedirection) { // ouverture du fichier $file = fopen(INTERN_FRONTEND_LOG, "a"); if (!$file) { echo "

Impossible d'ouvrir le fichier de log.

\n"; exit; } /* Ecriture des données. */ fputs($file, "Date : ".date("d-m-y H:i:s")."\n"); fputs($file, "SCRIPT_NAME : ".$_SERVER['SCRIPT_NAME']."\n"); fputs($file, "QUERY_STRING : ".$_SERVER['QUERY_STRING']."\n"); fputs($file, "REMOTE_ADDR : ".$_SERVER['REMOTE_ADDR']."\n"); fputs($file, "REQUEST_METHOD : ".$_SERVER['REQUEST_METHOD']."\n"); fputs($file, "Message : $inMessage\n"); fputs($file, "===============================================================\n"); fclose($file); /*if (headers_sent) echo ""; else header("Location: $inRedirection");*/ } //================================== // fin de la fonction ArretExecution //================================== // ======================== // Fonction Affiche_Date_fr // Affiche une date au format Francais // Parametres : $inDate : le texte a afficher // retour : la date // ======================== function AfficheDate_fr($inDate) { return substr($inDate,8,2)."/".substr($inDate,5,2)."/".substr($inDate,0,4); } //================================== // fin de la fonction Affiche_Date_fr //================================== // ======================== // Fonction Affiche_Date_en // Affiche une date au format Anglais // Parametres : // $inDate : le texte a afficher // $val : 1 => SQL, 2 => écran // retour : la date // ======================== function AfficheDate_en($inDate,$val) { if($val==1) $car="-"; else if($val==2) $car="/"; return substr($inDate,6,4).$car.substr($inDate,3,2).$car.substr($inDate,0,2); } //================================== // fin de la fonction Affiche_Date_en //================================== //============================================== // Fonction Table2ArraySimple // Met dans un tableau les valeurs d'une table // parametres : $inMessage : le message d'erreur // retour : tableau // ============================================= function Table2ArraySimple ($reqsimple) { global $strConnection; $strRequete="$reqsimple"; $strConnection->Query($strRequete); if ($strConnection ->rows != 0) { // on parcourt la liste for ($intCompteur=0; $intCompteur <$strConnection ->rows; $intCompteur ++){ $strConnection ->Fetch($intCompteur); $TABLEAU[$strConnection ->data[0]]=$strConnection ->data[1]; } return $TABLEAU; } } //================================== // fin de la fonction Table2ArraySimple //================================== //============================================== // Fonction Table2Array // Met dans un tableau les valeurs d'une table // parametres : $inMessage : le message d'erreur // retour : tableau // ============================================= function Table2Array ($intable,$inId,$inName,$inWhere="1=1 ") { global $strConnection; $strRequete="Select $inId,$inName from $intable where $inWhere"; $strConnection->Query($strRequete); if ($strConnection ->rows != 0) { // on parcourt la liste for ($intCompteur=0; $intCompteur <$strConnection ->rows; $intCompteur ++){ $strConnection ->Fetch($intCompteur); $TABLEAU[$strConnection ->data[0]]=$strConnection ->data[1]; } return $TABLEAU; } } //================================== // fin de la fonction Table2Array //================================== // ======================== // Fonction reduit_fichier // Copie une image réduite en taille et en poids // Parametres : $fichier_image : image à réduire // $scale : niveau de qualité (max: 100) // $max_v : largeur de l'image // $max_h : hauteur de l'image // $dest : préfixe du nom de la nouvelle image créée // retour : nom de la nouvelle image créée // ======================== function reduit_fichier($fichier_image,$scale,$max_v,$max_h,$dest) { // MAX_V = HAUTEUR -- MAX_H = LARGEUR // le nom de l'image "scalée" commencera par ti_ et le nom du fichier original $ti_fichier_image=$dest; global $nomfichier; //extension du fichier $ext = strtolower(substr($fichier_image,strrpos($fichier_image,".")+1,strlen($fichier_image)-strrpos($fichier_image,".")-1)); if($ext=="jpg" || $ext=="jpeg") $im = ImageCreateFromjpeg($fichier_image); if($ext=="gif") $im = ImageCreateFromgif($fichier_image); if($ext=="png") $im = ImageCreateFrompng($fichier_image); $v=ImageSY($im); // $v prend la hauteur $h=ImageSX($im); // $h prend la largeur //Floor Arrondi à l'entier inférieur //ON GERE LA HAUTEUR if ($v > $max_v) // Si la hauteur Img, est plus grand que le max, on reduit { $taux_hauteur=$v/$max_v; // On recupere le taux necessaire pour retrecir $ti_v=(int)floor($max_v); // ti_v = taille final de la hauteur $ti_h=(int)floor($h/$taux_hauteur); // ti_h = taille final de la largeur } else $ti_v=$v; // Sinon on fixe la hauteur // Si il n'a pas deja subbit une modification de la taille if ($ti_h!="") $h_comp = $ti_h; else $h_comp = $h; if ($ti_v!="") $v_comp = $ti_v; else $v_comp = $v; //ON GERE LA LARGEUR if ($h_comp > $max_h) { $taux_largeur=$h_comp/$max_h; $ti_h=(int)floor($max_h); $ti_v=(int)floor($v_comp/$taux_largeur); } else $ti_h=$h_comp; $ti_im = imagecreatetruecolor($ti_h,$ti_v); if (!$ti_im) { $ti_im = imageCreate($ti_h,$ti_v); } imagecopyresampled($ti_im,$im,0,0,0,0,$ti_h,$ti_v,$h,$v); //imagecopyresized($ti_im,$im,0,0,0,0,$ti_h,$ti_v,$h,$v); if($ext=="jpg" || $ext=="jpeg") imagejpeg($ti_im,$ti_fichier_image,$scale); if($ext=="gif") imagegif($ti_im,$ti_fichier_image,$scale); if($ext=="png") imagepng($ti_im,$ti_fichier_image,$scale); return $ti_fichier_image; } //================================== // fin de la fonction reduit_fichier //================================== // ======================== // Fonction writeSelect // Créé les options d'un select // Parametres : $inStrConnection : connection utlisé // $selected : valeur pour la selection // retour : liste du select // ======================== function writeSelect($inStrConnection, $selected){ $list_options=""; if ($inStrConnection ->rows != 0) { // on parcourt la liste for ($intCompt=0; $intCompt <$inStrConnection ->rows; $intCompt ++){ $inStrConnection ->Fetch($intCompt); if ($inStrConnection ->data[0]==$selected) $list_options .= ""; else $list_options .= ""; } } return $list_options; } //================================== // fin de la fonction writeSelect //================================== // ======================== // Fonction writeRadio // Créé un bouton radio // Parametres : $inStrConnection : connection utlisé // $selected : valeur pour la selection // retour : liste d'option // ======================== function writeRadio($nom, $selected){ if ($selected=="1") $list_radio ="Oui "; else $list_radio = "Oui "; if ($selected=="0") $list_radio .= "Non
\n"; else $list_radio .= "Non
\n"; return $list_radio; } //================================== // fin de la fonction writeRadio //================================== // ======================== // Fonction Format_Duree // Affiche la duree au format h mn ou mn // Parametres : $inDuree : la duree a afficher // retour : la duree // ======================== function Format_Duree($inDuree){ if($inDuree!="''"){ $inDuree_h=substr($inDuree,0,2); $inDuree_mn=substr($inDuree,3,2); if($inDuree_h!="00") { $inDuree_h = $inDuree_h*1; return $inDuree_h."h".$inDuree_mn."mn"; } else { $inDuree_mn = $inDuree_mn*1; return $result = $inDuree_mn."mn"; } } else return "0mn"; } //================================== // fin de la fonction Format_Duree //================================== // ======================== // Fonction crypter // Crypte l'id client apparaissant dans l'URL // Parametres : $str // ======================== function crypter($str) { if($str!="") { $char = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; $str1 = ''; for( $i=1; $i<=10; $i++) { $str1 .= $char[ rand(1, strlen($char))-1 ]; } return($str1.base64_encode($str)); } else return ""; } //================================== // fin de la fonction crypter //================================== // ======================== // Fonction decrypter // Décrypte l'id client apparaissant dans l'URL // Parametres : $str // ======================== function decrypter($str) { if($str!="") { $str = substr($str,10); return(base64_decode($str)); } else return ""; } //================================== // fin de la fonction decrypter //================================== // ======================== // Fonction modif_titre // Affiche le titre avec différente taile // Parametres : $str // ======================== function modif_titre($str) { if($str!="") { $tab=explode(" ",$str); $max=0; foreach($tab as $val) { $max=max($max, strlen($val)); } if($max>11 && $max<15) $size=2; if($max>=15) $size=1; if($max<=11) $size=3; return "".$str.""; } else return ""; } //================================== // fin de la modif_titre //================================== ?> The Personnel Department® Internship Program
HomeHome
 
 

Member Login
User Name
Password
Forgot Password?
New? Register Here

Testimonials
See what others have to
say about Interns Canada

Students

As a participating student in this program you have a unique opportunity to apply your skill set to the Canadian work force. The Interns-Canada program will pair you with a Canadian employer in need of qualified individuals with your professional background.

You will gain:
  • Paid employment within Canada
  • International work experience
  • Letter of recommendation from your employer which can be used for future employment
  • Opportunity to use your English training in a practical environment
  • Canadian work experience
  • The opportunity, in many cases, to recover the cost of your educational program
  • The opportunity to work and travel anywhere in Canada
Where else but the Interns-Canada program can you gain the opportunity to use your talents in a meaningful way all while learning English and exploring a new country. Canadian employers need people with your background, experiences and skill set to work in their companies and help grow their businesses. Interns-Canada provides you with the connection to the Canadian market place and the fantastic opportunities that awaits you there.

If you have 3 years or more of work experience and an intermediate or advanced level of English then you are just the type of intern we need. For more information on how you can become a part of this unique program talk to your agent about the Interns-Canada program or call toll free 1-888-707-6677 for more information.

Canada needs you today!!