🐘 Functions.inc.php (Php) 121.4 KB 2024-04-28
PHP module for Functions.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | <?php
/*
Copyright (c) 2023, Sebastian Enger, M.Sc.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree (BSD-4-Clause).
Frontend and Backend Source Code for Project:
- https://www.artikelschreiber.com/
- https://www.artikelschreiben.com/
- https://www.unaique.net/
*/
#error_reporting(E_ALL);
#ini_set('display_errors', 1);
// setting error logging to be active
//ini_set("log_errors", TRUE);
// setting the logging file in php.ini
#ini_set('error_log', "/tmp/phperrors.txt");
require_once("/home/www/wwwartikelschreiber/libraryv3/Language.inc.php");
require_once("/home/www/wwwartikelschreiber/libraryv3/Security.inc.php");
//require_once("/home/www/wwwartikelschreiber/libraryv3/Sphinx.inc.php");
//require_once("/home/www/wwwartikelschreiber/libraryv3/GeoIP2/vendor/autoload.php");
//use GeoIp2\Database\Reader;
class Functions {
public function getAdditionalNewsLinks($myLanguage){
$Secu = new Security();
$dom = new DOMDocument();
//$Func = new Functions();
libxml_use_internal_errors(true);
$blog_path = "/home/www/wwwartikelschreiber/texts/";
$files = scandir($blog_path);
shuffle($files);
$url = "https://www.artikelschreiber.com/texts/";
//$myLanguage = "de";
//$myLanguageAvailable = array("de","it","es","en","fr");
$myHTML = '<ul role="list">';
$myMaxLinks = 7;
$myMaxLinksCounter = 0;
for ($y=0; $y<count($files) - 1; $y++){
$myFile = $files[$y];
$myfinfile = $blog_path."/".$myFile;
if ($myMaxLinksCounter > $myMaxLinks){
break;
... [truncated, 3191 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "Functions.inc.php",
"description": "PHP module for Functions.inc",
"dateModified": "2024-04-28",
"dateCreated": "2025-03-23",
"contentSize": "121.4 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/unaiquenet/Frontend/libraryv3/Functions.inc.php",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Php"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/unaiquenet/Frontend/libraryv3/"
}
🐘 HTMLMinifier.php (Php) 41.7 KB 2024-04-28
PHP module for HTMLMinifier
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | <?php
/*
HTML Minifier
=============
This is a static PHP class that minifies HTML. To use it, call HTMLMinifier::process() and pass your
HTML into it. You can also initialise it so that you can use the function non-statically. Either way
is fine.
@author Terence Pek <terence@terresquall.com>
@website www.terresquall.com
@version 3.1.0
@dated 27/06/2018
@notes - Fixed a bug with the 'ignore_async_and_defer_tags' option. They behaved opposite of what they should have.
- Fixed a bug causing <style scoped> tags to not have their comments cleaned.
- Fixed a bug with <style> types nested in IE conditional tags causing a fatal error.
- <script> tags that have an 'id' attribute are no longer merged with other scripts.
- Non-Javascript <script> tags are no longer moved, and Javascript comments in them are no longer removed.
- Added support for 'compression_ignored_tags' and deprecated 'compression_ignore_script_tags'.
- Double slashes (//) in Javascript regex blocks no longer get identified as comments.
- Added support for minifying JS / CSS files.
- Modified ::compress() so that it can now exclude tags from compression. Excluded <textarea> tags from being compressed.
- Make get_tags() handle nested tags.
Fixed a bug where any Javascript blocks with CDATA will not have their comments cleaned.
Resolved a few bugs with whitespace being left behind if you choose to not compress script tags.
Fixed a bug that caused chunks of non-conditional commented content to be removed.
- Made $CacheFolder more lenient with directory separators.
*/
class HTMLMinifier {
public static $CacheFolder = ''; // Set this at the end of the file. If empty, there will be no caching.
public static $CacheExpiry = 86400; // Time in seconds. 86400 is 1 day.
const VERSION = '3.1.0';
const SIGNATURE = 'Original size: %d bytes, minified: %d bytes. HTMLMinifier: www.terresquall.com/web/html-minifier.';
const CACHE_SIG = 'Server cached on %s.';
static $Signature; // Signature processed by sprintf() is placed here.
// For documentation.
static $CompressionMode = array(
'none' => 'None',
//'pretty_indent' => 'Pretty indent',
'all_whitespace_not_newlines' => 'All whitespace except newlines',
'all_whitespace' => 'All whitespaces'
);
static $Defaults = array(
// General options.
'clean_html_comments' => true,
'merge_multiple_head_tags' => true,
... [truncated, 979 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "HTMLMinifier.php",
"description": "PHP module for HTMLMinifier",
"dateModified": "2024-04-28",
"dateCreated": "2025-03-23",
"contentSize": "41.7 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/unaiquenet/Frontend/libraryv3/HTMLMinifier.php",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Php"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/unaiquenet/Frontend/libraryv3/"
}
🐘 Language.inc.php (Php) 34.4 KB 2024-04-28
PHP module for Language.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | <?php
/*
Copyright (c) 2023, Sebastian Enger, M.Sc.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree (BSD-4-Clause).
Frontend and Backend Source Code for Project:
- https://www.artikelschreiber.com/
- https://www.artikelschreiben.com/
- https://www.unaique.net/
*/
class Language {
public function writeAuthorText($language){ // in Language.inc.php auslagern
if (strcasecmp($language,"de") == 0){
$html =<<<END
<ul role="list">
<li lang="de" role="listitem">Dieser Artikel wurde mit dem kostenlosen ArtikelSchreiber.com zum <a href="https://www.artikelschreiber.com/" target="_self" hreflang="de" title="https://www.artikelschreiber.com/">Text schreiben</a> erstellt. </li>
<li lang="de" role="listitem">Unsere weiteren kostenlose Dienste mit KI sind https://www.unaique.net/, der <a href="https://www.unaique.net/" target="_self" title="https://www.unaique.net/" hreflang="de">KI Text Generator</a>
<li lang="de" role="listitem">Wir bieten einen kostenlosen KI Content Generator auf www.unaique.com als <a href='https://www.unaique.com/' title='AI WRITER - Content Generator | UNAIQUE.COM' target='_self' hreflang='en'>AI WRITER</a>.</li>
<li lang="de" role="listitem">Auf <a href="https://rechthaben.net/" target="_self" title="https://rechthaben.net/" hreflang="de">Recht Haben</a> bieten wir kostenlose Anleitungen und Muster, wie man sich mit Recht wehrt.</li>
</ul>
END;
} else {
$html =<<<END
<ul role="list">
<li lang="en" role="listitem">This Article Text has been written automatically with the free of cost service <a href="https://www.artikelschreiber.com/" target="_self" hreflang="de" title="https://www.artikelschreiber.com/">Text schreiben</a>. </li>
<li lang="en" role="listitem">Our other free services are https://www.unaique.net/ called <a href="https://www.unaique.net/" target="_self" title="https://www.unaique.net/" hreflang="de">KI Text Generator</a>
<li lang="en" role="listitem">We offer a free of costs AI Content Generator based on GPT-3 and GPT-4 on the Website <a href='https://www.unaique.com/' title='AI WRITER - Content Generator | UNAIQUE.COM' target='_self' hreflang='en'>AI WRITER</a></li>
<li lang="de" role="listitem">Auf <a href="https://rechthaben.net/" target="_self" title="https://rechthaben.net/" hreflang="de">Recht Haben</a> bieten wir Anleitungen und Muster, wie man sich mit Recht wehrt.</li>
</ul>
END;
}
return $html;
} // function writeAuthorText(){
public function checkExistingLanguage($lang){
$valid_langs = array('de','en','es','fr','it','jp','in','sa','cn','ru','tr','pt','ja','ar','zh');
if (strlen($lang) == 2){
if (in_array($lang, $valid_langs)){
return True;
} // if (in_array($lang, $valid_langs)){
} // if (strlen($lang) == 2){
return False;
} // public function checkExistingLanguage($lang){
public function getLanguageArtikelSprache(){
$language_array = array(
'de' => "Dein Artikel ist in <strong>deutscher Sprache</strong> geschrieben", // de
... [truncated, 385 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "Language.inc.php",
"description": "PHP module for Language.inc",
"dateModified": "2024-04-28",
"dateCreated": "2025-03-23",
"contentSize": "34.4 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/unaiquenet/Frontend/libraryv3/Language.inc.php",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Php"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/unaiquenet/Frontend/libraryv3/"
}
🐘 Minify.inc.php (Php) 1.1 KB 2024-04-28
PHP module for Minify.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 | <?php
/*
Copyright (c) 2023, Sebastian Enger, M.Sc.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree (BSD-4-Clause).
Frontend and Backend Source Code for Project:
- https://www.artikelschreiber.com/
- https://www.artikelschreiben.com/
- https://www.unaique.net/
*/
require_once("/home/www/wwwartikelschreiber/libraryv3/HTMLMinifier.php");
// Source: https://www.terresquall.com/web/html-minifier/
class Minify {
public function doMinify($html){
HTMLMinifier::$CacheFolder = "/dev/shm/"; // Cached files are stored in 'mycodefolder'.
return HTMLMinifier::process(
$html,
array(
// 'shift_script_tags_to_bottom' => array( 'combine_javascript_in_script_tags' => true ),
'compression_ignore_script_tags' => false,
'combine_style_tags' => true,
// 'shift_script_tags_to_bottom' => true,
'show_signature' => false,
'combine_javascript_in_script_tags' => true,
'compression_mode' => 'all_whitespace',
)
); // return HTMLMinifier::process(;
}
} // class Minify {
?>
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "Minify.inc.php",
"description": "PHP module for Minify.inc",
"dateModified": "2024-04-28",
"dateCreated": "2025-03-23",
"contentSize": "1.1 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/unaiquenet/Frontend/libraryv3/Minify.inc.php",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Php"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/unaiquenet/Frontend/libraryv3/"
}
🐘 Security.inc.php (Php) 4.2 KB 2024-04-28
PHP module for Security.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | <?php
/*
Copyright (c) 2023, Sebastian Enger, M.Sc.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree (BSD-4-Clause).
Frontend and Backend Source Code for Project:
- https://www.artikelschreiber.com/
- https://www.artikelschreiben.com/
- https://www.unaique.net/
*/
#require_once '/home/www/wwwartikelschreiber/libraryv3/GeoIP2/vendor/autoload.php';
#use GeoIp2\Database\Reader;
class Security {
public function isBadEntry($text){
// https://stackoverflow.com/questions/310572/regex-in-php-to-match-that-arent-html-entities
if (preg_match("/&[a-z]{1,};/i", $text) != 0){ // example match: ".),&39;((&34;.(,"
return True; //isBad
}
if (preg_match("/&[0-9]{1,};/i", $text) != 0){ // example match: ".),&39;((&34;.(,"
return True; //isBad
}
return False;
} // public function ignoreInfrigmentCity(){
public function sanitizeForJsonOption($req){
// Entferne boesartigen MYSQL Code
$sql_code = array (
"\"",
'"',
',',
'"',
'\'',
';'
);
$replace = array('','','','');
$content = str_ireplace($sql_code,$replace,$req);
return $content;
} // public function sanitizeRequest($req){
public function sanitizeRequestSimple($req){
$mk_badflag = $this->isBadEntry($req);
if ($mk_badflag === True){
$req = "";
}
// Entferne boesartigen MYSQL Code
... [truncated, 96 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "Security.inc.php",
"description": "PHP module for Security.inc",
"dateModified": "2024-04-28",
"dateCreated": "2025-03-23",
"contentSize": "4.2 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/unaiquenet/Frontend/libraryv3/Security.inc.php",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Php"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/unaiquenet/Frontend/libraryv3/"
}
🐘 Template.inc.php (Php) 3.1 KB 2024-04-28
PHP module for Template.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | <?php
/* Template System created by Andi */
class Template {
public static $dir;
public static function setPath($dir) {
self::$dir = $dir;
}
//return parsed file
private function parse($file) {
# if (ob_get_length() > 0) {
# ob_end_clean();
# }
#
# ob_start();
# @include($file);
# $buffer = ob_get_contents();
# ob_end_clean();
$buffer = file_get_contents($file);
return trim($buffer);
}
private function readCache($cacheFile,$expireTime) {
if(file_exists(self::$dir.'/cache/'.$cacheFile)&&filemtime(self::$dir.'/cache/'.$cacheFile) > (time()-$expireTime)){
return file_get_contents(self::$dir.'/cache/'.$cacheFile.'.php');
}
return false;
}
private function writeCache($cacheFile,$content){
$fp=fopen(self::$dir.'/cache/'.$cacheFile.'.php','w');
fwrite($fp,$content);
fclose($fp);
}
//flushCache: Removes all files in the cache
public function flushCache() {
$files = glob(self::$dir.'/cache/*');
foreach($files as $file) {
@unlink($file);
}
}
public function data($tplname, $content) {
return $this->display($tplname, $content, false);
}
public function display($tplname, $content, $print=true) {
... [truncated, 70 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "Template.inc.php",
"description": "PHP module for Template.inc",
"dateModified": "2024-04-28",
"dateCreated": "2025-03-23",
"contentSize": "3.1 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/unaiquenet/Frontend/libraryv3/Template.inc.php",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Php"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/unaiquenet/Frontend/libraryv3/"
}
📄 pornstopwordlist.txt (Text) 3.1 KB 2024-04-28
Source code file for pornstopwordlist
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "pornstopwordlist.txt",
"description": "Source code file for pornstopwordlist",
"dateModified": "2024-04-28",
"dateCreated": "2025-03-23",
"contentSize": "3.1 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/unaiquenet/Frontend/libraryv3/pornstopwordlist.txt",
"encodingFormat": "text/plain",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Text"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/unaiquenet/Frontend/libraryv3/"
}