Location: PHPKode > projects > KISGB (Keep It Simple Guest Book) > showsmileys.php
<?
/*
   KISGB - a Guest Book script written in PHP.
   Copyright (C) 2001-2002 Gaylen Fraley
   hide@address.com

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   License file for more details.
*/
require("config.php");
require("functions.php");
if ($HTTP_GET_VARS['tmp_theme']>'') $theme = $HTTP_GET_VARS['tmp_theme'];
if ($HTTP_GET_VARS['tmp_lang']>'') $language = $HTTP_GET_VARS['tmp_lang'];
$form_name = $HTTP_GET_VARS['formname'];
require("$path_to_languages/$language");
require("$path_to_themes/$theme");
if ($use_filter_file) require("filters.inc.php");
metaTags();
?>
	<script type="text/javascript">
		var msa = 0;
	</script>
<? js_getPointer(); ?>
	<style type="text/css">
		<?@include("style-sheet-add.php");?>
	</style>
<?
$dir = opendir("$path_to_images/smilies/");
echo "<body><form><table cellspacing=\"0\" cellpadding=\"0\"><tr><td id=\"tdadd\" colspan=\"2\" align=\"center\"><b>$label_smiley_message</b></td></tr><tr><td id=\"tdadd\">";
while ($file_name = readdir($dir)) {
	if ($file_name == '.' || $file_name == '..') continue;
	$cnt++;
	echo "<a  href='javascript:void(0);' onClick='msa++;if (msa<=$max_smileys_allowed){opener.document.$form_name.comments.value=opener.document.$form_name.comments.value+\"<img src=smilies/$file_name>&nbsp;\";if (this.blur) this.blur();return false;} else {alert(\"$label_smiley_message\");return false;}' /><img border=\"0\" src=$path_to_images/smilies/$file_name alt=\"Smiley\" title=\"Smiley\" /></a>&nbsp;";
	if ($cnt > 6) {
		$cnt = 0;
		echo "</td></tr><tr><td id=\"tdadd\">";
	}
}
echo "<tr><td id=\"tdadd\">&nbsp;</td></tr><tr><td id=\"tdadd\" align=\"center\"><input id=\"btn\" onMouseOver=\"this.style.cursor=get_pointer();\" type=\"button\" value=\"$label_back\" onClick=\"self.close()\" /></td></tr>";
echo "</table>\n</form></body>\n";
closedir($dir);
?>
Return current item: KISGB (Keep It Simple Guest Book)