本文整理汇总了PHP中addform函数的典型用法代码示例。如果您正苦于以下问题:PHP addform函数的具体用法?PHP addform怎么用?PHP addform使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了addform函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: switch
<?php
include_once "connect.php";
$action = $_GET['action'];
$id = (int) $_GET['id'];
switch ($action) {
case 'add':
addform();
break;
case 'edit':
editform($id);
break;
}
function addform()
{
$date = $_GET['date'];
$enddate = $_GET['end'];
if ($date == $enddate) {
$enddate = '';
}
if (empty($enddate)) {
$display = 'style="display:none"';
$enddate = $date;
$chk = '';
} else {
$display = 'style=""';
$enddate = $date;
$chk = 'checked';
}
$enddate = empty($_GET['end']) ? $date : $_GET['end'];
?>
示例2: headhtml
require 'global.php';
headhtml();
echo '<div class="nav" style="display:;"><a href="?">首页</a><a href="?action=addform&p_cid=';
echo $p_cid;
echo '">添加</a></div>
';
$action = $_GET['action'];
switch ($action) {
case 'saveform':
saveform();
break;
case 'addform':
addform($action);
break;
case 'modify':
addform($action);
break;
case 'del':
$db->query("delete from ve123_dh_goodlinks where link_id='" . intval($_GET['link_id']) . "'");
break;
}
echo '<table width="100%" border="0" cellpadding="3" cellspacing="1" class="tablebg">
<tr>
<th width="50">ID</th>
<th>分类名称</th>
<th width="80">操作</th>
</tr>
';
$result = $db->query('select * from ve123_dh_goodlinks');
while ($rs = $db->fetch_array($result)) {
示例3: lang_answer
function lang_answer($trailinfo)
{
global $HTTP_POST_VARS, $mytrail;
$trailinfo = unserialize(base64_decode($trailinfo));
if ($HTTP_POST_VARS['yes']) {
if ($trailinfo['trail_id'] != -1) {
edit($mytrail, $trailinfo['description'], $trailinfo['title'], true, $trailinfo['act_as_admin']);
} else {
create($trailinfo['kat'], $trailinfo['title'], $trailinfo['description'], true);
}
} else {
if ($trailinfo['trail_id'] != -1) {
editform($trailinfo);
} else {
addform($trailinfo);
}
}
}