HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/deensekroon.komma-mediadesign.nl/wwwroot/php/page_multipage.php
<?php

/* 
	Deense Kroon
	Multipage
	
	Mike Ontwerpt 2012
	www.mikeontwerpt.nl
	
	initBlog(); 
	
	showLargeBanner();
	showPopular();
	showCollection();

*/
	

function showMultipage($linkname){
	/* get mysqli */
	global $mysqli;
    $output = '<div class="mp">';

    $query = 'SELECT p.label
			  FROM mp_pages AS p
			  WHERE p.linkname = "'.$linkname.'"
			  LIMIT 1';
	if($result = $mysqli->query($query)){		  
		$record = $result->fetch_assoc();
		$label = $record['label'];

        // Page title
        $output .= '<h1>'.ucfirst($label).'</h1>';

		/* get info */
		$query = 'SELECT p.title, p.titleEn, p.titleDe, p.titleFr, p.description, p.descriptionEn, p.descriptionDe, p.descriptionFr, p.timest
				  FROM '.$linkname.' AS p, content_status AS s
				  WHERE s.active = 1
				  AND s.itemId = p.id
				  AND s.linkname = "'.$linkname.'"
				  AND p.published = 1 
				  ORDER BY p.itemOrder DESC';
		if($result = $mysqli->query($query)){

			while($record = $result->fetch_assoc()){

				$_SESSION['lang'] == 'nl' || empty($record['titleEn']) ? $title = fromDatabase($record['title']) : $title = fromDatabase($record['titleEn']);
				$_SESSION['lang'] == 'nl' || empty($record['descriptionEn']) ? $description = fromDatabase($record['description']) : $description = fromDatabase($record['descriptionEn']);
				
				$description = replaceShortcodes($description);

				$output .= '<article class="col-6">';
                    $output .= '<h2>' . $title . '</h2>';
					$output .= $description;
				$output .= '</article>';
			}
		}
		else{
			$output .= $mysqli->error;	
		}
		$output .= '</div>';
		return $output;
	}
}





?>