onokazu
onoka****@users*****
2005年 7月 29日 (金) 15:22:23 JST
Index: xoops2jp/html/modules/mylinks/visit.php diff -u xoops2jp/html/modules/mylinks/visit.php:1.2.6.1 xoops2jp/html/modules/mylinks/visit.php:1.2.6.1.2.1 --- xoops2jp/html/modules/mylinks/visit.php:1.2.6.1 Thu May 26 19:35:16 2005 +++ xoops2jp/html/modules/mylinks/visit.php Fri Jul 29 15:22:22 2005 @@ -1,5 +1,5 @@ <?php -// $Id: visit.php,v 1.2.6.1 2005/05/26 10:35:16 onokazu Exp $ +// $Id: visit.php,v 1.2.6.1.2.1 2005/07/29 06:22:22 onokazu Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // @@ -25,15 +25,21 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // ------------------------------------------------------------------------ // include '../../mainfile.php'; -$lid = intval($HTTP_GET_VARS['lid']); -$cid = intval($HTTP_GET_VARS['cid']); +$lid = intval($_GET['lid']); +if (empty($lid)) { + header('Location: '.XOOPS_URL.'/'); + exit(); +} +$cid = intval($_GET['cid']); $sql = sprintf("UPDATE %s SET hits = hits+1 WHERE lid = %u AND status > 0", $xoopsDB->prefix("mylinks_links"), $lid); $xoopsDB->queryF($sql); $result = $xoopsDB->query("select url from ".$xoopsDB->prefix("mylinks_links")." where lid=$lid and status>0"); list($url) = $xoopsDB->fetchRow($result); +if (empty($url)) { + header('Location: '.XOOPS_URL.'/'); + exit(); +} $url = htmlspecialchars(preg_replace( '/javascript:/si' , 'java script:', $url ), ENT_QUOTES); - - if ( $xoopsModuleConfig['frame'] != "" ) { header('Content-Type:text/html; charset='._CHARSET); header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');