#1470 repo update to latest version (web app)
--HG-- branch : gsoc2012-achievementshg/feature/gsoc2013-dfighter
parent
96949830e6
commit
c6c47d6d88
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
abstract class Entity {
|
||||
private $name;
|
||||
|
||||
function getName() {
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
function setName($n) {
|
||||
$this->name = $n;
|
||||
}
|
||||
}
|
||||
?>
|
@ -1,31 +1,21 @@
|
||||
<?php
|
||||
require_once("../../webig/config.php");
|
||||
|
||||
$CONF = array();
|
||||
|
||||
$CONF['logging'] = true;
|
||||
$CONF['logfile'] = "log/AchWebParser.log";
|
||||
|
||||
$CONF['mysql_error'] = "PRINT";
|
||||
$CONF['mysql_server'] = "localhost";
|
||||
$CONF['mysql_user'] = "root";
|
||||
$CONF['mysql_pass'] = "";
|
||||
$CONF['mysql_database'] = "app_achievements";
|
||||
|
||||
$CONF['data_source'] = array("PDRtoXMLdriver");
|
||||
$CONF['mysql_server'] = RYAPI_WEBDB_HOST;
|
||||
$CONF['mysql_user'] = RYAPI_WEBDB_LOGIN;
|
||||
$CONF['mysql_pass'] = RYAPI_WEBDB_PASS;
|
||||
$CONF['mysql_database'] = "app_achievements_test";
|
||||
|
||||
/*$CONF['synch_chars'] = true;
|
||||
$CONF['char_mysql_server'] = "localhost";
|
||||
$CONF['char_mysql_user'] = "root";
|
||||
$CONF['char_mysql_pass'] = "";
|
||||
$CONF['char_mysql_database'] = "ring_open";*/
|
||||
|
||||
$CONF['fork'] = true;
|
||||
$CONF['char_mysql_database'] = "app_achievements";
|
||||
|
||||
$CONF['self_host'] = "127.0.0.1";
|
||||
$CONF['self_path'] = "/path/to/AchWebParser.php";
|
||||
|
||||
$CONF['sleep_time'] = 1500;
|
||||
|
||||
$CONF['enable_selfcall'] = true;
|
||||
|
||||
$CONF['timeout'] = 60*60;
|
||||
$CONF['data_source'] = array("PDRtoXMLdriver");
|
||||
?>
|
@ -0,0 +1,128 @@
|
||||
<?php
|
||||
@include_once("script/include_InPoly_class.php");
|
||||
|
||||
function in_region($pos,$where) {
|
||||
$region = array();
|
||||
|
||||
/*$region['dunes_of_exile'] = array("16254 -25988","16510 -26034","16590 -25980","16644 -25866","16616 -25752","16664 -25630","16690 -25510","16788 -25302","16844 -25174","16792 -24680","16964 -24434","17020 -24100","16266 -23846","16118 -23882","16068 -24472","15936 -24610","15924 -24884","16176 -25508","16246 -25504","16274 -25684","16278 -25852","16206 -25928","16254 -25988");
|
||||
|
||||
$region['frahar_towers'] = array("16968 -24444","16798 -24652","16796 -24830","16822 -24982","16830 -25072","16848 -25166","16690 -25504","16620 -25760","16646 -25872","16598 -25964","16612 -26012","16768 -26018","16782 -25988","16812 -25990","16816 -26014","16860 -26010","16916 -26052","17004 -26040","17000 -25984","17102 -25928","17136 -25856","17152 -25732","17186 -25748","17182 -25992","17208 -26018","17268 -25994","17256 -25962","17340 -25914","17338 -25866","17394 -25834","17436 -25716","17436 -25586","17448 -25386","17454 -25026","17468 -24896","17472 -24736","17586 -24560","17606 -24488","17592 -24276","17594 -24154","16968 -24444");
|
||||
|
||||
$region['oflovaks_oasis'] = array("17400 -25838","17420 -25890","17508 -25872","17532 -25826","17568 -25820","17610 -25840","17634 -25876","17670 -25838","17662 -25776","17702 -25726","17700 -25662","17770 -25668","17774 -25602","17798 -25558","17784 -25498","17846 -25436","17960 -25454","17994 -25432","18074 -25444","18066 -25372","18090 -25304","18092 -25046","18152 -24862","18160 -24730","18154 -24644","18168 -24326","18122 -24196","17596 -24244","17588 -24338","17606 -24502","17512 -24684","17462 -24732","17460 -24846","17464 -25000","17446 -25078","17452 -25336","17430 -25604","17440 -25688","17400 -25838");
|
||||
|
||||
$region['imperial_dunes'] = array("18146 -24058","18134 -24212","18166 -24314","18154 -24648","18162 -24758","18130 -24936","18092 -25054","18090 -25308","18174 -25338","18236 -25420","18258 -25422","18274 -25466","18368 -25462","18454 -25496","18534 -25482","18570 -25420","18546 -25378","18560 -25332","18540 -25306","18548 -25250","18508 -25204","18572 -25178","18570 -25128","18602 -25114","18578 -25048","18586 -25016","18664 -25012","18668 -24964","18642 -24868","18660 -24784","18718 -24784","18702 -24846","18708 -24894","18724 -24940","18768 -24958","18762 -24890","18804 -24880","18822 -24844","18862 -24842","18888 -24862","18960 -24800","19012 -24830","19068 -24800","19124 -24776","19124 -24750","19066 -24730","19058 -24690","19102 -24668","19152 -24686","19224 -24622","19192 -24584","19220 -24532","19248 -24550","19320 -24476","19292 -24434","19320 -24404","19292 -24354","19330 -24322","19366 -24362","19406 -24356","19426 -24308","19506 -24274","19490 -24228","19592 -24042","-256048 -628","-256584 -628","18146 -24058");
|
||||
|
||||
$region['outlaw_canyon'] = array("18518 -25216","18560 -25262","18538 -25298","18558 -25342","18546 -25390","18576 -25420","18554 -25504","18518 -25548","18564 -25622","18560 -25708","18624 -25766","18660 -25852","18680 -25918","18726 -25970","18756 -26052","18800 -26090","18854 -26088","18878 -26122","18932 -26104","18932 -26046","18972 -26032","19044 -26056","19080 -26008","19122 -26064","19166 -26032","19220 -26112","19270 -26084","19254 -26022","19288 -25994","19392 -25972","19462 -26006","19536 -25966","19430 -25932","19326 -25918","19216 -25956","19110 -25906","19148 -25878","19130 -25822","19226 -25800","19158 -25766","19198 -25726","19202 -25676","19252 -25682","19264 -25612","19242 -25582","19196 -25586","19186 -25554","19232 -25546","19240 -25486","19312 -25484","19332 -25422","19378 -25396","19364 -25350","19398 -25344","19362 -25300","19364 -25238","19434 -25226","19456 -25272","19496 -25264","19504 -25208","19446 -25166","19502 -25118","19570 -25146","19590 -25082","19670 -24994","19734 -25000","19752 -24970","19742 -24938","19784 -24922","19860 -24974","19890 -24948","19876 -24892","19810 -24858","19862 -24798","19970 -24840","19958 -24896","19986 -24996","20020 -24884","20026 -24770","20086 -24722","20130 -24698","20196 -24704","20294 -24668","20310 -24618","20274 -24376","20034 -24250","19940 -24152","19772 -24088","19526 -24136","19494 -24228","19494 -24290","19434 -24308","19380 -24368","19330 -24330","19294 -24362","19314 -24412","19292 -24446","19310 -24484","19254 -24544","19218 -24536","19184 -24582","19224 -24616","19146 -24686","19080 -24666","19052 -24714","19144 -24762","19012 -24826","18956 -24802","18884 -24862","18842 -24840","18758 -24904","18770 -24956","18708 -24948","18720 -24900","18706 -24776","18652 -24776","18638 -24888","18666 -25002","18580 -25028","18604 -25122","18576 -25136","18560 -25198","18518 -25216");
|
||||
|
||||
$region['sawdust_mines'] = array("19284 -26078","19368 -26066","19660 -26082","19726 -26112","19786 -26070","19970 -26100","20094 -26078","19940 -25808","20222 -25488","20308 -25234","20314 -25064","20208 -24702","20122 -24704","20026 -24776","20012 -24930","19994 -25000","19948 -24896","19974 -24846","19872 -24808","19802 -24854","19886 -24904","19886 -24956","19850 -24974","19776 -24928","19732 -24948","19752 -24976","19710 -25000","19664 -24992","19608 -25096","19578 -25098","19572 -25136","19490 -25118","19450 -25176","19504 -25226","19500 -25268","19440 -25260","19422 -25228","19360 -25236","19370 -25310","19398 -25356","19306 -25460","19308 -25498","19236 -25504","19228 -25550","19188 -25562","19198 -25592","19244 -25586","19272 -25626","19254 -25676","19200 -25676","19182 -25742","19152 -25778","19224 -25798","19164 -25822","19126 -25824","19130 -25880","19098 -25904","19212 -25958","19340 -25916","19514 -25968","19470 -26006","19378 -25978","19280 -25994","19254 -26032","19284 -26078");
|
||||
|
||||
$region['savage_dunes'] = array("19272 -26074","19466 -26068","19718 -26102","19834 -26068","19978 -26096","20036 -26088","20310 -26460","20320 -26682","20320 -26800","20280 -26958","20206 -27022","19926 -26970","18092 -26922","18096 -26758","18032 -26680","17994 -26678","17956 -26610","18106 -26610","18116 -26576","18174 -26558","18210 -26602","18268 -26570","18296 -26606","18362 -26596","18410 -26622","18482 -26582","18534 -26568","18538 -26510","18466 -26462","18486 -26424","18568 -26398","18608 -26404","18648 -26392","18624 -26314","18646 -26244","18694 -26244","18688 -26202","18722 -26192","18728 -26116","18814 -26128","18824 -26090","18892 -26124","18936 -26094","18936 -26048","18968 -26032","19040 -26062","19082 -26008","19116 -26058","19164 -26026","19220 -26116","19272 -26074");
|
||||
|
||||
$region['scorched_corridor'] = array("17954 -26620","17108 -26814","16788 -26780","16274 -26616","16012 -26236","16094 -26036","16252 -26000","16504 -26054","16606 -25978","16618 -26022","16764 -26020","16786 -25970","16822 -26022","16872 -26010","16922 -26064","17004 -26036","17002 -25974","17134 -25914","17148 -25714","17196 -25760","17186 -25816","17200 -25876","17184 -25932","17208 -26022","17268 -26006","17254 -25954","17346 -25918","17346 -25854","17392 -25834","17426 -25888","17512 -25862","17534 -25818","17594 -25832","17636 -25874","17670 -25840","17666 -25772","17700 -25726","17692 -25654","17762 -25666","17796 -25552","17786 -25494","17842 -25438","18070 -25442","18068 -25364","18084 -25312","18176 -25338","18270 -25462","18548 -25492","18526 -25550","18572 -25648","18562 -25710","18618 -25762","18668 -25864","18698 -25952","18738 -25988","18778 -26074","18832 -26098","18782 -26134","18720 -26120","18724 -26196","18684 -26214","18676 -26252","18630 -26262","18650 -26394","18588 -26410","18492 -26438","18474 -26476","18542 -26526","18528 -26580","18430 -26618","18342 -26598","18290 -26604","18260 -26578","18200 -26602","18170 -26562","18114 -26584","18092 -26610","17954 -26620");
|
||||
|
||||
$region['nexus_minor'] = array("9160 -6100","7852 -6740","7892 -7168","8120 -7420","8356 -7612","8560 -7672","8668 -8320","-252676 -7900","9340 -7732","9436 -7352","9752 -7312","9668 -6640","9580 -6104","9160 -6100");
|
||||
|
||||
$region['winds_of_muse'] = array("14476 -30936","15300 -30864","15228 -31408","15460 -31656","15988 -31496","17036 -30592","16932 -29720","16460 -29528","15580 -29608","15116 -29680","14988 -29984","14588 -30000","14308 -30624","14476 -30936");
|
||||
|
||||
$region['bounty_beaches'] = array("14364 -31280","15172 -31280","15364 -31688","15228 -32184","15260 -33280","14924 -33320","14676 -33200","14284 -33336","13788 -33008","13764 -32784","13760 -32356","13852 -32080","13768 -31876","13780 -31636","13792 -31428","14364 -31280");
|
||||
|
||||
$region['fount'] = array("14276 -33456","14668 -33144","15052 -33440","15500 -33376","15916 -34232","16244 -34288","16284 -34632","15732 -34864","15396 -34800","14636 -34864","14268 -34592","14276 -33456");
|
||||
|
||||
$region['enchanted_isle'] = array("17036 -34072","16764 -34352","16956 -34744","17348 -34856","17668 -34864","18164 -34672","18388 -34520","18660 -34456","18636 -33584","18612 -33264","17428 -33472","17060 -33680","17036 -34072");
|
||||
|
||||
$region['liberty_lake'] = array("15228 -32288","15292 -32720","15284 -33256","15804 -33696","15848 -33752","16016 -33596","16180 -33444","16308 -33348","16408 -33328","16416 -33244","16580 -33180","16656 -33352","16844 -33516","17260 -33576","17980 -33320","18628 -33264","18740 -32512","18700 -31224","18668 -30600","17844 -30624","17796 -30856","17684 -31024","17640 -31324","17508 -31564","17620 -31684","17736 -31736","17768 -31812","17724 -31916","17524 -31948","17372 -32020","17380 -32116","17316 -32144","17292 -32252","17240 -32156","17116 -32124","16952 -32212","16892 -32124","16800 -32084","16784 -32000","16672 -31976","16604 -31912","16516 -31916","16468 -31848","16540 -31804","16480 -31760","16476 -31700","16180 -31432","15312 -31964","15228 -32288");
|
||||
|
||||
$region['dew_drops'] = array("17116 -30504","16188 -31392","16322 -31574","16476 -31706","16486 -31766","16546 -31806","16464 -31850","16534 -31934","16592 -31912","16694 -31982","16778 -31994","16800 -32086","16896 -32126","16944 -32212","17028 -32182","17102 -32128","17218 -32144","17270 -32186","17284 -32246","17322 -32240","17318 -32148","17386 -32116","17378 -32004","17554 -31936","17728 -31920","17776 -31814","17734 -31732","17632 -31690","17526 -31580","17514 -31552","17632 -31346","17686 -31030","17802 -30856","17850 -30658","17116 -30504");
|
||||
|
||||
$region['lagoons_of_loria'] = array("16956 -29960","17116 -30488","18540 -30472","18724 -30952","18700 -32000","19116 -32272","19776 -32084","19740 -31316","20000 -30688","19972 -29992","19476 -29760","19204 -29464","17988 -29456","17544 -29496","16956 -29960");
|
||||
|
||||
$region['resting_water'] = array("15748 -33856","15944 -34232","16352 -34384","16800 -34364","17048 -34040","17032 -33612","16886 -33542","16726 -33416","16646 -33354","16614 -33200","16530 -33196","16470 -33240","16430 -33246","16410 -33326","16286 -33366","16196 -33428","16130 -33496","16060 -33534","16022 -33612","15938 -33648","15908 -33698","15766 -33800","15748 -33856");
|
||||
|
||||
$region['hidden_source'] = array("356 -964","912 -1552","1244 -1940","1422 -2004","1546 -1918","1642 -1956","1674 -2012","1730 -2008","1758 -2040","1836 -2020","1832 -1968","1868 -1958","1876 -1888","2024 -1848","2048 -1800","2092 -1802","2108 -1756","2154 -1774","2202 -1764","2234 -1726","2196 -1674","2230 -1596","2266 -1588","2282 -1548","2350 -1518","2324 -1480","2334 -1448","2368 -1442","2374 -1350","2430 -1316","2466 -1322","2522 -1256","1996 -580","1560 -336","1236 -324","636 -416","320 -664","356 -964");
|
||||
|
||||
$region['knoll_of_dissent'] = array("1256 -2232","1976 -2888","2816 -2856","2988 -2790","3132 -2698","3274 -2624","3366 -2552","3522 -2542","3580 -2568","3656 -2566","3684 -2498","3836 -2412","4492 -2148","4460 -2042","4382 -1890","4320 -1848","4284 -1802","4204 -1742","4154 -1656","4080 -1620","3990 -1540","3942 -1522","3854 -1406","3780 -1388","3742 -1326","3590 -1180","2536 -1236","2472 -1310","2378 -1342","2366 -1444","2320 -1464","2340 -1524","2288 -1540","2268 -1582","2230 -1602","2196 -1674","2236 -1728","2198 -1766","2116 -1766","2078 -1800","2032 -1816","2030 -1850","1880 -1882","1866 -1962","1836 -1966","1832 -2020","1758 -2032","1726 -2012","1674 -2008","1638 -1952","1556 -1922","1296 -2072","1256 -2232");
|
||||
|
||||
$region['grove_of_confusion'] = array("3590 -1182","3748 -1330","3780 -1388","3858 -1402","3944 -1532","3986 -1534","4084 -1630","4140 -1644","4214 -1756","4304 -1822","4336 -1872","4372 -1882","4566 -2240","5292 -1924","6240 -1280","6240 -320","4352 -320","3664 -560","3590 -1182");
|
||||
|
||||
$region['majestic_garden'] = array("3842 -2410","3688 -2498","3654 -2570","3576 -2576","3524 -2544","3368 -2560","3234 -2644","3198 -2676","3106 -2706","2850 -2882","3320 -3472","3216 -3968","4240 -4764","4360 -4856","4428 -4844","4556 -4876","4632 -4868","4690 -4904","4756 -4926","4814 -4954","5232 -4934","5412 -4376","5124 -3908","5160 -3380","4936 -2948","4256 -2820","4184 -2564","3842 -2410");
|
||||
|
||||
$region['fleeting_garden'] = array("4056 -4740","4242 -4754","4354 -4852","4428 -4848","4540 -4876","4638 -4870","4690 -4912","4756 -4920","4810 -4954","5130 -4940","5424 -5552","6020 -5536","6176 -5656","6240 -6368","5988 -6440","5830 -6372","5722 -6286","5626 -6270","5572 -6224","5346 -6242","5302 -6270","5184 -6274","5100 -6306","4822 -6380","4552 -6020","4474 -5804","4410 -5718","4324 -5582","4202 -5416","4110 -5410","4036 -5354","4010 -5282","3812 -5116","3650 -4904","3902 -4726","4056 -4740");
|
||||
|
||||
$region['upper_bog'] = array("4588 -6150","4480 -5818","4416 -5720","4318 -5572","4210 -5426","4110 -5412","4044 -5356","4010 -5284","3810 -5112","3642 -4892","3388 -5268","3100 -5712","2904 -6848","2768 -7792","3636 -7788","4616 -7776","4520 -7288","4688 -6664","4588 -6150");
|
||||
|
||||
$region['heretics_hovel'] = array("4704 -6644","4444 -7236","4444 -7808","5784 -7832","6236 -7828","6236 -7096","6080 -6496","5906 -6396","5820 -6368","5758 -6320","5718 -6278","5628 -6270","5562 -6224","5440 -6240","5342 -6240","5304 -6274","5190 -6272","5120 -6302","5044 -6312","4806 -6388","4704 -6644");
|
||||
|
||||
$region['knot_of_dementia'] = array("6880 -1752","6884 -2472","7300 -3436","7904 -4088","8240 -4024","8404 -3908","8496 -3820","8620 -3720","8644 -3670","8614 -3636","8614 -3570","8652 -3546","8638 -3230","8596 -3198","8512 -3196","8454 -3098","8444 -2850","8466 -2654","8518 -2550","8802 -2558","8810 -2252","8924 -2206","8966 -2080","8958 -1982","9120 -1746","9184 -1542","9214 -1352","8800 -984","8296 -1016","7748 -1156","7352 -1340","7140 -1508","6880 -1544","6880 -1752");
|
||||
|
||||
$region['haven_of_purity'] = array("9222 -1344","9188 -1464","9178 -1574","9162 -1660","8958 -1978","8964 -2080","8924 -2214","8818 -2254","8792 -2582","8824 -2636","8752 -2712","8800 -2800","8816 -2866","8868 -2906","8954 -2880","9070 -2874","9114 -2926","9136 -3006","9192 -3052","9230 -3050","9280 -3106","9280 -3148","9330 -3198","9440 -3204","9498 -3322","9616 -3358","9876 -3356","9924 -3286","9918 -3202","9962 -3156","10082 -3038","10090 -2996","10022 -2956","10080 -2890","10128 -2856","10216 -2864","10238 -2830","10234 -2620","10142 -2542","10138 -2498","10080 -2484","10032 -2410","9846 -2388","9754 -2284","9758 -2116","9702 -1928","9662 -1506","9664 -1450","9854 -1276","9474 -1120","9274 -1146","9222 -1344");
|
||||
|
||||
$region['void'] = array("9808 -1342","9658 -1470","9672 -1640","9694 -1898","9724 -1996","9758 -2126","9754 -2286","9818 -2360","9832 -2394","10010 -2402","10046 -2420","10074 -2490","10134 -2494","10148 -2558","10222 -2602","10238 -2692","10290 -2718","10362 -2718","10406 -2788","10416 -2836","10484 -2884","10670 -2868","10730 -2852","10836 -2886","10878 -2958","10886 -3126","10950 -3198","11084 -3196","11128 -3240","11182 -3230","11206 -3178","11196 -2952","11284 -2870","11354 -2888","11432 -2868","11448 -2892","11420 -2914","11504 -2898","11528 -2858","11522 -2782","11588 -2722","11758 -2694","11904 -2638","11996 -2604","12054 -2614","12274 -2550","12428 -2516","12480 -2476","12480 -1232","11952 -980","10496 -1008","9808 -1342");
|
||||
|
||||
$region['cities_of_intuition'] = array("8086 -4048","8204 -4032","8348 -3958","8466 -3848","8558 -3784","8638 -3690","8612 -3578","8648 -3530","8634 -3228","8514 -3192","8456 -3108","8436 -2858","8474 -2632","8510 -2552","8792 -2554","8806 -2618","8828 -2638","8756 -2706","8756 -2750","8800 -2790","8810 -2866","8866 -2910","8950 -2878","9062 -2878","9126 -2948","9142 -3014","9236 -3056","9282 -3102","9284 -3158","9330 -3200","9442 -3200","9498 -3322","9634 -3358","9876 -3358","9950 -3346","10092 -3366","10168 -3410","10244 -3382","10240 -3504","10286 -3664","10346 -3668","10432 -3732","10408 -3848","10438 -3940","10376 -4002","10162 -3994","10084 -4060","10074 -4154","10152 -4250","10120 -4272","10084 -4366","10014 -4370","9936 -4326","9756 -4334","9400 -4588","9128 -4452","9008 -4176","8920 -4096","8236 -4112","8086 -4048");
|
||||
|
||||
$region['grove_of_umbra'] = array("9418 -4580","9616 -4422","9776 -4330","9932 -4324","10024 -4368","10092 -4370","10114 -4284","10154 -4246","10076 -4146","10098 -4046","10162 -3990","10380 -4008","10404 -4100","10472 -4156","10580 -4132","10696 -4160","10840 -4156","10890 -4090","10914 -4020","11006 -3970","11084 -3852","11136 -3832","11442 -3838","11502 -3890","11530 -3956","11590 -4008","11732 -3998","11860 -3992","12024 -3910","12240 -3804","12448 -3796","12468 -5896","11328 -5888","9756 -5340","9524 -5128","9418 -4580");
|
||||
|
||||
$region['maiden_grove'] = array("12272 -3794","12012 -3918","11870 -3988","11594 -4006","11520 -3934","11456 -3842","11272 -3830","11094 -3840","11002 -3974","10930 -4004","10888 -4062","10878 -4112","10834 -4150","10694 -4160","10602 -4132","10484 -4156","10404 -4098","10378 -4002","10442 -3936","10408 -3862","10430 -3760","10412 -3712","10330 -3660","10290 -3660","10254 -3588","10238 -3476","10236 -3378","10178 -3406","10092 -3362","9930 -3344","9876 -3348","9924 -3280","9922 -3192","10084 -3028","10088 -2990","10026 -2956","10088 -2878","10154 -2852","10216 -2868","10236 -2828","10236 -2690","10276 -2714","10352 -2716","10410 -2788","10416 -2834","10476 -2882","10662 -2868","10726 -2846","10820 -2874","10878 -2946","10886 -3086","10890 -3134","10948 -3200","11084 -3198","11124 -3236","11184 -3228","11206 -3176","11196 -2950","11224 -2912","11280 -2874","11346 -2884","11424 -2864","11428 -2904","11490 -2904","11522 -2860","11516 -2782","11574 -2720","11738 -2700","11994 -2600","12046 -2614","12346 -2540","12416 -2524","12432 -2860","12448 -3460","12272 -3794");
|
||||
|
||||
$region['under_spring'] = array("2596 -10496","2576 -10716","2628 -10912","3160 -11264","3436 -11272","3666 -11044","3726 -10666","3828 -10538","3782 -9890","3542 -9788","3348 -9788","2914 -10028","2612 -10276","2596 -10496");
|
||||
|
||||
$region['land_of_continuity'] = array("452 -13296","184 -13676","-259776 -5920","540 -14856","1176 -15120","1324 -14824","1420 -14784","1572 -14760","1920 -14528","1756 -14120","1740 -13752","1584 -13740","1636 -13392","1196 -13124","652 -13140","452 -13296");
|
||||
|
||||
$region['sunken_city'] = array("1768 -14184","1904 -14540","2696 -14556","2948 -14420","2924 -13780","2404 -13144","1852 -13132","1616 -13416","1604 -13708","1748 -13760","1768 -14184");
|
||||
|
||||
$region['forbidden_depths'] = array("1956 -14552","2716 -14568","3020 -14696","3020 -15352","2500 -15784","1956 -15840","1844 -15440","1108 -15240","1324 -14680","1956 -14552");
|
||||
|
||||
$region['windy_gate'] = array("5496 -10240","5480 -10904","5648 -11960","5888 -12000","6072 -12000","6192 -12016","6296 -11984","6468 -11988","6416 -11100","6332 -10148","6240 -9700","5952 -9644","5580 -9632","5444 -9888","5496 -10240");
|
||||
|
||||
$region['elusive_forest'] = array("5666 -11962","5898 -11996","6082 -12002","6198 -12022","6290 -11988","6448 -11996","6710 -11978","6756 -12280","7324 -12296","7348 -12824","6792 -13152","6660 -13588","6468 -13584","6300 -13612","6064 -13604","5828 -13564","5728 -12892","5568 -12160","5666 -11962");
|
||||
|
||||
$region['gate_of_obscurity'] = array("5922 -13596","6094 -13612","6306 -13618","6486 -13582","6670 -13584","6776 -14124","6876 -14592","6732 -15212","6908 -15308","6864 -15836","6712 -15854","6638 -15842","6530 -15854","6338 -15698","6120 -15410","6162 -14942","6154 -14562","5842 -14432","5954 -14004","5922 -13596");
|
||||
|
||||
$region['trench_of_trials'] = array("6348 -15714","6520 -15852","6664 -15846","6812 -15860","7022 -16332","7078 -16776","7082 -16900","6900 -16946","6582 -16892","6450 -16618","6150 -16906","5914 -16922","5526 -16926","5450 -16668","5462 -16394","5840 -16174","5882 -15768","5990 -15566","6348 -15714");
|
||||
|
||||
$region['abyss_of_ichor'] = array("492 -10932","508 -11288","672 -11348","924 -11328","1148 -11088","1488 -11164","1588 -10952","1568 -10636","1596 -9816","1004 -9768","852 -9812","616 -10296","484 -10652","492 -10932");*/
|
||||
|
||||
$region['silan_shining_lake'] = array("8876 -11020","8788 -10664","9020 -10528","9236 -10560","9348 -10820","9212 -11020","8876 -11020");
|
||||
|
||||
$region['silan_throne_room'] = array("9580 -10552","9412 -10740","9516 -10900","9876 -10840","10008 -10636","9792 -10468","9580 -10552");
|
||||
|
||||
$region['silan_blight_zone'] = array("9372 -10992","9224 -11112","9096 -11280","9076 -11664","9208 -11836","9772 -11832","9840 -11356","9604 -11036","9372 -10992");
|
||||
|
||||
$region['silan_arena'] = array("10208 -11534","10098 -11532","10092 -11644","10166 -11700","10218 -11694","10208 -11534");
|
||||
|
||||
$region['silan_hunting_grounds'] = array("10472 -10676","10212 -10980","10356 -11364","10988 -11512","11260 -11092","11060 -10760","10472 -10676");
|
||||
|
||||
$region['silan_rangers_land'] = array("10256 -11608","10186 -11652","10204 -11718","10338 -11710","10356 -11630","10256 -11608");
|
||||
|
||||
$region['silan_kami'] = array("10398 -11636","10338 -11670","10356 -11702","10488 -11708","10494 -11672","10398 -11636");
|
||||
|
||||
$region['silan_karavan'] = array("10314 -11814","10292 -11884","10498 -11888","10512 -11828","10314 -11814");
|
||||
|
||||
echo "pos!";
|
||||
|
||||
|
||||
if(!isset($region[$where])) {
|
||||
echo "unknown";
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
$points = array();
|
||||
//load charpos & petpos
|
||||
#$comp = $DBc->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;
|
||||
}
|
||||
}
|
||||
?>
|
@ -0,0 +1,68 @@
|
||||
<?php
|
||||
class pointLocation {
|
||||
var $pointOnVertex = true; // Check if the point sits exactly on one of the vertices
|
||||
|
||||
function pointLocation() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
function pointInPolygon($point, $polygon, $pointOnVertex = true) {
|
||||
$this->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]);
|
||||
}
|
||||
}
|
||||
?>
|
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
class FactionPoints extends Entity {
|
||||
public $faction;
|
||||
public $value;
|
||||
|
||||
function FactionPoints() {
|
||||
$this->setName("faction_points");
|
||||
}
|
||||
}
|
||||
?>
|
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
class Fame extends Entity {
|
||||
public $faction;
|
||||
public $fame;
|
||||
public $famememory;
|
||||
public $lastfamechangetrend;
|
||||
|
||||
function Fame() {
|
||||
$this->setName("fame");
|
||||
}
|
||||
}
|
||||
?>
|
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
class Gear extends Entity {
|
||||
public $items = array();
|
||||
|
||||
function Gear() {
|
||||
$this->setName("gear");
|
||||
}
|
||||
}
|
||||
?>
|
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
class Item extends Entity {
|
||||
public $inventory = "";
|
||||
|
||||
public $_itemid = 0;
|
||||
public $_sheetid = "";
|
||||
public $_locslot = 0;
|
||||
public $_hp = 0;
|
||||
public $_recommended = "1";
|
||||
public $_creatorid = "(0x0000000000:00:00:00)";
|
||||
public $_phraseid = "";
|
||||
public $_dropable = null;
|
||||
public $stacksize = 1;
|
||||
public $_usenewsystemrequirement = 1;
|
||||
public $_requiredskilllevel = 0;
|
||||
public $_customtext = "";
|
||||
public $_lockedbyowner = 0;
|
||||
|
||||
public $_refinventoryslot = null;
|
||||
public $refinventoryid = null;
|
||||
|
||||
public $_craftparameters = array();
|
||||
|
||||
function Item() {
|
||||
$this->setName("item");
|
||||
}
|
||||
}
|
||||
?>
|
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
class LastLogStats extends Entity {
|
||||
public $logintime;
|
||||
public $duration = 0;
|
||||
public $logofftime;
|
||||
|
||||
function LastLogStats() {
|
||||
$this->setName("lastlogstats");
|
||||
}
|
||||
}
|
||||
?>
|
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
class MissionList extends Entity {
|
||||
public $missions;
|
||||
|
||||
function MissionList() {
|
||||
$this->setName("missionlist");
|
||||
}
|
||||
}
|
||||
?>
|
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
class Mission extends Entity {
|
||||
public $mission;
|
||||
public $successful;
|
||||
public $utc_lastsuccessdate;
|
||||
|
||||
function Mission() {
|
||||
$this->setName("mission");
|
||||
}
|
||||
}
|
||||
?>
|
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
class PermanentMod extends Entity {
|
||||
public $score;
|
||||
public $value;
|
||||
|
||||
function PermanentMod() {
|
||||
$this->setName("permanentmodifiers");
|
||||
}
|
||||
}
|
||||
?>
|
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
class Pet extends Entity {
|
||||
public $pet;
|
||||
public $ticketpetsheetid;
|
||||
public $petsheetid;
|
||||
public $pricev;
|
||||
public $ownerid;
|
||||
public $stablealias;
|
||||
public $landscape_x;
|
||||
public $landscape_y;
|
||||
public $landscape_z;
|
||||
public $utc_deathtick;
|
||||
public $petstatus;
|
||||
public $slot;
|
||||
public $istpallowed;
|
||||
public $satiety;
|
||||
public $customname;
|
||||
|
||||
function Pet() {
|
||||
$this->setName("pet");
|
||||
#echo "created";
|
||||
}
|
||||
}
|
||||
?>
|
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
class PhysCharacs extends Entity {
|
||||
public $charac;
|
||||
public $value;
|
||||
|
||||
function PhysCharacs() {
|
||||
$this->setName("phys_characs");
|
||||
}
|
||||
}
|
||||
?>
|
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
class PhysScores extends Entity {
|
||||
public $score;
|
||||
public $current;
|
||||
public $base;
|
||||
public $max;
|
||||
public $baseregeneraterepos;
|
||||
public $baseregenerateaction;
|
||||
public $currentregenerate;
|
||||
|
||||
function PhysScores() {
|
||||
$this->setName("phys_scores");
|
||||
}
|
||||
}
|
||||
?>
|
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
class Position extends Entity {
|
||||
public $x;
|
||||
public $y;
|
||||
public $z;
|
||||
public $heading;
|
||||
|
||||
function Position() {
|
||||
$this->setName("position");
|
||||
}
|
||||
}
|
||||
?>
|
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
class SkillList extends Entity {
|
||||
public $skills;
|
||||
|
||||
function SkillList() {
|
||||
$this->setName("skilllist");
|
||||
}
|
||||
}
|
||||
?>
|
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
class SkillPoints extends Entity {
|
||||
public $skill;
|
||||
public $value;
|
||||
|
||||
function SkillPoints() {
|
||||
$this->setName("skillpoints");
|
||||
}
|
||||
}
|
||||
?>
|
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
class Skill extends Entity {
|
||||
public $skill;
|
||||
public $current;
|
||||
public $base;
|
||||
public $maxlvlreached;
|
||||
public $xp;
|
||||
public $xpnextlvl;
|
||||
|
||||
function Skill() {
|
||||
$this->setName("skill");
|
||||
}
|
||||
}
|
||||
?>
|
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
class SpentSkillPoints extends Entity {
|
||||
public $skill;
|
||||
public $value;
|
||||
|
||||
function SpentSkillPoints() {
|
||||
$this->setName("spentskillpoints");
|
||||
}
|
||||
}
|
||||
?>
|
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
@ -0,0 +1,57 @@
|
||||
<?php
|
||||
error_reporting(E_ALL ^ E_NOTICE);
|
||||
ini_set("display_errors","1");
|
||||
|
||||
define('APP_NAME', 'app_achievements');
|
||||
|
||||
require_once('conf.php');
|
||||
require_once("fb/facebook.php");
|
||||
|
||||
|
||||
$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()) {
|
||||
|
||||
echo '<script type="text/javascript">
|
||||
top.location.href = "'.$login_url.'";
|
||||
</script>';
|
||||
}
|
||||
else {
|
||||
echo var_export($facebook->getUser(),true);
|
||||
// Do the wall post.
|
||||
try {
|
||||
|
||||
$facebook->api("/me/feed", "post", array(
|
||||
message => "My character Talvela just earned <b>'Bejeweled'</b> 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 <a href="' . $login_url . '">login.</a>';
|
||||
#error_log($e->getType());
|
||||
#error_log($e->getMessage());
|
||||
}
|
||||
}
|
||||
?>
|
@ -0,0 +1,93 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2011 Facebook, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License. You may obtain
|
||||
* a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
require_once "base_facebook.php";
|
||||
|
||||
/**
|
||||
* Extends the BaseFacebook class with the intent of using
|
||||
* PHP sessions to store user ids and access tokens.
|
||||
*/
|
||||
class Facebook extends BaseFacebook
|
||||
{
|
||||
/**
|
||||
* Identical to the parent constructor, except that
|
||||
* we start a PHP session to store the user ID and
|
||||
* access token if during the course of execution
|
||||
* we discover them.
|
||||
*
|
||||
* @param Array $config the application configuration.
|
||||
* @see BaseFacebook::__construct in facebook.php
|
||||
*/
|
||||
public function __construct($config) {
|
||||
if (!session_id()) {
|
||||
session_start();
|
||||
}
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
protected static $kSupportedKeys =
|
||||
array('state', 'code', 'access_token', 'user_id');
|
||||
|
||||
/**
|
||||
* Provides the implementations of the inherited abstract
|
||||
* methods. The implementation uses PHP sessions to maintain
|
||||
* a store for authorization codes, user ids, CSRF states, and
|
||||
* access tokens.
|
||||
*/
|
||||
protected function setPersistentData($key, $value) {
|
||||
if (!in_array($key, self::$kSupportedKeys)) {
|
||||
self::errorLog('Unsupported key passed to setPersistentData.');
|
||||
return;
|
||||
}
|
||||
|
||||
$session_var_name = $this->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));
|
||||
}
|
||||
}
|
@ -1,79 +1,129 @@
|
||||
<?php
|
||||
|
||||
error_reporting(E_ALL ^ E_NOTICE);
|
||||
ini_set("display_errors","1");
|
||||
|
||||
define('APP_NAME', 'app_achievements');
|
||||
|
||||
require_once('../webig/config.php');
|
||||
include_once('../webig/lang.php');
|
||||
include_once('lang.php');
|
||||
require_once('conf.php');
|
||||
|
||||
// Ask to authenticate user (using ingame or session method) and fill $user with all information
|
||||
ryzom_app_authenticate($user, false);
|
||||
|
||||
#$user['id'] = $user['char_id'];
|
||||
#$user['name'] = $user['char_name'];
|
||||
|
||||
$user = array();
|
||||
$user['id'] = 16;
|
||||
$user['lang'] = 'en';
|
||||
$user['name'] = 'Talvela';
|
||||
$user['race'] = "r_matis";
|
||||
$user['civilization'] = "c_neutral";
|
||||
$user['cult'] = "c_neutral";
|
||||
$user['ig'] = ($_REQUEST['ig']==1);
|
||||
#$user['ig'] = true;
|
||||
|
||||
require_once("class/RyzomUser_class.php");
|
||||
$_USER = new RyzomUser($user);
|
||||
|
||||
if($_USER->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());
|
||||
|
||||
?>
|
||||
<?php
|
||||
|
||||
error_reporting(E_ALL ^ E_NOTICE);
|
||||
ini_set("display_errors","1");
|
||||
|
||||
define('APP_NAME', 'app_achievements');
|
||||
|
||||
require_once('../webig/config.php');
|
||||
include_once('../webig/lang.php');
|
||||
include_once('lang.php');
|
||||
require_once('conf.php');
|
||||
|
||||
// Ask to authenticate user (using ingame or session method) and fill $user with all information
|
||||
ryzom_app_authenticate($user, false);
|
||||
|
||||
#$user['id'] = $user['char_id'];
|
||||
#$user['name'] = $user['char_name'];
|
||||
|
||||
$user = array();
|
||||
$user['cid'] = 1;
|
||||
$user['lang'] = 'en';
|
||||
$user['name'] = 'Talvela';
|
||||
$user['race'] = "r_matis";
|
||||
$user['civilization'] = "c_neutral";
|
||||
$user['cult'] = "c_neutral";
|
||||
$user['ig'] = ($_REQUEST['ig']==1);
|
||||
#$user['ig'] = true;
|
||||
|
||||
require_once("class/RyzomUser_class.php");
|
||||
$_USER = new RyzomUser($user);
|
||||
|
||||
if($_USER->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 .= '<script type="text/javascript">
|
||||
top.location.href = "'.$login_url.'";
|
||||
</script>;';
|
||||
}
|
||||
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 <a href="' . $login_url . '">login.</a>';
|
||||
#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());
|
||||
|
||||
?>
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
@ -0,0 +1,193 @@
|
||||
<?php
|
||||
function adm_render_menu(&$menu,$sub = 0) {
|
||||
$html = "<style>
|
||||
.ach_menu {
|
||||
display:block;
|
||||
padding:2px;
|
||||
border:1px solid #000000;
|
||||
margin-bottom:2px;
|
||||
color:#FFFFFF;
|
||||
}
|
||||
.ach_menu:hover {
|
||||
color:orange;
|
||||
}
|
||||
|
||||
.ach_mspan a {
|
||||
text-decoration:none;
|
||||
}
|
||||
</style>";
|
||||
|
||||
return $html.adm_render_mnode($menu,$sub);
|
||||
}
|
||||
|
||||
function adm_render_mnode(&$menu,$sub) {
|
||||
global $_CONF;
|
||||
|
||||
$iter = $menu->getIterator();
|
||||
while($iter->hasNext()) {
|
||||
$curr = $iter->getNext();
|
||||
|
||||
$html .= "<span class='ach_mspan'><a href='?mode=atom&cat=".$curr->getID()."'><table class='ach_menu'>
|
||||
<tr>";
|
||||
if($sub == 0) {
|
||||
$html .= "<td><img src='".$_CONF['image_url']."pic/menu/".$curr->getImage()."' /></td>";
|
||||
}
|
||||
$html .= "<td style='font-size:".(20-$sub)."px;font-weight:bold;";
|
||||
if($curr->isOpen()) {
|
||||
$html .= "color:orange;";
|
||||
}
|
||||
$html .= "'>".$curr->getName()."</td>
|
||||
</tr>
|
||||
</table></a></span>";
|
||||
if($curr->hasOpenCat() != 0) {
|
||||
$html .= "<div style='display:block;margin-left:25px;'>".adm_render_mnode($curr,($sub+4))."</div>";
|
||||
}
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
function atom_render_category(&$cat) {
|
||||
$html = "<style>
|
||||
.bar {
|
||||
background-color:#FFFFFF;
|
||||
color:#000000;
|
||||
padding:2px;
|
||||
margin-bottom:2px;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
.bar a {
|
||||
color:#000000;
|
||||
text-decoration:none;
|
||||
}
|
||||
</style>";
|
||||
|
||||
$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 = "<div style='display: block; margin-bottom: 5px;'>
|
||||
<div style='display:block;font-size:22px;' class='bar'><a href='javascript:hs(\"ach_".$ach->getID()."\",\"block\");'>[+]</a> ".$ach->getName()." <span style='font-size:12px;'>(ties= race: ".$ach->getTieRace()."; civ: ".$ach->getTieCiv()."; cult: ".$ach->getTieCult().")</span></div>
|
||||
<div style='margin-left:25px;display:".$o.";' id='ach_".$ach->getID()."'>".ach_render_perk_open($ach)."</div>
|
||||
</div>";
|
||||
|
||||
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 .= "<div style='display: block; margin-bottom: 5px;'>
|
||||
<div style='display:block;font-size:16px;' class='bar'><a href='javascript:hs(\"perk_".$perk->getID()."\",\"block\");'>[+]</a> ".$perk->getDisplayName()." <span style='font-size:12px;'>(condition= ".$perk->getCondition().": ".$perk->getConditionValue().")</span></div>
|
||||
<div style='margin-left:25px;display:".$o.";' id='perk_".$perk->getID()."'>".ach_render_obj_list($perk->getIterator())."</div>
|
||||
</div>";
|
||||
}
|
||||
|
||||
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 .= "<div style='display: block; margin-bottom: 5px;'>
|
||||
<div style='display:block;' class='bar'><a href='javascript:hs(\"obj_".$elem->getID()."\",\"block\");' name='obj_".$elem->getID()."'>[+]</a> ".$elem->getDisplayName()." <span style='font-size:12px;'>(condition= ".$elem->getCondition().": ".$elem->getValue().")</span></div>
|
||||
<div style='margin-left:25px;display:".$o.";' id='obj_".$elem->getID()."'>
|
||||
<div style='display:block;'><a href='javascript:hs(\"add_atom_".$elem->getID()."\",\"block\");'>add</a></div>
|
||||
<div style='display:none;' id='add_atom_".$elem->getID()."'>
|
||||
<form method='post' action='?mode=atom&cat=".$_REQUEST['cat']."&act=insert_atom&id=".$elem->getPathID()."#obj_".$elem->getID()."'>
|
||||
<fieldset>
|
||||
<legend>add atom trigger</legend>
|
||||
<table>
|
||||
<tr>
|
||||
<td><textarea name='atom_ruleset' rows='6' cols='80' onkeydown='return catchTab(this,event);'></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type='hidden' name='atom_mandatory' value='0' /><input type='checkbox' name='atom_mandatory' value='1' /> mandatory</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type='submit' value='add' /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<hr>
|
||||
</form>
|
||||
</div>
|
||||
".ach_render_atom_list($elem->getIterator())."
|
||||
</div>
|
||||
</div>";
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
function ach_render_atom_list($atom) {
|
||||
$html = "";
|
||||
|
||||
while($atom->hasNext()) {
|
||||
$elem = $atom->getNext();
|
||||
|
||||
$html .= "<form method='post' action='?mode=atom&cat=".$_REQUEST['cat']."&act=update_atom&id=".$elem->getPathID()."#obj_".$elem->getObjective()."'>
|
||||
<table>
|
||||
<tr>
|
||||
<td><textarea name='atom_ruleset' rows='6' cols='80' onkeydown='return catchTab(this,event);'>".$elem->getRuleset()."</textarea></td>
|
||||
<td valign='top' rowspan='3'><a href='?mode=atom&cat=".$_REQUEST['cat']."&act=delete&id=".$elem->getPathID()."#obj_".$elem->getObjective()."'>[X]</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div style='width:555px;overflow:scroll;'><pre>".$elem->getRulesetParsed()."</pre></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type='hidden' name='atom_mandatory' value='0' /><input type='checkbox' name='atom_mandatory' value='1'";
|
||||
if($elem->getMandatory() == 1) {
|
||||
$html .= " checked='checked'";
|
||||
}
|
||||
$html .= " /> mandatory</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><input type='submit' value='edit' /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form><hr>";
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
?>
|
Loading…
Reference in New Issue