@@ 50-57 (lines=8) @@ | ||
47 | ||
48 | // make sure that the link the user is sharing is valid & active |
|
49 | $result = $GLOBALS['xoopsDB']->query("SELECT title FROM {$GLOBALS['xoopsDB']->prefix('mylinks_links')} WHERE `lid` = '{$lid}' AND status>0 LIMIT 0,1"); |
|
50 | if ($result) { |
|
51 | list($linktitle) = $GLOBALS['xoopsDB']->fetchRow($result); |
|
52 | $linktitle = $myts->stripSlashesGPC($linktitle); |
|
53 | } else { |
|
54 | // invalid (or inactive) link, can't send this to a friend |
|
55 | redirect_header('index.php', 3, _MD_MYLINKS_INVALIDORINACTIVELNK); |
|
56 | exit(); |
|
57 | } |
|
58 | ||
59 | $tfform = new XoopsThemeForm(_MD_MYLINKS_TELLAFRIEND, 'tfform', $_SERVER['PHP_SELF'], 'post', true); |
|
60 | $tfform->addElement(new XoopsFormText(_MD_MYLINKS_FRIEND . ' ' . _MD_MYLINKS_NAME, 'frname', 50, 50, trim($frname)), true); |
|
@@ 132-139 (lines=8) @@ | ||
129 | $linkurl = $GLOBALS['xoops']->url('modules/' . $GLOBALS['xoopsModule']->getVar('dirname') . "/singlelink.php?lid={$lid}"); |
|
130 | // now check to make sure that the link the user is sharing is valid |
|
131 | $result = $GLOBALS['xoopsDB']->query("SELECT title FROM {$GLOBALS['xoopsDB']->prefix('mylinks_links')} WHERE `lid` = '{$lid}' AND status>0 LIMIT 0,1"); |
|
132 | if ($result) { |
|
133 | list($linktitle) = $GLOBALS['xoopsDB']->fetchRow($result); |
|
134 | $linktitle = $myts->stripSlashesGPC($linktitle); |
|
135 | } else { |
|
136 | // invalid (or inactive) link, can't send this to a friend |
|
137 | redirect_header('index.php', 3, _MD_MYLINKS_INVALIDORINACTIVELNK); |
|
138 | exit(); |
|
139 | } |
|
140 | } else { |
|
141 | redirect_header('index.php', 3, _MD_MYLINKS_INVALIDORINACTIVELNK); |
|
142 | exit(); |