require_once(”CXml.php”);
/**************************/
/* Main Program */
/**************************/
/*Configuration parameters*/
/**
* Default synergie.
* Supported synergie is hetero/gay
*/
define(’SYNERGIE’,'hetero’);
/**
* Default number of hostesses
*/
define(’N', 9);
/**
* Default language
*/
define(’LG’, ‘fr’);
define(’EUROLIVE_URL’, ‘http://www.eurolive.com/index.php’);
define(’XML_URL’, EUROLIVE_URL . ‘?module=public_eurolive_onlinehostess’);
define(’DETAILS_URL’, EUROLIVE_URL . ‘?module=public_eurolive_hote_info&id_hotesse=’);
/**
* Authentication parameters;
* Your webmaster data;
**/
$key = “8e7cddaf8c06″;
$login_cd = “ovidio”;
$password_cd = “redweb”;
$id = “45337″ ;
/*ATTENTION : This partt is vital - used for countrty restriction for model who don’t want to be show in their native countries
Please, don’t forget it
*/
$ip = $_SERVER [’REMOTE_ADDR’];
/*Set parameters about service*/
if(isset($_REQUEST[”synergie”])) $syn = $_REQUEST[”synergie”]; else $syn = SYNERGIE;
if(isset($_REQUEST[”n”])) $n = $_REQUEST[”n”]; else $n = N;
if(isset($_REQUEST[”lg”])) $lg = $_REQUEST[”lg”]; else $lg = LG;
$translation = array(
‘fr’ => array(”Voir sa fiche”, “ans”),
‘en’ => array(”See the profile”, “years”),
‘es’ => array(”Ver el perfil”, “años”),
‘it’ => array(”Vedere la sua scheda”, “anni”)
);
/* loading of file XML (one passes the parameters wished to flow xml) */
$myXML = “”;
if($key){
$fd = @fopen(XML_URL.”&id=$id&format=XML&synergie=$syn&key=$key&n=$n&ip=$ip”,”r”);
}
elseif($login_cd && $password_cd){
$fd = @fopen(XML_URL.”&id=$id&format=XML&synergie=$syn&login=$login_cd&password=$password_cd&n=$n&ip=$ip”,”r”);
}
while(!feof ($fd)){
$myXML .= fgets ($fd, 1024);
}
fclose($fd);
/* creation of object XML */
$m_xml = new CXml();
$m_xml->Set_XML_data($myXML);
/**
* Show hotesses information
*
* @param object $xml
*/
function display(&$xml, $translation){
global $id;
global $lg;
global $display_elements;
$translation = $translation[$lg];
if(is_array($xml->obj_data->hostesses[0]->hostess)){
$result = ”
“;
$i = 0;
$elemsPerRaw = 4;
foreach($xml->obj_data->hostesses[0]->hostess as $info){
$i ++;
$fields = get_object_vars($info);
$images = get_object_vars($fields[”image”][0]);
$result .=
‘ ‘.
‘
| ‘ . ‘‘ . ‘‘ . $fields[”name”][0]. ‘, ‘. $fields[”age”][0] . ‘ ‘. $translation[1] .’‘ . ‘ |
| ‘ . ‘‘ . ‘ ‘‘ . ‘ |
| ‘ . ‘‘ . $translation[0] . ‘ |
‘ .
‘
‘;
if($i%$elemsPerRaw == 0){
$result .= ” “;
}
}
$result .= ”
“;
print $result;
}
}
?>
Popularity: 2% [?]