コード例 #1
0
        $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');
コード例 #2
0
 $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])) {
コード例 #3
0
 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');
     }
コード例 #4
0
     $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: ';
     }
コード例 #5
0
?>
<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>
コード例 #6
0
function BoardSelect($board = 0)
{
    global $config, $my, $tpl, $db, $gpc, $lang, $scache, $plugins, $slog;
    $found = false;
    $sub_cache = $forum_cache = $last_cache = $forums = $cat = 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();
    $prefix_obj = $scache->load('prefix');
    $prefix = $prefix_obj->get();
    ($code = $plugins->load('forums_query')) ? eval($code) : null;
    // Fetch Forums
    $result = $db->query("\n\tSELECT\n\t\tf.id, f.name, f.description, f.opt, f.optvalue, f.parent, f.topics, f.replies, f.last_topic, f.invisible,\n\t\tt.topic as l_topic, t.prefix AS l_prefix, 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\tFROM {$db->pre}forums AS f\n\t\tLEFT JOIN {$db->pre}topics AS t ON f.last_topic=t.id\n\t\tLEFT JOIN {$db->pre}user AS u ON t.last_name=u.id\n\tORDER BY f.parent, f.position\n\t");
    $keys = array('l_prefix' => null, 'l_topic_full' => null, 'l_topic' => null, 'l_tid' => null, 'l_date' => null, 'l_uname' => null, 'l_name' => null, 'l_bid' => null);
    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;
    }
    $cats = array();
    $hidden = 0;
    // Work with the chached data!
    foreach ($cat_cache as $cat) {
        $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['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 {
                                    $sub_cache[$forum['id']][$i]['foldimg'] = $tpl->img('subcat_locked');
                                    $sub_cache[$forum['id']][$i]['state'] = BOARD_STATE_LOCKED;
                                }
                            } else {
                                if ($slog->isForumRead($sub_cache[$forum['id']][$i]['id'], $sub_cache[$forum['id']][$i]['l_date']) || $sub_cache[$forum['id']][$i]['topics'] < 1) {
                                    $sub_cache[$forum['id']][$i]['foldimg'] = $tpl->img('subcat_open');
                                    $sub_cache[$forum['id']][$i]['state'] = BOARD_STATE_OLD;
                                } else {
                                    $sub_cache[$forum['id']][$i]['foldimg'] = $tpl->img('subcat_red');
                                    $sub_cache[$forum['id']][$i]['state'] = BOARD_STATE_NEW;
                                    $sub_cache[$forum['id']][$i]['new'] = true;
                                }
                            }
                        } else {
                            $sub_cache[$forum['id']][$i]['foldimg'] = $tpl->img('subcat_redirect');
                            $sub_cache[$forum['id']][$i]['state'] = BOARD_STATE_WWW;
                        }
                        if ($show == true) {
                            $forum['sub'][] = $sub_cache[$forum['id']][$i];
                        }
                    }
                }
            }
            ($code = $plugins->load('forums_entry_prepared')) ? eval($code) : null;
            if ($forum['show'] == true) {
                $cat['forums'][] = $forum;
            } elseif ($forum['invisible'] != 2) {
                $hidden++;
            }
        }
        if (count($cat['forums']) > 0) {
            $cats[] = $cat;
        }
    }
    ($code = $plugins->load('forums_prepared')) ? eval($code) : null;
    $error_state = count($cats) == 0 && $board == 0;
    if (count($cats) > 0 || $error_state) {
        $tpl->globalvars(compact("cats", "board", "hidden", "error_state"));
        echo $tpl->parse("categories");
    }
    // Else: This is a forum without sub forums (that should be displayed)
    return $found;
}
コード例 #7
0
    ($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');
        }
コード例 #8
0
ファイル: common_helper.php プロジェクト: bogiesoft/bookitnow
function boookattach($results, $type = '')
{
    // Include the main TCPDF library (search for installation path).
    //require_once('tcpdf/examples/tcpdf_include.php');
    $pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'utf-8', false);
    //$pdf->Footer('hello');
    // create new PDF document
    //$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
    // set document information
    $pdf->SetCreator(PDF_CREATOR);
    //$pdf->SetAuthor('Nicola Asuni');
    //$pdf->SetTitle('TCPDF Example 001');
    //$pdf->SetSubject('<h1>TCPDF Tutorial</h1>');
    //$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
    // set default header data
    //$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 001', PDF_HEADER_STRING, array(0,64,255), array(0,64,128));
    //$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, '<div style="float:right">haoooooooo</div>', PDF_HEADER_STRING, array(0,64,255), array(0,64,128));
    $pdf->setFooterData(array(0, 64, 0), array(0, 64, 128));
    // set header and footer fonts
    $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
    $pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
    // set default monospaced font
    $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
    // set margins
    $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
    $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
    $pdf->SetFooterMargin(20);
    //echo PDF_MARGIN_FOOTER;exit;
    // set auto page breaks
    $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
    // set image scale factor
    $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
    // set some language-dependent strings (optional)
    if (@file_exists(dirname(__FILE__) . '/lang/eng.php')) {
        require_once dirname(__FILE__) . '/lang/eng.php';
        $pdf->setLanguageArray($l);
    }
    // ---------------------------------------------------------
    // set default font subsetting mode
    $pdf->setFontSubsetting(true);
    // Set font
    // dejavusans is a UTF-8 Unicode font, if you only need to
    // print standard ASCII chars, you can use core fonts like
    // helvetica or times to reduce file size.
    //$pdf->SetFont('dejavusans', '', 10, '', true);
    $pdf->SetFont('Helvetica', '', 10, '', 'false');
    // Add a page
    // This method has several options, check the source code documentation for more information.
    $pdf->AddPage();
    // set text shadow effect
    $pdf->setTextShadow(array('enabled' => true, 'depth_w' => 1, 'depth_h' => 0.2, 'color' => array(196, 196, 196), 'opacity' => 0, 'blend_mode' => 'Normal'));
    // Set some content to print
    $tbl = '<br /><br/><br/><br/>	
<table border="0" cellpadding="2" cellspacing="2" nobr="true">
 
 <tr>
  <td style="width:60%"><b>Your Personal Travel Advisor:</b>' . @$results['pdfdata']['adviser_info']['name'] . '</td>
  <td style="width:40%"><b>Quote Reference:</b>' . @$results['pdfdata']['adviser_info']['reference'] . '</td>
 </tr>
 <tr>  
  <td style="width:60%"><b>Phone Number:</b>' . @$results['pdfdata']['adviser_info']['phone'] . '</td>
  <td style="width:40%"><b>Date:</b> ' . @$results['pdfdata']['adviser_info']['date'] . '</td> 
 </tr>
 <tr>
  <td style="width:60%"><b>Email Address:</b>' . @$results['pdfdata']['adviser_info']['email'] . '</td>
  <td style="width:40%"><b>Adults:</b> ' . @$results['seg'][0]['num_adults'] . ' <b>Children:</b> ' . @$results['seg'][0]['num_children'] . '</td>  
 </tr>
</table>';
    $pdf->writeHTML($tbl, true, false, false, false, '');
    //$ci = $results['controller'];
    $t = json_decode($results['row'][0]['adults_info'], true);
    $tbl = '
<div>
	<span>Dear ' . $t['fname'][0] . '</span>
	</br>
	<p>
		I have pleasure in enclosing a quote in respect of your recent enquiry with Super Escapes. Please feel free to contact us, should you need any more information or advice.
	</p>
</div>';
    $pdf->writeHTML($tbl, true, false, false, false, '');
    if (isset($results['fobj'])) {
        $depts = fetch_departures();
        $arrivs = fetch_arrivals();
        $dep_arr = explode('-', $depts[$results['fobj']['@attributes']['depapt']]);
        $arr_arr = explode('-', $arrivs[$results['fobj']['@attributes']['arrapt']]);
        $ret_arr = explode('-', $depts[$results['fobj']['@attributes']['retapt']]);
        $dept_start_time = substr(explode(' ', $results['fobj']['@attributes']['outdep'])[1], 0, -3);
        $dept_arr_time = substr(explode(' ', $results['fobj']['@attributes']['outarr'])[1], 0, -3);
        $return_start_time = substr(explode(' ', $results['fobj']['@attributes']['indep'])[1], 0, -3);
        $return_arr_time = substr(explode(' ', $results['fobj']['@attributes']['inarr'])[1], 0, -3);
        $tbl = '
<b><u>Flight Details : </u></b><br><br>  
<table border="0" cellpadding="2" cellspacing="2" nobr="true">
	<tr>
		<th style="width:35%;text-align:center;font-weight:bold;">Route</th>
		<td style="width:13%;text-align:center;font-weight:bold;">Dep Date</td>
		<td style="width:13%;text-align:center;font-weight:bold;">Dep Time</td>
		<td style="width:13%;text-align:center;font-weight:bold;">Arr Date</td>
		<td style="width:13%;text-align:center;font-weight:bold;">Arr Time</td>
		<td style="width:13%;text-align:center;font-weight:bold;">Flight No</td>
	</tr>
    <tr>
        <td >' . current($dep_arr) . ' Airport ' . array_pop($arr_arr) . ' Airport</td>
        <td>' . explode(' ', $results['fobj']['@attributes']['outdep'])[0] . '</td>
		<td>' . $dept_start_time . '</td>
		<td>' . explode(' ', $results['fobj']['@attributes']['outarr'])[0] . '</td>
		<td>' . $dept_arr_time . '</td>
		<td>' . $results['fobj']['@attributes']['outfltnum'] . '</td>
    </tr>
    <tr>
         <td >' . array_pop($arr_arr) . ' Airport ' . current($ret_arr) . ' Airport</td>
		<td>' . explode(' ', $results['fobj']['@attributes']['indep'])[0] . '</td>    	
		<td>' . $return_start_time . '</td>
		<td>' . explode(' ', $results['fobj']['@attributes']['inarr'])[0] . '</td>
		<td>' . $return_arr_time . '</td>
		<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>';
    $pdf->writeHTML($tbl, true, false, false, false, '');*/
    //echo $tbl;exit;
    $tbl = '
<div style="margin-top:20px;">
	<span>Yours sincerely</span>
	<p>' . @$results['pdfdata']['adviser_info']['name'] . '</p>
</div>';
    $pdf->writeHTML($tbl, true, false, false, false, '');
    if (!empty($results['hobjs'])) {
        // $hotel_meta = new SimpleXMLElement(download_page('http://87.102.127.86:8005/search/websearch.exe?pageid=7&compid=1&brochurecode=BEWE-AMTSES1CO0'));
        $hotel_meta = new SimpleXMLElement(download_page('http://87.102.127.86:8005/search/websearch.exe?pageid=7&compid=1&brochurecode=' . $results['hobjs'][0]['@attributes']['brocode']));
        $i = 1;
        $desc = urldecode($hotel_meta->HotelDescription);
        $ty = new tidy();
        $desc = $ty->repairString($desc);
        $tbl = '<br /><br/><br/><br/><h2 style="text-align:center; "pagebreak="true">Accommodation Info</h2><table>';
        foreach ($hotel_meta->Images->Url as $img) {
            $tbl .= '<tr>';
            //Allow_url_fopen must be On
            if (is_array(@getimagesize(urldecode($img)))) {
                $tbl .= '<td colspan="1"  style="margin-right: 30px !important;"><img src="' . urldecode($img) . '" /></td>';
            } else {
                $tbl .= '<td colspan="3"><img src="' . base_url() . '/images/destination_placeholder.jpg"/></td>';
            }
            $tbl .= '<td colspan="1"></td>';
            if ($i == 1) {
                $tbl .= '<td rowspan="' . count($hotel_meta->Images->Url) . '" colspan="8">' . $desc . '</td>';
            }
            $tbl .= '</tr>';
            //$tbl .= '<style>.desc{background:red;}</style>';
            $i++;
        }
        $tbl .= '</table>';
        //echo $tbl;exit;
        $pdf->writeHTML($tbl, true, false, false, false, '');
    }
    // ---------------------------------------------------------
    // Close and output PDF document
    // This method has several options, check the source code documentation for more information.
    //$pdf->Output('D:\xampp\htdocs\test_plugins\tcpdf\examples\example_001.pdf', 'F');
    if ($type == 'email') {
        $pdf->Output(getcwd() . '/booking_files/' . $results['pdfdata']['adviser_info']['reference'] . '.pdf', 'F');
        if (file_exists(getcwd() . '/booking_files/' . $results['pdfdata']['adviser_info']['reference'] . '.pdf')) {
            $subject = 'Quick Quote Ref: ' . $results['pdfdata']['adviser_info']['reference'] . ' - Book it now';
            $body = 'Dear ' . $t['fname'][0];
            $body .= '<p></p>';
            $body .= '<p>Please find the attached document</p>';
            $body .= '<p></p>';
            $body .= '<p>Cheers</p>';
            $body .= '<p>BootItNow</p>';
            $from = '*****@*****.**';
            $sendername = "BookItNow Admin";
            $list = array($results['row'][0]['email']);
            $config['protocol'] = "smtp";
            $config['smtp_host'] = 'mail.expertwebworx.in';
            $config['smtp_port'] = '25';
            $config['smtp_user'] = '******';
            $config['smtp_pass'] = '******';
            $config['smtp_crypto'] = 'tls';
            $config['charset'] = "iso-8859-1";
            $config['mailtype'] = "html";
            $ci->load->library('email', $config);
            $ci->email->set_newline("\r\n");
            $ci->email->from($from, $sendername);
            $ci->email->to($list);
            $ci->email->reply_to($from, $sendername);
            $ci->email->subject($subject);
            $ci->email->attach(getcwd() . '/booking_files/' . $results['pdfdata']['adviser_info']['reference'] . '.pdf');
            $ci->email->message($body);
            if ($ci->email->send()) {
            }
        }
    } else {
        $pdf->Output($results['pdfdata']['adviser_info']['reference'] . '.pdf', 'D');
        exit;
    }
    //============================================================+
    // END OF FILE
    //============================================================+
}
コード例 #9
0
ファイル: Hotel.php プロジェクト: bogiesoft/bookitnow
    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>
								                </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> Adults + Children : ' . ($rows[0]['num_adults'] + $rows[0]['num_children']) . ' x </span><span id="cphContent_ucBookingSummary_lblFPrice">&#163;' . $flight_obj['@attributes']['sellpricepp'] . '</span>
								                    </small>
								                    <span style="float:right;">
									                    <small>
									                        <a href="' . base_url() . 'flightsAvailability/' . $this->uri->segment(2) . '" onClick="return Change(' . "'" . $type_s . "'" . ',' . "'" . $cry . "'" . ')" 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;' . ($rows[0]['num_adults'] + $rows[0]['num_children']) * 2.5 . '</div>
									          </div>
									           	
									           	<div style="margin-top: 10px;" class="clearfix">
									                 <small>&#163;2.50 x ' . ($rows[0]['num_adults'] + $rows[0]['num_children']) . '</small>
									                 <span style="float:right;">
									                    <small>
									                        <a class="toggle_atol">What\'s this?</a>
									                    </small>
									                </span>
						           			   </div>			        					
								       	</div>
									    <div class="atol_info clearfix" style="display: none;">
											 <div class="clearfix has_bottom_margin hide_mobile hide_tablet">
										           <h4 class="left ">Atol Protection</h4>
										               <a class="right toggle_atol"><small>close</small></a>
										     </div>
											 <div style="clear: both;">
										        <p class="hide_mobile hide_tablet">
										             <strong>With A1 Travel your holiday is protected!</strong><br>
										               A1Travel hold ATOL license 5287 and we are full ABTA members.
										       </p>
											   <small>
										         <p>
										             All of our Flight Plus Holidays are financially protected by the ATOL scheme.<br>
										             A Flight Plus Holiday is where you purchase through us, at the same time or within a day of each other, a flight plus overseas accommodation and / or car hire from separate Travel Suppliers and as separate bookings (i.e. not a package holiday)
										         </p>
										         <p>
										           On all Flight Plus Holiday bookings, your money is ATOL protected. This means you will be able to continue with your holiday or suitable alternative holiday (at no extra cost) or receive a refund of the amount paid to us in the unlikely event of our insolvency or the insolvency of one or more of your service Travel Suppliers
										         </p>
												 <p> When you book with us, we will send you an ATOL confirmation invoice that provides you with all the information you will need about your ATOL protection
										          </p>
										       </small>
										     </div>
										 </div>
									     <div class="bg_grey" style="margin-bottom:10px;">	
								              <div>
												<div class="left">Total</div>
									           <div class="right" style="text-align: right;">&#163;' . (($rows[0]['num_adults'] + $rows[0]['num_children']) * $flight_obj['@attributes']['sellpricepp'] + ($rows[0]['num_adults'] + $rows[0]['num_children']) * 2.5) . '</div>
									          </div>									           	
									          <div style="margin-top: 10px;" class="clearfix">									                 
									                 <span style="float:right;">
									                    <small>Per Person: ' . ($rows[0]['num_adults'] + $rows[0]['num_children']) * $flight_obj['@attributes']['sellpricepp'] / ($rows[0]['num_adults'] + $rows[0]['num_children']) . ' X ' . ($rows[0]['num_adults'] + $rows[0]['num_children']) . '</small>
									                </span>
						           			   </div>			        					
								       	</div>';
                /**************end*******************************/
                $data['type'] = 'pack_hotel';
                $this->layouts->add_include(array('css/bootstrap-responsive.min.css', 'css/jquery-ui.css', 'css/font-awesome.min.css', 'css/google_font.css', 'css/custom.css', 'css/responsive.css', 'css/inner-page.css', 'css/menu.css', 'css/bxslider/jquery.bxslider.css', 'css/jquery.fancybox.css', 'css/popup_fancy.css', 'css/customeffects.css', 'js/jquery-ui.js', 'js/jquery.blockUI.js', 'js/responsee.js', 'js/responsiveslides.min.js', 'js/bxslider/jquery.bxslider.js', 'js/jquery.fancybox.pack.js', 'js/script-hotels.js'));
                //$this->layouts->add_include(array('css/bootstrap-responsive.min.css','css/jquery-ui.css','css/font-awesome.min.css','css/google_font.css','css/custom.css','css/responsive.css','css/inner-page.css','css/menu.css','css/bxslider/jquery.bxslider.css','css/flight_result.css','js/jquery-ui.js','js/jquery.blockUI.js','js/responsee.js','js/responsiveslides.min.js','js/bxslider/jquery.bxslider.js','js/script-hotels.js'));
                $this->layouts->set_title('Available Hotels');
                //For change search poopulations
                $departures = new SimpleXMLElement($this->download_page('http://87.102.127.86:8005/search/websearch.exe?pageid=1&compid=1'));
                foreach ($departures as $departure) {
                    $code = (array) $departure->attributes()->code;
                    $name = (array) $departure->attributes()->name;
                    $data['filtered_departures'] = seperatorFlights($code[0], $name[0]);
                    $data['departures'][$code[0]] = $name[0];
                }
                $parts = parse_url($myser_URL);
                parse_str($parts['query'], $query);
                $data['change_search_info']['query'] = $query;
                $data['change_search_info']['row'] = $rows[0];
                $data['controller'] = $this;
                $data['fcls'] = 'done';
                $data['hcls'] = 'current';
                $data['ecls'] = '';
                $data['bcls'] = '';
                $data['f_done'] = 'done';
                $data['h_done'] = '';
                $data['e_done'] = '';
                $data['b_done'] = '';
                //End
                $this->layouts->view('available_hotels_view', $data);
            } else {
                redirect(base_url());
            }
        }
    }
コード例 #10
0
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'];
コード例 #11
0
ファイル: Extras.php プロジェクト: bogiesoft/bookitnow
    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>
			               		
			               		
			               		
			               		
			               		
			    <div class="bg_grey" style="margin-bottom:10px;">
     				<div>
						<div class="left">TOTAL</div>
				        <div class="right" style="text-align: right;">&#163;' . (($row[0]['num_adults'] + max($row[0]['num_children'], 0)) * $flight_obj['@attributes']['sellpricepp'] + ($row[0]['num_adults'] + max($row[0]['num_children'], 0)) * 2.5) . '</span></div>
			        </div>
					<div style="margin-bottom: 15px; margin-top: 5px;    line-height: 20px;">            
			             <small>Per Person: &#163;<span id="pprice">' . (($row[0]['num_adults'] + max($row[0]['num_children'], 0)) * $flight_obj['@attributes']['sellpricepp'] + ($row[0]['num_adults'] + max($row[0]['num_children'], 0)) * 2.5) / ($row[0]['num_adults'] + max($row[0]['num_children'], 0)) . '</span>  X ' . ($row[0]['num_adults'] + max($row[0]['num_children'], 0)) . '</small>             
			         </div>        
				</div>';
            /**************total*******************************/
            //For change search poopulations
            $departures = new SimpleXMLElement($this->download_page('http://87.102.127.86:8005/search/websearch.exe?pageid=1&compid=1'));
            foreach ($departures as $departure) {
                $code = (array) $departure->attributes()->code;
                $name = (array) $departure->attributes()->name;
                $data['filtered_departures'] = seperatorFlights($code[0], $name[0]);
                $data['departures'][$code[0]] = $name[0];
            }
            $parts = parse_url($row[0]['service_url']);
            parse_str($parts['query'], $query);
            $data['change_search_info']['query'] = $query;
            $data['change_search_info']['row'] = $row[0];
            $data['controller'] = $this;
            $data['fcls'] = '';
            $data['bcls'] = 'current';
            $data['f_done'] = 'done';
            //End
            /**************end*******************************/
            $this->layouts->add_include(array('css/bootstrap-responsive.min.css', 'css/font-awesome.min.css', 'css/google_font.css', 'css/custom.css', 'css/responsive.css', 'css/inner-page.css', 'css/menu.css', 'css/bxslider/jquery.bxslider.css', 'css/jquery.fancybox.css', 'css/jquery-ui.css', 'css/customeffects.css', 'js/jquery.blockUI.js', 'js/responsee.js', 'js/responsiveslides.min.js', 'js/bxslider/jquery.bxslider.js', 'js/jquery-ui.js', 'js/jquery.fancybox.pack.js', 'js/script-hotels.js'));
            if ($this->input->post()) {
                $this->load->library('form_validation');
                $this->form_validation->set_error_delimiters('<small style="font-weight:100;" class="text-danger">', '</small>');
                foreach ($this->input->post() as $key => $val) {
                    if (strpos($key, 'adult_title') !== false) {
                        $this->form_validation->set_rules($key, 'Title', 'required|callback_cardTypeValidation');
                    } else {
                        if (strpos($key, 'adult_fname') !== false) {
                            $this->form_validation->set_rules($key, 'First Name', 'trim|required|callback_alpha_dash_space');
                        } else {
                            if (strpos($key, 'adult_dob') !== false) {
                                $this->form_validation->set_rules($key, 'DOB', 'trim|required');
                            } else {
                                if (strpos($key, 'adult_lname') !== false) {
                                    $this->form_validation->set_rules($key, 'Last Name', 'trim|required|callback_alpha_dash_space');
                                } else {
                                    if (strpos($key, 'child_title') !== false) {
                                        $this->form_validation->set_rules($key, 'Title', 'required|callback_cardTypeValidation');
                                    } else {
                                        if (strpos($key, 'child_fname') !== false) {
                                            $this->form_validation->set_rules($key, 'First Name', 'trim|required|callback_alpha_dash_space');
                                        } else {
                                            if (strpos($key, 'child_dob') !== false) {
                                                $this->form_validation->set_rules($key, 'DOB', 'trim|required');
                                            } else {
                                                if (strpos($key, 'child_lname') !== false) {
                                                    $this->form_validation->set_rules($key, 'Last Name', 'trim|required|callback_alpha_dash_space');
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                $this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email|matches[confirm_email]');
                $this->form_validation->set_rules('address_1', 'Address', 'required');
                $this->form_validation->set_rules('city', 'city', 'required|callback_alpha_dash_space');
                $this->form_validation->set_rules('post_code', 'postcode', 'required|numeric|max_length[8]');
                $this->form_validation->set_rules('confirm_email', ' Confirm Email', 'trim|required|valid_email');
                $this->form_validation->set_rules('home_tel', 'Phone Number', 'required|numeric|max_length[10]|min_length[10]');
                $this->form_validation->set_rules('mobile', 'Mobile Number', 'required|numeric|max_length[10]|min_length[10]');
                $this->form_validation->set_rules('card_number', 'Card Number', 'required|numeric|max_length[16]|min_length[16]');
                $this->form_validation->set_rules('name_card', 'Card Name', 'required|callback_alpha_dash_space');
                $this->form_validation->set_rules('card_type', 'Card type', 'required|callback_cardTypeValidation');
                $this->form_validation->set_rules('valid_to_yr', 'valid to date', 'required|callback_dateTypeValidation');
                $this->form_validation->set_rules('valid_to_mth', 'valid to date', 'required|callback_dateTypeValidation');
                $this->form_validation->set_rules('cvv_number', 'CVV Number', 'required|numeric|max_length[3]|min_length[3]');
                if ($this->input->post('have_diff_add')) {
                    $this->form_validation->set_rules('city2', 'city2', 'required|callback_alpha_dash_space');
                    $this->form_validation->set_rules('post_code2', 'postcode', 'required|numeric|max_length[8]');
                    $this->form_validation->set_rules('address_2', 'Address', 'required');
                }
                if (!$this->form_validation->run()) {
                } else {
                    if ($this->booking_submition()) {
                        $this->session->set_flashdata('submited', 'yes');
                    } else {
                        $this->session->set_flashdata('submited', 'no');
                    }
                }
            }
            $this->layouts->set_title('Book Hotel');
            $this->layouts->view('book_flight_view', $data);
        } else {
            redirect(base_url());
        }
    }
コード例 #12
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'])) {
        $edits = explode("\n", $row['edit']);
        foreach ($edits as $e) {
            $e = trim($e);
            if (empty($e)) {
                continue;
            }
            @(list($name, $date, $reason) = @explode("\t", $e, 3));
            $edit[] = array('date' => str_date($lang->phrase('dformat1'), times($date)), 'reason' => iif(empty($reason), $lang->phrase('post_editinfo_na'), $reason), 'name' => $name);
        }
    }
    echo $tpl->parse("popup/edithistory");
} else {
    echo $tpl->parse("popup/header");
    error($lang->phrase('query_string_error'), 'javascript: parent.close();');
}
$slog->updatelogged();
$zeitmessung = t2();
echo $tpl->parse("popup/footer");
$phpdoc->Out();
$db->close();
コード例 #13
0
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
            $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 {
                                    $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]['l_date'] || $sub_cache[$forum['id']][$i]['l_date'] < $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;
}
コード例 #14
0
    // 	$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>
コード例 #15
0
function BoardSelect($board = 0)
{
    global $config, $my, $tpl, $db, $gpc, $lang, $scache, $plugins;
    $found = false;
    $sub_cache = array();
    $sub_cache_last = array();
    $cat_cache = array();
    $mod_cache = array();
    $forum_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("SELECT \n    \tc.id, c.name, c.desc, c.opt, c.optvalue, c.bid, c.topics, c.replys, c.cid, c.last_topic, c.invisible,  \n    \tt.topic as btopic, t.id as btopic_id, t.last as bdate, u.name AS uname, t.last_name AS bname\n    FROM {$db->pre}cat AS c\n        LEFT JOIN {$db->pre}topics AS t ON c.last_topic=t.id \n        LEFT JOIN {$db->pre}user AS u ON t.last_name=u.id \n    ORDER BY c.cid, c.c_order, c.id", __LINE__, __FILE__);
    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 = '';
        $tpl->globalvars(compact("errorurl", "errormsg"));
        echo $tpl->parse('main/error');
        return $found;
    }
    while ($row = $db->fetch_assoc($result)) {
        $gpc->prepare($row['name']);
        $gpc->prepare($row['btopic']);
        $gpc->prepare($row['uname']);
        $gpc->prepare($row['bname']);
        // Caching for Subforums
        if ($row['bid'] > 0) {
            $sub_cache[$row['bid']][] = $row;
            $sub_cache_last[$row['id']] = $row;
        }
        // Caching the Forums
        if ($row['bid'] == $board) {
            $forum_cache[$row['cid']][] = $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;
            $forum['mbdate'] = $forum['bdate'];
            // Subforendaten vererben (Letzter Beitrag, Markierung)
            if (isset($sub_cache[$forum['id']])) {
                $substats = SubStats($forum['topics'], $forum['replys'], $forum['id'], $sub_cache);
                $forum['topics'] = $substats[0];
                $forum['replys'] = $substats[1];
                $bids = $substats[2];
            }
            $last = $forum['last_topic'];
            $last_date = $forum['bdate'];
            if (isset($sub_cache[$forum['id']])) {
                foreach ($bids as $bidf) {
                    $sub = $sub_cache_last[$bidf];
                    if ($last_date < $sub['bdate']) {
                        $last = $sub['id'];
                        $last_date = $sub['bdate'];
                    }
                }
            }
            $forum['lname'] = is_id($forum['bname']) ? $forum['uname'] : $forum['bname'];
            if ($last != $forum['last_topic']) {
                $forum['id2'] = $last;
                $forum['last_topic'] = $sub_cache_last[$forum['id2']]['last_topic'];
                $forum['btopic_id'] = $sub_cache_last[$forum['id2']]['btopic_id'];
                $forum['btopic'] = $sub_cache_last[$forum['id2']]['btopic'];
                $forum['bdate'] = $sub_cache_last[$forum['id2']]['bdate'];
                if (!isset($sub_cache_last[$forum['id2']]['lname'])) {
                    $forum['lname'] = is_id($sub_cache_last[$forum['id2']]['bname']) ? $sub_cache_last[$forum['id2']]['uname'] : $sub_cache_last[$forum['id2']]['bname'];
                } else {
                    $forum['lname'] = $sub_cache_last[$forum['id2']]['lname'];
                }
            } else {
                $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;
}
コード例 #16
0
<?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");
}
コード例 #17
0
	}
	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;