Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
<div class="container">
<ul id="tabs" class="nav nav-tabs" data-tabs="tabs">
<li <?php echo (empty($tab)) ? ' class = "active tab-pane"' : ''; ?>><a href="#events" data-toggle="tab">活動列表</a></li>
if($this->cmrdb_auth->logged_in()) {
$new_event = '<li ';
$new_event .= ($tab == 'create') ? ' class = "active tab-pane"' : '';
$new_event .= '><a href="#creat_event" data-toggle="tab">新增活動</a></li>';
echo $new_event;
$message_data = $this->session->flashdata('message_data');
echo '<div class="alert-'.$message_data['type'].' alert alert-dismissible" role="alert"><button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>'.$message_data['message'].'</div>';
<div id="my-tab-content" class="tab-content">
<div <?php echo (empty($tab)) ? ' class = "active tab-pane"' : 'class = "tab-pane"'; ?> id="events">
<table class="table table-hover" id="table-content">
<?php if($this->cmrdb_auth->logged_in())
echo '<th>報名狀況</th>';
foreach($data as $row) {
echo '<tr id = "'.$row['event_id'].'" >';
echo '<td>'.$row['event_class'].'</td>';
echo '<td>'.$row['event_name'].'</td>';
echo '<td>'.date("Y/m/d",$row['event_time']).'</td>';
echo '<td class="status"></td>';
echo '</tr>';
<div id="alert_placeholder"></div>
if($this->cmrdb_auth->logged_in()) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.