= 0))
$authordll = -1;
}
else if (isset($designnoterefcode))
{ /* Author by refcode */
$sCategory = "designnote";
$sCategoryName = "Design Note";
if ($designnoterefcode != "")
$iRefcode = (int)$designnoterefcode;
}
else if (isset($dlls))
{ /* All dlls */
$sCategory = "dlls";
$sCategoryName = "All Dlls";
$sDllType = 'A';
}
else if (isset($internal))
{ /* All Internal Dlls */
$sCategory = "dlls";
$sCategoryName = "Internal Dlls";
$sDllType = 'I';
}
else if (isset($support))
{ /* All dlls */
$sCategory = "dlls";
$sCategoryName = "Support Stuff";
$sDllType = 'S';
}
else if (isset($tools))
{ /* Tools */
$sCategory = "dlls";
$sCategoryName = "Tools";
$sDllType = 'T';
}
else if (isset($apigroups))
{ /* All API Groups */
$sCategory = "apigroups";
$sCategoryName = "API Groups";
}
else if (isset($authors))
{ /* All authors */
$sCategory = "authors";
$sCategoryName = "Authors";
}
else if (isset($design))
{ /* All authors */
$sCategory = "designnotes";
$sCategoryName = "Design Notes";
} /* else: root page */
/*
* Get name of the item we're to display data on.
*/
if ($iRefcode < 0)
$sName = ""; //FIXME
else
{
$sql = sprintf("SELECT name FROM %s WHERE refcode = %d",
$sCategory, $iRefcode);
$result = mysql_query($sql, $db);
if (@mysql_num_rows($result) > 0 &&
($aName = @mysql_fetch_row($result))
)
{
$sName = $aName[0];
}
else
{
$fNoData = 1;
$sName = "!Invalid Refcode!";
Odin32DBSqlError($sql);
}
@mysql_free_result($result);
}
require $sMainDir."01-PreTitle.php3";
if ($sName == "") echo $Title." - ".$sCategoryName;
else echo $Title." - ".$sCategoryName.": ".$sName;
require $sMainDir."02-PostTitle.php3";
require $sMainDir."03-MainTableBeg.php3";
require $sMainDir."04-ColumnOne.php3";
require $sMainDir."05-ColumnTwoHeader.php3";
if ($sName == "") echo $Title."
".$sCategoryName;
else echo $Title."
".$sCategoryName.": ".$sName;
require $sMainDir."06-ColumnTwoHeader2.php3";
TekstBeg();
if (!$fNoData)
{
switch ($sCategory)
{
case "dll":
{
Odin32DBDllInfo($db, $iRefcode, $fFunctions, $fFiles, $fAPIGroups, $fAuthors, $fSortByState);
break;
}
case "file":
{
Odin32DBFileInfo($db, $iRefcode, $fFunctions, $fAPIGroups, $fAuthors, $fSortByState);
break;
}
case "function":
{
Odin32DBFunctionInfo($db, $iRefcode);
break;
}
case "apigroup":
{
Odin32DBAPIGroupInfo($db, $iRefcode, $fFunctions, $fFiles, $fAuthors, $fSortByState);
break;
}
case "author":
{
Odin32DBAuthorInfo($db, $iRefcode, $fDlls, $fFunctions, $fFiles, $fAPIGroups, $fSortByState, $authordll);
break;
}
case "designnote":
{
Odin32DBDesignNote($db, $iRefcode);
break;
}
case "root":
{
/*
* The root page.
*/
Odin32DBNavigationTop("","");
Odin32DBNaslov("Welcome to the Odin32 API Database", "welcome", "");
echo "This is the first Beta edition of the Odin32 API Database.
\n".
"There might be dead or non-functioning links. Currently feedback is NOT needed.\n".
"
\n".
"Please note that the quality of the data avilable is quite poor\n".
"for the time being. This will improve within some months.
\n".
"-Enjoy!
\n";
Odin32DBNaslov("Root Menu", "menu", "");
echo "".
"\n".
"
\n";
"\n";
Odin32DBNavigationBottom("","");
break;
}
case "dlls":
{
/*
* List all dlls.
*/
Odin32DBNavigationTop("","");
Odin32DBNaslov("Welcome to the Odin32 API Database", "welcome", "");
echo "This is the first Beta edition of the Odin32 API Database.\n".
"
\n".
"
\n".
"There might be dead or non-functioning links. Currently feedback is NOT needed.\n".
"
\n".
"Please note that the quality of the data avilable is quite poor\n".
"for the time being. This will improve within some months.
\n".
"-Enjoy!
\n";
Odin32DBNaslov($sCategoryName, $sCategory, "");
$sql = "SELECT\n".
" d.name AS name,\n".
" d.refcode AS refcode,\n".
" COUNT(f.refcode) AS functions\n".
"FROM\n".
" dll d\n".
" LEFT OUTER JOIN function f\n".
" ON f.dll = d.refcode\n".
"WHERE\n".
" d.type = '".$sDllType."'\n".
"GROUP BY d.refcode\n".
"ORDER BY d.name\n";
if ($result = mysql_query($sql, $db))
{
if (mysql_num_rows($result) <= 0)
echo "No data in this module category!
$sql\n";
else
{
echo "\n";
while ($aDll = mysql_fetch_array($result))
{
echo "
\n";
}
}
else
Odin32DBSqlError($sql);
Odin32DBNavigationBottom("","");
break;
}
case "authors":
{
/*
* List all authors.
*/
Odin32DBNavigationTop("","");
Odin32DBNaslov("Welcome to the Odin32 API Database", "welcome", "");
echo "This is the first Beta edition of the Odin32 API Database.
\n".
"There might be dead or non-functioning links. Currently feedback is NOT needed.\n".
"
\n".
"Please note that the quality of the data avilable is quite poor\n".
"for the time being. This will improve within some months.
\n".
"-Enjoy!
\n";
Odin32DBNaslov("All Authors", "authors", "");
$sql = "SELECT\n".
" name,\n".
" refcode, \n".
" COUNT(fa.function) AS functions\n".
"FROM\n".
" author a\n".
" LEFT OUTER JOIN fnauthor fa ON a.refcode = fa.author\n".
"GROUP BY name\n".
"ORDER BY name\n";
if ($result = mysql_query($sql, $db))
{
if (mysql_num_rows($result) <= 0)
echo "No dlls!\n";
else
{
echo "\n";
while ($aAuthor = mysql_fetch_array($result))
{
echo "
\n";
}
}
else
Odin32DBSqlError($sql);
Odin32DBNavigationBottom("","");
break;
}
case "apigroups":
{
/*
* List all API Groups.
*/
Odin32DBNavigationTop("","");
Odin32DBNaslov("Welcome to the Odin32 API Database", "welcome", "");
echo "This is the first Beta edition of the Odin32 API Database.
\n".
"There might be dead or non-functioning links. Currently feedback is NOT needed.\n".
"
\n".
"Please note that the quality of the data avilable is quite poor\n".
"for the time being. This will improve within some months.
\n".
"-Enjoy!
\n";
Odin32DBNaslov("All API Groups", "apigroups", "");
$sql = "SELECT\n".
" a.name AS name,\n".
" a.refcode AS refcode,\n".
" COUNT(f.refcode) AS functions\n".
"FROM\n".
" apigroup a\n".
" JOIN function f\n".
"WHERE\n".
" f.apigroup = a.refcode\n".
"GROUP BY a.name\n".
"ORDER BY a.name\n";
if ($result = mysql_query($sql, $db))
{
if (mysql_num_rows($result) <= 0)
echo "No dlls!\n";
else
{
echo "\n";
while ($aAPIGroup = mysql_fetch_array($result))
{
echo "
\n";
}
}
else
Odin32DBSqlError($sql);
Odin32DBNavigationBottom("","");
break;
}
case "designnotes":
{
/*
* List all design notes.
*/
Odin32DBNavigationTop("","");
Odin32DBNaslov("Welcome to the Odin32 API Database", "welcome", "");
echo "This is the first Beta edition of the Odin32 API Database.
\n".
"There might be dead or non-functioning links. Currently feedback is NOT needed.\n".
"
\n".
"Please note that the quality of the data avilable is quite poor\n".
"for the time being. This will improve within some months.
\n".
"-Enjoy!
\n";
Odin32DBNaslov($sCategoryName, $sCategory, "");
$sql = "SELECT\n".
" dn.refcode AS refcode,\n".
" dn.name AS name,\n".
" dn.seqnbr AS seqnbr,\n".
" dn.level AS level,\n".
" d.name AS dllname,\n".
" f.name AS filename\n".
"FROM\n".
" designnote dn,\n".
" dll d,\n".
" file f\n".
"WHERE dn.dll = d.refcode\n".
" AND dn.file = f.refcode\n".
" AND dn.level <= 1\n".
"ORDER BY d.name, dn.seqnbr, dn.seqnbrnote\n";
if ($result = mysql_query($sql, $db))
{
if (mysql_num_rows($result) <= 0)
echo "No Design Notes!\n";
else
{
echo "\n";
$iLevel = 0;
while ($aDesignNote = mysql_fetch_array($result))
{
if ($aDesignNote["level"] > $iLevel)
print "
\n";
}
}
else
Odin32DBSqlError($sql);
Odin32DBNavigationBottom("","");
break;
}
default:
echo "!IPE!"; //FIXME
}
}
else
{
}
TekstEnd();
require $sMainDir."07-ColumnTwoFooter.php3";
require $sMainDir."08-News.php3";
require $sMainDir."09-ContentsTitle.php3";
Odin32DBWriteContents();
require $sMainDir."10-EndOfContent.php3";
require $sMainDir."11-NetlabsContact.php3";
$Kada=date ("j M Y", filemtime(__file__));
require $sMainDir."12-OdinBanner.php3";
require $sMainDir."13-Closing.php3";
/* Profiling */
Odin32DBTimerStop($sPageTimer);
/* Profiling */
?>
\n";
else if ($aDesignNote["level"] < $iLevel)
print "
\n";
$iLevel = $aDesignNote["level"];
if ($iLevel > 0)
print "