<?php
/**
* SF后端开发者招聘函数
*
* @
param array $conditions 条件列表
* @
return integer 分数
*/
function wanted_developer(array $conditions) {
$score = 0;
foreach ($conditions as $key => $condition) {
switch ($key) {
case 'skills':
foreach ($condition as $name => $rank) {
switch ($name) {
case 'linux':
case 'nginx':
case 'apache':
$score += $rank * 1;
break;
case 'html':
case 'php':
case 'java':
case 'mysql':
$score += $rank * 2;
break;
case 'c/c++':
case 'redis':
case 'scala':
case 'nodejs':
case 'mongodb':
$score += $rank * 3;
break;
case 'dota':
case 'dota2':
$score += $rank * 4;
break;
case 'lol':
$score += $rank * 0;
break;
default:
break;
}
}
break;
case 'networks':
foreach ($condition as $name) {
switch ($name) {
case 'weibo':
case 'qq':
case 'weixin':
case 'douban':
$score += 1;
break;
case 'v2ex':
case 'zhihu':
case 'github':
case 'gmail':
case 'facebook':
case 'twitter':
case 'wordpress':
$score += 2;
break;
case 'aws':
case 'gae':
case 'openshift':
case 'linode':
case 'azure':
$score += 3;
break;
case 'cl':
case 'segmentfault':
case 'typecho':
$score += 4;
break;
default:
break;
}
}
break;
case 'softwares':
foreach ($condition as $name) {
switch ($name) {
case 'linux':
case 'macosx':
case 'git':
case 'chrome':
case 'firefox':
case 'opera':
$score += 1;
break;
case 'vim':
case 'emacs':
case 'sublime':
$score += 2;
break;
case 'brew':
case 'vagrant':
case 'shadowsocks':
$score += 3;
break;
case 'ie':
$score -= 1;
break;
case 'windows':
$score += 0;
break;
default:
break;
}
}
break;
case 'equipments':
foreach ($condition as $name) {
switch ($name) {
case 'mac':
case 'chromebook':
case 'iphone':
case 'nexus':
$score += 1;
break;
case 'hhkb':
case 'cherry':
case 'filco':
case 'kindle':
$score += 2;
break;
case 'miwifi':
case 'g-glass':
case 'raspberry-pi':
case 'leap-motion':
$score += 3;
break;
default:
break;
}
}
break;
default:
break;
}
}
return $score;
}
/**
* SF后端开发者薪资计算
*
* @
param intger $yourscore 得分
* @
return integer 月薪
*/
function salaryband($score) {
//RMB元
$salary = 0;
switch ($score){
case $score >= 70 && $score <= 75:
$salary = 5000;
break;
case $score > 75 && $score <= 80:
$salary = 10000;
break;
case $score > 80 && $score <= 90:
$salary = 15000;
break;
case $score > 90 && $score <= 100:
$salary = 20000;
break;
default:
break;
}
return $salary;
}
$yourscore = wanted_developer($your_conditions);
$yoursalary = salaryband($yourscore);
if ($yourscore > 70 && $expectedsalary = $yoursalary) {
mail('
[email protected]', '0day', $your_resume);
}