Skip to content

Commit

Permalink
If there are no subdomains defined, then the subdomain option will no…
Browse files Browse the repository at this point in the history
…t appear.
  • Loading branch information
kmark committed Jun 12, 2010
1 parent 08cab7a commit b5362d3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion includes/tpl/orderform.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function previousstep() {
<td width="20%">Domain/Subdomain:</td>
<td><select name="domain" id="domain">
<option value="dom" selected="selected">Domain</option>
<option value="sub">Subdomain</option>
%CANHASSUBDOMAIN%
</select></td>
<td width="70%"><a title="Choose the type of hosting:<br /><strong>Domain:</strong> example.com<br /><strong>Subdomain:</strong> example.subdomain.com" class="tooltip"><img src="<URL>themes/icons/information.png" /></a></td>
</tr>
Expand Down
8 changes: 7 additions & 1 deletion order/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@
$array['USER'] = "";
$array['DOMAIN'] = '<input name="cdom" id="cdom" type="text" />';
$sub = $db->query("SELECT * FROM `<PRE>subdomains`");
if($db->num_rows($sub) == 0) {
$array["CANHASSUBDOMAIN"] = "";
}
else {
$array["CANHASSUBDOMAIN"] = '<option value="sub">Subdomain</option>';
}
while($sub2 = $db->fetch_array($sub)) {
$values2[] = array($sub2['subdomain'], $sub2['subdomain']);
}
Expand Down Expand Up @@ -101,4 +107,4 @@
//Output
include(LINK ."output.php");

?>
?>

0 comments on commit b5362d3

Please sign in to comment.