149 lines
7.1 KiB
PHP
Executable File
149 lines
7.1 KiB
PHP
Executable File
<?php
|
|
$nomFicAppelant = basename(__FILE__);
|
|
// -----------------------------------------------------
|
|
// Var
|
|
// -----------------------------------------------------
|
|
$ID='';
|
|
$param='';
|
|
$valeur='';
|
|
$gID='';
|
|
$description='';
|
|
$gScript='';
|
|
//
|
|
$cGoogle="";
|
|
$fileName=$includePathPublication. "/googleA/cGoogle.txt";
|
|
|
|
// -----------------------------------------------------
|
|
// Post
|
|
// -----------------------------------------------------
|
|
if (isset($_POST['gID'])) {$gID=$_POST['gID'];}
|
|
if (isset($_POST['description'])) {$description=$_POST['description'];}
|
|
if (isset($_POST['gScript'])) {$gScript=$_POST['gScript'];}
|
|
if (isset($_GET['codeOpe'])) {$codeOpe=$_GET['codeOpe'];}
|
|
if (isset($_POST['codeOpe'])) {$codeOpe=$_POST['codeOpe'];}
|
|
if (isset($_POST['cGoogle'])) {$cGoogle=$_POST['cGoogle'];}
|
|
|
|
// -----------------------------------------------------
|
|
// Update
|
|
// -----------------------------------------------------
|
|
if ($codeOpe=='upGID') {
|
|
include ("gID.reqUpdate.php");
|
|
include ("gID.makeFichier.php");
|
|
}
|
|
|
|
// -----------------------------------------------------
|
|
// Update compte google
|
|
// -----------------------------------------------------
|
|
if ($codeOpe=='upCpteG') {
|
|
file_put_contents($fileName, $cGoogle);
|
|
}
|
|
|
|
// -----------------------------------------------------
|
|
// Delete
|
|
// -----------------------------------------------------
|
|
if ($codeOpe=='delGID') {
|
|
include ("gID.reqDelete.php");
|
|
}
|
|
|
|
// -----------------------------------------------------
|
|
// Select
|
|
// -----------------------------------------------------
|
|
include ("gID.reqSelect.php");
|
|
|
|
// -----------------------------------------------------
|
|
// Debug
|
|
// -----------------------------------------------------
|
|
if (isset($debug[1]) && $debug[1] == '1') {include ("gID.debug.php");}
|
|
|
|
// -----------------------------------------------------
|
|
// Btn ajout
|
|
// -----------------------------------------------------
|
|
echo '<div id="zoneRechercheWbm" >';
|
|
echo '<span title="Ajouter un paramètre suppose du code en phase avec ce parametre" class="boutonsWebmaster" style="margin:17px;" onClick="window.self.location=\'./frmModale.php?affModale=25-2\';" >';
|
|
echo '<i class="fad fa-plus"></i> ';
|
|
echo 'Ajouter un script (Google ou autre)';
|
|
echo '</span>';
|
|
|
|
// echo '<span title="Regénerer" class="boutonsWebmaster" style="margin:17px;" onClick="window.self.location=\'./frm.seo.php?affSeo=2&codeOpe=upGID\';" >';
|
|
// echo '<i class="fad fa-plus"></i> ';
|
|
// echo 'Regénerer le fichier';
|
|
// echo '</span>';
|
|
|
|
echo '<span title="Mon compte google" class="boutonsWebmaster" style="margin:17px;" onClick="window.open(\'https://analytics.google.com\', \'_blank\');" >';
|
|
echo '<i class="fad fa-vr-cardboard" style="color:#FBCE9A;"></i> ';
|
|
echo 'Aller sur mon compte Google analytic';
|
|
echo '</span>';
|
|
|
|
// -----------------------------------------------------
|
|
// Zone aide
|
|
// -----------------------------------------------------
|
|
$test=htmlentities("<script> et </script>", ENT_QUOTES, "UTF-8");
|
|
echo '<div id="bandeauAideInfo">';
|
|
echo '<span class="info-icon fad fa-info-circle" onMouseOver="openPopup();"></span>'; // Icône d'information
|
|
echo '<div id="popupInfo" class="popup">';
|
|
echo '<div class="popup-content">';
|
|
echo '<span class="popup-close" onMouseOver="closePopup();" onmouseleave="closePopup();>×</span>';
|
|
echo '<img src="./adminInclude/designAdmin/info.png" alt="Info" class="popup-icon" />';
|
|
echo '<p>Avec un compte google analytic vous aurez accès à la fréquentation détaillée de votre site. A partir de google analytic recopiez le code javascript fournit par google. Ne copier que ce qui est entre ' .$test. ' <b>sans prendre ces balises, et sans retour à la ligne</b>. <br>Vous pourrez par la suite consulter les statistiques et plus avec google.<br>Vous pouvez aussi ajouter d\'autres scripts, comme les annonces publicitaires...</p>';
|
|
echo '</div>';
|
|
echo '</div>';
|
|
echo '</div>';
|
|
echo '</div>';
|
|
|
|
echo '<form name="googleIdF" id="googleIdF" method="POST" >';
|
|
|
|
// -----------------------------------------------------
|
|
// Formulaire
|
|
// -----------------------------------------------------
|
|
echo '<div id="zoneFormWbm" >';
|
|
|
|
// -----------------------------------------------------
|
|
// Champs cachés (certains postés par le JS )
|
|
// -----------------------------------------------------
|
|
echo '<input type="hidden" name="gID" id="gID" value="' .$gID. '" />';
|
|
echo '<input type="hidden" name="description" id="description" value="' .$description. '" />';
|
|
echo '<input type="hidden" name="gScript" id="gScript" value="' .$gScript. '" />';
|
|
// echo '<input type="hidden" value="' .$affSeo. '" name="affSeo" >';
|
|
echo '<input type="hidden" name="codeOpe" id="codeOpe" value="' .$codeOpe. '" />';
|
|
|
|
// -----------------------------------------------------
|
|
// Compte google
|
|
// -----------------------------------------------------
|
|
if (file_exists($fileName)) {
|
|
$cGoogle=file_get_contents($fileName);
|
|
}
|
|
echo '<div style="grid-column:1;" class="libelleLV">Compte google';
|
|
echo '<span class="celluleLV" style="margin-top:1px;"> ';
|
|
echo '<input class="inputWebmaster" style="grid-column:2; max-width:50%;" onChange="upGoogleCpte();" type="text" name="cGoogle" value="' .$cGoogle. '" title="description" >';
|
|
echo '</span>';
|
|
echo '</div>';
|
|
|
|
// -----------------------------------------------------
|
|
// Formulaire
|
|
// -----------------------------------------------------
|
|
echo '<div class="fondColorListe" style="width:100%; text-align:left; display:grid; grid-gap:0px; grid-template-columns:auto 80% auto; padding:0px; margin:0px;" >';
|
|
echo '<span style="grid-column:1;" class="libelleLV">Description</span>';
|
|
echo '<span class="libelleLV" style="grid-column:2;" >Script</span>';
|
|
echo '<span class="libelleLV" style="grid-column:3;" >Action</span>';
|
|
for ($i=0;$i<count($gDescTab);$i++) {
|
|
// description
|
|
echo '<span class="celluleLV" style="margin-top:1px;"> ';
|
|
echo '<input class="inputWebmaster" style="grid-column:1;" type="text" onChange="upGoogleScript(\'' .$gIDTab[$i]. '\');" id="description' .$gIDTab[$i]. '" value="' .$gDescTab[$i]. '" title="description" >';
|
|
echo '</span>';
|
|
|
|
// script
|
|
echo '<span class="celluleLV" style="margin-top:1px;"> ';
|
|
echo '<textarea class="inputWebmaster" style="white-space: break-spaces; grid-column:2; height:100%; width:100%;" type="text" rows="5" onChange="upGoogleScript(\'' .$gIDTab[$i]. '\');" id="gScript' .$gIDTab[$i]. '" value="' .$gScriptTab[$i]. '" title="google script analytic" >' .$gScriptTab[$i]. '</textarea>';
|
|
echo '</span>';
|
|
|
|
// action
|
|
echo '<span class="celluleLV" style="margin-top:1px;"> ';
|
|
echo '<i class="fad fa-trash-alt" style="grid-column:3;color:red;fill:red;" onClick="gIDDelete(\'' .$gIDTab[$i]. '\');" >';
|
|
echo '</i> ';
|
|
echo '</span>';
|
|
}
|
|
echo '</div>';
|
|
|
|
echo '</div>';
|
|
echo '</form>';
|
|
?>
|