• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP TemplatePower类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Main

function Main()
{
    global $TPLV, $bottom, $urls, $db, $migalha;
    $TPLV = new TemplatePower(TEMPLATE_PATH . "modulos/categoria.tpl");
    $TPLV->assignGlobal("uploadPath", UPLOAD_PATH);
    $TPLV->assignGlobal("uploadPath", UPLOAD_PATH_SITE);
    $TPLV->assignGlobal("imagePath", IMAGE_PATH);
    $TPLV->assignGlobal("swfPath", SWF_PATH);
    $TPLV->assignGlobal("localPath", LOCAL_PATH);
    $TPLV->assignGlobal("localPath", LOCAL_PATH_SITE);
    $TPLV->assignGlobal('navBottom', $bottom);
    $TPLV->assignGlobal($urls->var);
    $TPLV->prepare();
    $in = $_GET['in'];
    switch ($in) {
        default:
        case 'lista':
            lista();
            break;
        case 'novo':
            novo();
            break;
        case 'editar':
            editar();
            break;
        case 'salvar':
            salvar();
            break;
        case 'deletar':
            deletar();
            break;
    }
}
开发者ID:rodrigopluz,项目名称:mvc,代码行数:33,代码来源:categoria.php


示例2: Main

function Main()
{
    global $TPLV, $urls, $usuario, $imovel;
    $TPLV = new TemplatePower(TEMPLATE_PATH . "login.tpl");
    $TPLV->assignGlobal("uploadPath", UPLOAD_PATH);
    $TPLV->assignGlobal("imagePath", IMAGE_PATH);
    $TPLV->assignGlobal("swfPath", SWF_PATH);
    $TPLV->assignGlobal("localPath", LOCAL_PATH);
    $TPLV->assignGlobal('navBottom', $bottom);
    $TPLV->assignGlobal($urls->var);
    $TPLV->prepare();
    $in = $_GET['in'];
    switch ($in) {
        //FILTROS DE BUSCAS
        default:
        case 'deletaUsuario':
            deletaUsuario();
            break;
        case 'deletaMidia':
            deletaMidia();
            break;
            //LOGIN E RECUPERA SENHA
        //LOGIN E RECUPERA SENHA
        case 'getLogin':
            getLogin();
            break;
        case 'login':
            login();
            break;
        case 'getSenha':
            getSenha();
            break;
        case 'recuperaSenha':
            recuperaSenha();
            break;
        case 'isLogado':
            if ($usuario->isLogado()) {
                echo 'logado';
            } else {
                echo 'erro';
            }
            break;
            //CADASTRO
        //CADASTRO
        case 'validaEmailCadastro':
            validaEmailCadastro();
            break;
            //LEADS DETALHES
        //LEADS DETALHES
        case 'getCadastro':
            getCadastro();
            break;
        case 'salvarCadastro':
            salvarCadastro();
            break;
        case 'verificaCPF':
            verificaCPF();
            break;
    }
}
开发者ID:rodrigopluz,项目名称:mvc,代码行数:60,代码来源:ajax.php


示例3: Main

function Main()
{
    global $TPLV, $bottom, $db, $migalha, $usuario;
    $TPLV = new TemplatePower(TEMPLATE_PATH . "login.tpl");
    $TPLV->assignGlobal("uploadPath", UPLOAD_PATH);
    $TPLV->assignGlobal("imagePath", IMAGE_PATH);
    $TPLV->assignGlobal("swfPath", SWF_PATH);
    $TPLV->assignGlobal("localPath", LOCAL_PATH);
    $TPLV->assignGlobal('navBottom', $bottom);
    $TPLV->prepare();
    $in = $_GET['in'];
    switch ($in) {
        default:
        case 'restrito':
            if ($usuario->isLogado()) {
                inicio();
            } else {
                restrito();
            }
            break;
        case 'inicio':
            inicio();
            break;
        case 'logout':
            logout();
            break;
    }
}
开发者ID:rodrigopluz,项目名称:mvc,代码行数:28,代码来源:login.php


示例4: registrar

 public function registrar()
 {
     $proteccion = new Proteccion();
     $nombre = $proteccion->html($_POST['nombre']);
     $apellido = $proteccion->html($_POST['apellido']);
     $sexo = $proteccion->html($_POST['sexo']);
     $fecha_nacimiento = $proteccion->html($_POST['fecha_nacimiento']);
     $direccion = $proteccion->html($_POST['direccion']);
     $email = $proteccion->html($_POST['email']);
     $dni = $proteccion->html($_POST['dni']);
     $pass = $proteccion->html($_POST['password']);
     $persona = new Usuario($email, $pass);
     $existe = $persona->existe();
     if ($existe) {
         $tp = new TemplatePower("templates/registro.html");
         $tp->prepare();
         $tp->gotoBlock("_ROOT");
         $tp->newblock("no_registro");
         $tp->assign("usuario", $email);
         $webapp = $tp->getOutputContent();
     } else {
         $persona->setDatosUsuario($nombre, $apellido, $sexo, $fecha_nacimiento, $direccion, $dni);
         $persona->insertar();
         $_SESSION['user'] = $email;
         $tp = new TemplatePower("templates/index.html");
         $tp->prepare();
         $tp->gotoBlock("_ROOT");
         $tp->newBlock("sesion");
         $tp->assign("usuario", $_SESSION['user']);
         $webapp = $tp->getOutputContent();
     }
     echo $webapp;
 }
开发者ID:TRexSoftware,项目名称:laboratorio_progIII,代码行数:33,代码来源:controller.Usuario.php


示例5: savePluginFile

function savePluginFile($tplName, $fileName, $fields)
{
    $pluginTpl = PATH_GULLIVER_HOME . 'bin' . PATH_SEP . 'tasks' . PATH_SEP . 'templates' . PATH_SEP . $tplName . '.tpl';
    $template = new TemplatePower($pluginTpl);
    $template->prepare();
    if (is_array($fields)) {
        foreach ($fields as $block => $data) {
            $template->gotoBlock("_ROOT");
            if (is_array($data)) {
                foreach ($data as $rowId => $row) {
                    $template->newBlock($block);
                    foreach ($row as $key => $val) {
                        $template->assign($key, $val);
                    }
                }
            } else {
                $template->assign($block, $data);
            }
        }
    }
    $content = $template->getOutputContent();
    $iSize = file_put_contents($fileName, $content);
    return $iSize;
}
开发者ID:nshong,项目名称:processmaker,代码行数:24,代码来源:skinsExport.php


示例6: _extjs

 private function _extjs()
 {
     G::LoadClass('serverConfiguration');
     $oServerConf =& serverConf::getSingleton();
     $oHeadPublisher =& headPublisher::getSingleton();
     if ($oHeadPublisher->extJsInit === true) {
         $header = $oHeadPublisher->getExtJsVariablesScript();
         $styles = $oHeadPublisher->getExtJsStylesheets($this->cssFileName);
         $body = $oHeadPublisher->getExtJsScripts();
         //default
         $templateFile = G::ExpandPath("skinEngine") . 'base' . PATH_SEP . 'extJsInitLoad.html';
         //Custom skins
         if (defined('PATH_CUSTOM_SKINS') && is_dir(PATH_CUSTOM_SKINS . $this->mainSkin)) {
             $templateFile = PATH_CUSTOM_SKINS . $this->mainSkin . PATH_SEP . 'extJsInitLoad.html';
         }
         //Skin uxs - simplified
         if (!isset($_SESSION['user_experience'])) {
             $_SESSION['user_experience'] = 'NORMAL';
         }
         if ($_SESSION['user_experience'] != 'NORMAL') {
             $templateFile = is_dir(PATH_CUSTOM_SKINS . 'uxs') ? PATH_CUSTOM_SKINS . 'simplified' . PATH_SEP . 'extJsInitLoad.html' : $templateFile;
         }
     } else {
         $styles = "";
         $header = $oHeadPublisher->getExtJsStylesheets($this->cssFileName);
         $header .= $oHeadPublisher->includeExtJs();
         $body = $oHeadPublisher->renderExtJs();
         $templateFile = $this->layoutFile['dirname'] . PATH_SEP . $this->layoutFileExtjs['basename'];
     }
     $template = new TemplatePower($templateFile);
     $template->prepare();
     $template->assign('header', $header);
     $template->assign('styles', $styles);
     $template->assign('bodyTemplate', $body);
     $doctype = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
     $meta = null;
     $dirBody = null;
     if (isset($_SERVER["HTTP_USER_AGENT"]) && preg_match("/^.*\\(.*MSIE (\\d+)\\..+\\).*\$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch)) {
         $ie = intval($arrayMatch[1]);
         $swTrident = preg_match("/^.*Trident.*\$/", $_SERVER["HTTP_USER_AGENT"]) ? 1 : 0;
         //Trident only in IE8+
         $sw = 1;
         if (($ie == 7 && $swTrident == 1 || $ie == 8) && !preg_match("/^ux.+\$/", SYS_SKIN)) {
             //IE8
             $sw = 0;
         }
         if ($sw == 1) {
             if ($ie == 10) {
                 $ie = 8;
             }
             $doctype = null;
             $meta = "<meta http-equiv=\"X-UA-Compatible\" content=\"IE={$ie}\" />";
         }
     }
     $serverConf =& serverConf::getSingleton();
     if ($serverConf->isRtl(SYS_LANG)) {
         $dirBody = "dir=\"RTL\"";
     }
     $template->assign("doctype", $doctype);
     $template->assign("meta", $meta);
     $template->assign("dirBody", $dirBody);
     echo $template->getOutputContent();
 }
开发者ID:bqevin,项目名称:processmaker,代码行数:63,代码来源:skinEngine.php


示例7: unset

G::LoadClass('derivation');
/* GET , POST & $_SESSION Vars */
if (isset($_GET['POSITION'])) {
    $_SESSION['STEP_POSITION'] = (int) $_GET['POSITION'];
}
if (isset($_SESSION['CASES_REFRESH'])) {
    unset($_SESSION['CASES_REFRESH']);
    G::evalJScript("if(typeof parent != 'undefined' && parent.refreshCountFolders) parent.refreshCountFolders();");
}
/* Menues */
$G_MAIN_MENU = 'processmaker';
$G_ID_MENU_SELECTED = 'CASES';
$G_SUB_MENU = 'caseOptions';
$G_ID_SUB_MENU_SELECTED = '_';
/* Prepare page before to show */
$oTemplatePower = new TemplatePower(PATH_TPL . 'cases/cases_Step.html');
$oTemplatePower->prepare();
$G_PUBLISH = new Publisher();
$oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addScriptCode('
  var Cse = {};
  Cse.panels = {};
  var leimnud = new maborak();
  leimnud.make();
  leimnud.Package.Load("rpc,drag,drop,panel,app,validator,fx,dom,abbr",{Instance:leimnud,Type:"module"});
  leimnud.exec(leimnud.fix.memoryLeak);
  leimnud.event.add(window,"load",function(){
    ' . (isset($_SESSION['showCasesWindow']) ? 'try{' . $_SESSION['showCasesWindow'] . '}catch(e){}' : '') . '
  });
  ');
$G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
开发者ID:rodriquelca,项目名称:processmaker,代码行数:31,代码来源:cases_Step.php


示例8: session_start

<?php

session_start();
include "inc.includes.php";
$db = new BaseDatos($config['dbhost'], $config['dbuser'], $config['dbpass'], $config['db']);
$tpl = new TemplatePower("templates/index.html");
$tpl->prepare();
$tpl->gotoBlock("_ROOT");
//isset determina si una variable esta definida o es null
//$_REQUEST tiene el contenido de get y post
if (!isset($_REQUEST["action"]) || $_REQUEST["action"] == "") {
    $tpl->newBlock("contenido");
    $mhotels = new MHotels();
    $result = $mhotels->allhoteles();
    if ($result['found']) {
        foreach ($result['result'] as $r) {
            $tpl->newblock("hotels");
            $tpl->assign("idHotel", $r['id_hotel']);
            $tpl->assign("name", $r['nom_hotel']);
            $tpl->assign("prov", $r['provincia']);
            $tpl->assign("local", $r['localidad']);
            $tpl->assign("calle", $r['calle']);
            $tpl->assign("ncalle", $r['nro_calle']);
            $tpl->assign("tel", $r['telefono']);
            $tpl->assign("precio", $r['precio_persona']);
        }
    } else {
        $tpl->newblock("no_hotels");
    }
    $webapp = $tpl->getOutputContent();
} else {
开发者ID:TRexSoftware,项目名称:laboratorio_progIII,代码行数:31,代码来源:index.php


示例9: TemplatePower

<?php

//llamamos al constructor de la plantilla y la preparamos para ser mostrada
$tplCitaRealizar = new TemplatePower("plantilla/cita_realizar.html");
$tplCitaRealizar->prepare();
$citaId = addslashes($_GET['id']);
$query = "SELECT pacientes.nombre_pac, pacientes.historia, citas.fecha, citas.hora, usuarios.nombre \r\n                FROM pacientes, citas\r\n                LEFT JOIN usuarios\r\n                ON citas.responsable=usuarios.usuario\r\n                WHERE citas.id_cita='{$citaId}'\r\n                AND citas.mascota=pacientes.id_pac";
$rec = mysql_query($query);
$datosCita = mysql_fetch_assoc($rec);
//si no hay datos de la cita indicada lo envio a index
if (!$datosCita) {
    echo "NO EXISTEN CITAS";
    exit;
    header("Location: /gicorec/index.php");
    exit;
}
$tplCitaRealizar->assign("nombre_mascota", $datosCita['nombre_pac']);
$tplCitaRealizar->assign("historia", $datosCita['historia']);
$tplCitaRealizar->assign("fecha", $datosCita['fecha']);
$tplCitaRealizar->assign("hora", $datosCita['hora']);
$tplCitaRealizar->assign("vet_responsable", $datosCita['nombre']);
$tplCitaRealizar->assign("id_cita", $citaId);
//imprimimos por pantalla
$tplIndex->assign("contenido", $tplCitaRealizar->getOutputContent());
开发者ID:aremis1984,项目名称:gicorec,代码行数:24,代码来源:cita_realizar.php


示例10: Form

     $aDataEvent['EVN_CONDITIONS'] = $sWS_USER;
     $output = $oEvent->update($aDataEvent);
     //Show link
     $link = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/' . $sPRO_UID . '/' . $dynTitle . '.php';
     print $link;
     //print "\n<a href='$link' target='_new' > $link </a>";
 } else {
     $G_FORM = new Form($sPRO_UID . '/' . $sDYNAFORM, PATH_DYNAFORM, SYS_LANG, false);
     $G_FORM->action = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/cases_StartExternal.php';
     $scriptCode = '';
     $scriptCode = $G_FORM->render(PATH_CORE . 'templates/' . 'xmlform' . '.html', $scriptCode);
     $scriptCode = str_replace('/controls/', $http . $_SERVER['HTTP_HOST'] . '/controls/', $scriptCode);
     $scriptCode = str_replace('/js/maborak/core/images/', $http . $_SERVER['HTTP_HOST'] . '/js/maborak/core/images/', $scriptCode);
     //render the template
     $pluginTpl = PATH_CORE . 'templates' . PATH_SEP . 'processes' . PATH_SEP . 'webentry.tpl';
     $template = new TemplatePower($pluginTpl);
     $template->prepare();
     require_once 'classes/model/Step.php';
     $oStep = new Step();
     $sUidGrids = $oStep->lookingforUidGrids($sPRO_UID, $sDYNAFORM);
     $template->assign("URL_MABORAK_JS", G::browserCacheFilesUrl("/js/maborak/core/maborak.js"));
     $template->assign("URL_TRANSLATION_ENV_JS", G::browserCacheFilesUrl("/jscore/labels/" . SYS_LANG . ".js"));
     $template->assign("siteUrl", $http . $_SERVER["HTTP_HOST"]);
     $template->assign("sysSys", SYS_SYS);
     $template->assign("sysLang", SYS_LANG);
     $template->assign("sysSkin", SYS_SKIN);
     $template->assign("processUid", $sPRO_UID);
     $template->assign("dynaformUid", $sDYNAFORM);
     $template->assign("taskUid", $sTASKS);
     $template->assign("dynFileName", $sPRO_UID . "/" . $sDYNAFORM);
     $template->assign("formId", $G_FORM->id);
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:processes_webEntryGenerate.php


示例11: session_start

<?php

session_start();
include "inc/header.php";
include_once "inc/class.TemplatePower.inc.php";
$tpl = new TemplatePower("tpl/projecten.tpl");
$tpl->prepare();
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "grid_imo";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM projects WHERE enabled = 1";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
    // output data of each row
    while ($row = $result->fetch_assoc()) {
        $tpl->newBlock("project");
        $title = $row["title"];
        $content = $row["summary"];
        $id = $row["id"];
        $tpl->assign("title", "{$title}");
        $tpl->assign("content", "{$content}");
        $tpl->assign("id", "{$id}");
        $tpl->gotoBlock("_ROOT");
    }
开发者ID:Zathoxic,项目名称:GRiD_ReWork,代码行数:31,代码来源:Projecten.php


示例12: TemplatePower

<?php

// Hier laad ik de header.html in
$header = new TemplatePower("template/files/header.tpl");
$header->prepare();
if (!empty($_SESSION['accountid'])) {
    $header->newBlock("LOGGEDIN");
    $header->assign("USERNAME", $_SESSION['username']);
    //    if($_SESSION['roleid'] == 2){
    //        $header->newBlock("ADMINMENU");
    //    }
} else {
    $header->newBlock("LOGINTOP");
}
开发者ID:Randellrc,项目名称:Portfolio-website,代码行数:14,代码来源:header.php


示例13: switch

 if ($_GET) {
     switch ($_GET[action]) {
         case "deleteall":
             $MessCat = intval($_GET[messcat]);
             if ($MessCat != "100") {
                 $sql = "`message_type` = " . $MessCat . " AND ";
             }
             doquery("DELETE FROM {{table}} WHERE {$sql} message_owner = " . $user[id], 'messages');
             header("Location: " . $_SERVER['PHP_SELF'] . "?messcat=" . $MessCat);
             exit;
             break;
     }
 }
 // ADD SMILIES ARRAY
 makeSmiliesArray();
 $tp = new TemplatePower($ugamela_root_path . TEMPLATE_DIR . TEMPLATE_NAME . "/messages.tpl");
 $tp->prepare();
 $OwnerID = $_GET['id'];
 $MessCategory = isset($_GET['messcat']) ? $_GET['messcat'] : '100';
 $MessPageMode = isset($_GET['mode']) ? $_GET['mode'] : 'show';
 $UsrMess = doquery("SELECT SQL_CACHE * FROM {{table}} WHERE `message_owner` = " . $user['id'] . " ORDER BY `message_time` DESC;", 'messages');
 $UnRead = $user;
 $MessageType = array(100, 0, 1, 2, 3, 4, 5, 15, 99);
 $TitleColor = array(0 => '#FFFF00', 1 => '#FFFF00', 2 => '#FFFF00', 3 => '#FFFF00', 4 => '#FFFF00', 5 => '#FFFF00', 15 => '#FFFF00', 99 => '#FFFF00', 100 => '#FFFF00');
 $BackGndColor = array(0 => '#663366', 1 => '#663366', 2 => '#663366', 3 => '#663366', 4 => '#663366', 5 => '#663366', 15 => '#663366', 99 => '#663366', 100 => '#663366');
 for ($MessType = 0; $MessType < 101; $MessType++) {
     if (in_array($MessType, $MessageType)) {
         $WaitingMess[$MessType] = $UnRead[$messfields[$MessType]];
         $TotalMess[$MessType] = 0;
     }
 }
开发者ID:sonicmaster,项目名称:RPG,代码行数:31,代码来源:messages.php


示例14: TemplatePower

<?php

$tpl = new TemplatePower('template/eventos/consultaEventos.tpl');
$tpl->prepare();
foreach ($_POST as $nombre_campo => $valor) {
    $asignacion = '$' . $nombre_campo . '=\'' . $valor . '\';';
    if (!is_numeric($nombre_campo)) {
        eval($asignacion);
    }
}
$eventos = new Eventos($conn);
$lista_eventos = $eventos->listaEventos();
foreach ($lista_eventos as $evento) {
    $tpl->newBlock("eventos");
    $tpl->assign("nombre", $evento['nombre']);
    $tpl->assign("f_inicio", $evento['f_inicio']);
    $tpl->assign("f_fin", $evento['f_fin']);
    $tpl->assign("logotipo", $evento['logotipo']);
    $tpl->assign("descripcion", $evento['descripcion']);
    $tpl->assign("id", $evento['id']);
    $tpl->gotoBlock("_ROOT");
}
//$tpl->assign('anterior', $anterior);
//$tpl->assign('siguiente', $siguiente);
$tpl->printToScreen();
?>

开发者ID:huicochea,项目名称:ciclodeideas,代码行数:26,代码来源:consultaEventos.php


示例15: session_start

<?php

session_start();
include "inc/header.php";
include_once "inc/class.TemplatePower.inc.php";
$tpl = new TemplatePower("tpl/index.tpl");
$tpl->prepare();
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "grid_imo";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM news";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
    // output data of each row
    while ($row = $result->fetch_assoc()) {
        $tpl->newBlock("News");
        $title = $row["title"];
        $news_content = $row["text"];
        $tpl->assign("news_title", "{$title}");
        $tpl->assign("news_content", "{$news_content}");
        $tpl->gotoBlock("_ROOT");
    }
} else {
    $tpl->newBlock("News");
开发者ID:Zathoxic,项目名称:GRiD_ReWork,代码行数:31,代码来源:index.php


示例16: TemplatePower

<?php

$content = new TemplatePower("template/files/admin_blog.tpl");
$content->prepare();
if (isset($_GET['action'])) {
    $action = $_GET['action'];
} else {
    $action = NULL;
}
if (isset($_SESSION['roleid'])) {
    if ($_SESSION['roleid'] == 2) {
        switch ($action) {
            case "toevoegen":
                if (!empty($_POST['username']) && !empty($_POST['title']) && !empty($_POST['content'])) {
                    // insert
                    // insert
                    $insert_blog = $db->prepare("INSERT INTO blog SET\n                  Username = :username,\n                  Title = :title,\n                  Content = :content,\n                  Accounts_idAccounts = :accountid");
                    $insert_blog->bindParam(":username", $_POST['username']);
                    $insert_blog->bindParam(":title", $_POST['title']);
                    $insert_blog->bindParam(":content", $_POST['content']);
                    $insert_blog->bindValue(":accountid", 4);
                    $insert_blog->execute();
                    $userid = $db->lastInsertId();
                } else {
                    // formulier
                    $content->newBlock("BLOGFORM");
                    $content->assign("ACTION", "index.php?pageid=3&action=toevoegen");
                    $content->assign("BUTTON", "Toevoegen Blog");
                }
                break;
            case "wijzigen":
开发者ID:Randellrc,项目名称:Portfolio-website,代码行数:31,代码来源:admin_blog.php


示例17: TemplatePower

<?php

$content = new TemplatePower("template/files/login.tpl");
$content->prepare();
if (isset($_SESSION['accountid'])) {
    // is al ingelogd, dus niks doen
    $content->newBlock("MELDING");
    $content->assign("MELDING", "Je bent al ingelogd");
} else {
    if (!empty($_POST['gnaam']) and !empty($_POST['password'])) {
        // formulier is verstuurd
        $check_user = $db->prepare("SELECT count(*) FROM accounts a, users u\n                                    WHERE a.Users_idUsers = u.idUsers\n                                    AND a.Username = :username\n                                    AND a.Password = :password");
        $check_user->bindParam(":username", $_POST['gnaam']);
        $password = sha1($_POST['password']);
        $check_user->bindParam(":password", $password);
        $check_user->execute();
        if ($check_user->fetchColumn() == 1) {
            // gebruiker gevonden
            $get_user = $db->prepare("SELECT a.*, u.* FROM accounts a, users u\n                                    WHERE a.Users_idUsers = u.idUsers\n                                    AND a.Username = :username\n                                    AND a.Password = :password");
            $get_user->bindParam(":username", $_POST['gnaam']);
            $get_user->bindParam(":password", $password);
            $get_user->execute();
            $user = $get_user->fetch(PDO::FETCH_ASSOC);
            $_SESSION['accountid'] = $user['idAccounts'];
            $_SESSION['username'] = $user['Username'];
            $_SESSION['roleid'] = $user['Role_idRole'];
            $content->newBlock("MELDING");
            $content->assign("MELDING", "Je bent ingelogd");
        } else {
            // gebruiker niet gevonden: combinatie username + password klopt niet
            $errors->newBlock("ERRORS");
开发者ID:Randellrc,项目名称:Portfolio-website,代码行数:31,代码来源:login.php


示例18: processMap

    public function processMap()
    {
        global $G_PUBLISH;
        global $G_CONTENT;
        global $G_FORM;
        global $G_TABLE;
        global $RBAC;
        G::LoadClass('processMap');
        $oTemplatePower = new TemplatePower(PATH_TPL . 'processes/processes_Map.html');
        $oTemplatePower->prepare();
        $G_PUBLISH = new Publisher();
        $G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
        $oHeadPublisher =& headPublisher::getSingleton();
        //$oHeadPublisher->addScriptfile('/jscore/processmap/core/processmap.js');
        $oHeadPublisher->addScriptCode('
    var maximunX = ' . processMap::getMaximunTaskX($_SESSION['PROCESS']) . ';
    window.onload = function(){
      var pb=leimnud.dom.capture("tag.body 0");
      Pm=new processmap();

      var params = "{\\"uid\\":\\"' . $_SESSION['PROCESS'] . '\\",\\"mode\\":false,\\"ct\\":false}";
      // maximun x and y position
      var xPos = 0;
      var yPos = 0;

      //obtaining the processmap object for the current process
      var oRPC = new leimnud.module.rpc.xmlhttp({
        url   : "../processes/processes_Ajax",
        async : false,
        method: "POST",
        args  : "action=load&data="+params
      });

      oRPC.make();
      var response = eval(\'(\' + oRPC.xmlhttp.responseText + \')\');

      for (var i in response){
        if (i==\'task\'){
          elements = response[i];
          for (var j in elements){
            if (elements[j].uid!=undefined){
              if (elements[j].position.x > xPos){
                xPos = elements[j].position.x;
              }
              if (elements[j].position.y > yPos){
                yPos = elements[j].position.y;
              }
            }
          }
        }
      }

      Pm.options = {
        target    : "pm_target",
        dataServer: "../processes/processes_Ajax",
        uid       : "' . $_SESSION['PROCESS'] . '",
        lang      : "' . SYS_LANG . '",
        theme     : "processmaker",
        size      : {w:xPos+800,h:yPos+150},
        images_dir: "/jscore/processmap/core/images/",
        rw        : false,
        hideMenu  : false
      }
      Pm.make();

      oLeyendsPanel = new leimnud.module.panel();
      oLeyendsPanel.options = {
        size  :{w:260,h:155},
        position:{x:((document.body.clientWidth * 95) / 100) - ((document.body.clientWidth * 95) / 100 - (((document.body.clientWidth * 95) / 100) - 260)),y:45,center:false},
        title :G_STRINGS.ID_COLOR_LEYENDS,
        theme :"processmaker",
        statusBar:false,
        control :{resize:false,roll:false,drag:true,close:false},
        fx  :{modal:false,opacity:false,blinkToFront:true,fadeIn:false,drag:false}
      };
      oLeyendsPanel.setStyle = {
        content:{overflow:"hidden"}
      };
      oLeyendsPanel.events = {
        remove: function() {delete(oLeyendsPanel);}.extend(this)
      };
      oLeyendsPanel.make();
      oLeyendsPanel.loader.show();
      var oRPC = new leimnud.module.rpc.xmlhttp({
        url : "cases_Ajax",
        args: "action=showLeyends"
      });
      oRPC.callback = function(rpc){
        oLeyendsPanel.loader.hide();
        var scs=rpc.xmlhttp.responseText.extractScript();
        oLeyendsPanel.addContent(rpc.xmlhttp.responseText);
      }.extend(this);
      oRPC.make();
    }');
        G::RenderPage('publish', 'blank');
    }
开发者ID:norahmollo,项目名称:processmaker,代码行数:96,代码来源:ajaxListener.php


示例19: createPropelClasses

    /**
     * DEPRECATED createPropelClasses()
     *
     * Don't use this method, it was left only for backward compatibility
     * for some external plugins that still is using it
     */
    public function createPropelClasses($sTableName, $sClassName, $aFields, $sAddTabUid, $connection = 'workflow')
    {
        try {
            /* $aUID = array('FLD_NAME'           => 'PM_UNIQUE_ID',
              'FLD_TYPE'           => 'INT',
              'FLD_KEY'            => 'on',
              'FLD_SIZE'           => '11',
              'FLD_NULL'           => '',
              'FLD_AUTO_INCREMENT' => 'on');
              array_unshift($aFields, $aUID); */
            $aTypes = array(
                'VARCHAR' => 'string',
                'TEXT'    => 'string',
                'DATE'    => 'int',
                'INT'     => 'int',
                'FLOAT'   => 'double'
            );
            $aCreoleTypes = array(
                'VARCHAR' => 'VARCHAR',
                'TEXT'    => 'LONGVARCHAR',
                'DATE'    => 'TIMESTAMP',
                'INT'     => 'INTEGER',
                'FLOAT'   => 'DOUBLE'
            );
            if ($sClassName == '') {
                $sClassName = $this->getPHPName($sTableName);
            }

            $sPath = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
            if (!file_exists($sPath)) {
                G::mk_dir($sPath);
            }
            if (!file_exists($sPath . 'map')) {
                G::mk_dir($sPath . 'map');
            }
            if (!file_exists($sPath . 'om')) {
                G::mk_dir($sPath . 'om');
            }
            $aData = array();
            $aData['pathClasses'] = substr(PATH_DB, 0, -1);
            $aData['tableName'] = $sTableName;
            $aData['className'] = $sClassName;
            $aData['connection'] = $connection;
            $aData['GUID'] = $sAddTabUid;

            $aData['firstColumn'] = isset($aFields[0])
                                    ? strtoupper($aFields[0]['FLD_NAME'])
                                    : ($aFields[1]['FLD_NAME']);
            $aData['totalColumns'] = count($aFields);
            $aData['useIdGenerator'] = 'false';
            $oTP1 = new TemplatePower(PATH_TPL . 'additionalTables' . PATH_SEP . 'Table.tpl');
            $oTP1->prepare();
            $oTP1->assignGlobal($aData);
            file_put_contents($sPath . $sClassName . '.php', $oTP1->getOutputContent());
            $oTP2 = new TemplatePower(PATH_TPL . 'additionalTables' . PATH_SEP . 'TablePeer.tpl');
            $oTP2->prepare();
            $oTP2->assignGlobal($aData);
            file_put_contents($sPath . $sClassName . 'Peer.php', $oTP2->getOutputContent());
            $aColumns = array();
            $aPKs = array();
            $aNotPKs = array();
            $i = 0;
            foreach ($aFields as $iKey => $aField) {
                $aField['FLD_NAME'] = strtoupper($aField['FLD_NAME']);
                if ($aField['FLD_TYPE'] == 'DATE') {
                    $aField['FLD_NULL'] = '';
                }
                $aColumn = array(
                    'name' => $aField['FLD_NAME'],
                    'phpName' => $this->getPHPName($aField['FLD_NAME']),
                    'type' => $aTypes[$aField['FLD_TYPE']],
                    'creoleType' => $aCreoleTypes[$aField['FLD_TYPE']],
                    'notNull' => ($aField['FLD_NULL'] == 'on' ? 'true' : 'false'),
                    'size' => (($aField['FLD_TYPE'] == 'VARCHAR')
                              || ($aField['FLD_TYPE'] == 'INT')
                              || ($aField['FLD_TYPE'] == 'FLOAT') ? $aField['FLD_SIZE'] : 'null'),
                    'var' => strtolower($aField['FLD_NAME']),
                    'attribute' => (($aField['FLD_TYPE'] == 'VARCHAR')
                                   || ($aField['FLD_TYPE'] == 'TEXT')
                                   || ($aField['FLD_TYPE'] == 'DATE')
                                   ? '$' . strtolower($aField['FLD_NAME']) . " = ''"
                                   : '$' . strtolower($aField['FLD_NAME']) . ' = 0'),
                    'index' => $i,
                );
                if ($aField['FLD_TYPE'] == 'DATE') {
                    $aColumn['getFunction'] = '/**
   * Get the [optionally formatted] [' . $aColumn['var'] . '] column value.
   *
   * @param      string $format The date/time format string (either date()-style or strftime()-style).
   *              If format is NULL, then the integer unix timestamp will be returned.
   * @return     mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
   * @throws     PropelException - if unable to convert the date/time to timestamp.
   */
  public function get' . $aColumn['phpName'] . '($format = "Y-m-d")
//.........这里部分代码省略.........
开发者ID:rrsc,项目名称:processmaker,代码行数:101,代码来源:AdditionalTables.php


示例20: TemplatePower

 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
 * Coral Gables, FL, 33134, USA, or email [email protected].
 *
 */
$tpl = new TemplatePower(PATH_TPL . "cases" . PATH_SEP . "cases_DynaformHistory.html");
$tpl->prepare();
require_once 'classes/model/AppHistory.php';
G::LoadClass('case');
$oCase = new Cases();
$Fields = $oCase->loadCase($_SESSION['APPLICATION']);
// Load form info
if (isset($_REQUEST['DYN_UID']) && $_REQUEST['DYN_UID'] != '') {
    $form = new Form($_REQUEST['PRO_UID'] . PATH_SEP . $_REQUEST['DYN_UID'], PATH_DYNAFORM, SYS_LANG, false);
}
$historyData = array();
$historyDataAux = array();
$appHistory = new AppHistory();
$c = $appHistory->getDynaformHistory($_REQUEST['PRO_UID'], $_REQUEST['TAS_UID'], $_REQUEST['APP_UID'], $_REQUEST['DYN_UID']);
$oDataset = ArrayBasePeer::doSelectRs($c);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:cases_DynaformHistory.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP TemplateRendererFactory类代码示例发布时间:2022-05-23
下一篇:
PHP TemplateManager类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap