本文整理汇总了PHP中FormCompany::select_departement方法的典型用法代码示例。如果您正苦于以下问题:PHP FormCompany::select_departement方法的具体用法?PHP FormCompany::select_departement怎么用?PHP FormCompany::select_departement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormCompany
的用法示例。
在下文中一共展示了FormCompany::select_departement方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
print '</td></tr>';
// Country
if (dol_strlen(trim($object->fk_pays)) == 0) $object->fk_pays = $objsoc->pays_id; // Predefined with third party
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="3">';
$form->select_pays((isset($_POST["pays_id"])?$_POST["pays_id"]:$object->fk_pays),'pays_id');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
print '</td></tr>';
// State
if (empty($conf->global->SOCIETE_DISABLE_STATE))
{
print '<tr><td>'.$langs->trans('State').'</td><td colspan="3">';
if ($object->fk_pays)
{
$formcompany->select_departement(isset($_POST["departement_id"])?$_POST["departement_id"]:$object->fk_departement,$object->pays_code);
}
else
{
print $countrynotdefined;
}
print '</td></tr>';
}
// Phone / Fax
if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->phone_pro)) == 0) $object->phone_pro = $objsoc->tel; // Predefined with third party
print '<tr><td>'.$langs->trans("PhonePro").'</td><td><input name="phone_pro" type="text" size="18" maxlength="80" value="'.(isset($_POST["phone_pro"])?$_POST["phone_pro"]:$object->phone_pro).'"></td>';
print '<td>'.$langs->trans("PhonePerso").'</td><td><input name="phone_perso" type="text" size="18" maxlength="80" value="'.(isset($_POST["phone_perso"])?$_POST["phone_perso"]:$object->phone_perso).'"></td></tr>';
if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->fax)) == 0) $object->fax = $objsoc->fax; // Predefined with third party
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input name="phone_mobile" type="text" size="18" maxlength="80" value="'.(isset($_POST["phone_mobile"])?$_POST["phone_mobile"]:$object->phone_mobile).'"></td>';
示例2: getCountry
$selectedcode = $mysoc->country_code;
}
}
$account->country_code = getCountry($selectedcode, 2);
// Force country code on account to have following field on bank fields matching country rules
print '<tr><td class="fieldrequired">' . $langs->trans("BankAccountCountry") . '</td>';
print '<td colspan="3">';
print $form->select_country($selectedcode, 'account_country_id');
if ($user->admin) {
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
}
print '</td></tr>';
// State
print '<tr><td>' . $langs->trans('State') . '</td><td colspan="3">';
if ($selectedcode) {
$formcompany->select_departement(isset($_POST["account_state_id"]) ? $_POST["account_state_id"] : '', $selectedcode, 'account_state_id');
} else {
print $countrynotdefined;
}
print '</td></tr>';
// Web
print '<tr><td>' . $langs->trans("Web") . '</td>';
print '<td colspan="3"><input size="50" type="text" class="flat" name="url" value="' . $_POST["url"] . '"></td></tr>';
// Comment
print '<tr><td class="tdtop">' . $langs->trans("Comment") . '</td>';
print '<td colspan="3">';
// Editor wysiwyg
require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
$doleditor = new DolEditor('account_comment', GETPOST("account_comment") ? GETPOST("account_comment") : $account->comment, '', 90, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, 4, 70);
$doleditor->Create();
print '</td></tr>';
示例3:
print '<input name="cp" value="' . ($conf->global->MAIN_INFO_SOCIETE_CP ? $conf->global->MAIN_INFO_SOCIETE_CP : $_POST["cp"]) . '" size="10"></td></tr>' . "\n";
$var = !$var;
print '<tr ' . $bc[$var] . '><td>' . $langs->trans("CompanyTown") . '</td><td>';
print '<input name="ville" size="30" value="' . ($conf->global->MAIN_INFO_SOCIETE_VILLE ? $conf->global->MAIN_INFO_SOCIETE_VILLE : $_POST["ville"]) . '"></td></tr>' . "\n";
// Country
$var = !$var;
print '<tr ' . $bc[$var] . '><td class="fieldrequired">' . $langs->trans("Country") . '</td><td>';
//if (empty($pays_selected)) $pays_selected=substr($langs->defaultlang,-2); // Par defaut, pays de la localisation
print $form->select_country($mysoc->country_id, 'country_id');
if ($user->admin) {
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"), 1);
}
print '</td></tr>' . "\n";
$var = !$var;
print '<tr ' . $bc[$var] . '><td>' . $langs->trans("State") . '</td><td>';
$formcompany->select_departement($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT, $mysoc->country_code, 'departement_id');
print '</td></tr>' . "\n";
$var = !$var;
print '<tr ' . $bc[$var] . '><td>' . $langs->trans("CompanyCurrency") . '</td><td>';
$form->select_currency($conf->currency, "currency");
print '</td></tr>' . "\n";
$var = !$var;
print '<tr ' . $bc[$var] . '><td>' . $langs->trans("Tel") . '</td><td>';
print '<input name="tel" value="' . $conf->global->MAIN_INFO_SOCIETE_TEL . '"></td></tr>';
print '</td></tr>' . "\n";
$var = !$var;
print '<tr ' . $bc[$var] . '><td>' . $langs->trans("Fax") . '</td><td>';
print '<input name="fax" value="' . $conf->global->MAIN_INFO_SOCIETE_FAX . '"></td></tr>';
print '</td></tr>' . "\n";
$var = !$var;
print '<tr ' . $bc[$var] . '><td>' . $langs->trans("Mail") . '</td><td>';
示例4: if
print '<td colspan="3">';
$selectedcode='';
if (isset($_POST["account_country_id"]))
{
$selectedcode=$_POST["account_country_id"]?$_POST["account_country_id"]:$account->pays_code;
}
else if (empty($selectedcode)) $selectedcode=$mysoc->pays_code;
$form->select_pays($selectedcode,'account_country_id');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
print '</td></tr>';
// State
print '<tr><td>'.$langs->trans('State').'</td><td colspan="3">';
if ($selectedcode)
{
$htmlcompany->select_departement(isset($_POST["account_departement_id"])?$_POST["account_departement_id"]:'',$selectedcode,'account_departement_id');
}
else
{
print $countrynotdefined;
}
print '</td></tr>';
// Accountancy code
if ($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED)
{
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("AccountancyCode").'</td>';
print '<td colspan="3"><input type="text" name="account_number" value="'.$account->account_number.'"></td></tr>';
}
else
{
示例5:
print $formcompany->select_ziptown($object->cp,'zipcode',array('town','selectpays_id','departement_id'),6);
print '</td><td>'.$langs->trans('Town').'</td><td>';
print $formcompany->select_ziptown($object->ville,'town',array('zipcode','selectpays_id','departement_id'));
print '</td></tr>';
// Country
print '<tr><td width="25%">'.$langs->trans('Country').'</td><td colspan="3">';
$form->select_pays($object->pays_id,'pays_id');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
print '</td></tr>';
// State
if (empty($conf->global->SOCIETE_DISABLE_STATE))
{
print '<tr><td>'.$langs->trans('State').'</td><td colspan="3">';
if ($object->pays_id) $formcompany->select_departement($object->departement_id,$object->pays_code);
else print $countrynotdefined;
print '</td></tr>';
}
// Phone / Fax
print '<tr><td>'.$langs->trans('Phone').'</td><td><input type="text" name="tel" value="'.$object->tel.'"></td>';
print '<td>'.$langs->trans('Fax').'</td><td><input type="text" name="fax" value="'.$object->fax.'"></td></tr>';
print '<tr><td>'.$langs->trans('EMail').($conf->global->SOCIETE_MAIL_REQUIRED?'*':'').'</td><td><input type="text" name="email" size="32" value="'.$object->email.'"></td>';
print '<td>'.$langs->trans('Web').'</td><td><input type="text" name="url" size="32" value="'.$object->url.'"></td></tr>';
print '<tr>';
// IdProf1 (SIREN for France)
$idprof=$langs->transcountry('ProfId1',$object->pays_code);
if ($idprof!='-')
示例6:
print '<input name="zipcode" id="zipcode" value="' . ($conf->global->MAIN_INFO_SOCIETE_ZIP ? $conf->global->MAIN_INFO_SOCIETE_ZIP : $_POST["zipcode"]) . '" size="10"></td></tr>' . "\n";
$var = !$var;
print '<tr ' . $bc[$var] . '><td><label for="town">' . $langs->trans("CompanyTown") . '</label></td><td>';
print '<input name="town" id="town" size="30" value="' . ($conf->global->MAIN_INFO_SOCIETE_TOWN ? $conf->global->MAIN_INFO_SOCIETE_TOWN : $_POST["town"]) . '"></td></tr>' . "\n";
// Country
$var = !$var;
print '<tr ' . $bc[$var] . '><td class="fieldrequired"><label for="selectcountry_id">' . $langs->trans("Country") . '</label></td><td class="maxwidthonsmartphone">';
//if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // By default, country of localization
print $form->select_country($mysoc->country_id, 'country_id');
if ($user->admin) {
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
}
print '</td></tr>' . "\n";
$var = !$var;
print '<tr ' . $bc[$var] . '><td><label for="state_id">' . $langs->trans("State") . '</label></td><td class="maxwidthonsmartphone">';
$formcompany->select_departement($conf->global->MAIN_INFO_SOCIETE_STATE, $mysoc->country_code, 'state_id');
print '</td></tr>' . "\n";
$var = !$var;
print '<tr ' . $bc[$var] . '><td><label for="currency">' . $langs->trans("CompanyCurrency") . '</label></td><td>';
print $form->selectCurrency($conf->currency, "currency");
print '</td></tr>' . "\n";
$var = !$var;
print '<tr ' . $bc[$var] . '><td><label for="phone">' . $langs->trans("Phone") . '</label></td><td>';
print '<input name="tel" id="phone" value="' . $conf->global->MAIN_INFO_SOCIETE_TEL . '"></td></tr>';
print '</td></tr>' . "\n";
$var = !$var;
print '<tr ' . $bc[$var] . '><td><label for="fax">' . $langs->trans("Fax") . '</label></td><td>';
print '<input name="fax" id="fax" value="' . $conf->global->MAIN_INFO_SOCIETE_FAX . '"></td></tr>';
print '</td></tr>' . "\n";
$var = !$var;
print '<tr ' . $bc[$var] . '><td><label for="email">' . $langs->trans("EMail") . '</label></td><td>';