$table->head[0] = __('Fullname'); $table->head[1] = __('Owner'); $table->head[2] = __('Company'); $table->head[3] = __('Updated at'); $table->head[4] = __('Country'); $table->head[5] = __('Progress'); $table->head[6] = __('Estimated sale'); $counter = 0; foreach ($leads as $lead) { $data = array(); $data[0] = "<a href='index.php?sec=customers&sec2=operation/leads/lead_detail&id=" . $lead["id"] . "'>" . $lead["fullname"] . "</a>"; $data[1] = $lead["owner"]; $data[2] = $lead["company"]; $data[3] = $lead["modification"]; $data[4] = $lead["country"]; $data[5] = translate_lead_progress($lead["progress"]); $data[6] = format_numeric($lead["estimated_sale"]); array_push($table->data, $data); } print_table($table); if ($section_write_permission || $section_manage_permission) { echo '<form method="post" action="index.php?sec=customers&sec2=operation/leads/lead_detail&id_company=' . $id . '">'; echo '<div style="width: ' . $table->width . '; text-align: right;">'; print_submit_button(__('Create'), 'new_btn', false, 'class="sub next"'); print_input_hidden('new', 1); echo '</div>'; echo '</form>'; } } } else { if ($op == 'projects') {
function combo_lead_progress($actual = 0, $disabled = 0, $label = "", $return = false) { $output = ''; $output .= '<div style="text-align:center;"><b>' . __($label) . ' </b></div>'; if ($disabled) { $output = translate_lead_progress($actual); if ($return) { return $output; } echo $output; return; } $output .= print_select(get_incident_origins(), 'incident_origin', $actual, '', __("None"), 0, true, false, false, __('Source')); if ($return) { return $output; } echo $output; }
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>"; $data[5] = translate_lead_progress ($lead['progress']) . " <i>(".$lead['progress']. "%)</i>"; if ($lead['estimated_sale'] != 0) $data[6] = format_numeric($lead['estimated_sale']); else $data[6] = "--"; $data[7] = "<img src='images/lang/".$lead["id_language"].".png'>"; $data[8] = ucfirst(strtolower($lead['country'])); $data[9] = "<span style='font-size: 9px' title='". $lead['creation'] . "'>" . human_time_comparation ($lead['creation']) . "</span>"; $data[9] .= "<br><span style='font-size: 9px'>". human_time_comparation ($lead['modification']). "</span>"; if ($lead['progress'] < 100 && $lead['owner'] == "") $data[10] = "<a href='index.php?sec=customers&sec2=operation/leads/lead&tab=search&id=". $lead['id']."&make_owner=1&offset=$offset'><img src='images/award_star_silver_1.png' title='".__("Take ownership of this lead")."'></a> ";