当前位置: 首页>>代码示例>>PHP>>正文


PHP DisplayForm函数代码示例

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


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

示例1: InteractiveShell

function InteractiveShell($sExpression, $sQueryId, $sFormat, $sFileName, $sMode)
{
    if ($sMode == 'dialog') {
        $oP = new ajax_page('');
        $oP->add('<div id="interactive_export_dlg">');
        $sExportBtnLabel = json_encode(Dict::S('UI:Button:Export'));
        $sJSTitle = json_encode(htmlentities(utils::ReadParam('dialog_title', '', false, 'raw_data'), ENT_QUOTES, 'UTF-8'));
        $oP->add_ready_script(<<<EOF
\t\t\$('#interactive_export_dlg').dialog({
\t\t\tautoOpen: true,
\t\t\tmodal: true,
\t\t\twidth: '80%',
\t\t\ttitle: {$sJSTitle},
\t\t\tclose: function() { \$('#export-form').attr('data-state', 'cancelled'); \$(this).remove(); },
\t\t\tbuttons: [
\t\t\t\t{text: {$sExportBtnLabel}, id: 'export-dlg-submit', click: function() {} }
\t\t\t]
\t\t});
\t\t\t
\t\tsetTimeout(function() { \$('#interactive_export_dlg').dialog('option', { position: { my: "center", at: "center", of: window }}); \$('#export-btn').hide(); ExportInitButton('#export-dlg-submit'); }, 100);
EOF
);
    } else {
        $oP = new iTopWebPage('iTop Export');
    }
    if ($sExpression === null) {
        // No expression supplied, let's check if phrasebook entry is given
        if ($sQueryId !== null) {
            $oSearch = DBObjectSearch::FromOQL('SELECT QueryOQL WHERE id = :query_id', array('query_id' => $sQueryId));
            $oQueries = new DBObjectSet($oSearch);
            if ($oQueries->Count() > 0) {
                $oQuery = $oQueries->Fetch();
                $sExpression = $oQuery->Get('oql');
                $sFields = trim($oQuery->Get('fields'));
            } else {
                ReportErrorAndExit("Invalid query phrasebook identifier: '{$sQueryId}'");
            }
        } else {
            if (utils::IsModeCLI()) {
                Usage();
                ReportErrorAndExit("No expression or query phrasebook identifier supplied.");
            } else {
                // form to enter an OQL query or pick a query phrasebook identifier
                DisplayForm($oP, utils::GetAbsoluteUrlAppRoot() . 'webservices/export-v2.php', $sExpression, $sQueryId, $sFormat);
                $oP->output();
                exit;
            }
        }
    }
    if ($sFormat !== null) {
        $oExporter = BulkExport::FindExporter($sFormat);
        if ($oExporter === null) {
            $aSupportedFormats = BulkExport::FindSupportedFormats();
            ReportErrorAndExit("Invalid output format: '{$sFormat}'. The supported formats are: " . implode(', ', array_keys($aSupportedFormats)));
        } else {
            DisplayForm($oP, utils::GetAbsoluteUrlAppRoot() . 'webservices/export-v2.php', $sExpression, $sQueryId, $sFormat);
        }
    } else {
        DisplayForm($oP, utils::GetAbsoluteUrlAppRoot() . 'webservices/export-v2.php', $sExpression, $sQueryId, $sFormat);
    }
    if ($sMode == 'dialog') {
        $oP->add('</div>');
    }
    $oP->output();
}
开发者ID:henryavila,项目名称:itop,代码行数:65,代码来源:export-v2.php

示例2: GetLoadDesiredRecord

     $DesiredRecord = $_POST['SelectRecord'];
     GetLoadDesiredRecord();
     DisplayForm();
     break;
 case 'Delete':
     $DesiredRecord = $_POST['SelectRecord'];
     GetLoadDesiredRecord();
     DeleteForm();
     break;
 case 'Next':
     Db_Next();
     DisplayForm();
     break;
 case 'Previous':
     Db_Prev();
     DisplayForm();
     break;
 case 'Submit Changes':
     GetPostVariables();
     Db_Update();
     ListMenu();
     break;
 case 'Submit Delete':
     GetPostVariables();
     Db_Delete();
     ListMenu();
     break;
 case 'Submit Add':
     GetPostVariables();
     if (ValidUniqueCode()) {
         Db_Add();
开发者ID:EScuba,项目名称:RSD,代码行数:31,代码来源:DiveSiteMedical.php

示例3: GetVariable

	$formtitle = GetVariable("formtitle");
	$formdesc = GetVariable("formdesc");

	//$formfieldid = GetVariable("formfieldid");
	$datatype = GetVariable("datatype");
	$field = GetVariable("field");
	$order = GetVariable("order");
	$values = GetVariable("values");
	$linebreaks = GetVariable("linebreaks");
	$scored = GetVariable("scored");
	
	
	/* determine action */
	switch ($action) {
		case 'editform': DisplayFormForm("edit", $id); break;
		case 'viewform': DisplayForm($id); break;
		case 'addform': DisplayFormForm("add", ""); break;
		case 'updatefields':
			UpdateFields($id, $datatype, $field, $order, $values, $linebreaks, $scored);
			DisplayFormForm("edit", $id);
			break;
		case 'update':
			UpdateForm($id, $formtitle, $formdesc, $username);
			DisplayFormList();
			break;
		case 'add':
			AddForm($formtitle, $formdesc, $username);
			DisplayFormList();
			break;
		case 'delete':
			DeleteForm($id);
开发者ID:EugeniaRadulescu,项目名称:nidb,代码行数:31,代码来源:adminforms.php

示例4: array

<?php

/**
 * @author
 * @copyright 2010
 */
include "connection.php";
if (isset($_GET['appid'])) {
    $folder = "image/";
    $trans = array("/" => "_");
    $filename = strtr($appid, $trans);
    $filename2 = $filename . "_" . "1" . ".jpg";
    $filename3 = $filename . "_" . "2" . ".jpg";
    if (file_exists("image/" . $filename2)) {
        DisplayForm($filename2, $filename3, $appid);
    } else {
        header("Location: Add_image.php");
        exit;
    }
} else {
    echo "<script type=\"text/javascript\">alert(\"ERROR:: Registration No. is not entered properly. Pls Check\")</script>";
}
开发者ID:BipadTaranMahato,项目名称:DCPS-Recruitment,代码行数:22,代码来源:image.php

示例5: GetVariable

$formtitle = GetVariable("formtitle");
$formdesc = GetVariable("formdesc");
//$formfieldid = GetVariable("formfieldid");
$datatype = GetVariable("datatype");
$field = GetVariable("field");
$order = GetVariable("order");
$values = GetVariable("values");
$linebreaks = GetVariable("linebreaks");
$scored = GetVariable("scored");
/* determine action */
switch ($action) {
    case 'editform':
        DisplayFormForm("edit", $id);
        break;
    case 'viewform':
        DisplayForm($id);
        break;
    case 'addform':
        DisplayFormForm("add", "");
        break;
    case 'updatefields':
        UpdateFields($id, $datatype, $field, $order, $values, $linebreaks, $scored);
        DisplayFormForm("edit", $id);
        break;
    case 'update':
        UpdateForm($id, $formtitle, $formdesc, $username);
        DisplayFormList();
        break;
    case 'add':
        AddForm($formtitle, $formdesc, $username);
        DisplayFormList();
开发者ID:pmolfese,项目名称:nidb,代码行数:31,代码来源:adminforms.php

示例6: Add

function Add($method, $id, $groupid, $username, $calendarid, $projectid, $details, $title, $startdatetime, $enddatetime, $isalldayevent, $istimerequest, $currentcal, $repeats, $repeattype, $repeatsun, $repeatmon, $repeattue, $repeatwed, $repeatthu, $repeatfri, $repeatsat, $repeatenddate, $editall)
{
    /* check if any form elements are bad, if so redisplay the addform */
    if ($title == "") {
        DisplayForm("", "'Title' is blank", "", $username, $calendarid, $projectid, $details, $title, $startdatetime, $enddatetime, $isalldayevent, $istimerequest, $currentcal, $repeats, $repeattype, $repeatsun, $repeatmon, $repeattue, $repeatwed, $repeatthu, $repeatfri, $repeatsat, $repeatenddate);
        return;
    }
    if (!strtotime($startdatetime)) {
        DisplayForm("", "'Start date/time' is invalid", "", $username, $calendarid, $projectid, $details, $title, $startdatetime, $enddatetime, $isalldayevent, $istimerequest, $currentcal, $repeats, $repeattype, $repeatsun, $repeatmon, $repeattue, $repeatwed, $repeatthu, $repeatfri, $repeatsat, $repeatenddate);
        return;
    }
    if (!strtotime($enddatetime)) {
        DisplayForm("", "'End date/time' is invalid", "", $username, $calendarid, $projectid, $details, $title, $startdatetime, $enddatetime, $isalldayevent, $istimerequest, $currentcal, $repeats, $repeattype, $repeatsun, $repeatmon, $repeattue, $repeatwed, $repeatthu, $repeatfri, $repeatsat, $repeatenddate);
        return;
    }
    $details = mysql_real_escape_string($details);
    $title = mysql_real_escape_string($title);
    /* check if this appointment repeats */
    if (!$repeats) {
        $numappts = 1;
        $startdatetimes[0] = date('Y-m-d H:i:s', strtotime($startdatetime));
        $enddatetimes[0] = date('Y-m-d H:i:s', strtotime($enddatetime));
    } else {
        if ($method == "add") {
            /* get all dates on which the repeating appt falls */
            /* determine # of days between starting and ending date */
            $totaltimediff = strtotime($repeatenddate) - strtotime($startdatetime) + 86400;
            /* for daily and monthly, add the current date first. all dates are added inside the weekly case below */
            if ($repeattype == "daily" || $repeattype == "monthly") {
                $newappt = date('Y-m-d H:i:s', strtotime($startdatetime));
                $appts[] = $newappt;
            }
            /* add interval until date difference between starting and new appt is greater than ending date */
            $numappts = 1;
            $lastappt = $startdatetime;
            //print "Lastappt: $lastappt<br>";
            //$appts[] = $startdatetime;
            $done = false;
            while (!$done) {
                switch ($repeattype) {
                    case "daily":
                        $newappt = date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s', strtotime($lastappt)) . " +1 days"));
                        $appts[] = $newappt;
                        break;
                    case "weekly":
                        //print "----- Lastappt: $lastappt<br>";
                        if ($repeatsun) {
                            $appt = date('Y-m-d H:i:s', strtotime("Sunday", strtotime($lastappt)));
                            //print "Sun appt: $appt<br>";
                            $appts[] = $appt;
                        }
                        if ($repeatmon) {
                            $appt = date('Y-m-d H:i:s', strtotime("Monday", strtotime($lastappt)));
                            //print "Mon appt: $appt<br>";
                            $appts[] = $appt;
                        }
                        if ($repeattue) {
                            $appt = date('Y-m-d H:i:s', strtotime("Tuesday", strtotime($lastappt)));
                            //print "Tue appt: $appt<br>";
                            $appts[] = $appt;
                        }
                        if ($repeatwed) {
                            $appt = date('Y-m-d H:i:s', strtotime("Wednesday", strtotime($lastappt)));
                            //print "Wed appt: $appt<br>";
                            $appts[] = $appt;
                        }
                        if ($repeatthu) {
                            $appt = date('Y-m-d H:i:s', strtotime("Thursday", strtotime($lastappt)));
                            //print "Thu appt: $appt<br>";
                            $appts[] = $appt;
                        }
                        if ($repeatfri) {
                            $appt = date('Y-m-d H:i:s', strtotime("Friday", strtotime($lastappt)));
                            //print "Fri appt: $appt<br>";
                            $appts[] = $appt;
                        }
                        if ($repeatsat) {
                            $appt = date('Y-m-d H:i:s', strtotime("Saturday", strtotime($lastappt)));
                            //print "Sat appt: $appt<br>";
                            $appts[] = $appt;
                        }
                        $newappt = date('Y-m-d H:i:s', strtotime($lastappt . " +1 weeks"));
                        break;
                    case "monthly":
                        $newappt = date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s', strtotime($lastappt)) . " +1 month"));
                        $appts[] = $newappt;
                        break;
                }
                $newtimediff = strtotime($newappt) - strtotime($startdatetime);
                if ($newtimediff > $totaltimediff) {
                    $done = true;
                    break;
                }
                $numappts++;
                if ($numappts > 100) {
                    $done = true;
                }
                $lastappt = $newappt;
            }
            /* sort the appointment list and remove any appointments that fall outside the startdate/enddate range */
//.........这里部分代码省略.........
开发者ID:pmolfese,项目名称:nidb,代码行数:101,代码来源:calendar_appointments.php

示例7: CreateAccount

    case 'create':
        $msg = CreateAccount($email, $firstname, $midname, $lastname, $institution, $instance, $country, $password);
        if ($msg != "") {
            DisplayForm($msg, $email, $firstname, $midname, $lastname, $institution, $instance, $country);
        } else {
            DisplaySuccessMessage($email, $firstname, $midname, $lastname, $institution, $instance, $country, $password);
        }
        break;
    case 'r':
        ResetPasswordForm("");
        break;
    case 'rp':
        ResetPassword($e);
        break;
    default:
        DisplayForm("");
}
/* -------------------------------------------- */
/* ------- DisplaySuccessMessage -------------- */
/* -------------------------------------------- */
function DisplaySuccessMessage($email, $name, $institution, $country, $password)
{
    ?>
		<div align="center">
		<br><br>
		<b>Thank you for signing up</b><br><br>
		An email has been sent to &lt;<?php 
    echo $email;
    ?>
&gt; with a link to activate your account.
		</div>
开发者ID:pmolfese,项目名称:nidb,代码行数:31,代码来源:signup.php


注:本文中的DisplayForm函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。