Ejemplo n.º 1
0
        $table->head = array();
        $table->head[0] = __('ID');
        $table->head[1] = __('Icon');
        $table->head[2] = __('Name');
        $table->head[3] = __('Description');
        $table->head[4] = __('Items');
        $table->head[5] = __('Delete');
        $table->style = array();
        $table->style[2] = 'font-weight: bold';
        $table->align = array();
        $table->align[5] = 'center';
        echo '<table width="99%" class="listing">';
        foreach ($products as $product) {
            $data = array();
            $data[0] = $product['id'];
            $data[1] = print_product_icon($product['id'], true);
            $data[2] = '&nbsp;&nbsp;<a href="index.php?sec=kb&sec2=operation/inventories/manage_prod&id=' . $product['id'] . '">' . $product['name'] . '</a>';
            $data[3] = substr($product["description"], 0, 200);
            $data[4] = get_db_value('COUNT(id)', 'tkb_data', 'id_product', $product['id']);
            $data[5] = '<a href=index.php?sec=kb&sec2=operation/inventories/manage_prod&delete_product=1&id=' . $product["id"] . ' onClick="if (!confirm(\'' . __('Are you sure?') . '\'))
				return false;"><img src="images/cross.png"></a>';
            array_push($table->data, $data);
        }
        print_table($table);
    }
    echo '<div style="width: ' . $table->width . '; text-align: right;">';
    echo '<form method="post">';
    print_input_hidden('create', 1);
    print_submit_button(__('Create'), 'crt_btn', false, 'class="sub next"');
    echo "</form></div>";
}
Ejemplo n.º 2
0
			
			// Detect is the lead is pretty old 
			// Stored in $config["lead_warning_time"] in days, need to calc in secs for this
			if (calendar_time_diff ($lead["modification"]) > $lead_warning_time ){
				$table->rowclass[] = "red_row";
			} else {
				$table->rowclass[] = "";
			}

			$data[0] = print_checkbox_extended ('leadcb-'.$lead['id'], $lead['id'], false, '', '', 'class="cb_lead"', true);

			$data[1] = "<b><a href='index.php?sec=customers&sec2=operation/leads/lead&tab=search&id=".
				$lead['id']."'>#".$lead['id']."</a></b>";


			$data[2] = print_product_icon ($lead['id_category'], true);

			if ($lead['executive_overview'] != '') {
				$overview = print_help_tip ($lead['executive_overview'], true);
			} else {
				$overview = '';
			}
 			$data[3] = "<a href='index.php?sec=customers&sec2=operation/leads/lead&tab=search&id=".
				$lead['id']."'>".$lead['fullname'].$overview."</a><br>";
				$data[3] .= "<span style='font-size: 9px'><i>".$lead["company"]."</i></span>";


			$data[4] = "<a href='index.php?sec=customers&sec2=operation/companies/company_detail&id=".$lead['id_company']."'>".get_db_value ('name', 'tcompany', 'id', $lead['id_company'])."</a>";
			if ($lead["owner"] != "")
				$data[4] .= "<br><i>" . $lead["owner"] . "</i>";