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


PHP addForm函数代码示例

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


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

示例1: default_action_process

 function default_action_process()
 {
     if ($_POST['process'] != "true") {
         return;
     }
     $this->well_child = new FormWellChild($_POST['id']);
     parent::populate_object($this->well_child);
     $new_form = false;
     if (empty($_POST['id'])) {
         $new_form = true;
     }
     $this->well_child->persist();
     if ($GLOBALS['encounter'] == "") {
         $GLOBALS['encounter'] = date("Ymd");
     }
     if ($new_form) {
         addForm($GLOBALS['encounter'], "Well Child Visit", $this->well_child->id, "well_child", $GLOBALS['pid'], $_SESSION['userauthorized']);
     }
     if (!empty($_POST['cpt_code'])) {
         $sql = "select * from codes where code ='" . mysql_real_escape_string($_POST['cpt_code']) . "' order by id";
         $results = sqlQ($sql);
         $row = mysql_fetch_array($results);
         if (!empty($row)) {
             addBilling(date("Ymd"), 'CPT4', $row['code'], $row['code_text'], $_SESSION['pid'], $_SESSION['userauthorized'], $_SESSION['authUserID'], $row['modifier'], $row['units'], $row['fee']);
         }
     }
     $_POST['process'] = "";
     return;
 }
开发者ID:mindfeederllc,项目名称:openemr,代码行数:29,代码来源:C_FormWellChild.class.php

示例2: __construct

 public function __construct()
 {
     /*($_SERVER['REQUEST_METHOD'], $this->getUrl(), 
       $this->getHeaders());
       */
     if (isset($_POST)) {
         $post_data = $_POST;
         // If charset specified, convert back to upstream charset before adding.
         if (Conf::$default_upstream_charset) {
             array_walk($post_data, function (&$value) {
                 $value = mb_convert_encoding($value, Conf::$default_upstream_charset, 'utf-8');
             });
         }
         if ($this->getPostEncType() == self::POST_ENC_TYPE_MULTIPART) {
             // First unset the original content type header. addForm() will automatically add it
             // with it's own boundary value.
             $this->setHeader('Content-Type', NULL);
             $this->getBody(addForm($_POST));
         } else {
             $this->getBody($post_data);
         }
         Log::add($post_data, 'post_data');
     }
     /*
     $this->setOptions(
         [                
             'connecttimeout' => Conf::$proxy_http_request_connecttimeout,
             'dns_cache_timeout' => Conf::$proxy_http_request_dns_cache_timeout,
             'retrycount' => Conf::$proxy_http_request_retrycount,
             'timeout' => Conf::$proxy_http_request_timeout
         ]);
     */
     //Log::add($this->__toString(), 'ProxyHttpRequest->__toString()');
 }
开发者ID:julienkermarec,项目名称:GreatFire_OVH_Test,代码行数:34,代码来源:ProxyHttpRequest.inc.php

示例3: addr_display_result

/**
 * List search results
 * @param array $res Array containing results of search
 * @param bool $includesource If true, adds backend column to address listing
 */
function addr_display_result($res, $includesource = true)
{
    global $PHP_SELF, $oTemplate, $oErrorHandler;
    //FIXME: no HTML output from core
    echo addForm($PHP_SELF, 'post', 'addressbook', '', '', array(), TRUE) . addHidden('html_addr_search_done', 'true');
    addr_insert_hidden();
    $oTemplate->assign('compose_addr_pop', false);
    $oTemplate->assign('include_abook_name', $includesource);
    $oTemplate->assign('addresses', formatAddressList($res));
    $oTemplate->display('addrbook_search_list.tpl');
    echo '</form>';
}
开发者ID:teammember8,项目名称:roundcube,代码行数:17,代码来源:addrbook_search_html.php

示例4: do_visit_form

function do_visit_form($irow, $encounter, $first)
{
    global $insert_count, $debug, $verbose;
    $pid = $irow['pid'];
    // If a gcac form already exists for this visit, get out.
    $row = sqlQuery("SELECT COUNT(*) AS count FROM forms WHERE " . "pid = '{$pid}' AND encounter = '{$encounter}' AND " . "formdir = 'LBFgcac' AND deleted = 0");
    if ($row['count']) {
        echo "<br />*** Visit {$pid}.{$encounter} skipped, already has a GCAC visit form ***\n";
        return;
    }
    $a = array('client_status' => $irow['client_status'], 'in_ab_proc' => $irow['in_ab_proc'], 'ab_location' => $irow['ab_location'], 'complications' => $irow['fol_compl'], 'contrameth' => $irow['contrameth']);
    // logic that applies only to the first related visit
    if ($first) {
        if ($a['ab_location'] == 'ma') {
            $a['ab_location'] = 'proc';
        }
        $a['complications'] = $irow['rec_compl'];
        $a['contrameth'] = '';
    }
    $newid = 0;
    $didone = false;
    foreach ($a as $field_id => $value) {
        if ($value !== '') {
            if ($newid) {
                $query = "INSERT INTO lbf_data " . "( form_id, field_id, field_value ) " . " VALUES ( '{$newid}', '{$field_id}', '{$value}' )";
                if ($verbose) {
                    echo "<br />{$query}\n";
                }
                if (!$debug) {
                    sqlStatement($query);
                }
            } else {
                $query = "INSERT INTO lbf_data " . "( field_id, field_value ) " . " VALUES ( '{$field_id}', '{$value}' )";
                if ($verbose) {
                    echo "<br />{$query}\n";
                }
                if (!$debug) {
                    $newid = sqlInsert($query);
                }
            }
            $didone = true;
        }
    }
    if ($newid && !$debug) {
        addForm($encounter, 'IPPF GCAC', $newid, 'LBFgcac', $pid, 1);
        ++$insert_count;
    }
    if (!$didone) {
        echo "<br />*** Empty issue skipped for visit {$pid}.{$encounter} ***\n";
    }
}
开发者ID:katopenzz,项目名称:openemr,代码行数:51,代码来源:ippf_upgrade.php

示例5: default_action_process

 function default_action_process()
 {
     if ($_POST['process'] != "true") {
         return;
     }
     $this->prior_auth = new FormPriorAuth($_POST['id']);
     parent::populate_object($this->prior_auth);
     $this->prior_auth->persist();
     if ($GLOBALS['encounter'] == "") {
         $GLOBALS['encounter'] = date("Ymd");
     }
     addForm($GLOBALS['encounter'], "Prior Authorization Form", $this->prior_auth->id, "prior_auth", $GLOBALS['pid'], $_SESSION['userauthorized']);
     $_POST['process'] = "";
     return;
 }
开发者ID:katopenzz,项目名称:openemr,代码行数:15,代码来源:C_FormPriorAuth.class.php

示例6: default_action_process

 function default_action_process()
 {
     if ($_POST['process'] != "true") {
         return;
     }
     $this->hptje_primary = new FormHpTjePrimary($_POST['id']);
     parent::populate_object($this->hptje_primary);
     $this->hptje_primary->persist();
     if ($GLOBALS['encounter'] == "") {
         $GLOBALS['encounter'] = date("Ymd");
     }
     addForm($GLOBALS['encounter'], "Head Pain TJE", $this->hptje_primary->id, "hp_tje_primary", $GLOBALS['pid'], $_SESSION['userauthorized']);
     $_POST['process'] = "";
     return;
 }
开发者ID:mindfeederllc,项目名称:openemr,代码行数:15,代码来源:C_FormHpTje.class.php

示例7: default_action_process

 function default_action_process()
 {
     if ($_POST['process'] != "true") {
         return;
     }
     $this->form = new FormSOAP($_POST['id']);
     parent::populate_object($this->form);
     $this->form->persist();
     if ($GLOBALS['encounter'] == "") {
         $GLOBALS['encounter'] = date("Ymd");
     }
     if (empty($_POST['id'])) {
         addForm($GLOBALS['encounter'], "SOAP", $this->form->id, "soap2", $GLOBALS['pid'], $_SESSION['userauthorized']);
         $_POST['process'] = "";
     }
     return;
 }
开发者ID:mi-squared,项目名称:openemr,代码行数:17,代码来源:C_FormSOAP.class.php

示例8: addr_display_result

/**
 * List search results
 * @param array $res Array containing results of search
 * @param bool $includesource If true, adds backend column to address listing
 */
function addr_display_result($res, $includesource = true)
{
    global $color, $javascript_on, $PHP_SELF, $squirrelmail_language;
    if (sizeof($res) <= 0) {
        return;
    }
    echo addForm($PHP_SELF, 'POST', 'addrbook') . addHidden('html_addr_search_done', 'true');
    addr_insert_hidden();
    $line = 0;
    if ($javascript_on) {
        print '<script language="JavaScript" type="text/javascript">' . "\n<!-- \n" . "function CheckAll(ch) {\n" . "   for (var i = 0; i < document.addrbook.elements.length; i++) {\n" . "       if( document.addrbook.elements[i].type == 'checkbox' &&\n" . "           document.addrbook.elements[i].name.substr(0,16) == 'send_to_search['+ch ) {\n" . "           document.addrbook.elements[i].checked = !(document.addrbook.elements[i].checked);\n" . "       }\n" . "   }\n" . "}\n" . "//-->\n" . "</script>\n";
        $chk_all = '<a href="#" onClick="CheckAll(\'T\');">' . _("All") . '</a>&nbsp;<font color="' . $color[9] . '">' . _("To") . '</font>' . '&nbsp;&nbsp;' . '<a href="#" onClick="CheckAll(\'C\');">' . _("All") . '</a>&nbsp;<font color="' . $color[9] . '">' . _("Cc") . '</font>' . '&nbsp;&nbsp;' . '<a href="#" onClick="CheckAll(\'B\');">' . _("All") . '</a>';
    } else {
        // check_all links are implemented only in JavaScript. disable links in js=off environment.
        $chk_all = '';
    }
    echo html_tag('table', '', 'center', '', 'border="0" width="98%"') . html_tag('tr', '', '', $color[9]) . html_tag('th', '&nbsp;' . $chk_all, 'left') . html_tag('th', '&nbsp;' . _("Name"), 'left') . html_tag('th', '&nbsp;' . _("E-mail"), 'left') . html_tag('th', '&nbsp;' . _("Info"), 'left');
    if ($includesource) {
        echo html_tag('th', '&nbsp;' . _("Source"), 'left', '', 'width="10%"');
    }
    echo "</tr>\n";
    foreach ($res as $row) {
        $email = AddressBook::full_address($row);
        if ($line % 2) {
            $tr_bgcolor = $color[12];
        } else {
            $tr_bgcolor = $color[4];
        }
        if ($squirrelmail_language == 'ja_JP') {
            echo html_tag('tr', '', '', $tr_bgcolor, 'nowrap') . html_tag('td', '<input type="checkbox" name="send_to_search[T' . $line . ']" value = "' . htmlspecialchars($email) . '" />&nbsp;' . _("To") . '&nbsp;' . '<input type="checkbox" name="send_to_search[C' . $line . ']" value = "' . htmlspecialchars($email) . '" />&nbsp;' . _("Cc") . '&nbsp;' . '<input type="checkbox" name="send_to_search[B' . $line . ']" value = "' . htmlspecialchars($email) . '" />&nbsp;' . _("Bcc") . '&nbsp;', 'center', '', 'width="5%" nowrap') . html_tag('td', '&nbsp;' . htmlspecialchars($row['lastname']) . ' ' . htmlspecialchars($row['firstname']) . '&nbsp;', 'left', '', 'nowrap') . html_tag('td', '&nbsp;' . htmlspecialchars($row['email']) . '&nbsp;', 'left', '', 'nowrap') . html_tag('td', '&nbsp;' . htmlspecialchars($row['label']) . '&nbsp;', 'left', '', 'nowrap');
        } else {
            echo html_tag('tr', '', '', $tr_bgcolor, 'nowrap') . html_tag('td', addCheckBox('send_to_search[T' . $line . ']', FALSE, $email) . '&nbsp;' . _("To") . '&nbsp;' . addCheckBox('send_to_search[C' . $line . ']', FALSE, $email) . '&nbsp;' . _("Cc") . '&nbsp;' . addCheckBox('send_to_search[B' . $line . ']', FALSE, $email) . '&nbsp;' . _("Bcc") . '&nbsp;', 'center', '', 'width="5%" nowrap') . html_tag('td', '&nbsp;' . htmlspecialchars($row['name']) . '&nbsp;', 'left', '', 'nowrap') . html_tag('td', '&nbsp;' . htmlspecialchars($row['email']) . '&nbsp;', 'left', '', 'nowrap') . html_tag('td', '&nbsp;' . htmlspecialchars($row['label']) . '&nbsp;', 'left', '', 'nowrap');
        }
        if ($includesource) {
            echo html_tag('td', '&nbsp;' . $row['source'] . '&nbsp;', 'left', '', 'nowrap');
        }
        echo "</tr>\n";
        $line++;
    }
    if ($includesource) {
        $td_colspan = '5';
    } else {
        $td_colspan = '4';
    }
    echo html_tag('tr', html_tag('td', '<input type="submit" name="addr_search_done" value="' . _("Use Addresses") . '" /> ' . '<input type="submit" name="addr_search_cancel" value="' . _("Cancel") . '" />', 'center', '', 'colspan="' . $td_colspan . '"')) . '</table>' . addHidden('html_addr_search_done', '1') . '</form>';
}
开发者ID:jin255ff,项目名称:company_website,代码行数:51,代码来源:addrbook_search_html.php

示例9: default_action_process

 function default_action_process()
 {
     if ($_POST['process'] != "true") {
         return;
     }
     $this->form = new FormLegLength($_POST['id']);
     parent::populate_object($this->form);
     $this->form->persist();
     if ($GLOBALS['encounter'] == "") {
         $GLOBALS['encounter'] = date("Ymd");
     }
     if (empty($_POST['id'])) {
         addForm($GLOBALS['encounter'], "Extremities measurements", $this->form->id, "leg_length", $GLOBALS['pid'], $_SESSION['userauthorized']);
         $_POST['process'] = "";
     }
     return;
 }
开发者ID:katopenzz,项目名称:openemr,代码行数:17,代码来源:C_FormLegLength.class.php

示例10: default_action_process

 function default_action_process()
 {
     if ($_POST['process'] != "true") {
         return;
     }
     $this->ros = new FormROS($_POST['id']);
     parent::populate_object($this->ros);
     $this->ros->persist();
     if ($GLOBALS['encounter'] == "") {
         $GLOBALS['encounter'] = date("Ymd");
     }
     if (empty($_POST['id'])) {
         addForm($GLOBALS['encounter'], "Review Of Systems", $this->ros->id, "ros", $GLOBALS['pid'], $_SESSION['userauthorized']);
         $_POST['process'] = "";
     }
     return;
 }
开发者ID:mi-squared,项目名称:openemr,代码行数:17,代码来源:C_FormROS.class.php

示例11: default_action_process

 function default_action_process()
 {
     if ($_POST['process'] != "true") {
         return;
     }
     $this->form = new FormActivityImpact($_POST['id']);
     parent::populate_object($this->form);
     $this->form->persist();
     if ($GLOBALS['encounter'] == "") {
         $GLOBALS['encounter'] = date("Ymd");
     }
     if (empty($_POST['id'])) {
         addForm($GLOBALS['encounter'], "Impact of Activities of Daily Living", $this->form->id, "activity_impact", $GLOBALS['pid'], $_SESSION['userauthorized']);
         $_POST['process'] = "";
     }
     return;
 }
开发者ID:mindfeederllc,项目名称:openemr,代码行数:17,代码来源:C_FormActivityImpact.class.php

示例12: put_print_form

function put_print_form()
{
    global $DB, $pagename;
    $langs = $DB->q('KEYTABLE SELECT langid AS ARRAYKEY, name, extensions FROM language
	                 WHERE allow_submit = 1 ORDER BY name');
    echo "<script type=\"text/javascript\">\n<!--\n";
    echo "function detectLanguage(filename)\n\t{\n\t\tvar parts = filename.toLowerCase().split('.').reverse();\n\t\tif ( parts.length < 2 ) return;\n\n\t\t// language ID\n\n\t\tvar elt=document.getElementById('langid');\n\t\t// the 'autodetect' option has empty value\n\t\tif ( elt.value != '' ) return;\n\n\t\tvar langid = getMainExtension(parts[0]);\n\t\tfor (i=0;i<elt.length;i++) {\n\t\t\tif ( elt.options[i].value == langid ) {\n\t\t\t\telt.selectedIndex = i;\n\t\t\t}\n\t\t}\n\n\t}\n";
    putgetMainExtension($langs);
    echo "// -->\n</script>\n";
    echo addForm($pagename, 'post', null, 'multipart/form-data');
    ?>

	<table>
	<tr><td><label for="code">File</label>:</td>
	<td><input type="file" name="code" id="code" size="40" required onChange='detectLanguage(document.getElementById("code").value);' /></td>
	</tr>
	<tr><td colspan="2">&nbsp;</td></tr>
	<tr><td><label for="langid">Language</label>:</td>
	    <td><?php 
    $langlist = array();
    foreach ($langs as $langid => $langdata) {
        $langlist[$langid] = $langdata['name'];
    }
    $langlist[''] = 'plain text';
    echo addSelect('langid', $langlist, '', true);
    ?>
</td>
	</tr>
	<tr><td colspan="2">&nbsp;</td></tr>
	<tr><td></td>
	    <td><?php 
    echo addSubmit('Print code', 'submit');
    ?>
</td>
	</tr>
	</table>

	<?php 
    echo addEndForm();
}
开发者ID:nya3jp,项目名称:domjudge,代码行数:40,代码来源:printing.php

示例13: default_action_process

 function default_action_process()
 {
     if ($_POST['process'] != "true") {
         return;
     }
     $this->evaluation = new FormEvaluation($_POST['id']);
     parent::populate_object($this->evaluation);
     $this->evaluation->persist();
     if ($GLOBALS['encounter'] == "") {
         $GLOBALS['encounter'] = date("Ymd");
     }
     addForm($GLOBALS['encounter'], "Evaluation Form", $this->evaluation->id, "evaluation", $GLOBALS['pid'], $_SESSION['userauthorized']);
     if (!empty($_POST['cpt_code'])) {
         $sql = "select * from codes where code ='" . add_escape_custom($_POST['cpt_code']) . "' order by id";
         $results = sqlQ($sql);
         $row = sqlFetchArray($results);
         if (!empty($row)) {
             addBilling(date("Ymd"), 'CPT4', $row['code'], $row['code_text'], $_SESSION['pid'], $_SESSION['userauthorized'], $_SESSION['authUserID'], $row['modifier'], $row['units'], $row['fee']);
         }
     }
     $_POST['process'] = "";
     return;
 }
开发者ID:juggernautsei,项目名称:openemr,代码行数:23,代码来源:C_FormEvaluation.class.php

示例14: todaysEncounter

function todaysEncounter($patient_id, $reason = '')
{
    global $today, $userauthorized;
    if (empty($reason)) {
        $reason = xl('Please indicate visit reason');
    }
    // Was going to use the existing encounter for today if there is one, but
    // decided it's right to always create a new one.  Leaving the code here
    // (and corresponding function above) in case it is ever wanted later.
    /*******************************************************************
      $encounter = todaysEncounterIf($patient_id);
      if ($encounter) return $encounter;
      *******************************************************************/
    $tmprow = sqlQuery("SELECT username, facility, facility_id FROM users " . "WHERE id = ?", array($_SESSION["authUserID"]));
    $username = $tmprow['username'];
    $facility = $tmprow['facility'];
    $facility_id = $tmprow['facility_id'];
    $conn = $GLOBALS['adodb']['db'];
    $encounter = $conn->GenID("sequences");
    $provider_id = $userauthorized ? $_SESSION['authUserID'] : 0;
    addForm($encounter, "New Patient Encounter", sqlInsert("INSERT INTO form_encounter SET date = ?, onset_date = ?, " . "reason = ?, facility = ?, facility_id = ?, pid = ?, encounter = ?, " . "provider_id = ?", array($today, $today, $reason, $facility, $facility_id, $patient_id, $encounter, $provider_id)), "newpatient", $patient_id, $userauthorized, "NOW()", $username);
    return $encounter;
}
开发者ID:stephen-smith,项目名称:openemr,代码行数:23,代码来源:left_nav_encounter_ajax.php

示例15: default_action_process

 function default_action_process()
 {
     if ($_POST['process'] != "true") {
         return;
     }
     $this->prosthesis = new FormProsthesis($_POST['id']);
     parent::populate_object($this->prosthesis);
     $this->prosthesis->persist();
     if ($GLOBALS['encounter'] == "") {
         $GLOBALS['encounter'] = date("Ymd");
     }
     addForm($GLOBALS['encounter'], "Prosthesis & Orthotics Form", $this->prosthesis->id, "prosthesis", $GLOBALS['pid'], $_SESSION['userauthorized']);
     if (!empty($_POST['cpt_code'])) {
         $sql = "select * from codes where code ='" . mysql_real_escape_string($_POST['cpt_code']) . "' order by id";
         $results = sqlQ($sql);
         $row = mysql_fetch_array($results);
         if (!empty($row)) {
             addBilling(date("Ymd"), 'CPT4', $row['code'], $row['code_text'], $_SESSION['pid'], $_SESSION['userauthorized'], $_SESSION['authUserID'], $row['modifier'], $row['units'], $row['fee']);
         }
     }
     $_POST['process'] = "";
     return;
 }
开发者ID:mindfeederllc,项目名称:openemr,代码行数:23,代码来源:C_FormProsthesis.class.php


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