LEPTON CMS 7.4.0
feel free to keep it strictly simple...
Loading...
Searching...
No Matches
function.is_parent.php
Go to the documentation of this file.
1<?php
2
18declare(strict_types = 1);
19
20// include secure.php to protect this file and the whole CMS!
21if(!defined("SEC_FILE")){define("SEC_FILE",'/framework/secure.php' );}
22if (defined('LEPTON_PATH')) {
23 include LEPTON_PATH.SEC_FILE;
24} else {
25 $oneback = "../";
26 $root = $oneback;
27 $level = 1;
28 while (($level < 10) && (!file_exists($root.SEC_FILE))) {
29 $root .= $oneback;
30 $level += 1;
31 }
32 if (file_exists($root.SEC_FILE)) {
33 include $root.SEC_FILE;
34 } else {
35 trigger_error(sprintf("[ <b>%s</b> ] Can't include secure.php!", $_SERVER['SCRIPT_NAME']), E_USER_ERROR);
36 }
37}
38// end include secure file
39
40
49function is_parent( int $iPageId ): int
50{
51$info = '@TEMP_DEPRECATED 20250418: this function has to be reworked in L* 7.4.0")';
52echo(LEPTON_tools::display($info, 'pre','ui orange message'));
53echo (LEPTON_tools::display(debug_print_backtrace(), 'pre','ui message'));
54
56 // Get parent
57 return intval($database->get_one( 'SELECT `parent` FROM `' . TABLE_PREFIX . 'pages` WHERE `page_id` = ' . $iPageId ));
58}
static getInstance(array &$settings=[])
static display(mixed $something_to_display="", string $tag="pre", string|null $css_class=null, bool|null $useVarDump=null)
$database
Definition constants.php:52
is_parent(int $iPageId)