2012-06-25 19:16:42 +00:00
|
|
|
<?php
|
|
|
|
header('Content-type: text/xml');
|
|
|
|
|
|
|
|
error_reporting(E_ALL ^ E_NOTICE);
|
|
|
|
ini_set("display_errors","1");
|
|
|
|
|
|
|
|
require_once("class/mySQL_class.php");
|
|
|
|
require_once("conf.php");
|
|
|
|
|
|
|
|
require_once($_CONF['app_achievements_path']."class/Parentum_abstract.php");
|
|
|
|
require_once($_CONF['app_achievements_path']."class/AchList_abstract.php");
|
|
|
|
require_once($_CONF['app_achievements_path']."class/Tieable_inter.php");
|
|
|
|
require_once($_CONF['app_achievements_path']."class/NodeIterator_class.php");
|
2012-08-20 13:52:35 +00:00
|
|
|
#require_once($_CONF['app_achievements_path']."class/Node_trait.php");
|
|
|
|
#require_once($_CONF['app_achievements_path']."class/InDev_trait.php");
|
2012-06-25 19:16:42 +00:00
|
|
|
|
|
|
|
require_once($_CONF['app_achievements_path']."class/AchMenu_class.php");
|
|
|
|
require_once($_CONF['app_achievements_path']."class/AchMenuNode_class.php");
|
|
|
|
require_once($_CONF['app_achievements_path']."class/AchSummary_class.php");
|
|
|
|
require_once($_CONF['app_achievements_path']."class/AchCategory_class.php");
|
|
|
|
require_once($_CONF['app_achievements_path']."class/AchAchievement_class.php");
|
2012-08-20 13:52:35 +00:00
|
|
|
require_once($_CONF['app_achievements_path']."class/AchTask_class.php");
|
2012-06-25 19:16:42 +00:00
|
|
|
require_once($_CONF['app_achievements_path']."class/AchObjective_class.php");
|
|
|
|
|
2012-07-01 20:34:22 +00:00
|
|
|
class RUser {
|
2012-06-25 19:16:42 +00:00
|
|
|
function RUser() { }
|
|
|
|
|
|
|
|
function getLang() {
|
|
|
|
return $_REQUEST['lang'];
|
|
|
|
}
|
|
|
|
|
|
|
|
function getID() {
|
|
|
|
return 0;
|
|
|
|
}
|
2012-07-01 20:34:22 +00:00
|
|
|
|
|
|
|
function getCult() {
|
|
|
|
return "%";
|
|
|
|
}
|
|
|
|
|
|
|
|
function getCiv() {
|
|
|
|
return "%";
|
|
|
|
}
|
|
|
|
|
|
|
|
function getRace() {
|
|
|
|
return "%";
|
|
|
|
}
|
2012-06-25 19:16:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
$_USER = new RUser();
|
|
|
|
|
|
|
|
|
|
|
|
//create database connection
|
|
|
|
$DBc = new mySQL($_CONF['mysql_error']);
|
|
|
|
$DBc->connect($_CONF['mysql_server'],$_CONF['mysql_user'],$_CONF['mysql_pass'],$_CONF['mysql_database']);
|
|
|
|
|
|
|
|
echo '<?xml version="1.0" ?><ryzom_achievements>';
|
|
|
|
|
|
|
|
function print_cat(&$iter3) {
|
|
|
|
while($iter3->hasNext()) {
|
|
|
|
$curr3 = $iter3->getNext();
|
2012-07-01 20:34:22 +00:00
|
|
|
echo "<achievement id='".$curr3->getID()."' parent='".$curr3->getParentID()."' image='".$_CONF['image_url']."pic/icon/".$curr3->getImage()."'><name><![CDATA[".$curr3->getName()."]]></name><ties>";
|
2012-06-25 19:16:42 +00:00
|
|
|
if($curr3->getTieRace() != null) {
|
|
|
|
echo "<tie type='race'>".$curr3->getTieRace()."</tie>";
|
|
|
|
}
|
|
|
|
if($curr3->getTieCult() != null) {
|
|
|
|
echo "<tie type='cult'>".$curr3->getTieCult()."</tie>";
|
|
|
|
}
|
|
|
|
if($curr3->getTieCiv() != null) {
|
|
|
|
echo "<tie type='civilization'>".$curr3->getTieCiv()."</tie>";
|
|
|
|
}
|
2012-07-01 20:34:22 +00:00
|
|
|
echo "</ties>";
|
2012-06-25 19:16:42 +00:00
|
|
|
$iter4 = $curr3->getIterator();
|
|
|
|
while($iter4->hasNext()) {
|
|
|
|
$curr4 = $iter4->getNext();
|
2012-08-20 13:52:35 +00:00
|
|
|
echo "<task id='".$curr4->getID()."' parent='".$curr4->getParentID()."' value='".$curr4->getValue()."'><name><![CDATA[".$curr4->getDisplayName()."]]></name>";
|
2012-06-25 19:16:42 +00:00
|
|
|
$iter5 = $curr4->getIterator();
|
|
|
|
while($iter5->hasNext()) {
|
|
|
|
$curr5 = $iter5->getNext();
|
2012-07-01 20:34:22 +00:00
|
|
|
echo "<objective id='".$curr5->getID()."' type='".$curr5->getDisplay()."' value='".$curr5->getValue()."' meta='".$_CONF['image_url']."pic/icon/".$curr5->getMetaImage()."'><name><![CDATA[".$curr5->getDisplayName()."]]></name></objective>";
|
2012-06-25 19:16:42 +00:00
|
|
|
}
|
2012-08-20 13:52:35 +00:00
|
|
|
echo "</task>";
|
2012-06-25 19:16:42 +00:00
|
|
|
}
|
|
|
|
echo "</achievement>";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$menu = new AchMenu(0);
|
|
|
|
$menu->removeChild(0);
|
|
|
|
|
|
|
|
$iter = $menu->getIterator();
|
|
|
|
while($iter->hasNext()) {
|
|
|
|
$curr = $iter->getNext();
|
|
|
|
echo "<category id='".$curr->getID()."' order='".$curr->getOrder()."' image='".$_CONF['image_url']."pic/menu/".$curr->getImage()."'><name><![CDATA[".$curr->getName()."]]></name>";
|
|
|
|
$iter2 = $curr->getIterator();
|
|
|
|
while($iter2->hasNext()) {
|
|
|
|
$curr2 = $iter2->getNext();
|
|
|
|
echo "<category id='".$curr2->getID()."' order='".$curr2->getOrder()."' image='".$_CONF['image_url']."pic/menu/".$curr2->getImage()."'><name><![CDATA[".$curr2->getName()."]]></name>";
|
|
|
|
$cat = new AchCategory($curr2->getID(),null,null);
|
|
|
|
$iter3 = $cat->getIterator();
|
2012-07-01 20:34:22 +00:00
|
|
|
print_cat($iter3);
|
2012-06-25 19:16:42 +00:00
|
|
|
echo "</category>";
|
|
|
|
}
|
|
|
|
|
|
|
|
$cat = new AchCategory($curr->getID(),null,null);
|
|
|
|
$iter3 = $cat->getIterator();
|
2012-07-01 20:34:22 +00:00
|
|
|
print_cat($iter3);
|
2012-06-25 19:16:42 +00:00
|
|
|
echo "</category>";
|
|
|
|
}
|
|
|
|
|
|
|
|
echo "</ryzom_achievements>";
|
|
|
|
|
|
|
|
exit(0);
|
|
|
|
?>
|