function artxPositions(&$document, $positions, $style)
{
ob_start();
if (count($positions) == 4) {
if (artxCountModules($document, $positions[0])
&& artxCountModules($document, $positions[1])
&& artxCountModules($document, $positions[2])
&& artxCountModules($document, $positions[3]))
{
?>
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="25%"></td>
<td width="25%"></td>
<td width="25%"></td>
<td width="25%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="33%"></td>
<td width="33%"></td>
<td width="33%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="33%"></td>
<td width="33%"></td>
<td width="33%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="33%"></td>
<td width="33%"></td>
<td width="33%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="33%"></td>
<td width="33%"></td>
<td width="33%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="50%"></td>
<td width="50%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="50%"></td>
<td width="50%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="50%"></td>
<td width="50%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="50%"></td>
<td width="50%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="50%"></td>
<td width="50%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="50%"></td>
<td width="50%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="50%"></td>
<td width="50%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="50%"></td>
<td width="50%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="50%"></td>
<td width="50%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="50%"></td>
<td width="50%"><?php echo artxModules($document, $positions[4], $style); ?></td>
</tr>
</table>
<?php
} else {
echo artxModules($document, $positions[0], $style);
echo artxModules($document, $positions[1], $style);
echo artxModules($document, $positions[2], $style);
echo artxModules($document, $positions[3], $style);
}
} elseif (count($positions) == 2) {
if (artxCountModules($document, $positions[0]) && artxCountModules($document, $positions[1])) {
?>
<?php
}
} // count($positions)
{
ob_start();
if (count($positions) == 4) {
if (artxCountModules($document, $positions[0])
&& artxCountModules($document, $positions[1])
&& artxCountModules($document, $positions[2])
&& artxCountModules($document, $positions[3]))
{
?>
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="25%"></td>
<td width="25%"></td>
<td width="25%"></td>
<td width="25%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="33%"></td>
<td width="33%"></td>
<td width="33%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="33%"></td>
<td width="33%"></td>
<td width="33%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="33%"></td>
<td width="33%"></td>
<td width="33%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="33%"></td>
<td width="33%"></td>
<td width="33%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="50%"></td>
<td width="50%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="50%"></td>
<td width="50%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="50%"></td>
<td width="50%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="50%"></td>
<td width="50%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="50%"></td>
<td width="50%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="50%"></td>
<td width="50%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="50%"></td>
<td width="50%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="50%"></td>
<td width="50%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="50%"></td>
<td width="50%">
<table class="position" cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td width="50%"></td>
<td width="50%"><?php echo artxModules($document, $positions[4], $style); ?></td>
</tr>
</table>
<?php
} else {
echo artxModules($document, $positions[0], $style);
echo artxModules($document, $positions[1], $style);
echo artxModules($document, $positions[2], $style);
echo artxModules($document, $positions[3], $style);
}
} elseif (count($positions) == 2) {
if (artxCountModules($document, $positions[0]) && artxCountModules($document, $positions[1])) {
?>
<?php
}
} // count($positions)
