function display_array_content_style($arrayname, $method, $base_url) { $a = ""; sort($arrayname); while (list($key, $value) = each($arrayname)) { if (is_array($value)) { $c = display_array_content($value, ''); $d = ltrim($c, "0"); $d = str_replace("-", "", $c); $a .= "<a id='modal_window_link' href='" . $base_url . "output/print.output.php?section=styles&view=" . $c . "&tb=true'>" . $d . "</a>"; } else { $e = ltrim($value, "0"); $e = str_replace("-", "", $value); $a .= "<a id='modal_window_link' href='" . $base_url . "output/print.output.php?section=styles&view=" . $value . "&tb=true'>" . $e . "</a>"; } if ($method == "1") { $a .= ""; } if ($method == "2") { $a .= " "; } if ($method == "3") { $a .= ", "; } } $b = rtrim($a, " "); $b = rtrim($b, " "); return $b; }
function display_array_content($arrayname, $method) { $a = ""; while (list($key, $value) = each($arrayname)) { if (is_array($value)) { $a .= display_array_content($value, ''); } else { $a .= "{$value}"; } if ($method == "1") { $a .= ""; } if ($method == "2") { $a .= ", "; } if ($method == "3") { $a .= ","; } } $b = rtrim($a, ", "); return $b; }
} ?> <?php if ($action != "print" && $dbTable == "default") { ?> <th class="dataHeading bdr1B">Actions</th> <?php } ?> </tr> </thead> <tbody> <?php do { $a = array(get_table_info(1, "list", $row_tables['id'], $dbTable, "default")); $styles = display_array_content($a, 1); $received = get_table_info(1, "count_total", $row_tables['id'], $dbTable, "default"); $scored = get_table_info(1, "score_total", $row_tables['id'], $dbTable, "default"); if ($received > $scored) { $scored = "<span style='color:red;' title='Not all received entries have been scored!'>" . $scored . "</span>"; } else { $scored = $scored; } $assigned_judges = assigned_judges($row_tables['id'], $dbTable, $judging_assignments_db_table); $assigned_stewards = assigned_stewards($row_tables['id'], $dbTable, $judging_assignments_db_table); ?> <tr> <td <?php if ($action == "print") { echo "class='bdr1B'"; }
} elseif ($_POST['eid' . $id] >= 10000 && $_POST['eid' . $id] <= 99999) { $eid = ltrim($_POST['eid' . $id], "0"); } else { $eid = $_POST['eid' . $id]; } $entries_updated[] = number_pad($_POST['eid' . $id], 6); } else { if ($_POST['eid' . $id] < 9) { $eid = ltrim($_POST['eid' . $id], "000"); } elseif ($_POST['eid' . $id] >= 10 && $_POST['eid' . $id] <= 99) { $eid = ltrim($_POST['eid' . $id], "00"); } elseif ($_POST['eid' . $id] >= 100 && $_POST['eid' . $id] <= 999) { $eid = ltrim($_POST['eid' . $id], "0"); } else { $eid = $_POST['eid' . $id]; } $entries_updated[] = number_pad($_POST['eid' . $id], 4); } if ($_POST['brewPaid' . $id] == 1) { $brewPaid = 1; } else { $brewPaid = $row_enum['brewPaid']; } $updateSQL = sprintf("UPDATE %s SET brewReceived='1', brewJudgingNumber='%s', brewBoxNum='%s', brewPaid='%s' WHERE id='%s';", $brewing_db_table, $judging_number, $_POST['box' . $id], $brewPaid, $eid); $result = mysql_query($updateSQL, $brewing) or die(mysql_error()); //echo $updateSQL."<br>"; } } } $entry_list .= display_array_content($entries_updated, 2); }