$org = new org(); $business_orgs = $org->findAll_business(); if (count($business_orgs) == 0) { return false; } else { echo header('Content-Type: application/json'); echo json_encode($business_orgs); } } ?> <?php if (!empty($_GET['org_type']) && $_GET['org_type'] == 'inventory_org') { $org = new org(); $inventory_orgs = $org->findAll_inventory(); if (count($inventory_orgs) == 0) { return false; } else { echo json_encode($inventory_orgs); } } ?> <?php if (!empty($_GET['org_type']) && $_GET['org_type'] == 'legal_org') { $org = new org(); $legal_orgs = $org->findAll_legal(); if (count($legal_orgs) == 0) { return false; } else {
form::number_field_wid2sr('sys_profile_line_id'); ?> </td> <?php switch ($profile_level) { case 'SITE': echo "<td>"; echo $f->text_field('level_name', 'SITE', '', '', '', 1, 1) . '</td><td>'; break; case 'BUSINESS': echo "<td>"; echo $f->select_field_from_object('level_name', $org->findAll_business(), 'org_id', 'org', ${$class_second}->level_name, '', '', 1) . "</td><td>"; break; case 'INVENTORY': echo "<td>"; echo $f->select_field_from_object('level_name', $org->findAll_inventory(), 'org_id', 'org', ${$class_second}->level_name, '', '', 1) . "</td><td>"; break; case 'USER': echo '<td>'; echo $f->select_field_from_object('level_name', user::find_all(), 'user_id', 'username', ${$class_second}->level_name, '', '', 1) . "</td><td>"; break; } if (empty($line_values)) { echo $f->text_field_wid2('level_value') . '</td>'; } else { echo $f->select_field_from_object('level_value', $line_values, $line_key, $line_desc, ${$class_second}->level_value, '', '', '') . "</td>"; } ?> </tr> <?php $count = $count + 1;
<td><?php echo $f->select_field_from_object('sys_printer_id', sys_printer::find_all(), 'sys_printer_id', 'printer_name', ${$class}->sys_printer_id); ?> </td> <td> <?php $association_level = empty($bc_label_auto_trigger->association_level) ? $association_level : $bc_label_auto_trigger->association_level; switch ($association_level) { case 'SITE': echo $f->text_field('association_level_value', 'SITE', '', '', '', 1, 1); break; case 'BUSINESS': echo $f->select_field_from_object('association_level_value', $org->findAll_business(), 'org_id', 'org', ${$class}->association_level_value, '', '', 1); break; case 'INVENTORY': echo $f->select_field_from_object('association_level_value', $org->findAll_inventory(), 'org_id', 'org', ${$class}->association_level_value, '', '', 1); break; case 'FROM_SUBINV': $org_id_sub = null; if (!empty(${$class}->association_level_value)) { $subinv_i = subinventory::find_by_id(${$class}->association_level_value); $org_id_sub = $subinv_i->org_id; } echo $f->select_field_from_object('', $org->findAll_inventory(), 'org_id', 'org', $org_id_sub, '', 'org_id', 1); echo '</td><td>'; echo $f->select_field_from_object('association_level_value', subinventory::find_all(), 'subinventory_id', array('subinventory', 'org_id'), ${$class}->association_level_value, '', 'subinventory_id', 1); break; case 'USER': echo $f->select_field_from_object('association_level_value', user::find_all(), 'user_id', 'username', ${$class}->association_level_value, '', '', 1); break; }