From 24d386a9d2cd8d138e7cad4b8c3972f6031e0536 Mon Sep 17 00:00:00 2001 From: SirCotare Date: Tue, 7 Aug 2012 17:41:50 +0200 Subject: [PATCH] #1470 repo update to latest version (web app) --- .../_AchWebParser/AchWebParser.php | 101 +- .../_AchWebParser/class/Atom_class.php | 23 +- .../class/DataDispatcher_class.php | 1 - .../_AchWebParser/class/Entity_abstract.php | 13 + .../_AchWebParser/class/Logfile_class.php | 34 +- .../_AchWebParser/class/mySQL_class.php | 4 +- .../app_achievements/_AchWebParser/conf.php | 26 +- .../_AchWebParser/script/in_region_script.php | 128 +++ .../script/include_InPoly_class.php | 68 ++ .../PDRtoXMLdriver/PDRtoXMLdriver_class.php | 654 ++++++++++++- .../entity/FactionPoints_entity.php | 10 + .../PDRtoXMLdriver/entity/Fame_entity.php | 12 + .../PDRtoXMLdriver/entity/Gear_entity.php | 9 + .../PDRtoXMLdriver/entity/Item_entity.php | 28 + .../entity/LastLogStats_entity.php | 11 + .../entity/MissionList_entity.php | 9 + .../PDRtoXMLdriver/entity/Mission_entity.php | 11 + .../entity/PermanentMod_entity.php | 10 + .../PDRtoXMLdriver/entity/Pet_entity.php | 24 + .../entity/PhysCharacs_entity.php | 10 + .../entity/PhysScores_entity.php | 15 + .../PDRtoXMLdriver/entity/Position_entity.php | 12 + .../entity/SkillList_entity.php | 9 + .../entity/SkillPoints_entity.php | 10 + .../PDRtoXMLdriver/entity/Skill_entity.php | 14 + .../entity/SpentSkillPoints_entity.php | 10 + .../app/app_achievements/_doc/devshot_005.jpg | Bin 0 -> 33804 bytes .../class/AchAchievement_class.php | 4 + .../class/AchMenuNode_class.php | 4 + .../app_achievements/class/AchMenu_class.php | 4 +- .../class/AchObjective_class.php | 2 +- .../app_achievements/class/AchPerk_class.php | 4 + .../class/AchSummary_class.php | 2 +- code/web/app/app_achievements/conf.php | 4 + code/web/app/app_achievements/fb.php | 57 ++ code/web/app/app_achievements/fb/facebook.php | 93 ++ .../include/ach_render_ig.php | 4 +- .../include/ach_render_web.php | 33 +- code/web/app/app_achievements/index.php | 208 ++-- .../app/app_achievements/pic/f-connect.png | Bin 0 -> 4336 bytes .../app_achievements/pic/facebook-logo.png | Bin 0 -> 22766 bytes .../class/AdmAchievement_class.php | 61 +- .../class/AdmAtom_class.php | 272 +++++- .../class/AdmCategory_class.php | 51 +- .../class/AdmMenuNode_class.php | 15 +- .../class/AdmMenu_class.php | 56 +- .../class/AdmObjective_class.php | 63 +- .../class/AdmPerk_class.php | 100 +- .../class/CSRAchievement_class.php | 64 +- .../class/CSRCategory_class.php | 64 +- .../class/CSRObjective_class.php | 64 +- .../class/CSRPerk_class.php | 64 +- .../include/adm_render_ach.php | 170 ++-- .../include/adm_render_atom.php | 910 +++--------------- .../include/adm_render_lang.php | 193 ++++ .../include/adm_render_menu.php | 10 +- code/web/app/app_achievements_admin/index.php | 117 ++- 57 files changed, 2819 insertions(+), 1130 deletions(-) create mode 100644 code/web/app/app_achievements/_AchWebParser/class/Entity_abstract.php create mode 100644 code/web/app/app_achievements/_AchWebParser/script/in_region_script.php create mode 100644 code/web/app/app_achievements/_AchWebParser/script/include_InPoly_class.php create mode 100644 code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/FactionPoints_entity.php create mode 100644 code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Fame_entity.php create mode 100644 code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Gear_entity.php create mode 100644 code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Item_entity.php create mode 100644 code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/LastLogStats_entity.php create mode 100644 code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/MissionList_entity.php create mode 100644 code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Mission_entity.php create mode 100644 code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/PermanentMod_entity.php create mode 100644 code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Pet_entity.php create mode 100644 code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/PhysCharacs_entity.php create mode 100644 code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/PhysScores_entity.php create mode 100644 code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Position_entity.php create mode 100644 code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/SkillList_entity.php create mode 100644 code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/SkillPoints_entity.php create mode 100644 code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Skill_entity.php create mode 100644 code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/SpentSkillPoints_entity.php create mode 100644 code/web/app/app_achievements/_doc/devshot_005.jpg create mode 100644 code/web/app/app_achievements/fb.php create mode 100644 code/web/app/app_achievements/fb/facebook.php create mode 100644 code/web/app/app_achievements/pic/f-connect.png create mode 100644 code/web/app/app_achievements/pic/facebook-logo.png create mode 100644 code/web/app/app_achievements_admin/include/adm_render_lang.php diff --git a/code/web/app/app_achievements/_AchWebParser/AchWebParser.php b/code/web/app/app_achievements/_AchWebParser/AchWebParser.php index 0d02dcc70..3394635f3 100644 --- a/code/web/app/app_achievements/_AchWebParser/AchWebParser.php +++ b/code/web/app/app_achievements/_AchWebParser/AchWebParser.php @@ -9,39 +9,34 @@ require_once("class/mySQL_class.php"); require_once("conf.php"); require_once("include/functions_inc.php"); + require_once("class/Entity_abstract.php"); - $_REQUEST['file'] = $argv[1]; + if(!$_REQUEST['file']) { + $_REQUEST['file'] = $argv[1]; + } - - /*$logfile = false; + $log = new Logfile(); if($CONF['logging'] == true) { require_once("class/Logfile_class.php"); - #$logfile = fopen($CONF['logfile'].'.'.date("Ymd",time()).'.txt','a'); - $logfile = new Logfile($CONF['logfile']);#!! MUST HAVE ONE LOGFILE PER RUN!! - }*/ + $log = new Logfile($CONF['logfile']); + } - //set mode: cron || single with given cid - #MISSING: conf to allow external calls; whitelist ips - /*$MODE = "CRON"; - if($_REQUEST["cid"] > 0 || $_REQUEST["invoke"] == "TRUE") { - if($_REQUEST["cid"] > 0 && $_REQUEST["invoke"] == "TRUE") { - $MODE = "SINGLE"; - $CID = $DBc->mre($_REQUEST["cid"]); - } - else { - $e = "Failed to start SINGLE mode; cid=".$_REQUEST["cid"]; - logf($e); - die($e); - } - }*/ + $log->logf("File: '".$_REQUEST['file']."'"); + + $log->logf("Starting up... ",false); + + if(!$_REQUEST['file']) { + $log->logf("ERROR: no file given! EXITING!"); + die(); + } //create database connection $DBc = new mySQL($CONF['mysql_error']); $DBc->connect($CONF['mysql_server'],$CONF['mysql_user'],$CONF['mysql_pass'],$CONF['mysql_database']); - #if($MODE == "CRON") { - # $RID = $DBc->sendSQL("INSERT INTO ach_monitor_state (ams_start,ams_end) VALUES ('".time()."','0')","INSERT"); // insert run into monitoring table - #} + $DBc_char = new mySQL($_CONF['mysql_error']); + $DBc_char->connect($CONF['char_mysql_server'],$CONF['char_mysql_user'],$CONF['char_mysql_pass'],$CONF['char_mysql_database']); + require_once("class/DataDispatcher_class.php"); require_once("class/DataSourceHandler_class.php"); @@ -50,11 +45,8 @@ require_once("class/ValueCache_class.php"); require_once("class/Atom_class.php"); - #MISSING: static ValueCache! - $_CACHE = new ValueCache(); - //create datasource handler $_DISPATCHER = new DataDispatcher(); $_DATASOURCE = new DataSourceHandler(); @@ -64,87 +56,98 @@ $_DATASOURCE->addSource($tmp); } - // fetch candidates - /*if($MODE == "SINGLE") { - $chars = array(); - $chars[] = array('amc_character',$CID); - } - else { - #$chars = array(); - - $DBc->sendSQL("UPDATE ach_monitor_character SET amc_working='0' WHERE amc_last_import<'".(time()-60*60)."'"); // unlock if something went wrong - - $DBc->sendSQL("UPDATE ach_monitor_character SET amc_working='".$RID."' WHERE amc_last_login>amc_last_import AND amc_working='0'","NONE"); - - $chars = $DBc->sendSQL("SELECT amc_character FROM ach_monitor_character WHERE amc_working='".$RID."'","ARRAY"); - }*/ + #REPLACE WITH REGEX!!! $tmp = explode("/",$_REQUEST['file']); $tmp2 = explode("_",$tmp[(sizeof($tmp)-1)]); $chars = array(($tmp2[1]*16+$tmp2[2])); + + $log->logf(" done!"); foreach($chars as $cid) { #STEP 1: load and register atoms + $log->logf("Processing char '".$cid."' ..."); + + $log->logi("Loading and registering Atoms... ",false); + $atom_list = array(); $res = $DBc->sendSQL("SELECT ap_id FROM ach_perk WHERE NOT EXISTS (SELECT * FROM ach_player_perk WHERE app_player='".$cid."' AND app_perk=ap_id)","ARRAY"); foreach($res as $perk) { //get unfinished atoms belonging to unfinished objectives - $res2 = $DBc->sendSQL("SELECT ach_atom.* FROM ach_atom,ach_objective WHERE ao_perk='".$perk['ap_id']."' AND ao_id=atom_objective AND NOT EXISTS (SELECT * FROM ach_player_objective WHERE apo_player='".$cid."' AND apo_objective=ao_id)","ARRAY"); + $res2 = $DBc->sendSQL("SELECT ach_atom.* FROM ach_atom,ach_objective,ach_achievement WHERE ao_perk='".$perk['ap_id']."' AND ao_id=atom_objective AND ap_achievement=aa_id AND NOT EXISTS (SELECT * FROM ach_player_objective WHERE apo_player='".$cid."' AND apo_objective=ao_id) AND (aa_tie_race IS NULL OR aa_tie_race='') AND (aa_tie_cult IS NULL OR aa_tie_cult='') AND (aa_tie_civ IS NULL OR aa_tie_civ='')","ARRAY"); foreach($res2 as $atom) { $a = new Atom($atom,$cid); $atom_list[] = $a; $a->register(); } } + + $log->logf("done!"); + + $log->logi("Driving data... ",false); #STEP 2: drive data $_CACHE->setChar($cid); $_DATASOURCE->drive($cid); + $log->logf("done!"); + #STEP 3: detect obj/perk progression + $log->logi("Detecting Objectives... ",false); //obj - $res = $DBc->sendSQL("SELECT ao_id FROM ach_objective WHERE ao_condition='all' AND NOT EXISTS (SELECT * FROM ach_player_objective WHERE apo_objective=ao_id AND apo_player='".$cid."') AND NOT EXISTS (SELECT * FROM ach_atom WHERE atom_objective=ao_id AND EXISTS (SELECT * FROM ach_player_atom WHERE apa_atom=atom_id AND apa_state!='GRANT' AND apa_player='".$cid."'))","ARRAY"); + $res = $DBc->sendSQL("SELECT ao_id FROM ach_objective WHERE ao_condition='all' AND NOT EXISTS (SELECT * FROM ach_player_objective WHERE apo_objective=ao_id AND apo_player='".$cid."') AND NOT EXISTS (SELECT * FROM ach_atom WHERE atom_objective=ao_id AND NOT EXISTS (SELECT * FROM ach_player_atom WHERE apa_atom=atom_id AND apa_state='GRANT' AND apa_player='".$cid."')) AND EXISTS (SELECT * FROM ach_atom WHERE atom_objective=ao_id)","ARRAY"); $sz = sizeof($res); for($i=0;$i<$sz;$i++) { $DBc->sendSQL("INSERT INTO ach_player_objective (apo_objective,apo_player,apo_date) VALUES ('".$res[$i]['ao_id']."','".$cid."','".time()."')","NONE"); } - $res = $DBc->sendSQL("SELECT ao_id FROM ach_objective WHERE ao_condition='value' AND NOT EXISTS (SELECT * FROM ach_player_objective WHERE apo_objective=ao_id AND apo_player='".$cid."') AND ao_value<=(SELECT count(*) FROM ach_atom WHERE atom_objective=ao_id AND EXISTS (SELECT * FROM ach_player_atom WHERE apa_atom=atom_id AND apa_state='GRANT' AND apa_player='".$cid."'))","ARRAY"); + $res = $DBc->sendSQL("SELECT ao_id FROM ach_objective WHERE ao_condition='value' AND NOT EXISTS (SELECT * FROM ach_player_objective WHERE apo_objective=ao_id AND apo_player='".$cid."') AND ao_value<=(SELECT sum(apa_value) FROM ach_atom,ach_player_atom WHERE atom_objective=ao_id AND apa_atom=atom_id AND apa_state='GRANT' AND apa_player='".$cid."') AND EXISTS (SELECT * FROM ach_atom WHERE atom_objective=ao_id)","ARRAY"); $sz = sizeof($res); for($i=0;$i<$sz;$i++) { $DBc->sendSQL("INSERT INTO ach_player_objective (apo_objective,apo_player,apo_date) VALUES ('".$res[$i]['ao_id']."','".$cid."','".time()."')","NONE"); } - $res = $DBc->sendSQL("SELECT ao_id FROM ach_objective WHERE ao_condition='any' AND NOT EXISTS (SELECT * FROM ach_player_objective WHERE apo_objective=ao_id AND apo_player='".$cid."') AND EXISTS (SELECT * FROM ach_atom WHERE atom_objective=ao_id AND EXISTS (SELECT * FROM ach_player_atom WHERE apa_atom=atom_id AND apa_state='GRANT' AND apa_player='".$cid."'))","ARRAY"); + $res = $DBc->sendSQL("SELECT ao_id FROM ach_objective WHERE ao_condition='any' AND NOT EXISTS (SELECT * FROM ach_player_objective WHERE apo_objective=ao_id AND apo_player='".$cid."') AND EXISTS (SELECT * FROM ach_atom WHERE atom_objective=ao_id AND EXISTS (SELECT * FROM ach_player_atom WHERE apa_atom=atom_id AND apa_state='GRANT' AND apa_player='".$cid."')) AND EXISTS (SELECT * FROM ach_atom WHERE atom_objective=ao_id)","ARRAY"); $sz = sizeof($res); for($i=0;$i<$sz;$i++) { $DBc->sendSQL("INSERT INTO ach_player_objective (apo_objective,apo_player,apo_date) VALUES ('".$res[$i]['ao_id']."','".$cid."','".time()."')","NONE"); } + $log->logf("done!"); + $log->logi("Clearing atom data... ",false); + + //clear atom state for completed objectives + $DBc->sendSQL("DELETE FROM ach_player_atom WHERE EXISTS (SELECT * FROM ach_player_objective,ach_atom WHERE atom_id=apa_atom AND apa_player='".$cid."' AND atom_objective=ao_id)"); + + $log->logf("done!"); + //perk - $res = $DBc->sendSQL("SELECT ap_id FROM ach_perk WHERE ap_condition='all' AND NOT EXISTS (SELECT * FROM ach_player_perk WHERE app_perk=ap_id AND app_player='".$cid."') AND NOT EXISTS (SELECT * FROM ach_objective WHERE ao_perk=ap_id AND NOT EXISTS (SELECT * FROM ach_player_objective WHERE apo_objective=ao_id AND apo_player='".$cid."'))","ARRAY"); + $log->logi("Detecting Perks... ",false); + $res = $DBc->sendSQL("SELECT ap_id FROM ach_perk WHERE ap_condition='all' AND NOT EXISTS (SELECT * FROM ach_player_perk WHERE app_perk=ap_id AND app_player='".$cid."') AND NOT EXISTS (SELECT * FROM ach_objective WHERE ao_perk=ap_id AND NOT EXISTS (SELECT * FROM ach_player_objective WHERE apo_objective=ao_id AND apo_player='".$cid."')) AND EXISTS (SELECT * FROM ach_objective WHERE ao_perk=ap_id) AND ap_dev='0'","ARRAY"); $sz = sizeof($res); for($i=0;$i<$sz;$i++) { $DBc->sendSQL("INSERT INTO ach_player_perk (app_perk,app_player,app_date) VALUES ('".$res[$i]['ap_id']."','".$cid."','".time()."')","NONE"); } - $res = $DBc->sendSQL("SELECT ap_id FROM ach_perk WHERE ap_condition='value' AND NOT EXISTS (SELECT * FROM ach_player_perk WHERE app_perk=ap_id AND app_player='".$cid."') AND ap_value<=(SELECT count(*) FROM ach_objective WHERE ao_perk=ap_id AND EXISTS (SELECT * FROM ach_player_objective WHERE apo_objective=ao_id AND apo_player='".$cid."'))","ARRAY"); + $res = $DBc->sendSQL("SELECT ap_id FROM ach_perk WHERE ap_condition='value' AND NOT EXISTS (SELECT * FROM ach_player_perk WHERE app_perk=ap_id AND app_player='".$cid."') AND ap_value<=(SELECT count(*) FROM ach_objective WHERE ao_perk=ap_id AND EXISTS (SELECT * FROM ach_player_objective WHERE apo_objective=ao_id AND apo_player='".$cid."')) AND EXISTS (SELECT * FROM ach_objective WHERE ao_perk=ap_id) AND ap_dev='0'","ARRAY"); $sz = sizeof($res); for($i=0;$i<$sz;$i++) { $DBc->sendSQL("INSERT INTO ach_player_perk (app_perk,app_player,app_date) VALUES ('".$res[$i]['ap_id']."','".$cid."','".time()."')","NONE"); } - $res = $DBc->sendSQL("SELECT ap_id FROM ach_perk WHERE ap_condition='any' AND NOT EXISTS (SELECT * FROM ach_player_perk WHERE app_perk=ap_id AND app_player='".$cid."') AND EXISTS (SELECT * FROM ach_objective WHERE ao_perk=ap_id AND EXISTS (SELECT * FROM ach_player_objective WHERE apo_objective=ao_id AND apo_player='".$cid."'))","ARRAY"); + $res = $DBc->sendSQL("SELECT ap_id FROM ach_perk WHERE ap_condition='any' AND NOT EXISTS (SELECT * FROM ach_player_perk WHERE app_perk=ap_id AND app_player='".$cid."') AND EXISTS (SELECT * FROM ach_objective WHERE ao_perk=ap_id AND EXISTS (SELECT * FROM ach_player_objective WHERE apo_objective=ao_id AND apo_player='".$cid."')) AND EXISTS (SELECT * FROM ach_objective WHERE ao_perk=ap_id) AND ap_dev='0'","ARRAY"); $sz = sizeof($res); for($i=0;$i<$sz;$i++) { $DBc->sendSQL("INSERT INTO ach_player_perk (app_perk,app_player,app_date) VALUES ('".$res[$i]['ap_id']."','".$cid."','".time()."')","NONE"); } + + $log->logf("done!"); } - - + $log->logf("Run complete; exiting..."); + exit(0); ?> \ No newline at end of file diff --git a/code/web/app/app_achievements/_AchWebParser/class/Atom_class.php b/code/web/app/app_achievements/_AchWebParser/class/Atom_class.php index 700475e45..9e9bc30ab 100644 --- a/code/web/app/app_achievements/_AchWebParser/class/Atom_class.php +++ b/code/web/app/app_achievements/_AchWebParser/class/Atom_class.php @@ -17,7 +17,7 @@ function register() { global $DBc,$_DATA; - echo "register
"; + #echo "register
"; try { return eval($this->ruleset); @@ -40,18 +40,29 @@ $_DISPATCHER->unregisterValue($name,$callback); } - function grant() { + function registerEntity($name,$func) { + global $_DISPATCHER; + + $tmp = new Callback($this,$func); + $_DISPATCHER->registerEntity($name,$tmp); + } + + function unregisterEntity($name,$callback) { + global $_DISPATCHER; + + $_DISPATCHER->unregisterEntity($name,$callback); + } + + function grant($count = 1) { global $DBc; - echo "G
"; - - $DBc->sendSQL("INSERT INTO ach_player_atom (apa_atom,apa_player,apa_date,apa_expire,apa_state) VALUES ('".$this->id."','".$this->user."','".time()."',null,'GRANT')","NONE"); + $DBc->sendSQL("INSERT INTO ach_player_atom (apa_atom,apa_player,apa_date,apa_expire,apa_state,apa_value) VALUES ('".$this->id."','".$this->user."','".time()."',null,'GRANT','".$count."')","NONE"); } function deny() { global $DBc; - $DBc->sendSQL("INSERT INTO ach_player_atom (apa_atom,apa_player,apa_date,apa_expire,apa_state) VALUES ('".$this->id."','".$this->user."','".time()."',null,'DENY')","NONE"); + $DBc->sendSQL("INSERT INTO ach_player_atom (apa_atom,apa_player,apa_date,apa_expire,apa_state) VALUES ('".$this->id."','".$this->user."','".time()."',null,'DENY','1')","NONE"); } function reset_() { diff --git a/code/web/app/app_achievements/_AchWebParser/class/DataDispatcher_class.php b/code/web/app/app_achievements/_AchWebParser/class/DataDispatcher_class.php index b20239821..2ee25d979 100644 --- a/code/web/app/app_achievements/_AchWebParser/class/DataDispatcher_class.php +++ b/code/web/app/app_achievements/_AchWebParser/class/DataDispatcher_class.php @@ -53,7 +53,6 @@ } function dispatchValue($key,$val) { - echo "dispatching: $key=>$val
"; if(is_array($this->value[$key])) { foreach($this->value[$key] as $callback) { $callback->call($val); diff --git a/code/web/app/app_achievements/_AchWebParser/class/Entity_abstract.php b/code/web/app/app_achievements/_AchWebParser/class/Entity_abstract.php new file mode 100644 index 000000000..e7322444a --- /dev/null +++ b/code/web/app/app_achievements/_AchWebParser/class/Entity_abstract.php @@ -0,0 +1,13 @@ +name; + } + + function setName($n) { + $this->name = $n; + } + } +?> \ No newline at end of file diff --git a/code/web/app/app_achievements/_AchWebParser/class/Logfile_class.php b/code/web/app/app_achievements/_AchWebParser/class/Logfile_class.php index 58254ff3c..aab4cb01c 100644 --- a/code/web/app/app_achievements/_AchWebParser/class/Logfile_class.php +++ b/code/web/app/app_achievements/_AchWebParser/class/Logfile_class.php @@ -3,20 +3,34 @@ private $logfile; private $buffer; - function Logfile($f) { - $this->logfile = $f; - $this->buffer = ""; + function Logfile($f = false) { + $this->logfile = false; + + if($f != false) { + $this->logfile = fopen($this->logfile.'.'.$_REQUEST['file'].'.'.date("Ymd",time()).'.txt','a');; + } } - function append($t) { - $this->buffer .= $t; + function logf($t,$nl = true) { + $this->write($t); + if($nl == true) { + $this->write("\n"); + } } - function write() { - $f = fopen($this->logfile.'.'.date("Ymd",time()).'.txt','a'); - fwrite($f,$this->buffer); - fclose($f); - $this->buffer = ""; + function logi($t,$nl = true) { + $this->write(" > ".$t); + if($nl == true) { + $this->write("\n"); + } + } + + function write($txt) { + fwrite($this->logfile,$txt); + } + + function close() { + fclose($this->logfile); } } ?> \ No newline at end of file diff --git a/code/web/app/app_achievements/_AchWebParser/class/mySQL_class.php b/code/web/app/app_achievements/_AchWebParser/class/mySQL_class.php index dba981254..5aca70da4 100644 --- a/code/web/app/app_achievements/_AchWebParser/class/mySQL_class.php +++ b/code/web/app/app_achievements/_AchWebParser/class/mySQL_class.php @@ -132,6 +132,8 @@ } private function error($error,$query = false) { + global $log; + $this->DBstats['error']++; if($query != false) { @@ -149,7 +151,7 @@ echo ""; break; case 'LOG': - logf("MySQL ERROR: ".$error); + $log->logf("MySQL ERROR: ".$error); break; default: flush(); diff --git a/code/web/app/app_achievements/_AchWebParser/conf.php b/code/web/app/app_achievements/_AchWebParser/conf.php index 5cf0e27ff..dc5286fd1 100644 --- a/code/web/app/app_achievements/_AchWebParser/conf.php +++ b/code/web/app/app_achievements/_AchWebParser/conf.php @@ -1,31 +1,21 @@ \ No newline at end of file diff --git a/code/web/app/app_achievements/_AchWebParser/script/in_region_script.php b/code/web/app/app_achievements/_AchWebParser/script/in_region_script.php new file mode 100644 index 000000000..282670c79 --- /dev/null +++ b/code/web/app/app_achievements/_AchWebParser/script/in_region_script.php @@ -0,0 +1,128 @@ +sendSQL("SELECT c_pos_x,c_pos_y FROM ryzom_character WHERE c_xmlid='".$xmlid."'","ARRAY"); + #$points[] = floor($comp[0]['c_pos_x'])." ".floor($comp[0]['c_pos_y']); + $points[] = floor($pos->x/1000)." ".floor($pos->y/1000); + + $pointLocation = new pointLocation(); + + foreach($points as $point) { + if($pointLocation->pointInPolygon($point, $region[$where], false) != "outside") { + return true; + } + } + + echo "false"; + + return false; + } + } +?> \ No newline at end of file diff --git a/code/web/app/app_achievements/_AchWebParser/script/include_InPoly_class.php b/code/web/app/app_achievements/_AchWebParser/script/include_InPoly_class.php new file mode 100644 index 000000000..491fa11bb --- /dev/null +++ b/code/web/app/app_achievements/_AchWebParser/script/include_InPoly_class.php @@ -0,0 +1,68 @@ +pointOnVertex = $pointOnVertex; + + // Transform string coordinates into arrays with x and y values + $point = $this->pointStringToCoordinates($point); + $vertices = array(); + foreach($polygon as $vertex) { + $vertices[] = $this->pointStringToCoordinates($vertex); + } + + // Check if the point sits exactly on a vertex + if($this->pointOnVertex == true and $this->pointOnVertex($point, $vertices) == true) { + return "vertex"; + } + + // Check if the point is inside the polygon or on the boundary + $intersections = 0; + $vertices_count = count($vertices); + + for($i=1; $i < $vertices_count; $i++) { + $vertex1 = $vertices[$i-1]; + $vertex2 = $vertices[$i]; + if($vertex1['y'] == $vertex2['y'] and $vertex1['y'] == $point['y'] and $point['x'] > min($vertex1['x'], $vertex2['x']) and $point['x'] < max($vertex1['x'], $vertex2['x'])) { // Check if point is on an horizontal polygon boundary + return "boundary"; + } + if($point['y'] > min($vertex1['y'], $vertex2['y']) and $point['y'] <= max($vertex1['y'], $vertex2['y']) and $point['x'] <= max($vertex1['x'], $vertex2['x']) and $vertex1['y'] != $vertex2['y']) { + $xinters = ($point['y'] - $vertex1['y']) * ($vertex2['x'] - $vertex1['x']) / ($vertex2['y'] - $vertex1['y']) + $vertex1['x']; + if($xinters == $point['x']) { // Check if point is on the polygon boundary (other than horizontal) + return "boundary"; + } + if($vertex1['x'] == $vertex2['x'] || $point['x'] <= $xinters) { + $intersections++; + } + } + } + // If the number of edges we passed through is even, then it's in the polygon. + if ($intersections % 2 != 0) { + return "inside"; + } + else { + return "outside"; + } + } + + function pointOnVertex($point, $vertices) { + foreach($vertices as $vertex) { + if ($point == $vertex) { + return true; + } + } + + } + + function pointStringToCoordinates($pointString) { + $coordinates = explode(" ", $pointString); + return array("x" => $coordinates[0], "y" => $coordinates[1]); + } + } +?> \ No newline at end of file diff --git a/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/PDRtoXMLdriver_class.php b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/PDRtoXMLdriver_class.php index 60241dca2..b48da1c0d 100644 --- a/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/PDRtoXMLdriver_class.php +++ b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/PDRtoXMLdriver_class.php @@ -1,9 +1,34 @@ lock = 0; + $this->open = null; + $this->entity = null; + $this->inv = null; + $this->iblock = false; + $this->gear = new Gear(); + $this->skills = new SkillList(); + $this->mission = new MissionList(); + + //these nodes are ignored, but children are processed $this->ignore = array(); $this->ignore[] = "XML"; $this->ignore[] = "ENTITYBASE"; $this->ignore[] = "NORMALPOSITIONS"; $this->ignore[] = "_VEC"; $this->ignore[] = "SESSIONID"; - $this->ignore[] = "POSSTATE"; + #$this->ignore[] = "POSSTATE"; $this->ignore[] = "_PLAYERROOM"; $this->ignore[] = "_INVENTORYID"; $this->ignore[] = "_PHYSCHARACS"; $this->ignore[] = "_PHYSSCORES"; $this->ignore[] = "_SKILLS"; $this->ignore[] = "_FAMES"; - + + //these nodes are ignored, as well as their children $this->ignore_block = array(); $this->ignore_block[] = "_MEMORIZEDPHRASES"; $this->ignore_block[] = "_FORBIDPOWERDATES"; @@ -45,7 +80,7 @@ } function drive($cid) { - global $CONF; + global $CONF,$_DISPATCHER; echo "kk"; @@ -64,6 +99,10 @@ echo "error"; } xml_parser_free($xml_parser); + + $_DISPATCHER->dispatchEntity($this->gear->getName(),$this->gear); + $_DISPATCHER->dispatchEntity($this->skills->getName(),$this->skills); + $_DISPATCHER->dispatchEntity($this->skills->mission(),$this->mission); } function startElement($parser, $name, $attrs) { @@ -81,17 +120,624 @@ $this->lock = 1; return null; } + + /* faction points */ + if($name == "FACTIONPOINTS") { + $this->open = "FACTIONPOINTS"; + return null; + } + + if($this->open == "FACTIONPOINTS") { + if($name == "__KEY__") { + $this->entity = new FactionPoints(); + $this->entity->faction = $attrs["VALUE"]; + return null; + } + + if($name == "__VAL__") { + $this->entity->value = $attrs["VALUE"]; + $_DISPATCHER->dispatchEntity($this->entity->getName(),$this->entity); + $this->entity = null; + return null; + } + + return null; + } + + /* Fame */ + if($name == "_FAME") { + $this->open = "_FAME"; + return null; + } + + if($this->open == "_FAME") { + if($name == "__KEY__") { + $this->entity = new Fame(); + $this->entity->faction = $attrs["VALUE"]; + return null; + } + + if($name == "FAME") { + $this->entity->fame = $attrs["VALUE"]; + return null; + } + if($name == "FAMEMEMORY") { + $this->entity->famememory = $attrs["VALUE"]; + return null; + } + if($name == "LASTFAMECHANGETREND") { + $this->entity->lastfamechangetrend = $attrs["VALUE"]; + return null; + } + + return null; + } + + /* last log stats */ + if($name == "_LASTLOGSTATS") { + $this->open = "_LASTLOGSTATS"; + $this->entity = new LastLogStats(); + return null; + } + + if($this->open == "_LASTLOGSTATS") { + if($name == "LOGINTIME") { + $this->entity->logintime = $attrs["VALUE"]; + return null; + } + if($name == "DURATION") { + $this->entity->duration = $attrs["VALUE"]; + return null; + } + if($name == "LOGOFFTIME") { + $this->entity->logofftime = $attrs["VALUE"]; + return null; + } + + return null; + } + + /* mission */ + if($name == "_MISSIONHISTORIES") { + $this->open = "_MISSIONHISTORIES"; + return null; + } + + if($this->open == "_MISSIONHISTORIES") { + if($name == "__KEY__") { + $this->entity = new Mission(); + $this->entity->mission = $attrs["VALUE"]; + return null; + } + + if($name == "SUCCESSFULL") { + $this->entity->successfull = $attrs["VALUE"]; + return null; + } + if($name == "UTC_LASTSUCCESSDATE") { + $this->entity->utc_lastsuccessdate = $attrs["VALUE"]; + return null; + } + + return null; + } + + /* permanent mod */ + if($name == "SCOREPERMANENTMODIFIERS") { + $this->open = "SCOREPERMANENTMODIFIERS"; + return null; + } + + if($this->open == "SCOREPERMANENTMODIFIERS") { + if($name == "__KEY__") { + $this->entity = new PermanentMod(); + $this->entity->score = $attrs["VALUE"]; + return null; + } + + if($name == "__VAL__") { + $this->entity->value = $attrs["VALUE"]; + $_DISPATCHER->dispatchEntity($this->entity->getName(),$this->entity); + $this->entity = null; + return null; + } + + return null; + } + + /* pet */ + if($name == "_PLAYERPETS") { + $this->open = "_PLAYERPETS"; + return null; + } + + if($this->open == "_PLAYERPETS") { + if($name == "__KEY__") { + $this->entity = new Pet(); + $this->entity->pet = $attrs["VALUE"]; + return null; + } + + if($name == "TICKETPETSHEETID") { + $this->entity->ticketpetsheetid = $attrs["VALUE"]; + return null; + } + if($name == "PETSHEETID") { + $this->entity->petsheetid = $attrs["VALUE"]; + return null; + } + if($name == "PRICE") { + $this->entity->price = $attrs["VALUE"]; + return null; + } + if($name == "OWNERID") { + $this->entity->ownerid = $attrs["VALUE"]; + return null; + } + if($name == "STABLEALIAS") { + $this->entity->stablealias = $attrs["VALUE"]; + return null; + } + if($name == "LANDSCAPE_X") { + $this->entity->landscape_x = $attrs["VALUE"]; + return null; + } + if($name == "LANDSCAPE_Y") { + $this->entity->landscape_y = $attrs["VALUE"]; + return null; + } + if($name == "LANDSCAPE_Z") { + $this->entity->landscape_z = $attrs["VALUE"]; + return null; + } + if($name == "UTC_DEATHTICK") { + $this->entity->utc_deathtick = $attrs["VALUE"]; + return null; + } + if($name == "PETSTATUS") { + $this->entity->petstatus = $attrs["VALUE"]; + return null; + } + if($name == "SLOT") { + $this->entity->slot = $attrs["VALUE"]; + return null; + } + if($name == "ISTPALLOWED") { + $this->entity->istpallowed = $attrs["VALUE"]; + return null; + } + if($name == "SATIETY") { + $this->entity->satiety = $attrs["VALUE"]; + return null; + } + if($name == "CUSTOMNAME") { + $this->entity->customname = $attrs["VALUE"]; + return null; + } + + return null; + } + + /* physical characteristics */ + if($name == "_PHYSICALCHARACTERISTICS") { + $this->open = "_PHYSICALCHARACTERISTICS"; + return null; + } + + if($this->open == "_PHYSICALCHARACTERISTICS") { + if($name == "__KEY__") { + $this->entity = new PhysCharacs(); + $this->entity->charac = $attrs["VALUE"]; + return null; + } + + if($name == "__VAL__") { + $this->entity->value = $attrs["VALUE"]; + $_DISPATCHER->dispatchEntity($this->entity->getName(),$this->entity); + $this->entity = null; + return null; + } + + return null; + } + + /* physical scores */ + if($name == "PHYSICALSCORES") { + $this->open = "PHYSICALSCORES"; + return null; + } + + if($this->open == "PHYSICALSCORES") { + if($name == "__KEY__") { + $this->entity = new PhysScores(); + $this->entity->score = $attrs["VALUE"]; + return null; + } + + if($name == "CURRENT") { + $this->entity->current = $attrs["VALUE"]; + return null; + } + if($name == "BASE") { + $this->entity->base = $attrs["VALUE"]; + return null; + } + if($name == "MAX") { + $this->entity->max = $attrs["VALUE"]; + return null; + } + if($name == "BASEREGENERATEREPOS") { + $this->entity->baseregeneraterepos = $attrs["VALUE"]; + return null; + } + if($name == "BASEREGENERATEACTION") { + $this->entity->baseregenerateaction = $attrs["VALUE"]; + return null; + } + if($name == "CURRENTREGENERATE") { + $this->entity->currentregenerate = $attrs["VALUE"]; + return null; + } + + return null; + } + + /* skill points */ + if($name == "SKILLPOINTS") { + $this->open = "SKILLPOINTS"; + return null; + } + + if($this->open == "SKILLPOINTS") { + if($name == "__KEY__") { + $this->entity = new SkillPoints(); + $this->entity->skill = $attrs["VALUE"]; + return null; + } + + if($name == "__VAL__") { + $this->entity->value = $attrs["VALUE"]; + $_DISPATCHER->dispatchEntity($this->entity->getName(),$this->entity); + $this->entity = null; + return null; + } + + return null; + } + + /* spent skill points */ + if($name == "SPENTSKILLPOINTS") { + $this->open = "SPENTSKILLPOINTS"; + return null; + } + + if($this->open == "SPENTSKILLPOINTS") { + if($name == "__KEY__") { + $this->entity = new SpentSkillPoints(); + $this->entity->skill = $attrs["VALUE"]; + return null; + } + + if($name == "__VAL__") { + $this->entity->value = $attrs["VALUE"]; + $_DISPATCHER->dispatchEntity($this->entity->getName(),$this->entity); + $this->entity = null; + return null; + } + + return null; + } + + /* skills */ + if($name == "SKILLS") { + $this->open = "SKILLS"; + return null; + } + + if($this->open == "SKILLS") { + if($name == "__KEY__") { + $this->entity = new Skills(); + $this->entity->skill = $attrs["VALUE"]; + return null; + } + + if($name == "BASE") { + $this->entity->base = $attrs["VALUE"]; + return null; + } + if($name == "CURRENT") { + $this->entity->current = $attrs["VALUE"]; + return null; + } + if($name == "MAXLVLREACHED") { + $this->entity->maxlvlreached = $attrs["VALUE"]; + return null; + } + if($name == "XP") { + $this->entity->xp = $attrs["VALUE"]; + return null; + } + if($name == "XPNEXTLVL") { + $this->entity->xpnextlvl = $attrs["VALUE"]; + return null; + } + + return null; + } + + /* Position */ + if($name == "POSSTATE") { + $this->open = "POSSTATE"; + $this->entity = new Position(); + return null; + } + + if($this->open == "POSSTATE") { + if($name == "X") { + $this->entity->x = $attrs["VALUE"]; + return null; + } + if($name == "Y") { + $this->entity->y = $attrs["VALUE"]; + return null; + } + if($name == "Z") { + $this->entity->z = $attrs["VALUE"]; + return null; + } + if($name == "HEADING") { + $this->entity->heading = $attrs["VALUE"]; + return null; + } + + return null; + } + + /* items */ + + if($name == "ROOMINVENTORY") { + $this->inv = "room"; + return null; + } + + if($name == "INVENTORY") { + $this->iblock = true; + return null; + } + + if($this->iblock == true) { + if($name == "__KEY__") { + $this->inv = $attrs["VALUE"]; + } + if($name == "__VAL__") { + return null; + } + } + + if($name == "_ITEMS" || $name == "_ITEM") { + $this->open = "_ITEM"; + $this->entity = new Item(); + $this->entity->inventory = $this->inv; + return null; + } + + if($this->open == "_ITEM") { + if($name == "_CRAFTPARAMETERS") { + $this->icraft = true; + return null; + } + + if($this->icraft == true) { + $this->entity->_craftparameters[strtolower($name)] = $attrs["VALUE"]; + return null; + } + + if($name == "_ITEMID") { + $this->entity->_itemid = $attrs["VALUE"]; + return null; + } + if($name == "_SHEETID") { + $this->entity->_sheetid = $attrs["VALUE"]; + return null; + } + if($name == "_LOCSLOT") { + $this->entity->_locslot = $attrs["VALUE"]; + return null; + } + if($name == "_HP") { + $this->entity->_hp = $attrs["VALUE"]; + return null; + } + if($name == "_RECOMMENDED") { + $this->entity->_recommended = $attrs["VALUE"]; + return null; + } + if($name == "_CREATORID") { + $this->entity->_creatorid = $attrs["VALUE"]; + return null; + } + if($name == "_PHRASEID") { + $this->entity->_phraseid = $attrs["VALUE"]; + return null; + } + if($name == "_REFINVENTORYSLOT") { + $this->entity->_refinventoryslot = $attrs["VALUE"]; + return null; + } + if($name == "REFINVENTORYID") { + $this->entity->refinventoryid = $attrs["VALUE"]; + return null; + } + if($name == "_USENEWSYSTEMREQUIREMENT") { + $this->entity->_usenewsystemrequirement = $attrs["VALUE"]; + return null; + } + if($name == "_REQUIREDSKILLLEVEL") { + $this->entity->_requiredskilllevel = $attrs["VALUE"]; + return null; + } + if($name == "_CUSTOMTEXT") { + $this->entity->_customtext = $attrs["VALUE"]; + return null; + } + if($name == "_LOCKEDBYOWNER") { + $this->entity->_lockedbyowner = $attrs["VALUE"]; + return null; + } + if($name == "_DROPABLE") { + $this->entity->_dropable = $attrs["VALUE"]; + return null; + } + if($name == "STACKSIZE") { + $this->entity->stacksize = $attrs["VALUE"]; + return null; + } + } + + + + if($attrs["VALUE"] != "") { - echo "dispatching"; $_DISPATCHER->dispatchValue(strtolower($name),$attrs["VALUE"]); } } function endElement($parser, $name) { + global $_DISPATCHER; + if(in_array($name,$this->ignore_block)) { $this->lock = 0; } + + /* faction points */ + if($name == "FACTIONPOINTS") { + $this->open = null; + return null; + } + + /* fame */ + if($name == "__VAL__" && $this->open == "FAME") { + $_DISPATCHER->dispatchEntity($this->entity->getName(),$this->entity); + $this->entity = null; + return null; + } + + if($name == "_FAME") { + $this->open = null; + return null; + } + + /* last log stats */ + if($name == "_LASTLOGSTATS") { + $_DISPATCHER->dispatchEntity($this->entity->getName(),$this->entity); + $this->entity = null; + return null; + } + + /* mission */ + if($name == "__VAL__" && $this->open == "_MISSIONHISTORIES") { + $_DISPATCHER->dispatchEntity($this->entity->getName(),$this->entity); + $this->mission->missions[] = $this->entity; + $this->entity = null; + return null; + } + + if($name == "_MISSIONHISTORIES") { + $this->open = null; + return null; + } + + /* permanent mod */ + if($name == "SCOREPERMANENTMODIFIERS") { + $this->open = null; + return null; + } + + /* pet */ + if($name == "__VAL__" && $this->open == "_PLAYERPETS") { + $_DISPATCHER->dispatchEntity($this->entity->getName(),$this->entity); + #echo "dispatched"; + $this->entity = null; + return null; + } + + if($name == "_PLAYERPETS") { + $this->open = null; + return null; + } + + /* physical characteristics */ + if($name == "_PHYSICALCHARACTERISTICS") { + $this->open = null; + return null; + } + + /* physical scores */ + if($name == "__VAL__" && $this->open == "PHYSICALSCORES") { + $_DISPATCHER->dispatchEntity($this->entity->getName(),$this->entity); + $this->entity = null; + return null; + } + + if($name == "PHYSICALSCORES") { + $this->open = null; + return null; + } + + /* skill points */ + if($name == "SKILLPOINTS") { + $this->open = null; + return null; + } + + /* spent skill points */ + if($name == "SPENTSKILLPOINTS") { + $this->open = null; + return null; + } + + /* skills */ + if($name == "__VAL__" && $this->open == "SKILLS") { + $_DISPATCHER->dispatchEntity($this->entity->getName(),$this->entity); + $this->skills->skills[] = $this->entity; + $this->entity = null; + return null; + } + + if($name == "SKILLS") { + $this->open = null; + return null; + } + + /* position */ + if($name == "POSSTATE") { + $_DISPATCHER->dispatchEntity($this->entity->getName(),$this->entity); + $this->entity = null; + return null; + } + + /* items */ + if($name == "_ITEMS") { + $_DISPATCHER->dispatchEntity($this->entity->getName(),$this->entity); + if($this->entity->refinventoryid != null) { + $this->gear->items[] = $this->entity; + } + $this->entity = null; + return null; + } + + if($name == "INVENTORY") { + $this->iblock = false; + return null; + } + + if($name == "_ITEM" || $name == "_ITEMS") { + $this->open = null; + return null; + } + + } diff --git a/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/FactionPoints_entity.php b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/FactionPoints_entity.php new file mode 100644 index 000000000..fa18a0fc6 --- /dev/null +++ b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/FactionPoints_entity.php @@ -0,0 +1,10 @@ +setName("faction_points"); + } + } +?> \ No newline at end of file diff --git a/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Fame_entity.php b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Fame_entity.php new file mode 100644 index 000000000..0cfc5f15b --- /dev/null +++ b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Fame_entity.php @@ -0,0 +1,12 @@ +setName("fame"); + } + } +?> \ No newline at end of file diff --git a/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Gear_entity.php b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Gear_entity.php new file mode 100644 index 000000000..b84008061 --- /dev/null +++ b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Gear_entity.php @@ -0,0 +1,9 @@ +setName("gear"); + } + } +?> \ No newline at end of file diff --git a/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Item_entity.php b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Item_entity.php new file mode 100644 index 000000000..2ffb89316 --- /dev/null +++ b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Item_entity.php @@ -0,0 +1,28 @@ +setName("item"); + } + } +?> \ No newline at end of file diff --git a/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/LastLogStats_entity.php b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/LastLogStats_entity.php new file mode 100644 index 000000000..30878f04a --- /dev/null +++ b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/LastLogStats_entity.php @@ -0,0 +1,11 @@ +setName("lastlogstats"); + } + } +?> \ No newline at end of file diff --git a/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/MissionList_entity.php b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/MissionList_entity.php new file mode 100644 index 000000000..ab4a7bea9 --- /dev/null +++ b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/MissionList_entity.php @@ -0,0 +1,9 @@ +setName("missionlist"); + } + } +?> \ No newline at end of file diff --git a/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Mission_entity.php b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Mission_entity.php new file mode 100644 index 000000000..7a95ac744 --- /dev/null +++ b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Mission_entity.php @@ -0,0 +1,11 @@ +setName("mission"); + } + } +?> \ No newline at end of file diff --git a/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/PermanentMod_entity.php b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/PermanentMod_entity.php new file mode 100644 index 000000000..008a74895 --- /dev/null +++ b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/PermanentMod_entity.php @@ -0,0 +1,10 @@ +setName("permanentmodifiers"); + } + } +?> \ No newline at end of file diff --git a/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Pet_entity.php b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Pet_entity.php new file mode 100644 index 000000000..e92499d93 --- /dev/null +++ b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Pet_entity.php @@ -0,0 +1,24 @@ +setName("pet"); + #echo "created"; + } + } +?> \ No newline at end of file diff --git a/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/PhysCharacs_entity.php b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/PhysCharacs_entity.php new file mode 100644 index 000000000..c71109d02 --- /dev/null +++ b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/PhysCharacs_entity.php @@ -0,0 +1,10 @@ +setName("phys_characs"); + } + } +?> \ No newline at end of file diff --git a/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/PhysScores_entity.php b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/PhysScores_entity.php new file mode 100644 index 000000000..d7deca5bb --- /dev/null +++ b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/PhysScores_entity.php @@ -0,0 +1,15 @@ +setName("phys_scores"); + } + } +?> \ No newline at end of file diff --git a/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Position_entity.php b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Position_entity.php new file mode 100644 index 000000000..029b1525b --- /dev/null +++ b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Position_entity.php @@ -0,0 +1,12 @@ +setName("position"); + } + } +?> \ No newline at end of file diff --git a/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/SkillList_entity.php b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/SkillList_entity.php new file mode 100644 index 000000000..b3e885b81 --- /dev/null +++ b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/SkillList_entity.php @@ -0,0 +1,9 @@ +setName("skilllist"); + } + } +?> \ No newline at end of file diff --git a/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/SkillPoints_entity.php b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/SkillPoints_entity.php new file mode 100644 index 000000000..81582b703 --- /dev/null +++ b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/SkillPoints_entity.php @@ -0,0 +1,10 @@ +setName("skillpoints"); + } + } +?> \ No newline at end of file diff --git a/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Skill_entity.php b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Skill_entity.php new file mode 100644 index 000000000..f06132ac8 --- /dev/null +++ b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/Skill_entity.php @@ -0,0 +1,14 @@ +setName("skill"); + } + } +?> \ No newline at end of file diff --git a/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/SpentSkillPoints_entity.php b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/SpentSkillPoints_entity.php new file mode 100644 index 000000000..5bacb0e52 --- /dev/null +++ b/code/web/app/app_achievements/_AchWebParser/source/PDRtoXMLdriver/entity/SpentSkillPoints_entity.php @@ -0,0 +1,10 @@ +setName("spentskillpoints"); + } + } +?> \ No newline at end of file diff --git a/code/web/app/app_achievements/_doc/devshot_005.jpg b/code/web/app/app_achievements/_doc/devshot_005.jpg new file mode 100644 index 0000000000000000000000000000000000000000..63fc3380d04c923f20f8ba5d6b88e36df590c7e1 GIT binary patch literal 33804 zcmeFZ1yo$kwl&(gySsEF!Ce}63mP;H1eZXgjfY@?K+wh=f+V;*gamhMEI@$Z7J@?p zNqBs6zH{aL_nw?P?s)GXF9nRT*)`XyU9;z?UA1ae-@d>72q08fR#OHbAt3=&?|uNc zYXaO3Fqj*dm)FIU$I`~t%9h9470T;t>Bh^?!^aDdl<{@5w05$EF=)GSuZI31fq!|vGnBmJ1gzj;YYB7p(06rpmj0vX%8nkkKCT{4o{S0)gn9TG z`S1G8!^b1QC(LN%=wjpQ<0;AeA1(j>D1Ucqt7r+cmA<1&fSXU0n_onqUj!_8_bd4D z-`M{F`VZ!st~QQ#e*ef^6f7X}r}@7D{b?@A`x`s|hOOT}ir+f=AMXEmEZSKAMWUOR zhx6~Bm5nv8t+OrE)&=Hyr$m0^rgC>6G^`q5kdJ|N4OcS1$fe{QrvkKb-z*FiFS>q;fu92Z zQr9oKeu{yg0{>FiFS>q;fu92ZQr9oKeu{yg0{>FiFS>q;fu92ZQr9oKeu{yg0{>Fi zFS>q;fu92ZQr9oKeu{yg0{>FiFS>q;fu92ZQr9oKeu{yg0{>FiFS>q;fu92ZQr9oK zeu{yg0{>FiFS>q;fu92ZQr9oKeu{yg0{>FiFS>q;fu92ZQr9oKeu{yg0{>FiFS>q; zfu92ZQr9oKeu{yg0{@rl!v6cw4_lYJ^Bz8T2Rm+;015zXbaV_13~WqHY<%pyKO#JA zY&;?o0s=w;0upi};=4jbPC`yWNkL9RN5{ZGM|Y2%o&6r?U*$I^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##*_co03=&MefWVv zCy(X-(bv+{&5z`Ld~{aIiAEL&i86Y;1PNO&YHoqgr-{UV#P*yY6t6Ve$~a><%=v$I z=QQtT?YEf=URq8TJhtwD(z|u}g0~eN&UNh6km|Gi#PfJrL|y!Tk2Is#-=D5d&V6>P z|4XD&>*ITeH6tCgPcxpGcx+ckPD9V*_4C7u=kxo$?hAXVY^f(%(ooQDdBuRQZe6A5 z+3kAw-sRtYoEH=0y~FHJaHP`F1&aL<0bco>%$L`seB%qfmb|W`_tlMk)4aE>U%bOx zIa6F#S%G_h?zK*#boR=fSLZ*xk?fvscdTRezWMy^^VL?q-L>P7%Dm#d2~jJjy)OB{ zK4sOr^uEl%xh*-)kC>-2^sSq?Tx3F^R#`<$h)`)~fpPiWt9DvaK;3<&m-W926QLEaPlybs~JvPf| zMq1KEX}JTO4c+H|9$vY5?&C8YmMd zPmN2Nm8iJ!4NI`=t{47dkMbs`Ue>Fe^IYZBk?oP{Dp#)C9h(u$I>+q2@)550e#>Kh z7u%fFYIzytdGZpQzwx;xXV>aXWa&6@^Dq#^VQV+7f7G;aT=j5%Hr!rfMf7owM zcXRJ;+PC+CXKH`M)R{Nz+G3r9H!^&Zw0ON*#%IB0?)j;=Y^>+9sC`_<8hi1Yr{v6; zu^y=^yG!L3_pO?>Wa+hUAERBAIx<~a(;~5`g$LD}Q z^^dN!Of3yWKP|waFZc9Djo4U+7k?vvTW31e#MmA3-~BaY>E`bC8=l|mRt2Vu^KY2^ z?r+GVb9(ZL>UV#wbe#iH6Vz?7qqb#!`KzU3g$2Jk?cQJY(s}gon^5ijRZ}959)6?p zdw;0Ls4?^ln~c*Ivz^xDbhU?jzfs=u?dpz8^Zz#iE%SY( literal 0 HcmV?d00001 diff --git a/code/web/app/app_achievements/class/AchAchievement_class.php b/code/web/app/app_achievements/class/AchAchievement_class.php index 67d0360d9..4de86b646 100644 --- a/code/web/app/app_achievements/class/AchAchievement_class.php +++ b/code/web/app/app_achievements/class/AchAchievement_class.php @@ -1,5 +1,8 @@ dev = $d; } + ######################### protected $parent_id; protected $category; diff --git a/code/web/app/app_achievements/class/AchMenuNode_class.php b/code/web/app/app_achievements/class/AchMenuNode_class.php index ef232d520..8676ab974 100644 --- a/code/web/app/app_achievements/class/AchMenuNode_class.php +++ b/code/web/app/app_achievements/class/AchMenuNode_class.php @@ -1,5 +1,8 @@ dev = $d; } + ######################### protected $parent_id; protected $name; diff --git a/code/web/app/app_achievements/class/AchMenu_class.php b/code/web/app/app_achievements/class/AchMenu_class.php index 60f21f17b..6d11b10df 100644 --- a/code/web/app/app_achievements/class/AchMenu_class.php +++ b/code/web/app/app_achievements/class/AchMenu_class.php @@ -15,14 +15,14 @@ $this->open = $open; // the summary page is autogenerated and has no database entry. We add it manually here. - /*$tmp = array(); + $tmp = array(); $tmp['ac_id'] = 0; $tmp['ac_parent'] = null; $tmp['acl_name'] = get_translation('ach_summary',$_USER->getLang()); $tmp['ac_image'] = "test.png"; $tmp['ac_order'] = -1; $tmp['open'] = $open; - $this->addChild(new AchMenuNode($tmp,$this));*/ + $this->addChild(new AchMenuNode($tmp,$this)); $res = $DBc->sqlQuery("SELECT * FROM ach_category LEFT JOIN (ach_category_lang) ON (acl_lang='".$_USER->getLang()."' AND acl_category=ac_id) WHERE ac_parent IS NULL ORDER by ac_order ASC, acl_name ASC"); diff --git a/code/web/app/app_achievements/class/AchObjective_class.php b/code/web/app/app_achievements/class/AchObjective_class.php index 2f5a38543..5a314a8fc 100644 --- a/code/web/app/app_achievements/class/AchObjective_class.php +++ b/code/web/app/app_achievements/class/AchObjective_class.php @@ -27,7 +27,7 @@ $this->progress = $this->value; if(!$this->isDone()) { - $res = $DBc->sqlQuery("SELECT count(*) as anz FROM ach_player_atom,ach_atom WHERE apa_atom=atom_id AND atom_objective='".$this->id."' AND apa_player='".$_USER->getID()."'"); + $res = $DBc->sqlQuery("SELECT sum(apa_value) as anz FROM ach_player_atom,ach_atom WHERE apa_atom=atom_id AND atom_objective='".$this->id."' AND apa_player='".$_USER->getID()."'"); $this->progress = $res[0]['anz']; } } diff --git a/code/web/app/app_achievements/class/AchPerk_class.php b/code/web/app/app_achievements/class/AchPerk_class.php index bef5e5d71..25585db11 100644 --- a/code/web/app/app_achievements/class/AchPerk_class.php +++ b/code/web/app/app_achievements/class/AchPerk_class.php @@ -1,5 +1,8 @@ dev = $d; } + ######################### protected $achievement; protected $value; diff --git a/code/web/app/app_achievements/class/AchSummary_class.php b/code/web/app/app_achievements/class/AchSummary_class.php index 85ca43b37..c607774de 100644 --- a/code/web/app/app_achievements/class/AchSummary_class.php +++ b/code/web/app/app_achievements/class/AchSummary_class.php @@ -13,7 +13,7 @@ //read all recent perks of user //make distinct achievement list - $res = $DBc->sqlQuery("SELECT DISTINCT aa_id,ach.*,(SELECT aal_name FROM ach_achievement_lang WHERE aal_lang='".$_USER->getLang()."' AND aal_achievement=ach.aa_id) as aal_name FROM ach_achievement as ach,ach_perk,ach_player_perk WHERE ap_achievement=aa_id AND app_player='".$_USER->getID()."' AND app_perk=ap_id ORDER by app_date DESC LIMIT 0,".($size-1)); + $res = $DBc->sqlQuery("SELECT DISTINCT aa_id,ach.*,(SELECT aal_name FROM ach_achievement_lang WHERE aal_lang='".$_USER->getLang()."' AND aal_achievement=ach.aa_id) as aal_name, (SELECT aal_template FROM ach_achievement_lang WHERE aal_lang='".$_USER->getLang()."' AND aal_achievement=ach.aa_id) as aal_template FROM ach_achievement as ach,ach_perk,ach_player_perk WHERE ap_achievement=aa_id AND app_player='".$_USER->getID()."' AND app_perk=ap_id ORDER by app_date DESC LIMIT 0,".($size-1)); $sz = sizeof($res); for($i=0;$i<$sz;$i++) { diff --git a/code/web/app/app_achievements/conf.php b/code/web/app/app_achievements/conf.php index a9ff621a3..f31fc7bc3 100644 --- a/code/web/app/app_achievements/conf.php +++ b/code/web/app/app_achievements/conf.php @@ -10,4 +10,8 @@ $_CONF['enable_webig'] = true; $_CONF['enable_offgame'] = true; $_CONF['image_url'] = "http://www.3025-game.de/special/app_achievements/"; + + $_CONF['use_fb'] = true; + $_CONF['fb_id'] = "447985781893176"; + $_CONF['fb_secret'] = "f953772f1f7d871db022a6023e7a3f42"; ?> \ No newline at end of file diff --git a/code/web/app/app_achievements/fb.php b/code/web/app/app_achievements/fb.php new file mode 100644 index 000000000..57b33dbbd --- /dev/null +++ b/code/web/app/app_achievements/fb.php @@ -0,0 +1,57 @@ + $_CONF['fb_id'], + 'secret' => $_CONF['fb_secret'], + 'cookie' => true + )); + + // Get the url to redirect for login to facebook + // and request permission to write on the user's wall. + $login_url = $facebook->getLoginUrl( + array('scope' => 'publish_stream') + ); + + + // If not authenticated, redirect to the facebook login dialog. + // The $login_url will take care of redirecting back to us + // after successful login. + if (!$facebook->getUser()) { + + echo ''; + } + else { + echo var_export($facebook->getUser(),true); + // Do the wall post. + try { + + $facebook->api("/me/feed", "post", array( + message => "My character Talvela just earned 'Bejeweled' on Ryzom!", + picture => "http://www.3025-game.de/special/app_achievements/pic/icon/test.png", + link => "http://www.ryzom.com", + name => "Ryzom - MMO", + caption => "Join and play for fee!" + )); + echo "post"; + + } catch (FacebookApiException $e) { + echo $e; + $login_url = $facebook->getLoginUrl( array( + 'scope' => 'publish_stream' + )); + echo 'Please login.'; + #error_log($e->getType()); + #error_log($e->getMessage()); + } + } +?> \ No newline at end of file diff --git a/code/web/app/app_achievements/fb/facebook.php b/code/web/app/app_achievements/fb/facebook.php new file mode 100644 index 000000000..c577c2aa4 --- /dev/null +++ b/code/web/app/app_achievements/fb/facebook.php @@ -0,0 +1,93 @@ +constructSessionVariableName($key); + $_SESSION[$session_var_name] = $value; + } + + protected function getPersistentData($key, $default = false) { + if (!in_array($key, self::$kSupportedKeys)) { + self::errorLog('Unsupported key passed to getPersistentData.'); + return $default; + } + + $session_var_name = $this->constructSessionVariableName($key); + return isset($_SESSION[$session_var_name]) ? + $_SESSION[$session_var_name] : $default; + } + + protected function clearPersistentData($key) { + if (!in_array($key, self::$kSupportedKeys)) { + self::errorLog('Unsupported key passed to clearPersistentData.'); + return; + } + + $session_var_name = $this->constructSessionVariableName($key); + unset($_SESSION[$session_var_name]); + } + + protected function clearAllPersistentData() { + foreach (self::$kSupportedKeys as $key) { + $this->clearPersistentData($key); + } + } + + protected function constructSessionVariableName($key) { + return implode('_', array('fb', + $this->getAppId(), + $key)); + } +} diff --git a/code/web/app/app_achievements/include/ach_render_ig.php b/code/web/app/app_achievements/include/ach_render_ig.php index dee5e19c9..e9f54c163 100644 --- a/code/web/app/app_achievements/include/ach_render_ig.php +++ b/code/web/app/app_achievements/include/ach_render_ig.php @@ -413,12 +413,12 @@ diff --git a/code/web/app/app_achievements/include/ach_render_web.php b/code/web/app/app_achievements/include/ach_render_web.php index 3058b2890..8c9df92bd 100644 --- a/code/web/app/app_achievements/include/ach_render_web.php +++ b/code/web/app/app_achievements/include/ach_render_web.php @@ -4,7 +4,14 @@ $c = "
"; - if(($prog/$val) > 0.85) { + if(($prog/$val) > 0.5) { $html .= " ".nf($prog)." / ".nf($val)." "; } $html .= " "; - if(($prog/$val) <= 0.85) { + if(($prog/$val) <= 0.5) { $html .= " ".nf($prog)." / ".nf($val)." "; } $html .= "
- +
".ach_render_yubopoints($user['id'])." +
+
".ach_render_yubopoints($user['id'])."
+
".ach_render_facebook()."
+
+
+ +
"; @@ -120,13 +127,29 @@ $res = $DBc->sqlQuery("SELECT sum(ap_value) as anz FROM ach_perk,ach_player_perk WHERE ap_id=app_perk AND app_player='".$_USER->getID()."'"); - $html = "
".$_USER->getName()."  ".max(0,$res[0]['anz'])."
"; + $html = "
".$_USER->getName()."  ".max(0,$res[0]['anz'])."
"; return $html; } function ach_render_facebook() { - + return "
+
+ +
+ +
"; } function ach_render_twitter() { @@ -446,12 +469,12 @@ diff --git a/code/web/app/app_achievements/index.php b/code/web/app/app_achievements/index.php index 316b636ae..79edf6bfb 100644 --- a/code/web/app/app_achievements/index.php +++ b/code/web/app/app_achievements/index.php @@ -1,79 +1,129 @@ -isIG()) { - require_once("include/ach_render_ig.php"); -} -else { - require_once("include/ach_render_web.php"); -} -require_once("include/ach_render_common.php"); - -require_once("class/DLL_class.php"); -#require_once("class/InDev_trait.php"); -require_once("class/Node_abstract.php"); -require_once("class/AVLTree_class.php"); -require_once("class/Parentum_abstract.php"); -require_once("class/AchList_abstract.php"); -require_once("class/Tieable_inter.php"); -require_once("class/NodeIterator_class.php"); - - -require_once("class/AchMenu_class.php"); -require_once("class/AchMenuNode_class.php"); -require_once("class/AchSummary_class.php"); -require_once("class/AchCategory_class.php"); -require_once("class/AchAchievement_class.php"); -require_once("class/AchPerk_class.php"); -require_once("class/AchObjective_class.php"); - - - -// Update user acces on Db -#$DBc = ryDB::getInstance(APP_NAME."_test"); -$DBc = ryDB::getInstance(APP_NAME); -#$DBc = ryDB::getInstance("ahufler"); - - -if(!$_USER->isIG && $_CONF['enable_webig'] == false) { - $c = ach_render_forbidden(false); -} -elseif($_USER->isIG && $_CONF['enable_offgame'] == false) { - $c = ach_render_forbidden(true); -} -else { - $c = ach_render(); -} - - -echo ryzom_app_render("achievements", $c, $_USER->isIG()); - -?> +isIG()) { + require_once("include/ach_render_ig.php"); +} +else { + require_once("include/ach_render_web.php"); +} +require_once("include/ach_render_common.php"); + +require_once("class/DLL_class.php"); +#require_once("class/InDev_trait.php"); +require_once("class/Node_abstract.php"); +require_once("class/AVLTree_class.php"); +require_once("class/Parentum_abstract.php"); +require_once("class/AchList_abstract.php"); +require_once("class/Tieable_inter.php"); +require_once("class/NodeIterator_class.php"); + + +require_once("class/AchMenu_class.php"); +require_once("class/AchMenuNode_class.php"); +require_once("class/AchSummary_class.php"); +require_once("class/AchCategory_class.php"); +require_once("class/AchAchievement_class.php"); +require_once("class/AchPerk_class.php"); +require_once("class/AchObjective_class.php"); + +require_once("fb/facebook.php"); + +// Update user acces on Db +#$DBc = ryDB::getInstance(APP_NAME."_test"); +#$DBc = ryDB::getInstance(APP_NAME); +$DBc = ryDB::getInstance("ahufler"); + +$c = ""; +if(!$_USER->isIG()) { + $facebook = new Facebook(array( + 'appId' => $_CONF['fb_id'], + 'secret' => $_CONF['fb_secret'], + 'cookie' => true + )); + + // Get the url to redirect for login to facebook + // and request permission to write on the user's wall. + $login_url = $facebook->getLoginUrl( + array('scope' => 'publish_stream') + ); + + // If not authenticated, redirect to the facebook login dialog. + // The $login_url will take care of redirecting back to us + // after successful login. + if (! $facebook->getUser()) { + $c .= ';'; + } + else { + echo var_export($facebook->getUser(),true); + // Do the wall post. + try { + + /*$facebook->api("/me/feed", "post", array( + message => "My character Talvela just achieved \"Bejeweled\" on Ryzom!", + picture => "http://www.3025-game.de/special/app_achievements/pic/icon/test.png", + link => "http://www.ryzom.com", + name => "Ryzom", + caption => "Join and play for fee!" + ));*/ + + } catch (FacebookApiException $e) { + echo $e; + $login_url = $facebook->getLoginUrl( array( + 'scope' => 'publish_stream' + )); + echo 'Please login.'; + #error_log($e->getType()); + #error_log($e->getMessage()); + } + + + } + + +} + +if(!$_USER->isIG && $_CONF['enable_webig'] == false) { + $c .= ach_render_forbidden(false); +} +elseif($_USER->isIG && $_CONF['enable_offgame'] == false) { + $c .= ach_render_forbidden(true); +} +else { + $c .= ach_render(); +} + + +echo ryzom_app_render("achievements", $c, $_USER->isIG()); + +?> diff --git a/code/web/app/app_achievements/pic/f-connect.png b/code/web/app/app_achievements/pic/f-connect.png new file mode 100644 index 0000000000000000000000000000000000000000..ee067c17bae5407ca4793b5b5db35ba8b5bd0e40 GIT binary patch literal 4336 zcmV}Ub0000PbVXQnQ*UN; zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU?l1W5CRCwC#oe6Xm)fva{3lc+uCWMe+ z0wDSd_(uQpBKj>2ax4ZLun?N2@)@{m`Su<(yVrjtE$~NU^w|qG*rS0Aduv zCQC?^B?%-f*|ANc;3?DlP4d!t@6CI&-I+IU-v7s$^TK;GclqwU|M|WL^7p`Rh z01%I?c&tqKzP>PGIgoD)_%@AiC49?)SpfhZ<_O=m^R0q!OSy=4>JiId@$E&}4ge6x z+{FcRiSmnt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1W|TX2(Q zdp1*R{fQ0$Z2779F=2o%*M9(n*J6#_I5fT00g=P3GeI-REOK76jhOODdzw^}n5 z((ndGMn>?sCJ>;gvFi|l03gU{IRIP+C(7snU>HCFV0fYaB{dwd{kBA+jh|{6Ticq} z;;W_!pD34_thxSmHQ85155ORP8Um=vzmg_+@P5nK+JjY5_}Ehbt$iIDM`NttI9}A& z>?V>Pj|BpN0J`ugaEb7dFQQ_l$=?jK$x5Q=LBt7sHzfa(uwBxc1HivYBB9J} z4cnW37nIeapBY;x8#G3y?{Ix7!x-vyS?dANAOP2C4VKfF8VVo`=x4ARwEVSVu~>ua zyauhmj5pBk*|Wzee6*&DAFb7`qX`6?Hf@r?6Ocf#35bOfa8mK?C4iPV_W%MRft~__ z0)>y?QS4}NLJ`4|Rs6BV7N#Kt;JTFIx}=^#8polb-wy(Zb?6P$LFn`yp)fNuqb;Ld zg$E8CAnVqxGrIa{O&7jq?IM;&Juq1aE|G*VfS8D&X8_`+P(UEe&d$>JTrMZUNk?E1 z^_`Z1pN$1uDIQyFUd-w}g5arGF2uqhPMF>c6VzF0&ZU^20-KV#=w;g{^Y-f;xH!6>fDYN~c z$f1EEM~)o9h6C{{XvxI?%dtxMu(W002ovPDHLkV1oOVZ#Mt{ literal 0 HcmV?d00001 diff --git a/code/web/app/app_achievements_admin/class/AdmAchievement_class.php b/code/web/app/app_achievements_admin/class/AdmAchievement_class.php index bb01aafe1..635aef466 100644 --- a/code/web/app/app_achievements_admin/class/AdmAchievement_class.php +++ b/code/web/app/app_achievements_admin/class/AdmAchievement_class.php @@ -1,6 +1,55 @@ setParent($this); + $n->insert(); + $this->addChild($n); + }*/ + + function removeNode($id) { + $res = $this->getChildDataByID($id); + if($res != null) { + $res->delete_me(); + $this->removeChild($id); + } + } + + function updateNode($id) { // PROBABLY USELESS! + $res = $this->getChildDataByID($id); + if($res != null) { + $res->update(); + } + } + + function getPathID($path = "") { + if($path != "") { + $path = ";".$path; + } + $path = $this->getID().$path; + if($this->parent != null) { + return $this->parent->getPathID($path); + } + + return $path; + } + + function getElementByPath($pid) { + $tmp = explode(";",$pid); + if($tmp[0] == $this->getID()) { + if(sizeof($tmp) > 1) { + $c = $this->getChildDataByID($tmp[1]); + if($c != null) { + unset($tmp[0]); + return $c->getElementByPath(implode(";",$tmp)); + } + return null; + } + else { + return $this; + } + } + return null; + } function AdmAchievement($data,$parent) { parent::__construct($data,$parent); @@ -34,10 +83,10 @@ function update() { global $DBc; - $DBc->sqlQuery("UPDATE ach_achievement SET aa_category='".$this->getCategory()."',aa_parent=NULL,aa_tie_race=".mkn($this->getTieRace()).",aa_tie_cult=".mkn($this->getTieCult()).",aa_tie_civ=".mkn($this->getTieCiv()).",aa_image='".mysql_real_escape_string($this->getImage())."',aa_dev='".$this->getDev()."' WHERE aa_id='".$this->getID()."'"); + $DBc->sqlQuery("UPDATE ach_achievement SET aa_category='".$this->getCategory()."',aa_parent=NULL,aa_tie_race=".mkn($this->getTieRace()).",aa_tie_cult=".mkn($this->getTieCult()).",aa_tie_civ=".mkn($this->getTieCiv()).",aa_image='".$DBc->sqlEscape($this->getImage())."',aa_dev='".$this->getDev()."' WHERE aa_id='".$this->getID()."'"); #MISSING: update lang entry - $DBc->sqlQuery("INSERT INTO ach_achievement_lang (aal_achievement,aal_lang,aal_name,aal_template) VALUES ('".$this->getID()."','en','".mysql_real_escape_string($this->getName())."',".mkn($this->getTemplate()).") ON DUPLICATE KEY UPDATE aal_name='".mysql_real_escape_string($this->getName())."',aal_template=".mkn($this->getTemplate()).""); + $DBc->sqlQuery("INSERT INTO ach_achievement_lang (aal_achievement,aal_lang,aal_name,aal_template) VALUES ('".$this->getID()."','en','".$DBc->sqlEscape($this->getName())."',".mkn($this->getTemplate()).") ON DUPLICATE KEY UPDATE aal_name='".$DBc->sqlEscape($this->getName())."',aal_template=".mkn($this->getTemplate()).""); } function insert() { @@ -45,11 +94,11 @@ $this->dev = 1; - $DBc->sqlQuery("INSERT INTO ach_achievement (aa_category,aa_parent,aa_tie_race,aa_tie_cult,aa_tie_civ,aa_image,aa_dev) VALUES ('".$this->getCategory()."',NULL,".mkn($this->getTieRace()).",".mkn($this->getTieCult()).",".mkn($this->getTieCiv()).",'".mysql_real_escape_string($this->getImage())."','1')"); - $id = mysql_insert_id(); + $DBc->sqlQuery("INSERT INTO ach_achievement (aa_category,aa_parent,aa_tie_race,aa_tie_cult,aa_tie_civ,aa_image,aa_dev) VALUES ('".$this->getCategory()."',NULL,".mkn($this->getTieRace()).",".mkn($this->getTieCult()).",".mkn($this->getTieCiv()).",'".$DBc->sqlEscape($this->getImage())."','1')"); + $id = $DBc->insertID(); $this->setID($id); - $DBc->sqlQuery("INSERT INTO ach_achievement_lang (aal_achievement,aal_lang,aal_name,aal_template) VALUES ('".$this->getID()."','en','".mysql_real_escape_string($this->getName())."',".mkn($this->getTemplate()).")"); + $DBc->sqlQuery("INSERT INTO ach_achievement_lang (aal_achievement,aal_lang,aal_name,aal_template) VALUES ('".$this->getID()."','en','".$DBc->sqlEscape($this->getName())."',".mkn($this->getTemplate()).")"); } diff --git a/code/web/app/app_achievements_admin/class/AdmAtom_class.php b/code/web/app/app_achievements_admin/class/AdmAtom_class.php index 9ede36606..19c606d04 100644 --- a/code/web/app/app_achievements_admin/class/AdmAtom_class.php +++ b/code/web/app/app_achievements_admin/class/AdmAtom_class.php @@ -1,5 +1,56 @@ setParent($this); + $n->insert(); + $this->addChild($n); + } + + function removeNode($id) { + $res = $this->getChildDataByID($id); + if($res != null) { + $res->delete_me(); + $this->removeChild($id); + } + } + + function updateNode($id) { // PROBABLY USELESS! + $res = $this->getChildDataByID($id); + if($res != null) { + $res->update(); + } + } + + function getPathID($path = "") { + if($path != "") { + $path = ";".$path; + } + $path = $this->getID().$path; + if($this->parent != null) { + return $this->parent->getPathID($path); + } + + return $path; + } + + function getElementByPath($pid) { + $tmp = explode(";",$pid); + if($tmp[0] == $this->getID()) { + if(sizeof($tmp) > 1) { + $c = $this->getChildDataByID($tmp[1]); + if($c != null) { + unset($tmp[0]); + return $c->getElementByPath(implode(";",$tmp)); + } + return null; + } + else { + return $this; + } + } + return null; + } + protected $objective; protected $mandatory; protected $ruleset; @@ -23,15 +74,27 @@ } function update() { - #$DBc->sqlQuery("UPDATE ach_atom SET atom_mandatory='".."',atom_ruleset='".."',atom_ruleset_parsed='".."' WHERE atom_id='".$this->id."'"); + global $DBc; + + $DBc->sqlQuery("UPDATE ach_atom SET atom_mandatory='".$this->getMandatory()."',atom_ruleset='".$DBc->sqlEscape($this->getRuleset())."',atom_ruleset_parsed='".$DBc->sqlEscape($this->getRulesetParsed())."' WHERE atom_id='".$this->id."'"); } function insert() { - #$DBc->sqlQuery("INSERT INTO ach_atom (atom_objective,atom_mandatory,atom_ruleset,atom_ruleset_parsed) VALUES ('".."','".."','".."','".."')"); - $id = mysql_insert_id(); + global $DBc; + + $DBc->sqlQuery("INSERT INTO ach_atom (atom_objective,atom_mandatory,atom_ruleset,atom_ruleset_parsed) VALUES ('".$this->getObjective()."','".$this->getMandatory()."','".$DBc->sqlEscape($this->getRuleset())."','".$DBc->sqlEscape($this->getRulesetParsed())."')"); + $id = $DBc->insertID(); $this->setID($id); } + function getObjective() { + return $this->objective; + } + + function setObjective($o) { + $this->objective = $o; + } + function setMandatory($ft) { if($ft == true) { $this->mandatory = 1; @@ -58,73 +121,222 @@ return $this->ruleset; } - private function parse() { - /*VALUE _money AS $money { - CACHE blach AS $test + function getRulesetParsed() { + return $this->ruleset_parsed; + } - if($money >= 10000 && $test == 0) { - GRANT - FINAL - } - else { - CACHE blach SET $money - } - } + private function parse() { + /* +VALUE _money AS $money { + + CACHE blach AS $test; + + if($money >= 10000 && $test == 0) { + RESET; + GRANT $money UNTIL TIMER:3600; + FINAL; + } + else { + CACHE blach SET $money; + } + + SCRIPT wealth($money) AS $res; + + if($res == "lol") { + DENY; + } +} + +ENTITY _pos AS $pos { + SCRIPT inside($pos,"majestic_garden") AS $region; + + if($region == true) { + GRANT; + } +} +*/ $res = $this->ruleset; - #VALUE ([^ ]+) AS ([^ ]+) {# + #VALUE ([^ ]+) AS ([$][^ ]+) {# $match = array(); - preg_match_all("#VALUE ([^ ]+) AS ([^ ]+) {#",$this->ruleset,$match); + preg_match_all("#VALUE ([^ ]+) AS ([$][^ ]+) {#",$this->ruleset,$match); foreach($match[0] as $key=>$elem) { $func = "_".md5(microtime()); $tmp = '$this->registerValue("'.$match[1][$key].'","'.$func.'"); - function '.$func.'('.$match[2][$key].',$_P,$_CB) { - $_IDENT = "'.$match[1][$key].'";'; +function '.$func.'('.$match[2][$key].',$_P,$_CB) { + global $_CACHE; + $_IDENT = "'.$match[1][$key].'";'; //replace $res = str_replace($elem,$tmp,$res); } - #ENTITY ([^ ]+) AS ([^ ]+) {# + #ENTITY ([^ ]+) AS ([$][^ ]+) {# $match = array(); - preg_match_all("#ENTITY ([^ ]+) AS ([^ ]+) {#",$this->ruleset,$match); + preg_match_all("#ENTITY ([^ ]+) AS ([$][^ ]+) {#",$this->ruleset,$match); foreach($match[0] as $key=>$elem) { $func = "_".md5(microtime()); $tmp = '$this->registerEntity("'.$match[1][$key].'","'.$func.'"); - function '.$func.'('.$match[2][$key].',$_P,$_CB) { - $_IDENT = "'.$match[1][$key].'";'; +function '.$func.'('.$match[2][$key].',$_P,$_CB) { + global $_CACHE; + $_IDENT = "'.$match[1][$key].'";'; //replace $res = str_replace($elem,$tmp,$res); } - #EVENT ([^ ]+) AS ([^ ]+) {# + #EVENT ([^ ]+) AS ([$][^ ]+) {# $match = array(); - preg_match_all("#EVENT ([^ ]+) AS ([^ ]+) {#",$this->ruleset,$match); + preg_match_all("#EVENT ([^ ]+) AS ([$][^ ]+) {#",$this->ruleset,$match); foreach($match[0] as $key=>$elem) { $func = "_".md5(microtime()); $tmp = '$this->registerEvent("'.$match[1][$key].'","'.$func.'"); - function '.$func.'('.$match[2][$key].',$_P,$_CB) { - $_IDENT = "'.$match[1][$key].'";'; +function '.$func.'('.$match[2][$key].',$_P,$_CB) { + global $_CACHE; + $_IDENT = "'.$match[1][$key].'";'; //replace $res = str_replace($elem,$tmp,$res); } - #CACHE ([^ ]+) AS ([^ ]+)# + #GRANT ([^;]*);# + $match = array(); + preg_match_all("#GRANT ([^;]*);#",$this->ruleset,$match); + foreach($match[0] as $key=>$elem) { + $tmp = '$_P->grant('.$match[1][$key].');'; - #GRANT# + //replace + $res = str_replace($elem,$tmp,$res); + } - #FINAL# + #GRANT;# + $match = array(); + preg_match_all("#GRANT;#",$this->ruleset,$match); + foreach($match[0] as $key=>$elem) { + $tmp = '$_P->grant();'; - #CACHE ([^ ]+) SET ([^ ]+)#*/ + //replace + $res = str_replace($elem,$tmp,$res); + } + + #DENY;# + $match = array(); + preg_match_all("#DENY;#",$this->ruleset,$match); + foreach($match[0] as $key=>$elem) { + $tmp = '$_P->deny();'; + + //replace + $res = str_replace($elem,$tmp,$res); + } + + #UNLOCK;# + $match = array(); + preg_match_all("#UNLOCK;#",$this->ruleset,$match); + foreach($match[0] as $key=>$elem) { + $tmp = '$_P->unlock();'; + + //replace + $res = str_replace($elem,$tmp,$res); + } + + #RESET;# + $match = array(); + preg_match_all("#RESET;#",$this->ruleset,$match); + foreach($match[0] as $key=>$elem) { + $tmp = '$_P->reset_();'; + + //replace + $res = str_replace($elem,$tmp,$res); + } + + #UNLOCK_ALL;# + $match = array(); + preg_match_all("#UNLOCK_ALL;#",$this->ruleset,$match); + foreach($match[0] as $key=>$elem) { + $tmp = '$_P->unlock_all();'; + + //replace + $res = str_replace($elem,$tmp,$res); + } + + #RESET_ALL;# + $match = array(); + preg_match_all("#RESET_ALL;#",$this->ruleset,$match); + foreach($match[0] as $key=>$elem) { + $tmp = '$_P->reset_all();'; + + //replace + $res = str_replace($elem,$tmp,$res); + } + + #FINAL VALUE;# + $match = array(); + preg_match_all("#FINAL VALUE;#",$this->ruleset,$match); + foreach($match[0] as $key=>$elem) { + $tmp = '$_P->unregisterValue($_IDENT,$_CB);'; + + //replace + $res = str_replace($elem,$tmp,$res); + } + + #FINAL ENTITY;# + $match = array(); + preg_match_all("#FINAL ENTITY;#",$this->ruleset,$match); + foreach($match[0] as $key=>$elem) { + $tmp = '$_P->unregisterEntity($_IDENT,$_CB);'; + + //replace + $res = str_replace($elem,$tmp,$res); + } + #FINAL EVENT;# + $match = array(); + preg_match_all("#FINAL EVENT;#",$this->ruleset,$match); + foreach($match[0] as $key=>$elem) { + $tmp = '$_P->unregisterEvent($_IDENT,$_CB);'; + + //replace + $res = str_replace($elem,$tmp,$res); + } + + #CACHE ([^ ]+) AS ([$][^ ]+);# + $match = array(); + preg_match_all("#CACHE ([^ ]+) AS ([$][^ ]+);#",$this->ruleset,$match); + foreach($match[0] as $key=>$elem) { + $tmp = $match[2][$key].' = $_CACHE->getData('.$match[1][$key].');'; + + //replace + $res = str_replace($elem,$tmp,$res); + } + + #CACHE ([^ ]+) SET ([$][^ ]+);# + $match = array(); + preg_match_all("#CACHE ([^ ]+) SET ([$][^ ]+);#",$this->ruleset,$match); + foreach($match[0] as $key=>$elem) { + $tmp = '$_CACHE->writeData('.$match[1][$key].','.$match[2][$key].');'; + + //replace + $res = str_replace($elem,$tmp,$res); + } + + #SCRIPT ([^ ]+) AS ([$][^ ]+);# + $match = array(); + preg_match_all("#SCRIPT ([^\(]+)\(([^\)]*)\) AS ([$][^ ]+);#",$this->ruleset,$match); + foreach($match[0] as $key=>$elem) { + $tmp = '@include_once("script/'.$match[1][$key].'_script.php"); + '.$match[3][$key].' = '.$match[1][$key].'('.$match[2][$key].');'; + + //replace + $res = str_replace($elem,$tmp,$res); + } + + $this->ruleset_parsed = $res; } } ?> \ No newline at end of file diff --git a/code/web/app/app_achievements_admin/class/AdmCategory_class.php b/code/web/app/app_achievements_admin/class/AdmCategory_class.php index cd0ff71a1..7a09fefab 100644 --- a/code/web/app/app_achievements_admin/class/AdmCategory_class.php +++ b/code/web/app/app_achievements_admin/class/AdmCategory_class.php @@ -1,6 +1,55 @@ setParent($this); + $n->insert(); + $this->addChild($n); + }*/ + + function removeNode($id) { + $res = $this->getChildDataByID($id); + if($res != null) { + $res->delete_me(); + $this->removeChild($id); + } + } + + function updateNode($id) { // PROBABLY USELESS! + $res = $this->getChildDataByID($id); + if($res != null) { + $res->update(); + } + } + + function getPathID($path = "") { + if($path != "") { + $path = ";".$path; + } + $path = $this->getID().$path; + if($this->parent != null) { + return $this->parent->getPathID($path); + } + + return $path; + } + + function getElementByPath($pid) { + $tmp = explode(";",$pid); + if($tmp[0] == $this->getID()) { + if(sizeof($tmp) > 1) { + $c = $this->getChildDataByID($tmp[1]); + if($c != null) { + unset($tmp[0]); + return $c->getElementByPath(implode(";",$tmp)); + } + return null; + } + else { + return $this; + } + } + return null; + } function AdmCategory($id,$race,$cult = null,$civ = null) { parent::__construct($id,$race,$cult,$civ); diff --git a/code/web/app/app_achievements_admin/class/AdmMenuNode_class.php b/code/web/app/app_achievements_admin/class/AdmMenuNode_class.php index 05064d28c..853700202 100644 --- a/code/web/app/app_achievements_admin/class/AdmMenuNode_class.php +++ b/code/web/app/app_achievements_admin/class/AdmMenuNode_class.php @@ -20,7 +20,9 @@ return true; } else { - foreach($this->nodes as $elem) { + $iter = $this->getIterator(); + while($iter->hasNext()) { + $elem = $iter->getNext(); $res = $elem->hasAchievements(); if($res == true) { return true; @@ -79,7 +81,7 @@ $DBc->sqlQuery("UPDATE ach_category SET ac_parent=".mkn($this->getParentID()).",ac_order='".$this->getOrder()."',ac_image=".mkn($this->getImage()).",ac_dev='".$this->getDev()."' WHERE ac_id='".$this->getID()."'"); #MISSING: update lang entry - $DBc->sqlQuery("INSERT IGNORE INTO ach_category_lang (acl_category,acl_lang,acl_name) VALUES ('".$this->getID()."','".$_USER->getLang()."','".mysql_real_escape_string($this->getName())."') ON DUPLICATE KEY UPDATE acl_name='".mysql_real_escape_string($this->getName())."'"); + $DBc->sqlQuery("INSERT IGNORE INTO ach_category_lang (acl_category,acl_lang,acl_name) VALUES ('".$this->getID()."','".$_USER->getLang()."','".$DBc->sqlEscape($this->getName())."') ON DUPLICATE KEY UPDATE acl_name='".$DBc->sqlEscape($this->getName())."'"); } function insert() { // write $this to the database as a new entry @@ -88,10 +90,10 @@ $this->setOrder($this->parent->getNextOrder()); $DBc->sqlQuery("INSERT INTO ach_category (ac_parent,ac_order,ac_image,ac_dev) VALUES (".mkn($this->getParentID()).",'".$this->getOrder()."',".mkn($this->getImage()).",'1')"); - $id = mysql_insert_id(); + $id = $DBc->insertID(); $this->setID($id); #MISSING: insert lang entry - $DBc->sqlQuery("INSERT INTO ach_category_lang (acl_category,acl_lang,acl_name) VALUES ('".$this->getID()."','".$_USER->getLang()."','".mysql_real_escape_string($this->getName())."')"); + $DBc->sqlQuery("INSERT INTO ach_category_lang (acl_category,acl_lang,acl_name) VALUES ('".$this->getID()."','".$_USER->getLang()."','".$DBc->sqlEscape($this->getName())."')"); } @@ -147,7 +149,10 @@ } $val = array(); - foreach($this->nodes as $elem) { + $iter = $this->getIterator(); + while($iter->hasNext()) { + #foreach($this->nodes as $elem) { + $elem = $iter->getNext(); $val[] = $elem->getOrder(); } diff --git a/code/web/app/app_achievements_admin/class/AdmMenu_class.php b/code/web/app/app_achievements_admin/class/AdmMenu_class.php index f646d0d3f..8fbc961bf 100644 --- a/code/web/app/app_achievements_admin/class/AdmMenu_class.php +++ b/code/web/app/app_achievements_admin/class/AdmMenu_class.php @@ -1,13 +1,62 @@ setParent($this); + $n->insert(); + $this->addChild($n); + }*/ + + /*function removeNode($id) { + $res = $this->getChildDataByID($id); + if($res != null) { + $res->delete_me(); + $this->removeChild($id); + } + }*/ + + /*function updateNode($id) { // PROBABLY USELESS! + $res = $this->getChildDataByID($id); + if($res != null) { + $res->update(); + } + }*/ + + function getPathID($path = "") { + if($path != "") { + $path = ";".$path; + } + $path = $this->getID().$path; + if($this->parent != null) { + return $this->parent->getPathID($path); + } + + return $path; + } + + function getElementByPath($pid) { + $tmp = explode(";",$pid); + if($tmp[0] == $this->getID()) { + if(sizeof($tmp) > 1) { + $c = $this->getChildDataByID($tmp[1]); + if($c != null) { + unset($tmp[0]); + return $c->getElementByPath(implode(";",$tmp)); + } + return null; + } + else { + return $this; + } + } + return null; + } function AdmMenu($open) { parent::__construct($open); #$this->drawTree(); - #$this->removeChild(0); // unset the auto-generated "summary" node + $this->removeChild(0); // unset the auto-generated "summary" node } protected function makeChild($d) { // override child generator to use admin classes @@ -18,7 +67,8 @@ $res = $this->getNode($id); if($res != null) { $res->delete_me(); - $this->removeChild($id); + $tmp = $res->getParent(); + $tmp->removeChild($id); } } diff --git a/code/web/app/app_achievements_admin/class/AdmObjective_class.php b/code/web/app/app_achievements_admin/class/AdmObjective_class.php index 82c301453..bec59b52b 100644 --- a/code/web/app/app_achievements_admin/class/AdmObjective_class.php +++ b/code/web/app/app_achievements_admin/class/AdmObjective_class.php @@ -1,13 +1,62 @@ setParent($this); + $n->insert(); + $this->addChild($n); + } + + function removeNode($id) { + $res = $this->getChildDataByID($id); + if($res != null) { + $res->delete_me(); + $this->removeChild($id); + } + } + + function updateNode($id) { // PROBABLY USELESS! + $res = $this->getChildDataByID($id); + if($res != null) { + $res->update(); + } + } + + function getPathID($path = "") { + if($path != "") { + $path = ";".$path; + } + $path = $this->getID().$path; + if($this->parent != null) { + return $this->parent->getPathID($path); + } + + return $path; + } + + function getElementByPath($pid) { + $tmp = explode(";",$pid); + if($tmp[0] == $this->getID()) { + if(sizeof($tmp) > 1) { + $c = $this->getChildDataByID($tmp[1]); + if($c != null) { + unset($tmp[0]); + return $c->getElementByPath(implode(";",$tmp)); + } + return null; + } + else { + return $this; + } + } + return null; + } function AdmObjective($data,$parent) { parent::__construct($data,$parent); global $DBc; - $res = $DBc->sqlQuery("SELECT atom_id FROM ach_atom WHERE atom_objective='".$this->getID()."'"); + $res = $DBc->sqlQuery("SELECT * FROM ach_atom WHERE atom_objective='".$this->getID()."'"); $sz = sizeof($res); for($i=0;$i<$sz;$i++) { $this->addChild($this->makeChild($res[$i])); @@ -35,19 +84,19 @@ function update() { global $DBc; - $DBc->sqlQuery("UPDATE ach_objective SET ao_condition='".mysql_real_escape_string($this->getCondition())."',ao_value=".mkn($this->getValue()).",ao_display='".mysql_real_escape_string($this->getDisplay())."',ao_metalink=".mkn($this->getMetaImage())." WHERE ao_id='".$this->getID()."'"); + $DBc->sqlQuery("UPDATE ach_objective SET ao_condition='".$DBc->sqlEscape($this->getCondition())."',ao_value=".mkn($this->getValue()).",ao_display='".$DBc->sqlEscape($this->getDisplay())."',ao_metalink=".mkn($this->getMetaImage())." WHERE ao_id='".$this->getID()."'"); - $DBc->sqlQuery("INSERT INTO ach_objective_lang (aol_objective,aol_lang,aol_name) VALUES ('".$this->getID()."','en','".mysql_real_escape_string($this->getName())."') ON DUPLICATE KEY UPDATE aol_name='".mysql_real_escape_string($this->getName())."'"); + $DBc->sqlQuery("INSERT INTO ach_objective_lang (aol_objective,aol_lang,aol_name) VALUES ('".$this->getID()."','en','".$DBc->sqlEscape($this->getName())."') ON DUPLICATE KEY UPDATE aol_name='".$DBc->sqlEscape($this->getName())."'"); } function insert() { global $DBc; - $DBc->sqlQuery("INSERT INTO ach_objective (ao_perk,ao_condition,ao_value,ao_display,ao_metalink) VALUES ('".$this->getPerk()."','".mysql_real_escape_string($this->getCondition())."',".mkn($this->getValue()).",'".mysql_real_escape_string($this->getDisplay())."',".mkn($this->getMetaImage()).")"); - $id = mysql_insert_id(); + $DBc->sqlQuery("INSERT INTO ach_objective (ao_perk,ao_condition,ao_value,ao_display,ao_metalink) VALUES ('".$this->getPerk()."','".$DBc->sqlEscape($this->getCondition())."',".mkn($this->getValue()).",'".$DBc->sqlEscape($this->getDisplay())."',".mkn($this->getMetaImage()).")"); + $id = $DBc->insertID(); $this->setID($id); - $DBc->sqlQuery("INSERT INTO ach_objective_lang (aol_objective,aol_lang,aol_name) VALUES ('".$this->getID()."','en','".mysql_real_escape_string($this->getName())."')"); + $DBc->sqlQuery("INSERT INTO ach_objective_lang (aol_objective,aol_lang,aol_name) VALUES ('".$this->getID()."','en','".$DBc->sqlEscape($this->getName())."')"); } function setCondition($c) { diff --git a/code/web/app/app_achievements_admin/class/AdmPerk_class.php b/code/web/app/app_achievements_admin/class/AdmPerk_class.php index 73c446e40..8b0714961 100644 --- a/code/web/app/app_achievements_admin/class/AdmPerk_class.php +++ b/code/web/app/app_achievements_admin/class/AdmPerk_class.php @@ -1,6 +1,55 @@ setParent($this); + $n->insert(); + $this->addChild($n); + } + + function removeNode($id) { + $res = $this->getChildDataByID($id); + if($res != null) { + $res->delete_me(); + $this->removeChild($id); + } + } + + function updateNode($id) { // PROBABLY USELESS! + $res = $this->getChildDataByID($id); + if($res != null) { + $res->update(); + } + } + + function getPathID($path = "") { + if($path != "") { + $path = ";".$path; + } + $path = $this->getID().$path; + if($this->parent != null) { + return $this->parent->getPathID($path); + } + + return $path; + } + + function getElementByPath($pid) { + $tmp = explode(";",$pid); + if($tmp[0] == $this->getID()) { + if(sizeof($tmp) > 1) { + $c = $this->getChildDataByID($tmp[1]); + if($c != null) { + unset($tmp[0]); + return $c->getElementByPath(implode(";",$tmp)); + } + return null; + } + else { + return $this; + } + } + return null; + } protected $condition; protected $condition_value; @@ -35,9 +84,9 @@ function update() { global $DBc; - $DBc->sqlQuery("UPDATE ach_perk SET ap_parent=".mkn($this->getParentID()).",ap_value='".mysql_real_escape_string($this->getValue())."',ap_condition='".mysql_real_escape_string($this->getCondition())."',ap_condition_value=".mkn($this->getConditionValue()).",ap_dev='".$this->getDev()."',ap_porder='".$this->porder."' WHERE ap_id='".$this->getID()."'"); + $DBc->sqlQuery("UPDATE ach_perk SET ap_parent=".mkn($this->getParentID()).",ap_value='".$DBc->sqlEscape($this->getValue())."',ap_condition='".$DBc->sqlEscape($this->getCondition())."',ap_condition_value=".mkn($this->getConditionValue()).",ap_dev='".$this->getDev()."',ap_porder='".$this->porder."' WHERE ap_id='".$this->getID()."'"); - $DBc->sqlQuery("INSERT INTO ach_perk_lang (apl_perk,apl_lang,apl_name,apl_template) VALUES ('".$this->getID()."','en','".mysql_real_escape_string($this->getName())."',".mkn($this->getTemplate()).") ON DUPLICATE KEY UPDATE apl_name='".mysql_real_escape_string($this->getName())."',apl_template=".mkn($this->getTemplate()).""); + $DBc->sqlQuery("INSERT INTO ach_perk_lang (apl_perk,apl_lang,apl_name,apl_template) VALUES ('".$this->getID()."','en','".$DBc->sqlEscape($this->getName())."',".mkn($this->getTemplate()).") ON DUPLICATE KEY UPDATE apl_name='".$DBc->sqlEscape($this->getName())."',apl_template=".mkn($this->getTemplate()).""); } function insert() { @@ -45,11 +94,11 @@ $this->dev = 1; - $DBc->sqlQuery("INSERT INTO ach_perk (ap_achievement,ap_parent,ap_value,ap_condition,ap_condition_value,ap_dev,ap_porder) VALUES ('".$this->getAchievement()."',".mkn($this->getParentID()).",'".mysql_real_escape_string($this->getValue())."','".mysql_real_escape_string($this->getCondition())."',".mkn($this->getConditionValue()).",'1','".$this->porder."')"); - $id = mysql_insert_id(); + $DBc->sqlQuery("INSERT INTO ach_perk (ap_achievement,ap_parent,ap_value,ap_condition,ap_condition_value,ap_dev,ap_porder) VALUES ('".$this->getAchievement()."',".mkn($this->getParentID()).",'".$DBc->sqlEscape($this->getValue())."','".$DBc->sqlEscape($this->getCondition())."',".mkn($this->getConditionValue()).",'1','".$this->porder."')"); + $id = $DBc->insertID(); $this->setID($id); - $DBc->sqlQuery("INSERT INTO ach_perk_lang (apl_perk,apl_lang,apl_name,apl_template) VALUES ('".$this->getID()."','en','".mysql_real_escape_string($this->getName())."',".mkn($this->getTemplate()).")"); + $DBc->sqlQuery("INSERT INTO ach_perk_lang (apl_perk,apl_lang,apl_name,apl_template) VALUES ('".$this->getID()."','en','".$DBc->sqlEscape($this->getName())."',".mkn($this->getTemplate()).")"); } function setAchievement($a) { @@ -92,29 +141,40 @@ $this->porder = $p; } - function setParentID($p) { #!! CUTTING KILLS NODES! HAVE TO BE REROUTED! + private function reOrder() { + //check if order is OK! + + if($this->parent_id == null) { + + } + else { + + } + } + + function setParentID($p) { #reordering must happen A) after insert B) when updating if($p == null || $p == "null") { //remove from ach list; insert as first! $this->parent_id = null; - $this->parent->removeChild($this->id); - $iter = $this->parent->getIterator(); - $this->parent->addOpen($this,$iter->getNext()); + #$this->parent->removeChild($this->id); + #$iter = $this->parent->getIterator(); + #$this->parent->addOpen($this,$iter->getNext()); } else { //remove from ach list; insert after parent - echo "--".$p."
"; + #echo "--".$p."
"; $this->parent_id = $p; - $this->parent->removeChild($this->id); - $item = $this->parent->getChildByID($this->parent_id); - $tmp = $item->getChild(); - if($tmp != null) { - $this->parent->addOpen($this,$tmp->getID()); - } - else { - $this->parent->addOpen($this,null); - } + #$this->parent->removeChild($this->id); + #$item = $this->parent->getChildByID($this->parent_id); + #$tmp = $item->getChild(); + #if($tmp != null) { + # $this->parent->addOpen($this,$tmp->getID()); + #} + #else { + # $this->parent->addOpen($this,null); + #} } } } diff --git a/code/web/app/app_achievements_admin/class/CSRAchievement_class.php b/code/web/app/app_achievements_admin/class/CSRAchievement_class.php index 2bcd2ad56..8375e01b2 100644 --- a/code/web/app/app_achievements_admin/class/CSRAchievement_class.php +++ b/code/web/app/app_achievements_admin/class/CSRAchievement_class.php @@ -1,6 +1,68 @@ getID()."
"; + if(is_numeric($path)) { + //it's me (id == numeric) + if($this->getID() == $path) { + $this->grant($player); + #echo "grant()
"; + } + } + else { + //get child with the next level id and dispatch + $tmp = explode(";",$path); + + $c = $this->getChildDataByID($tmp[1]); + #echo "...".$tmp[1]; + if($c != null) { // check if it's really own child + unset($tmp[0]); + $c->grantNode(implode(";",$tmp),$player); + #echo "grantNode()
"; + } + } + #echo "end
"; + } + + function denyNode($path,$player) { + if(is_numeric($path)) { + //it's me (id == numeric) + if($this->getID() == $path) { + $this->deny($player); + } + } + else { + //get child with the next level id and dispatch + $tmp = explode(";",$path); + + if($tmp[0] == $this->getID()) { // it's my id! + + $c = $this->getChildDataByID($tmp[1]); + if($c != null) { // check if it's really own child + unset($tmp[0]); + $c->denyNode(implode(";",$tmp),$player); + } + } + } + } + + function getPath($path = "") { + if($path != "") { + $path = ";".$path; + } + + $path = $this->getID().$path; + + if($this->hasParent()) { + $path = $this->parent->getPath($path); + } + + return $path; + } + + private function hasParent() { + return ($this->parent != null); + } function CSRAchievement($data,$parent) { parent::__construct($data,$parent); diff --git a/code/web/app/app_achievements_admin/class/CSRCategory_class.php b/code/web/app/app_achievements_admin/class/CSRCategory_class.php index 6a118c6e3..650469c65 100644 --- a/code/web/app/app_achievements_admin/class/CSRCategory_class.php +++ b/code/web/app/app_achievements_admin/class/CSRCategory_class.php @@ -1,6 +1,68 @@ getID()."
"; + if(is_numeric($path)) { + //it's me (id == numeric) + if($this->getID() == $path) { + $this->grant($player); + #echo "grant()
"; + } + } + else { + //get child with the next level id and dispatch + $tmp = explode(";",$path); + + $c = $this->getChildDataByID($tmp[1]); + #echo "...".$tmp[1]; + if($c != null) { // check if it's really own child + unset($tmp[0]); + $c->grantNode(implode(";",$tmp),$player); + #echo "grantNode()
"; + } + } + #echo "end
"; + } + + function denyNode($path,$player) { + if(is_numeric($path)) { + //it's me (id == numeric) + if($this->getID() == $path) { + $this->deny($player); + } + } + else { + //get child with the next level id and dispatch + $tmp = explode(";",$path); + + if($tmp[0] == $this->getID()) { // it's my id! + + $c = $this->getChildDataByID($tmp[1]); + if($c != null) { // check if it's really own child + unset($tmp[0]); + $c->denyNode(implode(";",$tmp),$player); + } + } + } + } + + function getPath($path = "") { + if($path != "") { + $path = ";".$path; + } + + $path = $this->getID().$path; + + if($this->hasParent()) { + $path = $this->parent->getPath($path); + } + + return $path; + } + + private function hasParent() { + return ($this->parent != null); + } function CSRCategory($id,$race,$cult = null,$civ = null) { parent::__construct($id,$race,$cult,$civ); diff --git a/code/web/app/app_achievements_admin/class/CSRObjective_class.php b/code/web/app/app_achievements_admin/class/CSRObjective_class.php index d336a2ade..71531d227 100644 --- a/code/web/app/app_achievements_admin/class/CSRObjective_class.php +++ b/code/web/app/app_achievements_admin/class/CSRObjective_class.php @@ -1,6 +1,68 @@ getID()."
"; + if(is_numeric($path)) { + //it's me (id == numeric) + if($this->getID() == $path) { + $this->grant($player); + #echo "grant()
"; + } + } + else { + //get child with the next level id and dispatch + $tmp = explode(";",$path); + + $c = $this->getChildDataByID($tmp[1]); + #echo "...".$tmp[1]; + if($c != null) { // check if it's really own child + unset($tmp[0]); + $c->grantNode(implode(";",$tmp),$player); + #echo "grantNode()
"; + } + } + #echo "end
"; + } + + function denyNode($path,$player) { + if(is_numeric($path)) { + //it's me (id == numeric) + if($this->getID() == $path) { + $this->deny($player); + } + } + else { + //get child with the next level id and dispatch + $tmp = explode(";",$path); + + if($tmp[0] == $this->getID()) { // it's my id! + + $c = $this->getChildDataByID($tmp[1]); + if($c != null) { // check if it's really own child + unset($tmp[0]); + $c->denyNode(implode(";",$tmp),$player); + } + } + } + } + + function getPath($path = "") { + if($path != "") { + $path = ";".$path; + } + + $path = $this->getID().$path; + + if($this->hasParent()) { + $path = $this->parent->getPath($path); + } + + return $path; + } + + private function hasParent() { + return ($this->parent != null); + } #private $nodes; diff --git a/code/web/app/app_achievements_admin/class/CSRPerk_class.php b/code/web/app/app_achievements_admin/class/CSRPerk_class.php index fcd8bd668..97f34ec36 100644 --- a/code/web/app/app_achievements_admin/class/CSRPerk_class.php +++ b/code/web/app/app_achievements_admin/class/CSRPerk_class.php @@ -1,6 +1,68 @@ getID()."
"; + if(is_numeric($path)) { + //it's me (id == numeric) + if($this->getID() == $path) { + $this->grant($player); + #echo "grant()
"; + } + } + else { + //get child with the next level id and dispatch + $tmp = explode(";",$path); + + $c = $this->getChildDataByID($tmp[1]); + #echo "...".$tmp[1]; + if($c != null) { // check if it's really own child + unset($tmp[0]); + $c->grantNode(implode(";",$tmp),$player); + #echo "grantNode()
"; + } + } + #echo "end
"; + } + + function denyNode($path,$player) { + if(is_numeric($path)) { + //it's me (id == numeric) + if($this->getID() == $path) { + $this->deny($player); + } + } + else { + //get child with the next level id and dispatch + $tmp = explode(";",$path); + + if($tmp[0] == $this->getID()) { // it's my id! + + $c = $this->getChildDataByID($tmp[1]); + if($c != null) { // check if it's really own child + unset($tmp[0]); + $c->denyNode(implode(";",$tmp),$player); + } + } + } + } + + function getPath($path = "") { + if($path != "") { + $path = ";".$path; + } + + $path = $this->getID().$path; + + if($this->hasParent()) { + $path = $this->parent->getPath($path); + } + + return $path; + } + + private function hasParent() { + return ($this->parent != null); + } function CSRPerk($data,$parent) { parent::__construct($data,$parent); diff --git a/code/web/app/app_achievements_admin/include/adm_render_ach.php b/code/web/app/app_achievements_admin/include/adm_render_ach.php index 133d3ed56..1639d5b66 100644 --- a/code/web/app/app_achievements_admin/include/adm_render_ach.php +++ b/code/web/app/app_achievements_admin/include/adm_render_ach.php @@ -53,12 +53,17 @@ } function adm_render_category(&$cat) { - $html = ""; + $html = ""; if($_REQUEST['confirm'] == "delete") { $tmp = $cat->getElementByPath($_REQUEST['id']); if($tmp != null) { - $html .= "
+ $html .= "
Delete Are you sure you want to delete ".$tmp->getName()."

@@ -82,15 +87,15 @@ add new achievement

"; - if(($prog/$val) > 0.85) { + if(($prog/$val) > 0.5) { $html .= " ".nf($prog)." / ".nf($val)." "; } $html .= " "; - if(($prog/$val) <= 0.85) { + if(($prog/$val) <= 0.5) { $html .= " ".nf($prog)." / ".nf($val)." "; } $html .= "
- + - + - + - + - + - + - + - + - + - + @@ -187,41 +192,6 @@ return $html; } - function ach_render_achievement_done(&$ach) { - global $_CONF; - - $html = '
name:name:
naming template:naming template:
cult:cult:
civilization:civilization:
image:image:

perk name:perk name:
naming template:naming template:
perk yubopoints:perk yubopoints:
condition:condition:
condition value:condition value:
- - - - - - - - - - - - - - - -
-
- - - - -
'.$ach->getName().'
- '.$ach->getValueDone().'
-
'; - $html .= ach_render_perk_done($ach); - $html .= '
-
'; - - return $html; - } - function ach_render_achievement_open(&$ach) { global $_CONF,$menu; @@ -237,9 +207,9 @@
-
'; +
[ach:]'.$ach->getName().'
'; - $html .= "
[ach:]'.$ach->getName().'getDev()."&id=".$ach->getPathID()."'>getDev()."&id=".$ach->getPathID()."#ach_".$ach->getID()."'>getID()."' style='margin-bottom:3px;margin-top:3px;display:none;color:#000000;background-color:#FFFFFF;'> -
+ getID()."'>
edit achievement - + - + - + - + - + @@ -310,24 +280,24 @@ "; $html .= "
name:name: getName()."\" />
naming template:naming template: getTemplate()."\" />
cult:cult:
civilization:civilization:
image:image:
- + - + - + - + - + - + @@ -368,7 +338,7 @@ move achievement
name:name:
naming template:naming template:
yubopoints:yubopoints:
parent:parent:
condition:condition:
condition value:condition value:
- +
new category:new category: "; + $html .= "
[perk:]".$perk->getDisplayName()."
"; - $html .= ""; - #} - - $html .= "
[perk:]".$perk->getDisplayName()."getDev()."&id=".$perk->getPathID()."'>getDev()."&id=".$perk->getPathID()."#perk_".$perk->getID()."'>getID()."' style='margin-bottom:3px;margin-top:3px;display:none;color:#000000;background-color:#FFFFFF;'> - + getID()."'>
edit perk - + - + - + - + - + - + @@ -504,16 +474,16 @@ "; $html .= "
name:name:
naming template:naming template: getTemplate()."\" />
yubopoints:yubopoints:
parent:parent:
condition:condition:
condition value:condition value:
- + - + - + - + - + @@ -557,24 +527,6 @@ return $html; } - function ach_render_perk_done(&$ach) { - global $_CONF; - $html = ""; - - $perk_list = $ach->getDone(); - while($perk_list->hasNext()) { - $perk = $perk_list->getNext(); - #foreach($perk_list as $elem) { - #$perk = $ach->getChild($elem); - if($perk->inDev()) { - continue; - } - $html .= "
".$perk->getName()." ( ".date('d.m.Y',$perk->getDone())." ) ".$perk->getValue()."
"; - } - - return $html; - } - function ach_render_obj_list($obj) { $html = "
name:name:
type:type:
trigger condition:trigger condition:
trigger value:trigger value:
metalink:metalink:
"; @@ -624,16 +576,16 @@ #$perk = $elem->getParent(); $html .= "
- + - + - + - + - + @@ -699,7 +651,7 @@ $html .= " "; } - $html .= "[obj:]".$obj->getDisplayName().""; + $html .= "[obj:]".$obj->getDisplayName().""; return $html; } @@ -719,7 +671,7 @@ return "
name:name:
type:type:
trigger condition:trigger condition:
trigger value:trigger value:
metalink:metalink:
- +
getMetaImage()."' width='20px' /> [obj:]".$obj->getDisplayName()." [obj:]".$obj->getDisplayName()."
"; } @@ -750,7 +702,7 @@ else { $col = "#999999"; } - $html .= "
[obj: untitled]
"; + $html .= ""; #} #$html .= ach_render_progressbar($obj->getProgress(),$obj->getValue(),350); diff --git a/code/web/app/app_achievements_admin/include/adm_render_atom.php b/code/web/app/app_achievements_admin/include/adm_render_atom.php index 133d3ed56..f1816f75e 100644 --- a/code/web/app/app_achievements_admin/include/adm_render_atom.php +++ b/code/web/app/app_achievements_admin/include/adm_render_atom.php @@ -26,13 +26,8 @@ $iter = $menu->getIterator(); while($iter->hasNext()) { $curr = $iter->getNext(); - #$sz = $menu->getSize(); - #for($i=0;$i<$sz;$i++) { - # $curr = $menu->getChild($i); - if($curr->inDev()) { - #continue; - } - $html .= " + + $html .= "
"; if($sub == 0) { $html .= ""; @@ -52,805 +47,208 @@ return $html; } - function adm_render_category(&$cat) { - $html = ""; - - if($_REQUEST['confirm'] == "delete") { - $tmp = $cat->getElementByPath($_REQUEST['id']); - if($tmp != null) { - $html .= ""; + function atom_render_category(&$cat) { + $html = " + + + + "; + $iter = $cat->getOpen(); while($iter->hasNext()) { $curr = $iter->getNext(); - #$sz = sizeof($tmp); - #for($i=0;$i<$sz;$i++) { - #echo "B"; - if($curr->inDev()) { - #continue; - } + $html .= ach_render_achievement_open($curr); } return $html; } - function ach_render_achievement_done(&$ach) { - global $_CONF; - - $html = '
getImage()."' />
- - - - - - - - - - - - - - - -
-
- - - - -
'.$ach->getName().'
- '.$ach->getValueDone().'
-
'; - $html .= ach_render_perk_done($ach); - $html .= '
-
'; - - return $html; - } - function ach_render_achievement_open(&$ach) { global $_CONF,$menu; - $html = '
- - - - - - - - - - - - - - - -
-
- - - -
'; - - $html .= " -
[ach:]'.$ach->getName().'getDev()."&id=".$ach->getPathID()."'> "; + $open = explode(";",$_REQUEST['id']); - $html .= " "; + $o = "none"; + if($open[1] == $ach->getID()) { + $o = "block"; + } - $html .= " "; - - $html .= "   getPathID()."'>
"; - - $html .= '
-
'; - - $html .= ""; - - $html .= ""; - - $html .= ""; - - $html .= ach_render_perk_open($ach); - $html .= '
-
'; + $html = "
+
[+] ".$ach->getName()." (ties= race: ".$ach->getTieRace()."; civ: ".$ach->getTieCiv()."; cult: ".$ach->getTieCult().")
+
".ach_render_perk_open($ach)."
+
"; return $html; } function ach_render_perk_open(&$ach) { - #echo var_export($perk_list,true); $html = ""; + $open = explode(";",$_REQUEST['id']); + $perk_list = $ach->getOpen(); while($perk_list->hasNext()) { $perk = $perk_list->getNext(); - #$perk = $ach->getChild($perk_list[0]); - - if($perk->inDev()) { - #return $html; + $o = "none"; + if($open[2] == $perk->getID()) { + $o = "block"; } - - #if($perk->getName() != null) { - $html .= ""; - $html .= " -
[perk:]".$perk->getDisplayName()."getDev()."&id=".$perk->getPathID()."'> "; - - $html .= " "; - - $html .= "   getPathID()."'>
"; - - $html .= ""; - - $html .= ""; - #} - #if($perk->objDrawable()) { - $html .= ach_render_obj_list($perk->getIterator()); - #} - } - - return $html; - } - - function ach_render_perk_done(&$ach) { - global $_CONF; - $html = ""; - - $perk_list = $ach->getDone(); - while($perk_list->hasNext()) { - $perk = $perk_list->getNext(); - #foreach($perk_list as $elem) { - #$perk = $ach->getChild($elem); - if($perk->inDev()) { - continue; - } - $html .= "
".$perk->getName()." ( ".date('d.m.Y',$perk->getDone())." ) ".$perk->getValue()."
"; + $html .= "
+
[+] ".$perk->getDisplayName()." (condition= ".$perk->getCondition().": ".$perk->getConditionValue().")
+
".ach_render_obj_list($perk->getIterator())."
+
"; } return $html; } function ach_render_obj_list($obj) { - $html = "
"; + $html = ""; - #$i = 0; - #$skip = false; + $open = explode(";",$_REQUEST['id']); while($obj->hasNext()) { - #foreach($obj as $elem) { $elem = $obj->getNext(); - #if(($i%2) == 0) { - $html .= ""; + + #$o = "none"; + #if($open[3] == $elem->getID()) { + $o = "block"; #} + $html .= "
+
[+] ".$elem->getDisplayName()." (condition= ".$elem->getCondition().": ".$elem->getValue().")
+
+ +
"; - #} - - switch($elem->getDisplay()) { - case "meta": - $html .= ""; - #} - $html .= ""; - #$i++; - break; - case "simple": - $html .= ""; - break; - case "hidden": - default: - //do nothing - #$skip = true; - #if(($i%2) == 1) { - # $html .= ""; - #} - $html .= ""; - #$i++; - break; - } - - $html .= " -
".ach_render_obj_meta($elem).""; - break; - case "value": - #if(($i%2) == 1) { - # $html .= "
".ach_render_obj_value($elem)."".ach_render_obj_simple($elem)."
".ach_render_obj_hidden($elem).""; - - #$html .= " "; - - $html .= "   getPathID()."'>
"; - - #$perk = $elem->getParent(); - - $html .= ""; - - #if(($i%2) == 1) { - $html .= "
+ + + + + + + + + +
 mandatory
+
+
+ + + ".ach_render_atom_list($elem->getIterator())." + + "; + } + + return $html; + } + + function ach_render_atom_list($atom) { + $html = ""; + + while($atom->hasNext()) { + $elem = $atom->getNext(); - #if(!$skip) { - # $i++; - #} - #$skip = false; + $html .= "
getPathID()."#obj_".$elem->getObjective()."'> + + + + + + + + + + + + + + +
getPathID()."#obj_".$elem->getObjective()."'>[X]
".$elem->getRulesetParsed()."
getMandatory() == 1) { + $html .= " checked='checked'"; + } + $html .= " /> mandatory
+

"; } - #if(($i%2) == 1) { - # $html .= "
"; - - return $html; - } - - function ach_render_obj_simple(&$obj) { - global $_CONF; - $html = ""; - if($obj->isdone()) { - $html .= " "; - } - else { - $html .= " "; - } - - $html .= "[obj:]".$obj->getDisplayName().""; - - return $html; - } - - function ach_render_obj_meta(&$obj) { - global $_CONF; - $html = ""; - if($obj->isdone()) { - $col = "#71BE02"; - $grey = ""; - } - else { - $col = "#999999"; - $grey = "grey/"; - } - - return " - - - - -
getMetaImage()."' width='20px' /> [obj:]".$obj->getDisplayName()."
"; - } - - function ach_render_obj_value(&$obj) { - $html = ""; - #if($obj->getName() != null) { - if($obj->isdone()) { - $col = "#71BE02"; - } - else { - $col = "#999999"; - } - $html .= "
[obj:]".$obj->getDisplayName()."
"; - #} - - $html .= ach_render_progressbar($obj->getProgress(),$obj->getValue(),350); - - return $html; - } - - function ach_render_obj_hidden(&$obj) { - $html = ""; - #if($obj->getName() != null) { - if($obj->isdone()) { - $col = "#71BE02"; - } - else { - $col = "#999999"; - } - $html .= "
[obj: untitled]
"; - #} - - #$html .= ach_render_progressbar($obj->getProgress(),$obj->getValue(),350); - - return $html; - } - - function ach_render_progressbar($prog,$val,$width) { - $val = max(1,$val); - $left = floor($width*(100*($prog/$val))/100); - - $html = " - - - - - -
"; - if(($prog/$val) > 0.85) { - $html .= " ".nf($prog)." / ".nf($val)." "; - } - $html .= ""; - if(($prog/$val) <= 0.85) { - $html .= " ".nf($prog)." / ".nf($val)." "; - } - $html .= "
"; - - return $html; - } - - - function ach_render_tiebar($cult = "c_neutral", $civ = "c_neutral",&$cat) { - global $_USER,$_CONF; - - $html = " - -
- - "; - if($cat->isTiedCult()) { - $html.= " - +
- - + "; + if($sub == 0) { + $html .= ""; + } + $html .= " + +
getImage()."' />".$curr->getName()."
"; + if($curr->hasOpenCat() != 0) { + $html .= "
".adm_render_mnode($curr,($sub+4))."
"; + } + } + + return $html; + } + + function atom_render_category(&$cat) { + $html = ""; + + $iter = $cat->getOpen(); + while($iter->hasNext()) { + $curr = $iter->getNext(); + + $html .= ach_render_achievement_open($curr); + } + + return $html; + } + + function ach_render_achievement_open(&$ach) { + global $_CONF,$menu; + + $open = explode(";",$_REQUEST['id']); + + $o = "none"; + if($open[1] == $ach->getID()) { + $o = "block"; + } + + $html = "
+
[+] ".$ach->getName()." (ties= race: ".$ach->getTieRace()."; civ: ".$ach->getTieCiv()."; cult: ".$ach->getTieCult().")
+
".ach_render_perk_open($ach)."
+
"; + + return $html; + } + + function ach_render_perk_open(&$ach) { + $html = ""; + + $open = explode(";",$_REQUEST['id']); + + $perk_list = $ach->getOpen(); + while($perk_list->hasNext()) { + + $perk = $perk_list->getNext(); + + $o = "none"; + if($open[2] == $perk->getID()) { + $o = "block"; + } + + $html .= "
+
[+] ".$perk->getDisplayName()." (condition= ".$perk->getCondition().": ".$perk->getConditionValue().")
+
".ach_render_obj_list($perk->getIterator())."
+
"; + } + + return $html; + } + + function ach_render_obj_list($obj) { + $html = ""; + + $open = explode(";",$_REQUEST['id']); + + while($obj->hasNext()) { + $elem = $obj->getNext(); + + #$o = "none"; + #if($open[3] == $elem->getID()) { + $o = "block"; + #} + + $html .= "
+
[+] ".$elem->getDisplayName()." (condition= ".$elem->getCondition().": ".$elem->getValue().")
+
+ + + ".ach_render_atom_list($elem->getIterator())." +
+
"; + } + + return $html; + } + + function ach_render_atom_list($atom) { + $html = ""; + + while($atom->hasNext()) { + $elem = $atom->getNext(); + + $html .= "
getPathID()."#obj_".$elem->getObjective()."'> + + + + + + + + + + + + + + +
getPathID()."#obj_".$elem->getObjective()."'>[X]
".$elem->getRulesetParsed()."
getMandatory() == 1) { + $html .= " checked='checked'"; + } + $html .= " /> mandatory
+

"; + } + + return $html; + } +?> \ No newline at end of file diff --git a/code/web/app/app_achievements_admin/include/adm_render_menu.php b/code/web/app/app_achievements_admin/include/adm_render_menu.php index d7fc5669d..ffc4505f7 100644 --- a/code/web/app/app_achievements_admin/include/adm_render_menu.php +++ b/code/web/app/app_achievements_admin/include/adm_render_menu.php @@ -44,7 +44,7 @@ "; if($_REQUEST['ac_id'] > 0 && $_REQUEST['confirm'] == "delete") { - $curr = $menu->getChildDataByID($_REQUEST['ac_id']); + $curr = $menu->getNode($_REQUEST['ac_id']); $html .= "
Are you sure you want to delete this category?"; @@ -95,8 +95,8 @@ if($curr->inDev()) { $html .= ""; } - $html .= "
getID()."'> -
+
create new sub-category @@ -135,7 +135,7 @@ } $html .= "