//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(1);
//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();
}
}
?>
$isforum = 1;
#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);
}
//Redirects to correct root with final slash (3-15-2016)...
if (preg_match("/^\/forums$/", $urlinput)) {
$destino = $urlinput."/";
header("HTTP/1.1 301 Moved Permanently");
header("Location: $destino");
exit;
}
#print "dopo: $urlinput";
$id = substr ($urlinput,8,strlen($urlinput)-7);
#print "ecco id: $id";
#Pulisce $id da parametri dopo ?...
$id = ereg_replaceFF("\?.+$","",$id);
#Definisce categorie, threads e post...
#print "eccolo prima: $id";
list($category,$forum,$topic,$post,$null) = explode("/",$id);
//This one added on 9/23/19, 11:28 AM...
if (!is_numeric($post)) {
$post = '';
}
//If there are more parameters, 404! 8-5-2013...
if ($null) {
include $basedir.'/404.html';
exit;
}
#Controlla che i campi ci siano corretti...
if (!$category and $forum) {
errormessage("");
exit;
}
elseif (!$forum and $topic and $category) {
errormessage("");
exit;
}
elseif (!$topic and $post and $category) {
errormessage("");
exit;
}
//Checks if the requested forums belongs to the requested category, if not
//301 redirects accordingly (SEO 8-30-013)...
#Takes this forum_id from $topic and checks...
$queryCKSEO = "SELECT forum_id FROM forums WHERE topic_id = '$topic'";
$resultCKSEO = mysql_queryFF($queryCKSEO);
$nitemsCKSEO = mysql_num_rowsFF($resultCKSEO);
if ($nitemsCKSEO) {
$forum_idCK = mysql_resultFF($resultCKSEO,0, 'forum_id');
if ($forum_idCK != $forum) {//Redirects to the right one!
$destino = "/forums/".$categorycall[$forum_idCK]."/".$forum_idCK."/".$topic."/";
if ($post) {
$destino .= $post."/";
}
header("HTTP/1.1 301 Moved Permanently");
header("Location: $destino");
exit;
//print "ecco: $category - $forum - $topic - $post";
}
}
//Tests if requested forum exists (8-12-2013)...
if ($category and !$forumsmaincategories[$category]) {
include $basedir.'/404.html';
exit;
}
//If single post, checks if it is correct 8-5-2013...
if ($post) {
$queryTOPICCK1 = "SELECT * FROM forum_topics WHERE mess_id = $post";
$resultTOPICCK1 = mysql_queryFF($queryTOPICCK1);
$nitemsTOPICCK1 = mysql_num_rowsFF($resultTOPICCK1);
if (!$nitemsTOPICCK1) {
include $basedir.'/404.html';
exit;
}
else {//Sets canonical...
$canonical = $basesite.'/'.$category.'/'.$forum.'/'.$topic;
}
}
#print "eccolo: $unsubscribe";
#Se c'e' il comando unsubscribe, toglie sottoscrizione da topic singolo o completo...
if ($unsubscribe) {
if ($logged and $unsubscribe == $MEMBERid) { #Deve essere legittimo!
##Ora controlla se e' un unsibscribe singol topic oppure totale...
if ($topic) {
$queryhere = "UPDATE forum_topics SET notification = 0 WHERE topic_id = $topic and user_id = $unsubscribe";
$resulthere = mysql_queryFF($queryhere);
#print "ecco: $queryhere";
}
else {
$queryhere = "UPDATE forum_topics SET notification = 0 WHERE user_id = $unsubscribe";
$resulthere = mysql_queryFF($queryhere);
#print "ecco: $queryhere";
}
include $basedir.'/forums_content/index.html';
exit;
}
else {
$requesteduriparsed = urlencode($REQUEST_URI);
$destino = "/login/?ref=".$requesteduriparsed;
header("Location: $destino");
exit;
}
}
if ($search) {
include $basedir.'/search/search_functions.inc';
$origsearch = $search;
$search = cleaninput($search);
if ($where == 1 or $where == 2 or !$where) { #Ricerca in all forums or specific forum...
include $basedir.'/forums_content/browse.php';
exit;
}
elseif ($where == 3) { #Ricerca in specific topic...
}
}
elseif ($id == "") {
include $basedir.'/forums_content/index.html';
exit;
}
elseif ($id == "index.php") {#Google fixing 3-26-2012...
header("HTTP/1.1 301 Moved Permanently");
header("Location: /forums/");
exit;
}
else {
foreach ($forumsmaincategories as $key => $value) {
if ($id == $key."/") {
$page = ereg_replaceFF("\/$","",$id);
include $basedir.'/forums_content/index.html';
exit;
}
}
}
if (!eregFF("/",$id)) {
include $basedir.'/404.html';
}
else {
include $basedir.'/forums_content/browse.php';
}
?>