Subversion Repositories eFlore/Applications.cel

Rev

Rev 1720 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1720 Rev 1724
Line 62... Line 62...
62
		if (!isset($uid[1]) || $uid[1]=="" || $uid[1]=="all" ) {
62
		if (!isset($uid[1]) || $uid[1]=="" || $uid[1]=="all" ) {
63
			$uid[1]="all";
63
			$uid[1]="all";
64
			$requete_location="";
64
			$requete_location="";
65
		}
65
		}
66
		else {
66
		else {
67
			$requete_location=" AND location= ".$this->proteger($uid[1])." ";
67
			$requete_location=" AND location= ".Cel::db()->proteger($uid[1])." ";
68
		}
68
		}
Line 69... Line 69...
69
		
69
		
70
		if (!isset($uid[2]) || $uid[2]=="" || $uid[2]=="all") {
70
		if (!isset($uid[2]) || $uid[2]=="" || $uid[2]=="all") {
71
			$uid[2]="all";
71
			$uid[2]="all";
72
			$requete_date="";
72
			$requete_date="";
73
		}
73
		}
74
		else {
74
		else {
75
			$requete_date=" AND date_observation= ".$this->proteger($uid[2])." ";
75
			$requete_date=" AND date_observation= ".Cel::db()->proteger($uid[2])." ";
Line 76... Line 76...
76
		}
76
		}
77
		
77
		
78
		if (!isset($uid[3]) || $uid[3]=="" || $uid[3]=="all") {
78
		if (!isset($uid[3]) || $uid[3]=="" || $uid[3]=="all") {
79
			$uid[3]="all";
79
			$uid[3]="all";
80
			$requete_libre="";
80
			$requete_libre="";
81
		}
81
		}
82
		else {
82
		else {
83
			$requete_libre=" AND (nom_sel LIKE ".$this->proteger('%'.$uid[3].'%').
83
			$requete_libre=" AND (nom_sel LIKE ".Cel::db()->proteger('%'.$uid[3].'%').
84
						" OR nom_ret LIKE ".$this->proteger('%'.$uid[3].'%').
84
						" OR nom_ret LIKE ".Cel::db()->proteger('%'.$uid[3].'%').
85
						" OR station LIKE ".$this->proteger('%'.$uid[3].'%').
85
						" OR station LIKE ".Cel::db()->proteger('%'.$uid[3].'%').
Line 86... Line 86...
86
						" OR commentaire LIKE ".$this->proteger('%'.$uid[3].'%');
86
						" OR commentaire LIKE ".Cel::db()->proteger('%'.$uid[3].'%');
87
		}
87
		}
88
 
88
 
89
		if (!isset($uid[4]) || $uid[4]=="" || $uid[4]=="all") {
89
		if (!isset($uid[4]) || $uid[4]=="" || $uid[4]=="all") {
90
			$uid[4]="all";
90
			$uid[4]="all";
91
			$requete_station="";
91
			$requete_station="";
92
		}
92
		}
Line 93... Line 93...
93
		else {
93
		else {
Line 94... Line 94...
94
			$requete_station=" AND station= ".$this->proteger($uid[4])." ";
94
			$requete_station=" AND station= ".Cel::db()->proteger($uid[4])." ";
95
		}
95
		}
96
		
96
		
97
		$value=array();
97
		$value=array();
98
		
98
		
99
	   	$requete="SELECT ce_utilisateur, ordre, nom_sel, nom_sel_nn, nom_ret, nom_ret_nn, nt, famille, zone_geo, date_observation," .
99
	   	$requete="SELECT ce_utilisateur, ordre, nom_sel, nom_sel_nn, nom_ret, nom_ret_nn, nt, famille, zone_geo, date_observation," .
100
	           " station, commentaire, transmission  FROM cel_obs WHERE ce_utilisateur = ".$this->proteger($uid[0])." " .
100
	           " station, commentaire, transmission  FROM cel_obs WHERE ce_utilisateur = ".Cel::db()->proteger($uid[0])." " .
Line 101... Line 101...
101
				$requete_location.	
101
				$requete_location.	
Line 102... Line 102...
102
        		$requete_date.	
102
        		$requete_date.	
103
        		$requete_libre.	
103
        		$requete_libre.	
104
         		$requete_station.	
104
         		$requete_station.	
105
          		" ORDER BY ordre ";
105
          		" ORDER BY ordre ";