function tpl_function_qishi_company_show($params, &$smarty)
{
    global $db, $_CFG;
    $arr = explode(',', $params['set']);
    foreach ($arr as $str) {
        $a = explode(':', $str);
        switch ($a[0]) {
            case "企业ID":
                $aset['id'] = $a[1];
                break;
            case "企业介绍长度":
                $aset['companynamelen'] = $a[1];
                break;
            case "列表名":
                $aset['listname'] = $a[1];
                break;
        }
    }
    $aset = array_map("get_smarty_request", $aset);
    $aset['id'] = $aset['id'] ? intval($aset['id']) : 0;
    $aset['listname'] = $aset['listname'] ? $aset['listname'] : "list";
    $aset['companynamelen'] = isset($aset['companynamelen']) ? intval($aset['companynamelen']) : 50;
    $wheresql .= " AND  user_status=1 ";
    $sql = "select id,uid,contents,website,logo,companyname,audit,address,map_open,map_x,map_y,map_zoom,resume_processing,nature_cn,trade_cn,scale_cn,district_cn from " . table('company_profile') . " WHERE  id='{$aset['id']}' {$wheresql} LIMIT  1";
    $profile = $db->getone($sql);
    if (empty($profile)) {
        header("HTTP/1.1 404 Not Found");
        $smarty->display("404.htm");
        exit;
    } else {
        $profile['company_url'] = url_rewrite('QS_companyshow', array('id' => $profile['id']));
        $profile['company_profile'] = htmlspecialchars_decode($profile['contents'], ENT_QUOTES);
        // 在招职位
        $profile['jobs_num'] = $db->get_total("SELECT COUNT(*) AS num FROM " . table('jobs') . " WHERE uid='{$profile['uid']}' ");
        // 感兴趣简历
        $profile['resume_num'] = $db->get_total("SELECT COUNT(*) AS num FROM " . table('company_favorites') . " WHERE company_uid='{$profile['uid']}' ");
        if ($profile['website']) {
            if (strstr($profile['website'], "http://") === false) {
                $profile['website'] = "http://" . $profile['website'];
            }
        }
        if ($profile['logo']) {
            $profile['logo'] = $_CFG['site_dir'] . "data/logo/" . $profile['logo'];
        } else {
            $profile['logo'] = $_CFG['site_dir'] . "data/logo/no_logo.gif";
        }
        $row = $db->getone("select * from " . table("members_setmeal") . " where uid = " . $profile['uid']);
        $profile['pay_user'] = $row['setmeal_id'];
        $profile['pay_setmeal_name'] = $row['setmeal_name'];
        require_once QISHI_ROOT_PATH . 'include/fun_user.php';
        $profile['loginlog'] = get_loginlog_one($profile['uid'], '1001');
    }
    $smarty->assign($aset['listname'], $profile);
}
Esempio n. 2
0
 * 版权所有: 骑士网络,并保留所有权利。
 * 网站地址: http://www.74cms.com;
 * ----------------------------------------------------------------------------
 * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
 * 使用;不允许对程序代码以任何形式任何目的的再发布。
 * ============================================================================
*/
define('IN_QISHI', true);
require_once dirname(__FILE__) . '/personal_common.php';
$smarty->assign('leftmenu', "index");
if ($act == 'index') {
    $uid = intval($_SESSION['uid']);
    $smarty->assign('title', '个人会员中心 - ' . $_CFG['site_name']);
    $smarty->assign('user', $user);
    require_once QISHI_ROOT_PATH . 'include/fun_user.php';
    $smarty->assign('loginlog', get_loginlog_one($uid, '1001'));
    $wheresql = " WHERE uid='" . $_SESSION['uid'] . "' ";
    $sql = "SELECT * FROM " . table('resume') . $wheresql;
    $smarty->assign('rand', rand(1, 100));
    $smarty->assign('points', get_user_points($uid));
    $smarty->assign('my_resume', get_resume_list($sql));
    $smarty->assign('count_resume', count_resume($uid));
    $smarty->assign('count_interview', count_interview($uid));
    $smarty->assign('count_apply', count_personal_jobs_apply($uid));
    $smarty->assign('count_attention_me', count_personal_attention_me($uid));
    $smarty->assign('msg_total1', $db->get_total("SELECT COUNT(*) AS num FROM " . table('pms') . " WHERE (msgfromuid='{$uid}' OR msgtouid='{$uid}') AND `new`='1' AND `replyuid`<>'{$uid}' AND msgtype=1"));
    $smarty->assign('msg_total2', $db->get_total("SELECT COUNT(*) AS num FROM " . table('pms') . " WHERE (msgfromuid='{$uid}' OR msgtouid='{$uid}') AND `new`='2' AND `replyuid`<>'{$uid}' AND msgtype=1"));
    //首页提示消息(最近两周 下载 和 面试邀请的信息)
    $message = array();
    $time = strtotime("- 14 day");
    $down_resume = $db->getall("SELECT distinct company_uid , company_name FROM " . table('company_down_resume') . " WHERE resume_uid='" . $_SESSION['uid'] . "' AND down_addtime > " . $time);