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


PHP print_form函数代码示例

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


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

示例1: print_mailer

function print_mailer()
{
    global $form_name, $form_header, $form_rcpt, $form_thankyou, $form_error, $form_invalid;
    if (form_is_posted() && form_is_valid()) {
        $name = $_POST['name'];
        $mail = $_POST['mail'];
        $subj = "=?UTF-8?B?" . base64_encode($form_name) . "?=\n";
        $body = make_body();
        $head = "From: {$name} ({$_SERVER['REMOTE_ADDR']}) <{$mail}>\n";
        $head .= "Reply-To: {$name} <{$mail}>\n";
        $head .= "MIME-Version: 1.0\n";
        $head .= "Content-Type: text/plain; charset=UTF-8";
        if (mail($form_rcpt, $subj, $body, $head)) {
            echo $form_thankyou;
        } else {
            echo $form_error;
            print_form();
        }
    } else {
        if (form_is_posted()) {
            print_form($form_invalid);
        } else {
            print_form($form_header);
        }
    }
}
开发者ID:jsageryd,项目名称:mailer,代码行数:26,代码来源:mailer.php

示例2: category

function category($name, $options, $row)
{
    global $var;
    $i = 0;
    //table name thing goes here
    print "<tr>";
    print "<td align=center>{$name}</td>";
    $container = array();
    $container["url"] = "skeleton.php";
    $container["body"] = "hall_of_fame_new_detail.php";
    $container["category"] = $name;
    $container["row"] = $row;
    if (isset($var["game_id"])) {
        $container["game_id"] = $var["game_id"];
    }
    print_form($container);
    print "<td align=center valign=middle>";
    foreach ($options as $print) {
        $i++;
        list($one, $two) = explode(",", $print);
        if (isset($two)) {
            print "<input type=hidden name=mod[] value=\"{$print}\">";
        }
        print_submit($one);
        print "&nbsp;";
        if ($i % 3 == 0) {
            print "<br>";
        }
        //unset vars for next sub cat
        unset($one, $two);
    }
    print "</td></form></tr>";
}
开发者ID:smrealms,项目名称:smrv2.0,代码行数:33,代码来源:hall_of_fame_new.php

示例3: process_form

function process_form()
{
    //Create variables to store the input
    $Name = $_POST['name'];
    $Name = htmlspecialchars($Name);
    $Email = $_POST['email'];
    $Email = htmlspecialchars($Email);
    $Comments = $_POST['comments'];
    $Comments = htmlspecialchars($Comments);
    //If the user did not enter any comments, tell them that they must submit comments and reprint the form
    if ($Comments == NULL) {
        print_form();
        echo "<script> contact_us_fill_fields('{$Name}', '{$Email}');</script>";
        echo "<script> contact_us_applyError('textComments'); </script>";
        exit;
    }
    //Email the message to aah1754@truman.edu
    $subject = "Arete Message";
    if (!$Name == NULL) {
        $subject = "Arete Message from {$Name}";
    }
    if (Email == NULL) {
        $message = $Comments;
    } else {
        $message = "Email: {$Email}\r\n\r\n{$Comments}";
    }
    mail("aah1754@truman.edu", $subject, $message);
    echo "\n    <header>\n      <nav id='navbar'>\n        <div class='container'>\n        <div id='navLogo' class='nav'>\n          <a href='../index.html'><img id='logo' src='../images/logo.png' alt='logo'></a>\n        </div>\n        <div id='navLinks' class='nav'>\n          <ul id='menu'>\n            <li><a href='../index.html#aboutUsAnchor'>About Us</a></li>\n            <li><a href='../index.html#whatWeDoAnchor'>What We Do</a></li>\n            <li><a href='../index.html#resourcesAnchor'>Resources</a></li>\n            <li><a href='../index.html#newsAnchor'>News</a></li>\n            <li><a href='../index.html#howToHelpAnchor'>How To Help</a></li>\n            <li><a href='../index.html#eventsAnchor'>Events</a></li>\n          </ul>\n        </div>\n        <div id='navDonate' class='nav'>\n          <a href='#' class='navLink'>Contact Us</a>\n          <a href='../Donate/index.php' class='navLink'>Donate</a> \n        </div>\n        </div>\n      </nav>\n    </header>\n    <section id='contactUsSection' class='row'>\n      <h2>Contact Us</h2>\n      <h3>Arete EdTech</h3>\n      <p><span class='bold'>Phone</span> (314) 603-3555</p>";
    if ($Name != NULL) {
        echo "<p>Thank you, {$Name}, for your comments! You wrote:</p>";
    } else {
        echo "<p>Thank you for your comments! You wrote:</p>";
    }
    echo " <p id='contactUsComments'>{$Comments}</p>\n    </section>\n    <footer class='gray'>\n      <p id='right'>501 c3</p>\n      <p>'Let's make a difference and teach children how to code!'</p>\n    </footer> ";
    END;
}
开发者ID:Arete-EdTech,项目名称:Arete-EdTech.github.io,代码行数:36,代码来源:index.php

示例4: _

                $error = true;
                $msg_errors[] = _("File type \"" . $_FILES['file_csv']['type'] . "\" not allowed");
            }
            if (@move_uploaded_file($_FILES["file_csv"]["tmp_name"], $file_csv) == false && !$error) {
                $error = true;
                $msg_errors[] = empty($msg_errors) ? _("Unable to upload file") : $msg_errors;
            }
        }
        if ($error == false) {
            $res = import_assets_csv($file_csv);
        }
        @unlink($file_csv);
    } else {
        $msg_errors[] = _("Filename is empty");
    }
}
if (isset($res['status']) && !empty($res['file_errors'])) {
    $msg_errors[] = $res['file_errors'];
}
print_form($msg_errors);
if (isset($res['status']) && empty($res['file_errors'])) {
    print_results($res);
}
?>
	
	</div>
	
</body>
</html>

开发者ID:jhbsz,项目名称:ossimTest,代码行数:29,代码来源:import_hosts.php

示例5: print_topic

<?php

print_topic("Report a Bug");
print "<span style=\"font-size:75%;\">All information you can see on this page will be sent via email to the developer team!<br>";
print "Be as accurate as possible with your bug description.</span>";
print_form(create_container("bug_report_processing.php", ""));
print "<table>";
print "<tr>";
print "<td style=\"font-weight:bold;\">Login:</td>";
print "<input type=\"hidden\" name=\"login\" value=\"{$account->login}\">";
print "<td>{$account->login}</td>";
print "</tr>";
print "<tr>";
print "<td style=\"font-weight:bold;\">eMail:</td>";
print "<input type=\"hidden\" name=\"email\" value=\"{$account->email}\">";
print "<td>{$account->email}</td>";
print "</tr>";
print "<tr>";
print "<td style=\"font-weight:bold;\">Account ID:</td>";
print "<input type=\"hidden\" name=\"account_id\" value=\"{$account->account_id}\">";
print "<td>{$account->account_id}</td>";
print "</tr>";
print "<tr>";
print "<td style=\"font-weight:bold;\">Subject:</td>";
print "<td><input type=\"text\" name=\"subject\" id=\"InputFields\" style=\"width:300px;\"></td>";
print "</tr>";
print "<tr>";
print "<td style=\"font-weight:bold;\" valign=\"top\">Description:</td>";
print "<td><textarea id=\"InputFields\" name=\"description\" style=\"width:300px;height:100px;\"></textarea></td>";
print "</tr>";
print "<tr>";
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:bug_report.php

示例6: print_topic

<?php

print_topic("SEARCH TRADER");
print "<p>&nbsp;</p>";
print_form(create_container("skeleton.php", "trader_search_result.php"));
print "<span style=\"font-size:75%;\">Player name:</span><br>";
print "<input type=\"text\" name=\"player_name\" id=\"InputFields\" style=\"width:150px\">&nbsp;";
print_submit("Search");
print "<p>&nbsp;</p>";
print "<span style=\"font-size:75%;\">Player ID:</span><br>";
print "<input type=\"text\" name=\"player_id\" id=\"InputFields\" style=\"width:50px\">&nbsp;";
print_submit("Search");
print "</form>";
开发者ID:smrealms,项目名称:smrv2.0,代码行数:13,代码来源:trader_search.php

示例7: hesk_dbFetchAssoc

    if (hesk_dbNumRows($res) == 1) {
        /* OK, found in a merged ticket. Get info */
        $ticket = hesk_dbFetchAssoc($res);
        /* If we require e-mail to view tickets check if it matches the one from merged ticket */
        if (hesk_verifyEmailMatch($ticket['trackid'], $my_email, $ticket['email'], 0)) {
            hesk_process_messages(sprintf($hesklang['tme'], $trackingID, $ticket['trackid']), 'NOREDIRECT', 'NOTICE');
            $trackingID = $ticket['trackid'];
        } else {
            hesk_process_messages(sprintf($hesklang['tme1'], $trackingID, $ticket['trackid']) . '<br /><br />' . sprintf($hesklang['tme2'], $ticket['trackid']), 'NOREDIRECT', 'NOTICE');
            $trackingID = $ticket['trackid'];
            print_form();
        }
    } else {
        /* Nothing found, error out */
        hesk_process_messages($hesklang['ticket_not_found'], 'NOREDIRECT');
        print_form();
    }
} else {
    /* We have a match, get ticket info */
    $ticket = hesk_dbFetchAssoc($res);
    /* If we require e-mail to view tickets check if it matches the one in database */
    hesk_verifyEmailMatch($trackingID, $my_email, $ticket['email']);
}
/* Ticket exists, clean brute force attempts */
hesk_cleanBfAttempts();
/* Remember email address? */
if ($is_form) {
    if (!empty($_GET['r'])) {
        setcookie('hesk_myemail', $my_email, strtotime('+1 year'));
        $do_remember = ' checked="checked" ';
    } elseif (isset($_COOKIE['hesk_myemail'])) {
开发者ID:riansopian,项目名称:hesk,代码行数:31,代码来源:ticket.php

示例8: print_form_title

    </div>
    
    <div class="form_section" id="main" style="margin-top:250px">
        <div class="inputs_style_2">
        	
            <div class="form_title">
            	<?php 
if (function_exists('print_form_title')) {
    print_form_title($site_id, $page_type);
}
?>
            </div>
            
            <?php 
if (function_exists('print_form')) {
    print_form($site_id, $page_type, $site_template, '40626947764870', '2');
}
?>
        
        </div>
    </div>

</div>

<div class="decription_section">
<h1 class="description_title"><?php 
if (function_exists('print_description_title')) {
    print_description_title($site_id, $page_type);
}
?>
</h1>
开发者ID:sincco,项目名称:sitios-lineales-inova,代码行数:31,代码来源:registro.php

示例9: generate_form

function generate_form($data)
{
    return print_form($data, TRUE);
}
开发者ID:Natolumin,项目名称:observium,代码行数:4,代码来源:search.inc.php

示例10: print_form

<div class="main_section">
    
    <div class="form_section">
    
    	<div class="main_banner">
        	<img src="../general/images/main_banner_3.jpg" />
        </div>
        
        <div class="register_form inputs_style_2">
        	
            <div class="form_title">
            	Aprovecha YA este descuento ¡Solo por un tiempo limitado!
            </div>
            <?php 
if (function_exists('print_form')) {
    print_form($site_id, $page_type, $site_template, '40994547169873');
}
?>
            </div>
        
        </div>
    </div>

</div>

<div class="px1000"><div class="decription_section">
<h1 class="description_title">Hurrycane</h1>

<div class="descrption_text"><div class="col_set">

<div class="col_1_2 first">
开发者ID:sincco,项目名称:sitios-lineales-inova,代码行数:31,代码来源:registro.php

示例11: print_errors

    print_errors();
    print_retry();
} elseif (!check_configs()) {
    echo '<p>' . $lang['i_modified'] . '</p>';
    print_errors();
} elseif (check_data($_REQUEST['d'])) {
    // check_data has sanitized all input parameters
    if (!store_data($_REQUEST['d'])) {
        echo '<p>' . $lang['i_failure'] . '</p>';
        print_errors();
    } else {
        echo '<p>' . $lang['i_success'] . '</p>';
    }
} else {
    print_errors();
    print_form($_REQUEST['d']);
}
?>
    </div>


<div style="clear: both">
  <a href="http://dokuwiki.org/"><img src="lib/tpl/default/images/button-dw.png" alt="driven by DokuWiki" /></a>
  <a href="http://www.php.net"><img src="lib/tpl/default/images/button-php.gif" alt="powered by PHP" /></a>
</div>
</body>
</html>
<?php 
/**
 * Print the input form
 */
开发者ID:nextghost,项目名称:dokuwiki,代码行数:31,代码来源:install.php

示例12: print_table

    }
    print "<br>The government will PAY for the destruction of their ships!";
}
$db->query("SELECT * FROM bounty WHERE game_id = {$player->game_id} AND type = 'HQ' AND claimer_id = 0 ORDER BY amount DESC");
print "<p>&nbsp;</p>";
if ($db->nf()) {
    print "<div align=\"center\">Most Wanted by Federal Government</div><br>";
    print_table();
    print "<tr>";
    print "<th>Player Name</th>";
    print "<th>Bounty Amount</th>";
    print "</tr>";
    while ($db->next_record()) {
        $id = $db->f("account_id");
        $db2->query("SELECT * FROM player WHERE game_id = {$player->game_id} AND account_id = {$id}");
        if ($db2->next_record()) {
            $name = stripslashes($db2->f("player_name"));
        }
        $amount = $db->f("amount");
        print "<tr>";
        print "<td align=\"center\"><font color=yellow>{$name}</font></td>";
        print "<td align=\"center\"><font color=red> " . number_format($amount) . " </font></td>";
        print "</tr>";
    }
    print "</table>";
}
if ($player->alignment >= -99 && $player->alignment <= 100) {
    print_form(create_container("government_processing.php", ""));
    print_submit("Become a deputy");
    print "</form>";
}
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:government.php

示例13: restart

    restart();
} elseif (isset($_POST['clear_base'])) {
    // по кнопке очистить базу очищаем куки
    save_for_add('NULL');
    restart();
} elseif (isset($_GET['del_ad'])) {
    // ловим ключ del_ad в массиве $_GET
    $del_id = (int) $_GET['del_ad'];
    // присваеиваем его переменной $del_id
    if (isset($add[$del_id])) {
        // если существует объявление с таким ключом
        del_ad($del_id);
        //удаляем его
        save_for_add($add);
        // вызываем save_for_add() и сохраняем массив с объявлениями в файле
        restart();
        // перезапускаем скрипт
    }
} elseif (isset($_GET['click_id'])) {
    // действие по клику на объявление
    $click_id = (int) $_GET['click_id'];
    // присваиваем переменной $click_id номер кликнутого объявления
    if (isset($add[$click_id])) {
        // если объявление такое существует
        print_form($smarty, $add, $add[$click_id]);
        // выводим в форму
    }
} else {
    print_form($smarty, $add);
    // иначе выводим пустую форму
}
开发者ID:aic513,项目名称:Web-programming,代码行数:31,代码来源:dz8.php

示例14: print_topic

<?php

print_topic("Delete Album Entry - Confirmation");
print "Are you sure you want to delete your photo album entry and all comments added to it?<br>";
print "This action can't be undone.";
print_form(create_container("album_delete_processing.php", ""));
print_submit("Yes");
print "&nbsp;&nbsp;&nbsp;";
print_submit("No");
print "</form>";
开发者ID:smrealms,项目名称:smrv2.0,代码行数:10,代码来源:album_delete_confirmation.php

示例15: die

    }
    if (strlen($sequence) > 1000000) {
        die("Error: sequence is too long. Download the script from biophp.org and used it localy.");
    }
    // when length of query sequence is bellow 4^oligo_len => error (to avoid a lot of 0 frequencies);
    if (strlen($sequence) < pow(4, $oligo_len)) {
        die("Error: query sequence must be at least 4^(length of oligo) to proceed.");
    }
    // when frequencies at both strands are requested, place sequence and reverse complement of sequence in one line
    if ($strands == 2) {
        $sequence .= " " . RevComp($sequence);
    }
    // compute request and save data in an array
    $result = find_oligos($sequence, $oligo_len);
    // print the form
    print_form($sequence);
    //print out results
    print "<p>Frequencie of oligos with length {$oligo_len}<br><textarea cols=60 rows=50>";
    foreach ($result as $oligo => $frequency) {
        print "{$oligo}\t{$frequency}\n";
    }
    print "\n</textarea>\n";
}
// ######################################################################################################
// #####################################        FUNCTIONS             ###################################
// ######################################################################################################
function print_form($sequence)
{
    print "<table bgcolor=DDDDFF cellpadding=10><tr><td>\n";
    print "<form method=post action=\"" . $_SERVER["PHP_SELF"] . "\">\n";
    print "<b>Copy your sequence in the textarea below</b>\n";
开发者ID:biophp,项目名称:biophp,代码行数:31,代码来源:index.php


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