Beispiel #1
0
function jobs_one($id)
{
    global $db;
    $id = intval($id);
    $db->query("update " . table('jobs') . " set click=click+1 WHERE id='{$id}'  LIMIT 1");
    $db->query("update " . table('jobs_search_hot') . " set click=click+1 WHERE id='{$id}'  LIMIT 1");
    $wheresql = " WHERE id='" . $id . "'";
    $sql = "select * from " . table('jobs') . $wheresql . " LIMIT 1";
    $val = $db->getone($sql);
    if (empty($val)) {
        $sql = "select * from " . table('jobs_tmp') . $wheresql . " LIMIT 1";
        $val = $db->getone($sql);
    }
    $val['amount'] = $val['amount'] == "0" ? '若干' : $val['amount'];
    $profile = company_one($val['company_id']);
    $val['company'] = $profile;
    $val['company_url'] = wap_url_rewrite("wap-company-show", array("id" => $val['company_id']));
    $sql = "select * from " . table('jobs_contact') . " where pid='{$id}' LIMIT 1";
    $contact = $db->getone($sql);
    $val['contact'] = $contact;
    if ($val['tag']) {
        $str = $val['tag'];
        $tag_arr = explode("|", $str);
        foreach ($tag_arr as $key => $value) {
            $tag_cn = explode(",", $value);
            $value = $tag_cn[1];
            $tag_arr[$key] = $value;
        }
        $val['tag_cn'] = $tag_arr;
    }
    return $val;
}
Beispiel #2
0
function jobs_one($id)
{
    global $db;
    $id = intval($id);
    $db->query("update " . table('jobs') . " set click=click+1 WHERE id='{$id}'  LIMIT 1");
    $db->query("update " . table('jobs_search_hot') . " set click=click+1 WHERE id='{$id}'  LIMIT 1");
    $wheresql = " WHERE id='" . $id . "'";
    $sql = "select * from " . table('jobs') . $wheresql . " LIMIT 1";
    $val = $db->getone($sql);
    if (empty($val)) {
        $sql = "select * from " . table('jobs_tmp') . $wheresql . " LIMIT 1";
        $val = $db->getone($sql);
    }
    if (intval($_SESSION['uid']) > 0 && intval($_SESSION['utype']) == 2) {
        //检查该职位是否对此会员发起面试邀请,并且此会员没看
        $check_int = wap_check_interview(intval($_SESSION['uid']), $val['id']);
        if ($check_int) {
            wap_update_interview(intval($_SESSION['uid']), $val['id']);
        }
    }
    $val['amount'] = $val['amount'] == "0" ? '若干' : $val['amount'];
    $profile = company_one($val['company_id']);
    $val['company'] = $profile;
    $val['contents'] = htmlspecialchars_decode($val['contents'], ENT_QUOTES);
    $val['company_url'] = wap_url_rewrite("wap-company-show", array("id" => $val['company_id']));
    $sql = "select * from " . table('jobs_contact') . " where pid='{$id}' LIMIT 1";
    $contact = $db->getone($sql);
    $val['contact'] = $contact;
    if ($val['tag_cn']) {
        $tag_cn = explode(',', $val['tag_cn']);
        $val['tag_cn'] = $tag_cn;
    } else {
        $val['tag_cn'] = array();
    }
    return $val;
}
Beispiel #3
0
if ($_CFG['subsite_id'] > 0) {
    $wheresql .= " AND `subsite_id` = " . intval($_CFG['subsite_id']);
}
if (isset($key) && !empty($key)) {
    $key = help::addslashes_deep(trim($key));
    $wheresql .= " AND  likekey like '%{$key}%'";
}
$orderbysql = " ORDER BY `refreshtime` desc,`id` desc ";
if (!empty($wheresql)) {
    $wheresql = " WHERE " . ltrim(ltrim($wheresql), 'AND');
}
$perpage = 5;
$count = 0;
$page = empty($_GET['page']) ? 1 : intval($_GET['page']);
if ($page < 1) {
    $page = 1;
}
$start = ($page - 1) * $perpage;
$total_sql = "SELECT COUNT(*) AS num FROM {$jobstable} {$wheresql}";
$count = $db->get_total($total_sql);
$limit = " LIMIT {$start},{$perpage}";
$result = $db->query("SELECT subsite_id,id,jobname,detailed,refreshtime,comname,is_hot,contact,tel,amount,deadline,district_cn,sdistrict_cn FROM " . table('simple') . " " . $wheresql . $orderbysql . $limit);
$list = array();
while ($row = $db->fetch_array($result)) {
    $row['detailed'] = strip_tags($row['detailed']);
    $row['refreshtime_cn'] = daterange(time(), $row['refreshtime'], 'Y-m-d', "#FF3300");
    $row['simple_url'] = wap_url_rewrite("simple-job-show", array('id' => $row['id']), 1, $row['subsite_id']);
    $list[] = $row;
}
$smarty->assign('simple_jobs', $list);
$smarty->display("m/simple-job-list.html");
Beispiel #4
0
    foreach ($resume as $key => $value) {
        if ($value['display_name'] == "2") {
            $value['fullname'] = "N" . str_pad($value['id'], 7, "0", STR_PAD_LEFT);
            $value['fullname_'] = $value['fullname'];
        } elseif ($value['display_name'] == "3") {
            if ($value['sex'] == 1) {
                $value['fullname'] = cut_str($value['fullname'], 1, 0, "先生");
            } elseif ($value['sex'] == 2) {
                $value['fullname'] = cut_str($value['fullname'], 1, 0, "女士");
            }
            $value['fullname_'] = $value['fullname'];
        } else {
            $value['fullname_'] = $value['fullname'];
            $value['fullname'] = $value['fullname'];
        }
        $resume[$key]['url'] = wap_url_rewrite("resume-show", array("id" => $value["id"]));
        $resume[$key]['fullname_'] = $value['fullname_'];
        $resume[$key]['fullname'] = $value['fullname'];
        $resume[$key]['refreshtime_cn'] = daterange(time(), $value['refreshtime'], 'Y-m-d', "#FF3300");
        //检测该会员的手机认证状态
        $user_info = $db->getone("SELECT mobile_audit FROM " . table('members') . " WHERE uid=" . $value['uid']);
        $resume[$key]['mobile_audit'] = $user_info['mobile_audit'];
    }
} else {
    $resume = array();
}
$smarty->assign('resume', $resume);
$smarty->assign('pagehtml', wapmulti($count, $perpage, $page, $theurl));
//热门关键字
$sql = "select w_word,w_hot from " . table("hotword") . " order by w_hot desc limit 15 ";
$hotword_list = $db->getall($sql);
Beispiel #5
0
}
$perpage = 5;
$count = 0;
$page = empty($_GET['page']) ? 1 : intval($_GET['page']);
if ($page < 1) {
    $page = 1;
}
$theurl = "wap-jobs-list.php?district=" . $district . "&amp;sdistrict=" . $sdistrict . "&amp;trade=" . $trade . "&amp;topclass=" . $topclass . "&amp;category=" . $category . "&amp;subclass=" . $subclass . "&amp;wage=" . $wage . "&amp;key=" . $key;
$start = ($page - 1) * $perpage;
$total_sql = "SELECT COUNT(*) AS num FROM {$jobstable} {$wheresql}";
$count = $db->get_total($total_sql);
$limit = " LIMIT {$start},{$perpage}";
$idresult = $db->query("SELECT id FROM {$jobstable} " . $wheresql . $orderbysql . $limit);
while ($row = $db->fetch_array($idresult)) {
    $id[] = $row['id'];
}
if (!empty($id)) {
    $wheresql = " WHERE id IN (" . implode(',', $id) . ") ";
    $jobs = $db->getall("SELECT * FROM " . table('jobs') . $wheresql . $orderbysql);
    foreach ($jobs as $key => $value) {
        $jobs[$key]['url'] = wap_url_rewrite("wap-jobs-show", array("id" => $value['id']));
        if (!empty($value['highlight'])) {
            $jobs[$key]['jobs_name'] = "<span style=\"color:{$value['highlight']}\">{$value['jobs_name']}</span>";
        }
    }
} else {
    $jobs = array();
}
$smarty->assign('jobs', $jobs);
$smarty->assign('pagehtml', wapmulti($count, $perpage, $page, $theurl));
$smarty->display("wap/wap-jobs-list.html");
Beispiel #6
0
}
$perpage = 5;
$count = 0;
$page = empty($_GET['page']) ? 1 : intval($_GET['page']);
if ($page < 1) {
    $page = 1;
}
$theurl = "jobs-list.php?district=" . $district . "&amp;sdistrict=" . $sdistrict . "&amp;trade=" . $trade . "&amp;topclass=" . $topclass . "&amp;category=" . $category . "&amp;subclass=" . $subclass . "&amp;wage=" . $wage . "&amp;key=" . $key;
$start = ($page - 1) * $perpage;
$total_sql = "SELECT COUNT(*) AS num FROM {$jobstable} {$wheresql}";
$count = $db->get_total($total_sql);
$limit = " LIMIT {$start},{$perpage}";
$idresult = $db->query("SELECT id FROM {$jobstable} " . $wheresql . $orderbysql . $limit);
while ($row = $db->fetch_array($idresult)) {
    $id[] = $row['id'];
}
if (!empty($id)) {
    $wheresql = " WHERE id IN (" . implode(',', $id) . ") ";
    $jobs = $db->getall("SELECT * FROM " . table('jobs') . $wheresql . $orderbysql);
    foreach ($jobs as $key => $value) {
        $jobs[$key]['url'] = wap_url_rewrite("jobs-show", array("id" => $value['id']), 1, $value['subsite_id']);
        if (!empty($value['highlight'])) {
            $jobs[$key]['jobs_name'] = "<span style=\"color:{$value['highlight']}\">{$value['jobs_name']}</span>";
        }
    }
} else {
    $jobs = array();
}
$smarty->assign('jobs', $jobs);
$smarty->assign('pagehtml', wapmulti($count, $perpage, $page, $theurl));
$smarty->display("m/m-jobs-list.html");
Beispiel #7
0
	<h3><a href="' . $url . '">' . $li["jobs_name"] . '</a></h3>
	<h5>' . $li["wage_cn"] . ' ' . $li["district_cn"] . ' </h5>   
	</div>';
        }
        exit($jobslisthtml);
    } else {
        exit('-1');
    }
} elseif ($act == 'ajaxresumelist') {
    $resumelisthtml = "";
    $rows = intval($_GET['rows']);
    $offset = intval($_GET['offset']);
    $resumelistarray = $db->getall("select * from " . table('resume') . " ORDER BY `refreshtime` DESC LIMIT {$offset},{$rows}");
    if (!empty($resumelistarray) && $offset <= 100) {
        foreach ($resumelistarray as $li) {
            $url = wap_url_rewrite("wap-resume-show", array("id" => $li["id"]));
            $resumelisthtml .= '<div class="list" id="li-' . $offset . '" url="' . $url . '">
	  <span><a href="' . $url . '">' . $li["fullname"] . '(' . $li["sex_cn"] . ')</a></span><br />
学历:' . $li["education_cn"] . '  工作经验:' . $li["experience_cn"] . '<br />
' . $li["intention_jobs"] . '
	</div>';
        }
        exit($resumelisthtml);
    } else {
        exit('-1');
    }
} elseif ($act == 'jobs_contact') {
    $id = intval($_GET['id']);
    if ($id > 0) {
        $show = false;
        if ($_CFG['showjobcontact'] == '0') {
Beispiel #8
0
        foreach ($favoritesarry as $list) {
            $job_url = wap_url_rewrite("jobs-show", array("id" => $list['jobs_id']));
            $favoriteshtml .= '<article class="classifylist nomb box thisurl" url="../' . $job_url . '"><section class="title flex-box"><div class="chk chkabaout"><input type="checkbox" id[]="' . $list['did'] . '" /><label for="" class="check-box"></label></div><div class="name">' . $list['jobs_name'] . '</div><div class="status flex2"><span class="money">¥' . $list['wage_cn'] . '</span></div></section><section class="txt flex-box"><div class="chk chkabaout"></div><div class="left">' . $list['companyname'] . '</div><div class="right flex2">' . date('Y-m-d', $list['addtime']) . '</div></section></article>';
        }
        exit($favoriteshtml);
    } else {
        exit('-1');
    }
} elseif ($act == "ajax_apply_list") {
    $favoriteshtml = "";
    $rows = intval($_GET['rows']);
    $offset = intval($_GET['offset']);
    $favoritesarry = $db->getall("select a.*,j.wage_cn from " . table("personal_jobs_apply") . " as a left join " . table("jobs") . " as j on a.jobs_id=j.id where a.personal_uid={$_SESSION['uid']}  order by a.apply_addtime desc limit {$offset},{$rows}");
    if (!empty($favoritesarry) && $offset <= 100) {
        foreach ($favoritesarry as $list) {
            $job_url = wap_url_rewrite("jobs-show", array("id" => $list['jobs_id']));
            //答复状态
            if ($list['personal_look'] == '1') {
                $list['reply_status'] = "企业未查看";
            } else {
                if ($list['is_reply'] == '0') {
                    $list['reply_status'] = "待反馈";
                } elseif ($list['is_reply'] == '1') {
                    $list['reply_status'] = "合格";
                } elseif ($list['is_reply'] == '2') {
                    $list['reply_status'] = "不合格";
                } elseif ($list['is_reply'] == '3') {
                    $list['reply_status'] = "待定";
                } elseif ($list['is_reply'] == '4') {
                    $list['reply_status'] = "未接通";
                }
Beispiel #9
0
<?php

/*
 * 74cms WAP
 * ============================================================================
 * 版权所有: 骑士网络,并保留所有权利。
 * 网站地址: http://www.74cms.com;
 * ----------------------------------------------------------------------------
 * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
 * 使用;不允许对程序代码以任何形式任何目的的再发布。
 * ============================================================================
*/
define('IN_QISHI', true);
require_once dirname(__FILE__) . '/../include/common.inc.php';
require_once QISHI_ROOT_PATH . 'include/fun_wap.php';
require_once QISHI_ROOT_PATH . 'include/mysql.class.php';
$smarty->cache = false;
$db = new mysql($dbhost, $dbuser, $dbpass, $dbname);
$emergency_jobs = $db->getall("SELECT * FROM " . table('jobs') . " WHERE `emergency`=1 ORDER BY `refreshtime` DESC LIMIT 5");
foreach ($emergency_jobs as $key => $value) {
    $emergency_jobs[$key]['url'] = wap_url_rewrite("wap-jobs-show", array("id" => $value["id"]));
}
$smarty->assign('emergency_jobs', $emergency_jobs);
$smarty->display("wap/wap.html");
Beispiel #10
0
     $wheresql = " WHERE map_x!='' AND map_y!='' ";
 }
 $idresult = $db->query("SELECT id , ROUND(6378.138*2*ASIN(SQRT(POW(SIN((" . $lat . "*PI()/180-map_y*PI()/180)/2),2)+COS(" . $lat . "*PI()/180)*COS(map_y*PI()/180)*POW(SIN((" . $lng . "*PI()/180-map_x*PI()/180)/2),2)))*1000) AS juli FROM {$jobstable} {$wheresql} ORDER BY juli ASC   LIMIT {$offset},{$rows}");
 while ($row = $db->fetch_array($idresult)) {
     $id[] = $row['id'];
 }
 if (!empty($id)) {
     $wheresql = " WHERE id IN (" . implode(',', $id) . ") ";
     $sql = "SELECT *, ROUND(6378.138*2*ASIN(SQRT(POW(SIN((" . $lat . "*PI()/180-map_y*PI()/180)/2),2)+COS(" . $lat . "*PI()/180)*COS(map_y*PI()/180)*POW(SIN((" . $lng . "*PI()/180-map_x*PI()/180)/2),2)))*1000) AS juli FROM " . table('jobs') . $wheresql . "  ORDER BY juli ASC , stick DESC , refreshtime DESC ";
     $jobs_list = $db->getall($sql);
 } else {
     $jobs_list = array();
 }
 if (!empty($jobs_list) && $offset <= 100) {
     foreach ($jobs_list as $key => $li) {
         $url = wap_url_rewrite("jobs-show", array("id" => $li['id']), 1, $li['subsite_id']);
         $jobslisthtml .= '<section class="jobs-item thisurl" url="' . $url . '">';
         $ding = '';
         if ($li['stick'] == "1") {
             $ding = '<span class="job-ding"></span><h3><a href="' . $url . '">' . $li["jobs_name"] . '</a>';
         } else {
             $ding = '<h3><a href="' . $url . '">' . $li["jobs_name"] . '</a>';
         }
         $emergency = '';
         if ($li['emergency'] == "1") {
             $emergency = '<i class="ji-icon">急</i>';
         }
         $recommend = '';
         if ($li['recommend'] == "1") {
             $recommend = '<i class="jian-icon">荐</i>';
         }
Beispiel #11
0
if ($page < 1) {
    $page = 1;
}
$start = ($page - 1) * $perpage;
$wheresql = '';
if ($_CFG['subsite_id'] > 0) {
    $wheresql .= " WHERE `subsite_id` = " . intval($_CFG['subsite_id']) . ' ';
}
$total_sql = "SELECT COUNT(*) AS num FROM {$jobstable} " . $wheresql . $orderbysql;
$count = $db->get_total($total_sql);
$limit = " LIMIT {$start},{$perpage}";
$idresult = $db->query("SELECT * FROM {$jobstable} " . $wheresql . $orderbysql . $limit);
$jobfairs = array();
$time = time();
while ($row = $db->fetch_array($idresult)) {
    $row['url'] = wap_url_rewrite("jobfair-show", array("id" => $row['id']), 1, $row['subsite_id']);
    //状态
    if ($row['predetermined_status'] == "1" && $row['predetermined_start'] > $time) {
        $row['predetermined_ok'] = 1;
        // 未开始
    } else {
        if ($row['predetermined_status'] == "1" && $row['holddate_start'] > $time && ($row['predetermined_end'] == "0" || $row['predetermined_end'] > $time) && ($row['predetermined_web'] == "1" || $row['predetermined_tel'] == "1")) {
            $row['predetermined_ok'] = 2;
            // 预定中
        } else {
            $row['predetermined_ok'] = 0;
            // 已结束
        }
    }
    $jobfairs[] = $row;
}
Beispiel #12
0
$smarty->cache = false;
$db = new mysql($dbhost, $dbuser, $dbpass, $dbname);
$page = empty($_GET['page']) ? 1 : intval($_GET['page']);
$jobstable = table('article');
$orderbysql = " ORDER BY `id` desc";
$perpage = 5;
$count = 0;
$page = empty($_GET['page']) ? 1 : intval($_GET['page']);
if ($page < 1) {
    $page = 1;
}
$theurl = "wap-news-list.php";
$start = ($page - 1) * $perpage;
$total_sql = "SELECT COUNT(*) AS num FROM {$jobstable} ";
$count = $db->get_total($total_sql);
$limit = " LIMIT {$start},{$perpage}";
$idresult = $db->query("SELECT id FROM {$jobstable} " . $orderbysql . $limit);
while ($row = $db->fetch_array($idresult)) {
    $id[] = $row['id'];
}
if (!empty($id)) {
    $wheresql = " WHERE id IN (" . implode(',', $id) . ") ";
    $article = $db->getall("SELECT * FROM " . table('article') . $wheresql . $orderbysql);
    foreach ($article as $key => $value) {
        $article[$key]['url'] = wap_url_rewrite("wap-news-show", array("id" => $value['id']));
    }
} else {
    $article = array();
}
$smarty->assign('article', $article);
$smarty->display("wap/wap-news-list.html");
Beispiel #13
0
require_once dirname(__FILE__) . '/weixin_share.php';
$key = empty($_GET['key']) ? "" : $_GET['key'];
$jobstable = table('simple');
if (isset($key) && !empty($key)) {
    $key = help::addslashes_deep(trim($key));
    $wheresql .= " AND  likekey like '%{$key}%'";
}
$orderbysql = " ORDER BY `refreshtime` desc,`id` desc ";
if (!empty($wheresql)) {
    $wheresql = " WHERE " . ltrim(ltrim($wheresql), 'AND');
}
$perpage = 5;
$count = 0;
$page = empty($_GET['page']) ? 1 : intval($_GET['page']);
if ($page < 1) {
    $page = 1;
}
$start = ($page - 1) * $perpage;
$total_sql = "SELECT COUNT(*) AS num FROM {$jobstable} {$wheresql}";
$count = $db->get_total($total_sql);
$limit = " LIMIT {$start},{$perpage}";
$result = $db->query("SELECT id,jobname,detailed,refreshtime,comname,is_hot,contact,tel,amount,deadline,district_cn,sdistrict_cn FROM " . table('simple') . " " . $wheresql . $orderbysql . $limit);
$list = array();
while ($row = $db->fetch_array($result)) {
    $row['detailed'] = strip_tags($row['detailed']);
    $row['refreshtime_cn'] = daterange(time(), $row['refreshtime'], 'Y-m-d', "#FF3300");
    $row['simple_url'] = wap_url_rewrite("simple-job-show", array('id' => $row['id']));
    $list[] = $row;
}
$smarty->assign('simple_jobs', $list);
$smarty->display("m/simple-job-list.html");
Beispiel #14
0
$orderbysql = " ORDER BY `addtime` desc";
$perpage = 5;
$count = 0;
$page = empty($_GET['page']) ? 1 : intval($_GET['page']);
if ($page < 1) {
    $page = 1;
}
$start = ($page - 1) * $perpage;
$total_sql = "SELECT COUNT(*) AS num FROM {$jobstable} " . $orderbysql;
$count = $db->get_total($total_sql);
$limit = " LIMIT {$start},{$perpage}";
$idresult = $db->query("SELECT * FROM {$jobstable} " . $orderbysql . $limit);
$jobfairs = array();
$time = time();
while ($row = $db->fetch_array($idresult)) {
    $row['url'] = wap_url_rewrite("jobfair-show", array("id" => $row['id']));
    //状态
    if ($row['predetermined_status'] == "1" && $row['predetermined_start'] > $time) {
        $row['predetermined_ok'] = 1;
        // 未开始
    } else {
        if ($row['predetermined_status'] == "1" && $row['holddate_start'] > $time && ($row['predetermined_end'] == "0" || $row['predetermined_end'] > $time) && ($row['predetermined_web'] == "1" || $row['predetermined_tel'] == "1")) {
            $row['predetermined_ok'] = 2;
            // 预定中
        } else {
            $row['predetermined_ok'] = 0;
            // 已结束
        }
    }
    $jobfairs[] = $row;
}
Beispiel #15
0
    $wheresql = " WHERE id IN (" . implode(',', $id) . ") AND display=1 AND audit=1 ";
    $resume = $db->getall("SELECT * FROM " . table('resume') . $wheresql . $orderbysql);
    foreach ($resume as $key => $value) {
        if ($value['display_name'] == "2") {
            $value['fullname'] = "N" . str_pad($value['id'], 7, "0", STR_PAD_LEFT);
            $value['fullname_'] = $value['fullname'];
        } elseif ($value['display_name'] == "3") {
            if ($value['sex'] == 1) {
                $value['fullname'] = cut_str($value['fullname'], 1, 0, "先生");
            } elseif ($value['sex'] == 2) {
                $value['fullname'] = cut_str($value['fullname'], 1, 0, "女士");
            }
            $value['fullname_'] = $value['fullname'];
        } else {
            $value['fullname_'] = $value['fullname'];
            $value['fullname'] = $value['fullname'];
        }
        $resume[$key]['url'] = wap_url_rewrite("resume-show", array("id" => $value["id"]), 1, $value['subsite_id']);
        $resume[$key]['fullname_'] = $value['fullname_'];
        $resume[$key]['fullname'] = $value['fullname'];
        $resume[$key]['refreshtime_cn'] = daterange(time(), $value['refreshtime'], 'Y-m-d', "#FF3300");
        //检测该会员的手机认证状态
        $user_info = $db->getone("SELECT mobile_audit FROM " . table('members') . " WHERE uid=" . $value['uid']);
        $resume[$key]['mobile_audit'] = $user_info['mobile_audit'];
    }
} else {
    $resume = array();
}
$smarty->assign('resume', $resume);
$smarty->assign('pagehtml', wapmulti($count, $perpage, $page, $theurl));
$smarty->display("m/m-resume-list.html");
Beispiel #16
0
     $wheresql = " WHERE map_x!='' AND map_y!='' ";
 }
 $idresult = $db->query("SELECT id , ROUND(6378.138*2*ASIN(SQRT(POW(SIN((" . $lat . "*PI()/180-map_y*PI()/180)/2),2)+COS(" . $lat . "*PI()/180)*COS(map_y*PI()/180)*POW(SIN((" . $lng . "*PI()/180-map_x*PI()/180)/2),2)))*1000) AS juli FROM {$jobstable} {$wheresql} ORDER BY juli ASC   LIMIT {$offset},{$rows}");
 while ($row = $db->fetch_array($idresult)) {
     $id[] = $row['id'];
 }
 if (!empty($id)) {
     $wheresql = " WHERE id IN (" . implode(',', $id) . ") ";
     $sql = "SELECT *, ROUND(6378.138*2*ASIN(SQRT(POW(SIN((" . $lat . "*PI()/180-map_y*PI()/180)/2),2)+COS(" . $lat . "*PI()/180)*COS(map_y*PI()/180)*POW(SIN((" . $lng . "*PI()/180-map_x*PI()/180)/2),2)))*1000) AS juli FROM " . table('jobs') . $wheresql . "  ORDER BY juli ASC , stick DESC , refreshtime DESC ";
     $jobs_list = $db->getall($sql);
 } else {
     $jobs_list = array();
 }
 if (!empty($jobs_list) && $offset <= 100) {
     foreach ($jobs_list as $key => $li) {
         $url = wap_url_rewrite("jobs-show", array("id" => $li['id']));
         $jobslisthtml .= '<section class="jobs-item thisurl" url="' . $url . '">';
         $ding = '';
         if ($li['stick'] == "1") {
             $ding = '<span class="job-ding"></span><h3><a href="' . $url . '">' . $li["jobs_name"] . '</a>';
         } else {
             $ding = '<h3><a href="' . $url . '">' . $li["jobs_name"] . '</a>';
         }
         $emergency = '';
         if ($li['emergency'] == "1") {
             $emergency = '<i class="ji-icon">急</i>';
         }
         $recommend = '';
         if ($li['recommend'] == "1") {
             $recommend = '<i class="jian-icon">荐</i>';
         }
Beispiel #17
0
}
$perpage = 5;
$count = 0;
$page = empty($_GET['page']) ? 1 : intval($_GET['page']);
if ($page < 1) {
    $page = 1;
}
$theurl = "news-list.php";
$start = ($page - 1) * $perpage;
$total_sql = "SELECT COUNT(*) AS num FROM {$jobstable} " . $wheresql . $orderbysql;
$count = $db->get_total($total_sql);
$limit = " LIMIT {$start},{$perpage}";
$idresult = $db->query("SELECT * FROM {$jobstable} " . $wheresql . $orderbysql . $limit);
$article = array();
while ($row = $db->fetch_array($idresult)) {
    $row['url'] = wap_url_rewrite("news-show", array("id" => $row['id']));
    $row['addtime'] = daterange(time(), $row['addtime'], 'Y-m-d', "#FF3300");
    $row['bimg'] = $_CFG['upfiles_dir'] . $row['Small_img'];
    $row['content'] = strip_tags($row['content']);
    $row['content'] = cut_str($row['content'], 100, 0, "...");
    $article[] = $row;
}
$smarty->assign('article', $article);
//新闻资讯分类
if ($type > 0) {
    $category_first = $db->getone("SELECT id,parentid,categoryname FROM " . table('article_category') . " where id=" . $type);
    $category_more = $db->getall("SELECT id,parentid,categoryname FROM " . table('article_category') . " where parentid!=0 and id!=" . $type . " ORDER BY  id asc");
} else {
    $category = $db->getall("SELECT id,parentid,categoryname FROM " . table('article_category') . " where parentid!=0 ORDER BY  id asc");
    $category_first = $category[0];
    for ($i = 1; $i < count($category); $i++) {
Beispiel #18
0
function wap_get_my_attention($offset, $perpage, $get_sql = '')
{
    global $db;
    $limit = " LIMIT {$offset},{$perpage}";
    $selectstr = " a.*,r.subsite_id,r.uid as ruid,r.fullname,r.display_name,r.sex_cn,r.sex,r.education_cn,r.experience_cn,r.intention_jobs,r.district_cn,r.wage_cn,r.trade_cn,r.nature_cn,r.major_cn,r.birthdate,r.refreshtime";
    $result = $db->query("SELECT {$selectstr} FROM " . table('view_resume') . " as a {$get_sql} ORDER BY a.id DESC {$limit}");
    while ($row = $db->fetch_array($result)) {
        $row['resume_url'] = wap_url_rewrite("resume-show", array('id' => $row['resumeid']), 1, $row['subsite_id']);
        if ($row['display_name'] == "3") {
            if ($row['sex'] == 1) {
                $row['fullname'] = cut_str($row['fullname'], 1, 0, "先生");
            } elseif ($row['sex'] == 2) {
                $row['fullname'] = cut_str($row['fullname'], 1, 0, "女士");
            }
        } elseif ($row['display_name'] == "2") {
            $row['fullname'] = "N" . str_pad($row['resumeid'], 7, "0", STR_PAD_LEFT);
        }
        //判断是否收藏过
        if (check_favorites($row['resumeid'], $_SESSION['uid'])) {
            $row['is_favorites'] = 1;
        }
        $y = date("Y");
        $row['age'] = $y - $row['birthdate'];
        $row['addtime'] = date('Y-m-d', $row['addtime']);
        /*
        	获取简历标记
        */
        $row_state = get_resume_state($_SESSION['uid'], $row['resumeid']);
        $row['resume_state'] = $row_state['resume_state'];
        $row['resume_state_cn'] = $row_state['resume_state_cn'];
        $row_arr[] = $row;
    }
    return $row_arr;
}
Beispiel #19
0
require_once dirname(__FILE__) . '/weixin_share.php';
$key = empty($_GET['key']) ? "" : $_GET['key'];
$jobstable = table('simple_resume');
if (isset($key) && !empty($key)) {
    $key = help::addslashes_deep(trim($key));
    $wheresql .= " AND  likekey like '%{$key}%'";
}
$orderbysql = " ORDER BY `refreshtime` desc,`id` desc ";
if (!empty($wheresql)) {
    $wheresql = " WHERE " . ltrim(ltrim($wheresql), 'AND');
}
$perpage = 5;
$count = 0;
$page = empty($_GET['page']) ? 1 : intval($_GET['page']);
if ($page < 1) {
    $page = 1;
}
$start = ($page - 1) * $perpage;
$total_sql = "SELECT COUNT(*) AS num FROM {$jobstable} {$wheresql}";
$count = $db->get_total($total_sql);
$limit = " LIMIT {$start},{$perpage}";
$result = $db->query("SELECT * FROM " . table('simple_resume') . " " . $wheresql . $orderbysql . $limit);
$list = array();
while ($row = $db->fetch_array($result)) {
    $row['detailed'] = strip_tags($row['detailed']);
    $row['refreshtime_cn'] = daterange(time(), $row['refreshtime'], 'Y-m-d', "#FF3300");
    $row['simple_resume_url'] = wap_url_rewrite("simple-resume-show", array('id' => $row['id']));
    $list[] = $row;
}
$smarty->assign('simple_resume', $list);
$smarty->display("m/simple-resume-list.html");