1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
<?php
global $wpdb;
//Je construis la requete à part
$requete = "SELECT meta_value,meta_key FROM `usermeta` ";
$requete .= "where user_id='".get_current_user_id()."' ";
$donnees = $wpdb->get_results($requete);
$domaine=array();
$metiers_domaine=array();
$description=array();
$dom=array();
$m_d=array();
$desc=array(); ?>
<?php
foreach ($donnees as $user) {
if ($user->meta_key == "job_listing_category") {
$domaine[] = $user->meta_value;
$dom[] = $user->umeta_id;
}
if ($user->meta_key == "description") {
$description[]= $user->meta_value;
$desc[]= $user->umeta_id;
}
if ($user->meta_key == "metier_domaine") {
$m_d[] = unserialize($user->meta_value);
//$metiers_domaine1[] = $user->umeta_id;
//$arraye = array($metiers_domaine, $metiers_domaine1);
}
}
?>
<form method="POST" action="p.php">
<table class="pure-table pure-table-bordered">
<tr><th>Domaine</th>
<?php foreach($domaine as $dom ){
echo "<td>".ucfirst($dom)."<br></td> ";} ?>
</tr>
<tr><th>Metier Domaine</th>
<?php foreach($m_d as $key){
echo "<td>";
foreach($key as $o){
echo "<br>";
echo ucfirst($o);}echo "</td>";}?>
</tr>
<tr><th>Dossier Technique</th>
<?php
foreach($description as $desc){
echo "<td>".ucfirst($desc)."<br></td>"; }?></tr>
<tr><th>Action</th>
<?php $somme=count($domaine);
for ($i = 0; $i < $somme; $i++){?>
<td>
<a href="p?dom=<?php echo $dom ?>&o=<?php echo $o ?>&desc=<?php echo $desc ?>" title="Editer">
<img src="edit-e1498588233966.png"></a>
<a href="e?dom=<?php echo $dom ?>&m_d=<?php echo $m_d ?>&desc=<?php echo $desc ?>" title="Remove"><img src="remove-e1499223.png" ></a>
</td>
<?php } $i++;?>
</tr>
</table>
</form> |
Partager