', 'Link suggestion'); } //////////////////// function verify() { global $error, $random_word; $field_list = array('suggest','confirm'); // trim list of fields $this->trimFields($field_list); // link must be specified if (!$this->formref['suggest'] || $this->formref['suggest'] == 'http://') { $this->stripslashesFields($field_list); return false; } if (!$this->formref['confirm'] || (count(array_intersect(array($this->formref['confirm']), $random_word)) != 1)) return false; return parent::verify(); } } // theme id specified in url $theme_id = $_REQUEST['theme_id']; // if no theme_id, redirect to v-links page if (!$theme_id) { header("Location: vlinks.php"); exit; } // form class $action = $_REQUEST['action']; if ($action == 'send') { $form = new FormMailLink(); $sent = $form->process(); } // get the main theme data require_once 'vlink.inc'; $ctheme = new CTheme($theme_id); $theme = $ctheme->data(); $smarty->assign('theme', $theme); // get the links for the main theme $subthemes[0]['id'] = $theme['indexnum']; $subthemes[0]['name'] = ''; $subthemes[0]['links'] = $ctheme->GetLinks(); $subtheme_rows = $ctheme->GetSubthemes(); $clink = new CVLink(); $count = 1; foreach ($subtheme_rows as $row) { $subthemes[$count]['id'] = $row['indexnum']; $subthemes[$count]['name'] = $row['theme_name']; $subthemes[$count]['links'] = $clink->GetLinksForTheme($row['indexnum']); $count++; } // url variables $smarty->assign('error', $error); $smarty->assign('sent', $sent); $smarty->assign('theme_image', $ctheme->GetThemeImage()); $smarty->assign('theme_id', $theme_id); $smarty->assign('subthemes', $subthemes); $smarty->assign('word', $random_word[array_rand($random_word)]); $v_ids = array('','v_Dome','v_Wild','v_Farm','v_Abst','v_Peac','v_Spir','v_Anar','v_Eros','v_Quee','v_Femi','v_Envi','v_Vege'); $smarty->assign('page_title', "$theme[theme_name] Links"); $smarty->assign('extra_css', 'links'); $smarty->assign('body_id', $v_ids[$theme_id]); $smarty->assign('left_content', 'nav/vlinks'); $smarty->display('page/main_narrow.tpl'); ?>