0byt3m1n1
Path:
/
home
/
kassiope
/
www
/
administrer
/
[
Home
]
File: variables.php
<?php $menu=10; include("../configuration.inc.php"); necessite_identification(); necessite_priv("admin"); $DOC_TITLE = "Variables du site"; include("modeles/haut.php"); switch (vb($_REQUEST['mode'])) { case "ajout" : if (!empty($_FILES['logof']['name'])) { $logo = move_upload_pict($_FILES['logof']); } else { $logo = $_POST['logo']; } ecrire($_POST, $logo); echo '<div class="alert alert-success">Vos modifications ont bien été prises en compte <button type="button" class="close" data-dismiss="alert">×</button></div>'; $tab_var = lire(); affiche_variables($tab_var); break; default : $tab_var = lire(); affiche_variables($tab_var); break; } include("modeles/bas.php"); // LISTE DES FONCTIONS function lire() { chdir("../lib/setup"); $file = fopen("var.inc.php", "r"); $count = 0; $tab_var = array(); while (true) { if (feof($file)) break; $car = fgetc($file); //recherche du début de la variable via $ while(($car != "$") && (true)) { if (feof($file)) break; $car = fgetc($file); } //ici on est au debut de la variable $car = fgetc($file); $intit=""; while (($car != "=") && (true)) { if (feof($file)) break; $intit = $intit.$car; $car = fgetc($file); } //################################################################# //recherche du début de la valeur via " while(($car != "\"") && (true)) { if (feof($file)) break; $car = fgetc($file); } //ici on est au debut de la variable $car = fgetc($file); $var=""; while (($car != "\"") && (true)) { if (feof($file)) break; $var = $var.$car; $car = fgetc($file); } $tab_var[trim($intit)] = $var; $count++; } fclose($file); chdir("../../administrer"); return $tab_var; } function ecrire(&$frm, $logo = '') { chdir("../lib/setup"); $file = fopen("var.inc.php", "w"); if (!isset($frm['top'])) {$frm['top'] = 0;} if (!isset($frm['statusretail'])) {$frm['statusretail'] = 0;} if (!isset($frm['statusaffiliate'])) {$frm['statusaffiliate'] = 0;} if (!isset($frm['statusparrain'])) {$frm['statusparrain'] = 0;} if(!empty($logo)) $frm['logo'] = $logo; $string = "<?php"; foreach($frm as $k => $v): $string .= "\n\$".$k." = \"".trim(addslashes(str_replace('"',"'",$v)))."\"; "; endforeach; $string .= "?>"; /* $string = "<? \n//#### VARIABLES DU SITE #### \n\$site = \"". $frm['site']."\"; \n\$support = \"".$frm['support']."\"; \n\n//#### GESTION DES STOCKS #### \n\$timemax = \"".$frm['timemax']."\"; \n\$seuil = \"".$frm['seuil']."\"; \n\n//#### MODULE REVENDEUR #### \n\$statusretail = \"".$statusretail."\"; \n\n//#### FRAIS DE PORT #### \n\$seuil_total = \"".$frm['seuil_total']."\"; \n\$seuil_total_reve = \"".$frm['seuil_total_reve']."\"; \n\n//#### TAILLES DES PHOTOS #### \n\$catwidth = \"".$frm['catwidth']."\"; \n\$catheight = \"".$frm['catheight']."\"; \n\$prodwidth = \"".$frm['prodwidth']."\"; \n\$prodheight = \"".$frm['prodheight']."\"; \n\$prodminwidth = \"".$frm['prodminwidth']."\"; \n\$prodminheight = \"".$frm['prodminheight']."\"; \n\$markwidth = \"".$frm['markwidth']."\"; \n\$markheight = \"".$frm['markheight']."\"; \n\n//#### AFFILIATION #### \n\$statusaffiliate = \"".$statusaffiliate."\"; \n\$affiliate_rate = \"".$frm['affiliate_rate']."\"; \n\n//#### PARRAIN #### \n\$statusparrain = \"".$statusparrain."\"; \n\$avoir = \"".$frm['avoir']."\"; \n\n//#### PAIEMENT #### \n\$paypal = \"".$frm['paypal']."\"; \n\$sips = \"".$frm['sips']."\"; \n\$paybox_cgi = \"".$frm['paybox_cgi']."\"; \n\$paybox_site = \"".$frm['paybox_site']."\"; \n\$paybox_rang = \"".$frm['paybox_rang']."\"; \n\$paybox_identifiant = \"".$frm['paybox_identifiant']."\"; \n\n//#### COLISSIMO #### \n\$id_colissimo = \"".$frm['id_colissimo']."\"; \n\$pwd_colissimo = \"".$frm['pwd_colissimo']."\"; \n\$support2 = \"".$frm['support2']."\"; \n\n//#### STRIPE #### \n\$stripe_api_key = \"".$frm['stripe_api_key']."\"; \n\$stripe_api_secret = \"".$frm['stripe_api_secret']."\"; \n\n//#### PERSONNALISATION #### \n\$color1 = \"".$frm['color1']."\"; \n\$color2 = \"".$frm['color2']."\"; \n\$logo = \"".$logo."\"; \n\$stripe_webhook = \"".$frm['stripe_webhook']."\"; \n\$map = \"".addslashes($frm['map'])."\"; \n\$agence_dpd = \"".$frm['agence_dpd']."\"; \n\$contrat_dpd = \"".$frm['contrat_dpd']."\"; \n\$active_relance = \"".$frm['active_relance']."\"; \n\$nb_1_relance = \"".$frm['nb_1_relance']."\"; \n\$nb_2_relance = \"".$frm['nb_2_relance']."\"; \n\$nb_relance = \"".$frm['nb_relance']."\"; \n\$remise_relance = \"".$frm['remise_relance']."\"; \n\$active_promo1 = \"".$frm['active_promo1']."\"; \n\$ca_promo = \"".$frm['ca_promo']."\"; \n\$remise_ca_promo = \"".$frm['remise_ca_promo']."\"; \n\$active_promo2 = \"".$frm['active_promo2']."\"; \n\$nb_prod_panier = \"".$frm['nb_prod_panier']."\"; \n\$ca_nb_prod_panier = \"".$frm['ca_nb_prod_panier']."\"; \n\$active_promo3 = \"".$frm['active_promo3']."\"; \n\$seuil_produit_panier = \"".$frm['seuil_produit_panier']."\"; \n\$ca_seuil_produit_panier = \"".$frm['ca_seuil_produit_panier']."\"; \n\$active_promo4 = \"".$frm['active_promo4']."\"; \n\$seuil_produit_offert = \"".$frm['seuil_produit_offert']."\"; \n\$produit_offert = \"".$frm['produit_offert']."\"; ?>"; */ fwrite($file, $string); fclose($file); chdir("../../administrer"); } function affiche_variables(&$tab_var) { global $dirroot; include ($dirroot."/lib/setup/info.inc.php"); ?> <table border=0 width="100%" cellpadding="0" cellspacing="0" class="tablespace"> <form action="<?=$_SERVER['PHP_SELF']?>" method="POST" enctype="multipart/form-data"> <tr><th class="entete" colspan="2">Variables du site</th></tr> <tr><td class="normal">Nom du site web : </td><td><input type="text" name="site" value="<? echo($tab_var['site']); ?>" ></td></tr> <tr><td class="normal">Email administrateur : </td><td><input type="text" name="support" value="<? echo($tab_var['support']); ?>"></td></tr> <tr><td class="normal">Email administrateur 2 : </td><td><input type="text" name="support2" value="<? echo($tab_var['support2']); ?>"></td></tr> <tr><th class="entete" colspan="2">Mode maintenance</th></tr> <input type="hidden" name="maintenance" value="1" /> <tr><td class="normal">Activer le mode maintenance : </td><td class="normal"><input type="radio" name="maintenance" value="1" <?php if (isset($tab_var['maintenance'])) { if ($tab_var['maintenance'] == "1") echo "checked";}?>> Oui<input type="radio" name="maintenance" value="0" <?php if (isset($tab_var['maintenance'])) { if ($tab_var['maintenance'] == "0") echo "checked"; }?>> Non</td></tr> <tr><td class="normal">Titre : </td><td><input type="text" name="titre_maintenance" value="<? echo($tab_var['titre_maintenance']); ?>"></td></tr> <tr><td class="normal">Texte court : </td><td><input type="text" name="texte_maintenance" value="<? echo($tab_var['texte_maintenance']); ?>"></td></tr> <tr><th class="entete" colspan="2">Personnalisation</th></tr> <tr><td class="normal">Logo : </td> <td> <input type="hidden" name="logo" value="<? echo($tab_var['logo']); ?>"> <?php if(!empty($tab_var['logo'])) : echo '<img class="logoback" src="'.$wwwroot.'upload/'.$tab_var['logo'].'" style="max-width:300px" /><br />'; endif; ?> <span class="btn fileinput-button"> <i class="icon-plus icon-white"></i> <span>Sélectionnez une image...</span> <input type="file" name="logof" value=""> </span> <button type="submit" class="btn skyblue-bg" name="add_img">Ajouter / modifier le logo</button><i>Minimum : 200px X 200px</i> </td> </tr> <? if ($param_color) { ?> <tr><td class="normal">Couleur 1 : </td> <td> <div class="input-group color" data-color="<?=(!empty($tab_var['color1'])?$tab_var['color1']:'#000000') ?>" data-color-format="hex" id="colorpicker1"> <input class="form-control input-small" name="color1" value="<?=(!empty($tab_var['color1'])?$tab_var['color1']:'#000000') ?>" type="text"> <span class="add-on"><i style="background-color: <?=(!empty($tab_var[30])?$tab_var[30]:'#000000') ?>;"></i></span> </div> </td> </tr> <tr><td class="normal">Couleur 2 : </td> <td> <div class="input-group color" data-color="<?=(!empty($tab_var['color2'])?$tab_var['color2']:'#000000') ?>" data-color-format="hex" id="colorpicker2"> <input class="form-control input-small" name="color2" value="<?=(!empty($tab_var['color2'])?$tab_var['color2']:'#000000') ?>" type="text"> <span class="add-on"><i style="background-color: <?=(!empty($tab_var[31])?$tab_var[31]:'#000000') ?>;"></i></span> </div> </td> </tr> <? } else { ?> <input class="input-small" name="color1" value="<?=(!empty($tab_var['color1'])?$tab_var['color1']:'#000000') ?>" type="hidden"> <input class="input-small" name="color2" value="<?=(!empty($tab_var['color2'])?$tab_var['color2']:'#000000') ?>" type="hidden"> <? } ?> <? if ($param_stock) { ?> <tr><th class="entete" colspan="2">Gestion des stocks</th></tr> <tr><td class="normal">Délai de rérvation du stock (en minutes) : </td><td><input type="text" class="form-control" name="timemax" value="<? echo vb($tab_var['timemax']); ?>" ></td></tr> <tr><td class="normal">Seuil d'alerte administrateur pour les stocks : </td><td><input type="text" class="form-control" name="seuil" value="<? echo vb($tab_var['seuil']); ?>" ></td></tr> <? } else { ?> <input type="hidden" name="timemax" value="0"> <input type="hidden" name="seuil" value="0"> <? } ?> <? if ($param_revendeur) { ?> <tr><th class="entete" colspan="2">Revendeur</th></tr> <tr><td class="normal">Activer le module revendeur : </td><td class="normal"><input type="radio" name="statusretail" value="1" <?php if (isset($tab_var['statusretail'])) { if ($tab_var['statusretail'] == "1") echo "checked";}?>> Oui<input type="radio" name="statusretail" value="0" <?php if (isset($tab_var['statusretail'])) { if ($tab_var['statusretail'] == "0") echo "checked"; }?>> Non</td></tr> <? } else { ?> <input type="hidden" name="statusretail" value="1"> <? } ?> <tr><th class="entete" colspan="2">Frais de port</th></tr> <tr><td class="normal">PUBLIC : Seuil de gratuité des frais de port (en € TTC) : </td><td><input type="text" class="form-control" name="seuil_total" value="<? echo vb($tab_var['seuil_total']); ?>" ></td></tr> <tr><td class="normal">REVENDEUR : Seuil de gratuité des frais de port (en € TTC) : </td><td><input type="text" class="form-control" name="seuil_total_reve" value="<? echo vb($tab_var['seuil_total_reve']); ?>" ></td></tr> <? if(1==2) { ?> <tr><th class="entete" colspan="2">Taille des images</th></tr> <tr><td class="normal">Largeur des photos catégories : </td><td><input type="text" class="form-control" name="catwidth" value="<? echo vb($tab_var['catwidth']); ?>" ></td></tr> <tr><td class="normal">Hauteur des photos catégories : </td><td><input type="text" class="form-control" name="catheight" value="<? echo vb($tab_var['catheight']); ?>" ></td></tr> <tr><td class="normal">Largeur des photos produits : </td><td><input type="text" class="form-control" name="prodwidth" value="<? echo vb($tab_var['prodwidth']); ?>" ></td></tr> <tr><td class="normal">Hauteur des photos produits : </td><td><input type="text" class="form-control" name="prodheight" value="<? echo vb($tab_var['prodheight']); ?>" ></td></tr> <tr><td class="normal">Largeur des photos produits (miniatures) : </td><td><input type="text" class="form-control" name="prodminwidth" value="<? echo vb($tab_var['prodminwidth']); ?>" ></td></tr> <tr><td class="normal">Hauteur des photos produits (miniatures) : </td><td><input type="text" class="form-control" name="prodminheight" value="<? echo vb($tab_var['prodminheight']); ?>" ></td></tr> <tr><td class="normal">Largeur des photos marques : </td><td><input type="text" class="form-control" name="markwidth" value="<? echo vb($tab_var['markwidth']); ?>" ></td></tr> <tr><td class="normal">Hauteur des photos marques : </td><td><input type="text" class="form-control" name="markheight" value="<? echo vb($tab_var['markheight']); ?>" ></td></tr> <? } else { ?> <input type="hidden" name="catwidth" value="<? echo vb($tab_var['catwidth']); ?>"> <input type="hidden" name="catheight" value="<? echo vb($tab_var['catheight']); ?>"> <input type="hidden" name="prodwidth" value="<? echo vb($tab_var['prodwidth']); ?>"> <input type="hidden" name="prodheight" value="<? echo vb($tab_var['prodheight']); ?>"> <input type="hidden" name="prodminwidth" value="<? echo vb($tab_var['prodminwidth']); ?>"> <input type="hidden" name="prodminheight" value="<? echo vb($tab_var['prodminheight']); ?>"> <input type="hidden" name="markwidth" value="<? echo vb($tab_var['markwidth']); ?>"> <input type="hidden" name="markheight" value="<? echo vb($tab_var['markheight']); ?>"> <? } ?> <? if ($param_affiliation) { ?> <tr><th class="entete" colspan="2">Affiliation</th></tr> <tr><td class="normal">Activer le module affiliation : </td><td class="normal"><input type="radio" name="statusaffiliate" value="1" <?php if (isset($tab_var['statusaffiliate'])) { if ($tab_var['statusaffiliate'] == "1") echo "checked";}?>> Oui<input type="radio" name="affiliate" value="0" <?php if (isset($tab_var['statusaffiliate'])) { if ($tab_var['statusaffiliate'] == "0") echo "checked"; }?>> Non</td></tr> <tr><td class="normal" style="width:40%">Commission reversée aux affiliés (sur le total HT de la commande) : </td><td class="normal"><input type="text" style="width:30px" name="affiliate_rate" value="<? if (isset($tab_var['affiliate_rate'])) echo($tab_var['affiliate_rate']); ?>" > %</td></tr> <? } else { ?> <input type="hidden" name="statusaffiliate" value="0"> <input type="hidden" name="affiliate_rate" value="0"> <? } ?> <!-- <tr><td class="entete" colspan="2"><b>PARRAINAGE : </b></td></tr> <tr><td class="normal">Activer le module parrainage : </td><td class="normal"><input type="radio" name="statusparrain" value="1" <?php if (isset($tab_var['statusparrain'])) { if ($tab_var['statusparrain'] == "1") echo "checked";}?>> Oui<input type="radio" name="statusaffiliate" value="0" <?php if (isset($tab_var[17])) { if ($tab_var[17] == "0") echo "checked"; }?>> Non</td></tr> <tr><td class="normal" style="width:40%">Avoir reversé dans le module parrainage : </td><td class="normal"><input type="text" style="width:30px" name="avoir" value="<? if (isset($tab_var['avoir'])) echo($tab_var['avoir']); ?>" > €</td></tr> --> <input type="hidden" name="statusparrain" value="0"> <input type="hidden" name="avoir" value="0"> <? if ($param_colissimo) { ?> <tr><th class="entete" colspan="2"><!--<i class="fa fa-truck"></i>--> Transporteur Colissimo</th></tr> <tr><td class="normal">Identifiant : </td><td><input type="text" class="" name="id_colissimo" value="<? echo vb($tab_var['id_colissimo']); ?>" ></td></tr> <tr><td class="normal">Mot de passe : </td><td><input type="text" class="" name="pwd_colissimo" value="<? echo vb($tab_var['pwd_colissimo']); ?>" ></td></tr> <? } else { ?> <input type="hidden" name="id_colissimo" value=" "> <input type="hidden" name="pwd_colissimo" value=" "> <? } ?> <? if ($param_dpd) { ?> <tr><th class="entete" colspan="2">Transporteur DPD</th></tr> <tr><td class="normal">Code agence : </td><td><input type="text" class="" name="agence_dpd" value="<? echo vb($tab_var['agence_dpd']); ?>" ></td></tr> <tr><td class="normal">Numéro de contrat : </td><td><input type="text" class="" name="contrat_dpd" value="<? echo vb($tab_var['contrat_dpd']); ?>" ></td></tr> <? } else { ?> <input type="hidden" name="agence_dpd" value=" "> <input type="hidden" name="contrat_dpd" value=" "> <? } ?> <? if ($param_paypal) { ?> <tr><th class="entete" colspan="2">Paiement sécurisé PAYPAL</th></tr> <tr><td class="normal">Email PAYPAL</td><td><input type="text" name="paypal" value="<? echo $tab_var['paypal']; ?>" ></td></tr> <? } else { ?> <input type="hidden" name="paypal" value=" "> <? } ?> <? if ($param_mercanet) { ?> <tr><th class="entete" colspan="2">Paiement sécurisé MERCANET</th></tr> <tr><td class="normal">Environnement : </td><td class="normal"><input type="radio" name="mercanet_env" value="1" <?php if (isset($tab_var['mercanet_env'])) { if ($tab_var['mercanet_env'] == "1") echo "checked";}?>> PRODUCTION<input type="radio" name="mercanet_env" value="0" <?php if (!isset($tab_var['mercanet_env']) || $tab_var['mercanet_env'] == "0") echo "checked"; ?>> TEST</td></tr> <tr><td class="normal">Version</td><td><input type="text" name="mercanet_version" value="<? echo $tab_var['mercanet_version']; ?>" ></td></tr> <tr><td class="normal">Merchant ID</td><td><input type="text" name="mercanet_merchant_id" value="<? echo $tab_var['mercanet_merchant_id']; ?>" ></td></tr> <tr><td class="normal">Clé secrète</td><td><input type="text" name="mercanet_secret" value="<? echo $tab_var['mercanet_secret']; ?>" ></td></tr> <tr><td colspan="2" class="normal"> <i class="fa fa-question-circle"></i> Vous pouvez tester votre paiement en utilisant une des cartes bancaires virtuelles : <a href="https://documentation.mercanet.bnpparibas.net/index.php?title=Cartes_de_test" target="_blank">disponibles ici</a>. CVV 123 Date supérieur à la date du jour. <br />Paramètres de test : MerchantID = <b>211000021310001</b> / SecretKey = <b>S9i8qClCnb2CZU3y3Vn0toIOgz3z_aBi79akR30vM9o</b> </td></tr> <? } else { ?> <input type="hidden" name="mercanet_env" value="0"> <input type="hidden" name="mercanet_version" value="1"> <input type="hidden" name="mercanet_merchant_id" value="211000021310001"> <input type="hidden" name="mercanet_secret" value="S9i8qClCnb2CZU3y3Vn0toIOgz3z_aBi79akR30vM9o"> <? } ?> <? if ($param_stripe) { ?> <tr><th class="entete" colspan="2">Paiement sécurisé STRIPE</th></tr> <tr><td class="normal"><b>Clé publique</b></td><td><input type="text" name="stripe_api_key" value="<? echo $tab_var['stripe_api_key']; ?>" ><i> sk_live_xxxxxxxxxxxxxxxxxxxxxxxx</i></td></tr> <tr><td class="normal"><b>Clé secrète</b></td><td><input type="text" name="stripe_api_secret" value="<? echo $tab_var['stripe_api_secret']; ?>" ><i> pk_live_xxxxxxxxxxxxxxxxxxxxxxxx</i></td></tr> <tr><td colspan="2" class="normal"><i class="fa fa-question-circle"></i> Vous pouvez tester votre paiement en renseignant les codes de test STRIPE (sk_test_xx et pk_test_xx) et en utilisant la carte bancaire virtuelle : <b>4242 4242 4242 4242</b> CVV 123 Date supérieur à la date du jour. </td></tr> <tr><td class="normal"><b>WEBHOOK</b> Clé secrète (confirmation de paiement)</td><td><input type="text" name="stripe_webhook" value="<? echo $tab_var['stripe_webhook']; ?>" ><i> whsec_xxxxxxxxxxxxxxxxxxxxxxxx</i></td></tr> <tr><td colspan="2" class="normal"><i class="fa fa-question-circle"></i> URL à renseigner pour la création du webhook sur STRIPE : <b><?php echo $wwwroot; ?>cb/webhook.php</b> </td></tr> <? } else { ?> <input type="hidden" name="stripe_api_key" value=" "> <input type="hidden" name="stripe_api_secret" value=" "> <input type="hidden" name="stripe_webhook" value=" "> <? } ?> <? if ($param_relance) { ?> <tr><th class="entete" colspan="2">Relance panier : </th></tr> <tr><td class="normal">Activer le module : </td><td class="normal"><input type="radio" name="active_relance" value="1" <?php if (isset($tab_var['active_relance'])) { if ($tab_var['active_relance'] == "1") echo "checked";}?>> Oui<input type="radio" name="active_relance" value="0" <?php if (isset($tab_var['active_relance'])) { if ($tab_var['active_relance'] == "0") echo "checked"; }?>> Non</td></tr> <tr><td class="normal" style="width:40%">Nb heures avant 1<sup>ère</sup> relance : </td><td class="normal"><div class="input-group"><input type="text" class="form-control" name="nb_1_relance" value="<? if (isset($tab_var['nb_1_relance'])) echo($tab_var['nb_1_relance']); ?>" ><span class="add-on">Heures</span></div></td></tr> <tr><td class="normal" style="width:40%">Nb jours avant 2<sup>ème</sup> relance : </td><td class="normal"><div class="input-group"><input type="text" class="form-control" name="nb_2_relance" value="<? if (isset($tab_var['nb_2_relance'])) echo($tab_var['nb_2_relance']); ?>" > <span class="add-on">Jours</span></div></td></tr> <tr><td class="normal" style="width:40%">Nb récurrences de relances (0 pour une seule relance) : </td><td class="normal"><div class="input-group"><input type="text" class="form-control" name="nb_relance" value="<? if (isset($tab_var['nb_relance'])) echo($tab_var['nb_relance']); ?>" > <span class="add-on">Fois</span></div> </td></tr> <tr><td class="normal" style="width:40%">Remise à partir de la 2<sup>ème</sup> relance : </td><td class="normal"><div class="input-group"><input type="text" class="form-control" name="remise_relance" value="<? if (isset($tab_var['remise_relance'])) echo($tab_var['remise_relance']); ?>" > <span class="add-on">%</span></div></td></tr> <? } else { ?> <input type="hidden" name="active_relance" value=" "> <input type="hidden" name="nb_1_relance" value=" "> <input type="hidden" name="nb_2_relance" value=" "> <input type="hidden" name="nb_relance" value=" "> <input type="hidden" name="remise_relance" value=" "> <? } ?> <? if ($param_anniversaire) { ?> <tr><th class="entete" colspan="2">Anniversaire : </th></tr> <tr><td class="normal">Activer le module : </td><td class="normal"><input type="radio" name="active_anniv" value="1" <?php if (isset($tab_var['active_anniv'])) { if ($tab_var['active_anniv'] == "1") echo "checked";}?>> Oui<input type="radio" name="active_anniv" value="0" <?php if (isset($tab_var['active_anniv'])) { if ($tab_var['active_anniv'] == "0") echo "checked"; }?>> Non</td></tr> <tr><td class="normal" style="width:40%">Minimum de commande : </td><td class="normal"><div class="input-group"><input type="text" class="form-control" name="seuil_anniv" value="<? if (isset($tab_var['seuil_anniv'])) echo($tab_var['seuil_anniv']); ?>" > <span class="add-on">€</span></div> </td></tr> <tr><td class="normal" style="width:40%">Remise : </td><td class="normal"><div class="input-group"><input type="text" class="form-control" name="remise_anniv" value="<? if (isset($tab_var['remise_anniv'])) echo($tab_var['remise_anniv']); ?>" > <span class="add-on">€</span></div></td></tr> <tr><td class="normal" style="width:40%">Durée de validité : </td><td class="normal"><div class="input-group"><input type="text" class="form-control" name="duree_anniv" value="<? if (isset($tab_var['duree_anniv'])) echo($tab_var['duree_anniv']); ?>" > <span class="add-on">jour(s)</span></div></td></tr> <? } else { ?> <input type="hidden" name="active_anniv" value=" "> <input type="hidden" name="seuil_anniv" value=" "> <input type="hidden" name="remise_anniv" value=" "> <input type="hidden" name="duree_anniv" value=" "> <? } ?> <? if ($param_promo1) { ?> <tr><th class="entete" colspan="2">Promotions automatiques (sur la prochaine commande) : </th></tr> <tr><td class="normal">Activer le module : </td><td class="normal"><input type="radio" name="active_promo1" value="1" <?php if (isset($tab_var['active_promo1'])) { if ($tab_var['active_promo1'] == "1") echo "checked";}?>> Oui<input type="radio" name="active_promo1" value="0" <?php if (isset($tab_var['active_promo1'])) { if ($tab_var['active_promo1'] == "0") echo "checked"; }?>> Non</td></tr> <tr><td class="normal" style="width:40%">CA a réaliser : </td><td class="normal"><div class="input-group"><input type="text" class="form-control" name="ca_promo" value="<? if (isset($tab_var['ca_promo'])) echo($tab_var['ca_promo']); ?>" > <span class="add-on">€</span></div></td></tr> <tr><td class="normal" style="width:40%">Remise sur la commande suivante : </td><td class="normal"><div class="input-group"><input type="text" class="form-control" name="remise_ca_promo" value="<? if (isset($tab_var['remise_ca_promo'])) echo($tab_var['remise_ca_promo']); ?>" > <span class="add-on">%</span></div></td></tr> <? } else { ?> <input type="hidden" name="active_promo1" value=" "> <input type="hidden" name="ca_promo" value=" "> <input type="hidden" name="remise_ca_promo" value=" "> <? } ?> <? if ($param_promo2) { ?> <tr><th class="entete" colspan="2">Promotions produits (<b>X</b>% de remise à partir de <b>Y</b> produits achetés) : </th></tr> <tr><td class="normal">Activer le module : </td><td class="normal"><input type="radio" name="active_promo2" value="1" <?php if (isset($tab_var['active_promo2'])) { if ($tab_var['active_promo2'] == "1") echo "checked";}?>> Oui<input type="radio" name="active_promo2" value="0" <?php if (isset($tab_var['active_promo2'])) { if ($tab_var['active_promo2'] == "0") echo "checked"; }?>> Non</td></tr> <tr><td class="normal" style="width:40%">Nombre de produit dans le panier <b>Y</b> : </td><td class="normal"><div class="input-group"><input type="text" class="form-control" name="nb_prod_panier" value="<? if (isset($tab_var['nb_prod_panier'])) echo($tab_var['nb_prod_panier']); ?>" > <span class="add-on">Produits</span></div></td></tr> <tr><td class="normal" style="width:40%">Remise sur le panier total <b>X</b> : </td><td class="normal"><div class="input-group"><input type="text" class="form-control" name="ca_nb_prod_panier" value="<? if (isset($tab_var['ca_nb_prod_panier'])) echo($tab_var['ca_nb_prod_panier']); ?>" > <span class="add-on">%</span></div></td></tr> <? } else { ?> <input type="hidden" name="active_promo2" value=" "> <input type="hidden" name="nb_prod_panier" value=" "> <input type="hidden" name="ca_nb_prod_panier" value=" "> <? } ?> <? if ($param_promo3) { ?> <tr><th class="entete" colspan="2">Promotions produits (Pour <b>X</b> produits achetés le <b>X+1</b> à -<b>Y</b>%) : </th></tr> <tr><td class="normal">Activer le module : </td><td class="normal"><input type="radio" name="active_promo3" value="1" <?php if (isset($tab_var['active_promo3'])) { if ($tab_var['active_promo3'] == "1") echo "checked";}?>> Oui<input type="radio" name="active_promo3" value="0" <?php if (isset($tab_var['active_promo3'])) { if ($tab_var['active_promo3'] == "0") echo "checked"; }?>> Non</td></tr> <tr><td class="normal" style="width:40%">Seuil produit dans le panier <b>X</b> : </td><td class="normal"><div class="input-group"><input type="text" class="form-control" name="seuil_produit_panier" value="<? if (isset($tab_var['seuil_produit_panier'])) echo($tab_var['seuil_produit_panier']); ?>" ><span class="add-on">Produits</span></div></td></tr> <tr><td class="normal" style="width:40%">Remise sur le produit X+1 <b>Y</b> : </td><td class="normal"><div class="input-group"><input type="text" class="form-control" name="ca_seuil_produit_panier" value="<? if (isset($tab_var['ca_seuil_produit_panier'])) echo($tab_var['ca_seuil_produit_panier']); ?>" > <span class="add-on">%</span></div></td></tr> <tr><td class="normal" style="width:40%">Produit concerné : </td><td class="normal"> <select name="produit_panier"> <?php $recprod = mysql_query_override("select * from gaia_produits order by nom_fr"); while($prod = mysql_fetch_array_override($recprod)) { echo '<option value="'.$prod['id'].'" '.(($prod['id']==$tab_var['produit_panier'])?'selected':'').'>'.$prod['nom_fr'].'</option>'; } ?> </select> </td></tr> <? } else { ?> <input type="hidden" name="active_promo3" value=" "> <input type="hidden" name="seuil_produit_panier" value=" "> <input type="hidden" name="ca_seuil_produit_panier" value=" "> <input type="hidden" name="produit_panier" value=" "> <? } ?> <? if ($param_promo4) { ?> <tr><th class="entete" colspan="2">Promotions produits (Produit offert à partir de X € d'achat) : </th></tr> <tr><td class="normal">Activer le module : </td><td class="normal"><input type="radio" name="active_promo4" value="1" <?php if (isset($tab_var['active_promo4'])) { if ($tab_var['active_promo4'] == "1") echo "checked";}?>> Oui<input type="radio" name="active_promo4" value="0" <?php if (isset($tab_var['active_promo4'])) { if ($tab_var['active_promo4'] == "0") echo "checked"; }?>> Non</td></tr> <tr><td class="normal" style="width:40%">Seuil produit dans le panier <b>X</b> : </td><td class="normal"><div class="input-group"><input type="text" class="form-control" name="seuil_produit_offert" value="<? if (isset($tab_var['seuil_produit_offert'])) echo($tab_var['seuil_produit_offert']); ?>" ><span class="add-on">€</span></div></td></tr> <tr><td class="normal" style="width:40%">Produit offert : </td><td class="normal"> <select name="produit_offert"> <?php $recprod = mysql_query_override("select * from gaia_produits order by nom_fr"); while($prod = mysql_fetch_array_override($recprod)) { echo '<option value="'.$prod['id'].'" '.(($prod['id']==$tab_var['produit_offert'])?'selected':'').'>'.$prod['nom_fr'].'</option>'; } ?> </select> </td></tr> <? } else { ?> <input type="hidden" name="active_promo4" value=" "> <input type="hidden" name="seuil_produit_offert" value=" "> <input type="hidden" name="produit_offert" value=" "> <? } ?> <? if ($param_paypal==1111111) { ?> <tr><td class="normal"> <b>Solution SIPS (ATOS) : Numéro de certificat</b><br /> <strong>E-transactions</strong> (Crédit Agricole - test : 013044876511111),<br /> <strong>Sogenactif</strong> (Société générale - test : 014213245611111),<br /> <strong>Mercanet</strong> (BNP Paribas - test : 082584341411111),<br /> <strong>Cyberplus</strong> (Banque Populaire - test : 038862749811111),<br /> <strong>Sherlock's</strong> (Crédit Lyonnais - test : 014295303911111),<br /> <strong>Elysnet</strong> (CCF - test : 014102450311111)<br /> <strong>Scellius</strong> (LA POSTE - test : 014141675911111) </td><td><input type="text" name="sips" value="<? echo $tab_var['sips']; ?>" ></td></tr> <tr><td colspan="2" class="normal"><b>Solution PAYBOX :</b></td></tr> <tr> <td class="normal">URL DU CGI</td> <td><input type="text" name="paybox_cgi" value="<? echo vb($tab_var['paybox_cgi']); ?>" ></td> </tr> <tr><td class="normal">SITE (TEST : 1999888)</td><td><input type="text" class="form-control" name="paybox_site" value="<? echo vb($tab_var['paybox_site']); ?>" ></td></tr> <tr><td class="normal">RANG (TEST : 99)</td><td><input type="text" class="form-control" name="paybox_rang" value="<? echo vb($tab_var['paybox_rang']); ?>" ></td></tr> <tr><td class="normal">IDENTIFIANT (TEST : 2)</td><td><input type="text" class="form-control" name="paybox_identifiant" value="<? echo vb($tab_var['paybox_identifiant']); ?>" ></td></tr> <tr> <? } else { ?> <input type="hidden" name="sips" value=" "> <input type="hidden" name="paybox_site" value=" "> <input type="hidden" name="paybox_rang" value=" "> <input type="hidden" name="paybox_cgi" value=" "> <input type="hidden" name="paybox_identifiant" value=" "> <? } ?> <tr><th class="entete" colspan="2">Google Map</th></tr> <tr><td class="normal">Url de l'iFrame : </td><td><textarea class="mceNoEditor form-control-" name="map"><? echo stripslashes($tab_var['map']); ?></textarea ></td></tr> <tr><th class="entete" colspan="2">Scripts dans la balise <i><head></i></th></tr> <tr><td colspan="2"><textarea class="mceNoEditor form-control-" name="script_head"><? echo stripslashes($tab_var['script_head']); ?></textarea ></td></tr> <tr><th class="entete" colspan="2">Scripts au début de la balise <i><body></i></th></tr> <tr><td colspan="2"><textarea class="mceNoEditor form-control-" name="script_body_top"><? echo stripslashes($tab_var['script_body_top']); ?></textarea ></td></tr> <tr><th class="entete" colspan="2">Scripts à la fin de la balise <i><body></i></th></tr> <tr><td colspan="2"><textarea class="mceNoEditor form-control-" name="script_body_bottom"><? echo stripslashes($tab_var['script_body_bottom']); ?></textarea ></td></tr> <td align="center" colspan="2"> <input type="submit" name="action" class="bouton" value="Enregistrer les modifications"> <input type="hidden" name="mode" value="ajout"> </form> </td></tr> </table> <? } ?>