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

PHP template_open函数代码示例

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

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



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

示例1: template_add_head_foot

function template_add_head_foot($temp, $header, $footer)
{
    global $role_id;
    global $ROLE_ADMIN, $ROLE_LEADER, $ROLE_EMPLOYED, $ROLE_ZALEC, $unit;
    $header = $header . ".tpl";
    $footer = $footer . ".tpl";
    $head = template_open($header);
    $foot = template_open($footer);
    if ($role_id) {
        switch ($role_id) {
            case $role_id >= $ROLE_ADMIN:
                $foot = str_replace("##IF_ADMIN##", "", $foot);
                $foot = str_replace("##IF_LEADER##", "", $foot);
                break;
            case $role_id <= $ROLE_ADMIN and $role_id >= $ROLE_LEADER:
                $foot = template_clean_up_tags($foot, "##IF_ADMIN##", 1);
                break;
            case $role_id <= $ROLE_LEADER and $role_id >= $ROLE_EMPLOYED:
                $foot = template_clean_up_tags($foot, "##IF_ADMIN##", 1);
                $foot = template_clean_up_tags($foot, "##IF_LEADER##", 1);
                break;
            default:
                $foot = template_clean_up_tags($foot, "##IF_ADMIN##", 1);
                $foot = template_clean_up_tags($foot, "##IF_LEADER##", 1);
                $foot = template_clean_up_tags($foot, "##IF_EMPLOYED##", 1);
                //	$foot =  template_clean_up_tags($foot,"##IF_ZALEC##",1);
        }
    } else {
        $foot = template_clean_up_tags($foot, "##IF_ZALEC##", 1);
        $head = template_clean_up_tags($head, "##IF_USER##", 1);
        $foot = template_clean_up_tags($foot, "##IF_ADMIN##", 1);
        $foot = template_clean_up_tags($foot, "##IF_LEADER##", 1);
        $foot = template_clean_up_tags($foot, "##IF_EMPLOYED##", 1);
    }
    //pogoj za zacasno blokado-vizualno zalcu
    if ($unit == $ROLE_ZALEC) {
        $foot = template_clean_up_tags($foot, "##IF_ZALEC##", 1);
    }
    /////////////////
    return $head . "\n\n" . '<!-- end head -->' . $temp . "\n\n" . '<!-- end main template -->' . "\n\n" . ' <!-- start foot -->' . "\n\n" . $foot;
}
开发者ID:urki,项目名称:urki-test-project,代码行数:41,代码来源:template.php


示例2: str_replace

		$rtable =str_replace("##PLACE##",$x,$rtable);
		$rtable =str_replace("##TIME##",$res->f("end_time"),$rtable);
		$rtable =str_replace("##TIME2##",substr($micro,0,2),$rtable);
		$x++;
		}
	$table = str_replace("##RESULTS##",$rtable,$table);
	$rtable = '';
}



//create db object//
$db = new DB_Sql();

//open template//
$tem = template_open("user_group_list.tpl");
//add header footer//
$tem = template_add_head_foot($tem,head,foot);


$tmp = template_get_repeat_text("##START_EN##","##STOP_EN##","##RESULTS##",$tem);
$row = $tmp[1];
$tem = $tmp[0];

$tmp = template_get_repeat_text("##START_ALL##","##STOP_ALL##","##RESULTS_LIST##",$tem);
$row_category = $tmp[1];
$tem = $tmp[0];



//echo $row_category . "<hr>". $row;
开发者ID:urki,项目名称:timing,代码行数:31,代码来源:user_group_list_event.php


示例3: 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


示例4: template_open

<?php

require_once "inc/config.php";
$tem = template_open("ocenjevanje.tpl");
$sql = "SELECT * FROM persons";
/*$result = $db->fetchAll($sql);
foreach ($result as $res) {
	if (!is_array($names)) {
		$names[] ="izberi ime...";
		$values[]="";
	}
	$names[] .= $res["first"]." ".$res["last"];
	$values[] .= $res["first"]." ".$res["last"];
}

$name_dropdown = html_drop_down_arrays("entry.1.single",$names,$values,$name_drop); 
*/
$sql = "SELECT * FROM applic";
$result = $db->fetchAll($sql);
foreach ($result as $res) {
    if (!is_array($aname)) {
        $aname[] = "izberi program...";
        $avalue[] = "";
    }
    $aname[] .= $res["name"];
    $avalue[] .= $res["name"];
}
$appl_dropdown = html_drop_down_arrays("entry.4.single", $aname, $avalue, $appl_drop);
$sql = "SELECT * FROM work WHERE {$ROLE_USER}>=`group`  order by applic";
$result = $db->fetchAll($sql);
foreach ($result as $res) {
开发者ID:urki,项目名称:urki-test-project,代码行数:31,代码来源:ocenjevanje.php


示例5: header

<?php

require_once "inc/config.php";
header("refresh:120;url=view_notice.php");
check_role($ROLE_EMPLOYED);
$TITLE = "Glavna stran";
$tem = template_open("view_notice.tpl");
$tem = template_add_head_foot($tem, head, foot);
$tmp = template_get_repeat_text("##START_LOG##", "##STOP_LOG##", "##LOGS##", $tem);
$row = $tmp[1];
$tem = $tmp[0];
/**
 * Obdelava feedback 
 */
$sql = "SELECT * FROM `feedback` WHERE `modified_by`={$person_id} and `status` in (0, 1) order by id desc";
$result = $db->fetchAll($sql);
foreach ($result as $res) {
    $table .= $row;
    $table = str_replace("##FEEDBTIME##", $res[timestamp], $table);
    $table = str_replace("##FEEDBNOTE##", substr($res["note"], 0, 120) . '...', $table);
}
/**
 *Izpis končanih v feedback 
 */
$tmp = template_get_repeat_text("##START END##", "##STOP_END##", "##LOGS2##", $tem);
$row = $tmp[1];
$tem = $tmp[0];
unset($result);
$sql = "SELECT * FROM `feedback` WHERE `modified_by`={$person_id} and `status` =2 order by id desc LIMIT 0 , 4";
$result = $db->fetchAll($sql);
foreach ($result as $res) {
开发者ID:urki,项目名称:urki-test-project,代码行数:31,代码来源:view_notice.php


示例6: check_role

<?php

require_once "inc/config.php";
check_role($ROLE_ADMIN);
$tem = template_open("add_role.tpl");
$tem = template_add_head_foot($tem, head, foot);
$name = $_REQUEST['name'];
if ($_REQUEST['add'] == "Dodaj") {
    if ($name) {
        //pogledamo kaj imamo in ce je ze tak notr slucajn..
        $sql = "SELECT id_role FROM TitleGroup  where name='{$name}'";
        $result = $db->fetchOne($sql);
        if ($result) {
            $message .= "Role ze obstaja";
        } else {
            //dejansko vnesemo
            $data = array('name' => $name);
            $db->insert('TitleGroup', $data);
            $message .= "Role je  dodano..";
        }
    } else {
        $message .= "Izpolni vsa polja!";
    }
}
$tem = str_replace("##MESSAGE##", $message, $tem);
$tem = template_clean_up_tags($tem, "##");
echo $tem;
开发者ID:urki,项目名称:urki-test-project,代码行数:27,代码来源:add_role.php


示例7: check_role

<?php

//*$DO_NOT_REDIRECT="true";*/
require_once "inc/config.php";
check_role($ROLE_LEADER);
$tem = template_open("add_log_admin.tpl");
$tem = template_add_head_foot($tem, head, foot);
$TITLE = "Evidenca OE";
//pogoj, da lahko vsi ki imajo nad 80 role_id vidijo vse in dopisujejo vse
if ($role_id < 80) {
    $sql = "SELECT * FROM persons where unit={$role_id} and id_role>30 order by last ASC";
} else {
    $sql = "SELECT * FROM persons where id_role>30 order by first ASC";
}
$result = $db->fetchAll($sql);
foreach ($result as $res) {
    if (!is_array($names)) {
        $names[] = "ime in priimek zaposlenega...";
        $values[] = "";
    }
    $names[] .= $res["first"] . " " . $res["last"];
    $values[] .= $res["id_person"];
}
$name_dropdown = html_drop_down_arrays("name_drop", $names, $values, $name_drop);
//pogoj, da lahko vsi ki imajo nad 80 role_id vpisujejo vse JOBTYPE, ostali pa ne
//if ($role_id<80){
//  $sql = "SELECT * FROM jobtype where role between 30 and 79 order by name ASC";
//	}
//else {
//    $sql = "SELECT * FROM jobtype where role > 79 order by name ASC";
//}
开发者ID:urki,项目名称:urki-test-project,代码行数:31,代码来源:add_log_leader.php


示例8: check_role

<?php

require_once "inc/config.php";
check_role($ROLE_USER);
$TITLE = "&#352ifrant aktivnosti uporabnikov";
$tem = template_open("help_client_activity.tpl");
$tem = template_add_head_foot($tem, head, foot);
$tmp = template_get_repeat_text("##START_LOG##", "##STOP_LOG##", "##LOGS##", $tem);
$row = $tmp[1];
$tem = $tmp[0];
$sql = 'SELECT `applic`.`name` aname,`work`.`name` wname,`work`.`opis` wopis FROM work,applic where 10>=`work`.`group` and `work`.`applic_id`=`applic`.`applic_id` order by `applic`.`name` ';
$result = $db->fetchAll($sql);
//log_id	timestamp	person_id	jobtype_id	start	end	note	job_id	name	description
foreach ($result as $res) {
    $table .= $row;
    $table = str_replace("##APP_NAME##", $res["aname"], $table);
    $table = str_replace("##NAME_WORK##", $res["wname"], $table);
    $table = str_replace("##DESC_WORK##", $res["wopis"], $table);
    //echo "<br>".$res['timestamp']." - ".date("H:i",$res['start'])." - ".date("H:i",$res['stop'])." - ".$res['name']." - ".$res['description'];
}
$tem = str_replace('##TITLE##', $TITLE, $tem);
$tem = str_replace('##USER##', $identity, $tem);
$tem = str_replace("##LOGS##", $table, $tem);
$tem = str_replace("##MESSAGE##", $message, $tem);
$tem = template_clean_up_tags($tem, "##");
echo $tem;
开发者ID:urki,项目名称:urki-test-project,代码行数:26,代码来源:help_client_activity.php


示例9: check_role

<?php

require_once "inc/config.php";
check_role($ROLE_USER);
$TITLE = "&#352ifrant aktivnosti zaposlenih";
$tem = template_open("help_client_employe.tpl");
$tem = template_add_head_foot($tem, head, foot);
$tmp = template_get_repeat_text("##START_LOG##", "##STOP_LOG##", "##LOGS##", $tem);
$row = $tmp[1];
$tem = $tmp[0];
$sql = "SELECT `work`.`applic_id` applic_id,`work`.`subcat_id` subcat_id,`applic`.`name` aname,`work`.`name` wname,`work`.`opis` wopis FROM work,applic where `work`.`applic_id`=`applic`.`applic_id` and `work`.`group`>{$ROLE_USER} and {$role_id}>=`group` order by `work`.`applic_id`,`work`.`subcat_id`";
$result = $db->fetchAll($sql);
//log_id	timestamp	person_id	jobtype_id	start	end	note	job_id	name	description
foreach ($result as $res) {
    $table .= $row;
    $table = str_replace("##APP_ID##", $res["applic_id"], $table);
    $table = str_replace("##WORK_ID##", $res["subcat_id"], $table);
    $table = str_replace("##APP_NAME##", $res["aname"], $table);
    $table = str_replace("##NAME_WORK##", $res["wname"], $table);
    $table = str_replace("##DESC_WORK##", $res["wopis"], $table);
    //echo "<br>".$res['timestamp']." - ".date("H:i",$res['start'])." - ".date("H:i",$res['stop'])." - ".$res['name']." - ".$res['description'];
}
$tem = str_replace('##TITLE##', $TITLE, $tem);
$tem = str_replace('##USER##', $identity, $tem);
$tem = str_replace("##LOGS##", $table, $tem);
$tem = str_replace("##MESSAGE##", $message, $tem);
$tem = template_clean_up_tags($tem, "##");
echo $tem;
开发者ID:urki,项目名称:urki-test-project,代码行数:28,代码来源:help_client_employe.php


示例10: template_open

<?php

require_once "inc/config.php";
$tem = template_open("add_plan.tpl");
$tem = template_add_head_foot($tem);
$work_values = array();
$work_names = array();
//get out different types of work
$sql = "SELECT id,naziv FROM delo";
$result = $db->fetchAll($sql);
foreach ($result as $row) {
    $work_values[] = $row['id'];
    $work_names[] = $row['naziv'];
}
//create a dropdown
$work_drop = html_drop_down_arrays("work_id", $work_names, $work_values, '');
//get user id
$sql = "SELECT id FROM users where username='{$identity}'";
$user_id = $db->fetchOne($sql);
///form submit
$title = $_REQUEST['title'];
$desc = $_REQUEST['desctiption'];
$price = $_REQUEST['price'];
if ($_REQUEST['form_submit'] == "true") {
    if ($title and $desc and $price) {
        //pogledamo kaj imamo in ce je ze tak notr slucajn..
        //dejansko vnesemo
        $data = array('naziv' => $title, 'id_user' => $user_id, 'id_delo' => $work_id);
        $db->insert('main', $data);
        $message .= "Delo je  dodano..";
    } else {
开发者ID:urki,项目名称:urki-test-project,代码行数:31,代码来源:add_plan.php


示例11: DB_Sql

<?
include "../inc/config.php";

//create db object//
$db = new DB_Sql();

//open template//
$tem = template_open("tekma_add.tpl");
//add header footer//
$tem = template_add_head_foot($tem,head,foot);

if ($_REQUEST["submit"]!='') {
		//then we need to insert a new one//
		$e_name = trim($_REQUEST['name']);
		
		$sql = "select * from tekma where name='$e_name'";
		$db->query($sql);
		if ($db->affected_rows()>0) {
			$message = "Tekma ze obstaja";
		} else {
			$sql = "INSERT INTO  `timming`.`tekma` (
			`tekma_id` ,
			`name`
			)
			VALUES (
			NULL ,  '$e_name')
			";
			$db->query($sql);
			$message = "Tekma uspesno vnesena";
		}
开发者ID:urki,项目名称:timing,代码行数:30,代码来源:tekma_add.php


示例12: check_role

<?php 
require_once "inc/config.php";
check_role($ROLE_LEADER);
$TITLE = "Letno poročilo";
$tem = template_open("view_year_report.tpl");
$tem = template_add_head_foot($tem, head, foot);
$tmp = template_get_repeat_text("##START_LOG##", "##STOP_LOG##", "##LOGS##", $tem);
$row = $tmp[1];
$tem = $tmp[0];
//spremenljivki za mesec ine leto//
if ($mon < 1 or $mon > 12) {
    $mon = '';
}
if (!$mon) {
    $mon = date("m", time());
}
if (!$year) {
    $year = date("Y", time());
}
// instanciate a new DAL
$dal = new DAL();
//enota
$age_min = 18;
$age_max = 36;
$unitarray = array(75, 77, 78);
$disorderarray = array(1, 2, 3, 4, 5);
function query1($disorder)
{
    echo "jaz sem funkcija";
    $dal = new DAL();
开发者ID:urki,项目名称:urki-test-project,代码行数:30,代码来源:view_year_reposrt_NEDELA.php


示例13: check_role

<?php

require_once "inc/config.php";
check_role($ROLE_LEADER);
$TITLE = "Mese&#269;na evidenca prisotnosti uporabnikov za";
$tem = template_open("view_presence.tpl");
$tem = template_add_head_foot($tem, head, foot);
$tmp = template_get_repeat_text("##START_LOG_NOT##", "##STOP_LOG_NOT##", "##LOGS_NOT##", $tem);
$rownot = $tmp[1];
$tem = $tmp[0];
$tmp = template_get_repeat_text("##START_LOG##", "##STOP_LOG##", "##LOGS##", $tem);
$row = $tmp[1];
$tem = $tmp[0];
//zacetek in konec meseca//
if ($mon < 1 or $mon > 12) {
    $mon = '';
}
if (!$mon) {
    $mon = date("m", time());
}
if (!$year) {
    $year = date("Y", time());
}
$mesec_start = mktime(0, 0, 0, $mon, 1, $year);
$last_day = date("t", $mesec_start);
$mesec_end = mktime(0, 0, 0, $mon, $last_day, $year);
//////////////////////////
$ts = "{$year}" . " " . $mon . "%";
//pogoj, da lahko vsi ki imajo nad 80 role_id vidijo vse in dopisujejo vse
if ($role_id < 80) {
    $sql = "SELECT DATE( FROM_UNIXTIME(  `end` ) ) datum, \r\n                      DATE_FORMAT( FROM_UNIXTIME(  `end` ) ,\r\n                      '%d' ) dan,\r\n                      `persons`.`first` ime,\r\n                      `persons`.`last` priimek,\r\n\t              person_id\r\n               FROM  `work_log` ,  `persons`\r\n\t       WHERE  `persons`.`id_person` =  `work_log`.`person_id`\r\n                 and id_role<20\r\n                 and unit={$role_id}\r\n                 AND DATE_FORMAT( FROM_UNIXTIME(  `end` ) ,  '%Y %m' ) LIKE  '{$ts}'\r\n               GROUP BY dan, person_id order by letter ASC";
开发者ID:urki,项目名称:urki-test-project,代码行数:31,代码来源:view_presence.php


示例14: DB_Sql

<?
include "../inc/config.php";


$event_id = $_REQUEST["event_id"];
$tekma_id = $_REQUEST["tekma"];


if (!$event_id or !$tekma_id)
	die("event tekma .. nic ni");

//create db object//
$db = new DB_Sql();

//open template//
$tem = template_open("run.tpl");
//add header footer//
$tem = template_add_head_foot($tem,head,foot);
$tmp = template_get_repeat_text("##START##","##STOP##","##RUNNERS##",$tem);
$row = $tmp[1];
$tem = $tmp[0];

//get out the event title//
$sql = "Select events.name as ename, tekma.name as tname from events,tekma where event_id='$event_id' and tekma_id='$tekma_id'";
$db->query($sql);
if ($db->next_record()) {
	$tem = str_replace("##TITLE##",$db->f("ename"). " - ". $db->f("tname"),$tem);
}

///now the runners//
$sql = "SELECT * 
开发者ID:urki,项目名称:timing,代码行数:31,代码来源:run.php


示例15: check_role

<?php

require_once "inc/config.php";
check_role($ROLE_USER);
$TITLE = "Inventura";
$tem = template_open("scan_inventory.tpl") . ($tem = template_open("scan_last_insert.tpl") . ($tem = template_open("scan_not_yet.tpl") . ($tem = template_open("scan_last_insert_no_valid.tpl"))));
$tem = template_add_head_foot($tem, head, foot);
if ($role_id) {
    switch ($role_id) {
        case $role_id >= $ROLE_ADMIN:
            $tem = template_clean_up_tags($tem, "##IF_BUT_ADMIN##", 1);
            $tem = str_replace("##IF_ADMIN##", "", $tem);
            $tem = str_replace("##IF_LEADER##", "", $tem);
            break;
        case $role_id <= $ROLE_ADMIN and $role_id >= $ROLE_LEADER:
            $tem = template_clean_up_tags($tem, "##IF_ADMIN##", 1);
            $tem = str_replace("##IF_BUT_LEADER##", "", $tem);
            break;
        case $role_id <= $ROLE_LEADER and $role_id >= $ROLE_EMPLOYED:
            $tem = template_clean_up_tags($tem, "##IF_ADMIN##", 1);
            $tem = template_clean_up_tags($tem, "##IF_LEADER##", 1);
            $tem = str_replace("##IF_BUT_LEADER##", "", $tem);
            break;
        default:
            $tem = template_clean_up_tags($tem, "##IF_ADMIN##", 1);
            $tem = template_clean_up_tags($tem, "##IF_LEADER##", 1);
            $tem = template_clean_up_tags($tem, "##IF_EMPLOYED##", 1);
            //$tem =  template_clean_up_tags($tem,"##IF_ZALEC##",1);
    }
} else {
    $tem = template_clean_up_tags($tem, "##IF_ZALEC##", 1);
开发者ID:urki,项目名称:urki-test-project,代码行数:31,代码来源:scan_inventory.php


示例16: check_role

<?php

require_once "inc/config.php";
check_role($ROLE_USER);
$TITLE = "Aktivnosti";
//$tem = template_open("NEWadd_work_emplo.tpl").
$tem = template_open("drekstos.tpl") . ($tem = template_open("NEWview_last_insert_client_diary.tpl") . ($tem = template_open("NEWview_client_diary.tpl")));
//$tem = template_add_head_foot($tem,head,blank);
$tem = template_add_head_foot($tem, head, foot);
//Za izpis tistih katere hočem  - to moram prestavit v funkcijo!!!!!!!
if ($role_id) {
    switch ($role_id) {
        case $role_id >= $ROLE_ADMIN:
            $tem = template_clean_up_tags($tem, "##IF_BUT_ADMIN##", 1);
            $tem = str_replace("##IF_ADMIN##", "", $tem);
            $tem = str_replace("##IF_LEADER##", "", $tem);
            break;
        case $role_id < $ROLE_ADMIN and $role_id >= $ROLE_LEADER:
            $tem = template_clean_up_tags($tem, "##IF_ADMIN##", 1);
            $tem = str_replace("##IF_BUT_LEADER##", "", $tem);
            break;
        case $role_id < $ROLE_LEADER and $role_id >= $ROLE_EMPLOYED:
            $tem = template_clean_up_tags($tem, "##IF_ADMIN##", 1);
            $tem = template_clean_up_tags($tem, "##IF_LEADER##", 1);
            $tem = str_replace("##IF_BUT_LEADER##", "", $tem);
            break;
        default:
            $tem = template_clean_up_tags($tem, "##IF_ADMIN##", 1);
            $tem = template_clean_up_tags($tem, "##IF_LEADER##", 1);
            $tem = template_clean_up_tags($tem, "##IF_EMPLOYED##", 1);
            //$tem =  template_clean_up_tags($tem,"##IF_ZALEC##",1);
开发者ID:urki,项目名称:urki-test-project,代码行数:31,代码来源:NEWaktivnosti.php


示例17: check_role

<?php

//*$DO_NOT_REDIRECT="true";*/
require_once "inc/config.php";
check_role($ROLE__EMPLOYED, "login.php");
$TITLE = "Evidenca prisotnosti";
$tem = template_open("index.tpl");
$tem = template_add_head_foot($tem, head, foot);
///////test za izpis
/*$drek=GetHostByName($REMOTE_ADDR);
echo $drek;
$cvek=gethostbyaddr($_SERVER['REMOTE_ADDR']);
echo " ".$cvek;
$box=php_uname('n');
echo "uname".$box;*/
/////////
/*$sql = "SELECT * FROM persons"; 
//za izbiro person - vendar trenutno ne rabim

$result = $db->fetchAll($sql);
foreach ($result as $res) {
	$names[] .= $res["first"]." ".$res["last"];
	$values[] .= $res["id_person"];
}

$name_dropdown = html_drop_down_arrays("name_drop",$names,$values,$name_drop); */
/*
##########
#Za zaposlene naj bo dostopen samo vpis slu�be, torej tega en rabijo
#$sql = "SELECT * FROM jobtype order by name ASC"; 
#
开发者ID:urki,项目名称:urki-test-project,代码行数:31,代码来源:presence.php


示例18: require_once

<?

$DO_NOT_REDIRECT="false";
require_once("inc/config.php");
check_role($ROLE_EMPLOYED, "login.php");
$TITLE = "Evidenca prisotnosti";


$tem = template_open("add_log_manualy.tpl");
$tem = template_add_head_foot($tem, head, foot);


if ($role_id) {

    switch ($role_id) {

        case ($role_id >= $ROLE_ADMIN):
            $tem = template_clean_up_tags($tem, "##IF_BUT_ADMIN##", 1);
            $tem = str_replace("##IF_ADMIN##", "", $tem);
            $tem = str_replace("##IF_LEADER##", "", $tem);
            $conditionUnit="";//to be in that unit
            break;

        case ($role_id < $ROLE_ADMIN and $role_id >= $ROLE_LEADER):
            $tem = template_clean_up_tags($tem, "##IF_ADMIN##", 1);
            $tem = str_replace("##IF_BUT_LEADER##", "", $tem);
             $conditionUnit="and unit=$unit";//to be in that unit
            break;

        case ($role_id < $ROLE_LEADER and $role_id >= $ROLE_EMPLOYED):
开发者ID:urki,项目名称:urki-test-project,代码行数:30,代码来源:add_log_manualy.php


示例19: template_add_head_foot

function template_add_head_foot($temp) {
    $head=template_open("head.tpl");
    $foot=template_open("foot.tpl");
    return $head."\n\n".'<!-- end head -->'.$temp."\n\n".'<!-- end main template -->'."\n\n".' <!-- start foot -->'."\n\n".$foot;

}
开发者ID:urki,项目名称:dnevnik,代码行数:6,代码来源:template.php


示例20: DB_Sql

<?
include "../inc/config.php";

//create db object//
$db = new DB_Sql();

//open template//
$tem = template_open("print_user.tpl");
//add header footer//
///$tem = template_add_head_foot($tem,head,foot);
$tmp = template_get_repeat_text("##START##","##STOP##","##USER_LIST##",$tem);
$row = $tmp[1];
$tem = $tmp[0];

//get out the events//
$sql = "SELECT * 
FROM users, events
WHERE users.event_id=events.event_id and id_user=$id_user
ORDER BY events.event_id, users.number ASC";
$db->query($sql);
while ($db->next_record()) {
	$table.=$row;
	$table = str_replace("##USER_ID##",$db->f("id_user"),$table);
	$table = str_replace("##NAME##",$db->f("full_name"),$table);
	$table = str_replace("##EVENT##",$db->f("name"),$table);
	$table = str_replace("##NUMBER##",$db->f("number"),$table);
}
//replace template variables//
$tem = str_replace("##USER_LIST##",$table,$tem);
$tem = str_replace("##MESSAGE##",$message,$tem);
///clean up//
开发者ID:urki,项目名称:timing,代码行数:31,代码来源:print_user.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP template_out函数代码示例发布时间:2022-05-23
下一篇:
PHP template_menu函数代码示例发布时间: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