Esempio n. 1
0
$left_time = $dating->end_date - time();
if ($left_time > 60) {
    $days = intval($left_time / 24 / 60 / 60);
    $remain = $left_time % 86400;
    $hours = intval($remain / 3600);
    $remain = $remain % 3600;
    $mins = intval($remain / 60);
}
if (isLogged()) {
    if (member_type() == 1) {
        $apply_dating = 'data-reveal-id="f-upgradePage"';
    } else {
        $apply_dating = 'onclick="applyDating(' . $dating->dating_id . ');"';
    }
    $data_reveal = '';
    if (checkApplyDating($dating->dating_id, $user->id)) {
        $link = '<a class="tooltip" style="float: right;" href="javascript:void(0);">
                            <span>Anvendt</span><img src="' . base_url() . 'assets/frontend/img/btnSeeyou.png" />
                        </a>';
    } else {
        if ($user->id == $dating->id) {
            $link = '<a class="tooltip" style="float: right;" href="javascript:void(0);">
                            <span>Min Dating</span><img src="' . base_url() . 'assets/frontend/img/btnSeeyou.png" />
                        </a>';
        } else {
            $link = '<a ' . $apply_dating . ' class="bntSeeyou" href="javascript:void(0);" ' . $data_reveal . '>SES VI?</a>';
        }
    }
} else {
    $apply_dating = '';
    $data_reveal = 'data-reveal-id="f-errorPage"';
Esempio n. 2
0
     <ul>
     <?php 
 $html = "";
 #echo "<pre>";
 #print_r($datings);
 foreach ($datings as $dating) {
     if (isLogged()) {
         $profile_link = base_url() . index_page() . 'profiles/detail/' . $dating['id'] . '/' . $dating['name'] . '.html';
         $dating_link = base_url() . index_page() . 'profiles/datingdetail/' . $dating['dating_id'] . '/' . $dating['alias'] . '.html';
         if (member_type() == 1) {
             $apply_dating = 'data-reveal-id="f-upgradePage"';
         } else {
             $apply_dating = 'onclick="applyDating(' . $dating['dating_id'] . ');"';
         }
         $data_reveal = '';
         if (checkApplyDating($dating['dating_id'], $user->id)) {
             $link = '<a class="tooltip" style="float: right;height: 23px;margin: 3px 0 0 20px; width: 85px;" href="javascript:void(0);">
                                 <span>Anvendt</span><img src="' . base_url() . 'assets/frontend/img/btnSeeyou2.png" />
                             </a>';
         } else {
             if ($user->id == $dating['user_id']) {
                 $link = '<a class="tooltip" style="float: right;height: 23px;margin: 3px 0 0 20px; width: 85px;" href="javascript:void(0);">
                                 <span>Min Dating</span><img src="' . base_url() . 'assets/frontend/img/btnSeeyou2.png" />
                             </a>';
             } else {
                 $link = '<a ' . $apply_dating . ' class="bntSes" href="javascript:void(0);" ' . $data_reveal . '>SES VI?</a>';
             }
         }
     } else {
         $profile_link = 'javascript:void(0);';
         $dating_link = 'javascript:void(0);';