Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
suppression/nettoyage
remise en service barre de progression
  • Loading branch information
machine62 committed Mar 1, 2024
1 parent a0dcd3f commit d534437
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 45 deletions.
2 changes: 0 additions & 2 deletions js/cross_domain.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
$(document).ready(function () {
//alert($(location).attr('href'));

next_step(step)

});
Expand Down
12 changes: 6 additions & 6 deletions js/step.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,21 @@ function stepProgressBar(data) {
if (currentstep <= step) { // si bug et reponse inconnu
if (data == null || data["ok"] == null) {
alert("Une erreur est survenue");
$('#content').text("Une erreur est survenue"); // information utilisateur
$('#avancement').attr('value', step);// change l'attribut'
$('#spacontent').text("Une erreur est survenue"); // information utilisateur
$('#spaavancement').attr('value', step);// change l'attribut'

}
else
if (data["ok"] == "Aucune Action") {
alert("aucune mise à jour disponible");
$('#content').text("aucune mise à jour disponible"); // information utilisateur
$('#avancement').attr('value', step);// change l'attribut'
$('#spacontent').text("aucune mise à jour disponible"); // information utilisateur
$('#spaavancement').attr('value', step);// change l'attribut'

}
else {
currentstep = currentstep + 1;
$('#avancement').attr('value', currentstep);// change l'attribut'
$('#content').text("<< " + data["ok"] + "(" + data["temps"] + " s) >>"); // information utilisateur
$('#spaavancement').attr('value', currentstep);// change l'attribut'
$('#spacontent').text("<< " + data["ok"] + "(" + data["temps"] + " s) >>"); // information utilisateur
startstep(currentstep); // next step
}
}
Expand Down
10 changes: 0 additions & 10 deletions vue/cross_domain.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,3 @@
stream_copy($url, MOD_ROOT_XML . $pub_url . '.xml'); // xcopy buggant ...
}

//var_dump($url);
//https://beubeulblog.fr/anges/ogspy/index.php?action=superapix($pub_url);


// $url = uni_replace(find_config('uni'),$url);

// header("Content-type: text/xml");
// readfile($url);
//var_dump($url);
//var_dump($pub_url);
43 changes: 42 additions & 1 deletion vue/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,66 @@
$tcallbacks = constante_xtense_callbacks();
$uIdSuperapix = spaModId();

//include_once MOD_ROOT_VUE . "css.php";

?>

<style>
.progress {
width: 100%;
height: 30px;
color: #ddd;
padding: 3px 3px 3px 3px;
border-radius: 5px;
}

.progress[value] {
--color: Green;
--background: lightgrey;
appearance: none;
border: none;
width: 100%;
padding: 3px 3px 3px 3px;
border-radius: 5px;
background: var(--background);
}


</style>



<div class="og-msg ">
<h3 class="og-title">Mod Superapix</h3>
<p class="og-content">Superapix est un mod Ogspy permettant de mettre à jour depuis l'api XML d'ogame</p>
<p class="og-content">Celui ci est maintenant profilé pour automatiquement se mettre à jour sans actions utilisateurs </p>
</div>



<div class="og-msg">
<progress id="spaavancement" class="progress" value="0" max="39">

</progress>
<p id="spacontent" class="og-highlight"></p>


</div>



<?php if ($tcheckSecurity != NULL) : ?>
<div class="og-msg og-msg-danger ">
<h3 class="og-title">Mod Superapix</h3>
<p class="og-content"> La configuration du mod semble incorrecte (<?php echo count($tcheckSecurity); ?> erreur(s)).</p>
</div>
<?php else : ?>
<!--
<div class="og-msg og-msg-success">
<p class="og-content">La configuration du mod semble correcte <br> </p>
<br>

</div>
-->
<table class="og-table ">
<tbody>
<tr>
Expand Down
42 changes: 16 additions & 26 deletions vue/step.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,21 @@

// on charge le xml
$value = f_chargement_fichier_xml(MOD_ROOT_XML . $type . ".xml");
//var_dump($value);

echo " test";
if ($type == "CST_PLAYERS") {
traitement_player($value);
}


if ($type == "CST_ALLIANCES") {
traitement_alliance($value);
}


if ($type == "CST_UNIVERSE") {
traitement_universe($value);
}



if (strstr($type, "CST_ALLIANCES_RANK_")) {
traitement_alliance_rank($value, $type);
}



if (strstr($type, "CST_PLAYERS_RANK_")) {
traitement_player_rank($value, $type);
switch ($type) {
case "CST_PLAYERS":
traitement_player($value);
break;
case "CST_ALLIANCES":
traitement_alliance($value);
break;
case "CST_UNIVERSE":
traitement_universe($value);
break;
default:
if (strstr($type, "CST_ALLIANCES_RANK_")) {
traitement_alliance_rank($value, $type);
} elseif (strstr($type, "CST_PLAYERS_RANK_")) {
traitement_player_rank($value, $type);
}
}

0 comments on commit d534437

Please sign in to comment.