Commit 20d047c7 authored by Raph El's avatar Raph El

test list region

parent d8f9983f
......@@ -3518,5 +3518,33 @@ if( Role::isSuperAdmin(Role::getRolesUserId(Yii::app()->session["userId"]) )){
}else
echo "Pas d'envoie pour toi ma cocote !! Tu vas aller au four plutot";
}
public function actionRegionList(){
//if( Role::isSuperAdmin(Role::getRolesUserId(Yii::app()->session["userId"]) )){
ini_set('memory_limit', '-1');
$nbelement = 0 ;
$erreur = array();
$region = array();
$aggregate = array(
array(
'$group' => array(
"_id" => array( "level3Name" => '$level3Name',
"country" => '$country'),
),
),
);
$cities = PHDB::aggregate( City::COLLECTION, $aggregate);
//var_dump($cities);
if(!empty($cities["result"])){
foreach (@$cities["result"] as $keyElt => $city) {
if(!empty($city["_id"]["level3Name"]) && (!empty($city["_id"]["country"]) && $city["_id"]["country"] == "FR") )
echo '"'.$city["_id"]["level3Name"].'"<br/>';
}
}
//}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment