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


PHP FormFile::list_of_documents方法代码示例

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


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

示例1: FactureFournisseur

    // FIXME $facidnext is not defined
    /*
    if ($facidnext > 0)
    {
    	$facthatreplace=new FactureFournisseur($db);
    	$facthatreplace->fetch($facidnext);
    	print ' ('.$langs->transnoentities("ReplacedByInvoice",$facthatreplace->getNomUrl(1)).')';
    }
    */
    print '</td></tr>';
    // Label
    print '<tr><td>' . $form->editfieldkey("Label", 'label', $object->label, $object, 0) . '</td><td colspan="3">';
    print $form->editfieldval("Label", 'label', $object->label, $object, 0);
    print '</td>';
    // Nb of files
    print '<tr><td>' . $langs->trans('NbOfAttachedFiles') . '</td><td colspan="3">' . count($filearray) . '</td></tr>';
    print '<tr><td>' . $langs->trans('TotalSizeOfAttachedFiles') . '</td><td colspan="3">' . $totalsize . ' ' . $langs->trans('bytes') . '</td></tr>';
    print '</table>';
    print '</div>';
    // Affiche formulaire upload
    $formfile = new FormFile($db);
    $formfile->form_attach_new_file($_SERVER['PHP_SELF'] . '?facid=' . $object->id, '', 0, 0, $user->rights->fournisseur->facture->creer, 50, $object);
    // List of document
    $param = '&facid=' . $object->id;
    $ref = dol_sanitizeFileName($object->ref);
    $formfile->list_of_documents($filearray, $object, 'facture_fournisseur', $param, 0, get_exdir($object->id, 2, 0) . $ref . '/');
} else {
    print $langs->trans('UnkownError');
}
llxFooter();
$db->close();
开发者ID:abbenbouchta,项目名称:immobilier,代码行数:31,代码来源:document.php

示例2: strtolower

if ($what) {
    if ($errormsg) {
        print '<div class="error">' . $langs->trans("Error") . " : " . $errormsg . '</div>';
        //		print '<a href="'.DOL_URL_ROOT.$relativepatherr.'">'.$langs->trans("DownloadErrorFile").'</a><br>';
        print '<br>';
        print '<br>';
    } else {
        print '<div class="ok">';
        print $langs->trans("BackupFileSuccessfullyCreated") . '.<br>';
        print $langs->trans("YouCanDownloadBackupFile");
        print '</div>';
        print '<br>';
    }
}
$filearray = dol_dir_list($conf->admin->dir_output . '/backup', 'files', 0, '', '', $sortfield, strtolower($sortorder) == 'asc' ? SORT_ASC : SORT_DESC, 1);
$result = $formfile->list_of_documents($filearray, null, 'systemtools', '', 1, 'backup/', 1, 0, $langs->trans("NoBackupFileAvailable") . '<br>' . $langs->trans("ToBuildBackupFileClickHere", DOL_URL_ROOT . '/admin/tools/dolibarr_export.php'), 0, $langs->trans("PreviousDumpFiles"));
print '<br>';
$time_end = time();
llxFooter();
$db->close();
// MYSQL NO BINARIES (only php)
/**	Backup the db OR just a table without mysqldump binary (does not require any exec permission)
 *	Author: David Walsh (http://davidwalsh.name/backup-mysql-database-php)
 *	Updated and enhanced by Stephen Larroque (lrq3000) and by the many commentators from the blog
 *	Note about foreign keys constraints: for Dolibarr, since there are a lot of constraints and when imported the tables will be inserted in the dumped order, not in constraints order, then we ABSOLUTELY need to use SET FOREIGN_KEY_CHECKS=0; when importing the sql dump.
 *	Note2: db2SQL by Howard Yeend can be an alternative, by using SHOW FIELDS FROM and SHOW KEYS FROM we could generate a more precise dump (eg: by getting the type of the field and then precisely outputting the right formatting - in quotes, numeric or null - instead of trying to guess like we are doing now).
 *
 *	@param	string	$outputfile		Output file name
 *	@param	string	$tables			Table name or '*' for all
 *	@return	int						<0 if KO, >0 if OK
 */
开发者ID:ADDAdev,项目名称:Dolibarr,代码行数:31,代码来源:export.php

示例3: FormFile

		 * Confirmation suppression fichier
		 */
		if ($action == 'delete')
		{
			$ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$id.'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
			if ($ret == 'html') print '<br>';
		}

		// Affiche formulaire upload
		$formfile=new FormFile($db);
		$formfile->form_attach_new_file(DOL_URL_ROOT.'/commande/document.php?id='.$object->id,'',0,0,$user->rights->commande->creer);


		// List of document
		$param='&id='.$object->id;
		$formfile->list_of_documents($filearray,$object,'commande',$param);
	}
	else
	{
		dol_print_error($db);
	}
}
else
{
	Header('Location: index.php');
}

$db->close();

llxFooter('$Date: 2011/07/31 22:23:15 $ - $Revision: 1.36 $');
?>
开发者ID:remyyounes,项目名称:dolibarr,代码行数:31,代码来源:document.php

示例4: strtolower

        print ' <label for="' . $val['id'] . '">' . $val['label'] . '</label>';
    } else {
        print '<input type="radio" name="compression" value="' . $key . '" id="' . $val['id'] . '" disabled="disabled">';
        print ' <label for="' . $val['id'] . '">' . $val['label'] . '</label>';
        print ' (' . $langs->trans("NotAvailable") . ')';
    }
    print ' &nbsp; &nbsp; ';
}
print '</div>';
print "\n";
?>
</fieldset>

<br>
<div align="center"><input type="submit" class="button"
	value="<?php 
echo $langs->trans("GenerateBackup");
?>
" id="buttonGo" /><br>
<br>
</div>


</form>

<?php 
$filearray = dol_dir_list($conf->admin->dir_output . '/backup', 'files', 0, '', '', $sortfield, strtolower($sortorder) == 'asc' ? SORT_ASC : SORT_DESC, 1);
$result = $formfile->list_of_documents($filearray, null, 'systemtools', '', 1, 'backup/', 1, 0, $langs->trans("NoBackupFileAvailable"), 0, $langs->trans("PreviousDumpFiles"));
print '<br>';
llxFooter();
$db->close();
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:dolibarr_export.php

示例5: FormFile

	print "</table>\n";

	dol_fiche_end();

	print '<br>';

	dol_htmloutput_mesg($mesg);


	// Affiche formulaire upload
	$formfile=new FormFile($db);
	$formfile->form_attach_new_file(DOL_URL_ROOT.'/projet/tasks/document.php?id='.$object->id.($withproject?'&withproject=1':''),'',0,0,$user->rights->projet->creer,50,$object);


	// List of document
	$param='&id='.$object->id;
	$formfile->list_of_documents($filearray,$object,'projet',$param,0,dol_sanitizeFileName($projectstatic->ref).'/'.dol_sanitizeFileName($object->ref).'/');
}
else
{
	Header('Location: index.php');
	exit;
}


llxFooter();

$db->close();
?>
开发者ID:nrjacker4,项目名称:crm-php,代码行数:29,代码来源:document.php

示例6: FormFile

	print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')</td><td>';
	print $object->getLibStatut(2,1);
	print '</td></tr>';

    print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
    print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
    print '</table>';

    print '</div>';


    // Affiche formulaire upload
   	$formfile=new FormFile($db);
	$formfile->form_attach_new_file(DOL_URL_ROOT.'/product/document.php?id='.$object->id,'',0,0,($user->rights->produit->creer||$user->rights->service->creer),50,$object);


	// List of document
	$param='&id='.$object->id;
	$formfile->list_of_documents($filearray,$object,'produit',$param);

}
else
{
	print $langs->trans("UnkownError");
}


llxFooter();
$db->close();
?>
开发者ID:nrjacker4,项目名称:crm-php,代码行数:30,代码来源:document.php

示例7: FormFile

print "</table></form>";
//print $langs->trans("ECMSectionAutoDesc");



print '</td><td valign="top">';

// Right area
$relativepath=$ecmdir->getRelativePath();
$upload_dir = $conf->ecm->dir_output.'/'.$relativepath;
$filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);

$formfile=new FormFile($db);
$param='&amp;section='.$section;
$textifempty=($section?$langs->trans("NoFileFound"):$langs->trans("ECMSelectASection"));
$formfile->list_of_documents($filearray,'','ecm',$param,1,$relativepath,$user->rights->ecm->upload,1,$textifempty);

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

//	print '<tr><td> </td></tr></table>';



print '</td></tr>';

print '</table>';


print '<br>';

// End of page
开发者ID:remyyounes,项目名称:dolibarr,代码行数:31,代码来源:search.php

示例8: FormFile

		 */
		if ($action == 'delete')
		{
			$ret=$html->form_confirm($_SERVER["PHP_SELF"].'?facid='.$id.'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
			if ($ret == 'html') print '<br>';
		}


		// Affiche formulaire upload
		$formfile=new FormFile($db);
		$formfile->form_attach_new_file(DOL_URL_ROOT.'/compta/facture/document.php?facid='.$object->id,'',0,0,$user->rights->facture->creer);


		// List of document
		$param='&facid='.$object->id;
		$formfile->list_of_documents($filearray,$object,'facture',$param);

	}
	else
	{
		dol_print_error($db);
	}
}
else
{
	print $langs->trans("UnkownError");
}

$db->close();

llxFooter('$Date: 2011/07/31 22:23:13 $ - $Revision: 1.46 $');
开发者ID:remyyounes,项目名称:dolibarr,代码行数:31,代码来源:document.php

示例9: FormFile

	// Files infos
	print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.sizeof($filearray).'</td></tr>';
	print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';

	print "</table>\n";
	print "</div>\n";

	if ($mesg) { print $mesg."<br>"; }


	// Affiche formulaire upload
	$formfile=new FormFile($db);
	$formfile->form_attach_new_file(DOL_URL_ROOT.'/projet/tasks/document.php?id='.$task->id,'',0,0,$user->rights->projet->creer);


	// List of document
	$param='&id='.$task->id;
	$formfile->list_of_documents($filearray,$task,'projet',$param,0,dol_sanitizeFileName($project->ref).'/'.dol_sanitizeFileName($task->ref).'/');

}
else
{
	Header('Location: index.php');
}

$db->close();

llxFooter('$Date: 2011/07/31 23:23:36 $ - $Revision: 1.16 $');
?>
开发者ID:remyyounes,项目名称:dolibarr,代码行数:29,代码来源:document.php

示例10: FormFile

		print '<tr><td>'.$langs->trans('TotalSizeOfAttachedFiles').'</td><td colspan="3">'.$totalsize.' '.$langs->trans('bytes').'</td></tr>';

		print '</table>';
		print '</div>';

		if ($mesg) { print $mesg.'<br>'; }


		// Affiche formulaire upload
		$formfile=new FormFile($db);
		$formfile->form_attach_new_file(DOL_URL_ROOT.'/fourn/facture/document.php?facid='.$facture->id,'',0,0,$user->rights->fournisseur->facture->creer);


		// List of document
		$param='&facid='.$facture->id;
		$formfile->list_of_documents($filearray,$facture,'facture_fournisseur',$param,0,get_exdir($facture->id,2,0).$facture->id.'/');

	}
	else
	{
		print 'facid='.$facid.'<br>';
		dol_print_error($db);
	}
}
else
{
	print $langs->trans('UnkownError');
}

$db->close();
开发者ID:remyyounes,项目名称:dolibarr,代码行数:30,代码来源:document.php

示例11: strtolower

        print '<tr><td nowrap>' . $langs->trans("Priority") . '</td><td colspan="3">';
        print $act->priority ? $act->priority : '';
        print '</td></tr>';
        print '</table><br><br><table class="border" width="100%">';
        // Construit liste des fichiers
        $filearray = dol_dir_list($upload_dir, "files", 0, '', '\\.meta$', $sortfield, strtolower($sortorder) == 'desc' ? SORT_DESC : SORT_ASC, 1);
        $totalsize = 0;
        foreach ($filearray as $key => $file) {
            $totalsize += $file['size'];
        }
        print '<tr><td width="30%" nowrap>' . $langs->trans("NbOfAttachedFiles") . '</td><td colspan="3">' . count($filearray) . '</td></tr>';
        print '<tr><td>' . $langs->trans("TotalSizeOfAttachedFiles") . '</td><td colspan="3">' . $totalsize . ' ' . $langs->trans("bytes") . '</td></tr>';
        print '</table>';
        print '</div>';
        if ($mesg) {
            print $mesg . "<br>";
        }
        // Affiche formulaire upload
        $formfile = new FormFile($db);
        $formfile->form_attach_new_file(DOL_URL_ROOT . '/comm/action/document.php?id=' . $act->id, '', 0, 0, $user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create);
        // List of document
        $param = '&id=' . $act->id;
        $formfile->list_of_documents($filearray, $act, 'actions', $param, 0, '', $user->rights->agenda->myactions->create);
    } else {
        dol_print_error($db);
    }
} else {
    print $langs->trans("UnkownError");
}
$db->close();
llxFooter();
开发者ID:nrjacker4,项目名称:crm-php,代码行数:31,代码来源:document.php

示例12: count

    print '<td width="30%">' . $langs->trans("Ref") . '</td><td colspan="3">';
    print $form->showrefnav($object, 'ref', '', 1, 'ref');
    print '</td>';
    print '</tr>';
    // Label
    print '<tr><td>' . $langs->trans("Label") . '</td><td colspan="3">' . $object->adresse . '</td></tr>';
    /*
    	// Status (to sell)
    	print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td>';
    	print $object->getLibStatut(2,0);
    	print '</td></tr>';
    
    	// Status (to buy)
    	print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')</td><td>';
    	print $object->getLibStatut(2,1);
    	print '</td></tr>';
    */
    print '<tr><td>' . $langs->trans("NbOfAttachedFiles") . '</td><td colspan="3">' . count($filearray) . '</td></tr>';
    print '<tr><td>' . $langs->trans("TotalSizeOfAttachedFiles") . '</td><td colspan="3">' . $totalsize . ' ' . $langs->trans("bytes") . '</td></tr>';
    print '</table>';
    print '</div>';
    // Affiche formulaire upload
    $formfile = new FormFile($db);
    $formfile->form_attach_new_file(DOL_URL_ROOT . '/gestimmo/biens/document.php?id=' . $object->id, '', 0, 0, $user->rights->produit->creer || $user->rights->service->creer, 50, $object);
    // List of document
    $formfile->list_of_documents($filearray, $object, 'gestimmo');
} else {
    print $langs->trans("UnkownError");
}
llxFooter();
$db->close();
开发者ID:abbenbouchta,项目名称:immobilier,代码行数:31,代码来源:document.php

示例13: FormFile

    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

示例14: count

    // Ref
    print '<tr><td width="30%">' . $langs->trans("Ref") . '</td><td>';
    print $form->showrefnav($object, 'ref', '', 1, 'ref', 'ref');
    print '</td></tr>';
    // Societe
    print "<tr><td>" . $langs->trans("Company") . "</td><td>" . $object->client->getNomUrl(1) . "</td></tr>";
    print '<tr><td>' . $langs->trans("NbOfAttachedFiles") . '</td><td colspan="3">' . count($filearray) . '</td></tr>';
    print '<tr><td>' . $langs->trans("TotalSizeOfAttachedFiles") . '</td><td colspan="3">' . $totalsize . ' ' . $langs->trans("bytes") . '</td></tr>';
    print '</table>';
    print '</div>';
    dol_htmloutput_mesg($mesg, $mesgs);
    /*
     * Confirmation suppression fichier
     */
    if ($action == 'delete') {
        $ret = $form->form_confirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
        if ($ret == 'html') {
            print '<br>';
        }
    }
    // Affiche formulaire upload
    $formfile = new FormFile($db);
    $formfile->form_attach_new_file(DOL_URL_ROOT . '/fichinter/document.php?id=' . $object->id, '', 0, 0, $user->rights->ficheinter->creer, 50, $object);
    // List of document
    $param = '&id=' . $object->id;
    $formfile->list_of_documents($filearray, $object, 'ficheinter', $param);
} else {
    print $langs->trans("UnkownError");
}
llxFooter();
$db->close();
开发者ID:nrjacker4,项目名称:crm-php,代码行数:31,代码来源:document.php

示例15: Form

 */
llxheader('', $langs->trans("adddocument"), '');
$form = new Form($db);
if ($object->id) {
    $locataire = new Locataire($db, GETPOST('id'));
    $head = locataire_prepare_head($locataire);
    dol_fiche_head($head, 'document', $langs->trans("ImoDocument"), 0, 'renter');
    // Construit liste des fichiers
    $filearray = dol_dir_list($upload_dir, "files", 0, '', '\\.meta$', $sortfield, strtolower($sortorder) == 'desc' ? SORT_DESC : SORT_ASC, 1);
    $totalsize = 0;
    foreach ($filearray as $key => $file) {
        $totalsize += $file['size'];
    }
    print '<table class="border" width="100%">';
    print '<tr><td width="20%">' . $langs->trans("nomlocataire") . '</td>';
    print '<td><input name="nom" size="40" value="' . $locataire->nom . '"</td></tr>';
    print '<tr><td>' . $langs->trans("NbOfAttachedFiles") . '</td><td colspan="3">' . count($filearray) . '</td></tr>';
    print '<tr><td>' . $langs->trans("TotalSizeOfAttachedFiles") . '</td><td colspan="3">' . $totalsize . ' ' . $langs->trans("bytes") . '</td></tr>';
    print '</table>';
    print '</div>';
    // Affiche formulaire upload
    $formfile = new FormFile($db);
    $formfile->form_attach_new_file($_SERVER["PHP_SELF"] . '?id=' . $object->id, '', 0, 0, 1, 50, $locataire);
    // List of document
    // $param='&id='.$object->id;
    $formfile->list_of_documents($filearray, $object, 'immobilier/locataire', $param);
} else {
    print $langs->trans("UnkownError");
}
llxFooter();
$db->close();
开发者ID:abbenbouchta,项目名称:immobilier,代码行数:31,代码来源:document.php


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