first commit

This commit is contained in:
2023-09-04 21:59:34 +02:00
commit 650ef5b3e1
196 changed files with 24080 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
<?
/* 2011-09-26 - dodanie typu strony LINK */
namespace site;
class Site {
public $_values;
public function __construct( $id = '' )
{
global $db;
if ( !$id )
$id = \site\FSite::getMainSiteId();
$current_lang = \System::getSessionVar( 'current_lang' );
$query = $db -> prepare( 'SELECT * FROM pp_pages WHERE id = :id' );
$query -> bindValue( ':id', $id, \PDO::PARAM_INT );
$query -> execute();
if ( $query -> rowCount() ) while ( $row = $query -> fetch() )
{
foreach ( $row as $key => $val )
$this -> _values[$key] = $val;
}
$query -> closeCursor();
$query = $db -> prepare( 'SELECT *, "' . $id . '" AS id FROM pp_pages_langs WHERE page_id = :page_id AND lang_id = :lang_id' );
$query -> bindValue( ':page_id' , $id , \PDO::PARAM_INT );
$query -> bindValue( ':lang_id' , $current_lang , \PDO::PARAM_STR );
$query -> execute();
if ( $query -> rowCount() ) while ( $row = $query -> fetch() )
{
foreach ( $row as $key => $val )
$this -> _values[$key] = $val;
}
$query -> closeCursor();
return true;
}
}
?>