assign('title', 'Welcome'); $smarty->assign('titleSEO', Null); $pagetype = 'index'; $smarty->assign('location', $pagetype); include_once('./class/title.php'); $title = new title; require_once('./sidebar_include.php'); require_once('./class/media.php'); $mymedia = new media; require_once('./class/filefunctions.php'); $ff = new filefunctions; require_once('./class/content.php'); $mycontent = new content; $temp = $mycontent->getContentsByCategory(3); $iteration = 0; $frontpagetext = array(); if ($temp) { while(!$temp->EOF) { if ($temp->fields['contentHTML'] == 1) { $frontpagetext[$iteration]['title'] = $temp->fields['contentName']; processContent($temp->fields['contentText'], $pagetype); $frontpagetext[$iteration]['text'] = $temp->fields['contentText']; $media = $mymedia->getContentMedia(-1, 0, 'AND contentID = '.$temp->fields['contentID']); if ($media) { $frontpagetext[$iteration]['media'] = $media->GetRows(); foreach ($frontpagetext[$iteration]['media'] AS $f => $v) { $frontpagetext[$iteration]['media'][$f]['URL'] = $ff->getFileHTML(basename($v['fileName']), $v['mimeType'], $v['size'], $v['title'], $v['width'], $v['height'], $v['link']); } } } else { $frontpagetext[$iteration]['title'] = $temp->fields['contentName']; $frontpagetext[$iteration]['text'] = nl2br($temp->fields['contentText']); $media = $mymedia->getContentMedia(-1, 0, 'AND contentID = '.$temp->fields['contentID']); if ($media) { $frontpagetext[$iteration]['media'] = $media->GetRows(); foreach ($frontpagetext[$iteration]['media'] AS $f => $v) { $frontpagetext[$iteration]['media'][$f]['URL'] = $ff->getFileHTML(basename($v['fileName']), $v['mimeType'], $v['size'], $v['title'], $v['width'], $v['height'], $v['link']); } } } $iteration++; $temp->MoveNext(); } } $smarty->assign('content', $frontpagetext); $smarty->assign('welcomeimage', $title->getFileName($frontpagetext[0]['title'], $pagetype)); $smarty->assign('errorlist', $error->listError()); $smarty->display('index.tpl'); ?>