|
@@ 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); |
|
@@ 131-138 (lines=8) @@
|
| 128 |
|
$linkurl = $GLOBALS['xoops']->url("modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/singlelink.php?lid={$lid}"); |
| 129 |
|
// now check to make sure that the link the user is sharing is valid |
| 130 |
|
$result = $GLOBALS['xoopsDB']->query("SELECT title FROM {$GLOBALS['xoopsDB']->prefix( 'mylinks_links' )} WHERE `lid` = '{$lid}' AND status>0 LIMIT 0,1"); |
| 131 |
|
if ($result) { |
| 132 |
|
list($linktitle) = $GLOBALS['xoopsDB']->fetchRow($result); |
| 133 |
|
$linktitle = $myts->stripSlashesGPC($linktitle); |
| 134 |
|
} else { |
| 135 |
|
// invalid (or inactive) link, can't send this to a friend |
| 136 |
|
redirect_header('index.php', 3, _MD_MYLINKS_INVALIDORINACTIVELNK); |
| 137 |
|
exit(); |
| 138 |
|
} |
| 139 |
|
} else { |
| 140 |
|
redirect_header('index.php', 3, _MD_MYLINKS_INVALIDORINACTIVELNK); |
| 141 |
|
exit(); |