Skip to content

Commit

Permalink
Finalisation
Browse files Browse the repository at this point in the history
Ajout  id player et id_alliance insertion universe
installation si version sup a 3.3.7
suppriesion d'une fonction inutile (create univers vide)
  • Loading branch information
machine62 committed Mar 14, 2020
1 parent a1525fc commit 3b6ea3d
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
define('IN_SUPERAPIX', true);
define('IN_XTENSE', true);

date_default_timezone_set(@date_default_timezone_get());
date_default_timezone_set(date_default_timezone_get());

if (preg_match('#mod#', getcwd()))
chdir('../../');
Expand Down
6 changes: 3 additions & 3 deletions include/function.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ function traitement_universe($value) {

$query = array();

$fields = "g, s, r, id_player , datadate , name_planete ,name_moon , moon , sender_id ";
$fields = "g, s, r, id_player , datadate , name_planete ,name_moon , moon , sender_id ";

foreach ($value->planet as $ta_planete_en_cours) {
$t_coordonnee = explode(':', $ta_planete_en_cours[0]['coords']); // récuperation coord en cours
Expand Down Expand Up @@ -313,7 +313,7 @@ function traitement_universe($value) {
$sql .= " ON ";
$sql .= "( A.id_alliance = P.id_ally ) ";
$sql .= " SET ";
$sql .= " U.moon = T.moon , U.name = T.name_planete , U.ally = A.tag , U.player = P.name_player , U.status = P.status , U.last_update = T.datadate , U.last_update_user_id = T.sender_id ";
$sql .= " U.player_id = T.id_player , U.ally_id = P.id_ally , U.moon = T.moon , U.name = T.name_planete , U.ally = A.tag , U.player = P.name_player , U.status = P.status , U.last_update = T.datadate , U.last_update_user_id = T.sender_id ";
$sql .= " WHERE ";
$sql .= " U.last_update <= T.datadate "; // <= pour permettre d ecraser la derniere importation si plantage de la derniere

Expand Down Expand Up @@ -655,7 +655,7 @@ function findSpaId() {
// le chemin distant renvoit il a un xml ?????
function DistantIsFileIXml($url) {
if ($stream = fopen($url, 'r')) {
// 5 premier octet => verif bidons todo voir charge avec get_headers ...
// 5 premier octet => verif bidons
$sStream = stream_get_contents($stream, 5);
if ($sStream == "<?xml") {
loggeur("check fichier XML ok " . $url);
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}

if (isset($pub_create_uni)) {

//plus necessaire
create_uni_vide();
}

Expand Down
8 changes: 8 additions & 0 deletions model/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,15 @@ function find_config($name) {
return NULL;
}

function check_uni_vide()
{

}

/// devenu obsolete : rempli_table_univers() a l'install et update garantisse les datas
function create_uni_vide() {
return null;
// ce qui suit ne sera pas executé
global $db, $server_config;

$query = array();
Expand Down
2 changes: 1 addition & 1 deletion model/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function rempli_table_univers() {
$query = array();


$fields = "g, s, r, id_player , datadate , name_planete ,name_moon , moon , sender_id ";
$fields = "g, s, r, id_player , datadate , name_planete ,name_moon , moon , sender_id ";



Expand Down
2 changes: 1 addition & 1 deletion model/model_CST_UNIVERSE.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

// avant de traiter le $_post, on va preparer uni vide avec le timestamp si besoin

// todo faire une requete update apour remise a 0 avec comme where la galaxie et le timstamp ( si inf => 0 )
// faire une requete update apour remise a 0 avec comme where la galaxie et le timstamp ( si inf => 0 )
//$uni = (int)$galaxie;

// for ($i = 1; $i < ((int)$server_config['num_of_systems'] + 1 ); $i++) {
Expand Down
3 changes: 3 additions & 0 deletions update.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
create_table_players();
delete_table_alliances();
create_table_alliances() ;
delete_table_univers();
create_table_univers();
rempli_table_univers();



Expand Down
4 changes: 2 additions & 2 deletions version.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Superapix
0.3.2
0.3.3
superapix,superapix,superapix,superapix,index.php,1,1
3.3.2
3.3.7

2 changes: 2 additions & 0 deletions vue/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,14 @@
<hr />

<legend>Autres</legend>
<!-- obsolete et plus necessaire
<div class="form-grp tooltip">
<a class ="btn" href="index.php?action=superapix&create_uni">Uni vide</a>
<span> <div class="pop-title">Uni Vide</div>
rempli l'univers d'entrée vide,<br /> Pour ogspy tout neuf.<br /><br /> Ne lancer qu'une seule fois
</span>
</div>
-->
<div class="form-grp tooltip">
<a class ="btn" href="index.php?action=superapix&reinit">Réinitalisation</a>
<span> <div class="pop-title">Réinitalisation</div>
Expand Down

0 comments on commit 3b6ea3d

Please sign in to comment.