- Timestamp:
- Aug 5, 2004, 7:27:09 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/comments.php
r420 r464 160 160 else $name.= str_replace( '_', ' ', $file ); 161 161 $name.= ' [ '.$subrow['file'].' ]'; 162 // source of the thumbnail picture 163 $src = $array_cat_directories[$subrow['cat_id']]; 164 $src.= 'thumbnail/'.$conf['prefix_thumbnail']; 165 $src.= $file.'.'.$subrow['tn_ext']; 166 // link to the full size picture 162 // source of the thumbnail picture 163 if (isset($subrow['tn_ext']) and $subrow['tn_ext'] != '') 164 { 165 $src = $array_cat_directories[$subrow['cat_id']]; 166 $src.= 'thumbnail/'.$conf['prefix_thumbnail']; 167 $src.= $file.'.'.$subrow['tn_ext']; 168 } 169 else 170 { 171 $src = './template/'.$user['template'].'/mimetypes/'; 172 $src.= strtolower(get_extension($subrow['file'])).'.png'; 173 } 174 175 // link to the full size picture 167 176 $url = PHPWG_ROOT_PATH.'picture.php?cat='.$category_id; 168 177 $url.= '&image_id='.$row['image_id']; 169 170 $template->assign_block_vars('picture',array( 171 'TITLE_IMG'=>$name, 172 'I_THUMB'=>$src, 173 'U_THUMB'=>add_session_id( $url ) 174 )); 175 178 179 $template->assign_block_vars( 180 'picture', 181 array( 182 'TITLE_IMG'=>$name, 183 'I_THUMB'=>$src, 184 'U_THUMB'=>add_session_id( $url ) 185 )); 186 176 187 // for each picture, retrieving all comments 177 188 $query = 'SELECT * FROM '.COMMENTS_TABLE; 178 189 $query.= ' WHERE image_id = '.$row['image_id']; 179 190 $query.= ' AND date > FROM_UNIXTIME('.$maxtime.')'; 180 191 if ( $user['status'] != 'admin' ) 181 192 { 182 193 $query.= " AND validated = 'true'"; 183 194 } 184 195 $query.= ' ORDER BY date DESC'; 185 196 $query.= ';';
Note: See TracChangeset
for help on using the changeset viewer.