Changeset 1263
- Timestamp:
- 01/14/08 23:23:25 (7 months ago)
- Files:
-
- trunk/upload/admin_forums.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/upload/admin_forums.php
r941 r1263 386 386 387 387 $result = $db->query('SELECT id, cat_name FROM '.$db->prefix.'categories ORDER BY disp_position') or error('Unable to fetch category list', __FILE__, __LINE__, $db->error()); 388 while ($cur_cat = $db->fetch_assoc($result)) 389 echo "\t\t\t\t\t\t\t\t\t".'<option value="'.$cur_cat['id'].'">'.pun_htmlspecialchars($cur_cat['cat_name']).'</option>'."\n"; 388 if ($db->num_rows($result) > 0) 389 { 390 while ($cur_cat = $db->fetch_assoc($result)) 391 echo "\t\t\t\t\t\t\t\t\t".'<option value="'.$cur_cat['id'].'">'.pun_htmlspecialchars($cur_cat['cat_name']).'</option>'."\n"; 392 } 393 else 394 echo "\t\t\t\t\t\t\t\t\t".'<option value="0" disabled="disabled">No categories exist</option>'."\n"; 390 395 391 396 ?> … … 400 405 </form> 401 406 </div> 402 407 <?php 408 409 // Display all the categories and forums 410 $result = $db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.disp_position FROM '.$db->prefix.'categories AS c INNER JOIN '.$db->prefix.'forums AS f ON c.id=f.cat_id ORDER BY c.disp_position, c.id, f.disp_position') or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error()); 411 412 if ($db->num_rows($result) > 0) 413 { 414 415 ?> 403 416 <h2 class="block2"><span>Edit forums</span></h2> 404 417 <div class="box"> … … 408 421 409 422 $tabindex_count = 4; 410 411 // Display all the categories and forums412 $result = $db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.disp_position FROM '.$db->prefix.'categories AS c INNER JOIN '.$db->prefix.'forums AS f ON c.id=f.cat_id ORDER BY c.disp_position, c.id, f.disp_position') or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error());413 423 414 424 $cur_category = 0; … … 450 460 </form> 451 461 </div> 462 <?php 463 464 } 465 466 ?> 452 467 </div> 453 468 <div class="clearer"></div>
