当前位置: 首页>>代码示例>>PHP>>正文


PHP str_date函数代码示例

本文整理汇总了PHP中str_date函数的典型用法代码示例。如果您正苦于以下问题:PHP str_date函数的具体用法?PHP str_date怎么用?PHP str_date使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了str_date函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: str_date

        $row['name'] = $row['gname'];
        $row['mid'] = 0;
        $row['groups'] = GROUP_GUEST;
    }
    $row['date'] = str_date($lang->phrase('dformat1'), times($row['date']));
    $edit = array();
    if (!empty($row['edit'])) {
        $edits = explode("\n", $row['edit']);
        $i = 0;
        foreach ($edits as $e) {
            $e = trim($e);
            if (empty($e)) {
                continue;
            }
            $data = explode("\t", $e);
            $edit[$i] = array('date' => str_date($lang->phrase('dformat1'), times($data[1])), 'reason' => @iif(empty($data[2]), $lang->phrase('post_editinfo_na'), $data[2]), 'name' => $data[0], 'ip' => @iif(isset($data[3]), $data[3]));
            ($code = $plugins->load('popup_edithistory_entry_prepared')) ? eval($code) : null;
            $i++;
        }
    }
    ($code = $plugins->load('popup_edithistory_prepared')) ? eval($code) : null;
    echo $tpl->parse("popup/edithistory");
    ($code = $plugins->load('popup_edithistory_end')) ? eval($code) : null;
} elseif ($_GET['action'] == "postrating") {
    $rtg = $gpc->get('rating', int);
    ($code = $plugins->load('popup_postrating_start')) ? eval($code) : null;
    if ($my->vlogin) {
        $result = $db->query("SELECT * FROM {$db->pre}replies WHERE id = '{$_GET['id']}'", __LINE__, __FILE__);
        $post = $db->fetch_assoc($result);
        if ($post['name'] == $my->id) {
            $error = $lang->phrase('postrating_you_posted');
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:popup.php

示例2: BBProfile

 $bbcode->setAuthor($row->mid);
 if ($info['status'] == 2) {
     $row->comment = $bbcode->ReplaceTextOnce($row->comment, 'moved');
 }
 if (count($q) > 0) {
     $bbcode->setHighlight('highlight', $q);
 }
 $row->comment = $bbcode->parse($row->comment);
 if ($my->opt_showsig == 1) {
     BBProfile($bbcode, 'signature');
     $row->signature = $bbcode->parse($row->signature);
 }
 if ($config['post_user_status'] == 1) {
     $row->lang_online = $lang->phrase('profile_' . iif($row->online == 1, 'online', 'offline'));
 }
 $row->date = str_date($lang->phrase('dformat1'), times($row->date));
 $row->regdate = gmdate($lang->phrase('dformat2'), times($row->regdate));
 $row->level = $slog->getStatus($row->groups, ', ');
 if (empty($row->location)) {
     $row->location = $lang->phrase('showtopic_na');
 }
 if (!empty($row->fullname) && $config['fullname_posts'] == 1 || !empty($row->signature) && $my->opt_showsig == 1) {
     $bottom = TRUE;
 } else {
     $bottom = FALSE;
 }
 if (isset($uploads[$row->id]) && $config['tpcallow'] == 1) {
     foreach ($uploads[$row->id] as $file) {
         $uppath = 'uploads/topics/' . $file['source'];
         $imginfo = get_extension($uppath);
         if (!isset($fileicons[$imginfo])) {
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:showtopic.php

示例3: str_date

 if ($row->prefix > 0 && isset($prefix_arr[$row->board][$row->prefix])) {
     $showprefix = true;
     $prefix = $prefix_arr[$row->board][$row->prefix]['value'];
 }
 $info = $forums[$row->board];
 if (is_id($row->name) && isset($memberdata[$row->name])) {
     $row->mid = $row->name;
     $row->name = $memberdata[$row->name];
 } else {
     $row->mid = FALSE;
 }
 if (is_id($row->last_name) && isset($memberdata[$row->last_name])) {
     $row->last_name = $memberdata[$row->last_name];
 }
 $rstart = str_date($lang->phrase('dformat1'), times($row->date));
 $rlast = str_date($lang->phrase('dformat1'), times($row->last));
 if ($row->status == '2') {
     $pref .= $lang->phrase('forum_moved');
 } else {
     if ($row->mark === null && !empty($info['auto_status'])) {
         $row->mark = $info['auto_status'];
     }
     if ($row->mark == 'n') {
         $pref .= $lang->phrase('forum_mark_n');
     } elseif ($row->mark == 'a') {
         $pref .= $lang->phrase('forum_mark_a');
     } elseif ($row->mark == 'b') {
         $pref .= $lang->phrase('forum_mark_b');
     } elseif ($row->mark == 'g') {
         $pref .= $lang->phrase('forum_mark_g');
     }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:search.php

示例4: str_date

     $prefix = $prefix_arr[$row->prefix]['value'];
     $showprefix = true;
 } else {
     $prefix = '';
 }
 if (is_id($row->name) && isset($memberdata[$row->name])) {
     $row->mid = $row->name;
     $row->name = $memberdata[$row->name];
 } else {
     $row->mid = FALSE;
 }
 if (is_id($row->last_name) && isset($memberdata[$row->last_name])) {
     $row->last_name = $memberdata[$row->last_name];
 }
 $rstart = str_date('d.m.Y H:i', times($row->date));
 $rlast = str_date('d.m.Y H:i', times($row->last));
 if ($row->status == '2') {
     $pref .= $lang->phrase('forum_moved');
 } else {
     if (empty($row->mark) && !empty($info['auto_status'])) {
         $row->mark = $info['auto_status'];
     }
     if ($row->mark == 'n') {
         $pref .= 'News: ';
     } elseif ($row->mark == 'a') {
         $pref .= 'Artcle: ';
     } elseif ($row->mark == 'b') {
         $pref .= 'Bad: ';
     } elseif ($row->mark == 'g') {
         $pref .= 'Good: ';
     }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:posts.php

示例5: urldecode

?>
<br>
			             	<?php 
echo urldecode($hobjs[0]['@attributes']['resort']);
?>
<br>
			             	<?php 
echo boardbasis($hobjs[0]['@attributes']['boardbasis']);
?>
<br>
			             	Check in : <?php 
echo date('d M Y', $controller->cvtDt(str_date($hobjs[0]['@attributes']['checkindate'])));
?>
<br>
			             	Check out : <?php 
echo date('d M Y', strtotime('+' . $hobjs[0]['@attributes']['nights'] . 'days', $controller->cvtDt(str_date($hobjs[0]['@attributes']['checkindate']))));
?>
<br>            	
			            	<?php 
echo $det_pax_prices;
?>
	
			                <span style="float:right;font-size: 13px;"><a href="<?php 
echo base_url() . 'availableHotels/' . $this->uri->segment(2);
?>
">Change</a></span>
			            </small>                
			        </div>		        					
				</div>	
				<div class="bg_grey">	
		          	<div>
开发者ID:bogiesoft,项目名称:bookitnow,代码行数:31,代码来源:book_hotel_view.php

示例6: BoardSelect


//.........这里部分代码省略.........
                if (!check_forumperm($forum)) {
                    if ($forum['invisible'] != 0) {
                        $forum['show'] = false;
                    }
                    $forum['foldimg'] = $tpl->img('cat_locked');
                    $forum['state'] = BOARD_STATE_LOCKED;
                    $forum['topics'] = '-';
                    $forum['replies'] = '-';
                    $forum['l_topic'] = false;
                    $forum['l_topic_full'] = '';
                } else {
                    if ($slog->isForumRead($forum['id'], $forum['l_date']) || $forum['topics'] < 1) {
                        $forum['foldimg'] = $tpl->img('cat_open');
                        $forum['state'] = BOARD_STATE_OLD;
                    } else {
                        $forum['foldimg'] = $tpl->img('cat_red');
                        $forum['state'] = BOARD_STATE_NEW;
                        $forum['new'] = true;
                    }
                    if (!empty($forum['l_topic'])) {
                        if (isset($prefix[$forum['id']][$forum['l_prefix']]) && $forum['l_prefix'] > 0) {
                            $lang->assign('prefix', $prefix[$forum['id']][$forum['l_prefix']]['value']);
                            $forum['l_prefix'] = $lang->phrase('showtopic_prefix_title');
                        } else {
                            $forum['l_prefix'] = '';
                        }
                        if (strxlen($forum['l_topic']) > $config['lasttopic_chars']) {
                            $forum['l_topic_full'] = $forum['l_prefix'] . $forum['l_topic'];
                            $forum['l_topic'] = subxstr($forum['l_topic'], 0, $config['lasttopic_chars']);
                            $forum['l_topic'] .= "...";
                        } else {
                            $forum['l_topic_full'] = '';
                        }
                        $forum['l_date'] = str_date($lang->phrase('dformat1'), times($forum['l_date']));
                    }
                }
            }
            $forum['topics'] = numbers($forum['topics']);
            $forum['replies'] = numbers($forum['replies']);
            // Moderatoren
            $forum['mod'] = array();
            if (isset($mod_cache[$forum['id']])) {
                $anz2 = count($mod_cache[$forum['id']]);
                for ($i = 0; $i < $anz2; $i++) {
                    if ($anz2 != $i + 1) {
                        $mod_cache[$forum['id']][$i]['sep'] = ', ';
                    } else {
                        $mod_cache[$forum['id']][$i]['sep'] = '';
                    }
                    $forum['mod'][] = $mod_cache[$forum['id']][$i];
                }
            }
            // Unterforen
            $forum['sub'] = array();
            if ($config['showsubfs']) {
                if (isset($sub_cache[$forum['id']])) {
                    $anz2 = count($sub_cache[$forum['id']]);
                    $sub = array();
                    for ($i = 0; $i < $anz2; $i++) {
                        $show = true;
                        $sub_cache[$forum['id']][$i]['new'] = false;
                        if ($sub_cache[$forum['id']][$i]['opt'] != 're') {
                            if (!check_forumperm($sub_cache[$forum['id']][$i])) {
                                if ($sub_cache[$forum['id']][$i]['invisible'] != 0) {
                                    $show = false;
                                } else {
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:67,代码来源:function.viscacha_frontend.php

示例7: eval

    ($code = $plugins->load('popup_edithistory_start')) ? eval($code) : null;
    if ($row['guest'] == 0) {
        $row['mail'] = '';
        $row['name'] = $row['uname'];
    } else {
        $row['mail'] = $row['gmail'];
        $row['name'] = $row['gname'];
        $row['mid'] = 0;
        $row['groups'] = GROUP_GUEST;
    }
    $row['date'] = str_date($lang->phrase('dformat1'), times($row['date']));
    $edit = array();
    if (!empty($row['edit'])) {
        preg_match_all('~^([^\\t]+)\\t(\\d+)\\t([^\\t]*)\\t([\\d\\.]+)$~m', $row['edit'], $edits, PREG_SET_ORDER);
        foreach ($edits as $e) {
            $edit[] = array('date' => str_date($lang->phrase('dformat1'), times($e[2])), 'reason' => empty($e[3]) ? $lang->phrase('post_editinfo_na') : $e[3], 'name' => $e[1], 'ip' => empty($e[4]) ? '-' : $e[4]);
            ($code = $plugins->load('popup_edithistory_entry_prepared')) ? eval($code) : null;
        }
    }
    ($code = $plugins->load('popup_edithistory_prepared')) ? eval($code) : null;
    echo $tpl->parse("popup/edithistory");
    ($code = $plugins->load('popup_edithistory_end')) ? eval($code) : null;
} elseif ($_GET['action'] == "postrating") {
    $rtg = $gpc->get('rating', int);
    ($code = $plugins->load('popup_postrating_start')) ? eval($code) : null;
    if ($my->vlogin) {
        $result = $db->query("SELECT * FROM {$db->pre}replies WHERE id = '{$_GET['id']}'");
        $post = $db->fetch_assoc($result);
        if ($post['name'] == $my->id) {
            $error = $lang->phrase('postrating_you_posted');
        }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:popup.php

示例8: boookattach


//.........这里部分代码省略.........
		<td>' . $results['fobj']['@attributes']['infltnum'] . '</td>
    </tr>  
</table>';
        $pdf->writeHTML($tbl, true, false, false, false, '');
    }
    $ci = $results['controller'];
    if (!empty($results['hobjs'])) {
        $tbl = '
<b><u>Accommodation Details: </u></b><br><br>  
<table border="0" cellpadding="2" cellspacing="2" nobr="true">
	<tr>
		<th style="text-align:center;font-weight:bold;">Hotel</th>
		<td style="text-align:center;font-weight:bold;">Resort</td>
		<td style="text-align:center;font-weight:bold;">Board</td>
		<td style="text-align:center;font-weight:bold;">Room</td>
		<td style="text-align:center;font-weight:bold;">Rating</td>		
	</tr>
    <tr>
        <td style="text-align:center;">' . urldecode($results['hobjs'][0]['@attributes']['hotelname']) . '</td>
        <td style="text-align:center;">' . urldecode($results['hobjs'][0]['@attributes']['resort']) . '</td>
		<td style="text-align:center;">' . boardbasis($results['hobjs'][0]['@attributes']['boardbasis']) . '</td>
		<td style="text-align:center;">' . $results['seg'][0]['num_rooms'] . ' ' . $results['hobjs'][0]['@attributes']['suppname'] . '</td>
		<td style="text-align:center;">' . (int) $results['hobjs'][0]['@attributes']['starrating'] . ' KEY</td>		
    </tr>
    <tr>
		<td style="text-align:center;font-weight:bold;">Check In</td>
    	<td style="text-align:center;font-weight:bold;">Check Out</td>
		<td style="text-align:center;font-weight:bold;">Adults</td>
		<td style="text-align:center;font-weight:bold;">Children</td>
		<td style="text-align:center;font-weight:bold;">Infants</td>
    </tr>
	<tr>
		<td style="text-align:center;">' . $results['hobjs'][0]['@attributes']['checkindate'] . '</td>
    	<td style="text-align:center;">' . date('d/m/Y', strtotime('+' . $results['hobjs'][0]['@attributes']['nights'] . " day", $ci->cvtDt(str_date($results['hobjs'][0]['@attributes']['checkindate'])))) . '</td>
		<td style="text-align:center;">' . @$results['seg'][0]['num_adults'] . '</td>
		<td style="text-align:center;">' . @$results['seg'][0]['num_children'] . '</td>
		<td style="text-align:center;"></td>
    </tr>	
</table>';
        $pdf->writeHTML($tbl, true, false, false, false, '');
    }
    $tbl = <<<EOD
<div style="margin-top:20px;">
\t<b><u>Price Summary:</u></p>\t
\t<p>
\t\tThe total price inclusive of any discounts for the holiday described above is: £653.92 To make a firm reservation please call us on 01386298033 and quote the reference number at the top of this quote. Our friendly and experienced travel consultants will be happy to book the above holiday or look for any alternatives that may suit your needs. 
\t</p>
\t<p>\t\t
\t\tMay we take this opportunity of thanking you for your enquiry, and we do hope that we are able to assist you in fulfilling your requirements.
\t</p>
</div>
EOD;
    $pdf->writeHTML($tbl, true, false, false, false, '');
    $tbl = <<<EOD
<div style="margin-top:20px;text-align:center;">\t
\t<small>
\t\t* All costings are subject to a final confirmation which will be given upon making a firm reservation *
\t</small>
</div><br/><br/>
EOD;
    $pdf->writeHTML($tbl, true, false, false, false, '');
    /*$tbl = '
    <div style="margin-top:20px;width:100%;display:inline-flex;">	
    	<div style="color:blue;text-align:center;width:60%">BookItNow Travel is a trading name of broadway Travel Services (Wimbledon) Ltd. Whose registered office is at Unit 1,Finway,Dallow Road,Luton,Beds LUI 1WE</div>
    	<div> <img src="'.base_url().'/images/abta.png"/></div>
    </div>';
开发者ID:bogiesoft,项目名称:bookitnow,代码行数:67,代码来源:common_helper.php

示例9: full_available_hotels

    public function full_available_hotels()
    {
        $data = array();
        $results = array();
        if ($this->uri->segment(2) != '') {
            $this->load->model('FullSearch');
            $this->load->model('PhaseFlightOrHotel');
            $rows = $this->FullSearch->fetch_a_search(array('url_hash' => $this->uri->segment(2)));
            $flight_row = $this->PhaseFlightOrHotel->fetch_a_search(array('type_search' => 'full_flight_date', 'full_pack_id' => $rows[0]['id']));
            if (empty($flight_row)) {
                redirect(base_url() . 'flightsAvailability/' . $this->uri->segment(2));
            }
            $data['row'] = $rows;
            $data['fselected_date'] = $flight_row[0]['flight_selected_date'];
            if (!empty($rows)) {
                if ($rows[0]['pax'] != '') {
                    $service_url_arr = explode(',', substr($rows[0]['service_url'], 0, -1));
                    $offers = array();
                    $n = 0;
                    foreach ($service_url_arr as $service_url) {
                        $parts = parse_url($service_url);
                        parse_str($parts['query'], $query);
                        //echo $query['pax'];
                        $url = "http://87.102.127.86:8005/search/websearch.exe?pageid=6&compid=1&minstay=" . $query['minstay'] . "&maxstay=" . $query['maxstay'] . "&depdate=" . $flight_row[0]['flight_selected_date'] . "&flex=0&countryid=" . $query['countryid'] . "&regionid=" . $query['regionid'] . "&areaid=" . $query['areaid'] . "&resortid=&boards=&rating=&pax=" . $query['pax'] . "&offersperday=200";
                        if ($results = $this->loadHotelDataFun($url, $flight_row[0]['flight_selected_date'])) {
                            $temp = array();
                            $this->format_array_fun($results['offer'], count($results['offer']), $temp);
                            $offers[] = $temp;
                        }
                    }
                    $data['offers'] = $this->filter_pax_based_fun($offers, 0, count($offers), $offers[0]['filter_data']);
                    if (empty(@$data['offers']['filter_data'])) {
                        redirect(base_url() . "notavailable");
                    }
                    $data['content'] = $this->hotels_html($data['offers']['filter_data'], 9, 0, $this->uri->segment(2), 'pack_hotel');
                    $myser_URL = $service_url_arr[0];
                    //echo $myser_URL;exit;
                } else {
                    $parts = parse_url($rows[0]['service_url']);
                    parse_str($parts['query'], $query);
                    $url = "http://87.102.127.86:8005/search/websearch.exe?pageid=6&compid=1&minstay=" . $query['minstay'] . "&maxstay=" . $query['maxstay'] . "&depdate=" . $flight_row[0]['flight_selected_date'] . "&flex=0&countryid=" . $query['countryid'] . "&regionid=" . $query['regionid'] . "&areaid=" . $query['areaid'] . "&resortid=&boards=&rating=&pax=" . $query['pax'] . "&offersperday=200";
                    if ($results = $this->loadHotelDataFun($url, $flight_row[0]['flight_selected_date'])) {
                        $this->format_array_fun($results['offer'], count($results['offer']), $data['offers']);
                        if (empty($data['offers'])) {
                            redirect(base_url() . "notavailable");
                        }
                        //echo "<pre>";print_r($data['offers']);exit;
                        $data['content'] = $this->hotels_html($data['offers']['filter_data'], 9, 0, $this->uri->segment(2), 'pack_hotel');
                    }
                    $myser_URL = $rows[0]['service_url'];
                }
                $departures = $this->fetch_departures();
                $arrivals = $this->fetch_arrivals();
                $this->load->model('PhaseFlightOrHotel');
                $selected_info = $this->PhaseFlightOrHotel->fetch_a_search(array('type_search' => 'full_flight_date', 'full_pack_id' => $rows[0]['id']));
                $flight_obj = json_decode($selected_info[0]['pack_info'], true);
                $dscode = $flight_obj['@attributes']['depapt'];
                //echo $dscode;exit;
                $ascode = $flight_obj['@attributes']['arrapt'];
                $ascode_con = @trim(explode('-', $arrivals[(string) $ascode])[1]);
                $ascode = $ascode_con != '' ? $ascode_con : trim(explode('-', $arrivals[(string) $ascode])[0]);
                $dscode = trim(explode('-', $departures[(string) $dscode])[0]);
                //print_r($flight_obj);exit;
                $dept_start_time = substr(explode(' ', $flight_obj['@attributes']['outdep'])[1], 0, -3);
                $dept_arr_time = substr(explode(' ', $flight_obj['@attributes']['outarr'])[1], 0, -3);
                $return_start_time = substr(explode(' ', $flight_obj['@attributes']['indep'])[1], 0, -3);
                $return_arr_time = substr(explode(' ', $flight_obj['@attributes']['inarr'])[1], 0, -3);
                $this->load->helper('common');
                $dept_images = dept_images();
                $type_s = 'full_flight';
                $cry = $this->uri->segment(2);
                $data['seleted_info'] = '<div class="deals">
											<h2>Your Selections	</h2>
										  </div>
	               						  <div class="bg_grey">											
					            			<div>
					                			<div class="left">Flights</div>
								                <div class="right" style="text-align: right;">&#163;' . ($rows[0]['num_adults'] + $rows[0]['num_children']) * $flight_obj['@attributes']['sellpricepp'] . '</div>
			           						 </div>
								             <div style="margin-bottom: 5px; margin-top: 5px;    line-height: 20px;">
								                <strong style="color: rgba(241, 113, 19, 0.98);"><i aria-hidden="true" class="icon-calendar"></i>&nbsp;Depart:</strong>
								                <br>
								                <!-- <div style="position: relative;" class="clearfix">
								                   <div class="left">
								                        <img src="' . $dept_images[$flight_obj['@attributes']['suppcode']] . '" style="width: 70px; height: 16px;">
								                    </div>
								                    <div class="right">
								                        <span class="txt_color_2"></span>
								                    </div>
								                </div>-->
								                        		
								               <small>' . $dscode . ' to ' . $ascode . '<br>' . date('d M Y', $this->cvtDt(str_date($selected_info[0]['flight_selected_date']))) . ' : ' . $dept_start_time . '-' . $dept_arr_time . '</small><br>
								                <span class="txt_color_2"></span>			                
								            </div>
								            <div style="margin-bottom: 5px;    line-height: 20px;">
							                	<strong style="color: rgba(241, 113, 19, 0.98);"><i aria-hidden="true" class="icon-calendar"></i>&nbsp;Return:</strong><br>
								                <!--<div style="position: relative;" class="clearfix">
								                    <div class="left">
								                        <img src="' . $dept_images[$flight_obj['@attributes']['suppcode']] . '" style="width: 70px; height: 16px;">
								                    </div>
//.........这里部分代码省略.........
开发者ID:bogiesoft,项目名称:bookitnow,代码行数:101,代码来源:Hotel.php

示例10: PHP

Parser:
 0 = Keiner, 1 = HTML, 2 = PHP(+HTML), 3 = BB-Code
Template:
 Leer = Ausgabe, Vorhanden = Einfügen
Inline:
 0 = Template hinzufügen, 1 = Template in der Datei
*/
if ($my->p['docs'] == 1 && GroupCheck($info['groups'])) {
    $memberdata = cache_memberdata();
    if (is_id($info['author']) && isset($memberdata[$info['author']])) {
        $info['name'] = $memberdata[$info['author']];
    } else {
        $info['name'] = $lang->phrase('fallback_no_username');
    }
    $info['date'] = str_date($lang->phrase('dformat1'), times($info['date']));
    $info['update'] = str_date($lang->phrase('dformat1'), times($info['update']));
    $type = doctypes();
    if (isset($type[$info['type']])) {
        $typedata = $type[$info['type']];
    } else {
        $typedata = array('title' => 'Fallback', 'template' => '', 'parser' => 1, 'inline' => 1, 'remote' => 0);
    }
    if ($typedata['inline'] == 0) {
        if ((empty($info['content']) || $typedata['remote'] == 1) && $typedata['template'] != 'frame') {
            $info['content'] = @file_get_contents($info['file']);
        }
        $info['content'] = DocCodeParser($info['content'], $typedata['parser']);
        $breadcrumb->Add($info['title']);
        echo $tpl->parse("header");
        if (empty($typedata['template'])) {
            echo $info['content'];
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:docs.php

示例11: book_flight

    public function book_flight()
    {
        $data = array();
        $data['is_laststep'] = true;
        $tot_sel = 0;
        $data['controller'] = $this;
        $data['form_type'] = 'flight_only';
        if (!empty($row = $this->UserSearch->fetch_a_search(array('type_search' => 'flight_hotel', 'url_hash' => $this->uri->segment(2))))) {
            $data['seg'] = $row;
            //If already booked redirect to home page
            $this->load->model('BookingInfo');
            $b_row = $this->BookingInfo->fetch_a_search(array('base_id' => $data['seg'][0]['id']));
            if (!empty($b_row)) {
                redirect(base_url());
            }
            //End
            //If Did not select flights redirect to flight search page
            $data['hobjs'] = json_decode($row[0]['pack_info'], true);
            if (empty($data['hobjs'])) {
                redirect(base_url() . 'available/' . $this->uri->segment(2));
            }
            $tot_sel = $data['hobjs']['@attributes']['sellpricepp'];
            $data['res_sel_price'] = $tot_sel / count($data['hobjs']);
            $departures = $this->fetch_departures();
            $arrivals = $this->fetch_arrivals();
            //$this->load->model('PhaseFlightOrHotel');
            $selected_info = $row;
            //print_r($selected_info);exit;
            $flight_obj = json_decode($selected_info[0]['pack_info'], true);
            $dscode = $flight_obj['@attributes']['depapt'];
            //echo $dscode;exit;
            $ascode = $flight_obj['@attributes']['arrapt'];
            $ascode_con = @trim(explode('-', $arrivals[(string) $ascode])[1]);
            $ascode = $ascode_con != '' ? $ascode_con : trim(explode('-', $arrivals[(string) $ascode])[0]);
            $dscode = trim(explode('-', $departures[(string) $dscode])[0]);
            //print_r($flight_obj);exit;
            $dept_start_time = substr(explode(' ', $flight_obj['@attributes']['outdep'])[1], 0, -3);
            $dept_arr_time = substr(explode(' ', $flight_obj['@attributes']['outarr'])[1], 0, -3);
            $return_start_time = substr(explode(' ', $flight_obj['@attributes']['indep'])[1], 0, -3);
            $return_arr_time = substr(explode(' ', $flight_obj['@attributes']['inarr'])[1], 0, -3);
            $this->load->helper('common');
            $dept_images = dept_images();
            $type_s = 'full_flight';
            $cry = $this->uri->segment(2);
            //echo "<pre>";print_r($row);exit;
            $data['seleted_info'] = '<div class="deals"><h2>Your Selections</h2></div>
				<div class="bg_grey">
					<div>
			      		<div class="left">Flights</div>
					    <div class="right" style="text-align: right;">&#163;' . ($row[0]['num_adults'] + max($row[0]['num_children'], 0)) * $flight_obj['@attributes']['sellpricepp'] . '</div>
			        </div>
					<div style="margin-bottom: 5px; margin-top: 5px;    line-height: 20px;">
			             	<strong style="color: rgba(241, 113, 19, 0.98);"><i aria-hidden="true" class="icon-calendar"></i>&nbsp;Depart:</strong>
			             <br>
			                <!--<div style="position: relative;" class="clearfix">
			                   <div class="left">
			                        <img src="' . $dept_images[$flight_obj['@attributes']['suppcode']] . '" style="width: 70px; height: 16px;">
			                    </div>
			                    <div class="right">
			                        <span class="txt_color_2"></span>
			                    </div>
			                </div>-->
			             <small>' . $dscode . ' to ' . $ascode . '<br>' . date('d M Y', $this->cvtDt(str_date(explode(' ', $flight_obj['@attributes']['outdep'])[0]))) . ' : ' . $dept_start_time . '/' . $dept_arr_time . '</small><br>
			             <span class="txt_color_2"></span>			                
			        </div>         		
			        <div style="margin-bottom: 5px;line-height: 20px;">
			          	<strong style="color: rgba(241, 113, 19, 0.98);"><i aria-hidden="true" class="icon-calendar"></i>&nbsp;Return:</strong><br>
			             <!--<div style="position: relative;" class="clearfix">
			                  <div class="left">
			                      <img src="' . $dept_images[$flight_obj['@attributes']['suppcode']] . '" style="width: 70px; height: 16px;">
			                  </div>
			              </div>-->
					   	 <small>' . $ascode . ' to ' . $dscode . '<br>' . date('d M Y', $this->cvtDt(str_date(explode(' ', $flight_obj['@attributes']['indep'])[0]))) . ' : ' . $return_start_time . '/' . $return_arr_time . '</small><br>
					     <span class="txt_color_2"></span>
			        </div>	
		   	 		<div style="position: relative;" class="clearfix">
			             <div>
			                 <small>
			                      <span> Persons : ' . ($row[0]['num_adults'] + max($row[0]['num_children'], 0)) . ' x &#163;' . $flight_obj['@attributes']['sellpricepp'] . '</span>
			                 </small>
			                 <span style="float:right;">
			        	        <small>
			                       <a href="' . base_url() . 'available/' . $this->uri->segment(2) . '" title="Change Flight">Change</a>
								</small>
							</span>
						 </div>						              
					</div>								           
		      	</div>
			    <div class="bg_grey">	
			          <div>
							<div class="left">Atol Protection</div>
				           <div class="right" style="text-align: right;">&#163;' . ($row[0]['num_adults'] + max($row[0]['num_children'], 0)) * 2.5 . '</div>
			          </div>
			          <div style="margin-top: 10px;" class="clearfix">
			               <small>' . ($row[0]['num_adults'] + max($row[0]['num_children'], 0)) . ' x &#163;2.50</small>
			               <span style="float:right;">
						        <small><a class="toggle_atol">What\'s this?</a></small>
						   </span>
			          </div>			        					
				</div>
//.........这里部分代码省略.........
开发者ID:bogiesoft,项目名称:bookitnow,代码行数:101,代码来源:Extras.php

示例12: BoardSelect

function BoardSelect($board = 0)
{
    global $config, $my, $tpl, $db, $gpc, $lang, $scache, $plugins;
    $found = false;
    $sub_cache = $forum_cache = $last_cache = array();
    $categories_obj = $scache->load('categories');
    $cat_cache = $categories_obj->get();
    $memberdata_obj = $scache->load('memberdata');
    $memberdata = $memberdata_obj->get();
    $index_moderators = $scache->load('index_moderators');
    $mod_cache = $index_moderators->get();
    ($code = $plugins->load('forums_query')) ? eval($code) : null;
    // Fetch Forums
    $result = $db->query("\n\tSELECT\n    \tf.id, f.name, f.description, f.opt, f.optvalue, f.parent, f.topics, f.replies, f.last_topic, f.invisible,\n    \tt.topic as l_topic, t.id as l_tid, t.last as l_date, u.name AS l_uname, t.last_name AS l_name, f.id AS l_bid\n    FROM {$db->pre}forums AS f\n        LEFT JOIN {$db->pre}topics AS t ON f.last_topic=t.id\n        LEFT JOIN {$db->pre}user AS u ON t.last_name=u.id\n    ORDER BY f.parent, f.position\n\t", __LINE__, __FILE__);
    $keys = array('l_topic' => null, 'l_tid' => null, 'l_date' => null, 'l_uname' => null, 'l_name' => null, 'l_bid' => null);
    if ($db->num_rows($result) == 0) {
        $errormsg = array('There are currently no boards to show. Pleas visit the <a href="admin.php' . SID2URL_1 . '">Admin Control Panel</a> and create some forums.');
        $errorurl = $js_errorurl = '';
        $tpl->globalvars(compact("js_errorurl", "errorurl", "errormsg"));
        echo $tpl->parse('main/error');
        return $found;
    }
    while ($row = $db->fetch_assoc($result)) {
        $row['name'] = $gpc->prepare($row['name']);
        $row['l_uname'] = $gpc->prepare($row['l_uname']);
        $row['l_name'] = $gpc->prepare($row['l_name']);
        $row['bid'] = $cat_cache[$row['parent']]['parent'];
        // Caching for Subforums
        if (!empty($row['bid'])) {
            $sub_cache[$row['bid']][] = $row;
        }
        // Caching the Forums
        if ($row['bid'] == $board) {
            $forum_cache[$row['parent']][] = $row;
        }
        $last_cache[$row['id']] = $row;
        ($code = $plugins->load('forums_caching')) ? eval($code) : null;
    }
    // Work with the chached data!
    foreach ($cat_cache as $cat) {
        $forums = array();
        if (isset($forum_cache[$cat['id']]) == false) {
            continue;
        }
        foreach ($forum_cache[$cat['id']] as $forum) {
            $found = true;
            $forum['new'] = false;
            $forum['show'] = true;
            // Subforendaten vererben (Letzter Beitrag, Markierung)
            if (isset($sub_cache[$forum['id']])) {
                $substats = SubStats($forum['topics'], $forum['replies'], $forum['id'], $sub_cache);
                $forum['topics'] = $substats[0];
                $forum['replies'] = $substats[1];
            }
            // Letzter Beitrag
            $last = $last_cache[$forum['id']];
            if (isset($sub_cache[$forum['id']])) {
                foreach ($substats[2] as $last_bid) {
                    $sub = $last_cache[$last_bid];
                    if ($last['l_date'] < $sub['l_date'] && check_forumperm($sub)) {
                        $last = $sub;
                    }
                }
            }
            $forum = array_merge($forum, array_intersect_key($last, $keys));
            if (is_id($forum['l_name']) && isset($memberdata[$forum['l_name']])) {
                $forum['l_name'] = array($forum['l_uname'], $forum['l_name']);
            } else {
                $forum['l_name'] = array($forum['l_name'], 0);
            }
            // Rechte und Gelesensystem
            if ($forum['opt'] != 're') {
                if (!check_forumperm($forum)) {
                    if ($forum['invisible'] != 0) {
                        $forum['show'] = false;
                    }
                    $forum['foldimg'] = $tpl->img('cat_locked');
                    $forum['topics'] = '-';
                    $forum['replies'] = '-';
                    $forum['l_topic'] = false;
                } else {
                    if (isset($my->mark['f'][$forum['id']]) && $my->mark['f'][$forum['id']] > $forum['l_date'] || $forum['l_date'] < $my->clv || $forum['topics'] < 1) {
                        $forum['foldimg'] = $tpl->img('cat_open');
                    } else {
                        $forum['foldimg'] = $tpl->img('cat_red');
                        $forum['new'] = true;
                    }
                    if (!empty($forum['l_topic'])) {
                        if (strxlen($forum['l_topic']) > $config['lasttopic_chars']) {
                            $forum['l_topic'] = substr($forum['l_topic'], 0, $config['lasttopic_chars']);
                            $forum['l_topic'] .= "...";
                        }
                        $forum['l_topic'] = $gpc->prepare($forum['l_topic']);
                        $forum['l_date'] = str_date($lang->phrase('dformat1'), times($forum['l_date']));
                    }
                }
            }
            $forum['topics'] = numbers($forum['topics']);
            $forum['replies'] = numbers($forum['replies']);
            // Moderatoren
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:101,代码来源:function.viscacha_frontend.php

示例13: foreach

    // 	$t = explode('-',$departures[$dept_arr[0]]);
    // 	$ser_str = array_pop($t) .' to ';
    $ser_str = '';
    $controller->load->model('Arrivals');
    $arr_rows_cat_wise = $controller->Arrivals->fetchArrivalsByCategory();
    //echo "<pre>";print_r($change_search_info);exit;
    foreach ($arr_rows_cat_wise as $tarrival) {
        if ($tarrival['arapts'] == $change_search_info['row']['arapts']) {
            $ser_str .= $tarrival['name_resort'];
        }
    }
    $ser_str .= ', ' . $change_search_info['row']['num_adults'] . ' Adult(s), ';
    $ser_str .= $change_search_info['row']['num_children'] . ' Children(s), ';
    $ser_str .= $change_search_info['query']['maxstay'] . ' Night(s), ';
    $ddate = isset($fselected_date) ? $fselected_date : $change_search_info['query']['depdate'];
    $ser_str .= date('d M Y', $controller->cvtDt(str_date($ddate)));
    ?>
			<p><strong>Your Search:</strong> <?php 
    echo $ser_str;
    ?>
.</p>
		</div>

		 <div class="make_buttons">
		    <div class="button" data-toggle="collapse" data-target="#demo" style="">Change Search</div>  
			<div class="clearfix"></div> 
		    <div id="demo" class="collapse" style="margin-top:1em;">
		   		<div class="row" class="forms">
		       		<form name="full_pack_form" onsubmit="return hotelsForm(this)" method="post" accept-charset="utf-8">
		               <div class="form-group col-sm-3">
		        	     <label> Travel To:</label>
开发者ID:bogiesoft,项目名称:bookitnow,代码行数:31,代码来源:change_search_hotels_only.php

示例14: BoardSelect


//.........这里部分代码省略.........
                $forum['id2'] = $forum['id'];
            }
            $id = array_search(trim($forum['lname']), $memberdata);
            if (is_id($id)) {
                $forum['lname'] = array($forum['lname'], $id);
            } else {
                $forum['lname'] = array($forum['lname'], 0);
            }
            if ($forum['btopic_id']) {
                $forum['tid'] = $forum['btopic_id'];
            } else {
                $forum['tid'] = $forum['last_topic'];
            }
            // Rechte und Gelesensystem
            if ($forum['opt'] != 're') {
                if (!check_forumperm($forum)) {
                    if ($forum['invisible'] == 1) {
                        $forum['show'] = false;
                    }
                    $forum['foldimg'] = $tpl->img('cat_locked');
                    $forum['topics'] = '-';
                    $forum['replys'] = '-';
                    $forum['btopic'] = false;
                } else {
                    if (isset($my->mark['f'][$forum['id']]) && $my->mark['f'][$forum['id']] > $forum['bdate'] || $forum['bdate'] < $my->clv || $forum['topics'] < 1) {
                        $forum['foldimg'] = $tpl->img('cat_open');
                    } else {
                        $forum['foldimg'] = $tpl->img('cat_red');
                        $forum['new'] = true;
                    }
                    if ($forum['btopic']) {
                        if (strxlen($forum['btopic']) >= 40) {
                            $forum['btopic'] = substr($forum['btopic'], 0, 40);
                            $forum['btopic'] .= "...";
                        }
                        $forum['bdate'] = str_date($lang->phrase('dformat1'), times($forum['bdate']));
                    }
                }
            }
            $forum['topics'] = numbers($forum['topics']);
            $forum['replys'] = numbers($forum['replys']);
            // Moderatoren
            $forum['mod'] = array();
            if (isset($mod_cache[$forum['id']])) {
                $anz2 = count($mod_cache[$forum['id']]);
                for ($i = 0; $i < $anz2; $i++) {
                    if ($anz2 != $i + 1) {
                        $mod_cache[$forum['id']][$i]['sep'] = ', ';
                    } else {
                        $mod_cache[$forum['id']][$i]['sep'] = '';
                    }
                    $forum['mod'][] = $mod_cache[$forum['id']][$i];
                }
            }
            // Unterforen
            $forum['sub'] = array();
            if ($config['showsubfs']) {
                if (isset($sub_cache[$forum['id']])) {
                    $anz2 = count($sub_cache[$forum['id']]);
                    $sub = array();
                    for ($i = 0; $i < $anz2; $i++) {
                        $show = true;
                        $sub_cache[$forum['id']][$i]['new'] = false;
                        if ($sub_cache[$forum['id']][$i]['opt'] != 're') {
                            if (!check_forumperm($sub_cache[$forum['id']][$i])) {
                                if ($sub_cache[$forum['id']][$i]['invisible'] == 1) {
                                    $show = false;
                                } else {
                                    $sub_cache[$forum['id']][$i]['foldimg'] = $tpl->img('subcat_locked');
                                }
                            } else {
                                if (isset($my->mark['f'][$sub_cache[$forum['id']][$i]['id']]) && $my->mark['f'][$sub_cache[$forum['id']][$i]['id']] > $sub_cache[$forum['id']][$i]['bdate'] || $sub_cache[$forum['id']][$i]['bdate'] < $my->clv || $sub_cache[$forum['id']][$i]['topics'] < 1) {
                                    $sub_cache[$forum['id']][$i]['foldimg'] = $tpl->img('subcat_open');
                                } else {
                                    $sub_cache[$forum['id']][$i]['foldimg'] = $tpl->img('subcat_red');
                                    $sub_cache[$forum['id']][$i]['new'] = true;
                                }
                            }
                        } else {
                            $sub_cache[$forum['id']][$i]['foldimg'] = $tpl->img('subcat_redirect');
                        }
                        if ($show == true) {
                            $forum['sub'][] = $sub_cache[$forum['id']][$i];
                        }
                    }
                }
            }
            ($code = $plugins->load('forums_entry_prepared')) ? eval($code) : null;
            if ($forum['show'] == true) {
                $forums[] = $forum;
            }
        }
        if (count($forums) > 0) {
            $tpl->globalvars(compact("cat", "forums"));
            ($code = $plugins->load('forums_prepared')) ? eval($code) : null;
            echo $tpl->parse("categories");
        }
    }
    return $found;
}
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:101,代码来源:function.viscacha_frontend.php

示例15: cache_memberdata

<?php

global $memberdata;
global $gpc;
$result = $db->query("\nSELECT t.id, t.board, t.topic, t.last AS date, t.last_name AS name\nFROM {$db->pre}topics AS t LEFT JOIN {$db->pre}cat AS c ON t.board = c.id \nWHERE c.opt != 'pw' AND t.status != '2' " . $slog->sqlinboards('t.board') . "\nORDER BY t.last DESC \nLIMIT 0," . $ini['params']['num'], __LINE__, __FILE__);
if ($db->num_rows($result) > 0) {
    if (!isset($memberdata) || !is_array($memberdata)) {
        $memberdata = cache_memberdata();
    }
    $lastbox = array();
    while ($row = $gpc->prepare($db->fetch_assoc($result))) {
        if (is_id($row['name']) && isset($memberdata[$row['name']])) {
            $row['name'] = $memberdata[$row['name']];
        }
        $row['date'] = str_date($lang->phrase('dformat1'), times($row['date']));
        if (strxlen($row['topic']) >= 75) {
            $row['topic'] = substr($row['topic'], 0, 75);
            $row['topic'] .= $lang->phrase('dot_more');
        }
        $lastbox[] = $row;
    }
    $tpl->globalvars(compact("lastbox"));
    $lang->assign('num', $ini['params']['num']);
    echo $tpl->parse($dir . "last");
}
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:25,代码来源:lastbox.php


注:本文中的str_date函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。