当前位置: 首页>>代码示例>>PHP>>正文


PHP FormFile类代码示例

本文整理汇总了PHP中FormFile的典型用法代码示例。如果您正苦于以下问题:PHP FormFile类的具体用法?PHP FormFile怎么用?PHP FormFile使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了FormFile类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: dol_syslog

            $langs->load("other");
            $mesg = '<div class="error">' . $langs->trans('ErrorCantReadFile', $file) . '</div>';
            dol_syslog('Failed to read file: ' . $file);
        }
    } else {
        $langs->load("other");
        $mesg = '<div class="error">' . $langs->trans('ErrorFailedToReadEntity', $langs->trans("Order")) . '</div>';
        dol_syslog($langs->trans('ErrorFailedToReadEntity', $langs->trans("Order")));
    }
}
/*
 *	View
 */
llxHeader('', $langs->trans('Order'), 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes');
$html = new Form($db);
$formfile = new FormFile($db);
$formorder = new FormOrder($db);
/*********************************************************************
 *
 * Mode creation
 *
 *********************************************************************/
if ($action == 'create' && $user->rights->commande->creer) {
    print_fiche_titre($langs->trans('CreateOrder'));
    dol_htmloutput_mesg($mesg, $mesgs, 'error');
    $soc = new Societe($db);
    if ($socid) {
        $res = $soc->fetch($socid);
    }
    if (GETPOST('origin') && GETPOST('originid')) {
        // Parse element/subelement (ex: project_task)
开发者ID:ripasch,项目名称:dolibarr,代码行数:31,代码来源:fiche.php

示例2: FormFile

 if ($action != 'ajout_photo' && ($user->rights->produit->creer || $user->rights->service->creer)) {
     if (!empty($conf->global->MAIN_UPLOAD_DOC)) {
         print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=ajout_photo&amp;id=' . $object->id . '">';
         print $langs->trans("AddPhoto") . '</a>';
     } else {
         print '<a class="butActionRefused" href="#">e';
         print $langs->trans("AddPhoto") . '</a>';
     }
 }
 print "\n</div>\n";
 /*
  * Add a photo
  */
 if ($action == 'ajout_photo' && ($user->rights->produit->creer || $user->rights->service->creer) && !empty($conf->global->MAIN_UPLOAD_DOC)) {
     // Affiche formulaire upload
     $formfile = new FormFile($db);
     $formfile->form_attach_new_file($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans("AddPhoto"), 1, 0, $user->rights->produit->creer || $user->rights->service->creer, 50, $object, '', false, '', 0);
     // ajax=false for the moment. true may not work.
 }
 // Affiche photos
 if ($action != 'ajout_photo') {
     $nbphoto = 0;
     $nbbyrow = 5;
     $maxWidth = 160;
     $maxHeight = 120;
     print $object->show_photos($dir, 1, 1000, $nbbyrow, 1, 1);
     if ($object->nbphoto < 1) {
         print '<br>';
         print '<table width="100%" valign="top" align="center" border="0" cellpadding="2" cellspacing="2">';
         print '<tr align=center valign=middle border=1><td class="photo">';
         print "<br>" . $langs->trans("NoPhotoYet") . "<br><br>";
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:photos.php

示例3: llxHeader

	if ($result <= 0)
	{
		dol_print_error($db,$result);
		exit;
	}
}


/*
 *	View
 */

llxHeader('',$langs->trans('Delivery'),'Livraison');

$html = new Form($db);
$formfile = new FormFile($db);

/*********************************************************************
 *
 * Mode creation
 *
 *********************************************************************/
if ($_GET["action"] == 'create')
{

	print_fiche_titre($langs->trans("CreateADeliveryOrder"));

	if ($mesg)
	{
		print $mesg.'<br>';
	}
开发者ID:remyyounes,项目名称:dolibarr,代码行数:31,代码来源:fiche.php

示例4: GETPOST

 */
if ($action == 'delete') {
    $file = $conf->admin->dir_output . '/' . GETPOST('urlfile');
    $ret = dol_delete_file($file, 1);
    if ($ret) {
        setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile')));
    } else {
        setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors');
    }
    $action = '';
}
/*
 * View
 */
$form = new Form($db);
$formfile = new FormFile($db);
$label = getStaticMember($db, 'label');
$help_url = 'EN:Backups|FR:Sauvegardes|ES:Copias_de_seguridad';
llxHeader('', '', $help_url);
?>
<script type="text/javascript">
jQuery(document).ready(function() {

	function hideoptions () {
		jQuery("#mysql_options").hide();
		jQuery("#mysql_nobin_options").hide();
		jQuery("#postgresql_options").hide();
	}

	hideoptions();
	jQuery("#radio_dump_mysql").click(function() {
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:dolibarr_export.php

示例5: GETPOST

require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
// Security check
$orderid = GETPOST('orderid');
if ($user->societe_id) {
    $socid = $user->societe_id;
}
$result = restrictedArea($user, 'fournisseur', $orderid, '', 'commande');
$langs->load("suppliers");
$langs->load("orders");
/*
 * 	View
 */
llxHeader('', $langs->trans("SuppliersOrdersArea"));
$commandestatic = new CommandeFournisseur($db);
$userstatic = new User($db);
$formfile = new FormFile($db);
print load_fiche_titre($langs->trans("SuppliersOrdersArea"));
print '<table class="notopnoleftnoright" width="100%">';
print '<tr valign="top"><td class="notopnoleft" width="30%">';
/*
 * Search form
 */
$var = false;
print '<form method="post" action="list.php">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<table class="noborder nohover" width="100%">';
print '<tr class="liste_titre"><td colspan="3">' . $langs->trans("Search") . '</td></tr>';
print '<tr ' . $bc[$var] . '><td>';
print $langs->trans("SupplierOrder") . ':</td><td><input type="text" class="flat" name="search_all" size="18"></td><td><input type="submit" value="' . $langs->trans("Search") . '" class="button"></td></tr>';
print "</table></form><br>\n";
/*
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:index.php

示例6: llxHeader

            $mesg = '<div class="error">' . $langs->trans('NoPDFAvailableForChecked') . '</div>';
        }
    } else {
        $mesg = '<div class="error">' . $langs->trans('InvoiceNotChecked') . '</div>';
    }
}
/*
 * View
 */
$title = $langs->trans("BillsCustomersUnpaid");
if ($option == 'late') {
    $title = $langs->trans("BillsCustomersUnpaid");
}
llxHeader('', $title);
$form = new Form($db);
$formfile = new FormFile($db);
?>
<script type="text/javascript">
$(document).ready(function() {
	$("#checkall").click(function() {
		$(".checkformerge").attr('checked', true);
	});
	$("#checknone").click(function() {
		$(".checkformerge").attr('checked', false);
	});
});
</script>
<?php 
/***************************************************************************
 *                                                                         *
 *                      Mode Liste                                         *
开发者ID:nrjacker4,项目名称:crm-php,代码行数:31,代码来源:impayees.php

示例7: Translate

    if (!empty($newlang)) {
        $outputlangs = new Translate("", $conf);
        $outputlangs->setDefaultLang($newlang);
    }
    $result = don_create($db, $object->id, '', $object->modelpdf, $outputlangs);
    if ($result <= 0) {
        dol_print_error($db, $result);
        exit;
    }
}
/*
 * View
 */
llxHeader('', $langs->trans("Donations"), 'EN:Module_Donations|FR:Module_Dons|ES:M&oacute;dulo_Donaciones');
$form = new Form($db);
$formfile = new FormFile($db);
$formcompany = new FormCompany($db);
/* ************************************************************************** */
/*                                                                            */
/* Creation                                                                   */
/*                                                                            */
/* ************************************************************************** */
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)) {
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:fiche.php

示例8: GETPOST

// Securite acces client
$socid = GETPOST('socid', 'int');
if (isset($user->societe_id) && $user->societe_id > 0) {
    $action = '';
    $socid = $user->societe_id;
}
$max = 5;
$now = dol_now();
/*
 * Actions
 */
/*
 * View
 */
$form = new Form($db);
$formfile = new FormFile($db);
$companystatic = new Societe($db);
if (!empty($conf->propal->enabled)) {
    $propalstatic = new Propal($db);
}
llxHeader();
print_fiche_titre($langs->trans("CustomerArea"));
print '<div class="fichecenter"><div class="fichethirdleft">';
// Search proposal
if (!empty($conf->propal->enabled) && $user->rights->propal->lire) {
    $var = false;
    print '<form method="post" action="' . DOL_URL_ROOT . '/comm/propal/list.php">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<table class="noborder nohover" width="100%">';
    print '<tr class="liste_titre"><td colspan="3">' . $langs->trans("SearchAProposal") . '</td></tr>';
    print '<tr ' . $bc[$var] . '>';
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:index.php

示例9: FormFile

</div>
<div class="pane-in ecm-in-layout-south layout-padding valignmiddle">
<?php 
// Start Add new file area
// To attach new file
if (!empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS) || !empty($section)) {
    if (empty($section) || $section == -1) {
        ?>
		<script type="text/javascript">
    	jQuery(document).ready(function() {
			jQuery('#formuserfile').hide();
    	});
    	</script>
		<?php 
    }
    $formfile = new FormFile($db);
    $formfile->form_attach_new_file($_SERVER["PHP_SELF"], 'none', 0, $section ? $section : -1, $user->rights->ecm->upload, 48, null, '', 0, '', 0, 'formuserfile');
} else {
    print '&nbsp;';
}
// End Add new file area
?>
</div>
</div>
</div> <!-- end div id="containerlayout" -->
<?php 
// End of page
//dol_fiche_end();
if (!empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS)) {
    include DOL_DOCUMENT_ROOT . '/ecm/tpl/enablefiletreeajax.tpl.php';
}
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:index.php

示例10: header

                    if ($result >= 0) {
                        header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id);
                        exit;
                    } else {
                        dol_print_error($db);
                    }
                }
            }
        }
    }
}
/*
 *	View
 */
$form = new Form($db);
$formfile = new FormFile($db);
$bankaccountstatic = new Account($db);
llxHeader('', '', '');
// Mode creation
if ($action == 'create') {
    $facturestatic = new FactureFournisseur($db);
    $extralabels = $extrafields->fetch_name_optionals_label($facturestatic->table_element);
    print load_fiche_titre($langs->trans('NewBill'));
    dol_htmloutput_events();
    $societe = '';
    if (GETPOST('socid') > 0) {
        $societe = new Societe($db);
        $societe->fetch(GETPOST('socid', 'int'));
    }
    if (GETPOST('origin') && GETPOST('originid')) {
        // Parse element/subelement (ex: project_task)
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:card.php

示例11: img_warning

    if (!in_array($basedir, $listdir)) {
        print img_warning($langs->trans('WarningSafeModeOnCheckExecDir'));
        dol_syslog("safe_mode is on, basedir is " . $basedir . ", safe_mode_exec_dir is " . ini_get('safe_mode_exec_dir'), LOG_WARNING);
    }
}
print '<input type="text" name="MAIN_ANTIVIRUS_COMMAND" size="72" value="' . (!empty($conf->global->MAIN_ANTIVIRUS_COMMAND) ? dol_htmlentities($conf->global->MAIN_ANTIVIRUS_COMMAND) : '') . '">';
print "</td>";
print '</tr>';
// Use anti virus
$var = !$var;
print "<tr " . $bc[$var] . ">";
print '<td colspan="2">' . $langs->trans("AntiVirusParam") . '<br>';
print $langs->trans("AntiVirusParamExample");
print '</td>';
print '<td>';
print '<input type="text" name="MAIN_ANTIVIRUS_PARAM" size="72" value="' . (!empty($conf->global->MAIN_ANTIVIRUS_PARAM) ? dol_htmlentities($conf->global->MAIN_ANTIVIRUS_PARAM) : '') . '">';
print "</td>";
print '</tr>';
print '</table>';
dol_fiche_end();
print '<div class="center"><input type="submit" class="button" name="button" value="' . $langs->trans("Modify") . '"></div>';
print '</form>';
// Form to test upload
print '<br>';
$formfile = new FormFile($db);
$formfile->form_attach_new_file($_SERVER['PHP_SELF'], $langs->trans("FormToTestFileUploadForm"), 0, 0, 1, 50, '', '', 1, '', 0);
// List of document
$filearray = dol_dir_list($upload_dir, "files", 0, '', '', 'name', SORT_ASC, 1);
$formfile->list_of_documents($filearray, '', 'admin_temp', '');
llxFooter();
$db->close();
开发者ID:ADDAdev,项目名称:Dolibarr,代码行数:31,代码来源:security_other.php

示例12: dol_print_error

$type = 'directory';
// This test if file exists should be useless. We keep it to find bug more easily
if (!dol_is_dir($upload_dir)) {
    //	dol_mkdir($upload_dir);
    /*    $langs->load("install");
        dol_print_error(0,$langs->trans("ErrorDirDoesNotExists",$upload_dir));
        exit;*/
}
print '<!-- TYPE=' . $type . ' -->' . "\n";
print '<!-- Page called with mode=' . $mode . ' url=' . $_SERVER["PHP_SELF"] . '?' . $_SERVER["QUERY_STRING"] . ' -->' . "\n";
$param = '';
$param .= ($sortfield ? '&sortfield=' . $sortfield : '') . ($sortorder ? '&sortorder=' . $sortorder : '');
$url = DOL_URL_ROOT . '/ecm/index.php';
// Dir scan
if ($type == 'directory') {
    $formfile = new FormFile($db);
    $maxlengthname = 40;
    // Right area. If module is defined, we are in automatic ecm.
    if ($module == 'company') {
        $upload_dir = $conf->societe->dir_output;
        // TODO change for multicompany sharing
        $filearray = dol_dir_list($upload_dir, "files", 1, '', array('^SPECIMEN\\.pdf$', '^\\.', '\\.meta$', '^temp$', '^payments$', '^CVS$', '^thumbs$'), $sortfield, strtolower($sortorder) == 'desc' ? SORT_DESC : SORT_ASC, 1);
        $param .= '&module=' . $module;
        $textifempty = $section ? $langs->trans("NoFileFound") : ($showonrightsize == 'featurenotyetavailable' ? $langs->trans("FeatureNotYetAvailable") : $langs->trans("NoFileFound"));
        $formfile->list_of_autoecmfiles($upload_dir, $filearray, $module, $param, 1, '', $user->rights->ecm->upload, 1, $textifempty, $maxlengthname, $url);
    } else {
        if ($module == 'invoice') {
            $upload_dir = $conf->facture->dir_output;
            $filearray = dol_dir_list($upload_dir, "files", 1, '', array('^SPECIMEN\\.pdf$', '^\\.', '\\.meta$', '^temp$', '^payments$', '^CVS$', '^thumbs$'), $sortfield, strtolower($sortorder) == 'desc' ? SORT_DESC : SORT_ASC, 1);
            $param .= '&module=' . $module;
            $textifempty = $section ? $langs->trans("NoFileFound") : ($showonrightsize == 'featurenotyetavailable' ? $langs->trans("FeatureNotYetAvailable") : $langs->trans("NoFileFound"));
开发者ID:nrjacker4,项目名称:crm-php,代码行数:31,代码来源:ajaxdirpreview.php

示例13: isset

$array_selected = isset($_SESSION["export_selected_fields"]) ? $_SESSION["export_selected_fields"] : array();
$array_filtervalue = isset($_SESSION["export_filtered_fields"]) ? $_SESSION["export_filtered_fields"] : array();
$datatoexport = GETPOST("datatoexport");
$action = GETPOST('action', 'alpha');
$confirm = GETPOST('confirm', 'alpha');
$step = GETPOST("step") ? GETPOST("step") : 1;
$export_name = GETPOST("export_name");
$hexa = GETPOST("hexa");
$exportmodelid = GETPOST("exportmodelid");
$field = GETPOST("field");
$objexport = new Export($db);
$objexport->load_arrays($user, $datatoexport);
$objmodelexport = new ModeleExports($db);
$form = new Form($db);
$htmlother = new FormOther($db);
$formfile = new FormFile($db);
$sqlusedforexport = '';
$upload_dir = $conf->export->dir_temp . '/' . $user->id;
//$usefilters=($conf->global->MAIN_FEATURES_LEVEL > 1);
$usefilters = 1;
/*
 * Actions
 */
if ($action == 'selectfield') {
    $fieldsarray = $objexport->array_export_fields[0];
    $fieldsentitiesarray = $objexport->array_export_entities[0];
    $fieldsdependenciesarray = $objexport->array_export_dependencies[0];
    if ($field == 'all') {
        foreach ($fieldsarray as $key => $val) {
            if (!empty($array_selected[$key])) {
                continue;
开发者ID:TAASA,项目名称:Dolibarr-ERP-3.8.1,代码行数:31,代码来源:export.php

示例14: dol_delete_file

            $ret = dol_delete_file($file, 0, 0, 0, $object);
            if ($ret) {
                setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs');
            } else {
                setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors');
            }
            $action = '';
        }
    }
}
/*
 * View
 */
llxHeader('', $langs->trans("ExpenseReport"));
$form = new Form($db);
$formfile = new FormFile($db);
$formproject = new FormProjets($db);
$projecttmp = new Project($db);
if (!empty($conf->global->DEPLACEMENT_TO_CLEAN)) {
    if (!empty($_GET['mesg'])) {
        $text_mesg = explode(",", $_GET['mesg']);
        foreach ($text_mesg as $text) {
            $mesg .= "- " . $langs->trans($text) . "<br />";
        }
        print "<div class=\"error\" style=\"font-size:15px;background-color:#FFB3B3;\">";
        print $langs->trans("LINE_NOT_ADDED") . "<br />";
        print $mesg;
        print "</div>";
    } else {
        if ($mesg) {
            print "<div class=\"error\" style=\"font-size:16px;background-color:red;\">" . $mesg . "</div>";
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:card.php

示例15: Form

if (isset($_GET["action"]) && $_GET["action"] == 'del_bookmark')
{
	$sql = "DELETE FROM ".MAIN_DB_PREFIX."bookmark WHERE rowid=".$_GET["bid"];
	$result = $db->query($sql);
}


/*
 * View
 */

$now=dol_now();

$html = new Form($db);
$formfile = new FormFile($db);
$companystatic=new Societe($db);
if ($conf->propal->enabled) $propalstatic=new Propal($db);

llxHeader();

print_fiche_titre($langs->trans("CustomerArea"));

print '<table border="0" width="100%" class="notopnoleftnoright">';

print '<tr>';
if (($conf->propal->enabled && $user->rights->propale->lire) ||
    ($conf->contrat->enabled && $user->rights->contrat->lire) ||
    ($conf->commande->enabled && $user->rights->commande->lire))
{
	print '<td valign="top" width="30%" class="notopnoleft">';
开发者ID:remyyounes,项目名称:dolibarr,代码行数:30,代码来源:index.php


注:本文中的FormFile类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。