Skip to content

Commit

Permalink
Fixed issue : PHP notice Undefined variable: aSurveyEntries in survey…
Browse files Browse the repository at this point in the history
… list

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_ci@11151 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
Shnoulle committed Oct 13, 2011
1 parent 659e9ca commit 442bbf4
Showing 1 changed file with 63 additions and 62 deletions.
125 changes: 63 additions & 62 deletions application/views/admin/survey/listSurveys_view.php
Expand Up @@ -51,76 +51,77 @@
</tr>
</tfoot>
<tbody>
<?php foreach ($aSurveyEntries as $aSurveyEntry){?>
<tr>
<td <?php if (!$issuperadmin) {?> style='display:none;'<?php } ?>><input type='checkbox' value='<?php echo $aSurveyEntry['surveyid'];?>' name='surveyids[]' class='surveycbs' /></td>
<?php if(isset($aSurveyEntries)){?>
<?php foreach ($aSurveyEntries as $aSurveyEntry){?>
<tr>
<td <?php if (!$issuperadmin) {?> style='display:none;'<?php } ?>><input type='checkbox' value='<?php echo $aSurveyEntry['surveyid'];?>' name='surveyids[]' class='surveycbs' /></td>

<td> <span style='display:none'><?php echo $aSurveyEntry['status'];?></span>
<?php
if ($aSurveyEntry['status']=='expired')
{?>
<img src='<?php echo $imageurl;?>/expired.png' alt='<?php $clang->eT("This survey is active but expired.");?>' /><?php
}
elseif ($aSurveyEntry['status']=='notyetactive')
{?>
<img src='<?php echo $imageurl;?>/notyetstarted.png' alt='<?php $clang->eT("This survey is active but has a start date.");?>' /><?php
}
elseif ($aSurveyEntry['status']=='active')
{
if ($aSurveyEntry['mayupdate'])
<td> <span style='display:none'><?php echo $aSurveyEntry['status'];?></span>
<?php
if ($aSurveyEntry['status']=='expired')
{?>
<a href="<?php echo site_url('admin/survey/deactivate/'.$aSurveyEntry['surveyid']);?>">
<img src='<?php echo $imageurl;?>/active.png' alt='<?php $clang->eT("This survey is active - click here to stop this survey.");?>'/>
</a> <?php
} else
{?>
<img src='<?php echo $imageurl;?>/active.png' alt='<?php $clang->eT("This survey is currently active.")?>' /> <?php

<img src='<?php echo $imageurl;?>/expired.png' alt='<?php $clang->eT("This survey is active but expired.");?>' /><?php
}
}
elseif ($aSurveyEntry['status']=='inactive')
{
if ( $aSurveyEntry['questioncount'] && $aSurveyEntry['mayupdate'] )
elseif ($aSurveyEntry['status']=='notyetactive')
{?>
<a href="<?php echo site_url('admin/survey/activate/'.$aSurveyEntry['surveyid']);?>">
<img src='<?php echo $imageurl;?>/inactive.png' title='' alt='<?php $clang->eT("This survey is currently not active - click here to activate this survey.");?>' />
</a><?php
} else
{?>
<img src='<?php echo $imageurl;?>/inactive.png' title='<?php $clang->eT("This survey is currently not active."); ?>' alt='<?php $clang->eT("This survey is currently not active.");?>' />
<?php
<img src='<?php echo $imageurl;?>/notyetstarted.png' alt='<?php $clang->eT("This survey is active but has a start date.");?>' /><?php
}
}?>
</td>
<td align='center'><a href='<?php echo $aSurveyEntry['viewurl'];?>'><?php echo $aSurveyEntry['surveyid'];?></a></td>
<td align='left'><a href='<?php echo $aSurveyEntry['viewurl'];?>'><?php echo $aSurveyEntry['sSurveyTitle'];?></a></td>
<td><?php echo $aSurveyEntry['datecreated'];?></td>
<td><?php echo $aSurveyEntry['ownername'];?> (<a href='#' class='ownername_edit' id='ownername_edit_<?php echo $aSurveyEntry['iSurveyID'];?>'>Edit</a>)</td>
<td><?php echo $aSurveyEntry['visibility'];?></td>
<td><?php echo $aSurveyEntry['privacy'];?></td>
<?php if($aSurveyEntry['dbactive'])
{?>
<td><?php echo ($aSurveyEntry['responses']-$aSurveyEntry['partial_responses']);?></td>
<td><?php echo $aSurveyEntry['partial_responses'];?></td>
<td><?php echo $aSurveyEntry['responses'];?></td>
<td><?php echo $aSurveyEntry['tokencount'];?></td>
<td><?php echo $aSurveyEntry['tokenpercentage'];?></td>
elseif ($aSurveyEntry['status']=='active')
{
if ($aSurveyEntry['mayupdate'])
{?>
<a href="<?php echo site_url('admin/survey/deactivate/'.$aSurveyEntry['surveyid']);?>">
<img src='<?php echo $imageurl;?>/active.png' alt='<?php $clang->eT("This survey is active - click here to stop this survey.");?>'/>
</a> <?php
} else
{?>
<img src='<?php echo $imageurl;?>/active.png' alt='<?php $clang->eT("This survey is currently active.")?>' /> <?php

<?php
} else
{?>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<?php
}?>
}
}
elseif ($aSurveyEntry['status']=='inactive')
{
if ( $aSurveyEntry['questioncount'] && $aSurveyEntry['mayupdate'] )
{?>
<a href="<?php echo site_url('admin/survey/activate/'.$aSurveyEntry['surveyid']);?>">
<img src='<?php echo $imageurl;?>/inactive.png' title='' alt='<?php $clang->eT("This survey is currently not active - click here to activate this survey.");?>' />
</a><?php
} else
{?>
<img src='<?php echo $imageurl;?>/inactive.png' title='<?php $clang->eT("This survey is currently not active."); ?>' alt='<?php $clang->eT("This survey is currently not active.");?>' />
<?php
}
}?>
</td>
<td align='center'><a href='<?php echo $aSurveyEntry['viewurl'];?>'><?php echo $aSurveyEntry['surveyid'];?></a></td>
<td align='left'><a href='<?php echo $aSurveyEntry['viewurl'];?>'><?php echo $aSurveyEntry['sSurveyTitle'];?></a></td>
<td><?php echo $aSurveyEntry['datecreated'];?></td>
<td><?php echo $aSurveyEntry['ownername'];?> (<a href='#' class='ownername_edit' id='ownername_edit_<?php echo $aSurveyEntry['iSurveyID'];?>'>Edit</a>)</td>
<td><?php echo $aSurveyEntry['visibility'];?></td>
<td><?php echo $aSurveyEntry['privacy'];?></td>
<?php if($aSurveyEntry['dbactive'])
{?>
<td><?php echo ($aSurveyEntry['responses']-$aSurveyEntry['partial_responses']);?></td>
<td><?php echo $aSurveyEntry['partial_responses'];?></td>
<td><?php echo $aSurveyEntry['responses'];?></td>
<td><?php echo $aSurveyEntry['tokencount'];?></td>
<td><?php echo $aSurveyEntry['tokenpercentage'];?></td>

</tr>
<?php } ?>
<?php
} else
{?>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<?php
}?>

</tr>
<?php } ?>
<?php } ?>
</tbody>
</table>
</form>
<br/>
<br />

0 comments on commit 442bbf4

Please sign in to comment.