[xoops-cvslog 112] CVS update: xoops2jp/html/modules/mylinks

Back to archive index

onokazu onoka****@users*****
2005年 6月 11日 (土) 11:32:44 JST


Index: xoops2jp/html/modules/mylinks/index.php
diff -u xoops2jp/html/modules/mylinks/index.php:1.2 xoops2jp/html/modules/mylinks/index.php:1.3
--- xoops2jp/html/modules/mylinks/index.php:1.2	Fri Mar 18 21:52:24 2005
+++ xoops2jp/html/modules/mylinks/index.php	Sat Jun 11 11:32:44 2005
@@ -1,5 +1,5 @@
 <?php
-// $Id: index.php,v 1.2 2005/03/18 12:52:24 onokazu Exp $
+// $Id: index.php,v 1.3 2005/06/11 02:32:44 onokazu Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -34,47 +34,47 @@
 
 $count = 1;
 while($myrow = $xoopsDB->fetchArray($result)) {
-	$imgurl = '';
-	if ($myrow['imgurl'] && $myrow['imgurl'] != "http://"){
-		$imgurl = $myts->makeTboxData4Edit($myrow['imgurl']);
-	}
-	$totallink = getTotalItems($myrow['cid'], 1);
-	// get child category objects
-	$arr = array();
-	$arr = $mytree->getFirstChild($myrow['cid'], "title");
-	$space = 0;
-	$chcount = 0;
-	$subcategories = '';
-	foreach($arr as $ele){
-		$chtitle = $myts->makeTboxData4Show($ele['title']);
-		if ($chcount > 5) {
-			$subcategories .= "...";
-			break;
-		}
-		if ($space>0) {
-			$subcategories .= ", ";
-		}
-		$subcategories .= "<a href=\"".XOOPS_URL."/modules/mylinks/viewcat.php?cid=".$ele['cid']."\">".$chtitle."</a>";
-		$space++;
-		$chcount++;
-	}
-	$xoopsTpl->append('categories', array('image' => $imgurl, 'id' => $myrow['cid'], 'title' => $myts->makeTboxData4Show($myrow['title']), 'subcategories' => $subcategories, 'totallink' => $totallink, 'count' => $count));
-	$count++;
+    $imgurl = '';
+    if ($myrow['imgurl'] && $myrow['imgurl'] != "http://"){
+        $imgurl = $myts->makeTboxData4Edit($myrow['imgurl']);
+    }
+    $totallink = getTotalItems($myrow['cid'], 1);
+    // get child category objects
+    $arr = array();
+    $arr = $mytree->getFirstChild($myrow['cid'], "title");
+    $space = 0;
+    $chcount = 0;
+    $subcategories = '';
+    foreach($arr as $ele){
+        $chtitle = $myts->makeTboxData4Show($ele['title']);
+        if ($chcount > 5) {
+            $subcategories .= "...";
+            break;
+        }
+        if ($space>0) {
+            $subcategories .= ", ";
+        }
+        $subcategories .= "<a href=\"".XOOPS_URL."/modules/mylinks/viewcat.php?cid=".$ele['cid']."\">".$chtitle."</a>";
+        $space++;
+        $chcount++;
+    }
+    $xoopsTpl->append('categories', array('image' => $imgurl, 'id' => $myrow['cid'], 'title' => $myts->makeTboxData4Show($myrow['title']), 'subcategories' => $subcategories, 'totallink' => $totallink, 'count' => $count));
+    $count++;
 }
 list($numrows) = $xoopsDB->fetchRow($xoopsDB->query("select count(*) from ".$xoopsDB->prefix("mylinks_links")." where status>0"));
 $xoopsTpl->assign('lang_thereare', sprintf(_MD_THEREARE,$numrows));
 
 if ($xoopsModuleConfig['useshots'] == 1) {
-	$xoopsTpl->assign('shotwidth', $xoopsModuleConfig['shotwidth']);
-	$xoopsTpl->assign('tablewidth', $xoopsModuleConfig['shotwidth'] + 10);
-	$xoopsTpl->assign('show_screenshot', true);
-	$xoopsTpl->assign('lang_noscreenshot', _MD_NOSHOTS);
+    $xoopsTpl->assign('shotwidth', $xoopsModuleConfig['shotwidth']);
+    $xoopsTpl->assign('tablewidth', $xoopsModuleConfig['shotwidth'] + 10);
+    $xoopsTpl->assign('show_screenshot', true);
+    $xoopsTpl->assign('lang_noscreenshot', _MD_NOSHOTS);
 }
 
 if ($xoopsUser && $xoopsUser->isAdmin($xoopsModule->mid())) {
-	$isadmin = true;
+    $isadmin = true;
 } else {
-	$isadmin = false;
+    $isadmin = false;
 }
 
 $xoopsTpl->assign('lang_description', _MD_DESCRIPTIONC);
@@ -92,22 +92,22 @@
 
 $result = $xoopsDB->query("SELECT l.lid, l.cid, l.title, l.url, l.logourl, l.status, l.date, l.hits, l.rating, l.votes, l.comments, t.description FROM ".$xoopsDB->prefix("mylinks_links")." l, ".$xoopsDB->prefix("mylinks_text")." t where l.status>0 and l.lid=t.lid ORDER BY date DESC", $xoopsModuleConfig['newlinks'], 0);
 while(list($lid, $cid, $ltitle, $url, $logourl, $status, $time, $hits, $rating, $votes, $comments, $description) = $xoopsDB->fetchRow($result)) {
-	if ($isadmin) {
-		$adminlink = '<a href="'.XOOPS_URL.'/modules/mylinks/admin/?op=modLink&amp;lid='.$lid.'"><img src="'.XOOPS_URL.'/modules/mylinks/images/editicon.gif" border="0" alt="'._MD_EDITTHISLINK.'" /></a>';
-	} else {
-		$adminlink = '';
-	}
-	if ($votes == 1) {
-		$votestring = _MD_ONEVOTE;
-	} else {
-		$votestring = sprintf(_MD_NUMVOTES,$votes);
-	}
-	$path = $mytree->getPathFromId($cid, "title");
-	$path = substr($path, 1);
-	$path = str_replace("/"," <img src='".XOOPS_URL."/modules/mylinks/images/arrow.gif' board='0' alt=''> ",$path);
-	$new = newlinkgraphic($time, $status);
-	$pop = popgraphic($hits);
-	$xoopsTpl->append('links', array('id' => $lid, 'cid' => $cid, 'rating' => number_format($rating, 2), 'title' => $myts->makeTboxData4Show($ltitle).$new.$pop, 'category' => $path, 'logourl' => $myts->makeTboxData4Show($logourl), 'updated' => formatTimestamp($time,"m"), 'description' => $myts->makeTareaData4Show($description,0), 'adminlink' => $adminlink, 'hits' => $hits, 'votes' => $votestring, 'comments' => $comments, 'mail_subject' => rawurlencode(sprintf(_MD_INTRESTLINK,$xoopsConfig['sitename'])), 'mail_body' => rawurlencode(sprintf(_MD_INTLINKFOUND,$xoopsConfig['sitename']).':  '.XOOPS_URL.'/modules/mylinks/singlelink.php?cid='.$cid.'&amp;lid='.$lid)));
+    if ($isadmin) {
+        $adminlink = '<a href="'.XOOPS_URL.'/modules/mylinks/admin/?op=modLink&amp;lid='.$lid.'"><img src="'.XOOPS_URL.'/modules/mylinks/images/editicon.gif" border="0" alt="'._MD_EDITTHISLINK.'" /></a>';
+    } else {
+        $adminlink = '';
+    }
+    if ($votes == 1) {
+        $votestring = _MD_ONEVOTE;
+    } else {
+        $votestring = sprintf(_MD_NUMVOTES,$votes);
+    }
+    $path = $mytree->getPathFromId($cid, "title");
+    $path = substr($path, 1);
+    $path = str_replace("/"," <img src='".XOOPS_URL."/modules/mylinks/images/arrow.gif' board='0' alt='' /> ",$path);
+    $new = newlinkgraphic($time, $status);
+    $pop = popgraphic($hits);
+    $xoopsTpl->append('links', array('id' => $lid, 'cid' => $cid, 'rating' => number_format($rating, 2), 'title' => $myts->makeTboxData4Show($ltitle).$new.$pop, 'category' => $path, 'logourl' => $myts->makeTboxData4Show($logourl), 'updated' => formatTimestamp($time,"m"), 'description' => $myts->makeTareaData4Show($description,0), 'adminlink' => $adminlink, 'hits' => $hits, 'votes' => $votestring, 'comments' => $comments, 'mail_subject' => rawurlencode(sprintf(_MD_INTRESTLINK,$xoopsConfig['sitename'])), 'mail_body' => rawurlencode(sprintf(_MD_INTLINKFOUND,$xoopsConfig['sitename']).':  '.XOOPS_URL.'/modules/mylinks/singlelink.php?cid='.$cid.'&amp;lid='.$lid)));
 }
 include XOOPS_ROOT_PATH.'/footer.php';
 ?>
Index: xoops2jp/html/modules/mylinks/myheader.php
diff -u xoops2jp/html/modules/mylinks/myheader.php:1.2 xoops2jp/html/modules/mylinks/myheader.php:1.3
--- xoops2jp/html/modules/mylinks/myheader.php:1.2	Fri Mar 18 21:52:24 2005
+++ xoops2jp/html/modules/mylinks/myheader.php	Sat Jun 11 11:32:44 2005
@@ -1,5 +1,5 @@
 <?php
-// $Id: myheader.php,v 1.2 2005/03/18 12:52:24 onokazu Exp $
+// $Id: myheader.php,v 1.3 2005/06/11 02:32:44 onokazu Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -52,10 +52,10 @@
 <td width="100%" align="center">
 <table class="bg3" width=95% cellspacing="2" cellpadding="3" border="0" style="border: #e0e0e0 1px solid;"><tr>
 <td style="border-bottom: #e0e0e0 1px solid;">
-<b><?php echo $xoopsConfig['sitename']; ?></b></td>
+<b><?php echo htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES); ?></b></td>
 </tr>
 <tr>
 <td class='bg4' align="center"><small>
-<a target="main" href="ratelink.php?cid=<?php echo $cid; ?>&amp;lid=<?php echo $lid; ?>"><?php echo _MD_RATETHISSITE; ?></a> | <a target="main" href="modlink.php?lid=<?php echo $lid; ?>"><?php echo _MD_MODIFY; ?></a> | <a target="main" href="brokenlink.php?lid=<?php echo $lid; ?>"><?php echo _MD_REPORTBROKEN; ?></a> | <a target='_top' href='mailto:?subject=<?php echo $mail_subject; ?>&body=<?php echo $mail_body;?>'><?php echo _MD_TELLAFRIEND; ?></a> | <a target='_top' href="<?php echo XOOPS_URL; ?>">Back to <?php echo $xoopsConfig['sitename']; ?></a> | <a target='_top' href="<?php echo $url; ?>">Close Frame</a>
+<a target="main" href="ratelink.php?cid=<?php echo $cid; ?>&amp;lid=<?php echo $lid; ?>"><?php echo _MD_RATETHISSITE; ?></a> | <a target="main" href="modlink.php?lid=<?php echo $lid; ?>"><?php echo _MD_MODIFY; ?></a> | <a target="main" href="brokenlink.php?lid=<?php echo $lid; ?>"><?php echo _MD_REPORTBROKEN; ?></a> | <a target='_top' href='mailto:?subject=<?php echo $mail_subject; ?>&body=<?php echo $mail_body;?>'><?php echo _MD_TELLAFRIEND; ?></a> | <a target='_top' href="<?php echo XOOPS_URL; ?>">Back to <?php echo htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES); ?></a> | <a target='_top' href="<?php echo $url; ?>">Close Frame</a>
 </small></td></tr></table>
 </td></tr></table></body></html>
Index: xoops2jp/html/modules/mylinks/ratelink.php
diff -u xoops2jp/html/modules/mylinks/ratelink.php:1.2 xoops2jp/html/modules/mylinks/ratelink.php:1.3
--- xoops2jp/html/modules/mylinks/ratelink.php:1.2	Fri Mar 18 21:52:24 2005
+++ xoops2jp/html/modules/mylinks/ratelink.php	Sat Jun 11 11:32:44 2005
@@ -1,5 +1,5 @@
 <?php
-// $Id: ratelink.php,v 1.2 2005/03/18 12:52:24 onokazu Exp $
+// $Id: ratelink.php,v 1.3 2005/06/11 02:32:44 onokazu Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -29,87 +29,87 @@
 $myts =& MyTextSanitizer::getInstance(); // MyTextSanitizer object
 
 if (!empty($HTTP_POST_VARS['submit'])) {
-	$eh = new ErrorHandler; //ErrorHandler object
-	if(empty($xoopsUser)){
-		$ratinguser = 0;
-	}else{
-		$ratinguser = $xoopsUser->getVar('uid');
-	}
-
-   	//Make sure only 1 anonymous from an IP in a single day.
-   	$anonwaitdays = 1;
-   	$ip = getenv("REMOTE_ADDR");
-	$lid = intval($HTTP_POST_VARS['lid']);
-	$cid = intval($HTTP_POST_VARS['cid']);
-	$rating = intval($HTTP_POST_VARS['rating']);
-
-   	// Check if Rating is Null
-   	if ($rating=="--") {
-		redirect_header("ratelink.php?cid=".$cid."&amp;lid=".$lid."",4,_MD_NORATING);
-		exit();
-   	}
-
-   	// Check if Link POSTER is voting (UNLESS Anonymous users allowed to post)
-   	if ($ratinguser != 0) {
-       	$result=$xoopsDB->query("select submitter from ".$xoopsDB->prefix("mylinks_links")." where lid=$lid");
-       	while(list($ratinguserDB) = $xoopsDB->fetchRow($result)) {
-       		if ($ratinguserDB == $ratinguser) {
-				redirect_header("index.php",4,_MD_CANTVOTEOWN);
-				exit();
-          	}
-       	}
-
-    	// Check if REG user is trying to vote twice.
-   		$result=$xoopsDB->query("select ratinguser from ".$xoopsDB->prefix("mylinks_votedata")." where lid=$lid");
-       	while(list($ratinguserDB) = $xoopsDB->fetchRow($result)) {
-       		if ($ratinguserDB == $ratinguser) {
-				redirect_header("index.php",4,_MD_VOTEONCE2);
-				exit();
-           	}
-      	}
-
-   	} else {
-
-   		// Check if ANONYMOUS user is trying to vote more than once per day.
-		$yesterday = (time()-(86400 * $anonwaitdays));
-       	$result=$xoopsDB->query("select count(*) FROM ".$xoopsDB->prefix("mylinks_votedata")." WHERE lid=$lid AND ratinguser=0 AND ratinghostname = '$ip' AND ratingtimestamp > $yesterday");
-   		list($anonvotecount) = $xoopsDB->fetchRow($result);
-   		if ($anonvotecount > 0) {
-			redirect_header("index.php",4,_MD_VOTEONCE2);
-			exit();
-       	}
-   	}
-	if($rating > 10){
-		$rating = 10;
-	}
+    $eh = new ErrorHandler; //ErrorHandler object
+    if(empty($xoopsUser)){
+        $ratinguser = 0;
+    }else{
+        $ratinguser = $xoopsUser->getVar('uid');
+    }
+
+    //Make sure only 1 anonymous from an IP in a single day.
+    $anonwaitdays = 1;
+    $ip = getenv("REMOTE_ADDR");
+    $lid = intval($HTTP_POST_VARS['lid']);
+    $cid = intval($HTTP_POST_VARS['cid']);
+    $rating = intval($HTTP_POST_VARS['rating']);
+
+    // Check if Rating is Null
+    if ($rating=="--") {
+        redirect_header("ratelink.php?cid=".$cid."&amp;lid=".$lid."",4,_MD_NORATING);
+        exit();
+    }
+
+    // Check if Link POSTER is voting (UNLESS Anonymous users allowed to post)
+    if ($ratinguser != 0) {
+        $result=$xoopsDB->query("select submitter from ".$xoopsDB->prefix("mylinks_links")." where lid=$lid");
+        while(list($ratinguserDB) = $xoopsDB->fetchRow($result)) {
+            if ($ratinguserDB == $ratinguser) {
+                redirect_header("index.php",4,_MD_CANTVOTEOWN);
+                exit();
+            }
+        }
+
+        // Check if REG user is trying to vote twice.
+        $result=$xoopsDB->query("select ratinguser from ".$xoopsDB->prefix("mylinks_votedata")." where lid=$lid");
+        while(list($ratinguserDB) = $xoopsDB->fetchRow($result)) {
+            if ($ratinguserDB == $ratinguser) {
+                redirect_header("index.php",4,_MD_VOTEONCE2);
+                exit();
+            }
+        }
+
+    } else {
+
+        // Check if ANONYMOUS user is trying to vote more than once per day.
+        $yesterday = (time()-(86400 * $anonwaitdays));
+        $result=$xoopsDB->query("select count(*) FROM ".$xoopsDB->prefix("mylinks_votedata")." WHERE lid=$lid AND ratinguser=0 AND ratinghostname = '$ip' AND ratingtimestamp > $yesterday");
+        list($anonvotecount) = $xoopsDB->fetchRow($result);
+        if ($anonvotecount > 0) {
+            redirect_header("index.php",4,_MD_VOTEONCE2);
+            exit();
+        }
+    }
+    if($rating > 10){
+        $rating = 10;
+    }
 
     //All is well.  Add to Line Item Rate to DB.
-	$newid = $xoopsDB->genId($xoopsDB->prefix("mylinks_votedata")."_ratingid_seq");
-	$datetime = time();
-	$sql = sprintf("INSERT INTO %s (ratingid, lid, ratinguser, rating, ratinghostname, ratingtimestamp) VALUES (%u, %u, %u, %u, '%s', %u)", $xoopsDB->prefix("mylinks_votedata"), $newid, $lid, $ratinguser, $rating, $ip, $datetime);
-	$xoopsDB->query($sql) or $eh->show("0013");
+    $newid = $xoopsDB->genId($xoopsDB->prefix("mylinks_votedata")."_ratingid_seq");
+    $datetime = time();
+    $sql = sprintf("INSERT INTO %s (ratingid, lid, ratinguser, rating, ratinghostname, ratingtimestamp) VALUES (%u, %u, %u, %u, '%s', %u)", $xoopsDB->prefix("mylinks_votedata"), $newid, $lid, $ratinguser, $rating, $ip, $datetime);
+    $xoopsDB->query($sql) or $eh->show("0013");
 
     //All is well.  Calculate Score & Add to Summary (for quick retrieval & sorting) to DB.
     updaterating($lid);
-	$ratemessage = _MD_VOTEAPPRE."<br />".sprintf(_MD_THANKURATE,$xoopsConfig[sitename]);
-	redirect_header("index.php",2,$ratemessage);
-	exit();
+    $ratemessage = _MD_VOTEAPPRE."<br />".sprintf(_MD_THANKURATE, htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES));
+    redirect_header("index.php",2,$ratemessage);
+    exit();
 
 } else {
 
-	$xoopsOption['template_main'] = 'mylinks_ratelink.html';
-	include XOOPS_ROOT_PATH."/header.php";
-	$lid = intval($HTTP_GET_VARS['lid']);
-	$cid = intval($HTTP_GET_VARS['cid']);
-	$result=$xoopsDB->query("select title from ".$xoopsDB->prefix("mylinks_links")." where lid=$lid");
-	list($title) = $xoopsDB->fetchRow($result);
-	$xoopsTpl->assign('link', array('id' => $lid, 'cid' => $cid, 'title' => $myts->htmlSpecialChars($title)));
-	$xoopsTpl->assign('lang_voteonce', _MD_VOTEONCE);
-	$xoopsTpl->assign('lang_ratingscale', _MD_RATINGSCALE);
-	$xoopsTpl->assign('lang_beobjective', _MD_BEOBJECTIVE);
-	$xoopsTpl->assign('lang_donotvote', _MD_DONOTVOTE);
-	$xoopsTpl->assign('lang_rateit', _MD_RATEIT);
-	$xoopsTpl->assign('lang_cancel', _CANCEL);
-	include XOOPS_ROOT_PATH.'/footer.php';
+    $xoopsOption['template_main'] = 'mylinks_ratelink.html';
+    include XOOPS_ROOT_PATH."/header.php";
+    $lid = intval($HTTP_GET_VARS['lid']);
+    $cid = intval($HTTP_GET_VARS['cid']);
+    $result=$xoopsDB->query("select title from ".$xoopsDB->prefix("mylinks_links")." where lid=$lid");
+    list($title) = $xoopsDB->fetchRow($result);
+    $xoopsTpl->assign('link', array('id' => $lid, 'cid' => $cid, 'title' => $myts->htmlSpecialChars($title)));
+    $xoopsTpl->assign('lang_voteonce', _MD_VOTEONCE);
+    $xoopsTpl->assign('lang_ratingscale', _MD_RATINGSCALE);
+    $xoopsTpl->assign('lang_beobjective', _MD_BEOBJECTIVE);
+    $xoopsTpl->assign('lang_donotvote', _MD_DONOTVOTE);
+    $xoopsTpl->assign('lang_rateit', _MD_RATEIT);
+    $xoopsTpl->assign('lang_cancel', _CANCEL);
+    include XOOPS_ROOT_PATH.'/footer.php';
 }
 ?>
Index: xoops2jp/html/modules/mylinks/singlelink.php
diff -u xoops2jp/html/modules/mylinks/singlelink.php:1.2 xoops2jp/html/modules/mylinks/singlelink.php:1.3
--- xoops2jp/html/modules/mylinks/singlelink.php:1.2	Fri Mar 18 21:52:24 2005
+++ xoops2jp/html/modules/mylinks/singlelink.php	Sat Jun 11 11:32:44 2005
@@ -1,5 +1,5 @@
 <?php
-// $Id: singlelink.php,v 1.2 2005/03/18 12:52:24 onokazu Exp $
+// $Id: singlelink.php,v 1.3 2005/06/11 02:32:44 onokazu Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -59,7 +59,7 @@
 }
 $path = $mytree->getPathFromId($cid, "title");
 $path = substr($path, 1);
-$path = str_replace("/"," <img src='".XOOPS_URL."/modules/mylinks/images/arrow.gif' board='0' alt=''> ",$path);
+$path = str_replace("/"," <img src='".XOOPS_URL."/modules/mylinks/images/arrow.gif' board='0' alt='' /> ",$path);
 $new = newlinkgraphic($time, $status);
 $pop = popgraphic($hits);
 $xoopsTpl->assign('link', array('id' => $lid, 'cid' => $cid, 'rating' => number_format($rating, 2), 'title' => $myts->makeTboxData4Show($ltitle).$new.$pop, 'category' => $path, 'logourl' => $myts->makeTboxData4Show($logourl), 'updated' => formatTimestamp($time,"m"), 'description' => $myts->makeTareaData4Show($description,0), 'adminlink' => $adminlink, 'hits' => $hits, 'votes' => $votestring, 'comments' => $comments, 'mail_subject' => rawurlencode(sprintf(_MD_INTRESTLINK,$xoopsConfig['sitename'])), 'mail_body' => rawurlencode(sprintf(_MD_INTLINKFOUND,$xoopsConfig['sitename']).':  '.XOOPS_URL.'/modules/mylinks/singlelink.php?lid='.$lid)));
Index: xoops2jp/html/modules/mylinks/viewcat.php
diff -u xoops2jp/html/modules/mylinks/viewcat.php:1.2 xoops2jp/html/modules/mylinks/viewcat.php:1.3
--- xoops2jp/html/modules/mylinks/viewcat.php:1.2	Fri Mar 18 21:52:24 2005
+++ xoops2jp/html/modules/mylinks/viewcat.php	Sat Jun 11 11:32:44 2005
@@ -1,5 +1,5 @@
 <?php
-// $Id: viewcat.php,v 1.2 2005/03/18 12:52:24 onokazu Exp $
+// $Id: viewcat.php,v 1.3 2005/06/11 02:32:44 onokazu Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -58,26 +58,26 @@
 if ( count($arr) > 0 ) {
     $scount = 1;
     foreach($arr as $ele){
-		$sub_arr=array();
-		$sub_arr=$mytree->getFirstChild($ele['cid'], "title");
-		$space = 0;
-		$chcount = 0;
-		$infercategories = "";
-		foreach($sub_arr as $sub_ele){
-			$chtitle=$myts->makeTboxData4Show($sub_ele['title']);
-			if ($chcount>5){
-				$infercategories .= "...";
-				break;
-			}
-			if ($space>0) {
-				$infercategories .= ", ";
-			}
-			$infercategories .= "<a href=\"".XOOPS_URL."/modules/mylinks/viewcat.php?cid=".$sub_ele['cid']."\">".$chtitle."</a>";
-			$space++;
-			$chcount++;
-		}
-   		$xoopsTpl->append('subcategories', array('title' => $myts->makeTboxData4Show($ele['title']), 'id' => $ele['cid'], 'infercategories' => $infercategories, 'totallinks' => getTotalItems($ele['cid'], 1), 'count' => $scount));
-    	$scount++;
+        $sub_arr=array();
+        $sub_arr=$mytree->getFirstChild($ele['cid'], "title");
+        $space = 0;
+        $chcount = 0;
+        $infercategories = "";
+        foreach($sub_arr as $sub_ele){
+            $chtitle=$myts->makeTboxData4Show($sub_ele['title']);
+            if ($chcount>5){
+                $infercategories .= "...";
+                break;
+            }
+            if ($space>0) {
+                $infercategories .= ", ";
+            }
+            $infercategories .= "<a href=\"".XOOPS_URL."/modules/mylinks/viewcat.php?cid=".$sub_ele['cid']."\">".$chtitle."</a>";
+            $space++;
+            $chcount++;
+        }
+        $xoopsTpl->append('subcategories', array('title' => $myts->makeTboxData4Show($ele['title']), 'id' => $ele['cid'], 'infercategories' => $infercategories, 'totallinks' => getTotalItems($ele['cid'], 1), 'count' => $scount));
+        $scount++;
     }
 }
 
@@ -108,7 +108,7 @@
     $xoopsTpl->assign('lang_category' , _MD_CATEGORYC);
     $xoopsTpl->assign('lang_visit' , _MD_VISIT);
     $xoopsTpl->assign('show_links', true);
-	$xoopsTpl->assign('lang_comments' , _COMMENTS);
+    $xoopsTpl->assign('lang_comments' , _COMMENTS);
     $sql = "select l.lid, l.cid, l.title, l.url, l.logourl, l.status, l.date, l.hits, l.rating, l.votes, l.comments, t.description from ".$xoopsDB->prefix("mylinks_links")." l, ".$xoopsDB->prefix("mylinks_text")." t where cid=$cid and l.lid=t.lid and status>0 order by $orderby";
     $result=$xoopsDB->query($sql,$show,$min);
 
@@ -136,17 +136,17 @@
         }
         $path = $mytree->getPathFromId($cid, "title");
         $path = substr($path, 1);
-        $path = str_replace("/"," <img src='".XOOPS_URL."/modules/mylinks/images/arrow.gif' board='0' alt=''> ",$path);
+        $path = str_replace("/"," <img src='".XOOPS_URL."/modules/mylinks/images/arrow.gif' board='0' alt='' /> ",$path);
         $new = newlinkgraphic($time, $status);
         $pop = popgraphic($hits);
         $xoopsTpl->append('links', array('id' => $lid, 'cid' => $cid, 'rating' => number_format($rating, 2), 'title' => $myts->makeTboxData4Show($ltitle).$new.$pop, 'category' => $path, 'logourl' => $myts->makeTboxData4Show($logourl), 'updated' => formatTimestamp($time,"m"), 'description' => $myts->makeTareaData4Show($description,0), 'adminlink' => $adminlink, 'hits' => $hits, 'comments' => $comments, 'votes' => $votestring, 'mail_subject' => rawurlencode(sprintf(_MD_INTRESTLINK,$xoopsConfig['sitename'])), 'mail_body' => rawurlencode(sprintf(_MD_INTLINKFOUND,$xoopsConfig['sitename']).':  '.XOOPS_URL.'/modules/mylinks/singlelink.php?cid='.$cid.'&amp;lid='.$lid)));
-    } 
+    }
     $orderby = convertorderbyout($orderby);
     //Calculates how many pages exist.  Which page one should be on, etc...
     $linkpages = ceil($numrows / $show);
     //Page Numbering
     if ($linkpages!=1 && $linkpages!=0) {
-		$cid = intval($HTTP_GET_VARS['cid']);
+        $cid = intval($HTTP_GET_VARS['cid']);
         $prev = $min - $show;
         if ($prev>=0) {
             $page_nav .= "<a href='viewcat.php?cid=$cid&amp;min=$prev&amp;orderby=$orderby&amp;show=$show'><b><u>&laquo;</u></b></a>&nbsp;";
Index: xoops2jp/html/modules/mylinks/visit.php
diff -u xoops2jp/html/modules/mylinks/visit.php:1.2 xoops2jp/html/modules/mylinks/visit.php:1.3
--- xoops2jp/html/modules/mylinks/visit.php:1.2	Fri Mar 18 21:52:25 2005
+++ xoops2jp/html/modules/mylinks/visit.php	Sat Jun 11 11:32:44 2005
@@ -1,5 +1,5 @@
 <?php
-// $Id: visit.php,v 1.2 2005/03/18 12:52:25 onokazu Exp $
+// $Id: visit.php,v 1.3 2005/06/11 02:32:44 onokazu Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -35,21 +35,21 @@
 
 
 if ( $xoopsModuleConfig['frame'] != "" ) {
-	header('Content-Type:text/html; charset='._CHARSET);
-	header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
-	header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
-	header('Cache-Control: no-store, no-cache, must-revalidate');
-	header("Cache-Control: post-check=0, pre-check=0", false);
-	header("Pragma: no-cache");
-	echo "<html><head>
-		<title>".$xoopsConfig['sitename']."</title>
-		</head>
-		<frameset rows='70px,100%' cols='*' border='0' frameborder='0' framespacing='0' >
-		<frame src='myheader.php?url=$url&amp;cid=$cid&amp;lid=$lid' frame name='xoopshead' scrolling='no' target='main' Noresize>
-		<frame src='".$url."' frame name='main' scrolling='auto' target='Main'>
-		</frameset></html>";
+    header('Content-Type:text/html; charset='._CHARSET);
+    header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
+    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
+    header('Cache-Control: no-store, no-cache, must-revalidate');
+    header("Cache-Control: post-check=0, pre-check=0", false);
+    header("Pragma: no-cache");
+    echo "<html><head>
+        <title>".htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)."</title>
+        </head>
+        <frameset rows='70px,100%' cols='*' border='0' frameborder='0' framespacing='0' >
+        <frame src='myheader.php?url=$url&amp;cid=$cid&amp;lid=$lid' frame name='xoopshead' scrolling='no' target='main' Noresize>
+        <frame src='".$url."' frame name='main' scrolling='auto' target='Main'>
+        </frameset></html>";
 } else {
-	echo "<html><head><meta http-equiv=\"Refresh\" content=\"0; URL=".$url."\"></meta></head><body></body></html>";
+    echo "<html><head><meta http-equiv=\"Refresh\" content=\"0; URL=".$url."\"></meta></head><body></body></html>";
 }
 exit();
 


xoops-cvslog メーリングリストの案内
Back to archive index