Ignore:
Timestamp:
Sep 7, 2001, 12:26:42 PM (24 years ago)
Author:
bird
Message:

dll to module conversion.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/database/www/Odin32DBHelpers.php3

    r6664 r6677  
    113113
    114114/**
    115  * Compute completion percentage for a dll.
     115 * Compute completion percentage for a module.
    116116 * @returns     Completion percentage. Range 0-100.
    117117 *              On error -1 or -2 is returned.
    118  * @param       $iDll  Dll reference code.
    119  * @param       $db     Database connection variable.
    120  * @sketch      Get total number of function in the dll.
    121  *              Get number of completed functions in the dll.
     118 * @param       $iModule    Module reference code.
     119 * @param       $db         Database connection variable.
     120 * @sketch      Get total number of function in the module.
     121 *              Get number of completed functions in the module.
    122122 *              return complete*100 / total
    123123 * @status      Completely implemented
     
    125125 * @remark
    126126 */
    127 function Odin32DBComputeCompletion($iDll, $db)
    128 {
    129     /*
    130      * Count the total number of functions in the DLL.
     127function Odin32DBComputeCompletion($iModule, $db)
     128{
     129    /*
     130     * Count the total number of functions in the module.
    131131     */
    132132    $sql = sprintf("SELECT  SUM(s.weight)/COUNT(f.state)
     
    136136                        WHERE
    137137                            f.state = s.refcode
    138                             AND dll = %d",
    139                         $iDll);
     138                            AND module = %d",
     139                        $iModule);
    140140    if (($result = mysql_query($sql, $db)) && mysql_num_rows($result) < 1)
    141141    {
     
    165165
    166166/**
    167  * Draws a completion bar for a dll (or all dlls).
    168  * @param       $iDll       Dll reference code.
     167 * Draws a completion bar for a module (or all modules.).
     168 * @param       $iModule    Module reference code.
    169169 *                          If < 0 then for the entire project.
    170  * @param       $iDllName   Dll name.
     170 * @param       $iModName   Module name.
    171171 * @param       $db         Database connection variable.
    172172 * @sketch      Call Odin32DBCompletionBar2 with an appropriate condition.
     
    174174 * @author      knut st. osmundsen (knut.stange.osmundsen@mynd.no)
    175175 */
    176 function Odin32DBCompletionBarDll($iDll, $sDllName, $db)
    177 {
    178     if ($iDll < 0)
    179         return Odin32DBcompletionBar2("", $sDllName, $db);
    180     return Odin32DBcompletionBar2("dll = ".$iDll, $sDllName, $db);
     176function Odin32DBCompletionBarModule($iModule, $sModName, $db)
     177{
     178    if ($iModule < 0)
     179        return Odin32DBcompletionBar2("", $sModName, $db);
     180    return Odin32DBcompletionBar2("module = ".$iModule." AND f.type IN ('A', 'I')", $sModName, $db);
    181181}
    182182
     
    221221{
    222222    /*
    223      * Count the total number of functions in the DLL.
     223     * Count the total number of functions for the author.
    224224     */
    225225    $sql = "SELECT COUNT(*) FROM fnauthor fa JOIN function f\n".
    226            "WHERE fa.function = f.refcode AND fa.author = ".$iAuthor;
     226           "WHERE fa.function = f.refcode AND fa.author = ".$iAuthor." AND f.type IN ('A', 'I')";
    227227    if (($result = mysql_query($sql, $db)) && mysql_num_rows($result) < 1)
    228228    {
     
    260260           "    fa.author = ".$iAuthor." AND\n".
    261261           "    fa.function = f.refcode AND\n".
    262            "    f.state = s.refcode\n".
     262           "    f.state = s.refcode AND\n".
     263           "    f.type IN ('A', 'I')\n".
    263264           "GROUP BY s.refcode\n".
    264265           "ORDER BY state\n";
     
    295296/**
    296297 * Draws a completion bar.
    297  * @param       $iDll   Dll reference code.
    298  *                      If < 0 then for the entire project.
    299  * @param       $db     Database connection variable.
    300  * @sketch      Get total number of function in the dll.
     298 * @param       $sCondition Where conditions.
     299 * @param       $sName      Name...
     300 * @param       $db         Database connection variable.
     301 * @sketch      Get total number of function in the selection.
    301302 *              Get the number of function per status. (+state color)
    302303 *              Draw bar.
     
    307308{
    308309    /*
    309      * Count the total number of functions in the DLL.
     310     * Count the total number of functions in selection.
    310311     */
    311312    $sql = "SELECT COUNT(*) FROM function f";
     
    391392{
    392393    /*
    393      * Count the total number of functions in the DLL.
    394      */
    395     $sql = "SELECT
    396                     name,
    397                     color
    398                 FROM
    399                     state
    400                 ORDER BY refcode";
     394     * Select the states.
     395     */
     396    $sql = "SELECT name,
     397                   color
     398            FROM   state
     399            ORDER BY refcode";
    401400    if (($result = mysql_query($sql, $db)) && mysql_num_rows($result) < 1)
    402401    {
     
    668667/**
    669668 * Writes the a function listing base sqlstatement with these columns (ordered):
    670  *      0. dll refcode
    671  *      1. dll name
     669 *      0. Module refcode
     670 *      1. Module name
    672671 *      2. number of functions
    673672 *
     
    677676 * @author      knut st. osmundsen (knut.stange.osmundsen@mynd.no)
    678677 */
    679 function Odin32DBWriteDlls($sql, $db)
     678function Odin32DBWriteModules($sql, $db)
    680679{
    681680    if ($result2 = mysql_query($sql, $db))
     
    685684            echo "\n<table width=100% border=0 cellpadding=0>\n".
    686685                 "<tr>\n".
    687                  "  <td width=75%><font size=-1><b>Dlls</b></font></td>\n".
     686                 "  <td width=75%><font size=-1><b>Modules</b></font></td>\n".
    688687                 "  <td align=right><font size=-1><b>Functions</b></font></td>\n".
    689688                 "</tr>\n";
    690689            while ($aFunction = mysql_fetch_array($result2))
    691690                printf("<tr>".
    692                        "<td><font size=-1><a href=\"Odin32DB.phtml?dllrefcode=%s\">%s</a></font></td>".
     691                       "<td><font size=-1><a href=\"Odin32DB.phtml?modrefcode=%s\">%s</a></font></td>".
    693692                       "<td align=right><font size=-1>%s</font></td>".
    694693                       "</tr>\n",
     
    762761/**
    763762 * Writes the a function listing base sqlstatement with these columns (ordered):
    764  *      0. dll refcode
    765  *      1. dll name
     763 *      0. module refcode
     764 *      1. module name
    766765 *      2. function refcode
    767766 *      3. function name
     
    775774 * @author      knut st. osmundsen (knut.stange.osmundsen@mynd.no)
    776775 */
    777 function Odin32DBWriteFunctionsWithDlls($sql, $db, $sURLArgs)
     776function Odin32DBWriteFunctionsWithModules($sql, $db, $sURLArgs)
    778777{
    779778    if ($result2 = mysql_query($sql, $db))
     
    783782            echo "\n<table width=100% border=0 cellpadding=0>\n".
    784783                 "<tr>\n".
    785                  "  <td width=30%><font size=-1><b>Dll Name</b></font></td>\n".
     784                 "  <td width=30%><font size=-1><b>Module Name</b></font></td>\n".
    786785                 "  <td width=45%><font size=-1><b>Function Name</b></font></td>\n".
    787786                 "  <td><font size=-1><b>State</b></font></td>\n".
     
    789788            while ($aFunction = mysql_fetch_row($result2))
    790789                printf("<tr>".
    791                        "<td><font size=-1><a href=\"Odin32DB.phtml?dllrefcode=%s\">%s</a></font></td>".
     790                       "<td><font size=-1><a href=\"Odin32DB.phtml?modrefcode=%s\">%s</a></font></td>".
    792791                       "<td><font size=-1><a href=\"Odin32DB.phtml?functionrefcode=%s\">%s</a></font></td>".
    793792                       "<td><font size=-1 color=%s>%s</font></td>".
     
    809808
    810809            echo "<p>Click <a href=\"Odin32DB.phtml#functions?".$sURLArgs."\">here</a> to view functions sorted ".
    811                  ($fSortByState  ? "alphabetical by dll" : "by state"). ".<br>";
     810                 ($fSortByState  ? "alphabetical by module" : "by state"). ".<br>";
    812811        }
    813812        else
     
    953952
    954953    echo "<a href=\"Odin32DB.phtml\">Root</a>\n".
    955          " - <a href=\"Odin32DB.phtml?dlls=1\">Dlls</a>\n".
     954         " - <a href=\"Odin32DB.phtml?modules=1\">Moduless</a>\n".
    956955         " - <a href=\"Odin32DB.phtml?authors=1\">Authors</a>\n".
    957956         " - <a href=\"Odin32DB.phtml?apigroups=1\">API Groups</a>\n";
     
    986985    echo
    987986         "<a href=\"Odin32DB.phtml\">Root</a>\n".
    988          " - <a href=\"Odin32DB.phtml?dlls=1\">Dlls</a>\n".
     987         " - <a href=\"Odin32DB.phtml?moduless=1\">Modules</a>\n".
    989988         " - <a href=\"Odin32DB.phtml?authors=1\">Authors</a>\n".
    990989         " - <a href=\"Odin32DB.phtml?apigroups=1\">API Groups</a>\n";
     
    10291028                   "    a.name          AS aliasname,\n".
    10301029                   "    a.refcode       AS aliasrefcode,\n".
    1031                    "    ad.name         AS aliasdllname,\n".
    1032                    "    ad.refcode      AS aliasdllrefcode,\n".
    1033                    "    d.name          AS dllname,\n".
    1034                    "    d.refcode       AS dllrefcode,\n".
     1030                   "    ad.name         AS aliasnmodname,\n".
     1031                   "    ad.refcode      AS aliasmodrefcode,\n".
     1032                   "    d.name          AS modname,\n".
     1033                   "    d.refcode       AS modrefcode,\n".
    10351034                   "    i.name          AS filename,\n".
    10361035                   "    i.refcode       AS filerefcode,\n".
     
    10401039                   "    function f\n".
    10411040                   "    LEFT OUTER JOIN function a ON f.aliasfn  = a.refcode\n".
    1042                    "    LEFT OUTER JOIN dll ad     ON a.dll      = ad.refcode\n".
     1041                   "    LEFT OUTER JOIN module ad  ON a.module   = ad.refcode\n".
    10431042                   "    LEFT OUTER JOIN apigroup g ON f.apigroup = g.refcode\n".
    1044                    "    LEFT       JOIN dll d      ON f.dll      = d.refcode\n".
     1043                   "    LEFT       JOIN module d   ON f.module   = d.refcode\n".
    10451044                   "    LEFT       JOIN state s    ON f.state    = s.refcode\n".
    10461045                   "    LEFT OUTER JOIN file i     ON f.file     = i.refcode\n".
     
    10641063        Odin32DBInfoRow1("Type", $array, "type", "", "","invalid","");
    10651064        Odin32DBInfoRow1("State", $array, "state", "", "","invalid","");
    1066         Odin32DBInfoRow1("Dll", $array, "dllname", "dllrefcode", "dllrefcode","","");
     1065        Odin32DBInfoRow1("Module", $array, "modname", "modrefcode", "modrefcode","","");
    10671066        Odin32DBInfoRow1("Ordinal", $array, "ordinal","","","not available","");
    10681067        if (isset($array["apigroupname"]))
    10691068            Odin32DBInfoRow1("API Group", $array, "apigroupname", "apigrouprefcode", "apigrouprefcode","","");
    10701069        Odin32DBInfoRow1("File", $array, "filename", "filerefcode", "filerefcode", "not available",
    1071                          " (<a href=\"cvs.phtml#".$array["line"]."?sFile=./src/".$array["dllname"]."/".$array["filename"].",v&sRevision=\">cvs</a>)");
     1070                         " (<a href=\"cvs.phtml#".$array["line"]."?sFile=./src/".$array["modname"]."/".$array["filename"].",v&sRevision=\">cvs</a>)");
    10721071        if ($array["line"] > 0)
    10731072            Odin32DBInfoRow1("Line", $array, "line", "", "","","");
     
    10751074            Odin32DBInfoRow1("Line", $array, "unavailable", "", "","not available","");
    10761075        if (isset($array["aliasrefcode"]))
    1077             Odin32DBInfoRow2("Forwards", $array, "aliasdllname", "aliasdllrefcode", "dllrefcode","",".",
     1076            Odin32DBInfoRow2("Forwards", $array, "aliasmodname", "aliasmodrefcode", "modrefcode","",".",
    10781077                                                 "aliasname", "aliasrefcode", "functionrefcode");
    10791078        else
    10801079        {
    10811080            $sql = sprintf("SELECT\n".
    1082                            "    d.name      AS dllname,\n".
    1083                            "    d.refcode   AS dllrefcode,\n".
     1081                           "    m.name      AS modname,\n".
     1082                           "    m.refcode   AS modrefcode,\n".
    10841083                           "    f.name      AS fnname,\n".
    10851084                           "    f.refcode   AS fnrefcode\n".
    10861085                           "FROM\n".
    10871086                           "    function f,\n".
    1088                            "    dll d\n".
     1087                           "    module m\n".
    10891088                           "WHERE\n".
    10901089                           "    f.aliasfn = %d AND\n".
    1091                            "    f.dll = d.refcode\n".
    1092                            "ORDER BY d.name, f.name\n",
     1090                           "    f.module = m.refcode\n".
     1091                           "ORDER BY m.name, f.name\n",
    10931092                           $iRefcode);
    10941093            if (($result2 = mysql_query($sql, $db)))
     
    11021101                        if ($f) $sValue = $sValue."<br>";
    11031102                        else    $f = 1;
    1104                         $sValue = $sValue."<a href=\"Odin32DB.phtml?dllrefcode=".
    1105                                           $aAlias["dllrefcode"]."\">".$aAlias["dllname"]."</a>.".
     1103                        $sValue = $sValue."<a href=\"Odin32DB.phtml?modrefcode=".
     1104                                          $aAlias["modrefcode"]."\">".$aAlias["modname"]."</a>.".
    11061105                                          "<a href=\"Odin32DB.phtml?functionrefcode=".
    11071106                                          $aAlias["fnrefcode"]."\">".$aAlias["fnname"]."</a>";
     
    12451244
    12461245/**
    1247  * Writes standard dll info.
     1246 * Writes standard module info.
    12481247 *
    12491248 * @returns     void
    12501249 * @param       $db             Database handle.
    1251  * @param       $iRefcode       Dll reference code.
     1250 * @param       $iRefcode       Module reference code.
    12521251 * @param       $fFunctions     Flags which tells wether to list all functions or not.
    12531252 * @param       $fFiles         Flags which tells wether to list all files or not.
     
    12601259 * @remark
    12611260 */
    1262 function Odin32DBDllInfo($db, $iRefcode, $fFunctions, $fFiles, $fAPIGroups, $fAuthors, $fSortByState)
    1263 {
    1264     $sURLArgs = "dllrefcode=".$iRefcode.
     1261function Odin32DBModuleInfo($db, $iRefcode, $fFunctions, $fFiles, $fAPIGroups, $fAuthors, $fSortByState)
     1262{
     1263    $sURLArgs = "modrefcode=".$iRefcode.
    12651264                ($fFunctions   ? "&fFunctions=1"   : "").
    12661265                ($fFiles       ? "&fFiles=1"       : "").
     
    12721271     * Navigation - TOP
    12731272     */
    1274     $sExpand    = "dllrefcode=".$iRefcode."&fFiles=1&fFunctions=1&fAPIGroups=1&fAuthors=1";
     1273    $sExpand    = "modrefcode=".$iRefcode."&fFiles=1&fFunctions=1&fAPIGroups=1&fAuthors=1";
    12751274    if ($fSortByState)  $sExpand = $sExpand."&fSortByState=".$fSortByState;
    1276     $sCollapse  = "dllrefcode=".$iRefcode;
     1275    $sCollapse  = "modrefcode=".$iRefcode;
    12771276    Odin32DBNavigationTop($sExpand, $sCollapse);
    12781277
     
    12811280     */
    12821281    $sql = sprintf("SELECT\n".
    1283                    "    d.name          AS name,\n".
    1284                    "    d.description   AS description,\n".
     1282                   "    m.name          AS name,\n".
     1283                   "    m.description   AS description,\n".
    12851284                   "    c.description   AS type\n".
    12861285                   "FROM\n".
    1287                    "    dll d,\n".
     1286                   "    module d,\n".
    12881287                   "    code c\n".
    12891288                   "WHERE\n".
    12901289                   "    c.codegroup = 'DTYP' AND\n".
    1291                    "    d.type = c.code AND\n".
    1292                    "    d.refcode = %d",
     1290                   "    m.type = c.code AND\n".
     1291                   "    m.refcode = %d",
    12931292                    $iRefcode);
    12941293    if (($result = mysql_query($sql, $db)) && mysql_num_rows($result) > 0 && ($array = mysql_fetch_array($result)))
     
    13071306                       "    function\n".
    13081307                       "WHERE\n".
    1309                        "    dll = %d",
     1308                       "    module = %d",
    13101309                       $iRefcode);
    13111310        $cFunctions = 0;
     
    13211320                       "    file\n".
    13221321                       "WHERE\n".
    1323                        "    dll = %d",
     1322                       "    module = %d",
    13241323                       $iRefcode);
    13251324        $cFiles = 0;
     
    13351334                       "    apigroup\n".
    13361335                       "WHERE\n".
    1337                        "    dll = %d",
     1336                       "    module = %d",
    13381337                       $iRefcode);
    13391338        $cAPIGroups = 0;
     
    13511350         */
    13521351        Odin32DBNaslov("Completion", "completion");
    1353         Odin32DBCompletionBarDll($iRefcode, "", $db);
     1352        Odin32DBCompletionBarModule($iRefcode, "", $db);
    13541353
    13551354        /*
     
    13621361                       "    function\n".
    13631362                       "WHERE\n".
    1364                        "    dll = %d\n".
     1363                       "    module = %d\n".
    13651364                       "GROUP BY state\n".
    13661365                       "ORDER BY state",
     
    13831382                           "    LEFT JOIN state s ON f.state = s.refcode\n".
    13841383                           "WHERE\n".
    1385                            "    f.dll = %d\n",
     1384                           "    f.module = %d\n",
    13861385                           $iRefcode);
    13871386            if ($fSortByState)
     
    14101409                           "    LEFT OUTER JOIN function fn ON fn.file = f.refcode\n".
    14111410                           "WHERE\n".
    1412                            "    f.dll = %d\n".
     1411                           "    f.module = %d\n".
    14131412                           "GROUP BY f.refcode\n".
    14141413                           "ORDER BY f.name\n",
     
    14371436                               "    JOIN function f\n".
    14381437                               "WHERE\n".
    1439                                "    g.dll = %d AND\n".
    1440                                "    f.dll = %d AND\n".
     1438                               "    g.module = %d AND\n".
     1439                               "    f.module = %d AND\n".
    14411440                               "    f.apigroup = g.refcode\n".
    14421441                               "GROUP BY f.apigroup\n".
     
    14671466                           "    JOIN author a\n".
    14681467                           "WHERE\n".
    1469                            "    f.dll       = %d AND\n".
     1468                           "    f.module    = %d AND\n".
    14701469                           "    fa.function = f.refcode AND\n".
    14711470                           "    fa.author   = a.refcode\n".
     
    15351534                   "    f.revision      AS revision,\n".
    15361535                   "    f.description   AS description,\n".
    1537                    "    f.dll           AS dllrefcode,\n".
    1538                    "    d.name          AS dllname\n".
     1536                   "    f.module        AS modrefcode,\n".
     1537                   "    m.name          AS modname\n".
    15391538                   "FROM\n".
    15401539                   "    file f,\n".
    1541                    "    dll d,\n".
     1540                   "    module m,\n".
    15421541                   "    author a\n".
    15431542                   "WHERE\n".
    15441543                   "    f.refcode   = %d AND\n".
    1545                    "    f.dll       = d.refcode AND\n".
     1544                   "    f.module    = m.refcode AND\n".
    15461545                   "    f.lastauthor= a.refcode",
    15471546                    $iRefcode);
     
    15541553        echo "\n<table width=100% border=3 cellpadding=0>\n";
    15551554        Odin32DBInfoRow1("Name", $array, "name","","","",
    1556                          " (<a href=\"cvs.phtml?sFile=./src/".$array["dllname"]."/".$array["name"].",v&sRevision=\">cvs</a>)");
     1555                         " (<a href=\"cvs.phtml?sFile=./src/".$array["modname"]."/".$array["name"].",v&sRevision=\">cvs</a>)");
    15571556        Odin32DBInfoRow1("Revision", $array, "revision","","","","");
    15581557        Odin32DBInfoRow1("Changed", $array, "lastdatetime","","","","");
    15591558        Odin32DBInfoRow1("Last Author", $array, "lastauthorname","lastauthorrefcode","authorrefcode","","");
    1560         Odin32DBInfoRow1("Dll", $array, "dllname","dllrefcode","dllrefcode","","");
     1559        Odin32DBInfoRow1("Module", $array, "modname","modrefcode","modrefcode","","");
    15611560        $sql = sprintf("SELECT\n".
    15621561                       "    COUNT(*) as functions\n".
     
    17221721 * @param       $db             Database handle.
    17231722 * @param       $iRefcode       Author reference code.
    1724  * @param       $fDlls          Flags which tells wether to list all dlls or not.
     1723 * @param       $fModules       Flags which tells wether to list all modules or not.
    17251724 * @param       $fFunctions     Flags which tells wether to list all functions or not.
    17261725 * @param       $fFiles         Flags which tells wether to list all files or not.
     
    17281727 * @param       $fSortByState   Flags which tells wether to sort functions by
    17291728 *                              state and function name or just by function name.
    1730  * @param       $iDllRefcode    Dll refcode. All Dll if < 0.
     1729 * @param       $iModRefcode    Module refcode. All modules if < 0.
    17311730 *                              (not implemented yet)
    17321731 * @sketch
     
    17341733 * @remark
    17351734 */
    1736 function Odin32DBAuthorInfo($db, $iRefcode, $fDlls, $fFunctions, $fFiles, $fAPIGroups, $fSortByState, $iDllRefcode)
     1735function Odin32DBAuthorInfo($db, $iRefcode, $fModules, $fFunctions, $fFiles, $fAPIGroups, $fSortByState, $iModRefcode)
    17371736{
    17381737    $sURLArgs = "authorrefcode=".$iRefcode.
    1739                 ($fDlls        ? "&fDlls=1"        : "").
     1738                ($fModules     ? "&fModules=1"        : "").
    17401739                ($fFunctions   ? "&fFunctions=1"   : "").
    17411740                ($fFiles       ? "&fFiles=1"       : "").
     
    17461745     * Navigation - TOP
    17471746     */
    1748     $sExpand    = "authorrefcode=".$iRefcode."&fDlls=1&fFiles=1&fFunctions=1&fAPIGroups=1&fAuthors=1&dll=".$iDllRefcode;
     1747    $sExpand    = "authorrefcode=".$iRefcode."&fModules=1&fFiles=1&fFunctions=1&fAPIGroups=1&fAuthors=1&mod=".$iModRefcode;
    17491748    if ($fSortByState)  $sExpand = $sExpand."&fSortByState=".$fSortByState;
    17501749    $sCollapse  = "authorrefcode=".$iRefcode;
     
    17961795            }
    17971796        $sql = sprintf("SELECT\n".
    1798                        "    COUNT(f.dll) as functions
     1797                       "    COUNT(f.module) as functions
    17991798                       \n".
    18001799                       "FROM\n".
     
    18041803                       "    fa.author = %d AND".
    18051804                       "    f.refcode = fa.function\n".
    1806                        "GROUP BY f.dll",
     1805                       "GROUP BY f.module",
    18071806                       $iRefcode);
    1808         $cDlls = 0;
    1809         if (($result2 = mysql_query($sql, $db)) && ($cDlls = mysql_num_rows($result2)) > 0)
    1810             Odin32DBInfoRow1NoArray("# Dlls", $cDlls, "","","","");
     1807        $cModules = 0;
     1808        if (($result2 = mysql_query($sql, $db)) && ($cModules = mysql_num_rows($result2)) > 0)
     1809            Odin32DBInfoRow1NoArray("# Moduless", $cModules, "","","","");
    18111810        $sql = sprintf("SELECT\n".
    1812                        "    COUNT(f.dll) as functions
     1811                       "    COUNT(f.module) as functions
    18131812                       \n".
    18141813                       "FROM\n".
     
    18251824            Odin32DBInfoRow1NoArray("# Files", $cFiles, "","","","");
    18261825        $sql = sprintf("SELECT\n".
    1827                        "    COUNT(f.dll) as functions
     1826                       "    COUNT(f.module) as functions
    18281827                       \n".
    18291828                       "FROM\n".
     
    18671866
    18681867        /*
    1869          * Dlls
    1870          */
    1871         Odin32DBNaslov("Dlls", "dlls");
    1872         if ($fDlls)
     1868         * Modules
     1869         */
     1870        Odin32DBNaslov("Modules", "Modules");
     1871        if ($fModules)
    18731872        {
    18741873            $sql = sprintf("SELECT\n".
    1875                            "    d.refcode,\n".
    1876                            "    d.name,\n".
     1874                           "    m.refcode,\n".
     1875                           "    m.name,\n".
    18771876                           "    COUNT(f.refcode)\n".
    18781877                           "FROM\n".
    18791878                           "    fnauthor fa,\n".
    1880                            "    dll d,\n".
     1879                           "    module m,\n".
    18811880                           "    function f\n".
    18821881                           "WHERE\n".
    18831882                           "    fa.author = %d AND\n".
    18841883                           "    fa.function = f.refcode AND\n".
    1885                            "    f.dll = d.refcode\n".
    1886                            "GROUP BY d.refcode\n".
    1887                            "ORDER BY d.name\n",
     1884                           "    f.module = m.refcode\n".
     1885                           "GROUP BY m.refcode\n".
     1886                           "ORDER BY m.name\n",
    18881887                            $iRefcode);
    1889             Odin32DBWriteDlls($sql, $db, $sURLArgs);
     1888            Odin32DBWriteModules($sql, $db, $sURLArgs);
    18901889        }
    18911890        else
    1892             echo "Click <a href=\"Odin32DB.phtml#dlls?".$sURLArgs."&fDlls=1".
     1891            echo "Click <a href=\"Odin32DB.phtml#modules?".$sURLArgs."&fModules=1".
    18931892                 "\">here</a> to see all files.\n";
    18941893
     
    19031902                           "    f.refcode,\n".
    19041903                           "    f.name,\n".
    1905                            "    d.refcode,\n".
    1906                            "    d.name,\n".
     1904                           "    m.refcode,\n".
     1905                           "    m.name,\n".
    19071906                           "    s.color,\n".
    19081907                           "    s.name\n".
     
    19101909                           "    fnauthor fa\n".
    19111910                           "    JOIN function f\n".
    1912                            "    JOIN dll d\n".
     1911                           "    JOIN module m\n".
    19131912                           "    LEFT JOIN state s ON f.state = s.refcode\n".
    19141913                           "WHERE\n".
    19151914                           "    fa.author = %d AND\n".
    19161915                           "    fa.function = f.refcode AND \n".
    1917                            "    f.dll = d.refcode\n",
     1916                           "    f.module = m.refcode\n",
    19181917                           $iRefcode);
    19191918            if ($fSortByState)
     
    19211920            else
    19221921                $sql = $sql."ORDER BY d.name, f.name";
    1923             Odin32DBWriteFunctionsWithDlls($sql, $db, $sURLArgs);
     1922            Odin32DBWriteFunctionsWithModules($sql, $db, $sURLArgs);
    19241923        }
    19251924        else
     
    20382037                   "    g.refcode       AS refcode,\n".
    20392038                   "    g.description   AS description,\n".
    2040                    "    d.name          AS dllname,\n".
    2041                    "    d.refcode       AS dllrefcode\n".
     2039                   "    m.name          AS modname,\n".
     2040                   "    m.refcode       AS modrefcode\n".
    20422041                   "FROM\n".
    20432042                   "    apigroup g\n".
    2044                    "    JOIN dll d\n".
     2043                   "    JOIN module m\n".
    20452044                   "WHERE\n".
    20462045                   "    g.refcode = %d AND".
    2047                    "    g.dll = d.refcode\n",
     2046                   "    g.module = m.refcode\n",
    20482047                   $iRefcode);
    20492048    if (($result = mysql_query($sql, $db)) && mysql_num_rows($result) > 0 && ($array = mysql_fetch_array($result)))
     
    20552054        echo "\n<table width=100% border=3 cellpadding=0>\n";
    20562055        Odin32DBInfoRow1("Name", $array, "name","","","","");
    2057         Odin32DBInfoRow1("Dll", $array, "dllname","dllrefcode","dllrefcode","bad configuration","");
     2056        Odin32DBInfoRow1("Module", $array, "modname","modrefcode","modrefcode","bad configuration","");
    20582057        if (isset($array["description"]))
    20592058            Odin32DBInfoRow1("Description", $array, "description","","","","");
     
    20852084
    20862085        $sql = sprintf("SELECT\n".
    2087                        "    COUNT(f.dll) as functions\n".
     2086                       "    COUNT(f.module) as functions\n".
    20882087                       "FROM\n".
    20892088                       "    fnauthor fa,\n".
     
    22312230     * Navigation - TOP
    22322231     */
    2233     $sExpand    = "authorrefcode=".$iRefcode."&fDlls=1&fFiles=1&fFunctions=1&fAPIGroups=1&fAuthors=1&dll=".$iDllRefcode;
     2232    $sExpand    = "authorrefcode=".$iRefcode."&fModules=1&fFiles=1&fFunctions=1&fAPIGroups=1&fAuthors=1&module=".$iModRefcode;
    22342233    if ($fSortByState)  $sExpand = $sExpand."&fSortByState=".$fSortByState;
    22352234    $sCollapse  = "authorrefcode=".$iRefcode;
     
    22432242                   "    dn.note          AS note,\n".
    22442243                   "    dn.refcode       AS refcode,\n".
    2245                    "    dn.dll           AS dllrefcode,\n".
     2244                   "    dn.module        AS modrefcode,\n".
    22462245                   "    dn.file          AS filerefcode,\n".
    22472246                   "    dn.seqnbrnote    AS seqnbnote,\n".
     
    22492248                   "    dn.seqnbr        AS seqnbr,\n".
    22502249                   "    dn.line          AS line,\n".
    2251                    "    d.name           AS dll,\n".
     2250                   "    m.name           AS modname,\n".
    22522251                   "    f.name           AS file\n".
    22532252                   "FROM\n".
    22542253                   "    designnote dn,\n".
    2255                    "    dll d,\n".
     2254                   "    module m,\n".
    22562255                   "    file f\n".
    22572256                   "WHERE   dn.refcode = %d\n".
    2258                    "    AND dn.dll = d.refcode\n".
     2257                   "    AND dn.module = m.refcode\n".
    22592258                   "    AND dn.file = f.refcode\n".
    22602259                   "ORDER BY dn.seqnbrnote\n",
     
    22682267        echo "\n<table width=100% border=3 cellpadding=0>\n";
    22692268        Odin32DBInfoRow1("Title", $array, "name","","","","");
    2270         Odin32DBInfoRow1("Module", $array, "dll","","","","");
     2269        Odin32DBInfoRow1("Module", $array, "modname","","","","");
    22712270        Odin32DBInfoRow1("File", $array, "file","","","","");
    22722271        Odin32DBInfoRow1("Line", $array, "line","","","","");
Note: See TracChangeset for help on using the changeset viewer.