本文整理汇总了PHP中dol_buildpath函数的典型用法代码示例。如果您正苦于以下问题:PHP dol_buildpath函数的具体用法?PHP dol_buildpath怎么用?PHP dol_buildpath使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dol_buildpath函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mymoduleAdminPrepareHead
/**
* \file lib/mymodule.lib.php
* \ingroup mymodule
* \brief This file is an example module library
* Put some comments here
*/
function mymoduleAdminPrepareHead()
{
global $langs, $conf;
$langs->load("mymodule@mymodule");
$h = 0;
$head = array();
$head[$h][0] = dol_buildpath("/mymodule/admin/admin_mymodule.php", 1);
$head[$h][1] = $langs->trans("Settings");
$head[$h][2] = 'settings';
$h++;
$head[$h][0] = dol_buildpath("/mymodule/admin/about.php", 1);
$head[$h][1] = $langs->trans("About");
$head[$h][2] = 'about';
$h++;
// Show more tabs from modules
// Entries must be declared in modules descriptor with line
//$this->tabs = array(
// 'entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'
//); // to add new tab
//$this->tabs = array(
// 'entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'
//); // to remove a tab
complete_head_from_modules($conf, $langs, $object, $head, $h, 'mymodule');
return $head;
}
示例2: admin_accounting_prepare_head
/**
* Prepare array with list of admin tabs
*
* @param AccountingAccount $object Object instance we show card
* @return array Array of tabs to show
*/
function admin_accounting_prepare_head(AccountingAccount $object = null)
{
global $langs, $conf;
$h = 0;
$head = array();
$head[$h][0] = dol_buildpath('/accountancy/admin/index.php', 1);
$head[$h][1] = $langs->trans("Configuration");
$head[$h][2] = 'general';
$h++;
// Show more tabs from modules
// Entries must be declared in modules descriptor with line
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
// $this->tabs = array('entity:-tabname); to remove a tab
complete_head_from_modules($conf, $langs, $object, $head, $h, 'accounting_admin');
$head[$h][0] = DOL_URL_ROOT . '/accountancy/admin/journal.php';
$head[$h][1] = $langs->trans("Journaux");
$head[$h][2] = 'journal';
$h++;
$head[$h][0] = DOL_URL_ROOT . '/accountancy/admin/export.php';
$head[$h][1] = $langs->trans("Export");
$head[$h][2] = 'export';
$h++;
complete_head_from_modules($conf, $langs, $object, $head, $h, 'accounting_admin', 'remove');
return $head;
}
示例3: immobilier_pdf_create
/**
* \brief Crée un document PDF
* \param db objet base de donnee
* \param modele modele à utiliser
* \param outputlangs objet lang a utiliser pour traduction
* \return int <0 if KO, >0 if OK
*/
function immobilier_pdf_create($db, $id, $message, $typeModele, $outputlangs, $file)
{
global $conf, $langs;
$langs->load('immobilier@immobilier');
// Charge le modele
$nomModele = dol_buildpath('/immobilier/core/modules/immobilier/pdf/pdf_' . $typeModele . '.modules.php');
if (file_exists($nomModele)) {
require_once $nomModele;
$classname = "pdf_" . $typeModele;
$obj = new $classname($db);
$obj->message = $message;
// We save charset_output to restore it because write_file can change it if needed for
// output format that does not support UTF8.
$sav_charset_output = $outputlangs->charset_output;
if ($obj->write_file($id, $outputlangs, $file, $socid, $courrier) > 0) {
$outputlangs->charset_output = $sav_charset_output;
return 1;
} else {
$outputlangs->charset_output = $sav_charset_output;
dol_print_error($db, "pdf_create Error: " . $obj->error);
return -1;
}
} else {
dol_print_error('', $langs->trans("Error") . " " . $langs->trans("ErrorFileDoesNotExists", $file));
return -1;
}
}
示例4: propalautosendAdminPrepareHead
/**
* \file lib/propalautosend.lib.php
* \ingroup propalautosend
* \brief This file is an example module library
* Put some comments here
*/
function propalautosendAdminPrepareHead()
{
global $langs, $conf;
$langs->load("propalautosend@propalautosend");
$h = 0;
$head = array();
$head[$h][0] = dol_buildpath("/propalautosend/admin/propalautosend_setup.php", 1);
$head[$h][1] = $langs->trans("Parameters");
$head[$h][2] = 'settings';
$h++;
$head[$h][0] = dol_buildpath("/propalautosend/admin/propalautosend_about.php", 1);
$head[$h][1] = $langs->trans("About");
$head[$h][2] = 'about';
$h++;
// Show more tabs from modules
// Entries must be declared in modules descriptor with line
//$this->tabs = array(
// 'entity:+tabname:Title:@propalautosend:/propalautosend/mypage.php?id=__ID__'
//); // to add new tab
//$this->tabs = array(
// 'entity:-tabname:Title:@propalautosend:/propalautosend/mypage.php?id=__ID__'
//); // to remove a tab
complete_head_from_modules($conf, $langs, $object, $head, $h, 'propalautosend');
return $head;
}
示例5: memcached_prepare_head
/**
* \brief Define head array for tabs of security setup pages
* \return Array of head
* \version $Id: memcached.lib.php,v 1.1 2011/01/16 13:30:09 eldy Exp $
*/
function memcached_prepare_head()
{
global $langs, $conf, $user;
$h = 0;
$head = array();
$head[$h][0] = dol_buildpath("/memcached/admin/memcached.php",1);
$head[$h][1] = $langs->trans("ServerSetup");
$head[$h][2] = 'serversetup';
$h++;
if (class_exists("Memcache") || class_exists("Memcached"))
{
if (empty($dolibarr_memcached_view_disable)) // Hidden variable to add to conf file to disable browsing
{
$head[$h][0] = dol_buildpath("/memcached/admin/memcached_stats.php?op=1",1);
$head[$h][1] = $langs->trans("ServerStatistics");
$head[$h][2] = 'serverstats';
$h++;
$head[$h][0] = dol_buildpath("/memcached/admin/memcached_stats.php?op=2",1);
$head[$h][1] = $langs->trans("CacheBrowser");
$head[$h][2] = 'cachebrowser';
$h++;
}
}
return $head;
}
示例6: facture_prepare_head
/**
* Initialize the array of tabs for customer invoice
*
* @param Facture $object Invoice object
* @return array Array of head tabs
*/
function facture_prepare_head($object)
{
global $langs, $conf, $user;
$h = 0;
$head = array();
$head[$h][0] = DOL_URL_ROOT . '/compta/facture.php?facid=' . $object->id;
$head[$h][1] = $langs->trans('CardBill');
$head[$h][2] = 'compta';
$h++;
if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) {
$head[$h][0] = DOL_URL_ROOT . '/compta/facture/contact.php?facid=' . $object->id;
$head[$h][1] = $langs->trans('ContactsAddresses');
$head[$h][2] = 'contact';
$h++;
}
if (!empty($conf->global->MAIN_USE_PREVIEW_TABS)) {
$head[$h][0] = DOL_URL_ROOT . '/compta/facture/apercu.php?facid=' . $object->id;
$head[$h][1] = $langs->trans('Preview');
$head[$h][2] = 'preview';
$h++;
}
//if ($fac->mode_reglement_code == 'PRE')
if ($conf->prelevement->enabled) {
$head[$h][0] = DOL_URL_ROOT . '/compta/facture/prelevement.php?facid=' . $object->id;
$head[$h][1] = $langs->trans('StandingOrders');
$head[$h][2] = 'standingorders';
$h++;
}
if ($conf->Ego->enabled && $user->rights->ego->paiment->create) {
$langs->load('ego@ego');
$head[$h][0] = dol_buildpath('/ego/paiment.php?facid=' . $object->id, 1);
$head[$h][1] = $langs->trans('EgoPay');
$head[$h][2] = 'egopay';
$h++;
}
// Show more tabs from modules
// Entries must be declared in modules descriptor with line
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
// $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
complete_head_from_modules($conf, $langs, $object, $head, $h, 'invoice');
if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) {
$head[$h][0] = DOL_URL_ROOT . '/compta/facture/note.php?facid=' . $object->id;
$head[$h][1] = $langs->trans('Notes');
$head[$h][2] = 'note';
$h++;
}
$head[$h][0] = DOL_URL_ROOT . '/compta/facture/document.php?facid=' . $object->id;
/* $filesdir = $conf->facture->dir_output . "/" . dol_sanitizeFileName($fac->ref);
include_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php');
$listoffiles=dol_dir_list($filesdir,'files',1);
$head[$h][1] = (count($listoffiles)?$langs->trans('DocumentsNb',count($listoffiles)):$langs->trans('Documents')); */
$head[$h][1] = $langs->trans('Documents');
$head[$h][2] = 'documents';
$h++;
$head[$h][0] = DOL_URL_ROOT . '/compta/facture/info.php?facid=' . $object->id;
$head[$h][1] = $langs->trans('Info');
$head[$h][2] = 'info';
$h++;
return $head;
}
示例7: dolidacticielAdminPrepareHead
/**
* \file lib/dolidacticiel.lib.php
* \ingroup dolidacticiel
* \brief This file is an example module library
* Put some comments here
*/
function dolidacticielAdminPrepareHead()
{
global $langs, $conf;
$langs->load("dolidacticiel@dolidacticiel");
$h = 0;
$head = array();
$head[$h][0] = dol_buildpath("/dolidacticiel/admin/dolidacticiel_setup.php", 1);
$head[$h][1] = $langs->trans("Achievements");
$head[$h][2] = 'ggwp';
$h++;
$head[$h][0] = dol_buildpath("/dolidacticiel/admin/dolidacticiel_others.php", 1);
$head[$h][1] = $langs->trans("DolidacticielOthersTests");
$head[$h][2] = 'otherstests';
$h++;
$head[$h][0] = dol_buildpath("/dolidacticiel/admin/dolidacticiel_admin.php", 1);
$head[$h][1] = $langs->trans("DolidacticielAdmin");
$head[$h][2] = 'create';
$h++;
$head[$h][0] = dol_buildpath("/dolidacticiel/admin/dolidacticiel_about.php", 1);
$head[$h][1] = $langs->trans("About");
$head[$h][2] = 'about';
$h++;
// Show more tabs from modules
// Entries must be declared in modules descriptor with line
//$this->tabs = array(
// 'entity:+tabname:Title:@dolidacticiel:/dolidacticiel/mypage.php?id=__ID__'
//); // to add new tab
//$this->tabs = array(
// 'entity:-tabname:Title:@dolidacticiel:/dolidacticiel/mypage.php?id=__ID__'
//); // to remove a tab
complete_head_from_modules($conf, $langs, $object, $head, $h, 'dolidacticiel');
return $head;
}
示例8: loadBox
/**
* Load data into info_box_contents array to show array later.
*
* @param int $max of records to load
*
* @return void
*/
public function loadBox($max = 5)
{
global $conf, $user, $langs, $db;
$this->max = $max;
dol_include_once('/lead/class/lead.class.php');
$lead = new Lead($db);
$lead->fetch_all('DESC', 't.date_closure', $max, 0, array('t.date_closure<' => dol_now()));
$text = $langs->trans("LeadLate", $max);
$this->info_box_head = array('text' => $text, 'limit' => dol_strlen($text));
$i = 0;
foreach ($lead->lines as $line) {
// FIXME: line is an array, not an object
$line->fetch_thirdparty();
// Ref
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, 'url' => dol_buildpath('/lead/lead/card.php', 1) . '?id=' . $line->id);
$this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => $line->ref, 'url' => dol_buildpath('/lead/lead/card.php', 1) . '?id=' . $line->id);
$this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', 'logo' => 'company', 'url' => DOL_URL_ROOT . "/comm/fiche.php?socid=" . $line->fk_soc);
$this->info_box_contents[$i][3] = array('td' => 'align="left"', 'text' => dol_trunc($line->thirdparty->name, 40), 'url' => DOL_URL_ROOT . "/comm/fiche.php?socid=" . $line->fk_soc);
// Amount Guess
$this->info_box_contents[$i][4] = array('td' => 'align="left"', 'text' => price($line->amount_prosp, 'HTML') . $langs->getCurrencySymbol($conf->currency));
// Amount real
$this->info_box_contents[$i][5] = array('td' => 'align="left"', 'text' => $line->getRealAmount() . $langs->getCurrencySymbol($conf->currency));
$i++;
}
}
示例9: getComment
function getComment()
{
$comm = $this->comment;
$comm = preg_replace('/@((\\w|-)+)/', '<a class="user" href="' . dol_buildpath('/twiiitor/hashtag.php?tag=$1&type_tag=user', 1) . '">$0</a>', $comm);
$comm = preg_replace('/#(\\w+)/', '<a class="object" href="' . dol_buildpath('/twiiitor/hashtag.php?tag=$1&type_tag=hashtag', 1) . '">$0</a>', $comm);
$comm = preg_replace('/:(\\w+)/', '<a class="rel" href="' . dol_buildpath('/twiiitor/hashtag.php?tag=$1&type_tag=rel', 1) . '">$0</a>', $comm);
return $comm;
}
示例10: inlineImage
/**
* Resolve inline images relative URLs to the module's path
*
* @param $Excerpt
* @return array|void
*/
protected function inlineImage($Excerpt)
{
$image = parent::inlineImage($Excerpt);
$path = new \Enrise\Uri($image['element']['attributes']['src']);
if ($path->isRelative()) {
$image['element']['attributes']['src'] = dol_buildpath('/mymodule/' . $path, 1);
}
return $image;
}
示例11: searcheverywhere_prepare_head
function searcheverywhere_prepare_head($str)
{
global $langs, $conf;
$h = 0;
$head = array();
$head[$h][0] = dol_buildpath('/searcheverywhere/search.php?keyword=' . urlencode($str), 1);
$head[$h][1] = $langs->trans('Searcheverywhere');
$head[$h][2] = 'search';
$h++;
return $head;
}
示例12: printObjectLine
/**
* Enter description here ...
*
* @param string $action Action type
*/
function printObjectLine($parameters, &$object, &$action = '', $hook)
{
global $conf, $user, $langs, $bcdd;
$langs->load("massorders@massorders");
if ($parameters['line']->special_code == 4) {
$tpl = dol_buildpath('/massorders/tpl/invoices.tpl.php');
$res = @(include $tpl);
return 1;
}
return 0;
}
示例13: labels_admin_prepare_head
function labels_admin_prepare_head($object)
{
global $langs, $conf, $user;
$h = 0;
$head = array();
$head[$h][0] = dol_buildpath('/labelprint/admin/labelprint.php', 1);
$head[$h][1] = $langs->trans("Miscellanous");
$head[$h][2] = 'general';
$h++;
return $head;
}
示例14: addCalendarChoice
function addCalendarChoice($parameters, &$object, &$action, $hookmanager)
{
global $conf;
if (in_array('agenda', explode(':', $parameters['context']))) {
//if(!empty($conf->global->MAIN_NOT_INC_FULLCALENDAR_HEAD))
//{
echo '<script type="text/javascript" src="' . dol_buildpath('/fullcalendar/js/fullcalendar.js.php?force_use_js=1', 1) . '"></script>';
//}
return 1;
}
return 0;
}
示例15: _export_factures
function _export_factures(&$db, &$format, &$TRefFacture)
{
switch ($format) {
case 'natixis':
$fileName = _parseNatixis($db, $TRefFacture);
break;
}
if ($fileName) {
header('Location: ' . dol_buildpath('document.php?modulepart=factor&file=' . $fileName, 2));
exit;
}
}