本文整理汇总了PHP中loadtemplate函数的典型用法代码示例。如果您正苦于以下问题:PHP loadtemplate函数的具体用法?PHP loadtemplate怎么用?PHP loadtemplate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了loadtemplate函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: TPCredits
function TPCredits()
{
tp_hidebars();
$context['TPortal']['not_forum'] = false;
if (loadLanguage('TPhelp') == false) {
loadLanguage('TPhelp', 'english');
}
loadtemplate('TPhelp');
}
开发者ID:DiegoCortes,项目名称:TinyPortal,代码行数:9,代码来源:TPhelp.php
示例2: Staff
function Staff()
{
global $context, $mbname, $txt;
//Check if the current user can view the staff list
isAllowedTo('view_stafflist');
loadtemplate('Staff');
//Load the main staff template
$context['sub_template'] = 'main';
//Set the page title
$context['page_title'] = $mbname . ' - ' . $txt['smfstaff_stafflist'];
}
开发者ID:VBGAMER45,项目名称:SMFMods,代码行数:11,代码来源:Staff.php
示例3: TagsMain
function TagsMain()
{
loadtemplate('Tagging');
loadLanguage('Tagging');
$subActions = array('addtag' => 'TaggingSystem_Add', 'submittag' => 'TaggingSystem_Submit', 'deletetag' => 'TaggingSystem_Delete', 'admin' => 'TagsSettings', 'admin2' => 'TagsSettings2', 'cleanup' => 'TagCleanUp');
if (!empty($subActions[@$_GET['sa']])) {
$subActions[$_GET['sa']]();
} else {
ViewTags();
}
}
开发者ID:norv,项目名称:EosAlpha,代码行数:11,代码来源:Tagging.php
示例4: template_main
function template_main()
{
global $settings;
// modulebased?
if (!empty($settings['module_display'])) {
loadtemplate('/modules/display/' . $settings['module_display']);
call_user_func($settings['module_display']);
} else {
my_display();
}
}
开发者ID:Bloc67,项目名称:ShelfLife,代码行数:11,代码来源:Display.template.php
示例5: UPInternalPageMain
function UPInternalPageMain()
{
global $sourcedir, $context, $ultimateportalSettings;
//load template and language
loadtemplate('UPInternalPage');
loadLanguage('UPInternalPage');
//Is active the Internal Page module?
if (empty($ultimateportalSettings['ipage_enable'])) {
fatal_lang_error('ultport_error_no_active', false);
}
$subActions = array('main' => 'IPMain', 'view' => 'View', 'add' => 'Add', 'edit' => 'Edit', 'delete' => 'Delete', 'inactive' => 'Inactive', 'view-inactive' => 'ViewInactive');
$_REQUEST['sa'] = !empty($_REQUEST['sa']) && !empty($subActions[$_REQUEST['sa']]) ? $_REQUEST['sa'] : 'main';
$subActions[$_REQUEST['sa']]();
}
开发者ID:4kstore,项目名称:UltimatePortal-0.4,代码行数:14,代码来源:UPInternalPage.php
示例6: globalhf
function globalhf()
{
//Check if the current user can change headers footers
isAllowedTo('admin_forum');
loadtemplate('globalhf');
//Global Headers Footers Actions
$subActions = array('view' => 'view', 'save' => 'save');
// Follow the sa or just go to View function
if (!empty($subActions[@$_GET['sa']])) {
$subActions[@$_GET['sa']]();
} else {
$subActions['view']();
}
}
开发者ID:VBGAMER45,项目名称:SMFMods,代码行数:14,代码来源:globalhf.php
示例7: refferalsMain
function refferalsMain()
{
loadtemplate('refferals');
$subActions = array('settings' => 'refferalsSettings', 'settings2' => 'refferalsSettings2', 'copyright' => 'Referrals_CopyrightRemoval');
if (isset($_REQUEST['sa'])) {
$sa = $_GET['sa'];
} else {
$sa = '';
}
if (!empty($subActions[$sa])) {
$subActions[$sa]();
} else {
RefferalsLinkClick();
}
}
开发者ID:VBGAMER45,项目名称:SMFMods,代码行数:15,代码来源:refferals.php
示例8: Staff
function Staff()
{
//Load the main staff template
loadtemplate('Staff');
//Load the language files
if (loadlanguage('Staff') == false) {
loadLanguage('Staff', 'english');
}
//Staff page actions
$subActions = array('admin' => 'StaffSettings', 'admin2' => 'StaffSettings2', 'add' => 'AddGroup', 'delete' => 'DeleteGroup', 'catup' => 'CatUp', 'catdown' => 'CatDown');
// Follow the sa or just go to main staff page.
if (!empty($subActions[@$_GET['sa']])) {
$subActions[$_GET['sa']]();
} else {
ViewStaffPage();
}
}
开发者ID:VBGAMER45,项目名称:SMFMods,代码行数:17,代码来源:Staff.php
示例9: LinksMain
function LinksMain()
{
// Load the main links template
loadtemplate('Links');
// Load the language files
if (loadlanguage('Links') == false) {
loadLanguage('Links', 'english');
}
// Link actions
$subActions = array('addlink' => 'AddLink', 'addlink2' => 'AddLink2', 'editlink' => 'EditLink', 'editlink2' => 'EditLink2', 'visit' => 'VisitLink', 'deletelink' => 'DeleteLink', 'deletelink2' => 'DeleteLink2', 'catup' => 'CatUp', 'catdown' => 'CatDown', 'addcat' => 'AddCat', 'addcat2' => 'AddCat2', 'editcat' => 'EditCat', 'editcat2' => 'EditCat2', 'deletecat' => 'DeleteCat', 'deletecat2' => 'DeleteCat2', 'rate' => 'RateLink', 'approve' => 'Approve', 'noapprove' => 'NoApprove', 'alist' => 'ApproveList', 'admin' => 'LinksAdmin', 'admin2' => 'LinksAdmin2', 'admincat' => 'LinksAdminCats', 'adminperm' => 'LinksAdminPerm', 'catperm' => 'CatPerm', 'catperm2' => 'CatPerm2', 'catpermdelete' => 'CatPermDelete');
// Follow the sa or just go to main links index.
if (!empty($_GET['sa']) && array_key_exists($_GET['sa'], $subActions)) {
call_user_func($subActions[$_GET['sa']]);
} else {
view();
}
}
开发者ID:VBGAMER45,项目名称:SMFMods,代码行数:17,代码来源:Links.php
示例10: tradermain
function tradermain()
{
loadtemplate('Trader');
// Load the language files
if (loadlanguage('Trader') == false) {
loadLanguage('Trader', 'english');
}
// Trader actions
$subActions = array('main' => 'main', 'report' => 'Report', 'report2' => 'Report2', 'submit' => 'Submit', 'detail' => 'ViewDetail', 'delete' => 'Delete', 'delete2' => 'Delete2', 'submit2' => 'Submit2', 'admin' => 'AdminSettings', 'admin2' => 'AdminSettings2', 'approve' => 'ApproveRating', 'bulkactions' => 'BulkActions');
@($sa = $_GET['sa']);
// Follow the sa or just go to administration.
if (!empty($subActions[$sa])) {
$subActions[$sa]();
} else {
$subActions['main']();
}
}
开发者ID:VBGAMER45,项目名称:SMFMods,代码行数:17,代码来源:Trader.php
示例11: TagsMain
function TagsMain()
{
// Load the main Tags template
loadtemplate('Tags2');
// Load the language files
if (loadlanguage('Tags') == false) {
loadLanguage('Tags', 'english');
}
// Tags actions
$subActions = array('suggest' => 'SuggestTag', 'suggest2' => 'SuggestTag2', 'addtag' => 'AddTag', 'addtag2' => 'AddTag2', 'deletetag' => 'DeleteTag', 'admin' => 'TagsSettings', 'admin2' => 'TagsSettings2', 'cleanup' => 'TagCleanUp');
// Follow the sa or just go to main links index.
if (!empty($subActions[@$_GET['sa']])) {
$subActions[$_GET['sa']]();
} else {
ViewTags();
}
}
开发者ID:VBGAMER45,项目名称:SMFMods,代码行数:17,代码来源:Tags2.php
示例12: pmx_eclnonemodal
/**
* System none modal ECL init
*/
function pmx_eclnonemodal()
{
global $context, $settings, $modSettings, $maintenance, $scripturl, $options, $txt;
if (!empty($modSettings['pmx_eclmodal']) && !pmx_checkECL_Cookie()) {
if (!empty($modSettings['pmxportal_disabled'])) {
loadJavascriptFile(PortaMx_loadCompressed('PortaMx.js', array('dir' => $settings['default_theme_dir'] . '/PortaMx/Scripts/', 'url' => $settings['default_theme_url'] . '/PortaMx/Scripts/')), array('external' => true));
addInlineJavascript('
var pmxIsInit = true;');
loadLanguage('PortaMx/PortaMx');
}
addInlineJavascript('
var eclOverlay = true;
function Setlang(elm){window.location.href = elm.options[elm.selectedIndex].value;}');
loadCSSFile(PortaMx_loadCompressed('pmx_ecl.css', array('dir' => $settings['default_theme_dir'] . '/PortaMx/SysCss/', 'url' => $settings['default_theme_url'] . '/PortaMx/SysCss/')), array('external' => true));
loadtemplate('PortaMx/EclMain');
$context['template_layers'][] = 'eclmain';
}
}
开发者ID:thunderamur,项目名称:PortaMx-Virgo-2.0-Beta-2,代码行数:21,代码来源:SubsCompat.php
示例13: CommentsMain
function CommentsMain()
{
loadtemplate('ProfileComments');
loadlanguage('Post');
// Load the language files
if (loadlanguage('ProfileComments') == false) {
loadLanguage('ProfileComments', 'english');
}
// Profile Comments actions
$subActions = array('view' => 'ProfileCommentsview', 'admin' => 'CommentsAdmin', 'add' => 'ProfileCommentsAdd', 'add2' => 'ProfileCommentsAdd2', 'edit' => 'ProfileCommentsEdit', 'edit2' => 'ProfileCommentsEdit2', 'delete' => 'ProfileCommentsDelete', 'approve' => 'ProfileCommentsApproveComment');
$sa = $_REQUEST['sa'];
// Follow the sa or just go to administration.
if (!empty($subActions[$sa])) {
$subActions[$sa]();
} else {
ProfileCommentsview();
}
}
开发者ID:VBGAMER45,项目名称:SMFMods,代码行数:18,代码来源:ProfileComments.php
示例14: WelcomeTopic
function WelcomeTopic()
{
// Check if they are allowed to admin the forum
isAllowedTo('admin_forum');
// Load the WelcomeTopic template
loadtemplate('WelcomeTopic');
// Load the language files
if (loadlanguage('WelcomeTopic') == false) {
loadLanguage('WelcomeTopic', 'english');
}
// Welcome Topic actions
$subActions = array('admin' => 'WelcomeTopicSettings', 'admin2' => 'WelcomeTopicSettings2', 'add' => 'AddTopic', 'add2' => 'AddTopic2', 'edit' => 'EditTopic', 'edit2' => 'EditTopic2', 'delete' => 'DeleteTopic');
// Follow the sa or main Welcome Topic Settings page.
if (!empty($subActions[@$_GET['sa']])) {
$subActions[$_GET['sa']]();
} else {
WelcomeTopicSettings();
}
}
开发者ID:VBGAMER45,项目名称:SMFMods,代码行数:19,代码来源:WelcomeTopic.php
示例15: PostSchedulerMain
function PostSchedulerMain()
{
// Only Admins should see these options
isAllowedTo('admin_forum');
// Load the maintemplate
loadtemplate('PostScheduler2');
// Load the language files
if (loadlanguage('PostScheduler') == false) {
loadLanguage('PostScheduler', 'english');
}
// Post Scheduler actions
$subActions = array('addpost' => 'AddPost', 'addpost2' => 'AddPost2', 'editpost' => 'EditPost', 'editpost2' => 'EditPost2', 'delpost' => 'DeletePost', 'admin' => 'PostSchedulerAdmin', 'saveset' => 'SaveSettings', 'bulkactions' => 'BulkActions');
// Follow the sa or just go to admin
if (!empty($subActions[@$_REQUEST['sa']])) {
$subActions[$_REQUEST['sa']]();
} else {
PostSchedulerAdmin();
}
}
开发者ID:VBGAMER45,项目名称:SMFMods,代码行数:19,代码来源:PostScheduler2.php
示例16: FeedsMain
function FeedsMain()
{
// Only Admins should see these options
isAllowedTo('admin_forum');
// Load the main feeds template
loadtemplate('FeedPoster');
// Load the language files
if (loadlanguage('FeedPoster') == false) {
loadLanguage('FeedPoster', 'english');
}
// FeedPoster actions
$subActions = array('addfeed' => 'AddFeed', 'addfeed2' => 'AddFeed2', 'editfeed' => 'EditFeed', 'editfeed2' => 'EditFeed2', 'delfeed' => 'DeleteFeed', 'admin' => 'FeedsAdmin', 'saveset' => 'SaveSettings', 'bulkactions' => 'BulkActions');
// Follow the sa or just go to feeds admin
if (!empty($subActions[@$_REQUEST['sa']])) {
$subActions[$_REQUEST['sa']]();
} else {
FeedsAdmin();
}
}
开发者ID:VBGAMER45,项目名称:SMFMods,代码行数:19,代码来源:FeedPoster.php
示例17: UPNewsMain
function UPNewsMain()
{
global $sourcedir, $context, $txt;
global $ultimateportalSettings;
//Inicialized the Ultimate Portal?
$context['ultimate_portal_initialized'] = true;
// Load UltimatePortal Settings
ultimateportalSettings();
// Load UltimatePortal template
loadtemplate('UPNews');
// Load Language
loadLanguage('UPNews');
//Is active the NEWS module?
if (empty($ultimateportalSettings['up_news_enable'])) {
fatal_lang_error('ultport_error_no_active_news', false);
}
//Load subactions for the Ultimate Portal - Module NEWS
$subActions = array('main' => 'ShowNewsMain', 'show-cat' => 'ShowCat', 'view-new' => 'ViewNew', 'add-new' => 'AddNew', 'edit-new' => 'EditNew', 'delete-new' => 'DeleteNew');
$_REQUEST['sa'] = isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']]) ? $_REQUEST['sa'] : 'main';
$subActions[$_REQUEST['sa']]();
}
开发者ID:4kstore,项目名称:UltimatePortal-0.4,代码行数:21,代码来源:UPNews.php
示例18: TagsMain
function TagsMain()
{
// Load the main Tags template
loadtemplate('Tags');
// Load the language files
if (loadlanguage('Tags') == false) {
loadLanguage('Tags', 'english');
}
// Tags actions
$subActions = array('edittopic' => 'EditTopic', 'edittopic2' => 'EditTopic2', 'suggesttopic' => 'SuggestTopic', 'suggesttopic2' => 'SuggestTopic2', 'approvetopic' => 'ApproveTopic', 'deletetopic' => 'DeleteTopic', 'rename' => 'RenameTag', 'viewall' => 'ViewAllTags', 'merge' => 'MergeTag', 'move' => 'MoveTag', 'admin' => 'TagsSettings', 'admin2' => 'TagsSettings2', 'cleanup' => 'TagCleanUp');
// Follow the sa or just go to main links index.
if (!empty($subActions[@$_GET['sa']])) {
$subActions[$_GET['sa']]();
} else {
if (allowedTo('smftags_manage')) {
if (isset($_REQUEST['todo']) || isset($_REQUEST['create'])) {
ManageTags2();
}
ManageTags();
}
ViewTags();
}
}
开发者ID:VBGAMER45,项目名称:SMFMods,代码行数:23,代码来源:Tags.php
示例19: array
//tags that must appear in the header
$templatetags = array("title", "headscript", "script");
while (list($key, $val) = each($templatetags)) {
if (strpos($template['header'], "{" . $val . "}") === false) {
$templatemessage .= "You do not have {" . $val . "} defined in your header\n";
}
}
//tags that must appear in the footer
$templatetags = array();
while (list($key, $val) = each($templatetags)) {
if (strpos($template['footer'], "{" . $val . "}") === false) {
$templatemessage .= "You do not have {" . $val . "} defined in your footer\n";
}
}
//tags that may appear anywhere but must appear
$templatetags = array("nav", "stats", "petition", "motd", "mail", "copyright", "source");
while (list($key, $val) = each($templatetags)) {
if (strpos($template['header'], "{" . $val . "}") === false && strpos($template['footer'], "{" . $val . "}") === false) {
$templatemessage .= "You do not have {" . $val . "} defined in either your header or footer\n";
}
}
if ($templatemessage != "") {
echo "<b>You have one or more errors in your template page!</b><br>" . nl2br($templatemessage);
$template = loadtemplate("yarbrough.htm");
}
$races = array(1 => "Troll", 2 => "Elf", 3 => "Human", 4 => "Dwarf", 0 => "Unknown", 50 => "Hoversheep");
$logd_version = "TDS-0.01";
$session['user']['laston'] = date("Y-m-d H:i:s");
$playermount = getmount($session['user']['hashorse']);
$titles = array(0 => array("Farmboy", "Farmgirl"), 1 => array("Page", "Page"), 2 => array("Squire", "Squire"), 3 => array("Gladiator", "Gladiatrix"), 4 => array("Legionnaire", "Legioness"), 5 => array("Centurion", "Centurioness"), 6 => array("Sir", "Madam"), 7 => array("Reeve", "Reeve"), 8 => array("Steward", "Stewardess"), 9 => array("Mayor", "Mayoress"), 10 => array("Baron", "Baroness"), 11 => array("Count", "Countess"), 12 => array("Viscount", "Viscountess"), 13 => array("Marquis", "Marquisette"), 14 => array("Chancellor", "Chancelress"), 15 => array("Prince", "Princess"), 16 => array("King", "Queen"), 17 => array("Emperor", "Empress"), 18 => array("Angel", "Angel"), 19 => array("Archangel", "Archangel"), 20 => array("Principality", "Principality"), 21 => array("Power", "Power"), 22 => array("Virtue", "Virtue"), 23 => array("Dominion", "Dominion"), 24 => array("Throne", "Throne"), 25 => array("Cherub", "Cherub"), 26 => array("Seraph", "Seraph"), 27 => array("Demigod", "Demigoddess"), 28 => array("Titan", "Titaness"), 29 => array("Archtitan", "Archtitaness"), 30 => array("Undergod", "Undergoddess"));
$beta = getsetting("beta", 0) == 1 || $session['user']['beta'] == 1;
开发者ID:BackupTheBerlios,项目名称:dragonsaga-svn,代码行数:31,代码来源:common.php
示例20: Contact
function Contact()
{
global $context, $mbname, $webmaster_email, $txt, $sourcedir, $modSettings, $scripturl, $func;
// Check if the current user can send a message
isAllowedTo('view_contact');
if (isset($_GET['sa'])) {
if ($_GET['sa'] == 'save') {
// Check whether the visual verification code was entered correctly.
if (isset($modSettings['recaptcha_enabled']) && !empty($modSettings['recaptcha_enabled']) && ($modSettings['recaptcha_enabled'] == 1 && !empty($modSettings['recaptcha_public_key']) && !empty($modSettings['recaptcha_private_key']))) {
if (!empty($_POST["recaptcha_response_field"]) && !empty($_POST["recaptcha_challenge_field"])) {
require_once "{$sourcedir}/recaptchalib.php";
$resp = recaptcha_check_answer($modSettings['recaptcha_private_key'], $_SERVER['REMOTE_ADDR'], $_REQUEST['recaptcha_challenge_field'], $_REQUEST['recaptcha_response_field']);
if (!$resp->is_valid) {
fatal_lang_error('error_wrong_verification_code', false);
}
} else {
fatal_lang_error('error_wrong_verification_code', false);
}
} else {
if ((empty($modSettings['disable_visual_verification']) || $modSettings['disable_visual_verification'] != 1) && (empty($_REQUEST['visual_verification_code']) || strtoupper($_REQUEST['visual_verification_code']) !== $_SESSION['visual_verification_code'])) {
$_SESSION['visual_errors'] = isset($_SESSION['visual_errors']) ? $_SESSION['visual_errors'] + 1 : 1;
if ($_SESSION['visual_errors'] > 3 && isset($_SESSION['visual_verification_code'])) {
unset($_SESSION['visual_verification_code']);
}
fatal_lang_error('visual_verification_failed', false);
} elseif (isset($_SESSION['visual_errors'])) {
unset($_SESSION['visual_errors']);
}
}
$from = $_POST['from'];
if ($from == '') {
fatal_error($txt['smfcontact_errname'], false);
}
$subject = $_POST['subject'];
if ($subject == '') {
fatal_error($txt['smfcontact_errsubject'], false);
}
$message = $_POST['message'];
if ($message == '') {
fatal_error($txt['smfcontact_errmessage'], false);
}
$email = $_POST['email'];
if ($email == '') {
fatal_error($txt['smfcontact_erremail'], false);
}
$subject = $func['htmlspecialchars']($subject, ENT_QUOTES);
$message = $func['htmlspecialchars']($message, ENT_QUOTES);
$from = $func['htmlspecialchars']($from, ENT_QUOTES);
$email = $func['htmlspecialchars']($email, ENT_QUOTES);
$m = $txt['smfcontact_form'] . $mbname . " \n";
$m .= $txt['smfcontact_formname'] . $from . "\n";
$m .= $txt['smfcontact_formemail'] . $email . "\n";
$m .= $txt['smfcontact_ip'] . $_SERVER['REMOTE_ADDR'] . "\n";
$m .= $txt['smfcontact_formmessage'];
$m .= $message;
$m .= "\n";
// For send mail function
require_once $sourcedir . '/Subs-Post.php';
// Send email to webmaster
if (empty($modSettings['smfcontactpage_email'])) {
sendmail($webmaster_email, $subject, $m, $email);
} else {
sendmail($modSettings['smfcontactpage_email'], $subject, $m, $email);
}
// Show template that mail was sent
loadtemplate('Contact');
// Load the main contact template
$context['sub_template'] = 'send';
// Set the page title
$context['page_title'] = $mbname . $txt['smfcontact_titlesent'];
}
} else {
// Load the main Contact template
loadtemplate('Contact');
// Language strings
loadLanguage('Login');
// Load the main Contact template
$context['sub_template'] = 'main';
// Set the page title
$context['page_title'] = $mbname . ' - ' . $txt['smfcontact_contact'];
// Generate a visual verification code to make sure the user is no bot.
$context['visual_verification'] = empty($modSettings['disable_visual_verification']) || $modSettings['disable_visual_verification'] != 1;
if ($context['visual_verification']) {
$context['use_graphic_library'] = in_array('gd', get_loaded_extensions());
$context['verificiation_image_href'] = $scripturl . '?action=verificationcode;rand=' . md5(rand());
// Only generate a new code if one hasn't been set yet
if (!isset($_SESSION['visual_verification_code'])) {
// Skip I, J, L, O and Q.
$character_range = array_merge(range('A', 'H'), array('K', 'M', 'N', 'P'), range('R', 'Z'));
// Generate a new code.
$_SESSION['visual_verification_code'] = '';
for ($i = 0; $i < 5; $i++) {
$_SESSION['visual_verification_code'] .= $character_range[array_rand($character_range)];
}
}
}
}
}
开发者ID:VBGAMER45,项目名称:SMFMods,代码行数:98,代码来源:Contact.php
注:本文中的loadtemplate函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论