ci2 #3
8 changed files with 28 additions and 21 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
---
|
||||||
name: lint
|
name: lint
|
||||||
run-name: lint is launched by ${{ github.actor }}
|
run-name: lint is launched by ${{ github.actor }}
|
||||||
on: [push]
|
on: [push]
|
||||||
|
@ -7,7 +8,7 @@ jobs:
|
||||||
name: lint
|
name: lint
|
||||||
steps:
|
steps:
|
||||||
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
|
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
|
||||||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Forgejo!"
|
||||||
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
|
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
@ -24,4 +25,3 @@ jobs:
|
||||||
- name: PHP CS Fixer
|
- name: PHP CS Fixer
|
||||||
run: vendor/bin/php-cs-fixer fix --dry-run --verbose --diff .
|
run: vendor/bin/php-cs-fixer fix --dry-run --verbose --diff .
|
||||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,3 +1,5 @@
|
||||||
modules/goldbook/*.csv
|
modules/goldbook/*.csv
|
||||||
modules/timers/*.csv
|
modules/timers/*.csv
|
||||||
tmp/
|
tmp/
|
||||||
|
vendor/
|
||||||
|
composer.*
|
||||||
|
|
5
.php-cs-fixer.php
Normal file
5
.php-cs-fixer.php
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return (new PhpCsFixer\Config())
|
||||||
|
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
|
||||||
|
;
|
|
@ -113,7 +113,7 @@ function formcaller()
|
||||||
function splitchar($Number)
|
function splitchar($Number)
|
||||||
{
|
{
|
||||||
$byte = strval(dechex($Number));
|
$byte = strval(dechex($Number));
|
||||||
switch(strlen($byte)) {
|
switch (strlen($byte)) {
|
||||||
case 1:
|
case 1:
|
||||||
$byte0 = $byte;
|
$byte0 = $byte;
|
||||||
$byte1 = $byte2 = $byte3 = 0;
|
$byte1 = $byte2 = $byte3 = 0;
|
||||||
|
@ -260,7 +260,7 @@ function password($folder)
|
||||||
$fd = fopen("$folder/password.txt", "r");
|
$fd = fopen("$folder/password.txt", "r");
|
||||||
$titre = fgetcsv($fd, 10000, ",");
|
$titre = fgetcsv($fd, 10000, ",");
|
||||||
|
|
||||||
while($fd) {
|
while ($fd) {
|
||||||
$data = fgetcsv($fd, 10000, ",");
|
$data = fgetcsv($fd, 10000, ",");
|
||||||
$login[$i] = $data[0];
|
$login[$i] = $data[0];
|
||||||
$mdp[$i] = $data[1];
|
$mdp[$i] = $data[1];
|
||||||
|
@ -361,13 +361,13 @@ function nb_visiteurs_connecte($time, $filename = "/tmp/nbweb.dat")
|
||||||
$ii = 0;
|
$ii = 0;
|
||||||
$bool = 0;
|
$bool = 0;
|
||||||
|
|
||||||
if(file_exists($filename)) {
|
if (file_exists($filename)) {
|
||||||
if($fichier = fopen($filename, "r")) {
|
if ($fichier = fopen($filename, "r")) {
|
||||||
while(!feof($fichier)) {
|
while (!feof($fichier)) {
|
||||||
$ligne = fgets($fichier, 4096);
|
$ligne = fgets($fichier, 4096);
|
||||||
$tab = explode("|", $ligne);
|
$tab = explode("|", $ligne);
|
||||||
|
|
||||||
if($tab[1] > 0) {
|
if ($tab[1] > 0) {
|
||||||
$tab_de_tab[$i][0] = $tab[0];
|
$tab_de_tab[$i][0] = $tab[0];
|
||||||
$tab_de_tab[$i][1] = $tab[1];
|
$tab_de_tab[$i][1] = $tab[1];
|
||||||
|
|
||||||
|
@ -378,8 +378,8 @@ function nb_visiteurs_connecte($time, $filename = "/tmp/nbweb.dat")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for($j = 0;$j < $i;$j++) {
|
for ($j = 0;$j < $i;$j++) {
|
||||||
if(($date - chop($tab_de_tab[$j][1])) > $time) {
|
if (($date - chop($tab_de_tab[$j][1])) > $time) {
|
||||||
//on ne fait rien
|
//on ne fait rien
|
||||||
} else {
|
} else {
|
||||||
$tab_de_tab_actualise[$ii][0] = $tab_de_tab[$j][0];
|
$tab_de_tab_actualise[$ii][0] = $tab_de_tab[$j][0];
|
||||||
|
@ -388,20 +388,20 @@ function nb_visiteurs_connecte($time, $filename = "/tmp/nbweb.dat")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for($j = 0;$j < $ii;$j++) {
|
for ($j = 0;$j < $ii;$j++) {
|
||||||
if($tab_de_tab_actualise[$j][0] == $ip) {
|
if ($tab_de_tab_actualise[$j][0] == $ip) {
|
||||||
$bool = 1;
|
$bool = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($bool == 0) {
|
if ($bool == 0) {
|
||||||
$tab_de_tab_actualise[$ii][0] = $ip;
|
$tab_de_tab_actualise[$ii][0] = $ip;
|
||||||
$tab_de_tab_actualise[$ii][1] = $date;
|
$tab_de_tab_actualise[$ii][1] = $date;
|
||||||
$ii++;
|
$ii++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($fichier = fopen($filename, "w")) {
|
if ($fichier = fopen($filename, "w")) {
|
||||||
for($j = 0;$j < $ii;$j++) {
|
for ($j = 0;$j < $ii;$j++) {
|
||||||
fputs($fichier, chop($tab_de_tab_actualise[$j][0]));
|
fputs($fichier, chop($tab_de_tab_actualise[$j][0]));
|
||||||
fputs($fichier, "|");
|
fputs($fichier, "|");
|
||||||
fputs($fichier, chop($tab_de_tab_actualise[$j][1]));
|
fputs($fichier, chop($tab_de_tab_actualise[$j][1]));
|
||||||
|
|
|
@ -81,7 +81,7 @@ echo "<td class='pageseparator'><img src='/modules/share/trans.gif' alt='' title
|
||||||
// --- gestion des modules ---
|
// --- gestion des modules ---
|
||||||
if (isset($modulepage)) {
|
if (isset($modulepage)) {
|
||||||
//include "include/logo.inc.php";
|
//include "include/logo.inc.php";
|
||||||
switch($modulepage) {
|
switch ($modulepage) {
|
||||||
case "sondage":
|
case "sondage":
|
||||||
|
|
||||||
extract($themeset, EXTR_OVERWRITE);
|
extract($themeset, EXTR_OVERWRITE);
|
||||||
|
|
|
@ -89,7 +89,7 @@ if ((!isset($NbMaxPost)) || ($NbMaxPost > $Cpt)) {
|
||||||
|
|
||||||
echo "<hr /><div class='left'>";
|
echo "<hr /><div class='left'>";
|
||||||
if ($NbMaxPost) {
|
if ($NbMaxPost) {
|
||||||
for($i = 0;$i <= $NbMaxPost - 1;$i++) {
|
for ($i = 0;$i <= $NbMaxPost - 1;$i++) {
|
||||||
if ($VisitorName[$i] == "") {
|
if ($VisitorName[$i] == "") {
|
||||||
$VisitorName[$i] = "Anonyme";
|
$VisitorName[$i] = "Anonyme";
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ if ($Cpt <= 0) {
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
echo "<select name='ListeLiens'>";
|
echo "<select name='ListeLiens'>";
|
||||||
for($i = 0;$i <= $NbMaxPost - 1;$i++) {
|
for ($i = 0;$i <= $NbMaxPost - 1;$i++) {
|
||||||
echo "<option value='$url[$i]'>$linkname[$i]</option>\n";
|
echo "<option value='$url[$i]'>$linkname[$i]</option>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ if ($Cpt <= 0) {
|
||||||
} else {
|
} else {
|
||||||
// affichage des liens
|
// affichage des liens
|
||||||
echo "<div class='left'>";
|
echo "<div class='left'>";
|
||||||
for($i = 0;$i <= $NbMaxPost - 1;$i++) {
|
for ($i = 0;$i <= $NbMaxPost - 1;$i++) {
|
||||||
if ($level[$i] == 1) {
|
if ($level[$i] == 1) {
|
||||||
echo "<b>";
|
echo "<b>";
|
||||||
if ($url[$i] != "") {
|
if ($url[$i] != "") {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
$randimg = rand(1, 3);
|
$randimg = rand(1, 3);
|
||||||
switch($randimg) {
|
switch ($randimg) {
|
||||||
case '1': $logo = "yoyo.png";
|
case '1': $logo = "yoyo.png";
|
||||||
$logodesc = "Y8000";
|
$logodesc = "Y8000";
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue