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


PHP Country::find_by_code方法代码示例

本文整理汇总了PHP中Country::find_by_code方法的典型用法代码示例。如果您正苦于以下问题:PHP Country::find_by_code方法的具体用法?PHP Country::find_by_code怎么用?PHP Country::find_by_code使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Country的用法示例。


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

示例1: address

 public function address()
 {
     $address = "";
     if (isset($this->address) && !empty($this->address)) {
         $address .= $this->address . ":";
     }
     if (isset($this->address2) && !empty($this->address2)) {
         $address .= $this->address2 . ":";
     }
     if (isset($this->city) && !empty($this->city)) {
         $city = City::find_by_code($this->country, $this->state_province, $this->county, $this->city);
         $address .= $city->name . ":";
     }
     //county
     if (isset($this->county) && !empty($this->county)) {
         $county = County::find_by_code($this->country, $this->state_province, $this->county);
         $address .= $county->name . ":";
     }
     //states
     if (isset($this->state_province) && !empty($this->state_province)) {
         $state_province = StateProvince::find_by_code($this->country, $this->state_province);
         $address .= $state_province->name . ":";
     }
     //post code
     if (isset($this->post_code) && !empty($this->post_code)) {
         $address .= $this->post_code . ":";
     }
     //country
     if (isset($this->country) && !empty($this->country)) {
         $country = Country::find_by_code($this->country);
         $address .= $country->name . ":";
     } else {
         return "";
     }
     return $address;
 }
开发者ID:nim94sha,项目名称:Online-Job-Portal,代码行数:36,代码来源:class.employee.php

示例2: foreach

 $i = 1;
 foreach ($type as $job_type) {
     $type_name = JobType::find_by_id($job_type->fk_job_type_id);
     $type2[$i]['name'] = $type_name->type_name;
     $type2[$i]['var_name'] = $type_name->var_name;
     $i++;
 }
 $smarty->assign('jobtype', $type2);
 $smarty->assign('var_name', $jobs->var_name);
 $smarty->assign('job_ref', $jobs->job_ref);
 $smarty->assign('job_title', $jobs->job_title);
 $smarty->assign('job_description', $jobs->job_description);
 $smarty->assign('job_postion', $jobs->job_postion);
 //locations
 //country
 $country_arry = Country::find_by_code($jobs->country);
 //$country_a($country_arry) ? $country_arry->code : $country_a;
 $country_var_name = $country_arry->var_name;
 $country_name = $country_arry->name;
 $smarty->assign('country', $country_name);
 $smarty->assign('country_url', $country_var_name);
 //states
 $state = StateProvince::find_by_code($jobs->country, $jobs->state_province);
 $state_name = empty($state) ? $jobs->state_province : $state->name;
 $state_var_name = $state ? $state->var_name : $jobs->state_province;
 $smarty->assign('state', $state_name);
 $smarty->assign('state_url', $country_var_name . "/" . $state_var_name . "/");
 //county
 $county = County::find_by_code($jobs->country, $jobs->state_province, $jobs->county);
 $county_name = empty($county) ? $jobs->county : $county->name;
 $county_var_name = $county ? $county->var_name : $jobs->county;
开发者ID:nim94sha,项目名称:Online-Job-Portal,代码行数:31,代码来源:job_page.php

示例3: join

}
$smarty->assign('li', join("<br />", $cv_cat_array));
//job states
$js = empty($cv_details->look_job_status) ? 0 : $cv_details->look_job_status;
$job_status = JobStatus::find_by_id($js);
$ljs = $job_status ? $job_status->status_name : format_lang('none');
$smarty->assign('ljs', $ljs);
//job type
$job_t = empty($cv_details->look_job_type) ? 0 : $cv_details->look_job_type;
$job_type_arr = JobType::find_by_id($job_t);
//print_r( $job_type_arr);
$job_types = $job_type_arr ? $job_type_arr->type_name : format_lang('none');
$smarty->assign('job_type', $job_types);
//where do you wont to work
//country
$country_arry = Country::find_by_code($cv_details->country);
$country_var_name = $country_arry->var_name;
$country_name = $country_arry->name;
$smarty->assign('country', $country_name);
//states
$state = StateProvince::find_by_code($cv_details->country, $cv_details->state_province);
$state_name = empty($state) ? $cv_details->state_province : $state->name;
$state_var_name = $state ? $state->var_name : $cv_details->state_province;
$smarty->assign('state', $state_name);
$smarty->assign('state_url', $country_var_name . "/" . $state_var_name . "/");
//county
$county = County::find_by_code($cv_details->country, $cv_details->state_province, $cv_details->county);
$county_name = empty($county) ? $cv_details->county : $county->name;
$county_var_name = $county ? $county->var_name : $cv_details->county;
$smarty->assign('county', $county_name);
$smarty->assign('county_url', $country_var_name . "/" . $state_var_name . "/" . $county_var_name . "/");
开发者ID:nim94sha,项目名称:Online-Job-Portal,代码行数:31,代码来源:review_cv_page.php

示例4: recommendedJob

 public static function recommendedJob($user_id = 0, $cvjob_title = null, $cvjob_title2 = null, $cvjob_city = null, $cvjob_county = null, $cvjob_state = null, $cvjob_country = null)
 {
     global $database, $db;
     $select = " SELECT job_title, city, county, state_province, country, fk_employer_id,var_name, created_at ";
     $select .= ", match( job.job_title, job.job_description ) against ('" . $cvjob_title . "' '+" . $cvjob_title2 . "' IN BOOLEAN MODE) as relevance ";
     $from = " FROM " . self::$table_name . " AS job ";
     $where = " WHERE job.id NOT IN ( SELECT job_h.fk_job_id from " . TBL_HISTORY . " as job_h WHERE job_h.fk_employee_id={$user_id}) ";
     $where .= " AND job.is_active='Y' AND job.job_status='approved' AND job.id > 0 ";
     //$where .= " AND var_name <> '".$old."' ";
     $where .= " AND match( job.job_title, job.job_description ) against ('" . $cvjob_title . "' '+" . $cvjob_title2 . "' IN BOOLEAN MODE)";
     $where .= " AND  DATE_ADD( job.created_at, INTERVAL " . JOBLASTFOR . " DAY ) > NOW() ";
     //$where .= " AND city='{$cvjob_city}' ";
     $where .= " AND county='{$cvjob_county}' ";
     $where .= " AND state_province='{$cvjob_state}'";
     $where .= " AND country='{$cvjob_country}'";
     $order = " ORDER BY relevance, created_at DESC ";
     $limit = " LIMIT 10 ";
     //SELECT job.job_title, job.city, job.county, job.state_province, job.country
     //FROM jobberland_job AS job
     //WHERE job.id NOT IN (SELECT job_h.fk_job_id from jobberland_job_history as job_h WHERE fk_employer_id = 1)
     $sql = $select . $from . $where . $order . $limit;
     //echo $sql;
     $result = $database->query($sql);
     $num_rows = $database->num_rows($result);
     if ($num_rows > 0) {
         $i = 1;
         $temp = array();
         while ($row = $database->fetch_object($result)) {
             $temp[$i]['job_title'] = $row->job_title;
             $temp[$i]['var_name'] = $row->var_name;
             $temp[$i]['created_at'] = strftime(DATE_FORMAT, strtotime($row->created_at));
             //country
             $country_arry = Country::find_by_code($row->country);
             $country_name = $country_arry->name;
             //states
             $state = StateProvince::find_by_code($row->country, $row->state_province);
             $state_name = empty($state) ? $row->state_province : $state->name;
             //county
             $county = County::find_by_code($row->country, $row->state_province, $row->county);
             $county_name = empty($county) ? $row->county : $county->name;
             //city
             $city = City::find_by_code($row->country, $row->state_province, $row->county, $row->city);
             $city_name = empty($city) ? $row->city : $city->name;
             $temp[$i]['location'] = $city_name . ", " . $county_name . ", " . $state_name . ", " . $country_name;
             $employer = Employer::find_by_id($row->fk_employer_id);
             $company_name = $employer->company_name;
             $temp[$i]['company_name'] = $company_name;
             //$temp[$i]['job_title'] = $row->job_title;
             //$temp[$i]['job_title'] = $row->job_title;
             $i++;
         }
         return $temp;
     }
     return false;
 }
开发者ID:nim94sha,项目名称:Online-Job-Portal,代码行数:55,代码来源:class.job.php

示例5: empty

$country_name = $country_arry->name;
$city = City::find_by_code($jobs->country, $jobs->state_province, $jobs->county, $jobs->city);
$city_name = empty($city) ? $jobs->city : $city->name;
$smarty->assign('apply_for', $jobs->job_title . " " . strtolower(format_lang('at')) . " " . $employer->company_name . " " . strtolower(format_lang('in')) . " " . $city_name . ", " . $country_name);
unset($employer, $city, $country_arry);
//Congratulations! You've applied for:
//IT Manager at IT Lab in London EC1A 9PT
if ($jobs) {
    $job_s = array();
    $i = 1;
    $job_suggestions = Job::apply_suggestion($jobs->job_title, $var_name);
    foreach ($job_suggestions as $job_suggestion) {
        $employer = Employer::find_by_id($job_suggestion->fk_employer_id);
        //locations
        //country
        $country_arry = Country::find_by_code($job_suggestion->country);
        $country_name = $country_arry->name;
        //states
        $state = StateProvince::find_by_code($job_suggestion->country, $job_suggestion->state_province);
        $state_name = empty($state) ? $job_suggestion->state_province : $state->name;
        //county
        $county = County::find_by_code($job_suggestion->country, $job_suggestion->state_province, $job_suggestion->county);
        $county_name = empty($county) ? $job_suggestion->county : $county->name;
        //city
        $city = City::find_by_code($job_suggestion->country, $job_suggestion->state_province, $job_suggestion->county, $job_suggestion->city);
        $city_name = empty($city) ? $job_suggestion->city : $city->name;
        //end
        $job_s[$i]['id'] = $job_suggestion->id;
        $job_s[$i]['var_name'] = $job_suggestion->var_name;
        $job_s[$i]['job_title'] = $job_suggestion->job_title;
        $job_s[$i]['company_name'] = $employer->company_name;
开发者ID:nim94sha,项目名称:Online-Job-Portal,代码行数:31,代码来源:apply_suggestion_page.php

示例6: strftime

     $employee = Employee::find_by_id($rows->fk_employee_id);
     $manage_list[$i]['id'] = $rows->id;
     $manage_list[$i]['employee_name'] = $employee->full_name();
     $manage_list[$i]['employee_id'] = $rows->fk_employee_id;
     $manage_list[$i]['cv_title'] = $rows->cv_title;
     $manage_list[$i]['look_job_title'] = $rows->look_job_title;
     $manage_list[$i]['look_job_title2'] = $rows->look_job_title2;
     $status = JobStatus::find_by_id($rows->look_job_status);
     $status_name = $status->status_name;
     $manage_list[$i]['look_job_status'] = $status_name;
     $manage_list[$i]['recent_job_title'] = $rows->recent_job_title;
     //$manage_list[$i]['city']=  $rows->city;
     $manage_list[$i]['modified_at'] = strftime(DATE_FORMAT, strtotime($rows->modified_at));
     //locations
     //country
     $country_arry = Country::find_by_code($rows->country);
     $country_var_name = $country_arry->var_name;
     $country_name = $country_arry->name;
     //states
     $state = StateProvince::find_by_code($rows->country, $rows->state_province);
     $state_name = empty($state) ? $rows->state_province : $state->name;
     //county
     $county = County::find_by_code($rows->country, $rows->state_province, $rows->county);
     $county_name = empty($county) ? $rows->county : $county->name;
     $city = City::find_by_code($rows->country, $rows->state_province, $rows->county, $rows->city);
     $city_name = empty($city) ? $rows->city : $city->name;
     //end of location
     $manage_list[$i]['city'] = $city_name . ", " . $county_name . ",<br />" . $state_name . ", " . $country_name;
     //$manage_list[$i]['city_url'] = $state_var_name."/".$county_var_name."/".$city_var_name."/";
     $i++;
 }
开发者ID:nim94sha,项目名称:Online-Job-Portal,代码行数:31,代码来源:search_result_page.php

示例7: format_lang

         $html_title = SITE_NAME . " - " . format_lang('page_title', 'BrowseBYLocation') . " - ( " . $city_name . ", " . $county_name . ", " . $state_name . ", " . $country_name . " ) ";
     }
     $smarty->assign('lang', $lang);
     $smarty->assign('message', $message);
     $smarty->assign('rendered_page', $smarty->fetch('job_location.tpl'));
     break;
     ///this is the first page
 ///this is the first page
 default:
     $job_states = Job::location_top_link();
     if ($job_states) {
         $activeLink = array();
         $i = 1;
         foreach ($job_states as $job_state) {
             //states
             $state_code = Country::find_by_code($job_state->country);
             $state_var_name = $state_code ? $state_code->var_name : $job_state->country;
             $state_name = $state_code ? $state_code->name : $job_state->country;
             $activeLink[$i]['name'] = $state_name;
             $activeLink[$i]['var_name'] = $state_var_name;
             $activeLink[$i]['url'] = "";
             $i++;
         }
         $smarty->assign('activeLink', $activeLink);
     }
     ///jobs
     $job_by_locations = Job::list_job_by_location($country_code);
     if ($job_by_locations2) {
         $location = array();
         $i = 1;
         foreach ($job_by_locations as $job_by_location) {
开发者ID:nim94sha,项目名称:Online-Job-Portal,代码行数:31,代码来源:location_page.php


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