1<?php 2/*************************************************************************** 3* copyright : (C) 2001-2003 Advanced Internet Designs Inc. 4* email : forum@prohost.org 5* $Id: avatarsel.php.t 21069 2010-03-25 22:47:48Z Caeies $ 6* 7* This program is free software; you can redistribute it and/or modify it 8* under the terms of the GNU General Public License as published by the 9* Free Software Foundation; either version 2 of the License, or 10* (at your option) any later version. 11***************************************************************************/ 12 13 define('plain_form', 1); 14 15/*{PRE_HTML_PHP}*/ 16/*{POST_HTML_PHP}*/ 17 18 $TITLE_EXTRA = ': {TEMPLATE: avatar_sel_form}'; 19 20 /* here we draw the avatar control */ 21 $icons_per_row = 5; 22 $c = uq('SELECT id, descr, img FROM {SQL_TABLE_PREFIX}avatar ORDER BY id'); 23 $avatars_data = ''; 24 $col = 0; 25 while ($r = db_rowarr($c)) { 26 if (!($col++ % $icons_per_row)) { 27 $avatars_data .= '{TEMPLATE: row_separator}'; 28 } 29 $avatars_data .= '{TEMPLATE: avatar_entry}'; 30 } 31 32 if (!$avatars_data) { 33 $avatars_data = '{TEMPLATE: no_avatars}'; 34 } 35 36/*{POST_PAGE_PHP_CODE}*/ 37?> 38{TEMPLATE: AVATARSEL_PAGE}