Skip to content

Commit

Permalink
Updated with new look and feel
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@415 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
jcleeland committed Jun 29, 2003
1 parent a62847e commit a37accc
Show file tree
Hide file tree
Showing 3 changed files with 291 additions and 114 deletions.
78 changes: 75 additions & 3 deletions admin/admin.php
Expand Up @@ -53,6 +53,23 @@
include("config.php");
echo $htmlheader;

echo "<script type='text/javascript'>\n";
echo "<!--\n";
echo "\tfunction showhelp(action)\n";
echo "\t\t{\n";
echo "\t\tvar name='help';\n";
echo "\t\tif (action == \"hide\")\n";
echo "\t\t\t{\n";
echo "\t\t\tdocument.getElementById(name).style.display='none';\n";
echo "\t\t\t}\n";
echo "\t\telse if (action == \"show\")\n";
echo "\t\t\t{\n";
echo "\t\t\tdocument.getElementById(name).style.display='';\n";
echo "\t\t\t}\n";
echo "\t\t}\n";
echo "-->\n";
echo "</script>\n";

// CHECK IF FIRST USE!
if (!mysql_selectdb ($databasename, $connect))
{
Expand Down Expand Up @@ -110,16 +127,20 @@
//$cellstyle = "style='border: 1px inset #000080'";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0' >\n";
echo "\t<tr>\n";
echo "\t\t<td width='25%' valign='top' align='center' bgcolor='#BBBBBB'>\n";
echo "\t\t<td valign='top' align='center' bgcolor='#BBBBBB'>\n";
echo "\t\t\t<font size='2'>\n";
echo "$adminmenu\n";
echo "\t\t</td>\n";
//echo "\t\t</td>\n";

echo "\t\t<td width='75%' valign='top' $cellstyle>\n";
//echo "\t</tr>\n";
//echo "\t<tr>\n";
//echo "\t\t<td>\n";
//echo "\t\t<td width='75%' valign='top' $cellstyle>\n";
if ($action == "newsurvey")
{
echo "$newsurvey\n";
echo "\t\t</td>\n";
helpscreen();
echo "\t</tr>\n";
echo htmlfooter("instructions.html", "Using PHPSurveyors Admin Script");
exit;
Expand All @@ -140,8 +161,59 @@
if ($vasummary) {echo "$vasummary";}
if ($editanswer) {echo "$editanswer";}
echo "\t\t</td>\n";

helpscreen();

echo "\t</tr>\n";
echo "</table>\n";

echo htmlfooter("instructions.html", "Using PHPSurveyors Admin Script");

function helpscreen()
{
global $homeurl, $defaultlang;
global $sid, $gid, $qid;
echo "\t\t<td id='help' width='150' valign='top' style='display: none' bgcolor='#CCCCCC'>\n";
echo "\t\t\t<table width='100%'><tr><td><table width='100%' height='100%' align='center' cellspacing='0'>\n";
echo "\t\t\t\t<tr>\n";
echo "\t\t\t\t\t<td bgcolor='#555555' height='8'>\n";
echo "\t\t\t\t\t\t<font color='white' size='1'><b>Help\n";
echo "\t\t\t\t\t</td>\n";
echo "\t\t\t\t</tr>\n";
echo "\t\t\t\t<tr>\n";
echo "\t\t\t\t\t<td align='center' bgcolor='#AAAAAA' style='border-style: solid; border-width: 1; border-color: #555555'>\n";
echo "\t\t\t\t\t\t<img src='./images/blank.gif' width='20' hspace='0' border='0' align='left'>\n";
echo "\t\t\t\t\t\t<input type='image' src='./images/close.gif' align='right' border='0' hspace='0' onClick=\"showhelp('hide')\">\n";
echo "\t\t\t\t\t</td>\n";
echo "\t\t\t\t</tr>\n";
echo "\t\t\t\t<tr>\n";
echo "\t\t\t\t\t<td bgcolor='silver' height='100%' style='border-style: solid; border-width: 1; border-color: #333333'>\n";
//determine which help document to show
if (!$sid)
{
$helpdoc = "$homeurl/lang/$defaultlang/admin.html";
}
elseif ($sid && !$gid)
{
$helpdoc = "$homeurl/lang/$defaultlang/survey.html";
}
elseif ($sid && $gid && !$qid)
{
$helpdoc = "$homeurl/lang/$defaultlang/group.html";
}
elseif ($sid && $gid && $qid && !$_GET['viewanswer'] && !$_POST['viewanswer'])
{
$helpdoc = "$homeurl/lang/$defaultlang/question.html";
}
elseif ($sid && $gid && $qid && ($_GET['viewanswer'] || $_POST['viewanswer']))
{
$helpdoc = "$homeurl/lang/$defaultlang/answer.html";
}
echo "\t\t\t\t\t\t<iframe width='150' height='400' src='$helpdoc' marginwidth='2' marginheight='2'>\n";
echo "\t\t\t\t\t\t</iframe>\n";
echo "\t\t\t\t\t</td>";
echo "\t\t\t\t</tr>\n";
echo "\t\t\t</table></td></tr></table>\n";
echo "\t\t</td>\n";
}
?>
11 changes: 9 additions & 2 deletions admin/conditions.php
Expand Up @@ -276,7 +276,7 @@
echo "</script>\n";

//SHOW FORM TO CREATE IT!
echo "<table width='98%' align='center' cellspacing='0' cellpadding='0'>\n";
echo "<table width='100%' align='center' cellspacing='0' cellpadding='0' style='border-style: solid; border-size: 1; border-color: #555555'>\n";
echo "\t<tr bgcolor='#CDCDCD'>\n";
echo "\t\t<td colspan='3' align='center'>\n";
echo "\t\t\t$setfont<b>Only show question $questiontitle<img src='./images/speaker.jpg' alt='$questiontext' onClick=\"alert('$questiontext')\"> if:</b></font>\n";
Expand Down Expand Up @@ -357,7 +357,14 @@
echo "\t\t</td>\n";
echo "\t</tr>\n";
}

else
{
echo "\t<tr>\n";
echo "\t\t<td colspan='3' height='3'>\n";
echo "\t\t</td>\n";
echo "\t</tr>\n";
}

echo "\t<tr bgcolor='#CDCDCD'>\n";
echo "\t\t<td colspan='3' align='center'>\n";
echo "\t\t\t$setfont<b>New Condition:</b></font>\n";
Expand Down

0 comments on commit a37accc

Please sign in to comment.