domain_navigator.inc
上传用户:xiao730204
上传日期:2007-01-04
资源大小:141k
文件大小:4k
源码类别:

WEB邮件程序

开发平台:

PHP

  1. <?php
  2. if ( ! isset( $begins_with ) ) {
  3. /* if ( ! defined( $begins_with ) && $begins_with == '' ) { */
  4.    $begins_with = -1;
  5. }
  6. $break_point = 26;
  7. $xxx_x = 0;
  8. $temp_tlds = new DnsTlds();
  9. $tlds = $temp_tlds->ListAll();
  10. $html_content .= 
  11. '
  12. <table bgcolor="#000000" border="0" cellspacing="0" cellpadding="0" width="100%">
  13. <tr><td>
  14. <table width="100%" cellspacing="1" border="0" cellpadding="2" width="100%">' ;
  15. if ( $tld == '' ) {
  16. $html_content .= 
  17. '<tr bgcolor="' . $default->html->title->background->color . '">' .
  18.    '<td colspan="' . $break_point . '"><b>Choose the domain extension you want :</b></td>' .
  19. '</tr>' ;
  20. $html_content .= 
  21. '<tr bgcolor="' . $default->html->default->background->color . '">';
  22. for( $i_xxx = 0; $i_xxx < count( $tlds ); $i_xxx++ ) {
  23.    $html_content .= '<td><center>';
  24.    if ( $tld != $tlds[ $i_xxx ] ) {
  25.    $html_content .= '<A Href="index.php?session_id=' . $session_id . '&tld=' . $tlds[ $i_xxx ] . '">';
  26.    }
  27.    $html_content .= $tlds[ $i_xxx ] ;
  28.    if ( $tld != $tlds[ $i_xxx ] ) {
  29.    $html_content .= '</A>';
  30.    }
  31.    $html_content .= '</center></td>' ;
  32.    $xxx_x++;
  33.    if ( $xxx_x == $break_point ) {
  34. $html_content .= 
  35. '</tr><tr bgcolor="' . $default->html->default->background->color . '">';
  36.       $xxx_x = 0;
  37.    }
  38. }
  39. if ( $xxx_x < $break_point ) {
  40. $html_content .=
  41. '<td colspan="' . ( $break_point - $xxx_x ) . '">&nbsp;</td></tr>';
  42. }
  43. } /* If Tld isn't set */
  44. if ( $tld != '' && $begins_with == -1 ) {
  45. $html_content .= 
  46. '<tr bgcolor="' . $default->html->title->background->color . '">' .
  47.    '<td colspan="' . $break_point . '"><b>Choose the begining letter of the domain ( ' . $tld . ' ) :</b></td>' .
  48. '</tr>' ;
  49. $xxx_x = 0;
  50. $html_content .= 
  51. '<tr bgcolor="' . $default->html->default->background->color . '">';
  52. if ( $tld != 'arpa' ) {
  53. for( $i_xxx = 65; $i_xxx < 91 ; $i_xxx++ ) {
  54.    $xxx_x++;
  55.    $html_content .= '<td><center>';
  56.    $my_char = sprintf( '%c', $i_xxx );
  57.    if ( $my_char != $begins_with ) {
  58.    $html_content .= '<A Href="index.php?' . 
  59.       'session_id=' . $session_id . '&' .
  60.       'tld=' . $tld . '&' .
  61.       'begins_with=' . $my_char .
  62.       '">';
  63.    }
  64.    $html_content .= $my_char;
  65.    if ( $my_char != $begins_with ) {
  66.    $html_content .= '</A>';
  67.    }
  68.    $html_content .= '</center></td>';
  69.    if ( $xxx_x == $break_point ) {
  70.    $xxx_x = 0;
  71.    $html_content .= '</tr>' ;
  72.    $html_content .= 
  73.    '<tr bgcolor="' . $default->html->default->background->color . '">';
  74.    }   
  75. }
  76. }
  77. for ( $i_xxx = 0; $i_xxx < 10; $i_xxx++ ) {
  78.    $xxx_x++;
  79.    $html_content .= '<td><center>';
  80.    $my_char = $i_xxx;
  81.    if ( $my_char != $begins_with || ereg( '[A-Z]', $begins_with ) ) {
  82.    $html_content .= '<A Href="index.php?' . 
  83.       'session_id=' . $session_id . '&' .
  84.       'tld=' . $tld . '&' .
  85.       'begins_with=' . $my_char .
  86.       '">';
  87.    }
  88.    $html_content .= $my_char;
  89.    if ( $my_char != $begins_with || ereg( '[A-Z]', $begins_with ) ) {
  90.    $html_content .= '</A>';
  91.    }
  92.    $html_content .= '</center></td>';
  93.    if ( $xxx_x == $break_point ) {
  94.    $xxx_x = 0;
  95.    $html_content .= '</tr>' ;
  96.    $html_content .= 
  97.    '<tr bgcolor="' . $default->html->default->background->color . '">';
  98.    }   
  99. }
  100. if ( $xxx_x < $break_point ) {
  101. $html_content .=
  102. '<td colspan="' . ( $break_point - $xxx_x ) . '">&nbsp;</td></tr>';
  103. }
  104. } /* End if Tld */
  105. if ( $tld != '' && $begins_with != -1 ) {
  106. $html_content .= 
  107. '<tr bgcolor="' . $default->html->title->background->color . '">' .
  108.    '<td colspan="' . ( $break_point - 1 ) . '"><b>' . 
  109.    'Domains ' .  $begins_with . '*.' . $tld . ': ' .
  110.    '</b></td>' .
  111.    '<td><b>' .
  112.    'Actions :' .
  113.    '</b></td>' .
  114. '</tr>' ;
  115. if ( ! isset( $dns_db ) ) {
  116.    $dns_db = $default->dns_db->Load();
  117. }
  118. $dns_db->debug->On();
  119. $target_domain = '';
  120. list( $act, $all_domains ) = $dns_db->ListDomains( $begins_with, $tld );
  121. if ( is_array( $all_domains ) ) {
  122. for( $i_xxx = 0; $i_xxx < count( $all_domains ); $i_xxx++ ) {
  123.    $html_content .=
  124. '<tr bgcolor="' . $default->html->default->background->color . '">' .
  125.    '<td colspan="' . ( $break_point - 1 ) . '">' . 
  126.    '<A Href="index.php?' . 
  127.          'action=' . DOMAIN_VIEW_SOA_FRM  . '&' . 
  128.          'session_id=' . $session_id . '&' . 
  129.          't_domain=' . ( urlencode( $all_domains[ $i_xxx ]  ) ) .
  130.    '">' . 
  131.    $all_domains[ $i_xxx ] . 
  132.    '</A>' . 
  133.    '</td>' .
  134.    '<td><b>' .
  135.    '<img src="graphics/trash.gif">' .
  136.    '</b></td>' .
  137. '</tr>' . "n";
  138. }
  139. }
  140. }
  141. $html_content .= 
  142. '</table></td></tr></table>' 
  143. ;
  144. include( './templates/main.inc' );
  145. ?>