0 && (!chkCat($TypeSeq, $Cat) || ($SubCat != '' && !chkSubCat($TypeSeq, $Cat, $SubCat)))) { $TypeSeq=0; $Cat=0; $SubCat=''; $Stage=0; } $Page=$GoodAcct ? '900;url=amenu.php?k='.$Key : '0;url=failed.php'; ?> >

Style Description List

'."\n"; echo ''."\n"; echo ''."\n"; echo '
'."\n"; echo ($Stage < 1 ? 'Select ' : '').'Category:  '."\n"; echo ''."\n"; echo '
'."\n"; echo ''."\n"; echo ''."\n"; if ($Stage > 0) { if (cntSubCat($TypeSeq, $Cat, $SubCat) > 0) { echo ''."\n"; echo ''."\n"; echo '
'."\n"; echo ''."\n"; echo ($Stage < 2 ? 'Select ' : '').'Sub-Category:  '."\n"; echo ''."\n"; echo '
'."\n"; echo ''."\n"; echo ''."\n"; } else { $SubCat=''; $Stage=2; } } echo ''."\n"; if ($Stage > 1) { $query='select * from style_sub where sg="'.$Comp_SG.'" and type_seq="'.$TypeSeq.'" and cat="'.$Cat.'" and sub_cat="'.$SubCat.'"'; $subcat_res=mysqli_query($db, $query); $subcat_row=mysqli_fetch_assoc($subcat_res); if ($subcat_row['req_desc'] == 'N') { echo 'Sub-Category is not yet set to allow Description Choice/Entry
'."\n"; } } echo '
'."\n"; $Args='.php?k='.$Key.'&t='.$TypeSeq.'&c='.$Cat.'&sc='.(empty($SubCat) ? 'BL' : $SubCat); echo '
'."\n"; echo ''."\n"; echo '
'."\n"; echo '
'."\n"; echo ''."\n"; echo '
'."\n"; echo '
'."\n"; echo ''."\n"; echo '
'."\n"; echo '
'."\n"; echo ''."\n"; echo '
'."\n"; $query='select * from style where sg="'.$Comp_SG.'" and type_seq="'.$TypeSeq.'" and cat="'.$Cat.'"'; $cat_res=mysqli_query($db, $query); $cat_row = mysqli_fetch_assoc($cat_res); if ($Stage > 1) { echo 'Add New Description'."\n"; echo '

'."\n"; $query='select count(distinct style_desc) from entry where type_seq="'.$TypeSeq.'" and cat="'.$Cat.'" and sub_cat="'.$SubCat.'"'; $cnt_res=mysqli_query($db, $query); $cnt_row=mysqli_fetch_row($cnt_res); $Cnt=cntStyleDesc($TypeSeq, $Cat, $SubCat) + $cnt_row[0]; if ($Cnt == 0) { echo 'None Found
'."\n"; } else { echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; foreach (array(TRUE, FALSE) as $UseList) { if ($UseList) { $query='select * from style_desc where sg="'.$Comp_SG.'" and type_seq="'.$TypeSeq.'" and cat="'.$Cat.'" and sub_cat="'.$SubCat.'" order by style_desc'; } else { $query='select distinct style_desc from entry where type_seq="'.$TypeSeq.'" and cat="'.$Cat.'" and sub_cat="'.$SubCat.'" and style_desc!="" and style_desc not in (select distinct style_desc from style_desc where sg="'.$Comp_SG.'" and type_seq="'.$TypeSeq.'" and cat="'.$Cat.'" and sub_cat="'.$SubCat.'") order by style_desc'; } $desc_res=mysqli_query($db, $query); while ($desc_row=mysqli_fetch_assoc($desc_res)) { $query='select count(*) from entry where type_seq="'.$TypeSeq.'" and cat="'.$Cat.'" and sub_cat="'.$SubCat.'" and style_desc="'.$desc_row['style_desc'].'" and removed!="Y"'; $use_res=mysqli_query($db, $query); $use_row=mysqli_fetch_row($use_res); $query='select count(*) from entry where type_seq="'.$TypeSeq.'" and cat="'.$Cat.'" and sub_cat="'.$SubCat.'" and style_desc="'.$desc_row['style_desc'].'" and removed="Y"'; $rem_res=mysqli_query($db, $query); $rem_row=mysqli_fetch_row($rem_res); echo ''."\n"; echo ''."\n"; if ($UseList) { echo ''."\n"; echo ''."\n"; } else { echo ''."\n"; echo ''."\n"; } echo ''."\n"; } } echo '
'."\n"; echo 'Description'."\n"; echo ''."\n"; echo 'Use Count'."\n"; echo ''."\n"; echo 'Action'."\n"; echo '
'."\n"; echo safe($desc_row['style_desc'])."\n"; echo ''."\n"; echo $use_row[0].' / '.$rem_row[0]."\n"; echo ''."\n"; echo 'Change'."\n"; echo ''."\n"; echo 'Remove'."\n"; echo ''."\n"; echo 'Add'."\n"; echo ''."\n"; echo 'Replace'."\n"; echo '
'."\n"; } } ?>