summaryrefslogtreecommitdiff
path: root/testimonials_year_wise.inc
diff options
context:
space:
mode:
authorSashi202020-07-10 13:11:13 +0530
committerSashi202020-07-10 13:11:13 +0530
commit9ef68f741a6f47af7a1a350958387c2479295f97 (patch)
treead7e7b9f69d6724d88cbd596b183ee57d5815471 /testimonials_year_wise.inc
parented52d9caf03329c2956b811a364d5e0df17fdbdd (diff)
downloadfellowship_testimonials-9ef68f741a6f47af7a1a350958387c2479295f97.tar.gz
fellowship_testimonials-9ef68f741a6f47af7a1a350958387c2479295f97.tar.bz2
fellowship_testimonials-9ef68f741a6f47af7a1a350958387c2479295f97.zip
Update form to add text testimonials, display tab structure for text and video
Diffstat (limited to 'testimonials_year_wise.inc')
-rw-r--r--testimonials_year_wise.inc37
1 files changed, 37 insertions, 0 deletions
diff --git a/testimonials_year_wise.inc b/testimonials_year_wise.inc
new file mode 100644
index 0000000..527bfcc
--- /dev/null
+++ b/testimonials_year_wise.inc
@@ -0,0 +1,37 @@
+<?php
+function fellowship_testimonials_display_year_wise($year) {
+ $page_content = "";
+ /*$query = "
+ SELECT * FROM fellowship_testimonials
+ ORDER BY id DESC
+ ";
+ $result = pager_query($query, 4, 0, "SELECT COUNT(*) FROM fellowship_testimonials");*/
+ $query = db_select('fellowship_testimonials');
+ $query->fields('fellowship_testimonials');
+ $query->orderBy('year', $year);
+ $result = $query->extend('PagerDefault')->limit(3)->execute();
+
+ $page_content .= "<div id='fellowship_testimonials-wrapper'>";
+ while($row = $result->fetchObject()) {
+ $speakerquery = db_select('fellows');
+ $speakerquery->fields('fellows');
+ $speakerquery->condition('t_id', $row->id);
+ $speakerresult = $speakerquery->execute();
+
+ $page_content .= "
+ <div class='container-testimonial'>
+ <video title='' controls='' preload='' data-setup='{}' width='500' height='400'>
+ <source src={$row->testimonial_video} type='video/mp4'>
+ </video> ";
+ while($speakerrow = $speakerresult->fetchObject()){
+ $page_content .= "<p><span>{$speakerrow->name}</span><br>Institute: {$speakerrow->institute}, {$speakerrow->place}<br><br><span style='margin-right:0;'>";
+ }
+ $page_content .= "Fellowship task</span>: {$row->fellowship_task}
+ <br><br><span>Fellowship Year</span>: {$row->year}</p></div>";
+
+ }
+ $page_content .= "</div> <!-- /#fellowship_testimonials-wrapper -->";
+ //$page_content .= theme("pager", NULL, 4, 0);
+ $page_content .= theme('pager', array('header' => NULL, 'rows' => 4 ));
+ return $page_content;
+ } \ No newline at end of file