Ciao artorius,
scusami se ti disturbo ancora la tabella dovrebbe essere stabile non traballante
ho inserito lo script che mi hai inviato ma non funziona. Potresti dargli un occhiata al nuovo codice evedere se c'è qualcosa che non va.
Grazie
Codice PHP:<?php
<?php
/*--------------------------------------------------+
| X-ZERO COMMUNITY CLASSIFIEDS SCRIPT |
+===================================================+
| File: index.php |
| Main wrapper page |
+---------------------------------------------------+
| Copyright © 2005 Davis 'X-ZERO' John |
| Scriptlance ID: davisx0 |
| Email: [email]support@xzeroscripts.com[/email] |
+--------------------------[ Tue, Aug 02, 2005 ]---*/
require_once("initvars.inc.php");
require_once("config.inc.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="it" xml:lang="it">
<head>
<title>Ceciado – il motore dei siti – web directory: Ultimi Iscritti</title>
<base href="<?php echo $script_url; ?>" />
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $langx['charset']; ?>" />
<meta name="keywords" content="<?php echo $meta_keywords; ?>" />
<meta name="description" content="Ceciado – il motore dei siti – web directory: Ultimi Iscritti" />
<link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="pager.css" />
<link rel="stylesheet" type="text/css" href="cal.css" />
<script src="prototype.js" type="text/javascript"></script>
<script type="text/javascript">
function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}
</script>
</head>
<body>
<div id="CONTENITORE">
<?php include("header2.inc.php"); ?>
<h1>ULTIMI ISCRITTI</h1>
<div align="center">
<table width="650" border="0">
<tr>
<td>
<h2>
<?php
if($latestads_count)
{
?>
<div class="latestads">
<table border="0" cellspacing="0" cellpadding="0" class="adlisting" width="100%">
<?php
$sql = "SELECT a.*, ct.cityname,co.countryid , UNIX_TIMESTAMP(a.createdon) AS timestamp, feat.adid AS isfeat,
COUNT(*) AS piccount, p.picfile AS picfile, scat.subcatname, scat.catid, cat.catname
FROM $t_ads a
INNER JOIN $t_cities ct ON a.cityid = ct.cityid
LEFT OUTER JOIN $t_countries co ON ct.countryid = co.countryid
INNER JOIN $t_subcats scat ON a.subcatid = scat.subcatid
INNER JOIN $t_cats cat ON scat.catid = cat.catid
LEFT OUTER JOIN $t_featured feat ON a.adid = feat.adid AND feat.adtype = 'A' AND feat.featuredtill >= NOW()
LEFT OUTER JOIN $t_adpics p ON a.adid = p.adid AND p.isevent = '0'
WHERE $visibility_condn
$loc_condn
GROUP BY a.link
ORDER BY a.createdon DESC
LIMIT $latestads_count";
$res_latest = mysql_query($sql) or die($sql.mysql_error());
$css_first = "_first";
while($row = mysql_fetch_array($res_latest))
{
$catname_inurl = RemoveBadURLChars($row['catname']);
$subcatname_inurl = RemoveBadURLChars($row['subcatname']);
if($sef_urls) $url = "{$vbasedir}-$row[countryid]/posts/{$row[catid]}_{$catname_inurl}/{$row[subcatid]}_{$subcatname_inurl}/$row[adid]_" . RemoveBadURLChars($row['adtitle']) . ".html";
else $url = "?view=showad&adid=$row[adid]&cityid=$row[countryid]&lang=$xlang{$link_extra}";
?>
<?php
if($row['isfeat'])
{
//$feat_class = "class=\"featured\"";
$feat_img = "<img src=\"images/featured.gif\" align=\"absmiddle\">";
}
else
{
//$feat_class = "";
$feat_img = "";
}
if($row['picfile'])
{
$picfile = $row['picfile'];
$imgsize = GetThumbnailSize("{$datadir[adpics]}/{$picfile}", $tinythumb_max_width, $tinythumb_max_height);
}
else
{
$picfile = "";
}
?>
<tr>
<td width="25%">
<a href="goto.php?id=<?php echo $row['adid'] ?>" class="adtitle" target="_blank">
<?php
if($row['picfile'] && $ad_thumbnails)
{
$imgsize = GetThumbnailSize("{$datadir[adpics]}/{$row[picfile]}", $tinythumb_max_width, $tinythumb_max_height);
?>
<div align="center">[img]<?php echo [/img]" border="3" width="<?php echo $imgsize[0]; ?>" height="<?php echo $imgsize[1]; ?>" style="border:3px solid green"></div>
<?php
}
?>
</a>
</td>
<td width="75%">
[url="goto.php?id=<?php echo $row['adid'] ?>"][url]http://[/url]<?php echo $row['link'] ?>[/url]
<a href="goto.php?id=<?php echo $row['adid'] ?>" class="adtitle" target="_blank">
<?php echo $row['adtitle']; ?>
</a>
<?php
if(true)
{
echo "<span class=''>";
$row['addesc'] = preg_replace("/\[\/?URL\]/", "", $row['addesc']);
echo substr($row['addesc'],0,200);
if (strlen($row['addesc'])>200) echo "...";
echo "</span>";
}
?>
<?php
if($row['pref1']!="" && $row['tel1']!="")
echo "Tel.: ". $row['pref1']."/". $row['tel1'];
else
echo "Tel.: N/D";
if($row['prefax']!="" && $row['fax']!="")
echo "
Fax: ". $row['prefax']."/". $row['fax'];
else
echo " - Fax.: N/D";
?>
E-mail:
[email="<?php echo $row['email'] ?>"]<?php echo $row['email'] ?>[/email]
<?php
if($row['indirizzo']!="")
echo "" .$row['indirizzo'];
else
echo "Indirizzo: N/D";
$loc = "";
$prov = mysql_query("SELECT cityname FROM xzclf_cities WHERE cityid = ".(int)$row['provincia']."");
$line = mysql_fetch_array($prov);
$provv = $line['cityname'];
$loc = "";
if($row['area']) $loc = $row['area'];
if($xcityid < 0) $loc .= ($loc ? ", " : "")."
Città: ". $row['comune']." - Prov.: ". $provv;
if($loc) echo " $loc";
//if($row['responsabile']!="")
//echo " - " .$row['responsabile'];
//elsAe
//echo " - Responsabile: N/D";
?>
</td>
</tr>
<?php
$css_first = "";
}
?>
</table>
<script type="text/javascript">
var percent = 80; //Percentuale d'incremento immagine
Event.observe(window, 'load', function(){
var imgs = $$('img.TooglerImg');
imgs.each(function(item){
var width = parseInt(item.readAttribute("width"));
var height = parseInt(item.readAttribute("height"));
item.writeAttribute("originalw", width);
item.writeAttribute("originalh", height);
width = (width * (1 + percent / 100)).floor();
height = (height * (1 + percent / 100)).floor();
item.writeAttribute("bigw", width);
item.writeAttribute("bigh", height);
item.observe('mouseover', OverImg);
item.observe('mouseout', OutImg);
});
});
var OverImg = function(){
this.writeAttribute("width", this.readAttribute("bigw"));
this.writeAttribute("height", this.readAttribute("bigh"));
}
var OutImg = function(){
this.writeAttribute("width", this.readAttribute("originalw"));
this.writeAttribute("height", this.readAttribute("originalh"));
}
</script>
</h2>
</td>
</tr>
</table>
</div>
<?php include("footer.inc.php"); ?>
</div>
<div id="onde"></div>
<script type="text/javascript" >
var s_sid = 546248; var st_dominio = 4;
var cimg = 0; var cwi =150; var che =30;
</script>
<script type="text/javascript" language="javascript" src="http://s11.histats.com/js9.js"></script>
<noscript>
[img]http://s4.histats.com/stats/0.gif?546248&1[/img]</p>
</noscript>
</body>
</html>
<?php
}
?>

Rispondi quotando