ここの情報は古いです。ご理解頂いた上でお取り扱いください。

source: OpenPNE/trunk/webapp/lib/smarty_plugins/resource.db.php @ 1856

Last change on this file since 1856 was 1856, checked in by takanashi, 16 years ago

copyright表記修正

File size: 905 bytes
Line 
1<?php
2/**
3 * @copyright 2005-2007 OpenPNE Project
4 * @license   http://www.php.net/license/3_01.txt PHP License 3.01
5 */
6
7function smarty_resource_db_source($tpl_name, &$tpl_source, &$smarty)
8{
9    $sql = 'SELECT source FROM c_template WHERE name = ?';
10    $params = array(strval($tpl_name));
11    if ($res = db_get_one($sql, $params)) {
12        $tpl_source = $res;
13        return true;
14    } else {
15        return false;
16    }
17}
18
19function smarty_resource_db_timestamp($tpl_name, &$tpl_timestamp, &$smarty)
20{
21    $sql = 'SELECT r_datetime FROM c_template WHERE name = ?';
22    $params = array(strval($tpl_name));
23    if ($res = db_get_one($sql, $params)) {
24        $tpl_timestamp = strtotime($res);
25        return true;
26    } else {
27        return false;
28    }
29}
30
31function smarty_resource_db_secure($tpl_name, &$smarty)
32{
33    return true;
34}
35
36function smarty_resource_db_trusted($tpl_name, &$smarty)
37{
38}
39
40?>
Note: See TracBrowser for help on using the repository browser.