Skip to content

Commit

Permalink
Further updates
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/phpsurveyor@2054 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
jcleeland committed Sep 5, 2006
1 parent 5becdcf commit d2470fa
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions admin/stats.php
Expand Up @@ -176,12 +176,14 @@ function addCondition(value) {
if(conditions.options.length > 0) {
document.getElementById('removecondition').display='';
}
var filters = new Array();

var filters = new String();
var filter = document.getElementById('filter');
for (var i = 0; i < concount+1; i++) {
filters[i]=conditions.options[i].value;
filters += conditions.options[i].value + ";";
}
filter.value=filters;
alert(filters);
}

//--></script>
Expand Down Expand Up @@ -213,11 +215,11 @@ function addCondition(value) {
</table>
<?


} elseif (isset($_POST['action']) && $_POST['action'] == "fields") {
//////////////////////////////////////////////////////////////////
// DO FIELD SELECTION PAGE ///////////////////////////////////////
//////////////////////////////////////////////////////////////////

} elseif (isset($_POST['action']) && $_POST['action'] == "fields") {
?>

<script type='text/javascript'>
Expand All @@ -240,14 +242,14 @@ function display(item) {
<table width='99%' align='center' style='border: 1px'>
<tr>
<td colspan='2' style='text-align: center; border: 1px; background-color: #cccccc'>
<? presentQuestionList($questions) ?>
<input type='button' value='<? echo _("Select all"); ?>' onClick='selectAll("questions")'>
<input type='submit' value='<? echo _("Proceed"); ?>'>
<? presentFilterConditions() ?>
</td>
</tr>
<tr>
<td colspan='2' style='border: 1px; background-color: #eeeeee'>
<? presentFilterConditions() ?>
<td colspan='2' style='text-align: center; border: 1px;'>
<? presentQuestionList($questions) ?>
<input type='button' value='<? echo _("Select all"); ?>' onClick='selectAll("questions")'>
<input type='submit' value='<? echo _("Proceed"); ?>'>
</td>
</tr>
</table>
Expand All @@ -265,7 +267,6 @@ function display(item) {
echo "<pre>";
print_r($_POST);
echo "</pre>";
echo "Howdy";

/////////////////////////////////////////////////////////////////////
// END OF PRESENTING RESULTS //////////////////////////////////////
Expand All @@ -289,7 +290,7 @@ function selectAll(item) {
<table class='filter' width='99%' align='center'>
<tr>
<th>
<? echo _("Select question(s) from the following list") ?>
<? echo _("Question List") ?>
</th>
</tr>
<tr>
Expand Down Expand Up @@ -401,7 +402,7 @@ function presentFilterConditions() {
function removeCondition() {
var conditions=document.getElementById('conditions');
var selected=conditions.selectedIndex;
var token = "," + conditions.options[selected].value;
var token = conditions.options[selected].value + ";";
var token2 = conditions.options[selected].value;
var filter = document.getElementById('filter');
conditions.options[selected] = null;
Expand Down Expand Up @@ -432,9 +433,11 @@ function removeCondition() {
<select multiple name='conditions[]' id='conditions' size='5' style='width: 600'>
<?
if(isset($_POST['filter'])) {
$filters=explode(",", $_POST['filter']);
$filters=explode(";", $_POST['filter']);
foreach($filters as $condition) {
echo " <option value=\"$condition\">".$condition."</option>\n";
if($condition != "") {
echo " <option value=\"$condition\">".$condition."</option>\n";
}
}
}
?>
Expand Down

0 comments on commit d2470fa

Please sign in to comment.