예제 #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
 public function country()
 {
     $userid = self::get_user();
     $country = new CountryList($userid);
     $countrydata = $country->currentcountry();
     while ($rowscount = $countrydata->fetch_object()) {
         $this->countrydata[] = $rowscount;
     }
     // echo "<pre>";
     // print_r($this->industrydata);exit;
 }
예제 #3
0
	Venues
</div>

	<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;
예제 #4
0
 type="text" name="stateProvinceOther" value="<?php 
        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>
예제 #5
0
/* add custom js controller */
$document = JFactory::getDocument();
$document->addScript("/media/custom_js/jobseeker/profile_edit.js");
/* Jobseeker Class */
jimport("recruitment.jobseeker.jobseeker");
$jobseeker = new Jobseeker($user->id);
$juser_result = $jobseeker->current_user();
$data = $juser_result->fetch_object();
/* IndustryList Class */
jimport("recruitment.jobseeker.industrylist");
$industrylist = new IndustryList();
$industrylist_result = $industrylist->all();
$industrylist_options = industry_options($industrylist_result, $data->industry);
/* CoutnryList Class */
jimport("recruitment.jobseeker.countrylist");
$countrylist = new CountryList();
$countrylist_result = $countrylist->all();
$countrylist_options = country_options($countrylist_result, $data->country);
function country_options($result, $current)
{
    $html = "";
    $selected = "";
    while ($row = $result->fetch_object()) {
        if ($current == $row->name) {
            $selected = "selected='selected'";
        } else {
            $selected = "";
        }
        $html .= "<option value='{$row->id}' code1='{$row->code1}' code2='{$row->code2}' {$selected}>{$row->name}</option>";
    }
    return $html;