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


PHP template_add_head_foot函数代码示例

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


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

示例1: check_role

<?php

require_once "inc/config.php";
check_role($ROLE_ADMIN);
$tem = template_open("add_address.tpl");
$tem = template_add_head_foot($tem, head, foot);
$username = ereg_replace("[^[A-z]]", "", $_REQUEST['username']);
$password = ereg_replace("[^[A-z]]", "", $_REQUEST['password']);
$first = ereg_replace("[^[:alnum:] ]", "", $_REQUEST['first']);
$last = ereg_replace("[^[:alnum:] ]", "", $_REQUEST['last']);
echo "do sem";
$sql = "SELECT * FROM roles";
//TitleGroup";
$result = $db->fetchAll($sql);
foreach ($result as $res) {
    $names[] .= $res["name"];
    $values[] .= $res["id_role"];
}
$role_dropdown = html_drop_down_arrays("role_drop", $names, $values, "");
if ($_REQUEST['add'] == "Dodaj") {
    //echo $username."-".$password."-".$first."-".$last."-".$role_drop;
    if ($username and $password and $first and $last) {
        //pogledamo kaj imamo in ce je ze tak notr slucajn...
        $sql = "SELECT first FROM persons where first='{$first}' and last='{$last}'";
        $result = $db->fetchOne($sql);
        if ($result) {
            $message .= "Uporabnik ze obstaja";
        } else {
            // dejansko vnesemo
            $data = array('username' => $username, 'passwd' => $password, 'first' => $first, 'last' => $last, 'id_role' => $role_drop);
            $db->insert('persons', $data);
开发者ID:urki,项目名称:urki-test-project,代码行数:31,代码来源:add_address.php

示例2: require_once

<?
require_once("inc/config.php");

$tem = template_open("user_add.tpl");
$tem = template_add_head_foot($tem);

$username = ereg_replace("[^[A-z]]","",$_REQUEST['username']);
$password = ereg_replace("[^[A-z]]","",$_REQUEST['password']);
$first = ereg_replace("[^[:alnum:] ]","",$_REQUEST['first']);
$last = ereg_replace("[^[:alnum:] ]","",$_REQUEST['last']);



$sql = "SELECT * FROM roles"; 
$result = $db->fetchAll($sql);
foreach ($result as $res) {
	$names[] .= $res["name"];
	$values[] .= $res["id_role"];
}

$role_dropdown = html_drop_down_arrays("role_drop",$names,$values,""); 



if ($_REQUEST['add'] == "Dodaj") {
	//echo $username."-".$password."-".$first."-".$last."-".$role_drop;
	if ($username and $password and $first and $last) {
		//pogledamo kaj imamo in ce je ze tak notr slucajn...       
		$sql = "SELECT first FROM persons where first='$first' and last='$last'"; 

		$result = $db->fetchOne($sql); 
开发者ID:urki,项目名称:dnevnik,代码行数:31,代码来源:user_add.php

示例3: check_role

<?php

require_once "inc/config.php";
check_role($ROLE_USER);
$TITLE = "Cilji";
$tem = template_open("aim_add.tpl") . ($tem = template_open("aim_stop.tpl"));
$tem = template_add_head_foot($tem, "head", "foot");
include 'name_dropdown.php';
//dropdown ocene
$duration = range(1, 5);
$duration_dropdown = html_drop_down_arrays("duration_drop", $duration, $duration, "3");
//date("H",time()));
$day = range(1, 31);
$day_dropdown = html_drop_down_arrays("day_drop", $day, $day, date("j", time()));
$month = range(1, 12);
$month_dropdown = html_drop_down_arrays("month_drop", $month, $month, date("n", time()));
$year = range(2010, date("Y", time()) + 1);
$year_dropdown = html_drop_down_arrays("year_drop", $year, $year, date("Y", time()));
//nosilec drop down
$sql = "SELECT * FROM `persons` WHERE  20<`id_role` order by unit, letter ASC";
$result = $db->fetchAll($sql);
foreach ($result as $res) {
    if (!is_array($ResponsibleName)) {
        $ResponsibleName[] = "izberi..";
        $ResponsibleValue[] = "";
    }
    $ResponsibleName[] .= $res["last"] . " " . $res["first"];
    $ResponsibleValue[] .= $res["id_person"];
}
///////////
$responisble_dropdown = html_drop_down_arrays("responsible_drop", $ResponsibleName, $ResponsibleValue, $ResponsibleName);
开发者ID:urki,项目名称:urki-test-project,代码行数:31,代码来源:aim.php

示例4: check_role

<?php

//*$DO_NOT_REDIRECT="true";*/
require_once "inc/config.php";
check_role($ROLE_EMPLOYED);
$TITLE = "Aktivnosti";
$tem = template_open("aktiv_main.tpl");
$tem = template_add_head_foot($tem, head, blank);
$tem = str_replace('##USER##', $identity, $tem);
$tem = str_replace('##TITLE##', $TITLE, $tem);
$tem = str_replace("##MESSAGE##", $message, $tem);
$tem = template_clean_up_tags($tem, "##");
echo $tem;
开发者ID:urki,项目名称:urki-test-project,代码行数:13,代码来源:aktiv_main.php

示例5: template_open

<?php

$DO_NOT_REDIRECT = "true";
require_once "inc/config.php";
$user = $_REQUEST["user"];
$pass = $_REQUEST["pass"];
$tem = template_open("login.tpl");
$tem = template_add_head_foot($tem, headLog);
if ($user and $pass) {
    // Set up the authentication adapter
    $authAdapter = new Zend_Auth_Adapter_DbTable($db);
    $authAdapter->setTableName('persons')->setIdentityColumn('username')->setCredentialColumn('passwd');
    $authAdapter->setIdentity($user)->setCredential($pass);
    // Attempt authentication, saving the result
    $result = $auth->authenticate($authAdapter);
    if (!$result->isValid()) {
        // Authentication failed; print the reasons why
        foreach ($result->getMessages() as $message) {
            $m .= $message;
        }
        $m = "Vzdevek ali geslo nista pravilna!";
        $messagetype = "error";
        $tem = str_replace('##MESSAGETYPE##', $messagetype, $tem);
        $tem = str_replace("##MESSAGE##", $m, $tem);
        $tem = template_clean_up_tags($tem, "##");
        echo $tem;
    } else {
        header("location:index.php");
    }
} else {
    $tem = template_clean_up_tags($tem, "##");
开发者ID:urki,项目名称:urki-test-project,代码行数:31,代码来源:login.php


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