Hola
Gracias por sugerirme donde encontrar este sistema de Links
Necesito ayuda sobre como crear tres columnas porque este solo trae dos
en la parte Link Directory
ver ejemplo
http://68.97.138.88:40/demo/
Les agradesco la ayuda
» este es el codigo
-----------------------------------------------------------
<?php
/**
* PHP-X-LINKS a simple link repository
* Copyright (C) 2003, 2004 Jesse Waite
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
if (eregi('main.php', $_SERVER['PHP_SELF'])){
Header('Location: index.php');
die();
}
?>
<table border="0" width="100%" cellpadding="10" cellspacing="0" class="bg_color">
<tr>
<td width="100%" align="left" class="underline"><font size="4"><?php echo $strMainDirTitle; ?></font></td>
</tr>
</table>
<table width="533" height="40" border="0" cellpadding="5" cellspacing="0" class="bg_color">
<tr>
<td width="335" height="40" align="left" valign="top">
<?php
$sql = 'SELECT * from ' . PREFIX . 'category ORDER BY name';
$result = mysql_query($sql, $conn) or die(mysql_error());
$i = 0;
while ($r = mysql_fetch_array($result, MYSQL_ASSOC)) {
if ($r['parent_id'] == 0) {
$tr = ($i % 2) ? '</td></tr><tr><td align="left" width="200" valign="top">' : '</td><td align="left" width="200" valign="top">';
echo '<body><img src="images/folder.gif" alt="" width="16" height="16" align="absmiddle" title="' . $r['name'] . '"/>
<a href="view.php?cid=' . $r['id'] . '"><b>' . $r['name'] . '</b></a><font size="2"></font><br/>';
$query = 'SELECT * FROM ' . PREFIX . 'category
WHERE parent_id=\'' . $r['id'] . '\'
ORDER BY RAND() LIMIT 3';
$results = mysql_query($query, $conn) or die(mysql_error());
$n = 2;
while ($sub = mysql_fetch_array($results, MYSQL_ASSOC)) {
echo '<a href="view.php?cid=' . $sub['id'] . '" class="smallfont">' . $sub['name'] . '</a><font size="-2"></font>';
echo ($n % 4) ? ', ' : ' ...';
$n++;
} // while
echo $tr;
$i++;
}
} // while
?>
</table>
<?php
$sql = array('0' => 'SELECT COUNT(id) AS cnt FROM ' . PREFIX . 'urls WHERE dead_link != \'L\'',
'1' => 'SELECT COUNT(id) AS cnt FROM ' . PREFIX . 'category',
'2' => 'SELECT SUM(hits) AS cnt FROM ' . PREFIX . 'urls WHERE dead_link != \'L\'');
for ($i = 0; $i < count($sql); $i++) {
$result = mysql_query($sql[$i], $conn);
while($r = mysql_fetch_array($result, MYSQL_ASSOC)){
$count[] = $r['cnt'];
} // while
}
//print_r($count);
?>
<table width="100%" border="0" cellpadding="5" cellspacing="0" class="bg_color">
<tr>
<td align="center">
<span class="small">
[ <?php echo $strMainLinks; ?> <?php echo $count[0]; ?> |
<?php echo $strMainClicks; ?> <?php echo $count[2]; ?> |
<?php echo $strMainCategories; ?> <?php echo $count[1]; ?> ]</span>
</td>
</tr>
</table>
-----------------------------------------------------------