function actiune_legatura() { $filmId = $_REQUEST['fid']; // echo $filmId; $actors = getActorsByFilm($filmId); // print_r($actors); echo json_encode($actors); die; }
get_template_part('content', get_post_format()); ?> <?php } } else { echo '<p>No content found</p>'; } get_footer(); ?> <br/><h2>TESTE</h2> <?php print_r(getActorsByFilm(10)); ?> <br/> <br/> <select id="leftselect"> <?php foreach (getFilms() as $film) { echo "<option value='" . $film['film_id'] . "'>" . $film['title'] . '</option>'; //print_r($film); //echo '<br/><br/>'; } ?> </select> <br/><br/> <select id="rightselect">
function getFilmsByReal($scene) { //liste les films qu'a fait le realisateur global $post; ////////// AFFICHAGE DES ACTEURS $connectedFilms = new WP_Query(array('connected_type' => 'film2realisateur', 'connected_items' => get_queried_object(), 'nopaging' => true)); if ($connectedFilms->have_posts()) { ?> <table class="table table-condensed "> <thead> <tr> <th>Films</th> <th>Année</th> <th>Acteurs</th> </tr> </thead> <tbody> <?php while ($connectedFilms->have_posts()) { echo "<tr>"; $connectedFilms->the_post(); echo '<td><a href="' . get_permalink() . '">' . $post->post_title . '</a></td>'; echo '<td>' . get_field('annee', $post->ID) . '</td>'; echo '<td>' . getActorsByFilm($post->ID) . '</td>'; echo "</tr>"; } ?> </tbody> </table> <?php wp_reset_postdata(); } }