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


PHP process_form函数代码示例

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


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

示例1: occur_form

function occur_form()
{
    global $vars;
    if (empty($vars["submit_form"])) {
        return display_form();
    }
    // else
    return process_form();
}
开发者ID:Godjqb,项目名称:Php-test,代码行数:9,代码来源:occur_form.php

示例2: user_groups

function user_groups()
{
    global $vars, $phpc_cal;
    if (!$phpc_cal->can_admin()) {
        return tag('div', __('Permission denied'));
    }
    if (!empty($vars['submit_form'])) {
        process_form();
    }
    return display_form();
}
开发者ID:Godjqb,项目名称:Php-test,代码行数:11,代码来源:user_groups.php

示例3: user_create

function user_create()
{
    global $vars;
    if (!is_admin()) {
        return tag('div', __('Permission denied'));
    }
    if (!empty($vars['submit_form'])) {
        process_form();
    }
    return display_form();
}
开发者ID:php-calendar,项目名称:php-calendar,代码行数:11,代码来源:user_create.php

示例4: occur_form

function occur_form()
{
    global $vars;
    if (empty($vars["submit_form"])) {
        return display_form();
    }
    // else
    try {
        return process_form();
    } catch (Exception $e) {
        message($e->getMessage());
        return display_form();
    }
}
开发者ID:hubandbob,项目名称:php-calendar,代码行数:14,代码来源:occur_form.php

示例5: ps_start

/**
 * Adiciona o atalho a ser colocado nas páginas e posts.
 * Atributos a serem considerados.
 */
function ps_start($args)
{
    /*
     * Carrega os atributos do atalho. Caso o atalho não possua algum dos parametros abaixo, este parametro será substituído pelo parametro default abaixo.
     */
    $a = shortcode_atts(array('item_id' => '1', 'item_descricao' => 'Descrição de item', 'item_qtd' => '1', 'item_valor' => '0,01', 'item_peso' => '100', 'frete' => '2.00'), $args);
    if (isset($_POST['submit'])) {
        process_form();
    }
    /*
     * Carrega o form de submissao para o botao do pagseguro
     */
    $newpage = get_option("ps_config_newpage");
    $headerForm = "<form method='post' action='' ";
    if (strlen($newpage) > 0) {
        $headerForm .= " target='_blank'";
    }
    $headerForm .= ">";
    echo $headerForm;
    ?>
		<input name="item_id" type="hidden" value="<?php 
    echo $a['item_id'];
    ?>
">
		<input name="item_descricao" type="hidden" value="<?php 
    echo $a['item_descricao'];
    ?>
">
		<input name="item_qtd" type="hidden" value="<?php 
    echo $a['item_qtd'];
    ?>
">
		<input name="item_valor" type="hidden" value="<?php 
    echo $a['item_valor'];
    ?>
">
		<input name="item_peso" type="hidden" value="<?php 
    echo $a['item_peso'];
    ?>
">
		<input name="frete" type="hidden" value="<?php 
    echo $a['frete'];
    ?>
">
		<input name="submit" type="submit" value="" class="pagseguro">
	</form>
	<?php 
}
开发者ID:valeriosouza,项目名称:pagseguro-payment-shortcode,代码行数:52,代码来源:wp-pagseguro-payment.php

示例6: fwrite

    // I guarantee you'll be glad we did this.  :-)
    $fh = @fopen($GLOBALS['OE_SITE_DIR'] . "/edi/{$bat_filename}", 'a');
    if ($fh) {
        fwrite($fh, $bat_content);
        fclose($fh);
    }
    header("Pragma: public");
    header("Expires: 0");
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    header("Content-Type: application/force-download");
    header("Content-Disposition: attachment; filename={$bat_filename}");
    header("Content-Description: File Transfer");
    header("Content-Length: " . strlen($bat_content));
    echo $bat_content;
}
process_form($_POST);
function process_form($ar)
{
    global $bill_info, $webserver_root, $bat_filename, $pdf;
    if (isset($ar['bn_x12']) || isset($ar['bn_x12_encounter']) || isset($ar['bn_process_hcfa']) || isset($ar['bn_hcfa_txt_file'])) {
        $hlog = fopen("{$webserver_root}/library/freeb/process_bills.log", 'w');
    }
    if (isset($ar['bn_external'])) {
        // Open external billing file for output.
        $be = new BillingExport();
    }
    $db = $GLOBALS['adodb']['db'];
    if (empty($ar['claims'])) {
        $ar['claims'] = array();
    }
    $claim_count = 0;
开发者ID:mindfeederllc,项目名称:openemr,代码行数:31,代码来源:billing_process.php

示例7: skills_grouping

$sgrouping = new skills_grouping($courseid);
$groupid = $sgrouping->check_for_user_in_grouping($USER->id);
if ($groupid !== false) {
    $sgroup = new skills_group($groupid);
    if ($sgroup->get_allow_others_to_join() === true) {
        $toform['allowjoincheck'] = 1;
    }
}
$toform['courseid'] = $courseid;
$creategroupform->set_data($toform);
if ($creategroupform->is_cancelled()) {
    $courseurl = new moodle_url('/course/view.php', array('id' => $courseid));
    redirect($courseurl);
} else {
    if ($fromform = $creategroupform->get_data()) {
        $url = process_form($courseid, $fromform);
        redirect($url);
    } else {
        $site = get_site();
        echo $OUTPUT->header();
        $creategroupform->display();
        echo $OUTPUT->footer();
    }
}
/**
 * This function determines the user's desired course of action -> {create, edit, drop}
 * and processes it accordingly.
 *
 * @param int $courseid The ID of the course.
 * @param object $submittedform The object contains the results of the form when changes were saved.
 * @return string|boolean The url to redirect the user to or false to prevent redirect.
开发者ID:MoodleMetaData,项目名称:MoodleMetaData,代码行数:31,代码来源:create_skills_group.php

示例8: validate_form

    $errors = validate_form();
    //step one is validation.
    // errors array lists problems on the form submitted
    if ($errors) {
        // display the errors and the form to fix
        show_errors($errors);
        if ($_POST['availability'] == null) {
            $ima = null;
        } else {
            $ima = implode(',', $_POST['availability']);
        }
        //editied by James Loeffler
        $person = new Person($_POST['first_name'], $_POST['last_name'], $birthday, $_POST['gender'], $_POST['address'], $_POST['city'], $_POST['state'], $_POST['zip'], $_POST['phone1'], $_POST['phone2'], $_POST['email'], $_POST['type'], $_POST['status'], $_POST['schedule'], $_POST['notes'], $_POST['skills'], $_POST['reason_interested'], $_POST['dateadded'], $_POST['old_pass'], $ima, $_POST['contact_preference']);
        include 'personForm.inc';
    } else {
        process_form($id);
    }
    echo "</div>";
    include 'footer.inc';
    echo '</div></body></html>';
    die;
}
/**
 * process_form sanitizes data, concatenates needed data, and enters it all into a database
 */
function process_form($id)
{
    //echo($_POST['first_name']);
    //step one: sanitize data by replacing HTML entities and escaping the ' character
    $first_name = trim(str_replace('\\\'', '', htmlentities(str_replace('&', 'and', $_POST['first_name']))));
    //    $first_name = str_replace(' ', '_', $first_name);
开发者ID:googlecode-mirror,项目名称:bscah-homebase,代码行数:31,代码来源:personEdit.php

示例9: sleep

            $ret = course_mod_add::add($module, $courseID, $atstart, (int) $formdata->ifexists, $moduleparams, 0, $visible, $permissionscsvrows);
            if (!$ret[0]) {
                $tablefields[] = $ret[1];
            } else {
                $tablefields[] = 'Done';
            }
            $view->output_processing_row($tablefields);
            sleep(1);
        }
        $i++;
    }
    $view->output_processing_end();
}
// Check user has correct permissions
require_login();
require_capability('moodle/site:config', context_system::instance());
// Create view
$view = new module_add_view();
// Get list of available modules and set up UI form
$modules = $DB->get_records('modules', array('visible' => 1), 'name', 'name');
$modulesAssoc = array();
foreach ($modules as $module) {
    $modulesAssoc[$module->name] = $module->name;
}
$moduleaddform = new module_add_form($modulesAssoc);
$view->set_form($moduleaddform);
if (!($formdata = $moduleaddform->get_data())) {
    $view->output_form();
} else {
    process_form($view, $moduleaddform, $formdata);
}
开发者ID:OBU-OBIS,项目名称:moodle-block_module_add,代码行数:31,代码来源:controller.php

示例10: validate_form

	<div id="content">
<?php 
include 'personValidate.inc';
if ($_POST['_form_submit'] != 1) {
    //in this case, the form has not been submitted, so show it
    include 'personForm.inc';
} else {
    //in this case, the form has been submitted, so validate it
    $errors = validate_form();
    //step one is validation.
    // errors array lists problems on the form submitted
    if ($errors) {
        // display the errors and the form to fix
        show_errors($errors);
    } else {
        $newperson = process_form($id, $person);
        if ($_POST['deleteMe'] != "DELETE" && $_POST['reset_pass'] != "RESET") {
            echo 'Update successful.  Click <a href=personEdit.php?id=' . $newperson->get_id() . '> edit</a> to review your changes.';
        }
    }
    include 'footer.inc';
    echo '</div></div></body></html>';
    die;
}
include 'footer.inc';
/**
* process_form sanitizes data, concatenates needed data, and enters it all into the database
*/
function process_form($id, $person)
{
    // Get the info of the user who is making the update
开发者ID:kumarsivarajan,项目名称:rmh-roomreservation-maker,代码行数:31,代码来源:personEdit.php

示例11: foreach

            foreach ($_POST['availability'] as $postday) {
                $postavail[] = $postday;
            }
            $availability = implode(',', $postavail);
        }
        if ($_POST['isstudent'] == "yes") {
            $position = "student";
            $employer = $_POST['nameofschool'];
        } else {
            $position = $_POST['position'];
            $employer = $_POST['employer'];
        }
        $person = new Person($person->get_first_name(), $_POST['last_name'], $_POST['location'], $_POST['address'], $_POST['city'], $_POST['state'], $_POST['zip'], $person->get_phone1(), $_POST['phone1type'], $_POST['phone2'], $_POST['phone2type'], $_POST['email'], implode(',', $_POST['type']), $_POST['screening_type'], implode(',', $_POST['screening_status']), $_POST['status'], $employer, $position, $_POST['credithours'], $_POST['commitment'], $_POST['motivation'], $_POST['specialties'], $_POST['convictions'], $availability, $_POST['schedule'], $_POST['hours'], $_POST['birthday'], $_POST['start_date'], $_POST['howdidyouhear'], $_POST['notes'], $_POST['old_pass']);
        include 'personForm.inc';
    } else {
        process_form($id, $person);
    }
    echo "</div>";
    include 'footer.inc';
    echo '</div></body></html>';
    die;
}
/**
 * process_form sanitizes data, concatenates needed data, and enters it all into a database
 */
function process_form($id, $person)
{
    //echo($_POST['first_name']);
    //step one: sanitize data by replacing HTML entities and escaping the ' character
    if ($person->get_first_name() == "new") {
        $first_name = trim(str_replace('\\\'', '', htmlentities(str_replace('&', 'and', $_POST['first_name']))));
开发者ID:billgoad,项目名称:rmhc-homebase,代码行数:31,代码来源:personEdit.php

示例12: time

     $user_endtime = time() + $max_time;
 }
 if ($user_endtime <= time()) {
     if ($user_alldone == 0) {
         $querybad = "UPDATE " . USER_TABLE . " SET " . "user_alldone=1 WHERE " . "user_id=" . $user_id . " AND " . "user_name='" . $_SESSION['hs_uname'] . "'" . "LIMIT 1";
         $result = $conn->query($querybad) or msg_die($conn->error, 'D');
     }
     $extra_time = sec2min(time() - $user_endtime);
     render_page('Time Over', phtml('time-out', [], false), $script_path);
 } else {
     $current_challenge = $user_chalcompleted + 1;
     if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['btnSubmit'])) {
         $stop_update = false;
         if (isset($_POST['txtPassword'])) {
             if ($_POST['txtPassword'] != '' || $current_challenge == 1) {
                 if (get_pwd($user_chalcompleted) == process_form($_POST['txtPassword'])) {
                     if (!$stop_update) {
                         $_SESSION['hs_ch_complete'] = true;
                         $_SESSION['hs_last_ch'] = $current_challenge;
                         $current_points = $user_totalpoints + $_SESSION['hs_challocatedpts'];
                         if (isset($_SESSION['hs_used_clue'])) {
                             $user_cluestaken++;
                         }
                         if ($current_challenge == 9) {
                             $done = true;
                         }
                         if (isset($done) && $done) {
                             $queryupdate = "UPDATE " . USER_TABLE . " SET " . "user_totalchallenges=" . $current_challenge . ", " . "user_totalpoints=" . $current_points . ", " . "user_cluestaken=" . $user_cluestaken . ", " . "user_endtime=" . time() . ", " . "user_alldone=1 WHERE " . "user_id=" . $user_id . " AND " . "user_name='" . $_SESSION['hs_uname'] . "' " . "LIMIT 1";
                         } else {
                             $queryupdate = "UPDATE " . USER_TABLE . " SET " . "user_totalchallenges=" . $current_challenge . ", " . "user_totalpoints=" . $current_points . ", " . "user_cluestaken=" . $user_cluestaken . " WHERE " . "user_id=" . $user_id . " AND " . "user_name='" . $_SESSION['hs_uname'] . "' " . "LIMIT 1";
                         }
开发者ID:rage28,项目名称:hackslash,代码行数:31,代码来源:router.php

示例13: delete_dbWeeks

            if ($week->get_status() == "unpublished" || $week->get_status() == "archived") {
                delete_dbWeeks($week);
                add_log_entry('<a href=\\"personEdit.php?id=' . $_SESSION['_id'] . '\\">' . $_SESSION['f_name'] . ' ' . $_SESSION['l_name'] . '</a> removed the week of <a href=\\"calendar.php?id=' . $week->get_id() . '&edit=true\\">' . $week->get_name() . '</a>.');
                echo "<p>Week \"" . $week->get_name() . "\" removed.<br>";
            } else {
                echo "<p>Week \"" . $week->get_name() . "\" is published, so it cannot be removed.<br>";
            }
        }
        //include('addWeek_newweek.inc');
        //unset($_GET('remove'));
        echo "<br> (Back to <a href=\"addWeek.php?venue=" . $venue . "&archive=" . $_GET['archive'] . "\"><b>manage weeks</b></a>)";
    } else {
        if (!array_key_exists('_submit_check_newweek', $_POST)) {
            include 'addWeek_newweek.inc';
        } else {
            process_form($firstweek, $venue);
            include 'addWeek_newweek.inc';
        }
    }
}
// must be a manager
function process_form($firstweek, $venue)
{
    if ($_SESSION['access_level'] < 2) {
        return null;
    }
    if ($firstweek == true) {
        //find the beginning of the current week
        $dow = strtotime("last Monday");
        $m = date("m", $dow);
        $d = date("d", $dow);
开发者ID:billgoad,项目名称:rmhc-homebase,代码行数:31,代码来源:addWeek.php

示例14: process_form

    echo '<p><b>Select a Screening: </b>';
    include "viewScreenings.inc.php";
} else {
    if ($_POST['s_type'] == "new") {
        $action = $_POST['s_type'];
        echo '<p><b>Create new Screening: </b>';
        $new = true;
        include 'viewScreenings.inc.php';
    } else {
        if ($_POST['_form_submit'] == 1) {
            $action = $_POST['s_type'];
            echo '<p><b>Edit Screening: </b>' . $action;
            include 'viewScreenings.inc.php';
        } else {
            // changes submitted, so process them and display the result
            process_form($screening);
        }
    }
}
/**
 * process_form gathers data and enters it into a database
 */
function process_form($oldScreening)
{
    //step one: gather data.
    $oldType = $_POST['_old_type'];
    if ($_POST['_form_type'] == "new") {
        $creator = $_SESSION['_id'];
    } else {
        $creator = $oldScreening->get_creator();
    }
开发者ID:googlecode-mirror,项目名称:bscah-homebase,代码行数:31,代码来源:viewScreenings.php

示例15: Booking

                $patient_DOB = $guest->get_patient_birthdate();
            }
            $tempBooking = new Booking(date("y-m-d"), "Will Call", $guest->get_id(), $status, "", $guest->get_patient_name(), "", "", "", "", "", "", "", "00000000000", "", "", "", "", "new");
        }
    }
    include 'autofillReferralForm.inc';
}
// now process the form that has been submitted
if ($_POST['submit'] == 'Submit') {
    // check for errors
    include 'bookingValidate.inc';
    $errors = validate_form();
    if ($errors) {
        show_errors($errors);
    } else {
        $primaryGuest = process_form();
        $tempBooking = build_POST_booking($primaryGuest, $referralid);
        echo "Thank you, your referral form has been submitted for review by the House Manager.";
        // Create the log message
        $message = "<a href='viewPerson.php?id=" . $_SESSION['_id'] . "'>" . $user_name . "</a>" . " has added a referral for <a href='viewPerson.php?id=" . $primaryGuest->get_id() . "'>" . $primaryGuest->get_first_name() . " " . $primaryGuest->get_last_name() . "</a>";
        add_log_entry($message);
    }
}
include_once "footer.inc";
?>
		</div>
	</div>
</body>
</html>

<?php 
开发者ID:kumarsivarajan,项目名称:rmh-roomreservation-maker,代码行数:31,代码来源:referralForm.php


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