This commit is contained in:
2023-09-17 11:22:43 +02:00
parent 0948881449
commit 5f41e70d1b
2 changed files with 36 additions and 36 deletions

View File

@@ -8,14 +8,14 @@ class System
$date = file_get_contents( 'files/.update' );
else
$date = '2012-01-01 00:00:00';
return $date;
}
public function getLayout( $id )
{
global $db, $config, $cache;
$key = 'getLayout:' . $id;
if ( !$layout = $cache -> fetch() )
{
@@ -28,16 +28,16 @@ class System
}
return $layout;
}
public function getLayouts()
{
global $db;
$query = $db -> query( 'SELECT id, name FROM pcms_layout' );
if ( $query -> rowCount() ) while ( $row = $query -> fetch() )
$layouts[] = $row;
$query -> closeCursor();
return $layouts;
}
@@ -183,12 +183,12 @@ class System
public function getSessionVar( $var , $admin = false )
{
if ( !$admin )
if ( !$admin )
{
if ( isset( $_SESSION[ $var ] ) )
$out = $_SESSION[ $var ];
}
else
}
else
{
if ( isset( $_SESSION[ 'admin_' . $var ] ) )
$out = $_SESSION[ 'admin_' . $var ];
@@ -446,12 +446,12 @@ class System
if ( !$row2['seo_link'] )
$site_map .= '<loc>' . $link_base . 's,' . $row2['page_id'] . ',' . self::seo( $row2['title'] ) . '</loc>' . $nl;
else
$site_map .= '<loc>' . $link_base . $row['seo_link'] . '</loc>' . $nl;
$site_map .= '<loc>' . $link_base . $row['seo_link'] . '</loc>' . $nl;
$site_map .= '<lastmod>' . date( 'Y-m-d' ) . '</lastmod>' . $nl;
$site_map .= '<changefreq>daily</changefreq>' . $nl;
$site_map .= '<priority>1</priority>' . $nl;
$site_map .= '</url>' . $nl;
if ( $row2['seo_link'] )
$htaccess_data .= chr( 13 ).chr( 10 ) . 'RewriteRule ^' . $row2['seo_link'] . '$ index.php?rw=change_site&id=' . $row2['page_id'] . ' [L]';
}
@@ -470,7 +470,7 @@ class System
$site_map .= '<changefreq>daily</changefreq>' . $nl;
$site_map .= '<priority>1</priority>' . $nl;
$site_map .= '</url>' . $nl;
if ( $row2['seo_link'] )
$htaccess_data .= chr( 13 ).chr( 10 ) . 'RewriteRule ^' . $row2['seo_link'] . '$ index.php?art=$1' . $row2['article_id'] . ' [L]';
}
@@ -597,7 +597,7 @@ class System
$val = str_replace( $array_rep1 , $array_rep2 , $val );
$val = strtolower( $val );
$val = preg_replace( '/(-){2,}/', '-', $val );
return $val;
}
@@ -822,7 +822,7 @@ class System
if ( isset($email) && isset($temat) && isset($tresc) )
{
$admin_mail = self::getSystemSettings( 'admin_email');
$mail = new PHPMailer();
$mail = new PHPMailer();
$mail -> IsSMTP();
$mail -> SMTPAuth = true;
$mail -> Host = self::getSystemSettings( 'email_host' );
@@ -832,13 +832,13 @@ class System
$mail -> CharSet = "UTF-8";
if ( $replay == "" )
{
$mail -> AddReplyTo( $admin_mail , self::getSystemSettings( 'firm_name' ) );
$mail -> SetFrom( $admin_mail , self::getSystemSettings( 'firm_name' ) );
$mail -> AddReplyTo( $admin_mail, $admin_mail );
$mail -> SetFrom( $admin_mail, $admin_mail );
}
else
{
$mail -> AddReplyTo( $replay , '' );
$mail -> SetFrom( $replay , '' );
$mail -> AddReplyTo( $replay, '' );
$mail -> SetFrom( $admin_mail, '' );
}
$mail -> AddAddress( $email , '' );
$mail -> Subject = $temat;