$bg = ''; require ($ESPCONFIG['include_path']."where/crosstab.inc"); // see if a survey has been selected $sid = ''; if (!empty($_POST['sid'])) $sid = intval($_POST['sid']); elseif (!empty($_GET['sid'])) $sid = intval($_GET['sid']); if (!empty($sid)) { $srealm = auth_get_survey_realm(_addslashes($sid)); if(!empty($_GET['test'])) { /* check ACL to see if user is allowed to test * _this_ survey */ if($_SESSION['acl']['superuser'] != 'Y' && !auth_is_owner($sid, $_SESSION['acl']['username']) && !in_array($srealm, array_intersect( $_SESSION['acl']['pdesign'], $_SESSION['acl']['pall'])) && !auth_no_access(_('to access this survey'))) { return; } echo("

". _('Testing Survey...') ." (". _('SID') ." = $sid)

\n"); } else { /* check ACL to see if user is allowed to get results to * _this_ survey */ if($_SESSION['acl']['superuser'] != 'Y' && !auth_is_owner($sid, $_SESSION['acl']['username']) && !in_array($srealm, array_intersect( $_SESSION['acl']['pdata'], $_SESSION['acl']['pall'])) && !auth_no_access(_('to access this survey'))) { return; } } if (isset($_GET['type'])) { if ($_GET['type'] == "cross") { echo('

'. _('Cross Tabulation') ."

\n"); } } ?> " target="_blank">

$ret\n"); ?> ". _('Test Survey') ."
\n"); } if (!empty($_GET['type'])) { ?>

" . _('Go back to Management Interface') . "\n"); ?>

'. _('Cross Tabulation') ."\n"); echo(_('Pick Survey to Cross Tabulate')); } ?> MoveNext(); //let's see how many respondents we have for each survey. //angek: let's not include incomplete surveys in the count. // this occurs for multipage surveys as each page completed // is submitted and stored. $sql2 = "SELECT count(*) FROM ".$GLOBALS['ESPCONFIG']['response_table']." WHERE survey_id = $sid AND complete = 'Y'"; $result2 = execute_sql($sql2); list($resp) = fetch_row($result2); db_close($result2); if($bg != $ESPCONFIG['bgalt_color1']) $bg = $ESPCONFIG['bgalt_color1']; else $bg = $ESPCONFIG['bgalt_color2']; ?>
"> ">
" . _('Go back to Management Interface') . "\n"); ?>