<?PHPrequire_once(dirname(__file__).'/config.PHP');$row = $dsql->Getone("SELECT * FROM `dede_sysconfig` WHERE aID='$ID'");$info=$row["info"];if( $action == 'del' ){ $ID = explode("`",$ID); foreach ($ID as $var) { $query = "delete from `dede_sysconfig` WHERE `aID` = '$var'"; $dsql->ExecuteNonequery($query); } ShowMsg("已删除变量 $info ","sys_info.PHP"); exit();}?> |
<!DOCTYPE HTML PUBliC "-//W3C//DTD xhtml 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd"><HTML xmlns="http://www.w3.org/1999/xhtml"><head><Meta http-equiv="Content-Type" content="text/HTML; charset=<?PHP echo $cfg_soft_lang; ?>"><Title>系统配置参数</Title><script language="JavaScript" src="../include/Js/dedeAJAX2.Js"></script><script language="JavaScript">var searchconfig = false;function Nav(){ if(window.navigator.userAgent.indexOf("MSIE")>=1) return 'IE'; else if(window.navigator.userAgent.indexOf("firefox")>=1) return 'FF'; else return "OT";}function $Obj(objname){ return document.getElementByID(objname);}function ShowConfig(em,allgr){ if(searchconfig) location.reload(); for(var i=1;i<=allgr;i++) { if(i==em) $Obj('td'+i).style.display = (Nav()=='IE' ? 'block' : 'table'); else $Obj('td'+i).style.display = 'none'; } $Obj('addvar').style.display = 'none';}function ShowHIDe(objname){ var obj = $Obj(objname); if(obj.style.display != "none") obj.style.display = "none"; else obj.style.display = (Nav()=='IE' ? 'block' : 'table-row');}function backSearch(){ location.reload();}function getSearch(){ var searchKeywords = $Obj('keywds').value; var myAJAX = new DedeAJAX($Obj('_search')); myAJAX.SendGet('sys_info.PHP?dopost=search&keywords='+searchKeywords) $Obj('_searchback').INNERHTML = '<input name="searchbackBtn" type="button" value="返回" ID="searchbackBtn" onclick="backSearch()"/>' $Obj('_mainsearch').INNERHTML = ''; searchconfig = true;}</script><script type="text/JavaScript">function getoneItem(){ var allSel=""; if(document.form1.ID.value) return document.form1.ID.value; for(i=0;i<document.form1.ID.length;i++) { if(document.form1.ID[i].checked) { allSel = document.form1.ID[i].value; break; } } return allSel;}function getCheckBoxItem(){ var allSel=""; if(document.form1.ID.value) return document.form1.ID.value; for(i=0;i<document.form1.ID.length;i++) { if(document.form1.ID[i].checked) { if(allSel=="") allSel=document.form1.ID[i].value; else allSel=allSel+","+document.form1.ID[i].value; } } return allSel;}function selAll(){ for(i=0;i<document.form1.ID.length;i++) { if(!document.form1.ID[i].checked) { document.form1.ID[i].checked=true; } }}function noSelAll(){ for(i=0;i<document.form1.ID.length;i++) { if(document.form1.ID[i].checked) { document.form1.ID[i].checked=false; } }}function del(){ var qstr=getCheckBoxItem(); if(qstr=="") alert("请选择ID!"); else if(window.confirm("您确定要删除所选证书吗?")) location.href="sys_check.PHP?action=del&ID="+qstr;}</script><link href="CSS/base.CSS" rel="stylesheet" type="text/CSS"></head><body background='images/allbg.gif' leftmargin='8' topmargin='8'><div ><table wIDth="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D6D6D6" align="center"> <tr> <td height="28" background="images/tbg.gif" ><b>Dedecms系统配置参数:</b></td> </tr> <tr> <td height="24" bgcolor="#ffffff" align="center"><?PHP$ds = file(DEDEadmin.'/inc/configgroup.txt');$totalGroup = count($ds);$i = 0;foreach($ds as $dl){ $dl = trim($dl); if(empty($dl)) continue; $dls = explode(',',$dl); $i++; if($i>1) echo " | <a href='JavaScript:ShowConfig($i,$totalGroup)'>{$dls[1]}</a> "; else{ echo " <a href='JavaScript:ShowConfig($i,$totalGroup)'>{$dls[1]}</a> "; }}?> | <a href="#" onClick="ShowHIDe('addvar')">添加新变量</a></td> </tr> <tr ID="addvar" > <td height="24" bgcolor="#ffffff" align="center"><form name="fadd" action="sys_info.PHP" method="post"> <input type='hIDden' name='dopost' value='add'> <table wIDth="98%" border="0" cellspacing="0" cellpadding="0"> <tr> <td wIDth="12%" height="26">变量名称:</td> <td wIDth="38%" align="left"><input name="nvarname" type="text" ID="nvarname" /></td> <td wIDth="12%" align="center">变量值:</td> <td wIDth="38%" align="left"><input name="nvarvalue" type="text" ID="nvarvalue" /></td> </tr> <tr> <td wIDth="10%" height="26">变量类型:</td> <td colspan='3' align="left"><input name="vartype" type="radio" value="string" class='np' checked='checked' /> 文本 <input name="vartype" type="radio" value="number" class='np' /> 数字 <input type="radio" name="vartype" value="bool" class='np' /> 布尔(Y/N) <input type="radio" name="vartype" value="bstring" class='np' /> 多行文本 </td> </tr> <tr> <td height="26">参数说明:</td> <td align="left"><input type="text" name="varmsg" ID="varmsg" /></td> <td align="center">所属组:</td> <td align="left"><?PHP echo "<select name='vargroup' class='npvar'>\r\n"; foreach($ds as $dl){ $dl = trim($dl); if(empty($dl)) continue; $dls = explode(',$dl); echo "<option value='{$dls[0]}'>{$dls[1]}</option>\r\n"; } echo "</select>\r\n"; ?> <input type="submit" name="submit" value="保存变量" /></td> </tr> </table> </form></td> </tr></table><table wIDth="98%" border="0" cellpadding="0" cellspacing="0" bgcolor="#D6D6D6" align="center"> <tr> <td height="28" align="right" background="images/tbg.gif" > 配置搜索: <input type="text" name="keywds" ID="keywds" /> <input name="searchBtn" type="button" value="搜索" ID="searchBtn" onclick="getSearch()"/> <span ID="_searchback"></span></td> </tr> <tr> <td bgcolor="#FFFFFF" wIDth="100%"><form action="sys_info.PHP" method="post" name="form1"> <input type="hIDden" name="dopost" value="save"><div ID="_search"></div><div ID="_mainsearch"> <?PHP$n = 0;if(!isset($gp)) $gp = 1;foreach($ds as $dl){ $dl = trim($dl); if(empty($dl)) continue; $dls = explode(',$dl); $n++;?> <table wIDth="100%" style='<?PHP if($n!=$gp) echo "display:none"; ?>' ID="td<?PHP echo $n?>" border="0" cellspacing="1" cellpadding="1" bgcolor="#cfcfcf"> <tr align="center" bgcolor="#FBFCE2" height="25"> <td wIDth="50">aID</td> <td wIDth="300">参数说明</td> <td>参数值</td> <td wIDth="220">变量名</td> </tr> <?PHP$dsql->Setquery("Select * From `dede_sysconfig` where groupID='{$dls[0]}' order by aID asc");$dsql->Execute();$i = 1;while($row = $dsql->GetArray()){ if($i%2==0) { $bgcolor = "#F9FCEF"; } else { $bgcolor = "#ffffff"; } $i++;?> <tr align="center" height="25" bgcolor="<?PHP echo $bgcolor?>"> <td wIDth="50"><?PHP if($row['aID'] <= 761){echo "!";}else{echo "<input name='ID' type='checkBox' ID='ID' value='".$row['aID']."' class='np'>";}?></td> <td wIDth="300"><?PHP echo $row['info']; ?>: </td> <td align="left" ><?PHPif($row['type']=='bool'){ $c1=''; $c2 = ''; $row['value']=='Y' ? $c1=" checked" : $c2=" checked"; echo "<input type='radio' class='np' name='edit___{$row['varname']}' value='Y'$c1>是 "; echo "<input type='radio' class='np' name='edit___{$row['varname']}' value='N'$c2>否 ";}else if($row['type']=='bstring'){ echo "<textarea name='edit___{$row['varname']}' row='4' ID='edit___{$row['varname']}' class='textarea_info' style='wIDth:98%;height:50px'>".HTMLspecialchars($row['value'])."</textarea>";}else if($row['type']=='number'){ echo "<input type='text' name='edit___{$row['varname']}' ID='edit___{$row['varname']}' value='{$row['value']}' style='wIDth:30%'>";}else{ echo "<input type='text' name='edit___{$row['varname']}' ID='edit___{$row['varname']}' value=\"".HTMLspecialchars($row['value'])."\" style='wIDth:80%'>";}?></td> <td><?PHP echo $row['varname']?></td> </tr> <?PHP}?> </table> <?PHP}?></div> <table wIDth="100%" border="0" cellspacing="1" cellpadding="1" > <tr bgcolor="#F9FCEF"> <td height="50" colspan="3"> <table wIDth="98%" border="0" cellspacing="1" cellpadding="1"> <tr> <td wIDth="11%"> <a href="JavaScript:selAll()" >全选</a> <a href="JavaScript:noSelAll()" >取消</a> <a href="#" onClick="del()" >删除</a></td> </tr> </table> <table wIDth="98%" border="0" cellspacing="1" cellpadding="1"> <tr> <td wIDth="11%"> </td> <td wIDth="11%"> </td> <td wIDth="11%"><input name="imageFIEld" type="image" src="images/button_ok.gif" wIDth="60" height="22" border="0" ></td> <td wIDth="78%"><img src="images/button_reset.gif" wIDth="60" height="22" onClick="document.form1.reset()"></td> </tr> </table></td> </tr> </table> </form></td> </tr></table></div></body></HTML> |
上一篇:dedecms5.7问答模板只允许管理员回答
下一篇:dedecms联动菜单通过evalue获取三级所有的ename
总结以上是内存溢出为你收集整理的dedecms后台添加新变量删除的功能全部内容,希望文章能够帮你解决dedecms后台添加新变量删除的功能所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)