Changeset 201 for trunk/system
- Timestamp:
- Apr 27, 2009, 9:55:00 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/generators/dns.php
r197 r201 49 49 } 50 50 51 $DbResult = $Database->select(' network_dns_alias', '*');51 $DbResult = $Database->select('NetworkDomainAlias', '*'); 52 52 while($Alias = $DbResult->fetch_array()) 53 53 { 54 $Data = strtolower($Alias[' name']);55 if(strlen($Data) < 8) $Data .= "\t"; 56 fputs($File, $Data."\tIN\tCNAME\t".$Alias[' target']."\n");54 $Data = strtolower($Alias['Name']); 55 if(strlen($Data) < 8) $Data .= "\t"; 56 fputs($File, $Data."\tIN\tCNAME\t".$Alias['Target']."\n"); 57 57 } 58 58 … … 147 147 } 148 148 149 $DbResult = $Database->query( "SELECT network_dns_alias.* FROM `network_dns_alias` JOIN `hosts` ON network_dns_alias.target LIKE hosts.name AND hosts.external_ip != ''");149 $DbResult = $Database->query('SELECT NetworkDomainAlias.* FROM `NetworkDomainAlias` JOIN `hosts` ON NetworkDomainAlias.Target LIKE hosts.name AND hosts.external_ip != ""'); 150 150 while($Alias = $DbResult->fetch_array()) 151 151 { 152 $Data = strtolower($Alias[' name']);153 if(strlen($Data) < 8) $Data .= "\t"; 154 fputs($File, $Data."\tIN\tCNAME\t".$Alias[' target']."\n");152 $Data = strtolower($Alias['Name']); 153 if(strlen($Data) < 8) $Data .= "\t"; 154 fputs($File, $Data."\tIN\tCNAME\t".$Alias['Target']."\n"); 155 155 } 156 156 … … 237 237 } 238 238 239 $DbResult = $Database->query( "SELECT network_dns_alias.* FROM `network_dns_alias` JOIN `hosts` ON network_dns_alias.target LIKE hosts.name AND hosts.czfree_ip != ''");239 $DbResult = $Database->query('SELECT NetworkDomainAlias.* FROM `NetworkDomainAlias` JOIN `hosts` ON NetworkDomainAlias.Target LIKE hosts.name AND hosts.czfree_ip != ""'); 240 240 while($Alias = $DbResult->fetch_array()) 241 241 { 242 $Data = $Alias[' name'];243 if(strlen($Data) < 8) $Data .= "\t"; 244 fputs($File, $Data."\tIN\tCNAME\t".$Alias[' target']."\n");245 fputs($File2, $Data."\tIN\tCNAME\t".$Alias[' target']."\n");242 $Data = $Alias['Name']; 243 if(strlen($Data) < 8) $Data .= "\t"; 244 fputs($File, $Data."\tIN\tCNAME\t".$Alias['Target']."\n"); 245 fputs($File2, $Data."\tIN\tCNAME\t".$Alias['Target']."\n"); 246 246 } 247 247 fclose($File);
Note:
See TracChangeset
for help on using the changeset viewer.