<?
function intranet_show($sitepart_id) {
	$query = "SELECT * FROM main_intranet_sitepart WHERE id = " . $sitepart_id . " LIMIT 1";
	$result = @mysqli_query($GLOBALS['mysql_con'],$query);
	if(@mysqli_num_rows($result) == 1) {
		$sitepart = @mysqli_fetch_array($result);
		$type = $sitepart['type'];
		// include
		switch($type) {
			case 1:
				$include = MODULE_PATH.'/intranet/kontaktdaten.inc.php';
				break;
			case 2:
				$include = MODULE_PATH.'/intranet/noticeboard.inc.php';
				break;
			case 3:
				$include = MODULE_PATH.'/intranet/edit_contact_cardform.inc.php';
				break;
			case 4:
				$include = MODULE_PATH.'/intranet/meal_delivery.inc.php';
				break;
			case 5:
				$include = MODULE_PATH.'/intranet/profile.inc.php';
				break;
			case 6:
				$include = MODULE_PATH.'/infoboard/show_infoboard.inc.php';
				break;
			case 7:
				$include = MODULE_PATH.'/knowledgecenter/show_knowledge.inc.php';
				break;
			case 8:
				$include = MODULE_PATH.'/intranet/firmeninformationen.inc.php';
				break;
			case 9:
				$include = MODULE_PATH.'/intranet/meine_kontakte.inc.php';
				break;
			case 10:
				$include = MODULE_PATH.'/knowledgecenter/knowledge_more_posts.inc.php';
				break;
			case 11:
				$include = MODULE_PATH.'/learning/show_learning.inc.php';
				break;
			case 12:
				$include = MODULE_PATH.'/certificate/show_certificate.inc.php';
				break;
			case 13:
				$include = MODULE_PATH.'/intranet/show_meal_delivery.inc.php';
				break;
			case 14:
				$include = MODULE_PATH.'/intranet/future_appointments.inc.php';
				break;
			case 15:
				$include = MODULE_PATH.'/learning/show_unit_contact.inc.php';
				break;
			case 16:
				$include = MODULE_PATH.'/intranet/playground/show_playground.inc.php';
				break;
			case 17:
				$include = MODULE_PATH.'/tasks/show_tasks.inc.php';
				break;
			case 18:
				$include = MODULE_PATH.'/tasks/show_tasks_preview.inc.php';
				break;
			case 19:
				$include = MODULE_PATH.'/knowledgecenter/show_custom_feed.php';
				break;
			case 20:
				$include = MODULE_PATH.'/intranet/workspace_overview.php';
				break;
			case 21:
				$include = MODULE_PATH.'/intranet/person_card.php';
				break;
			case 22:
				$include = MODULE_PATH.'/intranet/organigramm.inc.php';
				break;
			case 23:
				$include = MODULE_PATH.'/knowledgecenter/pdfsearch.php';
				break;
			case 24:
				$include = MODULE_PATH.'/knowledgecenter/pdf.php';
				break;
			case 25:
				$include = MODULE_PATH.'/qm_updates/qm_updates.inc.php';
				break;
			case 26:
					$include = MODULE_PATH.'/intranet/qr_code.php';
				break;
			case 27:
					$include = MODULE_PATH.'/ticketcenter/views/ticketcenter/show_ticketcenter.inc.php';
				break;
			default:
				break;
		}
		require_once($include);
	}
}

function intranet_edit() {
	require_once('edit_intranet.inc.php');
}
?>
