'No', 'O' => 'Optional', 'Y' => 'Yes'); $Key=(!array_key_exists('k', $_GET) || empty($_GET['k']) ? 'none-found' : only_digits($_GET['k'], 20)); list($GoodAcct, $AcctName)=chk_acct($Key,'A'); $Action=(!array_key_exists('a', $_GET) || empty($_GET['a'])) ? 'u' : chk_str($_GET['a'], 1); $Action=in_array($Action, array('c', 'u')) ? $Action : 'u'; $Edit=($Action == 'u'); $Stage=(!array_key_exists('s', $_GET) || empty($_GET['s'])) ? '0' : only_digits($_GET['s'], 1); $Stage=in_array($Stage, array('0', '1')) ? $Stage : '0'; $Cat=(!array_key_exists('c', $_GET) || empty($_GET['c'])) ? 'none-found' : only_digits($_GET['c'], 2); $TypeSeq=(!array_key_exists('t', $_GET) || empty($_GET['t'])) ? 'none-found' : only_digits($_GET['t'], 3); if ($Edit) { $GoodCat=chkCat($TypeSeq, $Cat); } else { $GoodCat=!(chkCat($TypeSeq, $Cat)); } if (!$GoodAcct) { $Page='0;url=failed.php'; } else { $Page=($GoodCat ? '90' : '').'0;url=cat_list.php?k='.$Key.($GoodCat && $Edit ? '#'.disp_cat($TypeSeq, $Cat) : ''); } $Type=get_type($TypeSeq); // If Edit - // 0 - Use Record // 1 - Use POST ?> $row) { $cat[$tag]=$cat_row[$row]; } } else { foreach ($Map as $tag => $row) { $cat[$tag]=""; } } $o_cat=$cat; } else { $cat=GetTags($Len); $o_cat=GetTags($Len, "_ORIG"); $e_cat=ErrTags($E_Map); $e_str=ErrStr($e_cat); } ?>


'."\n"; echo ''."\n"; echo ''."\n"; } ?> '."\n"; echo ''."\n"; echo ''."\n"; } ?> '."\n"; echo ''."\n"; echo ''."\n"; } ?>
Required fields are indicated in this way
'."\n"; if ($e_cat['INSERT']) { echo 'Problem Creating Category Information - Please Try Again
'."\n"; } if ($e_cat['UPDATE']) { echo 'Problem Updating Category Information - Please Try Again
'."\n"; } echo '
Category Description
'."\n"; if ($e_cat['CAT_DESC_C']) { echo 'Category Description changed before Update, please Reload and try again
'."\n"; } if ($e_cat['CAT_DESC_1']) { echo 'Category Description is a Duplicate
'."\n"; } if ($e_cat['CAT_DESC_R']) { echo 'Category Description is a Required entry
'."\n"; } echo '
Base Category
'."\n"; if ($e_cat['BASE_C']) { echo 'Base Category Type changed before Update, please Reload and try again
'."\n"; } if ($e_cat['BASE_1']) { echo 'Base Category Type must be Yes or No
'."\n"; } if ($e_cat['BASE_R']) { echo 'Base Category is a Required entry
'."\n"; } echo '

'."\n"; echo ''."\n"; echo ''."\n"; } ?>
0); echo '
'."\n"; echo ''."\n"; echo ''."\n"; if ($SubCats) { echo ''."\n"; echo ''."\n"; } echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; if ($Comp_SG == '2015') { echo ''."\n"; echo ''."\n"; } echo ''."\n"; echo ''."\n"; $query='select * from style_sub where sg="'.$Comp_SG.'" and type_seq="'.$TypeSeq.'" and cat="'.$Cat.'" order by sub_cat'; $subcat_res=mysqli_query($db, $query); while ($subcat_row=mysqli_fetch_assoc($subcat_res)) { echo ''."\n"; if ($SubCats) { echo ''."\n"; echo ''."\n"; } echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; if ($Comp_SG == '2015') { echo ''."\n"; echo ''."\n"; } echo ''."\n"; echo ''."\n"; } echo '
'."\n"; echo 'Sub
Category'."\n"; echo '
'."\n"; echo 'Description'."\n"; echo ''."\n"; echo 'Note
Number'."\n"; echo '
'."\n"; echo 'Require
Comment'."\n"; echo '
'."\n"; echo 'Require
Base'."\n"; echo '
'."\n"; echo 'Require
Strength'."\n"; echo '
'."\n"; echo 'Require
Sweetness'."\n"; echo '
'."\n"; echo 'Require
Carbonation'."\n"; echo '
'."\n"; echo 'Require
Color'."\n"; echo '
'."\n"; echo 'Require
Description'."\n"; echo '
'."\n"; echo 'Action'."\n"; echo '
'."\n"; echo ''.$subcat_row['sub_cat'].''."\n"; echo ''."\n"; echo $subcat_row['cat_desc']."\n"; echo ''."\n"; echo (!empty($subcat_row['note_num']) ? $subcat_row['note_num'] : '—')."\n"; echo ''."\n"; echo (array_key_exists($subcat_row['req_comment'], $ReqValues) ? $ReqValues[$subcat_row['req_comment']] : 'Unknown'); echo ''."\n"; if ($Type == 'B' && $cat['BASE'] != 'Y') { echo (array_key_exists($subcat_row['req_base'], $ReqValues) ? $ReqValues[$subcat_row['req_base']] : 'Unknown')."\n"; } else { echo '—'."\n"; } echo ''."\n"; if ($Type == 'M') { echo (array_key_exists($subcat_row['req_strength'], $ReqValues) ? $ReqValues[$subcat_row['req_strength']] : 'Unknown')."\n"; } else { echo '—'."\n"; } echo ''."\n"; if ($Type != 'B') { echo ExpandSweetness($subcat_row['req_sweetness'], $subcat_row['type_seq'], FALSE)."\n"; } else { echo '—'."\n"; } echo ''."\n"; if ($Type != 'B') { echo ExpandCarbonation($subcat_row['req_carbonation'], $subcat_row['type_seq'], FALSE)."\n"; } else { echo '—'."\n"; } echo ''."\n"; if ($Type == 'B') { echo (array_key_exists($subcat_row['req_color'], $ReqValues) ? $ReqValues[$subcat_row['req_color']] : 'Unknown')."\n"; } else { echo '—'."\n"; } echo ''."\n"; echo (array_key_exists($subcat_row['req_desc'], $ReqValues) ? $ReqValues[$subcat_row['req_desc']] : 'Unknown'); echo ''."\n"; echo 'Change'."\n"; echo '
'."\n"; echo '
'."\n"; } ?>