本文整理汇总了PHP中FormCompany类的典型用法代码示例。如果您正苦于以下问题:PHP FormCompany类的具体用法?PHP FormCompany怎么用?PHP FormCompany使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FormCompany类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dol_delete_file
dol_delete_file($logosmallfile);
dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO_SMALL", $conf->entity);
$mysoc->logo_small = '';
$logominifile = $conf->mycompany->dir_output . '/logos/thumbs/' . $mysoc->logo_mini;
dol_delete_file($logominifile);
dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO_MINI", $conf->entity);
$mysoc->logo_mini = '';
}
/*
* View
*/
$wikihelp = 'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
llxHeader('', $langs->trans("Setup"), $wikihelp);
$form = new Form($db);
$formother = new FormOther($db);
$formcompany = new FormCompany($db);
$countrynotdefined = '<font class="error">' . $langs->trans("ErrorSetACountryFirst") . ' (' . $langs->trans("SeeAbove") . ')</font>';
print load_fiche_titre($langs->trans("CompanyFoundation"), '', 'title_setup');
print $langs->trans("CompanyFundationDesc") . "<br>\n";
print "<br>\n";
if ($action == 'edit' || $action == 'updateedit') {
/**
* Edition des parametres
*/
print "\n" . '<script type="text/javascript" language="javascript">';
print '$(document).ready(function () {
$("#selectcountry_id").change(function() {
document.form_index.action.value="updateedit";
document.form_index.submit();
});
});';
示例2: llxHeaderVierge
// backtopage parameter with an url was set on member submit page, we never go here because a redirect was done to this url.
if ($action == 'added') {
llxHeaderVierge($langs->trans("NewMemberForm"));
// Si on a pas ete redirige
print '<br>';
print '<center>';
print $langs->trans("NewMemberbyWeb");
print '</center>';
llxFooterVierge();
exit;
}
/*
* View
*/
$form = new Form($db);
$formcompany = new FormCompany($db);
$adht = new AdherentType($db);
$extrafields->fetch_name_optionals_label('adherent');
// fetch optionals attributes and labels
llxHeaderVierge($langs->trans("NewSubscription"));
print_titre($langs->trans("NewSubscription"));
if (!empty($conf->global->MEMBER_NEWFORM_TEXT)) {
print $langs->trans($conf->global->MEMBER_NEWFORM_TEXT) . "<br>\n";
} else {
print $langs->trans("NewSubscriptionDesc", $conf->global->MAIN_INFO_SOCIETE_MAIL) . "<br>\n";
}
dol_htmloutput_errors($errmsg);
print '<div align="center">';
print '<br>' . $langs->trans("FieldsWithAreMandatory", '*') . '<br>';
//print $langs->trans("FieldsWithIsForPublic",'**').'<br>';
print '<script type="text/javascript">
示例3: Product
$mesg = '<div class="error">' . $object->error . '</div>';
}
} else {
$action = 'edit';
$mesg = '<div class="error">' . $object->error . '</div>';
}
}
if ($_POST["cancel"] == $langs->trans("Cancel")) {
$action = '';
}
/*
* View
*/
$productstatic = new Product($db);
$form = new Form($db);
$formcompany = new FormCompany($db);
$help_url = 'EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks';
llxHeader("", $langs->trans("WarehouseCard"), $help_url);
if ($action == 'create') {
print_fiche_titre($langs->trans("NewWarehouse"));
print "<form action=\"fiche.php\" method=\"post\">\n";
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="add">';
print '<input type="hidden" name="type" value="' . $type . '">' . "\n";
dol_htmloutput_mesg($mesg);
print '<table class="border" width="100%">';
// Ref
print '<tr><td width="25%" class="fieldrequired">' . $langs->trans("Ref") . '</td><td colspan="3"><input name="libelle" size="20" value=""></td></tr>';
print '<tr><td >' . $langs->trans("LocationSummary") . '</td><td colspan="3"><input name="lieu" size="40" value="' . $object->lieu . '"></td></tr>';
// Description
print '<tr><td valign="top">' . $langs->trans("Description") . '</td><td colspan="3">';
示例4: setEventMessages
if (!$error) {
setEventMessages($langs->trans("RecordSaved"), null, 'mesgs');
// Redirect to avoid submit twice on back
header('Location: ' . $_SERVER["PHP_SELF"] . ($projectid ? '?id=' . $projectid : '?') . ($mode ? '&mode=' . $mode : '') . '&year=' . $yearofday . '&month=' . $monthofday . '&day=' . $dayofday);
exit;
}
} else {
setEventMessages($langs->trans("ErrorTimeSpentIsEmpty"), null, 'errors');
}
}
/*
* View
*/
$form = new Form($db);
$formother = new FormOther($db);
$formcompany = new FormCompany($db);
$formproject = new FormProjets($db);
$projectstatic = new Project($db);
$project = new Project($db);
$taskstatic = new Task($db);
$prev = dol_getdate($daytoparse - 24 * 3600);
$prev_year = $prev['year'];
$prev_month = $prev['mon'];
$prev_day = $prev['mday'];
$next = dol_getdate($daytoparse + 24 * 3600);
$next_year = $next['year'];
$next_month = $next['mon'];
$next_day = $next['mday'];
$title = $langs->trans("TimeSpent");
if ($mine) {
$title = $langs->trans("MyTimeSpent");
示例5: fieldList
/**
* Show fields in insert/edit mode
*
* @param array $fieldlist Array of fields
* @param Object $obj If we show a particular record, obj is filled with record fields
* @param string $tabname Name of SQL table
* @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered
* @return void
*/
function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
{
global $conf, $langs, $db;
global $form;
global $region_id;
global $elementList, $sourceList, $localtax_typeList;
global $bc;
$formadmin = new FormAdmin($db);
$formcompany = new FormCompany($db);
foreach ($fieldlist as $field => $value) {
if ($fieldlist[$field] == 'country') {
if (in_array('region_id', $fieldlist)) {
print '<td>';
//print join(',',$fieldlist);
print '</td>';
continue;
}
// For state page, we do not show the country input (we link to region, not country)
print '<td>';
$fieldname = 'country';
print $form->select_country(!empty($obj->country_code) ? $obj->country_code : (!empty($obj->country) ? $obj->country : ''), $fieldname, '', 28, 'maxwidth300');
print '</td>';
} elseif ($fieldlist[$field] == 'country_id') {
if (!in_array('country', $fieldlist)) {
$country_id = !empty($obj->{$fieldlist}[$field]) ? $obj->{$fieldlist}[$field] : 0;
print '<td>';
print '<input type="hidden" name="' . $fieldlist[$field] . '" value="' . $country_id . '">';
print '</td>';
}
} elseif ($fieldlist[$field] == 'region') {
print '<td>';
$formcompany->select_region($region_id, 'region');
print '</td>';
} elseif ($fieldlist[$field] == 'region_id') {
$region_id = !empty($obj->{$fieldlist}[$field]) ? $obj->{$fieldlist}[$field] : 0;
print '<td>';
print '<input type="hidden" name="' . $fieldlist[$field] . '" value="' . $region_id . '">';
print '</td>';
} elseif ($fieldlist[$field] == 'lang') {
print '<td>';
print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'lang');
print '</td>';
} elseif ($fieldlist[$field] == 'type_template') {
print '<td>';
print $form->selectarray('type_template', $elementList, !empty($obj->{$fieldlist}[$field]) ? $obj->{$fieldlist}[$field] : '');
print '</td>';
} elseif ($fieldlist[$field] == 'element') {
print '<td>';
print $form->selectarray('element', $elementList, !empty($obj->{$fieldlist}[$field]) ? $obj->{$fieldlist}[$field] : '');
print '</td>';
} elseif ($fieldlist[$field] == 'source') {
print '<td>';
print $form->selectarray('source', $sourceList, !empty($obj->{$fieldlist}[$field]) ? $obj->{$fieldlist}[$field] : '');
print '</td>';
} elseif ($fieldlist[$field] == 'type' && $tabname == MAIN_DB_PREFIX . "c_actioncomm") {
print '<td>';
print 'user<input type="hidden" name="type" value="user">';
print '</td>';
} elseif ($fieldlist[$field] == 'recuperableonly' || $fieldlist[$field] == 'fdm' || $fieldlist[$field] == 'deductible') {
print '<td>';
print $form->selectyesno($fieldlist[$field], !empty($obj->{$fieldlist}[$field]) ? $obj->{$fieldlist}[$field] : '', 1);
print '</td>';
} elseif (in_array($fieldlist[$field], array('nbjour', 'decalage', 'taux', 'localtax1', 'localtax2'))) {
$align = "left";
if (in_array($fieldlist[$field], array('taux', 'localtax1', 'localtax2'))) {
$align = "right";
}
// Fields aligned on right
print '<td align="' . $align . '">';
print '<input type="text" class="flat" value="' . (isset($obj->{$fieldlist}[$field]) ? $obj->{$fieldlist}[$field] : '') . '" size="3" name="' . $fieldlist[$field] . '">';
print '</td>';
} elseif (in_array($fieldlist[$field], array('libelle_facture'))) {
print '<td><textarea cols="30" rows="' . ROWS_2 . '" class="flat" name="' . $fieldlist[$field] . '">' . (!empty($obj->{$fieldlist}[$field]) ? $obj->{$fieldlist}[$field] : '') . '</textarea></td>';
} elseif (in_array($fieldlist[$field], array('content'))) {
if ($tabname == MAIN_DB_PREFIX . 'c_email_templates') {
print '<td colspan="4"></td></tr><tr class="pair nohover"><td colspan="5">';
// To create an artificial CR for the current tr we are on
} else {
print '<td>';
}
if ($context != 'hide') {
//print '<textarea cols="3" rows="'.ROWS_2.'" class="flat" name="'.$fieldlist[$field].'">'.(! empty($obj->$fieldlist[$field])?$obj->$fieldlist[$field]:'').'</textarea>';
$doleditor = new DolEditor($fieldlist[$field], !empty($obj->{$fieldlist}[$field]) ? $obj->{$fieldlist}[$field] : '', '', 140, 'dolibarr_mailings', 'In', 0, false, true, ROWS_5, '90%');
print $doleditor->Create(1);
} else {
print ' ';
}
print '</td>';
} elseif ($fieldlist[$field] == 'price' || preg_match('/^amount/i', $fieldlist[$field])) {
print '<td><input type="text" class="flat" value="' . price(!empty($obj->{$fieldlist}[$field]) ? $obj->{$fieldlist}[$field] : '') . '" size="8" name="' . $fieldlist[$field] . '"></td>';
} elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist}[$field])) {
//.........这里部分代码省略.........
示例6: fieldList
/**
* \brief Show field
* \param fieldlist Array of fields
* \param obj If we show a particular record, obj is filled with record fields
*/
function fieldList($fieldlist, $obj = '')
{
global $conf, $langs, $db;
global $region_id;
global $elementList, $sourceList;
$html = new Form($db);
$formadmin = new FormAdmin($db);
$formcompany = new FormCompany($db);
foreach ($fieldlist as $field => $value) {
if ($fieldlist[$field] == 'pays') {
if (in_array('region_id', $fieldlist)) {
print '<td> </td>';
continue;
}
// For region page, we do not show the country input
print '<td>';
print $html->select_country($obj->pays_code ? $obj->pays_code : $obj->pays, 'pays');
print '</td>';
} elseif ($fieldlist[$field] == 'pays_id') {
$pays_id = !empty($obj->{$fieldlist}[$field]) ? $obj->{$fieldlist}[$field] : 0;
print '<input type="hidden" name="' . $fieldlist[$field] . '" value="' . $pays_id . '">';
} elseif ($fieldlist[$field] == 'region') {
print '<td>';
$formcompany->select_region($region_id, 'region');
print '</td>';
} elseif ($fieldlist[$field] == 'region_id') {
$region_id = $obj->{$fieldlist}[$field] ? $obj->{$fieldlist}[$field] : 0;
print '<input type="hidden" name="' . $fieldlist[$field] . '" value="' . $region_id . '">';
} elseif ($fieldlist[$field] == 'lang') {
print '<td>';
print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'lang');
print '</td>';
} elseif ($fieldlist[$field] == 'element') {
print '<td>';
print $html->selectarray('element', $elementList, $obj->{$fieldlist}[$field]);
print '</td>';
} elseif ($fieldlist[$field] == 'source') {
print '<td>';
print $html->selectarray('source', $sourceList, $obj->{$fieldlist}[$field]);
print '</td>';
} elseif ($fieldlist[$field] == 'type' && $tabname[$_GET["id"]] == MAIN_DB_PREFIX . "c_actioncomm") {
print '<td>';
print 'user<input type="hidden" name="type" value="user">';
print '</td>';
} elseif ($fieldlist[$field] == 'recuperableonly' || $fieldlist[$field] == 'fdm') {
print '<td>';
print $html->selectyesno($fieldlist[$field], $obj->{$fieldlist}[$field], 1);
print '</td>';
} elseif ($fieldlist[$field] == 'nbjour' || $fieldlist[$field] == 'decalage' || $fieldlist[$field] == 'taux') {
print '<td><input type="text" class="flat" value="' . $obj->{$fieldlist}[$field] . '" size="3" name="' . $fieldlist[$field] . '"></td>';
} elseif ($fieldlist[$field] == 'libelle_facture') {
print '<td><textarea cols="30" rows="' . ROWS_2 . '" class="flat" name="' . $fieldlist[$field] . '">' . $obj->{$fieldlist}[$field] . '</textarea></td>';
} elseif ($fieldlist[$field] == 'price') {
print '<td><input type="text" class="flat" value="' . price($obj->{$fieldlist}[$field]) . '" size="8" name="' . $fieldlist[$field] . '"></td>';
} elseif ($fieldlist[$field] == 'code') {
print '<td><input type="text" class="flat" value="' . $obj->{$fieldlist}[$field] . '" size="10" name="' . $fieldlist[$field] . '"></td>';
} elseif ($fieldlist[$field] == 'unit') {
print '<td>';
print $html->selectarray('unit', array('mm', 'cm', 'point', 'inch'), $obj->{$fieldlist}[$field], 0, 0, 1);
print '</td>';
} else {
print '<td>';
print '<input type="text" ' . ($fieldlist[$field] == 'libelle' ? 'size="32" ' : '') . ' class="flat" value="' . $obj->{$fieldlist}[$field] . '" name="' . $fieldlist[$field] . '">';
print '</td>';
}
}
}
示例7: llxHeader
exit;
}
else {
dol_print_error($db);
}
}
/*
* View
*/
llxHeader('', $langs->trans("Bill"), "Facture");
$html = new Form($db);
$formcompany = new FormCompany($db);
$contactstatic=new Contact($db);
$userstatic=new User($db);
/* *************************************************************************** */
/* */
/* Mode vue et edition */
/* */
/* *************************************************************************** */
if (isset($mesg)) print $mesg;
$id = $_GET["facid"];
if ($id > 0)
{
$facture = new FactureFournisseur($db);
if ($facture->fetch($_GET['facid'], $user->societe_id) > 0)
示例8: header
header("Location: ".DOL_URL_ROOT."/compta/bank/index.php");
exit;
}
/*
* View
*/
$countrynotdefined=$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')';
llxHeader();
$form = new Form($db);
$htmlcompany = new FormCompany($db);
/* ************************************************************************** */
/* */
/* Affichage page en mode creation */
/* */
/* ************************************************************************** */
if ($action == 'create')
{
$account=new Account($db);
print_fiche_titre($langs->trans("NewFinancialAccount"));
if ($message) { print "$message<br>\n"; }
示例9: dol_delete_file
dol_delete_file($logosmallfile);
dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO_SMALL", $conf->entity);
$mysoc->logo_small = '';
$logominifile = $conf->mycompany->dir_output . '/logos/thumbs/' . $mysoc->logo_mini;
dol_delete_file($logominifile);
dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO_MINI", $conf->entity);
$mysoc->logo_mini = '';
}
/*
* View
*/
$wikihelp = 'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
llxHeader('', $langs->trans("Setup"), $wikihelp);
$form = new Form($db);
$formother = new FormOther($db);
$formcompany = new FormCompany($db);
$countrynotdefined = '<font class="error">' . $langs->trans("ErrorSetACountryFirst") . ' (' . $langs->trans("SeeAbove") . ')</font>';
print_fiche_titre($langs->trans("CompanyFoundation"), '', 'setup');
print $langs->trans("CompanyFundationDesc") . "<br>\n";
print "<br>\n";
if ($action == 'edit' || $action == 'updateedit') {
/**
* Edition des parametres
*/
print "\n" . '<script type="text/javascript" language="javascript">';
print '$(document).ready(function () {
$("#selectcountry_id").change(function() {
document.form_index.action.value="updateedit";
document.form_index.submit();
});
});';
示例10: setEventMessages
}
}
}
if ($user->rights->adherent->creer && $action == 'confirm_add_spip' && $confirm == 'yes') {
if (!count($object->errors)) {
if (!$mailmanspip->add_to_spip($object)) {
setEventMessages($langs->trans('AddIntoSpipError') . ': ' . $mailmanspip->error, null, 'errors');
}
}
}
}
/*
* View
*/
$form = new Form($db);
$formcompany = new FormCompany($db);
$help_url = 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros';
llxHeader('', $langs->trans("Member"), $help_url);
$countrynotdefined = $langs->trans("ErrorSetACountryFirst") . ' (' . $langs->trans("SeeAbove") . ')';
if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// -----------------------------------------
// When used with CANVAS
// -----------------------------------------
if (empty($object->error) && $rowid) {
$object = new Adherent($db);
$result = $object->fetch($rowid);
if ($result <= 0) {
dol_print_error('', $object->error);
}
}
$objcanvas->assign_values($action, $object->id, $object->ref);
示例11: setEventMessages
setEventMessages($object->error, $object->errors, 'errors');
}
}
} else {
header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $_POST['id']);
exit;
}
}
}
}
/*
* View
*/
llxHeader();
$form = new Form($db);
$formcompany = new FormCompany($db);
/*
* Action create
*/
if ($action == 'create') {
print load_fiche_titre($langs->trans("NewEstablishment"));
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="add">';
dol_fiche_head();
print '<table class="border" width="100%">';
// Name
print '<tr><td>' . fieldLabel('Name', 'name', 1) . '</td><td><input name="name" id="name" size="32" value="' . GETPOST("name") . '"></td></tr>';
// Address
print '<tr>';
print '<td>' . fieldLabel('Address', 'address', 0) . '</td>';
示例12: GETPOST
if ($action == 'setoutstanding_limit') {
$object->fetch($id);
$object->outstanding_limit = GETPOST('outstanding_limit');
$result = $object->set_OutstandingBill($user);
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
}
}
}
/*
* View
*/
$contactstatic = new Contact($db);
$userstatic = new User($db);
$form = new Form($db);
$formcompany = new FormCompany($db);
if ($id > 0 && empty($object->id)) {
// Load data of third party
$res = $object->fetch($id);
if ($object->id <= 0) {
dol_print_error($db, $object->error);
}
}
$title = $langs->trans("CustomerCard");
if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) {
$title = $object->name;
}
$help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
llxHeader('', $title, $help_url);
/*
if ($mode == 'search')
示例13: llxHeader
/*
* View
*/
// fetch optionals attributes and labels
$extralabels=$extrafields->fetch_name_optionals_label('company');
$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
llxHeader('',$langs->trans("ThirdParty"),$help_url);
$form = new Form($db);
$formfile = new FormFile($db);
$formadmin = new FormAdmin($db);
$formcompany = new FormCompany($db);
$countrynotdefined=$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')';
if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
{
// -----------------------------------------
// When used with CANVAS
// -----------------------------------------
if ($action == 'create')
{
$objcanvas->assign_post(); // TODO: Put code of assign_post into assign_values to keep only assign_values
$objcanvas->assign_values($action); // Set value for templates
$objcanvas->display_canvas($action,0); // Show template
}
elseif ($action == 'edit')
示例14: llxHeader
$object->old_name = '';
$object->old_firstname = '';
} else {
$error = $object->error;
$errors = $object->errors;
}
}
}
}
/*
* View
*/
$help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
llxHeader('', $langs->trans("ContactsAddresses"), $help_url);
$form = new Form($db);
$formcompany = new FormCompany($db);
$countrynotdefined = $langs->trans("ErrorSetACountryFirst") . ' (' . $langs->trans("SeeAbove") . ')';
if ($socid > 0) {
$objsoc = new Societe($db);
$objsoc->fetch($socid);
}
if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// -----------------------------------------
// When used with CANVAS
// -----------------------------------------
if ($action == 'create') {
$objcanvas->assign_post();
// TODO: Put code of assign_post into assign_values to keep only assign_values
$objcanvas->assign_values($action);
// Set value for templates
$objcanvas->display_canvas($action);
示例15: llxHeader
exit;
}
else {
dol_print_error($db);
}
}
/*
* View
*/
llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes');
$html = new Form($db);
$formcompany = new FormCompany($db);
$contactstatic=new Contact($db);
$userstatic=new User($db);
/* *************************************************************************** */
/* */
/* Mode vue et edition */
/* */
/* *************************************************************************** */
if (isset($mesg)) print $mesg;
$id = $_GET['id'];
$ref= $_GET['ref'];
if ($id > 0 || ! empty($ref))
{