本文整理汇总了PHP中doAssessment函数的典型用法代码示例。如果您正苦于以下问题:PHP doAssessment函数的具体用法?PHP doAssessment怎么用?PHP doAssessment使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了doAssessment函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: templatereplace
//.........这里部分代码省略.........
$_registerform .= " /></td></tr>" . "<tr><td align='right'>" . $clang->gT("Last name") . ":</td>\n" . "<td align='left'><input class='text' type='text' name='register_lastname'";
if (isset($_POST['register_lastname'])) {
$_registerform .= " value='" . htmlentities(returnGlobal('register_lastname'), ENT_QUOTES, 'UTF-8') . "'";
}
$_registerform .= " /></td></tr>\n" . "<tr><td align='right'>" . $clang->gT("Email address") . ":</td>\n" . "<td align='left'><input class='text' type='text' name='register_email'";
if (isset($_POST['register_email'])) {
$_registerform .= " value='" . htmlentities(returnGlobal('register_email'), ENT_QUOTES, 'UTF-8') . "'";
}
$_registerform .= " /></td></tr>\n";
foreach ($thissurvey['attributedescriptions'] as $field => $attribute) {
if (empty($attribute['show_register']) || $attribute['show_register'] != 'Y') {
continue;
}
$_registerform .= '
<tr>
<td align="right">' . $thissurvey['attributecaptions'][$field] . ($attribute['mandatory'] == 'Y' ? '*' : '') . ':</td>
<td align="left"><input class="text" type="text" name="register_' . $field . '" /></td>
</tr>';
}
if ((count($registerdata) > 1 || isset($thissurvey['usecaptcha'])) && function_exists("ImageCreate") && isCaptchaEnabled('registrationscreen', $thissurvey['usecaptcha'])) {
$_registerform .= "<tr><td align='right'>" . $clang->gT("Security Question") . ":</td><td><table><tr><td valign='middle'><img src='" . Yii::app()->getController()->createUrl('/verification/image/sid/' . $surveyid) . "' alt='' /></td><td valign='middle'><input type='text' size='5' maxlength='3' name='loadsecurity' value='' /></td></tr></table></td></tr>\n";
}
$_registerform .= "<tr><td></td><td><input id='registercontinue' class='submit' type='submit' value='" . $clang->gT("Continue") . "' />" . "</td></tr>\n" . "</table>\n";
if (count($registerdata) > 1 && $registerdata['sid'] != NULL && $debugSrc == 'register.php') {
$_registerform .= "<input name='startdate' type ='hidden' value='" . $registerdata['startdate'] . "' />";
$_registerform .= "<input name='enddate' type ='hidden' value='" . $registerdata['enddate'] . "' />";
}
$_registerform .= "</form>\n";
} else {
$_registerform = "";
}
// Assessments
$assessmenthtml = "";
if (isset($surveyid) && !is_null($surveyid) && function_exists('doAssessment')) {
$assessmentdata = doAssessment($surveyid, true);
$_assessment_current_total = $assessmentdata['total'];
if (stripos($line, "{ASSESSMENTS}")) {
$assessmenthtml = doAssessment($surveyid, false);
}
} else {
$_assessment_current_total = '';
}
if (isset($thissurvey['googleanalyticsapikey']) && trim($thissurvey['googleanalyticsapikey']) != '') {
$_googleAnalyticsAPIKey = trim($thissurvey['googleanalyticsapikey']);
} else {
$_googleAnalyticsAPIKey = trim(getGlobalSetting('googleanalyticsapikey'));
}
$_googleAnalyticsStyle = isset($thissurvey['googleanalyticsstyle']) ? $thissurvey['googleanalyticsstyle'] : '0';
$_googleAnalyticsJavaScript = '';
if ($_googleAnalyticsStyle != '' && $_googleAnalyticsStyle != 0 && $_googleAnalyticsAPIKey != '') {
switch ($_googleAnalyticsStyle) {
case '1':
// Default Google Tracking
$_googleAnalyticsJavaScript = <<<EOD
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{$_googleAnalyticsAPIKey}']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
EOD;
示例2: run
//.........这里部分代码省略.........
$invalidSQList = $moveResult['invalidSQs'];
if (strlen($invalidSQList) > 0) {
$notvalidated = explode('|', $invalidSQList);
} else {
$notvalidated = array();
}
}
// CHECK UPLOADED FILES
// TMSW - Move this into LEM::NavigateForwards?
$filenotvalidated = checkUploadedFileValidity($surveyid, $move);
//SEE IF THIS GROUP SHOULD DISPLAY
$show_empty_group = false;
if ($_SESSION[$LEMsessid]['step'] == 0) {
$show_empty_group = true;
}
$redata = compact(array_keys(get_defined_vars()));
//SUBMIT ###############################################################################
if (isset($move) && $move == "movesubmit") {
// setcookie("limesurvey_timers", "", time() - 3600); // remove the timers cookies //@todo fix - sometimes results in headers already sent error
if ($thissurvey['refurl'] == "Y") {
if (!in_array("refurl", $_SESSION[$LEMsessid]['insertarray'])) {
$_SESSION[$LEMsessid]['insertarray'][] = "refurl";
}
}
resetTimers();
//Before doing the "templatereplace()" function, check the $thissurvey['url']
//field for limereplace stuff, and do transformations!
$thissurvey['surveyls_url'] = passthruReplace($thissurvey['surveyls_url'], $thissurvey);
$thissurvey['surveyls_url'] = templatereplace($thissurvey['surveyls_url'], array(), $redata, 'URLReplace', false, NULL, array(), true);
// to do INSERTANS substitutions
//END PAGE - COMMIT CHANGES TO DATABASE
if ($thissurvey['active'] != "Y") {
if ($thissurvey['assessments'] == "Y") {
$assessments = doAssessment($surveyid);
}
sendCacheHeaders();
doHeader();
echo templatereplace(file_get_contents($sTemplateViewPath . "startpage.pstpl"), array(), $redata, 'SubmitStartpageI', false, NULL, array(), true);
//Check for assessments
if ($thissurvey['assessments'] == "Y" && $assessments) {
echo templatereplace(file_get_contents($sTemplateViewPath . "assessment.pstpl"), array(), $redata, 'SubmitAssessmentI', false, NULL, array(), true);
}
// fetch all filenames from $_SESSIONS['files'] and delete them all
// from the /upload/tmp/ directory
/* echo "<pre>";print_r($_SESSION);echo "</pre>";
for($i = 1; isset($_SESSION[$LEMsessid]['files'][$i]); $i++)
{
unlink('upload/tmp/'.$_SESSION[$LEMsessid]['files'][$i]['filename']);
}
*/
// can't kill session before end message, otherwise INSERTANS doesn't work.
$completed = templatereplace($thissurvey['surveyls_endtext'], array(), $redata, 'SubmitEndtextI', false, NULL, array(), true);
$completed .= "<br /><strong><font size='2' color='red'>" . gT("Did Not Save") . "</font></strong><br /><br />\n\n";
$completed .= gT("Your survey responses have not been recorded. This survey is not yet active.") . "<br /><br />\n";
if ($thissurvey['printanswers'] == 'Y') {
// 'Clear all' link is only relevant for survey with printanswers enabled
// in other cases the session is cleared at submit time
$completed .= "<a href='" . Yii::app()->getController()->createUrl("survey/index/sid/{$surveyid}/move/clearall") . "'>" . gT("Clear Responses") . "</a><br /><br />\n";
}
} else {
if ($thissurvey['usecookie'] == "Y" && $tokensexist != 1) {
setcookie("LS_" . $surveyid . "_STATUS", "COMPLETE", time() + 31536000);
//Cookie will expire in 365 days
}
$content = '';
$content .= templatereplace(file_get_contents($sTemplateViewPath . "startpage.pstpl"), array(), $redata, 'SubmitStartpage', false, NULL, array(), true);
示例3: templatereplace
//.........这里部分代码省略.........
$_saveform .= "' /></td></tr>\n" . "<tr class='save-survey-row save-survey-password-1'><td class='save-survey-label label-cell' align='right'><label for='savepass'>" . gT("Password") . "</label>:</td><td class='save-survey-input input-cell'><input type='password' id='savepass' name='savepass' value='";
if (isset($_POST['savepass'])) {
$_saveform .= HTMLEscape(autoUnescape($_POST['savepass']));
}
$_saveform .= "' /></td></tr>\n" . "<tr class='save-survey-row save-survey-password-2'><td class='save-survey-label label-cell' align='right'><label for='savepass2'>" . gT("Repeat password") . "</label>:</td><td class='save-survey-input input-cell'><input type='password' id='savepass2' name='savepass2' value='";
if (isset($_POST['savepass2'])) {
$_saveform .= HTMLEscape(autoUnescape($_POST['savepass2']));
}
$_saveform .= "' /></td></tr>\n" . "<tr class='save-survey-row save-survey-email'><td class='save-survey-label label-cell' align='right'><label for='saveemail'>" . gT("Your email address") . "</label>:</td><td class='save-survey-input input-cell'><input type='text' id='saveemail' name='saveemail' value='";
if (isset($_POST['saveemail'])) {
$_saveform .= HTMLEscape(autoUnescape($_POST['saveemail']));
}
$_saveform .= "' /></td></tr>\n";
if (isset($thissurvey['usecaptcha']) && function_exists("ImageCreate") && isCaptchaEnabled('saveandloadscreen', $thissurvey['usecaptcha'])) {
$_saveform .= "<tr class='save-survey-row save-survey-captcha'><td class='save-survey-label label-cell' align='right'><label for='loadsecurity'>" . gT("Security question") . "</label>:</td><td class='save-survey-input input-cell'><table class='captcha-table'><tr><td class='captcha-image' valign='middle'><img alt='' src='" . Yii::app()->getController()->createUrl('/verification/image/sid/' . (isset($surveyid) ? $surveyid : '')) . "' /></td><td class='captcha-input' valign='middle' style='text-align:left'><input type='text' size='5' maxlength='3' id='loadsecurity' name='loadsecurity' value='' /></td></tr></table></td></tr>\n";
}
$_saveform .= "<tr><td align='right'></td><td></td></tr>\n" . "<tr class='save-survey-row save-survey-submit'><td class='save-survey-label label-cell'><label class='hide jshide' for='savebutton'>" . gT("Save Now") . "</label></td><td class='save-survey-input input-cell'><input type='submit' id='savebutton' name='savesubmit' class='button' value='" . gT("Save Now") . "' /></td></tr>\n" . "</table>";
// Load Form
$_loadform = "<table class='load-survey-form'><tr class='load-survey-row load-survey-name'><td class='load-survey-label label-cell' align='right'><label for='loadname'>" . gT("Saved name") . "</label>:</td><td class='load-survey-input input-cell'><input type='text' id='loadname' name='loadname' value='";
if (isset($loadname)) {
$_loadform .= HTMLEscape(autoUnescape($loadname));
}
$_loadform .= "' /></td></tr>\n" . "<tr class='load-survey-row load-survey-password'><td class='load-survey-label label-cell' align='right'><label for='loadpass'>" . gT("Password") . "</label>:</td><td class='load-survey-input input-cell'><input type='password' id='loadpass' name='loadpass' value='";
if (isset($loadpass)) {
$_loadform .= HTMLEscape(autoUnescape($loadpass));
}
$_loadform .= "' /></td></tr>\n";
if (isset($thissurvey['usecaptcha']) && function_exists("ImageCreate") && isCaptchaEnabled('saveandloadscreen', $thissurvey['usecaptcha'])) {
$_loadform .= "<tr class='load-survey-row load-survey-captcha'><td class='load-survey-label label-cell' align='right'><label for='loadsecurity'>" . gT("Security question") . "</label>:</td><td class='load-survey-input input-cell'><table class='captcha-table'><tr><td class='captcha-image' valign='middle'><img src='" . Yii::app()->getController()->createUrl('/verification/image/sid/' . (isset($surveyid) ? $surveyid : '')) . "' alt='' /></td><td class='captcha-input' valign='middle'><input type='text' size='5' maxlength='3' id='loadsecurity' name='loadsecurity' value='' alt=''/></td></tr></table></td></tr>\n";
}
$_loadform .= "<tr class='load-survey-row load-survey-submit'><td class='load-survey-label label-cell'><label class='hide jshide' for='loadbutton'>" . gT("Load now") . "</label></td><td class='load-survey-input input-cell'><input type='submit' id='loadbutton' class='button' value='" . gT("Load now") . "' /></td></tr></table>\n";
// Assessments
$assessmenthtml = "";
if (isset($surveyid) && !is_null($surveyid) && function_exists('doAssessment')) {
$assessmentdata = doAssessment($surveyid, true);
$_assessment_current_total = $assessmentdata['total'];
if (stripos($line, "{ASSESSMENTS}")) {
$assessmenthtml = doAssessment($surveyid, false);
}
} else {
$_assessment_current_total = '';
}
if (isset($thissurvey['googleanalyticsapikey']) && trim($thissurvey['googleanalyticsapikey']) != '') {
$_googleAnalyticsAPIKey = trim($thissurvey['googleanalyticsapikey']);
} else {
$_googleAnalyticsAPIKey = trim(getGlobalSetting('googleanalyticsapikey'));
}
$_googleAnalyticsStyle = isset($thissurvey['googleanalyticsstyle']) ? $thissurvey['googleanalyticsstyle'] : '0';
$_googleAnalyticsJavaScript = '';
if ($_googleAnalyticsStyle != '' && $_googleAnalyticsStyle != 0 && $_googleAnalyticsAPIKey != '') {
switch ($_googleAnalyticsStyle) {
case '1':
// Default Google Tracking
$_googleAnalyticsJavaScript = <<<EOD
<script>
(function(i,s,o,g,r,a,m){ i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments) },i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{$_googleAnalyticsAPIKey}', 'auto'); // Replace with your property ID.
ga('send', 'pageview');
</script>
EOD;
示例4: run
//.........这里部分代码省略.........
$invalidSQList = $moveResult['invalidSQs'];
if (strlen($invalidSQList) > 0 && $backok != "N") {
$notvalidated = explode('|', $invalidSQList);
} else {
$notvalidated = array();
}
}
// CHECK UPLOADED FILES
// TMSW - Move this into LEM::NavigateForwards?
$filenotvalidated = checkUploadedFileValidity($surveyid, $move, $backok);
//SEE IF THIS GROUP SHOULD DISPLAY
$show_empty_group = false;
if ($_SESSION[$LEMsessid]['step'] == 0) {
$show_empty_group = true;
}
$redata = compact(array_keys(get_defined_vars()));
//SUBMIT ###############################################################################
if (isset($move) && $move == "movesubmit") {
// setcookie("limesurvey_timers", "", time() - 3600); // remove the timers cookies //@todo fix - sometimes results in headers already sent error
if ($thissurvey['refurl'] == "Y") {
if (!in_array("refurl", $_SESSION[$LEMsessid]['insertarray'])) {
$_SESSION[$LEMsessid]['insertarray'][] = "refurl";
}
}
resetTimers();
//Before doing the "templatereplace()" function, check the $thissurvey['url']
//field for limereplace stuff, and do transformations!
$thissurvey['surveyls_url'] = passthruReplace($thissurvey['surveyls_url'], $thissurvey);
$thissurvey['surveyls_url'] = templatereplace($thissurvey['surveyls_url'], $thissurvey);
// to do INSERTANS substitutions
//END PAGE - COMMIT CHANGES TO DATABASE
if ($thissurvey['active'] != "Y") {
if ($thissurvey['assessments'] == "Y") {
$assessments = doAssessment($surveyid);
}
sendCacheHeaders();
doHeader();
echo templatereplace(file_get_contents($sTemplatePath . "startpage.pstpl"), array(), $redata);
//Check for assessments
if ($thissurvey['assessments'] == "Y" && $assessments) {
echo templatereplace(file_get_contents($sTemplatePath . "assessment.pstpl"), array(), $redata);
}
// fetch all filenames from $_SESSIONS['files'] and delete them all
// from the /upload/tmp/ directory
/* echo "<pre>";print_r($_SESSION);echo "</pre>";
for($i = 1; isset($_SESSION[$LEMsessid]['files'][$i]); $i++)
{
unlink('upload/tmp/'.$_SESSION[$LEMsessid]['files'][$i]['filename']);
}
*/
// can't kill session before end message, otherwise INSERTANS doesn't work.
$completed = templatereplace($thissurvey['surveyls_endtext']);
$completed .= "<br /><strong><font size='2' color='red'>" . $clang->gT("Did Not Save") . "</font></strong><br /><br />\n\n";
$completed .= $clang->gT("Your survey responses have not been recorded. This survey is not yet active.") . "<br /><br />\n";
if ($thissurvey['printanswers'] == 'Y') {
// 'Clear all' link is only relevant for survey with printanswers enabled
// in other cases the session is cleared at submit time
$completed .= "<a href='" . Yii::app()->getController()->createUrl("survey/index/sid/{$surveyid}/move/clearall") . "'>" . $clang->gT("Clear Responses") . "</a><br /><br />\n";
}
} else {
if ($thissurvey['usecookie'] == "Y" && $tokensexist != 1) {
setcookie("LS_" . $surveyid . "_STATUS", "COMPLETE", time() + 31536000);
//Cookie will expire in 365 days
}
$content = '';
$content .= templatereplace(file_get_contents($sTemplatePath . "startpage.pstpl"), array(), $redata);
示例5: templatereplace
//.........这里部分代码省略.........
if (isset($thissurvey['usecaptcha']) && function_exists("ImageCreate") && captcha_enabled('registrationscreen', $thissurvey['usecaptcha']))
{
$_registerform .="<tr><td align='right'>" . $clang->gT("Security Question") . ":</td><td><table><tr><td valign='middle'><img src='{$captchapath}verification.php?sid=$surveyid' alt='' /></td><td valign='middle'><input type='text' size='5' maxlength='3' name='loadsecurity' value='' /></td></tr></table></td></tr>\n";
}
/* if(isset($thissurvey['attribute1']) && $thissurvey['attribute1'])
{
$_registerform .= "<tr><td align='right'>".$thissurvey['attribute1'].":</td>\n"
."<td align='left'><input class='text' type='text' name='register_attribute1'";
if (isset($_POST['register_attribute1']))
{
$_registerform .= " value='".htmlentities(returnglobal('register_attribute1'),ENT_QUOTES,'UTF-8')."'";
}
$_registerform .= " /></td></tr>\n";
}
if(isset($thissurvey['attribute2']) && $thissurvey['attribute2'])
{
$_registerform .= "<tr><td align='right'>".$thissurvey['attribute2'].":</td>\n"
."<td align='left'><input class='text' type='text' name='register_attribute2'";
if (isset($_POST['register_attribute2']))
{
$_registerform .= " value='".htmlentities(returnglobal('register_attribute2'),ENT_QUOTES,'UTF-8')."'";
}
$_registerform .= " /></td></tr>\n";
} */
$_registerform .= "<tr><td></td><td><input id='registercontinue' class='submit' type='submit' value='" . $clang->gT("Continue") . "' />"
. "</td></tr>\n"
. "</table>\n"
. "</form>\n";
if (!is_null($surveyid) && function_exists('doAssessment'))
{
$assessmentdata = doAssessment($surveyid, true);
$_assessment_current_total = $assessmentdata['total'];
}
else
{
$_assessment_current_total = '';
}
// Set the array of replacement variables here - don't include curly braces
$corecoreReplacements = array();
$coreReplacements['ANSWER'] = $answer; // global
$coreReplacements['ANSWERSCLEARED'] = $clang->gT("Answers Cleared");
$coreReplacements['ASSESSMENTS'] = $assessments; // global
$coreReplacements['ASSESSMENT_CURRENT_TOTAL'] = $_assessment_current_total;
$coreReplacements['ASSESSMENT_HEADING'] = $clang->gT("Your Assessment");
$coreReplacements['CHECKJAVASCRIPT'] = "<noscript><span class='warningjs'>".$clang->gT("Caution: JavaScript execution is disabled in your browser. You may not be able to answer all questions in this survey. Please, verify your browser parameters.")."</span></noscript>";
$coreReplacements['CLEARALL'] = $_clearall;
$coreReplacements['CLOSEWINDOW'] = "<a href='javascript:%20self.close()'>".$clang->gT("Close this window")."</a>";
$coreReplacements['COMPLETED'] = $completed; // global
$coreReplacements['DATESTAMP'] = $_datestamp;
$coreReplacements['EXPIRY'] = $_dateoutput;
$coreReplacements['GROUPDESCRIPTION'] = $_groupdescription;
$coreReplacements['GROUPNAME'] = $_groupname;
$coreReplacements['LANG'] = $clang->getlangcode();
$coreReplacements['LANGUAGECHANGER'] = $languagechanger; // global
$coreReplacements['LOADERROR'] = $errormsg; // global
$coreReplacements['LOADFORM'] = $_loadform;
$coreReplacements['LOADHEADING'] = $clang->gT("Load A Previously Saved Survey");
$coreReplacements['LOADMESSAGE'] = $clang->gT("You can load a survey that you have previously saved from this screen.")."<br />".$clang->gT("Type in the 'name' you used to save the survey, and the password.")."<br />";
$coreReplacements['NAVIGATOR'] = $navigator; // global
$coreReplacements['NOSURVEYID'] = $surveylist['nosid']; // global
示例6: setcookie
if ($thissurvey['usecookie'] == "Y" && $tokensexist != 1) //don't use cookies if tokens are being used
{
$cookiename="PHPSID".returnglobal('sid')."STATUS";
setcookie("$cookiename", "COMPLETE", time() + 31536000); //Cookie will expire in 365 days
}
//Before doing the "templatereplace()" function, check the $thissurvey['url']
//field for limereplace stuff, and do transformations!
$thissurvey['surveyls_url']=dTexts::run($thissurvey['surveyls_url']);
$thissurvey['surveyls_url']=passthruReplace($thissurvey['surveyls_url'], $thissurvey);
$content='';
$content .= templatereplace(file_get_contents("$thistpl/startpage.pstpl"));
//Check for assessments
$assessments = doAssessment($surveyid);
if ($assessments)
{
$content .= templatereplace(file_get_contents("$thistpl/assessment.pstpl"));
}
// Unsetting $postedfieldnames tells the createinsertquery() function only to set the sbumit date, nothing else
unset($postedfieldnames);
// only update submitdate if the user did not already visit the submit page
if (!isset($_SESSION['finished']))
{
// $subquery = createinsertquery();
// $connect->Execute($subquery); // Checked
submitanswer();
}
示例7: templatereplace
//.........这里部分代码省略.........
$_registerform .= " /></td></tr>" . "<tr><td align='right'>" . $clang->gT("Last name") . ":</td>\n" . "<td align='left'><input class='text' type='text' name='register_lastname'";
if (isset($_POST['register_lastname'])) {
$_registerform .= " value='" . htmlentities(returnglobal('register_lastname'), ENT_QUOTES, 'UTF-8') . "'";
}
$_registerform .= " /></td></tr>\n" . "<tr><td align='right'>" . $clang->gT("Email address") . ":</td>\n" . "<td align='left'><input class='text' type='text' name='register_email'";
if (isset($_POST['register_email'])) {
$_registerform .= " value='" . htmlentities(returnglobal('register_email'), ENT_QUOTES, 'UTF-8') . "'";
}
$_registerform .= " /></td></tr>\n";
if (isset($thissurvey['usecaptcha']) && function_exists("ImageCreate") && captcha_enabled('registrationscreen', $thissurvey['usecaptcha'])) {
$_registerform .= "<tr><td align='right'>" . $clang->gT("Security Question") . ":</td><td><table><tr><td valign='middle'><img src='{$captchapath}verification.php?sid={$surveyid}' alt='' /></td><td valign='middle'><input type='text' size='5' maxlength='3' name='loadsecurity' value='' /></td></tr></table></td></tr>\n";
}
/* if(isset($thissurvey['attribute1']) && $thissurvey['attribute1'])
{
$_registerform .= "<tr><td align='right'>".$thissurvey['attribute1'].":</td>\n"
."<td align='left'><input class='text' type='text' name='register_attribute1'";
if (isset($_POST['register_attribute1']))
{
$_registerform .= " value='".htmlentities(returnglobal('register_attribute1'),ENT_QUOTES,'UTF-8')."'";
}
$_registerform .= " /></td></tr>\n";
}
if(isset($thissurvey['attribute2']) && $thissurvey['attribute2'])
{
$_registerform .= "<tr><td align='right'>".$thissurvey['attribute2'].":</td>\n"
."<td align='left'><input class='text' type='text' name='register_attribute2'";
if (isset($_POST['register_attribute2']))
{
$_registerform .= " value='".htmlentities(returnglobal('register_attribute2'),ENT_QUOTES,'UTF-8')."'";
}
$_registerform .= " /></td></tr>\n";
} */
$_registerform .= "<tr><td></td><td><input id='registercontinue' class='submit' type='submit' value='" . $clang->gT("Continue") . "' />" . "</td></tr>\n" . "</table>\n" . "</form>\n";
if (!is_null($surveyid) && function_exists('doAssessment')) {
$assessmentdata = doAssessment($surveyid, true);
$_assessment_current_total = $assessmentdata['total'];
} else {
$_assessment_current_total = '';
}
if (isset($thissurvey['googleanalyticsapikey']) && trim($thissurvey['googleanalyticsapikey']) != '') {
$_googleAnalyticsAPIKey = trim($thissurvey['googleanalyticsapikey']);
} else {
$_googleAnalyticsAPIKey = trim(getGlobalSetting('googleanalyticsapikey'));
}
$_googleAnalyticsStyle = isset($thissurvey['googleanalyticsstyle']) ? $thissurvey['googleanalyticsstyle'] : '0';
$_googleAnalyticsJavaScript = '';
if ($_googleAnalyticsStyle != '' && $_googleAnalyticsStyle != 0 && $_googleAnalyticsAPIKey != '') {
switch ($_googleAnalyticsStyle) {
case '1':
// Default Google Tracking
$_googleAnalyticsJavaScript = <<<EOD
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{$_googleAnalyticsAPIKey}']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
EOD;
break;
case '2':
// SurveyName-[SID]/[GSEQ]-GroupName - create custom GSEQ based upon page step