<?php
if(!defined('MOD'))  die("access die");
$rules = intval($_GET['rules']);
$sqls = "SELECT * FROM ".TABLEPRE."collect_rule WHERE `id`='$rules' ";
$row_rules =qdb::QueryFirst($sqls);
switch ($row_rules['index_type']) {
    case 1:
		$index_type1= "checked";
        break;
    case 2:
		$index_type2= "checked"; 
        break;
    case 3:
		$index_type3= "checked"; 
        break;
      }
      
switch ($row_rules['formss'])
{
    case 1:
		$formss1= "checked"; 
        break;
    case 2:
		$formss2= "checked"; 
        break;
}      
@extract($row_rules);
$filter = explode(',', $filter);
$menuTree   = str_replace("value=\"{$cid}-", " selected value=\"{$cid}-", $menuTree);

$action = "edit";
$action_url = "system.php?sys=collect&channelid={$channelid}&work=addrules&works=edit&rules={$id}";
$step = intval($_GET['step']);

include qbase::template( $path . '/' . "edit_rules");
?> 