diff --git a/public/ajax/getG1PubKey.php b/public/ajax/getG1PubKey.php new file mode 100644 index 0000000..862b7a9 --- /dev/null +++ b/public/ajax/getG1PubKey.php @@ -0,0 +1,25 @@ + 0\''); + putenv("silkPubKeyUser=$silkPubKeyUser"); + $silkUser = system('echo "$silkPubKeyUser" | tail -n2 | head -n1'); + if ($silkUser == $parseUser) + { + $silkPubKey = system('echo "$silkPubKeyUser" | head -n1'); + } + } + + if (empty($silkPubKey)) + { + echo "Aucune clé n'a été trouvé à partir de ce pseudo"; + } +} +?> diff --git a/public/ajax/readRecords.php b/public/ajax/readRecords.php index e251f71..123b641 100644 --- a/public/ajax/readRecords.php +++ b/public/ajax/readRecords.php @@ -19,7 +19,7 @@ $bdd = new \PDO("mysql:host=$host;dbname=$database_name", $username, $password); $params["antenne_slug"] = $antenne_slug; - $requete = "SELECT products.*, users.username + $requete = "SELECT products.*, users.username, users.pubkey FROM products LEFT JOIN antennes ON antennes.id = products.antenne_id @@ -52,12 +52,19 @@ $bdd = new \PDO("mysql:host=$host;dbname=$database_name", $username, $password); $data .= " $number"; - $data .= ''.$row['name'].''; + $prix = $row['prix']; + $vendeur = $row['username']; + $produit = $row['name']; + $pubkey = $row['pubkey']; + $pubkeyShort = substr($pubkey, 0, 8); + $vendeur_format = "$vendeur"; + $cle_pub_format = " $pubkeyShort... "; + $data .= ''.$produit.''; $data .= ''; - $data .= ''.$row['username'].''; - $data .= ''; + $data .= ''.$vendeur_format.''; + $data .= ''.$cle_pub_format.''; $data .= ''.$row['quantite'].''; - $data .= ''.$row['prix'].''; + $data .= ''.$prix.''; if ($row['username'] == $_GET['nom_connecte'] ) { $data .= ''; $data .= ' + -{% endblock %} \ No newline at end of file + + + + +{% endblock %} diff --git a/src/Product/views/admin/products/index.twig b/src/Product/views/admin/products/index.twig index 36fda25..65a6659 100644 --- a/src/Product/views/admin/products/index.twig +++ b/src/Product/views/admin/products/index.twig @@ -177,10 +177,6 @@
 
-
- - -