<?php $status = ""; include_once '../functions/database.php'; $jobs = get_jobs(0); ?> <div id="page-wrapper"> <div class="row"> <div class="col-lg-6"> <h3 class="page-header">JOBS</h3> </div> </div> <div class="col-lg-13"> <div class="panel panel-default"> <div class="panel-heading"> List of Pending Jobs Posted </div> <!-- /.panel-heading --> <div class="panel-body"> <table id="pending-jobs" class="cell-border" cellspacing="0" width="100%"> <thead> <tr> <th>Position</th> <th>Location</th> <th>Company</th> <th>Status</th> <th>Action</th> </tr>
$action = 'list_jobs'; } } $categories = get_categories(); $message = ""; // LIST JOBS if ($action == 'list_jobs') { // TO DO $jobs = get_jobs(); include 'list_jobs.php'; } else { if ($action == 'delete_job') { // TO DO $job_id = $_POST['job_id']; delete_job($job_id); $jobs = get_jobs(); include 'list_jobs.php'; } else { if ($action == 'add_job') { include 'edit_job.php'; } else { if ($action == 'edit_job') { // TO DO // GET ALL FIELD VALUES FOR JOB BASED ON JOB ID $job_id = $_POST['jobID']; $job_title = $_POST['jobTitle']; $job_category = $_POST['catID']; $job_type = $_POST['jobType']; $job_city = $_POST['city']; $job_state = $_POST['state']; $job_summary = $_POST['summary'];
} else { $sql = "SELECT * FROM " . table($tabletype) . $wheresql . $orderby; } $total[0] = $db->get_total("SELECT COUNT(*) AS num FROM " . table('jobs') . " WHERE uid='{$_SESSION['uid']}' and audit=1 and display=1 "); $total[1] = $db->get_total("SELECT COUNT(*) AS num FROM " . table('jobs_tmp') . " WHERE uid='{$_SESSION['uid']}' AND audit=2 "); $total[2] = $total[0] + $total[1]; //统计每个分类中的职位数 $jobs_total[0] = $db->get_total("SELECT COUNT(*) AS num FROM " . table('jobs') . " WHERE uid='{$_SESSION['uid']}' "); $jobs_total[1] = $db->get_total("SELECT COUNT(*) AS num FROM " . table('jobs') . " WHERE uid='{$_SESSION['uid']}' UNION ALL SELECT COUNT(*) AS num FROM " . table('jobs_tmp') . " WHERE uid='{$_SESSION['uid']}' "); $jobs_total[2] = $db->get_total("SELECT COUNT(*) AS num FROM " . table('jobs_tmp') . " WHERE uid='{$_SESSION['uid']}' AND audit=2 "); $jobs_total[3] = $db->get_total("SELECT COUNT(*) AS num FROM " . table('jobs_tmp') . " WHERE uid='{$_SESSION['uid']}' AND (audit=3 or display=2 or deadline<" . time() . " or (setmeal_deadline != 0 and setmeal_deadline< " . time() . "))"); $smarty->assign('total', $total); $smarty->assign('jobs_total', $jobs_total); $setmeal = get_user_setmeal($_SESSION['uid']); $smarty->assign('setmeal', $setmeal); $smarty->assign('jobs', get_jobs($offset, $perpage, $sql, true)); if ($total_val > $perpage) { $smarty->assign('page', $page->show(3)); } // 发布成功标记 $addjobs_save_succeed = intval($_GET['addjobs_save_succeed']); $jobs_one = get_jobs_one($addjobs_save_succeed); $smarty->assign('jobs_one', $jobs_one); $smarty->assign('points_rule', get_cache('points_rule')); /* 查找可预约的职位,判断运营模式 */ if ($_CFG['operation_mode'] == "3") { $setmeal = get_user_setmeal($_SESSION['uid']); if ($_CFG['setmeal_to_points'] == "1") { $add_mode = 1;
$page = new page(array('total' => $total_val, 'perpage' => $perpage)); $currenpage = $page->nowindex; $offset = ($currenpage - 1) * $perpage; if ($tablename == "all") { $getsql = "SELECT * FROM " . table('jobs') . $wheresql . " UNION ALL SELECT * FROM " . table('jobs_tmp') . $wheresql; } else { $getsql = "SELECT * FROM " . table($tablename) . " " . $wheresql . $oederbysql; } $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);
header('HTTP/1.1 401 Unauthorized'); return; } // Authenticate to the LDAP server. ldap_auth() throws // an exception if there's an error, so if it returns, // we know we're good to go. ldap_auth(); // Check request method (GET or PUT) if ($_SERVER['REQUEST_METHOD'] == 'GET') { // Various "get job" functions here... // Check the request URI. Requests for individual jobs // will have a path of ".../jobs/<job-id> $dirs = explode("/", $_SERVER['REQUEST_URI']); if ($dirs[count($dirs) - 1] == "jobs") { // Request for all jobs.... list($http_code, $query_response) = get_jobs($_SERVER['PHP_AUTH_USER']); // Success code is and 200. Errors are 4xx... header(sprintf("HTTP/1.1 %d", $http_code)); echo $query_response; } if ($dirs[count($dirs) - 2] == "jobs") { // Request for a specific jobID... list($http_code, $query_response) = get_job($dirs[count($dirs) - 1], $_SERVER['PHP_AUTH_USER']); // Success code is and 200. Errors are 4xx... header(sprintf("HTTP/1.1 %d", $http_code)); echo $query_response; } } elseif ($_SERVER['REQUEST_METHOD'] == 'POST') { // Verify the username in the attached JSON actually matches // the user in the auth header $body = file_get_contents('php://input');
<?php include_once '../functions/database.php'; $jobs = get_jobs(1); // print_r($jobs) ?> <div id="page-wrapper"> <div class="row"> <div class="col-lg-6"> <h3 class="page-header">JOBS</h3> </div> </div> <div class="col-lg-13"> <div class="panel panel-default"> <div class="panel-heading"> List of Jobs Posted </div> <!-- /.panel-heading --> <div class="panel-body"> <table id="example" class="cell-border" cellspacing="0" width="100%"> <thead> <tr> <th>Position</th> <th>Location</th> <th>Company</th> <th>End Date</th> </tr> </thead> <tbody>
/** * Get cron array. * * This is constructed based on our database values, rather than being actually * stored like this. * * @param array|boolean $value Value to override with. False by default, truthy if another plugin has already overridden. * @return array Overridden cron array. */ function get_cron_array($value) { if (!empty($value)) { // Something else is trying to filter the value, let it return $value; } // Massage into the correct format $crons = array(); $results = get_jobs(); foreach ($results as $result) { $timestamp = $result->nextrun; $hook = $result->hook; $key = md5(serialize($result->args)); $value = array('schedule' => '__fake_schedule', 'args' => $result->args, '_job' => $result); if (isset($result->interval)) { $value['interval'] = $result->interval; } // Build the array up, urgh if (!isset($crons[$timestamp])) { $crons[$timestamp] = array(); } if (!isset($crons[$timestamp][$hook])) { $crons[$timestamp][$hook] = array(); } $crons[$timestamp][$hook][$key] = $value; } // Set the version too $crons['version'] = 2; return $crons; }
$act = !empty($_REQUEST['act']) ? trim($_REQUEST['act']) : 'index'; if ($_SESSION['uid'] == '' || $_SESSION['username'] == '' || intval($_SESSION['utype']) == 2) { header("Location: ../login.php"); } $user = get_user_info($_SESSION['uid']); if ($_CFG['login_com_audit_mobile'] && $user['mobile_audit'] == "0") { $str = "<script>"; $str .= "alert('请先验证手机!');"; $str .= "window.location.href='account_security.php';"; $str .= "</script>"; echo $str; } elseif ($act == 'index') { $smarty->cache = false; $uid = intval($_SESSION["uid"]); $wheresql = " select * from " . table("jobs") . " where uid={$_SESSION['uid']} union all select * from " . table("jobs_tmp") . " where uid={$uid} "; $row = get_jobs($offset, $perpage, $wheresql, true); $smarty->assign('row', $row); $smarty->display("m/company/m-job-index.html"); } elseif ($act == "ajax_jobs_add") { $company_info = get_company(intval($_SESSION['uid'])); if ($company_info['companyname']) { if ($_CFG['operation_mode'] == "3") { $setmeal = get_user_setmeal($_SESSION['uid']); if (($setmeal['endtime'] > time() || $setmeal['endtime'] == "0") && $setmeal['jobs_ordinary'] > 0) { $add_mode = 2; } elseif ($_CFG['setmeal_to_points'] == "1") { $add_mode = 1; } else { $add_mode = 2; } } elseif ($_CFG['operation_mode'] == "2") {
$user_info_m = mysql_query("SELECT * FROM users WHERE Username = '******'", $chandle); $user_info_o = mysql_fetch_object($user_info_m); $target_info_m = mysql_query("SELECT * FROM users WHERE Username = '******'", $chandle); $target_info_o = mysql_fetch_object($target_info_m); $cur_jobs = $target_info_o->Jobs; //Check if target is user's idol $isfan = check_fans($user_info_o, $target_info_o); $target_requests = $target_info_o->Friend_requests; $target_avatar = get_gravatar($_SESSION['target_mail']); echo '<div id = "target_username">' . $target_username . '</div>'; echo '<div id = "main_avatar"><img src="' . $target_avatar . '" alt = "' . $target_username . ' avatar"></div>'; echo '<a href = "#" id = "sh_hd_jobs">Show jobs</a>'; echo '<div id = "jobs_div">'; echo '<div id = "only_jobs_div">'; include_once 'functions/get_jobs.php'; $ec_jobs = get_jobs($cur_jobs, false); echo $ec_jobs; echo '</div>'; echo '</div>'; echo '<div id = "fans_count_div"><span id = "fans_count"></span> <span id = "f_text">fans</span></div>'; echo '<div id = "idols_count_div"><span id = "idols_count"></span> <span id = "i_text">idols</span></div>'; echo '</div>'; echo '<div id = "right_user_navigation">'; //Search a friend list and show a friend request form (if not found) $cf_status = check_friend($target_requests, $user_info_o, $target_info_o); $isfriend = $cf_status['isfriend']; $isrequested = $cf_status['isrequested']; //If $isfriend is false and friend request wasn't send, then show a form echo '<div id = "user_nav">'; if ($isfriend == False and $isrequested == False) { echo '<div id = "target_rqsts">' . $target_requests . '</div>';
<?php require 'jobs.php'; try { var_dump(get_jobs('adaptive')); } catch (Exception $e) { echo $e->getMessage(); }
show_usage(); return; } $cmd = $argv[1]; if ($cmd == "scripts") { if (count($argv) > 2) { get_script($argv[2]); } else { get_scripts(); } } else { if ($cmd == "jobs") { if (count($argv) > 2) { get_job($argv[2]); } else { get_jobs(); } } else { if ($cmd == "new-job") { if (count($argv) == 2) { echo "Error: more arguments required."; return; } if (count($argv) == 3) { post_job($argv[2], null); } else { if (count($argv) == 4) { post_job($argv[2], $argv[3]); } } } else {