Exemplo n.º 1
0
    <td><?php 
echo GEN_EMAIL . ' ' . html_input_field('admin_email', $uInfo->admin_email, 'size="33"');
?>
</td>
   </tr>
   <tr>
    <td align="right"><?php 
echo TEXT_CONFIRM_PASSWORD . ' ' . html_password_field('password_conf', '');
?>
</td>
    <td><?php 
echo '&nbsp;';
?>
</td>
    <td><?php 
echo GEN_ACCOUNT_LINK . ' ' . html_pull_down_menu('account_id', gen_get_contact_array_by_type('e'), $uInfo->account_id, '');
?>
</td>
   </tr>
   <tr>
    <td><?php 
echo TEXT_SELECT_ROLE . ' ' . html_pull_down_menu('fill_role', $fill_all_roles, $uInfo->role, 'onchange="submitToDo(\'fill_role\')"');
?>
</td>
   </tr>
   </tbody>
  </table>
  </fieldset>

  <fieldset>
  <legend><?php 
Exemplo n.º 2
0
    echo TEXT_DEFAULT_PRICE_SHEET;
    ?>
</th>
	   		</tr>
	 	</thead>
		<tbody id="vendor_table_tbody">
		<?php 
    $odd = false;
    if (is_array($cInfo->purchase_array)) {
        foreach ($cInfo->purchase_array as $purchaseRow) {
            $i = rand();
            echo '<tr class="' . ($odd ? 'odd' : 'even') . '" id ="row_id_' . $i . '" >';
            echo '<td  width="5%">' . html_icon('emblems/emblem-unreadable.png', TEXT_DELETE, 'small', 'onclick="if (confirm(\'' . INV_MSG_DELETE_VENDOR_ROW . '\')) removeVendorRow(' . $i . ');"') . '</td>';
            echo html_hidden_field('row_id_array[]', $purchaseRow['id']);
            if (isset($cInfo->vendor_id) || $error) {
                echo '<td>' . html_pull_down_menu('vendor_id_array[]', gen_get_contact_array_by_type('v'), $purchaseRow['vendor_id']) . '</td>';
            } else {
                echo '<td></td>';
            }
            if (isset($cInfo->description_purchase) || $error) {
                echo '<td>' . html_textarea_field('description_purchase_array[]', 75, 2, $purchaseRow['description_purchase'], '', $reinsert_value = true) . '</td>';
            } else {
                echo '<td></td>';
            }
            if (isset($cInfo->item_cost) || $error) {
                echo '<td>' . html_input_field('item_cost_array[]', $currencies->precise($purchaseRow['item_cost']), 'onchange="what_to_update();" size="15" maxlength="20" style="text-align:right"', false) . '</td>';
            } else {
                echo '<td></td>';
            }
            if (isset($cInfo->item_cost) || $error) {
                echo '<td>' . html_input_field('purch_package_quantity_array[]', $currencies->precise($purchaseRow['purch_package_quantity']), 'size="6" maxlength="5" style="text-align:right"') . '</td>';
Exemplo n.º 3
0
 $FirstValue = 'var FirstValue = new Array();' . chr(10);
 $FirstId = 'var FirstId = new Array();' . chr(10);
 $SecondField = 'var SecondField = new Array();' . chr(10);
 $SecondFieldValue = 'var SecondFieldValue = new Array();' . chr(10);
 $SecondFieldId = 'var SecondFieldId = new Array();' . chr(10);
 while (!$result->EOF) {
     if (in_array($result->fields['field_name'], array('vendor_id', 'description_purchase', 'item_cost', 'purch_package_quantity', 'purch_taxable', 'price_sheet_v'))) {
         $append = 'p.';
     } else {
         $append = 'a.';
     }
     $FirstValue .= 'FirstValue[' . $i . '] = "' . $result->fields['description'] . '";' . chr(10);
     $FirstId .= 'FirstId[' . $i . '] = "' . $append . $result->fields['field_name'] . '";' . chr(10);
     switch ($result->fields['field_name']) {
         case 'vendor_id':
             $contacts = gen_get_contact_array_by_type('v');
             $tempValue = 'Array("';
             $tempId = 'Array("';
             while ($contact = array_shift($contacts)) {
                 $tempValue .= $contact['id'] . '","';
                 $tempId .= str_replace(array("/", "'", chr(34)), ' ', $contact['text']) . '","';
             }
             $tempValue .= '")';
             $tempId .= '")';
             $SecondField .= 'SecondField["' . $append . $result->fields['field_name'] . '"] = "drop_down";' . chr(10);
             $SecondFieldValue .= 'SecondFieldValue["' . $append . $result->fields['field_name'] . '"] = ' . $tempValue . ';' . chr(10);
             $SecondFieldId .= 'SecondFieldId["' . $append . $result->fields['field_name'] . '"] = ' . $tempId . ';' . chr(10);
             break;
         case 'inventory_type':
             $tempValue = 'Array("';
             $tempId = 'Array("';
Exemplo n.º 4
0
	var newRow  = document.getElementById('vendor_table_tbody').insertRow(-1);
	var rowCnt  = newRow.rowIndex - 2;
	var odd 	= (newRow.rowIndex%2 == 0) ? 'even' : 'odd';
	newRow.setAttribute("className", odd);
	newRow.setAttribute("class", odd);
	var rowId = Math.floor((Math.random()*100)+1);
	newRow.setAttribute("id", "row_id_"+rowId );
	cell    = buildIcon(icon_path+'16x16/emblems/emblem-unreadable.png', image_delete_text, 'onclick="if (confirm(\'<?php 
echo INV_MSG_DELETE_VENDOR_ROW;
?>
\')) removeVendorRow('+rowId+');"');
	newCell = newRow.insertCell(-1);
	newCell.innerHTML = cell;
	<?php 
if (isset($cInfo->vendor_id)) {
    echo "cell  ='" . str_replace("'", "\\'", html_pull_down_menu('vendor_id_array[]', gen_get_contact_array_by_type('v'), $cInfo->vendor_id)) . "';" . chr(13);
} else {
    echo "cell  ='';" . chr(13);
}
?>
	newCell = newRow.insertCell(-1);
	newCell.innerHTML = cell;
	<?php 
if (isset($cInfo->description_purchase)) {
    echo "cell  ='" . str_replace("'", "\\'", html_textarea_field('description_purchase_array[]', 75, 2, $cInfo->description_purchase, '', $reinsert_value = true)) . "';" . chr(13);
} else {
    echo "cell  ='';" . chr(13);
}
?>
	newCell = newRow.insertCell(-1);
	newCell.innerHTML = cell;
Exemplo n.º 5
0
 function build_form_html($action, $id = '')
 {
     global $db;
     if ($action != 'new' && $this->error == false) {
         $sql = "select description_short, description_long, account_id, vendor_id, tax_rate \n\t       from " . $this->db_table . " where tax_auth_id = " . $id;
         $result = $db->Execute($sql);
         foreach ($result->fields as $key => $value) {
             $this->{$key} = $value;
         }
     }
     $output = '<table style="border-collapse:collapse;margin-left:auto; margin-right:auto;">' . chr(10);
     $output .= '  <thead class="ui-widget-header">' . "\n";
     $output .= '  <tr>' . chr(10);
     $output .= '    <th colspan="2">' . ($action == 'new' ? SETUP_INFO_HEADING_NEW_TAX_AUTH : SETUP_INFO_HEADING_EDIT_TAX_AUTH) . '</th>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  </thead>' . "\n";
     $output .= '  <tbody class="ui-widget-content">' . "\n";
     $output .= '  <tr>' . chr(10);
     $output .= '    <td colspan="2">' . ($action == 'new' ? SETUP_TAX_AUTH_INSERT_INTRO : SETUP_TAX_AUTH_EDIT_INTRO) . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '    <td>' . SETUP_INFO_DESC_SHORT . '</td>' . chr(10);
     $output .= '    <td>' . html_input_field('description_short', $this->description_short, 'size="16" maxlength="15"') . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '    <td>' . SETUP_INFO_DESC_LONG . '</td>' . chr(10);
     $output .= '    <td>' . html_input_field('description_long', $this->description_long, 'size="33" maxlength="64"') . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '    <td>' . SETUP_INFO_GL_ACCOUNT . '</td>' . chr(10);
     $output .= '    <td>' . html_pull_down_menu('account_id', gen_coa_pull_down(), $this->account_id) . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '    <td>' . SETUP_INFO_VENDOR_ID . '</td>' . chr(10);
     $output .= '    <td>' . html_pull_down_menu('vendor_id', gen_get_contact_array_by_type('v'), $this->vendor_id) . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '    <td>' . SETUP_INFO_TAX_RATE . '</td>' . chr(10);
     $output .= '    <td>' . html_input_field('tax_rate', $this->tax_rate) . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  </tbody>' . "\n";
     $output .= '</table>' . chr(10);
     return $output;
 }