• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get2post函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get2post函数的典型用法代码示例。如果您正苦于以下问题:PHP get2post函数的具体用法?PHP get2post怎么用?PHP get2post使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get2post函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: db_execute_assoc

        //NOW GET THE ANSWERS AND DISPLAY THEM
        $query = "SELECT * FROM ".db_table_name('labelsets')." WHERE lid=$lid";
        $result = db_execute_assoc($query);
        while ($row=$result->FetchRow())
        {
            $labelsoutput.= "<div class='menubar'>\n"
            ."<div class='menubar-title ui-widget-header'>\n"
            ."\t<strong>".$clang->gT("Label Set").":</strong> {$row['label_name']}\n"
            ."</div>\n"
            ."<div class='menubar-main'>\n"
            ."\t<div class='menubar-left'>\n"
            ."\t<img src='$imageurl/blank.gif' width='40' height='20' border='0' hspace='0' align='left' alt='' />\n"
            ."\t<img src='$imageurl/seperator.gif' border='0' hspace='0' align='left' alt='' />\n"
            ."\t<a href='admin.php?action=editlabelset&amp;lid=$lid' title=\"".$clang->gTview("Edit label set")."\" >" .
			"<img name='EditLabelsetButton' src='$imageurl/edit.png' alt='".$clang->gT("Edit label set")."' align='left'  /></a>" 
			."\t<a href='#' title='".$clang->gTview("Delete label set")."' onclick=\"if (confirm('".$clang->gT("Do you really want to delete this label set?","js")."')) {".get2post("admin.php?action=deletelabelset&amp;lid=$lid")."}\" >"
			."<img src='$imageurl/delete.png' border='0' alt='".$clang->gT("Delete label set")."' align='left' /></a>\n"
			."\t<img src='$imageurl/seperator.gif' border='0' hspace='0' align='left' alt='' />\n"
			."\t<a href='admin.php?action=dumplabel&amp;lid=$lid' title=\"".$clang->gTview("Export this label set")."\" >" .
					"<img src='$imageurl/dumplabel.png' alt='".$clang->gT("Export this label set")."' align='left' /></a>" 
					."\t</div>\n"
					."\t<div class='menubar-right'>\n"
					."\t<input type='image' src='$imageurl/close.gif' title='".$clang->gT("Close")."'"
					."onclick=\"window.open('admin.php?action=labels', '_top')\" />\n"
					."\t</div>\n"
					."\t</div>\n"
					."\t</div>\n";
					$labelsoutput .= "<p style='margin:0;font-size:1px;line-height:1px;height:1px;'>&nbsp;</p>"; //CSS Firefox 2 transition fix
        }

开发者ID:nmklong,项目名称:limesurvey-cdio3,代码行数:29,代码来源:labels.php


示例2: get2post

                    $tokenoutput .= "<input type='hidden' name='from_{$language}' value=\"" . $_POST['from_' . $language] . "\" />\n" . "<input type='hidden' name='subject_{$language}' value=\"" . $_POST['subject_' . $language] . "\" />\n" . "<input type='hidden' name='message_{$language}' value=\"{$message}\" />\n";
                }
                $tokenoutput .= "\t<input type='hidden' name='last_tid' value=\"{$lasttid}\" />\n" . "\t</form>\n";
            }
            $tokenoutput .= "\t</tr>\n" . "</table>\n";
        } else {
            $tokenoutput .= "<div class='warningheader'>" . $clang->gT("Warning") . "</div>\n" . $clang->gT("There were no eligible emails to send. This will be because none satisfied the criteria of:") . "\n" . "<br/>&nbsp;<ul><li>" . $clang->gT("having a valid email address") . "</li>" . "<li>" . $clang->gT("not having been sent an invitation already") . "</li>" . "<li>" . $clang->gT("but not having already completed the survey") . "</li>" . "</ul><br />\n";
        }
        $tokenoutput .= "</div>\n";
    }
}
if ($subaction == "tokenify" && bHasSurveyPermission($surveyid, 'tokens', 'update')) {
    $tokenoutput .= "<div class='header ui-widget-header'>" . $clang->gT("Create tokens") . "</div>\n";
    $tokenoutput .= "<div class='messagebox ui-corner-all'>\n";
    if (!isset($_POST['ok']) || !$_POST['ok']) {
        $tokenoutput .= "" . $clang->gT("Clicking yes will generate tokens for all those in this token list that have not been issued one. Is this OK?") . "<br /><br />\n" . "<input type='submit' value='" . $clang->gT("Yes") . "' onclick=\"" . get2post("{$scriptname}?action=tokens&amp;sid={$surveyid}&amp;subaction=tokenify&amp;ok=Y") . "\" />\n" . "<input type='submit' value='" . $clang->gT("No") . "' onclick=\"window.open('{$scriptname}?action=tokens&amp;sid={$surveyid}', '_top')\" />\n" . "<br />\n";
    } else {
        //get token length from survey settings
        $tlquery = "SELECT tokenlength FROM " . db_table_name("surveys") . " WHERE sid={$surveyid}";
        $tlresult = db_execute_assoc($tlquery);
        while ($tlrow = $tlresult->FetchRow()) {
            $tokenlength = $tlrow['tokenlength'];
        }
        //if tokenlength is not set or there are other problems use the default value (15)
        if (!isset($tokenlength) || $tokenlength == '') {
            $tokenlength = 15;
        }
        // select all existing tokens
        $ntquery = "SELECT token FROM " . db_table_name("tokens_{$surveyid}") . " group by token";
        $ntresult = db_execute_assoc($ntquery);
        while ($tkrow = $ntresult->FetchRow()) {
开发者ID:karime7gezly,项目名称:OpenConextApps-LimeSurvey,代码行数:31,代码来源:tokens.php


示例3: json_decode

                if ($dtrow[$fnames[$i][0]] == NULL) {
                    $browsedatafield = "N";
                } else {
                    $browsedatafield = "Y";
                }
            }
            if (isset($fnames[$i]['type']) && $fnames[$i]['type'] == "|") {
                $index = $fnames[$i]['index'];
                $metadata = $fnames[$i]['metadata'];
                $phparray = json_decode($dtrow[$fnames[$i][0]], true);
                if (isset($phparray[$index])) {
                    if ($metadata === "size") {
                        $browseoutput .= "<td align='center'>" . rawurldecode((int) $phparray[$index][$metadata] . " KB") . "</td>\n";
                    } else {
                        if ($metadata === "name") {
                            $browseoutput .= "<td align='center'><a href='#' onclick=\" " . get2post($scriptname . '?action=browse&amp;subaction=all&amp;downloadindividualfile=' . $phparray[$index][$metadata] . '&amp;fieldname=' . $fnames[$i][0] . '&amp;id=' . $dtrow['id'] . '&amp;sid=' . $surveyid) . "\" >" . rawurldecode($phparray[$index][$metadata]) . "</a></td>\n";
                        } else {
                            $browseoutput .= "<td align='center'>" . rawurldecode($phparray[$index][$metadata]) . "</td>\n";
                        }
                    }
                } else {
                    $browseoutput .= "<td align='center'>&nbsp;</td>\n";
                }
            } else {
                $browseoutput .= "<td align='center'>{$browsedatafield}</td>\n";
            }
        }
        $browseoutput .= "\t</tr>\n";
    }
    $browseoutput .= "</table>\n    <input type='hidden' name='sid' value='{$surveyid}' />\n    <input type='hidden' name='subaction' value='all' />\n    <input id='deleteanswer' name='deleteanswer' value='' type='hidden' />\n    <input id='downloadfile' name='downloadfile' value='' type='hidden' />\n    </form>\n<br />\n";
} elseif ($surveyinfo['savetimings'] == "Y" && $subaction == "time") {
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:31,代码来源:browse.php


示例4: foreach

         foreach ($tmp_survlangs as $tmp_lang) {
             $surveysummary .= "<li><a target='_blank' onclick=\"\$('#previewquestion').qtip('hide');\" href='{$scriptname}?action=previewquestion&amp;sid={$surveyid}&amp;qid={$qid}&amp;lang={$tmp_lang}' accesskey='d'>" . getLanguageNameFromCode($tmp_lang, false) . "</a></li>";
         }
         $surveysummary .= "</ul></div>";
     }
 }
 // SEPARATOR
 //        $questionsummary .= "<img src='$imageurl/blank.gif' alt='' width='117' height='20'  />\n";
 // EDIT CURRENT QUESTION BUTTON
 if (bHasSurveyPermission($surveyid, 'surveycontent', 'update')) {
     $questionsummary .= "" . "<a href='{$scriptname}?action=editquestion&amp;sid={$surveyid}&amp;gid={$gid}&amp;qid={$qid}'" . " title=\"" . $clang->gTview("Edit current question") . "\">" . "<img src='{$imageurl}/edit.png' alt='" . $clang->gT("Edit Current Question") . "' name='EditQuestion' /></a>\n";
 }
 // DELETE CURRENT QUESTION BUTTON
 if (($qct == 0 && $activated != "Y" || $activated != "Y") && bHasSurveyPermission($surveyid, 'surveycontent', 'delete')) {
     if (is_null($condarray)) {
         $questionsummary .= "<a href='#'" . "onclick=\"if (confirm('" . $clang->gT("Deleting this question will also delete any answer options and subquestions it includes. Are you sure you want to continue?", "js") . "')) {" . get2post("{$scriptname}?action=delquestion&amp;sid={$surveyid}&amp;gid={$gid}&amp;qid={$qid}") . "}\">" . "<img src='{$imageurl}/delete.png' name='DeleteWholeQuestion' alt='" . $clang->gT("Delete current question") . "' " . "border='0' hspace='0' /></a>\n";
     } else {
         $questionsummary .= "<a href='{$scriptname}?sid={$surveyid}&amp;gid={$gid}&amp;qid={$qid}'" . "onclick=\"alert('" . $clang->gT("It's impossible to delete this question because there is at least one question having a condition on it.", "js") . "')\"" . "title=\"" . $clang->gTview("Disabled - Delete current question") . "\">" . "<img src='{$imageurl}/delete_disabled.png' name='DeleteWholeQuestion' alt='" . $clang->gT("Disabled - Delete current question") . "' /></a>\n";
     }
 } else {
     $questionsummary .= "<img src='{$imageurl}/blank.gif' alt='' width='40' />\n";
 }
 // EXPORT CURRENT QUESTION BUTTON
 if (bHasSurveyPermission($surveyid, 'surveycontent', 'export')) {
     $questionsummary .= "<a href='{$scriptname}?action=exportstructureQuestion&amp;sid={$surveyid}&amp;gid={$gid}&amp;qid={$qid}'" . " title=\"" . $clang->gTview("Export this question") . "\" >" . "<img src='{$imageurl}/dumpquestion.png' alt='" . $clang->gT("Export this question") . "' name='ExportQuestion' /></a>\n";
 }
 $questionsummary .= "<img src='{$imageurl}/seperator.gif' alt='' />\n";
 // COPY CURRENT QUESTION BUTTON
 if (bHasSurveyPermission($surveyid, 'surveycontent', 'create')) {
     if ($activated != "Y") {
         $questionsummary .= "<a href='{$scriptname}?action=copyquestion&amp;sid={$surveyid}&amp;gid={$gid}&amp;qid={$qid}'" . " title=\"" . $clang->gTview("Copy Current Question") . "\" >" . "<img src='{$imageurl}/copy.png'  alt='" . $clang->gT("Copy Current Question") . "' name='CopyQuestion' /></a>\n" . "<img src='{$imageurl}/seperator.gif' alt='' />\n";
开发者ID:himanshu12k,项目名称:ce-www,代码行数:31,代码来源:html.php


示例5: responses

    return;
}
if (!isset($deleteok) || !$deleteok) {
    $deletesurveyoutput .= "\t<div class='warningheader'>\n" . $clang->gT("Warning") . "</div><br />\n";
    $deletesurveyoutput .= "\t<strong>" . $clang->gT("You are about to delete this survey") . " ({$surveyid})</strong><br /><br />\n";
    $deletesurveyoutput .= "\t" . $clang->gT("This process will delete this survey, and all related groups, questions answers and conditions.") . "<br /><br />\n";
    $deletesurveyoutput .= "\t" . $clang->gT("It will also delete any resources/files that have been uploaded for this survey.") . "<br /><br />\n";
    $deletesurveyoutput .= "\t" . $clang->gT("We recommend that before you delete this survey you export the entire survey from the main administration screen.") . "\n";
    if (tableExists("survey_{$surveyid}")) {
        $deletesurveyoutput .= "\t<br /><br />\n" . $clang->gT("This survey is active and a responses table exists. If you delete this survey, these responses (including any uploaded files) will be deleted. We recommend that you export the responses (and files) before deleting this survey.") . "<br /><br />\n";
    }
    if (tableExists("tokens_{$surveyid}")) {
        $deletesurveyoutput .= "\t" . $clang->gT("This survey has an associated tokens table. If you delete this survey this tokens table will be deleted. We recommend that you export or backup these tokens before deleting this survey.") . "<br /><br />\n";
    }
    $deletesurveyoutput .= "<p>\n";
    $deletesurveyoutput .= "\t<input type='submit'  value='" . $clang->gT("Delete survey") . "' onclick=\"" . get2post("{$scriptname}?action=deletesurvey&amp;sid={$surveyid}&amp;deleteok=Y") . "\" />\n";
    $deletesurveyoutput .= "\t<input type='submit'  value='" . $clang->gT("Cancel") . "' onclick=\"window.open('admin.php?sid={$surveyid}', '_top')\" />\n";
} else {
    $dict = NewDataDictionary($connect);
    if (tableExists("survey_{$surveyid}")) {
        $dsquery = $dict->DropTableSQL("{$dbprefix}survey_{$surveyid}");
        //$dict->ExecuteSQLArray($sqlarray);
        $dsresult = $dict->ExecuteSQLArray($dsquery) or safe_die("Couldn't \"{$dsquery}\" because <br />" . $connect->ErrorMsg());
    }
    if (tableExists("survey_{$surveyid}_timings")) {
        $dsquery = $dict->DropTableSQL("{$dbprefix}survey_{$surveyid}_timings");
        //$dict->ExecuteSQLArray($sqlarraytimings);
        $dsresult = $dict->ExecuteSQLArray($dsquery) or safe_die("Couldn't \"{$dsquery}\" because <br />" . $connect->ErrorMsg());
    }
    if (tableExists("tokens_{$surveyid}")) {
        $dsquery = $dict->DropTableSQL("{$dbprefix}tokens_{$surveyid}");
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:31,代码来源:deletesurvey.php


示例6: foreach

     foreach ($tab_title as $i => $eachtitle) {
         $labelsoutput .= "<li><a href='#neweditlblset{$i}'>{$eachtitle}</a></li>";
     }
     $labelsoutput .= "</ul>";
     foreach ($tab_content as $i => $eachcontent) {
         $labelsoutput .= "<div id='neweditlblset{$i}'>{$eachcontent}</div>";
     }
     $labelsoutput .= "</div>";
 }
 //SET SELECTED
 if (isset($lid) && $action != "editlabelset" && $lid) {
     //NOW GET THE ANSWERS AND DISPLAY THEM
     $query = "SELECT * FROM " . db_table_name('labelsets') . " WHERE lid={$lid}";
     $result = db_execute_assoc($query);
     while ($row = $result->FetchRow()) {
         $labelsoutput .= "<div class='menubar'>\n" . "<div class='menubar-title ui-widget-header'>\n" . "\t<strong>" . $clang->gT("Label Set") . ":</strong> {$row['label_name']}\n" . "</div>\n" . "<div class='menubar-main'>\n" . "\t<div class='menubar-left'>\n" . "\t<img src='{$imageurl}/blank.gif' width='40' height='20' border='0' hspace='0' align='left' alt='' />\n" . "\t<img src='{$imageurl}/seperator.gif' border='0' hspace='0' align='left' alt='' />\n" . "\t<a href='admin.php?action=editlabelset&amp;lid={$lid}' title=\"" . $clang->gTview("Edit label set") . "\" >" . "<img name='EditLabelsetButton' src='{$imageurl}/edit.png' alt='" . $clang->gT("Edit label set") . "' align='left'  /></a>" . "\t<a href='#' title='" . $clang->gTview("Delete label set") . "' onclick=\"if (confirm('" . $clang->gT("Do you really want to delete this label set?", "js") . "')) {" . get2post("admin.php?action=deletelabelset&amp;lid={$lid}") . "}\" >" . "<img src='{$imageurl}/delete.png' border='0' alt='" . $clang->gT("Delete label set") . "' align='left' /></a>\n" . "\t<img src='{$imageurl}/seperator.gif' border='0' hspace='0' align='left' alt='' />\n" . "\t<a href='admin.php?action=dumplabel&amp;lid={$lid}' title=\"" . $clang->gTview("Export this label set") . "\" >" . "<img src='{$imageurl}/dumplabel.png' alt='" . $clang->gT("Export this label set") . "' align='left' /></a>" . "\t</div>\n" . "\t<div class='menubar-right'>\n" . "\t<input type='image' src='{$imageurl}/close.gif' title='" . $clang->gT("Close Window") . "'" . "onclick=\"window.open('admin.php?action=labels', '_top')\" />\n" . "\t</div>\n" . "\t</div>\n" . "\t</div>\n";
         $labelsoutput .= "<p style='margin:0;font-size:1px;line-height:1px;height:1px;'>&nbsp;</p>";
         //CSS Firefox 2 transition fix
     }
     //LABEL ANSWERS  - SHOW THE MASK FOR EDITING THE LABELS
     $js_admin_includes[] = 'scripts/updateset.js';
     $qulabelset = "SELECT * FROM " . db_table_name('labelsets') . " WHERE lid={$lid}";
     $rslabelset = db_execute_assoc($qulabelset) or safe_die($connect->ErrorMsg());
     $rwlabelset = $rslabelset->FetchRow();
     $lslanguages = explode(" ", trim($rwlabelset['languages']));
     $labelsoutput .= PrepareEditorScript();
     $maxquery = "SELECT max(sortorder) as maxsortorder FROM " . db_table_name('labels') . " WHERE lid={$lid} and language='{$lslanguages[0]}'";
     $maxresult = db_execute_assoc($maxquery) or safe_die($connect->ErrorMsg());
     $msorow = $maxresult->FetchRow();
     $maxsortorder = $msorow['maxsortorder'] + 1;
     // labels table
开发者ID:rkaldung,项目名称:LimeSurvey,代码行数:31,代码来源:labels.php


示例7:

            $questionsummary .= ""
//            ."<img src='$imageurl/seperator.gif' alt='' />\n"
            . "<a href='$scriptname?action=editquestion&amp;sid=$surveyid&amp;gid=$gid&amp;qid=$qid'"
            . " title=\"".$clang->gTview("Edit current question")."\">"
            . "<img src='$imageurl/edit.png' alt='".$clang->gT("Edit Current Question")."' name='EditQuestion' /></a>\n" ;
        }


        // DELETE CURRENT QUESTION BUTTON

        if ((($qct == 0 && $activated != "Y") || $activated != "Y") && bHasSurveyPermission($surveyid,'surveycontent','delete'))
        {
            if (is_null($condarray))
            {
                $questionsummary .= "<a href='#'" .
				"onclick=\"if (confirm('".$clang->gT("Deleting this question will also delete any answer options and subquestions it includes. Are you sure you want to continue?","js")."')) {".get2post("$scriptname?action=delquestion&amp;sid=$surveyid&amp;gid=$gid&amp;qid=$qid")."}\">"
				. "<img src='$imageurl/delete.png' name='DeleteWholeQuestion' alt='".$clang->gT("Delete current question")."' "
				. "border='0' hspace='0' /></a>\n";
            }
            else
            {
                $questionsummary .= "<a href='$scriptname?sid=$surveyid&amp;gid=$gid&amp;qid=$qid'" .
				"onclick=\"alert('".$clang->gT("It's impossible to delete this question because there is at least one question having a condition on it.","js")."')\""
				. "title=\"".$clang->gTview("Disabled - Delete current question")."\">"
				. "<img src='$imageurl/delete_disabled.png' name='DeleteWholeQuestion' alt='".$clang->gT("Disabled - Delete current question")."' /></a>\n";
            }
        }
        else {$questionsummary .= "<img src='$imageurl/blank.gif' alt='' width='40' />\n";}


        // EXPORT CURRENT QUESTION BUTTON
开发者ID:nmklong,项目名称:limesurvey-cdio3,代码行数:31,代码来源:html.php


示例8: activateSurvey


//.........这里部分代码省略.........
                }
                break;
            case "ipaddress":
                if ($prow['ipaddr'] == "Y") {
                    $createsurvey .= " X";
                }
                break;
            case "url":
                if ($prow['refurl'] == "Y") {
                    $createsurvey .= " X";
                }
                break;
            case "token":
                if ($prow['anonymized'] == "N") {
                    $createsurvey .= " C(36)";
                }
                break;
            default:
                $createsurvey .= " C(5)";
        }
    }
    $timingsfieldmap = createTimingsFieldMap($surveyid);
    $createsurveytimings .= '`' . implode("` F DEFAULT '0',\n`", array_keys($timingsfieldmap)) . "` F DEFAULT '0'";
    // If last question is of type MCABCEFHP^QKJR let's get rid of the ending coma in createsurvey
    $createsurvey = rtrim($createsurvey, ",\n") . "\n";
    // Does nothing if not ending with a comma
    $tabname = "{$dbprefix}survey_{$postsid}";
    # not using db_table_name as it quotes the table name (as does CreateTableSQL)
    $taboptarray = array('mysql' => 'ENGINE=' . $databasetabletype . '  CHARACTER SET utf8 COLLATE utf8_unicode_ci', 'mysqli' => 'ENGINE=' . $databasetabletype . '  CHARACTER SET utf8 COLLATE utf8_unicode_ci');
    $dict = NewDataDictionary($connect);
    $sqlarray = $dict->CreateTableSQL($tabname, $createsurvey, $taboptarray);
    if (isset($savetimings) && $savetimings == "TRUE") {
        $tabnametimings = $tabname . '_timings';
        $sqlarraytimings = $dict->CreateTableSQL($tabnametimings, $createsurveytimings, $taboptarray);
    }
    $execresult = $dict->ExecuteSQLArray($sqlarray, 1);
    if ($execresult == 0 || $execresult == 1) {
        $activateoutput .= "<br />\n<div class='messagebox ui-corner-all'>\n" . "<div class='header ui-widget-header'>" . $clang->gT("Activate Survey") . " ({$surveyid})</div>\n" . "<div class='warningheader'>" . $clang->gT("Survey could not be actived.") . "</div>\n" . "<p>" . $clang->gT("Database error:") . "\n <font color='red'>" . $connect->ErrorMsg() . "</font>\n" . "<pre>{$createsurvey}</pre>\n\n        <a href='{$scriptname}?sid={$postsid}'>" . $clang->gT("Main Admin Screen") . "</a>\n</div>";
    }
    if ($execresult != 0 && $execresult != 1) {
        $anquery = "SELECT autonumber_start FROM {$dbprefix}surveys WHERE sid={$postsid}";
        if ($anresult = db_execute_assoc($anquery)) {
            //if there is an autonumber_start field, start auto numbering here
            while ($row = $anresult->FetchRow()) {
                if ($row['autonumber_start'] > 0) {
                    if ($databasetype == 'odbc_mssql' || $databasetype == 'odbtp' || $databasetype == 'mssql_n' || $databasetype == 'mssqlnative') {
                        mssql_drop_primary_index('survey_' . $postsid);
                        mssql_drop_constraint('id', 'survey_' . $postsid);
                        $autonumberquery = "alter table {$dbprefix}survey_{$postsid} drop column id ";
                        $connect->Execute($autonumberquery);
                        $autonumberquery = "alter table {$dbprefix}survey_{$postsid} add [id] int identity({$row['autonumber_start']},1)";
                        $connect->Execute($autonumberquery);
                    } else {
                        $autonumberquery = "ALTER TABLE {$dbprefix}survey_{$postsid} AUTO_INCREMENT = " . $row['autonumber_start'];
                        $result = @$connect->Execute($autonumberquery);
                    }
                }
            }
            if (isset($savetimings) && $savetimings == "TRUE") {
                $dict->ExecuteSQLArray($sqlarraytimings, 1);
                // create a timings table for this survey
            }
        }
        $activateoutput .= "<br />\n<div class='messagebox ui-corner-all'>\n";
        $activateoutput .= "<div class='header ui-widget-header'>" . $clang->gT("Activate Survey") . " ({$surveyid})</div>\n";
        $activateoutput .= "<div class='successheader'>" . $clang->gT("Survey has been activated. Results table has been successfully created.") . "</div><br /><br />\n";
        // create the survey directory where the uploaded files can be saved
        if ($createsurveydirectory) {
            if (!file_exists($uploaddir . "/surveys/" . $postsid . "/files")) {
                if (!mkdir($uploaddir . "/surveys/" . $postsid . "/files", 0777, true)) {
                    $activateoutput .= "<div class='warningheader'>" . $clang->gT("The required directory for saving the uploaded files couldn't be created. Please check file premissions on the limesurvey/upload/surveys directory.") . "</div>";
                } else {
                    file_put_contents($uploaddir . "/surveys/" . $postsid . "/files/index.html", '<html><head></head><body></body></html>');
                }
            }
        }
        $acquery = "UPDATE {$dbprefix}surveys SET active='Y' WHERE sid=" . $surveyid;
        $acresult = $connect->Execute($acquery);
        if (isset($surveyallowsregistration) && $surveyallowsregistration == "TRUE") {
            $activateoutput .= $clang->gT("This survey allows public registration. A token table must also be created.") . "<br /><br />\n";
            $activateoutput .= "<input type='submit' value='" . $clang->gT("Initialise tokens") . "' onclick=\"" . get2post("{$scriptname}?action=tokens&amp;sid={$postsid}&amp;createtable=Y") . "\" />\n";
        } else {
            $activateoutput .= $clang->gT("This survey is now active, and responses can be recorded.") . "<br /><br />\n";
            $activateoutput .= "<strong>" . $clang->gT("Open-access mode") . ":</strong> " . $clang->gT("No invitation code is needed to complete the survey.") . "<br />" . $clang->gT("You can switch to the closed-access mode by initialising a token table with the button below.") . "<br /><br />\n";
            $activateoutput .= "<input type='submit' value='" . $clang->gT("Switch to closed-access mode") . "' onclick=\"" . get2post("{$scriptname}?action=tokens&amp;sid={$postsid}&amp;createtable=Y") . "\" />\n";
            $activateoutput .= "<input type='submit' value='" . $clang->gT("No, thanks.") . "' onclick=\"" . get2post("{$scriptname}?sid={$postsid}") . "\" />\n";
        }
        $activateoutput .= "</div><br />&nbsp;\n";
        $lsrcOutput = true;
    }
    if ($scriptname == 'lsrc') {
        if ($lsrcOutput == true) {
            return true;
        } else {
            return $activateoutput;
        }
    } else {
        return $activateoutput;
    }
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:101,代码来源:activate_functions.php


示例9: get2post

    $resetsurveylogicoutput .= "</body>\n</html>";
    return;
}
if (!isset($ok) || !$ok) {
    $resetsurveylogicoutput .= "\t<tr>\n";
    $resetsurveylogicoutput .= "\t\t<td align='center'><br />\n";
    $resetsurveylogicoutput .= "\t\t\t<font color='red'><strong>" . $clang->gT("Warning") . "</strong></font><br />\n";
    $resetsurveylogicoutput .= "\t\t\t<strong>" . $clang->gT("You are about to delete all conditions on this survey's questions") . " ({$surveyid})</strong><br /><br />\n";
    $resetsurveylogicoutput .= "\t\t\t" . $clang->gT("We recommend that before you proceed, you export the entire survey from the main administration screen.") . "\n";
    $resetsurveylogicoutput .= "\t\t</td>\n";
    $resetsurveylogicoutput .= "\t</tr>\n";
    $resetsurveylogicoutput .= "\t<tr>\n";
    $resetsurveylogicoutput .= "\t\t<td align='center'><br />\n";
    $resetsurveylogicoutput .= "\t\t\t<input type='submit'  value='" . $clang->gT("Cancel") . "' onclick=\"window.open('admin.php?sid={$surveyid}', '_self')\" /><br />\n";
    //	$resetsurveylogicoutput .= "\t\t\t<input type='submit'  value='".$clang->gT("Delete")."' onclick=\"window.open('$scriptname?action=resetsurveylogic&amp;sid=$surveyid&amp;ok=Y','_self')\" />\n";
    $resetsurveylogicoutput .= "\t\t\t<input type='submit'  value='" . $clang->gT("Delete") . "' onclick=\"" . get2post("{$scriptname}?action=resetsurveylogic&amp;sid={$surveyid}&amp;ok=Y") . "\" />\n";
    $resetsurveylogicoutput .= "\t\t</td>\n";
    $resetsurveylogicoutput .= "\t</tr>\n";
    $resetsurveylogicoutput .= "\n";
} else {
    $dict = NewDataDictionary($connect);
    LimeExpressionManager::RevertUpgradeConditionsToRelevance($surveyid);
    $resetlogicquery = "DELETE FROM {$dbprefix}conditions WHERE qid in (select qid from {$dbprefix}questions where sid={$surveyid})";
    $resetlogicresult = $connect->Execute($resetlogicquery) or safe_die("Couldn't delete conditions<br />{$resetlogicquery}<br />" . $connect->ErrorMsg());
    $resetsurveylogicoutput .= "\t<tr>\n";
    $resetsurveylogicoutput .= "\t\t<td align='center'><br />\n";
    $resetsurveylogicoutput .= "\t\t\t<strong>" . $clang->gT("All conditions in this survey have been deleted.") . "<br /><br />\n";
    $resetsurveylogicoutput .= "\t\t\t<input type='submit' value='" . $clang->gT("Continue") . "' onclick=\"window.open('{$scriptname}?sid={$surveyid}', '_self')\" />\n";
    $resetsurveylogicoutput .= "\t\t</strong></td>\n";
    $resetsurveylogicoutput .= "\t</tr>\n";
    $surveyid = false;
开发者ID:ddrmoscow,项目名称:queXS,代码行数:31,代码来源:resetsurveylogic.php


示例10: getusergrouplist

    $_SESSION['loginID'] == $grow['owner_id'])
    {
        $usergroupsummary .=  "<a href=\"#\" onclick=\"window.location='$scriptname?action=editusergroup&amp;ugid=$ugid'\""
        . " title='".$clang->gTview("Edit Current User Group")."'>"
        . "<img src='$imageurl/edit.png' alt='".$clang->gT("Edit Current User Group")."' name='EditUserGroup' /></a>\n" ;
    }
    else
    {
        $usergroupsummary .= "<img src='$imageurl/blank.gif' alt='' width='40' height='20' />\n";
    }

    if($ugid && $grpresultcount > 0 &&
    $_SESSION['loginID'] == $grow['owner_id'])
    {
        //		$usergroupsummary .= "<a href='$scriptname?action=delusergroup&amp;ugid=$ugid' onclick=\"return confirm('".$clang->gT("Are you sure you want to delete this entry?","js")."')\""
        $usergroupsummary .= "<a href='#' onclick=\"if (confirm('".$clang->gT("Are you sure you want to delete this entry?","js")."')) {".get2post("$scriptname?action=delusergroup&amp;ugid=$ugid")."}\" "
        . "title='".$clang->gTview("Delete Current User Group")."'>"
        . "<img src='$imageurl/delete.png' alt='".$clang->gT("Delete Current User Group")."' name='DeleteUserGroup'  /></a>\n";
    }
    else
    {
        $usergroupsummary .= "<img src='$imageurl/blank.gif' alt='' width='40' height='20' />\n";
    }
    $usergroupsummary .= "<img src='$imageurl/blank.gif' alt='' width='92' height='20' />\n"
    . "<img src='$imageurl/seperator.gif' alt='' />\n"
    . "</div>\n"
    . "<div class='menubar-right'>\n"
    . "<font class=\"boxcaption\">".$clang->gT("User Groups").":</font>&nbsp;<select name='ugid' "
    . "onchange=\"window.location=this.options[this.selectedIndex].value\">\n"
    . getusergrouplist()
    . "</select>\n";
开发者ID:nmklong,项目名称:limesurvey-cdio3,代码行数:31,代码来源:userrighthandling.php


示例11: get2post

    }
    $usergroupsummary .= "</div>\n" . "<div class='menubar-main'>\n" . "<div class='menubar-left'>\n" . "<img src='{$imageurl}/blank.gif' alt='' width='55' height='20' />\n" . "<img src='{$imageurl}/seperator.gif' alt='' />\n";
    if ($ugid && $grpresultcount > 0) {
        $usergroupsummary .= "<a href=\"#\" onclick=\"window.location='{$scriptname}?action=mailusergroup&amp;ugid={$ugid}'\"" . " title='" . $clang->gTview("Mail to all Members") . "'> " . "<img src='{$imageurl}/invite.png' alt='" . $clang->gT("Mail to all Members") . "' name='MailUserGroup' /></a>\n";
    } else {
        $usergroupsummary .= "<img src='{$imageurl}/blank.gif' alt='' width='40' height='20' />\n";
    }
    $usergroupsummary .= "<img src='{$imageurl}/blank.gif' alt='' width='78' height='20' />\n" . "<img src='{$imageurl}/seperator.gif' alt='' />\n";
    if ($ugid && $grpresultcount > 0 && $_SESSION['loginID'] == $grow['owner_id']) {
        $usergroupsummary .= "<a href=\"#\" onclick=\"window.location='{$scriptname}?action=editusergroup&amp;ugid={$ugid}'\"" . " title='" . $clang->gTview("Edit Current User Group") . "'>" . "<img src='{$imageurl}/edit.png' alt='" . $clang->gT("Edit Current User Group") . "' name='EditUserGroup' /></a>\n";
    } else {
        $usergroupsummary .= "<img src='{$imageurl}/blank.gif' alt='' width='40' height='20' />\n";
    }
    if ($ugid && $grpresultcount > 0 && $_SESSION['loginID'] == $grow['owner_id']) {
        //		$usergroupsummary .= "<a href='$scriptname?action=delusergroup&amp;ugid=$ugid' onclick=\"return confirm('".$clang->gT("Are you sure you want to delete this entry?","js")."')\""
        $usergroupsummary .= "<a href='#' onclick=\"if (confirm('" . $clang->gT("Are you sure you want to delete this entry?", "js") . "')) {" . get2post("{$scriptname}?action=delusergroup&amp;ugid={$ugid}") . "}\" " . "title='" . $clang->gTview("Delete Current User Group") . "'>" . "<img src='{$imageurl}/delete.png' alt='" . $clang->gT("Delete Current User Group") . "' name='DeleteUserGroup'  /></a>\n";
    } else {
        $usergroupsummary .= "<img src='{$imageurl}/blank.gif' alt='' width='40' height='20' />\n";
    }
    $usergroupsummary .= "<img src='{$imageurl}/blank.gif' alt='' width='92' height='20' />\n" . "<img src='{$imageurl}/seperator.gif' alt='' />\n" . "</div>\n" . "<div class='menubar-right'>\n" . "<font class=\"boxcaption\">" . $clang->gT("User Groups") . ":</font>&nbsp;<select name='ugid' " . "onchange=\"window.location=this.options[this.selectedIndex].value\">\n" . getusergrouplist() . "</select>\n";
    if ($_SESSION['USER_RIGHT_SUPERADMIN'] == 1) {
        $usergroupsummary .= "<a href='{$scriptname}?action=addusergroup'" . " title='" . $clang->gTview("Add New User Group") . "'>" . "<img src='{$imageurl}/add.png' alt='" . $clang->gT("Add New User Group") . "' " . "name='AddNewUserGroup' onclick=\"window.location=''\" /></a>\n";
    }
    $usergroupsummary .= "<img src='{$imageurl}/seperator.gif' alt='' />\n" . "<img src='{$imageurl}/blank.gif' alt='' width='82' height='20' />\n" . "</div></div>\n" . "</div>\n";
    $usergroupsummary .= "<p style='margin:0;font-size:1px;line-height:1px;height:1px;'>&nbsp;</p>";
    //CSS Firefox 2 transition fix
}
if ($action == "adduser" || $action == "deluser" || $action == "finaldeluser" || $action == "moduser" || $action == "userrights" || $action == "usertemplates") {
    include "usercontrol.php";
}
if ($action == "setusertemplates") {
开发者ID:himanshu12k,项目名称:ce-www,代码行数:31,代码来源:userrighthandling.php


示例12: while

            ."</ul><br />\n";
        }
        $tokenoutput .= "</div>\n";
    }
}

if ($subaction == "tokenify" && bHasSurveyPermission($surveyid, 'tokens', 'update'))
{
    $tokenoutput .= "<div class='header ui-widget-header'>".$clang->gT("Create tokens")."</div>\n";
    $tokenoutput .= "<div class='messagebox ui-corner-all'>\n";
    if (!isset($_POST['ok']) || !$_POST['ok'])
    {
        $tokenoutput .= "".$clang->gT("Clicking yes will generate tokens for all those in this token list that have not been issued one. Is this OK?")."<br /><br />\n"
        ."<input type='submit' value='"
        //        .$clang->gT("Yes")."' onclick=\"window.open('$scriptname?action=tokens&amp;sid=$surveyid&amp;subaction=tokenify&amp;ok=Y', '_top')\" />\n"
        .$clang->gT("Yes")."' onclick=\"".get2post("$scriptname?action=tokens&amp;sid=$surveyid&amp;subaction=tokenify&amp;ok=Y")."\" />\n"
        ."<input type='submit' value='"
        .$clang->gT("No")."' onclick=\"window.open('$scriptname?action=tokens&amp;sid=$surveyid', '_top')\" />\n"
        ."<br />\n";
    }
    else
    {
        //get token length from survey settings
        $tlquery = "SELECT tokenlength FROM ".db_table_name("surveys")." WHERE sid=$surveyid";
        $tlresult = db_execute_assoc($tlquery);
        while ($tlrow = $tlresult->FetchRow())
        {
            $tokenlength = $tlrow['tokenlength'];
        }

        //if tokenlength is not set or there are other problems use the default value (15)
开发者ID:nmklong,项目名称:limesurvey-cdio3,代码行数:31,代码来源:tokens.php


示例13: returnglobal

$postsid = returnglobal('sid');
$date = date('YmdHis');
//'Hi' adds 24hours+minutes to name to allow multiple deactiviations in a day
$deactivateoutput = '';
if (!isset($_POST['ok']) || !$_POST['ok']) {
    $deactivateoutput .= "<br />\n<div class='messagebox ui-corner-all'>\n";
    $deactivateoutput .= "<div class='header ui-widget-header'>" . $clang->gT("Deactivate Survey") . " ({$surveyid})</div>\n";
    $deactivateoutput .= "\t<div class='warningheader'>\n";
    $deactivateoutput .= $clang->gT("Warning") . "<br />" . $clang->gT("READ THIS CAREFULLY BEFORE PROCEEDING");
    $deactivateoutput .= "</div>\n";
    $deactivateoutput .= "\t" . $clang->gT("In an active survey, a table is created to store all the data-entry records.") . "\n";
    $deactivateoutput .= "\t<p>" . $clang->gT("When you deactivate a survey all the data entered in the original table will be moved elsewhere, and when you activate the survey again, the table will be empty. You will not be able to access this data using LimeSurvey any more.") . "</p>\n";
    $deactivateoutput .= "\t<p>" . $clang->gT("Deactivated survey data can only be accessed by system administrators using a Database data access tool like phpmyadmin. If your survey uses tokens, this table will also be renamed and will only be accessible by system administrators.") . "</p>\n";
    $deactivateoutput .= "\t<p>" . $clang->gT("Your responses table will be renamed to:") . " {$dbprefix}old_{$_GET['sid']}_{$date}</p>\n";
    $deactivateoutput .= "\t<p>" . $clang->gT("Also you should export your responses before deactivating.") . "</p>\n";
    $deactivateoutput .= "\t<input type='submit' value='" . $clang->gT("Deactivate Survey") . "' onclick=\"" . get2post("{$scriptname}?action=deactivate&amp;ok=Y&amp;sid={$_GET['sid']}") . "\" />\n";
    $deactivateoutput .= "</div><br />\n";
} else {
    //See if there is a tokens table for this survey
    if (tableExists("tokens_{$postsid}")) {
        $toldtable = "tokens_{$postsid}";
        $tnewtable = "old_tokens_{$postsid}_{$date}";
        $tdeactivatequery = db_rename_table(db_table_name_nq($toldtable), db_table_name_nq($tnewtable));
        $tdeactivateresult = $connect->Execute($tdeactivatequery) or die("Couldn't deactivate tokens table because:<br />" . htmlspecialchars($connect->ErrorMsg()) . "<br /><br />Survey was not deactivated either.<br /><br /><a href='{$scriptname}?sid={$postsid}'>" . $clang->gT("Main Admin Screen") . "</a>");
        if ($databasetype == 'postgres') {
            // If you deactivate a postgres table you have to rename the according sequence too and alter the id field to point to the changed sequence
            $deactivatequery = db_rename_table(db_table_name_nq($toldtable) . '_tid_seq', db_table_name_nq($tnewtable) . '_tid_seq');
            $deactivateresult = $connect->Execute($deactivatequery) or die("Could not rename the old sequence for this token table. The database reported the following error:<br />" . htmlspecialchars($connect->ErrorMsg()) . "<br /><br /><a href='{$scriptname}?sid={$postsid}'>" . $clang->gT("Main Admin Screen") . "</a>");
            $setsequence = "ALTER TABLE " . db_table_name_nq($tnewtable) . " ALTER COLUMN tid SET DEFAULT nextval('" . db_table_name_nq($tnewtable) . "_tid_seq'::regclass);";
           

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getAbsolutePath函数代码示例发布时间:2022-05-15
下一篇:
PHP get函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap