Admin File Types"; $search=safetext2(isset($_POST['search']) ? $_POST['search'] : ''); $hide=safetext2(isset($_POST['hide']) ? $_POST['hide'] : ''); $parenttype=safetext2(isset($_POST['parenttype']) ? $_POST['parenttype'] : ''); if ($hide<>'') { $hide="CHECKED"; } $endsearch=multisearchandworks ("$search","description"); $opts = ""; $sql="SELECT * FROM ISO_quality_manual_files_types where newtype='1' and parenttype='0'"; $stmt=pdoquery($sql); $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); foreach ($rows as $row) { if ($parenttype==$row['id']) { $opts .= ""; $headesc=$row['description']; } else { $opts .= ""; } } ?> Add Type
Parent Type:

Search Documents to Apply Types
Search:
Types:
Only Show Blanks? >

'') { $sql="SELECT * FROM ISO_quality_manual_files_types_links where archive='0'"; $stmt=pdoquery($sql); $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); $num=count($rows); foreach ($rows as $row) { $docid=$row['docid']; $typeid=$row['typeid']; $link=md5($docid."AZA".$typeid); $checkme[$link]="CHECKED"; } $sql="SELECT * FROM ISO_quality_manual_files_types where newtype='1' and archive='0' and description<>'' and parenttype='$parenttype' group by type order by description"; $stmt=pdoquery($sql); $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); $num=count($rows); foreach ($rows as $row) { $typeid=$row['id']; $typelist[$typeid]=str_replace("Procedure"," ",$row['description']); } $sql="SELECT * FROM ISO_quality_manual_files where $endsearch and archived='' order by description"; $stmt=pdoquery($sql); $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); $num=count($rows); foreach ($rows as $row) { $docid=$row['docid']; $doclist[$docid]=$row['description']; } print "$num Records Found"; print "

Link Documents to Type $headesc


"; print ""; $count=0; $header = ""; foreach ($typelist as $typeid => $description) { $header .= ""; } $header .= ""; print $header; $count=0; foreach ($doclist as $docid => $description) { $showme=0; $line = ""; foreach ($typelist as $typeid => $description) { $link=md5($docid."AZA".$typeid); $line .= ""; if ($checkme[$link]<>'') { $showme=1; } } if (($showme==1 and $hide=='') or ($showme==0 )) { print "$line"; $count++; } else { } if ($count > 12) { $count=0; print $header; } } } else { // NO Search can display Tree :D } print "
$description
$docid$description
"; $sql="SELECT * FROM ISO_quality_manual_files_types order by archive,description"; $stmt=pdoquery($sql); $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); foreach ($rows as $row) { print ""; print ""; print ""; print ""; print ""; } ?>
Type DescriptionArchivedOffer Revision CodeForce Supplier Review
$row[description]"; if ($row['archive']==1) { $archivecheck="CHECKED"; } else { $archivecheck=""; } print "
"; print "
"; if ($row['offerrevision']==1) { $revisioncheck="CHECKED"; } else { $revisioncheck=""; } print "
"; print "
"; if ($row['supplierreviewrequired']==1) { $supplierreviewrequiredcheck="CHECKED"; } else { $supplierreviewrequiredcheck=""; } print "
"; print "