diff options
author | Jason Oster <parasytic@users.sourceforge.net> | 2010-02-09 18:07:46 +0000 |
---|---|---|
committer | Jason Oster <parasytic@users.sourceforge.net> | 2010-02-09 18:07:46 +0000 |
commit | a773974c4c7660212b8aca2272a3d4aa5fb6a7ed (patch) | |
tree | a061420e8b06e876f243d2d05577a4e919831176 | |
parent | 36380c2546c970bffb131644d95f376ac5688c9a (diff) | |
download | phpicalendar-a773974c4c7660212b8aca2272a3d4aa5fb6a7ed.tar.gz phpicalendar-a773974c4c7660212b8aca2272a3d4aa5fb6a7ed.tar.bz2 phpicalendar-a773974c4c7660212b8aca2272a3d4aa5fb6a7ed.zip |
Fix jumpbox vs PHP transparent SID
-rw-r--r-- | functions/event.js | 26 | ||||
-rw-r--r-- | templates/default/calendar_nav.tpl | 33 | ||||
-rw-r--r-- | templates/default/sidebar.tpl | 33 | ||||
-rw-r--r-- | templates/default/sidebar_year.tpl | 33 |
4 files changed, 107 insertions, 18 deletions
diff --git a/functions/event.js b/functions/event.js index 13aa609..913b608 100644 --- a/functions/event.js +++ b/functions/event.js @@ -49,3 +49,29 @@ document.popup_data = new Array(); document.todo_popup_data = new Array(); //--> </script> +<script language="JavaScript" type="text/javascript"> +<!-- + +function submitform(form, value) { + // Parse value. + var values = decodeURI(value).split("&"); + var temp = values[0].split("?", 2); + var action = temp[0]; + values[0] = temp[1]; + + form.action = action; + + // Stuff the hidden form fields. + for (var i = 0; i < values.length; i++) { + temp = values[i].split("=", 2); + form.elements.namedItem(temp[0]).value = temp[1]; + } + + // Clear the select+option value. + var select = form.elements.namedItem("action") + select.options[select.selectedIndex].value = ""; + + form.submit(); +} +//--> +</script> diff --git a/templates/default/calendar_nav.tpl b/templates/default/calendar_nav.tpl index 82c43ff..60c07d3 100644 --- a/templates/default/calendar_nav.tpl +++ b/templates/default/calendar_nav.tpl @@ -91,13 +91,34 @@ <td bgcolor="#FFFFFF" align="left"> <div style="padding: 5px;"> <form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get"> - <select name="action" class="query_style" onchange="window.location=(this.options[this.selectedIndex].value);">{LIST_JUMPS}</select><br /> - <select name="action" class="query_style" onchange="window.location=(this.options[this.selectedIndex].value);">{LIST_ICALS}</select><br /> - <select name="action" class="query_style" onchange="window.location=(this.options[this.selectedIndex].value);">{LIST_YEARS}</select><br /> - <select name="action" class="query_style" onchange="window.location=(this.options[this.selectedIndex].value);">{LIST_MONTHS}</select><br /> - <select name="action" class="query_style" onchange="window.location=(this.options[this.selectedIndex].value);">{LIST_WEEKS}</select><br /> <input type="hidden" name="cpath" value="{CPATH}"/> - + <input type="hidden" name="cal" value=""/> + <input type="hidden" name="getdate" value=""/> + <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_JUMPS}</select><br /> + </form> + <form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get"> + <input type="hidden" name="cpath" value="{CPATH}"/> + <input type="hidden" name="cal" value=""/> + <input type="hidden" name="getdate" value=""/> + <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_ICALS}</select><br /> + </form> + <form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get"> + <input type="hidden" name="cpath" value="{CPATH}"/> + <input type="hidden" name="cal" value=""/> + <input type="hidden" name="getdate" value=""/> + <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_YEARS}</select><br /> + </form> + <form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get"> + <input type="hidden" name="cpath" value="{CPATH}"/> + <input type="hidden" name="cal" value=""/> + <input type="hidden" name="getdate" value=""/> + <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_MONTHS}</select><br /> + </form> + <form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get"> + <input type="hidden" name="cpath" value="{CPATH}"/> + <input type="hidden" name="cal" value=""/> + <input type="hidden" name="getdate" value=""/> + <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_WEEKS}</select><br /> </form> <!-- switch show_search on --> {SEARCH_BOX} diff --git a/templates/default/sidebar.tpl b/templates/default/sidebar.tpl index 8a96ae6..fe52c75 100644 --- a/templates/default/sidebar.tpl +++ b/templates/default/sidebar.tpl @@ -78,13 +78,34 @@ <td bgcolor="#FFFFFF" align="left"> <div style="padding: 5px;"> <form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get"> - <select name="action" class="query_style" onchange="window.location=(this.options[this.selectedIndex].value);">{LIST_JUMPS}</select><br /> - <select name="action" class="query_style" onchange="window.location=(this.options[this.selectedIndex].value);">{LIST_ICALS}</select><br /> - <select name="action" class="query_style" onchange="window.location=(this.options[this.selectedIndex].value);">{LIST_YEARS}</select><br /> - <select name="action" class="query_style" onchange="window.location=(this.options[this.selectedIndex].value);">{LIST_MONTHS}</select><br /> - <select name="action" class="query_style" onchange="window.location=(this.options[this.selectedIndex].value);">{LIST_WEEKS}</select><br /> <input type="hidden" name="cpath" value="{CPATH}"/> - + <input type="hidden" name="cal" value=""/> + <input type="hidden" name="getdate" value=""/> + <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_JUMPS}</select><br /> + </form> + <form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get"> + <input type="hidden" name="cpath" value="{CPATH}"/> + <input type="hidden" name="cal" value=""/> + <input type="hidden" name="getdate" value=""/> + <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_ICALS}</select><br /> + </form> + <form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get"> + <input type="hidden" name="cpath" value="{CPATH}"/> + <input type="hidden" name="cal" value=""/> + <input type="hidden" name="getdate" value=""/> + <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_YEARS}</select><br /> + </form> + <form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get"> + <input type="hidden" name="cpath" value="{CPATH}"/> + <input type="hidden" name="cal" value=""/> + <input type="hidden" name="getdate" value=""/> + <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_MONTHS}</select><br /> + </form> + <form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get"> + <input type="hidden" name="cpath" value="{CPATH}"/> + <input type="hidden" name="cal" value=""/> + <input type="hidden" name="getdate" value=""/> + <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_WEEKS}</select><br /> </form> <!-- switch show_search on --> {SEARCH_BOX} diff --git a/templates/default/sidebar_year.tpl b/templates/default/sidebar_year.tpl index bdbb2d3..d2874b3 100644 --- a/templates/default/sidebar_year.tpl +++ b/templates/default/sidebar_year.tpl @@ -78,13 +78,34 @@ <td bgcolor="#FFFFFF" align="left"> <div style="padding: 5px;"> <form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get"> - <select name="action" class="query_style" onchange="window.location=(this.options[this.selectedIndex].value);">{LIST_JUMPS}</select><br /> - <select name="action" class="query_style" onchange="window.location=(this.options[this.selectedIndex].value);">{LIST_ICALS}</select><br /> - <select name="action" class="query_style" onchange="window.location=(this.options[this.selectedIndex].value);">{LIST_YEARS}</select><br /> - <select name="action" class="query_style" onchange="window.location=(this.options[this.selectedIndex].value);">{LIST_MONTHS}</select><br /> - <select name="action" class="query_style" onchange="window.location=(this.options[this.selectedIndex].value);">{LIST_WEEKS}</select><br /> <input type="hidden" name="cpath" value="{CPATH}"/> - + <input type="hidden" name="cal" value=""/> + <input type="hidden" name="getdate" value=""/> + <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_JUMPS}</select><br /> + </form> + <form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get"> + <input type="hidden" name="cpath" value="{CPATH}"/> + <input type="hidden" name="cal" value=""/> + <input type="hidden" name="getdate" value=""/> + <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_ICALS}</select><br /> + </form> + <form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get"> + <input type="hidden" name="cpath" value="{CPATH}"/> + <input type="hidden" name="cal" value=""/> + <input type="hidden" name="getdate" value=""/> + <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_YEARS}</select><br /> + </form> + <form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get"> + <input type="hidden" name="cpath" value="{CPATH}"/> + <input type="hidden" name="cal" value=""/> + <input type="hidden" name="getdate" value=""/> + <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_MONTHS}</select><br /> + </form> + <form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get"> + <input type="hidden" name="cpath" value="{CPATH}"/> + <input type="hidden" name="cal" value=""/> + <input type="hidden" name="getdate" value=""/> + <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_WEEKS}</select><br /> </form> <!-- switch show_search on --> {SEARCH_BOX} |