Пример #1
0
     }
 } else {
     $table_head = "";
 }
 $row_count = 0;
 if (isset($table_body)) {
     unset($table_body);
 }
 if ($myrow = mysql_fetch_array($result)) {
     do {
         $row_count++;
         $col_count = 0;
         foreach ($viewdef_array["fields"] as $field) {
             if ((!isset($field["show"]) or $field["show"] != "n") and (!isset($field["print"]) or $field["print"] = "n")) {
                 $col_count++;
                 $show_value_2 = ConvertSpecialField($myrow, $field, $db, "system");
                 //$show_value_2 = html_entity_decode ($show_value_2); /* >PHP 4.3 */
                 $show_value_1 = $field["head"];
                 //IF Horizontal Table-Layout
                 if (isset($viewdef_array["table_layout"]) and $viewdef_array["table_layout"] == "horizontal") {
                     $table_body[$row_count][$col_count] = $show_value_2;
                 } else {
                     $table_body[] = array($show_value_1, $show_value_2);
                 }
             }
         }
     } while ($myrow = mysql_fetch_array($result));
     if (isset($table_body) and is_array($table_body)) {
         if (isset($viewdef_array["table_layout"]) and $viewdef_array["table_layout"] == "horizontal") {
             $table_layout = $GLOBALS["table_layout_horizontal"];
         } else {
Пример #2
0
 if (isset($field["calculate"]) and $field["calculate"] == "y") {
     // Special field calculations here, for example warranty days.
     //
     if (isset($field["dell_warranty"]) and $field["dell_warranty"] == "y") {
         // allow another 10 seconds for this bit to complete
         set_time_limit(240);
         $show_value = $myrow["system_id_number"];
         //
         $this_dell_warranty_remaining = get_dell_warranty_days($show_value);
         // echo "..".$show_value."--" ;
         $myrow["dell_warranty"] = $this_dell_warranty_remaining;
         $show_value = $this_dell_warranty_remaining;
     }
 } else {
     // If this is not a calculated value, just show it
     $show_value = ConvertSpecialField($myrow, $field, $db, "list");
 }
 if (isset($field["link"]) and $field["link"] == "y") {
     if (!isset($get_array["title"])) {
         $get_array["title"] = $show_value;
     }
     echo "<a href=\"" . $link_uri . "\" title=\"" . $get_array["title"] . "\" onclick=\"" . $get_array["onclick"] . " ; this.target='" . $get_array["target"] . "';\" {$a_misc}>";
 }
 if (isset($field["image"]) and $field["image"] != "") {
     echo "<img src=\"" . $field["image"] . "\" style=\"border:0px;\" alt=\"\" />";
 } else {
     echo $show_value;
 }
 if (isset($field["link"]) and $field["link"] == "y") {
     echo "</a>\n";
 }