html_tag( 'td', '<strong>' . $title .'</strong>', 'center', $color[9] )
) . "\n"
. html_tag( 'tr', "\n" .
- html_tag( 'td', '<hr>', 'left' )
+ html_tag( 'td', '<hr />', 'left' )
) . "\n"
. html_tag( 'tr', "\n" .
html_tag( 'td', $body, 'left' )
*/
if ($MOD != "options_main"){
echo html_tag( 'tr', "\n" .
- html_tag( 'td', '<hr>', 'left' )
+ html_tag( 'td', '<hr />', 'left' )
) . "\n"
. html_tag( 'tr', "\n" .
html_tag( 'td', '<a href="sqspell_options.php">'
* Close the table and display the version.
*/
echo html_tag( 'tr', "\n" .
- html_tag( 'td', '<hr>', 'left' )
+ html_tag( 'td', '<hr />', 'left' )
) . "\n"
. html_tag( 'tr',
html_tag( 'td', 'SquirrelSpell ' . $SQSPELL_VERSION, 'center', $color[9] )
* @return void
*/
function sqspell_makeWindow($onload, $title, $scriptsrc, $body){
- global $color, $SQSPELL_VERSION, $theme_css;
- echo "<html>\n"
- . "<head>\n"
- . "<title>$title</title>\n";
- /**
- * Check if we have a defined css theme to use.
- */
- if ($theme_css != "") {
- echo "<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"$theme_css\">\n";
- }
- /**
- * Link in the .js file if needed
- */
- if ($scriptsrc){
- echo "<script type=\"text/javascript\" src=\"js/$scriptsrc\"></script>\n";
- }
- echo "</head>\n"
- . "<body text=\"$color[8]\" bgcolor=\"$color[4]\" link=\"$color[7]\" "
- . "vlink=\"$color[7]\" alink=\"$color[7]\"";
+ global $color, $SQSPELL_VERSION;
+
+ displayHtmlHeader($title,
+ ($scriptsrc ? "\n<script type=\"text/javascript\" src=\"js/$scriptsrc\"></script>\n" : ''));
+
+ echo "<body text=\"$color[8]\" bgcolor=\"$color[4]\" link=\"$color[7]\" "
+ . "vlink=\"$color[7]\" alink=\"$color[7]\"";
/**
* Provide an onload="jsfunction()" if asked to.
*/
if ($onload) {
- echo " onload=\"$onload\"";
+ echo " onload=\"$onload\"";
}
/**
* Draw the rest of the page.
*/
- echo '>'
+ echo ">\n"
. html_tag( 'table', "\n" .
html_tag( 'tr', "\n" .
html_tag( 'td', '<strong>' . $title . '</strong>', 'center', $color[9] )
) . "\n" .
html_tag( 'tr', "\n" .
- html_tag( 'td', '<hr>', 'left' )
+ html_tag( 'td', '<hr />', 'left' )
) . "\n" .
html_tag( 'tr', "\n" .
html_tag( 'td', $body, 'left' )
) . "\n" .
html_tag( 'tr', "\n" .
- html_tag( 'td', '<hr>', 'left' )
+ html_tag( 'td', '<hr />', 'left' )
) . "\n" .
html_tag( 'tr', "\n" .
html_tag( 'td', 'SquirrelSpell ' . $SQSPELL_VERSION, 'center', $color[9] )
* Double-check if we have the mcrypt_generic function. Bail out if
* not so.
*/
- if (!function_exists(mcrypt_generic)) {
+ if (!function_exists('mcrypt_generic')) {
return 'PANIC';
}
/**
/**
* Finish up the mcrypt routines and return the processed content.
*/
- mcrypt_generic_end ($td);
+ if (function_exists('mcrypt_generic_deinit')) {
+ // php 4.1.1+ syntax
+ mcrypt_generic_deinit ($td);
+ mcrypt_module_close ($td);
+ } else {
+ // older depreciated function
+ mcrypt_generic_end ($td);
+ }
return $crypto;
}
'left' ) . "\n"
. '<blockquote>' . "\n"
. '<form method="post" onsubmit="return AYS()">' . "\n"
- . '<input type="hidden" name="MOD" value="crypto_badkey">' . "\n"
+ . '<input type="hidden" name="MOD" value="crypto_badkey" />' . "\n"
. html_tag( 'p', "\n" .
- '<input type="checkbox" name="delete_words" value="ON">'
+ '<input type="checkbox" name="delete_words" value="ON" />'
. _("Delete my dictionary and start a new one") . '<br />'
. _("Decrypt my dictionary with my old password:")
- . '<input name="old_key" size=\"10\">' ,
+ . '<input name="old_key" size="10" />' ,
'left' ) . "\n"
. '</blockquote>' . "\n"
. html_tag( 'p', "\n" .
'<input type="submit" value="'
- . _("Proceed") . ' >>">' ,
+ . _("Proceed") . ' >>" />' ,
'center' ) . "\n"
. '</form>' . "\n";
/**
* stuff. :)
*/
$SQSPELL_VERSION="v0.3.8";
-?>
+?>
\ No newline at end of file