public function getErrorDetail($id_error)
 {
     function str_getcsv_lines($string_csv)
     {
         $array0 = explode(";\n", $string_csv, -1);
         $array2 = array();
         foreach ($array0 as $array1) {
             $array2[] = str_getcsv($array1, ',', '"');
         }
         return $array2;
     }
     $arr = str_getcsv_buckutt($this->FADMIN->getErrorDetail($id_error), ',');
     return $arr;
 }
Exemple #2
0
    <?php 
        }
    }
    echo '</tbody></table>';
}
?>
    <p style="text-align: right; text-transform: uppercase; font-weight: bold; font-size: 0.8em;">
        <a href="histo_purchase.php">Voir tout l'historique de mes achats</a>
    </p>
    <h3 style="margin-bottom:5px; text-align: center;">Mes rechargements des 5 derniers jours</h3>
    <?php 
$histoRechargesCSV = $SADMIN->getHistoriqueRecharge($fiveDayBefore, $today);
if ($histoRechargesCSV == 400) {
    echo '<p>Tu n\'as pas rechargé depuis 5 jours.</p>';
} else {
    $histoRecharges = str_getcsv_buckutt($histoRechargesCSV, ',');
    // On vérifie que la conversion du CVS en tableau n'a pas posée d'erreur
    if ($histoRecharges == 400) {
        echo '<div class="errormsg">Un problème est survenu. Contacte buckutt@utt.fr pour une réparation rapide !</div>';
    } else {
        ?>
   <table id="rechargeTable" width="100%" class="tablesorter" style="margin:0px;">
        <thead>
    <tr>
        <th>
            Date
        </th>
        <th>
            Montant
        </th>
        <th>
Exemple #3
0
    $BADMIN = unserialize($_SESSION['buckutt']['BADMIN']);
    // Header de l'IHM
    ?>
<div class="colomn1">
<?php 
    $page->moduleHeader('Les droits');
    $j = '0';
    // Compteur utilisé pour l'alternance des couleurs des lignes du tableau
    if ($allDroits = $BADMIN->getAllRights()) {
        echo '<table width="100%">
      <tr>
        <th>Nom</th>
        <th>Description</th>
        <th>Admin</th>
      </tr>';
        foreach (str_getcsv_buckutt($allDroits, ',') as $droit) {
            /* DESCRIPTION DE $droit
             * 0 = Identifiant du droit
             * 1 = Nom du droit
             * 2 = Description du droit
             * 3 = Si c'est un droit d'administrateur
             */
            echo '<tr class="' . (++$j % 2 ? 'pair' : 'impair') . '">
          <td>' . $droit[0] . '</td>
          <td>' . $droit[1] . '</td>
		  <td>';
            // Cas où c'est un droit admin
            if ($droit[2] == 1) {
                echo 'Oui';
            } elseif ($droit[2] == 0) {
                echo 'Non';
Exemple #4
0
    if ($allDroitsCSV != 400) {
        foreach ($allDroits = str_getcsv_buckutt($allDroitsCSV, ',') as $d => $droit) {
            $page->moduleHeader("Les utilisateurs ayant le droit {$droit['1']}");
            $j = '0';
            // Compteur utilisé pour l'alternance des couleurs des lignes du tableau
            if ($allUsersFromDroit = $BADMIN->getAllUsersFromRight($droit[0])) {
                echo '<table width="100%">
          <tr>
            <th>Utilisateur</th>
            <th>Date de début</th>
            <th>Date de fin</th>
			<th>Point</th>
			<th>Fundation</th>
            <th width="20px"></th>
          </tr>';
                foreach (str_getcsv_buckutt($allUsersFromDroit, ',') as $user) {
                    /* DESCRIPTION DE $user
                     * 0 = Identifiant du lien
                     * 1 = Identifiant de l'utilisateur
                     * 2 = Prénom de l'utilisateur
                     * 3 = Nom de l'utilisateur
                     * 4 = Date de début
                     * 5 = Date de fin
                     * 6 = Point id
                     * 7 = Point name
                     * 8 = Fundation id
                     * 9 = Fundation name
                     */
                    echo '<tr class="' . (++$j % 2 ? 'pair' : 'impair') . '">
              <td>' . $user[2] . ' ' . $user[3] . '</td>
              <td>' . date('d/m/y H:i', $user[4]) . '</td>
Exemple #5
0
    if ($SADMIN->isBuckuttTrezo() == 1) {
        ?>
            <li>
                <a href="b_treso.php">Trésorerie</a>
            </li>
            <?php 
    }
    ?>
        </ul>
    </li>

<?php 
}
$allFundations = $SADMIN->hasDroitsInFundations();
if ($allFundations != 409) {
    foreach (str_getcsv_buckutt($allFundations, ',') as $fundation) {
        ?>
		<li class="ung">
    	<h3><span class="icon"><span></span></span><span class="text"><?php 
        echo $fundation[1];
        ?>
</span><span class="clear"></span></h3>	
		
        <ul>
            <?php 
        if ($SADMIN->isVenteAdmin($fundation[0]) == 1) {
            ?>
            <li>
            	<a href="quick_sale.php?id_fundation=<?php 
            echo $fundation[0];
            ?>
Exemple #6
0
        <thead>
            <tr>
                <th>
                    Organisme
                </th>
				<th>
                    Point
                </th>
                <th>
                    Montant
                </th>
            </tr>
        </thead>
        <tbody>
        <?php 
        $histoPurchases = str_getcsv_buckutt($csvPurchase, ',');
        $j = '0';
        foreach ($histoPurchases as $i => $histoPurchase) {
            echo '<tr class="odd">
                    <td>' . $histoPurchase[0] . '</td>';
            // Cf. function credit_format de header.inc.php
            echo '<td>' . $histoPurchase[2] . '</td>';
            echo '<td>' . credit_format($histoPurchase[1]) . '</td>';
            ?>
        </tr>
        <?php 
        }
        ?>
    </tbody>
    </table>
    <?php 
Exemple #7
0
 $page->modulefooter();
 $page->moduleHeader('Mes objets');
 $j = '0';
 // Compteur utilisé pour l'alternance des couleurs des lignes du tableau
 if ($fundationObjects = $FADMIN->getAllObjects()) {
     echo '<table width="100%">
   <tr>
     <th>Image</th>
     <th>Produit</th>
     <th>1 max.</th>
     <th>Stock</th>
     <th>Catégorie</th>
     <th width="20px"></th>
     <th width="20px"></th>
   </tr>';
     foreach (str_getcsv_buckutt($fundationObjects, ',') as $fundationObject) {
         /* DESCRIPTION DE $fundationObject
          * 0 = L'identifiant de l'object
          * 1 = Le nom de l'objet
          * 2 = L'identifiant de la Categorie
          * 3 = Le nom de la Catégorie
          * 3 = S'il est unique ou non
          * 4 = Le nombre en stock
          * 5 = L'identifiant de l'image associée
          * 8 = S'il s'agit d'une promotion
          */
         $id_object = $fundationObject[0];
         $name_object = $fundationObject[1];
         $id_category = $fundationObject[2];
         $name_category = $fundationObject[3];
         $isunique = $fundationObject[4];
Exemple #8
0
 echo '</table>';
 $page->modulefooter();
 $page->moduleHeader('Toutes Mes Ventes');
 $j = '0';
 // Compteur utilisé pour l'alternance des couleurs des lignes du tableau
 if ($allVentes = $FADMIN->getAllVentes()) {
     echo '<table width="100%">
   <tr>
     <th>Produit</th>
     <th>Début</th>
     <th>Fin</th>
     <th>Nom</th>
     <th width="20px"></th>
     <th width="20px"></th>
   </tr>';
     foreach (str_getcsv_buckutt($allVentes, ',') as $vente) {
         /* DESCRIPTION DE $vente
          * 0 = Identifiant de la vente
          * 1 = Date de début de vente
          * 2 = Date de fin de vente
          * 3 = Identifiant de l'objet en vente
          * 4 = Nom de l'objet en vente
          * 5 = Nom de la vente
          */
         echo '<tr class="' . (++$j % 2 ? 'pair' : 'impair') . '">
       <td>' . $vente[4] . '</td>
       <td>' . date('d/m/y H:i', $vente[1]) . '</td>
       <td>' . date('d/m/y H:i', $vente[2]) . '</td>
       <td>' . $vente[5] . '</td>';
         // Formulaire d'édition d'une vente
         echo '<td><form style="display:inline;" method="post" action="sell.php?id_fundation=' . $id_fundation . '">
Exemple #9
0
	</form>
<?php 
    $page->modulefooter();
    $page->moduleHeader('Mes prix');
    $j = '0';
    // Compteur utilisé pour l'alternance des couleurs des lignes du tableau
    if ($allPrices = $FADMIN->getAllPrice()) {
        echo '<table width="100%">
      <tr>
        <th>Objet</th>
        <th>Groupe</th>
        <th>Crédit</th>
        <th width="20px"></th>
        <th width="20px"></th>
      </tr>';
        foreach (str_getcsv_buckutt($allPrices, ',') as $price) {
            /* DESCRIPTION DE $prix
             * 0 = Identifiant du prix
             * 1 = L'identifiant de l'objet
             * 2 = L'identifiant du groupe       
             * 3 = Le nom du l'objet
             * 4 = Le nom de groupe
             * 5 = Crédit
             */
            echo '<tr class="' . (++$j % 2 ? 'pair' : 'impair') . '">
        <td>' . $price[3] . '</td>
        <td>' . $price[4] . '</td>
      	<td>' . credit_format($price[5]) . '</td>';
            // Formulaire d'édition d'un prix
            echo '<td><form style="display:inline;" method="post" action="price.php?id_fundation=' . $id_fundation . '">
            <input type="hidden" name="id" value="' . $price[0] . '" />
Exemple #10
0
       echo '<p style="text-align:center;margin-bottom:5px;margin-top:0px;">';
       foreach ($Points as $point1) {
           echo '| <a href="#' . $point1[0] . '">' . $point1[1] . '</a> | ';
       }
       echo '</p>
 <a name="' . $point[0] . '"></a>';
       $page->moduleHeader("Les objets au point de vente {$point['1']}");
       $j = '0';
       // Compteur utilisé pour l'alternance des couleurs des lignes du tableau
       if ($allObjectsByPoint = $FADMIN->getAllObjectsByPoint($point[0])) {
           echo '<table width="100%">
     <tr>
       <th>Object</th>
       <th width="20px"></th>
     </tr>';
           foreach (str_getcsv_buckutt($allObjectsByPoint, ',') as $object) {
               /* DESCRIPTION DE $obecj
                * 0 = Identifiant de l'object
                * 1 = Nom de l'object
                */
               echo '<tr class="' . (++$j % 2 ? 'pair' : 'impair') . '">
         <td>' . $object[1] . '</td>';
               // Formulaire de suppression d'un object de ce point de vente
               echo '<td><form style="display:inline;" method="post" action="point_constraint.php?id_fundation=' . $id_fundation . '">
         <input type="hidden" name="object" value="' . $object[0] . '" />
         <input type="hidden" name="point" value="' . $point[0] . '" />
         <input class="delete" type="submit" name="delete" title="Supprimer" value="" />
       </form></td>
     </tr>';
           }
       } else {
Exemple #11
0
		</table>
	</form>
<?php 
    $page->modulefooter();
    $page->moduleHeader('Mes catégories');
    $j = '0';
    // Compteur utilisé pour l'alternance des couleurs des lignes du tableau
    if ($allCategories = $FADMIN->getAllCategories()) {
        echo '<table width="100%">
      <tr>
        <th>Nom</th>
        <th>Priorité</th>
        <th width="20px"></th>
        <th width="20px"></th>
      </tr>';
        foreach (str_getcsv_buckutt($allCategories, ',') as $categorie) {
            /* DESCRIPTION DE $categorie
             * 0 = Identifiant de la catérogie
             * 1 = Nom de la catégorie
             * 2 = Priorité de la catégorie
             */
            echo '<tr class="' . (++$j % 2 ? 'pair' : 'impair') . '">
          <td>' . $categorie[1] . '</td>
          <td>' . $categorie[2] . '</td>';
            if ($categorie[1] != 'Sans catégorie') {
                // Formulaire d'édition d'une categorie
                echo '<td><form style="display:inline;" method="post" action="categorie.php?id_fundation=' . $id_fundation . '">
              <input type="hidden" name="id" value="' . $categorie[0] . '" />
              <input type="hidden" name="name" value="' . $categorie[1] . '" />
              <input type="hidden" name="priorite" value="' . $categorie[2] . '" />
              <input class="edit" type="submit" name="edit" title="Editer" value="" />
Exemple #12
0
		</table>
	</form>
<?php 
    $page->modulefooter();
    $page->moduleHeader('Utilisateurs bloqu&eacute;s');
    $j = '0';
    // Compteur utilisé pour l'alternance des couleurs des lignes du tableau
    $allUsers = $BADMIN->getAllBlockedUsers();
    if ($allUsers != 400) {
        echo '<table width="100%">
      <tr>
        <th>Nom</th>
        <th width="20px"></th>
      </tr>';
        foreach (str_getcsv_buckutt($allUsers, ',') as $user) {
            /* DESCRIPTION DE $point
             * 0 = Identifiant de $point
             * 1 = Nom de $point
             */
            echo '<tr class="' . (++$j % 2 ? 'pair' : 'impair') . '">
          <td>' . $user[1] . ' ' . $user[2] . '</td>';
            // Formulaire de deblocage d'un mec
            echo '<td><form style="display:inline;" method="post" action="block_deblock.php">
          <input type="hidden" name="id" value="' . $user[0] . '" />
          <input class="delete" type="submit" name="deblock" title="Bloquer" value="" />
        </form></td>
      </tr>';
        }
    } else {
        echo "Personne de bloqu&eacute;.";
Exemple #13
0
     //la , est mal gérée, donc, transformée en .
     if (is_numeric($_GET['qteman'])) {
         $_GET['qteman'] = intval($_GET['qteman'] * 100);
         if ($_GET['qteman'] <= $maxcredit - $credit) {
             echo "<p>Actuellement, tu as un crédit de " . credit_format($credit) . " sur ton compte.</p>\r\n    <p>Tu souhaites effectuer un rechargement de " . credit_format($_GET['qteman']) . ".</p>\r\n    <p>Ton solde sera donc de " . credit_format($credit + $_GET['qteman']) . ".</p><p><a href='reload.php'>Retour</a></p>";
             $table = str_getcsv_buckutt($SBUY->transactionEncode($_GET['qteman']), ',');
             echo base64_decode($table[0][1]);
         } else {
             echo "<p>Le montant demandé dépasse le maximum autorisé.</p><p><a href='reload.php'>Retour</a></p>";
         }
     } else {
         echo "<p>Ecris un nombre....</p><p><a href='reload.php'>Retour</a></p>";
     }
 } elseif (isset($_GET['qte'])) {
     if ($_GET['qte'] == 500 or $_GET['qte'] == 1000 or $_GET['qte'] == 2000 or $_GET['qte'] == 3000 or $_GET['qte'] == 4000 or $_GET['qte'] == 5000) {
         $table = str_getcsv_buckutt($SBUY->transactionEncode($_GET['qte']), ',');
         echo "<p>Actuellement, tu as un crédit de " . credit_format($credit) . " sur ton compte.</p>\r\n    <p>Tu souhaites effectuer un rechargement de " . credit_format($_GET['qte']) . ".</p><p>\r\n    Ton solde sera donc de " . credit_format($credit + $_GET['qte']) . ".</p><p><a href='reload.php'>Retour</a></p>";
         echo base64_decode($table[0][1]);
     } else {
         echo "<p>Montant invalide, petit rigolo :) !</p><p><a href='reload.php'>Retour</a><p>";
     }
 } else {
     echo "<p>Hum, rien à voir ici !</p><p><a href='reload.php'>Retour</a><p>";
 }
 ?>
 <?php 
 $page->modulefooter();
 ?>
 <?php 
 $page->msgInfo("Pour le rechargement par carte bancaire, tu seras redirigé vers le site sécurisé de notre partenaire financier, la LCL.");
 ?>
Exemple #14
0
        $histoVentesCSV = $SADMIN->getHistoriqueVentes($date_start['sale'], $date_end['sale']);
        if (empty($histoVentesCSV)) {
            echo '<p>Tu n\'as rien vendu ce mois-ci.';
        } else {
            ?>
    <table width="100%">
    <tr>
        <th>Date</th>
        <th>Produit</th>
        <th>Acheteur</th>
        <th>Lieu</th>
        <th>Organisme</th>
        <th>Prix</th>
    </tr>
<?php 
            $histoVentes = str_getcsv_buckutt($histoVentesCSV, ',');
            $j = '0';
            foreach ($histoVentes as $i => $histoVente) {
                echo '<tr class="' . (++$j % 2 ? 'pair' : 'impair') . '">
        <td>' . date('d/m/y  H:i', $histoVente[0]) . '</td>
        <td>' . $histoVente[1] . '</td>
        <td>' . $histoVente[2] . ' ' . $histoVente[3] . '</td>
        <td>' . $histoVente[5] . '</td>
        <td>' . $histoVente[6] . '</td>';
                // Cf. function credit_format de header.inc.php
                echo '<td>' . credit_format($histoVente[4]) . '</td>';
                ?>
    </tr>
<?php 
            }
            ?>
Exemple #15
0
       }
       echo '</p>
 <a name="' . $group[0] . '"></a>';
       $page->moduleHeader("Les utilisateurs du groupe {$group['1']}");
       $j = '0';
       // Compteur utilisé pour l'alternance des couleurs des lignes du tableau
       if ($allUsersFromGroup = $FADMIN->getAllUsersFromGroup($group[0])) {
           echo '<table width="100%">
     <tr>
       <th>Utilisateur</th>
       <th>Date de début</th>
       <th>Date de fin</th>
       <th width="20px"></th>
       <th width="20px"></th>
     </tr>';
           foreach (str_getcsv_buckutt($allUsersFromGroup, ',') as $user) {
               /* DESCRIPTION DE $user
                * 0 = Identifiant du lien
                * 1 = Identifiant de l'utilisateur
                * 2 = Prénom de l'utilisateur
                * 3 = Nom de l'utilisateur
                * 4 = Date de début
                * 5 = Date de fin
                */
               echo '<tr class="' . (++$j % 2 ? 'pair' : 'impair') . '">
         <td>' . $user[2] . ' ' . $user[3] . '</td>
         <td>' . date('d/m/y H:i', $user[4]) . '</td>
         <td>' . date('d/m/y H:i', $user[5]) . '</td>';
               // Formulaire d'édition des dates d'un utilisateur dans un groupe
               echo '<td><form style="display:inline;" method="post" action="link_user_group.php?id_fundation=' . $id_fundation . '">
         <input type="hidden" name="id" value="' . $user[0] . '" />
Exemple #16
0
 // Recapitulatif des produits en vente
 $page->moduleHeader('Produits disponibles');
 $j = '0';
 // Compteur utilisé pour l'alternance des couleurs des lignes du tableau
 if ($myPropositions = $SBUY->getMyPropositions()) {
     echo '<table width="100%">
   <tr>
     <th>Image</th>
     <th>Produit</th>
     <th>Fin<br />des ventes</th>
     <th>Stock</th>
     <th>Organisme</th>
     <th>Prix</th>
     <th></th>
   </tr>';
     foreach (str_getcsv_buckutt($myPropositions, ',') as $myProposition) {
         /* DESCRIPTION DE $myProposition
          * 0 = Le nom de l'objet
          * 1 = L'identifiant de la Categorie
          * 2 = L'identifiant de l'image associée
          * 3 = S'il est unique ou non
          * 4 = Le nombre en stock
          * 5 = Le nom de l'organisme
          * 6 = La date de fin de vente
          * 7 = Le prix
          * 8 = L'identifiant du prix
          */
         $name_object = $myProposition[0];
         $id_image = $myProposition[2];
         $stock = $myProposition[4];
         $name_fundation = $myProposition[5];
Exemple #17
0
        echo '</select>';
    }
    ?>
				</td>
			</tr>
			<tr id="tr_credit">
				<td>Prix pour ce groupe :</td>
				<td><input type="text" name="credit" id="credit" onBlur="verifPrice(this.value);" maxlength="30" size="30" value="" /> <small>(ex: 10 ou 0.50)</small></td>
			</tr>
			<tr>
				<td>Point par défaut :</td>
				<td>
<?php 
    if ($allPointsCSV = $FADMIN->getAllPoints()) {
        echo '<select name="point" id="point">';
        foreach (str_getcsv_buckutt($allPointsCSV, ',') as $point) {
            echo '<option value ="' . $point[0] . '">' . $point[1] . '</option>';
        }
        echo '</select>';
    }
    ?>
				</td>
			</tr>
			<tr id="date1">
				<td>Début de la vente :</td>
				<td><input id="inputDate1" type="text" name="date_start" id="date_start"
					onBlur="isDateHour(this.value, 1);" maxlength="16" size="16"
					value="" /> <small>(JJ/MM/AAAA ou JJ/MM/AAAA HH:MM)</small>
				</td>
			</tr>
			<tr id="date2">
Exemple #18
0
	</form>
<?php 
    $page->modulefooter();
    $page->moduleHeader('Mes Groupes');
    $j = '0';
    // Compteur utilisé pour l'alternance des couleurs des lignes du tableau
    if ($allFundationGroups = $FADMIN->getAllFundationGroups()) {
        echo '<table width="100%">
      <tr>
        <th>Nom du groupe</th>
        <th>Ouvert ?</th>
        <th>Publique ?</th>
        <th width="20px"></th>
        <th width="20px"></th>
      </tr>';
        foreach (str_getcsv_buckutt($allFundationGroups, ',') as $group) {
            /* DESCRIPTION DE $categorie
             * 0 = Identifiant du groupe
             * 1 = Nom du groupe
             * 2 = Si un utilisateur peut rejoindre lui même le groupe
             * 3 = Si le groupe est publique
             */
            echo '<tr class="' . (++$j % 2 ? 'pair' : 'impair') . '">
          <td>' . $group[1] . '</td>
          <td>';
            // Cas où le groupe est ouvert
            if ($group[2] == 1) {
                echo 'Oui';
            } elseif ($group[2] == 0) {
                echo 'Non';
            }
Exemple #19
0
        </p>
    </form>
    <table id="myTable" width="100%" class="tablesorter">
        <thead>
	    <tr>
	        <th>Date</th>
	        <th>Produit</th>
	        <th>Vendeur</th>
	        <th>Lieu</th>
	        <th>Organisme</th>
	        <th>Prix</th>
	    </tr>
        </thead>
        <tbody>
        <?php 
        $histoPurchases = str_getcsv_buckutt($histoPurchasesCSV, ',');
        $j = '0';
        foreach ($histoPurchases as $i => $histoPurchase) {
            echo '<tr class="odd">
        <td>' . date('d/m/y H:i', $histoPurchase[0]) . '</td>
        <td>' . $histoPurchase[1] . '</td>
        <td>' . $histoPurchase[2] . ' ' . $histoPurchase[3] . '</td>
        <td>' . $histoPurchase[4] . '</td>
        <td>' . $histoPurchase[5] . '</td>';
            echo '<td>' . credit_format($histoPurchase[6]) . '</td>';
            ?>
        </tr>
        <?php 
        }
        ?>
    </tbody>
Exemple #20
0
//$idPage = 167;
$needSBUY = true;
$needFADMIN = false;
$needBADMIN = false;
include_once 'header.inc.php';
//Si le SADMIN et le SBUY sont sérialisés dans la session
if (isset($_SESSION['buckutt']['SADMIN']) && isset($_SESSION['buckutt']['SBUY'])) {
    // On délinéarise les objets SADMIN et SBUY stockés.
    $SADMIN = unserialize($_SESSION['buckutt']['SADMIN']);
    $SBUY = unserialize($_SESSION['buckutt']['SBUY']);
    // Header de l'IHM
    ?>
<div class="colomn1">
    <?php 
    $page->moduleHeader('Recharger en ligne');
    $table = str_getcsv_buckutt($SBUY->transactionClientDecode(base64_encode($_POST['DATA'])), ',');
    if ($table[0][0] == 1) {
        echo "bien recharge de " . $table[0][1] / 100 . " euros";
    } else {
        echo "erreur " . $table[0][0];
    }
    ?>
    <?php 
    $page->modulefooter();
    ?>
</div>
<div class="colomn2">
    <?php 
    include_once 'navigation.inc.php';
    ?>
</div>