Пример #1
0
 public function executeIndex(sfWebRequest $request)
 {
     //        $sql = "select * from country_list";
     //        $st = $this->conn->execute($sql);
     //        $result = $st->fetchAll();
     $result = CountryList::getCountries();
     $this->countries = array();
     foreach ($result as $rec) {
         $this->countries[$rec->getId()] = $rec->getCountryName();
     }
     //sort by entries
     $this->sort_by = array();
     $this->sort_by[] = "Postings Ending First";
     $this->sort_by[] = "Distance";
     $this->sort_by[] = "Age Range All";
     $this->sort_by[] = "Age Range Male";
     $this->sort_by[] = "Age Range Female";
     $this->sort_by[] = "Gender Male";
     $this->sort_by[] = "Gender Female";
     $this->post_id = $request->getParameter('id');
     $this->page = $request->getParameter('page');
     $this->sortby = $request->getParameter('sort_by');
     $this->setLayout('new_layout');
 }
Пример #2
0
	<h1>venues:</h1>
	<div class="inset">
	<?php 
$sl = new VenueList();
$limiter = array();
$limiter['stateProvince'] = $_REQUEST['stateProvince'] ? $_REQUEST['stateProvince'] : $defaultStateProvince;
$limiter['city'] = $_REQUEST['city'] ? $_REQUEST['city'] : $defaultCity;
$venuelist = $sl->get($limiter);
$splist = $sl->getStateProvinceList($defaultCountry);
$limiter['city'] = null;
$citylist = $sl->getCityList($limiter);
$spl = new StateList();
$ctl = new CountryList();
$stateList = $spl->getStates();
$countryList = $ctl->getCountries();
$clist = $sl->getCountryList();
?>
	
	<table border="0" cellspacing="1" cellpadding="0" class="edit-form">
	<tr>
		<td width="33%"><strong>Country</strong><br/>
			<select name="country" id="countries">
				<option value="">** Select Country</option>
			<?php 
foreach ($clist as $ct => $total) {
    ?>
				<option value="<?php 
    echo $ct;
    ?>
"<?php 
Пример #3
0
        if (!$selected) {
            echo $stateProvince;
        }
        ?>
"></td>
		</tr>
		<tr>
			<td><strong>Zip/Postal Code</strong><br/><input type="text" name="postalCode" value="<?php 
        echo $postalCode;
        ?>
"></td>
			<td><strong>Country</strong><br/>
			<select id="country" name="country">
			<?php 
        $sl = new CountryList();
        $countryList = $sl->getCountries();
        $selected = false;
        foreach ($countryList as $key => $co) {
            echo "<option value=\"" . $key . "\"";
            if ($country == $key) {
                $selected = true;
                echo " selected";
            }
            echo ">" . $co . "</option>\r";
        }
        ?>
			</select>
			</td>
			<td>&nbsp;</td>
		</tr>
		</table>