mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Replaced _top with _self to make sure windows only open within frame
This commit is contained in:
@@ -182,7 +182,7 @@ if (!isset($surveyid) || !$surveyid)
|
||||
."\t<tr><td align='center'><br /><font color='red'><strong>"
|
||||
.$clang->gT("Error")."</strong></font><br />".$clang->gT("You have not selected a survey")."<br /><br />"
|
||||
."<input type='submit' value='"
|
||||
.$clang->gT("Main Admin Screen")."' onclick=\"window.open('$scriptname', '_top')\" /><br /><br /></td></tr>\n"
|
||||
.$clang->gT("Main Admin Screen")."' onclick=\"window.open('$scriptname', '_self')\" /><br /><br /></td></tr>\n"
|
||||
."</table>\n"
|
||||
."</body>\n</html>";
|
||||
return;
|
||||
@@ -200,7 +200,7 @@ if (!$chcount)
|
||||
."\t<tr><td align='center'><br /><font color='red'><strong>"
|
||||
.$clang->gT("Error")."</strong></font><br />".$clang->gT("The survey you selected does not exist")
|
||||
."<br /><br />\n\t<input type='submit' value='"
|
||||
.$clang->gT("Main Admin Screen")."' onclick=\"window.open('$scriptname', '_top')\" /><br /><br /></td></tr>\n"
|
||||
.$clang->gT("Main Admin Screen")."' onclick=\"window.open('$scriptname', '_self')\" /><br /><br /></td></tr>\n"
|
||||
."</table>\n"
|
||||
."</body>\n</html>";
|
||||
return;
|
||||
@@ -267,7 +267,7 @@ if (!$tkresult = $connect->Execute($tkquery)) //If the query fails, assume no to
|
||||
"<pre>".implode(" ",$sqlarray)."</pre>\n" .
|
||||
"</td></tr></table>"
|
||||
."\t\t\t<input type='submit' value='"
|
||||
.$clang->gT("Main Admin Screen")."' onclick=\"window.open('$scriptname?sid=$surveyid', '_top')\" />\n"
|
||||
.$clang->gT("Main Admin Screen")."' onclick=\"window.open('$scriptname?sid=$surveyid', '_self')\" />\n"
|
||||
."\t\t</td>\n"
|
||||
."\t</tr>\n"
|
||||
."</table>\n"
|
||||
@@ -283,7 +283,7 @@ if (!$tkresult = $connect->Execute($tkquery)) //If the query fails, assume no to
|
||||
."\t\t\t<br /><br />\n"
|
||||
."\t\t\t".$clang->gT("A token table has been created for this survey.")." (\"".$dbprefix."tokens_$surveyid\")<br /><br />\n"
|
||||
."\t\t\t<input type='submit' value='"
|
||||
.$clang->gT("Continue")."' onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid', '_top')\" />\n"
|
||||
.$clang->gT("Continue")."' onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid', '_self')\" />\n"
|
||||
."\t\t</td>\n"
|
||||
."\t</tr>\n"
|
||||
."</table>\n"
|
||||
@@ -305,7 +305,7 @@ if (!$tkresult = $connect->Execute($tkquery)) //If the query fails, assume no to
|
||||
."\t\t\t<br /><br />\n"
|
||||
."\t\t\t".$clang->gT("A token table has been created for this survey.")." (\"".$dbprefix."tokens_$surveyid\")<br /><br />\n"
|
||||
."\t\t\t<input type='submit' value='"
|
||||
.$clang->gT("Continue")."' onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid', '_top')\" />\n"
|
||||
.$clang->gT("Continue")."' onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid', '_self')\" />\n"
|
||||
."\t\t</td>\n"
|
||||
."\t</tr>\n"
|
||||
."</table>\n"
|
||||
@@ -347,11 +347,11 @@ if (!$tkresult = $connect->Execute($tkquery)) //If the query fails, assume no to
|
||||
$tokenoutput .= "\t\t\t".$clang->gT("Do you want to create a tokens table for this survey?");
|
||||
$tokenoutput .= "<br /><br />\n";
|
||||
$tokenoutput .= "\t\t\t<input type='submit' value='"
|
||||
// .$clang->gT("Initialise Tokens")."' onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&createtable=Y', '_top')\" /><br />\n";
|
||||
// .$clang->gT("Initialise Tokens")."' onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&createtable=Y', '_self')\" /><br />\n";
|
||||
.$clang->gT("Initialise Tokens")."' onclick=\"".get2post("$scriptname?action=tokens&sid=$surveyid&createtable=Y")."\" /><br />\n";
|
||||
}
|
||||
$tokenoutput .= "\t\t\t<input type='submit' value='"
|
||||
.$clang->gT("Main Admin Screen")."' onclick=\"window.open('$homeurl/admin.php?sid=$surveyid', '_top')\" /><br /><br />\n";
|
||||
.$clang->gT("Main Admin Screen")."' onclick=\"window.open('$homeurl/admin.php?sid=$surveyid', '_self')\" /><br /><br />\n";
|
||||
// Do not offer old postgres token tables for restore since these are having an issue with missing index
|
||||
if ($tcount>0 && $databasetype!='postgres' &&
|
||||
($sumrows5['edit_survey_property'] ||
|
||||
@@ -400,15 +400,15 @@ $tokenoutput .= "\t<tr>\n"
|
||||
."\t\t\t<a href=\"#\" onclick=\"showhelp('show')\" onmouseout=\"hideTooltip()\""
|
||||
."onmouseover=\"showTooltip(event,'".$clang->gT("Show Help", "js")."');return false\">" .
|
||||
"<img src='$imagefiles/showhelp.png' title='' align='right' alt='' /></a>\n"
|
||||
."\t\t\t<a href=\"#\" onclick=\"window.open('$scriptname?sid=$surveyid', '_top')\" onmouseout=\"hideTooltip()\""
|
||||
."\t\t\t<a href=\"#\" onclick=\"window.open('$scriptname?sid=$surveyid', '_self')\" onmouseout=\"hideTooltip()\""
|
||||
."onmouseover=\"showTooltip(event,'".$clang->gT("Return to Survey Administration", "js")."');return false\">" .
|
||||
"<img name='HomeButton' src='$imagefiles/home.png' align='left' alt='' /></a>\n"
|
||||
."\t\t\t<img src='$imagefiles/blank.gif' alt='' width='11' border='0' hspace='0' align='left' />\n"
|
||||
."\t\t\t<a href=\"#\" onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid', '_top')\" onmouseout=\"hideTooltip()\" onmouseover=\"showTooltip(event,'".$clang->gT("Show Token Summary", "js")."');return false\" >"
|
||||
."\t\t\t<a href=\"#\" onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid', '_self')\" onmouseout=\"hideTooltip()\" onmouseover=\"showTooltip(event,'".$clang->gT("Show Token Summary", "js")."');return false\" >"
|
||||
."\t\t\t<img src='$imagefiles/seperator.gif' alt='' border='0' hspace='0' align='left' />\n"
|
||||
."<img name='SummaryButton' src='$imagefiles/summary.png' title='' align='left' alt='' /></a>\n"
|
||||
."\t\t\t<img src='$imagefiles/seperator.gif' alt='' border='0' hspace='0' align='left' />\n"
|
||||
."\t\t\t<a href=\"#\" onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=browse', '_top')\" onmouseout=\"hideTooltip()\""
|
||||
."\t\t\t<a href=\"#\" onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=browse', '_self')\" onmouseout=\"hideTooltip()\""
|
||||
."onmouseover=\"showTooltip(event,'".$clang->gT("Display Tokens", "js")."');return false\">"
|
||||
."<img name='ViewAllButton' src='$imagefiles/document.png' title='' align='left' alt='' /></a>\n";
|
||||
|
||||
@@ -416,19 +416,19 @@ if ($sumrows5['edit_survey_property'] ||
|
||||
$sumrows5['activate_survey'] ||
|
||||
$_SESSION['USER_RIGHT_SUPERADMIN'] == 1)
|
||||
{
|
||||
$tokenoutput .= "\t\t\t<a href=\"#\" onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=addnew', '_top')\" onmouseout=\"hideTooltip()\"" .
|
||||
$tokenoutput .= "\t\t\t<a href=\"#\" onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=addnew', '_self')\" onmouseout=\"hideTooltip()\"" .
|
||||
"onmouseover=\"showTooltip(event,'".$clang->gT("Add new token entry", "js")."');return false\">" .
|
||||
"<img name='AddNewButton' src='$imagefiles/add.png' title='' align='left' alt='' /></a>\n"
|
||||
."\t\t\t<img src='$imagefiles/seperator.gif' alt='' border='0' hspace='0' align='left' />\n"
|
||||
."\t\t\t<a href=\"#\" onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=import', '_top')\" onmouseout=\"hideTooltip()\" ".
|
||||
."\t\t\t<a href=\"#\" onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=import', '_self')\" onmouseout=\"hideTooltip()\" ".
|
||||
"onmouseover=\"showTooltip(event,'".$clang->gT("Import Tokens from CSV File", "js")."');return false\"> <img name='ImportButton' src='$imagefiles/importcsv.png' title='' align='left' alt='' /></a>"
|
||||
."\t\t\t<a href=\"#\" onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=importldap', '_top')\" onmouseout=\"hideTooltip()\" ".
|
||||
."\t\t\t<a href=\"#\" onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=importldap', '_self')\" onmouseout=\"hideTooltip()\" ".
|
||||
"onmouseover=\"showTooltip(event,'".$clang->gT("Import Tokens from LDAP Query", "js")."');return false\"> <img name='ImportLdapButton' src='$imagefiles/importldap.png' title='' alt='' align='left' /></a>";
|
||||
}
|
||||
|
||||
if ($sumrows5['export'] || $_SESSION['USER_RIGHT_SUPERADMIN'] == 1)
|
||||
{
|
||||
$tokenoutput .= "\t\t\t<a href=\"#\" onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=export', '_top')\" onmouseout=\"hideTooltip()\"" .
|
||||
$tokenoutput .= "\t\t\t<a href=\"#\" onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=export', '_self')\" onmouseout=\"hideTooltip()\"" .
|
||||
"onmouseover=\"showTooltip(event,'".$clang->gT("Export Tokens to CSV file", "js")."');return false\">".
|
||||
"<img name='ExportButton' src='$imagefiles/exportcsv.png' align='left' alt='' /></a>\n";
|
||||
}
|
||||
@@ -437,18 +437,18 @@ if ($sumrows5['edit_survey_property'] ||
|
||||
$_SESSION['USER_RIGHT_SUPERADMIN'] == 1)
|
||||
{
|
||||
$tokenoutput .= "\t\t\t<img src='$imagefiles/seperator.gif' alt='' border='0' hspace='0' align='left' />\n"
|
||||
."\t\t\t<a href=\"#\" onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=emailsettings', '_top')\" onmouseout=\"hideTooltip()\" onmouseover=\"showTooltip(event,'".$clang->gT("Edit Email Templates", "js")."');return false\">" .
|
||||
."\t\t\t<a href=\"#\" onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=emailsettings', '_self')\" onmouseout=\"hideTooltip()\" onmouseover=\"showTooltip(event,'".$clang->gT("Edit Email Templates", "js")."');return false\">" .
|
||||
"<img name='EmailSettingsButton' src='$imagefiles/emailsettings.png' title='' align='left' alt='' /></a>\n"
|
||||
."\t\t\t<a href=\"#\" onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=email', '_top')\" onmouseout=\"hideTooltip()\" onmouseover=\"showTooltip(event,'".$clang->gT("Send email invitation", "js")."');return false\">" .
|
||||
."\t\t\t<a href=\"#\" onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=email', '_self')\" onmouseout=\"hideTooltip()\" onmouseover=\"showTooltip(event,'".$clang->gT("Send email invitation", "js")."');return false\">" .
|
||||
"<img name='InviteButton' src='$imagefiles/invite.png' title='' align='left' alt='' /></a>\n"
|
||||
."\t\t\t<a href=\"#\" onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=remind', '_top')\" onmouseout=\"hideTooltip()\" onmouseover=\"showTooltip(event,'".$clang->gT("Send email reminder", "js")."');return false\">" .
|
||||
."\t\t\t<a href=\"#\" onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=remind', '_self')\" onmouseout=\"hideTooltip()\" onmouseover=\"showTooltip(event,'".$clang->gT("Send email reminder", "js")."');return false\">" .
|
||||
"<img name='RemindButton' src='$imagefiles/remind.png' title='' align='left' alt='' /></a>\n"
|
||||
."\t\t\t<img src='$imagefiles/seperator.gif' border='0' hspace='0' align='left' alt='' />\n"
|
||||
// ."\t\t\t<a href=\"#\" onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=tokenify', '_top')\" onmouseout=\"hideTooltip()\" onmouseover=\"showTooltip(event,'".$clang->gT("Generate Tokens", "js")."');return false\">" .
|
||||
// ."\t\t\t<a href=\"#\" onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=tokenify', '_self')\" onmouseout=\"hideTooltip()\" onmouseover=\"showTooltip(event,'".$clang->gT("Generate Tokens", "js")."');return false\">" .
|
||||
."\t\t\t<a href=\"#\" onclick=\"".get2post("$scriptname?action=tokens&sid=$surveyid&subaction=tokenify")."\" onmouseout=\"hideTooltip()\" onmouseover=\"showTooltip(event,'".$clang->gT("Generate Tokens", "js")."');return false\">" .
|
||||
"<img name='TokenifyButton' src='$imagefiles/tokenify.png' title='' align='left' alt='' /></a>\n"
|
||||
."\t\t\t<img src='$imagefiles/seperator.gif' border='0' hspace='0' align='left' alt='' />\n"
|
||||
// ."\t\t\t<a href=\"#\" onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=kill', '_top')\" onmouseout=\"hideTooltip()\" onmouseover=\"showTooltip(event,'".$clang->gT("Drop tokens table", "js")."');return false\">" .
|
||||
// ."\t\t\t<a href=\"#\" onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=kill', '_self')\" onmouseout=\"hideTooltip()\" onmouseover=\"showTooltip(event,'".$clang->gT("Drop tokens table", "js")."');return false\">" .
|
||||
."\t\t\t<a href=\"#\" onclick=\"".get2post("$scriptname?action=tokens&sid=$surveyid&subaction=kill")."\" onmouseout=\"hideTooltip()\" onmouseover=\"showTooltip(event,'".$clang->gT("Drop tokens table", "js")."');return false\">" .
|
||||
"<img name='DeleteTokensButton' src='$imagefiles/delete.png' title='' align='left' alt='' /></a>\n"
|
||||
."\t\t</td>\n";
|
||||
@@ -879,9 +879,9 @@ if ($subaction == "browse" || $subaction == "search")
|
||||
{
|
||||
$tokenoutput .= "\t\t<td align='left'>\n"
|
||||
."\t\t\t<input style='height: 16; width: 16px; font-size: 8; font-family: verdana' type='submit' value='E' title='"
|
||||
.$clang->gT("Edit Token Entry")."' onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=edit&tid=".$brow['tid']."', '_top')\" />"
|
||||
.$clang->gT("Edit Token Entry")."' onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=edit&tid=".$brow['tid']."', '_self')\" />"
|
||||
."<input style='height: 16; width: 16px; font-size: 8; font-family: verdana' type='submit' value='D' title='"
|
||||
// .$clang->gT("Delete Token Entry")."' onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=delete&tid=".$brow['tid']."&limit=$limit&start=$start&order=$order', '_top')\" />";
|
||||
// .$clang->gT("Delete Token Entry")."' onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=delete&tid=".$brow['tid']."&limit=$limit&start=$start&order=$order', '_self')\" />";
|
||||
.$clang->gT("Delete Token Entry")."' onclick=\"".get2post("$scriptname?action=tokens&sid=$surveyid&subaction=delete&tid=".$brow['tid']."&limit=$limit&start=$start&order=$order")."\" />";
|
||||
if (($brow['completed'] == "N" || $brow['completed'] == "") &&$brow['token']) {$tokenoutput .= "<input style='height: 16; width: 16px; font-size: 8; font-family: verdana' type='submit' value='S' title='".$clang->gT("Do Survey")."' onclick=\"window.open('$publicurl/index.php?sid=$surveyid&lang=".$brow['language']."&token=".trim($brow['token'])."', '_blank')\" />\n";}
|
||||
$tokenoutput .= "\n\t\t</td>\n";
|
||||
@@ -927,7 +927,7 @@ if ($subaction == "browse" || $subaction == "search")
|
||||
{
|
||||
$tokenoutput .= "\t\t<td align='center' valign='middle'>\n"
|
||||
."\t\t\t<input style='height: 16; width: 16px; font-size: 8; font-family: verdana' type='submit' value='I' title='"
|
||||
.$clang->gT("Send invitation email to this entry")."' onclick=\"window.open('{$_SERVER['PHP_SELF']}?action=tokens&sid=$surveyid&subaction=email&tid=".$brow['tid']."', '_top')\" />"
|
||||
.$clang->gT("Send invitation email to this entry")."' onclick=\"window.open('{$_SERVER['PHP_SELF']}?action=tokens&sid=$surveyid&subaction=email&tid=".$brow['tid']."', '_self')\" />"
|
||||
."\t\t</td>\n";
|
||||
}
|
||||
|
||||
@@ -936,7 +936,7 @@ if ($subaction == "browse" || $subaction == "search")
|
||||
{
|
||||
$tokenoutput .= "\t\t<td align='center' valign='middle'>\n"
|
||||
."\t\t\t<input style='height: 16; width: 16px; font-size: 8; font-family: verdana' type='submit' value='R' title='"
|
||||
.$clang->gT("Send reminder email to this entry")."' onclick=\"window.open('{$_SERVER['PHP_SELF']}?sid=$surveyid&action=tokens&subaction=remind&tid=".$brow['tid']."', '_top')\" />"
|
||||
.$clang->gT("Send reminder email to this entry")."' onclick=\"window.open('{$_SERVER['PHP_SELF']}?sid=$surveyid&action=tokens&subaction=remind&tid=".$brow['tid']."', '_self')\" />"
|
||||
."\t\t</td>\n";
|
||||
}
|
||||
else
|
||||
@@ -969,10 +969,10 @@ if ($subaction == "kill" &&
|
||||
.$clang->gT("If you delete this table tokens will no longer be required to access this survey.")."<br />".$clang->gT("A backup of this table will be made if you proceed. Your system administrator will be able to access this table.")."<br />\n"
|
||||
."( \"old_tokens_{$surveyid}_$date\" )<br /><br />\n"
|
||||
."<input type='submit' value='"
|
||||
// .$clang->gT("Delete Tokens")."' onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=kill&ok=surething', '_top')\" /><br />\n"
|
||||
// .$clang->gT("Delete Tokens")."' onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=kill&ok=surething', '_self')\" /><br />\n"
|
||||
.$clang->gT("Delete Tokens")."' onclick=\"".get2post("$scriptname?action=tokens&sid=$surveyid&subaction=kill&ok=surething")."\" /><br />\n"
|
||||
."<input type='submit' value='"
|
||||
.$clang->gT("Cancel")."' onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid', '_top')\" />\n";
|
||||
.$clang->gT("Cancel")."' onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid', '_self')\" />\n";
|
||||
}
|
||||
elseif (isset($_POST['ok']) && $_POST['ok'] == "surething")
|
||||
{
|
||||
@@ -997,7 +997,7 @@ if ($subaction == "kill" &&
|
||||
.$clang->gT("The tokens table has now been removed and tokens are no longer required to access this survey.")."<br /> ".$clang->gT("A backup of this table has been made and can be accessed by your system administrator.")."<br />\n"
|
||||
."(\"{$dbprefix}old_tokens_{$surveyid}_$date\")"."<br /><br />\n"
|
||||
."<input type='submit' value='"
|
||||
.$clang->gT("Main Admin Screen")."' onclick=\"window.open('$scriptname?sid={$surveyid}', '_top')\" />\n"
|
||||
.$clang->gT("Main Admin Screen")."' onclick=\"window.open('$scriptname?sid={$surveyid}', '_self')\" />\n"
|
||||
."</span>\n";
|
||||
}
|
||||
$tokenoutput .= "</font></td></tr></table>\n"
|
||||
@@ -1510,10 +1510,10 @@ if ($subaction == "tokenify" &&
|
||||
{
|
||||
$tokenoutput .= "<br />".$clang->gT("Clicking yes will generate tokens for all those in this token list that have not been issued one. Is this OK?")."<br /><br />\n"
|
||||
."<input type='submit' value='"
|
||||
// .$clang->gT("Yes")."' onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=tokenify&ok=Y', '_top')\" />\n"
|
||||
// .$clang->gT("Yes")."' onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid&subaction=tokenify&ok=Y', '_self')\" />\n"
|
||||
.$clang->gT("Yes")."' onclick=\"".get2post("$scriptname?action=tokens&sid=$surveyid&subaction=tokenify&ok=Y")."\" />\n"
|
||||
."<input type='submit' value='"
|
||||
.$clang->gT("No")."' onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid', '_top')\" />\n"
|
||||
.$clang->gT("No")."' onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid', '_self')\" />\n"
|
||||
."<br /><br />\n";
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user