diff --git a/common_config.php b/common_config.php index 326a88e..c8e91b4 100644 --- a/common_config.php +++ b/common_config.php @@ -2,7 +2,7 @@ /* * Onion Link List - Configuration * -* Copyright (C) 2016 Daniel Winzen +* Copyright (C) 2016-2020 Daniel Winzen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -40,6 +40,7 @@ $categories=['Unsorted', 'Adult/Porn', 'Communication/Social', 'Forums', 'Hackin // Language selection +$I = []; $L=[ 'de' => 'Deutsch', 'en' => 'English', diff --git a/cron/phishing_tests.php b/cron/phishing_tests.php index 08a62b4..ba72e65 100644 --- a/cron/phishing_tests.php +++ b/cron/phishing_tests.php @@ -1,7 +1,7 @@ PDO::ERRMODE_WARNING, PDO::ATTR_PERSISTENT=>PERSISTENT]); }catch(PDOException $e){ diff --git a/cron/scam_tests.php b/cron/scam_tests.php index 387df3f..6710c9f 100644 --- a/cron/scam_tests.php +++ b/cron/scam_tests.php @@ -1,7 +1,7 @@ PDO::ERRMODE_WARNING, PDO::ATTR_PERSISTENT=>PERSISTENT]); }catch(PDOException $e){ diff --git a/cron/tests.php b/cron/tests.php index c5f974b..de4476b 100644 --- a/cron/tests.php +++ b/cron/tests.php @@ -1,6 +1,6 @@ PDO::ERRMODE_WARNING, PDO::ATTR_PERSISTENT=>PERSISTENT]); }catch(PDOException $e){ diff --git a/cron/update.php b/cron/update.php index 76c0adb..b090773 100644 --- a/cron/update.php +++ b/cron/update.php @@ -1,6 +1,6 @@ PDO::ERRMODE_WARNING, PDO::ATTR_PERSISTENT=>PERSISTENT]); }catch(PDOException $e){ diff --git a/helpers/fill_unknown_phishing.php b/helpers/fill_unknown_phishing.php index e090fea..b2b67a8 100644 --- a/helpers/fill_unknown_phishing.php +++ b/helpers/fill_unknown_phishing.php @@ -1,5 +1,5 @@ PDO::ERRMODE_WARNING, PDO::ATTR_PERSISTENT=>PERSISTENT]); }catch(PDOException $e){ diff --git a/helpers/tmp.php b/helpers/tmp.php index 701a278..4465ca8 100644 --- a/helpers/tmp.php +++ b/helpers/tmp.php @@ -1,5 +1,5 @@ PDO::ERRMODE_WARNING, PDO::ATTR_PERSISTENT=>true]); }catch(PDOException $e){ diff --git a/helpers/tmp2.php b/helpers/tmp2.php index 389c5ae..aecd7c3 100644 --- a/helpers/tmp2.php +++ b/helpers/tmp2.php @@ -1,5 +1,5 @@ PDO::ERRMODE_WARNING, PDO::ATTR_PERSISTENT=>true]); }catch(PDOException $e){ diff --git a/helpers/tmp3.php b/helpers/tmp3.php index 6ffea32..de67358 100644 --- a/helpers/tmp3.php +++ b/helpers/tmp3.php @@ -1,5 +1,5 @@ PDO::ERRMODE_WARNING, PDO::ATTR_PERSISTENT=>true]); }catch(PDOException $e){ diff --git a/helpers/tmp4.php b/helpers/tmp4.php index b120454..d4877f4 100644 --- a/helpers/tmp4.php +++ b/helpers/tmp4.php @@ -1,5 +1,5 @@ PDO::ERRMODE_WARNING, PDO::ATTR_PERSISTENT=>true]); }catch(PDOException $e){ diff --git a/helpers/tmp5.php b/helpers/tmp5.php index b01fad8..e493237 100644 --- a/helpers/tmp5.php +++ b/helpers/tmp5.php @@ -1,5 +1,5 @@ PDO::ERRMODE_WARNING, PDO::ATTR_PERSISTENT=>true]); }catch(PDOException $e){ diff --git a/helpers/tmp6.php b/helpers/tmp6.php index e8f77c6..ac95b01 100644 --- a/helpers/tmp6.php +++ b/helpers/tmp6.php @@ -1,5 +1,5 @@ PDO::ERRMODE_WARNING, PDO::ATTR_PERSISTENT=>true]); }catch(PDOException $e){ diff --git a/helpers/tmp7.php b/helpers/tmp7.php index 0bb7e89..3cdb6df 100644 --- a/helpers/tmp7.php +++ b/helpers/tmp7.php @@ -1,5 +1,5 @@ PDO::ERRMODE_WARNING, PDO::ATTR_PERSISTENT=>true]); }catch(PDOException $e){ diff --git a/lang_de.php b/lang_de.php index 160a0fe..029aa23 100644 --- a/lang_de.php +++ b/lang_de.php @@ -68,4 +68,3 @@ $T=[ 'format' => 'Format', 'hidelocked' => 'Gesperrte nicht anzeigen', ]; -?> diff --git a/lang_ru.php b/lang_ru.php index 2134a46..32cc0cd 100644 --- a/lang_ru.php +++ b/lang_ru.php @@ -2,7 +2,7 @@ /* * Onion Link List - Russian translation * -* Copyright (C) 2016 Daniel Winzen +* Copyright (C) 2016-2020 Daniel Winzen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/lang_update.php b/lang_update.php index a7a45a3..6db58eb 100644 --- a/lang_update.php +++ b/lang_update.php @@ -8,7 +8,7 @@ echo " +* Copyright (C) 2016-2020 Daniel Winzen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/setup.php b/setup.php index 00a0fb8..59732ca 100644 --- a/setup.php +++ b/setup.php @@ -2,7 +2,7 @@ /* * Onion Link List - Setup * -* Copyright (C) 2016 Daniel Winzen +* Copyright (C) 2016-2020 Daniel Winzen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -include('common_config.php'); +require_once('common_config.php'); if(!extension_loaded('pdo_mysql')){ die($I['pdo_mysqlextrequired']); } diff --git a/www/admin.php b/www/admin.php index 7dd5824..37d98d1 100644 --- a/www/admin.php +++ b/www/admin.php @@ -3,7 +3,7 @@ header('Content-Type: text/html; charset=UTF-8'); if($_SERVER['REQUEST_METHOD']==='HEAD'){ exit; // headers sent, no further processing needed } -include('../common_config.php'); +require_once('../common_config.php'); try{ $db=new PDO('mysql:host=' . DBHOST . ';dbname=' . DBNAME . ';charset=utf8mb4', DBUSER, DBPASS, [PDO::ATTR_ERRMODE=>PDO::ERRMODE_WARNING, PDO::ATTR_PERSISTENT=>PERSISTENT]); }catch(PDOException $e){ diff --git a/www/onions.php b/www/onions.php index 260fd57..1c8dcf7 100644 --- a/www/onions.php +++ b/www/onions.php @@ -2,7 +2,7 @@ /* * Onion Link List - Main listing script * -* Copyright (C) 2016 Daniel Winzen +* Copyright (C) 2016-2020 Daniel Winzen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,7 +21,7 @@ if($_SERVER['REQUEST_METHOD']==='HEAD'){ exit; // ignore headers, no further processing needed } -include('../common_config.php'); +require_once('../common_config.php'); try{ $db=new PDO('mysql:host=' . DBHOST . ';dbname=' . DBNAME . ';charset=utf8mb4', DBUSER, DBPASS, [PDO::ATTR_ERRMODE=>PDO::ERRMODE_WARNING, PDO::ATTR_PERSISTENT=>PERSISTENT]); }catch(PDOException $e){ diff --git a/www/test.php b/www/test.php index 7839f96..1aa6112 100644 --- a/www/test.php +++ b/www/test.php @@ -4,7 +4,7 @@ header('Cache-Control: max-age=600'); if($_SERVER['REQUEST_METHOD']==='HEAD'){ exit; // headers sent, no further processing needed } -include('../common_config.php'); +require_once('../common_config.php'); echo ''; echo "$I[testtitle]"; echo ''; @@ -63,7 +63,6 @@ if(!empty($_REQUEST['addr'])){ echo "

Warning: This is a known scam!

"; } $stmt=$db->prepare('SELECT null FROM ' . PREFIX . 'onions WHERE md5sum=? AND timediff=0 AND lasttest>?;'); -// $stmt->execute([$md5, time()-6]); $stmt->execute([$md5, time()-60]); if($stmt->fetch(PDO::FETCH_NUM)){ echo "

$I[testonline]

";