libraryDirectory; include($bootstrap->libraryDirectory.'util.php'); include($bootstrap->libraryDirectory.'settings.php'); require($bootstrap->libraryDirectory.'proclib.php'); include($bootstrap->libraryDirectory.'datacon.php'); $gUser = (isset($_SESSION['gUser'])) ? $_SESSION['gUser'] : ''; $userID = getUserID($gUser); if (checkUserAccessRights($gUser, 'ADMIN',1,1) == 0 ){ return; } ?> Edit an Item
NCCS KB
Create("nccs_links"); $sql2 = new MySQL_class; $sql2->Create("nccs_links"); list($parent, $name)=$sql->QueryRow("select Parent, Name from CATEGORIES where ID=$category"); echo("

Choose a Link from $name to Edit

"); # print out the navigation links PrintAdminCategoryTitle($category); ?>

Create("nccs"); list($userRole) = $sql->QueryRow("select role from userroles where userID = '$PHP_AUTH_USER'"); # re-connect to the nccs_links db so we can pull out the items $sql->Create("nccs_links"); if ($userRole == 'Administrator' || $userRole == 'NCCS') { # This is an INTERNAL KB user. We can tell because they have # permission to delete stuff. Retreive all the items in the KB. $sql->Query("select A.Link, B.Name, A.Approved, B.Publish, B.FAQ from LINK_CATEGORY_XREF as A, LINKS as B where A.Link = B.ID and A.Category = $category order by A.SortOrder"); } else { # This is an EXTERNAL KB user, show only the items that this user entered $sql->Query("select A.Link, B.Name, A.Approved, B.Publish, B.FAQ from LINK_CATEGORY_XREF as A, LINKS as B where A.Link = B.ID and A.Category = $category and B.AddedBy = '$PHP_AUTH_USER' order by A.SortOrder"); } # now loop over all of the items from the DB and display some info if ($sql->rows) { $col_divide = floor($sql->rows / $columns) + 1; for ($i = 0; $i < $sql->rows; $i++) { echo("\n"); # Create a link to edit_link.php for each editable item $sql->fetch($i); List($link, $name, $approved, $publish, $FAQ) = $sql->data; echo("\n"); if ($approved == 'Y') { echo("\n"); } else { echo("\n"); } if ($publish == 'Y') { echo("\n"); } else { echo("\n"); } if ($FAQ == 'Y') { echo("\n"); } else { echo("\n"); } echo("\n"); } echo("\n"); } else { echo("\n"); } ?>
Choose an Item to Edit
Name Approved Publish FAQ
".StripSlashes($name)."YesNoYesNoYesNo
There are no items in this category to edit