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

PHP formClose函数代码示例

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

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



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

示例1: isset

<?php

require_once "Forus.php";
$ID = isset($ID) ? $ID : 1;
$s = newObject("post", $p_id);
$foro_id = isset($foro_id) ? $foro_id : 1;
$p = newObject("post", $ID);
$leido = isset($leido) ? $leido : 1;
$a = newObject("post", $leido);
$p->title = $s->title;
$p->user = BILO_username();
if ($p->title != "") {
    $p->resp = "readonly=\"true\"";
}
$p->p_id = isset($p_id) ? $p_id : 0;
$p->foro_id = $foro_id;
formAction("action_save.php?ID={$ID}&foro_id={$p->foro_id}&leido=", "footer", "editForm");
$p->boton0 = gfxBotonAction("Guardar", "getElementById('editForm').submit()", True);
plantHTML($p, "post");
formClose();
?>

开发者ID:BackupTheBerlios,项目名称:ascore,代码行数:21,代码来源:post.php


示例2: build

 public function build()
 {
     $HTML = NULL;
     $hide = FALSE;
     $option = FALSE;
     foreach ($this->columns as $column) {
         if (!in_array($column["Field"], $this->hide)) {
             if (count($this->hide) > 0) {
                 if ($this->hideString and !$hide) {
                     $attributes = array("type" => "hidden", "name" => "_hide", "value" => base64_encode($this->hideString));
                     $HTML .= formInput($attributes);
                     unset($attributes);
                     $hide = TRUE;
                 }
             }
             if ($this->type($column["Type"]) === "string") {
                 $attributes = array("type" => "text", "name" => $column["Field"], "class" => "input", "field" => $this->rename($column["Field"]), "p" => TRUE, "value" => !$this->success ? recoverPOST($column["Field"]) : NULL);
                 if (isset($this->options)) {
                     if (!$option) {
                         $HTML .= formInput(array("type" => "hidden", "name" => "_options", "value" => base64_encode(serialize($this->options))));
                         $option = TRUE;
                     }
                     if (isset($this->options[$column["Field"]])) {
                         if ($this->options[$column["Field"]]["type"] === "select") {
                             $attrs = array("name" => $column["Field"], "class" => "select", "field" => $this->rename($column["Field"]), "p" => TRUE);
                             $HTML .= formSelect($attrs, $this->options[$column["Field"]]["options"]);
                             unset($attrs);
                         } elseif ($this->options[$column["Field"]]["type"] === "radio") {
                             $attrs = array("name" => $column["Field"], "class" => "radio", "field" => $this->rename($column["Field"]), "p" => TRUE);
                             $HTML .= formRadio($attrs, $this->options[$column["Field"]]["options"]);
                             unset($attrs);
                         } elseif ($this->options[$column["Field"]]["type"] === "password") {
                             $attrs = array("name" => $column["Field"], "type" => "password", "class" => "input", "field" => $this->rename($column["Field"]), "p" => TRUE);
                             $HTML .= formInput($attrs);
                             unset($attrs);
                         } elseif ($this->options[$column["Field"]]["type"] === "hidden") {
                             $attrs = array("name" => $column["Field"], "type" => "hidden", "value" => isset($this->options[$column["Field"]]["value"]) ? $this->options[$column["Field"]]["value"] : NULL);
                             $HTML .= formInput($attrs);
                             unset($attrs);
                         }
                     } else {
                         $HTML .= formInput($attributes);
                     }
                 } else {
                     $HTML .= formInput($attributes);
                 }
                 unset($attributes);
             } elseif ($this->type($column["Type"]) === "text") {
                 $attributes = array("name" => $column["Field"], "class" => "editor textarea", "field" => $this->rename($column["Field"]), "p" => TRUE, "value" => !$this->success ? recoverPOST($column["Field"]) : NULL);
                 $HTML .= formTextarea($attributes);
             }
         }
     }
     $HTML .= p(TRUE, "center");
     $attributes = array("type" => "submit", "name" => "save", "value" => __("Save"), "class" => "submit");
     $HTML .= formInput($attributes);
     unset($attributes);
     $attributes = array("type" => "submit", "name" => "cancel", "value" => __("Cancel"), "class" => "submit");
     $HTML .= formInput($attributes);
     unset($attributes);
     $HTML .= p(FALSE);
     $HTML .= formClose();
     return $HTML;
 }
开发者ID:pokaxperia,项目名称:emus-itdp,代码行数:64,代码来源:scaffold.php


示例3: isset

$position = isset($data) ? recoverPOST("position", $data[0]["Position"]) : recoverPOST("position");
$code = isset($data) ? recoverPOST("code", $data[0]["Code"]) : recoverPOST("code");
$time = isset($data) ? recoverPOST("time", $data[0]["Time"]) : recoverPOST("time");
$situation = isset($data) ? recoverPOST("situation", $data[0]["Situation"]) : recoverPOST("situation");
$principal = isset($data) ? recoverPOST("principal", $data[0]["Principal"]) : recoverPOST("principal");
$edit = isset($data) ? TRUE : FALSE;
$action = isset($data) ? "edit" : "save";
$href = isset($data) ? path(whichApplication() . "cpanel/{$action}/{$ID}/") : path(whichApplication() . "cpanel/add/");
print div("add-form", "class");
print formOpen($href, "form-add", "form-add");
print p(__(_(ucfirst(whichApplication()))), "resalt");
print isset($alert) ? $alert : NULL;
print formInput(array("name" => "title", "class" => "span10 required", "field" => __(_("Title")), "p" => TRUE, "value" => $title));
if (isset($banner)) {
    print __(_("If you change the banner image, this image will be deleted")) . "<br />";
    print img(path($banner, TRUE), array("alt" => "Banner", "class" => "no-border", "style" => "max-width: 780px;"));
    print formInput(array("name" => "banner", "type" => "hidden", "value" => $banner));
}
print formInput(array("type" => "file", "name" => "image", "class" => "required", "field" => __(_("Image")), "p" => TRUE));
$options = array(0 => array("value" => "Top", "option" => __(_("Top")) . " (960x100px)", "selected" => $position === "Top" ? TRUE : FALSE), 1 => array("value" => "Left", "option" => __(_("Left")) . " (120x600px, 250x250px)", "selected" => $position === "Left" ? TRUE : FALSE), 2 => array("value" => "Right", "option" => __(_("Right")) . " (120x600px, 250x250px)", "selected" => $position === "Right" ? TRUE : FALSE), 3 => array("value" => "Bottom", "option" => __(_("Bottom")) . " (960x100px)", "selected" => $position === "Bottom" ? TRUE : FALSE), 4 => array("value" => "Center", "option" => __(_("Center")) . " (600x100px)", "selected" => $position === "Center" ? TRUE : FALSE));
print formSelect(array("name" => "position", "class" => "required", "p" => TRUE, "field" => __(_("Position"))), $options);
print formInput(array("name" => "URL", "class" => "span10 required", "field" => __(_("URL")), "p" => TRUE, "value" => $URL));
print formTextarea(array("name" => "code", "class" => "span10 required", "style" => "height: 150px;", "field" => __(_("Code")), "p" => TRUE, "value" => $code));
$options = array(0 => array("value" => 1, "option" => __(_("Yes")), "selected" => (int) $principal === 1 ? TRUE : FALSE), 1 => array("value" => 0, "option" => __(_("No")), "selected" => (int) $principal === 0 ? TRUE : FALSE));
print formSelect(array("name" => "principal", "class" => "required", "p" => TRUE, "field" => __(_("Principal"))), $options);
$options = array(0 => array("value" => "Active", "option" => __(_("Active")), "selected" => $situation === "Active" ? TRUE : FALSE), 1 => array("value" => "Inactive", "option" => __(_("Inactive")), "selected" => $situation === "Inactive" ? TRUE : FALSE));
print formSelect(array("name" => "situation", "class" => "required", "p" => TRUE, "field" => __(_("Situation"))), $options);
print formSave($action);
print formInput(array("name" => "ID", "type" => "hidden", "value" => $ID));
print formClose();
print div(FALSE);
开发者ID:no2key,项目名称:MuuCMS,代码行数:31,代码来源:add.php


示例4: eavCreateForm

function eavCreateForm($form_id, array $attributes, $action = '')
{
    // Print form javascript to View object
    print eavCreateFormValidationJS($form_id, $attributes);
    if (empty($action)) {
        $action = uriFull();
    }
    // Print open tag
    print formOpen($action, array('id' => $form_id, 'class' => '-i-form', 'method' => 'POST'));
    // Print form fields
    foreach ($attributes as $field) {
        // Create form field
        if ($field->backend_object != null) {
            // Parse helper name and function name
            $field_helper = explode('/', $field->backend_object, 2);
            if (isset($field_helper[0]) and isset($field_helper[1])) {
                // Load required helper
                Helper::load($field_helper[0]);
                if (function_exists($field_helper[1])) {
                    // And execute the function
                    print call_user_func($field_helper[1], $field);
                }
            }
        }
    }
    // Print submit
    print formSubmit(array('class' => '-b-button', 'name' => 'submit', 'value' => __('Save')));
    // Close form
    print formClose();
}
开发者ID:esironal,项目名称:exidoengine,代码行数:30,代码来源:eav.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP formData函数代码示例发布时间:2022-05-15
下一篇:
PHP form2uri函数代码示例发布时间: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