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


PHP TemplatePower::printToScreen方法代码示例

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


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

示例1: TemplatePower

<?php

// inladen van footer.html
$footer = new TemplatePower("template/files/footer.tpl");
$footer->prepare();
// Op het einde van de code zorg ik ervoor dat alles uit word geprint
$header->printToScreen();
$errors->printToScreen();
$content->printToScreen();
$footer->printToScreen();
开发者ID:Randellrc,项目名称:Portfolio-website,代码行数:10,代码来源:footer.php

示例2: foreach

            }
            $tpl->gotoBlock("_ROOT");
        }
    } else {
        $estados = $objestados->listaEstados();
        foreach ($estados as $estado) {
            $tpl->newBlock("estado");
            $tpl->assign("id", $estado['id']);
            $tpl->assign("nombre", $estado['nombre']);
            $tpl->gotoBlock("_ROOT");
        }
    }
} else {
    //Nuevo
    $estados = $objestados->listaEstados();
    foreach ($estados as $estado) {
        $tpl->newBlock("estado");
        $tpl->assign("id", $estado['id']);
        $tpl->assign("nombre", $estado['nombre']);
        $tpl->gotoBlock("_ROOT");
    }
    $lista_eventos = $objeventos->listaEventos();
    foreach ($lista_eventos as $evento) {
        $tpl->newBlock("eventos");
        $tpl->assign("nombre", $evento['nombre']);
        $tpl->assign("id", $evento['id']);
        $tpl->gotoBlock("_ROOT");
    }
}
$tpl->printToScreen();
开发者ID:huicochea,项目名称:ciclodeideas,代码行数:30,代码来源:formCodigos.php

示例3: TemplatePower

//Function: code for converting the chart data and seeding the html
//Last Modified: 10-02-2016
//By: Arno Inen
//General Modification: debugging
//Requires:
//-TemplatePower
//-Canvas.js
//Includes/requires
include_once 'class.TemplatePower.inc.php';
//Call template engine
$template_url = "./templates/";
$template = new TemplatePower($template_url . "chart.html");
$template->prepare();
//Functions
////Main Code
$json = file_get_contents('http://www.mixtup.nl/dev/techradar/data.json');
$data_array = json_decode($json);
$counter = 0;
//var_dump($data_array);
$totalObjects = count($data_array);
while ($counter < $totalObjects - 1) {
    $template->newBlock("data_row");
    $template->assign("date", $data_array[$counter]->{'x'});
    $template->assign("ycoord", $data_array[$counter]->{'y'});
    $counter++;
}
$template->gotoBlock("_ROOT");
$template->assign("finaldate", $data_array[$counter]->{'x'});
$template->assign("finalycoord", $data_array[$counter]->{'y'});
$template->printToScreen();
开发者ID:Welck,项目名称:techradar,代码行数:30,代码来源:chartdata.php

示例4: TemplatePower

<?php

require_once 'config.inc.php';
$tpl_main = new TemplatePower('template/master.html');
$tpl_main->prepare();
// see if the login form was submitted
if (isset($_POST['login'])) {
    $user = stripslashes($_POST['username']);
    $pass = stripslashes($_POST['password']);
    $goto = $_POST['redirect'];
    if ($_AUTH->login($user, $pass)) {
        include_once $goto;
        die;
    } else {
        $tpl = new TemplatePower('template/error.html');
        $tpl->assignGlobal('error_message', 'Invalid username / password.' . $user);
    }
    // display the default login form
} else {
    $tpl = new TemplatePower('template/login.html');
    $tpl->assignGlobal('redirect', $_GET['redirect']);
}
$tpl->prepare();
$tpl->showUnAssigned(false);
$tpl_main->assign('content', $tpl->getOutputContent());
$tpl_main->showUnAssigned(false);
$tpl_main->printToScreen();
开发者ID:alecbenson,项目名称:TurnoutWeb-Patches,代码行数:27,代码来源:login.php

示例5:

            $tplIndex->newBlock("menu_principal_link");
            break;
        case 'recuperar_clave':
            include_once 'recuperar_clave.php';
            break;
        case 'casos':
            include_once 'casos.php';
            $tplIndex->newBlock("menu_principal_link");
            break;
        case 'nuevo_usuario':
            include_once 'nuevo_usuario.php';
            $tplIndex->newBlock("menu_principal_link");
            break;
        default:
            if ($_SESSION['logueado'] == 1) {
                include_once 'principal.php';
                $class_inferior = "center";
            } else {
                include_once 'login.php';
            }
            break;
    }
    $tplIndex->gotoBlock(TP_ROOTBLOCK);
    $tplIndex->assign("menu_inferior_class", $class_inferior);
    if ($_SESSION['logueado'] == 1) {
        $tplIndex->newBlock("log_out");
    }
}
//imprimimos por pantalla
$tplIndex->printToScreen();
开发者ID:aremis1984,项目名称:gicorec,代码行数:30,代码来源:index.php

示例6: searchText

function searchText($searchText)
{
    global $_SESSION;
    global $RBAC;
    $curAuthSource = $_SESSION['CURRENT_AUTH_SOURCE'];
    $dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME);
    $tpl = new TemplatePower(PATH_TPL . 'authListUsers.html');
    $tpl->prepare();
    $tpl->assign("STYLE_CSS", defined('STYLE_CSS') ? STYLE_CSS : 'simple');
    $tpl->assign("title", 'Search Results');
    //authentication source
    G::LoadClassRBAC('authentication');
    $obj = new authenticationSource();
    $obj->SetTo($dbc);
    $data = $obj->searchUsers($curAuthSource, $searchText);
    if ($data['codError'] == 0 && isset($data['rows']) && !is_array($data['rows'])) {
        $tpl->newBlock("empty-rows");
        $tpl->assign("title", 'Search Results');
        $tpl->assign("empty-rows-text", 'no records found');
        $tpl->printToScreen();
        die;
    }
    if ($data['codError'] != 0) {
        $tpl->newBlock("error");
        $tpl->assign("title", 'Log Error');
        $tpl->assign("text", "<font color='Red'>" . $data['rows'] . "</font>");
        $tpl->printToScreen();
        die;
    }
    //build the options to create...an user, list the applications and their roles..
    $ses = new DBSession($dbc);
    $ses2 = new DBSession($dbc);
    $dset = $ses->execute("SELECT * from APPLICATION where APP_CODE != 'RBAC' ");
    $appRow = $dset->Read();
    $checkboxs = "<br><input type='checkbox' @@disabled name='C-@@Y' id='C-@@Y' onclick='emptyDropdowns( \"@@X\");' ><input type='hidden' name='H-@@Y' id='H-@@Y' value='@@X' ><input type='hidden' name='E-@@Y' id='E-@@Y' value='' >";
    $inputs = "<div id='D-@@Y'>@@validuser</div><input type='text'  name='T-@@Y' id='T-@@Y' value=\"@@Z\" onchange='verifyUserName ( this, \"@@Y\" );' size='14' maxlength='16'>&nbsp;";
    $options = "<table cellpadding='0' cellspacing='0'><tr>";
    $options .= "";
    while (is_array($appRow)) {
        $appid = $appRow['UID'];
        $selectId = 'S-@@Y-' . $appid;
        $dset2 = $ses2->execute('SELECT * from ROLE where ROL_APPLICATION = ' . $appid);
        $rolRow = $dset2->Read();
        $selectEnabled = false;
        if (is_array($rolRow)) {
            $options .= '<td>' . $appRow['APP_CODE'] . '<br>';
            $options .= "<select name='{$selectId}' id='{$selectId}' @@disabled onchange='flipCheckbox(  \"@@Y\");' >\n";
            $options .= "<option value='0'>select a Role</option>";
            $selectEnabled = true;
        }
        while (is_array($rolRow)) {
            $options .= "<option value='" . $rolRow['UID'] . "'>" . $rolRow['ROL_CODE'] . "</option>";
            $rolRow = $dset2->Read();
        }
        if ($selectEnabled) {
            $options .= "</select>\n<td>";
        }
        $appRow = $dset->Read();
    }
    $options .= '</tr></table>';
    $i = 0;
    if (isset($data['rows'])) {
        foreach ($data['rows'] as $row) {
            $tpl->newBlock("users");
            if (++$i % 2 == 0) {
                $tpl->assign("class", 'Row2');
            } else {
                $tpl->assign("class", 'Row1');
            }
            $tpl->assign("index", $i);
            $tpl->assign("dn", $row['dn']);
            $tpl->assign("name", $row['attr']['givenName']);
            $tpl->assign("lastname", $row['attr']['sn']);
            $tpl->assign("fullname", $row['attr']['cn']);
            $tpl->assign("email", $row['attr']['mail']);
            $tpl->assign("uid", $row['attr']['uid']);
            //verificar uid
            $userid = $row['attr']['uid'];
            $res = $RBAC->UserNameRepetido(0, $userid);
            $input = str_replace('@@Z', $userid, str_replace('@@X', $row['dn'], str_replace('@@Y', $i, $inputs)));
            $input = str_replace('@@validuser', $res == 0 ? "<font color='green'>valid user</font>" : "<font color='red'>user already used</font>", $input);
            $checkbox = str_replace('@@X', $row['dn'], str_replace('@@Y', $i, $checkboxs));
            $checkbox = str_replace('@@disabled', $res != 0 ? 'disabled' : '', $checkbox);
            $option = str_replace('@@X', $row['dn'], str_replace('@@Y', $i, $options));
            //    $option   = str_replace ( '@@disabled', ( $res <> 0 ? 'disabled' : ''), $option );
            $tpl->assign("checkbox", $checkbox);
            $tpl->assign("input", $input);
            $tpl->assign("options", $option);
        }
    }
    $tpl->gotoBlock("_ROOT");
    $tpl->newBlock("start-users");
    $tpl->assign("dummy", 'dummy');
    $tpl->gotoBlock("_ROOT");
    $tpl->newBlock("end-users");
    $tpl->assign("dummy", 'dummy');
    $tpl->printToScreen();
}
开发者ID:emildev35,项目名称:processmaker,代码行数:98,代码来源:authAjax.php

示例7: TemplatePower

<? 
require "./clases/TemplatePower.inc.php"; 
$t = new TemplatePower("plantillas/cat_productos.tpl"); 
$t->prepare(); 
//Asignamos el valor “Material de cocina a la variable nombrecategoria en //el template
$t->assign(array(nombrecategoria => 'Material de cocina'));
//Preparamos la parte de productos 
 $nombreproducto=array("sarten","sarten","horno");
 $idproducto=range(0,3);
 $descripcionproducto=array("sarten 22cm","sarten 29cm","horno pirolitico");
	for ($i=0;i<count($nombreproducto);$i++) {
        $t->newBlock("productos");
        $t->assign(array( 
              nombreproducto => $nombreproducto[$i], 
              idproducto => $idproducto[$i], 
              descripcionproducto => $descripcionproducto[$i]
              )); 
	}
$t->printToScreen(); 
?>
开发者ID:JoseVteVento,项目名称:desarrollos_php,代码行数:20,代码来源:template.php


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