Compare commits
28 Commits
06a3112617
...
stable/1.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e426509b6 | ||
|
|
c477afabb0 | ||
|
|
ea745b5dbb | ||
| 1184d1415a | |||
| 2030fbce57 | |||
|
|
5f3879e48c | ||
|
|
051747f114 | ||
|
|
0a96927e50 | ||
|
|
57f254ea39 | ||
|
|
05903ce02d | ||
|
|
9a024c5c88 | ||
|
|
f9a0e41889 | ||
|
|
e17e570114 | ||
| 50b3d192ba | |||
|
|
b2e6260dfb | ||
|
|
ed87d341ab | ||
|
|
df5d1447af | ||
|
|
2352fd5396 | ||
|
|
385a02c90f | ||
|
|
8638f28847 | ||
|
|
5f2502877b | ||
|
|
8eccdffb1e | ||
|
|
c858d5dd32 | ||
|
|
234e187a54 | ||
| d8f5fd7f3a | |||
|
|
a30fd21842 | ||
|
|
57421ead5e | ||
| a846fe2fa7 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@
|
|||||||
/secret.php
|
/secret.php
|
||||||
/config.php
|
/config.php
|
||||||
/test.php
|
/test.php
|
||||||
|
/_secret.php
|
||||||
|
|||||||
@@ -1,4 +1,2 @@
|
|||||||
# php-func-lib
|
# php-func-lib
|
||||||
git submodule add https://git.seemsleg.it/ef/php-func-lib lib
|
git submodule add https://git.seemsleg.it/pub/php-func-lib lib
|
||||||
|
|
||||||
test
|
|
||||||
|
|||||||
@@ -6,5 +6,5 @@ include_once ('string.php');
|
|||||||
include_once ('numbers.php');
|
include_once ('numbers.php');
|
||||||
include_once ('mail.php');
|
include_once ('mail.php');
|
||||||
include_once ('debug.php');
|
include_once ('debug.php');
|
||||||
include_once ('markdown.php');
|
// include_once ('markdown.php');
|
||||||
?>
|
?>
|
||||||
18
ips/crawler.php
Normal file
18
ips/crawler.php
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
$_ips_crawler = array (
|
||||||
|
'40.77.167.', // bing bot
|
||||||
|
'66.249.',
|
||||||
|
'62.138.',
|
||||||
|
'62.210.149.60',
|
||||||
|
'92.118.160.37', // netsystem research bot
|
||||||
|
'104.155.85.', // google
|
||||||
|
'114.119.1', // petalbot
|
||||||
|
'185.191.171.', // semrush bot
|
||||||
|
'207.46.13.124', // bing bot
|
||||||
|
'54.36.148.', // ahrefbot
|
||||||
|
'216.244.66.196', // opensiteexplorer
|
||||||
|
'65.21.180.26', // seekport
|
||||||
|
'81.209.177.145', // website-datenbank.de
|
||||||
|
'2a01:4f8:190:4244::2' // mj12bot
|
||||||
|
);
|
||||||
|
?>
|
||||||
11
mail.php
11
mail.php
@@ -1,8 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
function send_mail($an, $betreff, $text, $ok = '', $error = '') {
|
||||||
function send_mail($an, $betreff, $text, $ok = '', $error = '')
|
include 'secret.php';
|
||||||
{
|
$sender = 'noreply@troy-grunt.de';
|
||||||
$header = 'From: noreply@isleofhope.de' . "\r\n";
|
if (isset ( $_sendermail )) {
|
||||||
|
$sender = $_sendermail;
|
||||||
|
}
|
||||||
|
$header = 'From: ' . $sender . "\r\n";
|
||||||
$header .= 'To: ' . $an . "\r\n";
|
$header .= 'To: ' . $an . "\r\n";
|
||||||
$header .= 'Content-Type:text/html' . "\r\n";
|
$header .= 'Content-Type:text/html' . "\r\n";
|
||||||
$header .= 'Content-Transfer-Encoding: 8bit' . "\r\n";
|
$header .= 'Content-Transfer-Encoding: 8bit' . "\r\n";
|
||||||
|
|||||||
84
markdown.php
84
markdown.php
@@ -1,84 +0,0 @@
|
|||||||
<?php
|
|
||||||
// TODO markdown imple
|
|
||||||
function md($str) {
|
|
||||||
// return nl2br ( $str ); // TODO md problem
|
|
||||||
$text = '<p>';
|
|
||||||
$lv = 0;
|
|
||||||
$str = explode ( "\n", str_replace ( "\r\n", "\n", $str ) );
|
|
||||||
// var_dump ( $str );
|
|
||||||
foreach ( $str as $t ) {
|
|
||||||
// echo '<pre>' . $t . '</pre>';
|
|
||||||
$t = preg_replace_callback ( '/\[\[([^\]]*)\]\]/m', '_md_link_replacer', $t );
|
|
||||||
$nlv = 0;
|
|
||||||
if (startsWith ( $t, '**** ' )) {
|
|
||||||
// echo - 1;
|
|
||||||
$t = substr ( $t, 5 );
|
|
||||||
$nlv = 4;
|
|
||||||
}
|
|
||||||
if (startsWith ( $t, '*** ' )) {
|
|
||||||
// echo - 2;
|
|
||||||
$t = substr ( $t, 4 );
|
|
||||||
$nlv = 3;
|
|
||||||
}
|
|
||||||
if (startsWith ( $t, '** ' )) {
|
|
||||||
// echo - 3;
|
|
||||||
$t = substr ( $t, 3 );
|
|
||||||
$nlv = 2;
|
|
||||||
}
|
|
||||||
if (startsWith ( $t, '* ' )) {
|
|
||||||
// echo - 4;
|
|
||||||
$t = substr ( $t, 2 );
|
|
||||||
$nlv = 1;
|
|
||||||
}
|
|
||||||
if ($lv != $nlv) {
|
|
||||||
while ( $lv < $nlv ) {
|
|
||||||
// echo '-5 (' . $lv . '-' . $nlv . ')';
|
|
||||||
$text .= '<ul>';
|
|
||||||
$lv ++;
|
|
||||||
}
|
|
||||||
while ( $lv > $nlv ) {
|
|
||||||
// echo '-6 (' . $lv . '-' . $nlv . ')';
|
|
||||||
$text .= '</ul>';
|
|
||||||
$lv --;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (startsWith ( $t, '!!!!! ' )) {
|
|
||||||
$t = '<h5>' . substr ( $t, 6 ) . '</h5>';
|
|
||||||
}
|
|
||||||
if (startsWith ( $t, '!!!! ' )) {
|
|
||||||
$t = '<h4>' . substr ( $t, 5 ) . '</h4>';
|
|
||||||
}
|
|
||||||
if (startsWith ( $t, '!!! ' )) {
|
|
||||||
$t = '<h3>' . substr ( $t, 4 ) . '</h3>';
|
|
||||||
}
|
|
||||||
if (startsWith ( $t, '!! ' )) {
|
|
||||||
$t = '<h2>' . substr ( $t, 3 ) . '</h2>';
|
|
||||||
}
|
|
||||||
if (startsWith ( $t, '! ' )) {
|
|
||||||
$t = '<h1>' . substr ( $t, 2 ) . '</h1>';
|
|
||||||
}
|
|
||||||
if ($lv == 0) {
|
|
||||||
if ($t == '') {
|
|
||||||
$text .= '</p><p>';
|
|
||||||
} else {
|
|
||||||
$text .= $t;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$text .= '<li>' . $t . '</li>';
|
|
||||||
}
|
|
||||||
// var_dump ( $t );
|
|
||||||
}
|
|
||||||
while ( $lv > 0 ) {
|
|
||||||
$text .= '</ul>';
|
|
||||||
$lv --;
|
|
||||||
}
|
|
||||||
$text .= '</p>';
|
|
||||||
return $text;
|
|
||||||
}
|
|
||||||
function _md_link_replacer($in) {
|
|
||||||
// var_dump ( $in );
|
|
||||||
$in = explode ( '|', $in [1], 2 );
|
|
||||||
|
|
||||||
return '<a href="' . $in [0] . '" target="_blank">' . (isset ( $in [1] ) ? $in [1] : $in [0]) . '</a>';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
@@ -7,4 +7,6 @@ $_m['pass'] = '';
|
|||||||
$_m['data'] = '';
|
$_m['data'] = '';
|
||||||
$_m['pre'] = 'efcms2_';
|
$_m['pre'] = 'efcms2_';
|
||||||
$_m['salt'] = '';
|
$_m['salt'] = '';
|
||||||
|
|
||||||
|
$_sendermail = 'noreply@troy-grunt.de';
|
||||||
?>
|
?>
|
||||||
10
string.php
10
string.php
@@ -257,4 +257,14 @@ function onlySimpleHTML($s) {
|
|||||||
|
|
||||||
return $s;
|
return $s;
|
||||||
}
|
}
|
||||||
|
function linkify($input) {
|
||||||
|
$pattern = '@(http(s)?://[a-zA-Z0-9/\.\#\-\_]*)@';
|
||||||
|
return $output = preg_replace ( $pattern, '<a href="$1">$1</a>', $input );
|
||||||
|
}
|
||||||
|
function inStr($needle, $haystack) {
|
||||||
|
if (strpos ( $haystack, $needle ) !== false) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
Reference in New Issue
Block a user