//http://musicianspage.com/
###Per maintenance, attivare queste righe...
#if ($_COOKIE['PHPSESSID'] != '1ki5uopv9kladvg2btk9g141f1' and $_SERVER['REMOTE_ADDR'] != "68.96.93.113") {
# include "/home/webadmin/musicianspage.com/EXTRA_SECURE/siteoff.inc";
# exit;
#}
#print "top";
#exit;
/*
if ($PHPSESSID == '23bakqr980pv64s27qs1ppmo14') {
print "here";
exit;
}
*/
##################FINE MAINTENANCE
#if ($_SERVER['REMOTE_ADDR'] == "68.96.93.113") {
# print "stop here";
# exit;
#}
//Activate this one below when live! Turn it off just for debugging...
error_reporting(0);
//This below useful during dewbugging or site migrations...
//error_reporting(E_ERROR | E_PARSE);
//Loads chunk for PHP 5 compatibility...
include_once '/home/webadmin/musicianspage.com/EXTRA_SECURE/compatibilityPHP5.php';
//If we are NOT calling phpmyadmin...
if (strpos($REQUEST_URI, 'phpmyadmin') === false) {
#print "ecco: $REQUEST_URI";
# Rev. 13/2/07 per attivazione sessioni
# Rev. 5-5-007 per cookie "visibilita"
# Rev. 9-28-07 per controllo site status
#Definisce variabili globali...
#Variabili utili
include_once "/home/webadmin/musicianspage.com/EXTRA_SECURE/global_variables.inc";
$bots = array(
// Major Search Engines
"Googlebot",
"bingbot",
"DuckDuckBot",
"DuckDuckGo",
"YandexBot",
"YandexMobileBot",
"Baiduspider",
"Sogou",
"Applebot",
"Exabot",
"Google",
// Social Media
"Twitterbot",
"facebot",
"LinkedInBot",
"PinterestBot",
// Regional/Specialized Search
"Yeti", // Naver
"Qwantify", // Qwant
"DotBot", // Moz
// Other Important Crawlers
"CCBot", // Common Crawl
"uptimebot", // Uptime monitoring
"Crawler", // Generic crawler detection
// Still Active Specialized Bots
"psbot", // Picsearch
"Raven", // SEO tools
"SpiderBot",
"SiteTech-Rover",
"WebCopy",
"WebFetcher",
"SemrushBot",
"SiteAuditBot",
"SplitSignalBot",
"Screaming Frog SEO Spider",
//AI spiders and bots, info: https://momenticmarketing.com/blog/ai-search-crawlers-bots
"OAI-SearchBot",
"ChatGPT-User",
"ClaudeBot",
"claude-web",
"PerplexityBot",
"Perplexity-User",
"Google-Extended",
"Amazonbot",
"Applebot",
"FacebookBot",
"LinkedInBot",
"DuckAssistBot",
"MistralAI-User"
);//Current list of active bots as of 2025
$current_agent = $HTTP_USER_AGENT;
#$current_agent = "BackRub/*.*";
#print "eco: $current_agent";
foreach ($bots as $singlebot) {
//if (eregiFF ($singlebot,$current_agent) and !(eregFF("Alexa Toolbar",$current_agent))) {
if (stripos($current_agent, $singlebot) !== false and stripos($current_agent, "Alexa Toolbar") === false) {
#print "eccolo: $singlebot
";
$is_robot = 1;
}
}
//Here we include the anti-spam system to fight AI-bots since Sep 5, 2025 14:31... it is the same system we have on VSM...
if (!$is_robot and !$is_human) {
include_once $basedir.'/anti-spam/search_spam_check.php';
}
#Connessione MySQL secure
include_once $basedir_extrasecure.'/MySQL.inc';
#Moved here and loaded _once on 12/4/20, 12:18 PM...
include_once $basedir.'/includes/database_tabs/shared_lists.inc';
include_once $basedir.'/includes/database_tabs/shared_functions.inc';
//This below fixed on 6/22/21, 9:50 AM!
if (strpos($HTTP_HOST, $basesite) === false) { #fa il redirect 301 al dominio corretto
$destinowww = $SSLprot."://".$basesite.$REQUEST_URI;
header("HTTP/1.1 301 Moved Permanently");
header("Location: $destinowww");
exit;
}
/*
if ($_SERVER['REMOTE_ADDR'] == '70.181.126.8') {
print "destinowww5: $destinowww";
exit;
}
*/
#print "/* ecco: $pirloso - $cleanSCRIPT */";
#Controlla se la pagina richiesta deve essere caricata sicura oppure non sicura...
if ($sslwork) {
if ($_SERVER['SERVER_PORT'] != 443) {
$destino = "https://$basesite".$REQUEST_URI;
#print "eccolo: $destino";
header("HTTP/1.1 301 Moved Permanently");
header("Location: $destino");
exit;
}
}
else {
if (!eregFF("/pj/",$cleanSCRIPT) and !eregFF("/scripts/",$cleanSCRIPT) and !eregFF("/testhttps/",$cleanSCRIPT) and !eregFF("/extras/",$cleanSCRIPT) and !eregFF("/uploads/",$cleanSCRIPT) and !eregFF("/includes/",$cleanSCRIPT) and strpos($cleanSCRIPT, "/login/news_jobs.rss") === false) { #Mettere qui le sezioni che sono indifferentemente caricate in https or http
if ((eregFF("/login/",$cleanSCRIPT) or eregFF("/signup",$cleanSCRIPT) or eregFF("/confirmemail.php",$cleanSCRIPT) or eregFF("/cf.php",$cleanSCRIPT) or eregFF("/confirm.php",$cleanSCRIPT) or eregFF("/admin",$cleanSCRIPT) or eregFF("/cart/checkout.php",$cleanSCRIPT)) and $_SERVER['SERVER_PORT'] != 443) {
$destino = "https://$basesite".$REQUEST_URI;
#print "eccolo: $destino";
header("HTTP/1.1 301 Moved Permanently");
header("Location: $destino");
exit;
}
else
if ($_SERVER['SERVER_PORT'] == 443 and !eregFF("/login/",$cleanSCRIPT) and !eregFF("/confirmemail.php",$cleanSCRIPT) and !eregFF("/signup",$cleanSCRIPT) and !eregFF("/cf.php",$cleanSCRIPT) and !eregFF("/confirm.php",$cleanSCRIPT) and !eregFF("/admin",$cleanSCRIPT) and !eregFF("/cart/checkout.php",$cleanSCRIPT) and !eregFF("js$",$cleanSCRIPT) and !eregFF("js$",$cleanSCRIPT) and !eregFF("css$",$cleanSCRIPT) and !eregFF("show_it.php",$cleanSCRIPT) and !eregFF("/extra_scripts/hoteditor/",$cleanSCRIPT)) {
$destino = "http://$basesite".$REQUEST_URI;
header("HTTP/1.1 301 Moved Permanently");
header("Location: $destino");
exit;
}
}
}
#Legge site status from control_panel table
$queryRT = "SELECT status, nowrite FROM control_panel";
$resultRT = mysql_queryFF($queryRT);
$SITESTATUS = mysql_resultFF($resultRT,0, 'status');
$SITENOWRITE = mysql_resultFF($resultRT,0, 'nowrite');
if ($SITESTATUS == 2) { #Se site status e' OFF...
#Controlla che non sia io (devo avere controlpassword cookie...)
if (!$controlpassword and !eregFF("/admin/",$cleanSCRIPT)) {
#include "/home/webadmin/".$basesite."/EXTRA_SECURE/siteoff.inc";
include $basedir_extrasecure."/siteoff.inc";
exit;
}
}
/*
######################################################################
#Controlla subito se c'e'' cookie visibilita', altrimenti visualizza pagina "Under Construction" -- da togliere quando si mette in production!
$paginedisplayed = array('/curriculum', '/home', '/free-sheet-music', '/musicians-list', '/music-links', '/fabriphpadmin');
foreach ($paginedisplayed as $single) {
if (eregFF($single, $cleanSCRIPT)) {
$displaypage = 1;
break;
}
}
#Controlal subito se c'e'' cookie visibilita', altrimenti visualizza pagina "Under Construction" -- da togliere quando si mette in production!
if (!$visibilita and !eregFF("set_flag.php",$REQUEST_URI) and !$displaypage) {
include $basedir_extrasecure."/underconstruction.inc";
exit;
}
######################################################################
*/
#Memorizza session ID
$s_id = $PHPSESSID;
include $basedir_extrasecure.'/de-crypt_functions.inc';
#Attiva sessioni
$bots = array(
// Major Search Engines
"Googlebot",
"bingbot",
"DuckDuckBot",
"DuckDuckGo",
"YandexBot",
"YandexMobileBot",
"Baiduspider",
"Sogou",
"Applebot",
"Exabot",
// Social Media
"Twitterbot",
"facebot",
"LinkedInBot",
"PinterestBot",
// Regional/Specialized Search
"Yeti", // Naver
"Qwantify", // Qwant
"DotBot", // Moz
// Other Important Crawlers
"CCBot", // Common Crawl
"uptimebot", // Uptime monitoring
"Crawler", // Generic crawler detection
// Still Active Specialized Bots
"psbot", // Picsearch
"Raven", // SEO tools
"SpiderBot",
"SiteTech-Rover",
"WebCopy",
"WebFetcher",
"SemrushBot",
"SiteAuditBot",
"SplitSignalBot"
);//Current list of active bots as of 2024
$current_agent = $HTTP_USER_AGENT;
#$current_agent = "BackRub/*.*";
foreach ($bots as $singlebot) {
if (eregiFF($singlebot,$current_agent) and !(eregFF("Alexa Toolbar",$current_agent))) {
#print "eccolo: $singlebot
";
$is_robot = 1;
}
}
if (!$is_robot) {
#Controlla che la pagina richiesta non sia un RSS oppure un contenuto dinamico per gli affiliati...
if (!(eregFF("images/banners/dyn",$REQUEST_URI)) and !(eregFF("news.rdf",$REQUEST_URI)) and !(eregFF("news.rss",$REQUEST_URI))) {
$expireTime = 60*60*24*100; // 100 days
#Blocco di controllo per evitare errore del tipo:
# "The session id contains invalid characters, valid characters are only a-z..."
# Trovato su PHP site on 19-10-07
#Questo serve per permettere $sid passing senza cookies!
ini_set('session.use_trans_sid', '1');
$sn=session_name();
if(isset($_GET[$sn])) if(strlen($_GET[$sn])!=32) unset($_GET[$sn]);
if(isset($_POST[$sn])) if(strlen($_POST[$sn])!=32) unset($_POST[$sn]);
if(isset($_COOKIE[$sn])) if(strlen($_COOKIE[$sn])!=32) unset($_COOKIE[$sn]);
if(isset($PHPSESSID)) if(strlen($PHPSESSID)!=32) unset($PHPSESSID);
##### Fine Blocco COntrollo session_id
if(!$s_id) {
session_set_cookie_params($expireTime);
session_start();
$s_id = session_id();
setcookie("s_id",$s_id,time()+95040000,'/');
}
}
}
if ($fov) {#If it is coming from GoogleAd (2-21-2013)...
#Scrive s_id dentro pre_overture table per verifiche (quando necessario)...
$queryTdeleted = "INSERT INTO pre_overture (fov,session_id,tempo) VALUES ('$fov', '$s_id',$globaltempo)";
$result_Tdeleted = mysql_queryFF($queryTdeleted);
if (!$fromov) {
$fov = $fov."AAAAA".time();
setcookie("fromov",$fov,time()+31536000,'/'); #Scadenza un anno dopo
}
$destino_rfsh = $REQUEST_URI;
$destino_rfsh = ereg_replaceFF("\?fov\=.+\&","?",$destino_rfsh);
$destino_rfsh = ereg_replaceFF("\?fov\=.+$","",$destino_rfsh);
$destino_rfsh = ereg_replaceFF("\&fov\=.+\&","\&",$destino_rfsh);
$destino_rfsh = ereg_replaceFF("\&fov\=.+$","",$destino_rfsh);
//header("HTTP/1.1 301 Moved Permanently");
header("Location: $destino_rfsh");
exit;
}
/*
###Prende shared libraries...
if (!$sharedfunctionsflag) {
include $basedir.'/includes/database_tabs/shared_lists.inc';
include $basedir.'/includes/database_tabs/shared_functions.inc';
}
elseif (!$sharedlistsflag) {
include $basedir.'/includes/database_tabs/shared_lists.inc';
}
*/
//Here we check for possible spam bots to stop Apr 7, 2025 13:29...
if (!$is_robot) {
//We look into the spam_bots_list table and we find the IP address or addresses that have the clumn "tempo" less than 15 minutes ago...
$querySPAMBOTS = "SELECT partial_ip FROM spam_bots_list WHERE 1";
$resultSPAMBOTS = mysql_queryFF($querySPAMBOTS);
$nitemsSPAMBOTS = mysql_num_rowsFF($resultSPAMBOTS);
#print "querySPAMBOTS: $querySPAMBOTS - $nitemsSPAMBOTS";
#exit;
if ($nitemsSPAMBOTS) {
while ($rowSPAMBOTS = mysql_fetch_arrayFF($resultSPAMBOTS)) {
$partialIP = $rowSPAMBOTS["partial_ip"];
#print "check this partialIP: $partialIP
";
if (strpos($useripaddress, $partialIP) !== false) {
#print "stop this: $partialIP
";
include $basedir_extrasecure."/siteoff.inc";
exit;
}
}
}
}
#exit;
###Controllo login...
include 'setup_login.inc';
#Verifica se c'e' superuser on
if ($HTTP_GET_VARS["superpassword"]) {
$superpassword = $HTTP_GET_VARS["superpassword"];
}
#Questo e' per evitare che chiunguque possa accedere come superuser senza conoscere la password
if ($superuser and $superpassword != $superuserpw) {
$superuser = 0;
}
#E questo invece attiva super user se presente password
elseif ($superpassword == $superuserpw) { #Se c'e' password (cookie o in GET)
$superuser = 1;
}
#Se e' logged, allora memorizza variabili utili condivise...
if ($logged) {
include $basedir.'/includes/login/takeloginvariables.inc'; #Prende Member variables...
}
####Questo e' per banner redirect vecchie pagine e controllo hidden pages prima del lancio...
#Include temporary include...
//include "/home/webadmin/musicianspage.com/html/temporaryfirstinclude.inc";
#Enable gzip compression if browser accept it (SEO 10-14-2010)...
if (!eregFF("/scripts/", $_SERVER['SCRIPT_FILENAME']) and !eregFF("/mc/flash/", $_SERVER['SCRIPT_FILENAME']) and !eregFF("/uploads/", $_SERVER['SCRIPT_FILENAME'])) {
enablehtmlgzip();
}
}
?>
#Preleva definizioni liste gategories...
include $basedir.'/includes/database_tabs/shared_lists.inc';
#print "ecco: $SCRIPT_FILENAME";
$urlinput = $REQUEST_URI;
#Controlla se include sessione, in tal caso la taglia fuori
if (eregFF("\?PHPSESSID",$urlinput)) {
$urlinput = ereg_replaceFF("\?PHPSESSID=.+$","",$urlinput);
}
#print "dopo: $urlinput";
$id = substr ($urlinput,6,strlen($urlinput)-5);
#print "ecco id: $id";
#Pulisce $id da parametri dopo ?...
$id = ereg_replaceFF("\?.+$","",$id);
if ($id) {
#Definisce criterio, browsing e narrows (fino a cinque livelli per ora)...
$narrow = "";
list($criterio,$browsing,$narrow[0],$narrow[1],$narrow[2],$narrow[3],$narrow[4]) = explode("/",$id);
$narrow1 = $narrow[0];
$sizenarrow = sizeof($narrow);
for ($i = 0; $i <= $sizenarrow; $i ++) {
if (!$narrow[$i]) {
break;
}
}
$sizenarrow = $i-1; #Memorizza quanti narrowby ci sono...
#print "eccolo: $narrow[1] - $sizenarrow
";
$origicriterio = $criterio;
$origibrowsing = $browsing;
}
//Redirects to correct root with final slash (3-15-2016)...
elseif (preg_match("/^\/jobs$/", $urlinput)) {
$destino = $urlinput."/";
header("HTTP/1.1 301 Moved Permanently");
header("Location: $destino");
exit;
}
#print "qui: $q - $where";
#exit;
$q = cleaninputs($q);
if ($q and !$browsing and $emplcat != 2) {
$id = "/jobs";
$st = "jd";
include $basedir.'/search/search_jobs.php';
exit;
}
elseif ($q and $emplcat == 2) {
#Se ricerca in ALL EMPLOYERS fa redirect a search generale musicians...
$destino = $SSLprot."://".$basesite."/employers/?q=".$q."&where=1";
header("Location: $destino");
#print "eccoci2";
exit;
}
elseif ($id == "") {
include $basedir.'/jobs_content/index.html';
exit;
}
/*
else {
foreach ($maincategoriesempl as $key => $value) {
if ($id == $key."/") {
$page = ereg_replaceFF("\/$","",$id);
include $basedir.'/employers_content/index.html';
exit;
}
}
}
*/
include $basedir.'/jobs_content/browse.php';
?>