$pageID = $_GET['id'];
$pageID = $modx->documentObject['id'];
PHP error debug ? Error: mysql_data_seek() [function.mysql-data-seek]: Offset 0 is invalid for MySQL result index 23 (or the query data is unbuffered) ? Error type/ Nr.: Warning - 2 ? File: /home/httpd/assets/snippets/docman/includes/categoryform.php ? Line: 13 ? Line 13 source: mysql_data_seek($results, 0);
MODx encountered the following error while attempting to parse the requested resource: ? Execution of a query to the database failed ? ? ? ? SQL: DELETE FROM `dbprescott`.files_perms USING `dbprescott`.files_perms fp LEFT JOIN `dbprescott`.etomite_web_groups wg ON wg.webuser = fp.uid WHERE wg.webuser is NULL
<?php
// check to see if user has management rights
$fm .= "<table id='dmMenuBar' cellspacing='0' cellpadding='0' border='0'><tr>";
// docmanager menu
if(isset($_SESSION['webgroups'])) {
if(in_array($wgmanageID,$_SESSION['webgroups'])) {
$fm .= "<td><a href='index.php?id=$docid&categoryform=true' title='".$_docman['manage_categories']."'>".$_docman['manage_categories']."</a> | </td>";
$fm .= "<td><a href='index.php?id=$docid&addform=true' title='".$_docman['uploadnew']."'>".$_docman['addnew']."</a> | </td>";
$fm .= "<td><a href='index.php?id=$docid&tidy=true' title='".$_docman['removeperms']."' onclick='return confirm(\"".$_docman['confirm_tidy']."\");'>".$_docman['tidy']."</a> | </td>";
}
}
// general menu
$fm .= "<td><a href='index.php?id=$docid' title='".$_docman['listfiles']."'>".$_docman['list']."</a> </td>";
$fm .= "<td><form name='selcat' action='index.php?id=$docid' method='post'>";
$fm .= "<select name='dmCatmenu' class='dm100' onChange='this.form.submit();'>";
$fm .= "<option>".$_docman['by_cat']."</option>";
$sql = "SELECT * FROM $dbase.files_categories ORDER BY catname";
$res = $modx->dbQuery($sql);
while($row = $modx->fetchRow($res)) {
$fm .= "<option value='".$row['id']."'>".$row['catname']."</option>";
}
$fm .= "</select></form></td></tr></table>";
?>
$description = isset($_POST['description']) ? $_POST['description'] : "No description available.";
CREATE TABLE `files_categories` ( `id` int(11) NOT NULL auto_increment, `catname` varchar(255) NOT NULL default '', PRIMARY KEY (`id`) ) TYPE=MyISAM COMMENT='Categories for uploaded files'; INSERT INTO `files_categories` (`catid`,`catname`) VALUES (0,'Any'); UPDATE `files_categories` SET `id` = '0' WHERE `id` = '1';