/* if survey has been selected ... */ if(!empty($_GET['sid'])) { $sid = intval($_GET['sid']); $srealm = auth_get_survey_realm($sid); /* check ACL to see if user is allowed to copy * _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; } /* copy the survey */ if(!survey_copy($sid)) { echo(mkerror(_('Error copying survey.') ." (". ErrorMsg() .")") . "
\n"); echo("" . _('Go back to Management Interface') . "\n"); return; } ?> " . _('Go back to Management Interface') . "\n"); return; } /* load names and titles of all surveys available to * _this_ user */ if($_SESSION['acl']['superuser'] == 'Y') { $sql = 'SELECT id,name,title,status,owner,realm FROM '.$GLOBALS['ESPCONFIG']['survey_table'].' ORDER BY id DESC'; } else { $realms = array_to_insql( array_intersect( $_SESSION['acl']['pall'], $_SESSION['acl']['pdesign'])); $sql = "SELECT id,name,title,status,owner,realm FROM ".$GLOBALS['ESPCONFIG']['survey_table']." WHERE NOT (status & ". STATUS_DELETED .") AND (owner = ". _addslashes($_SESSION['acl']['username']) ." || realm $realms) ORDER BY id DESC"; } $result = execute_sql($sql); $bg = ''; ?>

MoveNext(); if($status & STATUS_DELETED) { $stat = _('Archived'); } elseif($status & STATUS_DONE) { $stat = _('Ended'); } elseif($status & STATUS_ACTIVE) { $stat = _('Active'); } elseif($status & STATUS_TEST) { $stat = _('Testing'); } else { $stat = _('Editing'); } if($bg != $ESPCONFIG['bgalt_color1']) $bg = $ESPCONFIG['bgalt_color1']; else $bg = $ESPCONFIG['bgalt_color2']; ?>
">
" . _('Go back to Management Interface') . "\n"); ?>