Skip to content

Commit

Permalink
Removed lots of unnecessary style declarations using variables
Browse files Browse the repository at this point in the history
Starting to introduce a new install/update DB scheme (meaning the basic ceation of different DB types)

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/phpsurveyor@1901 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Aug 13, 2006
1 parent 1b2e7ac commit 4dbf4f3
Show file tree
Hide file tree
Showing 38 changed files with 980 additions and 402 deletions.
12 changes: 6 additions & 6 deletions admin/activate.php
Expand Up @@ -213,7 +213,7 @@
echo "\t</tr>\n";
echo "\t<tr>\n";
echo "\t\t<td align='center'>\n";
echo "\t\t\t<input type='submit' $btstyle value='"._("Main Admin Screen")."' onClick=\"window.open('$scriptname?sid={$_GET['sid']}', '_top')\">\n";
echo "\t\t\t<input type='submit' value='"._("Main Admin Screen")."' onClick=\"window.open('$scriptname?sid={$_GET['sid']}', '_top')\">\n";
echo "\t\t</td>\n";
echo "\t</tr>\n";
echo "</table>\n";
Expand All @@ -239,8 +239,8 @@
echo "\t</tr>\n";
echo "\t<tr>\n";
echo "\t\t<td align='center'>\n";
echo "\t\t\t<input type='submit' $btstyle value=\""._("Cancel")."\" onclick=\"window.open('$scriptname?sid={$_GET['sid']}', '_top')\"><br />\n";
echo "\t\t\t<input type='submit' $btstyle value=\""._("Activate")."\" onClick=\"window.open('$scriptname?action=activate&amp;ok=Y&amp;sid={$_GET['sid']}', '_top')\">\n";
echo "\t\t\t<input type='submit' value=\""._("Cancel")."\" onclick=\"window.open('$scriptname?sid={$_GET['sid']}', '_top')\"><br />\n";
echo "\t\t\t<input type='submit' value=\""._("Activate")."\" onClick=\"window.open('$scriptname?action=activate&amp;ok=Y&amp;sid={$_GET['sid']}', '_top')\">\n";
echo "\t\t</td>\n";
echo "\t</tr>\n";
echo "</table>\n";
Expand Down Expand Up @@ -458,17 +458,17 @@
if (isset($surveynotprivate) && $surveynotprivate) //This survey is tracked, and therefore a tokens table MUST exist
{
echo _("This is not an anonymous survey. A token table must also be created.")."<br /><br />\n";
echo "<input type='submit' value='"._("Initialise Tokens")."' $btstyle onClick=\"window.open('tokens.php?sid={$_GET['sid']}&amp;createtable=Y', '_top')\">\n";
echo "<input type='submit' value='"._("Initialise Tokens")."' onClick=\"window.open('tokens.php?sid={$_GET['sid']}&amp;createtable=Y', '_top')\">\n";
}
elseif (isset($surveyallowsregistration) && $surveyallowsregistration == "TRUE")
{
echo _("This survey allows public registration. A token table must also be created.")."<br /><br />\n";
echo "<input type='submit' value='"._("Initialise Tokens")."' $btstyle onClick=\"window.open('tokens.php?sid={$_GET['sid']}&amp;createtable=Y', '_top')\">\n";
echo "<input type='submit' value='"._("Initialise Tokens")."' onClick=\"window.open('tokens.php?sid={$_GET['sid']}&amp;createtable=Y', '_top')\">\n";
}
else
{
echo _("This survey is now active, and responses can be recorded.")."<br /><br />\n";
echo "<input type='submit' value='"._("Main Admin Screen")."' $btstyle onClick=\"window.open('$scriptname?sid={$_GET['sid']}', '_top')\">\n";
echo "<input type='submit' value='"._("Main Admin Screen")."' onClick=\"window.open('$scriptname?sid={$_GET['sid']}', '_top')\">\n";
}
echo "\t\t\t\t</font></font></td></tr></table>\n";
echo "</body>\n</html>";
Expand Down
2 changes: 1 addition & 1 deletion admin/admin.php
Expand Up @@ -84,7 +84,7 @@
._("Either your selected database has not yet been created or there is a problem accessing it.")."<br />\n"
._("PHPSurveyor can attempt to create this database for you.")."<br /><br />\n"
._("Your selected database name is:")." $databasename<br />\n"
."<br /><input $btstyle type='submit' value='"
."<br /><input type='submit' value='"
._("Create Database")."' onClick='location.href=\"createdb.php\"' /></center>\n"
."</td></tr></table>\n"
."</body>\n</html>\n";
Expand Down
4 changes: 2 additions & 2 deletions admin/assessments.php
Expand Up @@ -153,12 +153,12 @@
echo "<td>
<table width='100%'>
<tr><td align='center'><form method='post' action='assessments.php?sid=$surveyid'>
<input $btstyle type='submit' value='"._("Edit")."'>
<input type='submit' value='"._("Edit")."'>
<input type='hidden' name='action' value='edit'>
<input type='hidden' name='id' value='".$assess['id']."'>
</form></td>
<td align='center'><form method='post' action='assessments.php?sid=$surveyid'>
<input $btstyle type='submit' value='"._("Delete")."' onClick='return confirm(\""._("Are you sure you want to delete this entry.")."\")'>
<input type='submit' value='"._("Delete")."' onClick='return confirm(\""._("Are you sure you want to delete this entry.")."\")'>
<input type='hidden' name='action' value='delete'>
<input type='hidden' name='id' value='".$assess['id']."'>
</form>
Expand Down
14 changes: 7 additions & 7 deletions admin/browse.php
Expand Up @@ -66,7 +66,7 @@
."<strong><font color='red'>"._("Error")."</font></strong><br />\n"
. _("The defined surveyor database does not exist")."<br />\n"
. _("Either your selected database has not yet been created or there is a problem accessing it.")."<br /><br />\n"
."<input $btstyle type='submit' value='"._("Main Admin Screen")."' onClick=\"window.open('$scriptname', '_top')\"><br />\n"
."<input type='submit' value='"._("Main Admin Screen")."' onClick=\"window.open('$scriptname', '_top')\"><br />\n"
."</td></tr></table>\n"
."</body>\n</html>";
exit;
Expand All @@ -78,7 +78,7 @@
."\t<tr bgcolor='#CCCCCC'><td align='center'>$setfont\n"
."<strong><font color='red'>"._("Error")."</font></strong><br />\n"
. _("You have not selected a survey to browse.")."<br /><br />\n"
."<input $btstyle type='submit' value='"
."<input type='submit' value='"
. _("Main Admin Screen")."' onClick=\"window.open('$scriptname', '_top')\"><br />\n"
."</td></tr></table>\n"
."</body>\n</html>";
Expand All @@ -102,7 +102,7 @@
."\t<tr bgcolor='#CCCCCC'><td align='center'>$setfont\n"
."<strong><font color='red'>"._("Error")."</font></strong><br />\n"
. _("This survey has not been activated. There are no results to browse.")."<br /><br />\n"
."<input $btstyle type='submit' value='"
."<input type='submit' value='"
. _("Main Admin Screen")."' onClick=\"window.open('$scriptname?sid=$surveyid', '_top')\"><br />\n"
."</td></tr></table>\n"
."</body>\n</html>";
Expand All @@ -117,7 +117,7 @@
."\t<tr bgcolor='#CCCCCC'><td align='center'>$setfont\n"
."<strong><font color='red'>"._("Error")."</font></strong><br />\n"
. _("There is no matching survey.")." ($surveyid)<br /><br />\n"
."<input $btstyle type='submit' value='"._("Main Admin Screen")."' onClick=\"window.open('$scriptname', '_top')\"><br />\n"
."<input type='submit' value='"._("Main Admin Screen")."' onClick=\"window.open('$scriptname', '_top')\"><br />\n"
."</td></tr></table>\n"
."</body>\n</html>";
exit;
Expand Down Expand Up @@ -273,7 +273,7 @@
."<table width='99%' align='center'>\n"
."\t<tr>\n"
."\t\t<td $singleborderstyle bgcolor='#EEEEEE' align='center'>\n";
if (isset($_POST['sql']) && $_POST['sql']) {echo "\t\t\t<input type='submit' $btstyle value='Close Window' onClick=\"window.close();\" />\n";}
if (isset($_POST['sql']) && $_POST['sql']) {echo "\t\t\t<input type='submit' value='Close Window' onClick=\"window.close();\" />\n";}
echo "\t\t</td>\n"
."\t</tr>\n"
."</table>\n";
Expand Down Expand Up @@ -489,8 +489,8 @@
."\t\t<td align='right'>\n"
."\t\t<form action='browse.php' method='post'><font size='1' face='verdana'>\n"
."\t\t\t<img src='$imagefiles/blank.gif' width='31' height='20' border='0' hspace='0' align='right' alt=''>\n"
."\t\t\t"._("Records Displayed:")."<input type='text' $slstyle size='4' value='$dtcount2' name='limit'>\n"
."\t\t\t"._("Starting From:")."<input type='text' $slstyle size='4' value='$start' name='start'>\n"
."\t\t\t"._("Records Displayed:")."<input type='text' size='4' value='$dtcount2' name='limit'>\n"
."\t\t\t"._("Starting From:")."<input type='text' size='4' value='$start' name='start'>\n"
."\t\t\t<input type='submit' value='"._("Show")."' $btstyle>\n"
."\t\t</font>\n"
."\t\t<input type='hidden' name='sid' value='$surveyid'>\n"
Expand Down
2 changes: 1 addition & 1 deletion admin/checkfields.php
Expand Up @@ -312,7 +312,7 @@ function checktable($tablename)

echo "</font></font></font></td></tr>\n";
echo "<tr><td align='center' bgcolor='#CCCCCC'>\n";
echo "<input $btstyle type='submit' value='"._("Main Admin Screen")."' onClick=\"window.open('$scriptname', '_top')\">\n";
echo "<input type='submit' value='"._("Main Admin Screen")."' onClick=\"window.open('$scriptname', '_top')\">\n";

echo "</td></tr></table>\n";
echo "<br />\n";
Expand Down
6 changes: 3 additions & 3 deletions admin/conditions.php
Expand Up @@ -614,7 +614,7 @@
."\t</tr>\n";

echo "\t<tr><td colspan='3' align='center'>$setfont\n"
."<input type='submit' value='"._("Copy Conditions")."' $btstyle onclick=\"return confirm('"._("Are you sure you want to copy these condition(s) to the questions you have selected?")."')\">"
."<input type='submit' value='"._("Copy Conditions")."' onclick=\"return confirm('"._("Are you sure you want to copy these condition(s) to the questions you have selected?")."')\">"
."\t\t</font>\n";

echo "<input type='hidden' name='action' value='copyconditions'>\n"
Expand Down Expand Up @@ -674,8 +674,8 @@
."\t</tr>\n"
."\t<tr>\n"
."\t\t<td colspan='3' align='center'>\n"
."\t\t\t<input type='reset' value='"._("Clear")."' onClick=\"clearAnswers()\" $btstyle />\n"
."\t\t\t<input type='submit' value='"._("Add Condition")."' $btstyle />\n"
."\t\t\t<input type='reset' value='"._("Clear")."' onClick=\"clearAnswers()\" />\n"
."\t\t\t<input type='submit' value='"._("Add Condition")."' />\n"
."<input type='hidden' name='sid' value='$surveyid' />\n"
."<input type='hidden' name='qid' value='$qid' />\n"
."<input type='hidden' name='action' value='insertcondition' />\n"
Expand Down
6 changes: 3 additions & 3 deletions admin/createdb.php
Expand Up @@ -52,7 +52,7 @@
echo _("Database Information not provided. This script must be run from admin.php only.");

echo "<br /><br />\n";
echo "<input $btstyle type='submit' value='"._("Main Admin Screen")."' onClick='location.href=\"$scriptname\"'>";
echo "<input type='submit' value='"._("Main Admin Screen")."' onClick='location.href=\"$scriptname\"'>";
exit;
}
if (!$database_exists) //Database named in config.php does not exist
Expand All @@ -74,15 +74,15 @@
echo "<br />$setfont<strong><font color='green'>\n";
echo _("Database has been created.")."</font></strong><br /><br />\n";
echo _("Please click below to populate the database")."<br /><br />\n";
echo "<input $btstyle type='submit' value='"._("Populate Database")."' onClick='location.href=\"checkfields.php\"'>";
echo "<input type='submit' value='"._("Populate Database")."' onClick='location.href=\"checkfields.php\"'>";
}
else
{
echo "<strong>$setfont<font color='red'>"._("Error")."</strong></font><br />\n";
echo _("Could not create database")." ($dbname)<br /><font size='1'>\n";
echo $connect->ErrorMsg();
echo "</font><br /><br />\n";
echo "<input $btstyle type='submit' value='"._("Main Admin Screen")."' onClick='location.href=\"$scriptname\"'>";
echo "<input type='submit' value='"._("Main Admin Screen")."' onClick='location.href=\"$scriptname\"'>";
}
}
echo "</td></tr></table>\n";
Expand Down
10 changes: 5 additions & 5 deletions admin/dataentry.php
Expand Up @@ -56,7 +56,7 @@
."<strong><font color='red'>"._("Error")."</font></strong><br />\n"
._("The defined surveyor database does not exist")."<br />\n"
._("Either your selected database has not yet been created or there is a problem accessing it.")."<br /><br />\n"
."<input $btstyle type='submit' value='"
."<input type='submit' value='"
._("Main Admin Screen")."' onClick=\"window.open('$scriptname', '_top')\"></font><br />\n"
."</td></tr></table>\n"
."</body>\n";
Expand All @@ -71,7 +71,7 @@
."\t<tr bgcolor='#CCCCCC'><td align='center'>$setfont\n"
."<strong><font color='red'>"._("Error")."</font></strong><br />\n"
._("You have not selected a survey for data-entry.")."<br /><br />\n"
."<input $btstyle type='submit' value='"
."<input type='submit' value='"
._("Main Admin Screen")."' onClick=\"window.open('$scriptname', '_top')\"><br />\n"
."</font></td></tr></table>\n"
."</body>\n";
Expand Down Expand Up @@ -1146,7 +1146,7 @@
{
echo " <tr>
<td bgcolor='#CCCCCC' align='center'>
<input type='submit' $btstyle value='"._("Update Entry")."'>
<input type='submit' value='"._("Update Entry")."'>
<input type='hidden' name='id' value='$id'>
<input type='hidden' name='sid' value='$surveyid'>
<input type='hidden' name='action' value='update'>
Expand Down Expand Up @@ -1194,7 +1194,7 @@ function saveshow(value)
."</div>\n";
echo " <tr>
<td bgcolor='#CCCCCC' align='center'>
<input type='submit' $btstyle value='"._("submit")."'>
<input type='submit' value='"._("submit")."'>
<input type='hidden' name='sid' value='$surveyid'>
<input type='hidden' name='action' value='insert'>
<input type='hidden' name='surveytable' value='{$dbprefix}survey_$surveyid'>
Expand Down Expand Up @@ -2131,7 +2131,7 @@ function saveshow(value)
echo "\t\t<td colspan='3' align='center' bgcolor='#CCCCCC'>$setfont\n";
echo "\t\t\t<font color='red'><strong>"._("Error")."</strong></font><br />\n";
echo "\t\t\t"._("The survey you selected does not exist")."</font><br /><br />\n";
echo "\t\t\t<input $btstyle type='submit' value='"._("Main Admin Screen")."' onClick=\"window.open('$scriptname', '_top')\">\n";
echo "\t\t\t<input type='submit' value='"._("Main Admin Screen")."' onClick=\"window.open('$scriptname', '_top')\">\n";
echo "\t\t</td>\n";
echo "\t</tr>\n";
echo "</table>";
Expand Down
6 changes: 3 additions & 3 deletions admin/deactivate.php
Expand Up @@ -59,8 +59,8 @@
echo "\t</tr>\n";
echo "\t<tr>\n";
echo "\t\t<td align='center'>\n";
echo "\t\t\t<input type='submit' $btstyle value='"._("Cancel")."' onClick=\"window.open('$scriptname?sid={$_GET['sid']}', '_top')\"><br />\n";
echo "\t\t\t<input type='submit' $btstyle value='"._("De-Activate")."' onClick=\"window.open('$scriptname?action=deactivate&amp;ok=Y&amp;sid={$_GET['sid']}', '_top')\">\n";
echo "\t\t\t<input type='submit' value='"._("Cancel")."' onClick=\"window.open('$scriptname?sid={$_GET['sid']}', '_top')\"><br />\n";
echo "\t\t\t<input type='submit' value='"._("De-Activate")."' onClick=\"window.open('$scriptname?action=deactivate&amp;ok=Y&amp;sid={$_GET['sid']}', '_top')\">\n";
echo "\t\t</td>\n";
echo "\t</tr>\n";
echo "</table>\n";
Expand Down Expand Up @@ -124,7 +124,7 @@
echo "\t</tr>\n";
echo "\t<tr>\n";
echo "\t\t<td align='center'>\n";
echo "\t\t\t<input type='submit' $btstyle value='"._("Main Admin Screen")."' onClick=\"window.open('$scriptname?sid={$_GET['sid']}', '_top')\">\n";
echo "\t\t\t<input type='submit' value='"._("Main Admin Screen")."' onClick=\"window.open('$scriptname?sid={$_GET['sid']}', '_top')\">\n";
echo "\t\t</td>\n";
echo "\t</tr>\n";
echo "</table>\n";
Expand Down
8 changes: 4 additions & 4 deletions admin/deletesurvey.php
Expand Up @@ -51,7 +51,7 @@
{
echo "<br /><font color='red'><strong>"._("Error")."</strong></font><br />\n";
echo _("You have not selected a survey to delete")."<br /><br />\n";
echo "<input type='submit' $btstyle value='"._("Main Admin Screen")."' onClick=\"window.open('$scriptname', '_top')\">\n";
echo "<input type='submit' value='"._("Main Admin Screen")."' onClick=\"window.open('$scriptname', '_top')\">\n";
echo "</td></tr></table>\n";
echo "</body>\n</html>";
exit;
Expand Down Expand Up @@ -83,8 +83,8 @@
echo "\t</tr>\n";
echo "\t<tr>\n";
echo "\t\t<td align='center'><br />\n";
echo "\t\t\t<input type='submit' $btstyle value='"._("Cancel")."' onClick=\"window.open('admin.php?sid=$surveyid', '_top')\" /><br />\n";
echo "\t\t\t<input type='submit' $btstyle value='"._("Delete")."' onClick=\"window.open('{$_SERVER['PHP_SELF']}?sid=$surveyid&amp;ok=Y','_top')\" />\n";
echo "\t\t\t<input type='submit' value='"._("Cancel")."' onClick=\"window.open('admin.php?sid=$surveyid', '_top')\" /><br />\n";
echo "\t\t\t<input type='submit' value='"._("Delete")."' onClick=\"window.open('{$_SERVER['PHP_SELF']}?sid=$surveyid&amp;ok=Y','_top')\" />\n";
echo "\t\t</td>\n";
echo "\t</tr>\n";
echo "</table>\n";
Expand Down Expand Up @@ -134,7 +134,7 @@
echo "\t<tr>\n";
echo "\t\t<td align='center'>$setfont<br />\n";
echo "\t\t\t<strong>"._("This survey has been deleted.")."<br /><br />\n";
echo "\t\t\t<input type='submit' $btstyle value='"._("Main Admin Screen")."' onClick=\"window.open('$scriptname', '_top')\">\n";
echo "\t\t\t<input type='submit' value='"._("Main Admin Screen")."' onClick=\"window.open('$scriptname', '_top')\">\n";
echo "\t\t</strong></font></td>\n";
echo "\t</tr>\n";
echo "</table>\n";
Expand Down
2 changes: 1 addition & 1 deletion admin/dumpgroup.php
Expand Up @@ -56,7 +56,7 @@
echo "\t<tr bgcolor='#555555'><td colspan='2' height='4'><font size='1' face='verdana' color='white'><strong>"._("Export Question")."</strong></td></tr>\n";
echo "\t<tr bgcolor='#CCCCCC'><td align='center'>$setfont\n";
echo "$setfont<br /><strong><font color='red'>"._("Error")."</font></strong><br />\n"._EQ_NOGID."<br />\n";
echo "<br /><input type='submit' $btstyle value='"._("Main Admin Screen")."' onClick=\"window.open('$scriptname', '_top')\">\n";
echo "<br /><input type='submit' value='"._("Main Admin Screen")."' onClick=\"window.open('$scriptname', '_top')\">\n";
echo "\t</td></tr>\n";
echo "</table>\n";
echo "</body></html>\n";
Expand Down
2 changes: 1 addition & 1 deletion admin/dumplabel.php
Expand Up @@ -56,7 +56,7 @@
echo "\t<tr bgcolor='#555555'><td colspan='2' height='4'><font size='1' face='verdana' color='white'><strong>"._("Export Label Set")."</strong></td></tr>\n";
echo "\t<tr bgcolor='#CCCCCC'><td align='center'>$setfont\n";
echo "$setfont<br /><strong><font color='red'>"._("Error")."</font></strong><br />\n"._("No LID has been provided. Cannot dump label set.")."<br />\n";
echo "<br /><input type='submit' $btstyle value='"._("Main Admin Screen")."' onClick=\"window.open('$scriptname', '_top')\">\n";
echo "<br /><input type='submit' value='"._("Main Admin Screen")."' onClick=\"window.open('$scriptname', '_top')\">\n";
echo "\t</td></tr>\n";
echo "</table>\n";
echo "</body></html>\n";
Expand Down
2 changes: 1 addition & 1 deletion admin/dumpquestion.php
Expand Up @@ -56,7 +56,7 @@
echo "\t<tr bgcolor='#555555'><td colspan='2' height='4'><font size='1' face='verdana' color='white'><strong>"._("Export Question")."</strong></td></tr>\n";
echo "\t<tr bgcolor='#CCCCCC'><td align='center'>$setfont\n";
echo "$setfont<br /><strong><font color='red'>"._("Error")."</font></strong><br />\n"._("No QID has been provided. Cannot dump question.")."<br />\n";
echo "<br /><input type='submit' $btstyle value='"._("Main Admin Screen")."' onClick=\"window.open('$scriptname', '_top')\">\n";
echo "<br /><input type='submit' value='"._("Main Admin Screen")."' onClick=\"window.open('$scriptname', '_top')\">\n";
echo "\t</td></tr>\n";
echo "</table>\n";
echo "</body></html>\n";
Expand Down
2 changes: 1 addition & 1 deletion admin/dumpsurvey.php
Expand Up @@ -58,7 +58,7 @@
."$setfont<br /><strong><font color='red'>"
._("Error")."</font></strong><br />\n"
._("No SID has been provided. Cannot dump survey")."<br />\n"
."<br /><input type='submit' $btstyle value='"
."<br /><input type='submit' value='"
._("Main Admin Screen")."' onClick=\"window.open('$scriptname', '_top')\">\n"
."\t</td></tr>\n"
."</table>\n"
Expand Down
6 changes: 3 additions & 3 deletions admin/export.php
Expand Up @@ -161,7 +161,7 @@
."\t<tr><td height='2' bgcolor='silver'></td></tr>\n"
."\t<tr>\n"
."\t\t<td align='center' bgcolor='silver'>\n"
."\t\t\t$setfont<input $btstyle type='submit' value='"
."\t\t\t$setfont<input type='submit' value='"
._("Export Data")."'>\n"
."\t\t\t<input type='hidden' name='sid' value='$surveyid'>\n"
."\t\t</font></td>\n"
Expand All @@ -180,7 +180,7 @@
.stripcslashes(returnglobal('id'))
."\">\n";
}
echo "\t\t\t<input $btstyle type='submit' value='"
echo "\t\t\t<input type='submit' value='"
._("Close Window")."' onClick=\"self.close()\">\n"
."\t\t</td>\n"
."\t</tr>\n"
Expand Down Expand Up @@ -225,7 +225,7 @@
."\t</tr>\n"
."\t<tr>\n"
."\t\t<td align='center'>$setfont<font size='1'>\n"
."\t\t\t<select name='colselect[]' $slstyle2 multiple size='15'>\n";
."\t\t\t<select name='colselect[]' multiple size='15'>\n";
$i=1;
foreach($excesscols as $ec)
{
Expand Down

0 comments on commit 4dbf4f3

Please sign in to comment.