You're looking for some 4images templates and styles? Then visit this thread to show websites with 4images templates to download.
0 Members and 1 Guest are viewing this topic.
<tr> <td width="50" class="row2">Photo</td> <td width="70" class="row2">Title</td> <td width="95" class="row2">Category</td> <td width="110" class="row2">User</td> <td class="row2">Comment</td> </tr> <tr> <td colspan="4"> <TR class="row1"> <TD width="50" height="15" align="center" rowspan="2"> {comment_image} </TD> <TD width="70" rowspan="2">{comment_image_name}</TD> <TD width="95" rowspan="2" >[{image_cat_name}]</TD> <td rowspan="2" nowrap> By: {comment_user_name}{if comment_guest} ({comment_guest}){endif comment_guest}<br /> {comment_date} </td> <TD>{comment_headline}</TD> </tr> <tr class="row1"> <TD>{comment_text}</TD> </TR>
$sql2 = "SELECT comment_id FROM ".COMMENTS_TABLE." ";$result2 = $site_db->query($sql2);$num_rows2 = $site_db->get_numrows($result2);include(ROOT_PATH.'includes/paging.php');$getpaging = new Paging($page, $perpage, $num_rows2, $link_arg);$offset = $getpaging->get_offset(); $sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").$additional_sql." FROM ".COMMENTS_TABLE." c LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = c.user_id) ORDER BY c.comment_date DESC LIMIT $offset, $perpage"; $result = $site_db->query($sql); $comment_row = array(); while ($row = $site_db->fetch_array($result)) { $comment_row[] = $row; } $site_db->free_result($result); $num_comments = sizeof($comment_row); if (!$num_comments) { $comments_short = "<tr><td class=\"commentrow1\" colspan=\"2\">".$lang['no_comments']."</td></tr>"; } else { $comments_short = ""; for ($i = 0; $i < $num_comments; $i++) {$image_id = $comment_row[$i]['image_id'];$sql = "SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_fileFROM ".IMAGES_TABLE." i, ".CATEGORIES_TABLE." cLEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)WHERE i.image_id = $image_id AND c.cat_id = i.cat_id";$image_row = $site_db->query_firstrow($sql);$cat_id = (isset($image_row['cat_id'])) ? $image_row['cat_id'] : 0; if (check_permission("auth_readcomment", $cat_id)){$comment_user_name = htmlspecialchars($comment_row[$i]['comment_user_name']);$comment_user_info = $lang['userlevel_guest'];$comment_user_id = $comment_row[$i]['user_id'];$user_row_comment = get_user_info($comment_user_id);$comment_user_profile_link = "";$comment_user_info = $lang['userlevel_guest']; if (!isset($comment_row[$i][$user_table_fields['user_level']]) || (isset($comment_row[$i][$user_table_fields['user_level']]) && $comment_row[$i][$user_table_fields['user_level']] == USER)) { $comment_user_info = $lang['userlevel_user']; } elseif ($comment_row[$i][$user_table_fields['user_level']] == ADMIN) { $comment_user_info = $lang['userlevel_admin']; }if (isset($comment_row[$i][$user_table_fields['user_name']]) && $comment_user_id != GUEST) { $comment_user_name = htmlspecialchars($comment_row[$i][$user_table_fields['user_name']]); $comment_user_profile_link = !empty($url_show_profile) ? $site_sess->url(preg_replace("/{user_id}/", $comment_user_id, $url_show_profile)) : $site_sess->url(ROOT_PATH."member.php?action=showprofile&".URL_USER_ID."=".$comment_user_id);} $comment_user_profile_link = ($comment_user_profile_link) ? "<a href=\"".$comment_user_profile_link."\">".$comment_user_name."</a>" : $comment_user_name;if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0)) { $thumb_file = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif"; }else { $thumb_file = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1); } $thumb_info = @getimagesize($thumb_file); $width = $thumb_info[0]; $height = $thumb_info[1]; $dimension = 80; $ratio = $width / $height; if ($ratio > 1) { $new_width = $dimension; $new_height = floor(($dimension/$width) * $height); }else { $new_width = floor(($dimension/$height) * $width); $new_height = $dimension; } $site_template->register_vars(array( "comment_image_thumb" => (!check_permission("auth_viewcat", $cat_id) || !check_permission("auth_viewimage", $cat_id)) ? "<img src=\"".$thumb_file."\" width=\"".$new_width."\" height=\"".$new_height."\" onClick=\"alert('".$lang['members_only']."');\" border=\"".$config['image_border']."\">" : "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row[$i]['image_id'].((!empty($mode)) ? "&mode=".$mode : ""))."\"><img src=\"".$thumb_file."\" width=\"".$new_width."\" height=\"".$new_height."\" border=\"".$config['image_border']."\"></a>", "comment_image_name" => (!check_permission("auth_viewcat", $cat_id) || !check_permission("auth_viewimage", $cat_id)) ? $image_row['image_name'] : "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row[$i]['image_id'].((!empty($mode)) ? "&mode=".$mode : ""))."\">".$image_row['image_name']."</a>", "comment_cat_name" => (!check_permission("auth_viewcat", $cat_id)) ? $image_row['cat_name'] : "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$cat_id)."\">".$image_row['cat_name']."</a>", "comment_user_name" => $comment_user_profile_link, "comment_user_info" => $comment_user_info, "comment_headline" => format_text($comment_row[$i]['comment_headline'], 0, $config['wordwrap_comments'], 0, 0), "comment_text" => format_text($comment_row[$i]['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']), "comment_date" => format_date($config['date_format']." ".$config['time_format'], $comment_row[$i]['comment_date']),));$comments_short .= $site_template->parse_template("comment_short_bit2"); } } // end while } //end else $site_template->register_vars("comments_short", $comments_short); unset($comments_short);$site_template->register_vars(array( "paging" => $getpaging->get_paging(), "paging_stats" => $getpaging->get_paging_stats()));