Changeset 17222
- Timestamp:
- Sep 6, 2001, 5:02:18 AM (24 years ago)
- Location:
- tags/trunk/tools/database/www
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified tags/trunk/tools/database/www/Odin32DB.phtml ¶
r17219 r17222 86 86 $authordll = -1; 87 87 } 88 else if (isset($designnoterefcode)) 89 { /* Author by refcode */ 90 $sCategory = "designnote"; 91 $sCategoryName = "Design Note"; 92 if ($designnoterefcode != "") 93 $iRefcode = (int)$designnoterefcode; 94 } 88 95 else if (isset($dlls)) 89 96 { /* All dlls */ 90 $sCategory = "dll"; 91 $sCategoryName = "Dlls"; 97 $sCategory = "dlls"; 98 $sCategoryName = "All Dlls"; 99 $sDllType = 'A'; 92 100 } 93 101 else if (isset($internal)) 94 102 { /* All Internal Dlls */ 95 $sCategory = "dll ";103 $sCategory = "dlls"; 96 104 $sCategoryName = "Internal Dlls"; 105 $sDllType = 'I'; 97 106 } 98 107 else if (isset($support)) 99 108 { /* All dlls */ 100 $sCategory = "dll ";109 $sCategory = "dlls"; 101 110 $sCategoryName = "Support Stuff"; 111 $sDllType = 'S'; 102 112 } 103 113 else if (isset($tools)) 104 { /* All dlls */105 $sCategory = "dll ";114 { /* Tools */ 115 $sCategory = "dlls"; 106 116 $sCategoryName = "Tools"; 117 $sDllType = 'T'; 107 118 } 108 119 else if (isset($apigroups)) … … 115 126 $sCategory = "authors"; 116 127 $sCategoryName = "Authors"; 128 } 129 else if (isset($design)) 130 { /* All authors */ 131 $sCategory = "designnotes"; 132 $sCategoryName = "Design Notes"; 117 133 } /* else: root page */ 118 134 … … 138 154 $fNoData = 1; 139 155 $sName = "!Invalid Refcode!"; 156 Odin32DBSqlError($sql); 140 157 } 141 158 @mysql_free_result($result); … … 189 206 { 190 207 Odin32DBAuthorInfo($db, $iRefcode, $fDlls, $fFunctions, $fFiles, $fAPIGroups, $fSortByState, $authordll); 208 break; 209 } 210 211 case "designnote": 212 { 213 Odin32DBDesignNote($db, $iRefcode); 191 214 break; 192 215 } … … 209 232 echo "<font size=3>". 210 233 "<ul>\n". 211 " <li><b>Module <\n>\n".234 " <li><b>Modules\n". 212 235 " <ul>\n". 213 236 " <li><b><a href=\"Odin32DB.phtml?dlls=1\">Odin32 API DLLs</a></b>\n". … … 218 241 " <li><b><a href=\"Odin32DB.phtml?apigroups=1\">API Groups</a></b>\n". 219 242 " <li><b><a href=\"Odin32DB.phtml?authors=1\">Authors</a></b>\n". 220 " <li><i><a href=\"Odin32DB.phtml?searchapi=1\">Search API (not implemeted)</a></i>\n". 243 " <li><b><a href=\"Odin32DB.phtml?design=1\">Design Notes</a></b>\n". 244 " <!-- <li><i><a href=\"Odin32DB.phtml?searchapi=1\">Search API (not implemeted)</a></i> -->\n". 221 245 "</ul>\n"; 222 246 "</font>\n"; … … 239 263 "-Enjoy!<br>\n"; 240 264 241 Odin32DBNaslov( "All Dlls", "dlls", "");265 Odin32DBNaslov($sCategoryName, $sCategory, ""); 242 266 $sql = "SELECT\n". 243 267 " d.name AS name,\n". … … 246 270 "FROM\n". 247 271 " dll d\n". 248 " JOIN function f\n". 272 " LEFT OUTER JOIN function f\n". 273 " ON f.dll = d.refcode\n". 249 274 "WHERE\n". 250 " f.dll = d.refcode\n".275 " d.type = '".$sDllType."'\n". 251 276 "GROUP BY d.refcode\n". 252 277 "ORDER BY d.name\n"; … … 254 279 { 255 280 if (mysql_num_rows($result) <= 0) 256 echo "<i>No d lls!</i>\n";281 echo "<i>No data in this module category!<br>$sql</i>\n"; 257 282 else 258 283 { … … 364 389 } 365 390 391 case "designnotes": 392 { 393 /* 394 * List all design notes. 395 */ 396 Odin32DBNavigationTop("",""); 397 Odin32DBNaslov("Welcome to the Odin32 API Database", "welcome", ""); 398 echo "This is the first Beta edition of the Odin32 API Database.<br>\n". 399 "There might be dead or non-functioning links. Currently feedback is <i>NOT</i> needed.\n". 400 "<p>\n". 401 "Please note that the quality of the data avilable is quite poor\n". 402 "for the time being. This will improve within some months.<br>\n". 403 "-Enjoy!<br>\n"; 404 405 Odin32DBNaslov($sCategoryName, $sCategory, ""); 406 $sql = "SELECT\n". 407 " dn.refcode AS refcode,\n". 408 " dn.name AS name,\n". 409 " dn.seqnbr AS seqnbr,\n". 410 " dn.level AS level,\n". 411 " d.name AS dllname,\n". 412 " f.name AS filename\n". 413 "FROM\n". 414 " designnote dn,\n". 415 " dll d,\n". 416 " file f\n". 417 "WHERE dn.dll = d.refcode\n". 418 " AND dn.file = f.refcode\n". 419 " AND dn.level <= 1\n". 420 "ORDER BY d.name, dn.seqnbr, dn.seqnbrnote\n"; 421 if ($result = mysql_query($sql, $db)) 422 { 423 if (mysql_num_rows($result) <= 0) 424 echo "<i>No Design Notes!</i>\n"; 425 else 426 { 427 echo "\n<font size=-1><ul><b>"; 428 $iLevel = 0; 429 while ($aDesignNote = mysql_fetch_array($result)) 430 { 431 if ($aDesignNote["level"] > $iLevel) 432 print " <ul>\n"; 433 else if ($aDesignNote["level"] < $iLevel) 434 print " </ul>\n"; 435 $iLevel = $aDesignNote["level"]; 436 437 if ($iLevel > 0) 438 print " <li><a href=\"Odin32DB.phtml?designnoterefcode=".$aDesignNote["refcode"]. 439 "\">".$aDesignNote["name"]."</a>\n"; 440 else 441 print " <li><a href=\"Odin32DB.phtml?designnoterefcode=".$aDesignNote["refcode"]. 442 "\">".$aDesignNote["seqnbr"].".0 ".$aDesignNote["name"]."</a> (".$aDesignNote["filename"].")\n"; 443 444 } 445 echo "</ul></b></font>\n"; 446 } 447 } 448 else 449 Odin32DBSqlError($sql); 450 Odin32DBNavigationBottom("",""); 451 break; 452 } 453 366 454 default: 367 455 echo "!IPE!"; //FIXME -
TabularUnified tags/trunk/tools/database/www/Odin32DBHelpers.php3 ¶
r14539 r17222 2218 2218 2219 2219 2220 /** 2221 * Displays a design not. 2222 * @returns void 2223 * @param $db Database handle. 2224 * @param $iRefcode Author reference code. 2225 * @author knut st. osmundsen (kosmunds@csc.com) 2226 * @remark 2227 */ 2228 function Odin32DBDesignNote($db, $iRefcode) 2229 { 2230 /* 2231 * Navigation - TOP 2232 */ 2233 $sExpand = "authorrefcode=".$iRefcode."&fDlls=1&fFiles=1&fFunctions=1&fAPIGroups=1&fAuthors=1&dll=".$iDllRefcode; 2234 if ($fSortByState) $sExpand = $sExpand."&fSortByState=".$fSortByState; 2235 $sCollapse = "authorrefcode=".$iRefcode; 2236 Odin32DBNavigationTop($sExpand, $sCollapse); 2237 2238 /* 2239 * Fetch (vital) data. 2240 */ 2241 $sql = sprintf("SELECT\n". 2242 " dn.name AS name,\n". 2243 " dn.note AS note,\n". 2244 " dn.refcode AS refcode,\n". 2245 " dn.dll AS dllrefcode,\n". 2246 " dn.file AS filerefcode,\n". 2247 " dn.seqnbrnote AS seqnbnote,\n". 2248 " dn.level AS level,\n". 2249 " dn.seqnbr AS seqnbr,\n". 2250 " dn.line AS line,\n". 2251 " d.name AS dll,\n". 2252 " f.name AS file\n". 2253 "FROM\n". 2254 " designnote dn,\n". 2255 " dll d,\n". 2256 " file f\n". 2257 "WHERE dn.refcode = %d\n". 2258 " AND dn.dll = d.refcode\n". 2259 " AND dn.file = f.refcode\n". 2260 "ORDER BY dn.seqnbrnote\n", 2261 $iRefcode); 2262 if (($result = mysql_query($sql, $db)) && mysql_num_rows($result) > 0 && ($array = mysql_fetch_array($result))) 2263 { 2264 /* 2265 * General 2266 */ 2267 /*Odin32DBNaslov("General", "general"); 2268 echo "\n<table width=100% border=3 cellpadding=0>\n"; 2269 Odin32DBInfoRow1("Title", $array, "name","","","",""); 2270 Odin32DBInfoRow1("Module", $array, "dll","","","",""); 2271 Odin32DBInfoRow1("File", $array, "file","","","",""); 2272 Odin32DBInfoRow1("Line", $array, "line","","","",""); 2273 Odin32DBInfoRow1("Seq#", $array, "seqnbr","","","",""); 2274 echo "</table>\n"; 2275 */ 2276 2277 /* 2278 * Sections. 2279 */ 2280 $iLevel = 0; 2281 $sSectionNbr = ""; 2282 do 2283 { 2284 /* make section number */ 2285 if ($array["level"] <= 0) 2286 $sSection = $array["seqnbr"].".0"; 2287 else 2288 { 2289 while ($iLevel > 0 && $iLevel < $array["level"]) 2290 { 2291 echo "debug ".$iLevel." < ".$array["level"]."<br>\n"; 2292 $sSection .= '.0'; 2293 $iLevel = $iLevel + 1; 2294 } 2295 2296 if ($iLevel == 0) $iLevel++; 2297 while ($iLevel >= $array["level"]) 2298 { 2299 $sSection = substr($sSection, 0, strlen($sSection) - strlen(strrchr($sSection, '.'))); 2300 $iLevel = $iLevel - 1; 2301 } 2302 $sSection = $sSection.".".$array["seqnbr"]; 2303 } 2304 $iLevel = $array["level"]; 2305 2306 /* print it */ 2307 $sName = $sSection." ".$array["name"]; 2308 Odin32DBNaslov($sName, $sName); 2309 echo $array["note"]."\n"; 2310 2311 } while ($array = mysql_fetch_array($result)); 2312 2313 } 2314 else 2315 { 2316 echo "<p> No data! Invalid refcode? </p>"; 2317 Odin32DBSqlError($sql); 2318 } 2319 2320 /* 2321 * Navigation - Bottom 2322 */ 2323 Odin32DBNavigationBottom($sExpand, $sCollapse); 2324 } 2325 2326 2220 2327 2221 2328
Note:
See TracChangeset
for help on using the changeset viewer.