<? include('include.php');//包含信息?>
<?
if($_SESSION["logsup"]!="yes") {
//echo "没有权限";
//exit;
}
$dbquery="select id from $tbdsyscfg limit 0,1";
$cnum=$db->num_rows($dbquery);
if($cnum==0)
$dbquery="insert into $tbdsyscfg(dwname,fycount,jpgck,kg,isyzm,zx,ztlxx,hfsj,bgzs)
values('江西新华壹品',20,'0',3,1,'0','欢迎使用江西新华壹品图书借阅管理平台，全国免费咨询热线400-600-5364',
30,'本报告仅供参考')";
$result=$db->query($dbquery) or die('初始化系统设置表失败，请联系管理员');






$action=$_GET["action"];

if($action=="edit")
{
$dwname=trim($_POST["dwname"]);
$fycount=trim($_POST["fycount"]);
$jpgck=trim($_POST['jpgck']);
$kg=trim($_POST['kg']);
$isyzm=trim($_POST['isyzm']);
$isyzm=$isyzm?$isyzm:"no";

$zx=trim($_POST['radiozx']);
$ztlxx=trim($_POST['ztlxx']);
$bgzs=trim($_POST['bgzs']);
$lsbgzs=trim($_POST['lsbgzs']);
$hfsj=trim($_POST['hfsj']);
$sltxy=trim($_POST['sltxy']);
$dtxy=trim($_POST['dtxy']);
$dzqmxy=trim($_POST['dzqmxy']);
$djpath=trim($_POST['djpath']);


$dbquery="update $tbdsyscfg set dwname='".$dwname."',fycount=$fycount,
jpgck='".$jpgck."',kg=$kg,isyzm='".$isyzm."',zx=$zx,ztlxx='".$ztlxx."',bgzs='".$bgzs."',
lsbgzs='".$lsbgzs."',hfsj=$hfsj,bz1='".$sltxy."',bz2='".$dtxy."',bz3='".$djpath."',bz4='".$dzqmxy."'";
//echo $dbquery;
$db->query($dbquery) or die("更新系统设置表失败");


//************************************* *******************************************************
$client->creindex($dwname,$isyzm);
}



$dbquery="select * from $tbdsyscfg order by id asc limit 0,1";
$result=$db->query($dbquery);
while($arr=$db->result_query($result))
{
$dwname=$arr["dwname"];
$fycount=$arr["fycount"];
$jpgck=$arr["jpgck"];
$kg=$arr["kg"];
$isyzm=$arr["isyzm"];
$zx=$arr["zx"];
$ztlxx=$arr["ztlxx"];
$hfsj=$arr["hfsj"];
$bgzs=$arr["bgzs"];
$lsbgzs=$arr["lsbgzs"];
$sltxy=$arr['bz1'];
$dtxy=$arr['bz2'];
$djpath=$arr['bz3'];
$dzqmxy=$arr['bz4'];

}
$yzmcheck=($isyzm=='yes')?"checked":"";
//$isyzmcheck=($isyzm!=1)?" checked":"";


?>



<link href="css/<? echo $_SESSION["fgnamemain"] ?>" rel="stylesheet" type="text/css">
<script>
 function ee(a,b)
{
document.getElementById("tbqz").readOnly=a;//-->正确
//document.getElementById("dwname").readOnly=b;//-->正确
}

function chk()
{
if(document.form1.dwname.value.length==0)
{
alert("请输入单位名称")
document.form1.dwname.focus()
return false
}
if(document.form1.fycount.value.length==0 || isNaN(document.form1.fycount.value)==true)
{
alert("分页显示记录数不能为空或只能为数字")
document.form1.fycount.focus()
return false
}
if(document.form1.jpgck.value.length==0)
{
alert("请输入影像JPG图片长宽")
document.form1.jpgck.focus()
return false
}



}


</script>
 <?
       // $dwnamea="抚州***中学";
       // echo $dwnamea;
       // echo $dwname;
       // $sb=($dwname==$dwnamea)?1:0;
        //echo $sb;
       // echo $dwname;
       /* if($dwname=="抚州***中学")
        {
        $sb=0;
        }
        else
        {
        $sb=0;
        }
        */
        $sa=1;
        $sb=1;
        //echo $sa;
        ?>
        <link href="css/bc.css" rel="stylesheet" type="text/css">
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="ee(<?=$sa?>,<?=$sb?>)">
<form name=form1 method=post onsubmit="return chk()" action=syscfg.php?action=edit>
  <center>
  <TABLE class=gridView id=ctl00_ContentPlaceHolder2_GridView1
      style="WIDTH: 85%; BORDER-COLLAPSE: collapse" cellSpacing=0 rules=all
      border=0>
    <tr class="tr_southidc"> 
      <td colspan="2" height="25" align="center">&nbsp;</td>
    </tr>
    <tr class="tr_southidc"> 
      <td colspan="2" height="25" align="center"><b>系统设定信息</b></td>
    </tr>
    <tr> 
      <td width="26%" height="19">&nbsp;</td>
      <td width="74%">&nbsp;</td>
    </tr>
    <tr style='display:none'> 
      <td width="26%" height="19" class=gridViewItem> 
        <div align="right">单位名称：</div>
      </td>
      <td width="74%" class=gridViewItem> 
        <div align="left"> 
          <input type=text name=dwname value="<?=$dwname?>" size="50"<?=$s?>>
        </div>
      </td>
    </tr>
    <tr class="tr_southidc"> 
      <td width="26%" height="23" class=gridViewItem> 
        <div align="right">分页显示记录：</div>
      </td>
      <td width="74%" class=gridViewItem> 
        <div align="left"> 
          <input type=text name=fycount value="<?=$fycount?>">
        </div>
      </td>
    </tr>
    <tr class="tr_southidc"> 
      <td width="26%" height="23" class=gridViewItem> 
        <div align="right">帐户最低金额：</div>
      </td>
      <td width="74%" class=gridViewItem> 
        <div align="left"> 
          <input type=text name=jpgck value="<?=$jpgck?>">
          <font color="#FF0000"></font></div>
      </td>
    </tr>
    <tr class="tr_southidc" style='display:none'> 
      <td width="26%" height="23" class=gridViewItem> 
        <div align="right">影像JPG图片相邻间隔空格数：</div>
      </td>
      <td width="74%" class=gridViewItem> 
        <div align="left"> 
          <input type=text name=kg value="<?=$kg?>" size="10">
        </div>
      </td>
    </tr>
    <tr class="tr_southidc"  style='display:none'> 
      <td width="26%" height="23" class=gridViewItem> 
        <div align="right">是否启用首页验证码功能：</div>
      </td>
      <td width="74%" class=gridViewItem> 
        <div align="left"> 
          <input type=checkbox name=isyzm value="yes" <?=$yzmcheck?>>
          启用</div>
      </td>
    </tr>
    <tr class="tr_southidc" style='display:none'> 
      <td width="26%" height="23" class=gridViewItem> 
        <div align="right">报告打印纸型：</div>
      </td>
      <td width="74%" class=gridViewItem> 
        <div align="left"> 
          <?
                  echo $db->showradio($thiszx,10,60,'radiozx',$zx);
                  //产生radio
                  ?>
        </div>
      </td>
    </tr>
    <tr class="tr_southidc" style='display:none'> 
      <td width="26%" height="23" class=gridViewItem> 
        <div align="right">登记表拍照图缩略大小：</div>
      </td>
      <td width="74%" class=gridViewItem> 
        <div align="left"> 
          <input type=text name=sltxy value="<?=$sltxy?>" size="10">
          例如100X50 </div>
      </td>
    </tr>
    <tr class="tr_southidc" style='display:none'> 
      <td width="26%" height="23" class=gridViewItem> 
        <div align="right">登记表拍照图显示大小：</div>
      </td>
      <td width="74%" class=gridViewItem> 
        <div align="left"> 
          <input type=text name=dtxy value="<?=$dtxy?>" size="10">
          例如640X400 </div>
      </td>
    </tr>
    <tr class="tr_southidc" style='display:none'> 
      <td width="26%" height="23" class=gridViewItem> 
        <div align="right">电子签名图显示大小：</div>
      </td>
      <td width="74%" class=gridViewItem> 
        <div align="left"> 
          <input type=text name=dzqmxy value="<?=$dzqmxy?>" size="10">
          例如100X50 </div>
      </td>
    </tr>
    <tr class="tr_southidc" style='display:none'> 
      <td width="26%" height="23" class=gridViewItem> 
        <div align="right">登记表拍照图存储路径：</div>
      </td>
      <td width="74%" class=gridViewItem> 
        <div align="left"> 
          <input type=text name=djpath value="<?=$djpath?>" size="50">
          <br>
          请使用相对路径并设置此路径对应的虚拟目录，用“|“分隔 </div>
      </td>
    </tr>
    <tr class="tr_southidc"> 
      <td width="26%" height="23" class=gridViewItem> 
        <div align="right">状态栏信息：</div>
      </td>
      <td width="74%" class=gridViewItem> 
        <div align="left"> 
          <input type=text name=ztlxx value="<?=$ztlxx?>" size="50">
        </div>
      </td>
    </tr>
    <tr class="tr_southidc" style='display:none'> 
      <td width="26%" height="23" class=gridViewItem> 
        <div align="right">报告注释信息：</div>
      </td>
      <td width="74%" class=gridViewItem> 
        <div align="left"> 
          <input type=text name=bgzs value="<?=$bgzs?>" size="50">
        </div>
      </td>
    </tr>
    <tr class="tr_southidc" style='display:none'> 
      <td width="26%" height="23" class=gridViewItem> 
        <div align="right">临时报告注释信息：</div>
      </td>
      <td width="74%" class=gridViewItem> 
        <div align="left"> 
          <input type=text name=lsbgzs value="<?=$lsbgzs?>" size="50">
        </div>
      </td>
    </tr>
    <tr class="tr_southidc" style='display:none'> 
      <td width="26%" height="23" class=gridViewItem> 
        <div align="right">病人回访提醒时间：</div>
      </td>
      <td width="74%" class=gridViewItem> 
        <div align="left"> 
          <input type=text name=hfsj value="<?=$hfsj?>" size="10">
          天</div>
      </td>
    </tr>
    <tr class="tr_southidc" style='display:none'> 
      <td colspan="2" height="23">&nbsp;</td>
    </tr>
    <tr class="tr_southidc"> 
      <td colspan="2" height="23"> 
        <div align="center"> 
          <input type=submit name=suba value="保存">
        </div>
      </td>
    </tr>
  </table>
</form>
<BR>