'site' ) ); $the_site = array_shift($the_site); $the_styles = getPosts_SQ( array('post_type' => 'style' ) ); $the_master_page = getPosts_SQ( array('post_type' => 'page', 'meta_key' => 'is_master', 'meta_value' => 1 ) ); $the_master_page = array_shift($the_master_page); $the_header_modul = getPosts_SQ( array('post_type' => 'page', 'meta_key' => 'is_header', 'meta_value' => 1 ) ); $the_header_modul = array_shift($the_header_modul); $the_footer_modul = getPosts_SQ( array('post_type' => 'page', 'meta_key' => 'is_footer', 'meta_value' => 1 ) ); $the_footer_modul = array_shift($the_footer_modul); $the_header_modul_boxes = getPosts_SQ( array('post_type' => 'box', 'meta_key' => 'attached_to_page', 'meta_value' => $the_header_modul['id'] ) ); $the_footer_modul_boxes = getPosts_SQ( array('post_type' => 'box', 'meta_key' => 'attached_to_page', 'meta_value' => $the_footer_modul['id'] ) ); $the_page_boxes = null; $the_css_attachments = getPosts_SQ( array('post_type' => 'attachment', 'post_mime_type' => 'text/css' ) ); $the_js_attachments = getPosts_SQ( array('post_type' => 'attachment', 'post_mime_type' => 'application/javascript' ) ); //print_r2( $the_js_attachments ); die; // its the home page if( isset($_GET['page_id']) && $the_master_page['id'] == $_GET['page_id'] || !isset($_GET['page_id']) ){ $is_home = TRUE; $the_page = $the_master_page; if($debug) echo "is home
"; if($debug) print_r2( $the_master_page, '$the_master_page'); if($debug) print_r2( $the_page, '$the_page'); } // its not the home page if( !$is_home ){ if($debug) echo "is not home
"; $the_page = getPosts_SQ( array('post_type' => 'page', 'ID' => $_REQUEST['page_id']) ); $the_page = array_shift($the_page); } // page is modulpage if( $the_page['post_mime_type'] == 'system/modulpage' ){ if( isset($the_page['metas']['is_header']) && $the_page['metas']['is_header'] == 1 ) $the_footer_modul_boxes = null; if( isset($the_page['metas']['is_footer']) && $the_page['metas']['is_footer'] == 1 ) $the_header_modul_boxes = null; } // page is no modul page else{ // dynamic content // http://sqlzoo.net/howto/source/u.cgi/tip977255/sqlite if( $the_page['metas']['content_type'] == 'dynamic' ){ $the_page_boxes = getPosts_SQ( array('post_type' => 'box', 'meta_key' => 'tag_ids', 'meta_compare' => 'LIKE', 'meta_value' => '%,'.$the_page['metas']['dynamic_content_generated_by_tag'].',%' ) ); } // static content else{ $the_page_boxes = getPosts_SQ( array('post_type' => 'box', 'meta_key' => 'attached_to_page', 'meta_value' => $the_page['id'] ) ); } } $_DEFAULT_SHORTCODES = array( "%%site_url%%" => mh_get_bloginfo('url'), "%%site_title%%" => getValue( $the_site, 'title'), "%%page_title%%" => getValue( $the_page, 'title'), "%%search_form%%" => '
X
', ); // ---------------------------------- if($_DEFAULT_SETTINGS['debug_echo']){ foreach( $the_page_boxes as $box ){ echo $box['id']. ' : ' . $box['metas']['tag_ids']."
"; } } // ---------------------------------- header('Content-Type: text/html; charset=utf-8'); ?> <?php if( !$is_home ){ echo strip_tags($the_page['title']).' — '; } echo strip_tags($the_site['title']); ?> '; } ?> $font_props){ if( $font_props['type'] != 'local' ) echo ''; } ?> '; }} ?>
'; if( is_array($the_site['options']) ){ foreach( $the_site['options'] as $key => $value ){ // sonderfall: set the css-options für width+height einzeln, // weil die größe der gaps die dimensionen der boxen bestimmen if( $key == 'box_width' ){ $box_margin_right = intval( $the_site['options']['box_margin_right'] ); $box_width = intval( $the_site['options']['box_width'] ); for($i = 0; $i < 40; $i++){ $i_plus = $i+1; echo ' .box[data-width_units="'.$i_plus.'"] { width: '; echo (($box_width*$i_plus) + ($box_margin_right*$i)).'px'; echo ';}'." \n"; } } elseif( $key == 'box_min_height' ){ $box_margin_bottom = intval( $the_site['options']['box_margin_bottom'] ); $box_min_height = intval( $the_site['options']['box_min_height'] ); for($i = 0; $i < 40; $i++){ $i_plus = $i+1; echo ' .box[data-height_units="'.$i_plus.'"] { min-height: '; echo (($box_min_height*$i_plus) + ($box_margin_bottom*$i)).'px'; echo ';} '." \n"; } } // normalfall else{ echo ' '.$_DEFAULT_CSS[$key]['selector'].' '. $value . ';}'." \n"; } } } echo ''; ?>
'; foreach( $the_page['options'] as $key => $value ){ echo ' .page[data-id="'.$the_page['id'].'"] '.$_DEFAULT_CSS[$key]['selector'] .' '. $value . ';}'." \n"; } echo ''; } if( is_array($the_header_modul['options']) ){ echo ''; } if( is_array($the_footer_modul['options']) ){ echo ''; } ?>
'; if( is_array($the_style['options']) ){ foreach( $the_style['options'] as $key => $value ){ if( isset($the_style['is_master']) && $the_style['is_master'] == 1 ){ echo ' .box[data-style=""] '.$_DEFAULT_CSS[$key]['selector'] .' '. $value . ';}'." \n"; echo ' .box[data-style="'.$the_style['id'].'"] '.$_DEFAULT_CSS[$key]['selector'] .' '. $value . ';}'." \n"; }else{ echo ' .box[data-style="'.$the_style['id'].'"] '.$_DEFAULT_CSS[$key]['selector'] .' '. $value . ';}'." \n"; } }} echo ' '; } } ?>
'; foreach( $the_page_boxes as $box ){ echo getBoxHTML( $box ); } echo '
'; } ?>
Login  •  Built with Seedbox
'; }} ?>