template_dir = '/home/tzanger/smarty/templates'; $smarty->compile_dir = '/home/tzanger/smarty/templates_c'; $smarty->cache_dir = '/home/tzanger/smarty/cache'; $smarty->config_dir = '/home/tzanger/smarty/configs'; if (isset($_GET['lang']) && $_GET['lang']=='es') { $lang_en = false; $lang_es = true; $smarty->assign('lang_en','lang_off'); $smarty->assign('lang_es','lang_on'); } else { $lang_en = true; $lang_es = false; $smarty->assign('lang_en','lang_on'); $smarty->assign('lang_es','lang_off'); } $smarty->assign('title', 'The Zanger Family'); //$aMenubar = array('Home' => '#', 'News' => '#', 'Stories' => '#', 'Photos' => '#', 'Galleries' => '#', 'Login' => '#'); $aMenubar = array('Home' => '?', 'Photos' => '?t=photos', 'Videos' => '?t=videos' ); $smarty->assign('aMenubar', $aMenubar); if ($template == 'home') { $smarty->assign('sLeftLinksTitle', 'Family & Friends'); $aLeftLinks = array('Tania & Tatnai' => 'http://www-personal.umich.edu/~tatnai/TnT2/Home.html','Matt Zanger' => 'http://s88.photobucket.com/albums/k197/Zanger/','Beth Edwards' => 'http://s52.photobucket.com/albums/g9/dragonsynthesis/'); $smarty->assign('aLeftLinks', $aLeftLinks); $aRandomPhotos = $oPhoto->setImageSizes($oDB->getPhotoInfo(makeList($oDB->getPhotoIDs(4))),28,34); $smarty->assign('aRandomPhotos',$aRandomPhotos); $aNewsItems = $oDB->getNews(6); $smarty->assign('aNewsItems',$aNewsItems); $smarty->assign('sPageName','Home'); } elseif ($template == 'photos') { $v = $_GET['v'] ? $_GET['v'] : 'added'; if ($v == 'added') { $d = $_GET['date'] ? $_GET['date'] : date('m-d-y'); $aPD=$oDB->getPhotosByDate($d); if(sizeof($aPD)>0) { $aPhotoDates = $oPhoto->setImageSizes($oDB->getPhotoInfo(makeList($aPD)),28,34); $smarty->assign('sDateTitle',"Photos added $d"); } else { $aPhotoDates = array(); $smarty->assign('sDateTitle',"No new photos for $d"); } $aLeftLinks = $oDB->getPhotoAddDates(); $smarty->assign('sPhotoType','added'); $smarty->assign('dDate',$d); } elseif ($v == 'taken') { $d = $_GET['date'] ? $_GET['date'] : date('m-y'); $aPD=$oDB->getPhotosByTakenDate($d); if(sizeof($aPD)>0) { $aPhotoDates = $oPhoto->setImageSizes($oDB->getPhotoInfo(makeList($aPD)),28,34); $smarty->assign('sDateTitle',"Photos taken in $d"); } else { $aPhotoDates = array(); $smarty->assign('sDateTitle',"No photos for $d"); } $aLeftLinks = $oDB->getPhotoTakenDates(); $smarty->assign('sPhotoType','taken'); $smarty->assign('dDate',$d); } $smarty->assign('aPhotoDates',$aPhotoDates); $smarty->assign('aLeftLinks', $aLeftLinks); $smarty->assign('sPageName','Photos'); $smarty->assign('sView',$v); } elseif ($template == 'videos') { $v = $_GET['v'] ? $_GET['v'] : ''; $aVideos=$oDB->getVideos(); $smarty->assign('aVideos',$aVideos); $smarty->assign('sPageName','Videos'); if ($v != '') { $vid = $oDB->getVideoInfo($v); $smarty->assign('aVideoInfo',$vid[0]); } else { $smarty->assign('aVideoInfo',array()); } } $smarty->display('dreamy_'.$template.'.tpl'); ?>