コード例 #1
0
ファイル: etc_admin.php プロジェクト: KimuraYoichi/PukiWiki
function admin_fetch_inc_footer($is_secure = true)
{
    $inc_smarty = new OpenPNE_Smarty($GLOBALS['SMARTY']);
    $inc_smarty->templates_dir = 'admin/templates';
    $inc_smarty->assign('is_secure', $is_secure);
    return $inc_smarty->ext_fetch('inc_footer.tpl');
}
コード例 #2
0
ファイル: mail_send.php プロジェクト: KimuraYoichi/PukiWiki
/**
 * mailテンプレート内容をfetch
 *
 * @param string $tpl_name テンプレート名(/templates/mail 直下のファイル)
 * @param array $params Smartyでassignされる連想配列
 * @return string Smartyが出力したHTMLの文字列
 */
function fetch_mail_m_tpl($tpl_name, $params)
{
    $params["OPENPNE_URL"] = OPENPNE_URL;
    $params["SNS_NAME"] = SNS_NAME;
    $params["ADMIN_EMAIL"] = ADMIN_EMAIL;
    $params["CATCH_COPY"] = CATCH_COPY;
    $params["OPERATION_COMPANY"] = OPERATION_COMPANY;
    $params["COPYRIGHT"] = COPYRIGHT;
    $smarty = new OpenPNE_Smarty($GLOBALS['SMARTY'], false);
    $smarty->assign($params);
    $smarty->assign('inc_signature', fetch_inc_signature($smarty));
    $tpl_name = str_replace('.tpl', '', $tpl_name);
    if (util_is_unused_mail($tpl_name)) {
        return false;
    }
    if ($smarty->template_exists('db:' . $tpl_name)) {
        $tpl = 'db:' . $tpl_name;
        $cache_id = $compile_id = 'mail';
    } else {
        $place = '';
        $path = sprintf('templates/mail/%s.tpl', $tpl_name);
        $tpl = 'file:' . mail_ext_search($path, $place);
        $cache_id = $compile_id = 'mail_' . $place;
    }
    $subject_and_body = $smarty->fetch($tpl, $cache_id, $compile_id);
    return explode("\n", $subject_and_body, 2);
}
コード例 #3
0
ファイル: page.php プロジェクト: KimuraYoichi/PukiWiki
/**
 * inc_page_footer.tpl
 */
function fetch_inc_page_footer($is_secure = false)
{
    $inc_smarty = new OpenPNE_Smarty($GLOBALS['SMARTY']);
    $inc_smarty->templates_dir = 'pc/templates';
    $inc_smarty->assign('PHPSESSID', md5(session_id()));
    if ($is_secure) {
        $inc_smarty->assign('inc_page_footer', p_common_c_siteadmin4target_pagename('inc_page_footer_after'));
    } else {
        $inc_smarty->assign('inc_page_footer', p_common_c_siteadmin4target_pagename('inc_page_footer_before'));
    }
    return $inc_smarty->ext_fetch('inc_page_footer.tpl');
}
コード例 #4
0
function biz_getHomeGroupList($c_member_id)
{
    $inc_smarty = new OpenPNE_Smarty($GLOBALS['SMARTY']);
    $inc_smarty->assign('PHPSESSID', md5(session_id()));
    $inc_smarty->templates_dir = 'pc/templates';
    $inc_smarty->assign("group_list", biz_getJoinGroup($c_member_id, 9));
    $inc_smarty->assign("group_count", biz_getGroupCount($c_member_id));
    $inc_smarty->assign("c_member_id", $c_member_id);
    $content = $inc_smarty->fetch('file:' . OPENPNE_MODULES_BIZ_DIR . '/biz/templates/inc_biz_home_group_list.tpl');
    return $content;
}
コード例 #5
0
ファイル: controller.php プロジェクト: KimuraYoichi/PukiWiki
function openpne_display_error($errors = array(), $notfound = false)
{
    $smarty = new OpenPNE_Smarty($GLOBALS['SMARTY']);
    $smarty->setOutputCharset('SJIS');
    $smarty->assign('notfound', $notfound);
    if (OPENPNE_DEBUGGING) {
        $smarty->assign('errors', (array) $errors);
        $smarty->assign('debug_backtrace', util_filter_backtrace(debug_backtrace()));
    }
    $smarty->ext_display('error.tpl');
    exit;
}
コード例 #6
0
ファイル: Action.php プロジェクト: KimuraYoichi/PukiWiki
 /**
  * Viewにセットされた値を取得
  *
  * @param string $key
  * @return mixed
  */
 function get($key)
 {
     return $this->view->get_template_vars($key);
 }
コード例 #7
0
ファイル: ktai.php プロジェクト: KimuraYoichi/PukiWiki
function ktai_display_error($errors)
{
    $smarty = new OpenPNE_Smarty($GLOBALS['SMARTY']);
    $smarty->setOutputCharset('SJIS');
    $smarty->templates_dir = 'ktai/templates';
    $smarty->assign('inc_ktai_header', fetch_inc_ktai_header());
    $smarty->assign('inc_ktai_footer', fetch_inc_ktai_footer());
    $smarty->assign('errors', (array) $errors);
    $smarty->assign('ktai_color_config', util_get_color_config_ktai());
    $smarty->ext_display('error.tpl');
    exit;
}