\n"; $button .= "\n"; if ($currentModule == 'Accounts') $button .= "\n\n"; $button .= "\n"; $button .= "\n"; $button .= "\n"; $button .= "\n"; $button .= " "; if ($currentModule == 'Contacts') { if (isset($focus->primary_address_street)) $button .= "\n"; if (isset($focus->primary_address_city)) $button .= "\n"; if (isset($focus->primary_address_state)) $button .= "\n"; if (isset($focus->primary_address_country)) $button .= "\n"; if (isset($focus->primary_address_postalcode)) $button .= "\n"; $button .= "\n"; $button .= "\n"; $button .= "\n"; $button .= "\n"; $button .= "account_id';this.form.account_name.value='$focus->account_name'; this.form.reports_to_id.value='$focus->id';this.form.reports_to_name.value='$focus->first_name $focus->last_name'\" type='submit' name='button' value=' ".$app_strings['LBL_NEW_BUTTON_LABEL']." '>\n"; $button .= "\n"; } elseif ($currentModule == 'Accounts') { if (isset($focus->billing_address_street)) $button .= "\n"; if (isset($focus->billing_address_city)) $button .= "\n"; if (isset($focus->billing_address_state)) $button .= "\n"; if (isset($focus->billing_address_country)) $button .= "\n"; if (isset($focus->billing_address_postalcode)) $button .= "\n"; $button .= "\n"; $button .= "\n"; } else { $button .= "\n"; $button .= "\n"; } $button .= "
\n"; // Stick the form header out there. if ($currentModule != 'Contacts') { echo get_form_header($current_module_strings['LBL_MODULE_NAME'], $button, false); $xtpl=new XTemplate ('modules/Contacts/SubPanelView.html'); } else { echo get_form_header($current_module_strings['LBL_DIRECT_REPORTS_FORM_NAME'], $button, false); $xtpl=new XTemplate ('modules/Contacts/SubPanelViewDirectReport.html'); } $xtpl->assign("MOD", $current_module_strings); $xtpl->assign("APP", $app_strings); $xtpl->assign("IMAGE_PATH", $image_path); $xtpl->assign("RETURN_URL", "&return_module=$currentModule&return_action=DetailView&return_id=$focus->id"); $oddRow = true; foreach($focus_list as $contact) { $contact_fields = array( 'YAHOO_ID' => $contact->yahoo_id, 'FIRST_NAME' => $contact->first_name, 'LAST_NAME' => $contact->last_name, 'ACCOUNT_NAME' => $contact->account_name, 'ID' => $contact->id, 'EMAIL' => $contact->email1, 'PHONE_WORK' => $contact->phone_work ); $xtpl->assign("CONTACT", $contact_fields); if($oddRow) { //todo move to themes $xtpl->assign("ROW_COLOR", 'oddListRow'); } else { //todo move to themes $xtpl->assign("ROW_COLOR", 'evenListRow'); } $oddRow = !$oddRow; // If there is a YMId, parse that row if(isset($contact->yahoo_id) && $contact->yahoo_id != '') $xtpl->parse("main.row.yahoo_id"); else $xtpl->parse("main.row.no_yahoo_id"); $xtpl->parse("main.row"); // Put the rows in. } $xtpl->parse("main"); $xtpl->out("main"); // Stick on the form footer echo get_form_footer(); ?>