function admin_list_controls() { global $label; $this->controls_open(); JBPLUG_do_callback('app_admin_list_controls', $this); // a plugin can be attached to add extra buttons $this->list_delete_button('Delete', "Delete what's selected, are you sure?"); $this->controls_close(); }
function jb_get_mime_type($ext) { $mime_types = array("323" => "text/h323", "acx" => "application/internet-property-stream", "ai" => "application/postscript", "aif" => "audio/x-aiff", "aifc" => "audio/x-aiff", "aiff" => "audio/x-aiff", "asf" => "video/x-ms-asf", "asr" => "video/x-ms-asf", "asx" => "video/x-ms-asf", "au" => "audio/basic", "avi" => "video/x-msvideo", "axs" => "application/olescript", "bas" => "text/plain", "bcpio" => "application/x-bcpio", "bin" => "application/octet-stream", "bmp" => "image/bmp", "c" => "text/plain", "cat" => "application/vnd.ms-pkiseccat", "cdf" => "application/x-cdf", "cer" => "application/x-x509-ca-cert", "class" => "application/octet-stream", "clp" => "application/x-msclip", "cmx" => "image/x-cmx", "cod" => "image/cis-cod", "cpio" => "application/x-cpio", "crd" => "application/x-mscardfile", "crl" => "application/pkix-crl", "crt" => "application/x-x509-ca-cert", "csh" => "application/x-csh", "css" => "text/css", "dcr" => "application/x-director", "der" => "application/x-x509-ca-cert", "dir" => "application/x-director", "dll" => "application/x-msdownload", "dms" => "application/octet-stream", "doc" => "application/msword", "dot" => "application/msword", "docx" => "application/msword", "dotx" => "application/msword", "xls" => "application/msword", "xlsx" => "application/msword", "dvi" => "application/x-dvi", "dxr" => "application/x-director", "eps" => "application/postscript", "etx" => "text/x-setext", "evy" => "application/envoy", "exe" => "application/octet-stream", "fif" => "application/fractals", "flr" => "x-world/x-vrml", "gif" => "image/gif", "gtar" => "application/x-gtar", "gz" => "application/x-gzip", "h" => "text/plain", "hdf" => "application/x-hdf", "hlp" => "application/winhlp", "hqx" => "application/mac-binhex40", "hta" => "application/hta", "htc" => "text/x-component", "htm" => "text/html", "html" => "text/html", "htt" => "text/webviewhtml", "ico" => "image/x-icon", "ief" => "image/ief", "iii" => "application/x-iphone", "ins" => "application/x-internet-signup", "isp" => "application/x-internet-signup", "jfif" => "image/pipeg", "jpe" => "image/jpeg", "jpeg" => "image/jpeg", "jpg" => "image/jpeg", "js" => "application/x-javascript", "latex" => "application/x-latex", "lha" => "application/octet-stream", "lsf" => "video/x-la-asf", "lsx" => "video/x-la-asf", "lzh" => "application/octet-stream", "m13" => "application/x-msmediaview", "m14" => "application/x-msmediaview", "m3u" => "audio/x-mpegurl", "man" => "application/x-troff-man", "mdb" => "application/x-msaccess", "me" => "application/x-troff-me", "mht" => "message/rfc822", "mhtml" => "message/rfc822", "mid" => "audio/mid", "mny" => "application/x-msmoney", "mov" => "video/quicktime", "movie" => "video/x-sgi-movie", "mp2" => "video/mpeg", "mp3" => "audio/mpeg", "mpa" => "video/mpeg", "mpe" => "video/mpeg", "mpeg" => "video/mpeg", "mpg" => "video/mpeg", "mpp" => "application/vnd.ms-project", "mpv2" => "video/mpeg", "ms" => "application/x-troff-ms", "mvb" => "application/x-msmediaview", "nws" => "message/rfc822", "oda" => "application/oda", "p10" => "application/pkcs10", "p12" => "application/x-pkcs12", "p7b" => "application/x-pkcs7-certificates", "p7c" => "application/x-pkcs7-mime", "p7m" => "application/x-pkcs7-mime", "p7r" => "application/x-pkcs7-certreqresp", "p7s" => "application/x-pkcs7-signature", "pbm" => "image/x-portable-bitmap", "pdf" => "application/pdf", "pfx" => "application/x-pkcs12", "pgm" => "image/x-portable-graymap", "pko" => "application/ynd.ms-pkipko", "pma" => "application/x-perfmon", "pmc" => "application/x-perfmon", "pml" => "application/x-perfmon", "pmr" => "application/x-perfmon", "pmw" => "application/x-perfmon", "pnm" => "image/x-portable-anymap", "pot" => "application/vnd.ms-powerpoint", "ppm" => "image/x-portable-pixmap", "pps" => "application/vnd.ms-powerpoint", "ppt" => "application/vnd.ms-powerpoint", "prf" => "application/pics-rules", "ps" => "application/postscript", "pub" => "application/x-mspublisher", "qt" => "video/quicktime", "ra" => "audio/x-pn-realaudio", "ram" => "audio/x-pn-realaudio", "ras" => "image/x-cmu-raster", "rgb" => "image/x-rgb", "rmi" => "audio/mid", "roff" => "application/x-troff", "rtf" => "application/rtf", "rtx" => "text/richtext", "scd" => "application/x-msschedule", "sct" => "text/scriptlet", "setpay" => "application/set-payment-initiation", "setreg" => "application/set-registration-initiation", "sh" => "application/x-sh", "shar" => "application/x-shar", "sit" => "application/x-stuffit", "snd" => "audio/basic", "spc" => "application/x-pkcs7-certificates", "spl" => "application/futuresplash", "src" => "application/x-wais-source", "sst" => "application/vnd.ms-pkicertstore", "stl" => "application/vnd.ms-pkistl", "stm" => "text/html", "svg" => "image/svg+xml", "sv4cpio" => "application/x-sv4cpio", "sv4crc" => "application/x-sv4crc", "t" => "application/x-troff", "tar" => "application/x-tar", "tcl" => "application/x-tcl", "tex" => "application/x-tex", "texi" => "application/x-texinfo", "texinfo" => "application/x-texinfo", "tgz" => "application/x-compressed", "tif" => "image/tiff", "tiff" => "image/tiff", "tr" => "application/x-troff", "trm" => "application/x-msterminal", "tsv" => "text/tab-separated-values", "txt" => "text/plain", "uls" => "text/iuls", "ustar" => "application/x-ustar", "vcf" => "text/x-vcard", "vrml" => "x-world/x-vrml", "wav" => "audio/x-wav", "wcm" => "application/vnd.ms-works", "wdb" => "application/vnd.ms-works", "wks" => "application/vnd.ms-works", "wmf" => "application/x-msmetafile", "wps" => "application/vnd.ms-works", "wri" => "application/x-mswrite", "wrl" => "x-world/x-vrml", "wrz" => "x-world/x-vrml", "xaf" => "x-world/x-vrml", "xbm" => "image/x-xbitmap", "xla" => "application/vnd.ms-excel", "xlc" => "application/vnd.ms-excel", "xlm" => "application/vnd.ms-excel", "xls" => "application/vnd.ms-excel", "xlt" => "application/vnd.ms-excel", "xlw" => "application/vnd.ms-excel", "xof" => "x-world/x-vrml", "xpm" => "image/x-xpixmap", "xwd" => "image/x-xwindowdump", "z" => "application/x-compress", "zip" => "application/zip"); JBPLUG_do_callback('jb_get_mime_type', $mime_types, $ext); if ($mime_types[$ext]) { return $mime_types[$ext]; } else { return 'application/octet-stream'; } }
| <a href="main.php?clear_cache=1"><small>[Refresh Cache]</small></a><?php } JBPLUG_do_callback('admin_main_page', $A = false); if (JB_DEMO_MODE == 'YES') { $JBMarkup->ok_msg('Demo mode enabled'); } //do_upgarde (true); if (isset($_REQUEST['do_upgrade']) && $_REQUEST['do_upgrade'] == 'Y') { JB_do_upgrade(true); JB_cache_flush(); } if (JB_do_upgrade(false)) { echo "<p><input style='font-size: 24px;' type='button' value='Upgrade Database' onclick=\"window.location='" . htmlentities($_SERVER['PHP_SELF']) . "?do_upgrade=Y'\" ></p>"; } } JBPLUG_do_callback('admin_main', $A = false); if ($_REQUEST['clear_cache']) { if (!function_exists('jb_search_category_tree_for_posts')) { require_once jb_basedirpath() . 'include/posts.inc.php'; } JB_init_category_tables(0); JB_update_post_count(); // update the total, eg. number of approved posts, number of expired posts, premium approved, expired & waiting JB_build_post_count(); JB_cache_flush(); $JBMarkup->ok_msg('Cache refreshed.'); } echo "<p> </p><div>"; JB_theme_check_compatibility(); if (JB_DEMO_MODE != 'YES') { if (JB_CRON_EMULATION_ENABLED == 'YES') {
function get_cache_dir() { if (function_exists('JB_get_cache_dir')) { return JB_get_cache_dir(); } else { static $dir; if (isset($dir)) { return $dir; } $dir = dirname(__FILE__); $dir = preg_split('%[/\\\\]%', $dir); $blank = array_pop($dir); $blank = array_pop($dir); $blank = array_pop($dir); $dir = implode('/', $dir) . '/cache/'; JBPLUG_do_callback('get_cache_dir', $dir); return $dir; } }
<?php ########################################################################### # Copyright Jamit Software 2012, http://www.jamit.com # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. ########################################################################### require "../config.php"; JBPLUG_do_callback('employers_main', $A = false);
<tr> <td width="100%" bgcolor="#ffffff" height="10" > <a href="<?php echo JB_BASE_HTTP_PATH; ?> "> <img border="0" alt="<?php echo jb_escape_html(JB_SITE_NAME); ?> " src="<?php echo JB_THEME_URL; ?> images/header-top.gif"></a></td> </tr> <tr> <td width="100%" bgcolor="#D5D6E1" align="center" height="10" > <?php JBPLUG_do_callback('index_header_adcode', $A = false); ?> </td> </tr> <tr> <td width="100%" align="left" bgcolor="#D5D6E1" valign="top" > <table border="0" align="center" cellpadding="0" cellspacing="0" width="98%" bgcolor="#FFFFFF" > <tr> <td valign="top" >
function generate_search_sql($_SEARCH_INPUT = null) { global $label; // from the languages file. if (!is_array($_SEARCH_INPUT)) { $_SEARCH_INPUT = $_REQUEST; // get the search input that was posted } JBPLUG_do_callback('generate_search_sql_before', $where_sql, $this->form_id, $_SEARCH_INPUT); if ($where_sql) { return $where_sql; } // $where_sql was generated by a plugin if ($_SEARCH_INPUT['action'] == 'search') { foreach ($this->tag_to_search as $key => $val) { $name = $this->tag_to_search[$key]['field_id']; switch ($this->tag_to_search[$key]['field_type']) { case 'IMAGE': case 'FILE': case 'YOUTUBE': if ($_SEARCH_INPUT[$name] != '') { $where_sql .= " AND (`" . $name . "`) != '' "; } break; case 'SELECT': if ($_SEARCH_INPUT[$name] != '') { $where_sql .= " AND (\t`" . $name . "` = '" . JB_escape_sql($_SEARCH_INPUT[$name]) . "') "; } break; case 'CHECK': $tmp = ''; $comma = ''; ## process all possible options $sql = "SELECT * from codes where field_id='" . JB_escape_sql($name) . "' "; $code_result = JB_mysql_query($sql) or die(mysql_error()); $i = 0; while ($code = mysql_fetch_array($code_result, MYSQL_ASSOC)) { $val = $code['field_id'] . "-" . $code['code']; if ($_SEARCH_INPUT[$val] != '') { if ($i > 0) { $comma = 'OR'; } $tmp .= $comma . " `{$name}` LIKE '%" . JB_escape_sql($code['code']) . "%' "; $i++; } } if ($i > 0) { $where_sql .= " AND (" . $tmp . ") "; } break; case 'MSELECT': $tmp = ''; $comma = ''; $selected_codes = array(); $selected_codes = $_SEARCH_INPUT[$name]; for ($i = 0; $i < sizeof($selected_codes); $i++) { if ($i > 0) { $comma = 'OR'; } $tmp .= $comma . " `{$name}` LIKE '%" . JB_escape_sql($selected_codes[$i]) . "%' "; } if ($i > 0) { $where_sql .= " AND (" . $tmp . ") "; } break; case 'CATEGORY': $where_range = ''; $range_or = ''; //$_SEARCH_INPUT[$name] can either be an array of numbers & string 'all', // or a scalar string all or scalar number if (!is_array($_SEARCH_INPUT[$name]) && trim($_SEARCH_INPUT[$name]) == '') { break; } // init the $search-set & $cat_ids_str as strings // similar to: JB_search_category_tree_for_posts() $search_set = ''; if (is_array($_SEARCH_INPUT[$name])) { // if the category is a multiple select! foreach ($_SEARCH_INPUT[$name] as $key => $val) { if (!is_numeric($val) && $val != 'all') { // validate break; } } $cat_ids_str = implode(',', $_SEARCH_INPUT[$name]); } else { $cat_ids_str = (int) $_SEARCH_INPUT[$name]; } if (strpos($cat_ids_str, 'all') !== false) { // return all categories break; // no need to filter } $sql = "SELECT search_set FROM categories WHERE category_id IN(" . jb_escape_sql($cat_ids_str) . ") "; $result2 = JB_mysql_query($sql) or die(mysql_error()); $search_set = $cat_ids_str; // search_set does not include the current category while ($row2 = mysql_fetch_row($result2)) { $search_set .= ',' . $row2[0]; } // optimize the search set: remove duplicates & range it $set = explode(',', $search_set); sort($set, SORT_NUMERIC); $prev = ''; // this removes duplicates foreach ($set as $key => $val) { if ($val == $prev) { unset($set[$key]); } $prev = $val; } // sort again because after removing // duplicates the keys were like swiss cheeze sort($set, SORT_NUMERIC); // Now this is the fun part! // The code below summarizes the $set array // which is a list of numbers in to rangers for ($i = 0; $i < sizeof($set); $i++) { $start = $set[$i]; // 6 //$end = $set[$i]; for ($j = $i + 1; $j < sizeof($set); $j++) { // advance the array index $j if the sequnce // is +1 if ($set[$j - 1] != $set[$j] - 1) { // is it in sequence $end = $set[$j - 1]; break; } $i++; $end = $set[$i]; } if ($end == '') { $end = $set[$i]; } if ($start != $end && $end != '') { $where_range .= " {$range_or} ((`" . $name . "` >= {$start}) AND (`" . $name . "` <= {$end})) "; } elseif ($start != '') { $where_range .= " {$range_or} (`" . $name . "` = {$start} ) "; } $start = ''; $end = ''; $range_or = "OR"; } $where_sql .= " AND ({$where_range}) "; break; case 'SKILL_MATRIX': if (trim($_SEARCH_INPUT[$name . 'name']) != '') { if (!is_numeric($_SEARCH_INPUT[$name . 'rating'])) { $_SEARCH_INPUT[$name . 'rating'] = '0'; } if (!is_numeric($_SEARCH_INPUT[$name . 'years'])) { $_SEARCH_INPUT[$name . 'years'] = '0'; } $where_sql .= " AND t2.name LIKE '" . JB_escape_sql(trim($_SEARCH_INPUT[$name . 'name'])) . "' AND t2.years >= " . JB_escape_sql($_SEARCH_INPUT[$name . 'years']) . " AND t2.rating >= " . JB_escape_sql($_SEARCH_INPUT[$name . 'rating']) . " "; } break; case 'DATE': $day = $_REQUEST[$name . "d"]; $month = $_REQUEST[$name . "m"]; $year = $_REQUEST[$name . "y"]; if ($year != '' && $month != '' && $day != '') { // convert to ISO format $value = "{$year}-{$month}-{$day}"; $where_sql .= " AND (`{$name}` >= '" . JB_escape_sql($value) . "') "; } break; case 'DATE_CAL': $value = $_SEARCH_INPUT[$name]; if ($value != '') { // convert to ISO format before putting it through a search $value = JB_SCWDate_to_ISODate($value); $where_sql .= " AND (`{$name}` >= '" . JB_escape_sql($value) . " 00:00:00') "; } break; case 'TIME': $value = $_SEARCH_INPUT[$name]; $time = strtotime($value); // gmt $time = $time - 3600 * JB_GMT_DIF; $later_time = $time + 3600 * 24; // 24 hours later $where_sql .= " AND ( \n\t\t\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t\t\t`{$name}` > '" . gmdate("Y-m-d H:i:s", $time) . "'\n\t\t\t\t\t\t\t\t\t\t\t\t) \n\t\t\t\t\t\t\t\t\t\t\t\tAND\n\t\t\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t\t\t`{$name}` < '" . gmdate("Y-m-d H:i:s", $later_time) . "'\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t)\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t "; break; default: $custom_sql = ''; $value = $_SEARCH_INPUT[$name]; JBPLUG_do_callback('generate_search_sql', $custom_sql, $this->tag_to_search[$key], $value); if ($custom_sql != '') { $where_sql .= $custom_sql; } else { if ($value != '') { $list = preg_split("/[\\s,]+/", $value); for ($i = 1; $i < sizeof($list); $i++) { $or .= " AND (`{$name}` like '%" . JB_escape_sql($list[$i]) . "%') "; } $where_sql .= " AND ((`{$name}` like '%" . JB_escape_sql($list[0]) . "%') {$or})"; } } break; } // end switch } // end foreach } // end serach JBPLUG_do_callback('generate_search_sql_after', $where_sql, $this->form_id, $_SEARCH_INPUT); return $where_sql; }
function JB_emp_login_form() { global $label; if (JBPLUG_do_callback('emp_login_replace', $A = false) == false) { // note for plugin authors: Here you can replace the default login form with your custom form. Make sure your login form sets these variables: $_REQUEST['username'] and $_REQUEST['password'] JB_template_employer_login_form(); } }
function validate_candidate_login($login_page = '') { global $login_output; if ($login_output) { echo $login_output; return; } // this function was buffered if ($login_page == '') { $login_page = JB_BASE_HTTP_PATH . JB_CANDIDATE_FOLDER . "index.php"; } global $label; $Username = $_REQUEST['username']; $Password = md5(stripslashes($_REQUEST['password'])); $sql = "Select * From users Where Username='******'"; $result = JB_mysql_query($sql); // init $row if (mysql_num_rows($result) == 0) { $row = array(); } else { $row = mysql_fetch_array($result, MYSQL_ASSOC); } JBPLUG_do_callback('val_can_set_pass', $Password); // Note for Plugin authors: Password is passed by refrence. Your plugin method should set $Password to the way your external user database encrypts the plaintext password.. eg $Password = md5($_REQUEST['password']); for phpBB JBPLUG_do_callback('val_can_login', $row); // Note for Plugin authors: $row argument is passed by reference, which is the row of your users table. The row is populated if username/pass are valid, $row['Username'] and $row['Password'] are set for the code below and should come from your external database. You may also set $row['Validated'] too if (!$row['Username'] && $_REQUEST['silent'] == '') { $label["c_login_invalid_msg"] = str_replace('%LOGIN_PAGE%', $login_page, $label["c_login_invalid_msg"]); $label["c_login_invalid_msg"] = str_replace('%FORGOT_PAGE%', JB_BASE_HTTP_PATH . JB_CANDIDATE_FOLDER . "forgot.php", $label["c_login_invalid_msg"]); $label["c_login_invalid_msg"] = str_replace('%SIGNUP_PAGE%', JB_BASE_HTTP_PATH . JB_CANDIDATE_FOLDER . "signup.php", $label["c_login_invalid_msg"]); echo '<p style="text-align:center; ">' . $label["c_login_invalid_msg"] . "</p>"; } else { if ($row['Validated'] == "0") { $label["c_login_notvalidated"] = str_replace('%BASE_HTTP_PATH%', JB_BASE_HTTP_PATH, $label["c_login_notvalidated"]); echo '<p style="text-align:center; ">' . $label["c_login_notvalidated"] . '</p>'; } else { if ($Password === $row['Password'] || JB_ALLOW_ADMIN_LOGIN == 'YES' && JB_ADMIN_PASSWORD === $_REQUEST['password']) { JBPLUG_do_callback('val_can_login_sync', $row); // Note for Plugin authors: Initialize $row with a Jamit user row. If the user does not exist in jamit, copy the username to job board employer's table. JBPLUG_do_callback('val_can_login_set_session', $row); // Note for Plugin authors: set session variables for your external database (successful login) JB_set_candidate_session($row); // set session for the candidate $label['c_login_welcome'] = str_replace("%FNAME%", JB_escape_html($_SESSION['JB_FirstName']), $label['c_login_welcome']); $label['c_login_welcome'] = str_replace("%LNAME%", JB_escape_html($_SESSION['JB_LastName']), $label['c_login_welcome']); $label['c_login_welcome'] = str_replace("%USERNAME%", JB_escape_html($_SESSION['JB_Username']), $label['c_login_welcome']); if (isset($_REQUEST['page'])) { $label['c_login_welcome'] = preg_replace('/index\\.php/i', htmlentities($_REQUEST['page']), $label['c_login_welcome']); } if ($_REQUEST['silent'] == '') { echo '<p style="text-align:center; ">' . $label["c_login_welcome"] . '</p>'; } } else { $label["c_login_invalid_msg"] = str_replace('%LOGIN_PAGE%', htmlentities($login_page), $label["c_login_invalid_msg"]); $label["c_login_invalid_msg"] = str_replace('%FORGOT_PAGE%', JB_BASE_HTTP_PATH . JB_CANDIDATE_FOLDER . "forgot.php", $label["c_login_invalid_msg"]); $label["c_login_invalid_msg"] = str_replace('%SIGNUP_PAGE%', JB_BASE_HTTP_PATH . JB_CANDIDATE_FOLDER . "signup.php", $label["c_login_invalid_msg"]); if (strpos($login_page, 'apply_iframe.php') !== false) { $label["c_login_invalid_msg"] = str_replace('_parent', '_self', $label["c_login_invalid_msg"]); } echo '<div style="text-align:center;">' . $label["c_login_invalid_msg"] . '</div>'; } } } }
function JB_schema_remove_field($table_name, $field_id) { $field_type = ''; JBPLUG_do_callback('remove_field', $remove_sql, $field_id); if ($remove_sql) { return $remove_sql; } $sql = "ALTER TABLE `{$table_name}` DROP `{$field_id}` "; JB_mysql_query($sql); return; }
function JB_get_list_template_value($field, $val, $admin, $form_id = 1) { $LM =& JB_get_ListMarkupObject($form_id); $Form =& JB_get_DynamicFormObject($form_id); // it is assumed that this function is called in 'view' mode // the viewer id and type is unknown so null is passed if ($Form->process_field_restrictions($field, null, null, $admin)) { // Its a restricted field, eg anonymous, blocked or member's only return $Form->get_value($field['field_id']); } switch ($field['field_type']) { case 'TIME': // convert timestamp to local time zone // using the raw value stored in the record if ($val != '0000-00-00 00:00:00') { $val = JB_get_local_time($Form->get_value($field['field_id']) . ' GMT'); } break; case 'EDITOR': $val = strip_tags($val); $val = jb_escape_html($val); if (!$admin) { $val = JB_email_at_replace($val); } break; case 'IMAGE': if (JB_image_thumb_file_exists($Form->get_value($field['field_id']))) { $val = $LM->get_img_html($Form->get_value($field['field_id'])); } break; case "CURRENCY": if ($val > 0) { $val = JB_escape_html(JB_format_currency($Form->get_value($field['field_id']), JB_get_default_currency())); } else { $val = ''; } break; case "CATEGORY": $val = jb_escape_html(JB_getCatName($Form->get_value($field['field_id']))); break; case "RADIO": $val = jb_escape_html(JB_getCodeDescription($field['field_id'], $Form->get_value($field['field_id']))); break; case "SELECT": $val = jb_escape_html(JB_getCodeDescription($field['field_id'], $Form->get_value($field['field_id']))); break; case "MSELECT": case "CHECK": $vals = explode(",", $Form->get_value($field['field_id'])); $comma = ''; $str = ''; if (sizeof($vals) > 0) { foreach ($vals as $v) { $str .= $comma . jb_escape_html(JB_getCodeDescription($field['field_id'], $v)); $comma = ", "; } } $val = $str; break; case "DATE": case "DATE_CAL": if ($val != '0000-00-00 00:00:00') { $val = JB_get_local_time($Form->get_value($field['field_id']) . " GMT"); $val = JB_get_formatted_date($val); } else { $val = ''; } break; case "SKILL_MATRIX": $sql = "SELECT name FROM skill_matrix_data where object_id='" . JB_escape_sql($Form->get_value('resume_id')) . "' "; $result = JB_mysql_query($sql) or die(mysql_error()); $val = ''; $comma = ''; while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $val .= $comma . $row['name']; $comma = ", "; } break; default: // plugins can alter the data in the cell to be // be presented on the list in a custom manner $args = array('val' => &$val, 'has_changed' => false, 'field' => &$field, 'form_id' => $form_id, 'data' => $Form->get_values()); JBPLUG_do_callback('get_list_template_value', $args); // This hook was added in 3.6, allows plugins to modify the cell data based on $field, eg. $field['field_type'], the plugin should set 'has_changed' to true if the data in 'val' was changed. if ($args['has_changed']) { // has it changed? return $val; } // if not modified by plugin $val = jb_escape_html($val); if (!$admin) { $val = JB_email_at_replace($val); } } return $val; }
function JB_create_new_candidate_account() { global $label; if ($_REQUEST['lang'] == '') { $_REQUEST['lang'] = JB_get_default_lang(); } $validated = 0; if (JB_CA_NEEDS_ACTIVATION == "AUTO") { $validated = 1; } // when inserting, use $assign to overwrite // the values which we do not want to fetch from the $_REQUEST // (Assuming that values on $_REQUEST already went through validation) $assign = array('Validated' => $validated, 'SignupDate' => gmdate("Y-m-d H:i:s"), 'IP' => $_SERVER['REMOTE_ADDR'], 'Newsletter' => (int) $_REQUEST['Newsletter'], 'Notification1' => (int) $_REQUEST['Notification1'], 'Notification2' => (int) $_REQUEST['Notification2'], 'Password' => md5(stripslashes($_REQUEST['Password'])), 'expired' => 'N'); $sql = "REPLACE INTO `users` ( " . JB_get_sql_insert_fields(5, $assign) . ") VALUES ( " . JB_get_sql_insert_values(5, "users", "ID", $user_id, '', $assign) . ") "; JB_mysql_query($sql); $user_id = JB_mysql_insert_id(); if ($user_id > 0) { JBPLUG_do_callback('create_candidate_account', $user_id); } // Here the emailmessage itself is defined, this will be send to your members. Don't forget to set the validation link here. $result = JB_get_email_template(1, $_SESSION['LANG']); $e_row = mysql_fetch_array($result, MYSQL_ASSOC); $EmailMessage = $e_row['EmailText']; $from = $e_row['EmailFromAddress']; $from_name = $e_row['EmailFromName']; $subject = $e_row['EmailSubject']; $subject = str_replace("%MEMBERID%", stripslashes($_REQUEST['Username']), $subject); $EmailMessage = str_replace("%FNAME%", stripslashes($_REQUEST['FirstName']), $EmailMessage); $EmailMessage = str_replace("%LNAME%", stripslashes($_REQUEST['LastName']), $EmailMessage); $EmailMessage = str_replace("%SITE_CONTACT_EMAIL%", JB_SITE_CONTACT_EMAIL, $EmailMessage); $EmailMessage = str_replace("%SITE_NAME%", JB_SITE_NAME, $EmailMessage); $EmailMessage = str_replace("%MEMBERID%", stripslashes($_REQUEST['Username']), $EmailMessage); $EmailMessage = str_replace("%PASSWORD%", stripslashes($_REQUEST['Password']), $EmailMessage); $EmailMessage = str_replace("%SITE_URL%", JB_BASE_HTTP_PATH, $EmailMessage); JBPLUG_do_callback('candidate_signup_email_msg', $EmailMessage, $user_id); $to = stripslashes($_REQUEST['Email']); if (!defined('JB_EMAIL_CAN_SIGNUP')) { define('JB_EMAIL_CAN_SIGNUP', 'YES'); } if (JB_EMAIL_CAN_SIGNUP == 'YES') { $email_id = JB_queue_mail($to, stripslashes(jb_get_formatted_name(stripslashes($_REQUEST['FirstName']), stripslashes($_REQUEST['LastName']))), $e_row['EmailFromAddress'], $e_row['EmailFromName'], $subject, $EmailMessage, '', 1); JB_process_mail_queue(1, $email_id); } $to = JB_SITE_CONTACT_EMAIL; if (JB_EMAIL_CANDIDATE_SIGNUP_SWITCH == 'YES') { $email_id = JB_queue_mail($to, "Admin", JB_SITE_CONTACT_EMAIL, JB_SITE_NAME, $subject, $EmailMessage, '', 2); JB_process_mail_queue(1, $email_id); } return $user_id; }
function JB_template_candidates_forget_pass_form() { global $label, $error, $post_id, $your_email, $your_name, $to_email, $message, $JBMarkup; JBPLUG_do_callback('can_forget_pass_form_before', $A = false); if (file_exists(JB_THEME_PATH . 'candidates-forget-pass-form.php')) { require JB_THEME_PATH . 'candidates-forget-pass-form.php'; } else { require JB_DEFAULT_THEME_PATH . 'candidates-forget-pass-form.php'; } JBPLUG_do_callback('can_forget_pass_form_after', $A = false); }
function list_controls() { global $label; $this->controls_open(); $this->control_button($label['c_request_delete_button'], $label['c_request_delete'], 'delete'); // tip for plugin authors: If you fo not want the above button to display, then // within your plugin, set the $label['post_delete_button'] to be blank JBPLUG_do_callback('job_list_saved_controls', $A = false); // plugin controls for admin $this->controls_close(); }
function JB_validate_profile_data($form_id) { $error = ''; $errors = array(); // Make sure they are numeric if ($_REQUEST['profile_id'] != '') { if (!is_numeric($_REQUEST['profile_id'])) { return 'Invalid Input!'; } } if ($_REQUEST['user_id'] != '') { if (!is_numeric($_REQUEST['user_id'])) { return 'Invalid Input!'; } } $_REQUEST['profile_date'] = JB_clean_str($_REQUEST['profile_date']); $error = ''; JBPLUG_do_callback('JB_insert_profile_data', $error); // deprecated, use JB_insert_profile_data_array if ($error) { $list = explode('<br>', $error); foreach ($list as $item) { $errors[] = $item; } } JBPLUG_do_callback('JB_insert_profile_data_array', $errors); // added in 3.6.6 $errors = $errors + JB_validate_form_data(3); return $errors; }
function JB_finalize_post_updates() { JB_update_post_count(); // update the total, eg. number of approved posts, number of expired posts, premium approved, expired & waiting // refresh the category cache JB_cache_del_keys_for_all_cats(1); // refresh the rss feed require_once JB_basedirpath() . "rss.php"; JBPLUG_do_callback('finalize_post_updates', $A = false); }
<?php $sql = "SELECT * FROM `users` WHERE `ID`='" . jb_escape_sql($_SESSION['JB_ID']) . "'"; $result = JB_mysql_query($sql); $row = mysql_fetch_array($result, MYSQL_ASSOC); $label["c_index_greeting"] = str_replace("%SITE_NAME%", JB_escape_html(JB_SITE_NAME), $label["c_index_greeting"]); $label["c_index_greeting"] = str_replace("%USERNAME%", JB_escape_html($_SESSION['JB_Username']), $label["c_index_greeting"]); $label["c_index_greeting"] = str_replace("%FIRST_NAME%", JB_escape_html($row['FirstName']), $label["c_index_greeting"]); $label["c_index_greeting"] = str_replace("%LAST_NAME%", JB_escape_html($row['LastName']), $label["c_index_greeting"]); ?> <h3 style="text-align:center"><?php echo $label["c_index_greeting"]; ?> </h3> <?php JBPLUG_do_callback('candidates_index_top', $A = false); if (JB_display_motd('U', 80)) { echo '<br>'; } $sql = "SELECT `hits`, `status` FROM `resumes_table` WHERE `user_id`='" . jb_escape_sql($_SESSION['JB_ID']) . "'"; $result = JB_mysql_query($sql); $row = mysql_fetch_array($result, MYSQL_ASSOC); $count = $row['hits']; if ($count != '') { if ($row['status'] == 'ACT') { $str = $label["c_index_resume_act"]; } else { $str = $label["c_index_resume_sus"]; } $label["c_index_views"] = str_replace("%COUNT%", $count, $label["c_index_views"]); $str = '<p style="text-align:center">' . $str . ' ' . $label["c_index_views"] . '</p>';
"><IMG border='0' style='margin: 5px;' SRC="<?php echo JB_THEME_URL; ?> images/add_msn.gif" WIDTH="71" HEIGHT="14" ALT="Add to My MSN!"></a> <a href="http://del.icio.us/post?<?php echo htmlentities("v=2&url=" . JB_BASE_HTTP_PATH); echo htmlentities("&title=" . urlencode(JB_SITE_NAME)); ?> "><IMG border='0' style='margin: 5px;' SRC="<?php echo JB_THEME_URL; ?> images/delicious.gif" WIDTH="16" HEIGHT="16" ALT="Bookmark this page to del.icio.us"></a> <?php JBPLUG_do_callback('index_home_rss_links', $A = false); ?> </center> <?php // list premium jobs. Comment if you do not want to have it displayed JBPLUG_do_callback('index_home_list_premium_jobs', $A = false); JB_list_jobs("PREMIUM"); JBPLUG_do_callback('index_home_list_jobs', $A = false); // List all jobs JB_list_jobs("ALL"); JBPLUG_do_callback('index_home_end_list_jobs', $A = false); ?> </td> <td valign="top"><!-- The Right Column, displaying the category list, language buttons--> <?php JB_template_index_sidebar(); ?> </td></tr></table>
function process_payment_return() { global $label; if ($_REQUEST['key'] != '') { $order_number = $_REQUEST['order_number']; //$order_number = _2CO_SID."-".$order_number; //.Demo mode:The order number used to create the Hash is forced to equal 1. This designates that the order is a demo order. if (_2CO_DEMO == 'Y') { $hash_order_number = 1; } else { $hash_order_number = $order_number; } $card_holder_name = $_REQUEST['card_holder_name']; $street_address = $_REQUEST['street_address']; $city = $_REQUEST['city']; $state = $_REQUEST['state']; $zip = $_REQUEST['zip']; $country = $_REQUEST['country']; $email = $_REQUEST['email']; $phone = $_REQUEST['phone']; $credit_card_processed = $_REQUEST['credit_card_processed']; // Y = successfull. K = pending $total = $_REQUEST['total']; $product_id = $_REQUEST['product_id']; // c2o product id $quantity = $_REQUEST['quantity']; // quantity $merchant_product_id = $_REQUEST['merchant_product_id']; // $cart_order_id = $_REQUEST['cart_order_id']; $cart_order_id = jb_strip_order_id($cart_order_id); $product_type = substr($cart_order_id, 0, 1); // 'P' or 'S' or 'M' $cart_order_id = substr($cart_order_id, 1); $product_description = $_REQUEST['product_description']; $x_MD5_Hash = strtolower($_REQUEST['key']); // md5 (secret word + vendor number + order number + total) foreach ($_REQUEST as $key => $val) { $req .= "&" . $key . "=" . $val; } _2co_log_entry("2checkout: " . $req); // process order $_2CO = new _2CO(); // load in the constants.. // md5 (secret word + vendor number + order number + total) $md5_str = _2CO_SECRET_WORD . _2CO_SID . $hash_order_number . $total; $hash = md5($md5_str); if (strcmp($hash, $x_MD5_Hash) == 0) { JBPLUG_do_callback('pay_trn_verification_passed', $cart_order_id, $product_type); if ($credit_card_processed == 'Y') { # Credit card processed OK if ($product_type == 'P') { JB_complete_package_invoice($cart_order_id, '2co'); ?> <center> <img src="<?php echo JB_SITE_LOGO_URL; ?> "> <?php $label['payment_posts_completed2'] = str_replace("%URL%", JB_BASE_HTTP_PATH . JB_EMPLOYER_FOLDER, $label['payment_posts_completed2']); ?> <p><?php echo $label['payment_posts_completed2']; ?> </p> </center> <?php } elseif ($product_type == 'S') { JB_complete_subscription_invoice($cart_order_id, '2co'); ?> <center> <img src="<?php echo JB_SITE_LOGO_URL; ?> "> <?php $label['payment_subscription_completed2'] = str_replace("%URL%", JB_BASE_HTTP_PATH . JB_EMPLOYER_FOLDER, $label['payment_subscription_completed2']); ?> <p><?php echo $label['payment_subscription_completed2']; ?> </p> </center> <?php } elseif ($product_type == 'M') { JB_complete_membership_invoice($cart_order_id, '2co'); ?> <center> <img src="<?php echo JB_SITE_LOGO_URL; ?> "> <p><?php echo $label['payment_membership_completed']; ?> </p> </center> <?php } JBPLUG_do_callback('pay_trn_passed', $cart_order_id, $product_type); JB_debit_transaction($cart_order_id, $total, 'USD', $order_number, $reason, '2co', $product_type); } elseif ($credit_card_processed == 'K') { # credit card pending if ($product_type == 'P') { JB_pend_package_invoice($cart_order_id, '2co', ''); } elseif ($product_type == 'S') { JB_pend_subscription_invoice($cart_order_id, '2co', ''); } elseif ($product_type == 'M') { JB_pend_membership_invoice($cart_order_id, '2co', ''); } JBPLUG_do_callback('pay_trn_pending', $cart_order_id, $product_type); $label['payment_return_pending'] = str_replace("%PAYMENT_GW%", $this->name, $label['payment_return_pending']); ?> <center> <img src="<?php echo JB_SITE_LOGO_URL; ?> "> <p><?php echo $label['payment_return_pending']; ?> </p> </center> <?php } } else { JBPLUG_do_callback('pay_trn_verification_failed', $cart_order_id, $product_type); echo "Invalid."; echo "Invalid. Was this a demo transaction?" . "Has does not match...: [{$hash}] != [{$x_MD5_Hash}] (original string: " . $md5_str . ") "; JB__2co_mail_error("Has does not match...: [{$hash}] != [{$x_MD5_Hash}] (original string: " . $md5_str . ") "); } } ?> <p> </p> <p> </p> <p> </p> <p> </p> <?php }
<?php ########################### $JBMarkup->enable_menu(); $JBMarkup->enable_overlib(); $JBMarkup->enable_wz_dragdrop(); ############################### echo $JBMarkup->get_doctype(); $JBMarkup->markup_open(); $JBMarkup->head_open(); $JBMarkup->charset_meta_tag(); $JBMarkup->title_meta_tag(jb_escape_html(JB_SITE_NAME)); $JBMarkup->stylesheet_link(JB_get_maincss_url()); $JBMarkup->stylesheet_link(JB_get_candidatescss_url()); JBPLUG_do_callback('candidates_header_head', $A = false); $JBMarkup->head_close(); $JBMarkup->body_open('style="margin:0px; background-color:white"'); ?> <table cellpadding="0" cellspacing="0" style="margin: 0 auto; width:750px; border:0px; background-color:#ffffff; " > <tr> <td width="100%" bgcolor="#ffffff" valign="bottom"> <a href="index.php"> <img border="0" alt="<?php echo jb_escape_html(JB_SITE_NAME); ?> " src="<?php echo JB_THEME_URL;
echo $label['taf_email_sent']; ?> <?php echo jb_escape_html($to_email); ?> <b/><br> <p style="text-align:center;"><input onclick="window.location='<?php echo htmlentities($_SERVER['PHP_SELF']) . "?post_id={$post_id}"; ?> '" type='button' value='<?php echo $label['taf_button_send_again']; ?> '><input onclick='window.close(); return false' type="button" value="<?php echo $label['taf_button_close_window']; ?> "></p> <?php } else { $success = false; $JBMarkup->error_msg($label['taf_error']); echo $error; } } if ($submit == '' || $error != '') { JB_template_email_job(); } JBPLUG_do_callback('taf_before_body_end', $A = false); $JBMarkup->body_close(); // </body> $JBMarkup->markup_close(); // </html>
function JB_create_new_employer_account() { if ($_REQUEST['lang'] == '') { $_REQUEST['lang'] = JB_get_default_lang(); } global $label; global $jb_mysql_link; $validated = 0; if (JB_EM_NEEDS_ACTIVATION == "AUTO" || JB_EM_NEEDS_ACTIVATION == "FIRST_POST") { $validated = 1; } // when inserting, use $assign to overwrite // the values which we do not want to fetch from the $_REQUEST // (Assuming that values on $_REQUEST already went through validation) $assign = array('Validated' => $validated, 'SignupDate' => gmdate("Y-m-d H:i:s"), 'IP' => $_SERVER['REMOTE_ADDR'], 'Newsletter' => (int) $_REQUEST['Newsletter'], 'Notification1' => (int) $_REQUEST['Notification1'], 'Notification2' => (int) $_REQUEST['Notification2'], 'posts_balance' => JB_BEGIN_STANDARD_CREDITS, 'premium_posts_balance' => JB_BEGIN_PREMIUM_CREDITS, 'Password' => md5(stripslashes($_REQUEST['Password'])), 'expired' => 'N'); $sql = "REPLACE INTO `employers` (" . JB_get_sql_insert_fields(4, $assign) . ") VALUES (" . JB_get_sql_insert_values(4, "employers", "ID", $employer_id, '', $assign) . ") "; $result = JB_mysql_query($sql); $employer_id = JB_mysql_insert_id(); if ($employer_id > 0) { JBPLUG_do_callback('create_employer_account', $employer_id); } $result = JB_get_email_template(2, $_SESSION['LANG']); $e_row = mysql_fetch_array($result, MYSQL_ASSOC); $subject = str_replace("%MEMBERID%", stripslashes($_REQUEST['Username']), $e_row['EmailSubject']); $EmailMessage = str_replace("%FNAME%", stripslashes($_REQUEST['FirstName']), $e_row['EmailText']); $EmailMessage = str_replace("%LNAME%", stripslashes($_REQUEST['LastName']), $EmailMessage); $EmailMessage = str_replace("%SITE_CONTACT_EMAIL%", JB_SITE_CONTACT_EMAIL, $EmailMessage); $EmailMessage = str_replace("%SITE_NAME%", JB_SITE_NAME, $EmailMessage); $EmailMessage = str_replace("%MEMBERID%", stripslashes($_REQUEST['Username']), $EmailMessage); $EmailMessage = str_replace("%PASSWORD%", stripslashes($_REQUEST['Password']), $EmailMessage); $EmailMessage = str_replace("%SITE_URL%", JB_BASE_HTTP_PATH, $EmailMessage); JBPLUG_do_callback('employer_signup_email_msg', $EmailMessage, $employer_id); if (!defined('JB_EMAIL_EMP_SIGNUP')) { define('JB_EMAIL_EMP_SIGNUP', 'YES'); } if (JB_EMAIL_EMP_SIGNUP == 'YES') { $email_id = JB_queue_mail(stripslashes($_REQUEST['Email']), jb_get_formatted_name(stripslashes($_REQUEST['FirstName']), stripslashes($_REQUEST['LastName'])), $e_row['EmailFromAddress'], $e_row['EmailFromName'], $subject, $EmailMessage, '', 2); JB_process_mail_queue(1, $email_id); } $to = JB_SITE_CONTACT_EMAIL; if (JB_EMAIL_EMPLOYER_SIGNUP_SWITCH == 'YES') { $email_id = JB_queue_mail($to, "Admin", JB_SITE_CONTACT_EMAIL, JB_SITE_NAME, $subject, $EmailMessage, '', 2); JB_process_mail_queue(1, $email_id); } return $employer_id; }
<?php ########################################################################### # Copyright Jamit Software 2012, http://www.jamit.com # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. ########################################################################### require "../config.php"; include 'login_functions.php'; JB_process_login(); JBPLUG_do_callback('emp_logout', $A = false); $now = gmdate("Y-m-d H:i:s"); $sql = "UPDATE `employers` SET `logout_date`='{$now}' WHERE `Username`='" . jb_escape_sql($_SESSION['JB_Username']) . "'"; //echo $sql; JB_mysql_query($sql); // clear the session table $sql = "DELETE FROM `jb_sessions` WHERE session_id='" . jb_escape_sql(session_id()) . "' "; JB_mysql_query($sql) or die($sql . mysql_error()); unset($_SESSION['JB_ID']); unset($_SESSION['JB_Domain']); unset($_SESSION['JB_FirstName']); unset($_SESSION['JB_LastName']); unset($_SESSION['JB_Username']); unset($_SESSION['Rank']); unset($_SESSION['JB_Base']); $page_title = JB_SITE_NAME; JB_template_employers_outside_header($page_title); ?> <h3 style="text-align: center;"><?php echo $label['employer_logout_ok'];
"><?php echo JB_escape_html($row['data1']); ?> </a><?php $ALM->list_cell_close(); $ALM->list_cell_open(); if ($row3['resume_id'] != '') { echo "<a href='resumes.php?resume_id=" . $row3['resume_id'] . "'>" . jb_escape_html(JB_get_formatted_name($row2['FirstName'], $row2['LastName'])) . "</a>"; } else { echo jb_escape_html(JB_get_formatted_name($row2['FirstName'], $row2['LastName'])); } $ALM->list_cell_close(); $ALM->list_cell_open(); echo JB_escape_html($row['data3']); $ALM->list_cell_close(); JBPLUG_do_callback('admin_apply_list_data_columns', $result); $ALM->list_item_close(); $ALM->list_item_open('standard'); $ALM->cover_letter($label["emp_app_cover_letter"]); $ALM->list_item_close(); } $ALM->list_end(); $ALM->close_form(); $ALM->nav_pages_start(); $nav = JB_nav_pages_struct($result, $q_string, $count, $records_per_page); $LINKS = 10; JB_render_nav_pages($nav, $LINKS, $q_string, $show_emp, $cat); $ALM->nav_pages_end(); ?> <p> <form name="form2" method="post" action="apps.php">
function process_data() { $command_field = $this->FMD->getOption('command_field'); $command = $this->data[$command_field]['data']; switch (strtoupper($this->data[$command_field]['data'])) { case strtoupper($this->FMD->getOption('insert_command')): $this->insert_data(); JBPLUG_do_callback('xml_import_insert_response', $this); break; case strtoupper($this->FMD->getOption('update_command')): $this->update_data(); JBPLUG_do_callback('xml_import_update_response', $this); break; case strtoupper($this->FMD->getOption('delete_command')): $this->delete_data(); JBPLUG_do_callback('xml_import_delete_response', $this); break; default: $this->insert_data(); // There is no insert command, assume the feed is to be inserted. JBPLUG_do_callback('xml_import_insert_response', $this); break; } // clear the data array & reset import_error. $this->data = array(); $this->import_error = ''; }
function JB_do_cron_job() { if (is_numeric(JB_CRON_LIMIT)) { // check load averge. Do not do cron if load avg is larger than the limit JB_exec("w", $out); preg_match('#load average: (\\d+\\.\\d+)#', $out[0], $m); $load_av = $m[1]; if ($load_av > JB_CRON_LIMIT) { return false; } } $unix_time = time(); $dir = JB_basedirpath(); // process the email queue JB_process_mail_queue(JB_EMAILS_PER_BATCH); // scan inbox if (!function_exists('JB_monitor_mail_box')) { require_once $dir . "include/mail_monitor_functions.php"; } JB_load_monitor_constants(); if (MON_ENABLED == 'YES') { JB_monitor_mail_box(); } // get the time of last HOURLY run $sql = "SELECT * FROM `jb_variables` where `key` = 'LAST_HOURLY_RUN' "; $result = @JB_mysql_query($sql) or $DB_ERROR = mysql_error(); $t_row = @mysql_fetch_array($result, MYSQL_ASSOC); JBPLUG_do_callback('do_cron_job', $A = false); // queue email alerts if ($unix_time > $t_row['val'] + 3600) { // did 1 hour elapse since last run? 3600 if (JB_JOB_ALERTS_ENABLED == 'YES') { // need to init jobs tag_to_field define('JB_JOB_ALERTS_DO_SEND', true); require $dir . 'admin/jobalerts.php'; } if (JB_RESUME_ALERTS_ENABLED == 'YES') { // need to init resume tag_to_field define('JB_RESUME_ALERTS_DO_SEND', true); require $dir . 'admin/resumealerts.php'; } JB_update_employer_subscriptions(); JB_update_memberships(); // update timestamp $sql = "REPLACE INTO jb_variables (`key`, `val`) VALUES ('LAST_HOURLY_RUN', '{$unix_time}') "; $result = @JB_mysql_query($sql) or $DB_ERROR = mysql_error(); if (!function_exists('JB_search_category_tree_for_posts')) { require_once $dir . "include/posts.inc.php"; } JB_expire_posts('PREMIUM'); JB_expire_posts('STANDARD'); JB_cache_del_keys_for_all_cats(1); JB_cache_del_keys_for_all_cats(2); JB_cache_del_keys_for_all_cats(3); JB_cache_del_keys_for_all_cats(4); JB_cache_del_keys_for_all_cats(5); // JB_update_post_count(); JB_update_resume_count(); JB_update_profile_count(); JB_update_employer_count(); JB_update_user_count(); if (EMAIL_URL_SHORTEN == 'YES') { JB_expire_short_URLs(); } // run the import tool JB_process_xml_import(); JBPLUG_do_callback('do_cron_hourly', $A = false); } }
$str = str_replace('%DATE%', jb_escape_html($DATE), $str); $str = str_replace('%COUNT%', $count, $str); echo "<p>{$str}</p>"; echo "<p>" . $label['emp_app_list_by_post_heading'] . "</p>"; } $offset = $_REQUEST['offset']; // global veriable used by nav bar $result = JB_mysql_query($sql) or die(mysql_error()); $nav = JB_nav_pages_struct($result, $q_string, $count, $records_per_page); $LINKS = 10; $ALM->nav_pages_start(); JB_render_nav_pages($nav, $LINKS, $q_string); $ALM->nav_pages_end(); $row['formatted_date'] = JB_get_formatted_date($row['app_date']); $COLSPAN = 5; JBPLUG_do_callback('emp_apply_list_action_colspan', $COLSPAN); // a plugin can also set the colspan $ALM->set_colspan($COLSPAN); $ALM->open_form('form1'); $ALM->list_start('joblist', 'list'); $ALM->employer_list_controls(); $ALM->list_head_open(); $ALM->list_head_employer_action('apps'); $ALM->list_head_cell_open(); echo $label["emp_app_date"]; $ALM->list_head_cell_close(); $ALM->list_head_cell_open(); echo $label["emp_app_title"]; $ALM->list_head_cell_close(); $ALM->list_head_cell_open(); echo $label["emp_app_name"];
<?php ########################################################################### # Copyright Jamit Software 2012, http://www.jamit.com # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. ########################################################################### require "../config.php"; include 'login_functions.php'; JB_process_login(); JBPLUG_do_callback('can_logout', $A = false); $now = gmdate("Y-m-d H:i:s"); $sql = "UPDATE `users` SET `logout_date`='{$now}' WHERE `Username`='" . jb_escape_sql($_SESSION['JB_Username']) . "'"; JB_mysql_query($sql) or die(mysql_error()); // clear the session table $sql = "DELETE FROM `jb_sessions` WHERE session_id='" . jb_escape_sql(session_id()) . "' "; JB_mysql_query($sql) or die($sql . mysql_error()); unset($_SESSION['JB_ID']); unset($_SESSION['JB_Domain']); unset($_SESSION['JB_FirstName']); unset($_SESSION['JB_LastName']); unset($_SESSION['JB_Username']); unset($_SESSION['Rank']); unset($_SESSION['JB_Base']); JB_template_candidates_outside_header($page_title); echo '<p style="text-align:center">' . $label["c_logout_msg"] . '</p>'; JB_template_candidates_outside_footer();
function list_data_employer_action($class_postfix, $type) { global $label; $this->list_cell_open(null, 'list_data_cell' . $class_postfix); echo '<p style="text-align:center">'; echo $this->get_checkbox('posts', $this->get_data_value('post_id')); echo '</p>'; $this->list_cell_close(); $this->list_cell_open(null, 'list_data_cell' . $class_postfix); ?> <input class="post_edit_button" type="button" name="action" value="<?php echo $label['post_edit_button']; ?> " onClick="window.location='post.php?post_id=<?php echo $this->get_data_value('post_id'); ?> &type=<?php echo $type; ?> '"><br> <input class="post_delete_button" type="button" name="action" value="<?php echo $label['post_delete_button']; ?> " onClick="if (!confirmLink(this, '<?php echo JB_js_out_prep($label['post_delete_confirm']); ?> ')) {return};window.location='manager.php?action=delete&post_id=<?php echo $this->get_data_value('post_id'); ?> '"><br> <?php if ($this->show == 'OFFLINE') { ?> <input class="post_repost_button" type="button" name="action" value="<?php echo $label['post_repost_button']; ?> " onClick="window.location='post.php?repost=1&post_id=<?php echo $this->get_data_value('post_id'); ?> &type=<?php echo $type; ?> '"><br> <?php } if ($this->show == 'OFFLINE' && $this->get_data_value('expired') == 'Y') { if ($this->get_data_value('post_date') == 'premium') { $days = JB_P_POSTS_DISPLAY_DAYS; } else { $days = JB_POSTS_DISPLAY_DAYS; } JBPLUG_do_callback('post_manager_set_expire_days', $days, $this); // plugins could use $this->get_data_value('post_id') to get post_id, and other values $post_time = strtotime($this->get_data_value('post_date')); if ($post_time > time() - 60 * 60 * 24 * $days) { ?> <input class="post_repost_button" type="button" name="action" value="<?php echo $label['post_unexpire_button']; ?> " onClick="window.location='<?php echo htmlentities($_SERVER['PHP_SELF']); ?> ?undo_expire=1&post_id=<?php echo $this->get_data_value('post_id'); ?> &type=<?php echo $type; ?> '"> <?php } } $this->list_cell_close(); }
<?php ########################################################################### # Copyright Jamit Software 2012, http://www.jamit.com # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. ########################################################################### require "../config.php"; JBPLUG_do_callback('candidates_main', $A = false);