Location: PHPKode > projects > DDL CMS > Upload these files to your webspace/instantle/links2.inc
<?php
	switch($instantLEsort)
	{
		case 'asc':
			$sortLinks = 'sitename';
			break;
		case 'date':
			$sortLinks = 'id';
			break;
		case 'random':
			$sortLinks = 'RAND()';
			break;
	}
	$linkQuery = dbcom("SELECT * FROM instantle ORDER BY $sortLinks LIMIT $instantLEmaxLinks;");
	if(mysql_num_rows($linkQuery) > 0)
	{
		$links = 1;
		while($linkArray = mysql_fetch_assoc($linkQuery))
		{
			$url = $linkArray['siteurl'];
	    	if($instantLEclean != 1)
			{
				$url = $site_url . '/fwd.php?url=' . $url;
			}
			$description = $linkArray['description'];
			$title = $linkArray['sitename'];
			echo '<img src="' . $site_url . '/skins/' . $skin . '/arrow.gif" height="8" width="4" alt="' . $site_name . ': ' . $description . ' (' . $keywords . ')" /> <a href="' . $url . '" target="_blank" title="' . $description . '">' . $title . '</a><br />';
			if($links == 5)
			{
				$links = 1;
			}
			else
			{
				$links++;
			}
		}
    }
?>
Return current item: DDL CMS