コード例 #1
0
    ?>
</th>
                                              <?php 
    for ($j = 0; $j < $day_count; $j++) {
        $loaded_day_ID = $j + 1;
        $start = $times[$i];
        $end = $times[$i + 1];
        $schedule_id = student_loaded($reg_no, $start, $end, $loaded_day_ID, 1);
        //1 is current semester
        //$schedule_id = block_loaded($block_id, $start, $end, $loaded_day_ID,1); //1 is current semester
        //$schedule_id = block_loaded($block_id, $start, $end, $loaded_day_ID,1); //1 is current semester
        $loaded_class_id = get_class_id($schedule_id, 1);
        //to retrieve from actual table
        if ($loaded_class_id != "") {
            $slots = get_slots($schedule_id);
            if (is_first($schedule_id, $start)) {
                ?>
 <th bgcolor="#dadada" class="loaded" rowspan="<?php 
                echo $slots;
                ?>
" onclick="show_ticket(<?php 
                echo $schedule_id;
                ?>
)"> <?php 
                $query_subject = mysql_query("SELECT subject_t.subject_title FROM subject_t, class_t \n                                                                                                                       WHERE subject_t.subject_code=class_t.subject_code\n                                                                                                                       AND class_t.class_id={$loaded_class_id}") or die(mysql_error());
                $row_subject = mysql_fetch_assoc($query_subject);
                echo "<small>" . $row_subject['subject_title'] . "</small>";
                ?>
</th><?php 
            }
            ?>
コード例 #2
0
ファイル: wall.php プロジェクト: hzhou9/coupon_deal
</article>';
            }
            if (isset($pagination['prev_page']) || isset($pagination['next_page'])) {
                echo '<div class="pagination">';
                echo isset($pagination['prev_page']) ? '<span><a href="' . $pagination['prev_page'] . '" class="btn">&#8592; Prev</a></span>' : '<span class="btn" style="opacity: 0.2;">&#8592; Prev</span>';
                echo isset($pagination['next_page']) ? '<span><a href="' . $pagination['next_page'] . '" class="btn">Next &#8594;</a></span>' : '<span class="btn" style="opacity: 0.2;">Next &#8594;</span>';
                echo '<span>Page ' . $pagination['page'] . ' / ' . $pagination['pages'] . '</span>';
                echo '</div>';
            }
        } else {
            echo '<div style="text-align:center; margin-top: 20px;">On the wall appear only products from your favorite stores/brands. <br />
  <a href="' . tlink('stores') . '" class="nice_a">Choose from the list</a></div>';
        }
    } else {
        $pagination = have_wall(array('firstchar' => isset($_GET['firstchar']) ? $_GET['firstchar'] : ''));
        echo '<div class="title">My Wall <span style="float: right;">' . ($pagination['results'] ? $pagination['results'] . ' ' . (is_first($pagination['results']) ? 'coupon' : 'coupons') : 'Nothing found yet') . '</span></div>';
        echo '<div style="margin-bottom: 20px;">

<ul class="category">
<li class="active">Coupons</li>';
        if (theme_has_products()) {
            echo '<li><a href="' . get_update(array('type' => 'products', 'page' => 1)) . '">Products</a></li>';
        }
        echo '</ul>

</div>';
        if ($pagination['results']) {
            foreach (wall(array('firstchar' => isset($_GET['firstchar']) ? $_GET['firstchar'] : '')) as $item) {
                echo '<article class="array_item">

<div class="table">
コード例 #3
-1
ファイル: favorites.php プロジェクト: hzhou9/coupon_deal
<?php

if (me()) {
    echo '<div class="left">';
    $pagination = have_favorites(array('firstchar' => isset($_GET['firstchar']) ? $_GET['firstchar'] : ''));
    echo '<ul class="letters">';
    foreach (array_merge(range('A', 'Z'), array('0-9')) as $l) {
        echo '<li' . (isset($_GET['firstchar']) && $_GET['firstchar'] == $l ? ' class="active"' : '') . '><a href="' . tlink('user/favorites', 'firstchar=' . $l) . '">' . $l . '</a></li>';
    }
    echo '<li><a href="' . tlink('user/favorites') . '">ALL</a></li>';
    echo '</ul>';
    echo '<div class="title">My Favorites <span style="float: right;">' . ($pagination['results'] ? $pagination['results'] . ' ' . (is_first($pagination['results']) ? 'store' : 'stores') . ' found' : 'No favorites yet') . '</span></div>';
    if ($pagination['results']) {
        foreach (favorites(array('firstchar' => isset($_GET['firstchar']) ? $_GET['firstchar'] : '')) as $item) {
            echo '<article class="array_item">

<div class="table">

<div class="left">
<img src="' . store_avatar($item->image) . '" alt="">
<span class="rating"><span style="width:' . $item->stars * 16 . 'px;"></span></span>
<a href="' . $item->reviews_link . '">' . $item->reviews . ' reviews</a>
</div>

<div class="right">
<a href="' . $item->link . '" class="title">' . $item->name . '</a>
<div class="description">' . (!empty($item->description) ? nl2br($item->description) : 'no description') . '</div>

<ul class="details">
<li>Coupons/Deals: <b>' . $item->coupons . '</b></li>';
            echo '</ul>