本文整理汇总了PHP中form_save函数的典型用法代码示例。如果您正苦于以下问题:PHP form_save函数的具体用法?PHP form_save怎么用?PHP form_save使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了form_save函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: include
| or comments regarding this code should be directed to: |
| - [email protected] |
+-------------------------------------------------------------------------+
| - raXnet - http://www.raxnet.net/ |
+-------------------------------------------------------------------------+
*/
include("./include/auth.php");
include_once("./lib/utility.php");
/* set default action */
if (!isset($_REQUEST["action"])) { $_REQUEST["action"] = ""; }
switch ($_REQUEST["action"]) {
case 'save':
form_save();
break;
case 'item_remove':
item_remove();
header("Location: graphs.php?action=graph_edit&id=" . $_GET["local_graph_id"]);
break;
case 'item_edit':
include_once("./include/top_header.php");
item_edit();
include_once("./include/bottom_footer.php");
break;
case 'item_movedown':
开发者ID:songchin,项目名称:Cacti,代码行数:31,代码来源:graphs_items.php
示例2: form_edit
function form_edit($obj)
{
$dd = array($obj->id);
$saved = 0;
/* recupera post */
$CI =& get_instance();
$post = $CI->input->post();
$cp = $obj->cp;
/* Recupera dados do banco */
$recupera = 0;
/* recupera ACAO do post */
$acao = '';
if (!isset($post['acao'])) {
$recupera = 1;
}
/* Save in table */
if ($recupera == 0) {
/* Valida */
$saved = valida_post($cp);
if ($saved > 0) {
form_save($obj);
}
}
$tela = '';
$tela .= '
<table class="form_tabela" width="100%" border=0 >
<tr>
<td>' . form_open() . '</td>
</tr>
';
if ($recupera == 1) {
/* recupera dados do banco */
if (strlen($obj->tabela) > 0) {
$data = le_dados($obj);
} else {
$recupera = 0;
}
} else {
$data = array();
}
//$tela .= 'Recupera = ' . $recupera;
for ($r = 0; $r < count($cp); $r++) {
/* Recupera dados */
$vlr = '';
if ($recupera == 1) {
/* banco de dados */
$fld = $cp[$r][1];
if (isset($data->{$fld})) {
$vlr = $data->{$fld};
}
} else {
if (isset($post['dd' . $r])) {
$vlr = $post['dd' . $r];
}
}
$tela .= form_field($cp[$r], $vlr);
}
$tela .= '</table>';
$tela .= "\n\t\t<script>\n\t\t\t\$(document).ready(function(){\n \t\t\t\t\$('.date').mask('00/00/0000');\n \t\t\t\t\$('.money').mask('000.000.000.000.000,00', {reverse: true});\n\t\t\t});\n\t\t</script>\n\t\t";
$tela .= form_close();
$data = array('tela' => $tela, 'saved' => $saved);
return $data;
}
开发者ID:CGPUCPR,项目名称:SwB-2nd,代码行数:63,代码来源:form_sisdoc_helper.php
注:本文中的form_save函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论