本文整理汇总了PHP中Country::getCountryFrom方法的典型用法代码示例。如果您正苦于以下问题:PHP Country::getCountryFrom方法的具体用法?PHP Country::getCountryFrom怎么用?PHP Country::getCountryFrom使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Country
的用法示例。
在下文中一共展示了Country::getCountryFrom方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$resume_data['resume']['work_experiences']['work_experience'][$i]['from'] = $experience['from'];
$resume_data['resume']['work_experiences']['work_experience'][$i]['to'] = $experience['to'];
$resume_data['resume']['work_experiences']['work_experience'][$i]['place'] = $experience['place'];
$resume_data['resume']['work_experiences']['work_experience'][$i]['role'] = $experience['role'];
$resume_data['resume']['work_experiences']['work_experience'][$i]['work_summary'] = $experience['work_summary'];
$i++;
}
}
$resume_data['resume']['educations'] = array();
if (count($educations) > 0) {
$i = 0;
foreach ($educations as $education) {
$resume_data['resume']['educations']['education'][$i]['qualification'] = $education['qualification'];
$resume_data['resume']['educations']['education'][$i]['completion_year'] = $education['completed_on'];
$resume_data['resume']['educations']['education'][$i]['institution'] = $education['institution'];
$resume_data['resume']['educations']['education'][$i]['country'] = Country::getCountryFrom($education['country']);
$i++;
}
}
$resume_data['resume']['skills'] = '';
if (!is_null($skills[0]['skill']) && !empty($skills[0]['skill'])) {
$resume_data['resume']['skills'] = $skills[0]['skill'];
}
$resume_data['resume']['technical_skills'] = array();
if (count($technical_skills) > 0) {
$i = 0;
$levels = array('A' => 'Beginner', 'B' => 'Intermediate', 'C' => 'Advanced');
foreach ($technical_skills as $technical_skill) {
$resume_data['resume']['technical_skills']['technical_skill'][$i]['tech_skill'] = $technical_skill['technical_skill'];
$resume_data['resume']['technical_skills']['technical_skill'][$i]['level'] = $levels[$technical_skill['level']];
$i++;
示例2: show
public function show()
{
$this->begin();
$this->top_search('Home');
$this->menu('member', 'home');
$this->howitworks();
$country = $this->member->getCountry();
$currency = Currency::getSymbolFromCountryCode($country);
$completeness_raw = $this->get_completeness();
$completeness_percent = 0;
$next_step = '';
$total = 0;
foreach ($completeness_raw as $key => $value) {
$total += $value;
$completeness_percent = $total / count($completeness_raw) * 100;
if ($completeness_percent < 100 && empty($next_step)) {
switch ($key) {
case 'seeking':
$next_step = 'Fill in Current Job Responsibilities / Experiences.';
break;
case 'current_salary':
$next_step = 'Fill in Current Salary range.';
break;
case 'expected_salary':
$next_step = 'Fill in Expected Salary range.';
break;
case 'preferred_job_location':
$next_step = 'Select your preferred job locations.';
break;
case 'can_travel_relocate':
$next_step = 'Fill in Willing to travel / relocate.';
break;
case 'reason_for_leaving':
$next_step = 'Fill in Reason for Leaving.';
break;
case 'notice_period':
$next_step = 'Fill in Notice Period.';
break;
case 'has_job_profiles':
$next_step = 'Add a Present & Past Position.';
break;
}
}
}
if ($completeness_percent >= 100) {
$next_step = 'Career Profile is complete.';
}
$answers = $this->get_answers();
$is_active = $answers['is_active_seeking_job'] == '1' ? true : false;
$job_profiles = $this->get_job_profiles();
$page = file_get_contents(dirname(__FILE__) . '/../../../html/member_home_page.html');
$page = str_replace('%root%', $this->url_root, $page);
$page = str_replace('%country_code%', $country, $page);
$page = str_replace('%country%', Country::getCountryFrom($country), $page);
$page = str_replace('%currency%', $currency, $page);
if (isset($_SESSION['yel']['member']['linkedin_id'])) {
if (!empty($_SESSION['yel']['member']['linkedin_id'])) {
$page = str_replace('%linkedin_copy_display%', 'block', $page);
} else {
$page = str_replace('%linkedin_copy_display%', 'none', $page);
}
} else {
$page = str_replace('%linkedin_copy_display%', 'none', $page);
}
// if (!empty($this->error_message)) {
// $page = str_replace('%error_message%', $this->error_message, $page);
// } else {
// $page = str_replace('%error_message%', '', $page);
// }
// completeness
$progress_percent = $completeness_percent;
if ($completeness_percent >= 100) {
// this is to make sure the progress bar does not touch the right edge
$progress_percent -= 1;
}
$page = str_replace('%completeness_percent%', $progress_percent, $page);
$page = str_replace('%lbl_completeness_percent%', $completeness_percent, $page);
$page = str_replace('%next_step%', $next_step, $page);
// photo
$photo_html = '<div style="text-align: center; margin: auto;">Max resolution: 200x220 pixels<br/>Max size: 150KB</div>';
if ($this->member->hasPhoto()) {
$photo_html = '<img id="photo_image" class="photo_image" src="candidate_photo.php?id=' . $this->member->getId() . '" />';
}
$page = str_replace('%photo_html%', $photo_html, $page);
// resumes
$resumes = $this->get_resumes();
$page = str_replace('%member_email%', $this->member->getId(), $page);
if (empty($resumes)) {
$page = str_replace('%no_resumes%', 'block', $page);
$page = str_replace('%resumes_table%', '', $page);
} else {
$page = str_replace('%no_resumes%', 'none', $page);
$resumes_table = new HTMLTable('resumes_table', 'resumes');
$resumes_table->set(0, 0, "Updated On", '', 'header');
$resumes_table->set(0, 1, "File Name", '', 'header');
$resumes_table->set(0, 2, " ", '', 'header actions');
foreach ($resumes as $i => $resume) {
$resumes_table->set($i + 1, 0, $resume['formatted_modified_on'], '', 'cell');
$resumes_table->set($i + 1, 1, '<a href="resume.php?id=' . $resume['id'] . '">' . $resume['file_name'] . '</a>', '', 'cell');
$resumes_table->set($i + 1, 2, '<a class="no_link" onClick="update_resume(' . $resume['id'] . ');">Update</a>', '', 'cell actions');
//.........这里部分代码省略.........
示例3: show_educations
function show_educations($_educations)
{
$this->SetTextColor(0);
if (count($_educations) <= 0) {
$this->SetFont('Times', '', 10);
$this->Cell(0, 5, 'No education recorded', 0, 1, 'C');
$this->Ln();
} else {
foreach ($_educations as $education) {
$this->SetFont('Times', 'B', 10);
$this->Cell(75, 5, 'Qualification:', 0, 0, 'R');
$this->SetFont('Times', '', 10);
$this->Cell(0, 5, $education['qualification'], 0, 1, 'L');
$this->SetFont('Times', 'B', 10);
$this->Cell(75, 5, 'Completion Year:', 0, 0, 'R');
$this->SetFont('Times', '', 10);
$this->Cell(0, 5, $education['completed_on'], 0, 1, 'L');
$this->SetFont('Times', 'B', 10);
$this->Cell(75, 5, 'Institution:', 0, 0, 'R');
$this->SetFont('Times', '', 10);
$this->Cell(0, 5, $education['institution'], 0, 1, 'L');
$this->SetFont('Times', 'B', 10);
$this->Cell(75, 5, 'Country:', 0, 0, 'R');
$this->SetFont('Times', '', 10);
$this->Cell(0, 5, Country::getCountryFrom($education['country']), 0, 1, 'L');
$this->Ln();
}
}
}
示例4: Employee
$is_test_site = true;
break;
}
}
// send an email to consultant about the job is being assigned
$employee = new Employee($_POST['employee']);
$employer = new Employer($_POST['employer']);
$lines = file(dirname(__FILE__) . '/../private/mail/employee_job_assignment.txt');
$message = '';
foreach ($lines as $line) {
$message .= $line;
}
$message = str_replace('%job_id%', $job->getId(), $message);
$message = str_replace('%job%', $_POST['title'], $message);
$message = str_replace('%employer%', $employer->getName(), $message);
$message = str_replace('%country%', Country::getCountryFrom($_POST['country']), $message);
$message = str_replace('%is_exec%', $_POST['is_executive'] == '1' ? 'Yes' : 'No', $message);
$message = str_replace('%expiry%', $job->getExpiryDate(), $message);
$subject = $_POST['title'] . ' position has been assigned to you';
$headers = 'From: YellowElevator.com <admin@yellowelevator.com>' . "\n";
mail($employee->getEmailAddress(), $subject, $body, $headers);
// $handle = fopen('/tmp/email_to_'. $employee->getEmailAddress(). '.txt', 'w');
// fwrite($handle, 'Subject: '. $subject. "\n\n");
// fwrite($handle, $body);
// fclose($handle);
// Tweet about this job, if it is new
if ($new_id > 0 && !$is_test_site) {
$employer = htmlspecialchars_decode(stripslashes($employer->getName()));
$url = $GLOBALS['protocol'] . '://' . $GLOBALS['root'] . '/job/' . $new_id;
$status = $data['title'] . ' (' . $employer . ') - ' . $url;
$twitter_username = 'yellowelevator';
示例5:
<td class="field"><?php
echo $education['completed_on'];
?>
</td>
</tr>
<tr>
<td class="label">Institution:</td>
<td class="field"><?php
echo $education['institution'];
?>
</td>
</tr>
<tr>
<td class="label">Country:</td>
<td class="field"><?php
echo Country::getCountryFrom($education['country']);
?>
</td>
</tr>
<?php
if ($i < count($educations) - 1) {
?>
<tr>
<td colspan="2" class="separator"></td>
</tr>
<?php
}
$i++;
}
?>
</table>
示例6: dirname
require_once dirname(__FILE__) . "/private/lib/recaptchalib.php";
session_start();
$_SESSION['yel']['feedback']['firstname'] = $_POST['firstname'];
$_SESSION['yel']['feedback']['lastname'] = $_POST['lastname'];
$_SESSION['yel']['feedback']['email_addr'] = $_POST['email_addr'];
$_SESSION['yel']['feedback']['country'] = $_POST['country'];
$_SESSION['yel']['feedback']['feedback'] = $_POST['feedback'];
// verify captcha first
$privatekey = '6LdwqsASAAAAAEJESjRalI-y5sjko4b82nMLC5mH';
$resp = recaptcha_check_answer($privatekey, 'yellowelevator.com', $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);
if (!$resp->is_valid) {
redirect_to('feedback.php?error=1');
}
if (!isset($_POST['email_addr']) || !isset($_POST['country']) || !isset($_POST['firstname']) || !isset($_POST['lastname']) || !isset($_POST['feedback'])) {
redirect_to('feedback.php?error=2');
}
$fullname = desanitize($_SESSION['yel']['feedback']['firstname'] . ', ' . $_SESSION['yel']['feedback']['lastname']);
$country = Country::getCountryFrom($_SESSION['yel']['feedback']['country']);
// Send email to feedback@yellowelevator.com
$mail_lines = file('private/mail/feedback.txt');
$message = '';
foreach ($mail_lines as $line) {
$message .= $line;
}
$message = str_replace('%name%', $fullname, $message);
$message = str_replace('%country%', $country, $message);
$message = str_replace('%feedback%', $_SESSION['yel']['feedback']['feedback'], $message);
$subject = "Feedback from " . $fullname;
$headers = 'From: ' . $_SESSION['yel']['feedback']['email_addr'] . "\n";
mail('feedback@yellowelevator.com', $subject, $message, $headers);
redirect_to('feedback.php?success=1');