Example #1
1
 /**
  * This function creates a HTML-block for a menu item.
  *
  * @access public
  * @author arnold:tserepov <*****@*****.**>
  * @param MenuElement $parameters['menuElement']
  *        	the menu element
  * @param string $parameters['type']
  *        	the type
  * @see MenuElement::$type
  * @uses MENU_COMMON for the common menu
  * @uses MENU_OUTER for the menu of outer links
  * @uses MENU_INNER for the menu of inner links
  */
 public static function buildMenuElement($parameters)
 {
     require_once 'HTML/Template/IT.php';
     $tpl = new \HTML_Template_IT(ROOT_FOLDER . 'tutshtml');
     $tpl->loadTemplatefile('burnstudio2-template.html');
     switch ($parameters['type']) {
         case MENU_COMMON:
             $tpl->setCurrentBlock('menu-item');
             $tpl->setVariable(array('HREF' => null === $parameters['menuElement']->getHref() ? $parameters['menuElement']->translate(array('property' => 'href', 'isSlug' => true)) : $parameters['menuElement']->getHref(), 'LABEL' => $parameters['menuElement']->translate(array('property' => 'label'))));
             $tpl->parse('menu-item');
             // echo ' 38: ', $tpl->get('menu-item');
             return $tpl->get('menu-item');
             break;
         case MENU_OUTER:
             $tpl->setCurrentBlock('outer-link');
             $tpl->setVariable(array('HREF-OF-OUTER-LINK' => null === $parameters['menuElement']->getHref() ? $parameters['menuElement']->translate(array('property' => 'href', 'isSlug' => true)) : $parameters['menuElement']->getHref(), 'LABEL-OF-OUTER-LINK' => $parameters['menuElement']->translate(array('property' => 'label'))));
             $tpl->parse('outer-link');
             return $tpl->get('outer-link');
             break;
         case MENU_INNER:
             $parameters['menuElement']->setAttributes();
             if ($parameters['menuElement']->isActive()) {
                 $tpl->touchBlock('current');
             }
             $tpl->setCurrentBlock('inner-link');
             $tpl->setVariable(array('HREF-OF-INNER-LINK' => '' === $parameters['menuElement']->getHref() ? $parameters['menuElement']->translate(array('property' => 'href', 'isSlug' => true)) : $parameters['menuElement']->getHref(), 'LABEL-OF-INNER-LINK' => $parameters['menuElement']->translate(array('property' => 'label'))));
             $tpl->parse('inner-link');
             return $tpl->get('inner-link');
             break;
         default:
             exit("What type?");
     }
 }
Example #2
0
 /**
  * This function creates a HTML-block for a menu item.
  *
  * @access public
  * @param MenuElement $parameters['menuElement']
  *        	the menu element
  */
 public static function buildMenuElement($parameters)
 {
     require_once 'HTML/Template/IT.php';
     $tpl = new \HTML_Template_IT(ROOT_FOLDER . 'html');
     $tpl->loadTemplatefile('from-design-to-web-template.html');
     switch ($parameters['type']) {
         case MENU_COMMON:
             $tpl->setCurrentBlock('menu-item');
             $tpl->setVariable(array('HREF' => $parameters['menuElement']->getHref(), 'LABEL' => $parameters['menuElement']->getLabel()));
             $tpl->parse('menu-item');
             return $tpl->get('menu-item');
             break;
             // /
         // /
         case MENU_OUTER:
             $tpl->setCurrentBlock('outer-link');
             $tpl->setVariable(array('HREF' => $parameters['menuElement']->getHref(), 'LABEL' => $parameters['menuElement']->getLabel()));
             $tpl->parse('outer-link');
             return $tpl->get('outer-link');
             break;
             // /
         // /
         case MENU_INNER:
             $tpl->setCurrentBlock('inner-link');
             $tpl->setVariable(array('HREF' => $parameters['menuElement']->getHref(), 'LABEL' => $parameters['menuElement']->getLabel()));
             $tpl->parse('inner-link');
             return $tpl->get('inner-link');
             break;
         default:
             exit("What type?");
     }
 }
Example #3
0
 /**
  * This function creates a HTML-block for a menu item.
  *
  * @access public
  * @author k
  * @param MenuElement $parameters['menuElement']
  *        	the menu element
  * @param string $parameters['type']
  *        	the type
  * @see MenuElement::$type
  * @uses Error for error handling
  * @uses ErrorView for error handling
  * @uses MENU_COMMON for the common menu
  * @uses MENU_SIDE for the menu in sidebar
  */
 public static function buildMenuElement($parameters)
 {
     require_once 'HTML/Template/IT.php';
     $tpl = new \HTML_Template_IT(ROOT_FOLDER . 'html');
     $tpl->loadTemplatefile('particle-template.html');
     switch ($parameters['type']) {
         case MENU_COMMON:
             $tpl->setCurrentBlock('item-in-common-menu');
             $tpl->setVariable(array('HREF-OF-ITEM-IN-COMMON-MENU' => null === $parameters['menuElement']->getHref() ? $parameters['menuElement']->translate(array('property' => 'href', 'isSlug' => true)) : $parameters['menuElement']->getHref(), 'LABEL-OF-ITEM-IN-COMMON-MENU' => $parameters['menuElement']->translate(array('property' => 'label'))));
             $tpl->parse('item-in-common-menu');
             // echo ' 38: ', $tpl->get('menu-item');
             return $tpl->get('item-in-common-menu');
             break;
         case MENU_SIDE:
             $tpl->setCurrentBlock('item-in-menu-in-sidebar');
             $tpl->setVariable(array('HREF-OF-ITEM-IN-MENU-IN-SIDEBAR' => null === $parameters['menuElement']->getHref() ? $parameters['menuElement']->translate(array('property' => 'href', 'isSlug' => true)) : $parameters['menuElement']->getHref(), 'LABEL-OF-ITEM-IN-MENU-IN-SIDEBAR' => $parameters['menuElement']->translate(array('property' => 'label'))));
             $tpl->parse('item-in-menu-in-sidebar');
             return $tpl->get('item-in-menu-in-sidebar');
             break;
         default:
             require_once dirname(__FILE__) . '/Error.php';
             $error = new Error();
             $error->setMessage(\pstk\String::translate('errorWhichMenu'));
             require_once dirname(__FILE__) . '/ErrorView.php';
             ErrorView::raiseError($error);
     }
 }
Example #4
0
function parseFooter()
{
    global $_PATHS;
    $objTpl = new HTML_Template_IT($_PATHS['templates']);
    $objTpl->loadTemplatefile("footer.tpl.htm", false, false);
    return $objTpl->get();
}
Example #5
0
 /**
  * This function builds the main structure in HTML.
  *
  * @access public
  * @author kalmer:piiskop <*****@*****.**>
  * @param string $parameters['address']
  *        	the address
  * @param string $parameters['blogDate']
  *        	the date of the blog
  * @param string $parameters['blogEntry']
  *        	the blog entry
  * @param Human $parameters['designer']
  *        	the designer
  * @param string $parameters['menu']
  *        	the body
  * @param string $parameters['phoneNumber']
  *        	the phone number
  * @param string $parameters['title']
  *        	the title
  * @param string $parameters['twitter']
  *        	the Twitter-time
  * @return string the parsed HTML-structure
  * @uses BEGINNING_OF_URL for links
  * @uses \pstk\ErrorView for displaying error messages
  * @uses MENU_COMMON for the common menu
  * @uses MENU_SIDE for the menu in sidebar
  */
 public static function buildView($parameters)
 {
     require_once 'HTML/Template/IT.php';
     require_once dirname(__FILE__) . '/../php/ErrorView.php';
     \PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array(new \pstk\ErrorView(), 'raiseError'));
     $tpl = new \HTML_Template_IT(ROOT_FOLDER . 'html');
     $tpl->loadTemplatefile('particle-template.html');
     if (isset($parameters['menus'])) {
         if (isset($parameters['menus'][MENU_COMMON])) {
             $tpl->setCurrentBlock('common-menu');
             $tpl->setVariable(array('COMMON-MENU' => $parameters['menus'][MENU_COMMON]));
             $tpl->parse('common-menu');
         }
         if (isset($parameters['menus'][MENU_SIDE])) {
             $tpl->setCurrentBlock('menu-in-sidebar');
             $tpl->setVariable(array('MENU-IN-SIDEBAR' => $parameters['menus'][MENU_SIDE]));
             $tpl->parse('menu-in-sidebar');
         }
     }
     if (isset($parameters['posts'])) {
         $tpl->setCurrentBlock('posts');
         $tpl->setVariable(array('POSTS' => $parameters['posts']));
         $tpl->parse('posts');
     }
     require_once dirname(__FILE__) . '/Model.php';
     $model = new Model();
     $model->setComplete();
     require_once dirname(__FILE__) . '/../php/CssView.php';
     $tpl->setCurrentBlock('html');
     $tpl->setVariable(array('ACTION' => '', 'BEGINNING-OF-URL' => BEGINNING_OF_URL, 'FOLLOW-ME' => $model->translate(array('property' => 'followMe')), 'HEADING' => $parameters['title'], 'OLDER-POSTS' => $model->translate(array('property' => 'olderPosts')), 'NEWER-POSTS' => $model->translate(array('property' => 'newerPosts')), 'SEARCH' => \pstk\String::translate('search'), 'SUBSCRIBE' => $model->translate(array('property' => 'subscribe')), 'STYLE' => \pstk\CssView::buildCss(array('fileName' => 'particle-template')), 'TITLE' => mb_strtoupper($parameters['title'], 'UTF-8')));
     $tpl->parse('html');
     return $tpl->get('html');
 }
Example #6
0
function send_confirmation($user_name, $email)
{
    // Create a new template, and specify that the template files are
    // in the same directory as the as the php files.
    $template = new HTML_Template_IT("./templates");
    // Load the email template file
    $template->loadTemplatefile("confirmemail.tpl", true, true);
    $template->setVariable("USERNAME", $user_name);
    $template->setVariable("EMAIL", $email);
    $to = $email;
    // Setup the headers.
    $headers["From"] = "*****@*****.**";
    $headers["Subject"] = "Fitness Log Confirmation Email";
    $headers["X-Sender"] = "*****@*****.**";
    $headers["X-Mailer"] = "PHP";
    $headers["Return-Path"] = "*****@*****.**";
    $headers["To"] = $email;
    $body = $template->get();
    $host = "mail.vanhlebarsoftware.com";
    $mail_user = "******";
    $password = "******";
    $smtp = Mail::factory('smtp', array('host' => $host, 'auth' => true, 'username' => $mail_user, 'password' => $password));
    $mail = $smtp->send($to, $headers, $body);
    if (PEAR::isError($mail)) {
        echo "<p>" . $mail->getMessage() . "</p>";
    }
}
Example #7
0
 function buildPersonView($parameters)
 {
     require_once 'HTML/Template/IT.php';
     $tpl = new \HTML_Template_IT(dirname(__FILE__) . '/');
     $tpl->loadTemplatefile('persons.html');
     $tpl->parse('persons');
     return $tpl->get('persons');
 }
Example #8
0
 /**
  * This function builds the header.
  * 
  * @access public
  * @author kalmer
  * @return string
  */
 public static function buildHeader()
 {
     require_once 'HTML/Template/IT.php';
     $tpl = new \HTML_Template_IT(dirname(__FILE__) . '/../html');
     $tpl->loadTemplatefile('header.html');
     $tpl->touchBlock('header');
     $tpl->parse('header');
     return $tpl->get('header');
 }
Example #9
0
 /**
  * This function creates a HTML-block for a logo.
  *
  * @access public
  * @param Logo $parameters['logo']
  *        	the logo
  * @uses BEGINNING_OF_URL the beginning of the URL
  */
 public static function buildLogo($parameters)
 {
     require_once 'HTML/Template/IT.php';
     $tpl = new \HTML_Template_IT(ROOT_FOLDER . 'html');
     $tpl->loadTemplatefile('psdtohtml-template.html');
     $tpl->setCurrentBlock('logo');
     $tpl->setVariable(array('ALT-OF-LOGO' => $parameters['logo']->getAlt(), 'BEGINNING-OF-URL' => BEGINNING_OF_URL, 'SRC-OF-LOGO' => $parameters['logo']->getSrc(), 'SIZES-OF-LOGO' => $parameters['logo']->getSizes()));
     $tpl->parse('logo');
     return $tpl->get('logo');
 }
Example #10
0
 public static function vastus($parameters)
 {
     require_once 'C:/wamp/bin/php/php5.4.12/Template/IT.php';
     $tpl = new \HTML_Template_IT(dirname(__FILE__));
     $tpl->loadTemplatefile('final.html');
     $tpl->setCurrentBlock('html');
     $tpl->setVariable(array('VASTUS' => $parameters['vastus']));
     $tpl->parse('html');
     return $tpl->get('html');
 }
Example #11
0
 /**
  * This function raises the error as a callback function for views.
  *
  * @access public
  * @author Kalmer Piiskop <*****@*****.**>
  * @param object $errorFromOutside
  *        	the error object
  */
 public static function raiseError($errorFromOutside)
 {
     require_once 'HTML/Template/IT.php';
     $template = new \HTML_Template_IT(ROOT_FOLDER . '../html');
     $template->loadTemplateFile('errors.html');
     $template->setCurrentBlock('html');
     $template->setVariable(array('TITLE-OF-ERROR' => \pstk\String::translate('titleOfError'), 'MESSAGE' => $errorFromOutside->getMessage(), 'DEBUG-INFO' => $errorFromOutside->getDebugInfo()));
     $template->parse('html');
     exit($template->get('html'));
 }
function parsePage($intElmntId, $strCommand)
{
    global $_PATHS, $_CONF, $objLang, $objLiveAdmin;
    $objTpl = new HTML_Template_IT($_PATHS['templates']);
    $objTpl->loadTemplatefile("noaccount.tpl.htm");
    $objTpl->setVariable("CLIENT_NAME", $objLang->get("invalidAccount", "login"));
    $objTpl->setVariable("POWERED_BY", $objLang->get("poweredBy", "label"));
    $objTpl->setVariable("MESSAGE", $objLang->get("noAccount", "alert"));
    return $objTpl->get();
}
Example #13
0
 /**
  * This function builds the Calculator
  * @access public
  * @author Eleri<*****@*****.**>
  * @param number $result tulemus(result)
  * @param number $first esimene kasutaja poolt sisestatud muutuja
  * @param number $second teine kasutaja poolt sisestatud muutuja
  */
 public static function build($result, $first, $second)
 {
     require_once 'HTML/Template/IT.php';
     $variable = new \HTML_Template_IT(ROOT_FOLDER);
     $variable->loadTemplateFile('tunnis.html');
     $variable->setCurrentBlock('html');
     $variable->setVariable(array('SAMP' => $result, 'FIRST-VALUE' => $first, 'SECOND-VALUE' => $second, 'BEGINNING-OF-URL' => BEGINNING_OF_URL));
     $variable->parse('html');
     echo $variable->get('html');
 }
Example #14
0
 public static function buildMenuView($parameters)
 {
     require_once 'HTML/Template/IT.php';
     $tpl = new \HTML_Template_IT("./html");
     $tpl->loadTemplatefile('burnstudio-copy.html');
     $tpl->setCurrentBlock('menu-item');
     $tpl->setVariable(array('HREF' => $parameters[0]['object']->getHref(), 'LABEL' => $parameters[0]['object']->getLabel()));
     $tpl->parse('menu-item');
     return $tpl->get('menu-item');
 }
Example #15
0
 /**
  * this function builds the page
  *
  * @access public
  * @author tambet
  * @param string $prameters['title']
  *        	shows-title
  * @param string $prameters['body']
  *        	shows-body
  */
 public static function buildPage($prameters)
 {
     require_once 'HTML/Template/IT.php';
     $tpl = new \HTML_Template_IT(dirname(__FILE__) . '/');
     $tpl->loadTemplatefile('page.html');
     $tpl->setCurrentBlock('page');
     $tpl->setVariable(array('TITLE' => $prameters['title'], 'BODY' => $prameters['body']));
     $tpl->parse('page');
     return $tpl->get('page');
 }
Example #16
0
 /**
  * This function builds the main structure in HTML.
  *
  * @access public
  * @author arnold:tserepov <*****@*****.**>
  * @param string $parameters['body']
  *        	the body
  * @param string $parameters['title']
  *        	the title
  * @return string the parsed HTML-structure
  * @uses BEGINNING_OF_URL for links
  */
 public static function buildView($parameters)
 {
     require_once 'HTML/Template/IT.php';
     $tpl = new \HTML_Template_IT(ROOT_FOLDER . 'html');
     $tpl->loadTemplatefile('objects.html');
     $tpl->setCurrentBlock('html');
     $tpl->setVariable(array('BEGINNING-OF-URL' => BEGINNING_OF_URL, 'BODY' => $parameters['body'], 'TITLE' => $parameters['title']));
     $tpl->parse('html');
     return $tpl->get('html');
 }
Example #17
0
 /**
  * This function builds the main structure in HTML.
  *
  * @access public
  * @param string $parameters['title'] the title
  * @return string the parsed HTML-structure
  * @uses ROOT_FOLDER for the path to the HTML-template file
  */
 public static function buildView($parameters)
 {
     require_once 'HTML/Template/IT.php';
     $tpl = new \HTML_Template_IT(ROOT_FOLDER);
     $tpl->loadTemplatefile('students-template.html');
     $tpl->setCurrentBlock('html');
     $tpl->setVariable(array('TITLE' => $parameters['title'], 'STUDENT-CLASS' => $parameters['student-class'], 'NO-STUDENT' => $parameters['no-student'], 'STEPS' => $parameters['steps'], 'STYLE' => \students\PupilView::buildCss(), 'JS' => \students\PupilView::buildJs(array($parameters['guess']))));
     $tpl->parse('html');
     return $tpl->get('html');
 }
Example #18
0
 public static function buildOrderPerson($parameters)
 {
     require_once 'HTML/Template/IT.php';
     $tpl = new \HTML_Template_IT(ROOT_FOLDER . "html");
     $tpl->loadTemplatefile('orderpersons.html');
     $tpl->setCurrentBlock('order-person');
     $tpl->setVariable(array('FIRST-NAME' => $parameters["orderPerson"]->getFirstName(), 'LAST-NAME' => $parameters["orderPerson"]->getLastName(), 'EMAIL' => $parameters["orderPerson"]->getEmail(), 'ADDRESS' => $parameters["orderPerson"]->getAddress()));
     $tpl->parse('order-person');
     return $tpl->get('order-person');
 }
Example #19
0
 /**
  * This function builds the main view.
  * 
  * @access public
  * @param string $parameters['css']
  *        the CSS-part
  * @param string $parameters['js']
  *        the JS-part
  * @param string $parameters['name']
  *        the current name searched
  * @param string $parameters['target']
  *        the target in the URL
  * @return string the parsed block
  * @uses Configuration for the folder of the template
  */
 public static function buildView($parameters)
 {
     require_once 'HTML/Template/IT.php';
     $template = new \HTML_Template_IT(Configuration::ROOT_FOLDER);
     $template->loadTemplateFile('pupils.html');
     $template->setCurrentBlock('html');
     $template->setVariable(array('NAME' => $parameters['name'], 'STYLE' => $parameters['css'], 'SCRIPT' => $parameters['js'], 'TARGET' => $parameters['target']));
     $template->parse('html');
     return $template->get('html');
 }
Example #20
0
 /**
  * This function creates a HTML-block for a menu item.
  *
  * @access public
  * @author kalmer:piiskop <*****@*****.**>
  * @param MenuElement $parameters['menuElement']
  *        	the menu element
  */
 public static function buildMenuElement($parameters)
 {
     require_once 'HTML/Template/IT.php';
     $tpl = new \HTML_Template_IT(ROOT_FOLDER . 'html');
     $tpl->loadTemplatefile('from-design-to-web-template.html');
     $tpl->setCurrentBlock('menu-item');
     $tpl->setVariable(array('HREF' => $parameters['menuElement']->getHref(), 'LABEL' => $parameters['menuElement']->getLabel()));
     $tpl->parse('menu-item');
     return $tpl->get('menu-item');
 }
Example #21
0
 /**
  * This function builds the CSS-part.
  *
  * @access public
  * @author kalmer:piiskop <*****@*****.**>
  * @param string $parameters['fileName'] the name of the CSS-file
  * @return string the CSS-part
  * @uses BEGINNING_OF_URL for image paths
  * @uses ROOT_FOLDER for the path to the CSS-template folder
  */
 public static function buildCss($parameters)
 {
     require_once 'HTML/Template/IT.php';
     $tpl = new \HTML_Template_IT(ROOT_FOLDER . 'css');
     $tpl->loadTemplatefile($parameters['fileName'] . '.css');
     $tpl->setCurrentBlock('css');
     $tpl->setVariable(array('BEGINNING-OF-URL' => BEGINNING_OF_URL));
     $tpl->parse('css');
     return $tpl->get('css');
 }
Example #22
0
 public static function buildFamilyView($parameters)
 {
     require_once 'HTML/Template/IT.php';
     $tpl = new \HTML_Template_IT(dirname(__FILE__) . '/../html');
     $tpl->loadTemplatefile('familys.html');
     require_once dirname(__FILE__) . '/KaladeView.php';
     $tpl->setCurrentBlock('family');
     $tpl->setVariable(array('NAME' => $parameters['family']->getName(), 'BEGINING-OF-URL-FAMILY' => BEGINING_OF_URL));
     $tpl->parse('family');
     return $tpl->get('family');
 }
Example #23
0
 /**
  * This function creates a HTML-block for a post item.
  *
  * @access public
  * @author kalmer:piiskop <*****@*****.**>
  * @param Service $parameters['post']
  *        	the post
  * @return string the parsed post
  * @uses BEGINNING_OF_URL for links
  */
 public static function buildPost($parameters)
 {
     require_once 'HTML/Template/IT.php';
     $tpl = new \HTML_Template_IT(ROOT_FOLDER . 'html');
     $tpl->loadTemplatefile('particle-template.html');
     $tpl->setCurrentBlock('post-item');
     $date = strtotime($parameters['post']->getDate());
     $tpl->setVariable(array('BEGINNING-OF-URL' => BEGINNING_OF_URL, 'DATE-OF-POST' => date('d', $date), 'MONTH-OF-POST' => date('M', $date), 'HREF-TO-COMMENTS' => \pstk\String::translate('comments'), 'HREF-TO-POST' => $parameters['post']->translate(array('property' => 'heading', 'isSlug' => true)), 'LABEL-OF-POST' => $parameters['post']->translate(array('property' => 'heading')), 'LEAD-OF-POST' => $parameters['post']->translate(array('property' => 'lead')), 'NUMBER-OF-COMMENTS' => count($parameters['post']->getComments())));
     $tpl->parse('post-item');
     return $tpl->get('post-item');
 }
Example #24
0
 /**
  * This function creates a HTML-block for a service item.
  */
 public static function buildService($parameters)
 {
     require_once 'HTML/Template/IT.php';
     $tpl = new \HTML_Template_IT(ROOT_FOLDER . 'html');
     $tpl->loadTemplatefile('from-design-to-web-template.html');
     $src = $parameters['service']->getSrc();
     $info = getimagesize(sprintf('%1$sImages/%2$s', ROOT_FOLDER, $src));
     $tpl->setCurrentBlock('service');
     $tpl->setVariable(array('ALT-IN-SERVICE' => $parameters['service']->getAlt(), 'SRC-IN-SERVICE' => $src, 'SIZES-IN-SERVICE' => $info[3], 'BEGINNING-OF-URL' => BEGINNING_OF_URL, 'HEADING-OF-SERVICE' => $parameters['service']->getHeading(), 'HREF-IN-SERVICE' => $parameters['service']->getHref(), 'LEAD-OF-SERVICE' => $parameters['service']->getLead()));
     $tpl->parse('service');
     return $tpl->get('service');
 }
Example #25
0
 /**
  * This function builds a judge.
  * 
  * @access public
  * @author kalmer
  * @param multitype:Judge[string] $parameters['judge'] the judges
  * @return string
  */
 public static function buildJudge($parameters)
 {
     require_once 'HTML/Template/IT.php';
     $tpl = new \HTML_Template_IT(dirname(__FILE__) . '/../html');
     $tpl->loadTemplatefile('judges.html');
     require_once dirname(__FILE__) . '/JudgeView.php';
     $image = $parameters['judge']->makeImage();
     $tpl->setCurrentBlock('judge');
     $tpl->setVariable(array('EMAIL-ADDRESS' => $parameters['judge']->getEmailAddress(), 'FIRST-NAME' => $parameters['judge']->getFirstName(), 'LAST-NAME' => $parameters['judge']->getLastName(), 'PHONE-NUMBER' => $parameters['judge']->getPhoneNumber(), 'IMAGE' => $image['src'], 'WIDTH' => $image['width'], 'HEIGHT' => $image['height']));
     $tpl->parse('judge');
     return $tpl->get('judge');
 }
Example #26
0
function GetAskLoginPage()
{
    global $lastLoginResult;
    $tpl = new HTML_Template_IT("./");
    $tpl->loadTemplatefile("ask_login.tpl.html", true, true);
    $msg = "";
    if ($lastLoginResult != LLR_NOT_LOGGED_IN) {
        $msg = LastLoginResultMessage();
    }
    $tpl->setVariable("MESSAGE", $msg);
    // print the output
    return $tpl->get();
}
Example #27
0
 /**
  * This function creates a HTML-block for a logo.
  *
  * @access public
  *@author arnold:tserepov <*****@*****.**>
  * @param Logo $parameters['logo']
  *        	the logo
  * @uses BEGINNING_OF_URL the beginning of the URL
  */
 public static function buildLogo($parameters)
 {
     require_once dirname(__FILE__) . '/ErrorView.php';
     ///////////////////////
     \PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array(new ErrorView(), 'raiseError'));
     require_once 'HTML/Template/IT.php';
     $tpl = new \HTML_Template_IT(ROOT_FOLDER . 'tutshtml');
     $tpl->loadTemplatefile('burnstudio2-template.html');
     $tpl->setCurrentBlock('logo');
     $tpl->setVariable(array('ALT-OF-LOGO' => $parameters['logo']->getAlt(), 'BEGINNING-OF-URL' => BEGINNING_OF_URL, 'SRC-OF-LOGO' => $parameters['logo']->getSrc(), 'SIZES-OF-LOGO' => $parameters['logo']->getSizes()));
     $tpl->parse('logo');
     return $tpl->get('logo');
 }
Example #28
0
 /**
  * this function builds the page
  * @access public
  * @author Ergo
  * @param string $parameters['title'] shows title
  * @param string $parameters['body'] shows body
  */
 public static function buildPage($parameters)
 {
     //See jutt on kopeeritav ja samasugune
     require_once 'HTML/Template/IT.php';
     //ise tuleb kataloogi aadress paika panna
     $tpl = new \HTML_Template_IT(dirname(__FILE__) . '/../html');
     //siia tuleb fail millesse teeb -
     $tpl->loadTemplatefile('page.html');
     $tpl->setCurrentBlock('page');
     $tpl->setVariable(array('TITLE' => $parameters['title'], 'BODY' => $parameters['body']));
     $tpl->parse('page');
     return $tpl->get('page');
 }
Example #29
0
 /**
  * This function creates a HTML-block for a service item.
  *
  * @access public
  * @author kalmer:piiskop <*****@*****.**>
  * @param Service $parameters['service']
  *        	the service
  */
 public static function buildService($parameters)
 {
     require_once 'HTML/Template/IT.php';
     $tpl = new \HTML_Template_IT(ROOT_FOLDER . 'html');
     $tpl->loadTemplatefile('from-design-to-web-template.html');
     $src = $parameters['service']->translate(array('property' => 'src'));
     // @formatter:off
     $info = getimagesize(sprintf('%1$simages/%2$s', ROOT_FOLDER, $src));
     // @formatter:on
     $tpl->setCurrentBlock('service');
     $tpl->setVariable(array('ALT-IN-SERVICE' => $parameters['service']->translate(array('property' => 'alt')), 'SRC-IN-SERVICE' => $src, 'SIZES-IN-SERVICE' => $info[3], 'BEGINNING-OF-URL' => BEGINNING_OF_URL, 'HEADING-OF-SERVICE' => $parameters['service']->translate(array('property' => 'heading')), 'HREF-IN-SERVICE' => $parameters['service']->translate(array('property' => 'href')), 'LEAD-OF-SERVICE' => $parameters['service']->translate(array('property' => 'lead'))));
     $tpl->parse('service');
     return $tpl->get('service');
 }
Example #30
0
 /**
  * @ access public
  * author Ergo
  * @param int|string:Family: $parameters
  */
 public static function buildFamilyView($parameters)
 {
     //See jutt on kopeeritav ja samasugune
     require_once 'HTML/Template/IT.php';
     //ise tuleb kataloogi aadress paika panna
     $tpl = new \HTML_Template_IT(dirname(__FILE__) . '/../html');
     //siia tuleb fail millesse teeb
     $tpl->loadTemplatefile('familys.html');
     require_once dirname(__FILE__) . '/FamilyView.php';
     $tpl->setCurrentBlock('family');
     $tpl->setVariable(array('NAME' => $parameters['family']->getName(), 'BEGINING-OF-URL-FAMILY' => BEGINING_OF_URL));
     $tpl->parse('family');
     return $tpl->get('family');
 }