Exemplo n.º 1
0
function outputTable($data, $column_headings_array = null, $print_keys = false)
{
    if (empty($data)) {
        return "No Data Found...";
    }
    if ($print_keys !== true) {
        $print_keys = false;
    }
    $table_string = '<table class="table table-striped">';
    if (is_array($column_headings_array)) {
        // Output headings for table
        $table_string .= outputRow($column_headings_array, true, false, null);
    }
    if (is_array($data) || is_object($data)) {
        // Output rows in $data
        foreach ($data as $key => $row) {
            $table_string .= outputRow($row, false, $print_keys, $key);
        }
    }
    $table_string .= "</table>";
    return $table_string;
}
Exemplo n.º 2
0
function outputTable($title, $node, $type_filter, $empty_message)
{
    print "<table cellspacing=0 cellpadding=0 border=0 width=95% align=center>" . "   <tr>" . "       <td width=7><img src='../Common/Images/blue_01.gif' width=7 height=7 alt=''></td><td background='../Common/Images/blue_02.gif'><img src='../Common/Images/blue_02.gif' width=7 height=7 alt=''></td>" . "       <td width=7><img src='../Common/Images/blue_03.gif' width=7 height=7 alt=''></td></tr><tr><td background='../Common/Images/blue_04.gif'><img src='../Common/Images/blue_04.gif' width=7 height=7 alt=''></td>" . "       <td bgcolor='#D3E6FE'>" . "           <table border='0' cellspacing='0' cellpadding='0' width='100%'><tr><td><span class='mainSubTitle'>" . $title . "</span></td></tr></table>" . "       </td>" . "       <td background='../Common/Images/blue_06.gif'><img src='../Common/Images/blue_06.gif' width=7 height=7 alt=''></td>" . "   </tr>" . "   <tr>" . "       <td width=7><img src='../Common/Images/blue_white_07.gif' width=7 height=7 alt=''></td>" . "       <td background='../Common/Images/blue_08.gif'><img src='../Common/Images/blue_08.gif' width=7 height=7 alt=''></td>" . "       <td width=7><img src='../Common/Images/blue_white_09.gif' width=7 height=7 alt=''></td>" . "   </tr>" . "   <tr>" . "       <td background='../Common/Images/white_04.gif'><img src='../Common/Images/white_04.gif' width=7 height=7 alt=''></td>" . "       <td bgcolor='white' style='padding-top:6px;'>" . "           <table border='0' width='100%'>";
    foreach ($node->children as $child) {
        if ($child->child->type == $type_filter) {
            outputRow($child->child);
        }
    }
    print "         </table>" . "      </td>" . "      <td background='../Common/Images/white_06.gif'><img src='../Common/Images/white_06.gif' width=7 height=7 alt=''></td>" . "   </tr>" . "   <tr>" . "      <td width=7><img src='../Common/Images/white_07.gif' width=7 height=7 alt=''></td>" . "      <td background='../Common/Images/white_08.gif'><img src='../Common/Images/white_08.gif' width=7 height=7 alt=''></td>" . "      <td width=7><img src='../Common/Images/white_09.gif' width=7 height=7 alt=''></td>" . "   </tr>" . "</table>";
}