<? } else { ?>
                                	<option value="<?php 
echo $states->tStateID;
?>
"><?php 
echo $states->tStateName;
?>
</option>
                                <? } ?>
                    <? } ?>
                </select>
            </dt>  
            <dt><label>Country *</label>
           		<select name="country">
                	<? 
						$country = Country::findAll();
						foreach($country as $countries) {
							if($shipping->fldShippingCountry == "") {
								$countryVal = "US";
							} else {
								$countryVal = $shipping->fldShippingCountry;
							}
							if($countries->country_code == $countryVal) { 
					?>
                    		<option value="<?php 
echo $countries->country_code;
?>
" selected="selected"><?php 
echo $countries->country_name;
?>
</option>
Example #2
0
<?php

$page = isset($_GET['page']) ? $_GET['page'] : 1;
if (!preg_match('/^\\d+$/', $page)) {
    dispatch('core/backend/404');
    exit;
}
$objects = Country::findAll();
$html = new HTML();
$html->renderOut('core/backend/html_header', array('title' => i18n(array('en' => 'Country', 'zh' => '留学国家'))), true);
$html->output('<div id="wrapper">');
$html->renderOut('core/backend/header');
$perpage = 50;
$total = Country::countAll();
$total_page = ceil($total / $perpage);
$html->renderOut('destination/backend/country_list', array('objects' => Country::findAllWithPage($page, $perpage), 'current_page' => $page, 'total_page' => $total_page, 'total' => $total, 'pager' => $html->render('core/components/pagination', array('total' => $total_page, 'page' => $page)), 'start_entry' => ($page - 1) * $perpage + 1, 'end_entry' => min(array($total, $page * $perpage))), true);
$html->output('</div>');
$html->renderOut('core/backend/html_footer');
exit;
Example #3
0
  <label class='col-sm-2 control-label' for='title'>title <span style="color: rgb(185,2,0); font-weight: bold;">*</span></label>
  <div class='col-sm-10'>
    <input value='<?php 
echo htmlentities(str_replace('\'', '"', $object->isNew() ? isset($_POST['title']) ? strip_tags($_POST['title']) : '' : $object->getTitle()));
?>
' type='text' class='form-control' id='title' name='title' required />
  </div>
</div>
<div class='hr-line-dashed'></div>
  
<div class='form-group'>
  <label class='col-sm-2 control-label'>country_id <span style="color: rgb(185,2,0); font-weight: bold;">*</span></label>
  <div class='col-sm-10'>
    <select class='form-control' id='country_id' name='country_id'>
<?php 
foreach (Country::findAll() as $country) {
    ?>
      <option value='<?php 
    echo $country->getId();
    ?>
' <?php 
    echo $object->isNew() ? isset($_POST['country_id']) ? $_POST['country_id'] == $country->getId() ? 'selected="selected"' : '' : '' : ($object->getCountryId() == $country->getId() ? "selected='selected'" : "");
    ?>
><?php 
    echo $country->getName();
    ?>
</option>
<?php 
}
?>
    </select>
Example #4
0
<?php

// get youtube video url from block
$block = Block::findByName('Youtube video');
$matches = array();
preg_match('/www.youtube.com\\/embed\\/([^\\<&]+)/', $block, $matches);
if (isset($matches[1])) {
    $youtube_id = $matches[1];
} else {
    preg_match('/www.youtube.com\\/watch\\?v=([^\\<&]+)/', $block, $matches);
    $youtube_id = $matches[1];
}
$youtube_url = isset($youtube_id) ? "https://www.youtube.com/embed/{$youtube_id}" : 'https://www.youtube.com/embed/jiBxpdobg0E';
$html = new HTML();
$html->renderOut('site/components/html_header', array('title' => $settings['sitename'], 'body_class' => 'home page page-id-115 page-template-default has-toolbar'));
$html->output('<div id="page-container">');
//$html->renderOut('site/components/toptoolbar');
$html->renderOut('site/components/header');
$html->renderOut('site/components/slider', array('carousels' => Carousel::findAll()));
$html->renderOut('site/components/latest_news', array('youtube_url' => $youtube_url));
$html->renderOut('site/components/countries_block', array('title' => 'Apply for oversea study', 'countries' => Country::findAll()));
$html->renderOut('site/components/testimonial');
$html->renderOut('site/components/footer');
$html->output('</div>');
$html->renderOut('site/components/page_footer');
$html->renderOut('site/components/html_footer');