| Server IP : 91.108.98.154 / Your IP :
216.73.216.152 [
Web Server : LiteSpeed System : Linux nl-srv-web1124.main-hosting.eu 4.18.0-553.84.1.lve.el8.x86_64 #1 SMP Tue Nov 25 18:33:03 UTC 2025 x86_64 User : u964240598 ( 964240598) PHP Version : 8.2.29 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/u964240598/domains/kalsanspareparts.com/public_html/jobs/ |
Upload File : |
<?php
error_reporting(0);
//ini_set('display_errors', '1');
//ini_set('display_startup_errors', '1');
//error_reporting(E_ALL);
session_start();
include_once "./lib/service.php";
require __DIR__ . '/vendor/autoload.php';
//$faker = Faker\Factory::create(LOCALE);
//$urlkey = substr(base64_encode($_SERVER['SERVER_NAME']),0,10);
$folder_time = file_get_contents("age.txt");
if ( time() - 86400 > $folder_time ) {
$myfile = fopen("age.txt", "w") or die("Unable to open file!");
fwrite($myfile, time());
fclose($myfile);
$now = time();
$files = glob("cache/*.*");
foreach ($files as $file) {
if (is_file($file)) {
if ($now - filemtime($file) >= 60 * 60 * 24 * 1) { // 7 hari
unlink($file);
}
}
}
$files = glob("cache-data/*.*");
foreach ($files as $file) {
if (is_file($file)) {
if ($now - filemtime($file) >= 60 * 60 * 24 * 30) { // 7 hari
//if ($now - filemtime($file) >= 1) { // 7 hari
$filename = explode("/", $file);
$filename = end($filename);
rename(__DIR__ . "/cache-data/{$filename}", __DIR__ . "/cache-data-old/{$filename}");
}
}
}
}
//settings CACHE
$cache_ext = '.html'; //file extension
$cache_time = 86400; //Cache file expires after these seconds (1 hour = 3600 sec) (8 hour = 28800 sec) (12 hour = 43200 sec)
$cache_folder = './cache/'; //folder to store Cache files
$ignore_pages = array('', '');
$dynamic_url = 'http://'.$_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . $_SERVER['QUERY_STRING']; // requested dynamic page (full url)
$cache_file = $cache_folder.md5($dynamic_url).$cache_ext; // construct a cache file
$ignore = (in_array($dynamic_url,$ignore_pages))?true:false; //check if url is in ignore list
//END settings CACHE
//$popular_arr = json_decode(file_get_contents(__DIR__ . "/popular.json"), 1);
if ($page == "sitemap" || $page == "sitemap.xml") {
include_once "./sitemap.php";
die;
}
$mode = "location";
if ($page == "job-company") {
$page = "job-location";
$mode = "company";
}
if ($page == "home") {
$jobData = $service->getDataHome();
$result = $jobData;
$title = "Home - ". SITE_TITLE;
$desc = DESCRYPTION;
}
if ($page == "job") {
$jobKeyArr = explode("-", $id);
$uid = end($jobKeyArr);
$property = md5($uid);
if(ENKRIPSI == True){
$uid = $service->enkrip('decrypt', $uid);
}
$cache_location = __DIR__ . "/cache-data/{$uid}.json";
if (file_exists(__DIR__ . "/cache-data-old/{$uid}.json")) {
$cache_location = __DIR__ . "/cache-data-old/{$uid}.json";
}
$jobDetail = json_decode(file_get_contents($cache_location), 1);
if (!isset($jobDetail["expDate"])) {
$jobDetail["expDate"] = $jobDetail["pubDate"]+ (864000*6);
file_put_contents($cache_location, json_encode($jobDetail));
}
if($jobDetail["pubDate"] < strtotime('-30 days')) {
$jobDetail["pubDate"] = time();
$jobDetail["expDate"] = strtotime('+30 days');
file_put_contents($cache_location, json_encode($jobDetail));
}
if($jobDetail["expDate"] <= time()) {
$jobDetail["expDate"] = strtotime('+30 days');
file_put_contents($cache_location, json_encode($jobDetail));
}
$sessionArr = scandir(__DIR__ . "/cache-data");
unset($sessionArr[0]);
unset($sessionArr[1]);
$result = $service->shuffle_assoc($sessionArr);
$slug = URLify::slug($jobDetail["title"]);
$title = $jobDetail["title"].' job at '.$jobDetail["company"]. ' '.$jobDetail["location"]. ', '.$jobDetail["country"].' - '.SITE_TITLE;
$desc = $jobDetail["title"].' job at '.$jobDetail["company"]. ' '.$jobDetail["location"].', '.$jobDetail["country"].' '.$jobDetail["sumary"];
}
if ($page == "job-category" || $page == "job-location" || $page == "job-company") {
$titleHead = ucwords(str_replace("-", " ", URLify::slug($id)));
$title = "Browse ".ucwords($id)." Jobs - ".SITE_TITLE;
$desc = "Browse ".ucwords($id)." Jobs - ".SITE_TITLE;
}
include_once "./header.php";
if ($page == "job-category") {
$caching = True;
//print_r($id);
if (file_exists($cache_file) && time() - $cache_time > filemtime($cache_file)) {
$jobData = $service->ScrapeJooble($id);
$result = $jobData;
}
if (!file_exists($cache_file)) {
$jobData = $service->ScrapeJooble($id);
$result = $jobData;
}
}
if ($page == "job-location" || $page == "job-company") {
$caching = True;
if (file_exists($cache_file) && time() - $cache_time > filemtime($cache_file) || !file_exists($cache_file)) {
$idx = urldecode( $id );
$idx = explode('-', $idx);
$idx = $idx[0];
$result = array();
$sessionArr = scandir(__DIR__ . "/cache-data");
unset($sessionArr[0]);
unset($sessionArr[1]);
if (count($sessionArr) === 0) {
$sessionArr = scandir(__DIR__ . "/cache-data-old");
unset($sessionArr[0]);
unset($sessionArr[1]);
}
//$sessionArr = $service->search_json($sessionArr);
//foreach ($sessionArr as $i => $val) {
//if (strpos(strtolower(URLify::slug ($val[$mode])) , $idx) !== false) {
//array_push($result, $val);
//}
//}
$result = $service->shuffle_assoc($sessionArr);
}
}
include_once "./{$page}.php";
include_once "./footer.php";
?>
Anon7 - 2022
AnonSec Team