aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/adm
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/adm')
-rw-r--r--phpBB/adm/style/acp_attachments.html5
-rw-r--r--phpBB/adm/style/acp_ban.html12
-rw-r--r--phpBB/adm/style/acp_database.html4
-rw-r--r--phpBB/adm/style/acp_email.html2
-rw-r--r--phpBB/adm/style/acp_forums.html27
-rw-r--r--phpBB/adm/style/acp_groups.html4
-rw-r--r--phpBB/adm/style/acp_icons.html9
-rw-r--r--phpBB/adm/style/acp_modules.html7
-rw-r--r--phpBB/adm/style/acp_permission_roles.html4
-rw-r--r--phpBB/adm/style/acp_permissions.html10
-rw-r--r--phpBB/adm/style/acp_prune_users.html2
-rw-r--r--phpBB/adm/style/acp_ranks.html6
-rw-r--r--phpBB/adm/style/acp_search.html8
-rw-r--r--phpBB/adm/style/acp_styles.html73
-rw-r--r--phpBB/adm/style/acp_users.html2
-rw-r--r--phpBB/adm/style/acp_users_overview.html6
-rw-r--r--phpBB/adm/style/acp_users_prefs.html8
-rw-r--r--phpBB/adm/style/acp_users_signature.html23
-rw-r--r--phpBB/adm/style/colour_swatch.html4
-rw-r--r--phpBB/adm/style/install_update.html22
-rw-r--r--phpBB/adm/style/install_update_diff.html4
-rw-r--r--phpBB/adm/style/overall_header.html34
-rw-r--r--phpBB/adm/style/permission_mask.html6
-rw-r--r--phpBB/adm/style/progress_bar.html8
-rw-r--r--phpBB/adm/style/simple_header.html37
-rw-r--r--phpBB/adm/swatch.php11
26 files changed, 160 insertions, 178 deletions
diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html
index 36d8f24f32..950e9bb6f9 100644
--- a/phpBB/adm/style/acp_attachments.html
+++ b/phpBB/adm/style/acp_attachments.html
@@ -117,8 +117,7 @@
<!-- IF S_EDIT_GROUP -->
<script type="text/javascript" defer="defer">
- <!--
-
+ // <![CDATA[
function update_image(newimage)
{
if (newimage == 'no_image')
@@ -163,7 +162,7 @@
}
}
- //-->
+ // ]]>
</script>
<form id="extgroups" method="post" action="{U_ACTION}">
diff --git a/phpBB/adm/style/acp_ban.html b/phpBB/adm/style/acp_ban.html
index e371d48bfc..8dd771f7fa 100644
--- a/phpBB/adm/style/acp_ban.html
+++ b/phpBB/adm/style/acp_ban.html
@@ -9,24 +9,24 @@
<p>{L_EXPLAIN}</p>
<script type="text/javascript">
-<!--
+// <![CDATA[
var ban_length = new Array();
ban_length[-1] = '';
<!-- BEGIN ban_length -->
- ban_length['{ban_length.BAN_ID}'] = "{ban_length.A_LENGTH}";
+ ban_length['{ban_length.BAN_ID}'] = '{ban_length.A_LENGTH}';
<!-- END ban_length -->
var ban_reason = new Array();
ban_reason[-1] = '';
<!-- BEGIN ban_reason -->
- ban_reason['{ban_reason.BAN_ID}'] = "{ban_reason.A_REASON}";
+ ban_reason['{ban_reason.BAN_ID}'] = '{ban_reason.A_REASON}';
<!-- END ban_reason -->
var ban_give_reason = new Array();
ban_give_reason[-1] = '';
<!-- BEGIN ban_give_reason -->
- ban_give_reason['{ban_give_reason.BAN_ID}'] = "{ban_give_reason.A_REASON}";
+ ban_give_reason['{ban_give_reason.BAN_ID}'] = '{ban_give_reason.A_REASON}';
<!-- END ban_give_reason -->
function display_details(option)
@@ -36,7 +36,7 @@
document.getElementById('acp_unban').unbanlength.value = ban_length[option];
}
-//-->
+// ]]>
</script>
<form id="acp_ban" method="post" action="{U_ACTION}">
@@ -46,7 +46,7 @@
<dl>
<dt><label for="ban">{L_BAN_CELL}:</label></dt>
<dd><textarea name="ban" cols="40" rows="3" id="ban"></textarea></dd>
- <!-- IF S_USERNAME_BAN --><dd>[ <a href="#" onclick="window.open('{U_FIND_USER}', '_phpbbsearch', 'height=500, resizable=yes, scrollbars=yes, width=740'); return false;">{L_FIND_USERNAME}</a> ]</dd><!-- ENDIF -->
+ <!-- IF S_USERNAME_BAN --><dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd><!-- ENDIF -->
</dl>
<dl>
<dt><label for="banlength">{L_BAN_LENGTH}:</label></dt>
diff --git a/phpBB/adm/style/acp_database.html b/phpBB/adm/style/acp_database.html
index d1ac03dc7b..fcb79920fc 100644
--- a/phpBB/adm/style/acp_database.html
+++ b/phpBB/adm/style/acp_database.html
@@ -33,7 +33,7 @@
<p>{L_ACP_BACKUP_EXPLAIN}</p>
<script type="text/javascript">
- <!--
+ // <![CDATA[
function selector(bool)
{
@@ -45,7 +45,7 @@
}
}
- //-->
+ // ]]>
</script>
<form id="acp_backup" method="post" action="{U_ACTION}">
diff --git a/phpBB/adm/style/acp_email.html b/phpBB/adm/style/acp_email.html
index 5744136230..b2c12c944d 100644
--- a/phpBB/adm/style/acp_email.html
+++ b/phpBB/adm/style/acp_email.html
@@ -24,7 +24,7 @@
<dl>
<dt><label for="usernames">{L_SEND_TO_USERS}:</label><br /><span>{L_SEND_TO_USERS_EXPLAIN}</span></dt>
<dd><textarea name="usernames" id="usernames" rows="5" cols="40">{USERNAMES}</textarea></dd>
- <dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(); return false;">{L_FIND_USERNAME}</a> ]</dd>
+ <dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd>
</dl>
<dl>
<dt><label for="subject">{L_SUBJECT}:</label></dt>
diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html
index 77d3c59a6f..802cd81815 100644
--- a/phpBB/adm/style/acp_forums.html
+++ b/phpBB/adm/style/acp_forums.html
@@ -5,8 +5,7 @@
<!-- IF S_EDIT_FORUM -->
<script type="text/javascript">
- <!--
-
+ // <![CDATA[
/**
* Handle displaying/hiding several options based on the forum type
*/
@@ -92,7 +91,7 @@
<!-- ENDIF -->
}
- //-->
+ // ]]>
</script>
<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
@@ -368,12 +367,11 @@
<!-- ELSEIF S_CONTINUE_SYNC -->
<script type="text/javascript">
- <!--
-
+ // <![CDATA[
var close_waitscreen = 0;
- window.open('{UA_PROGRESS_BAR}', '_sync', 'height=240, resizable=yes, scrollbars=no, width=400');
-
- //-->
+ // no scrollbars...
+ popup('{UA_PROGRESS_BAR}', 400, 240, '_sync');
+ // ]]>
</script>
<h1>{L_FORUM_ADMIN}</h1>
@@ -385,18 +383,17 @@
<!-- ELSE -->
<script type="text/javascript">
- <!--
-
+ // <![CDATA[
/**
* Popup search progress bar
*/
function popup_progress_bar()
{
var close_waitscreen = 0;
- window.open('{UA_PROGRESS_BAR}', '_sync', 'height=240, resizable=yes, scrollbars=no, width=400');
+ // no scrollbars...
+ popup('{UA_PROGRESS_BAR}', 400, 240, '_sync');
}
-
- //-->
+ // ]]>
</script>
<h1>{L_FORUM_ADMIN}</h1>
@@ -412,9 +409,9 @@
<!-- IF S_RESYNCED -->
<script type="text/javascript">
- <!--
+ // <![CDATA[
var close_waitscreen = 1;
- //-->
+ // ]]>
</script>
<div class="successbox">
diff --git a/phpBB/adm/style/acp_groups.html b/phpBB/adm/style/acp_groups.html
index a659207f9e..f1b4c4ecaa 100644
--- a/phpBB/adm/style/acp_groups.html
+++ b/phpBB/adm/style/acp_groups.html
@@ -76,7 +76,7 @@
</dl>
<dl>
<dt><label for="group_colour">{L_GROUP_COLOR}:</label><br /><span>{L_GROUP_COLOR_EXPLAIN}</span></dt>
- <dd><input name="group_colour" type="text" id="group_colour" value="{GROUP_COLOUR}" size="6" maxlength="6" />&nbsp;&nbsp;<span>[ <a href="#" onclick="swatch(); return false">{L_COLOUR_SWATCH}</a> ]</span></dd>
+ <dd><input name="group_colour" type="text" id="group_colour" value="{GROUP_COLOUR}" size="6" maxlength="6" />&nbsp;&nbsp;<span>[ <a href="{U_SWATCH}" onclick="popup(this.href, 636, 150, '_swatch'); return false">{L_COLOUR_SWATCH}</a> ]</span></dd>
</dl>
<dl>
<dt><label for="group_rank">{L_GROUP_RANK}:</label></dt>
@@ -254,7 +254,7 @@
<dl>
<dt><label for="usernames">{L_USERNAME}:</label><br /><span>{L_USERNAMES_EXPLAIN}</span></dt>
<dd><textarea id="usernames" name="usernames" cols="40" rows="5"></textarea></dd>
- <dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(); return false;">{L_FIND_USERNAME}</a> ]</dd>
+ <dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd>
</dl>
<p class="quick">
diff --git a/phpBB/adm/style/acp_icons.html b/phpBB/adm/style/acp_icons.html
index 5100de32d8..6a8db53f08 100644
--- a/phpBB/adm/style/acp_icons.html
+++ b/phpBB/adm/style/acp_icons.html
@@ -5,7 +5,7 @@
<!-- IF S_EDIT -->
<script type="text/javascript" defer="defer">
- <!--
+ // <![CDATA[
<!-- IF S_ADD_CODE -->
var smiley = Array();
@@ -22,7 +22,7 @@
{
var use_element = smiley[newimage];
- document.getElementById('add_image_src').src = '{PHPBB_ROOT_PATH}{IMG_PATH}/' + newimage;
+ document.getElementById('add_image_src').src = '{PHPBB_ROOT_PATH}{IMG_PATH}/' + encodeURI(newimage);
document.getElementById('add_code').value = use_element['code'];
document.getElementById('add_emotion').value = use_element['emotion'];
document.getElementById('add_width').value = use_element['width'];
@@ -60,10 +60,9 @@
nodisp.className = '';
}
}
- //-->
+ // ]]>
</script>
-
<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
<h1>{L_TITLE}</h1>
@@ -112,7 +111,7 @@
<td><input class="text post" type="text" size="3" name="width[{items.IMG}]" value="{items.WIDTH}" /></td>
<td><input class="text post" type="text" size="3" name="height[{items.IMG}]" value="{items.HEIGHT}" /></td>
<td>
- <input type="checkbox" class="radio" name="display_on_posting[{items.IMG}]"{items.POSTING_CHECKED} onclick="toggle_select('{items.IMG}', this.checked, 'order[{items.IMG}]');"/>
+ <input type="checkbox" class="radio" name="display_on_posting[{items.IMG}]"{items.POSTING_CHECKED} onclick="toggle_select('{items.A_IMG}', this.checked, 'order[{items.A_IMG}]');"/>
<!-- IF items.S_ID -->
<input type="hidden" name="id[{items.IMG}]" value="{items.ID}" />
<!-- ENDIF -->
diff --git a/phpBB/adm/style/acp_modules.html b/phpBB/adm/style/acp_modules.html
index 3fafd1288b..cae5781c8d 100644
--- a/phpBB/adm/style/acp_modules.html
+++ b/phpBB/adm/style/acp_modules.html
@@ -5,8 +5,7 @@
<!-- IF S_EDIT_MODULE -->
<script type="text/javascript">
- <!--
-
+ // <![CDATA[
function display_options(value)
{
if (value == 'category')
@@ -38,7 +37,7 @@
var j = 0;
<!-- BEGIN m_names -->
- if (value == '{m_names.NAME}')
+ if (value == '{m_names.A_NAME}')
{
<!-- BEGIN modes -->
item.options[j] = new Option('{m_names.modes.A_VALUE}');
@@ -52,7 +51,7 @@
item.options[0].selected = true;
}
- //-->
+ // ]]>
</script>
<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
diff --git a/phpBB/adm/style/acp_permission_roles.html b/phpBB/adm/style/acp_permission_roles.html
index e16d7598ab..80b1003003 100644
--- a/phpBB/adm/style/acp_permission_roles.html
+++ b/phpBB/adm/style/acp_permission_roles.html
@@ -5,7 +5,7 @@
<!-- IF S_EDIT -->
<script type="text/javascript">
- <!--
+ // <![CDATA[
var active_pmask = '0';
var active_fmask = '0';
var active_cat = '0';
@@ -17,7 +17,7 @@
<!-- IF S_ROLE_JS_ARRAY -->
{S_ROLE_JS_ARRAY}
<!-- ENDIF -->
- //-->
+ // ]]>
</script>
<script type="text/javascript" src="style/permissions.js"></script>
diff --git a/phpBB/adm/style/acp_permissions.html b/phpBB/adm/style/acp_permissions.html
index 5eb9c2eab3..d30a38e697 100644
--- a/phpBB/adm/style/acp_permissions.html
+++ b/phpBB/adm/style/acp_permissions.html
@@ -74,7 +74,7 @@
<dl>
<dt><label for="username">{L_FIND_USERNAME}:</label></dt>
<dd><input class="text medium" type="text" id="username" name="username[]" /></dd>
- <dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(); return false;">{L_FIND_USERNAME}</a> ]</dd>
+ <dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd>
<dd class="full" style="text-align: left;"><label><input type="checkbox" class="radio" id="anonymous" name="user_id[]" value="{ANONYMOUS_USER_ID}" /> {L_SELECT_ANONYMOUS}</label></dd>
</dl>
@@ -138,7 +138,7 @@
<p>{L_USERNAMES_EXPLAIN}</p>
<dl>
<dd class="full"><textarea id="username" name="usernames" rows="5" cols="5" style="width: 100%; height: 60px;"></textarea></dd>
- <dd class="full" style="text-align: left;"><div style="float: {S_CONTENT_FLOW_END};">[ <a href="{U_FIND_USERNAME}" onclick="find_username(); return false;">{L_FIND_USERNAME}</a> ]</div><label><input type="checkbox" class="radio" id="anonymous" name="user_id[]" value="{ANONYMOUS_USER_ID}" /> {L_SELECT_ANONYMOUS}</label></dd>
+ <dd class="full" style="text-align: left;"><div style="float: {S_CONTENT_FLOW_END};">[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</div><label><input type="checkbox" class="radio" id="anonymous" name="user_id[]" value="{ANONYMOUS_USER_ID}" /> {L_SELECT_ANONYMOUS}</label></dd>
</dl>
</fieldset>
@@ -225,7 +225,7 @@
<dl>
<dt><label for="username">{L_FIND_USERNAME}:</label></dt>
<dd><input type="text" id="username" name="username[]" /></dd>
- <dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(); return false;">{L_FIND_USERNAME}</a> ]</dd>
+ <dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd>
<dd class="full" style="text-align: left;"><label><input type="checkbox" class="radio" id="anonymous" name="user_id[]" value="{ANONYMOUS_USER_ID}" /> {L_SELECT_ANONYMOUS}</label></dd>
</dl>
</fieldset>
@@ -327,9 +327,9 @@
<!-- include tooltip file -->
<script type="text/javascript" src="style/tooltip.js"></script>
<script type="text/javascript">
- <!--
+ // <![CDATA[
window.onload = function(){enable_tooltips_select('set-permissions', '{LA_ROLE_DESCRIPTION}', 'role')};
- //-->
+ // ]]>
</script>
<form id="set-permissions" method="post" action="{U_ACTION}">
diff --git a/phpBB/adm/style/acp_prune_users.html b/phpBB/adm/style/acp_prune_users.html
index 1300ddffb2..9a2926df7f 100644
--- a/phpBB/adm/style/acp_prune_users.html
+++ b/phpBB/adm/style/acp_prune_users.html
@@ -33,7 +33,7 @@
<dl>
<dt><label for="users">{L_ACP_PRUNE_USERS}:</label><br /><span>{L_SELECT_USERS_EXPLAIN}</span></dt>
<dd><textarea id="users" name="users" cols="40" rows="5"></textarea></dd>
- <dd>[ <a href="#" onclick="window.open('{U_FIND_USER}', '_phpbbsearch', 'height=500, resizable=yes, scrollbars=yes, width=740'); return false;">{L_FIND_USERNAME}</a> ]</dd>
+ <dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd>
</dl>
<dl>
<dt><label for="deleteposts">{L_DELETE_USER_POSTS}:</label><br /><span>{L_DELETE_USER_POSTS_EXPLAIN}</span></dt>
diff --git a/phpBB/adm/style/acp_ranks.html b/phpBB/adm/style/acp_ranks.html
index bfb805f3d8..0bc8636f7d 100644
--- a/phpBB/adm/style/acp_ranks.html
+++ b/phpBB/adm/style/acp_ranks.html
@@ -7,13 +7,13 @@
<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
<script type="text/javascript">
- <!--
+ // <![CDATA[
function update_image(newimage)
{
- document.getElementById('image').src = (newimage) ? "{RANKS_PATH}/" + newimage : "./images/spacer.gif";
+ document.getElementById('image').src = (newimage) ? "{RANKS_PATH}/" + encodeURI(newimage) : "./images/spacer.gif";
}
- //-->
+ // ]]>
</script>
<h1>{L_ACP_MANAGE_RANKS}</h1>
diff --git a/phpBB/adm/style/acp_search.html b/phpBB/adm/style/acp_search.html
index 8d0ad2f07c..9afe9c5789 100644
--- a/phpBB/adm/style/acp_search.html
+++ b/phpBB/adm/style/acp_search.html
@@ -66,17 +66,17 @@
<!-- ELSEIF S_INDEX -->
<script type="text/javascript">
- <!--
-
+ // <![CDATA[
/**
* Popup search progress bar
*/
function popup_progress_bar(progress_type)
{
close_waitscreen = 0;
- window.open('{UA_PROGRESS_BAR}&type=' + progress_type, '_index', 'HEIGHT=240,resizable=yes,scrollbars=no,WIDTH=400');
+ // no scrollbars
+ popup('{UA_PROGRESS_BAR}&amp;type=' + progress_type, 400, 240, '_index');
}
- //-->
+ // ]]>
</script>
<h1>{L_ACP_SEARCH_INDEX}</h1>
diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html
index efa06aa538..0908c19480 100644
--- a/phpBB/adm/style/acp_styles.html
+++ b/phpBB/adm/style/acp_styles.html
@@ -51,15 +51,15 @@
<!-- ENDIF -->
<script type="text/javascript" defer="defer">
- <!--
+ // <![CDATA[
function update_image(newimage)
{
- document.getElementById('newimg').src = (newimage) ? "../styles/{NAME}/imageset/" + newimage : "images/no_image.png";
+ document.getElementById('newimg').src = (newimage) ? '../styles/{A_NAME}/imageset/' + encodeURI(newimage) : 'images/no_image.png';
}
- //-->
+ // ]]>
</script>
<script type="text/javascript">
- <!--
+ // <![CDATA[
/**
* Handle displaying/hiding the dimension fields
*/
@@ -85,7 +85,7 @@
dE('img_dimensions', -1);
<!-- ENDIF -->
}
- //-->
+ // ]]>
</script>
<form method="post" action="{U_ACTION}">
@@ -153,33 +153,6 @@
<!-- ELSEIF S_EDIT_TEMPLATE or S_EDIT_THEME -->
- <script type="text/javascript" defer="defer">
- <!--
- function append_text_rows(form_name, value)
- {
- url = document.getElementById(form_name).action;
- var_start = url.indexOf('&text_rows=');
- if (var_start == -1)
- {
- document.getElementById(form_name).action = url + "&text_rows=" + value;
- }
- else
- {
- url_start = url.substring(0, var_start + 1);
- var_end = url.substring(var_start + 1).indexOf('&');
- if (var_end == -1)
- {
- document.getElementById(form_name).action = url_start + "text_rows=" + value;
- }
- else
- {
- document.getElementById(form_name).action = url_start + url.substring(var_end + var_start + 2) + "&text_rows=" + value;
- }
- }
- }
- //-->
- </script>
-
<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
<h1>{L_EDIT}</h1>
@@ -204,10 +177,17 @@
<!-- IF TEMPLATE_FILE or (S_EDIT_THEME and S_THEME_IN_DB) -->
<script type="text/javascript" defer="defer">
- <!--
+ // <![CDATA[
function change_editor_height(height)
{
+ height = Number(height);
+
+ if (isNaN(height))
+ {
+ return;
+ }
+
editor = document.getElementById('template_data');
editor.rows = Math.max(5, Math.min(height, 999));
@@ -217,7 +197,18 @@
function append_text_rows(form_name, value)
{
+ value = Number(value);
+
+ if (isNaN(value))
+ {
+ return;
+ }
+
url = document.getElementById(form_name).action;
+
+ // Make sure &amp; is actually... &
+ url = url.replace(/&amp;/g, '&');
+
var_start = url.indexOf('&text_rows=');
if (var_start == -1)
{
@@ -238,7 +229,7 @@
}
}
- //-->
+ // ]]>
</script>
<form id="acp_template" method="post" action="{U_ACTION}">
@@ -269,18 +260,6 @@
<!-- ELSEIF S_CACHE -->
- <script type="text/javascript">
- <!--
-
- function viewsource(url)
- {
- window.open(url, '_source', 'HEIGHT=550,resizable=yes,scrollbars=yes,WIDTH=750');
- return false;
- }
-
- //-->
- </script>
-
<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
<h1>{L_TEMPLATE_CACHE}</h1>
@@ -304,7 +283,7 @@
<tbody>
<!-- BEGIN file -->
<!-- IF file.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
- <td><a href="{file.U_VIEWSOURCE}" onclick="viewsource('{file.UA_VIEWSOURCE}');return false">{file.FILENAME}</a></td>
+ <td><a href="{file.U_VIEWSOURCE}" onclick="popup(this.href, 750, 550, '_source'); return false;">{file.FILENAME}</a></td>
<td>{file.FILESIZE}</td>
<td>{file.CACHED}</td>
<td>{file.MODIFIED}</td>
diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html
index a7ac71abed..cc369bab66 100644
--- a/phpBB/adm/style/acp_users.html
+++ b/phpBB/adm/style/acp_users.html
@@ -15,7 +15,7 @@
<dl>
<dt><label for="username">{L_FIND_USERNAME}:</label></dt>
<dd><input class="text medium" type="text" id="username" name="username" /></dd>
- <dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(); return false;">{L_FIND_USERNAME}</a> ]</dd>
+ <dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd>
<dd class="full" style="text-align: left;"><label><input type="checkbox" class="radio" id="anonymous" name="u" value="{ANONYMOUS_USER_ID}" /> {L_SELECT_ANONYMOUS}</label></dd>
</dl>
diff --git a/phpBB/adm/style/acp_users_overview.html b/phpBB/adm/style/acp_users_overview.html
index 60090d5a3f..2dfb82e52f 100644
--- a/phpBB/adm/style/acp_users_overview.html
+++ b/phpBB/adm/style/acp_users_overview.html
@@ -21,7 +21,7 @@
<dl>
<dt><label>{L_REGISTERED_IP}:</label></dt>
<dd><a href="{U_SHOW_IP}">{REGISTERED_IP}</a></dd>
- <dd>[ <a href="{U_WHOIS}" onclick="window.open(this.href, '_whois', 'height=500, resizable=yes, scrollbars=yes, width=700'); return false;">{L_WHOIS}</a> ]</dd>
+ <dd>[ <a href="{U_WHOIS}" onclick="popup(this.href, 700, 500, '_whois'); return false;">{L_WHOIS}</a> ]</dd>
</dl>
<!-- ENDIF -->
<dl>
@@ -70,7 +70,7 @@
<!-- IF not S_USER_FOUNDER or S_FOUNDER -->
<script type="text/javascript">
- <!--
+ // <![CDATA[
function display_reason(option)
{
@@ -103,7 +103,7 @@
}
}
- //-->
+ // ]]>
</script>
<form id="user_quick_tools" method="post" action="{U_ACTION}">
diff --git a/phpBB/adm/style/acp_users_prefs.html b/phpBB/adm/style/acp_users_prefs.html
index 99e82ea0db..1dfa6a614b 100644
--- a/phpBB/adm/style/acp_users_prefs.html
+++ b/phpBB/adm/style/acp_users_prefs.html
@@ -1,3 +1,9 @@
+<script type="text/javascript">
+// <![CDATA[
+ var default_dateformat = '{A_DEFAULT_DATEFORMAT}';
+// ]]>
+</script>
+
<form id="user_prefs" method="post" action="{U_ACTION}">
<fieldset>
@@ -57,7 +63,7 @@
</dl>
<dl>
<dt><label for="dateoptions">{L_BOARD_DATE_FORMAT}:</label><br /><span>{L_BOARD_DATE_FORMAT_EXPLAIN}</span></dt>
- <dd><select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){dE('custom_date',1);}else{dE('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = '{A_DEFAULT_DATEFORMAT}'; } else { document.getElementById('dateformat').value = this.value; }">{S_DATEFORMAT_OPTIONS}</select></dd>
+ <dd><select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){dE('custom_date',1);}else{dE('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = default_dateformat; } else { document.getElementById('dateformat').value = this.value; }">{S_DATEFORMAT_OPTIONS}</select></dd>
<dd><div id="custom_date"<!-- IF not S_CUSTOM_DATEFORMAT --> style="display:none;"<!-- ENDIF -->><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="30" /></div></dd>
</dl>
</fieldset>
diff --git a/phpBB/adm/style/acp_users_signature.html b/phpBB/adm/style/acp_users_signature.html
index 8c9fcaeec6..9d6b8d11e9 100644
--- a/phpBB/adm/style/acp_users_signature.html
+++ b/phpBB/adm/style/acp_users_signature.html
@@ -1,5 +1,5 @@
- <script type="text/javascript">
- <!--
+<script type="text/javascript">
+// <![CDATA[
var form_name = 'user_signature';
var text_name = 'signature';
@@ -31,11 +31,11 @@
<!-- END custom_tags -->
}
- //-->
- </script>
- <script type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script>
+// ]]>
+</script>
+<script type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script>
- <form id="user_signature" method="post" action="{U_ACTION}">
+<form id="user_signature" method="post" action="{U_ACTION}">
<!-- IF SIGNATURE_PREVIEW -->
<fieldset>
@@ -86,9 +86,12 @@
<p><input type="text" class="text full" style="border: 0; background: none;" name="helpbox" value="{L_STYLES_TIP}" /></p>
<dl>
- <dt style="width: 90px;"><script type="text/javascript"><!--
- colorPalette('v', 12, 10);
- //--></script>
+ <dt style="width: 90px;">
+ <script type="text/javascript">
+ // <![CDATA[
+ colorPalette('v', 12, 10);
+ // ]]>
+ </script>
</dt>
<dd style="margin-left: 90px;"><textarea name="signature" rows="10" cols="60" style="width: 95%;" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{SIGNATURE}</textarea></dd>
<dd style="margin-left: 90px; margin-top: 5px;">
@@ -111,4 +114,4 @@
<input class="button2" type="submit" name="preview" value="{L_PREVIEW}" />
</fieldset>
- </form> \ No newline at end of file
+</form> \ No newline at end of file
diff --git a/phpBB/adm/style/colour_swatch.html b/phpBB/adm/style/colour_swatch.html
index f52f3217c5..f3c5a812dc 100644
--- a/phpBB/adm/style/colour_swatch.html
+++ b/phpBB/adm/style/colour_swatch.html
@@ -36,7 +36,7 @@
<body>
<script type="text/javascript">
-<!--
+// <![CDATA[
var r = 0, g = 0, b = 0;
var numberList = new Array(6);
@@ -71,7 +71,7 @@
{
opener.document.forms["{OPENER}"].{NAME}.value = color;
}
-//-->
+// ]]>
</script>
</body>
diff --git a/phpBB/adm/style/install_update.html b/phpBB/adm/style/install_update.html
index 34d00241cb..e19f1fe211 100644
--- a/phpBB/adm/style/install_update.html
+++ b/phpBB/adm/style/install_update.html
@@ -1,13 +1,13 @@
<!-- INCLUDE install_header.html -->
<script type="text/javascript">
-<!--
+// <![CDATA[
function diff_popup(url)
{
- window.open(url.replace(/&amp;/g, '&'), 'diff', 'height=600,resizable=yes,scrollbars=yes,width=950');
+ popup(url, 950, 600, '_diff');
return false;
}
-//-->
+// ]]>
</script>
<!-- IF S_ERROR -->
@@ -201,7 +201,7 @@
<br /><span>{L_NUM_CONFLICTS}: {files.NUM_CONFLICTS}</span>
<!-- ENDIF -->
</dt>
- <dd style="margin-left: 60%;"><!-- IF files.STATUS eq 'modified' -->&nbsp;<!-- ELSE --><!-- IF not files.S_BINARY -->[ <a href="{files.U_SHOW_DIFF}" onclick="diff_popup('{files.U_SHOW_DIFF}'); return false;">{files.L_SHOW_DIFF}</a> ]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF --><!-- ENDIF --></dd>
+ <dd style="margin-left: 60%;"><!-- IF files.STATUS eq 'modified' -->&nbsp;<!-- ELSE --><!-- IF not files.S_BINARY -->[ <a href="{files.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{files.L_SHOW_DIFF}</a> ]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF --><!-- ENDIF --></dd>
<!-- IF files.S_CUSTOM -->
<dd style="margin-left: 60%;"><label><input type="checkbox" name="no_update[]" value="{files.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
<!-- ENDIF -->
@@ -210,15 +210,15 @@
</dl>
<dl>
<dt style="width: 60%"><label><input type="radio" class="radio" name="modified[{files.FILENAME}]" value="0" checked="checked" /> {L_MERGE_MODIFICATIONS_OPTION}</label></dt>
- <dd style="margin-left: 60%;"><!-- IF not files.S_BINARY -->[ <a href="{files.U_SHOW_DIFF}" onclick="diff_popup('{files.U_SHOW_DIFF}'); return false;">{files.L_SHOW_DIFF}</a> ]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF --></dd>
+ <dd style="margin-left: 60%;"><!-- IF not files.S_BINARY -->[ <a href="{files.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{files.L_SHOW_DIFF}</a> ]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF --></dd>
</dl>
<dl>
<dt style="width: 60%"><label><input type="radio" class="radio" name="modified[{files.FILENAME}]" value="1" /> {L_MERGE_NO_MERGE_NEW_OPTION}</label></dt>
- <dd style="margin-left: 60%;"><!-- IF not files.S_BINARY -->[<a href="{files.U_VIEW_NO_MERGE_NEW}" onclick="diff_popup('{files.U_VIEW_NO_MERGE_NEW}'); return false;">{L_SHOW_DIFF_FINAL}</a>]<!-- ELSE -->&nbsp;<!-- ENDIF --></dd>
+ <dd style="margin-left: 60%;"><!-- IF not files.S_BINARY -->[<a href="{files.U_VIEW_NO_MERGE_NEW}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]<!-- ELSE -->&nbsp;<!-- ENDIF --></dd>
</dl>
<dl>
<dt style="width: 60%"><label><input type="radio" class="radio" name="modified[{files.FILENAME}]" value="2" /> {L_MERGE_NO_MERGE_MOD_OPTION}</label></dt>
- <dd style="margin-left: 60%;"><!-- IF not files.S_BINARY -->[<a href="{files.U_VIEW_NO_MERGE_MOD}" onclick="diff_popup('{files.U_VIEW_NO_MERGE_MOD}'); return false;">{L_SHOW_DIFF_FINAL}</a>]<!-- ELSE -->&nbsp;<!-- ENDIF --></dd>
+ <dd style="margin-left: 60%;"><!-- IF not files.S_BINARY -->[<a href="{files.U_VIEW_NO_MERGE_MOD}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]<!-- ELSE -->&nbsp;<!-- ENDIF --></dd>
</dl>
<!-- IF not files.S_LAST_ROW -->
</fieldset>
@@ -233,20 +233,20 @@
</dl>
<dl>
<dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{files.FILENAME}]" value="1" checked="checked" /> {L_MERGE_NO_MERGE_NEW_OPTION}</label></dt>
- <dd style="margin-left: 60%;"><!-- IF not files.S_BINARY -->[<a href="{files.U_VIEW_NO_MERGE_NEW}" onclick="diff_popup('{files.U_VIEW_NO_MERGE_NEW}'); return false;">{L_SHOW_DIFF_FINAL}</a>]<!-- ELSE -->&nbsp;<!-- ENDIF --></dd>
+ <dd style="margin-left: 60%;"><!-- IF not files.S_BINARY -->[<a href="{files.U_VIEW_NO_MERGE_NEW}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]<!-- ELSE -->&nbsp;<!-- ENDIF --></dd>
</dl>
<dl>
<dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{files.FILENAME}]" value="2" /> {L_MERGE_NO_MERGE_MOD_OPTION}</label></dt>
- <dd style="margin-left: 60%;"><!-- IF not files.S_BINARY -->[<a href="{files.U_VIEW_NO_MERGE_MOD}" onclick="diff_popup('{files.U_VIEW_NO_MERGE_MOD}'); return false;">{L_SHOW_DIFF_FINAL}</a>]<!-- ELSE -->&nbsp;<!-- ENDIF --></dd>
+ <dd style="margin-left: 60%;"><!-- IF not files.S_BINARY -->[<a href="{files.U_VIEW_NO_MERGE_MOD}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]<!-- ELSE -->&nbsp;<!-- ENDIF --></dd>
</dl>
<!-- IF not files.S_BINARY -->
<dl>
<dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{files.FILENAME}]" value="3" /> {L_MERGE_NEW_FILE_OPTION}</label></dt>
- <dd style="margin-left: 60%;">[<a href="{files.U_VIEW_NEW_FILE}" onclick="diff_popup('{files.U_VIEW_NEW_FILE}'); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
+ <dd style="margin-left: 60%;">[<a href="{files.U_VIEW_NEW_FILE}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
</dl>
<dl>
<dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{files.FILENAME}]" value="4" /> {L_MERGE_MOD_FILE_OPTION}</label></dt>
- <dd style="margin-left: 60%;">[<a href="{files.U_VIEW_MOD_FILE}" onclick="diff_popup('{files.U_VIEW_MOD_FILE}'); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
+ <dd style="margin-left: 60%;">[<a href="{files.U_VIEW_MOD_FILE}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
</dl>
<!-- ENDIF -->
<!-- IF not files.S_LAST_ROW -->
diff --git a/phpBB/adm/style/install_update_diff.html b/phpBB/adm/style/install_update_diff.html
index ce1a241abe..b9ac19ae5d 100644
--- a/phpBB/adm/style/install_update_diff.html
+++ b/phpBB/adm/style/install_update_diff.html
@@ -12,7 +12,7 @@
<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript">
-<!--
+// <![CDATA[
function resize_panel()
{
var block = document.getElementById('codepanel');
@@ -28,7 +28,7 @@ function resize_panel()
//whatever IE needs to do this
}
}
--->
+// ]]>
</script>
<style type="text/css">
diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html
index a6b053b543..e883e66d80 100644
--- a/phpBB/adm/style/overall_header.html
+++ b/phpBB/adm/style/overall_header.html
@@ -12,11 +12,11 @@
<link href="style/admin.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript">
-<!--
+// <![CDATA[
var jump_page = '{LA_JUMP_PAGE}:';
var on_page = '{ON_PAGE}';
var per_page = '{PER_PAGE}';
-var base_url = '{BASE_URL}';
+var base_url = '{A_BASE_URL}';
var menu_state = 'shown';
@@ -82,33 +82,25 @@ function marklist(id, name, state)
}
/**
-* Open trace popup
-*/
-function trace(link)
-{
- window.open(link.replace(/&amp;/g, '&'), '_trace', 'height=515, resizable=yes, scrollbars=yes, width=750');
- return false;
-}
-
-/**
* Find a member
*/
-function find_username()
+function find_username(url)
{
- <!-- IF UA_FIND_USERNAME -->
- window.open('{UA_FIND_USERNAME}', '_usersearch', 'height=570, resizable=yes, scrollbars=yes, width=760');
- <!-- ENDIF -->
+ popup(url, 760, 570, '_usersearch');
return false;
}
/**
-* Color swatch
+* Window popup
*/
-function swatch(field)
+function popup(url, width, height, name)
{
- <!-- IF UA_SWATCH -->
- window.open('{UA_SWATCH}' + field, '_swatch', 'height=150, resizable=yes, scrollbars=no, width=636');
- <!-- ENDIF -->
+ if (!name)
+ {
+ name = '_popup';
+ }
+
+ window.open(url.replace(/&amp;/g, '&'), name, 'height=' + height + ',resizable=yes,scrollbars=yes, width=' + width);
return false;
}
@@ -162,7 +154,7 @@ function switch_menu()
}
}
-//-->
+// ]]>
</script>
</head>
diff --git a/phpBB/adm/style/permission_mask.html b/phpBB/adm/style/permission_mask.html
index 1889f84d28..19a24a48b8 100644
--- a/phpBB/adm/style/permission_mask.html
+++ b/phpBB/adm/style/permission_mask.html
@@ -1,6 +1,6 @@
<script type="text/javascript">
-<!--
+// <![CDATA[
var active_pmask = '0';
var active_fmask = '0';
var active_cat = '0';
@@ -12,7 +12,7 @@
<!-- IF S_ROLE_JS_ARRAY -->
{S_ROLE_JS_ARRAY}
<!-- ENDIF -->
-//-->
+// ]]>
</script>
<script type="text/javascript" src="style/permissions.js"></script>
@@ -102,7 +102,7 @@
<tbody>
<!-- BEGIN mask -->
<!-- IF p_mask.f_mask.category.mask.S_ROW_COUNT is even --><tr class="row4"><!-- ELSE --><tr class="row3"><!-- ENDIF -->
- <th class="permissions-name<!-- IF p_mask.f_mask.category.mask.S_ROW_COUNT is even --> row4<!-- ELSE --> row3<!-- ENDIF -->"><!-- IF p_mask.f_mask.category.mask.U_TRACE --><a href="#" class="trace" onclick="trace('{p_mask.f_mask.category.mask.U_TRACE}'); return false;" title="{L_TRACE_SETTING}"><img src="images/icon_trace.gif" alt="{L_TRACE_SETTING}" /></a> <!-- ENDIF -->{p_mask.f_mask.category.mask.PERMISSION}</th>
+ <th class="permissions-name<!-- IF p_mask.f_mask.category.mask.S_ROW_COUNT is even --> row4<!-- ELSE --> row3<!-- ENDIF -->"><!-- IF p_mask.f_mask.category.mask.U_TRACE --><a href="{p_mask.f_mask.category.mask.U_TRACE}" class="trace" onclick="popup(this.href, 750, 515, '_trace'); return false;" title="{L_TRACE_SETTING}"><img src="images/icon_trace.gif" alt="{L_TRACE_SETTING}" /></a> <!-- ENDIF -->{p_mask.f_mask.category.mask.PERMISSION}</th>
<!-- IF p_mask.S_VIEW -->
<td<!-- IF p_mask.f_mask.category.mask.S_YES --> class="yes"<!-- ENDIF -->>&nbsp;</td>
<td<!-- IF p_mask.f_mask.category.mask.S_NEVER --> class="never"<!-- ENDIF -->></td>
diff --git a/phpBB/adm/style/progress_bar.html b/phpBB/adm/style/progress_bar.html
index ef9590119f..00e1e5e885 100644
--- a/phpBB/adm/style/progress_bar.html
+++ b/phpBB/adm/style/progress_bar.html
@@ -1,7 +1,7 @@
<!-- INCLUDE simple_header.html -->
<script type="text/javascript">
-<!--
+// <![CDATA[
/**
* Close previously opened popup
*/
@@ -22,7 +22,7 @@
setTimeout("close_popup()", 1000);
return 0;
}
-//-->
+// ]]>
</script>
<div class="successbox">
@@ -32,9 +32,9 @@
</div>
<script type="text/javascript">
-<!--
+// <![CDATA[
close_popup();
-//-->
+// ]]>
</script>
<!-- INCLUDE simple_footer.html --> \ No newline at end of file
diff --git a/phpBB/adm/style/simple_header.html b/phpBB/adm/style/simple_header.html
index 882026a1c1..3e36c47988 100644
--- a/phpBB/adm/style/simple_header.html
+++ b/phpBB/adm/style/simple_header.html
@@ -12,11 +12,25 @@
<link href="style/admin.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript">
-<!--
+// <![CDATA[
var jump_page = '{LA_JUMP_PAGE}:';
var on_page = '{ON_PAGE}';
var per_page = '{PER_PAGE}';
-var base_url = '{BASE_URL}';
+var base_url = '{A_BASE_URL}';
+
+/**
+* Window popup
+*/
+function popup(url, width, height, name)
+{
+ if (!name)
+ {
+ name = '_popup';
+ }
+
+ window.open(url.replace(/&amp;/g, '&'), name, 'height=' + height + ',resizable=yes,scrollbars=yes, width=' + width);
+ return false;
+}
/**
* Jump to page
@@ -76,26 +90,13 @@ function marklist(id, name, state)
/**
* Find a member
*/
-function find_username()
-{
- <!-- IF UA_FIND_USERNAME -->
- window.open('{UA_FIND_USERNAME}', '_usersearch', 'height=570, resizable=yes, scrollbars=yes, width=760');
- <!-- ENDIF -->
- return false;
-}
-
-/**
-* Color swatch
-*/
-function swatch(field)
+function find_username(url)
{
- <!-- IF UA_SWATCH -->
- window.open('{UA_SWATCH}' + field, '_swatch', 'height=150, resizable=yes, scrollbars=no, width=636');
- <!-- ENDIF -->
+ popup(url, 760, 570, '_usersearch');
return false;
}
-//-->
+// ]]>
</script>
</head>
diff --git a/phpBB/adm/swatch.php b/phpBB/adm/swatch.php
index 9e537290ff..5a5a4e6d5c 100644
--- a/phpBB/adm/swatch.php
+++ b/phpBB/adm/swatch.php
@@ -29,9 +29,16 @@ $template->set_filenames(array(
'body' => 'colour_swatch.html')
);
+$form = request_var('form', '');
+$name = request_var('name', '');
+
+// We validate form and name here, only id/class allowed
+$form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form;
+$name = (!preg_match('/^[a-z0-9_-]+$/i', $name)) ? '' : $name;
+
$template->assign_vars(array(
- 'OPENER' => addslashes(request_var('form', '')),
- 'NAME' => request_var('name', ''),
+ 'OPENER' => $form,
+ 'NAME' => $name,
'T_IMAGES_PATH' => "{$phpbb_root_path}images/",
'S_USER_LANG' => $user->lang['USER_LANG'],