• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP top_httphead函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: llxHeaderVierge

/**
 * Show header for demo
 *
 * @param 	string		$title		Title
 * @param 	string		$head		Head string
 * @return	void
 */
function llxHeaderVierge($title, $head = "")
{
    global $user, $conf, $langs;

    top_httphead();

    top_htmlhead($head,$title);

    print '<body style="margin: 20px;">'."\n";
}
开发者ID:NoisyBoy86,项目名称:Dolibarr_test,代码行数:17,代码来源:index.php


示例2: define

}
if (!defined('NOREQUIREHTML')) {
    define('NOREQUIREHTML', '1');
}
if (!defined('NOREQUIREAJAX')) {
    define('NOREQUIREAJAX', '1');
}
if (!defined('NOREQUIRESOC')) {
    define('NOREQUIRESOC', '1');
}
if (!defined('NOREQUIRETRAN')) {
    define('NOREQUIRETRAN', '1');
}
require '../../main.inc.php';
/*
 * View
 */
// Ajout directives pour resoudre bug IE
//header('Cache-Control: Public, must-revalidate');
//header('Pragma: public');
//top_htmlhead("", "", 1);  // Replaced with top_httphead. An ajax page does not need html header.
top_httphead();
//print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
// Registering the location of boxes
if (isset($_GET['action']) && !empty($_GET['action'])) {
    if ($_GET['action'] == 'getrandompassword' && $user->admin) {
        require_once DOL_DOCUMENT_ROOT . "/core/lib/security2.lib.php";
        $generic = $_GET['generic'];
        echo getRandomPassword($generic);
    }
}
开发者ID:nrjacker4,项目名称:crm-php,代码行数:31,代码来源:security.php


示例3: top_htmlhead

/**
 * Ouput html header of a page.
 * This code is also duplicated into security2.lib.php::dol_loginfunction
 *
 * @param 	string 	$head			Optionnal head lines
 * @param 	string 	$title			HTML title
 * @param 	int    	$disablejs		More content into html header
 * @param 	int    	$disablehead	More content into html header
 * @param 	array  	$arrayofjs		Array of complementary js files
 * @param 	array  	$arrayofcss		Array of complementary css files
 * @return	void
 */
function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '') {
    global $user, $conf, $langs, $db;

    top_httphead();

    if (empty($conf->css))
        $conf->css = '/theme/eldy/style.css.php'; // If not defined, eldy by default
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <?php
    if (!empty($conf->global->MAIN_USE_CACHE_MANIFEST))
        print '<html manifest="cache.manifest">' . "\n";
    else
        print '<html>' . "\n";

    if (empty($disablehead)) {
        ?>
        <head>

            <meta charset="utf-8" />
            <meta name="viewport" content="width=device-width, initial-scale=1.0" />
            <meta name="robots" content="noindex,nofollow" />
            <meta name="author" content="Speedealing Development Team" />
            <?php
            // Displays title
            $appli = 'Speedealing';
            if (!empty($conf->global->MAIN_APPLICATION_TITLE))
                $appli = $conf->global->MAIN_APPLICATION_TITLE;

            if ($title)
                print '<title>' . $appli . ' - ' . $title . '</title>';
            else
                print "<title>" . $appli . "</title>";
            print "\n";
            ?>
            <base href="<?php echo 'http://' . $_SERVER['HTTP_HOST'] . DOL_URL_ROOT . '/'; ?>" />
            <link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>
            <?php
            print '<!-- Includes for JQuery (Ajax library) -->' . "\n";
            //$jquerytheme = 'smoothness';
            //if (!empty($conf->global->MAIN_USE_JQUERY_THEME)) $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME;
            //else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui-latest.custom.css" />'."\n";    // JQuery
            //print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/tiptip/tipTip.css" />'."\n";                           // Tooltip
            print '<link rel="stylesheet" type="text/css" href="includes/jquery/plugins/jnotify/jquery.jnotify-alt.min.css" />' . "\n";          // JNotify
            //print '<link rel="stylesheet" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/lightbox/css/jquery.lightbox-0.5.css" media="screen" />'."\n";       // Lightbox
            // jQuery fileupload
            print '<link rel="stylesheet" type="text/css" href="includes/jquery/plugins/fileupload/css/jquery.fileupload-ui.css" />' . "\n";
            // jQuery datatables
            //print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/media/css/jquery.dataTables.css" />'."\n";
            //print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/media/css/jquery.dataTables_jui.css" />'."\n";
            print '<link rel="stylesheet" type="text/css" href="includes/jquery/plugins/datatables/extras/ColReorder/media/css/ColReorder.css" />' . "\n";
            //print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/ColVis/media/css/ColVis.css" />'."\n";
            //print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/ColVis/media/css/ColVisAlt.css" />'."\n";
            //print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/TableTools/media/css/TableTools.css" />'."\n";
            print '<link rel="stylesheet" type="text/css" href="includes/jquery/plugins/datatables/extras/AutoFill/media/css/AutoFill.css" />' . "\n";
            // jQuery multiselect
            //print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/multiselect/css/ui.multiselect.css" />'."\n";
            print '<link rel="stylesheet" type="text/css" href="includes/jquery/plugins/wysiwyg/css/jquery.wysiwyg.css" />' . "\n";
            // jQuery taghandler
            print '<link rel="stylesheet" href="includes/jquery/plugins/tagHandler/css/jquery.taghandler.css" media="all" />' . "\n";

            print '<!-- Includes for Speedealing, modules or specific pages-->' . "\n";
            // Output style sheets (optioncss='print' or '')
            $themepath = dol_buildpath((empty($conf->global->MAIN_FORCETHEMEDIR) ? '' : $conf->global->MAIN_FORCETHEMEDIR) . $conf->css, 1);
            $themeparam = '?lang=' . $langs->defaultlang . '&amp;theme=' . $conf->theme . (GETPOST('optioncss') ? '&amp;optioncss=' . GETPOST('optioncss', 'alpha', 1) : '');
            if (!empty($_SESSION['dol_resetcache']))
                $themeparam.='&amp;dol_resetcache=' . $_SESSION['dol_resetcache'];
            //print 'themepath='.$themepath.' themeparam='.$themeparam;exit;
            print '<link rel="stylesheet" type="text/css" title="default" href="' . $themepath . $themeparam . '">' . "\n";
            // CSS forced by modules (relative url starting with /)
            if (is_array($conf->css_modules)) {
                foreach ($conf->css_modules as $key => $cssfile) {
                    // cssfile is an absolute path
                    print '<link rel="stylesheet" type="text/css" title="default" href="' . dol_buildpath($cssfile, 1);
                    // We add params only if page is not static, because some web server setup does not return content type text/css if url has parameters, so browser cache is not used.
                    if (!preg_match('/\.css$/i', $cssfile))
                        print $themeparam;
                    print '"><!-- Added by module ' . $key . '-->' . "\n";
                }
            }
            // CSS forced by page in top_htmlhead call (relative url starting with /)
            if (is_array($arrayofcss)) {
                foreach ($arrayofcss as $cssfile) {
                    print '<link rel="stylesheet" type="text/css" title="default" href="' . dol_buildpath($cssfile, 1);
                    // We add params only if page is not static, because some web server setup does not return content type text/css if url has parameters and browser cache is not used.
                    if (!preg_match('/\.css$/i', $cssfile))
                        print $themeparam;
                    print '"><!-- Added by page -->' . "\n";
//.........这里部分代码省略.........
开发者ID:nrjacker4,项目名称:crm-php,代码行数:101,代码来源:main.inc.php


示例4: top_htmlhead

/**
 * Ouput html header of a page.
 * This code is also duplicated into security2.lib.php::dol_loginfunction
 *
 * @param 	string 	$head			Optionnal head lines
 * @param 	string 	$title			HTML title
 * @param 	int    	$disablejs		More content into html header
 * @param 	int    	$disablehead	More content into html header
 * @param 	array  	$arrayofjs		Array of complementary js files
 * @param 	array  	$arrayofcss		Array of complementary css files
 * @return	void
 */
function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '')
{
    global $user, $conf, $langs, $db;
    top_httphead();
    if (empty($conf->css)) {
        $conf->css = '/theme/eldy/style.css.php';
    }
    // If not defined, eldy by default
    if (empty($conf->global->MAIN_ACTIVATE_HTML5)) {
        $doctype = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';
    } else {
        $doctype = '<!doctype html>';
        // Html5 - Developement - Only available on Eldy template
    }
    print $doctype . "\n";
    if (!empty($conf->global->MAIN_USE_CACHE_MANIFEST)) {
        print '<html lang="' . substr($langs->defaultlang, 0, 2) . '" manifest="' . DOL_URL_ROOT . '/cache.manifest">' . "\n";
    } else {
        print '<html lang="' . substr($langs->defaultlang, 0, 2) . '">' . "\n";
    }
    //print '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">'."\n";
    if (empty($disablehead)) {
        print "<head>\n";
        if (GETPOST('dol_basehref')) {
            print '<base href="' . dol_escape_htmltag(GETPOST('dol_basehref')) . '">' . "\n";
        }
        // Displays meta
        print '<meta name="robots" content="noindex,nofollow">' . "\n";
        // Do not index
        print '<meta name="viewport" content="width=device-width, initial-scale=1">';
        // Scale for mobile device
        print '<meta name="author" content="Dolibarr Development Team">' . "\n";
        if (!empty($conf->global->MAIN_ACTIVATE_HTML5)) {
            print '<meta name="viewport" content="width=device-width, initial-scale=1.0">' . "\n";
        }
        // Needed for Responsive Web Design
        $favicon = dol_buildpath('/theme/' . $conf->theme . '/img/favicon.ico', 1);
        if (!empty($conf->global->MAIN_FAVICON_URL)) {
            $favicon = $conf->global->MAIN_FAVICON_URL;
        }
        print '<link rel="shortcut icon" type="image/x-icon" href="' . $favicon . '"/>' . "\n";
        if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
            print '<link rel="top" title="' . $langs->trans("Home") . '" href="' . (DOL_URL_ROOT ? DOL_URL_ROOT : '/') . '">' . "\n";
        }
        if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
            print '<link rel="copyright" title="GNU General Public License" href="http://www.gnu.org/copyleft/gpl.html#SEC1">' . "\n";
        }
        if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
            print '<link rel="author" title="Dolibarr Development Team" href="http://www.dolibarr.org">' . "\n";
        }
        // Displays title
        $appli = 'Dolibarr';
        if (!empty($conf->global->MAIN_APPLICATION_TITLE)) {
            $appli = $conf->global->MAIN_APPLICATION_TITLE;
        }
        if ($title && !empty($conf->global->MAIN_HTML_TITLE) && preg_match('/noapp/', $conf->global->MAIN_HTML_TITLE)) {
            print '<title>' . dol_htmlentities($title) . '</title>';
        }
        if ($title) {
            print '<title>' . dol_htmlentities($appli . ' - ' . $title) . '</title>';
        } else {
            print "<title>" . dol_htmlentities($appli) . "</title>";
        }
        print "\n";
        $ext = '';
        if (!empty($conf->dol_use_jmobile)) {
            $ext = 'version=' . urlencode(DOL_VERSION);
        }
        if (GETPOST('version')) {
            $ext = 'version=' . GETPOST('version', 'int');
        }
        // usefull to force no cache on css/js
        if (!defined('DISABLE_JQUERY') && !$disablejs && $conf->use_javascript_ajax) {
            print '<!-- Includes CSS for JQuery (Ajax library) -->' . "\n";
            $jquerytheme = 'smoothness';
            if (!empty($conf->global->MAIN_USE_JQUERY_THEME)) {
                $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME;
            }
            if (constant('JS_JQUERY_UI')) {
                print '<link rel="stylesheet" type="text/css" href="' . JS_JQUERY_UI . 'css/' . $jquerytheme . '/jquery-ui.min.css' . ($ext ? '?' . $ext : '') . '">' . "\n";
            } else {
                print '<link rel="stylesheet" type="text/css" href="' . DOL_URL_ROOT . '/includes/jquery/css/' . $jquerytheme . '/jquery-ui.css' . ($ext ? '?' . $ext : '') . '">' . "\n";
            }
            // JQuery
            print '<link rel="stylesheet" type="text/css" href="' . DOL_URL_ROOT . '/includes/jquery/plugins/tiptip/tipTip.css' . ($ext ? '?' . $ext : '') . '">' . "\n";
            // Tooltip
            print '<link rel="stylesheet" type="text/css" href="' . DOL_URL_ROOT . '/includes/jquery/plugins/jnotify/jquery.jnotify-alt.min.css' . ($ext ? '?' . $ext : '') . '">' . "\n";
            // JNotify
//.........这里部分代码省略.........
开发者ID:TAASA,项目名称:Dolibarr-ERP-3.8.1,代码行数:101,代码来源:main.inc.php


示例5: top_htmlhead

/**
 *  Show HTML header
 *  @param      head    	Optionnal head lines
 *  @param      title   	Web page title
 *	@param		disablejs	Do not output links to js (Ex: qd fonction utilisee par sous formulaire Ajax)
 *	@param		disablehead	Do not output head section
 *	@param		arrayofjs	Array of js files to add in header
 *	@param		arrayofcss	Array of css files to add in header
 */
function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '')
{
    global $user, $conf, $langs, $db;
    top_httphead();
    if (empty($conf->css)) {
        $conf->css = '/theme/eldy/style.css.php';
    }
    // If not defined, eldy by default
    print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';
    //print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">';
    //print '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
    //print '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
    //print '<!DOCTYPE html>';
    print "\n";
    print "<html>\n";
    //print '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">'."\n";
    if (empty($disablehead)) {
        print "<head>\n";
        print "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=" . $conf->file->character_set_client . "\">\n";
        // Displays meta
        print '<meta name="robots" content="noindex,nofollow">' . "\n";
        // Evite indexation par robots
        print '<meta name="author" content="Dolibarr Development Team">' . "\n";
        print '<link rel="shortcut icon" type="image/x-icon" href="' . DOL_URL_ROOT . '/favicon.ico">' . "\n";
        // Displays title
        $appli = 'Dolibarr';
        if (!empty($conf->global->MAIN_APPLICATION_TITLE)) {
            $appli = $conf->global->MAIN_APPLICATION_TITLE;
        }
        if ($title) {
            print '<title>' . $appli . ' - ' . $title . '</title>';
        } else {
            print "<title>" . $appli . "</title>";
        }
        print "\n";
        if (!defined('DISABLE_JQUERY')) {
            print '<!-- Includes for JQuery (Ajax library) -->' . "\n";
            $jquerytheme = 'smoothness';
            if (!empty($conf->global->MAIN_USE_JQUERY_THEME)) {
                $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME;
            }
            print '<link rel="stylesheet" type="text/css" href="' . DOL_URL_ROOT . '/includes/jquery/css/' . $jquerytheme . '/jquery-ui-latest.custom.css" />' . "\n";
            // JQuery
            print '<link rel="stylesheet" type="text/css" href="' . DOL_URL_ROOT . '/includes/jquery/plugins/tiptip/tipTip.css" />' . "\n";
            // Tooltip
            print '<link rel="stylesheet" type="text/css" href="' . DOL_URL_ROOT . '/includes/jquery/plugins/jnotify/jquery.jnotify-alt.min.css" />' . "\n";
            // JNotify
            //print '<link rel="stylesheet" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/lightbox/css/jquery.lightbox-0.5.css" media="screen" />'."\n";       // Lightbox
            if (!empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD)) {
                print '<link rel="stylesheet" href="' . DOL_URL_ROOT . '/includes/jquery/plugins/fileupload/jquery.fileupload-ui.css" type="text/css" />' . "\n";
            }
        }
        print '<!-- Includes for Dolibarr, modules or specific pages-->' . "\n";
        // Output style sheets (optioncss='print' or '')
        $themepath = dol_buildpath((empty($conf->global->MAIN_FORCETHEMEDIR) ? '' : $conf->global->MAIN_FORCETHEMEDIR) . $conf->css, 1);
        //print 'themepath='.$themepath;exit;
        print '<link rel="stylesheet" type="text/css" title="default" href="' . $themepath . '?lang=' . $langs->defaultlang . '&theme=' . $conf->theme . (GETPOST('optioncss') ? '&optioncss=' . GETPOST('optioncss', 'alpha', 1) : '') . '">' . "\n";
        // CSS forced by modules (relative url starting with /)
        if (is_array($conf->css_modules)) {
            foreach ($conf->css_modules as $cssfile) {
                // cssfile is an absolute path
                print '<link rel="stylesheet" type="text/css" title="default" href="' . dol_buildpath($cssfile, 1);
                // We add params only if page is not static, because some web server setup does not return content type text/css if url has parameters and browser cache is not used.
                if (!preg_match('/\\.css$/i', $cssfile)) {
                    print '?lang=' . $langs->defaultlang . '&theme=' . $conf->theme . (GETPOST('optioncss') ? '&optioncss=' . GETPOST('optioncss', 'alpha', 1) : '');
                }
                print '">' . "\n";
            }
        }
        // CSS forced by page in top_htmlhead call (relative url starting with /)
        if (is_array($arrayofcss)) {
            foreach ($arrayofcss as $cssfile) {
                print '<link rel="stylesheet" type="text/css" title="default" href="' . dol_buildpath($cssfile, 1);
                // We add params only if page is not static, because some web server setup does not return content type text/css if url has parameters and browser cache is not used.
                if (!preg_match('/\\.css$/i', $cssfile)) {
                    print '?lang=' . $langs->defaultlang . '&theme=' . $conf->theme . (GETPOST('optioncss') ? '&optioncss=' . GETPOST('optioncss', 'alpha', 1) : '');
                }
                print '">' . "\n";
            }
        }
        if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
            print '<link rel="top" title="' . $langs->trans("Home") . '" href="' . (DOL_URL_ROOT ? DOL_URL_ROOT : '/') . '">' . "\n";
        }
        if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
            print '<link rel="copyright" title="GNU General Public License" href="http://www.gnu.org/copyleft/gpl.html#SEC1">' . "\n";
        }
        if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
            print '<link rel="author" title="Dolibarr Development Team" href="http://www.dolibarr.org">' . "\n";
        }
        // Output standard javascript links
        if (!$disablejs && $conf->use_javascript_ajax) {
//.........这里部分代码省略.........
开发者ID:netors,项目名称:dolibarr,代码行数:101,代码来源:main.inc.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP top_panel函数代码示例发布时间:2022-05-23
下一篇:
PHP top_htmlhead函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap