Beispiel #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;	
	}
Beispiel #2
0
	static function select($order='mtp_iListId') 
	{
			$zSql = " SELECT DISTINCT mtp_iListId FROM moul_tables_tmp ";
			$zSql .= " INNER JOIN moul_listes ON (moul_listes.id = moul_tables_tmp.mtp_iListId) ";
			$zSql .= " ORDER BY " . COrder::formate($order);

			$toRes = CBdd::select($zSql);
			$tFichiers = array();
			while($toItm = mysql_fetch_assoc($toRes)){
				array_push($tFichiers,$toItm);
			}
		return 	$tFichiers;	
	}
Beispiel #3
0
    static function fetchAll($select="*", $where="1", $order="mlt_zMail, mlt_zDateCreation") {
        
        $oRes = parent::select($select, 'moul_tables', $where, COrder::formate($order));
 
        $toResults = array() ;
        if ($oRes){
            while ($toRes = mysql_fetch_assoc($oRes)){
                $toResults[] = $toRes ;
            }
        }

        return $toResults ;

    }
Beispiel #4
0
	static function select($select="*", $where, $order="id") {
		if(empty($order)) $order = "id";
		return parent::select($select, 'rdvContact', $where, COrder::formate($order));
	}
	$a = 0;
	break;

case 6 : // Filtrer
	if(!empty($_GET['idcat'])) $idcat = $_GET['idcat'];
	$_SESSION['idcat'] = $idcat;
	break;
}

/*------------------------------------------------------
		A FAIRE DANS TOUS LES CAS
--------------------------------------------------------*/
$select = "*";
$filtre = "1";

$r_opportunite = CTableOpportuniteUtilisateur::select("*", $filtre, COrder::formate($order));
?>
<!-- InstanceEndEditable -->
<div id="mainwrap">
  <div id="header"><?php include("../nav/header.php"); ?></div>
  <div id="top"><?php include("../nav/menu_h.php"); ?></div>
  <div id="filet">
    <div id="zonetitre">
      <div id="signe"></div>
      <div id="titre"><!-- InstanceBeginEditable name="titre" -->Opportunit&eacute;s<!-- InstanceEndEditable --></div>
    </div>
  </div>
  <div id="contentarea">
    <div id="left"><?php include("../nav/menu_g.php"); ?></div>
    <div id="center">
      <div id="page"><!-- InstanceBeginEditable name="page" --><?php echo CHtml::get_toolbar() ?><!-- InstanceEndEditable --></div>
Beispiel #6
0
	static function select($select="*", $where="1", $order="id") {
		if(empty($order)) $order = "id";
//		return parent::select($select, 'gr_rdv_user', $where, COrder::formate($order));
		return parent::select($select, 'gr_rdv', $where, COrder::formate($order));
	}
Beispiel #7
0
	if(isset($_GET['idpays'])) $idpays = $_GET['idpays'];
	$_SESSION['idpays'] = $idpays;
	break;
}

/*------------------------------------------------------
		A FAIRE DANS TOUS LES CAS
--------------------------------------------------------*/

if(!empty($_SESSION['idpays']) && (empty($_GET['ville']))){
	$filtre = " WHERE pays like '".$_SESSION['idpays']."' ";
}else $filtre = " WHERE pays like '%%' ";


$requetPays_   ="select * from departement ";
if ($_GET['order']) $requetPays_  .= "".$filtre." ORDER BY ".COrder::formate($_GET['order'])."";
else $requetPays_  .= "".$filtre." ORDER BY ".$order." DESC";

$requetPays = CBdd::select($requetPays_);
?>
<!-- InstanceEndEditable -->
<div id="mainwrap">
  <div id="header"><? include("../nav/header.php"); ?></div>
  <div id="top"><? include("../nav/menu_h.php"); ?></div>
  <div id="filet">
    <div id="zonetitre">
      <div id="signe"></div>
      <div id="titre"><!-- InstanceBeginEditable name="titre" -->Departement/Canton<!-- InstanceEndEditable --></div>
    </div>
  </div>
  <div id="contentarea">
Beispiel #8
0
	static function select($select="*", $where="1", $order="nom_com"){
		return parent::select($select, 'commune', $where, COrder::formate($order));
	}
	$listeGroupe__ = str_replace(array('(,', ',)',',,'), array('(', ')',''), ($listeGroupe));
	$filtre_groupe = " WHERE id_ent <> 0 AND id_ent IN ".$listeGroupe__;
}

$filtre  = " 1 " . $filtre_groupe;

$zSql	= "" ;
$zSql  .= " SELECT * FROM entreprise " ;
$zSql  .= " INNER JOIN cat ON cat.id_cat = entreprise.categorie_ent" ;
$zSql  .= " INNER JOIN secteur ON secteur.id_sec = cat.secteur_cat" ;
if (($_GET['alphaA']) ||($_SESSION['alphaA'])){
	if ($_GET['alphaA'] != '') $zSql  .=" AND nom_ent LIKE '" . $_GET['alphaA'] ."%'";
}

$zSql  .=   $filtre_groupe ;
if ($_GET['order']) $zSql  .= " ORDER BY ".COrder::formate($_GET['order']);
else $zSql  .= " ORDER BY nom_ent";
$zSql  .= " LIMIT " . $iStart . ", " . $iMaxPerPage ;
//print_r($zSql);
$r_user = CBdd::select($zSql);

//print_r($zSql);
?>
<body>
<div id="main">
  <?php if(($a != 4) && ($a != 5) ) { ?>
  <?php
//----------------------------------------------------------------------------------------------
// LISTE
//----------------------------------------------------------------------------------------------
   	$id_default_group = CTableConfiguration::get_value_by_element('DEFAULT_GROUP');
Beispiel #10
0
	static function select($select="*", $where="1", $order="rang") {
		return parent::select($select, 'categorie_user', $where, COrder::formate($order));
	}
Beispiel #11
0
	static function select($select="*", $where="1", $order="id desc") {
		if(empty($order)) $order = "id desc";
		return parent::select($select, 'user', $where, COrder::formate($order));
	}
Beispiel #12
0
	static function select($select="*", $where="id_campagne < 1", $order="id") {
		return parent::select($select, 'gr_email', $where, COrder::formate($order));
	}
Beispiel #13
0
	}
	
	$values = array('id'=>$id, 'nom'=>CFunction::addslashes($nom));
		
	$tcat = new CTablePays($values);
	$tcat->update();
	$msginfo = 'Menu bien modifi&eacute;';
	$a = 0;
	break;
}

/*------------------------------------------------------
		A FAIRE DANS TOUS LES CAS
--------------------------------------------------------*/
$requetPays_   ="select * from pays ";
if ($_GET['order']) $requetPays_  .= " ORDER BY ".COrder::formate($_GET['order']);
else $requetPays_  .= " ORDER BY ".$order." DESC";

//print_r($requetPays_);
$requetPays = CBdd::select($requetPays_);
?>
<!-- InstanceEndEditable -->
<div id="mainwrap">
  <div id="header"><?php include("../nav/header.php"); ?></div>
  <div id="top"><?php include("../nav/menu_h.php"); ?></div>
  <div id="filet">
    <div id="zonetitre">
      <div id="signe"></div>
      <div id="titre"><!-- InstanceBeginEditable name="titre" -->Pays<!-- InstanceEndEditable --></div>
    </div>
  </div>
Beispiel #14
0
	static function select($select="*", $where="1", $order="rang") {
		return parent::select($select, 'article_cat', $where, COrder::formate($order));
	}
Beispiel #15
0
	}
	
	$values = array('id_sec'=>$id, 'nom_sec'=>CFunction::addslashes($nom));
		
	$tcat = new CTableSecteur($values);
	$tcat->update();
	$msginfo = 'Menu bien modifi&eacute;';
	$a = 0;
	break;
}

/*------------------------------------------------------
		A FAIRE DANS TOUS LES CAS
--------------------------------------------------------*/
$requetSecteur_ ="select * from secteur";
if ($_GET['order']) $requetSecteur_  .= " ORDER BY ".COrder::formate($_GET['order']);
else $requetSecteur_  .= " ORDER BY ".$order;
 
$requetSecteur = mysql_query($requetSecteur_);
?>
<!-- InstanceEndEditable -->
<div id="mainwrap">
  <div id="header"><?php include("../nav/header.php"); ?></div>
  <div id="top"><?php include("../nav/menu_h.php"); ?></div>
  <div id="filet">
    <div id="zonetitre">
      <div id="signe"></div>
      <div id="titre"><!-- InstanceBeginEditable name="titre" -->Secteur<!-- InstanceEndEditable --></div>
    </div>
  </div>
  <div id="contentarea">
	static function select($select="*", $where="1", $order="id") {
		return parent::select($select, 'groupeUtilitaire', $where, COrder::formate($order));
	}
Beispiel #17
0
	static function select($select="*", $where="1", $order="id") {
		return parent::select($select, 'image', $where, COrder::formate($order));
	}
Beispiel #18
0
$i=0;


//while ($row = mysql_fetch_assoc($queryCnt)) {
//	$val=$row['id'];
//	$i++;
//}
$iMaxPerPage1 = $i-1;

// FIN COMPTEUR
$iNbPage    = ceil(($iMaxPerPage1/$iMaxPerPage)) ;

$zSql	= "" ;
$zSql  .= " SELECT * FROM commune INNER JOIN departement ON commune.departement=departement.id_dep" ;
$zSql  .=   $filtre ;
$zSql  .=   COrder::formate($order) ;
$zSql  .= " LIMIT " . $iStart . ", " . $iMaxPerPage ;

$requetCcom = CBdd::select($zSql);
?>
<!-- InstanceEndEditable -->
<div id="mainwrap">
  <div id="header"><? include("../nav/header.php"); ?></div>
  <div id="top"><? include("../nav/menu_h.php"); ?></div>
  <div id="filet">
    <div id="zonetitre">
      <div id="signe"></div>
      <div id="titre"><!-- InstanceBeginEditable name="titre" -->Commune<!-- InstanceEndEditable --></div>
    </div>
  </div>
  <div id="contentarea">
Beispiel #19
0
	$a = 0;
	break;

case 6 : // Filtrer
	if(!empty($_GET['idcat'])) $idcat = $_GET['idcat'];
	$_SESSION['idcat'] = $idcat;
	break;
}

/*------------------------------------------------------
		A FAIRE DANS TOUS LES CAS
--------------------------------------------------------*/
$select = "*";
$filtre = "1";

$order = COrder::formate($order) ;
$sql   = " SELECT opportunite.*, hbpiecesjointes.piece AS pj, texte.nom AS txt FROM opportunite" ;
$sql  .= " LEFT JOIN hbpiecesjointes ON hbpiecesjointes.id = pieId" ;
$sql  .= " LEFT JOIN texte ON texte.id = texId" ;
$sql  .= ($order) ? " ORDER BY " . $order : '' ;

$r_opportunite = CBdd::select($sql);


?>
<!-- InstanceEndEditable -->
<div id="mainwrap">
  <div id="header"><?php include("../nav/header.php"); ?></div>
  <div id="top"><?php include("../nav/menu_h.php"); ?></div>
  <div id="filet">
    <div id="zonetitre">
Beispiel #20
0
	$_SESSION['secteur'] = $idsec;
	break;
case 66 : // Filtrer cat
	if(isset($_GET['idcat'])) $idcat = $_GET['idcat'];
	$_SESSION['idcat'] = $idcat;
	break;
}

/*------------------------------------------------------
		A FAIRE DANS TOUS LES CAS
--------------------------------------------------------*/
if(($idsec!=0) && ($idsec!='')) $filtre = " WHERE cat.secteur_cat =".$idsec;
else if (($idcat!=0) && ($idcat!='')) $filtre = " WHERE mot.cat_motcle =".$idcat;
else $filtre = " WHERE id_motcle like '%%'";

if ($_GET['order']) $parOrder  .= " ORDER BY ".COrder::formate($_GET['order']);
else $parOrder  .= " ORDER BY ".$order;

//print_r($filtre);
$requetteSql = "SELECT mot.* FROM motcle mot INNER JOIN cat cat ON mot.cat_motcle=cat.id_cat".$filtre."".$parOrder."";
//$r_user = CBdd::select($zSql);
//print_r($requetteSql);
$requetCat = CBdd::select($requetteSql);
?>
<!-- InstanceEndEditable -->
<div id="mainwrap">
  <div id="header"><?php include("../nav/header.php"); ?></div>
  <div id="top"><?php include("../nav/menu_h.php"); ?></div>
  <div id="filet">
    <div id="zonetitre">
      <div id="signe"></div>
Beispiel #21
0
	static function select($select="*", $where="1", $order="DESC") {
		if(empty($order)) $order = "DESC";
		return parent::select($select, 'entreprise', $where, COrder::formate($order));
	}
Beispiel #22
0
	static function select($select="*", $where="1", $order="nomart, rang") {
		return parent::select($select, 'page_art', $where, COrder::formate($order));
	}