| ############################################################################### |
| ############################################################################### |
| # ManageTemplates.pl # |
| # ManageTemplates.pl # |
| ############################################################################### |
| ############################################################################### |
| # YaBB: Yet another Bulletin Board # |
| # YaBB: Yet another Bulletin Board # |
| # Open-Source Community Software for Webmasters # |
| # Open-Source Community Software for Webmasters # |
| # Version: YaBB 2.5 Anniversary Edition # |
| # Version: YaBB 2.5.2 # |
| # Packaged: July 04, 2010 # |
| # Packaged: September 30, 2012 # |
| # Distributed by: http://www.yabbforum.com # |
| # Distributed by: http://www.yabbforum.com # |
| # =========================================================================== # |
| # =========================================================================== # |
| # Copyright (c) 2000-2010 YaBB (www.yabbforum.com) - All Rights Reserved. # |
| # Copyright (c) 2000-2012 YaBB (www.yabbforum.com) - All Rights Reserved. # |
| # Software by: The YaBB Development Team # |
| # Software by: The YaBB Development Team # |
| # with assistance from the YaBB community. # |
| # with assistance from the YaBB community. # |
| # Sponsored by: Xnull Internet Media, Inc. - http://www.ximinc.com #
|
| |
| # Your source for web hosting, web design, and domains. #
|
| |
| ############################################################################### |
| ############################################################################### |
| |
| |
| $managetemplatesplver = 'YaBB 2.5 AE $Revision: 1.28 $'; |
| $managetemplatesplver = 'YaBB 2.5.2 $Revision: 1.0 $'; |
| if ($action eq 'detailedversion') { return 1; } |
| if ($action eq 'detailedversion') { return 1; } |
| |
| |
| &LoadLanguage('Templates'); |
| &LoadLanguage('Templates'); |
| |
| |
| sub ModifyTemplate { |
| sub ModifyTemplate { |
| &is_admin_or_gmod; |
| &is_admin_or_gmod; |
| my ($fulltemplate, $line); |
| my ($fulltemplate, $line); |
| if ($FORM{'templatefile'}) { $templatefile = $FORM{'templatefile'} } |
| if ($FORM{'templatefile'}) { $templatefile = $FORM{'templatefile'} } |
| elsif ($INFO{'templatefile'}) { $templatefile = $INFO{'templatefile'} } |
| elsif ($INFO{'templatefile'}) { $templatefile = $INFO{'templatefile'} } |
| else { $templatefile = "default/default.html"; } |
| else { $templatefile = "default/default.html"; } |
| opendir(TMPLDIR, $templatesdir); |
| opendir(TMPLDIR, $templatesdir); |
| @temptemplates = readdir(TMPLDIR); |
| @temptemplates = readdir(TMPLDIR); |
| closedir(TMPLDIR); |
| closedir(TMPLDIR); |
| $templs = ""; |
| $templs = ""; |
| |
| |
| foreach $file (@temptemplates) { |
| foreach $file (@temptemplates) { |
| if (-e "$templatesdir/$file/$file.html") { |
| if (-e "$templatesdir/$file/$file.html") { |
| push(@templates, $file); |
| push(@templates, $file); |
| } else { |
| } else { |
| next; |
| next; |
| } |
| } |
| } |
| } |
| |
| |
| foreach $name (sort @templates) { |
| foreach $name (sort @templates) { |
| $selected = ""; |
| $selected = ""; |
| |
| |
| if (-e "$templatesdir/$name/$name.html") { |
| if (-e "$templatesdir/$name/$name.html") { |
| $cmp_templatefile = "$name/$name.html"; |
| $cmp_templatefile = "$name/$name.html"; |
| if ($cmp_templatefile eq $templatefile) { $selected = qq~ selected="selected"~; } |
| if ($cmp_templatefile eq $templatefile) { $selected = qq~ selected="selected"~; } |
| $templs .= qq~<option value="$cmp_templatefile"$selected>$cmp_templatefile</option>\n~; |
| $templs .= qq~<option value="$cmp_templatefile"$selected>$cmp_templatefile</option>\n~; |
| $selected = ""; |
| $selected = ""; |
| } elsif (-e "$templatesdir/$name/$name.htm") { |
| } elsif (-e "$templatesdir/$name/$name.htm") { |
| $cmp_templatefile = "$name/$name.htm"; |
| $cmp_templatefile = "$name/$name.htm"; |
| if ($cmp_templatefile eq $templatefile) { $selected = qq~ selected="selected"~; } |
| if ($cmp_templatefile eq $templatefile) { $selected = qq~ selected="selected"~; } |
| $templs .= qq~<option value="$cmp_templatefile"$selected>$cmp_templatefile</option>\n~; |
| $templs .= qq~<option value="$cmp_templatefile"$selected>$cmp_templatefile</option>\n~; |
| $selected = ""; |
| $selected = ""; |
| } |
| } |
| |
| |
| $cmp_boardfile = "$name/BoardIndex.template"; |
| $cmp_boardfile = "$name/BoardIndex.template"; |
| $cmp_messagefile = "$name/MessageIndex.template"; |
| $cmp_messagefile = "$name/MessageIndex.template"; |
| $cmp_displayfile = "$name/Display.template"; |
| $cmp_displayfile = "$name/Display.template"; |
| $cmp_helpfile = "$name/HelpCentre.template"; |
| $cmp_helpfile = "$name/HelpCentre.template"; |
| $cmp_mycenterfile = "$name/MyCenter.template"; |
| $cmp_mycenterfile = "$name/MyCenter.template"; |
| |
| |
| if (-e "$templatesdir/$name/BoardIndex.template") { |
| if (-e "$templatesdir/$name/BoardIndex.template") { |
| $ext = "BoardIndex"; |
| $ext = "BoardIndex"; |
| if ($cmp_boardfile eq $templatefile) { $selected = qq~ selected="selected"~; } |
| if ($cmp_boardfile eq $templatefile) { $selected = qq~ selected="selected"~; } |
| $templs .= qq~<option value="$name/$ext.template"$selected>$name/$ext</option>\n~; |
| $templs .= qq~<option value="$name/$ext.template"$selected>$name/$ext</option>\n~; |
| $selected = ""; |
| $selected = ""; |
| } |
| } |
| if (-e "$templatesdir/$name/MessageIndex.template") { |
| if (-e "$templatesdir/$name/MessageIndex.template") { |
| $ext = "MessageIndex"; |
| $ext = "MessageIndex"; |
| if ($cmp_messagefile eq $templatefile) { $selected = qq~ selected="selected"~; } |
| if ($cmp_messagefile eq $templatefile) { $selected = qq~ selected="selected"~; } |
| $templs .= qq~<option value="$name/$ext.template"$selected>$name/$ext</option>\n~; |
| $templs .= qq~<option value="$name/$ext.template"$selected>$name/$ext</option>\n~; |
| $selected = ""; |
| $selected = ""; |
| } |
| } |
| if (-e "$templatesdir/$name/Display.template") { |
| if (-e "$templatesdir/$name/Display.template") { |
| $ext = "Display"; |
| $ext = "Display"; |
| if ($cmp_displayfile eq $templatefile) { $selected = qq~ selected="selected"~; } |
| if ($cmp_displayfile eq $templatefile) { $selected = qq~ selected="selected"~; } |
| $templs .= qq~<option value="$name/$ext.template"$selected>$name/$ext</option>\n~; |
| $templs .= qq~<option value="$name/$ext.template"$selected>$name/$ext</option>\n~; |
| $selected = ""; |
| $selected = ""; |
| } |
| } |
| if (-e "$templatesdir/$name/HelpCentre.template") { |
| if (-e "$templatesdir/$name/HelpCentre.template") { |
| $ext = "HelpCentre"; |
| $ext = "HelpCentre"; |
| if ($cmp_helpfile eq $templatefile) { $selected = qq~ selected="selected"~; } |
| if ($cmp_helpfile eq $templatefile) { $selected = qq~ selected="selected"~; } |
| $templs .= qq~<option value="$name/$ext.template"$selected>$name/$ext</option>\n~; |
| $templs .= qq~<option value="$name/$ext.template"$selected>$name/$ext</option>\n~; |
| $selected = ""; |
| $selected = ""; |
| } |
| } |
| if (-e "$templatesdir/$name/MyCenter.template") { |
| if (-e "$templatesdir/$name/MyCenter.template") { |
| $ext = "MyCenter"; |
| $ext = "MyCenter"; |
| if ($cmp_mycenterfile eq $templatefile) { $selected = qq~ selected="selected"~; } |
| if ($cmp_mycenterfile eq $templatefile) { $selected = qq~ selected="selected"~; } |
| $templs .= qq~<option value="$name/$ext.template"$selected>$name/$ext</option>\n~; |
| $templs .= qq~<option value="$name/$ext.template"$selected>$name/$ext</option>\n~; |
| $selected = ""; |
| $selected = ""; |
| } |
| } |
| } |
| } |
| |
| |
| fopen(TMPL, "$templatesdir/$templatefile"); |
| fopen(TMPL, "$templatesdir/$templatefile"); |
| while ($line = <TMPL>) { |
| while ($line = <TMPL>) { |
| $line =~ s~[\r\n]~~g; |
| $line =~ s~[\r\n]~~g; |
| $line =~ s~ ~&nbsp;~g; |
| $line =~ s~ ~&nbsp;~g; |
| $line =~ s~&~&amp;~g; |
| $line =~ s~&~&amp;~g; |
| &FromHTML($line); |
| &FromHTML($line); |
| $fulltemplate .= qq~$line\n~; |
| $fulltemplate .= qq~$line\n~; |
| } |
| } |
| fclose(TMPL); |
| fclose(TMPL); |
| |
| |
| $yymain .= qq~ |
| $yymain .= qq~ |
| <div class="bordercolor" style="padding: 0px; width: 99%; margin-left: 0px; margin-right: auto;"> |
| <div class="bordercolor" style="padding: 0px; width: 99%; margin-left: 0px; margin-right: auto;"> |
| <table width="100%" cellspacing="1" cellpadding="4" style="table-layout: fixed;"> |
| <table width="100%" cellspacing="1" cellpadding="4" style="table-layout: fixed;"> |
| <tr valign="middle"> |
| <tr valign="middle"> |
| <td align="left" class="titlebg"> |
| <td align="left" class="titlebg"> |
| <img src="$imagesdir/xx.gif" alt="" border="0" /><b> $templ_txt{'52'}</b> - $templatefile |
| <img src="$imagesdir/xx.gif" alt="" border="0" /><b> $templ_txt{'52'}</b> - $templatefile |
| </td> |
| </td> |
| </tr> |
| </tr> |
| <tr valign="middle"> |
| <tr valign="middle"> |
| <td align="center" class="windowbg2"> |
| <td align="center" class="windowbg2"> |
| <form action="$adminurl?action=modtemp2" method="post" style="display: inline;"> |
| <form action="$adminurl?action=modtemp2" method="post" style="display: inline;"> |
| <textarea rows="20" cols="95" name="template" style="width:99%; height: 350px;">$fulltemplate</textarea> |
| <textarea rows="20" cols="95" name="template" style="width:99%; height: 350px;">$fulltemplate</textarea> |
| <input type="hidden" name="filename" value="$templatefile" /> |
| <input type="hidden" name="filename" value="$templatefile" /> |
| </td> |
| </td> |
| </tr> |
| </tr> |
| <tr valign="middle"> |
| <tr valign="middle"> |
| <td align="center" class="catbg"> |
| <td align="center" class="catbg"> |
| <input type="submit" value="$admin_txt{'10'} $templatefile" class="button" /> |
| <input type="submit" value="$admin_txt{'10'} $templatefile" class="button" /> |
| </form> |
| </form> |
| </td> |
| </td> |
| </tr> |
| </tr> |
| <tr valign="middle"> |
| <tr valign="middle"> |
| <td align="left" class="windowbg2"> |
| <td align="left" class="windowbg2"> |
| <div style="float: left; width: 30%; padding: 3px;"><label for="templatefile"><b>$templ_txt{'10'}</b></label></div> |
| <div style="float: left; width: 30%; padding: 3px;"><label for="templatefile"><b>$templ_txt{'10'}</b></label></div> |
| <div style="float: left; width: 69%;"> |
| <div style="float: left; width: 69%;"> |
| <form action="$adminurl?action=modtemp" method="post" style="display: inline;"> |
| <form action="$adminurl?action=modtemp" method="post" style="display: inline;"> |
| <select name="templatefile" id="templatefile" size="1" onchange="submit()"> |
| <select name="templatefile" id="templatefile" size="1" onchange="submit()"> |
| $templs |
| $templs |
| </select> |
| </select> |
| <noscript><input type="submit" value="$admin_txt{'32'}" class="button" /></noscript> |
| <noscript><input type="submit" value="$admin_txt{'32'}" class="button" /></noscript> |
| </form> |
| </form> |
| </div> |
| </div> |
| </td> |
| </td> |
| </tr> |
| </tr> |
| </table> |
| </table> |
| </div> |
| </div> |
| ~; |
| ~; |
| $yytitle = "$admin_txt{'216'}"; |
| $yytitle = "$admin_txt{'216'}"; |
| $action_area = "modtemp"; |
| $action_area = "modtemp"; |
| &AdminTemplate; |
| &AdminTemplate; |
| } |
| } |
| |
| |
| sub ModifyTemplate2 { |
| sub ModifyTemplate2 { |
| &is_admin_or_gmod; |
| &is_admin_or_gmod; |
| $FORM{'template'} =~ tr/\r//d; |
| $FORM{'template'} =~ tr/\r//d; |
| $FORM{'template'} =~ s~\A\n~~; |
| $FORM{'template'} =~ s~\A\n~~; |
| $FORM{'template'} =~ s~\n\Z~~; |
| $FORM{'template'} =~ s~\n\Z~~; |
| if ($FORM{'filename'}) { $templatefile = $FORM{'filename'}; } |
| if ($FORM{'filename'}) { $templatefile = $FORM{'filename'}; } |
| else { $templatefile = "default.html"; } |
| else { $templatefile = "default.html"; } |
| fopen(TMPL, ">$templatesdir/$templatefile"); |
| fopen(TMPL, ">$templatesdir/$templatefile"); |
| |
| |
| print TMPL "$FORM{'template'}\n"; |
| print TMPL "$FORM{'template'}\n"; |
| fclose(TMPL); |
| fclose(TMPL); |
| $yySetLocation = qq~$adminurl?action=modtemp;templatefile=$templatefile~; |
| $yySetLocation = qq~$adminurl?action=modtemp;templatefile=$templatefile~; |
| &redirectexit; |
| &redirectexit; |
| } |
| } |
| |
| |
| sub ModifyStyle { |
| sub ModifyStyle { |
| &is_admin_or_gmod; |
| &is_admin_or_gmod; |
| my ($fullcss, $line, $csstype); |
| my ($fullcss, $line, $csstype); |
| $admincs = 0; |
| $admincs = 0; |
| if ($FORM{'cssfile'}) { $cssfile = $FORM{'cssfile'}; $csstype = qq~$forumstylesdir/$cssfile~; } |
| if ($FORM{'cssfile'}) { $cssfile = $FORM{'cssfile'}; $csstype = qq~$forumstylesdir/$cssfile~; } |
| elsif ($FORM{'admcssfile'}) { $cssfile = $FORM{'admcssfile'}; $csstype = qq~$adminstylesdir/$cssfile~; $admincs = 1; } |
| elsif ($FORM{'admcssfile'}) { $cssfile = $FORM{'admcssfile'}; $csstype = qq~$adminstylesdir/$cssfile~; $admincs = 1; } |
| else { $cssfile = "default.css"; $csstype = qq~$forumstylesdir/$cssfile~; } |
| else { $cssfile = "default.css"; $csstype = qq~$forumstylesdir/$cssfile~; } |
| opendir(TMPLDIR, "$forumstylesdir"); |
| opendir(TMPLDIR, "$forumstylesdir"); |
| @styles = readdir(TMPLDIR); |
| @styles = readdir(TMPLDIR); |
| closedir(TMPLDIR); |
| closedir(TMPLDIR); |
| $forumcss = ""; |
| $forumcss = ""; |
| $forumcss = qq~<option value=""></option>\n~; |
| $forumcss = qq~<option value=""></option>\n~; |
| |
| |
| foreach $file (sort @styles) { |
| foreach $file (sort @styles) { |
| ($name, $ext) = split(/\./, $file); |
| ($name, $ext) = split(/\./, $file); |
| $selected = ""; |
| $selected = ""; |
| if ($ext eq 'css') { |
| if ($ext eq 'css') { |
| if ($file eq $cssfile && !$admincs) { $selected = qq~ selected="selected"~; } |
| if ($file eq $cssfile && !$admincs) { $selected = qq~ selected="selected"~; } |
| $forumcss .= qq~<option value="$file"$selected>$name</option>\n~; |
| $forumcss .= qq~<option value="$file"$selected>$name</option>\n~; |
| } |
| } |
| } |
| } |
| |
| |
| opendir(TMPLDIR, "$adminstylesdir"); |
| opendir(TMPLDIR, "$adminstylesdir"); |
| @astyles = readdir(TMPLDIR); |
| @astyles = readdir(TMPLDIR); |
| closedir(TMPLDIR); |
| closedir(TMPLDIR); |
| $admincss = ""; |
| $admincss = ""; |
| $admincss = qq~<option value=""></option>\n~; |
| $admincss = qq~<option value=""></option>\n~; |
| foreach $file (sort @astyles) { |
| foreach $file (sort @astyles) { |
| ($name, $ext) = split(/\./, $file); |
| ($name, $ext) = split(/\./, $file); |
| $selected = ""; |
| $selected = ""; |
| if ($ext eq 'css') { |
| if ($ext eq 'css') { |
| if ($file eq $cssfile && $admincs) { $selected = qq~ selected="selected"~; } |
| if ($file eq $cssfile && $admincs) { $selected = qq~ selected="selected"~; } |
| $admincss .= qq~<option value="$file"$selected>$name</option>\n~; |
| $admincss .= qq~<option value="$file"$selected>$name</option>\n~; |
| } |
| } |
| } |
| } |
| |
| |
| fopen(CSS, "$csstype") or &admin_fatal_error("cannot_open","$csstype"); |
| fopen(CSS, "$csstype") or &admin_fatal_error("cannot_open","$csstype"); |
| while ($line = <CSS>) { |
| while ($line = <CSS>) { |
| $line =~ s~[\r\n]~~g; |
| $line =~ s~[\r\n]~~g; |
| $line =~ s~ ~&nbsp;~g; |
| $line =~ s~ ~&nbsp;~g; |
| $line =~ s~&~&amp;~g; |
| $line =~ s~&~&amp;~g; |
| &FromHTML($line); |
| &FromHTML($line); |
| $fullcss .= qq~$line\n~; |
| $fullcss .= qq~$line\n~; |
| } |
| } |
| fclose(CSS); |
| fclose(CSS); |
| |
| |
| $yymain .= qq~ |
| $yymain .= qq~ |
| <div class="bordercolor" style="padding: 0px; width: 99%; margin-left: 0px; margin-right: auto;"> |
| <div class="bordercolor" style="padding: 0px; width: 99%; margin-left: 0px; margin-right: auto;"> |
| <table width="100%" cellspacing="1" cellpadding="4"> |
| <table width="100%" cellspacing="1" cellpadding="4"> |
| <form action="$adminurl?action=modcss;cssfile=$cssfile" name="modcss" method="post" style="display: inline;"> |
| <form action="$adminurl?action=modcss;cssfile=$cssfile" name="modcss" method="post" style="display: inline;"> |
| <tr> |
| <tr> |
| <td align="left" valign="middle" class="titlebg"> |
| <td align="left" valign="middle" class="titlebg"> |
| <img src="$imagesdir/xx.gif" alt="" border="0" /><b> $templ_txt{'51'}</b> - $cssfile |
| <img src="$imagesdir/xx.gif" alt="" border="0" /><b> $templ_txt{'51'}</b> - $cssfile |
| <input type="submit" name="wysiwyg" id="wysiwyg" value="wysiwyg" class="button" /> |
| <input type="submit" name="wysiwyg" id="wysiwyg" value="wysiwyg" class="button" /> |
| <input type="button" name="source" id="source" value=" source " disabled="disabled" /> |
| <input type="button" name="source" id="source" value=" source " disabled="disabled" /> |
| </td> |
| </td> |
| </tr> |
| </tr> |
| </form> |
| </form> |
| <form action="$adminurl?action=modstyle2" method="post"> |
| <form action="$adminurl?action=modstyle2" method="post"> |
| <tr valign="middle"> |
| <tr valign="middle"> |
| <td align="center" class="windowbg2"> |
| <td align="center" class="windowbg2"> |
| <input type="hidden" name="filename" value="$cssfile" /> |
| <input type="hidden" name="filename" value="$cssfile" /> |
| <input type="hidden" name="type" value="$admincs" /> |
| <input type="hidden" name="type" value="$admincs" /> |
| <textarea rows="20" cols="95" name="css" style="width: 99%; height: 350px;">$fullcss</textarea> |
| <textarea rows="20" cols="95" name="css" style="width: 99%; height: 350px;">$fullcss</textarea> |
| </td> |
| </td> |
| </tr> |
| </tr> |
| <tr valign="middle"> |
| <tr valign="middle"> |
| <td align="center" class="catbg"> |
| <td align="center" class="catbg"> |
| <input type="submit" value="$admin_txt{'10'} $cssfile" class="button" /> |
| <input type="submit" value="$admin_txt{'10'} $cssfile" class="button" /> |
| </td> |
| </td> |
| </tr> |
| </tr> |
| </form> |
| </form> |
| <tr> |
| <tr> |
| <td align="left" class="windowbg2"> |
| <td align="left" class="windowbg2"> |
| <div style="float: left; width: 30%; padding: 3px;"><b>$templ_txt{'1'}</b></div> |
| <div style="float: left; width: 30%; padding: 3px;"><b>$templ_txt{'1'}</b></div> |
| <div style="float: left; width: 69%;"> |
| <div style="float: left; width: 69%;"> |
| <form action="$adminurl?action=modstyle" name="selcss" method="post" style="display: inline;"> |
| <form action="$adminurl?action=modstyle" name="selcss" method="post" style="display: inline;"> |
| <div class="small" style="float: left; width: 25%;"><label for="cssfile">$templ_txt{'forum'}:</label><br /> |
| <div class="small" style="float: left; width: 25%;"><label for="cssfile">$templ_txt{'forum'}:</label><br /> |
| <select name="cssfile" id="cssfile" size="1" style="width: 90%;" onchange="if(this.options[this.selectedIndex].value) { document.aselcss.admcssfile.selectedIndex = '0'; submit(); }"> |
| <select name="cssfile" id="cssfile" size="1" style="width: 90%;" onchange="if(this.options[this.selectedIndex].value) { document.aselcss.admcssfile.selectedIndex = '0'; submit(); }"> |
| $forumcss |
| $forumcss |
| </select><br /> |
| </select><br /> |
| <noscript><input type="submit" value="$admin_txt{'32'}" style="width: 90%;" class="button" /></noscript> |
| <noscript><input type="submit" value="$admin_txt{'32'}" style="width: 90%;" class="button" /></noscript> |
| </div> |
| </div> |
| </form> |
| </form> |
| <form action="$adminurl?action=modstyle" name="aselcss" method="post" style="display: inline;"> |
| <form action="$adminurl?action=modstyle" name="aselcss" method="post" style="display: inline;"> |
| <div class="small" style="float: left; width: 25%;"><label for="admcssfile">$templ_txt{'admincenter'}:</label><br /> |
| <div class="small" style="float: left; width: 25%;"><label for="admcssfile">$templ_txt{'admincenter'}:</label><br /> |
| <select name="admcssfile" id="admcssfile" size="1" style="width: 90%;" onchange="if(this.options[this.selectedIndex].value) { document.selcss.cssfile.selectedIndex = '0'; submit(); }"> |
| <select name="admcssfile" id="admcssfile" size="1" style="width: 90%;" onchange="if(this.options[this.selectedIndex].value) { document.selcss.cssfile.selectedIndex = '0'; submit(); }"> |
| $admincss |
| $admincss |
| </select><br /> |
| </select><br /> |
| <noscript><input type="submit" value="$admin_txt{'32'}" style="width: 90%;" class="button" /></noscript> |
| <noscript><input type="submit" value="$admin_txt{'32'}" style="width: 90%;" class="button" /></noscript> |
| </div> |
| </div> |
| </form> |
| </form> |
| </div> |
| </div> |
| </td> |
| </td> |
| </tr> |
| </tr> |
| </table> |
| </table> |
| </div> |
| </div> |
| ~; |
| ~; |
| $yytitle = $templ_txt{'1'}; |
| $yytitle = $templ_txt{'1'}; |
| $action_area = "modcss"; |
| $action_area = "modcss"; |
| &AdminTemplate; |
| &AdminTemplate; |
| } |
| } |
| |
| |
| sub ModifyStyle2 { |
| sub ModifyStyle2 { |
| &is_admin_or_gmod; |
| &is_admin_or_gmod; |
| $FORM{'css'} =~ tr/\r//d; |
| $FORM{'css'} =~ tr/\r//d; |
| $FORM{'css'} =~ s~\A\n~~; |
| $FORM{'css'} =~ s~\A\n~~; |
| $FORM{'css'} =~ s~\n\Z~~; |
| $FORM{'css'} =~ s~\n\Z~~; |
| |
| |
| if ($FORM{'filename'}) { $cssfile = $FORM{'filename'}; } |
| if ($FORM{'filename'}) { $cssfile = $FORM{'filename'}; } |
| else { $cssfile = "default.css"; } |
| else { $cssfile = "default.css"; } |
| if ($FORM{'type'}) { |
| if ($FORM{'type'}) { |
| fopen(CSS, ">$adminstylesdir/$cssfile") || &admin_fatal_error("cannot_open","$adminstylesdir/$cssfile", 1); |
| fopen(CSS, ">$adminstylesdir/$cssfile") || &admin_fatal_error("cannot_open","$adminstylesdir/$cssfile", 1); |
| } else { |
| } else { |
| fopen(CSS, ">$forumstylesdir/$cssfile") || &admin_fatal_error("cannot_open","$forumstylesdir/$cssfile", 1); |
| fopen(CSS, ">$forumstylesdir/$cssfile") || &admin_fatal_error("cannot_open","$forumstylesdir/$cssfile", 1); |
| } |
| } |
| print CSS "$FORM{'css'}\n"; |
| print CSS "$FORM{'css'}\n"; |
| fclose(CSS); |
| fclose(CSS); |
| $yySetLocation = qq~$adminurl?action=modcss;cssfile=$cssfile~; |
| $yySetLocation = qq~$adminurl?action=modcss;cssfile=$cssfile~; |
| &redirectexit; |
| &redirectexit; |
| } |
| } |
| |
| |
| sub ModifyCSS { |
| sub ModifyCSS { |
| &is_admin_or_gmod; |
| &is_admin_or_gmod; |
| |
| |
| if ($INFO{'templateset'}) { $thistemplate = $INFO{'templateset'}; } |
| if ($INFO{'templateset'}) { $thistemplate = $INFO{'templateset'}; } |
| else { $thistemplate = "$template"; } |
| else { $thistemplate = "$template"; } |
| |
| |
| while (($curtemplate, $value) = each(%templateset)) { |
| while (($curtemplate, $value) = each(%templateset)) { |
| if ($curtemplate eq $thistemplate) { $akttemplate = $curtemplate; } |
| if ($curtemplate eq $thistemplate) { $akttemplate = $curtemplate; } |
| } |
| } |
| |
| |
| ($aktstyle, $aktimages, $akthead, $aktboard, $aktmessage, $aktdisplay) = split(/\|/, $templateset{"$akttemplate"}); |
| ($aktstyle, $aktimages, $akthead, $aktboard, $aktmessage, $aktdisplay) = split(/\|/, $templateset{"$akttemplate"}); |
| |
| |
| my ($fullcss, $line); |
| my ($fullcss, $line); |
| if ($INFO{'cssfile'}) { $cssfile = $INFO{'cssfile'}; } |
| if ($INFO{'cssfile'}) { $cssfile = $INFO{'cssfile'}; } |
| else { $cssfile = "$aktstyle.css"; } |
| else { $cssfile = "$aktstyle.css"; } |
| |
| |
| $tempimages = qq~$forumstylesurl/$aktimages~; |
| $tempimages = qq~$forumstylesurl/$aktimages~; |
| my $istabbed = 0; |
| my $istabbed = 0; |
| |
| |
| $stylestr = ""; |
| $stylestr = ""; |
| |
| |
| opendir(TMPLDIR, "$forumstylesdir"); |
| opendir(TMPLDIR, "$forumstylesdir"); |
| @styles = readdir(TMPLDIR); |
| @styles = readdir(TMPLDIR); |
| closedir(TMPLDIR); |
| closedir(TMPLDIR); |
| $forumcss = ""; |
| $forumcss = ""; |
| $imgdirs = ""; |
| $imgdirs = ""; |
| foreach $file (sort @styles) { |
| foreach $file (sort @styles) { |
| ($name, $ext) = split(/\./, $file); |
| ($name, $ext) = split(/\./, $file); |
| $selected = ""; |
| $selected = ""; |
| if ($ext eq 'css') { |
| if ($ext eq 'css') { |
| if ($file eq $cssfile) { $selected = qq~ selected="selected"~; $viewcss = $name; } |
| if ($file eq $cssfile) { $selected = qq~ selected="selected"~; $viewcss = $name; } |
| $forumcss .= qq~<option value="$file"$selected>$name</option>\n~; |
| $forumcss .= qq~<option value="$file"$selected>$name</option>\n~; |
| } |
| } |
| } |
| } |
| |
| |
| fopen(CSS, "$forumstylesdir/$cssfile") or &admin_fatal_error("cannot_open","$forumstylesdir/$cssfile"); |
| fopen(CSS, "$forumstylesdir/$cssfile") or &admin_fatal_error("cannot_open","$forumstylesdir/$cssfile"); |
| @thecss = <CSS>; |
| @thecss = <CSS>; |
| fclose(CSS); |
| fclose(CSS); |
| foreach $style_sgl (@thecss) { |
| foreach $style_sgl (@thecss) { |
| $style_sgl =~ s/[\n\r]//g; |
| $style_sgl =~ s/[\n\r]//g; |
| $style_sgl =~ s/\A\s*//; |
| $style_sgl =~ s/\A\s*//; |
| $style_sgl =~ s/\s*\Z//; |
| $style_sgl =~ s/\s*\Z//; |
| $style_sgl =~ s/\t//g; |
| $style_sgl =~ s/\t//g; |
| $style_sgl =~ s/\.\/default/$forumstylesurl\/default/g; |
| $style_sgl =~ s/\.\/default/$forumstylesurl\/default/g; |
| $style_sgl =~ s/\.\/$viewcss/$forumstylesurl\/$viewcss/g; |
| $style_sgl =~ s/\.\/$viewcss/$forumstylesurl\/$viewcss/g; |
| $stylestr .= qq~$style_sgl ~; |
| $stylestr .= qq~$style_sgl ~; |
| } |
| } |
| $stylestr =~ s/\s{2,}/ /g; |
| $stylestr =~ s/\s{2,}/ /g; |
| my ($selstyl, $selhidden, $postsstyle, $seperatorstyle, $bodycontainerstyle, $bodystyle, $containerstyle, $titlestyle, $titlestyle_a, $categorystyle, $categorystyle_a, $window1style, $window2style, $inputstyle, $textareastyle, $selectstyle, $quotestyle, $codestyle, $editbgstyle, $highlightstyle,$gen_fontsize); |
| my ($selstyl, $selhidden, $postsstyle, $seperatorstyle, $bodycontainerstyle, $bodystyle, $containerstyle, $titlestyle, $titlestyle_a, $categorystyle, $categorystyle_a, $window1style, $window2style, $inputstyle, $textareastyle, $selectstyle, $quotestyle, $codestyle, $editbgstyle, $highlightstyle,$gen_fontsize); |
| |
| |
| $gen_fontsize = qq~<select name="cssfntsize" id="cssfntsize" style="vertical-align: middle;" onchange="previewFont()">~; |
| $gen_fontsize = qq~<select name="cssfntsize" id="cssfntsize" style="vertical-align: middle;" onchange="previewFont()">~; |
| for ($i = 7; $i < 21; $i++) { |
| for ($i = 7; $i < 21; $i++) { |
| $gen_fontsize .= qq~<option value="$i">$i</option>~; |
| $gen_fontsize .= qq~<option value="$i">$i</option>~; |
| } |
| } |
| $gen_fontsize .= qq~</select>~; |
| $gen_fontsize .= qq~</select>~; |
| $gen_fontface = qq~<select name="cssfntface" id="cssfntface" style="vertical-align: middle;" onchange="previewFontface()"> |
| $gen_fontface = qq~<select name="cssfntface" id="cssfntface" style="vertical-align: middle;" onchange="previewFontface()"> |
| <option value="verdana">Verdana</option> |
| <option value="verdana">Verdana</option> |
| <option value="helvetica">Helvetica</option> |
| <option value="helvetica">Helvetica</option> |
| <option value="arial">Arial</option> |
| <option value="arial">Arial</option> |
| <option value="courier">Courier</option> |
| <option value="courier">Courier</option> |
| <option value="courier new">Courier New</option> |
| <option value="courier new">Courier New</option> |
| </select>~; |
| </select>~; |
| $gen_borderweigth = qq~<select name="borderweigth" id="borderweigth" style="vertical-align: middle;" onchange="previewBorder()">~; |
| $gen_borderweigth = qq~<select name="borderweigth" id="borderweigth" style="vertical-align: middle;" onchange="previewBorder()">~; |
| for ($i = 0; $i < 6; $i++) { |
| for ($i = 0; $i < 6; $i++) { |
| $gen_borderweigth .= qq~<option value="$i">$i</option>~; |
| $gen_borderweigth .= qq~<option value="$i">$i</option>~; |
| } |
| } |
| $gen_borderweigth .= qq~</select>~; |
| $gen_borderweigth .= qq~</select>~; |
| $gen_borderstyle = qq~<select name="borderstyle" id="borderstyle" style="vertical-align: middle;" onchange="previewBorder()"> |
| $gen_borderstyle = qq~<select name="borderstyle" id="borderstyle" style="vertical-align: middle;" onchange="previewBorder()"> |
| <option value="solid">$templ_txt{'43'}</option> |
| <option value="solid">$templ_txt{'43'}</option> |
| <option value="dashed">$templ_txt{'44'}</option> |
| <option value="dashed">$templ_txt{'44'}</option> |
| <option value="dotted">$templ_txt{'45'}</option> |
| <option value="dotted">$templ_txt{'45'}</option> |
| <option value="double">$templ_txt{'46'}</option> |
| <option value="double">$templ_txt{'46'}</option> |
| <option value="groove">$templ_txt{'47'}</option> |
| <option value="groove">$templ_txt{'47'}</option> |
| <option value="ridge">$templ_txt{'48'}</option> |
| <option value="ridge">$templ_txt{'48'}</option> |
| <option value="inset">$templ_txt{'49'}</option> |
| <option value="inset">$templ_txt{'49'}</option> |
| <option value="outset">$templ_txt{'50'}</option> |
| <option value="outset">$templ_txt{'50'}</option> |
| </select>~; |
| </select>~; |
| |
| |
| if ($stylestr =~ /body/) { |
| if ($stylestr =~ /body/) { |
| $bodystyle = $stylestr; |
| $bodystyle = $stylestr; |
| $bodystyle =~ s/.*?(body\s*?\{.+?\}).*/$1/ig; |
| $bodystyle =~ s/.*?(body\s*?\{.+?\}).*/$1/ig; |
| $selstyl .= qq~<option value='$bodystyle' selected="selected">$templ_txt{'25'}</option>\n~; |
| $selstyl .= qq~<option value='$bodystyle' selected="selected">$templ_txt{'25'}</option>\n~; |
| } |
| } |
| if ($stylestr =~ /\#container/) { |
| if ($stylestr =~ /\#container/) { |
| $containerstyle = $stylestr; |
| $containerstyle = $stylestr; |
| $containerstyle =~ s/.*?(\#container\s*?\{.+?\}).*/$1/ig; |
| $containerstyle =~ s/.*?(\#container\s*?\{.+?\}).*/$1/ig; |
| $selstyl .= qq~<option value='$containerstyle'>$templ_txt{'26'}</option>\n~; |
| $selstyl .= qq~<option value='$containerstyle'>$templ_txt{'26'}</option>\n~; |
| } |
| } |
| if ($stylestr =~ /\.tabmenu/) { |
| if ($stylestr =~ /\.tabmenu/) { |
| $istabbed = 1; |
| $istabbed = 1; |
| } |
| } |
| if ($stylestr =~ /\.tabtitle/ && $istabbed) { |
| if ($stylestr =~ /\.tabtitle/ && $istabbed) { |
| $tabtitlestyle = $stylestr; |
| $tabtitlestyle = $stylestr; |
| $tabtitlestyle =~ s/.*?(\.tabtitle\s*?\{.+?\}).*/$1/ig; |
| $tabtitlestyle =~ s/.*?(\.tabtitle\s*?\{.+?\}).*/$1/ig; |
| $tabtitlestyle = $tabtitlestyle; |
| $tabtitlestyle = $tabtitlestyle; |
| $selstyl .= qq~<option value='$tabtitlestyle'>$templ_txt{'tabtitle'}</option>\n~; |
| $selstyl .= qq~<option value='$tabtitlestyle'>$templ_txt{'tabtitle'}</option>\n~; |
| if ($stylestr =~ /\.tabtitle a/) { |
| if ($stylestr =~ /\.tabtitle a/) { |
| $tabtitlestyle_a = $stylestr; |
| $tabtitlestyle_a = $stylestr; |
| $tabtitlestyle_a =~ s/.*?(\.tabtitle a\s*?\{.+?\}).*/$1/ig; |
| $tabtitlestyle_a =~ s/.*?(\.tabtitle a\s*?\{.+?\}).*/$1/ig; |
| $selstyl .= qq~<option value='$tabtitlestyle_a'>$templ_txt{'tabtitlea'}</option>\n~; |
| $selstyl .= qq~<option value='$tabtitlestyle_a'>$templ_txt{'tabtitlea'}</option>\n~; |
| } |
| } |
| } |
| } |
| if ($stylestr =~ /\.seperator/) { |
| if ($stylestr =~ /\.seperator/) { |
| $seperatorstyle = $stylestr; |
| $seperatorstyle = $stylestr; |
| $seperatorstyle =~ s/.*?(\.seperator\s*?\{.+?\}).*/$1/ig; |
| $seperatorstyle =~ s/.*?(\.seperator\s*?\{.+?\}).*/$1/ig; |
| $selstyl .= qq~<option value='$seperatorstyle'>$templ_txt{'27'}</option>\n~; |
| $selstyl .= qq~<option value='$seperatorstyle'>$templ_txt{'27'}</option>\n~; |
| } |
| } |
| if ($stylestr =~ /\.bordercolor/) { |
| if ($stylestr =~ /\.bordercolor/) { |
| $bordercolorstyle = $stylestr; |
| $bordercolorstyle = $stylestr; |
| $bordercolorstyle =~ s/.*?(\.bordercolor\s*?\{.+?\}).*/$1/ig; |
| $bordercolorstyle =~ s/.*?(\.bordercolor\s*?\{.+?\}).*/$1/ig; |
| $selstyl .= qq~<option value='$bordercolorstyle'>$templ_txt{'28'}</option>\n~; |
| $selstyl .= qq~<option value='$bordercolorstyle'>$templ_txt{'28'}</option>\n~; |
| } |
| } |
| if ($stylestr =~ /\.hr/) { |
| if ($stylestr =~ /\.hr/) { |
| $hrstyle = $stylestr; |
| $hrstyle = $stylestr; |
| $hrstyle =~ s/.*?(\.hr\s*?\{.+?\}).*/$1/ig; |
| $hrstyle =~ s/.*?(\.hr\s*?\{.+?\}).*/$1/ig; |
| $selstyl .= qq~<option value='$hrstyle'>$templ_txt{'29'}</option>\n~; |
| $selstyl .= qq~<option value='$hrstyle'>$templ_txt{'29'}</option>\n~; |
| } |
| } |
| if ($stylestr =~ /\.titlebg/) { |
| if ($stylestr =~ /\.titlebg/) { |
| $titlestyle = $stylestr; |
| $titlestyle = $stylestr; |
| $titlestyle =~ s/.*?(\.titlebg\s*?\{.+?\}).*/$1/ig; |
| $titlestyle =~ s/.*?(\.titlebg\s*?\{.+?\}).*/$1/ig; |
| $titlestyle = $titlestyle; |
| $titlestyle = $titlestyle; |
| $selstyl .= qq~<option value='$titlestyle'>$templ_txt{'30'}</option>\n~; |
| $selstyl .= qq~<option value='$titlestyle'>$templ_txt{'30'}</option>\n~; |
| if ($stylestr =~ /\.titlebg a/) { |
| if ($stylestr =~ /\.titlebg a/) { |
| $titlestyle_a = $stylestr; |
| $titlestyle_a = $stylestr; |
| $titlestyle_a =~ s/.*?(\.titlebg a\s*?\{.+?\}).*/$1/ig; |
| $titlestyle_a =~ s/.*?(\.titlebg a\s*?\{.+?\}).*/$1/ig; |
| $selstyl .= qq~<option value='$titlestyle_a'>$templ_txt{'30a'}</option>\n~; |
| $selstyl .= qq~<option value='$titlestyle_a'>$templ_txt{'30a'}</option>\n~; |
| } |
| } |
| } |
| } |
| if ($stylestr =~ /\.catbg/) { |
| if ($stylestr =~ /\.catbg/) { |
| $categorystyle = $stylestr; |
| $categorystyle = $stylestr; |
| $categorystyle =~ s/.*?(\.catbg\s*?\{.+?\}).*/$1/ig; |
| $categorystyle =~ s/.*?(\.catbg\s*?\{.+?\}).*/$1/ig; |
| $categorystyle = $categorystyle; |
| $categorystyle = $categorystyle; |
| $selstyl .= qq~<option value='$categorystyle'>$templ_txt{'31'}</option>\n~; |
| $selstyl .= qq~<option value='$categorystyle'>$templ_txt{'31'}</option>\n~; |
| if ($stylestr =~ /\.catbg a/) { |
| if ($stylestr =~ /\.catbg a/) { |
| $categorystyle_a = $stylestr; |
| $categorystyle_a = $stylestr; |
| $categorystyle_a =~ s/.*?(\.catbg a\s*?\{.+?\}).*/$1/ig; |
| $categorystyle_a =~ s/.*?(\.catbg a\s*?\{.+?\}).*/$1/ig; |
| $selstyl .= qq~<option value='$categorystyle_a'>$templ_txt{'31a'}</option>\n~; |
| $selstyl .= qq~<option value='$categorystyle_a'>$templ_txt{'31a'}</option>\n~; |
| } |
| } |
| } |
| } |
| if ($stylestr =~ /\.windowbg/) { |
| if ($stylestr =~ /\.windowbg/) { |
| $window1style = $stylestr; |
| $window1style = $stylestr; |
| $window1style =~ s/.*?(\.windowbg\s*?\{.+?\}).*/$1/ig; |
| $window1style =~ s/.*?(\.windowbg\s*?\{.+?\}).*/$1/ig; |
| $selstyl .= qq~<option value='$window1style'>$templ_txt{'32'}</option>\n~; |
| $selstyl .= qq~<option value='$window1style'>$templ_txt{'32'}</option>\n~; |
| } |
| } |
| if ($stylestr =~ /\.windowbg2/) { |
| if ($stylestr =~ /\.windowbg2/) { |
| $window2style = $stylestr; |
| $window2style = $stylestr; |
| $window2style =~ s/.*?(\.windowbg2\s*?\{.+?\}).*/$1/ig; |
| $window2style =~ s/.*?(\.windowbg2\s*?\{.+?\}).*/$1/ig; |
| $windowcol2 = $window2style; |
| $windowcol2 = $window2style; |
| $windowcol2 =~ s/.*?(\#[a-f0-9]{3,6}).*/$1/i; |
| $windowcol2 =~ s/.*?(\#[a-f0-9]{3,6}).*/$1/i; |
| $selstyl .= qq~<option value='$window2style'>$templ_txt{'33'}</option>\n~; |
| $selstyl .= qq~<option value='$window2style'>$templ_txt{'33'}</option>\n~; |
| } |
| } |
| if ($stylestr =~ /\.message/) { |
| if ($stylestr =~ /\.message/) { |
| $postsstyle = $stylestr; |
| $postsstyle = $stylestr; |
| $postsstyle =~ s/.*?(\.message\s*?\{.+?\}).*/$1/ig; |
| $postsstyle =~ s/.*?(\.message\s*?\{.+?\}).*/$1/ig; |
| $selstyl .= qq~<option value='$postsstyle'>$templ_txt{'65'}</option>\n~; |
| $selstyl .= qq~<option value='$postsstyle'>$templ_txt{'65'}</option>\n~; |
| |
| |
| if ($stylestr =~ /\.message a/) { |
| if ($stylestr =~ /\.message a/) { |
| $postsstyle_a = $stylestr; |
| $postsstyle_a = $stylestr; |
| $postsstyle_a =~ s/.*?(\.message a\s*?\{.+?\}).*/$1/ig; |
| $postsstyle_a =~ s/.*?(\.message a\s*?\{.+?\}).*/$1/ig; |
| $selstyl .= qq~<option value='$postsstyle_a'>$templ_txt{'66'}</option>\n~; |
| $selstyl .= qq~<option value='$postsstyle_a'>$templ_txt{'66'}</option>\n~; |
| } |
| } |
| } |
| } |
| if ($stylestr =~ /input/) { |
| if ($stylestr =~ /input/) { |
| $inputstyle = $stylestr; |
| $inputstyle = $stylestr; |
| $inputstyle =~ s/.*?(input\s*?\{.+?\}).*/$1/ig; |
| $inputstyle =~ s/.*?(input\s*?\{.+?\}).*/$1/ig; |
| $selstyl .= qq~<option value='$inputstyle'>$templ_txt{'34a'}</option>\n~; |
| $selstyl .= qq~<option value='$inputstyle'>$templ_txt{'34a'}</option>\n~; |
| } |
| } |
| if ($stylestr =~ /button/) { |
| if ($stylestr =~ /button/) { |
| $buttonstyle = $stylestr; |
| $buttonstyle = $stylestr; |
| $buttonstyle =~ s/.*?(button\s*?\{.+?\}).*/$1/ig; |
| $buttonstyle =~ s/.*?(button\s*?\{.+?\}).*/$1/ig; |
| $selstyl .= qq~<option value='$buttonstyle'>$templ_txt{'34b'}</option>\n~; |
| $selstyl .= qq~<option value='$buttonstyle'>$templ_txt{'34b'}</option>\n~; |
| } |
| } |
| if ($stylestr =~ /textarea/) { |
| if ($stylestr =~ /textarea/) { |
| $textareastyle = $stylestr; |
| $textareastyle = $stylestr; |
| $textareastyle =~ s/.*?(textarea\s*?\{.+?\}).*/$1/ig; |
| $textareastyle =~ s/.*?(textarea\s*?\{.+?\}).*/$1/ig; |
| $selstyl .= qq~<option value='$textareastyle'>$templ_txt{'35'}</option>\n~; |
| $selstyl .= qq~<option value='$textareastyle'>$templ_txt{'35'}</option>\n~; |
| } |
| } |
| if ($stylestr =~ /select/) { |
| if ($stylestr =~ /select/) { |
| $selectstyle = $stylestr; |
| $selectstyle = $stylestr; |
| $selectstyle =~ s/.*?(select\s*?\{.+?\}).*/$1/ig; |
| $selectstyle =~ s/.*?(select\s*?\{.+?\}).*/$1/ig; |
| $selstyl .= qq~<option value='$selectstyle'>$templ_txt{'36'}</option>\n~; |
| $selstyl .= qq~<option value='$selectstyle'>$templ_txt{'36'}</option>\n~; |
| } |
| } |
| if ($stylestr =~ /.quote/) { |
| if ($stylestr =~ /.quote/) { |
| $quotestyle = $stylestr; |
| $quotestyle = $stylestr; |
| $quotestyle =~ s/.*?(\.quote\s*?\{.+?\}).*/$1/ig; |
| $quotestyle =~ s/.*?(\.quote\s*?\{.+?\}).*/$1/ig; |
| $selstyl .= qq~<option value='$quotestyle'>$templ_txt{'37'}</option>\n~; |
| $selstyl .= qq~<option value='$quotestyle'>$templ_txt{'37'}</option>\n~; |
| $message = qq~\[quote\]$templ_txt{'53'}\[/quote\]~; |
| $message = qq~\[quote\]$templ_txt{'53'}\[/quote\]~; |
| if ($enable_ubbc) { |
| if ($enable_ubbc) { |
| if (!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } |
| if (!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } |
| &DoUBBC; |
| &DoUBBC; |
| } |
| } |
| $aquote = $message; |
| $aquote = $message; |
| } |
| } |
| if ($stylestr =~ /.code/) { |
| if ($stylestr =~ /.code/) { |
| $codestyle = $stylestr; |
| $codestyle = $stylestr; |
| $codestyle =~ s/.*?(\.code\s*?\{.+?\}).*/$1/ig; |
| $codestyle =~ s/.*?(\.code\s*?\{.+?\}).*/$1/ig; |
| $selstyl .= qq~<option value='$codestyle'>$templ_txt{'38'}</option>\n~; |
| $selstyl .= qq~<option value='$codestyle'>$templ_txt{'38'}</option>\n~; |
| $message = qq~\[code\]$templ_txt{'54'}\[/code\]~; |
| $message = qq~\[code\]$templ_txt{'54'}\[/code\]~; |
| if ($enable_ubbc) { |
| if ($enable_ubbc) { |
| if (!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } |
| if (!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } |
| &DoUBBC; |
| &DoUBBC; |
| } |
| } |
| $acode = $message; |
| $acode = $message; |
| } |
| } |
| if ($stylestr =~ /.editbg/) { |
| if ($stylestr =~ /.editbg/) { |
| $editbgstyle = $stylestr; |
| $editbgstyle = $stylestr; |
| $editbgstyle =~ s/.*?(\.editbg\s*?\{.+?\}).*/$1/ig; |
| $editbgstyle =~ s/.*?(\.editbg\s*?\{.+?\}).*/$1/ig; |
| $selstyl .= qq~<option value='$editbgstyle'>$templ_txt{'24'}</option>\n~; |
| $selstyl .= qq~<option value='$editbgstyle'>$templ_txt{'24'}</option>\n~; |
| $message = qq~\[edit\]$templ_txt{'55'}\[/edit\]~; |
| $message = qq~\[edit\]$templ_txt{'55'}\[/edit\]~; |
| if ($enable_ubbc) { |
| if ($enable_ubbc) { |
| if (!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } |
| if (!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } |
| &DoUBBC; |
| &DoUBBC; |
| } |
| } |
| $aedit = $message; |
| $aedit = $message; |
| } |
| } |
| if ($stylestr =~ /.highlight/) { |
| if ($stylestr =~ /.highlight/) { |
| $highlightstyle = $stylestr; |
| $highlightstyle = $stylestr; |
| $highlightstyle =~ s/.*?(\.highlight\s*?\{.+?\}).*/$1/ig; |
| $highlightstyle =~ s/.*?(\.highlight\s*?\{.+?\}).*/$1/ig; |
| $selstyl .= qq~<option value='$highlightstyle'>$templ_txt{'39'}</option>\n~; |
| $selstyl .= qq~<option value='$highlightstyle'>$templ_txt{'39'}</option>\n~; |
| $message = qq~\[highlight\]$templ_txt{'56'}\[/highlight\]~; |
| $message = qq~\[highlight\]$templ_txt{'56'}\[/highlight\]~; |
| if ($enable_ubbc) { |
| if ($enable_ubbc) { |
| if (!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } |
| if (!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } |
| &DoUBBC; |
| &DoUBBC; |
| } |
| } |
| $ahighlight = $message; |
| $ahighlight = $message; |
| } |
| } |
| if ($stylestr =~ /\.bodycontainer/) { |
| if ($stylestr =~ /\.bodycontainer/) { |
| $bodycontainerstyle = 1; |
| $bodycontainerstyle = 1; |
| } |
| } |
| |
| |
| $yymain .= qq~ |
| $yymain .= qq~ |
| <div class="bordercolor" style="padding: 0px; width: 99%; margin-left: 0px; margin-right: auto;"> |
| <div class="bordercolor" style="padding: 0px; width: 99%; margin-left: 0px; margin-right: auto;"> |
| <table width="100%" cellspacing="1" cellpadding="4"> |
| <table width="100%" cellspacing="1" cellpadding="4"> |
| <tr> |
| <tr> |
| <td align="left" valign="middle" class="titlebg"> |
| <td align="left" valign="middle" class="titlebg"> |
| <form action="$adminurl?action=modstyle" name="modstyles" id="modstyles" method="post"> |
| <form action="$adminurl?action=modstyle" name="modstyles" id="modstyles" method="post"> |
| <img src="$imagesdir/xx.gif" alt="" border="0" style="vertical-align: middle;" /> <b>$templ_txt{'51'}</b> - $viewcss |
| <img src="$imagesdir/xx.gif" alt="" border="0" style="vertical-align: middle;" /> <b>$templ_txt{'51'}</b> - $viewcss |
| <input type="hidden" name="cssfile" value="$cssfile" /> |
| <input type="hidden" name="cssfile" value="$cssfile" /> |
| <input type="button" name="wysiwyg" id="wysiwyg" value="wysiwyg" disabled="disabled" /> |
| <input type="button" name="wysiwyg" id="wysiwyg" value="wysiwyg" disabled="disabled" /> |
| <input type="submit" name="source" id="source" value=" source " class="button" /> |
| <input type="submit" name="source" id="source" value=" source " class="button" /> |
| </form> |
| </form> |
| </td> |
| </td> |
| </tr> |
| </tr> |
| </table> |
| </table> |
| <form action="$adminurl?action=modcss2" name="allstyles" id="allstyles" method="post"> |
| <form action="$adminurl?action=modcss2" name="allstyles" id="allstyles" method="post"> |
| <table width="100%" cellspacing="1" cellpadding="0"> |
| <table width="100%" cellspacing="1" cellpadding="0"> |
| <tr> |
| <tr> |
| <td class="windowbg2" align="center" valign="middle"> |
| <td class="windowbg2" align="center" valign="middle"> |
| <iframe id="StyleManager" name="StyleManager" width="100%" height="350" marginwidth="0" marginheight="0" frameborder="0" scrolling="yes" style="border-top: 1px inset; border-bottom: 1px inset; visibility: visible; display: inline"></iframe> |
| <iframe id="StyleManager" name="StyleManager" width="100%" height="350" marginwidth="0" marginheight="0" frameborder="0" scrolling="yes" style="border-top: 1px inset; border-bottom: 1px inset; visibility: visible; display: inline"></iframe> |
| </td> |
| </td> |
| </tr> |
| </tr> |
| </table> |
| </table> |
| <table width="100%" cellspacing="1" cellpadding="4"> |
| <table width="100%" cellspacing="1" cellpadding="4"> |
| <tr> |
| <tr> |
| <td align="left" class="windowbg2"> |
| <td align="left" class="windowbg2"> |
| <div style="float: left; width: 30%; padding: 3px;"><label for="cssfile"><b>$templ_txt{'1'}</b></label></div> |
| <div style="float: left; width: 30%; padding: 3px;"><label for="cssfile"><b>$templ_txt{'1'}</b></label></div> |
| <div style="float: left; width: 69%;"> |
| <div style="float: left; width: 69%;"> |
| <input type="hidden" name="button" value="0" /> |
| <input type="hidden" name="button" value="0" /> |
| <select name="cssfile" id="cssfile" size="1" onchange="document.allstyles.button.value = '1'; submit();"> |
| <select name="cssfile" id="cssfile" size="1" onchange="document.allstyles.button.value = '1'; submit();"> |
| $forumcss |
| $forumcss |
| </select> |
| </select> |
| <input type="button" value="$templ_txt{'14'}" onclick="document.allstyles.button.value = '3'; if (confirm('$templ_txt{'15'} $cssfile?')) submit();" /> |
| <input type="button" value="$templ_txt{'14'}" onclick="document.allstyles.button.value = '3'; if (confirm('$templ_txt{'15'} $cssfile?')) submit();" /> |
| </div> |
| </div> |
| </td> |
| </td> |
| </tr> |
| </tr> |
| <tr> |
| <tr> |
| <td align="left" class="windowbg2"> |
| <td align="left" class="windowbg2"> |
| <div style="float: left; width: 30%; padding: 3px;"> |
| <div style="float: left; width: 30%; padding: 3px;"> |
| <label for="csselement"><b>$templ_txt{'18'}</b><br /><span class="small">$templ_txt{'19'}<br /><br /></span></label> |
| <label for="csselement"><b>$templ_txt{'18'}</b><br /><span class="small">$templ_txt{'19'}<br /><br /></span></label> |
| </div> |
| </div> |
| <div style="float: left; width: 69%;"> |
| <div style="float: left; width: 69%;"> |
| <div style="float: left; text-align: center; margin-left: 0px; margin-right: 6px; vertical-align: middle;"> |
| <div style="float: left; text-align: center; margin-left: 0px; margin-right: 6px; vertical-align: middle;"> |
| <select name="csselement" id="csselement" size="5" onchange="setElement()"> |
| <select name="csselement" id="csselement" size="5" onchange="setElement()"> |
| $selstyl |
| $selstyl |
| </select> |
| </select> |
| </div> |
| </div> |
| <div style="float: left;"> |
| <div style="float: left;"> |
| <div class="small" style="float: left; vertical-align: middle;"> |
| <div class="small" style="float: left; vertical-align: middle;"> |
| <span style="width: 70px;"> |
| <span style="width: 70px;"> |
| <input type="radio" name="selopt" id="selopt1" value="color" class="windowbg2" style="border: 0px; vertical-align: middle;" onclick="manSelect();" /> <label for="selopt1"><span class="small" style="vertical-align: middle;"><b>$templ_txt{'22'}</b></span></label> |
| <input type="radio" name="selopt" id="selopt1" value="color" class="windowbg2" style="border: 0px; vertical-align: middle;" onclick="manSelect();" /> <label for="selopt1"><span class="small" style="vertical-align: middle;"><b>$templ_txt{'22'}</b></span></label> |
| </span> |
| </span> |
| <span> |
| <span> |
| <input type="text" size="9" name="textcol" id="textcol" value="$textcol" class="windowbg2" style="font-size: 10px; border: 1px #eef7ff solid; vertical-align: middle;" onchange="previewColor(this.value)" /> |
| <input type="text" size="9" name="textcol" id="textcol" value="$textcol" class="windowbg2" style="font-size: 10px; border: 1px #eef7ff solid; vertical-align: middle;" onchange="previewColor(this.value)" /> |
| $gen_fontface $gen_fontsize |
| $gen_fontface $gen_fontsize |
| <img src="$imagesdir/cssbold.gif" border="0" alt="bold" name="cssbold" id="cssbold" style="border: 2px #eeeeee outset; vertical-align: middle;" onclick="previewFontweight()" /> |
| <img src="$imagesdir/cssbold.gif" border="0" alt="bold" name="cssbold" id="cssbold" style="border: 2px #eeeeee outset; vertical-align: middle;" onclick="previewFontweight()" /> |
| <img src="$imagesdir/cssitalic.gif" border="0" alt="italic" name="cssitalic" id="cssitalic" style="border: 2px #eeeeee outset; vertical-align: middle;" onclick="previewFontstyle()" /> |
| <img src="$imagesdir/cssitalic.gif" border="0" alt="italic" name="cssitalic" id="cssitalic" style="border: 2px #eeeeee outset; vertical-align: middle;" onclick="previewFontstyle()" /> |
| </span><br /> |
| </span><br /> |
| <span style="width: 70px;"> |
| <span style="width: 70px;"> |
| <input type="radio" name="selopt" id="selopt2" value="background-color" class="windowbg2" style="border: 0px; vertical-align: middle;" onclick="manSelect();" /> <label for="selopt2"><span class="small" style="vertical-align: middle;"><b>$templ_txt{'21'}</b></span></label> |
| <input type="radio" name="selopt" id="selopt2" value="background-color" class="windowbg2" style="border: 0px; vertical-align: middle;" onclick="manSelect();" /> <label for="selopt2"><span class="small" style="vertical-align: middle;"><b>$templ_txt{'21'}</b></span></label> |
| </span> |
| </span> |
| <span> |
| <span> |
| <input type="text" size="9" name="backcol" id="backcol" value="$backcol" class="windowbg2" style="font-size: 10px; border: 1px #eef7ff solid; vertical-align: middle;" onchange="previewColor(this.value)" /> |
| <input type="text" size="9" name="backcol" id="backcol" value="$backcol" class="windowbg2" style="font-size: 10px; border: 1px #eef7ff solid; vertical-align: middle;" onchange="previewColor(this.value)" /> |
| </span><br /> |
| </span><br /> |
| <span style="width: 70px;"> |
| <span style="width: 70px;"> |
| <input type="radio" name="selopt" id="selopt3" value="border" class="windowbg2" style="border: 0px; vertical-align: middle;" onclick="manSelect();" /> <label for="selopt3"><span class="small" style="vertical-align: middle;"><b>$templ_txt{'23'}</b></span></label> |
| <input type="radio" name="selopt" id="selopt3" value="border" class="windowbg2" style="border: 0px; vertical-align: middle;" onclick="manSelect();" /> <label for="selopt3"><span class="small" style="vertical-align: middle;"><b>$templ_txt{'23'}</b></span></label> |
| </span> |
| </span> |
| <span> |
| <span> |
| <input type="text" size="9" name="bordcol" id="bordcol" value="$bordcol" class="windowbg2" style="font-size: 10px; border: 1px #eef7ff solid; vertical-align: middle;" onchange="previewBorder()" /> |
| <input type="text" size="9" name="bordcol" id="bordcol" value="$bordcol" class="windowbg2" style="font-size: 10px; border: 1px #eef7ff solid; vertical-align: middle;" onchange="previewBorder()" /> |
| $gen_borderstyle $gen_borderweigth |
| $gen_borderstyle $gen_borderweigth |
| </span><br /> |
| </span><br /> |
| </div> |
| </div> |
| <div style="float: left; height: 68px; width: 92px; overflow: auto; border: 0px; margin-left: 8px;"> |
| <div style="float: left; height: 68px; width: 92px; overflow: auto; border: 0px; margin-left: 8px;"> |
| <div style="float: left; height: 22px; width: 91px;"> |
| <div style="float: left; height: 22px; width: 91px;"> |
| <div class="bordercolor" style="height: 20px; width: 66px; padding-left: 1px; padding-top: 1px; margin-top: 1px; float: left;"> |
| <div class="bordercolor" style="height: 20px; width: 66px; padding-left: 1px; padding-top: 1px; margin-top: 1px; float: left;"> |
| <span style="float: left; background-color: #000000; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor('#000000')"> </span> |
| <span style="float: left; background-color: #000000; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor('#000000')"> </span> |
| <span style="float: left; background-color: #333333; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor('#333333')"> </span> |
| <span style="float: left; background-color: #333333; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor('#333333')"> </span> |
| <span style="float: left; background-color: #666666; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor('#666666')"> </span> |
| <span style="float: left; background-color: #666666; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor('#666666')"> </span> |
| <span style="float: left; background-color: #999999; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor('#999999')"> </span> |
| <span style="float: left; background-color: #999999; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor('#999999')"> </span> |
| <span style="float: left; background-color: #cccccc; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor('#cccccc')"> </span> |
| <span style="float: left; background-color: #cccccc; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor('#cccccc')"> </span> |
| <span style="float: left; background-color: #ffffff; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor('#ffffff')"> </span> |
| <span style="float: left; background-color: #ffffff; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor('#ffffff')"> </span> |
| <span id="defaultpal1" style="float: left; background-color: $pallist[0]; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor(this.style.backgroundColor)"> </span> |
| <span id="defaultpal1" style="float: left; background-color: $pallist[0]; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor(this.style.backgroundColor)"> </span> |
| <span id="defaultpal2" style="float: left; background-color: $pallist[1]; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor(this.style.backgroundColor)"> </span> |
| <span id="defaultpal2" style="float: left; background-color: $pallist[1]; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor(this.style.backgroundColor)"> </span> |
| <span id="defaultpal3" style="float: left; background-color: $pallist[2]; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor(this.style.backgroundColor)"> </span> |
| <span id="defaultpal3" style="float: left; background-color: $pallist[2]; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor(this.style.backgroundColor)"> </span> |
| <span id="defaultpal4" style="float: left; background-color: $pallist[3]; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor(this.style.backgroundColor)"> </span> |
| <span id="defaultpal4" style="float: left; background-color: $pallist[3]; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor(this.style.backgroundColor)"> </span> |
| <span id="defaultpal5" style="float: left; background-color: $pallist[4]; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor(this.style.backgroundColor)"> </span> |
| <span id="defaultpal5" style="float: left; background-color: $pallist[4]; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor(this.style.backgroundColor)"> </span> |
| <span id="defaultpal6" style="float: left; background-color: $pallist[5]; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor(this.style.backgroundColor)"> </span> |
| <span id="defaultpal6" style="float: left; background-color: $pallist[5]; width: 10px; height: 9px; margin-right: 1px; margin-bottom: 1px; border: 0px; font-size: 5px; cursor: pointer; cursor: hand;" onclick="ConvShowcolor(this.style.backgroundColor)"> </span> |
| </div> |
| </div> |
| <div style="height: 22px; width: 23px; padding-left: 1px; float: right;"> |
| <div style="height: 22px; width: 23px; padding-left: 1px; float: right;"> |
| <img src="$imagesdir/palette1.gif" style="cursor: pointer" onclick="window.open('$scripturl?action=palette;task=templ', '', 'height=308,width=302,menubar=no,toolbar=no,scrollbars=no')" alt="" border="0" /> |
| <img src="$imagesdir/palette1.gif" style="cursor: pointer" onclick="window.open('$scripturl?action=palette;task=templ', '', 'height=308,width=302,menubar=no,toolbar=no,scrollbars=no')" alt="" border="0" /> |
| </div> |
| </div> |
| </div> |
| </div> |
| </div> |
| </div> |
| </div> |
| </div> |
| </div> |
| </div> |
| </td> |
| </td> |
| </tr> |
| </tr> |
| ~; |
| ~; |
| |
| |
| $viewstylestart = qq~<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| $viewstylestart = qq~<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| <head> |
| <head> |
| <title>Test Styles</title> |
| <title>Test Styles</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> |
| <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> |
| ~; |
| ~; |
| $viewstyle = qq~ |
| $viewstyle = qq~ |
| <body> |
| <body> |
| <div id="maincontainer"> |
| <div id="maincontainer"> |
| ~; |
| ~; |
| if ($containerstyle) { |
| if ($containerstyle) { |
| $viewstyle .= qq~ |
| $viewstyle .= qq~ |
| <div id="container"> |
| <div id="container"> |
| ~; |
| ~; |
| } |
| } |
| if ($istabbed) { |
| if ($istabbed) { |
| $tabsep = qq~<img src="$imagesdir/tabsep211.png" border="0" alt="" style="float: left; vertical-align: middle;" />~; |
| $tabsep = qq~<img src="$imagesdir/tabsep211.png" border="0" alt="" style="float: left; vertical-align: middle;" />~; |
| $tabfill = qq~<img src="$imagesdir/tabfill.gif" border="0" alt="" style="vertical-align: middle;" />~; |
| $tabfill = qq~<img src="$imagesdir/tabfill.gif" border="0" alt="" style="vertical-align: middle;" />~; |
| $tabtime = &timeformat($date, 1); |
| $tabtime = &timeformat($date, 1); |
| |
| |
| $viewstyle .= qq~ |
| $viewstyle .= qq~ |
| <table width="100%" cellpadding="0" cellspacing="0" border="0" class="menutop"> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0" class="menutop"> |
| <tr> |
| <tr> |
| <td class="small" align="left" valign="middle" width="2%" height="23"> </td> |
| <td class="small" align="left" valign="middle" width="2%" height="23"> </td> |
| <td class="small" align="left" valign="middle" width="98%" height="23">$tabtime</td> |
| <td class="small" align="left" valign="middle" width="98%" height="23">$tabtime</td> |
| </tr> |
| </tr> |
| </table> |
| </table> |
| <table class="windowbg2" width="100%" cellpadding="4" cellspacing="0" border="0"> |
| <table class="windowbg2" width="100%" cellpadding="4" cellspacing="0" border="0"> |
| <tr> |
| <tr> |
| <td align="left" valign="top" width="100%" height="30"> </td> |
| <td align="left" valign="top" width="100%" height="30"> </td> |
| </tr> |
| </tr> |
| </table> |
| </table> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <tr> |
| <td class="menutop" height="22" align="left"> </td> |
| <td class="menutop" height="22" align="left"> </td> |
| </tr> |
| </tr> |
| </table> |
| </table> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| |
| |
| <tr> |
| <tr> |
| <td id="tabmnleft" class="tabmenuleft" width="40"> </td> |
| <td id="tabmnleft" class="tabmenuleft" width="40"> </td> |
| <td id="tabmn" class="tabmenu"> |
| <td id="tabmn" class="tabmenu"> |
| <span class="selected"><a href="javascript:;">$tabfill$img_txt{'103'}$tabfill</a></span> |
| <span class="selected"><a href="javascript:;">$tabfill$img_txt{'103'}$tabfill</a></span> |
| $tabsep<span style="cursor:help;"><a href="javascript:;" style="cursor:help;">$tabfill$img_txt{'119'}$tabfill</a></span> |
| $tabsep<span style="cursor:help;"><a href="javascript:;" style="cursor:help;">$tabfill$img_txt{'119'}$tabfill</a></span> |
| $tabsep<span><a href="javascript:;">$tabfill$img_txt{'182'}$tabfill</a></span> |
| $tabsep<span><a href="javascript:;">$tabfill$img_txt{'182'}$tabfill</a></span> |
| $tabsep<span><a href="javascript:;">$tabfill$img_txt{'331'}$tabfill</a></span> |
| $tabsep<span><a href="javascript:;">$tabfill$img_txt{'331'}$tabfill</a></span> |
| $tabsep<span><a href="javascript:;">$tabfill$img_txt{'mycenter'}$tabfill</a></span> |
| $tabsep<span><a href="javascript:;">$tabfill$img_txt{'mycenter'}$tabfill</a></span> |
| $tabsep<span><a href="javascript:;">$tabfill$img_txt{'108'}$tabfill</a></span> |
| $tabsep<span><a href="javascript:;">$tabfill$img_txt{'108'}$tabfill</a></span> |
| $tabsep |
| $tabsep |
| </td> |
| </td> |
| <td id="tabmnrss" class="tabmenu" width="40" valign="top"></td> |
| <td id="tabmnrss" class="tabmenu" width="40" valign="top"></td> |
| <td id="tabmnright" class="tabmenuright" width="45"> </td> |
| <td id="tabmnright" class="tabmenuright" width="45"> </td> |
| <td id="tabmnbox" class="rightbox" width="160" valign="top"> |
| <td id="tabmnbox" class="rightbox" width="160" valign="top"> |
| <div style="float: left; width: 160px; height: 21px; text-align: center; padding-top: 3px; display: inline;"> |
| <div style="float: left; width: 160px; height: 21px; text-align: center; padding-top: 3px; display: inline;"> |
| <input type="text" name="search" size="16" style="font-size: 11px; vertical-align: middle;" /> |
| <input type="text" name="search" size="16" style="font-size: 11px; vertical-align: middle;" /> |
| <img src="$imagesdir/search.gif" style="border: 0; background-color: transparent; margin-right: 5px; vertical-align: middle;" /> |
| <img src="$imagesdir/search.gif" style="border: 0; background-color: transparent; margin-right: 5px; vertical-align: middle;" /> |
| </div> |
| </div> |
| </td> |
| </td> |
| </tr> |
| </tr> |
| <tr> |
| <tr> |
| <td colspan="5"><br /> </td> |
| <td colspan="5"><br /> </td> |
| </tr> |
| </tr> |
| </table> |
| </table> |
| ~; |
| ~; |
| } |
| } |
| if ($containerstyle) { |
| if ($containerstyle) { |
| $viewstyle .= qq~ |
| $viewstyle .= qq~ |
| $templ_txt{'64'} |
| $templ_txt{'64'} |
| <br /><br /> |
| <br /><br /> |
| ~; |
| ~; |
| } |
| } |
| if ($bodycontainerstyle) { |
| if ($bodycontainerstyle) { |
| $viewstyle .= qq~<div class="bodycontainer">~; |
| $viewstyle .= qq~<div class="bodycontainer">~; |
| } |
| } |
| if ($seperatorstyle) { |
| if ($seperatorstyle) { |
| $viewstyle .= qq~<div class="seperator">~; |
| $viewstyle .= qq~<div class="seperator">~; |
| } |
| } |
| if ($istabbed) { |
| if ($istabbed) { |
| $viewstyle .= qq~ |
| $viewstyle .= qq~ |
| <table cellpadding="0" cellspacing="0" border="0" width="100%" class="bordercolor"> |
| <table cellpadding="0" cellspacing="0" border="0" width="100%" class="bordercolor"> |
| <tr> |
| <tr> |
| <td class="tabtitle" width="1%" height="25" align="left" valign="middle"> |
| <td class="tabtitle" width="1%" height="25" align="left" valign="middle"> |
| |
| |
| </td> |
| </td> |
| <td class="tabtitle" width="49%" height="25" align="left" valign="middle"> |
| <td class="tabtitle" width="49%" height="25" align="left" valign="middle"> |
| $templ_txt{'tabtitle'} |
| $templ_txt{'tabtitle'} |
| </td> |
| </td> |
| <td class="tabtitle" width="50%" height="25" align="left" valign="middle"> |
| <td class="tabtitle" width="50%" height="25" align="left" valign="middle"> |
| <a href="javascript:;">$templ_txt{'tabtitlea'}</a> |
| <a href="javascript:;">$templ_txt{'tabtitlea'}</a> |
| </td> |
| </td> |
| </tr> |
| </tr> |
| </table> |
| </table> |
| <br /> |
| <br /> |
| ~; |
| ~; |
| } |
| } |
| $viewstyle .= qq~ |
| $viewstyle .= qq~ |
| <table class="bordercolor" cellpadding="4" cellspacing="1" border="0" width="100%"> |
| <table class="bordercolor" cellpadding="4" cellspacing="1" border="0" width="100%"> |
| <tr> |
| <tr> |
| <td id="title" class="titlebg" width="50%" align="left" valign="middle"> |
| <td id="title" class="titlebg" width="50%" align="left" valign="middle"> |
| $templ_txt{'30'} |
| $templ_txt{'30'} |
| </td> |
| </td> |
| <td id="titlea" class="titlebg" width="50%" align="left" valign="middle"> |
| <td id="titlea" class="titlebg" width="50%" align="left" valign="middle"> |
| <a href="javascript:;">$templ_txt{'30a'}</a> |
| <a href="javascript:;">$templ_txt{'30a'}</a> |
| </td> |
| </td> |
| </tr> |
| </tr> |
| </table> |
| </table> |
| ~; |
| ~; |
| if ($seperatorstyle) { |
| if ($seperatorstyle) { |
| $viewstyle .= qq~</div>~; |
| $viewstyle .= qq~</div>~; |
| } |
| } |
| $viewstyle .= qq~ |
| $viewstyle .= qq~ |
| <br /> |
| <br /> |
| ~; |
| ~; |
| if ($seperatorstyle) { |
| if ($seperatorstyle) { |
| $viewstyle .= qq~<div class="seperator">~; |
| $viewstyle .= qq~<div class="seperator">~; |
| } |
| } |
| $viewstyle .= qq~ |
| $viewstyle .= qq~ |
| <table class="bordercolor" cellpadding="4" cellspacing="1" border="0" width="100%"> |
| <table class="bordercolor" cellpadding="4" cellspacing="1" border="0" width="100%"> |
| <tr> |
| <tr> |
| <td id="category" class="catbg" width="50%" align="left" valign="middle"> |
| <td id="category" class="catbg" width="50%" align="left" valign="middle"> |
| $templ_txt{'31'} |
| $templ_txt{'31'} |
| </td> |
| </td> |
| <td id="categorya" class="catbg" width="50%" align="left" valign="middle"> |
| <td id="categorya" class="catbg" width="50%" align="left" valign="middle"> |
| <a href="javascript:;">$templ_txt{'31a'}</a> |
| <a href="javascript:;">$templ_txt{'31a'}</a> |
| </td> |
| </td> |
| </tr> |
| </tr> |
| </table> |
| </table> |
| |
| |
| <table class="bordercolor" cellpadding="4" cellspacing="1" border="0" width="100%"> |
| <table class="bordercolor" cellpadding="4" cellspacing="1" border="0" width="100%"> |
| <tr> |
| <tr> |
| <td id="window1" class="windowbg" align="left" valign="top"> |
| <td id="window1" class="windowbg" align="left" valign="top"> |
| $templ_txt{'32'} |
| $templ_txt{'32'} |
| </td> |
| </td> |
| <td id="window2" class="windowbg2" align="left" valign="top"> |
| <td id="window2" class="windowbg2" align="left" valign="top"> |
| $templ_txt{'33'}<br /> |
| $templ_txt{'33'}<br /> |
| <hr class="hr"> |
| <hr class="hr"> |
| <div id="messages" class="message">$templ_txt{'65'}</div> |
| <div id="messages" class="message">$templ_txt{'65'}</div> |
| <div id="messagesa" class="message"><a href="javascript:;">$templ_txt{'66'}</a><br /><br /></div> |
| <div id="messagesa" class="message"><a href="javascript:;">$templ_txt{'66'}</a><br /><br /></div> |
| <textarea rows="4" cols="19">$templ_txt{'35'}</textarea><br /> |
| <textarea rows="4" cols="19">$templ_txt{'35'}</textarea><br /> |
| <input type="text" size="19" value="$templ_txt{'34a'}" /> |
| <input type="text" size="19" value="$templ_txt{'34a'}" /> |
| <select value="test"> |
| <select value="test"> |
| <option>$templ_txt{'36'} $templ_txt{'61'}</option> |
| <option>$templ_txt{'36'} $templ_txt{'61'}</option> |
| <option>$templ_txt{'36'} 2</option> |
| <option>$templ_txt{'36'} 2</option> |
| </select> |
| </select> |
| <input type="button" value="$templ_txt{'34b'}" class="button" /> |
| <input type="button" value="$templ_txt{'34b'}" class="button" /> |
| </td> |
| </td> |
| </tr> |
| </tr> |
| <tr> |
| <tr> |
| <td id="window1" class="windowbg" align="left" valign="top"> |
| <td id="window1" class="windowbg" align="left" valign="top"> |
| |
| |
| </td> |
| </td> |
| <td id="window2" class="windowbg2" align="left" valign="top"> |
| <td id="window2" class="windowbg2" align="left" valign="top"> |
| $aquote |
| $aquote |
| $acode |
| $acode |
| $aedit<br /> |
| $aedit<br /> |
| $ahighlight |
| $ahighlight |
| </td> |
| </td> |
| </tr> |
| </tr> |
| </table> |
| </table> |
| ~; |
| ~; |
| if ($seperatorstyle) { |
| if ($seperatorstyle) { |
| $viewstyle .= qq~</div>~; |
| $viewstyle .= qq~</div>~; |
| } |
| } |
| if ($bodycontainerstyle) { |
| if ($bodycontainerstyle) { |
| $viewstyle .= qq~</div>~; |
| $viewstyle .= qq~</div>~; |
| } |
| } |
| if($istabbed) { |
| if($istabbed) { |
| $viewstyle .= qq~ |
| $viewstyle .= qq~ |
| <br /> |
| <br /> |
| <div class="mainbottom"> |
| <div class="mainbottom"> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <tr> |
| <td class="nav" height="22" width="100%" align="left"> </td> |
| <td class="nav" height="22" width="100%" align="left"> </td> |
| </tr> |
| </tr> |
| </table> |
| </table> |
| </div> |
| </div> |
| ~; |
| ~; |
| } |
| } |
| if ($containerstyle) { |
| if ($containerstyle) { |
| $viewstyle .= qq~</div>~; |
| $viewstyle .= qq~</div>~; |
| } |
| } |
| $viewstyle .= qq~ |
| $viewstyle .= qq~ |
| <br /><br /> |
| <br /><br /> |
| </div> |
| </div> |
| </body> |
| </body> |
| </html>~; |
| </html>~; |
| |
| |
| $viewstylestart =~ s~[\n\r]~~g; |
| $viewstylestart =~ s~[\n\r]~~g; |
| &ToHTML($viewstylestart); |
| &ToHTML($viewstylestart); |
| $stylestr =~ s~[\n\r]~~g; |
| $stylestr =~ s~[\n\r]~~g; |
| &ToHTML($stylestr); |
| &ToHTML($stylestr); |
| $viewstyle =~ s~[\n\r]~~g; |
| $viewstyle =~ s~[\n\r]~~g; |
| &ToHTML($viewstyle); |
| &ToHTML($viewstyle); |
| |
| |
| $yymain .= qq~ |
| $yymain .= qq~ |
| <tr valign="middle"> |
| <tr valign="middle"> |
| <td align="left" class="windowbg2"> |
| <td align="left" class="windowbg2"> |
| <input type="hidden" name="stylestart" value="$viewstylestart" /> |
| <input type="hidden" name="stylestart" value="$viewstylestart" /> |
| <input type="hidden" name="stylelink" value="$stylestr" /> |
| <input type="hidden" name="stylelink" value="$stylestr" /> |
| <input type="hidden" name="stylebody" value="$viewstyle" /> |
| <input type="hidden" name="stylebody" value="$viewstyle" /> |
| <div style="float: left; width: 30%; padding: 3px;"><label for="savecssas"><b>$templ_txt{'12'}</b></label></div> |
| <div style="float: left; width: 30%; padding: 3px;"><label for="savecssas"><b>$templ_txt{'12'}</b></label></div> |
| <div style="float: left; width: 69%;"> |
| <div style="float: left; width: 69%;"> |
| <input type="text" name="savecssas" id="savecssas" value="~ . (split(/\./, $cssfile))[0] . qq~" size="30" maxlength="30" /> |
| <input type="text" name="savecssas" id="savecssas" value="~ . (split(/\./, $cssfile))[0] . qq~" size="30" maxlength="30" /> |
| <input type="submit" value="$templ_txt{'13'}" onclick="document.allstyles.button.value = '2';" class="button" /> |
| <input type="submit" value="$templ_txt{'13'}" onclick="document.allstyles.button.value = '2';" class="button" /> |
| </div> |
| </div> |
| </td> |
| </td> |
| </tr> |
| </tr> |
| </table> |
| </table> |
| </form> |
| </form> |
| </div> |
| </div> |
| |
| |
| <script type="text/javascript" language="JavaScript"> |
| <script type="text/javascript" language="JavaScript"> |
| <!-- |
| <!-- |
| var cssbold; |
| var cssbold; |
| var cssitalic; |
| var cssitalic; |
| var stylesurl = '$forumstylesurl'; |
| var stylesurl = '$forumstylesurl'; |
| |
| |
| function initStyles() { |
| function initStyles() { |
| var thestylestart = document.allstyles.stylestart.value; |
| var thestylestart = document.allstyles.stylestart.value; |
| var thestyles = document.allstyles.stylelink.value; |
| var thestyles = document.allstyles.stylelink.value; |
| var thestylebody = document.allstyles.stylebody.value; |
| var thestylebody = document.allstyles.stylebody.value; |
| var thestyle = thestylestart + '\\<style type="text/css"\\>\\<\\!\\-\\-' + thestyles + '\\-\\-\\>\\<\\/style\\>' + thestylebody; |
| var thestyle = thestylestart + '\\<style type="text/css"\\>\\<\\!\\-\\-' + thestyles + '\\-\\-\\>\\<\\/style\\>' + thestylebody; |
| thestyle=thestyle.replace(/\\"\\;/g, '"'); |
| thestyle=thestyle.replace(/\\"\\;/g, '"'); |
| thestyle=thestyle.replace(/\\ \\;/g, " "); |
| thestyle=thestyle.replace(/\\ \\;/g, " "); |
| thestyle=thestyle.replace(/\\&\\#124\\;/g, "|"); |
| thestyle=thestyle.replace(/\\&\\#124\\;/g, "|"); |
| thestyle=thestyle.replace(/\\<\\;/g, "<"); |
| thestyle=thestyle.replace(/\\<\\;/g, "<"); |
| thestyle=thestyle.replace(/\\>\\;/g, ">"); |
| thestyle=thestyle.replace(/\\>\\;/g, ">"); |
| thestyle=thestyle.replace(/\\&\\;/g, "&"); |
| thestyle=thestyle.replace(/\\&\\;/g, "&"); |
| thestyle=thestyle.replace(/(url\\(\\")(.*?\\/.*?\\"\\))/gi, "\$1" + stylesurl + "\/\$2"); |
| thestyle=thestyle.replace(/(url\\(\\")(.*?\\/.*?\\"\\))/gi, "\$1" + stylesurl + "\/\$2"); |
| StyleManager.document.open("text/html"); |
| StyleManager.document.open("text/html"); |
| StyleManager.document.write(thestyle); |
| StyleManager.document.write(thestyle); |
| StyleManager.document.close(); |
| StyleManager.document.close(); |
| } |
| } |
| |
| |
| function updateStyles() { |
| function updateStyles() { |
| var currentTop = document.getElementById('StyleManager').contentWindow.document.documentElement.scrollTop; |
| var currentTop = document.getElementById('StyleManager').contentWindow.document.documentElement.scrollTop; |
| initStyles(); |
| initStyles(); |
| document.getElementById('StyleManager').contentWindow.document.documentElement.scrollTop = currentTop; |
| document.getElementById('StyleManager').contentWindow.document.documentElement.scrollTop = currentTop; |
| } |
| } |
| |
| |
| function previewColor(thecolor) { |
| function previewColor(thecolor) { |
| thenewstyle = document.allstyles.stylelink.value; |
| thenewstyle = document.allstyles.stylelink.value; |
| cssoption = document.allstyles.csselement.options[document.allstyles.csselement.selectedIndex].value; |
| cssoption = document.allstyles.csselement.options[document.allstyles.csselement.selectedIndex].value; |
| var cssfont = document.allstyles.selopt1; |
| var cssfont = document.allstyles.selopt1; |
| var cssback = document.allstyles.selopt2; |
| var cssback = document.allstyles.selopt2; |
| var cssborder = document.allstyles.selopt3; |
| var cssborder = document.allstyles.selopt3; |
| if(cssfont.checked) { |
| if(cssfont.checked) { |
| newcssoption=cssoption.replace(/( color\\s*?\\:).+?(\\;)/i, "\$1 " + thecolor + "\$2"); |
| newcssoption=cssoption.replace(/( color\\s*?\\:).+?(\\;)/i, "\$1 " + thecolor + "\$2"); |
| document.allstyles.textcol.value = thecolor; |
| document.allstyles.textcol.value = thecolor; |
| if(cssoption.match(/\\#container\\s*?\\{/)) { |
| if(cssoption.match(/\\#container\\s*?\\{/)) { |
| thenewstyle=thenewstyle.replace(/(\\.tabmenu span a\\s*?\\{.*?color\\s*?\\:).+?(\\;)/ig, "\$1 " + thecolor + "\$2"); |
| thenewstyle=thenewstyle.replace(/(\\.tabmenu span a\\s*?\\{.*?color\\s*?\\:).+?(\\;)/ig, "\$1 " + thecolor + "\$2"); |
| } |
| } |
| } |
| } |
| if(cssback.checked) { |
| if(cssback.checked) { |
| newcssoption=cssoption.replace(/(background-color\\s*?\\:).+?(\\;)/i, "\$1 " + thecolor + "\$2"); |
| newcssoption=cssoption.replace(/(background-color\\s*?\\:).+?(\\;)/i, "\$1 " + thecolor + "\$2"); |
| document.allstyles.backcol.value = thecolor; |
| document.allstyles.backcol.value = thecolor; |
| if(cssoption.match(/\\#container\\s*?\\{/)) { |
| if(cssoption.match(/\\#container\\s*?\\{/)) { |
| thenewstyle=thenewstyle.replace(/(\\.tabmenu.*?\\{.*?background-color\\s*?\\:).+?(\\;)/ig, "\$1 " + thecolor + "\$2"); |
| thenewstyle=thenewstyle.replace(/(\\.tabmenu.*?\\{.*?background-color\\s*?\\:).+?(\\;)/ig, "\$1 " + thecolor + "\$2"); |
| thenewstyle=thenewstyle.replace(/(\\.menutop.*?\\{.*?background-color\\s*?\\:).+?(\\;)/ig, "\$1 " + thecolor + "\$2"); |
| thenewstyle=thenewstyle.replace(/(\\.menutop.*?\\{.*?background-color\\s*?\\:).+?(\\;)/ig, "\$1 " + thecolor + "\$2"); |
| thenewstyle=thenewstyle.replace(/(\\.mainbottom.*?\\{.*?background-color\\s*?\\:).+?(\\;)/ig, "\$1 " + thecolor + "\$2"); |
| thenewstyle=thenewstyle.replace(/(\\.mainbottom.*?\\{.*?background-color\\s*?\\:).+?(\\;)/ig, "\$1 " + thecolor + "\$2"); |
| thenewstyle=thenewstyle.replace(/(\\.rightbox.*?\\{.*?background-color\\s*?\\:).+?(\\;)/ig, "\$1 " + thecolor + "\$2"); |
| thenewstyle=thenewstyle.replace(/(\\.rightbox.*?\\{.*?background-color\\s*?\\:).+?(\\;)/ig, "\$1 " + thecolor + "\$2"); |
| } |
| } |
| } |
| } |
| if(cssborder.checked) { |
| if(cssborder.checked) { |
| tempnewcolor=cssoption; |
| tempnewcolor=cssoption; |
| |
| |
| if(tempnewcolor.match(/border\\s*?\\:/)) { |
| if(tempnewcolor.match(/border\\s*?\\:/)) { |
| bordercol=tempnewcolor.replace(/.*?border\\s*?\\:(.+?)\\;.*/, "\$1"); |
| bordercol=tempnewcolor.replace(/.*?border\\s*?\\:(.+?)\\;.*/, "\$1"); |
| if(bordercol.match(/\\#[0-9a-f]{3,6}/i)) { |
| if(bordercol.match(/\\#[0-9a-f]{3,6}/i)) { |
| tempnewcolor=tempnewcolor.replace(/(border\\s*?\\:.*?)\\#[0-9a-f]{3,6}(.*?\\;)/i, "\$1 " + thecolor + "\$2"); |
| tempnewcolor=tempnewcolor.replace(/(border\\s*?\\:.*?)\\#[0-9a-f]{3,6}(.*?\\;)/i, "\$1 " + thecolor + "\$2"); |
| viewnewcolor=tempnewcolor.replace(/.*?border\\s*?\\:(.*?)\\;.*/i, "\$1"); |
| viewnewcolor=tempnewcolor.replace(/.*?border\\s*?\\:(.*?)\\;.*/i, "\$1"); |
| } |
| } |
| } |
| } |
| if(tempnewcolor.match(/border\\-top\\s*?\\:/)) { |
| if(tempnewcolor.match(/border\\-top\\s*?\\:/)) { |
| bordertopcol=tempnewcolor.replace(/.*?border\\-top\\s*?\\:(.+?)\\;.*/, "\$1"); |
| bordertopcol=tempnewcolor.replace(/.*?border\\-top\\s*?\\:(.+?)\\;.*/, "\$1"); |
| if(bordertopcol.match(/\\#[0-9a-f]{3,6}/i)) { |
| if(bordertopcol.match(/\\#[0-9a-f]{3,6}/i)) { |
| tempnewcolor=tempnewcolor.replace(/(border\\-top\\s*?\\:.*?)\\#[0-9a-f]{3,6}(.*?\\;)/i, "\$1 " + thecolor + "\$2"); |
| tempnewcolor=tempnewcolor.replace(/(border\\-top\\s*?\\:.*?)\\#[0-9a-f]{3,6}(.*?\\;)/i, "\$1 " + thecolor + "\$2"); |
| viewnewcolor=tempnewcolor.replace(/.*?border\\-top\\s*?\\:(.*?)\\;.*/i, "\$1"); |
| viewnewcolor=tempnewcolor.replace(/.*?border\\-top\\s*?\\:(.*?)\\;.*/i, "\$1"); |
| } |
| } |
| } |
| } |
| if(tempnewcolor.match(/border\\-bottom\\s*?\\:/)) { |
| if(tempnewcolor.match(/border\\-bottom\\s*?\\:/)) { |
| borderbottomcol=tempnewcolor.replace(/.*?border\\-bottom\\s*?\\:(.+?)\\;.*/, "\$1"); |
| borderbottomcol=tempnewcolor.replace(/.*?border\\-bottom\\s*?\\:(.+?)\\;.*/, "\$1"); |
| if(borderbottomcol.match(/\\#[0-9a-f]{3,6}/i)) { |
| if(borderbottomcol.match(/\\#[0-9a-f]{3,6}/i)) { |
| tempnewcolor=tempnewcolor.replace(/(border\\-bottom\\s*?\\:.*?)\\#[0-9a-f]{3,6}(.*?\\;)/i, "\$1 " + thecolor + "\$2"); |
| tempnewcolor=tempnewcolor.replace(/(border\\-bottom\\s*?\\:.*?)\\#[0-9a-f]{3,6}(.*?\\;)/i, "\$1 " + thecolor + "\$2"); |
| viewnewcolor=tempnewcolor.replace(/.*?border\\-bottom\\s*?\\:(.*?)\\;.*/i, "\$1"); |
| viewnewcolor=tempnewcolor.replace(/.*?border\\-bottom\\s*?\\:(.*?)\\;.*/i, "\$1"); |
| } |
| } |
| } |
| } |
| if(tempnewcolor.match(/border\\-left\\s*?\\:/)) { |
| if(tempnewcolor.match(/border\\-left\\s*?\\:/)) { |
| borderleftcol=tempnewcolor.replace(/.*?border\\-left\\s*?\\:(.+?)\\;.*/, "\$1"); |
| borderleftcol=tempnewcolor.replace(/.*?border\\-left\\s*?\\:(.+?)\\;.*/, "\$1"); |
| if(borderleftcol.match(/\\#[0-9a-f]{3,6}/i)) { |
| if(borderleftcol.match(/\\#[0-9a-f]{3,6}/i)) { |
| tempnewcolor=tempnewcolor.replace(/(border\\-left\\s*?\\:.*?)\\#[0-9a-f]{3,6}(.*?\\;)/i, "\$1 " + thecolor + "\$2"); |
| tempnewcolor=tempnewcolor.replace(/(border\\-left\\s*?\\:.*?)\\#[0-9a-f]{3,6}(.*?\\;)/i, "\$1 " + thecolor + "\$2"); |
| viewnewcolor=tempnewcolor.replace(/.*?border\\-left\\s*?\\:(.*?)\\;.*/i, "\$1"); |
| viewnewcolor=tempnewcolor.replace(/.*?border\\-left\\s*?\\:(.*?)\\;.*/i, "\$1"); |
| } |
| } |
| } |
| } |
| if(tempnewcolor.match(/border\\-right\\s*?\\:/)) { |
| if(tempnewcolor.match(/border\\-right\\s*?\\:/)) { |
| borderrightcol=tempnewcolor.replace(/.*?border\\-right\\s*?\\:(.+?)\\;.*/, "\$1"); |
| borderrightcol=tempnewcolor.replace(/.*?border\\-right\\s*?\\:(.+?)\\;.*/, "\$1"); |
| if(borderrightcol.match(/\\#[0-9a-f]{3,6}/i)) { |
| if(borderrightcol.match(/\\#[0-9a-f]{3,6}/i)) { |
| tempnewcolor=tempnewcolor.replace(/(border\\-right\\s*?\\:.*?)\\#[0-9a-f]{3,6}(.*?\\;)/i, "\$1 " + thecolor + "\$2"); |
| tempnewcolor=tempnewcolor.replace(/(border\\-right\\s*?\\:.*?)\\#[0-9a-f]{3,6}(.*?\\;)/i, "\$1 " + thecolor + "\$2"); |
| viewnewcolor=tempnewcolor.replace(/.*?border\\-right\\s*?\\:(.*?)\\;.*/i, "\$1"); |
| viewnewcolor=tempnewcolor.replace(/.*?border\\-right\\s*?\\:(.*?)\\;.*/i, "\$1"); |
| } |
| } |
| } |
| } |
| newcssoption=tempnewcolor; |
| newcssoption=tempnewcolor; |
| nocolor=viewnewcolor.replace(/(.*?)\\#[0-9a-f]{3,6}(.*)/i, "\$1\$2"); |
| nocolor=viewnewcolor.replace(/(.*?)\\#[0-9a-f]{3,6}(.*)/i, "\$1\$2"); |
| theborderstyle=viewnewcolor.replace(/(.*?)(solid|dashed|dotted|double|groove|ridge|inset|outset)(.*)/i, "\$2"); |
| theborderstyle=viewnewcolor.replace(/(.*?)(solid|dashed|dotted|double|groove|ridge|inset|outset)(.*)/i, "\$2"); |
| thebordersize=nocolor.replace(/.*?([\\d]{1,2}).*/i, "\$1"); |
| thebordersize=nocolor.replace(/.*?([\\d]{1,2}).*/i, "\$1"); |
| document.allstyles.bordcol.value = thecolor; |
| document.allstyles.bordcol.value = thecolor; |
| } |
| } |
| document.allstyles.csselement.options[document.allstyles.csselement.selectedIndex].value = newcssoption; |
| document.allstyles.csselement.options[document.allstyles.csselement.selectedIndex].value = newcssoption; |
| re=cssoption.replace(/(.*)/, "\$1"); |
| re=cssoption.replace(/(.*)/, "\$1"); |
| thenewstyle=thenewstyle.replace(re, newcssoption); |
| thenewstyle=thenewstyle.replace(re, newcssoption); |
| document.allstyles.stylelink.value = thenewstyle; |
| document.allstyles.stylelink.value = thenewstyle; |
| updateStyles(); |
| updateStyles(); |
| } |
| } |
| |
| |
| function previewBorder() { |
| function previewBorder() { |
| thenewstyle = document.allstyles.stylelink.value; |
| thenewstyle = document.allstyles.stylelink.value; |
| cssoption = document.allstyles.csselement.options[document.allstyles.csselement.selectedIndex].value; |
| cssoption = document.allstyles.csselement.options[document.allstyles.csselement.selectedIndex].value; |
| var cssborder = document.allstyles.selopt3; |
| var cssborder = document.allstyles.selopt3; |
| var thebweigth = document.allstyles.borderweigth.value; |
| var thebweigth = document.allstyles.borderweigth.value; |
| var thebcolor = document.allstyles.bordcol.value; |
| var thebcolor = document.allstyles.bordcol.value; |
| var thebstyle = document.allstyles.borderstyle.value; |
| var thebstyle = document.allstyles.borderstyle.value; |
| var thecolor = thebweigth + 'px ' + thebcolor + ' ' + thebstyle; |
| var thecolor = thebweigth + 'px ' + thebcolor + ' ' + thebstyle; |
| if(cssborder.checked) { |
| if(cssborder.checked) { |
| tempnewcolor=cssoption; |
| tempnewcolor=cssoption; |
| if(tempnewcolor.match(/border\\s*?\\:/)) { |
| if(tempnewcolor.match(/border\\s*?\\:/)) { |
| bordercol=tempnewcolor.replace(/.*?border\\s*?\\:(.+?)\\;.*/, "\$1"); |
| bordercol=tempnewcolor.replace(/.*?border\\s*?\\:(.+?)\\;.*/, "\$1"); |
| if(bordercol.match(/\\#[0-9a-f]{3,6}/i)) { |
| if(bordercol.match(/\\#[0-9a-f]{3,6}/i)) { |
| tempnewcolor=tempnewcolor.replace(/(border\\s*?\\:).*?\\#[0-9a-f]{3,6}.*?(\\;)/i, "\$1 " + thecolor + "\$2"); |
| tempnewcolor=tempnewcolor.replace(/(border\\s*?\\:).*?\\#[0-9a-f]{3,6}.*?(\\;)/i, "\$1 " + thecolor + "\$2"); |
| viewnewcolor=tempnewcolor.replace(/.*?border\\s*?\\:(.*?)\\;.*/i, "\$1"); |
| viewnewcolor=tempnewcolor.replace(/.*?border\\s*?\\:(.*?)\\;.*/i, "\$1"); |
| } |
| } |
| } |
| } |
| if(tempnewcolor.match(/border\\-top\\s*?\\:/)) { |
| if(tempnewcolor.match(/border\\-top\\s*?\\:/)) { |
| bordertopcol=tempnewcolor.replace(/.*?border\\-top\\s*?\\:(.+?)\\;.*/, "\$1"); |
| bordertopcol=tempnewcolor.replace(/.*?border\\-top\\s*?\\:(.+?)\\;.*/, "\$1"); |
| if(bordertopcol.match(/\\#[0-9a-f]{3,6}/i)) { |
| if(bordertopcol.match(/\\#[0-9a-f]{3,6}/i)) { |
| tempnewcolor=tempnewcolor.replace(/(border\\-top\\s*?\\:).*?\\#[0-9a-f]{3,6}.*?(\\;)/i, "\$1 " + thecolor + "\$2"); |
| tempnewcolor=tempnewcolor.replace(/(border\\-top\\s*?\\:).*?\\#[0-9a-f]{3,6}.*?(\\;)/i, "\$1 " + thecolor + "\$2"); |
| viewnewcolor=tempnewcolor.replace(/.*?border\\-top\\s*?\\:(.*?)\\;.*/i, "\$1"); |
| viewnewcolor=tempnewcolor.replace(/.*?border\\-top\\s*?\\:(.*?)\\;.*/i, "\$1"); |
| } |
| } |
| } |
| } |
| if(tempnewcolor.match(/border\\-bottom\\s*?\\:/)) { |
| if(tempnewcolor.match(/border\\-bottom\\s*?\\:/)) { |
| borderbottomcol=tempnewcolor.replace(/.*?border\\-bottom\\s*?\\:(.+?)\\;.*/, "\$1"); |
| borderbottomcol=tempnewcolor.replace(/.*?border\\-bottom\\s*?\\:(.+?)\\;.*/, "\$1"); |
| if(borderbottomcol.match(/\\#[0-9a-f]{3,6}/i)) { |
| if(borderbottomcol.match(/\\#[0-9a-f]{3,6}/i)) { |
| tempnewcolor=tempnewcolor.replace(/(border\\-bottom\\s*?\\:).*?\\#[0-9a-f]{3,6}.*?(\\;)/i, "\$1 " + thecolor + "\$2"); |
| tempnewcolor=tempnewcolor.replace(/(border\\-bottom\\s*?\\:).*?\\#[0-9a-f]{3,6}.*?(\\;)/i, "\$1 " + thecolor + "\$2"); |
| viewnewcolor=tempnewcolor.replace(/.*?border\\-bottom\\s*?\\:(.*?)\\;.*/i, "\$1"); |
| viewnewcolor=tempnewcolor.replace(/.*?border\\-bottom\\s*?\\:(.*?)\\;.*/i, "\$1"); |
| } |
| } |
| } |
| } |
| if(tempnewcolor.match(/border\\-left\\s*?\\:/)) { |
| if(tempnewcolor.match(/border\\-left\\s*?\\:/)) { |
| borderleftcol=tempnewcolor.replace(/.*?border\\-left\\s*?\\:(.+?)\\;.*/, "\$1"); |
| borderleftcol=tempnewcolor.replace(/.*?border\\-left\\s*?\\:(.+?)\\;.*/, "\$1"); |
| if(borderleftcol.match(/\\#[0-9a-f]{3,6}/i)) { |
| if(borderleftcol.match(/\\#[0-9a-f]{3,6}/i)) { |
| tempnewcolor=tempnewcolor.replace(/(border\\-left\\s*?\\:).*?\\#[0-9a-f]{3,6}.*?(\\;)/i, "\$1 " + thecolor + "\$2"); |
| tempnewcolor=tempnewcolor.replace(/(border\\-left\\s*?\\:).*?\\#[0-9a-f]{3,6}.*?(\\;)/i, "\$1 " + thecolor + "\$2"); |
| viewnewcolor=tempnewcolor.replace(/.*?border\\-left\\s*?\\:(.*?)\\;.*/i, "\$1"); |
| viewnewcolor=tempnewcolor.replace(/.*?border\\-left\\s*?\\:(.*?)\\;.*/i, "\$1"); |
| } |
| } |
| } |
| } |
| if(tempnewcolor.match(/border\\-right\\s*?\\:/)) { |
| if(tempnewcolor.match(/border\\-right\\s*?\\:/)) { |
| borderrightcol=tempnewcolor.replace(/.*?border\\-right\\s*?\\:(.+?)\\;.*/, "\$1"); |
| borderrightcol=tempnewcolor.replace(/.*?border\\-right\\s*?\\:(.+?)\\;.*/, "\$1"); |
| if(borderrightcol.match(/\\#[0-9a-f]{3,6}/i)) { |
| if(borderrightcol.match(/\\#[0-9a-f]{3,6}/i)) { |
| tempnewcolor=tempnewcolor.replace(/(border\\-right\\s*?\\:).*?\\#[0-9a-f]{3,6}.*?(\\;)/i, "\$1 " + thecolor + "\$2"); |
| tempnewcolor=tempnewcolor.replace(/(border\\-right\\s*?\\:).*?\\#[0-9a-f]{3,6}.*?(\\;)/i, "\$1 " + thecolor + "\$2"); |
| viewnewcolor=tempnewcolor.replace(/.*?border\\-right\\s*?\\:(.*?)\\;.*/i, "\$1") |