本文整理汇总了PHP中Form::select_date方法的典型用法代码示例。如果您正苦于以下问题:PHP Form::select_date方法的具体用法?PHP Form::select_date怎么用?PHP Form::select_date使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Form
的用法示例。
在下文中一共展示了Form::select_date方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: print_form_filter
function print_form_filter($userid)
{
global $db, $langs;
$langs->load('users');
$form = new Form($db);
print '<form name="filter" methode="GET" action="' . $_SERVER['PHP_SELF'] . '">';
print $langs->trans('HierarchicalResponsible');
print $form->select_dolusers($userid, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', '', 1);
print '<br /><br />';
$date_deb = explode('/', $_REQUEST['date_deb']);
$date_deb = implode('/', array_reverse($date_deb));
$date_fin = explode('/', $_REQUEST['date_fin']);
$date_fin = implode('/', array_reverse($date_fin));
print 'Du ';
$form->select_date(strtotime($date_deb), 'date_deb');
print 'Au ';
$form->select_date(strtotime($date_fin), 'date_fin');
print '<input type="SUBMIT" class="butAction" value="Filtrer" />';
print '</form>';
print '<br />';
}
示例2: foreach
$totalvalue = $totalvalue + $product->pmp * $obj->reel;
$totalvaluesell = $totalvaluesell + $product->price * $obj->reel;
//Batch Detail
if (!empty($conf->productbatch->enabled) && $product->hasbatch()) {
$details = Productbatch::findAll($db, $obj->product_stock_id);
if ($details < 0) {
dol_print_error($db);
}
foreach ($details as $pdluo) {
if ($action == 'editline' && GETPOST('lineid', 'int') == $pdluo->id) {
//Current line edit
print "\n" . '<tr><td colspan="9">';
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST"><input type="hidden" name="pdluoid" value="' . $pdluo->id . '"><input type="hidden" name="action" value="updateline"><input type="hidden" name="id" value="' . $id . '"><table class="noborder" width="100%"><tr><td width="10%"></td>';
print '<td align="right" width="10%"><input type="text" name="batch_number" value="' . $pdluo->batch . '"></td>';
print '<td align="center" width="10%">';
$form->select_date($pdluo->eatby, 'eatby', '', '', 1, '', 1, 0, 1);
print '</td>';
print '<td align="center" width="10%">';
$form->select_date($pdluo->sellby, 'sellby', '', '', 1, '', 1, 0, 1);
print '</td>';
print '<td align="right" width="10%">' . $pdluo->qty . ($pdluo->qty < 0 ? ' ' . img_warning() : '') . '</td>';
print '<td colspan="4"><input type="submit" class="button" id="savelinebutton" name="save" value="' . $langs->trans("Save") . '">';
print '<input type="submit" class="button" id="cancellinebutton" name="Cancel" value="' . $langs->trans("Cancel") . '"></td></tr>';
print '</table></form>';
} else {
print "\n" . '<tr><td align="right">';
print img_picto($langs->trans("Tranfer"), 'uparrow', 'class="hideonsmartphone"') . ' ';
print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $product->id . '&action=transfert&pdluoid=' . $pdluo->id . '">' . $langs->trans("StockMovement") . '</a>';
// Disabled, because edition of stock content must use the "Correct stock menu".
// Do not use this, or data will be wrong (bad tracking of movement label, inventory code, ...
//print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=editline&lineid='.$pdluo->id.'#'.$pdluo->id.'">';
示例3: showInputField
/**
* Return HTML string to put an input field into a page
*
* @param string $key Key of attribute
* @param string $value Value to show (for date type it must be in timestamp format)
* @param string $moreparam To add more parametes on html input tag
* @param string $keyprefix Prefix string to add into name and id of field (can be used to avoid duplicate names)
* @param string $keysuffix Suffix string to add into name and id of field (can be used to avoid duplicate names)
* @param int $showsize Value for size attributed
* @param int $objectid Current object id
* @return string
*/
function showInputField($key, $value, $moreparam = '', $keyprefix = '', $keysuffix = '', $showsize = 0, $objectid = 0)
{
global $conf, $langs;
$label = $this->attribute_label[$key];
$type = $this->attribute_type[$key];
$size = $this->attribute_size[$key];
$elementtype = $this->attribute_elementtype[$key];
$unique = $this->attribute_unique[$key];
$required = $this->attribute_required[$key];
$param = $this->attribute_param[$key];
$perms = $this->attribute_perms[$key];
$list = $this->attribute_list[$key];
if (empty($showsize)) {
if ($type == 'date') {
$showsize = 10;
} elseif ($type == 'datetime') {
$showsize = 19;
} elseif (in_array($type, array('int', 'double'))) {
$showsize = 10;
} else {
$showsize = round($size);
if ($showsize > 48) {
$showsize = 48;
}
}
}
if (in_array($type, array('date', 'datetime'))) {
$tmp = explode(',', $size);
$newsize = $tmp[0];
$showtime = in_array($type, array('datetime')) ? 1 : 0;
// Do not show current date when field not required (see select_date() method)
if (!$required && $value == '') {
$value = '-1';
}
require_once DOL_DOCUMENT_ROOT . '/core/class/html.form.class.php';
global $form;
if (!is_object($form)) {
$form = new Form($this->db);
}
// TODO Must also support $moreparam
$out = $form->select_date($value, $keysuffix . 'options_' . $key . $keyprefix, $showtime, $showtime, $required, '', 1, 1, 1, 0, 1);
} elseif (in_array($type, array('int'))) {
$tmp = explode(',', $size);
$newsize = $tmp[0];
$out = '<input type="text" class="flat" name="' . $keysuffix . 'options_' . $key . $keyprefix . '" size="' . $showsize . '" maxlength="' . $newsize . '" value="' . $value . '"' . ($moreparam ? $moreparam : '') . '>';
} elseif ($type == 'varchar') {
$out = '<input type="text" class="flat" name="' . $keysuffix . 'options_' . $key . $keyprefix . '" size="' . $showsize . '" maxlength="' . $size . '" value="' . $value . '"' . ($moreparam ? $moreparam : '') . '>';
} elseif ($type == 'text') {
require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
$doleditor = new DolEditor($keysuffix . 'options_' . $key . $keyprefix, $value, '', 200, 'dolibarr_notes', 'In', false, false, !empty($conf->fckeditor->enabled) && $conf->global->FCKEDITOR_ENABLE_SOCIETE, 5, 100);
$out = $doleditor->Create(1);
} elseif ($type == 'boolean') {
$checked = '';
if (!empty($value)) {
$checked = ' checked value="1" ';
} else {
$checked = ' value="1" ';
}
$out = '<input type="checkbox" class="flat" name="' . $keysuffix . 'options_' . $key . $keyprefix . '" ' . $checked . ' ' . ($moreparam ? $moreparam : '') . '>';
} elseif ($type == 'mail') {
$out = '<input type="text" class="flat" name="' . $keysuffix . 'options_' . $key . $keyprefix . '" size="32" value="' . $value . '" ' . ($moreparam ? $moreparam : '') . '>';
} elseif ($type == 'phone') {
$out = '<input type="text" class="flat" name="' . $keysuffix . 'options_' . $key . $keyprefix . '" size="20" value="' . $value . '" ' . ($moreparam ? $moreparam : '') . '>';
} elseif ($type == 'price') {
$out = '<input type="text" class="flat" name="' . $keysuffix . 'options_' . $key . $keyprefix . '" size="6" value="' . price($value) . '" ' . ($moreparam ? $moreparam : '') . '> ' . $langs->getCurrencySymbol($conf->currency);
} elseif ($type == 'double') {
if (!empty($value)) {
$value = price($value);
}
$out = '<input type="text" class="flat" name="' . $keysuffix . 'options_' . $key . $keyprefix . '" size="6" value="' . $value . '" ' . ($moreparam ? $moreparam : '') . '> ';
} elseif ($type == 'select') {
$out = '';
if (!empty($conf->use_javascript_ajax) && !empty($conf->global->MAIN_EXTRAFIELDS_USE_SELECT2)) {
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
$out .= ajax_combobox($keysuffix . 'options_' . $key . $keyprefix, array(), 0);
}
$out .= '<select class="flat" name="' . $keysuffix . 'options_' . $key . $keyprefix . '" id="options_' . $key . $keyprefix . '" ' . ($moreparam ? $moreparam : '') . '>';
$out .= '<option value="0"> </option>';
foreach ($param['options'] as $key => $val) {
list($val, $parent) = explode('|', $val);
$out .= '<option value="' . $key . '"';
$out .= $value == $key ? ' selected' : '';
$out .= !empty($parent) ? ' parent="' . $parent . '"' : '';
$out .= '>' . $val . '</option>';
}
$out .= '</select>';
} elseif ($type == 'sellist') {
$out = '';
//.........这里部分代码省略.........
示例4: GETPOST
if ($user->rights->banque->modifier && $action == 'addline') {
print load_fiche_titre($langs->trans("AddBankRecordLong"), '', '');
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans("Date") . '</td>';
print '<td> </td>';
print '<td>' . $langs->trans("Type") . '</td>';
print '<td>' . $langs->trans("Numero") . '</td>';
print '<td colspan="2">' . $langs->trans("Description") . '</td>';
print '<td align=right>' . $langs->trans("Debit") . '</td>';
print '<td align=right>' . $langs->trans("Credit") . '</td>';
print '<td colspan="2" align="center"> </td>';
print '</tr>';
print '<tr ' . $bc[false] . '>';
print '<td class="nowrap" colspan="2">';
$form->select_date($dateop, 'op', 0, 0, 0, 'transaction');
print '</td>';
print '<td class="nowrap">';
$form->select_types_paiements(GETPOST('operation') ? GETPOST('operation') : ($object->courant == 2 ? 'LIQ' : ''), 'operation', '1,2', 2, 1);
print '</td><td>';
print '<input name="num_chq" class="flat" type="text" size="4" value="' . GETPOST("num_chq") . '"></td>';
print '<td colspan="2">';
print '<input name="label" class="flat" type="text" size="24" value="' . GETPOST("label") . '">';
if ($nbcategories) {
print '<br>' . $langs->trans("Rubrique") . ': <select class="flat" name="cat1">' . $options . '</select>';
}
print '</td>';
print '<td align=right><input name="debit" class="flat" type="text" size="4" value="' . GETPOST("debit") . '"></td>';
print '<td align=right><input name="credit" class="flat" type="text" size="4" value="' . GETPOST("credit") . '"></td>';
print '<td colspan="2" align="center">';
print '<input type="submit" name="save" class="button" value="' . $langs->trans("Add") . '"><br>';
示例5: empty
}
print '<form id="payment_form" name="add_paiement" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="add_paiement">';
print '<input type="hidden" name="facid" value="' . $facture->id . '">';
print '<input type="hidden" name="socid" value="' . $facture->socid . '">';
print '<input type="hidden" name="type" value="' . $facture->type . '">';
print '<input type="hidden" name="thirdpartylabel" id="thirdpartylabel" value="' . dol_escape_htmltag($facture->client->name) . '">';
print '<table class="border" width="100%">';
// Third party
print '<tr><td><span class="fieldrequired">' . $langs->trans('Company') . '</span></td><td colspan="2">' . $facture->client->getNomUrl(4) . "</td></tr>\n";
// Date payment
print '<tr><td><span class="fieldrequired">' . $langs->trans('Date') . '</span></td><td>';
$datepayment = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
$datepayment = $datepayment == '' ? empty($conf->global->MAIN_AUTOFILL_DATE) ? -1 : 0 : $datepayment;
$html->select_date($datepayment, '', '', '', 0, "add_paiement", 1, 1);
print '</td>';
print '<td>' . $langs->trans('Comments') . '</td></tr>';
$rowspan = 5;
if ($conf->use_javascript_ajax && !empty($conf->global->MAIN_JS_ON_PAYMENT)) {
$rowspan++;
}
// Payment mode
print '<tr><td><span class="fieldrequired">' . $langs->trans('PaymentMode') . '</span></td><td>';
$html->select_types_paiements(GETPOST('paiementcode') ? GETPOST('paiementcode') : $facture->mode_reglement_code, 'paiementcode', '', 2);
print "</td>\n";
print '<td rowspan="' . $rowspan . '" valign="top">';
print '<textarea name="comment" wrap="soft" cols="60" rows="' . ROWS_4 . '">' . (empty($_POST['comment']) ? '' : $_POST['comment']) . '</textarea></td>';
print '</tr>';
// Payment amount
if ($conf->use_javascript_ajax && !empty($conf->global->MAIN_JS_ON_PAYMENT)) {
示例6: empty
$default = empty($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT) ? '' : $conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT;
$formactions->select_type_actions(GETPOST("actioncode") ? GETPOST("actioncode") : ($object->type_code ? $object->type_code : $default), "actioncode", "systemauto", 0, -1);
print '</td></tr>';
}
// Title
print '<tr><td' . (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? ' class="fieldrequired"' : '') . '>' . $langs->trans("Title") . '</td><td><input type="text" id="label" name="label" size="60" value="' . GETPOST('label') . '"></td></tr>';
// Full day
print '<tr><td>' . $langs->trans("EventOnFullDay") . '</td><td><input type="checkbox" id="fullday" name="fullday" ' . (GETPOST('fullday') ? ' checked' : '') . '></td></tr>';
// Date start
$datep = $datep ? $datep : $object->datep;
if (GETPOST('datep', 'int', 1)) {
$datep = dol_stringtotime(GETPOST('datep', 'int', 1), 0);
}
print '<tr><td width="30%" class="nowrap"><span class="fieldrequired">' . $langs->trans("DateActionStart") . '</span></td><td>';
if (GETPOST("afaire") == 1) {
$form->select_date($datep, 'ap', 1, 1, 0, "action", 1, 1, 0, 0, 'fulldayend');
} else {
if (GETPOST("afaire") == 2) {
$form->select_date($datep, 'ap', 1, 1, 1, "action", 1, 1, 0, 0, 'fulldayend');
} else {
$form->select_date($datep, 'ap', 1, 1, 1, "action", 1, 1, 0, 0, 'fulldaystart');
}
}
print '</td></tr>';
// Date end
$datef = $datef ? $datef : $object->datef;
if (GETPOST('datef', 'int', 1)) {
$datef = dol_stringtotime(GETPOST('datef', 'int', 1), 0);
}
if (empty($datef) && !empty($datep) && !empty($conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS)) {
$datef = dol_time_plus_duree($datep, $conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS, 'h');
示例7: GETPOST
/* */
/* ************************************************************************** */
if ($action == 'create') {
print_fiche_titre($langs->trans("AddDonation"));
dol_htmloutput_errors($mesg, $mesgs);
print '<form name="add" action="fiche.php" method="post">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<table class="border" width="100%">';
print '<input type="hidden" name="action" value="add">';
$nbrows = 11;
if (!empty($conf->projet->enabled)) {
$nbrows++;
}
// Date
print '<tr><td class="fieldrequired">' . $langs->trans("Date") . '</td><td>';
$form->select_date($donation_date ? $donation_date : -1, '', '', '', '', "add", 1, 1);
print '</td>';
print '<td rowspan="' . $nbrows . '" valign="top">' . $langs->trans("Comments") . ' :<br>';
print "<textarea name=\"note_private\" wrap=\"soft\" cols=\"40\" rows=\"15\">" . GETPOST("note_private") . "</textarea></td>";
print "</tr>";
// Amount
print "<tr>" . '<td class="fieldrequired">' . $langs->trans("Amount") . '</td><td><input type="text" name="amount" value="' . $_POST["amount"] . '" size="10"> ' . $langs->trans("Currency" . $conf->currency) . '</td></tr>';
print '<tr><td class="fieldrequired">' . $langs->trans("PublicDonation") . "</td><td>";
print $form->selectyesno("public", isset($_POST["public"]) ? $_POST["public"] : 1, 1);
print "</td></tr>\n";
print "<tr>" . '<td>' . $langs->trans("Company") . '</td><td><input type="text" name="societe" value="' . $_POST["societe"] . '" size="40"></td></tr>';
print "<tr>" . '<td>' . $langs->trans("Firstname") . '</td><td><input type="text" name="firstname" value="' . $_POST["firstname"] . '" size="40"></td></tr>';
print "<tr>" . '<td>' . $langs->trans("Lastname") . '</td><td><input type="text" name="lastname" value="' . $_POST["lastname"] . '" size="40"></td></tr>';
print "<tr>" . '<td>' . $langs->trans("Address") . '</td><td>';
print '<textarea name="address" wrap="soft" cols="40" rows="3">' . $_POST["address"] . '</textarea></td></tr>';
// Zip / Town
示例8:
}
$datesp = dol_mktime(0, 0, 0, $datespmonth, $datespday, $datespyear);
$dateep = dol_mktime(23, 59, 59, $dateepmonth, $dateepday, $dateepyear);
if (empty($datesp) || empty($dateep)) {
$datesp = dol_get_first_day($pastmonthyear, $pastmonth, false);
$dateep = dol_get_last_day($pastmonthyear, $pastmonth, false);
}
print '<form name="salary" action="' . $_SERVER["PHP_SELF"] . '" method="post">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="add">';
print_fiche_titre($langs->trans("NewSalaryPayment"), '', 'title_accountancy.png');
dol_fiche_head('', '');
print '<table class="border" width="100%">';
print "<tr>";
print '<td class="fieldrequired">' . $langs->trans("DatePayment") . '</td><td>';
print $form->select_date(empty($datep) ? -1 : $datep, "datep", '', '', '', 'add', 1, 1);
print '</td></tr>';
print '<tr><td>' . $langs->trans("DateValue") . '</td><td>';
print $form->select_date(empty($datev) ? -1 : $datev, "datev", '', '', '', 'add', 1, 1);
print '</td></tr>';
// Employee
print "<tr>";
print '<td class="fieldrequired">' . $langs->trans("Employee") . '</td><td>';
print $form->select_dolusers(GETPOST('fk_user', 'int'), 'fk_user', 1);
print '</td></tr>';
// Label
print '<tr><td class="fieldrequired">' . $langs->trans("Label") . '</td><td><input name="label" size="40" value="' . ($_POST["label"] ? $_POST["label"] : $langs->trans("SalaryPayment")) . '"></td></tr>';
print "<tr>";
print '<td class="fieldrequired">' . $langs->trans("DateStartPeriod") . '</td><td>';
print $form->select_date($datesp, "datesp", '', '', '', 'add');
print '</td></tr>';
示例9: DolEditor
}
print '</td><td colspan="3">';
print $object->ref_client;
print '</td>';
print '</tr>';
// Tiers
print '<tr><td class="fieldrequired">' . $langs->trans('Company') . '</td>';
print '<td colspan="3">' . $soc->getNomUrl(1) . '</td>';
print '</tr>';
// Date delivery planned
print '<tr><td>' . $langs->trans("DateDeliveryPlanned") . '</td>';
print '<td colspan="3">';
//print dol_print_date($object->date_livraison,"day"); // date_livraison come from order and will be stored into date_delivery planed.
$date_delivery = $date_delivery ? $date_delivery : $object->date_livraison;
// $date_delivery comes from GETPOST
print $form->select_date($date_delivery ? $date_delivery : -1, 'date_delivery', 1, 1, 1);
print "</td>\n";
print '</tr>';
// Note Public
print '<tr><td>' . $langs->trans("NotePublic") . '</td>';
print '<td colspan="3">';
$doleditor = new DolEditor('note_public', $object->note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
print $doleditor->Create(1);
print "</td></tr>";
// Note Private
if ($object->note_private && !$user->societe_id) {
print '<tr><td>' . $langs->trans("NotePrivate") . '</td>';
print '<td colspan="3">';
$doleditor = new DolEditor('note_private', $object->note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
print $doleditor->Create(1);
print "</td></tr>";
示例10:
print '<input type="hidden" name="ref" value="' . ($_POST["ref"] ? $_POST["ref"] : $defaultref) . '">';
print '<tr><td><span class="fieldrequired">' . $langs->trans("Ref") . '</span></td><td>' . ($_POST["ref"] ? $_POST["ref"] : $defaultref) . '</td></tr>';
print '<tr><td class="fieldrequired">' . $langs->trans("Label") . '</td><td>';
print '<input type="text" size="25" name="label" class="flat" value="' . $label . '">';
print '</td></tr>';
// List of projects
print '<tr><td class="fieldrequired">' . $langs->trans("ChildOfTask") . '</td><td>';
print $formother->selectProjectTasks(GETPOST('task_parent'), $projectid ? $projectid : $object->id, 'task_parent', 0, 0, 1, 1);
print '</td></tr>';
print '<tr><td>' . $langs->trans("AffectedTo") . '</td><td>';
$contactsofproject = !empty($object->id) ? $object->getListContactId('internal') : '';
$form->select_users($user->id, 'userid', 0, '', 0, '', $contactsofproject);
print '</td></tr>';
// Date start
print '<tr><td>' . $langs->trans("DateStart") . '</td><td>';
print $form->select_date($date_start ? $date_start : '', 'dateo', 1, 1, 0, '', 1, 1);
print '</td></tr>';
// Date end
print '<tr><td>' . $langs->trans("DateEnd") . '</td><td>';
print $form->select_date($date_end ? $date_end : -1, 'datee', 1, 1, 0, '', 1, 1);
print '</td></tr>';
// planned workload
print '<tr><td>' . $langs->trans("PlannedWorkload") . '</td><td>';
print $form->select_duration('planned_workload', $planned_workload ? $planned_workload : $object->planned_workload, 0, 'text');
print '</td></tr>';
// Progress
print '<tr><td>' . $langs->trans("ProgressDeclared") . '</td><td colspan="3">';
print $formother->select_percent($progress, 'progress');
print '</td></tr>';
// Description
print '<tr><td valign="top">' . $langs->trans("Description") . '</td>';
示例11: GETPOST
print $langs->trans("DateDue");
print '</td><td align="left">';
print ' ';
print '</td>';
print "</tr>\n";
print '<tr ' . $bc[$var] . ' valign="top">';
print '<td> </td>';
// Label
print '<td align="left"><input type="text" size="34" name="label" class="flat" value="' . GETPOST('label') . '"></td>';
// Type
print '<td align="left">';
$formsocialcontrib->select_type_socialcontrib(GETPOST("actioncode") ? GETPOST("actioncode") : '', 'actioncode', 1);
print '</td>';
// Date end period
print '<td align="center">';
print $form->select_date(!empty($dateperiod) ? $dateperiod : '-1', 'period', 0, 0, 0, 'charge', 1);
print '</td>';
print '<td align="right"><input type="text" size="6" name="amount" class="flat" value="' . GETPOST('amount') . '"></td>';
print '<td align="center">';
print $form->select_date(!empty($dateech) ? $dateech : '-1', 'ech', 0, 0, 0, 'charge', 1);
print '</td>';
print '<td align="center"><input type="submit" class="button" value="' . $langs->trans("Add") . '"></td>';
print '</tr>';
print '</table>';
print '</form>';
}
/* *************************************************************************** */
/* */
/* Mode fiche */
/* */
/* *************************************************************************** */
示例12: GETPOST
} else {
print $langs->trans("CompanyHasNoAbsoluteDiscount");
}
print '.';
print '</td></tr>';
}
// Commercial suivi
print '<tr><td width="20%" class="nowrap"><span class="fieldrequired">' . $langs->trans("TypeContact_contrat_internal_SALESREPFOLL") . '</span></td><td>';
print $form->select_dolusers(GETPOST("commercial_suivi_id") ? GETPOST("commercial_suivi_id") : $user->id, 'commercial_suivi_id', 1, '');
print '</td></tr>';
// Commercial signature
print '<tr><td width="20%" class="nowrap"><span class="fieldrequired">' . $langs->trans("TypeContact_contrat_internal_SALESREPSIGN") . '</span></td><td>';
print $form->select_dolusers(GETPOST("commercial_signature_id") ? GETPOST("commercial_signature_id") : $user->id, 'commercial_signature_id', 1, '');
print '</td></tr>';
print '<tr><td><span class="fieldrequired">' . $langs->trans("Date") . '</span></td><td>';
$form->select_date($datecontrat, '', 0, 0, '', "contrat");
print "</td></tr>";
if (!empty($conf->projet->enabled)) {
$formproject = new FormProjets($db);
print '<tr><td>' . $langs->trans("Project") . '</td><td>';
$formproject->select_projects($soc->id, $projectid, "projectid");
print "</td></tr>";
}
print '<tr><td>' . $langs->trans("NotePublic") . '</td><td valign="top">';
$doleditor = new DolEditor('note_public', $note_public, '', '100', 'dolibarr_notes', 'In', 1, true, true, ROWS_3, 70);
print $doleditor->Create(1);
if (empty($user->societe_id)) {
print '<tr><td>' . $langs->trans("NotePrivate") . '</td><td valign="top">';
$doleditor = new DolEditor('note_private', $note_private, '', '100', 'dolibarr_notes', 'In', 1, true, true, ROWS_3, 70);
print $doleditor->Create(1);
print '</td></tr>';
示例13:
print '<input type="hidden" name="action" value="addtimespent">';
print '<input type="hidden" name="id" value="' . $object->id . '">';
print '<input type="hidden" name="withproject" value="' . $withproject . '">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td width="100">' . $langs->trans("Date") . '</td>';
print '<td>' . $langs->trans("By") . '</td>';
print '<td>' . $langs->trans("Note") . '</td>';
print '<td align="right">' . $langs->trans("Duration") . '</td>';
print '<td width="80"> </td>';
print "</tr>\n";
print '<tr ' . $bc[false] . '>';
// Date
print '<td class="nowrap">';
$newdate = dol_mktime(12, 0, 0, $_POST["timemonth"], $_POST["timeday"], $_POST["timeyear"]);
print $form->select_date($newdate, 'time', '', '', '', "timespent_date");
print '</td>';
// Contributor
print '<td class="nowrap">';
$restrictaddtimetocontactoftask = 0;
if (empty($conf->global->PROJECT_TIME_ON_ALL_TASKS_MY_PROJECTS)) {
$restrictaddtimetocontactoftask = $object->getListContactId('internal');
}
print img_object('', 'user');
print $form->select_dolusers($_POST["userid"] ? $_POST["userid"] : $user->id, 'userid', 0, '', 0, '', $restrictaddtimetocontactoftask);
// Note: If user is not allowed it will be disabled into combo list and userid not posted
print '</td>';
// Note
print '<td class="nowrap">';
print '<textarea name="timespent_note" cols="80" rows="' . ROWS_3 . '">' . ($_POST['timespent_note'] ? $_POST['timespent_note'] : '') . '</textarea>';
print '</td>';
示例14:
print ' ';
print $langs->trans("Payment");
print '</label>';
print ' ';
print '<label for="radiorefund">';
print '<input type="radio" id="radiorefund" data-label="' . $langs->trans('VATRefund') . '" class="flat" name="refund" value="1"' . ($refund ? ' checked="checked"' : '') . '>';
print ' ';
print $langs->trans("Refund");
print '</label>';
print '</div>';
print "<br>\n";
dol_fiche_head();
print '<table class="border" width="100%">';
print "<tr>";
print '<td class="fieldrequired">' . $langs->trans("DatePayment") . '</td><td>';
print $form->select_date($datep, "datep", '', '', '', 'add');
print '</td></tr>';
print '<tr><td class="fieldrequired">' . $langs->trans("DateValue") . '</td><td>';
print $form->select_date($datev, "datev", '', '', '', 'add');
print '</td></tr>';
// Label
if ($refund == 1) {
$label = $langs->trans("VATRefund");
} else {
$label = $langs->trans("VATPayment");
}
print '<tr><td class="fieldrequired">' . $langs->trans("Label") . '</td><td><input name="label" id="label" size="40" value="' . ($_POST["label"] ? $_POST["label"] : $label) . '"></td></tr>';
// Amount
print '<tr><td class="fieldrequired">' . $langs->trans("Amount") . '</td><td><input name="amount" size="10" value="' . $_POST["amount"] . '"></td></tr>';
if (!empty($conf->banque->enabled)) {
print '<tr><td class="fieldrequired">' . $langs->trans("Account") . '</td><td>';
示例15:
print "</tr>\n";
// Ref client
print '<tr><td>';
print $langs->trans('RefCustomer') . '</td><td colspan="3">';
print $object->ref_client;
print '</td>';
print '</tr>';
// Tiers
print '<tr><td class="fieldrequired">' . $langs->trans('Company') . '</td>';
print '<td colspan="3">' . $soc->getNomUrl(1) . '</td>';
print '</tr>';
// Date delivery planned
print '<tr><td class="fieldrequired">' . $langs->trans("DateDeliveryPlanned") . '</td>';
print '<td colspan="3">';
//print dol_print_date($object->date_livraison,"day"); // date_livraison come from order and will be stored into date_delivery planed.
print $html->select_date($object->date_livraison ? $object->date_livraison : -1, 'date_delivery', 1, 1);
print "</td>\n";
print '</tr>';
// Delivery address
if ($origin == 'commande' && $conf->global->COMMANDE_ADD_DELIVERY_ADDRESS || $origin == 'propal' && $conf->global->PROPAL_ADD_DELIVERY_ADDRESS) {
print '<tr><td>' . $langs->trans('DeliveryAddress') . '</td>';
print '<td colspan="3">';
if (!empty($object->fk_delivery_address)) {
$html->form_address($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->fk_delivery_address, $_GET['socid'], 'none', 'commande', $object->id);
}
print '</td></tr>' . "\n";
}
// Note
if ($object->note && !$user->societe_id) {
print '<tr><td>' . $langs->trans("NotePrivate") . '</td>';
print '<td colspan="3">' . nl2br($object->note) . "</td></tr>";