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

Zurück zum Archiv-Index

onokazu onoka****@users*****
2005年 5月 30日 (月) 21:26:41 JST


Index: xoops2jp/html/modules/mylinks/blocks/mylinks_top.php
diff -u xoops2jp/html/modules/mylinks/blocks/mylinks_top.php:1.2 xoops2jp/html/modules/mylinks/blocks/mylinks_top.php:1.2.6.1
--- xoops2jp/html/modules/mylinks/blocks/mylinks_top.php:1.2	Fri Mar 18 21:52:24 2005
+++ xoops2jp/html/modules/mylinks/blocks/mylinks_top.php	Mon May 30 21:26:41 2005
@@ -1,5 +1,5 @@
 <?php
-// $Id: mylinks_top.php,v 1.2 2005/03/18 12:52:24 onokazu Exp $
+// $Id: mylinks_top.php,v 1.2.6.1 2005/05/30 12:26:41 onokazu Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -33,43 +33,43 @@
  * Output  : Returns the desired most recent or most popular links
  ******************************************************************************/
 function b_mylinks_top_show($options) {
-	global $xoopsDB;
-	$block = array();
-	$myts =& MyTextSanitizer::getInstance();
-	$result = $xoopsDB->query("SELECT lid, cid, title, date, hits FROM ".$xoopsDB->prefix("mylinks_links")." WHERE status>0 ORDER BY ".$options[0]." DESC",$options[1],0);
-	while($myrow = $xoopsDB->fetchArray($result)){
-		$link = array();
-		$title = $myts->makeTboxData4Show($myrow["title"]);
-		if ( !XOOPS_USE_MULTIBYTES ) {
-			if (strlen($myrow['title']) >= $options[2]) {
-				$title = $myts->makeTboxData4Show(substr($myrow['title'],0,($options[2] -1)))."...";
-			}
-		}
-		$link['id'] = $myrow['lid'];
-		$link['cid'] = $myrow['cid'];
-		$link['title'] = $title;
-		if($options[0] == "date"){
-			$link['date'] = formatTimestamp($myrow['date'],'s');
-		}elseif($options[0] == "hits"){
-			$link['hits'] = $myrow['hits'];
-		}
-		$block['links'][] = $link;
-	}
-	return $block;
+    global $xoopsDB;
+    $block = array();
+    $myts =& MyTextSanitizer::getInstance();
+    $result = $xoopsDB->query("SELECT lid, cid, title, date, hits FROM ".$xoopsDB->prefix("mylinks_links")." WHERE status>0 ORDER BY ".$options[0]." DESC",$options[1],0);
+    while($myrow = $xoopsDB->fetchArray($result)){
+        $link = array();
+        $title = $myts->makeTboxData4Show($myrow["title"]);
+        if ( !XOOPS_USE_MULTIBYTES ) {
+            if (strlen($myrow['title']) >= $options[2]) {
+                $title = $myts->makeTboxData4Show(substr($myrow['title'],0,($options[2] -1)))."...";
+            }
+        }
+        $link['id'] = $myrow['lid'];
+        $link['cid'] = $myrow['cid'];
+        $link['title'] = $title;
+        if($options[0] == "date"){
+            $link['date'] = formatTimestamp($myrow['date'],'s');
+        }elseif($options[0] == "hits"){
+            $link['hits'] = $myrow['hits'];
+        }
+        $block['links'][] = $link;
+    }
+    return $block;
 }
 
 function b_mylinks_top_edit($options) {
-	$form = ""._MB_MYLINKS_DISP."&nbsp;";
-	$form .= "<input type='hidden' name='options[]' value='";
-	if($options[0] == "date"){
-		$form .= "date'";
-	}else {
-		$form .= "hits'";
-	}
-	$form .= " />";
-	$form .= "<input type='text' name='options[]' value='".$options[1]."' />&nbsp;"._MB_MYLINKS_LINKS."";
-	$form .= "&nbsp;<br>"._MB_MYLINKS_CHARS."&nbsp;<input type='text' name='options[]' value='".$options[2]."' />&nbsp;"._MB_MYLINKS_LENGTH."";
+    $form = ""._MB_MYLINKS_DISP."&nbsp;";
+    $form .= "<input type='hidden' name='options[]' value='";
+    if($options[0] == "date"){
+        $form .= "date'";
+    }else {
+        $form .= "hits'";
+    }
+    $form .= " />";
+    $form .= "<input type='text' name='options[]' value='".$options[1]."' />&nbsp;"._MB_MYLINKS_LINKS."";
+    $form .= "&nbsp;<br />"._MB_MYLINKS_CHARS."&nbsp;<input type='text' name='options[]' value='".$options[2]."' />&nbsp;"._MB_MYLINKS_LENGTH."";
 
-	return $form;
+    return $form;
 }
 ?>


xoops-cvslog メーリングリストの案内
Zurück zum Archiv-Index