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

PHP template_init函数代码示例

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

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



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

示例1: template_init

<?php

include "../../../framework/framework.php";
// Define page specific text for template
$module = "contact";
template_init(4);
template_define_elements();
ob_start();
//Include Form
//	print "SELECT SUM(spese_imponibili) as simp, SUM(spese_non_imponibili) as snimp, SUM(diritti) as dir, SUM(onorari) as onor, SUM(on_onorari) as onor_or, SUM(on_utente) as onor_ut, SUM(acconti) as acco, SUM(anticipazioni) as anti FROM prestazioni m, pratiche p WHERE m.ref_id=p.id AND p.pr_ref_idcliente=".$_GET[id];
$rs = $DB->Execute("SELECT COUNT(DISTINCT m.ref_id) as tot_prats, COUNT(m.id) as tot_prests, SUM(spese_imponibili) as simp, SUM(spese_non_imponibili) as snimp, SUM(diritti) as dir, SUM(onorari) as onor, SUM(on_onorari) as onor_or, SUM(on_utente) as onor_ut, SUM(acconti) as acco, SUM(anticipazioni) as anti FROM prestazioni m, pratiche p WHERE m.ref_id=p.id AND p.pr_ref_idcliente=" . $_GET[id]);
$tot = $rs->FetchRow();
//Search for billing done
$cnt = 0;
$rs3 = $DB->Execute("SELECT DISTINCT nota1,nota2 FROM prestazioni m, pratiche p WHERE m.ref_id=p.id AND p.pr_ref_idcliente=" . $_GET[id] . " AND nota1 <> '' AND nota2 <> ''");
while (!$rs3->EOF) {
    if ($cnt > 0) {
        $billem .= ", ";
    }
    $nota_emessa = $rs3->FetchRow();
    $billem .= $nota_emessa[nota1] . '/' . $nota_emessa[nota2];
    $cnt++;
}
//Search for fatture done
$cnt = 0;
$rs2 = $DB->Execute("SELECT * FROM contact WHERE id=" . $_GET[id]);
$cont = $rs2->FetchRow();
$tot[billem] = $billem;
$tot[fattem] = $fattem;
$tot[codice] = $cont[codice];
$tot[nome] = $cont[nome];
开发者ID:HadoDokis,项目名称:knomos-plus,代码行数:31,代码来源:contact_sitcont.php


示例2: nav

        }
        if (!function_exists('nav')) {
            function nav()
            {
            }
        }
        if (!function_exists('page_footer')) {
            function page_footer()
            {
            }
        }
        if (!function_exists('document_close')) {
            function document_close()
            {
            }
        }
        //now we load the execute the page
        template_init();
    }
} elseif ($ajax) {
    /* ajax request, we're just going to be responding with a json string */
    page();
} elseif ($post) {
    /* this is a POST */
    page();
} elseif ($template == '') {
    print "No template or page function defined for this url.";
} else {
    die("Not sure how you got here.");
}
page_cleanup();
开发者ID:Pioneer-Web-Development,项目名称:MangoV2,代码行数:31,代码来源:bootstrap.php


示例3: giornaliero

$fltInCorso = $CONF[url_base] . $CONF[dir_modules] . "calendar/pages/app_filter.php?form_id=listcont&form_page=1&title=&day_from[day]=&day_from[month]=&day_from[year]=&day_to[day]=&day_to[month]=&day_to[year]=&codice[text]=&codice[realval]=&ref_prat[text]=&ref_prat[realval]=&operatore[text]=avv1&operatore[realval]=&done[]=0&type[]=&type_app[]=&note=&send=Cerca&fltr=incorso";
$fltRiserva = $CONF[url_base] . $CONF[dir_modules] . "calendar/pages/app_filter.php?form_id=listcont&form_page=1&title=&day_from[day]=&day_from[month]=&day_from[year]=&day_to[day]=&day_to[month]=&day_to[year]=&codice[text]=&codice[realval]=&ref_prat[text]=&ref_prat[realval]=&operatore[text]=avv1&operatore[realval]=&done[]=1&type[]=&type_app[]=&note=&send=Cerca&fltr=inriserva";
$fltCompletato = $CONF[url_base] . $CONF[dir_modules] . "calendar/pages/app_filter.php?form_id=listcont&form_page=1&title=&day_from[day]=&day_from[month]=&day_from[year]=&day_to[day]=&day_to[month]=&day_to[year]=&codice[text]=&codice[realval]=&ref_prat[text]=&ref_prat[realval]=&operatore[text]=avv1&operatore[realval]=&done[]=2&type[]=&type_app[]=&note=&send=Cerca&fltr=completati";
$fltDaAggiornare = $CONF[url_base] . $CONF[dir_modules] . "calendar/pages/app_filter.php?form_id=listcont&form_page=1&title=&day_from[day]=&day_from[month]=&day_from[year]=&day_to[day]=&day_to[month]=&day_to[year]=&codice[text]=&codice[realval]=&ref_prat[text]=&ref_prat[realval]=&operatore[text]=avv1&operatore[realval]=&done[]=3&type[]=&type_app[]=&note=&send=Cerca&fltr=daaggiornare";
$fltProvvedimenti = $CONF[url_base] . $CONF[dir_modules] . "calendar/pages/app_filter.php?form_id=listcont&form_page=1&title=&day_from[day]=&day_from[month]=&day_from[year]=&day_to[day]=&day_to[month]=&day_to[year]=&codice[text]=&codice[realval]=&ref_prat[text]=&ref_prat[realval]=&operatore[text]=avv1&operatore[realval]=&done[]=&type[]=2&type_app[]=&note=&send=Cerca&fltr=provvedimenti";
$fltNote = $CONF[url_base] . $CONF[dir_modules] . "calendar/pages/app_filter.php?form_id=listcont&form_page=1&title=&day_from[day]=&day_from[month]=&day_from[year]=&day_to[day]=&day_to[month]=&day_to[year]=&codice[text]=&codice[realval]=&ref_prat[text]=&ref_prat[realval]=&operatore[text]=avv1&operatore[realval]=&done[]=&type[]=3&type_app[]=&note=&send=Cerca&fltr=note";
$PAGE[PAGE_PICTITLE] = "ico_home_med.gif";
$PAGE_ELEMENT[PAGE][1][0][func] = "pratiche_element_1";
$PAGE_ELEMENT[PAGE][2][0][func] = "calendar_element_2";
$PAGE_ELEMENT[PAGE][3][0][func] = "contact_element_1";
$Select = ' |&nbsp;&nbsp;<span > Filtra gli impegni per: ' . "<select name='SelZoho' id='SelZoho' size='1' onchange='location.href=value'  onFocus=(this.className='campo-focus-02') onBlur=(this.className='null') >\r\n\t\t<option selected='selected' value=''>Selezionare il filtro</option>\r\n\t\t<option value='{$fltInCorso}'>Dinamica: In corso</option>\r\n\t\t<option value='{$fltRiserva}'>Dinamica: Riserva / In attesa</option>\r\n\t\t<option value='{$fltCompletato}'>Dinamica: Completato</option>\r\n\t\t<option value='{$fltDaAggiornare}'>Dinamica: Da aggiornare</option>\r\n\t\t<option value='{$fltProvvedimenti}'>Tipo: Provvedimenti</option>\r\n\t\t<option value='{$fltNote}'>Tipo: Note</option>\r\n\t\t<option value='{$flt0gg}'>Planning: giornaliero (oggi)</option>\r\n\t\t<option value='{$flt1gg}'>Planning: domani</option>\r\n\t\t<option value='{$flt2gg}'>Planning: oggi e domani</option>\r\n\t\t<option value='{$flt7gg}'>Planning: settimanale</option>\r\n\t\t<option value='{$flt30gg}'>Planning: mensile</option>\r\n\t\t</option>\r\n\t\t</select></span >";
//URLS FOR SCADENZE
$url1 = make_url(array("scad_type" => 1), 1);
$url2 = make_url(array("scad_type" => 2), 1);
$url3 = make_url(array("scad_type" => 3), 1);
if ($_GET[scad_type] == 1) {
    $PAGE[TXT_SCADLINK] = CALENDAR_APPS . ' | <a href="' . $url2 . '">' . CALENDAR_SCADS . '</a> | <a href="' . $url3 . '">' . FW_ALL . '</a>' . $Select;
} elseif ($_GET[scad_type] == 2) {
    $PAGE[TXT_SCADLINK] = '<a href="' . $url1 . '">' . CALENDAR_APPS . '</a> | ' . CALENDAR_SCADS . ' | <a href="' . $url3 . '">' . FW_ALL . '</a>' . $Select;
} else {
    $PAGE[TXT_SCADLINK] = '<a href="' . $url1 . '">' . CALENDAR_APPS . '</a> | <a href="' . $url2 . '">' . CALENDAR_SCADS . '</a> | ' . FW_ALL . $Select;
}
if ($_SESSION[mobile] == true) {
    template_init(5);
    //mobile=5 - normale=2
} else {
    template_init(2);
    //mobile=5 - normale=2
}
template_define_elements();
final_render();
开发者ID:HadoDokis,项目名称:knomos-plus,代码行数:31,代码来源:main.php


示例4: loadTheme


//.........这里部分代码省略.........
        // @todo added because some $settings in template_init are necessary even in xml mode. Maybe move template_init to a settings file?
        loadTemplate('index');
        loadTemplate('Xml');
        Template_Layers::getInstance()->removeAll();
    } elseif (!empty($_REQUEST['action']) && in_array($_REQUEST['action'], $simpleActions)) {
        loadLanguage('index+Addons');
        Template_Layers::getInstance()->removeAll();
    } else {
        // Custom templates to load, or just default?
        if (isset($settings['theme_templates'])) {
            $templates = explode(',', $settings['theme_templates']);
        } else {
            $templates = array('index');
        }
        // Load each template...
        foreach ($templates as $template) {
            loadTemplate($template);
        }
        // ...and attempt to load their associated language files.
        $required_files = implode('+', array_merge($templates, array('Addons')));
        loadLanguage($required_files, '', false);
        // Custom template layers?
        if (isset($settings['theme_layers'])) {
            $layers = explode(',', $settings['theme_layers']);
        } else {
            $layers = array('html', 'body');
        }
        $template_layers = Template_Layers::getInstance(true);
        foreach ($layers as $layer) {
            $template_layers->addBegin($layer);
        }
    }
    // Initialize the theme.
    if (function_exists('template_init')) {
        $settings = array_merge($settings, template_init());
    }
    // Call initialization theme integration functions.
    call_integration_hook('integrate_init_theme', array($id_theme, &$settings));
    // Guests may still need a name.
    if ($context['user']['is_guest'] && empty($context['user']['name'])) {
        $context['user']['name'] = $txt['guest_title'];
    }
    // Any theme-related strings that need to be loaded?
    if (!empty($settings['require_theme_strings'])) {
        loadLanguage('ThemeStrings', '', false);
    }
    // Load font Awesome fonts
    loadCSSFile('font-awesome.min.css');
    // We allow theme variants, because we're cool.
    $context['theme_variant'] = '';
    $context['theme_variant_url'] = '';
    if (!empty($settings['theme_variants'])) {
        // Overriding - for previews and that ilk.
        if (!empty($_REQUEST['variant'])) {
            $_SESSION['id_variant'] = $_REQUEST['variant'];
        }
        // User selection?
        if (empty($settings['disable_user_variant']) || allowedTo('admin_forum')) {
            $context['theme_variant'] = !empty($_SESSION['id_variant']) ? $_SESSION['id_variant'] : (!empty($options['theme_variant']) ? $options['theme_variant'] : '');
        }
        // If not a user variant, select the default.
        if ($context['theme_variant'] == '' || !in_array($context['theme_variant'], $settings['theme_variants'])) {
            $context['theme_variant'] = !empty($settings['default_variant']) && in_array($settings['default_variant'], $settings['theme_variants']) ? $settings['default_variant'] : $settings['theme_variants'][0];
        }
        // Do this to keep things easier in the templates.
        $context['theme_variant'] = '_' . $context['theme_variant'];
开发者ID:KeiroD,项目名称:Elkarte,代码行数:67,代码来源:Load.php


示例5: template_init

<?php

include "../../../framework/framework.php";
include "../functions.php";
$fltInCorso = $CONF[url_base] . $CONF[dir_modules] . "calendar/pages/app_search.php?form_id=listcont&form_page=1&title=&day_from[day]=&day_from[month]=&day_from[year]=&day_to[day]=&day_to[month]=&day_to[year]=&codice[text]=&codice[realval]=&ref_prat[text]=&ref_prat[realval]=&operatore[text]=avv1&operatore[realval]=&done[]=0&type[]=&type_app[]=&note=&send=Cerca&fltr=incorso";
$fltRiserva = $CONF[url_base] . $CONF[dir_modules] . "calendar/pages/app_search.php?form_id=listcont&form_page=1&title=&day_from[day]=&day_from[month]=&day_from[year]=&day_to[day]=&day_to[month]=&day_to[year]=&codice[text]=&codice[realval]=&ref_prat[text]=&ref_prat[realval]=&operatore[text]=avv1&operatore[realval]=&done[]=1&type[]=&type_app[]=&note=&send=Cerca&fltr=inriserva";
$fltCompletato = $CONF[url_base] . $CONF[dir_modules] . "calendar/pages/app_search.php?form_id=listcont&form_page=1&title=&day_from[day]=&day_from[month]=&day_from[year]=&day_to[day]=&day_to[month]=&day_to[year]=&codice[text]=&codice[realval]=&ref_prat[text]=&ref_prat[realval]=&operatore[text]=avv1&operatore[realval]=&done[]=2&type[]=&type_app[]=&note=&send=Cerca&fltr=completati";
$fltDaAggiornare = $CONF[url_base] . $CONF[dir_modules] . "calendar/pages/app_search.php?form_id=listcont&form_page=1&title=&day_from[day]=&day_from[month]=&day_from[year]=&day_to[day]=&day_to[month]=&day_to[year]=&codice[text]=&codice[realval]=&ref_prat[text]=&ref_prat[realval]=&operatore[text]=avv1&operatore[realval]=&done[]=3&type[]=&type_app[]=&note=&send=Cerca&fltr=daaggiornare";
$fltProvvedimenti = $CONF[url_base] . $CONF[dir_modules] . "calendar/pages/app_search.php?form_id=listcont&form_page=1&title=&day_from[day]=&day_from[month]=&day_from[year]=&day_to[day]=&day_to[month]=&day_to[year]=&codice[text]=&codice[realval]=&ref_prat[text]=&ref_prat[realval]=&operatore[text]=avv1&operatore[realval]=&done[]=&type[]=2&type_app[]=&note=&send=Cerca&fltr=provvedimenti";
$fltNote = $CONF[url_base] . $CONF[dir_modules] . "calendar/pages/app_search.php?form_id=listcont&form_page=1&title=&day_from[day]=&day_from[month]=&day_from[year]=&day_to[day]=&day_to[month]=&day_to[year]=&codice[text]=&codice[realval]=&ref_prat[text]=&ref_prat[realval]=&operatore[text]=avv1&operatore[realval]=&done[]=&type[]=3&type_app[]=&note=&send=Cerca&fltr=note";
$Select = ' <span > Filtra gli impegni per: ' . "<select name='SelZoho' id='SelZoho' size='1' onchange='location.href=value'  onFocus=(this.className='campo-focus-02') onBlur=(this.className='null') >\n\t\t<option selected='selected' value=''>Selezionare il filtro</option>\n\t\t<option value='{$fltInCorso}'>Dinamica: In corso</option>\n\t\t<option value='{$fltRiserva}'>Dinamica: Riserva / In attesa</option>\n\t\t<option value='{$fltCompletato}'>Dinamica: Completato</option>\n\t\t<option value='{$fltDaAggiornare}'>Dinamica: Da aggiornare</option>\n\t\t<option value='{$fltProvvedimenti}'>Tipo: Provvedimenti</option>\n\t\t<option value='{$fltNote}'>Tipo: Note</option>\n\t\t</option>\n\t\t</select></span >";
$module = "calendar";
template_init(10);
print $Select;
ob_start();
//Include Form
if (check_perm_mod($module, "r") == 1) {
    $thissearch = load_fwobject("search", $module, 0);
    if ($_GET[form_id] == $thissearch[form][name]) {
        $error = check_form($thissearch[form], $_GET, $page);
        if ($error == 1) {
            print menage_search($thissearch[search]);
            //menage_search1 in: FRAMEWORK/SEARCH.PHP
        } else {
            print draw_form($thissearch[form], $module, $error, $_GET);
        }
    } else {
        print draw_form($thissearch[form], $module);
    }
} else {
    $response[title] = FW_ERROR_NO_PERM;
开发者ID:HadoDokis,项目名称:knomos-plus,代码行数:31,代码来源:app_search.php


示例6: template_init

<?php

include "../../../framework/framework.php";
include "../../../config/config.php";
include "../../../config/config_plus.php";
// Define page specific text for template
$module = "pratiche";
template_init(14);
template_define_elements();
ob_start();
?>

<table width="100%" height="35%" border="0" cellspacing="1" class="form-01-table">

<?php 
//Include Form
$sql = "SELECT id, pr_codice FROM pratiche ORDER BY pr_codice";
$esegui_query = mysql_query($sql) or die("Errore di autenticazione. ");
$num_righe = mysql_num_rows($esegui_query);
if ($num_righe > 0) {
    while ($campo = mysql_fetch_array($esegui_query)) {
        $rs = $DB->Execute("SELECT SUM(spese_imponibili) as simp, SUM(spese_non_imponibili) as snimp, SUM(diritti) as dir, SUM(onorari) as onor, SUM(on_onorari) as onor_or, SUM(on_utente) as onor_ut, SUM(acconti) as acco, SUM(anticipazioni) as anti FROM prestazioni WHERE ref_id=" . $campo[id]);
        $tot = $rs->FetchRow();
        $rs2 = $DB->Execute("SELECT * FROM pratiche WHERE id=" . $campo[id]);
        $prat = $rs2->FetchRow();
        //Search for billing done
        $cnt = 0;
        $rs3 = $DB->Execute("SELECT DISTINCT nota1,nota2 FROM prestazioni WHERE ref_id=" . $campo[id] . " AND nota1 <> '0'");
        while (!$rs3->EOF) {
            if ($cnt > 0) {
                $billem .= ", ";
开发者ID:HadoDokis,项目名称:knomos-plus,代码行数:31,代码来源:pratiche_fuorifido.php


示例7: action_setthemesettings


//.........这里部分代码省略.........
     if (file_exists($settings['theme_dir'] . '/index.template.php')) {
         $file_contents = implode("\n", file($settings['theme_dir'] . '/index.template.php'));
         if (preg_match('~\'theme_variants\'\\s*=>(.+?\\)),$~sm', $file_contents, $matches)) {
             eval('global $settings; $settings[\'theme_variants\'] = ' . $matches[1] . ';');
         }
         call_integration_hook('integrate_init_theme', array($theme, &$settings));
     }
     // Submitting!
     if (isset($_POST['save'])) {
         // Allowed?
         checkSession();
         validateToken('admin-sts');
         if (empty($_POST['options'])) {
             $_POST['options'] = array();
         }
         if (empty($_POST['default_options'])) {
             $_POST['default_options'] = array();
         }
         // Make sure items are cast correctly.
         foreach ($context['theme_settings'] as $item) {
             // Unwatch this item if this is just a separator.
             if (!is_array($item)) {
                 continue;
             }
             // Clean them up for the database
             foreach (array('options', 'default_options') as $option) {
                 if (!isset($_POST[$option][$item['id']])) {
                     continue;
                 } elseif (empty($item['type'])) {
                     $_POST[$option][$item['id']] = $_POST[$option][$item['id']] ? 1 : 0;
                 } elseif ($item['type'] == 'number') {
                     $_POST[$option][$item['id']] = (int) $_POST[$option][$item['id']];
                 }
             }
         }
         // Set up the sql query.
         $inserts = array();
         foreach ($_POST['options'] as $opt => $val) {
             $inserts[] = array($theme, 0, $opt, is_array($val) ? implode(',', $val) : $val);
         }
         foreach ($_POST['default_options'] as $opt => $val) {
             $inserts[] = array(1, 0, $opt, is_array($val) ? implode(',', $val) : $val);
         }
         // If we're actually inserting something..
         if (!empty($inserts)) {
             updateThemeOptions($inserts);
         }
         // Clear and Invalidate the cache.
         cache_put_data('theme_settings-' . $theme, null, 90);
         cache_put_data('theme_settings-1', null, 90);
         updateSettings(array('settings_updated' => time()));
         redirectexit('action=admin;area=theme;sa=list;th=' . $theme . ';' . $context['session_var'] . '=' . $context['session_id']);
     }
     $context['sub_template'] = 'set_settings';
     $context['page_title'] = $txt['theme_settings'];
     foreach ($settings as $setting => $dummy) {
         if (!in_array($setting, array('theme_url', 'theme_dir', 'images_url', 'template_dirs'))) {
             $settings[$setting] = htmlspecialchars__recursive($settings[$setting]);
         }
     }
     $context['settings'] = $context['theme_settings'];
     $context['theme_settings'] = $settings;
     foreach ($context['settings'] as $i => $setting) {
         // Separators are dummies, so leave them alone.
         if (!is_array($setting)) {
             continue;
         }
         // Create the right input fields for the data
         if (!isset($setting['type']) || $setting['type'] == 'bool') {
             $context['settings'][$i]['type'] = 'checkbox';
         } elseif ($setting['type'] == 'int' || $setting['type'] == 'integer') {
             $context['settings'][$i]['type'] = 'number';
         } elseif ($setting['type'] == 'string') {
             $context['settings'][$i]['type'] = 'text';
         }
         if (isset($setting['options'])) {
             $context['settings'][$i]['type'] = 'list';
         }
         $context['settings'][$i]['value'] = !isset($settings[$setting['id']]) ? '' : $settings[$setting['id']];
     }
     // Do we support variants?
     if (!empty($settings['theme_variants'])) {
         $context['theme_variants'] = array();
         foreach ($settings['theme_variants'] as $variant) {
             // Have any text, old chap?
             $context['theme_variants'][$variant] = array('label' => isset($txt['variant_' . $variant]) ? $txt['variant_' . $variant] : $variant, 'thumbnail' => !file_exists($settings['theme_dir'] . '/images/thumbnail.png') || file_exists($settings['theme_dir'] . '/images/thumbnail_' . $variant . '.png') ? $settings['images_url'] . '/thumbnail_' . $variant . '.png' : $settings['images_url'] . '/thumbnail.png');
         }
         $context['default_variant'] = !empty($settings['default_variant']) && isset($context['theme_variants'][$settings['default_variant']]) ? $settings['default_variant'] : $settings['theme_variants'][0];
     }
     // Restore the current theme.
     loadTheme($old_id, false);
     $settings = $old_settings;
     // Reinit just incase.
     if (function_exists('template_init')) {
         $settings += template_init();
     }
     loadTemplate('ManageThemes');
     // We like Kenny better than Token.
     createToken('admin-sts');
 }
开发者ID:scripple,项目名称:Elkarte,代码行数:101,代码来源:ManageThemes.controller.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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