<?php } else { ?> <a href="<?php echo ENTRADA_URL; ?> /admin/<?php echo $MODULE; ?> ?section=attach&community=true&id=<?php echo $RECORD_ID; ?> " class="btn btn-success pull-right"><i class="icon-plus-sign icon-white"></i> Attach To Community Page</a> <div class="clear" style="margin-bottom: 15px"></div> <?php $community_page_attachments = Models_Quiz_Attached_CommunityPage::fetchAllByQuizID($RECORD_ID); if ($community_page_attachments) { ?> <table class="tableList" cellspacing="0" summary="List of Community Pages"> <colgroup> <col class="modified" /> <col class="title" /> <col class="title" /> <col class="completed" /> </colgroup> <thead> <tr> <td class="modified"> </td> <td class="title sortedASC">Community Page</td> <td class="title">Quiz Title</td> <td class="completed">Completed</td>
if ($result) { $PROCESSED["page_ids"][] = $tmp_input; } } } } } $quiz_types_record = array(); $quiz_types = Models_Quiz_QuizType::fetchAllRecords(); if ($quiz_types) { foreach ($quiz_types as $quiz_type) { $quiz_types_record[$quiz_type->getQuizTypeID()] = array("quiztype_title" => $quiz_type->getQuizTypeTitle(), "quiztype_description" => $quiz_type->getQuizTypeDescription(), "quiztype_order" => $quiz_type->getQuizTypeOrder()); } } $existing_page_relationship = array(); $attached_pages = Models_Quiz_Attached_CommunityPage::fetchAllByQuizID($RECORD_ID); if ($attached_events) { foreach ($attached_pages as $attached_page) { $existing_page_relationship[] = $attached_page->getCommunityID(); } } $default_event_start = 0; $default_event_finish = 0; $selected_community_pages = array(); if (count($PROCESSED["page_ids"]) > 0) { $query = "\tSELECT a.`cpage_id`, CONCAT('[', b.`community_title`, '] ', a.`page_title`) AS `page_title`\n\t\t\t\t\t\t\t\t\tFROM `community_pages` AS a\n\t\t\t\t\t\t\t\t\tJOIN `communities` AS b\n\t\t\t\t\t\t\t\t\tON a.`community_id` = b.`community_id`\n\t\t\t\t\t\t\t\t\tWHERE `cpage_id` IN (" . implode(", ", $PROCESSED["page_ids"]) . ")"; $results = $db->Execute($query); if ($results) { foreach ($results as $result) { $selected_community_pages[$result["cpage_id"]] = array("page_title" => $result["page_title"]); }