@@ -1,21 +0,0 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<response> | |||||
<entry> | |||||
<nom>Loup Garrou</nom> | |||||
<level>0</level> | |||||
<hp>10</hp> | |||||
<xp>0</xp> | |||||
<money>0</money> | |||||
<ecos> | |||||
<verte>0</verte> | |||||
<bleue>0</bleue> | |||||
<jaune>0</jaune> | |||||
<rouge>0</rouge> | |||||
<blanche>0</blanche> | |||||
<noire>0</noire> | |||||
</ecos> | |||||
<trans>default</trans> | |||||
<notes>...</notes> | |||||
<gift>0</gift> | |||||
</entry> | |||||
</response> |
@@ -0,0 +1,9 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<response> | |||||
<entry> | |||||
<nom>enemy</nom> | |||||
<hp>3</hp> | |||||
<img>http://wiki.ecomonde.land/lib/exe/fetch.php?media=wiki:loup_garrou.jpg</img> | |||||
<url>http://wiki.ecomonde.land/doku.php?id=wiki:ennemies:loups_garrous</url> | |||||
</entry> | |||||
</response> |
@@ -39,16 +39,25 @@ if (isset($_GET['xp_plusplus']) && $xml->entry->xp<99989) { | |||||
$xml->entry->xp+=10; | $xml->entry->xp+=10; | ||||
} | } | ||||
if (isset($_GET['money_moins']) && $xml->entry->money>0) { | |||||
$xml->entry->money--; | |||||
if (isset($_GET['xp_moinsmoins']) && $xml->entry->xp>9) { | |||||
$xml->entry->xp-=10; | |||||
} | } | ||||
if (isset($_GET['xp_reset'])) { | |||||
$xml->entry->xp=0; | |||||
} | |||||
if (isset($_GET['money_plus']) && $xml->entry->money<99999) { | if (isset($_GET['money_plus']) && $xml->entry->money<99999) { | ||||
$xml->entry->money+=1; | $xml->entry->money+=1; | ||||
} | } | ||||
if (isset($_GET['xp_moinsmoins']) && $xml->entry->xp>9) { | |||||
$xml->entry->xp-=10; | |||||
if (isset($_GET['money_moins']) && $xml->entry->money>0) { | |||||
$xml->entry->money--; | |||||
} | |||||
if (isset($_GET['money_reset'])) { | |||||
$xml->entry->money=0; | |||||
} | } | ||||
if (isset($_GET['eco_verte_plus']) && $xml->entry->ecos->verte<5) { | if (isset($_GET['eco_verte_plus']) && $xml->entry->ecos->verte<5) { | ||||
@@ -118,6 +127,10 @@ if (isset($_GET['gift_moins']) && $xml->entry->gift>0) { | |||||
$xml->entry->gift--; | $xml->entry->gift--; | ||||
} | } | ||||
if (isset($_GET['gift_reset'])) { | |||||
$xml->entry->gift=0; | |||||
} | |||||
$xml->asXml('../medias/'.$hash.'/'.$nom_modif.'.xml'); | $xml->asXml('../medias/'.$hash.'/'.$nom_modif.'.xml'); | ||||
header("location: index.php"); | header("location: index.php"); | ||||
?> | ?> |
@@ -11,7 +11,7 @@ if (isset($_GET['entry'])) { | |||||
$xml = simplexml_load_file('../medias/'.$hash.'/enemy/'.$nom_modif.'.xml'); | $xml = simplexml_load_file('../medias/'.$hash.'/enemy/'.$nom_modif.'.xml'); | ||||
if (isset($_GET['hp_plus']) && $xml->entry->hp<20) { | |||||
if (isset($_GET['hp_plus']) && $xml->entry->hp<3) { | |||||
$xml->entry->hp++; | $xml->entry->hp++; | ||||
} | } | ||||
@@ -0,0 +1,5 @@ | |||||
<?php | |||||
include "../header.php"; | |||||
unlink("../medias/".$hash."/enemy/".$_GET['enemy']); | |||||
header("location:index.php"); | |||||
?> |
@@ -17,20 +17,32 @@ foreach($xml->entry as $entry) { | |||||
<div class="enemy_name"> | <div class="enemy_name"> | ||||
<?php echo $entry->nom; ?> | <?php echo $entry->nom; ?> | ||||
</div> | </div> | ||||
<hr /> | |||||
</div> | </div> | ||||
<div class="row"> | <div class="row"> | ||||
<div class="col-lg-6"> | |||||
<br /> | |||||
<p style="font-size:40px;"><i class="ionicons ion-heart" style="color:red;";></i> <i class="ionicons ion-heart" style="color:red;";></i> <i class="ionicons ion-heart-broken" style="color:grey;";></i></p> | |||||
<?php echo $entry->hp; ?> | |||||
<div class="col-lg-5"> | |||||
<a href="<?php echo $entry->url; ?>" target="_blank" /><img class="img-responsive img-rounded" src="<?php echo $entry->img; ?>" alt="enemy" /> | |||||
</div> | </div> | ||||
<div class="col-lg-2"> | <div class="col-lg-2"> | ||||
<br /> | |||||
<?php button_modif_hp_enemy("hp_moins", $entry->nom, "-"); ?><?php button_modif_hp_enemy("hp_plus", $entry->nom, "+"); ?> | <?php button_modif_hp_enemy("hp_moins", $entry->nom, "-"); ?><?php button_modif_hp_enemy("hp_plus", $entry->nom, "+"); ?> | ||||
<br /><br /> | <br /><br /> | ||||
<button type="submit" class="btn btn-danger btn-sm"><i class="glyphicon glyphicon-remove-sign"></i></button> | |||||
<a href="del_enemy.php?enemy=<?php echo $fichier; ?>" class="btn btn-danger btn-sm"><i class="glyphicon glyphicon-remove-sign"></i></a> | |||||
</div> | </div> | ||||
<div class="col-lg-4"> | |||||
<a href="http://wiki.ecomonde.land/doku.php?id=wiki:ennemies:loups_garrous" target="_blank" /><img class="img-responsive" src="http://wiki.ecomonde.land/lib/exe/fetch.php?w=600&tok=44210c&media=wiki:loup_garrou.jpg" alt="enemy" /> | |||||
<div class="col-lg-5"> | |||||
<br /> | |||||
<?php if($entry->hp == 0): ?> | |||||
<p style="font-size:40px;"><i class="ionicons ion-heart-broken" style="color:grey;";></i> <i class="ionicons ion-heart-broken" style="color:grey;";></i> <i class="ionicons ion-heart-broken" style="color:grey;";></i></p> | |||||
<?php endif; ?> | |||||
<?php if($entry->hp == 1): ?> | |||||
<p style="font-size:40px;"><i class="ionicons ion-heart" style="color:red;";></i> <i class="ionicons ion-heart-broken" style="color:grey;";></i> <i class="ionicons ion-heart-broken" style="color:grey;";></i></p> | |||||
<?php endif; ?> | |||||
<?php if($entry->hp == 2): ?> | |||||
<p style="font-size:40px;"><i class="ionicons ion-heart" style="color:red;";></i> <i class="ionicons ion-heart" style="color:red;";></i> <i class="ionicons ion-heart-broken" style="color:grey;";></i></p> | |||||
<?php endif; ?> | |||||
<?php if($entry->hp == 3): ?> | |||||
<p style="font-size:40px;"><i class="ionicons ion-heart" style="color:red;";></i> <i class="ionicons ion-heart" style="color:red;";></i> <i class="ionicons ion-heart" style="color:red;";></i></p> | |||||
<?php endif; ?> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -34,7 +34,7 @@ foreach($xml->entry as $entry) { | |||||
<?php | <?php | ||||
$hp_max="10"; | $hp_max="10"; | ||||
switch ($entry->level) | switch ($entry->level) | ||||
{ | |||||
{ | |||||
case 0: | case 0: | ||||
$hp_max+=0; | $hp_max+=0; | ||||
break; | break; | ||||
@@ -54,18 +54,18 @@ foreach($xml->entry as $entry) { | |||||
<h3><i class="ionicons ion-heart" style="color:red;";></i> <strong><?php echo $entry->hp; ?></strong><sub>/<?php echo $hp_max; ?></sub></h3> | <h3><i class="ionicons ion-heart" style="color:red;";></i> <strong><?php echo $entry->hp; ?></strong><sub>/<?php echo $hp_max; ?></sub></h3> | ||||
</div> | </div> | ||||
<div class="col-lg-4"> | <div class="col-lg-4"> | ||||
<h3><i class="ionicons ion-flash" style="color:#FFD700;";></i> <strong><?php echo $entry->xp; ?></strong></h3> | |||||
<h3><i class="ionicons ion-flash" style="color:#FFD700;";></i> <strong><?php echo $entry->xp; ?></strong> </h3> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="row"> | <div class="row"> | ||||
<div class="col-lg-4"> | <div class="col-lg-4"> | ||||
<?php button_modif_money("money_moins", $entry->nom, "-"); ?><?php button_modif_money("money_plus", $entry->nom, "+"); ?> | |||||
<?php button_modif_money("money_reset", $entry->nom, '<i class="ionicons ion-arrow-return-left"></i>'); ?><?php button_modif_money("money_moins", $entry->nom, "-"); ?><?php button_modif_money("money_plus", $entry->nom, "+"); ?> | |||||
</div> | </div> | ||||
<div class="col-lg-4"> | <div class="col-lg-4"> | ||||
<?php button_modif_hp("hp_moins", $entry->nom, "-"); ?><?php button_modif_hp("hp_plus", $entry->nom, "+"); ?> | <?php button_modif_hp("hp_moins", $entry->nom, "-"); ?><?php button_modif_hp("hp_plus", $entry->nom, "+"); ?> | ||||
</div> | </div> | ||||
<div class="col-lg-4"> | <div class="col-lg-4"> | ||||
<?php button_modif_xp("xp_moinsmoins", $entry->nom, "--"); ?><?php button_modif_xp("xp_moins", $entry->nom, "-"); ?><?php button_modif_xp("xp_plus", $entry->nom, "+"); ?><?php button_modif_xp("xp_plusplus", $entry->nom, "++"); ?> | |||||
<?php button_modif_xp("xp_reset", $entry->nom, '<i class="ionicons ion-arrow-return-left"></i>'); ?><?php button_modif_xp("xp_moinsmoins", $entry->nom, "--"); ?><?php button_modif_xp("xp_moins", $entry->nom, "-"); ?><?php button_modif_xp("xp_plus", $entry->nom, "+"); ?><?php button_modif_xp("xp_plusplus", $entry->nom, "++"); ?> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -164,7 +164,7 @@ foreach($xml->entry as $entry) { | |||||
</div> | </div> | ||||
<div class="col-lg-3"> | <div class="col-lg-3"> | ||||
<h4><i class="glyphicon glyphicon-gift" style="color:blue;";></i> <strong><?php echo $entry->gift; ?></strong></h4> | <h4><i class="glyphicon glyphicon-gift" style="color:blue;";></i> <strong><?php echo $entry->gift; ?></strong></h4> | ||||
<?php button_modif_gift("gift_moins", $entry->nom, "-"); ?><?php button_modif_gift("gift_plus", $entry->nom, "+"); ?> | |||||
<?php button_modif_gift("gift_reset", $entry->nom, "<i class='ionicons ion-arrow-return-left'></i>"); ?><?php button_modif_gift("gift_moins", $entry->nom, "-"); ?><?php button_modif_gift("gift_plus", $entry->nom, "+"); ?> | |||||
</div> | </div> | ||||
<!-- notes --> | <!-- notes --> | ||||
<div class="modal fade" id="notes<?php echo $itemnb;?>" tabindex="-1" role="dialog" aria-labelledby="notes<?php echo $itemnb;?>" aria-hidden="true"> | <div class="modal fade" id="notes<?php echo $itemnb;?>" tabindex="-1" role="dialog" aria-labelledby="notes<?php echo $itemnb;?>" aria-hidden="true"> | ||||
@@ -191,4 +191,4 @@ foreach($xml->entry as $entry) { | |||||
</div> | </div> | ||||
<!-- /gamers --> | <!-- /gamers --> | ||||
<?php } ?> | |||||
<?php } ?> |