LEPTON CMS 7.0.0
feel free to keep it strictly simple...
Loading...
Searching...
No Matches
lepton_handle.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
25{
26 const HTACCESS_PATH = SECURE_PATH.'/.htaccess';
27 const HTPASSWD_PATH = SECURE_PATH.'/.htpasswd';
28 const ALT_BACKEND_FILE = '/templates/'.DEFAULT_THEME.'/backend/backend/'; // alternative backend file
29 const ALT_FRONTEND_FILE = '/templates/'.TEMPLATE.'/frontend/'; // alternative frontend file
30
31 // [0] class-constants
33 "&lt;" => "<",
34 "&gt;" => ">",
35 "&amp;" => "&",
36 "&quot;" => "\""
37 ];
38
45 static public bool $display_errors = true;
46
54 static public function setDisplay(bool $bUseDisplay = true): void
55 {
56 self::$display_errors = $bUseDisplay;
57 }
58
65 public function __call(string $name, array $arguments): void
66 {
67 $msg = "Unknown class-method: '".$name."'\nParams:\n";
68 $msg .= LEPTON_tools::display($arguments, "pre");
69 echo LEPTON_tools::display($msg, "pre", "ui message red");
70 }
71
78 public static function __callStatic(string $name, array $arguments): void
79 {
80 $msg = "Unknown static class-method: '".$name."'\nParams:\n";
81 $msg .= LEPTON_tools::display($arguments, "pre");
82 echo LEPTON_tools::display($msg, "pre", "ui message red");
83 }
84
104 static public function install_table(string $table_name='', string $table_fields=''): bool
105 {
106 if (($table_name == '') || ($table_fields == '')) {
107 return false;
108 }
110 $table = TABLE_PREFIX . $table_name;
111 $database->simple_query("CREATE TABLE `" . $table . "` (" . $table_fields . ") ");
112
113 return true;
114 }
115
134 static public function encrypt_table(string $table_name ='', array $aListOfFields =[], string $field_condition =''): bool
135 {
136 if ($table_name == '')
137 {
138 return false;
139 }
140 if (!is_array($aListOfFields))
141 {
142 LEPTON_tools::display("REQUIRED list of names nof table fields must be an array!", "div", "ui red message");
143 return false;
144 }
145
146 if ( $field_condition == '' ) {
147 return false;
148 }
149
151 self::create_sik_table($table_name); // keep in mind, that drop_table adds the table_prefix
152
153 //get table content
154 $table_content = array();
155 $database->execute_query(
156 "SELECT * FROM ".TABLE_PREFIX.$table_name." ",
157 true,
158 $table_content,
159 true
160 );
161
162 foreach ($table_content as $to_encrypt)
163 {
164 $database->secure_build_and_execute('UPDATE', TABLE_PREFIX . $table_name, $to_encrypt, '' . $field_condition . ' =' . $to_encrypt[$field_condition], $aListOfFields);
165 }
166
167 return true;
168 }
169
170
189 static public function decrypt_table(string $table_name = '', array $aListOfFields = [], string $field_condition = '')
190 {
191 if ($table_name == '')
192 {
193 return false;
194 }
195
196 if (!is_array($aListOfFields))
197 {
198 LEPTON_tools::display("REQUIRED list of names of table-fields must be an array!", "div", "ui red message");
199 return false;
200 }
201
202 if ($field_condition == '')
203 {
204 return false;
205 }
206
208 self::create_sik_table($table_name); // keep in mind, that drop_table adds the table_prefix
209
210 //get table content
211 $table_content = array();
212 $database->secure_execute_query(
213 "SELECT * FROM " . TABLE_PREFIX . $table_name . " ",
214 true,
215 $table_content,
216 true,
217 $aListOfFields
218 );
219
220 foreach ($table_content as $to_decrypt)
221 {
222 $result = $database->build_and_execute(
223 'UPDATE', TABLE_PREFIX.$table_name,
224 $to_decrypt,
225 $field_condition.' ='.$to_decrypt[$field_condition]
226 );
227 }
228
229 return true;
230 }
231
250 static public function insert_values(string $table_name='', string $field_values =''): bool
251 {
252 if (($table_name == '') || ($field_values == '')) {
253 return false;
254 }
255
257 $table = TABLE_PREFIX . $table_name;
258 $database->simple_query("INSERT INTO `" . $table . "` VALUES " . $field_values . " ");
259
260 return true;
261 }
262
263
276 static public function drop_table(string $table_name=''): bool
277 {
278 if ($table_name == '')
279 {
280 return false;
281 }
283 $table = TABLE_PREFIX . $table_name;
284
285 $database->simple_query("DROP TABLE IF EXISTS `" . $table . "` ");
286
287 return true;
288 }
289
300 static public function rename_table(string $table_name =''): bool
301 {
302 if ($table_name == '')
303 {
304 return false;
305 }
307 $table_source = TABLE_PREFIX . $table_name;
308 $table_target = TABLE_PREFIX . 'xsik_' . $table_name;
309 self::drop_table('xsik_' . $table_name);
310 $database->simple_query("RENAME TABLE `" . $table_source . "` TO `" . $table_target . "` ");
311
312 return true;
313 }
314
324 static public function create_sik_table(string $table_name =''): bool
325 {
326 if ($table_name == '')
327 {
328 return false;
329 }
331 $table_source = TABLE_PREFIX . $table_name;
332 $table_target = TABLE_PREFIX . 'xsik_' . $table_name;
333 self::drop_table('xsik_' . $table_name); // keep in mind, that drop_table adds the table_prefix
334 $database->simple_query("CREATE TABLE `" . $table_target . "` LIKE `" . $table_source . "`");
335 $database->simple_query("INSERT INTO `" . $table_target . "` SELECT * FROM `" . $table_source . "`");
336
337 return true;
338 }
339
355 static public function delete_obsolete_files(string|array ...$aFileNames ): void
356 {
357 if (is_string($aFileNames))
358 {
359 $aFileNames = [ $aFileNames ];
360 }
361
362 foreach ($aFileNames as $del)
363 {
364 if (is_array($del))
365 {
366 foreach ($del as $subItem)
367 {
369 }
370 }
371 else
372 {
373 $temp_path = ((!str_contains($del, LEPTON_PATH)) ? LEPTON_PATH : "") . $del;
374 if (file_exists($temp_path))
375 {
376 $result = unlink($temp_path);
377 if (false === $result)
378 {
379 echo "<p>Cannot delete file " . $temp_path . ". Please check file permissions and ownership or delete file manually.</p>";
380 }
381 }
382 }
383 }
384 }
385
399 static public function delete_obsolete_directories(array $directory_names=[]): void
400 {
401 self::register('rm_full_dir');
402
403 foreach ($directory_names as $del)
404 {
405 $temp_path = LEPTON_PATH . $del;
406 if (file_exists($temp_path))
407 {
408 $result = rm_full_dir($temp_path);
409 if (false === $result)
410 {
411 echo "Cannot delete directory ".$temp_path.". Please check directory permissions and ownership or deleted directories manually.";
412 }
413 }
414 }
415 }
416
431 static public function rename_directories(array $directory_names=[]): void
432 {
433 self::register('rename_recursive_dirs');
434 foreach ($directory_names as $rename)
435 {
436 $source_path = LEPTON_PATH . $rename['source'];
437 $target_path = LEPTON_PATH . $rename['target'];
438 if (file_exists($source_path))
439 {
440
441 $result = rename_recursive_dirs($source_path, $target_path);
442 if (false === $result)
443 {
444 echo "Cannot rename file ".$source_path.". Please check directory permissions and ownership manually.";
445 }
446
447 }
448 }
449 }
450
464 static public function include_files(array|string $file_names=[], bool $interrupt=true): void
465 {
466 if (is_string($file_names))
467 {
468 $file_names = [$file_names];
469 }
470
471 foreach ($file_names as $requestedFile)
472 {
473 $temp_path = LEPTON_PATH . $requestedFile;
474 if (file_exists($temp_path))
475 {
476 require_once $temp_path;
477 } elseif($interrupt === true)
478 {
480 "<pre class='ui message'>\nCan't include: ".$temp_path."\n</pre>",
481 "pre",
482 "ui message orange"
483 );
484 }
485 }
486 }
487
488
502 static public function require_alternative(string $file_name, string $usage = 'backend'): bool
503 {
504 if (($usage == 'frontend') || ($usage == 'backend'))
505 {
506 $temp_path = LEPTON_PATH.(($usage === 'backend') ? self::ALT_BACKEND_FILE : self::ALT_FRONTEND_FILE).$file_name;
507
508 if (file_exists($temp_path))
509 {
510 require_once $temp_path;
511 return true;
512 }
513 }
514 return false;
515 }
516
530 static public function install_modules(array $module_names = [] ): void
531 {
532 global $module_name, $module_license, $module_author, $module_directory, $module_version, $module_function, $module_description, $module_platform, $module_guid, $lepton_platform;
533 if (is_string($module_names))
534 {
535 $module_names = [$module_names];
536 }
537 LEPTON_handle::register('load_module');
539
540 foreach ($module_names as $temp_addon)
541 {
542 $test = $database->get_one("SELECT `addon_id` FROM `" . TABLE_PREFIX . "addons` WHERE `directory` = '" . $temp_addon . "' ");
543
544 if ($test === null)
545 {
546 $module_vars = [
547 'module_license', 'module_author' , 'module_name', 'module_directory',
548 'module_version', 'module_function', 'module_description',
549 'module_platform', 'module_guid'
550 ];
551
552 foreach ($module_vars as $varname)
553 {
554 if (isset(${$varname}))
555 {
556 unset(${$varname});
557 }
558 }
559
560 $temp_path = LEPTON_PATH .'/modules/'.$temp_addon ;
561 require $temp_path.'/info.php';
562 load_module( $temp_addon, true );
563 }
564 }
565 }
566
567
581 static public function upgrade_modules(string|array $module_names = []): void
582 {
583 if (is_string($module_names))
584 {
585 $module_names = array($module_names);
586 }
587
588 LEPTON_handle::register('load_module');
589 foreach ($module_names as $update)
590 {
591 $temp_path = LEPTON_PATH . "/modules/" . $update . "/upgrade.php";
592 if (file_exists($temp_path))
593 {
594 // call upgrade-script direct
595 require $temp_path;
597 // update db entries
598 load_module( $update, false );
599
600 // unset module vars
601 foreach(
602 [
603 'module_license', 'module_author' , 'module_name', 'module_directory',
604 'module_version', 'module_function', 'module_description',
605 'module_platform', 'module_guid'
606 ] as $varname
607 )
608 {
609 if (isset(${$varname}))
610 {
611 unset(${$varname});
612 }
613 }
614 }
615 }
616 }
617
634 static public function install_droplets(string $module_name='',string|array $zip_names=[]): void
635 {
636 droplets::getInstance();
637
638 if (is_string($zip_names))
639 {
640 $zip_names = array($zip_names);
641 }
642 foreach ($zip_names as $to_install)
643 {
644 $temp_path = LEPTON_PATH . "/modules/" . $module_name . "/install/".$to_install.".zip";
645 if (file_exists($temp_path))
646 {
647 $result = droplet_install($temp_path, LEPTON_PATH . '/temp/unzip/');
648 if (count($result['errors']) > 0)
649 {
650 die ('ERROR: file is missing: <b> ' . (implode('<br />\n', $result['errors'])) . ' </b>.');
651 }
652 }
653 }
654 self::delete_obsolete_directories(array("/modules/" . $module_name . "/install"));
655 }
656
657
671 static public function uninstall_droplets(string|array $droplet_names = []): void
672 {
673 if (is_string($droplet_names))
674 {
675 $droplet_names = [$droplet_names];
676 }
678
679 foreach ($droplet_names as $to_uninstall)
680 {
681 $to_delete = [];
682 $database->execute_query(
683 "SELECT `id` FROM ".TABLE_PREFIX."mod_droplets WHERE `name` = '".$to_uninstall."' ",
684 true,
685 $to_delete,
686 false
687 );
688 if (isset($to_delete['id']))
689 {
690 $database->simple_query("DELETE FROM `" . TABLE_PREFIX . "mod_droplets` WHERE `id` = " . $to_delete['id']);
691 $database->simple_query("DELETE FROM `" . TABLE_PREFIX . "mod_droplets_permissions` WHERE `id` = " . $to_delete['id']);
692 }
693 }
694 }
695
717 static function register(): bool
718 {
719 if (0 === func_num_args())
720 {
721 return false;
722 }
723
724 $all_args = func_get_args();
725 foreach($all_args as &$param)
726 {
727 if (true === is_array($param))
728 {
729 foreach ($param as $ref)
730 {
731 self::register($ref);
732 }
733 }
734 else
735 {
736 if (!function_exists($param))
737 {
738 $lookUpPath = LEPTON_PATH . "/framework/functions/function." . $param . ".php";
739 if (file_exists($lookUpPath))
740 {
741 require_once $lookUpPath;
742 }
743 }
744 }
745 }
746 return true;
747 }
748
768 public static function checkEmailChars(string $sEmail): bool
769 {
770 $add_custom = '';
771 $ini_file_name = LEPTON_PATH."/config/lepton.ini.php";
772
773 if (true === file_exists($ini_file_name))
774 {
775 $config = parse_ini_string(";" . file_get_contents($ini_file_name), true);
776 if ($config['custom_vars']['additional_email_chars'] != '')
777 {
778 $add_custom = $config['custom_vars']['additional_email_chars'];
779 }
780 }
781 return !((false === filter_var($sEmail, FILTER_VALIDATE_EMAIL)
782 || (!preg_match('#^[' .LEPTON_core::getInstance()->email_chars.$add_custom.']+$#', $sEmail))));
783 }
784
804 public static function checkPasswordChars(string $sPassword): bool
805 {
806 $add_custom = '';
807 $ini_file_name = LEPTON_PATH . "/config/lepton.ini.php";
808
809 if (true === file_exists($ini_file_name))
810 {
811 $config = parse_ini_string(";" . file_get_contents($ini_file_name), true);
812 if ($config['custom_vars']['additional_password_chars'] != '')
813 {
814 $add_custom = $config['custom_vars']['additional_password_chars'];
815 }
816 }
817 return !((false === !preg_match('/[^'.LEPTON_core::getInstance()->password_chars.$add_custom.']/', $sPassword)));
818 }
819
839 public static function checkUsernameChars(string $sName): bool
840 {
841 $add_custom = '';
842 $ini_file_name = LEPTON_PATH . "/config/lepton.ini.php";
843
844 if (true === file_exists($ini_file_name))
845 {
846 $config = parse_ini_string(";" . file_get_contents($ini_file_name), true);
847 if ($config['custom_vars']['additional_usernames_chars'] != '')
848 {
849 $add_custom = $config['custom_vars']['additional_usernames_chars'];
850 }
851 }
852
853 return !!preg_match("#^[" . LEPTON_core::getInstance()->username_chars . $add_custom . "]+$#", $sName);
854 }
855
882 public static function checkHexChars(string $sHexHash): bool
883 {
884 return !!preg_match("~^[".LEPTON_core::getInstance()->hex_chars."]+$~", $sHexHash);
885 }
886
895 public static function restoreSpecialChars(string &$sAnyString, array $aAnyAssocArray = self::SPECIAL_CHARS_RESTORE): void
896 {
897 $aLookUp = array_keys($aAnyAssocArray);
898 $aReplace = array_values($aAnyAssocArray);
899
900 $sAnyString = str_replace( $aLookUp, $aReplace, $sAnyString );
901 }
902
903
909 public static function restoreStandardProtection() : bool
910 {
911 if (file_exists(self::HTACCESS_PATH))
912 {
913 unlink(self::HTACCESS_PATH);
914 unlink(self::HTPASSWD_PATH);
915 }
916 $admin_username = LEPTON_database::getInstance()->get_one("SELECT username FROM " . TABLE_PREFIX . "users WHERE user_id = 1 ");
917 $htuser = $admin_username;
918 $random_value = random_int(100000,999999);
919 $htpassword = password_hash((string)$random_value, PASSWORD_DEFAULT );
920
921$htcontent = "# .htaccess-Datei
922AuthType Basic
923AuthName 'Protected area - Please insert password!'
924AuthUserFile ".self::HTPASSWD_PATH."
925require user ".$htuser."
926";
927
928$htpwcontent = "# Password file, user:".$htuser.", password: ".$random_value."
929".$htuser.":".$htpassword."
930";
931
932 file_put_contents(self::HTACCESS_PATH,$htcontent);
933 file_put_contents(self::HTPASSWD_PATH,$htpwcontent);
934
935 return true;
936 }
937
946 public static function createStandardProtection(string $path = '/temp/secure/', string $username = ''): bool
947 {
948 if($username == '')
949 {
950 echo LEPTON_tools::display('USERNAME is mandantory as second parameter in this method', 'pre', 'ui red message');
951 return false;
952 }
953
954 if (file_exists(LEPTON_PATH . $path . '/.htaccess'))
955 {
956 unlink(LEPTON_PATH.$path.'/.htaccess');
957 unlink(LEPTON_PATH.$path.'/.htpasswd');
958 }
959
960 $htuser = $username;
961 $random_value = random_int(100000,999999);
962 $htpassword = password_hash((string)$random_value, PASSWORD_DEFAULT );
963
964$htcontent = "# .htaccess-Datei
965AuthType Basic
966AuthName 'Protected area - Please insert password!'
967AuthUserFile ".LEPTON_PATH.$path."/.htpasswd
968require user ".$htuser."
969";
970
971$htpwcontent = "# Password file, user:".$htuser.", password: ".$random_value."
972".$htuser.":".$htpassword."
973";
974
975 file_put_contents(LEPTON_PATH . $path . '/.htaccess', $htcontent);
976 file_put_contents(LEPTON_PATH . $path . '/.htpasswd', $htpwcontent);
977
978 return true;
979 }
980
981
993 static function array_orderby(array $array, string $on, string $order = SORT_ASC): array
994 {
995 $new_array = [];
996 $sortable_array = [];
997
998 if (count($array) > 0)
999 {
1000 foreach ($array as $k => $v)
1001 {
1002 if (is_array($v))
1003 {
1004 foreach ($v as $k2 => $v2)
1005 {
1006 if ($k2 == $on)
1007 {
1008 $sortable_array[$k] = $v2;
1009 }
1010 }
1011 } else {
1012 $sortable_array[$k] = $v;
1013 }
1014 }
1015
1016 switch ($order)
1017 {
1018 case SORT_ASC:
1019 asort($sortable_array);
1020 break;
1021
1022 case SORT_DESC:
1023 arsort($sortable_array);
1024 break;
1025
1026 default:
1027 LEPTON_tools::display(__CLASS__." [10023] No order match!", "pre", "ui message red");
1028 break;
1029 }
1030
1031 foreach ($sortable_array as $k => $v)
1032 {
1033 $new_array[$k] = $array[$k];
1034 }
1035 }
1036
1037 return $new_array;
1038 }
1039
1040 // [5.4.1]
1041 static public function themeExists(string $sThemeName = ""): bool
1042 {
1043 $result = LEPTON_database::getInstance()->get_one("SELECT `directory` FROM `".TABLE_PREFIX."addons` WHERE `directory` ='".$sThemeName."'");
1044 return ($result !== NULL);
1045 }
1046
1071 static public function moveThemeFiles(string $sModuleDirectory = ""): void
1072 {
1073 $sSingleModuleDirectory = self::getModuleDirectory($sModuleDirectory);
1074
1075 // get all themes
1076 $aAllThemes = self::getAllThemes();
1077 foreach ($aAllThemes as $sForTheme)
1078 {
1079 $sBaseSourcePath = LEPTON_PATH . "/modules/" . $sSingleModuleDirectory . "/backendthemes/" . $sForTheme;
1080 $sTargetPath = LEPTON_PATH . "/templates/" . $sForTheme . "/backend/" . $sSingleModuleDirectory;
1081
1082 if (true === file_exists($sBaseSourcePath))
1083 {
1084 self::copyThemeFilesRecursive($sBaseSourcePath, $sTargetPath);
1085 }
1086 }
1087 }
1088
1089 // [5.4.3] Internal
1090
1097 static public function copyThemeFilesRecursive(string $dirsource, string $dirdest, int $deep = 0): bool
1098 {
1099 if (true === is_dir($dirsource))
1100 {
1101 if(($deep === 0) && (false === is_dir($dirdest)))
1102 {
1103 LEPTON_core::make_dir($dirdest);
1104 }
1105 $dir= dir($dirsource);
1106 while ( $file = $dir->read() )
1107 {
1108 if( $file[0] === "." )
1109 {
1110 continue;
1111 }
1112 if( !is_dir($dirsource."/".$file) )
1113 {
1114 copy($dirsource . "/" . $file, $dirdest . "/" . $file);
1115 LEPTON_core::change_mode($dirdest . "/" . $file);
1116 } else {
1117 LEPTON_core::make_dir($dirdest . "/" . $file);
1118 self::copyThemeFilesRecursive($dirsource . "/" . $file, $dirdest . '/' . $file, $deep + 1);
1119 }
1120
1121 }
1122 $dir->close();
1123 }
1124 if ($deep == 0)
1125 {
1126 // Is this a working copy? If not ... we try to remove the unneeded files here
1127 if (!file_exists(dirname($dirsource, 2) . "/.git"))
1128 {
1129 LEPTON_handle::register("rm_full_dir");
1130 rm_full_dir( $dirsource );
1131 }
1132 }
1133 return true;
1134 }
1135
1136 // [5.4.4] Deletes all "theme" specific files of a given module from all installed themes.
1141 static public function removeAllThemeFiles(string $sModuleDirectory = ""): void
1142 {
1143 $sSingleModuleDirectory = self::getModuleDirectory($sModuleDirectory);
1144 $aAllThemes = self::getAllThemes();
1145
1146 foreach ($aAllThemes as $aTempThemeDirectory)
1147 {
1148 self::delete_obsolete_directories(["/templates/" . $aTempThemeDirectory . "/backend/" . $sSingleModuleDirectory]);
1149 }
1150 }
1151 // [5.4.5] Try to get the module directory
1152
1157 static public function getModuleDirectory(string $anyNameOrPath = ""): string
1158 {
1159 if (empty($anyNameOrPath))
1160 {
1161 return "";
1162 }
1163
1169 $backtrace = debug_backtrace();
1170 $aTempTest = [""];
1171 if (isset($backtrace[1]['file']))
1172 {
1173 $aTempTest = self::getPathElements($backtrace[1]['file']);
1174 }
1175
1176 // [5.4.5.3] try to extract the module directory
1177 $aTemp = self::getPathElements($anyNameOrPath);
1178
1179 return ($aTemp[0] === $aTempTest[0]) ? $aTemp[0] : "";
1180 }
1181 // [5.4.6] Internal
1182
1186 static public function getAllThemes(): array
1187 {
1188 $aAllThemes = [];
1189 LEPTON_database::getInstance()->execute_query(
1190 "SELECT `directory` FROM `" . TABLE_PREFIX . "addons` WHERE `function` = 'theme'",
1191 true,
1192 $aAllThemes,
1193 true
1194 );
1195 $aReturnValues = [];
1196 foreach($aAllThemes as $aTempTheme)
1197 {
1198 $aReturnValues[] = $aTempTheme["directory"];
1199 }
1200 return $aReturnValues;
1201 }
1202
1210 final static public function getPathElements(string $anyNameOrPath = ""): array
1211 {
1212 return explode(
1213 DIRECTORY_SEPARATOR,
1214 str_replace(
1215 LEPTON_PATH . DIRECTORY_SEPARATOR . "modules" . DIRECTORY_SEPARATOR,
1216 "",
1217 $anyNameOrPath
1218 ));
1219 }
1220
1231 static public function createGUID(): string
1232 {
1233 if (function_exists('com_create_guid'))
1234 {
1235 $guid = com_create_guid();
1236 $guid = strtolower($guid);
1237 if (str_starts_with($guid, '{'))
1238 {
1239 $guid = substr($guid, 1);
1240 }
1241 if (strpos($guid, '}') == strlen($guid) - 1)
1242 {
1243 $guid = substr($guid, 0, strlen($guid) - 1);
1244 }
1245 return $guid;
1246 }
1247 else
1248 {
1249 return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
1250 random_int(0, 0xffff),
1251 random_int(0, 0xffff),
1252 random_int(0, 0xffff),
1253 random_int(0, 0xffff),
1254 random_int(0, 0x0fff) | 0x4000,
1255 random_int(0, 0x3fff) | 0x8000,
1256 random_int(0, 0xffff),
1257 random_int(0, 0xffff)
1258 );
1259 }
1260 }
1261}
static getInstance(array &$settings=[])
static copyThemeFilesRecursive(string $dirsource, string $dirdest, int $deep=0)
static rename_directories(array $directory_names=[])
static getAllThemes()
static getPathElements(string $anyNameOrPath="")
static setDisplay(bool $bUseDisplay=true)
static themeExists(string $sThemeName="")
static encrypt_table(string $table_name='', array $aListOfFields=[], string $field_condition='')
static moveThemeFiles(string $sModuleDirectory="")
static createStandardProtection(string $path='/temp/secure/', string $username='')
static require_alternative(string $file_name, string $usage='backend')
static install_droplets(string $module_name='', string|array $zip_names=[])
static __callStatic(string $name, array $arguments)
static restoreStandardProtection()
static rename_table(string $table_name='')
static include_files(array|string $file_names=[], bool $interrupt=true)
static drop_table(string $table_name='')
static checkPasswordChars(string $sPassword)
static delete_obsolete_files(string|array ... $aFileNames)
static uninstall_droplets(string|array $droplet_names=[])
static restoreSpecialChars(string &$sAnyString, array $aAnyAssocArray=self::SPECIAL_CHARS_RESTORE)
static removeAllThemeFiles(string $sModuleDirectory="")
const ALT_FRONTEND_FILE
static upgrade_modules(string|array $module_names=[])
static install_table(string $table_name='', string $table_fields='')
static checkHexChars(string $sHexHash)
static create_sik_table(string $table_name='')
static install_modules(array $module_names=[])
static array_orderby(array $array, string $on, string $order=SORT_ASC)
static checkEmailChars(string $sEmail)
static delete_obsolete_directories(array $directory_names=[])
__call(string $name, array $arguments)
static checkUsernameChars(string $sName)
const SPECIAL_CHARS_RESTORE
static bool $display_errors
static getModuleDirectory(string $anyNameOrPath="")
static insert_values(string $table_name='', string $field_values='')
static decrypt_table(string $table_name='', array $aListOfFields=[], string $field_condition='')
static display(mixed $something_to_display="", string $tag="pre", string|null $css_class=null)
$database
Definition constants.php:52
load_module( $directory, $install=false)
rename_recursive_dirs(string $dirsource, string $dirdest, int $deep=0)
rm_full_dir(string $directory)