Ejemplo n.º 1
0
    public function render($type = 'html', $options = array())
    {
        ob_start();
        switch ($type) {
            case 'pretty_html':
                // header and footer so plain contnet can be rendered nicely.
                $display_mode = get_display_mode();
                // addition - woah! we pass this through to the template module for re-rending again:
                ob_start();
                ?>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>{PAGE_TITLE}</title>
    {FAVICON}
    {AUTOMATIC_STYLES}
    {AUTOMATIC_SCRIPTS}
    <style type="text/css">
        body{
            margin:0;
        }
    </style>
</head>
<body>
<div class="pretty_content_wrap">
    {CONTENT}
</div>
</body>
</html>
                <?php 
                /*$c = $this->replace_content();
                  if(!$this->wysiwyg){
                      //$c = nl2br($c);
                  }
                  echo $c;*/
                module_template::init_template('external_template', ob_get_clean(), 'Used when displaying the external content such as "External Jobs" and "External Invoices" and "External Tickets".', 'code', array('CONTENT' => 'The inner content', 'PAGE_TITLE' => 'in the <title> tag', 'FAVICON' => 'if the theme specifies a favicon it will be here', 'AUTOMATIC_STYLES' => 'system generated stylesheets', 'AUTOMATIC_SCRIPTS' => 'system generated javascripts'));
                ob_start();
                ?>

                <link rel="stylesheet" href="<?php 
                echo _BASE_HREF;
                ?>
css/desktop.css" type="text/css">
                <link rel="stylesheet" href="<?php 
                echo _BASE_HREF;
                ?>
css/print.css" type="text/css" media="print">
                <link rel="stylesheet" href="<?php 
                echo _BASE_HREF;
                ?>
css/styles.css" type="text/css">
                <link type="text/css" href="<?php 
                echo _BASE_HREF;
                ?>
css/smoothness/jquery-ui-1.9.2.custom.min.css" rel="stylesheet" />
                <?php 
                module_config::print_css();
                ?>
 <?php 
                $css = ob_get_clean();
                ob_start();
                ?>

                <script type="text/javascript" src="<?php 
                echo _BASE_HREF;
                ?>
js/jquery-1.8.3.min.js"></script>
                <script type="text/javascript" src="<?php 
                echo _BASE_HREF;
                ?>
js/jquery-ui-1.9.2.custom.min.js"></script>
                <script type="text/javascript" src="<?php 
                echo _BASE_HREF;
                ?>
js/timepicker.js"></script>
                <script type="text/javascript" src="<?php 
                echo _BASE_HREF;
                ?>
js/cookie.js"></script>
                <script type="text/javascript" src="<?php 
                echo _BASE_HREF;
                ?>
js/javascript.js?ver=2"></script>
                <?php 
                module_config::print_js();
                ?>

                <?php 
                $scripts = ob_get_clean();
                $external_template = self::get_template_by_key('external_template');
                $external_template->assign_values(array('CONTENT' => $this->replace_content(), 'PAGE_TITLE' => $this->page_title ? $this->page_title : module_config::s('admin_system_name'), 'FAVICON' => module_theme::get_config('theme_favicon', '') ? '<link rel="icon" href="' . htmlspecialchars(module_theme::get_config('theme_favicon', '')) . '">' : '', 'AUTOMATIC_STYLES' => $css, 'AUTOMATIC_SCRIPTS' => $scripts));
                echo $external_template->render('raw');
                break;
            case 'html':
            default:
                $c = $this->replace_content();
                if ($this->wysiwyg) {
                    //$c = nl2br($c);
                }
                echo $c;
                break;
        }
        return ob_get_clean();
    }
Ejemplo n.º 2
0
        <script type="text/javascript" src="<?php 
        echo _BASE_HREF;
        ?>
js/cookie.js?ver=<?php 
        echo _SCRIPT_VERSION;
        ?>
"></script>
        <script type="text/javascript" src="<?php 
        echo _BASE_HREF;
        ?>
js/javascript.js?ver=<?php 
        echo _SCRIPT_VERSION;
        ?>
"></script>
        <?php 
        module_config::print_js(_SCRIPT_VERSION);
        ?>



        <!--
        Author: David Baker (dtbaker.com.au)
        10/May/2010
        -->
        <script type="text/javascript">
            $(function(){
                // override default button init - since we're using jquery ui here.
                ucm.init_buttons = function(){};
                ucm.init_interface();
                if(typeof ucm.metis != 'undefined'){
                    ucm.metis.init();
Ejemplo n.º 3
0
?>
js/jquery-ui-1.9.2.custom.min.js"></script>
<script type="text/javascript" src="<?php 
echo _BASE_HREF;
?>
js/timepicker.js"></script>
<script type="text/javascript" src="<?php 
echo _BASE_HREF;
?>
js/cookie.js"></script>
<script type="text/javascript" src="<?php 
echo _BASE_HREF;
?>
js/javascript.js?ver=2"></script>
<?php 
module_config::print_js();
?>


<script type="text/javascript">
$(function(){
	init_interface();
});
</script>
</head>
<body bgcolor="#FFF">


<div id="holder" style="background: #FFF">
<div id="page_middle_flex">