Ejemplo n.º 1
0
                    report_deal($_SESSION['uid'], $points_rule['apply_jobs']['type'], $points_rule['apply_jobs']['value']);
                    $user_points = get_user_points($_SESSION['uid']);
                    $operator = $points_rule['apply_jobs']['type'] == "1" ? "+" : "-";
                    write_memberslog($_SESSION['uid'], 2, 9001, $_SESSION['username'], "投递了简历,职位:{$jobs['jobs_name']},({$operator}{$points_rule['apply_jobs']['value']}),(剩余:{$user_points})", 2, 1301, "申请职位", "{$operator}{$points_rule['apply_jobs']['value']}", "{$user_points}");
                } else {
                    write_memberslog($_SESSION['uid'], 2, 1301, $_SESSION['username'], "投递了简历,职位:{$jobs['jobs_name']}");
                }
            }
            //微信
            if (intval($_CFG['weixin_apiopen']) == 1 && $weixinconfig['set_applyjobs'] == '1') {
                $user = $db->getone("select weixin_openid from " . table('members') . " where uid = {$jobs['uid']} limit 1");
                if ($user['weixin_openid'] != "") {
                    $resume_url = $_CFG['wap_domain'] . "/resume-show.php?id=" . $resumeid;
                    $template = array('touser' => $user['weixin_openid'], 'template_id' => "u_yoFifHb-ryYXMtNSlATj_Wfm1CWTKEjf8EkiM6dvY", 'url' => $resume_url, 'topcolor' => "#7B68EE", 'data' => array('first' => array('value' => urlencode(gbk_to_utf8("你收到了一份新简历,请及时登录" . $_CFG['site_name'] . "查阅")), 'color' => "#743A3A"), 'job' => array('value' => urlencode(gbk_to_utf8($jobs['jobs_name'])), 'color' => "#743A3A"), 'resuname' => array('value' => urlencode(gbk_to_utf8("--")), 'color' => "#743A3A"), 'realname' => array('value' => urlencode(gbk_to_utf8($personal_fullname)), 'color' => "#743A3A"), 'exp' => array('value' => urlencode(gbk_to_utf8($resume_basic['experience_cn'])), 'color' => "#743A3A"), 'lastjob' => array('value' => urlencode(gbk_to_utf8("--")), 'color' => "#743A3A"), 'remark' => array('value' => urlencode("\\n" . $notes), 'color' => "#743A3A")));
                    send_template_message(urldecode(json_encode($template)));
                }
            }
            exit("ok");
        } else {
            exit("err");
        }
    }
} elseif ($act == 'apply_del') {
    $yid = !empty($_POST['id']) ? $_POST['id'] : exit("请选择删除项目!");
    $n = del_jobs_apply($yid, $_SESSION['uid']);
    if (intval($n) > 0) {
        exit("ok");
    } else {
        exit("err");
    }
}
Ejemplo n.º 2
0
    $joinsql = " LEFT JOIN " . table('jobs') . " AS j ON a.jobs_id=j.id ";
    $smarty->assign('jobs_apply', get_apply_jobs($offset, $perpage, $joinsql . $wheresql));
    $smarty->assign('act', $act);
    $applyjobs_num = get_now_applyjobs_num($_SESSION['uid']);
    $smarty->assign('count_apply', array($_CFG['apply_jobs_max'], $applyjobs_num, $_CFG['apply_jobs_max'] - $applyjobs_num));
    $smarty->assign('page', $page->show(3));
    $count[0] = count_personal_jobs_apply($_SESSION['uid'], 1);
    $count[1] = count_personal_jobs_apply($_SESSION['uid'], 2);
    $count[2] = $count[0] + $count[1];
    $smarty->assign('count', $count);
    $smarty->assign('resume_list', get_auditresume_list($_SESSION['uid']));
    $smarty->display('member_personal/personal_apply_jobs.htm');
} elseif ($act == 'del_jobs_apply') {
    $yid = !empty($_REQUEST['y_id']) ? $_REQUEST['y_id'] : showmsg("你没有选择项目!", 1);
    $delete = trim($_POST['delete']);
    $delete ? !del_jobs_apply($yid, $_SESSION['uid']) ? showmsg("删除失败!", 0) : showmsg("删除成功!", 2) : '';
} elseif ($act == 'my_attention') {
    require_once QISHI_ROOT_PATH . 'include/page.class.php';
    $joinsql = " LEFT JOIN  " . table('jobs') . " AS r  ON  a.jobsid=r.id ";
    $wheresql = " WHERE a.uid='{$_SESSION['uid']}' ";
    $total_sql = "SELECT COUNT(*) AS num FROM " . table('view_jobs') . " AS a  {$wheresql} ";
    $total_val = $db->get_total($total_sql);
    $total_seven_sql = "SELECT COUNT(*) AS num FROM " . table('view_jobs') . " AS a  {$wheresql} AND addtime>" . strtotime("-7 day");
    $total_seven_val = $db->get_total($total_seven_sql);
    $total_fourteen_sql = "SELECT COUNT(*) AS num FROM " . table('view_jobs') . " AS a  {$wheresql} AND addtime>" . strtotime("-14 day");
    $total_fourteen_val = $db->get_total($total_fourteen_sql);
    $settr = intval($_GET['settr']);
    if ($settr > 0) {
        $settr_val = strtotime("-" . $settr . " day");
        $wheresql .= " AND a.addtime>" . $settr_val;
    }