Changeset 6662 for trunk/tools/database/www/Odin32DBHelpers.php3
- Timestamp:
- Sep 6, 2001, 5:02:18 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/database/www/Odin32DBHelpers.php3
r3968 r6662 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.