<%doc> ################################################## # Marketability # Alex @ Popcorn 2008 ################################################## # Course Detail ################################################## <%args> $id => undef Marketability - <% $course->{title} %> <& '/components/header.mc', highlight => 'trainingcourses' &> <& '/components/dyn-courses.mc' &>
% if ($course->{strapline} eq 'Exclusive to Marketability') {

% } elsif ($course->{strapline} eq 'Exclusively available for tailoring') {

% } elsif ($course->{strapline} eq 'Course fee includes a free book') {

% } elsif ($course->{strapline} eq 'New for 2011') {

% } elsif ($course->{strapline} eq 'New for 2013') {

% } elsif ($course->{strapline} eq 'Only available as an in-company course') {

% } elsif ($course->{strapline} eq '--No Strapline--') { % } else {

% }

<% lc($course->{title}) %>

% my $testimonial_first; % if ($testimonials_st->rows) { % $testimonial_first = $testimonials_st->fetchrow_hashref;

<% $testimonial_first->{heading} %>
‘<% $testimonial_first->{quote} %>’
<% $testimonial_first->{cite} %>

% }
<% $course->{body} %>
% if ($event_st->rows) { % while (my $event = $event_st->fetchrow_hashref()) { <%doc> % }
 <% $event->{date_string} %><% $event->{date_end_string} ? ' - '.$event->{date_end_string} : '' %> <% $event->{custom_venue} || $event->{venue} %>  <% $event->{location} %>  £<% $event->{price} %> + VAT {places} ? ' class="'.$event->{places}.'"' : '' %>>  % if ($event->{places} ne 'Full') { BOOK % } else { FULL % }

Course availability key:

% } % if ($event_st->rows) {

What's included in the price?

Check out our terms and conditions before booking if you want to.
% } % while (my $testimonial = $testimonials_st->fetchrow_hashref()) {

‘<% $testimonial->{quote} %>’
<% $testimonial->{cite} %>

% }

 

 

 

% if ($course->{tutor2}) { % }

<%perl> my $tutorsnippet = $course->{snippet}; my $tutors_st = $dbh->prepare("SELECT tutor_id, name FROM course_tutor WHERE active = 'yes'"); $tutors_st->execute; while (my $tutor = $tutors_st->fetchrow_hashref) { $tutorsnippet =~ s/$tutor->{name}/$tutor->{name}<\/a>/i; }

<% $tutorsnippet %>

% if ($attachments->rows) { % my $counter = 0; % while (my $attachment = $attachments->next) { % if ($counter == 0) { % $counter = 1; % } % } % } <%perl> ############################## # RELATED COURSES ############################## my $course_st = $dbh->prepare(q/SELECT course_id, title FROM course WHERE course_id = ? AND active = 'yes'/ ); my $related_st = $dbh->prepare(q/SELECT relatedcourse_id FROM course_related WHERE course_id = ? ORDER BY number/); $related_st->execute($id); % if ($related_st->rows) { % while (my $related = $related_st->fetchrow_hashref()) { % $course_st->execute($related->{relatedcourse_id}); % while (my $course = $course_st->fetchrow_hashref()) { % } % } % }
Check availability/Ask a question
Related Pages and Courses
Workshop Diary
How does tailored training work?
<% $course->{title} %>
% if (-e $r->document_root() . "/data/course/". $id .".jpg") { % } else { % }

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<%shared> if (!$m->request_args->{id}) { $m->redirect('../'); } my $attachments = $cms->attachments->attachments(owner_type => 'course', owner_id => $m->request_args->{id}); my $course = $dbh->selectrow_hashref(q/SELECT *, c.tutor_snippet AS snippet, t1.name AS tutor1_name, t2.name AS tutor2_name FROM course c LEFT JOIN course_tutor t1 ON c.tutor1 = t1.tutor_id LEFT JOIN course_tutor t2 ON c.tutor2 = t2.tutor_id WHERE course_id = ? /, undef, $m->request_args->{id}); my $testimonials_st = $dbh->prepare("SELECT * FROM course_testimonial WHERE course_id = ? AND active = 'on' ORDER BY sort"); $testimonials_st->execute($m->request_args->{id}); my $firstevent = $dbh->selectrow_hashref(q/SELECT e.places AS places FROM course_event e WHERE course_id = ? AND DATE > NOW() ORDER BY date LIMIT 1 /, undef, $m->request_args->{id}); my $event_st = $dbh->prepare(q/SELECT e.*, DATE_FORMAT(e.date, '%d %M %Y') AS date_string, v.title AS venue FROM course_event e LEFT JOIN course_venue v ON e.venue_id = v.venue_id WHERE course_id = ? AND date > NOW() ORDER BY date/ ); $event_st->execute($m->request_args->{id});