This commit is contained in:
Abdulrahman
2019-02-06 00:26:50 +03:00
parent 328e5b6c70
commit f0dac81b08
2 changed files with 11 additions and 3 deletions

View File

@@ -435,7 +435,8 @@ class KleejaDatabase
{
$updating_related = true;
}
header('HTTP/1.1 500 Internal Server Error');
$error_message = "<html><head><title>ERROR IM MYSQL</title>";
$error_message .= "<style>BODY{font-family:'Tahoma',serif;font-size:12px;}.error {}</style></head><body>";
$error_message .= '<br />';

View File

@@ -144,7 +144,7 @@ class kleeja_style
'/<INCLUDE(\s+NAME|)\s*=*\s*"(.+)"\s*>/iU' => '<?php echo $this->display("\\2"); ?>',
'/<IS_BROWSER\s*=\s*"([a-z0-9,]+)"\s*>/iU' => '<?php if(is_browser("\\1")){ ?>',
'/<IS_BROWSER\s*\!=\s*"([a-z0-9,]+)"\s*>/iU' => '<?php if(!is_browser("\\1")){ ?>',
'/(<ELSE>|<ELSE \/>)/i' => '<?php }else{ ?>',
'/(<ELSE>|<ELSE\s?\/>)/i' => '<?php }else{ ?>',
'/<ODD\s*=\s*"([a-zA-Z0-9_\-\+\.\/]+)"\s*>(.*?)<\/ODD\>/is' => "<?php if(intval(\$value['\\1'])%2){?> \\2 <?php } ?>",
'/<EVEN\s*=\s*"([a-zA-Z0-9_\-\+\.\/]+)"\s*>(.*?)<\/EVEN>/is' => "<?php if(intval(\$value['\\1'])% 2 == 0){?> \\2 <?php } ?>",
'/<RAND\s*=\s*"(.*?)\"\s*,\s*"(.*?)"\s*>/is' => "<?php \$KLEEJA_tpl_rand_is=(!isset(\$KLEEJA_tpl_rand_is) || \$KLEEJA_tpl_rand_is==0)?1:0; print((\$KLEEJA_tpl_rand_is==1) ?'\\1':'\\2'); ?>",
@@ -227,7 +227,14 @@ class kleeja_style
*/
protected function _vars_callback($matches)
{
return '<?php echo ' . call_user_func(array('kleeja_style', '_var_callback'), $matches) . '?>';
$variable = call_user_func(array('kleeja_style', '_var_callback'), $matches);
if(strpos($matches[0], '{lang') !== false || strpos($matches[0], '{olang') !== false)
{
return '<?=isset(' . $variable . ') ? ' . $variable . ' : \'' . $matches[0] . '\'?>';
}
return '<?=' . $variable . '?>';
}