Skip to content

Commit

Permalink
redesign part 2
Browse files Browse the repository at this point in the history
Finalisation redesign
prepa tag
  • Loading branch information
machine62 committed May 3, 2024
1 parent ffb1b69 commit 2e22ebf
Show file tree
Hide file tree
Showing 7 changed files with 198 additions and 174 deletions.
4 changes: 2 additions & 2 deletions classe.tablednd.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ document.onmousemove = function(ev){
// update the old value
currenttable.oldY = y;
// update the style to show we're dragging
currenttable.dragObject.style.backgroundColor = "#eee";
currenttable.dragObject.style.backgroundColor = "#212529";
// If we're over a row then move the dragged row to there so that the user sees the
// effect dynamically
var currentRow = currenttable.findDropTargetRow(y);
Expand All @@ -60,7 +60,7 @@ document.onmouseup = function(ev){
var droppedRow = currenttable.dragObject;
// If we have a dragObject, then we need to release it,
// The row will already have been moved to the right place so we just reset stuff
droppedRow.style.backgroundColor = 'transparent';
droppedRow.style.backgroundColor = 'grey'; // passage en gris pour visualisé les changements
currenttable.dragObject = null;
// And then call the onDrop method in case anyone wants to do any post processing
currenttable.onDrop(currenttable.table, droppedRow);
Expand Down
18 changes: 15 additions & 3 deletions function.php
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,17 @@ function f_gerer_mod()
function f_aide_html()
{
$s_html = '';
$s_html .= '<div id="aide" style="display:block;font-size: 12px;width: 795px;text-align:left;background-image:url(\'skin/OGSpy_skin/tableaux/th.png\');background-repeat:repeat;">';
$s_html .= 'Voici quelques exemples de code HTML que vous pouvez utiliser pour changer le style d\'écriture.';
$s_html .= '<div class="og-msg og-msg-danger">';
$s_html .= '<h3 class="og-title">Attention</h3>';
$s_html .= '<p class="og-content">Il n est plus possible d inserer du code HTML pour le moment</p>';

$s_html .= '</div>';


$s_html .= '';
$s_html .= '<div class="og-msg ">';
$s_html .= '<h3 class="og-title">Exemples</h3>';
$s_html .= '<p class="og-content">Voici quelques exemples de code HTML que vous pouvez utiliser pour changer le style d\'écriture.</p>';
$s_html .= '<ul>';
$s_html .= '<li>'.htmlentities ('<font color="red">Gestion des attaques</font>').' : <font color="red">Gestion des attaques</font><br>';
$s_html .= '<li>'.htmlentities ('<font size="3">Gestion des attaques</font>').' : <font size="3">Gestion des attaques</font><br>';
Expand All @@ -345,13 +354,16 @@ function f_aide_html()
$s_html .= '<li>'.htmlentities ('<i>Gestion des attaques</i>').' : <i>Gestion des attaques</i><br>';
$s_html .= '<li>'.htmlentities ('<b>Gestion des attaques</b>').' : <b>Gestion des attaques</b><br>';
$s_html .= '</ul>';
$s_html .= '</div>';
$s_html .= '</div>';

return $s_html;
}



function nettoyerEntree($entree,$nb = 255)
{

// Suppression des caractères non imprimables
$entree = preg_replace('/[^\p{L}\p{N}\s]/u', '', $entree);

Expand Down
3 changes: 2 additions & 1 deletion gestion.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
</div>
<?php if ($isautoupdate) : ?>
<div class="nav-page-menu-item ">
<a class="nav-page-menu-link" href="index.php?action=gestion&amp;subaction=modUpdate">
<a class="nav-page-menu-link" href="index.php?action=AutoUpdate">
AutoUpdate
</a>
</div>
Expand Down Expand Up @@ -120,6 +120,7 @@
break;

case 'modUpdate':
//plus utilisé
require($lien);
break;

Expand Down
37 changes: 21 additions & 16 deletions group.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,23 @@
$s_html .= '<form method="post" action="index.php?action=gestion&subaction=new_group">';

$s_html .= '<br>';
$s_html .= '<table>';
$s_html .= '<table class="og-table og-little-table">';
$s_html .= '<thead>';
$s_html .= '<tr>';
$s_html .= '<td class="c" colspan="2">Nouveau groupe</td>';
$s_html .= '<th colspan="2">Nouveau groupe</th>';
$s_html .= '</tr>';
$s_html .= '<tr>';
$s_html .= '<th>Nom</th>';
$s_html .= '<th>Admin</th>';
$s_html .= '</tr>';
$s_html .= '</thead>';
$s_html .= '<tbody>';
$s_html .= '<tr>';
$s_html .= '<th><input type="text" name="new_group" size="100" maxlength="250"></th>';
$s_html .= '<th><input type="checkbox" name="admin" value="" /></th>';
$s_html .= '<td><input type="text" name="new_group" size="100" maxlength="250"></td>';
$s_html .= '<td><input type="checkbox" name="admin" value="" /></td>';
$s_html .= '</tr>';
$s_html .= '<tr><th colspan="3"><input type="submit" value="Nouveau Groupe" /></th></tr>';
$s_html .= '<tr><td colspan="3"><input class="og-button" type="submit" value="Nouveau Groupe" /></td></tr>';
$s_html .= '</tbody>';
$s_html .= '</table>';

$s_html .= '</form>';
Expand Down Expand Up @@ -60,43 +64,44 @@
$s_html .= '}';
$s_html .= '</script>';

$s_html .= '<table>';

$s_html .= '<table class="og-table og-little-table">';
$s_html .= '<thead>';
// Si il n'y a qu'un seul groupe, on fait attention à l'orthographe...
if($n_groupes == 1)
{
$s_html .= '<tr><td class="c" colspan="4" >Groupe existant</td></tr>';
$s_html .= '<tr><th colspan="4" >Groupe existant</th></tr>';
}
else
{
$s_html .= '<tr><td class="c" colspan="4" >Groupes existants</td></tr>';
$s_html .= '<tr><th colspan="4" >Groupes existants</th></tr>';
}

$s_html .= '<tr>';
$s_html .= '<th>Nom</th>';
$s_html .= '<th>Admin</th>';
$s_html .= '<th colspan="2"></th>';
$s_html .= '</tr>';

$s_html .= '</thead>';
$s_html .= '<tbody>';
for ($i = 0 ; $i < count($ta_liste_groupes) ; $i++)
{
$s_html .= '<tr>';
$s_html .= '<th><input type="text" name="nom_group'.$i.'" id="nom_group'.$i.'" style="width:500px;" maxlength="250" value="'.htmlentities(f_nom_du_groupe($ta_liste_groupes[$i]['Nom'])).'" /></th>';
$s_html .= '<td><input type="text" name="nom_group'.$i.'" id="nom_group'.$i.'" style="width:500px;" maxlength="250" value="'.htmlentities(f_nom_du_groupe($ta_liste_groupes[$i]['Nom'])).'" /></td>';

if ($ta_liste_groupes[$i]['admin'] == '1' )
{
$s_html .= '<th><input type="checkbox" name="admin'.$i.'" value="" checked="checked" /></th>';
$s_html .= '<td><input type="checkbox" name="admin'.$i.'" value="" checked="checked" /></td>';
}
else
{
$s_html .= '<th><input type="checkbox" name="admin'.$i.'" value="" /></th>';
$s_html .= '<td><input type="checkbox" name="admin'.$i.'" value="" /></td>';
}

$s_html .= '<th><input type="button" onclick="javascript:f_submit(\''.$ta_liste_groupes[$i]['Num'].'\', \'nom_group'.$i.'\', \'admin'.$i.'\',\'Renommer Groupe\');" name="ordre" value="Renommer Groupe" /></th>';
$s_html .= '<th><input type="button" onclick="javascript:f_submit(\''.$ta_liste_groupes[$i]['Num'].'\', \'nom_group'.$i.'\', \'admin'.$i.'\',\'Supprimer Groupe\');" name="ordre" value="Supprimer Groupe" /></th>';
$s_html .= '<td><input class="og-button" type="button" onclick="javascript:f_submit(\''.$ta_liste_groupes[$i]['Num'].'\', \'nom_group'.$i.'\', \'admin'.$i.'\',\'Renommer Groupe\');" name="ordre" value="Renommer Groupe" /></td>';
$s_html .= '<td><input class="og-button og-button-danger" type="button" onclick="javascript:f_submit(\''.$ta_liste_groupes[$i]['Num'].'\', \'nom_group'.$i.'\', \'admin'.$i.'\',\'Supprimer Groupe\');" name="ordre" value="Supprimer Groupe" /></td>';
$s_html .= '</tr>';
}

$s_html .= '</tbody>';
$s_html .= '</table>';

$s_html .= '<form id="form_modification_mod" method="post" action="index.php?action=gestion&subaction=action_group">';
Expand Down
196 changes: 98 additions & 98 deletions list.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<?php

/**
* list.php Fichier de gestion pour ordonner les mods
* @package Gestion MOD
* @author Kal Nightmare
* @update xaviernuma - 2012
* @link http://www.ogsteam.fr/
*/

if (!defined('IN_SPYOGAME'))
{
* list.php Fichier de gestion pour ordonner les mods
* @package Gestion MOD
* @author Kal Nightmare
* @update xaviernuma - 2012
* @link http://www.ogsteam.fr/
*/

if (!defined('IN_SPYOGAME')) {
die("Hacking attempt");
}

Expand All @@ -19,118 +18,119 @@
$s_html_admin = '';

// On parcourt tout les mods
for ($i = 1 ; $i <= count($liste_table_mods) ; $i++)
{
switch ($liste_table_mods[$i]['type'])
{
case 0 : // Mod classique
if($liste_table_mods[$i]['active'] == 1)
{
if($liste_table_mods[$i]['admin_only'] == 1) // Si c'est un mod de type admin alors...
{
$s_html_admin .= "<tr id=".$liste_table_mods[$i]['id']." class='lime'>";
$s_html_admin .= "<th>".strip_tags($liste_table_mods[$i]['menu'])."</th></tr>";
}
else
{
$s_html_normal .= "<tr id=".$liste_table_mods[$i]['id']." class='lime'>";
$s_html_normal .= "<th>".strip_tags($liste_table_mods[$i]['menu'])."</th></tr>";
}
}
else
{
if($liste_table_mods[$i]['admin_only'] == 1) // Si c'est un mod de type admin alors...
for ($i = 1; $i <= count($liste_table_mods); $i++) {
switch ($liste_table_mods[$i]['type']) {
case 0: // Mod classique
if ($liste_table_mods[$i]['active'] == 1) {
if ($liste_table_mods[$i]['admin_only'] == 1) // Si c'est un mod de type admin alors...
{
$s_html_admin .= "<tr id=".$liste_table_mods[$i]['id']." class='red'>";
$s_html_admin .= "<th>".strip_tags($liste_table_mods[$i]['menu'])."</th></tr>";
$s_html_admin .= "<tr id=" . $liste_table_mods[$i]['id'] . " class='lime'>";
$s_html_admin .= "<td><span class='og-alert'>" . strip_tags($liste_table_mods[$i]['menu']) . "</span></td></tr>";
} else {
$s_html_normal .= "<tr id=" . $liste_table_mods[$i]['id'] . " class='lime'>";
$s_html_normal .= "<td><span class=''>" . strip_tags($liste_table_mods[$i]['menu']) . "</span></td></tr>";
}
else
} else {
if ($liste_table_mods[$i]['admin_only'] == 1) // Si c'est un mod de type admin alors...
{
$s_html_normal .= "<tr id=".$i." class='red'>";
$s_html_normal .= "<th>".strip_tags($liste_table_mods[$i]['menu'])."</th></tr>";
$s_html_admin .= "<tr id=" . $liste_table_mods[$i]['id'] . ">";
$s_html_admin .= "<td><span class='og-alert'>" . strip_tags($liste_table_mods[$i]['menu']) . "</span></td></tr>";
} else {
$s_html_normal .= "<tr id=" . $i . " >";
$s_html_normal .= "<td><span class=''>" . strip_tags($liste_table_mods[$i]['menu']) . "</span></td></tr>";
}
}
break;
case 1 : // Groupe
if($liste_table_mods[$i]['admin_only'] == 1) // Si c'est un mod de type admin alors...
{
$s_html_admin .= "<tr id=".$liste_table_mods[$i]['id']." class='blue'>";
$s_html_admin .= "<th>Groupe : ".strip_tags(f_nom_du_groupe($liste_table_mods[$i]['menu']))."</th></tr>";
}
else
case 1: // Groupe
if ($liste_table_mods[$i]['admin_only'] == 1) // Si c'est un mod de type admin alors...
{
$s_html_normal .= "<tr id=".$liste_table_mods[$i]['id']." class='blue'>";
$s_html_normal .= "<th>Groupe : ".strip_tags(f_nom_du_groupe($liste_table_mods[$i]['menu']))."</th></tr>";
$s_html_admin .= "<tr id=" . $liste_table_mods[$i]['id'] . " >";
$s_html_admin .= "<td><span class='og-highlight'>Groupe : " . strip_tags(f_nom_du_groupe($liste_table_mods[$i]['menu'])) . "</span></td></tr>";
} else {
$s_html_normal .= "<tr id=" . $liste_table_mods[$i]['id'] . " >";
$s_html_normal .= "<td><span class='og-highlight'>Groupe : " . strip_tags(f_nom_du_groupe($liste_table_mods[$i]['menu'])) . "</span></td></tr>";
}
break;
}
}
?>

$s_html .= '<style type="text/css">';
$s_html .= '.lime {color: lime;}';
$s_html .= '.red {color: red;}';
$s_html .= '.blue {color: #5CCCE8;}';
$s_html .= '</style>';
$s_html .= '<script type="text/javascript" src="mod/'.$dir.'/classe.tablednd.js"></script>';
$s_html .= '<script type="text/javascript">';
$s_html .= 'function f_submit(page, id, position, place_limite, place_voulue, ordre)';
$s_html .= '{';
$s_html .= 'var t_id = new Array();';
$s_html .= 'var n_i_tableau = 0;';

$s_html .= 'var tablenormal = document.getElementById(\'table-normal\');';
$s_html .= 'var tableadmin = document.getElementById(\'table-admin\');';

$s_html .= 'var rows = tablenormal.tBodies[0].rows; ';
$s_html .= 'for (var i = 0 ; i < rows.length ; i++)';
$s_html .= '{';
$s_html .= 't_id[n_i_tableau] = rows[i].getAttribute("id");';
$s_html .= 'n_i_tableau++;';
$s_html .= '}';

$s_html .= 'var rows = tableadmin.tBodies[0].rows; ';
$s_html .= 'for (var i = 0 ; i < rows.length ; i++)';
$s_html .= '{';
$s_html .= 't_id[n_i_tableau] = rows[i].getAttribute("id");';
$s_html .= 'n_i_tableau++;';
$s_html .= '}';

$s_html .= 'document.getElementById(\'module_range\').value = t_id;';
$s_html .= 'document.getElementById(\'formulaire_deplacement\').submit();';
$s_html .= '}';
$s_html .= '</script>';
<style type="text/css">
.lime {
color: lime;
}

$s_html .= '<br>';
.red {
color: red;
}

$s_html .= '<div style="width:645px;text-align:left;color:white;font-weight:bold;padding-left:3px;font-size:11px;border:1px solid #F0ECED;font-family:Trebuchet MS,Arial,Helvetica,sans-serif;background-image:url(\'skin/OGSpy_skin/tableaux/td_c.png\');background-repeat:repeat-y;">Normal</div>';
$s_html .= '<table id="table-normal" style="width:655px;">';
.blue {
color: #5CCCE8;
}
</style>

<script type="text/javascript" src="mod/<?php echo $dir; ?>/classe.tablednd.js"></script>

<script type="text/javascript">
function f_submit(page, id, position, place_limite, place_voulue, ordre) {
var t_id = new Array();
var n_i_tableau = 0;

var tablenormal = document.getElementById('table-normal');
var tableadmin = document.getElementById('table-admin');

var rows = tablenormal.tBodies[0].rows;
for (var i = 0; i < rows.length; i++) {
t_id[n_i_tableau] = rows[i].getAttribute("id");
n_i_tableau++;
}

var rows = tableadmin.tBodies[0].rows;
for (var i = 0; i < rows.length; i++) {
t_id[n_i_tableau] = rows[i].getAttribute("id");
n_i_tableau++;
}

document.getElementById('module_range').value = t_id;
document.getElementById('formulaire_deplacement').submit();
}
</script>

<?php
$s_html .= '<br>';
$s_html .= "<h2 style=\"text-align:center;\" class=\"og-highlight\">Normal</h2>";
//$s_html .= '<div style="width:645px;text-align:left;color:white;font-weight:bold;padding-left:3px;font-size:11px;border:1px solid #F0ECED;font-family:Trebuchet MS,Arial,Helvetica,sans-serif;background-image:url(\'skin/OGSpy_skin/tableaux/td_c.png\');background-repeat:repeat-y;">Normal</div>';
$s_html .= '<table class="og-table og-little-table" id="table-normal" >';
$s_html .= '<tbody>';
$s_html .= $s_html_normal;
$s_html .= '</tbody>';
$s_html .= '</table>';

$s_html .= '<br>';
$s_html .= '<div style="width:645px;text-align:left;color:white;font-weight:bold;padding-left:3px;font-size:11px;border:1px solid #F0ECED;font-family:Trebuchet MS,Arial,Helvetica,sans-serif;background-image:url(\'skin/OGSpy_skin/tableaux/td_c.png\');background-repeat:repeat-y;">Admin</div>';

$s_html .= '<table id="table-admin" style="width:655px;">';
$s_html .= "<h2 style=\"text-align:center;\" class=\"og-highlight\">Admin</h2>";
//$s_html .= '<div style="width:645px;text-align:left;color:white;font-weight:bold;padding-left:3px;font-size:11px;border:1px solid #F0ECED;font-family:Trebuchet MS,Arial,Helvetica,sans-serif;background-image:url(\'skin/OGSpy_skin/tableaux/td_c.png\');background-repeat:repeat-y;">Admin</div>';
$s_html .= '<table class="og-table og-little-table" id="table-admin" ">';
$s_html .= $s_html_admin;
$s_html .= '</table>';

$s_html .= '<br>';

$s_html .= '<script type="text/javascript">';
$s_html .= 'var table = document.getElementById(\'table-normal\');';
$s_html .= 'var tableDnD = new TableDnD();';
$s_html .= 'tableDnD.init(table);';
$s_html .= 'var table2 = document.getElementById(\'table-admin\');';
$s_html .= 'var tableDnD2 = new TableDnD();';
$s_html .= 'tableDnD2.init(table2);';
$s_html .= '</script>';

$s_html .= '<form id="formulaire_deplacement" method="post" action="index.php?action=gestion&subaction=action_mod">';
$s_html .= '<input type="hidden" name="module_range" id="module_range" value="" />';
$s_html .= '<input type="hidden" name="ordre" id="ordre" value="maj" />';
$s_html .= '<input type="button" onclick="javascript:f_submit();" name="Mettre à jour" value="Mettre à jour" />';
$s_html .= '</form>';

echo $s_html;

?>
?>
<script type="text/javascript">
var table = document.getElementById('table-normal');
var tableDnD = new TableDnD();
tableDnD.init(table);

var table2 = document.getElementById('table-admin');
var tableDnD2 = new TableDnD();
tableDnD2.init(table2);
</script>

<form style="text-align:center;" id="formulaire_deplacement" method="post" action="index.php?action=gestion&subaction=action_mod">
<input type="hidden" name="module_range" id="module_range" value="" />
<input type="hidden" name="ordre" id="ordre" value="maj" />
<input style=" vertical-align: middle;" class=og-button type="button" onclick="javascript:f_submit();" name="Mettre à jour" value="Mettre à jour" />
</form>
Loading

0 comments on commit 2e22ebf

Please sign in to comment.