Пример #1
0
	static function select($istart=0,$ioffset=1000,$igrp=0,$order = 'mlt_iListId') 
	{
			$tGrps = array();
			
			$zSql = " ";
			$zSql .= " SELECT DISTINCT mlt_iListId FROM moul_tables ";
			$zSql .= " INNER JOIN moul_listes ON (moul_listes.id=moul_tables.mlt_iListId)";
			
			if($igrp == 1000)  {
				$grp = CTableMoulGpFic::get_elms_of_grp(0);
				foreach($grp as $i=>$grps){
					if($grps['fic']!='') $tGrps[$i] = $grps['fic'];
				}
				if($grps['fic']!=''){
					$zSql .= " WHERE mlt_iListId NOT IN (";
					for($i=0;$i<count($tGrps)-1;$i++) $zSql .= $tGrps[$i].",";
					$zSql .= $tGrps[$i].") ";
				}
			}
			
			if($igrp == 1001){
				$grp = CTableMoulGpFic::get_elms_of_grp();
				foreach($grp as $i=>$grps){
					if($grps['fic']!='') $tGrps[$i] = $grps['fic'];
				}
				if($grps['fic']!=''){
					$zSql .= " WHERE mlt_iListId IN (";
					for($i=0;$i<count($tGrps)-1;$i++) $zSql .= $tGrps[$i].",";
					$zSql .= $tGrps[$i].") ";
				}
			}
			
			if(($igrp != 0) && ($igrp != 1000) && ($igrp != 1001))  {
				$grp = CTableMoulGpFic::get_elms_of_grp($igrp);
				foreach($grp as $i=>$grps){
					if($grps['fic']!='') $tGrps[$i] = $grps['fic'];
				}
				if($grps['fic']!=''){
					$zSql .= " WHERE mlt_iListId IN (";
					for($i=0;$i<count($tGrps)-1;$i++) $zSql .= $tGrps[$i].",";
					$zSql .= $tGrps[$i].") ";
				}
			}
			
			$zSql .= " ORDER BY " . COrder::formate($order) ;
			$zSql .= " LIMIT " . $istart ."," . $ioffset;

			$toRes = CBdd::select($zSql);
			$tFichiers = array();
			while($toItm = mysql_fetch_assoc($toRes)){
				array_push($tFichiers,$toItm);
			}
			
		return 	$tFichiers;	
	}
Пример #2
0
	            	<th align="left"><a href="?order=nom">Nom</a></th>
		            <th width="50px">Liste</th>
	            	<th width="80px">Nbre Emails</th>
		            <th width="80px">Date d'ajout</th>
		            <th width="50px">Publié</th>
		            <th width="50px">Modif</th>
		            <th width="50px">Vider</th>
		            <th title="suppr" width="50px"> Suppr </th>
		            <th width="50px">Envoi</th>
		            
	          	</tr>
<?php 			foreach($tElms as $res){?>
			  	<tr>
				  	<td><?php echo $res['id'];?></td>
				  	<td><?php echo $res['nom'];?></td>
				  	<td><?php echo CTableMoulGpFic::get_nbr_fic_of_grp($res['id']);?></td>
				  	<td><?php echo $res['fichiers'];?></td>
				  	<td><?php echo CDate::date_switch(CDate::formate_date($res['date_creation']));?></td>
				  	<td><?php echo CHtmlSession::get_etat($res['id'],$res['etat'],1);?></td>
				  	<td><?php echo CHtmlSession::get_editbutton($res['id'], 1) ?></td>
				  	<td><?php include('moul_vider_grpmail.php');?></td>
				  	<td><?php include('moul_delete_grpmail.php');?></td>
				  	<td><a href="envoi.php?destinataire=<?php echo $res['nom'] ?>&a=4&type_groupe=2">>></a></td>
			  	</tr>
<?php 			}?>
      		</table>
<?php 	} 
      
/*-----------------------------------
 * AJOUT MODIFICATION
 *-----------------------------------*/  
Пример #3
0
<form action="" method="post" tmt:validate="true">	  
	  <table  style="width: 875px; margin-left: 1px;" border="1" cellpadding="0" cellspacing="0">
          <tr align="center">
            <th align="left" width="40px">Num</th>
            <th align="left" width="200px"><a href="?order=nom">Fichier initial CSV</a></th>
            <th align="left" width="80px"><a href="?order=mlt_zDateCreation">Date de création</a></th>
            <th width="55px">Email Valide</th>
            <th title="suppr" width="40px"> Suppr </th>
            <th width="150px">groupe</th>
            <th width="50px">CheckBox</th>
          </tr>
<?php 			foreach($tMGp as $ik=>$moulsgrps){
					$iMV = CTableMoulGp::get_iEmail($moulsgrps['mlt_iListId']);
					$date= CTableMoulGp::select_date_fic($moulsgrps['mlt_iListId']);
					$tgps = CTableMoulGpFic::get_elm_of_fic($moulsgrps['mlt_iListId']);
					$nomfic = CTableMoulListe::get_nom_by_id($moulsgrps['mlt_iListId']);
?>
          <tr>
          	<td><?php echo $ik+1;?></td>
          	<td><?php echo $nomfic;?></td>
          	<td><?php echo CDate::date_switch(CDate::formate_date($date)); ?></td>
          	<td><a href="moul_mail_valide.php?iMltListId=<?php echo $moulsgrps['mlt_iListId'] ; ?>"><?php echo $iMV;?></a></td>
          	<td>
<?php 			include('moul_delete_ficgrp.php');?>
          	</td>
          	<td><?php if($tgps) echo CTableGrpMl::get_elm($tgps); else echo "<a>not in group</a>";?></td>
          	<td>
        		<?php if(!$tgps){?>
        		<input class="caseacocher" name="tab_fic[<?php echo $ik ?>]" type="checkbox" id="tab_fic[<?php echo $ik ?>]" value="<?php echo $moulsgrps['mlt_iListId'];?>" />
        		<?php }?>