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


PHP WebPage::__construct方法代码示例

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


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

示例1:

 function __construct($s_title)
 {
     parent::__construct($s_title);
     $this->add_header("Content-type: text/plain; charset=utf-8");
     $this->add_header("Cache-control: no-cache");
     //$this->add_header("Content-Transfer-Encoding: binary");
 }
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:7,代码来源:csvpage.class.inc.php

示例2:

 function __construct($s_title, $bPassThrough = false)
 {
     parent::__construct($s_title);
     $this->m_bPassThrough = $bPassThrough;
     $this->m_bHeaderSent = false;
     $this->add_header("Content-type: text/xml; charset=utf-8");
     $this->add_header("Cache-control: no-cache");
     $this->add_header("Content-location: export.xml");
 }
开发者ID:kira8565,项目名称:ITOP203-ZHCN,代码行数:9,代码来源:xmlpage.class.inc.php

示例3: TabManager

 /**
  * constructor for the web page
  * @param string $s_title Not used
  */
 function __construct($s_title)
 {
     parent::__construct($s_title);
     $this->m_sReadyScript = "";
     //$this->add_header("Content-type: text/html; charset=utf-8");
     $this->add_header("Cache-control: no-cache");
     $this->m_oTabs = new TabManager();
     $this->sContentType = 'text/html';
     $this->sContentDisposition = 'inline';
     $this->m_sMenu = "";
 }
开发者ID:henryavila,项目名称:itop,代码行数:15,代码来源:ajaxwebpage.class.inc.php

示例4: TabManager

 /**
  * constructor for the web page
  * @param string $s_title Not used
  */
 function __construct($s_title)
 {
     $sPrintable = utils::ReadParam('printable', '0');
     $bPrintable = $sPrintable == '1';
     parent::__construct($s_title, $bPrintable);
     $this->m_sReadyScript = "";
     //$this->add_header("Content-type: text/html; charset=utf-8");
     $this->add_header("Cache-control: no-cache");
     $this->m_oTabs = new TabManager();
     $this->sContentType = 'text/html';
     $this->sContentDisposition = 'inline';
     $this->m_sMenu = "";
 }
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:17,代码来源:ajaxwebpage.class.inc.php

示例5: __construct

    /**
     * class constructor
     *
     * @param string
     */
    public function __construct($title = '', $skipAuth = false)
    {
        parent::__construct($title);
        $config = new Config();
        $this->_skipAuth = $skipAuth;
        if (!$skipAuth) {
            $auth = new Auth();
            $this->_auth = $auth;
        }
        // Only allow reset to authenticated users and only if the config allows it.
        $this->_resetOk = $config->getResetOk() && ($skipAuth || $auth->isAuthorized());
        $header = <<<HTML
  <link rel="stylesheet" href="css/main.css" />
  <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css" />
  <script src="//code.jquery.com/jquery-1.10.2.js"></script>
  <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
  <script>
    \$( function() {
      \$( ".datepicker" ).datepicker( { dateFormat: 'yy-mm-dd' } );
    } ) ;
  </script>
  <script src="js/common.js"></script>
  <script src="js/ajaxApplicationStatus.js"></script>
  <script src="js/ajaxCompany.js"></script>
  <script src="js/ajaxContact.js"></script>
  <script src="js/oldValidation.js"></script>

HTML;
        $this->setHead($header);
        $this->setMeta(array("Cache-Control: no-cache, must-revalidate", "Expires: Sat, 26 Oct 2013 05:00:00 GMT", 'Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'));
        $this->setStyles('');
        $this->setTop($this->_getTop());
        $this->setBottom('<!-- EndOfPage -->');
        if (!$skipAuth && !$auth->isAuthorized()) {
            $this->setBody($auth->getLoginPage());
            $this->displayPage();
            exit;
        }
    }
开发者ID:kbcmdba,项目名称:pjs2,代码行数:44,代码来源:PJSWebPage.php

示例6: __construct

 public function __construct($s_title, $sPageFormat = 'A4', $sPageOrientation = 'L')
 {
     parent::__construct($s_title);
     define(K_PATH_FONTS, APPROOT . 'lib/tcpdf/fonts');
     $this->oPdf = new iTopPDF($sPageOrientation, 'mm', $sPageFormat, true, 'UTF-8', false);
     // set document information
     $this->oPdf->SetCreator(PDF_CREATOR);
     $this->oPdf->SetAuthor('iTop');
     $this->oPdf->SetTitle($s_title);
     $this->oPdf->SetDocumentTitle($s_title);
     $this->oPdf->setFontSubsetting(true);
     // Set font
     // dejavusans is a UTF-8 Unicode font. Standard PDF fonts like helvetica or times new roman are NOT UTF-8
     $this->oPdf->SetFont('dejavusans', '', 10, '', true);
     // set auto page breaks
     $this->oPdf->SetAutoPageBreak(true, 15);
     // 15 mm break margin at the bottom
     $this->oPdf->SetTopMargin(15);
     // Add a page, we're ready to start
     $this->oPdf->AddPage();
     $this->SetContentDisposition('inline', $s_title . '.pdf');
     $this->SetDefaultStyle();
 }
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:23,代码来源:pdfpage.class.inc.php

示例7: __construct

    public function __construct($s_title, $bPrintable = false)
    {
        parent::__construct($s_title, $bPrintable);
        $this->m_aReadyScripts = array();
        $this->add_linked_script("../js/jquery-1.10.0.min.js");
        $this->add_linked_script("../js/jquery-migrate-1.2.1.min.js");
        // Needed since many other plugins still rely on oldies like $.browser
        $this->add_linked_stylesheet('../css/ui-lightness/jquery-ui-1.10.3.custom.min.css');
        $this->add_linked_script('../js/jquery-ui-1.10.3.custom.min.js');
        $this->add_linked_script("../js/hovertip.js");
        // table sorting
        $this->add_linked_script("../js/jquery.tablesorter.js");
        $this->add_linked_script("../js/jquery.tablesorter.pager.js");
        $this->add_linked_script("../js/jquery.tablehover.js");
        $this->add_linked_script('../js/field_sorter.js');
        $this->add_linked_script('../js/datatable.js');
        $this->add_linked_script("../js/jquery.positionBy.js");
        $this->add_linked_script("../js/jquery.popupmenu.js");
        $this->add_ready_script(<<<EOF
\t//add new widget called TruncatedList to properly display truncated lists when they are sorted
\t\$.tablesorter.addWidget({ 
\t\t// give the widget a id 
\t\tid: "truncatedList", 
\t\t// format is called when the on init and when a sorting has finished 
\t\tformat: function(table)
\t\t{ 
\t\t\t// Check if there is a "truncated" line
\t\t\tthis.truncatedList = false;  
\t\t\tif (\$("tr td.truncated",table).length > 0)
\t\t\t{
\t\t\t\tthis.truncatedList = true;
\t\t\t}
\t\t\tif (this.truncatedList)
\t\t\t{
\t\t\t\t\$("tr td",table).removeClass('truncated');
\t\t\t\t\$("tr:last td",table).addClass('truncated');
\t\t\t}
\t\t} 
\t});
\t
\t\$.tablesorter.addWidget({ 
\t\t// give the widget a id 
\t\tid: "myZebra", 
\t\t// format is called when the on init and when a sorting has finished 
\t\tformat: function(table)
\t\t{
\t\t\t// Replace the 'red even' lines by 'red_even' since most browser do not support 2 classes selector in CSS, etc..
\t\t\t\$("tbody tr:even",table).addClass('even');
\t\t\t\$("tbody tr.red:even",table).removeClass('red').removeClass('even').addClass('red_even');
\t\t\t\$("tbody tr.orange:even",table).removeClass('orange').removeClass('even').addClass('orange_even');
\t\t\t\$("tbody tr.green:even",table).removeClass('green').removeClass('even').addClass('green_even');
\t\t\t// In case we sort again the table, we need to remove the added 'even' classes on odd rows
\t\t\t\$("tbody tr:odd",table).removeClass('even');
\t\t\t\$("tbody tr.red_even:odd",table).removeClass('even').removeClass('red_even').addClass('red');
\t\t\t\$("tbody tr.orange_even:odd",table).removeClass('even').removeClass('orange_even').addClass('orange');
\t\t\t\$("tbody tr.green_even:odd",table).removeClass('even').removeClass('green_even').addClass('green');
\t\t} 
\t});
\t\$("table.listResults").tableHover(); // hover tables
EOF
);
        $this->add_saas("css/light-grey.scss");
        $this->m_sRootUrl = $this->GetAbsoluteUrlAppRoot();
        $sAbsURLAppRoot = addslashes($this->m_sRootUrl);
        $sAbsURLModulesRoot = addslashes($this->GetAbsoluteUrlModulesRoot());
        $sEnvironment = addslashes(utils::GetCurrentEnvironment());
        $sAppContext = addslashes($this->GetApplicationContext());
        $this->add_script(<<<EOF
function GetAbsoluteUrlAppRoot()
{
\treturn '{$sAbsURLAppRoot}';
}

function GetAbsoluteUrlModulesRoot()
{
\treturn '{$sAbsURLModulesRoot}';
}

function GetAbsoluteUrlModulePage(sModule, sPage, aArguments)
{
\t// aArguments is optional, it default to an empty hash
\taArguments = typeof aArguments !== 'undefined' ? aArguments : {};

\tvar sUrl = '{$sAbsURLAppRoot}'+'pages/exec.php?exec_module='+sModule+'&exec_page='+sPage+'&exec_env='+'{$sEnvironment}';
\tfor (var sArgName in aArguments)
\t{
\t\tif (aArguments.hasOwnProperty(sArgName))
\t\t{
\t\t\tsUrl = sUrl + '&'+sArgName+'='+aArguments[sArgname];
\t\t}
\t}
\treturn sUrl;
}

function AddAppContext(sURL)
{
\tvar sContext = '{$sAppContext}';
\tif (sContext.length > 0)
\t{
\t\tif (sURL.indexOf('?') == -1)
//.........这里部分代码省略.........
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:101,代码来源:nicewebpage.class.inc.php


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