📄 form.php
字号:
<?php
include( "../config.inc.php" );
include( "../includes/SysGlobal.php" );
include( "language/".$aLan."_".$charset.".php" );
include( "../includes/version.php" );
include( "../includes/pro.php" );
include( "func/adm.inc.php" );
include( "func/common.inc.php" );
include( "func/db.inc.php" );
include( "func/nocatch.php" );
needauth( 15 );
$menuid = $_REQUEST['menuid'];
$step = $_REQUEST['step'];
echo "<html>\r\n<head >\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=";
echo $charset;
echo "\">\r\n<link id=\"style_sheet\" href=\"css/commonstyle.css\" type=\"text/css\" rel=\"stylesheet\">\r\n<title>";
echo $strAdminTitle;
echo "</title>\r\n\r\n\r\n\r\n\r\n\r\n</head>\r\n\r\n<body class=\"NormalPage\">\r\n<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" align=\"center\" background=\"images/mu8.gif\" height=\"30\" >\r\n <tr> \r\n <td width=\"350\" > <img src=\"images/bar.gif\" > ";
showmenu( $menuid );
echo " - ";
echo $strFormSet;
echo "</td>\r\n <td > </td> \r\n <td width=\"100\" > </td>\r\n </tr>\r\n </table>\r\n";
if ( !isset( $menuid ) || $menuid == "" )
{
echo "<br><p align=center>".$strFormNotice1."</p>";
exit( );
}
$table_name = $tbl_form."_".$menuid;
if ( $step == "modify" )
{
$field_id = $_POST['field_id'];
$moveable = $_POST['moveable'];
$textfield = $_POST['textfield'];
$fieldsize = $_POST['fieldsize'];
$fieldvalue = $_POST['fieldvalue'];
$mustfill = $_POST['mustfill'];
$canrepeat = $_POST['canrepeat'];
$memo = $_POST['memo'];
$used = $_POST['used'];
$xuhao = $_POST['xuhao'];
$nums = sizeof( $field_id );
$j = 1;
for ( ; $j <= $nums; $j++ )
{
$fieldtype = "fieldtype_".$j;
$field_type = $_POST[$fieldtype];
$msql->query( "update {$table_name} set \r\n\t\tfield_caption = '{$textfield[$j]}',\r\n\t\tfield_type = '{$field_type}',\r\n\t\tfield_size = '{$fieldsize[$j]}',\r\n\t\tfield_value = '{$fieldvalue[$j]}',\r\n\t\tfield_null = '{$mustfill[$j]}',\r\n\t\tvalue_repeat = '{$canrepeat[$j]}',\r\n\t\tfield_intro = '{$memo[$j]}',\r\n\t\tuse_field = '{$used[$j]}',\r\n\t\txuhao = '{$xuhao[$j]}'\r\n \t\twhere id = '{$field_id[$j]}'" );
}
sayok( $strFormNotice2, "form.php?menuid=".$menuid, "" );
}
else
{
echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" align=\"center\" cellpadding=\"2\">\r\n <form name=\"dform\" action=\"form.php\" method=\"post\">\r\n <tr bgcolor=\"#f0f0f0\"> \r\n <td height=\"28\" align=\"center\" class=title>";
echo $strFormL1;
echo "</td>\r\n <td height=\"28\" align=\"center\" class=title>";
echo $strFormL2;
echo "</td>\r\n <td align=\"center\" class=title height=\"28\">";
echo $strFormL3;
echo "</td>\r\n <td height=\"28\" align=\"center\" class=title>";
echo $strFormL4;
echo "</td>\r\n <td height=\"28\" align=\"center\" class=title>";
echo $strFormL5;
echo "</td>\r\n <td height=\"28\" align=\"center\" class=title>";
echo $strFormL6;
echo "</td>\r\n <td height=\"28\" align=\"center\" class=title>";
echo $strFormL7;
echo "</td>\r\n <td height=\"28\" align=\"center\" class=title>";
echo $strFormL8;
echo "</td>\r\n <td height=\"28\" align=\"center\" class=title>";
echo $strFormL9;
echo "</td>\r\n </tr>\r\n ";
$i = 1;
$msql->query( "select * from {$table_name} order by xuhao" );
while ( $msql->next_record( ) )
{
$id[$i] = $msql->f( "id" );
$field_caption[$i] = $msql->f( "field_caption" );
$field_type[$i] = $msql->f( "field_type" );
$field_size[$i] = $msql->f( "field_size" );
$field_name[$i] = $msql->f( "field_name" );
$field_value[$i] = $msql->f( "field_value" );
$field_null[$i] = $msql->f( "field_null" );
$field_value_repeat[$i] = $msql->f( "value_repeat" );
$field_intro[$i] = $msql->f( "field_intro" );
$field_used[$i] = $msql->f( "use_field" );
$field_xuhao[$i] = $msql->f( "xuhao" );
$field_moveable[$i] = $msql->f( "moveable" );
if ( $id[$i] <= "16" )
{
$select_disabled = "disabled";
$hidden = "<input type=hidden name=fieldtype_{$i} value={$field_type[$i]}>";
}
else
{
$select_disabled = "";
}
echo " \r\n <tr bgcolor=\"#f0f0f0\"> \r\n <td align=\"center\" class=con> ";
if ( $field_moveable[$i] == "0" )
{
echo "<input type=checkbox name=used[{$i}] value=1 ".checked( $field_used[$i], 1 ).">";
}
else
{
echo "<input type=checkbox name=d value=1 ".checked( $field_used[$i], 1 )." disabled>";
echo "<input type=hidden name=used[{$i}] value={$field_used[$i]}>";
}
echo " \r\n <input type=\"hidden\" name=\"field_id[";
echo $i;
echo "]\" value=\"";
echo "{$id[$i]}";
echo "\">\r\n <input type=\"hidden\" name=\"moveable[";
echo $i;
echo "]\" value=\"";
echo "{$field_moveable[$i]}";
echo "\">\r\n <input type=\"hidden\" name=\"menuid\" value=\"";
echo $menuid;
echo "\">\r\n </td>\r\n <td align=\"center\" class=\"con\" > \r\n <input name=\"textfield[";
echo $i;
echo "]\" type=\"text\" size=\"10\" value=\"";
echo $field_caption[$i];
echo "\" class=input>\r\n </td>\r\n <td align=\"center\" class=\"con\"> \r\n <input name=\"fieldsize[";
echo $i;
echo "]\" type=\"text\" size=\"2\" value=";
echo $field_size[$i];
echo " class=input>\r\n </td>\r\n <td align=\"center\" class=\"con\"> \r\n ";
echo "<s";
echo "elect style=\"width=92\" name=\"fieldtype_";
echo $i;
echo "\" ";
echo $select_disabled;
echo " >\r\n <option>-";
echo $strFormColType;
echo "-</option>\r\n <option value=\"1\" ";
echo seld( $field_type[$i], 1 );
echo ">";
echo $strFormColType1;
echo "</option>\r\n <option value=\"2\" ";
echo seld( $field_type[$i], 2 );
echo ">";
echo $strFormColType2;
echo "</option>\r\n <option value=\"5\" ";
echo seld( $field_type[$i], 5 );
echo ">";
echo $strFormColType3;
echo "</option>\r\n </select>\r\n ";
echo $hidden;
echo "</td>\r\n <td align=\"center\" class=\"con\"> \r\n <input name=\"fieldvalue[";
echo $i;
echo "]\" type=\"text\" value=\"";
echo $field_value[$i];
echo "\" size=\"18\" class=input>\r\n </td>\r\n <td align=\"center\" class=\"con\"> ";
if ( $field_moveable[$i] == "0" )
{
echo "<input type=checkbox name=mustfill[{$i}] value=1 ".checked( $field_null[$i], 1 ).">";
}
else
{
echo "<input type=checkbox name=d value=1 ".checked( $field_null[$i], 1 )." disabled>";
echo "<input type=hidden name=mustfill[{$i}] value={$field_null[$i]}>";
}
echo " </td>\r\n <td align=\"center\" class=\"con\">";
echo "<input type=checkbox name=canrepeat[{$i}] value=1 ".checked( $field_value_repeat[$i], 1 ).">";
echo " \r\n </td>\r\n <td align=\"center\" class=\"con\"> \r\n <input type=\"text\" name=\"memo[";
echo $i;
echo "]\" value=\"";
echo $field_intro[$i];
echo "\" size=\"18\" class=input>\r\n </td>\r\n <td align=\"center\" class=\"con\"> \r\n <input name=\"xuhao[";
echo $i;
echo "]\" type=\"text\" size=\"2\" value=\"";
echo $field_xuhao[$i];
echo "\" class=input>\r\n </td>\r\n </tr>\r\n ";
$i++;
}
echo " \r\n <tr bgcolor=\"#f0f0f0\" align=\"center\"> \r\n <td height=\"28\" colspan=\"9\" class=\"title\"> \r\n <input type=\"submit\" name=\"Submit\" value=\"";
echo $strConfirm;
echo "\" class=button>\r\n <input type=\"hidden\" name=\"step\" value=\"modify\">\r\n </td>\r\n </tr>\r\n </form>\r\n</table>\r\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" height=\"10\" background=\"images/mu1.jpg\">\r\n <tr> \r\n <td align=\"center\" height=\"2\" colspan=\"2\"></td>\r\n </tr>\r\n</table>\r\n";
}
echo " \r\n</body>\r\n</html>\r\n";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -