百度首页 | 百度空间
 
查看文章
 
修改 复选框,组啊。。。。
2007-04-03 16:27

<!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=utf-8" />
<title></title>
<link href="../css/css.css" rel="stylesheet" type="text/css" />
</head>


<body>
<cfquery name="group" datasource="#Application.DATASOURCE#">
   select * from TBL_RIGHTS_ROLES where roleID='#url.roleID#'
</cfquery>
<cfoutput query="group">
<cfset item=itemValue>
<cfset groupName=roleName>
<cfset itemCount=listlen(item)>
</cfoutput>
<cfquery name="getModule" datasource="#Application.DATASOURCE#">
   select * from TBL_MODULE
</cfquery>
<cfset lists="">
<cfloop query="getModule">
   <cfset lists=listAppend(lists,moduleName)>
</cfloop>
<cfparam name="startnum" default="1">
<form name="classadd" method="post" action="groupadd_controller.cfm">
<table width="100%" border="0">
   <tr>
     <td width="16%" class="zi_12">&nbsp;<img src="../images/icon-order-0.gif" width="24" height="24"> 添加组名称:</td>
     <td colspan="3">&nbsp;</td>
     <td width="19%">&nbsp;</td>
   </tr>
  
   <tr>
     <td class="zi_12"><div align="right">组名称:</div></td>
     <td colspan="3" class="zi_12"><input name="groupName" type="text" size="48" value="<cfoutput>#groupName#</cfoutput>"/>
       <input type="submit" name="Submit" value="添加" />
       <input type="reset" name="Submit2" value="重置" /></td>
     <td>&nbsp;</td>
   </tr>
   <tr>
     <td height=1 bgcolor="#CCCCCC" colspan=5></td>
   </tr>
  
  
   <cfquery name="getItem" datasource="#Application.DATASOURCE#">
     select * from TBL_RIGHTS_ITEM order by itemID asc
   </cfquery>

   <cfset flag=0>
   <cfset CountVar=0>
   <cfset j=1>
   <cfif #getItem.recordCount# gt 0>
   <cfloop query="getItem" >
   <cfif #moduleID# neq #Application.groupflag1#>
   <cfset Application.groupflag1=#moduleID#>
   <tr>
    <td colspan="5" bgcolor="F7F7F7" class="zi_12">&middot;
    <cfoutput>#ListGetAt(lists,moduleID)#</cfoutput></td>
   </tr>
   <cfset colIndex=1>
   <cfelse>
   <cfset flag=flag+1>
   </cfif>
   <cfif #colIndex# eq 1>
    <tr>
   </cfif>
   <cfif #colIndex# le 5 and #colIndex# ge 1>
     <td class="zi_12" colspan="1">
<input type="checkbox" name="item" value="<cfoutput>#itemID#</cfoutput>"
<cfif    #j# le #itemCount# >
     <cfif #listGetAt(item,j)# eq #itemID#>
     <cfset j=j+1>
     <cfoutput>checked</cfoutput>
     </cfif>
     </cfif>

/>
     <cfoutput>#itemName#</cfoutput>
</td>
   </cfif>
   <cfif #colIndex# eq 5>
   </tr>
   <cfset colIndex=1>
   <cfelse>
   <cfset colIndex=colIndex+1>
   </cfif>
   <cfset CountVar=#CountVar# + 1>
   </cfloop>
   </cfif>
   <tr>
     <td height="36" class="zi_12">&nbsp;</td>
     <td colspan="3" class="zi_12">&nbsp;</td>
     <td>&nbsp;</td>
   </tr>

   <tr>
     <td height="36" class="zi_12">&nbsp;</td>
     <td colspan="3" class="zi_12">&nbsp;</td>
     <td>&nbsp;</td>
   </tr>
</table>

<input type="hidden" name="act" value="add">
</form>
</body>
</html>


类别:Coldfusion | 添加到搜藏 | 浏览() | 评论 (0)
 
最近读者:
 
网友评论:
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
验证码:
 

     

©2008 Baidu