⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 addm.php

📁 相关软件: ·帝国网站管理系统(Ecms) v3.5 繁体版 ·搜索更多与"帝国网站管理系统(Ecms) "相关的软件 注意事项: ·注意:本站软件一律只用鼠标左键打开
💻 PHP
字号:
<?
require("../../class/connect.php");
include("../../class/db_sql.php");
include("../../class/config.php");
include("../../class/functions.php");
$link=db_connect();
$empire=new mysqlquery();
$logininid=$_COOKIE['enewsloginuserid'];
$loginin=$_COOKIE['enewsloginusername'];
$loginrnd=$_COOKIE['enewsloginrnd'];
$loginlevel=$_COOKIE['enewsloginlevel'];
$editor=1;
is_login($logininid,$loginin,$loginrnd);
//验证权限
CheckLevel($logininid,$loginin,$classid,"m");
$tid=(int)$_GET['tid'];
$tbname=RepPostVar($_GET['tbname']);
if(!$tid||!$tbname)
{
printerror("ErrorUrl","history.go(-1)");
}
$enews=$_GET['enews'];
$mtype=" checked";
$record="<!--record-->";
$field="<!--field--->";
$url="数据表:[phome_ecms_".$tbname."]&nbsp;->&nbsp;<a href=ListM.php?tid=$tid&tbname=$tbname>系统模型管理</a>&nbsp;->&nbsp;增加系统模型";
//修改系统模型
if($enews=="EditM")
{
$mid=(int)$_GET['mid'];
$mtype="";
$url="数据表:[phome_ecms_".$tbname."]&nbsp;<a href=ListM.php?tid=$tid&tbname=$tbname>系统模型管理</a>&nbsp;->&nbsp;修改系统模型";
$r=$empire->fetch1("select * from phome_enewsmod where mid='$mid' and tid='$tid'");
}
//取得字段
$fsql=$empire->query("select f,fname,iscj from phome_enewsf where isshow=1 and tid='$tid' order by myorder");
while($fr=$empire->fetch($fsql))
{
$like=$field.$fr[f].$record;
$slike=",".$fr[f].",";
//录入项
if(strstr($r[enter],$like))
{
$enterchecked=" checked";
//取得字段标识
$dor=explode($like,$r[enter]);
if(strstr($dor[0],$record))
{
$dor1=explode($record,$dor[0]);
$last=count($dor1)-1;
$fr[fname]=$dor1[$last];
}
else
{
$fr[fname]=$dor[0];
}
}
else
{
$enterchecked="";
}
//标题
if($enews=="AddM"&&($fr[f]=="title"||$fr[f]=="special.field"))
{
$enterchecked=" checked";
}
$entercheckbox="<input name=center[] type=checkbox value='".$fr[f]."'".$enterchecked.">";
//采集项
$cjcheckbox="";
$searchcheckbox="";
if($fr[iscj])
{
if(strstr($r[cj],$like))
{$cjchecked=" checked";}
else
{$cjchecked="";}
//标题
if($enews=="AddM"&&$fr[f]=="title")
{
$cjchecked=" checked";
}
$cjcheckbox="<input name=cchange[] type=checkbox value='".$fr[f]."'".$cjchecked.">";
}
//搜索项
if($fr[searchvar]!="special.field")
{
if(strstr($r[searchvar],$slike))
{$searchchecked=" checked";}
else
{$searchchecked="";}
$searchcheckbox="<input name=schange[] type=checkbox value='".$fr[f]."'".$searchchecked.">";
}
$data.="<tr> 
            <td height=25> <div align=center> 
                <input name=cname[".$fr[f]."] type=text value='".$fr[fname]."'>
              </div></td>
            <td> <div align=center> 
                <input name=cfield type=text value='".$fr[f]."' readonly>
              </div></td>
            <td> <div align=center> 
                ".$cjcheckbox."
              </div></td>
            <td><div align=center> 
                ".$entercheckbox."
              </div></td>
			  <td><div align=center> 
                ".$searchcheckbox."
              </div></td>
          </tr>";
}
db_close();
$empire=null;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>增加系统模型</title>
<link href="../../data/images/css.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1">
  <tr>
    <td>位置:<?=$url?></td>
  </tr>
</table>
<form name="form1" method="post" action="../enews.php">
  <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
    <tr> 
      <td height="25" colspan="2" class="header"><strong><font color="#FFFFFF">增加系统模型 
        <input name="add[mid]" type="hidden" id="add[mid]" value="<?=$mid?>">
        <input name="enews" type="hidden" id="enews" value="<?=$enews?>">
        <input name="add[tbname]" type="hidden" id="add[tbname]" value="<?=$tbname?>">
        <input name="add[tid]" type="hidden" id="add[tid]" value="<?=$tid?>">
        </font></strong></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="26%" height="25">模型名称</td>
      <td width="74%" height="25"><input name="add[mname]" type="text" id="add[mname]" value="<?=$r[mname]?>" size="43">
        (比如:&quot;新闻系统模型&quot;)</td>
    </tr>
	<tr bgcolor="#FFFFFF"> 
      <td height="25" valign="top"><p>选择本模型的采集项/录入项<br>
          <br>
          ( <font color="#FF0000"> 
          <input name="add[mtype]" type="checkbox" id="add[mtype]3" value="1"<?=$mtype?>>
          自动生成表单模板</font> ) <br>
        </p>
        </td>
      <td height="25"><table width="100%" border="0" cellspacing="1" cellpadding="3">
          <tr bgcolor="#DBEAF5"> 
            <td width="30%" height="25"> <div align="center">字段标识</div></td>
            <td width="34%" height="25"> <div align="center">字段名</div></td>
            <td width="12%" height="25"> 
              <div align="center">采集项</div></td>
            <td width="12%">
<div align="center">录入项</div></td>
            <td width="12%">
<div align="center">搜索项</div></td>
          </tr>
          <?=$data?>
        </table></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25" valign="top">录入表单模板<br>
        (如<font color="#FF0000">自动生成表单模板</font><br>
        ,不用填模板内容) </td>
      <td height="25"><textarea name="add[mtemp]" cols="75" rows="20" id="add[mtemp]"><?=htmlspecialchars(stripSlashes($r[mtemp]))?></textarea></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25" valign="top">注释:</td>
      <td height="25"><textarea name="add[mzs]" cols="75" rows="10" id="textarea"><?=$r[mzs]?></textarea></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25">&nbsp;</td>
      <td height="25"><input type="submit" name="Submit" value="提交"> <input type="reset" name="Submit2" value="重置"></td>
    </tr>
  </table>
</form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -