Updated copyright + use require_once instead of include

This commit is contained in:
Daniel Winzen
2020-10-15 17:25:49 +02:00
parent d078a3e9ad
commit d789b1569e
20 changed files with 22 additions and 23 deletions

View File

@ -2,7 +2,7 @@
/*
* Onion Link List - Configuration
*
* Copyright (C) 2016 Daniel Winzen <daniel@danwin1210.me>
* Copyright (C) 2016-2020 Daniel Winzen <daniel@danwin1210.me>
*
* 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',

View File

@ -1,7 +1,7 @@
<?php
// Executed every 25 hours via cron - checks for phishing clones on known phishing sites.
date_default_timezone_set('UTC');
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){

View File

@ -1,7 +1,7 @@
<?php
// Executed daily via cronjob - checks for phishing clones on known phishing sites.
date_default_timezone_set('UTC');
include('../common_config.php');
require_once('../common_config.php');
try{
$db=new PDO('mysql:host=' . DBHOST . ';dbname=' . DBNAME, DBUSER, DBPASS, [PDO::ATTR_ERRMODE=>PDO::ERRMODE_WARNING, PDO::ATTR_PERSISTENT=>PERSISTENT]);
}catch(PDOException $e){

View File

@ -1,6 +1,6 @@
<?php
// Cron job started every 15 minutes - up/down checks
include('../common_config.php');
require_once('../common_config.php');
try{
$db=new PDO('mysql:host=' . DBHOST . ';dbname=' . DBNAME, DBUSER, DBPASS, [PDO::ATTR_ERRMODE=>PDO::ERRMODE_WARNING, PDO::ATTR_PERSISTENT=>PERSISTENT]);
}catch(PDOException $e){

View File

@ -1,6 +1,6 @@
<?php
// Executed daily via cronjob - checks for new sites.
include('../common_config.php');
require_once('../common_config.php');
try{
$db=new PDO('mysql:host=' . DBHOST . ';dbname=' . DBNAME, DBUSER, DBPASS, [PDO::ATTR_ERRMODE=>PDO::ERRMODE_WARNING, PDO::ATTR_PERSISTENT=>PERSISTENT]);
}catch(PDOException $e){

View File

@ -1,5 +1,5 @@
<?php
include('../common_config.php');
require_once('../common_config.php');
try{
$db=new PDO('mysql:host=' . DBHOST . ';dbname=' . DBNAME, DBUSER, DBPASS, [PDO::ATTR_ERRMODE=>PDO::ERRMODE_WARNING, PDO::ATTR_PERSISTENT=>PERSISTENT]);
}catch(PDOException $e){

View File

@ -1,5 +1,5 @@
<?php
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=>true]);
}catch(PDOException $e){

View File

@ -1,5 +1,5 @@
<?php
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=>true]);
}catch(PDOException $e){

View File

@ -1,5 +1,5 @@
<?php
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=>true]);
}catch(PDOException $e){

View File

@ -1,5 +1,5 @@
<?php
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=>true]);
}catch(PDOException $e){

View File

@ -1,5 +1,5 @@
<?php
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=>true]);
}catch(PDOException $e){

View File

@ -1,5 +1,5 @@
<?php
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=>true]);
}catch(PDOException $e){

View File

@ -1,5 +1,5 @@
<?php
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=>true]);
}catch(PDOException $e){

View File

@ -68,4 +68,3 @@ $T=[
'format' => 'Format',
'hidelocked' => 'Gesperrte nicht anzeigen',
];
?>

View File

@ -2,7 +2,7 @@
/*
* Onion Link List - Russian translation
*
* Copyright (C) 2016 Daniel Winzen <daniel@danwin1210.me>
* Copyright (C) 2016-2020 Daniel Winzen <daniel@danwin1210.me>
*
* 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

View File

@ -8,7 +8,7 @@ echo "<?php
/*
* Onion Link List - $english translation
*
* Copyright (C) 2016 Daniel Winzen <daniel@danwin1210.me>
* Copyright (C) 2016-2020 Daniel Winzen <daniel@danwin1210.me>
*
* 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

View File

@ -2,7 +2,7 @@
/*
* Onion Link List - Setup
*
* Copyright (C) 2016 Daniel Winzen <daniel@danwin1210.me>
* Copyright (C) 2016-2020 Daniel Winzen <daniel@danwin1210.me>
*
* 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 <http://www.gnu.org/licenses/>.
*/
include('common_config.php');
require_once('common_config.php');
if(!extension_loaded('pdo_mysql')){
die($I['pdo_mysqlextrequired']);
}

View File

@ -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){

View File

@ -2,7 +2,7 @@
/*
* Onion Link List - Main listing script
*
* Copyright (C) 2016 Daniel Winzen <daniel@danwin1210.me>
* Copyright (C) 2016-2020 Daniel Winzen <daniel@danwin1210.me>
*
* 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){

View File

@ -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 '<!DOCTYPE html><html><head>';
echo "<title>$I[testtitle]</title>";
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';
@ -63,7 +63,6 @@ if(!empty($_REQUEST['addr'])){
echo "<p class=\"red\">Warning: This is a known scam!</p>";
}
$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 "<p class=\"green\">$I[testonline]</p>";