witam, mam problem ze skryptem, przy którym już tracę cierpliwość. mam postawionego w kompie webserwera, skrypt ładnie działa ( wyświetla miniaturki zdjęć i linkuje do nich) jednak przesłany na serwer nie działa. oto część skryptu odpowiedzialna za działanie:
function lastx_bit() {
global $relative_path;
$table_cols=_THUMBSONHOMETDCOLS_; // -> change this
$thumbsonhome=_THUMBSONHOME_;
$query="SELECT user_id,name FROM users WHERE show_in_random='1' ORDER BY RAND(".mt_rand().") LIMIT $thumbsonhome";
if (!($res=@mysql_query($query))) {trigger_error(mysql_error(),E_USER_ERROR);}
$myreturn='';
if (mysql_num_rows($res)) {
$myreturn="<table width=\"800px\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" class=\"lastx\">";
$i=1;
while ($rsrow=mysql_fetch_row($res)) {
$photo=get_random_album_pic($rsrow[0]);
if (!empty($photo) && file_exists(_THUMBSPATH_."/".$photo)) {
$photo=$photo;
}else {
$photo="no-pict.gif";
}
if (($i%$table_cols)==1) {$myreturn.="<tr>\n";}
$myreturn.="\t<td align=\"center\" class=\"outset_lastx\">\n";
$myreturn.="<a href=\"${relative_path}profile_view.php?user_id=".$rsrow[0]."\"><img src=\""._THUMBSURL_."/".$photo."\" border=\"0\" class=\"thumbnailh\" alt=\"".$rsrow[1]."\" /></a>";
$myreturn.="\t</td>\n";
if ($i%$table_cols==0) {$myreturn.="</tr>\n";}
$i++;
}
$rest=($i-1)%$table_cols;
if ($rest!=0) {
$colspan=$table_cols-$rest;
$myreturn.="\t<td".(($colspan==1) ? ("") : (" colspan=\"$colspan\""))."> </td>\n</tr>\n";
}
$myreturn.="</table>\n";
} else {
$myreturn="No photos to display";
}
return $myreturn;
}
w internecie widzę tylko "no photos to display".
pomocy!!