function buildParameters() { return array('v' => 1, 'tid' => 'UA-3638032-11', 'ds' => 'collect.php', 'z' => $_GET['z'], 'cid' => getClientId(), 'uip' => $_SERVER['REMOTE_ADDR'], 'ua' => $_SERVER['HTTP_USER_AGENT'], 'dr' => $_GET['dr'], 'sr' => $_GET['sr'], 'vp' => $_GET['vp'], 'de' => $_GET['de'], 'sd' => $_GET['sd'], 'ul' => $_GET['ul'], 'je' => $_GET['je'], 'fl' => $_GET['fl'], 't' => 'event', 'ni' => 1, 'dl' => $_GET['dl'], 'dt' => $_GET['dt'], 'ec' => 'universal analytics on ' . $_GET['dl'], 'ea' => $_GET['ea'], 'el' => ''); }
function getAllCommandeUser($client) { $client_id = getClientId($client); //var_dump($client_id); require 'connect.php'; $query = $pdo->prepare("\n\tSELECT client_id, commande_id, status, COUNT(produit_id) AS nombre_element, SUM(quantitee*price) AS prix_commande FROM commandes NATURAL JOIN produits NATURAL JOIN produits_commander WHERE client_id = :client_id GROUP BY commande_id\n\t"); $query->bindValue(':client_id', $client_id['client_id'], PDO::PARAM_INT); $query->execute(); return $query->fetchAll(PDO::FETCH_ASSOC); }