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");
 }
 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");
 }
 /**
  * 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 = "";
 }
 /**
  * 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 = "";
 }
Beispiel #5
0
    /**
     * 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;
        }
    }
 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();
 }
    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)
\t\t{
\t\t\treturn sURL+'?'+sContext;
\t\t}\t\t\t\t
\t\treturn sURL+'&'+sContext;
\t}
\treturn sURL;
}
EOF
);
    }