getCurrentUser(); //permissions if($logged_on_user == null) { $tplVars['error'] = T_('Permission denied.'); $templateservice->loadTemplate('error.500.tpl', $tplVars); exit(); } list ($url, $tag1) = explode('/', $_SERVER['PATH_INFO']); if ($_POST['confirm']) { $tag1 = $_POST['tag1']; $linkType = $_POST['linkType']; $tag2 = $_POST['tag2']; if ($tag2tagservice->addLinkedTags($tag1, $tag2, $linkType, $userservice->getCurrentUserId())) { $tplVars['msg'] = T_('Tag link created'); header('Location: '. createURL('bookmarks', $logged_on_user[$userservice->getFieldName('username')])); } else { $tplVars['error'] = T_('Failed to create the link'); $templateservice->loadTemplate('error.500.tpl', $tplVars); exit(); } } elseif ($_POST['cancel']) { header('Location: '. createURL('bookmarks', $logged_on_user[$userservice->getFieldName('username')] .'/'. $tags)); } $tplVars['links'] = $tag2tagservice->getLinks($userservice->getCurrentUserId()); $tplVars['tag1'] = $tag1; $tplVars['subtitle'] = T_('Add Tag Link') .': '. $tag1; $tplVars['formaction'] = $_SERVER['SCRIPT_NAME'] .'/'. $tag1; $tplVars['referrer'] = $_SERVER['HTTP_REFERER']; $templateservice->loadTemplate('tag2tagadd.tpl', $tplVars); ?>