Exemple #1
0
    }
    $total[0] = $db->get_total("SELECT COUNT(*) AS num FROM " . table('jobs') . "");
    $total[1] = $db->get_total("SELECT COUNT(*) AS num FROM " . table('jobs_tmp') . "");
    if ($jobtype == 2) {
        $total[2] = $db->get_total("SELECT COUNT(*) AS num FROM " . table('jobs_tmp') . " WHERE audit=1 ");
        $total[3] = $db->get_total("SELECT COUNT(*) AS num FROM " . table('jobs_tmp') . " WHERE audit=2 ");
        $total[4] = $db->get_total("SELECT COUNT(*) AS num FROM " . table('jobs_tmp') . " WHERE audit=3 ");
    }
    $jobs = get_jobs($offset, $perpage, $getsql);
    $smarty->assign('pageheader', "职位管理");
    $smarty->assign('jobs', $jobs);
    $smarty->assign('now', time());
    $smarty->assign('total', $total);
    $smarty->assign('page', $page->show(3));
    $smarty->assign('totaljob', $total_val);
    $smarty->assign('cat', get_promotion_cat(1));
    get_token();
    $smarty->display('company/admin_company_jobs.htm');
} elseif ($act == 'jobs_perform') {
    check_token();
    $yid = !empty($_REQUEST['y_id']) ? $_REQUEST['y_id'] : adminmsg("你没有选择职位!", 1);
    if (!empty($_REQUEST['delete'])) {
        check_permissions($_SESSION['admin_purview'], "jobs_del");
        $num = del_jobs($yid);
        if ($num > 0) {
            adminmsg("删除成功!共删除" . $num . "行", 2);
        } else {
            adminmsg("删除失败!", 0);
        }
    } elseif (!empty($_POST['set_audit'])) {
        check_permissions($_SESSION['admin_purview'], "jobs_audit");
Exemple #2
0
        write_log("修改推广id为" . $setsqlarr['cp_id'] . "的推广", $_SESSION['admin_name'], 3);
        $link[0]['text'] = "推广列表";
        $link[0]['href'] = "?act=list";
        adminmsg("修改成功!", 2, $link);
    }
} elseif ($act == 'promotion_del') {
    get_token();
    if ($n = del_promotion($_POST['id'])) {
        adminmsg("取消成功!共取消 {$n} 行", 2);
    } else {
        adminmsg("取消失败!", 0);
    }
} elseif ($act == 'category') {
    get_token();
    $smarty->assign('navlabel', "category");
    $smarty->assign('list', get_promotion_cat());
    $smarty->display('promotion/admin_promotion_category.htm');
} elseif ($act == 'edit_category') {
    get_token();
    $id = intval($_GET['id']);
    $smarty->assign('navlabel', "category");
    $show = get_promotion_cat_one($id);
    $smarty->assign('show', $show);
    if ($id == 5) {
        $rs = (array) json_decode($show["cp_json"]);
        var_dump($rs);
        $smarty->assign('interv', $rs);
        $smarty->display('promotion/admin_promotion_category_edit5.htm');
    } else {
        $smarty->display('promotion/admin_promotion_category_edit.htm');
    }