%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/devcapijob/www/clients/
Upload File :
Create Path :
Current File : /home/devcapijob/www/clients/mail.php

<?php
define('PATH_BASE',dirname(__DIR__) );
define( 'DS', DIRECTORY_SEPARATOR );
set_include_path(PATH_BASE .DS.'liberary');
require_once ( PATH_BASE .DS.'config.php' );
require_once ( PATH_BASE .DS.'liberary'.DS.'defines.php' );
require_once ( FACTORY );
require_once ( FRAMWORK );
require_once ( REQUEST );
require_once ( DB );
require_once ( LANG );
require_once ( LINK );
require_once(STP);
require_once(MSG);
require_once ( PATH_BASE .DS.'liberary'.DS.'db.php' );
require_once ( PATH_BASE .DS.'liberary'.DS.'model.php' );
define ('PREFIX', S_config::$prefix);

error_reporting(E_ALL);
ini_set('display_errors',0);

function soc_info($site=NULL){

		$sites=(is_null($site) || $site==0)? '1' : $site;
		 $query='select * from #_societe where id_soc='.$sites;
		$data=DB::do_query($query);
		$array=array();
		$row = $data->fetch(PDO::FETCH_ASSOC);

		
		return $row;

	}

$sql ="SELECT * FROM cap_annonceur WHERE cap_annonceur.etat = 1 and site =1";
$req =DB::do_query($sql);
while ($row = $req->fetch()) {
	$soc =soc_info($row['site']);
	$header = Model::header_mail();
	$body ='<tr bgcolor="#e4e4e4">
	  <td>
	   	<table border="0" cellpadding="0" cellspacing="0" width="100%">
           <tr>
              <td align="center" style="padding:40px 60px"><span style="display: block;border-bottom: 1px solid #fff;"><span style="font-size: 20px;font-weight: bold;background:#e4e4e4;padding: 18px;position: relative;top: 9px;">Cher Client, Bonjour!</span></span></td>
            </tr> 
            <tr>
              <td align="left" style="padding:20px 30px">
                 <p>A l\'occasion de nos cong&eacute;s d\'&eacute;t&eacute;, nous vous informons que nos bureaux seront ferm&eacute;s <b> du 03 au 19 ao&ucirc;t</b><br/>
Durant cette p&eacute;riode, vos nouvelles annonces ou modifications seront cependant valid&eacute;es dans les 48 heures.<br/>
Pour toute autre demande, vous pourrez nous contacter &agrave; la date indiqu&eacute;e.<br/>
Passez de belles vacances de la part de toute notre Equipe !<br/><br/>
Bien cordialement.                 </p>
              </td>
           </tr>
           
	   	</table>
	  </td>
	 </tr>';
	$footer = Model::footer_mail($soc);
	$html= $header.$body.$footer;
	//echo '../liberary/Zend/Mail.php';
	require_once('../liberary/Zend/Mail.php');
	$mail = new Zend_Mail('UTF-8');
	$mail->setType(Zend_Mime::MULTIPART_RELATED);
	$mail->setBodyHtml($html);
	$mail->setFrom('service@Capijobnew.com', $soc['rc']);
    //$to ='abaroutarik@gmail.com';
	$to =$row['email'];
	$mail->addTo($to, $row['raison_social']);
	//$mail->addCc('annonce@capijob.com', $this->soc_info('rc'));
	$mail->setSubject($soc['rc']." - congés du 03 au 19 août ");
	if($mail->send()){
			echo '1 <br/>';
	}
	//exit;
}
?>

Zerion Mini Shell 1.0