Navigation Menu

Skip to content

Commit

Permalink
Javascript mandatory popup now waits until after <html>, now presents…
Browse files Browse the repository at this point in the history
… $surveyadminname and $surveyadminemail in error messages where survey has been found.

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@902 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
jcleeland committed Feb 6, 2004
1 parent b40ea47 commit fe1fe6f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions group.php
Expand Up @@ -731,6 +731,7 @@
//READ TEMPLATES, INSERT DATA AND PRESENT PAGE
sendcacheheaders();
echo "<html>\n";
if (isset($popup)) {echo $popup;}
foreach(file("$thistpl/startpage.pstpl") as $op)
{
echo templatereplace($op);
Expand Down
6 changes: 4 additions & 2 deletions index.php
Expand Up @@ -97,6 +97,8 @@
$sendnotification = $row['notification'];
}

if (!$surveyadminemail) {$surveyadminemail=$siteadminemail;}
if (!$surveyadminname) {$surveyadminname=$siteadminname;}
//SEE IF SURVEY USES TOKENS
$i = 0; $tokensexist = 0;
$tresult = @mysql_list_tables($databasename) or die ("Error getting tokens<br />".mysql_error());
Expand Down Expand Up @@ -128,7 +130,7 @@
}
echo "\t\t<center><br />\n"
."\t\t\t"._SURVEYEXPIRED."<br /><br />\n"
."\t\t\t"._CONTACT1." <i>$siteadminname</i> (<i>$siteadminemail</i>) "
."\t\t\t"._CONTACT1." <i>$surveyadminname</i> (<i>$surveyadminemail</i>) "
._CONTACT2."<br /><br />\n";
$output=file("$tpldir/default/endpage.pstpl");
foreach ($output as $op)
Expand All @@ -154,7 +156,7 @@
echo "\t\t<center><br />\n"
."\t\t\t<font color='RED'><b>"._ERROR_PS."</b></font><br />\n"
."\t\t\t"._SURVEYCOMPLETE."<br /><br />\n"
."\t\t\t"._CONTACT1." <i>$siteadminname</i> (<i>$siteadminemail</i>) "
."\t\t\t"._CONTACT1." <i>$surveyadminname</i> (<i>$surveyadminemail</i>) "
._CONTACT2."<br /><br />\n";
$output=file("$tpldir/default/endpage.pstpl");
foreach($output as $op)
Expand Down
2 changes: 1 addition & 1 deletion qanda.php
Expand Up @@ -1101,7 +1101,7 @@
//POPUP WARNING
if (!isset($mandatorypopup))
{
echo "<script type=\"text/javascript\">\n<!--\n alert(\""._MANDATORY_POPUP."\")\n //-->\n</script>\n";
$popup="<script type=\"text/javascript\">\n<!--\n alert(\""._MANDATORY_POPUP."\")\n //-->\n</script>\n";
$mandatorypopup="Y";
}
}
Expand Down
3 changes: 3 additions & 0 deletions question.php
Expand Up @@ -750,6 +750,9 @@
$percentcomplete = makegraph($_SESSION['step'], $_SESSION['totalsteps']);

//READ TEMPLATES, INSERT DATA AND PRESENT PAGE
sendcacheheaders();
echo "<html>\n";
if (isset($popup)) {echo $popup;}
foreach(file("$thistpl/startpage.pstpl") as $op)
{
echo templatereplace($op);
Expand Down
1 change: 1 addition & 0 deletions survey.php
Expand Up @@ -686,6 +686,7 @@
//READ TEMPLATES, INSERT DATA AND PRESENT PAGE
sendcacheheaders();
echo "<html>\n";
if(isset($popup)) {echo $popup;}
foreach(file("$thistpl/startpage.pstpl") as $op)
{
echo templatereplace($op);
Expand Down

0 comments on commit fe1fe6f

Please sign in to comment.