Ejemplo n.º 1
0
 function build_form_html($action, $id = '')
 {
     global $db, $messageStack, $currencies, $integer_lengths, $decimal_lengths, $check_box_choices;
     if ($action != 'new' && $this->error == false) {
         $result = $db->Execute("select * from " . TABLE_EXTRA_FIELDS . " where id='{$this->id}'");
         $params = unserialize($result->fields['params']);
         foreach ($result->fields as $key => $value) {
             $this->{$key} = $value;
         }
         if (is_array($params)) {
             foreach ($params as $key => $value) {
                 $this->{$key} = $value;
             }
         }
         switch ($this->entry_type) {
             case 'data_list':
             case 'multi_check_box':
             case 'drop_down':
             case 'radio':
                 $this->radio_default = $this->default;
                 break;
             case 'hyperlink':
             case 'image_link':
             case 'inventory_link':
                 $this->link_default = $this->default;
                 break;
             case 'text':
             case 'html':
                 $this->text_default = $this->default;
                 break;
             case 'decimal':
                 $this->decimal_range = $this->select;
                 $this->decimal_default = number_format($this->default, $this->display, $currencies->currencies[DEFAULT_CURRENCY]['decimal_point'], $currencies->currencies[DEFAULT_CURRENCY]['thousands_point']);
                 $this->decimal_display = $this->display;
                 break;
             case 'integer':
                 $this->integer_range = $this->select;
                 $this->integer_default = $this->default;
                 break;
             case 'check_box':
                 $this->check_box_range = $this->select;
                 break;
         }
     }
     // build the tab list
     $tab_list = gen_build_pull_down(xtra_field_get_tabs($this->module));
     array_shift($tab_list);
     if ($action == 'new' && sizeof($tab_list) < 1) {
         $messageStack->add(EXTRA_FIELDS_ERROR_NO_TABS, 'error');
     }
     $choices = explode(':', $params[$this->type_params]);
     $disabled = $this->tab_id !== '0' ? '' : 'disabled="disabled" ';
     $readonly = $this->tab_id !== '0' ? '' : 'readonly="readonly" ';
     $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' ? TEXT_NEW_FIELD : TEXT_SETTINGS) . '</th>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  </thead>' . "\n";
     $output .= '  <tbody class="ui-widget-content">' . "\n";
     $output .= '  <tr>' . chr(10);
     $output .= '	<td>' . INV_FIELD_NAME . '</td>' . chr(10);
     $output .= '	<td>' . html_input_field('field_name', $this->field_name, $readonly . 'size="33" maxlength="32"') . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '	<td colspan="2">' . INV_FIELD_NAME_RULES . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '	<td>' . TEXT_DESCRIPTION . '</td>' . chr(10);
     $output .= '	<td>' . html_input_field('description', $this->description, 'size="65" maxlength="64"') . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '	<td>' . TEXT_SORT_ORDER . '</td>' . chr(10);
     $output .= '	<td>' . html_input_field('sort_order', $this->sort_order, 'size="65" maxlength="64"') . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '	<td>' . TEXT_GROUP . '</td>' . chr(10);
     $output .= '	<td>' . html_input_field('group_by', $this->group_by, 'size="65" maxlength="64"') . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     if (is_array($this->type_array)) {
         $output .= '  <tr>' . chr(10);
         $output .= '	<td>' . $this->type_desc . '</td>' . chr(10);
         $output .= '	<td>';
         while ($type = array_shift($this->type_array)) {
             if (!is_array($choices)) {
                 $output .= html_checkbox_field('type_' . $type['id'], true, false, '', '') . $type['text'];
                 $output .= '<br />';
             } elseif (in_array($type['id'], $choices)) {
                 $output .= html_checkbox_field('type_' . $type['id'], true, true, '', '') . $type['text'];
                 $output .= '<br />';
             } else {
                 $output .= html_checkbox_field('type_' . $type['id'], true, false, '', '') . $type['text'];
                 $output .= '<br />';
             }
         }
         $output .= '	</td>';
         $output .= '</tr>' . chr(10);
     }
     $output .= '  <tr>' . chr(10);
     $output .= '	<td>' . INV_CATEGORY_MEMBER . '</td>' . chr(10);
     $output .= '	<td>' . html_pull_down_menu('tab_id', $tab_list, $this->tab_id, $disabled) . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr class="ui-widget-header">' . chr(10);
     $output .= '	<th colspan="2">' . TEXT_PROPERTIES . '</th>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '	<td>';
     $output .= html_radio_field('entry_type', 'text', $this->entry_type == 'text' ? true : false, '', $disabled) . '&nbsp;' . INV_LABEL_TEXT_FIELD . '<br />';
     $output .= html_radio_field('entry_type', 'html', $this->entry_type == 'html' ? true : false, '', $disabled) . '&nbsp;' . INV_LABEL_HTML_TEXT_FIELD . '</td>' . chr(10);
     $output .= '	<td>' . INV_LABEL_MAX_NUM_CHARS;
     $output .= '<br />' . html_input_field('length', $this->length ? $this->length : DEFAULT_TEXT_LENGTH, $readonly . 'size="10" maxlength="9"');
     $output .= '<br />' . INV_LABEL_DEFAULT_TEXT_VALUE . '<br />' . INV_LABEL_MAX_255;
     $output .= '<br />' . html_textarea_field('text_default', 35, 6, $this->text_default, $readonly);
     $output .= '	</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr class="ui-widget-content">' . chr(10);
     $output .= '	<td>';
     $output .= html_radio_field('entry_type', 'hyperlink', $this->entry_type == 'hyperlink' ? true : false, '', $disabled) . '&nbsp;' . INV_LABEL_HYPERLINK . '<br />';
     $output .= html_radio_field('entry_type', 'image_link', $this->entry_type == 'image_link' ? true : false, '', $disabled) . '&nbsp;' . INV_LABEL_IMAGE_LINK . '<br />';
     $output .= html_radio_field('entry_type', 'inventory_link', $this->entry_type == 'inventory_link' ? true : false, '', $disabled) . '&nbsp;' . INV_LABEL_INVENTORY_LINK;
     $output .= '	</td>' . chr(10);
     $output .= '	<td>' . INV_LABEL_FIXED_255_CHARS;
     $output .= '<br />' . INV_LABEL_DEFAULT_TEXT_VALUE;
     $output .= '<br />' . html_textarea_field('link_default', 35, 3, $this->link_default, $readonly);
     $output .= '	</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '	<td>' . html_radio_field('entry_type', 'integer', $this->entry_type == 'integer' ? true : false, '', $disabled) . '&nbsp;' . INV_LABEL_INTEGER_FIELD . '</td>' . chr(10);
     $output .= '	<td>' . INV_LABEL_INTEGER_RANGE;
     $output .= '<br />' . html_pull_down_menu('integer_range', gen_build_pull_down($integer_lengths), $this->integer_range, $disabled);
     $output .= '<br />' . INV_LABEL_DEFAULT_TEXT_VALUE . html_input_field('integer_default', $this->integer_default, $readonly . 'size="16"');
     $output .= '	</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr class="ui-widget-content">' . chr(10);
     $output .= '	<td>' . html_radio_field('entry_type', 'decimal', $this->entry_type == 'decimal' ? true : false, '', $disabled) . '&nbsp;' . INV_LABEL_DECIMAL_FIELD . '</td>' . chr(10);
     $output .= '	<td>' . INV_LABEL_DECIMAL_RANGE;
     $output .= html_pull_down_menu('decimal_range', gen_build_pull_down($decimal_lengths), $this->decimal_range, $disabled);
     $output .= '<br />' . INV_LABEL_DEFAULT_DISPLAY_VALUE . html_input_field('decimal_display', $this->decimal_display ? $this->decimal_display : DEFAULT_REAL_DISPLAY_FORMAT, $readonly . 'size="6" maxlength="5"');
     $output .= '<br />' . INV_LABEL_DEFAULT_TEXT_VALUE . html_input_field('decimal_default', $this->decimal_default, $readonly . 'size="16"');
     $output .= '	</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '	<td>';
     $output .= html_radio_field('entry_type', 'multi_check_box', $this->entry_type == 'multi_check_box' ? true : false, '', $disabled) . '&nbsp;' . INV_LABEL_MULTI_SELECT_FIELD . '<br />';
     $output .= html_radio_field('entry_type', 'drop_down', $this->entry_type == 'drop_down' ? true : false, '', $disabled) . '&nbsp;' . INV_LABEL_DROP_DOWN_FIELD . '<br />';
     $output .= html_radio_field('entry_type', 'data_list', $this->entry_type == 'data_list' ? true : false, '', $disabled) . '&nbsp;' . TEXT_DATA_LIST . '<br />';
     $output .= html_radio_field('entry_type', 'radio', $this->entry_type == 'radio' ? true : false, '', $disabled) . '&nbsp;' . INV_LABEL_RADIO_FIELD;
     $output .= '	</td>' . chr(10);
     $output .= '	<td>' . INV_LABEL_CHOICES . '<br />' . html_textarea_field('radio_default', 35, 6, $this->radio_default, $readonly) . '<br />';
     $output .= INV_LABEL_RADIO_EXPLANATION . '<br />' . TEXT_DATA_LIST_EXPLANATION . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr class="ui-widget-content">' . chr(10);
     $output .= '	<td>' . html_radio_field('entry_type', 'check_box', $this->entry_type == 'check_box' ? true : false, '', $disabled) . '&nbsp;' . INV_LABEL_CHECK_BOX_FIELD . '</td>' . chr(10);
     $output .= '	<td>' . INV_LABEL_DEFAULT_TEXT_VALUE . html_pull_down_menu('check_box_range', gen_build_pull_down($check_box_choices), $this->check_box_range, $disabled) . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '   <td>';
     $output .= html_radio_field('entry_type', 'date', $this->entry_type == 'date' ? true : false, '', $disabled) . '&nbsp;' . TEXT_DATE . '<br />';
     $output .= html_radio_field('entry_type', 'time', $this->entry_type == 'time' ? true : false, '', $disabled) . '&nbsp;' . TEXT_TIME . '<br />';
     $output .= html_radio_field('entry_type', 'date_time', $this->entry_type == 'date_time' ? true : false, '', $disabled) . '&nbsp;' . INV_LABEL_DATE_TIME_FIELD . '<br />';
     $output .= html_radio_field('entry_type', 'time_stamp', $this->entry_type == 'time_stamp' ? true : false, '', $disabled) . '&nbsp;' . INV_LABEL_TIME_STAMP_FIELD;
     $output .= '   </td>' . chr(10);
     $output .= '	<td>' . INV_LABEL_TIME_STAMP_VALUE . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  </tbody>' . "\n";
     $output .= '</table>' . chr(10);
     return $output;
 }
Ejemplo n.º 2
0
?>
	    <?php 
echo TEXT_NO . ' ' . html_radio_field('capa_closed', 'n', $cInfo->capa_closed == 'n' ? true : false);
?>
	  </td>
	  <td align="right"><?php 
echo TEXT_NEW_CAPA_NUMBER;
?>
</td>
	  <td><?php 
echo html_input_field('next_capa_num', $cInfo->next_capa_num, 'size="12" maxlength="10"');
?>
</td>
	</tr>
	<tr>
	  <td align="right" valign="top"><?php 
echo TEXT_AUDIT_NOTES;
?>
</td>
	  <td colspan="4"><?php 
echo html_textarea_field('notes_audit', 80, 3, $cInfo->notes_audit, '', true);
?>
</td>
	</tr>
  </table>
</fieldset>
<?php 
echo $hidden_fields;
?>
</form>
	  <td class="main" align="right"><?php 
echo TEXT_RECEIVE_TRACKING_NUM;
?>
</td>
	  <td class="main"><?php 
echo html_input_field('receive_tracking', $cInfo->receive_tracking);
?>
 </td>
	</tr>
	<tr>
	  <td class="main" align="right" valign="top"><?php 
echo TEXT_RECEIVE_NOTES;
?>
</td>
	  <td colspan="3" class="main"><?php 
echo html_textarea_field('receive_notes', true, 60, 3, $cInfo->receive_notes, '', $reinsert_value = true);
?>
</td>
	</tr>
  </table>
  <table border="0" cellspacing="0" cellpadding="0"><tr>
	<td id="productList" class="formArea">
	  <table id="item_table" width="100%" border="1" cellpadding="1" cellspacing="1">
        <tr>
          <th class="dataTableHeadingContent" align="center"><?php 
echo html_icon('emblems/emblem-unreadable.png', TEXT_DELETE, 'small');
?>
</th>
          <th class="dataTableHeadingContent" align="center"><?php 
echo TEXT_QUANTITY;
?>
Ejemplo n.º 4
0
} elseif ($security_level > 1 && !$locked) {
    $docbar->icon_list['lock'] = array('show' => true, 'icon' => 'actions/system-lock-screen.png', 'params' => 'onclick="docAction(\'lock\')"', 'text' => TEXT_LOCK_DOC, 'order' => 50);
}
if ($security_level > 2 && !$checked_out) {
    $docbar->icon_list['check_out'] = array('show' => true, 'icon' => 'actions/mail-forward.png', 'params' => 'onclick="submitSeq(' . $id . ',\'check_out\', true)"', 'text' => TEXT_CHECKOUT_DOC, 'order' => 60);
}
if ($security_level > 3 && $checked_out && $checkout_id == $_SESSION['admin_id']) {
    $docbar->icon_list['del_checkout'] = array('show' => true, 'icon' => 'actions/mail-mark-not-junk.png', 'params' => 'onclick="submitSeq(' . $id . ',\'del_checkout\')"', 'text' => TEXT_CANCEL_CHECKOUT, 'order' => 65);
}
$fieldset_content .= $docbar->build_toolbar() . chr(10);
$fieldset_content .= html_hidden_field('id', $doc_details->fields['id']) . chr(10);
$fieldset_content .= TEXT_DOCUMENT . html_input_field('title', $doc_details->fields['title'], 'size="64"') . chr(10);
// build the table contents
$fieldset_content .= '<table width="100%" cellspacing="0" cellpadding="4">' . chr(10);
$fieldset_content .= '<tr><td colspan="2">' . $dir_path . '</td></tr>' . chr(10);
$fieldset_content .= '<tr><td colspan="2">' . html_textarea_field('description', 75, 3, $doc_details->fields['description'], '', true) . '</td></tr>' . chr(10);
$fieldset_content .= '<tr><td colspan="2">' . TEXT_UPLOAD_FILE . ' ' . html_file_field('docfile') . '</td></tr>' . chr(10);
// column 1
$fieldset_content .= '<tr><td width="50%" valign="top">' . chr(10);
$fieldset_content .= '  <table class="ui-widget" style="border-collapse:collapse;width:100%">';
$fieldset_content .= '  <thead class="ui-widget-header">' . chr(10);
$fieldset_content .= '  <tr>' . chr(10);
$fieldset_content .= '    <th colspan="2">' . TEXT_PROPERTIES . '</th>' . chr(10);
$fieldset_content .= '  </tr>' . chr(10);
$fieldset_content .= '  </thead>' . chr(10);
$fieldset_content .= '  <tbody class="ui-widget-content">' . chr(10);
$fieldset_content .= '  <tr>' . chr(10);
$fieldset_content .= '    <td>' . TEXT_FILENAME . '</td>' . chr(10);
$fieldset_content .= '    <td>' . $doc_details->fields['file_name'] . '</td>' . chr(10);
$fieldset_content .= '  </tr><tr>' . chr(10);
$fieldset_content .= '    <td>' . TEXT_OWNER . '</td>' . chr(10);
// | but WITHOUT ANY WARRANTY; without even the implied warranty of  |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   |
// | GNU General Public License for more details.                    |
// |                                                                 |
// | The license that is bundled with this package is located in the |
// | file: /doc/manual/ch01-Introduction/license.html.               |
// | If not, see http://www.gnu.org/licenses/                        |
// +-----------------------------------------------------------------+
//  Path: /modules/accounts/pages/main/template_j_notes.php
//
?>
<div id="cat_notes" class="tabset_content">
  <h2 class="tabset_label"><?php 
echo TEXT_NOTES;
?>
</h2>
  <fieldset class="formAreaTitle">
    <legend><?php 
echo TEXT_NOTES;
?>
</legend>
    <table border="0" width="100%" cellspacing="6" cellpadding="0">
	  <tr>
	    <td><?php 
echo html_textarea_field('jm_notes', 120, 30, $cInfo->jm_notes);
?>
</td>
	  </tr>
	</table>
  </fieldset>
</div>
Ejemplo n.º 6
0
 function build_form_html($action, $id = '')
 {
     global $db, $messageStack;
     global $integer_lengths, $decimal_lengths, $check_box_choices;
     $cInfo = '';
     if ($action != 'new') {
         $result = $db->Execute("select id, entry_type, field_name, description, id, params \n\t    from " . TABLE_EXTRA_FIELDS . " where id = '" . $id . "'");
         $params = unserialize($result->fields['params']);
         foreach ($params as $key => $value) {
             $result->fields[$key] = $value;
         }
         $form_array = xtra_field_prep_form($result->fields);
         $cInfo = new objectInfo($form_array);
     }
     // build the tab list
     $tab_list = gen_build_pull_down(xtra_field_get_tabs('assets'));
     array_shift($tab_list);
     if ($action == 'new' && sizeof($tab_list) < 1) {
         $messageStack->add(EXTRA_FIELDS_ERROR_NO_TABS, 'error');
         echo $messageStack->output();
     }
     $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' ? TEXT_NEW_FIELD : TEXT_EDIT_FIELD) . '</th>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  </thead>' . "\n";
     $output .= '  <tbody class="ui-widget-content">' . "\n";
     $output .= '  <tr>' . chr(10);
     $output .= '	<td>' . INV_FIELD_NAME . '</td>' . chr(10);
     $output .= '	<td>' . html_input_field('field_name', $cInfo->field_name, 'size="33" maxlength="32"') . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '	<td colspan="2">' . INV_FIELD_NAME_RULES . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '	<td>' . TEXT_DESCRIPTION . '</td>' . chr(10);
     $output .= '	<td>' . html_input_field('description', $cInfo->description, 'size="65" maxlength="64"') . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '	<td>' . INV_CATEGORY_MEMBER . '</td>' . chr(10);
     $output .= '	<td>' . html_pull_down_menu('tab_id', $tab_list, $cInfo->tab_id) . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr class="ui-widget-header">' . chr(10);
     $output .= '	<th colspan="2">' . TEXT_PROPERTIES . '</th>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '	<td>';
     $output .= html_radio_field('entry_type', 'text', $cInfo->entry_type == 'text' ? true : false) . '&nbsp;' . INV_LABEL_TEXT_FIELD . '<br />';
     $output .= html_radio_field('entry_type', 'html', $cInfo->entry_type == 'html' ? true : false) . '&nbsp;' . INV_LABEL_HTML_TEXT_FIELD . '</td>' . chr(10);
     $output .= '	<td>' . INV_LABEL_MAX_NUM_CHARS;
     $output .= '<br />' . html_input_field('text_length', $cInfo->text_length ? $cInfo->text_length : DEFAULT_TEXT_LENGTH, 'size="10" maxlength="9"');
     $output .= '<br />' . INV_LABEL_DEFAULT_TEXT_VALUE . '<br />' . INV_LABEL_MAX_255;
     $output .= '<br />' . html_textarea_field('text_default', 35, 6, $cInfo->text_default);
     $output .= '	</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '	<td>';
     $output .= html_radio_field('entry_type', 'hyperlink', $cInfo->entry_type == 'hyperlink' ? true : false) . '&nbsp;' . INV_LABEL_HYPERLINK . '<br />';
     $output .= html_radio_field('entry_type', 'image_link', $cInfo->entry_type == 'image_link' ? true : false) . '&nbsp;' . INV_LABEL_IMAGE_LINK . '<br />';
     $output .= html_radio_field('entry_type', 'inventory_link', $cInfo->entry_type == 'inventory_link' ? true : false) . '&nbsp;' . INV_LABEL_INVENTORY_LINK;
     $output .= '	</td>' . chr(10);
     $output .= '	<td>' . INV_LABEL_FIXED_255_CHARS;
     $output .= '<br />' . INV_LABEL_DEFAULT_TEXT_VALUE;
     $output .= '<br />' . html_textarea_field('link_default', 35, 3, $cInfo->link_default);
     $output .= '	</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '	<td>' . html_radio_field('entry_type', 'integer', $cInfo->entry_type == 'integer' ? true : false) . '&nbsp;' . INV_LABEL_INTEGER_FIELD . '</td>' . chr(10);
     $output .= '	<td>' . INV_LABEL_INTEGER_RANGE;
     $output .= '<br />' . html_pull_down_menu('integer_range', gen_build_pull_down($integer_lengths), $cInfo->integer_range);
     $output .= '<br />' . INV_LABEL_DEFAULT_TEXT_VALUE . html_input_field('integer_default', $cInfo->integer_default, 'size="16"');
     $output .= '	</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '	<td>' . html_radio_field('entry_type', 'decimal', $cInfo->entry_type == 'decimal' ? true : false) . '&nbsp;' . INV_LABEL_DECIMAL_FIELD . '</td>' . chr(10);
     $output .= '	<td>' . INV_LABEL_DECIMAL_RANGE;
     $output .= html_pull_down_menu('decimal_range', gen_build_pull_down($decimal_lengths), $cInfo->decimal_range);
     $output .= '<br />' . INV_LABEL_DEFAULT_DISPLAY_VALUE . html_input_field('decimal_display', $cInfo->decimal_display ? $cInfo->decimal_display : DEFAULT_REAL_DISPLAY_FORMAT, 'size="6" maxlength="5"');
     $output .= '<br />' . INV_LABEL_DEFAULT_TEXT_VALUE . html_input_field('decimal_default', $cInfo->decimal_default, 'size="16"');
     $output .= '	</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '	<td>';
     $output .= html_radio_field('entry_type', 'drop_down', $cInfo->entry_type == 'drop_down' ? true : false) . '&nbsp;' . INV_LABEL_DROP_DOWN_FIELD . '<br />';
     $output .= html_radio_field('entry_type', 'radio', $cInfo->entry_type == 'radio' ? true : false) . '&nbsp;' . INV_LABEL_RADIO_FIELD;
     $output .= '	</td>' . chr(10);
     $output .= '	<td>' . INV_LABEL_CHOICES . '<br />' . html_textarea_field('radio_default', 35, 6, $cInfo->radio_default) . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '	<td>' . html_radio_field('entry_type', 'check_box', $cInfo->entry_type == 'check_box' ? true : false) . '&nbsp;' . INV_LABEL_CHECK_BOX_FIELD . '</td>' . chr(10);
     $output .= '	<td>' . INV_LABEL_DEFAULT_TEXT_VALUE . html_pull_down_menu('check_box_range', gen_build_pull_down($check_box_choices), $cInfo->check_box_range) . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '	<td>' . html_radio_field('entry_type', 'date', $cInfo->entry_type == 'date' ? true : false) . '&nbsp;' . TEXT_DATE . '</td>' . chr(10);
     $output .= '	<td>&nbsp;</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '	<td>' . html_radio_field('entry_type', 'time', $cInfo->entry_type == 'time' ? true : false) . '&nbsp;' . TEXT_TIME . '</td>' . chr(10);
     $output .= '	<td>&nbsp;</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '	<td>' . html_radio_field('entry_type', 'date_time', $cInfo->entry_type == 'date_time' ? true : false) . '&nbsp;' . INV_LABEL_DATE_TIME_FIELD . '</td>' . chr(10);
     $output .= '	<td>&nbsp;</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '	<td>' . html_radio_field('entry_type', 'time_stamp', $cInfo->entry_type == 'time_stamp' ? true : false) . '&nbsp;' . INV_LABEL_TIME_STAMP_FIELD . '</td>' . chr(10);
     $output .= '	<td>' . INV_LABEL_TIME_STAMP_VALUE . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  </tbody>' . "\n";
     $output .= '</table>' . chr(10);
     return $output;
 }
	  <td class="main"><?php 
echo '&nbsp;';
?>
</td>
	  <td class="main"><?php 
echo '&nbsp;';
?>
</td>
	</tr>
	<tr>
	  <td class="main" valign="top"><?php 
echo ASSETS_ENTRY_ASSETS_DESC_PURCHASE;
?>
</td>
	  <td colspan="3" class="main"><?php 
echo html_textarea_field('description_long', true, 75, 3, $cInfo->description_long, '', $reinsert_value = true);
?>
</td>
	</tr>
	<tr>
	  <td class="main"><?php 
echo ASSETS_ENTRY_ACCT_SALES;
?>
</td>
	  <td class="main"><?php 
echo html_pull_down_menu('account_asset', $gl_array_list, $cInfo->account_asset);
?>
</td>
	  <td class="main"><?php 
echo ASSETS_DATE_ACCOUNT_CREATION;
?>
Ejemplo n.º 8
0
?>
</td>
	<td><?php 
echo html_checkbox_field('closed', '1', $closed ? true : false) . ($closed ? ' ' . gen_locale_date($close_date) : '');
?>
</td>
  </tr>
  <tr>
    <td colspan="6"><?php 
echo TEXT_SPECIAL_NOTES;
?>
</td>
  </tr>
  <tr>
	<td colspan="6"><?php 
echo html_textarea_field('notes', 80, 3, $notes, $params = '');
?>
</td>
  </tr>
</tbody>
</table>
<table class="ui-widget" style="border-collapse:collapse;margin-left:auto;margin-right:auto">
 <thead class="ui-widget-header">
	<tr>
	  <th><?php 
echo TEXT_STEP;
?>
</th>
	  <th><?php 
echo TEXT_TASK_NAME;
?>
echo TEXT_DETAILS;
?>
</legend>
  <p><?php 
echo RMA_DISPOSITION_DESC;
?>
</p>
<table class="ui-widget" style="border-style:none;margin-left:auto;margin-right:auto">
 <tbody class="ui-widget-content">
   <tr>
	<td align="right" valign="top"><?php 
echo TEXT_NOTES;
?>
</td>
	<td><?php 
echo html_textarea_field('close_notes', 60, 3, $cInfo->close_notes, '', true);
?>
</td>
   </tr>
   <tr>
	<td colspan="2">
	 <table class="ui-widget" style="border-collapse:collapse;width:100%">
	  <thead class="ui-widget-header">
        <tr>
          <th><?php 
echo html_icon('emblems/emblem-unreadable.png', TEXT_DELETE, 'small');
?>
</th>
          <th><?php 
echo TEXT_QUANTITY;
?>
    </tr>
    <tr>
      <td colspan="8" width="100%"><?php 
echo html_textarea_field('narrative', 80, 3, $myrow['narrative'], '');
?>
</td>
    </tr>
    <tr>
      <th colspan="8"><?php 
echo RW_EMAIL_MSG_DETAIL;
?>
</th>
    </tr>
    <tr>
      <td colspan="8" width="100%"><?php 
echo html_textarea_field('email_msg', 80, 3, $myrow['email_msg'], '');
?>
</td>
    </tr>
<?php 
if ($show['layout']) {
    if ($show['serial']) {
        ?>
    <tr>
      <td colspan="1" align="center"><?php 
        echo html_checkbox_field('serialform', '1', $myrow['serialform'] ? true : false, '', '');
        ?>
</td>
      <td colspan="7"><?php 
        echo RW_SERIAL_FORM;
        ?>
Ejemplo n.º 11
0
function xtra_field_build_entry($param_array, $cInfo)
{
    $output = '<tr><td>' . $param_array['description'] . '</td>';
    $params = unserialize($param_array['params']);
    switch ($params['type']) {
        case 'text':
        case 'html':
            if ($params['length'] < 256) {
                $length = $params['length'] > 120 ? 'size="120"' : 'size="' . $params['length'] . '"';
                $output .= '<td>' . html_input_field($param_array['field_name'], $cInfo->{$param_array}['field_name'], $length) . '</td></tr>';
            } else {
                $output .= '<td>' . html_textarea_field($param_array['field_name'], DEFAULT_INPUT_FIELD_LENGTH, 4, $cInfo->{$param_array}['field_name']) . '</td></tr>';
            }
            break;
        case 'data_list':
            $length = $params['length'] > 120 ? 'size="120"' : 'size="' . $params['length'] . '"';
            $output .= '<td>' . html_input_field($param_array['field_name'], $cInfo->{$param_array}['field_name'], $length . " list='{$param_array['field_name']}'") . '</td>';
            $output .= "<datalist id='{$param_array['field_name']}'>";
            $choices = explode(',', $params['default']);
            while ($choice = array_shift($choices)) {
                $values = explode(':', $choice);
                if ($values[0] != '') {
                    $output .= "<option value='{$values['0']}'>";
                }
            }
            $output .= '</datalist></tr>';
            break;
        case 'hyperlink':
        case 'image_link':
        case 'inventory_link':
            $output .= '<td>' . html_input_field($param_array['field_name'], $cInfo->{$param_array}['field_name'], 'size="' . DEFAULT_INPUT_FIELD_LENGTH . '"') . '</td></tr>';
            break;
        case 'integer':
        case 'decimal':
            $output .= '<td>' . html_input_field($param_array['field_name'], $cInfo->{$param_array}['field_name'], 'size="13" maxlength="12" style="text-align:right"') . '</td></tr>';
            break;
        case 'date':
        case 'time':
        case 'date_time':
            $output .= '<td>' . html_input_field($param_array['field_name'], $cInfo->{$param_array}['field_name'], 'size="21" maxlength="20"') . '</td></tr>';
            break;
        case 'drop_down':
        case 'enum':
            $choices = explode(',', $params['default']);
            $pull_down_selection = array();
            $default_selection = '';
            while ($choice = array_shift($choices)) {
                $values = explode(':', $choice);
                $pull_down_selection[] = array('id' => $values[0], 'text' => $values[1]);
                if ($cInfo->{$param_array}['field_name'] == $values[0]) {
                    $default_selection = $values[0];
                }
            }
            $output .= '<td>' . html_pull_down_menu($param_array['field_name'], $pull_down_selection, $default_selection) . '</td></tr>';
            break;
        case 'radio':
            $output .= '<td>';
            $choices = explode(',', $params['default']);
            while ($choice = array_shift($choices)) {
                $values = explode(':', $choice);
                $output .= html_radio_field($param_array['field_name'], $values[0], $cInfo->{$param_array}['field_name'] == $values[0] ? true : false);
                $output .= '<label for="' . $param_array['field_name'] . '_' . $values[0] . '"> ' . $values[1] . '</label>';
            }
            $output .= '</td></tr>';
            break;
        case 'multi_check_box':
            $output .= '<td>';
            $output .= '<table frame="border"><tr>';
            $choices = explode(',', $params['default']);
            $selected = explode(',', $cInfo->{$param_array}['field_name']);
            $i = 1;
            while ($choice = array_shift($choices)) {
                $values = explode(':', $choice);
                $output .= '<td>';
                $output .= html_checkbox_field($param_array['field_name'] . $values[0], $values[0], in_array($values[0], $selected) ? true : false);
                $output .= '<label for="' . $param_array['field_name'] . $values[0] . '"> ' . $values[1] . '</label>';
                $output .= '</td>';
                if ($i == 4) {
                    $output .= '</tr><tr>';
                    $i = 0;
                }
                $i++;
            }
            $output .= '</tr></table>';
            $output .= '</td></tr>';
            break;
        case 'check_box':
            $output .= '<td>' . html_checkbox_field($param_array['field_name'], '1', $cInfo->{$param_array}['field_name'] == 1 ? true : false) . '</td></tr>';
            break;
        case 'time_stamp':
        default:
            $output = '';
    }
    return $output;
}
Ejemplo n.º 12
0
        ?>
</td>
	    <td><?php 
        echo htmlspecialchars($crm_actions[$value->action]);
        ?>
</td>
	   </tr>
	   <tr id="tr_crm_b_<?php 
        echo $value->log_id;
        ?>
">
	    <td colspan="4"><?php 
        echo htmlspecialchars($value->notes);
        ?>
</td>
	   </tr>
<?php 
    }
} else {
    echo '<tr><td colspan="4">' . ACT_NO_RESULTS . '</td></tr>';
}
?>
	  </tbody>
	 </table>
	</div>
    <div style="width:50%"><?php 
echo html_textarea_field('address[' . $type . 'm][notes]', 60, 30, $cInfo->address[$type . 'm']['notes']);
?>
</div>
  </fieldset>
</div>
Ejemplo n.º 13
0
function cfg_textarea_small($text, $key = '')
{
    $name = $key ? 'configuration[' . $key . ']' : 'configuration_value';
    return html_textarea_field($name, 35, 1, $text);
}
Ejemplo n.º 14
0
	  <td><?php 
echo TEXT_REASON_FOR_RETURN;
?>
</td>
	  <td><?php 
echo TEXT_NOTES;
?>
</td>
	</tr>
	<tr>
	  <td valign="top"><?php 
echo html_pull_down_menu('return_code', gen_build_pull_down($reason_codes), $cInfo->return_code);
?>
</td>
	  <td><?php 
echo html_textarea_field('caller_notes', 60, 3, $cInfo->caller_notes, '', true);
?>
</td>
	</tr>
  </tbody>
 </table>
</div>
</fieldset>
<?php 
// *********************** Attachments  *************************************
?>
   <fieldset>
   <legend><?php 
echo TEXT_ATTACHMENTS;
?>
</legend>
Ejemplo n.º 15
0
?>
\')) 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;
	<?php 
if (isset($cInfo->item_cost)) {
    echo "cell  ='" . str_replace("'", "\\'", html_input_field('item_cost_array[]', $cInfo->item_cost, 'onchange="what_to_update();" size="15" maxlength="20" style="text-align:right"', false)) . "';" . chr(13);
} else {
    echo "cell  ='';" . chr(13);
}
?>
	newCell = newRow.insertCell(-1);
	newCell.innerHTML = cell;
Ejemplo n.º 16
0
function box_build($properties, $i)
{
    global $kFonts, $kFontSizes, $kFontAlign, $kFontColors, $cFields;
    global $kFields, $kTblFields, $pFields, $tProcessing, $BarCodeTypes;
    $output = NULL;
    switch ($properties->type) {
        case 'BarCode':
            $output = '<table class="ui-widget" style="border-collapse:collapse;margin-left:auto;margin-right:auto;">' . nl;
            $output .= ' <thead class="ui-widget-header">' . nl;
            $output .= '  <tr>' . nl;
            $output .= '    <th>' . TEXT_FIELDNAME . '</th>' . nl;
            $output .= '    <th>' . TEXT_TYPE . '</th>' . nl;
            $output .= '   </tr>' . nl;
            $output .= ' </thead><tbody class="ui-widget-content">' . nl;
            $output .= '   <tr>' . nl;
            $output .= '    <td>' . html_combo_box('box_fld_' . $i . '[]', $kFields, $properties->boxfield[0]->fieldname, 'onclick="updateFieldList(this)"') . '</td>' . nl;
            $output .= '    <td>' . html_pull_down_menu('box_proc_' . $i . '[]', gen_build_pull_down($BarCodeTypes), $properties->boxfield[0]->processing) . '</td>' . nl;
            $output .= '  </tr>' . nl;
            $output .= ' </tbody></table>' . nl;
            $output .= box_build_attributes($properties, $i, false, false);
            break;
        case 'CBlk':
            $output .= '<table class="ui-widget" style="border-collapse:collapse;margin-left:auto;margin-right:auto;"><tr><td>' . nl;
            $output .= '  <table id="box_Cblk' . $i . '" class="ui-widget" style="border-collapse:collapse;margin-left:auto;margin-right:auto;"><thead class="ui-widget-header">' . nl;
            $output .= '    <tr><th colspan="4">' . TEXT_FIELD_LIST . '</th></tr>' . nl;
            $output .= '    <tr>' . nl;
            $output .= '      <th>' . TEXT_FIELDNAME . '</th>' . nl;
            $output .= '      <th>' . TEXT_SEPARATOR . '</th>' . nl;
            $output .= '      <th>' . TEXT_PROCESSING . '</th>' . nl;
            $output .= '      <th>' . TEXT_ACTION . '</th>' . nl;
            $output .= '    </tr>' . nl;
            $output .= '	</thead><tbody class="ui-widget-content">' . nl;
            for ($j = 0; $j < sizeof($properties->boxfield); $j++) {
                $output .= '		  <tr>' . nl;
                $output .= '		    <td>' . html_pull_down_menu('box_fld_' . $i . '[]', $cFields, $properties->boxfield[$j]->fieldname) . '</td>' . nl;
                $output .= '		    <td>' . html_pull_down_menu('box_proc_' . $i . '[]', $tProcessing, $properties->boxfield[$j]->processing) . '</td>' . nl;
                $output .= '		    <td>' . html_pull_down_menu('box_fmt_' . $i . '[]', $pFields, $properties->boxfield[$j]->formatting) . '</td>' . nl;
                $output .= '		    <td nowrap="nowrap" align="right">';
                $output .= html_icon('actions/view-fullscreen.png', TEXT_MOVE, 'small', 'style="cursor:move"', '', '', 'move_cblk_' . $i . '_' . $j) . chr(10);
                $output .= html_icon('emblems/emblem-unreadable.png', TEXT_DELETE, 'small', 'onclick="if (confirm(\'' . TEXT_DELETE_ENTRY . '\')) $(this).parent().parent().remove();"');
                $output .= '			</td>' . nl;
                $output .= '		  </tr>' . nl;
            }
            $output .= '    </tbody></table>' . nl;
            $output .= '  </td>' . nl;
            $output .= '  <td valign="bottom">' . html_icon('actions/list-add.png', TEXT_ADD, 'small', 'onclick="rowAction(\'box_Cblk\', \'add\', ' . $i . ')"') . '</td>' . nl;
            $output .= '</tr></table>' . nl;
            $output .= box_build_attributes($properties, $i);
            $output .= '<script type="text/javascript">tableInit[tableCount] = \'box_Cblk' . $i . '\'; tableCount++;</script>' . nl;
            break;
        case 'CDta':
            $output = '<table class="ui-widget" style="border-collapse:collapse;margin-left:auto;margin-right:auto;">' . nl;
            $output .= ' <thead class="ui-widget-header">' . nl;
            $output .= '  <tr>' . nl;
            $output .= '    <th>' . TEXT_FIELDNAME . '</th>' . nl;
            $output .= '  </tr>' . nl;
            $output .= ' </thead><tbody class="ui-widget-content">' . nl;
            $output .= '  <tr>' . nl;
            $output .= '    <td align="center">' . html_pull_down_menu('box_fld_' . $i . '[]', $cFields, $properties->boxfield[0]->fieldname) . '</td>' . nl;
            $output .= '  </tr>' . nl;
            $output .= ' </tbody></table>' . nl;
            $output .= box_build_attributes($properties, $i);
            break;
        case 'Data':
            $output = '<table class="ui-widget" style="border-collapse:collapse;margin-left:auto;margin-right:auto;">' . nl;
            $output .= ' <thead class="ui-widget-header">' . nl;
            $output .= '  <tr>' . nl;
            $output .= '    <th>' . PHREEFORM_TBLFNAME . '</th>' . nl;
            $output .= '    <th>' . TEXT_PROCESSING . '</th>' . nl;
            $output .= '  </tr>' . nl;
            $output .= ' </thead><tbody class="ui-widget-content">' . nl;
            $output .= '  <tr>' . nl;
            $output .= '    <td>' . html_combo_box('box_fld_' . $i . '[]', $kFields, $properties->boxfield[0]->fieldname, 'onclick="updateFieldList(this)"') . '</td>' . nl;
            $output .= '    <td>' . html_pull_down_menu('box_proc_' . $i . '[]', $pFields, $properties->boxfield[0]->processing) . '</td>' . nl;
            $output .= '  </tr>' . nl;
            $output .= ' </tbody></table>' . nl;
            $output .= box_build_attributes($properties, $i);
            break;
        case 'Img':
            $output = '<table class="ui-widget" style="border-collapse:collapse;margin-left:auto;margin-right:auto;">' . nl;
            $output .= ' <thead class="ui-widget-header">' . nl;
            $output .= '  <tr>' . nl;
            $output .= '    <td>' . TEXT_CURRENT_IMAGE . '</td>' . nl;
            $output .= '    <td align="center">' . nl;
            $output .= !$properties->filename ? TEXT_NO_IMAGE_SELECTED : html_image(PF_WEB_MY_REPORTS . 'images/' . $properties->filename, '', '', '32');
            $output .= '    </td>' . nl;
            $output .= '  </tr>' . nl;
            $output .= '  <tr>' . nl;
            $output .= '    <th colspan="2">' . PHREEFORM_IMAGESEL . '</th>' . nl;
            $output .= '  </tr>' . nl;
            $output .= ' </thead><tbody class="ui-widget-content">' . nl;
            $output .= '  <tr>' . nl;
            $output .= '    <td>' . html_radio_field('img_sel_' . $i, 'U', false) . TEXT_UPLOAD_MAGE . '</td>' . nl;
            $output .= '    <td>' . html_file_field('img_upload_' . $i) . '</td>' . nl;
            $output .= '  </tr>' . nl;
            $output .= '  <tr>' . nl;
            $output .= '    <td>' . html_radio_field('img_sel_' . $i, 'S', true) . TEXT_STORED_IMAGES . '</td>' . nl;
            $output .= '    <td>' . html_pull_down_menu('img_file_' . $i, ReadImages(), $properties->filename, 'size="6"') . '</td>' . nl;
            $output .= '  </tr>' . nl;
            $output .= ' </tbody></table>' . nl;
            break;
        case 'ImgLink':
            $output .= '<table class="ui-widget" style="border-collapse:collapse;margin-left:auto;margin-right:auto;">' . nl;
            $output .= ' <thead class="ui-widget-header">' . nl;
            $output .= '  <tr>' . nl;
            $output .= '    <th>' . PHREEFORM_TBLFNAME . '</th>' . nl;
            $output .= '    <th>' . TEXT_PROCESSING . '</th>' . nl;
            $output .= '  </tr>' . nl;
            $output .= ' </thead><tbody class="ui-widget-content">' . nl;
            $output .= '  <tr>' . nl;
            $output .= '    <td>' . html_combo_box('box_fld_' . $i . '[]', $kFields, $properties->boxfield[0]->fieldname, 'onclick="updateFieldList(this)"') . '</td>' . nl;
            $output .= '    <td>' . html_pull_down_menu('box_proc_' . $i . '[]', $pFields, $properties->boxfield[0]->processing) . '</td>' . nl;
            $output .= '  </tr>' . nl;
            $output .= '  <tr class="ui-widget-header"><th colspan="2">' . TEXT_IMAGE_LINK . '</th></tr>' . nl;
            $output .= '  <tr>' . nl;
            $output .= '    <td align="center" colspan="2">' . html_input_field('box_txt_' . $i, $properties->text ? $properties->text : DIR_WS_MY_FILES, 'size="40"') . '</td>' . nl;
            $output .= '  </tr>' . nl;
            $output .= ' </tbody></table>' . nl;
            //	  $output .= box_build_attributes($properties, $i, false, false, false, false);
            break;
        case 'Line':
            $output = '<table class="ui-widget" style="border-collapse:collapse;margin-left:auto;margin-right:auto;">' . nl;
            $output .= ' <thead class="ui-widget-header">' . nl;
            $output .= '  <tr>' . nl;
            $output .= '    <th colspan="3">' . PHREEFORM_LINE_TYPE . '</th>' . nl;
            $output .= '  </tr>' . nl;
            $output .= ' </thead><tbody class="ui-widget-content">' . nl;
            $output .= '  <tr>' . nl;
            $output .= '    <td>' . html_radio_field('box_ltype_' . $i, 'H', !$properties->linetype || $properties->linetype == 'H' ? true : false) . TEXT_HORIZONTAL . '</td>' . nl;
            $output .= '    <td>' . html_radio_field('box_ltype_' . $i, 'V', $properties->linetype == 'V' ? true : false) . TEXT_VERTICAL . '</td>' . nl;
            $output .= '    <td>' . TEXT_LENGTH . ' ' . html_input_field('box_len_' . $i, $properties->length, 'size="4" maxlength="3"') . '</td>' . nl;
            $output .= '  </tr>' . nl;
            $output .= '  <tr class="ui-widget-header">' . nl;
            $output .= '    <th colspan="3">' . PHREEFORM_ENDPOS . '</th>' . nl;
            $output .= '  </tr>' . nl;
            $output .= '  <tr>' . nl;
            $output .= '    <td>' . html_radio_field('box_ltype_' . $i, 'C', $properties->linetype == 'C' ? true : false) . TEXT_CUSTOM . '</td>' . nl;
            $output .= '    <td>' . TEXT_ABSCISSA . html_input_field('box_eabs_' . $i, $properties->endabscissa, 'size="4" maxlength="3"') . '</td>' . nl;
            $output .= '    <td>' . TEXT_ORDINATE . html_input_field('box_eord_' . $i, $properties->endordinate, 'size="4" maxlength="3"') . '</td>' . nl;
            $output .= '  </tr>' . nl;
            $output .= ' </tbody></table>' . nl;
            $output .= box_build_attributes($properties, $i, false, false, true, false);
            break;
        case 'PgNum':
            $output .= box_build_attributes($properties, $i, false);
            break;
        case 'Rect':
            $output .= box_build_attributes($properties, $i, false, false, true, true);
            break;
        case 'Tbl':
            $output .= '<table class="ui-widget" style="border-collapse:collapse;margin-left:auto;margin-right:auto;"><tr><td>' . nl;
            $output .= '  <table id="box_Tbl' . $i . '" class="ui-widget" style="border-collapse:collapse;margin-left:auto;margin-right:auto;"><thead class="ui-widget-header">' . nl;
            $output .= '    <tr><th colspan="9">' . TEXT_FIELD_LIST . '</th></tr>' . nl;
            $output .= '    <tr>' . nl;
            $output .= '      <th>' . TEXT_FIELDNAME . '</th>' . nl;
            $output .= '      <th>' . TEXT_DESCRIPTION . '</th>' . nl;
            $output .= '      <th>' . TEXT_PROCESSING . '</th>' . nl;
            $output .= '      <th>' . TEXT_FONT . '</th>' . nl;
            $output .= '      <th>' . TEXT_SIZE . '</th>' . nl;
            $output .= '      <th>' . TEXT_ALIGN . '</th>' . nl;
            $output .= '      <th>' . TEXT_COLOR . '</th>' . nl;
            $output .= '      <th>' . TEXT_WIDTH . '</th>' . nl;
            $output .= '      <th>' . '&nbsp;' . '</th>' . nl;
            $output .= '    </tr>' . nl;
            $output .= '	</thead><tbody class="ui-widget-content">' . nl;
            for ($j = 0; $j < sizeof($properties->boxfield); $j++) {
                $output .= '	  <tr>' . nl;
                $output .= '	    <td nowrap="nowrap">' . html_combo_box('box_fld_' . $i . '[]', $kTblFields, $properties->boxfield[$j]->fieldname, 'onclick="updateFieldList(this)"', '220px', '', 'box_fld_' . $i . $j) . '</td>' . nl;
                $output .= '	    <td>' . html_input_field('box_desc_' . $i . '[]', $properties->boxfield[$j]->description, 'size="15"') . '</td>' . nl;
                $output .= '	    <td>' . html_pull_down_menu('box_proc_' . $i . '[]', $pFields, $properties->boxfield[$j]->processing) . '</td>' . nl;
                $output .= '	    <td>' . html_pull_down_menu('box_fnt_' . $i . '[]', $kFonts, $properties->boxfield[$j]->font) . '</td>' . nl;
                $output .= '	    <td>' . html_pull_down_menu('box_size_' . $i . '[]', $kFontSizes, $properties->boxfield[$j]->size) . '</td>' . nl;
                $output .= '	    <td>' . html_pull_down_menu('box_aln_' . $i . '[]', $kFontAlign, $properties->boxfield[$j]->align) . '</td>' . nl;
                $output .= '	    <td>' . html_pull_down_menu('box_clr_' . $i . '[]', $kFontColors, $properties->boxfield[$j]->color) . '</td>' . nl;
                $output .= '	    <td>' . html_input_field('box_wid_' . $i . '[]', $properties->boxfield[$j]->width, 'size="4" maxlength="4"') . '</td>' . nl;
                $output .= '	    <td nowrap="nowrap" align="right">' . nl;
                $output .= html_icon('actions/view-fullscreen.png', TEXT_MOVE, 'small', 'style="cursor:move"', '', '', 'move_tbl_' . $i . '_' . $j);
                $output .= html_icon('emblems/emblem-unreadable.png', TEXT_DELETE, 'small', 'onclick="if (confirm(\'' . TEXT_DELETE_ENTRY . '\')) $(this).parent().parent().remove();"');
                $output .= '</td>' . nl;
                $output .= '	  </tr>' . nl;
            }
            $output .= '  </tbody></table>' . nl;
            $output .= '</td>' . nl;
            $output .= '<td valign="bottom">' . html_icon('actions/list-add.png', TEXT_ADD, 'small', 'onclick="rowAction(\'box_Tbl\', \'add\', ' . $i . ')"') . '</td>' . nl;
            $output .= '</tr></table>' . nl;
            $output .= box_build_attributes($properties, $i, false, true, true, true, 'h', PHREEFORM_TABLE_HEADING_PROP);
            $output .= box_build_attributes($properties, $i, false, false, true, true, '', TEXT_TABLE_BODY_PROPERTIES);
            $output .= PHREEFORM_FORM_TABLE_NOTES;
            $output .= '<script type="text/javascript">tableInit[tableCount] = \'box_Tbl' . $i . '\'; tableCount++;</script>' . nl;
            break;
        case 'TBlk':
            $output .= '<table class="ui-widget" style="border-collapse:collapse;margin-left:auto;margin-right:auto;"><tr><td>' . nl;
            $output .= '  <table id="box_Tblk' . $i . '" class="ui-widget" style="border-collapse:collapse;margin-left:auto;margin-right:auto;"><thead class="ui-widget-header">' . nl;
            $output .= '    <tr><th colspan="4">' . TEXT_FIELD_LIST . '</th></tr>' . nl;
            $output .= '    <tr>' . nl;
            $output .= '      <th>' . PHREEFORM_TBLFNAME . '</th>' . nl;
            $output .= '      <th>' . TEXT_SEPARATOR . '</th>' . nl;
            $output .= '      <th>' . TEXT_PROCESSING . '</th>' . nl;
            $output .= '      <th>' . TEXT_ACTION . '</th>' . nl;
            $output .= '    </tr>' . nl;
            $output .= '</thead><tbody class="ui-widget-content">' . nl;
            for ($j = 0; $j < sizeof($properties->boxfield); $j++) {
                $output .= '  <tr>' . nl;
                $output .= '    <td>' . html_combo_box('box_fld_' . $i . '[]', $kFields, $properties->boxfield[$j]->fieldname, 'onclick="updateFieldList(this)"', '220px', '', 'box_fld_' . $i . '_' . $j) . '</td>' . nl;
                $output .= '    <td>' . html_pull_down_menu('box_proc_' . $i . '[]', $tProcessing, $properties->boxfield[$j]->processing) . '</td>' . nl;
                $output .= '	<td>' . html_pull_down_menu('box_fmt_' . $i . '[]', $pFields, $properties->boxfield[$j]->formatting) . '</td>' . nl;
                $output .= '    <td nowrap="nowrap" align="right">' . nl;
                $output .= html_icon('actions/view-fullscreen.png', TEXT_MOVE, 'small', 'style="cursor:move"', '', '', 'move_tblk_' . $i . '_' . $j) . chr(10);
                $output .= html_icon('emblems/emblem-unreadable.png', TEXT_DELETE, 'small', 'onclick="if (confirm(\'' . TEXT_DELETE_ENTRY . '\')) $(this).parent().parent().remove();"');
                $output .= '    </td>' . nl;
                $output .= '  </tr>' . nl;
            }
            $output .= '</tbody></table>' . nl;
            $output .= '</td>' . nl;
            $output .= '<td valign="bottom">' . html_icon('actions/list-add.png', TEXT_ADD, 'small', 'onclick="rowAction(\'box_Tblk\', \'add\', ' . $i . ')"');
            $output .= '</td></tr></table>' . nl;
            $output .= box_build_attributes($properties, $i);
            $output .= '<script type="text/javascript">tableInit[tableCount] = \'box_Tblk' . $i . '\'; tableCount++;</script>' . nl;
            break;
        case 'TDup':
            $output .= '<table class="ui-widget" style="border-collapse:collapse;margin-left:auto;margin-right:auto;">' . nl;
            $output .= ' <tbody class="ui-widget-content">' . nl;
            $output .= '  <tr>' . nl;
            $output .= '    <td align="center">' . TEXT_NO_PROPERTIES . '</td>' . nl;
            $output .= '  </tr>' . nl;
            $output .= ' </tbody></table>' . nl;
            break;
        case 'LtrTpl':
            $output .= '<table class="ui-widget" style="border-collapse:collapse;margin-left:auto;margin-right:auto;">' . nl;
            $output .= ' <thead class="ui-widget-header">' . nl;
            $output .= '  <tr>' . nl;
            $output .= '    <th>' . PHREEFORM_TEXTDISP . '</th>' . nl;
            $output .= '  </tr>' . nl;
            $output .= ' </thead><tbody class="ui-widget-content">' . nl;
            $output .= '  <tr>' . nl;
            $output .= '    <td>' . html_textarea_field('box_txt_' . $i, '50', '20', $properties->text) . '</td>' . nl;
            $output .= '  </tr>' . nl;
            $output .= ' </tbody></table>' . nl;
            $output .= box_build_attributes($properties, $i);
            break;
        case 'LtrData':
            $output .= '<table class="ui-widget" style="border-collapse:collapse;margin-left:auto;margin-right:auto;"><tr><td>' . nl;
            $output .= '  <table id="box_LtrData' . $i . '" class="ui-widget" style="border-collapse:collapse;margin-left:auto;margin-right:auto;"><thead class="ui-widget-header">' . nl;
            $output .= '    <tr><th colspan="9">' . TEXT_FIELD_LIST . '</th></tr>' . nl;
            $output .= '    <tr>' . nl;
            $output .= '      <th>' . TEXT_FIELDNAME . '</th>' . nl;
            $output .= '      <th>' . TEXT_DESCRIPTION . '</th>' . nl;
            $output .= '      <th>' . TEXT_PROCESSING . '</th>' . nl;
            $output .= '      <th>' . '&nbsp;' . '</th>' . nl;
            $output .= '    </tr>' . nl;
            $output .= '	</thead><tbody class="ui-widget-content">' . nl;
            for ($j = 0; $j < sizeof($properties->boxfield); $j++) {
                $output .= '	  <tr>' . nl;
                $output .= '	    <td nowrap="nowrap">' . html_combo_box('box_fld_' . $i . '[]', $kTblFields, $properties->boxfield[$j]->fieldname, 'onclick="updateFieldList(this)"', '220px', '', 'box_fld_' . $i . $j) . '</td>' . nl;
                $output .= '	    <td>' . html_input_field('box_desc_' . $i . '[]', $properties->boxfield[$j]->description, 'size="15"') . '</td>' . nl;
                $output .= '	    <td>' . html_pull_down_menu('box_proc_' . $i . '[]', $pFields, $properties->boxfield[$j]->processing) . '</td>' . nl;
                $output .= '	    <td nowrap="nowrap" align="right">' . nl;
                $output .= html_icon('actions/view-fullscreen.png', TEXT_MOVE, 'small', 'style="cursor:move"', '', '', 'move_tbl_' . $i . '_' . $j);
                $output .= html_icon('emblems/emblem-unreadable.png', TEXT_DELETE, 'small', 'onclick="if (confirm(\'' . TEXT_DELETE_ENTRY . '\')) $(this).parent().parent().remove();"');
                $output .= '</td>' . nl;
                $output .= '	  </tr>' . nl;
            }
            $output .= '  </tbody></table>' . nl;
            $output .= '</td>' . nl;
            $output .= '<td valign="bottom">' . html_icon('actions/list-add.png', TEXT_ADD, 'small', 'onclick="rowAction(\'box_LtrData\', \'add\', ' . $i . ')"') . '</td>' . nl;
            $output .= '</tr></table>' . nl;
            $output .= '<script type="text/javascript">tableInit[tableCount] = \'box_LtrData' . $i . '\'; tableCount++;</script>' . nl;
            break;
        case 'Text':
            $output .= '<table class="ui-widget" style="border-collapse:collapse;margin-left:auto;margin-right:auto;">' . nl;
            $output .= ' <thead class="ui-widget-header">' . nl;
            $output .= '  <tr>' . nl;
            $output .= '    <th>' . PHREEFORM_TEXTDISP . '</th>' . nl;
            $output .= '  </tr>' . nl;
            $output .= ' </thead><tbody class="ui-widget-content">' . nl;
            $output .= '  <tr>' . nl;
            $output .= '    <td>' . html_textarea_field('box_txt_' . $i, '50', '3', $properties->text) . '</td>' . nl;
            $output .= '  </tr>' . nl;
            $output .= ' </tbody></table>' . nl;
            $output .= box_build_attributes($properties, $i);
            break;
        case 'Ttl':
            $output .= '<table class="ui-widget" style="border-collapse:collapse;margin-left:auto;margin-right:auto;"><tr><td>' . nl;
            $output .= '  <table id="box_Ttl' . $i . '" class="ui-widget" style="border-collapse:collapse;margin-left:auto;margin-right:auto;"><thead class="ui-widget-header">' . nl;
            $output .= '    <tr><th colspan="3">' . TEXT_FIELD_LIST . '</th></tr>' . nl;
            $output .= '    <tr>' . nl;
            $output .= '      <th>' . PHREEFORM_TBLFNAME . '</th>' . nl;
            $output .= '      <th>' . TEXT_PROCESSING . '</th>' . nl;
            $output .= '      <th>' . TEXT_ACTION . '</th>' . nl;
            $output .= '    </tr>' . nl;
            $output .= ' </thead><tbody class="ui-widget-content">' . nl;
            for ($j = 0; $j < sizeof($properties->boxfield); $j++) {
                $output .= '  <tr>' . nl;
                $output .= '    <td>' . html_combo_box('box_fld_' . $i . '[]', $kFields, $properties->boxfield[$j]->fieldname, 'onclick="updateFieldList(this)"', '220px', '', 'box_fld_' . $i . $j) . '</td>' . nl;
                $output .= '    <td>' . html_pull_down_menu('box_proc_' . $i . '[]', $pFields, $properties->boxfield[$j]->processing) . '</td>' . nl;
                $output .= '    <td nowrap="nowrap" align="right">' . nl;
                $output .= html_icon('actions/view-fullscreen.png', TEXT_MOVE, 'small', 'style="cursor:move"', '', '', 'move_ttl_' . $i . '_' . $j) . chr(10);
                $output .= html_icon('emblems/emblem-unreadable.png', TEXT_DELETE, 'small', 'onclick="if (confirm(\'' . TEXT_DELETE_ENTRY . '\')) $(this).parent().parent().remove();"');
                $output .= '    </td>' . nl;
                $output .= '  </tr>' . nl;
            }
            $output .= '</tbody></table>' . nl;
            $output .= '</td>' . nl;
            $output .= '<td valign="bottom">' . html_icon('actions/list-add.png', TEXT_ADD, 'small', 'onclick="rowAction(\'box_Ttl\', \'add\', ' . $i . ')"');
            $output .= '</td></tr></table>' . nl;
            $output .= box_build_attributes($properties, $i);
            $output .= '<script type="text/javascript">tableInit[tableCount] = \'box_Ttl' . $i . '\'; tableCount++;</script>' . nl;
            break;
    }
    return $output;
}
Ejemplo n.º 17
0
function build_field_entry($param_array, $cInfo)
{
    $output = '<tr><td class="main">' . $param_array['description'] . '</td>';
    $params = unserialize($param_array['params']);
    switch ($params['type']) {
        case 'text':
        case 'html':
            if ($params['length'] < 256) {
                $length = $params['length'] > 120 ? 'size="120"' : 'size="' . $params['length'] . '"';
                $output .= '<td class="main">' . html_input_field($param_array['field_name'], $cInfo->{$param_array}['field_name'], $length) . '</td></tr>';
            } else {
                $output .= '<td class="main">' . html_textarea_field($param_array['field_name'], DEFAULT_INPUT_FIELD_LENGTH, 4, $cInfo->{$param_array}['field_name']) . '</td></tr>';
            }
            break;
        case 'hyperlink':
        case 'image_link':
        case 'inventory_link':
            $output .= '<td class="main">' . html_input_field($param_array['field_name'], $cInfo->{$param_array}['field_name'], 'size="' . DEFAULT_INPUT_FIELD_LENGTH . '"') . '</td></tr>';
            break;
        case 'integer':
        case 'decimal':
            $output .= '<td class="main">' . html_input_field($param_array['field_name'], $cInfo->{$param_array}['field_name'], 'size="13" maxlength="12" style="text-align:right"') . '</td></tr>';
            break;
        case 'date':
        case 'time':
        case 'date_time':
            $output .= '<td class="main">' . html_input_field($param_array['field_name'], $cInfo->{$param_array}['field_name'], 'size="21" maxlength="20"') . '</td></tr>';
            break;
        case 'drop_down':
        case 'enum':
            $choices = explode(',', $params['default']);
            $pull_down_selection = array();
            $default_selection = '';
            while ($choice = array_shift($choices)) {
                $values = explode(':', $choice);
                $pull_down_selection[] = array('id' => $values[0], 'text' => $values[1]);
                if ($cInfo->{$param_array}['field_name'] == $values[0]) {
                    $default_selection = $values[0];
                }
            }
            $output .= '<td class="main">' . html_pull_down_menu($param_array['field_name'], $pull_down_selection, $default_selection) . '</td></tr>';
            break;
        case 'radio':
            $output .= '<td class="main">';
            $choices = explode(',', $params['default']);
            while ($choice = array_shift($choices)) {
                $values = explode(':', $choice);
                $values[0] = trim($values[0]);
                $cInfo->{$param_array}['field_name'] = trim($cInfo->{$param_array}['field_name']);
                $cmp = strcmp($values[0], $cInfo->{$param_array}['field_name']);
                $output .= html_radio_field($param_array['field_name'], $values[0], $cmp == 0 ? true : false);
                $output .= '&nbsp;' . $values[1] . '&nbsp;';
            }
            $output .= '</td></tr>';
            break;
        case 'check_box':
            $output .= '<td class="main">' . html_checkbox_field($param_array['field_name'], '1', $cInfo->{$param_array}['field_name'] == 1 ? true : false) . '</td></tr>';
            break;
        case 'time_stamp':
        default:
            $output = '';
    }
    return $output;
}
Ejemplo n.º 18
0
 function build_form_html($action, $id = '')
 {
     global $db;
     $sql = "select id, tab_name, description, sort_order from " . TABLE_EXTRA_TABS . " where id = " . $id;
     $result = $db->Execute($sql);
     if ($action == 'new') {
         $cInfo = '';
     } else {
         $cInfo = new objectInfo($result->fields);
     }
     $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' ? TEXT_NEW_TAB : TEXT_EDIT_TAB) . '</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' ? EXTRA_TABS_INSERT_INTRO : SETUP_CURR_EDIT_INTRO) . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '    <td>' . TEXT_TAB_NAME . '</td>' . chr(10);
     $output .= '    <td>' . html_input_field('tab_name', $cInfo->tab_name) . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '    <td>' . TEXT_DESCRIPTION . '</td>' . chr(10);
     $output .= '    <td>' . html_textarea_field('description', 30, 10, $cInfo->description) . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '    <td>' . TEXT_SORT_ORDER . '</td>' . chr(10);
     $output .= '    <td>' . html_input_field('sort_order', $cInfo->sort_order) . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  </tbody>' . "\n";
     $output .= '</table>' . chr(10);
     return $output;
 }
Ejemplo n.º 19
0
	<td align="right"><?php 
echo TEXT_MESSAGE_SUBJECT;
?>
</td>
	<td><?php 
echo html_input_field('message_subject', $message_subject, 'size="75"');
?>
</td>
  </tr>
  <tr>
	<td align="right" valign="top"><?php 
echo TEXT_MESSAGE_BODY;
?>
</td>
	<td><?php 
echo html_textarea_field('message_body', '60', '8', $message_body);
?>
</td>
  </tr>
</table>
</div>
<div id="rpt_body">
<table align="center" width="550" border="1" cellspacing="1" cellpadding="1">
  <tr>
	<th colspan="4"><?php 
echo RW_TITLE_CRITERIA;
?>
</th>
  </tr>
  <tr>
    <td><?php 
// | but WITHOUT ANY WARRANTY; without even the implied warranty of  |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   |
// | GNU General Public License for more details.                    |
// |                                                                 |
// | The license that is bundled with this package is located in the |
// | file: /doc/manual/ch01-Introduction/license.html.               |
// | If not, see http://www.gnu.org/licenses/                        |
// +-----------------------------------------------------------------+
//  Path: /modules/accounts/pages/main/template_v_notes.php
//
?>
<div id="cat_notes" class="tabset_content">
  <h2 class="tabset_label"><?php 
echo TEXT_NOTES;
?>
</h2>
  <fieldset class="formAreaTitle">
    <legend><?php 
echo TEXT_NOTES;
?>
</legend>
    <table border="0" width="100%" cellspacing="6" cellpadding="0">
	  <tr>
	    <td><?php 
echo html_textarea_field('vm_notes', 120, 30, $cInfo->vm_notes, $parameters = '');
?>
</td>
	  </tr>
	</table>
  </fieldset>
</div>
	  <td class="main" valign="top"><?php 
echo INV_ENTRY_INVENTORY_DESC_PURCHASE;
?>
</td>
	  <td colspan="3" class="main"><?php 
echo html_textarea_field('description_purchase', 75, 2, $cInfo->description_purchase, '', $reinsert_value = true);
?>
</td>
	</tr>
	<tr>
	  <td class="main" valign="top"><?php 
echo INV_ENTRY_INVENTORY_DESC_SALES;
?>
</td>
	  <td colspan="3" class="main"><?php 
echo html_textarea_field('description_sales', 75, 2, $cInfo->description_sales, '', $reinsert_value = true);
?>
</td>
	</tr>
	<tr>
	  <td class="main"><?php 
echo INV_ENTRY_ACCT_SALES;
?>
</td>
	  <td class="main"><?php 
echo html_pull_down_menu('account_sales_income', $gl_array_list, $cInfo->account_sales_income);
?>
</td>
	  <td class="main" align="right"><?php 
echo INV_ENTRY_ITEM_WEIGHT;
?>
	<td align="right"><?php 
echo TEXT_MFG_INIT;
?>
</td>
	<td><?php 
echo html_pull_down_menu('mfg', $yes_no_array, $mfg);
?>
</td>
  </tr>
  <tr>
	<td rowspan="3" align="right"><?php 
echo TEXT_DESCRIPTION;
?>
</td>
	<td colspan="3" rowspan="3"><?php 
echo html_textarea_field('description', 70, 3, $description);
?>
</td>
	<td align="right"><?php 
echo TEXT_DRAWINGS;
?>
</td>
	<td><?php 
echo html_input_field('ref_spec', $ref_spec);
?>
</td>
	<td align="right"><?php 
echo TEXT_QA_INIT;
?>
</td>
	<td><?php 
Ejemplo n.º 23
0
		<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>';
            } else {
                echo '<td></td>';
            }
            if (isset($cInfo->purch_taxable) || $error) {
                echo '<td>' . html_pull_down_menu('purch_taxable_array[]', $purch_tax_rates, $purchaseRow['purch_taxable']) . '</td>';
Ejemplo n.º 24
0
	  <td align="right"><?php 
echo TEXT_RECEIVE_TRACKING_NUM;
?>
</td>
	  <td><?php 
echo html_input_field('receive_tracking', $cInfo->receive_tracking);
?>
 </td>
	</tr>
	<tr>
	  <td align="right" valign="top"><?php 
echo TEXT_NOTES;
?>
</td>
	  <td colspan="3"><?php 
echo html_textarea_field('receive_notes', 60, 3, $cInfo->receive_notes, '', true);
?>
</td>
	</tr>
   </tbody>
  </table>
<table class="ui-widget" style="border-style:none;margin-left:auto;margin-right:auto">
 <tbody class="ui-widget-content">
   <tr>
	<td colspan="2">
	 <table class="ui-widget" style="border-collapse:collapse;width:100%">
	  <thead class="ui-widget-header">
        <tr>
          <th><?php 
echo html_icon('emblems/emblem-unreadable.png', TEXT_DELETE, 'small');
?>
Ejemplo n.º 25
0
 public function build_form_html($action, $id = '')
 {
     global $db;
     if ($action != 'new' && $this->error == false) {
         $result = $db->Execute("select * from " . TABLE_EXTRA_TABS . " where id = " . $this->id);
         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' ? INV_INFO_HEADING_NEW_CATEGORY : INV_INFO_HEADING_EDIT_CATEGORY) . '</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' ? EXTRA_TABS_INSERT_INTRO : SETUP_CURR_EDIT_INTRO) . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '    <td>' . TEXT_TAB_NAME . '</td>' . chr(10);
     $output .= '    <td>' . html_input_field('tab_name', $this->tab_name) . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '    <td>' . TEXT_DESCRIPTION . '</td>' . chr(10);
     $output .= '    <td>' . html_textarea_field('description', 30, 10, $this->description) . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr>' . chr(10);
     $output .= '    <td>' . TEXT_SORT_ORDER . '</td>' . chr(10);
     $output .= '    <td>' . html_input_field('sort_order', $this->sort_order) . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  </tbody>' . "\n";
     $output .= '</table>' . chr(10);
     return $output;
 }
?>
<h2 align="center"><?php 
echo TEXT_FORM_FIELD . $DisplayName . ' - ' . TEXT_PROPERTIES;
?>
</h2>
  <table align="center" border="2" cellspacing="1" cellpadding="1">
    <tr>
      <th colspan="2"><?php 
echo RW_RPT_TEXTDISP;
?>
</th>
    </tr>
    <tr>
      <td colspan="2" align="center">
	    <?php 
echo html_textarea_field('TextField', '50', '3', $Params['TextField']);
?>
      </td>
    </tr>
    <tr>
      <th colspan="2"><?php 
echo RW_RPT_STARTPOS;
?>
</th>
    </tr>
    <tr>
      <td align="center">
	    <?php 
echo TEXT_ABSCISSA . html_input_field('LineXStrt', !$Params['LineXStrt'] ? '10' : $Params['LineXStrt'], 'size="4" maxlength="3"');
?>
      </td>
Ejemplo n.º 27
0
?>
		</td>
	  </tr>
	  <tr>
		<td class="main" valign="top">
<?php 
echo html_radio_field('entry_type', $value = 'drop_down', $cInfo->entry_type == 'drop_down' ? true : false, '', $system_disable ? ' disabled ' : '');
echo '&nbsp;' . INV_LABEL_DROP_DOWN_FIELD;
echo '<br>' . html_radio_field('entry_type', $value = 'radio', $cInfo->entry_type == 'radio' ? true : false, '', $system_disable ? ' disabled ' : '');
echo '&nbsp;' . INV_LABEL_RADIO_FIELD;
?>
		</td>
		<td class="main">
<?php 
echo INV_LABEL_CHOICES;
echo '<br>' . html_textarea_field('radio_default', true, 35, 6, $cInfo->radio_default, $system_disable ? ' disabled ' : '');
?>
		</td>
	  </tr>
	  <tr>
		<td class="main" valign="top">
<?php 
echo html_radio_field('entry_type', $value = 'check_box', $cInfo->entry_type == 'check_box' ? true : false, '', $system_disable ? ' disabled ' : '');
echo '&nbsp;' . INV_LABEL_CHECK_BOX_FIELD;
?>
		</td>
		<td class="main">
<?php 
foreach ($check_box_choices as $key => $value) {
    $check_box_pulldown_array[] = array('id' => $key, 'text' => $value);
}
Ejemplo n.º 28
0
function draw_address_fields($entries, $add_type, $reset_button = false, $hide_list = false, $short = false)
{
    $field = '';
    $method = substr($add_type, 1, 1);
    //echo 'entries = '; print_r($entries); echo '<br>';
    if (!$hide_list && sizeof($entries->address_book[$method]) > 0) {
        $field .= '<tr><td><table class="ui-widget" style="border-collapse:collapse;width:100%;">';
        $field .= '<thead class="ui-widget-header">' . chr(10);
        $field .= '<tr>' . chr(10);
        $field .= '  <th>' . GEN_PRIMARY_NAME . '</th>' . chr(10);
        $field .= '  <th>' . GEN_CONTACT . '</th>' . chr(10);
        $field .= '  <th>' . GEN_ADDRESS1 . '</th>' . chr(10);
        $field .= '  <th>' . GEN_CITY_TOWN . '</th>' . chr(10);
        $field .= '  <th>' . GEN_STATE_PROVINCE . '</th>' . chr(10);
        $field .= '  <th>' . GEN_POSTAL_CODE . '</th>' . chr(10);
        $field .= '  <th>' . GEN_COUNTRY . '</th>' . chr(10);
        // add some special fields
        if ($method == 'p') {
            $field .= '  <th>' . ACT_PAYMENT_REF . '</th>' . chr(10);
        }
        $field .= '  <th align="center">' . TEXT_ACTION . '</th>' . chr(10);
        $field .= '</tr>' . chr(10) . chr(10);
        $field .= '</thead>' . chr(10) . chr(10);
        $field .= '<tbody class="ui-widget-content">' . chr(10);
        $odd = true;
        foreach ($entries->address_book[$method] as $address) {
            $field .= '<tr id="tr_add_' . $address->address_id . '" class="' . ($odd ? 'odd' : 'even') . '" style="cursor:pointer">';
            $field .= '  <td onclick="getAddress(' . $address->address_id . ', \'' . $add_type . '\')">' . $address->primary_name . '</td>' . chr(10);
            $field .= '  <td onclick="getAddress(' . $address->address_id . ', \'' . $add_type . '\')">' . $address->contact . '</td>' . chr(10);
            $field .= '  <td onclick="getAddress(' . $address->address_id . ', \'' . $add_type . '\')">' . $address->address1 . '</td>' . chr(10);
            $field .= '  <td onclick="getAddress(' . $address->address_id . ', \'' . $add_type . '\')">' . $address->city_town . '</td>' . chr(10);
            $field .= '  <td onclick="getAddress(' . $address->address_id . ', \'' . $add_type . '\')">' . $address->state_province . '</td>' . chr(10);
            $field .= '  <td onclick="getAddress(' . $address->address_id . ', \'' . $add_type . '\')">' . $address->postal_code . '</td>' . chr(10);
            // add special fields
            $field .= '  <td onclick="getAddress(' . $address->address_id . ', \'' . $add_type . '\')">' . $address->country_code . '</td>' . chr(10);
            if ($method == 'p') {
                $field .= '  <td onclick="getAddress(' . $address->address_id . ', \'' . $add_type . '\')">' . ($address['hint'] ? $address['hint'] : '&nbsp;') . '</td>' . chr(10);
            }
            $field .= '  <td align="center">';
            $field .= html_icon('actions/edit-find-replace.png', TEXT_EDIT, 'small', 'onclick="getAddress(' . $address->address_id . ', \'' . $add_type . '\')"') . chr(10);
            $field .= '&nbsp;' . html_icon('emblems/emblem-unreadable.png', TEXT_DELETE, 'small', 'onclick="if (confirm(\'' . ACT_WARN_DELETE_ADDRESS . '\')) deleteAddress(' . $address->address_id . ');"') . chr(10);
            $field .= '  </td>' . chr(10);
            $field .= '</tr>' . chr(10);
            $odd = !$odd;
        }
        $field .= '</tbody>' . chr(10) . chr(10);
        $field .= '</table></td></tr>';
    }
    $field .= '<tr><td><table class="ui-widget" style="border-collapse:collapse;width:100%;">' . chr(10);
    if (!$short) {
        $field .= '<tr>';
        $field .= '  <td align="right">' . GEN_PRIMARY_NAME . '</td>' . chr(10);
        $field .= '  <td>' . html_input_field("address[{$add_type}][primary_name]", $entries->address[$add_type]['primary_name'], 'size="49" maxlength="48"', true) . '</td>' . chr(10);
        $field .= '  <td align="right">' . GEN_TELEPHONE1 . '</td>' . chr(10);
        $field .= '  <td>' . html_input_field("address[{$add_type}][telephone1]", $entries->address[$add_type]['telephone1'], 'size="21" maxlength="20"', ADDRESS_BOOK_TELEPHONE1_REQUIRED) . '</td>' . chr(10);
        $field .= '</tr>';
    }
    $field .= '<tr>';
    $field .= '  <td align="right">' . GEN_CONTACT . html_hidden_field("address[{$add_type}][address_id]", $entries->address[$add_type]['address_id']) . '</td>' . chr(10);
    $field .= '  <td>' . html_input_field("address[{$add_type}][contact]", $entries->address[$add_type]['contact'], 'size="33" maxlength="32"', ADDRESS_BOOK_CONTACT_REQUIRED) . '</td>' . chr(10);
    $field .= '  <td align="right">' . GEN_TELEPHONE2 . '</td>' . chr(10);
    $field .= '  <td>' . html_input_field("address[{$add_type}][telephone2]", $entries->address[$add_type]['telephone2'], 'size="21" maxlength="20"') . '</td>' . chr(10);
    $field .= '</tr>';
    $field .= '<tr>';
    $field .= '  <td align="right">' . GEN_ADDRESS1 . '</td>' . chr(10);
    $field .= '  <td>' . html_input_field("address[{$add_type}][address1]", $entries->address[$add_type]['address1'], 'size="33" maxlength="32"', ADDRESS_BOOK_ADDRESS1_REQUIRED) . '</td>' . chr(10);
    $field .= '  <td align="right">' . GEN_FAX . '</td>' . chr(10);
    $field .= '  <td>' . html_input_field("address[{$add_type}][telephone3]", $entries->address[$add_type]['telephone3'], 'size="21" maxlength="20"') . '</td>' . chr(10);
    $field .= '</tr>';
    $field .= '<tr>';
    $field .= '  <td align="right">' . GEN_ADDRESS2 . '</td>' . chr(10);
    $field .= '  <td>' . html_input_field("address[{$add_type}][address2]", $entries->address[$add_type]['address2'], 'size="33" maxlength="32"', ADDRESS_BOOK_ADDRESS2_REQUIRED) . '</td>' . chr(10);
    $field .= '  <td align="right">' . GEN_TELEPHONE4 . '</td>' . chr(10);
    $field .= '  <td>' . html_input_field("address[{$add_type}][telephone4]", $entries->address[$add_type]['telephone4'], 'size="21" maxlength="20"') . '</td>' . chr(10);
    $field .= '</tr>';
    $field .= '<tr>';
    $field .= '  <td align="right">' . GEN_CITY_TOWN . '</td>' . chr(10);
    $field .= '  <td>' . html_input_field("address[{$add_type}][city_town]", $entries->address[$add_type]['city_town'], 'size="25" maxlength="24"', ADDRESS_BOOK_CITY_TOWN_REQUIRED) . '</td>' . chr(10);
    $field .= '  <td align="right">' . GEN_EMAIL . '</td>' . chr(10);
    $field .= '  <td>' . html_input_field("address[{$add_type}][email]", $entries->address[$add_type]['email'], 'size="51" maxlength="50"') . '</td>' . chr(10);
    $field .= '</tr>';
    $field .= '<tr>';
    $field .= '  <td align="right">' . GEN_STATE_PROVINCE . '</td>' . chr(10);
    $field .= '  <td>' . html_input_field("address[{$add_type}][state_province]", $entries->address[$add_type]['state_province'], 'size="25" maxlength="24"', ADDRESS_BOOK_STATE_PROVINCE_REQUIRED) . '</td>' . chr(10);
    $field .= '  <td align="right">' . GEN_WEBSITE . '</td>' . chr(10);
    $field .= '  <td>' . html_input_field("address[{$add_type}][website]", $entries->address[$add_type]['website'], 'size="51" maxlength="50"') . '</td>' . chr(10);
    $field .= '</tr>';
    $field .= '<tr>';
    $field .= '  <td align="right">' . GEN_POSTAL_CODE . '</td>' . chr(10);
    $field .= '  <td>' . html_input_field("address[{$add_type}][postal_code]", $entries->address[$add_type]['postal_code'], 'size="11" maxlength="10"', ADDRESS_BOOK_POSTAL_CODE_REQUIRED) . '</td>' . chr(10);
    $field .= '  <td align="right">' . GEN_COUNTRY . '</td>' . chr(10);
    $field .= '  <td>' . html_pull_down_menu("address[{$add_type}][country_code]", gen_get_countries(), $entries->address[$add_type]['country_code'] ? $entries->address[$add_type]['country_code'] : COMPANY_COUNTRY) . '</td>' . chr(10);
    $field .= '</tr>';
    if ($method != 'm' || $add_type == 'im' && substr($add_type, 0, 1) != 'i') {
        $field .= '<tr>' . chr(10);
        $field .= '  <td align="right">' . TEXT_NOTES . '</td>' . chr(10);
        $field .= '  <td colspan="3">' . html_textarea_field("address[{$add_type}][notes]", 80, 3, $entries->address[$add_type]['notes']) . chr(10);
        if ($reset_button) {
            $field .= html_icon('actions/view-refresh.png', TEXT_RESET, 'small', 'onclick="clearAddress(\'' . $add_type . '\')"') . chr(10);
        }
        $field .= '  </td>' . chr(10);
        $field .= '</tr>' . chr(10);
    }
    $field .= '</table></td></tr>' . chr(10) . chr(10);
    return $field;
}
Ejemplo n.º 29
0
 function build_form_html($action, $id = '')
 {
     global $db;
     $sql = "select category_id, category_name, category_description, sort_order from " . $this->db_table . " where category_id = " . $id;
     $result = $db->Execute($sql);
     if ($action == 'new') {
         $cInfo = '';
     } else {
         $cInfo = new objectInfo($result->fields);
     }
     $output = '<table border="0" width="100%" cellspacing="0" cellpadding="1">' . chr(10);
     $output .= '  <tr class="dataTableHeadingRow">' . chr(10);
     $output .= '    <th colspan="2">' . ($action == 'new' ? INV_INFO_HEADING_NEW_CATEGORY : INV_INFO_HEADING_EDIT_CATEGORY) . '</th>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr class="dataTableRow">' . chr(10);
     $output .= '    <td colspan="2">' . ($action == 'new' ? INV_INFO_INSERT_INTRO : INV_EDIT_INTRO) . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr class="dataTableRow">' . chr(10);
     $output .= '    <td>' . INV_INFO_CATEGORY_NAME . '</td>' . chr(10);
     $output .= '    <td>' . html_input_field('category_name', $cInfo->category_name) . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr class="dataTableRow">' . chr(10);
     $output .= '    <td>' . INV_INFO_CATEGORY_DESCRIPTION . '</td>' . chr(10);
     $output .= '    <td>' . html_textarea_field('category_description', 30, 10, $cInfo->category_description) . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '  <tr class="dataTableRow">' . chr(10);
     $output .= '    <td>' . TEXT_SORT_ORDER . '</td>' . chr(10);
     $output .= '    <td>' . html_input_field('sort_order', $cInfo->sort_order) . '</td>' . chr(10);
     $output .= '  </tr>' . chr(10);
     $output .= '</table>' . chr(10);
     return $output;
 }
Ejemplo n.º 30
0
        echo html_input_field('t:' . $cID, htmlspecialchars($query_result->fields['translation']), 'size="64"');
        ?>
</td>
	<td><?php 
        echo html_input_field('x:' . $i, htmlspecialchars(constant($const)), 'readonly="readonly" size="64"');
        ?>
</td>
<?php 
    } else {
        ?>
	<td><?php 
        echo html_textarea_field('t:' . $cID, 46, 3, htmlspecialchars($query_result->fields['translation']));
        ?>
</td>
	<td><?php 
        echo html_textarea_field('x:' . $i, 46, 3, htmlspecialchars(constant($const)), 'readonly="readonly"');
        ?>
</td>
<?php 
    }
    ?>
	<td><?php 
    echo html_input_field('c:' . $i, $const, 'readonly="readonly" size="48"');
    ?>
</td>
  </tr> 
<?php 
    $i++;
    $query_result->MoveNext();
    $odd = !$odd;
}