本文整理汇总了PHP中Template::GetTemplate方法的典型用法代码示例。如果您正苦于以下问题:PHP Template::GetTemplate方法的具体用法?PHP Template::GetTemplate怎么用?PHP Template::GetTemplate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Template
的用法示例。
在下文中一共展示了Template::GetTemplate方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ResetPassword
public function ResetPassword()
{
$email = $this->post->email;
if (!$email) {
return false;
} else {
$pilot = PilotData::GetPilotByEmail($email);
if (!$pilot) {
$this->render('login_notfound.tpl');
return;
}
$newpw = substr(md5(date('mdYhs')), 0, 6);
RegistrationData::ChangePassword($pilot->pilotid, $newpw);
$this->set('firstname', $pilot->firstname);
$this->set('lastname', $pilot->lastname);
$this->set('newpw', $newpw);
$message = Template::GetTemplate('email_lostpassword.tpl', true);
Util::SendEmail($pilot->email, 'Password Reset', $message);
$this->render('login_passwordreset.tpl');
}
}
示例2: each
$RANKROWS = '';
while (list($i, $rank) = each($a_rank)) {
// users for this rank
if (isset($a_rank[$i - 1])) {
$r_user = thwb_query("SELECT COUNT(userid) FROM {$pref}" . "user WHERE\n userposts >= " . $rank['rankposts'] . " AND userposts < " . $a_rank[$i - 1]['rankposts']);
list($rankusers) = mysql_fetch_row($r_user);
$r_user = thwb_query("SELECT userid, username FROM {$pref}" . "user WHERE\n userposts >= " . $rank['rankposts'] . " AND userposts < " . $a_rank[$i - 1]['rankposts'] . " ORDER BY userposts DESC LIMIT 1");
$user = mysql_fetch_array($r_user);
} else {
$r_user = thwb_query("SELECT COUNT(userid) FROM {$pref}" . "user WHERE\n userposts >= " . $rank['rankposts']);
list($rankusers) = mysql_fetch_row($r_user);
$r_user = thwb_query("SELECT userid, username FROM {$pref}" . "user WHERE\n userposts >= " . $rank['rankposts'] . " ORDER BY userposts DESC LIMIT 1");
$user = mysql_fetch_array($r_user);
}
if ($rank['rankimage']) {
$rank['rankimage'] = '<img src="' . $rank['rankimage'] . '">';
} else {
$rank['rankimage'] = ' ';
}
$prozent = intval($rankusers / $usercount * 100);
$width = intval($rankusers / $usercount * 120);
if (!$width) {
$width = 1;
}
$invwidth = 120 - $width;
eval($Trankrow->GetTemplate('RANKROWS'));
}
$navpath .= 'Rangübersicht';
eval($Trank->GetTemplate('CONTENT'));
eval($Tframe->GetTemplate());
示例3: write_config
/**
* Write out a config file to the user, give the template name and
* the filename to save the template as to the user
*
* @param mixed $template_name Template to use for config (fspax_config.php)
* @param mixed $save_as File to save as (xacars.ini)
* @return mixed Nothing, sends the file to the user
*
*/
public function write_config($template_name, $save_as)
{
if (!Auth::LoggedIn()) {
echo 'You are not logged in!';
exit;
}
$this->set('pilotcode', PilotData::GetPilotCode(Auth::$pilot->code, Auth::$pilot->pilotid));
$this->set('userinfo', Auth::$pilot);
$this->set('pilot', Auth::$pilot);
$acars_config = Template::GetTemplate($template_name, true);
$acars_config = str_replace("\n", "\r\n", $acars_config);
Util::downloadFile($acars_config, $save_as);
}
示例4: reject_pirep_post
/**
* Reject the report, and then send them the comment
* that was entered into the report
*/
protected function reject_pirep_post()
{
$pirepid = $this->post->pirepid;
$comment = $this->post->comment;
if ($pirepid == '' || $comment == '') {
return;
}
PIREPData::ChangePIREPStatus($pirepid, PIREP_REJECTED);
// 2 is rejected
$pirep_details = PIREPData::GetReportDetails($pirepid);
// If it was previously accepted, subtract the flight data
if (intval($pirep_details->accepted) == PIREP_ACCEPTED) {
PilotData::UpdateFlightData($pirep_details->pilotid, -1 * floatval($pirep->flighttime), -1);
}
//PilotData::UpdatePilotStats($pirep_details->pilotid);
RanksData::CalculateUpdatePilotRank($pirep_details->pilotid);
PilotData::resetPilotPay($pirep_details->pilotid);
StatsData::UpdateTotalHours();
// Send comment for rejection
if ($comment != '') {
$commenter = Auth::$userinfo->pilotid;
// The person logged in commented
PIREPData::AddComment($pirepid, $commenter, $comment);
// Send them an email
$this->set('firstname', $pirep_details->firstname);
$this->set('lastname', $pirep_details->lastname);
$this->set('pirepid', $pirepid);
$message = Template::GetTemplate('email_commentadded.tpl', true);
Util::SendEmail($pirep_details->email, 'Comment Added', $message);
}
LogData::addLog(Auth::$userinfo->pilotid, 'Rejected PIREP #' . $pirepid);
# Call the event
CodonEvent::Dispatch('pirep_rejected', 'PIREPAdmin', $pirep_details);
}
示例5: elseif
} else {
$user['userage'] = (int) $user['userage'];
}
if ($user['usericq'] == 0) {
$user['usericq'] = "";
}
if ($config['showpostslevel'] == 0) {
$user['userposts'] = "- (Vom Administrator deaktiviert)";
} elseif ($config['showpostslevel'] == 1 && $g_user['userid'] != $user['userid']) {
if ($g_user['userisadmin']) {
$user['userposts'] = '- (Versteckt)' . $style['smallfont'] . ' [Admin: Postcount = ' . $user['userposts'] . ' ]' . $style['smallfontend'];
} else {
$user['userposts'] = '- (Versteckt)';
}
}
$user['useremail'] = get_email($user);
$user['username'] = parse_code($user['username']);
$user['userip'] = '';
if ($g_user['userisadmin']) {
$r_online = thwb_query("SELECT onlineip FROM {$pref}" . "online WHERE userid='{$user['userid']}' AND onlinetime > " . (time() - $config['session_timeout']));
if (mysql_num_rows($r_online) > 0) {
$online = mysql_fetch_array($r_online);
$user['userip'] = $style['smallfont'] . ' [Admin: IP = ' . $online['onlineip'] . ', Hostname = ' . gethostbyaddr($online['onlineip']) . ' ]' . $style['smallfontend'];
}
}
$user['useraim'] = parse_code($user['useraim']);
$user['usermsn'] = parse_code($user['usermsn']);
$userurlname = rawurlencode($user['username']);
$navpath .= 'Profilansicht';
eval($Tprofile->GetTemplate("CONTENT"));
eval($Tframe->GetTemplate());
示例6: Template
$Tframe = new Template("templates/" . $style['styletemplate'] . "/frame.html");
$TTopics = new Template("templates/" . $style['styletemplate'] . "/markedlist.html");
$TTopicrow = new Template("templates/" . $style['styletemplate'] . "/markedrow.html");
if (!empty($do_delthreads) && $do_delthreads) {
if (empty($delthreads) || !count($delthreads)) {
message('Fehler', 'Sie müssen ein Thema auswählen.');
}
thwb_query("UPDATE " . $pref . "post SET postemailnotify='0' WHERE userid='" . $g_user['userid'] . "' AND threadid IN (" . join(',', $delthreads) . ")");
message('Themen abbestellt', 'Die markierten Themen wurden abbestellt.');
}
$r_usermarkedthreads = thwb_query("SELECT DISTINCT threadid FROM " . $pref . "post WHERE postemailnotify = '1' AND userid = '" . $g_user['userid'] . "' GROUP BY threadid");
$i = 0;
$TOPICROWS = '';
if (!mysql_num_rows($r_usermarkedthreads)) {
$TTopicrow = new Template('./templates/' . $style['styletemplate'] . '/board_nothreads.html');
eval($TTopicrow->GetTemplate("TOPICROWS"));
} else {
while ($a_thread = mysql_fetch_assoc($r_usermarkedthreads)) {
$i % 2 > 0 ? $thisrowbg = $style['CellB'] : ($thisrowbg = $style['CellA']);
$i++;
$r_thread = mysql_query("SELECT threadid, threadauthor, threadtopic, threadviews, threadreplies, threadtime, boardid, threadlastreplyby FROM " . $pref . "thread WHERE threadid = '" . $a_thread['threadid'] . "'");
if (mysql_num_rows($r_thread) != 0) {
$thread = mysql_fetch_array($r_thread);
$r_board = mysql_query("SELECT boardname FROM " . $pref . "board WHERE boardid = '" . $thread['boardid'] . "'");
$board = mysql_fetch_array($r_board);
$thread['threadtopic'] .= "<BR><span style=\"color:" . $style['color1'] . "\">" . $style['smallfont'] . "Forum: " . $board['boardname'] . $style['smallfontend'] . "</span>";
$thread['threadtime'] = form_date($thread['threadtime']);
eval($TTopicrow->GetTemplate("TOPICROWS"));
} else {
$usermarkedthreads = str_replace(";" . $threadid . ";", ";", $g_user['usermarkedthreads']);
if (strlen($usermarkedthreads) == 1) {
示例7: chopstring
$user['userlocation'] = chopstring(parse_code($user['userlocation']), 50);
if ($user['userhomepage'] == "http://") {
$user['userhomepage'] = '';
}
$user['userhomepage'] = parse_code($user['userhomepage']);
$user['username'] = parse_code($user['username']);
if ($config['showpostslevel'] != 2) {
if (!$g_user['userisadmin']) {
$user['userposts'] = 'n/a';
}
}
$user['useremail'] = get_email($user, true);
if ($user['userhomepage']) {
$user['userhomepage'] = '<a href="' . str_replace('"', '', $user['userhomepage']) . '" target="_blank">' . chopstring($user['userhomepage'], 35) . "</a>";
} else {
$user['userhomepage'] = " ";
}
if (!$user['usericq']) {
$user['usericq'] = " ";
}
if (!$user['userlocation']) {
$user['userlocation'] = " ";
}
eval($TMemberrow->GetTemplate("MEMBER_ROWS"));
$i++;
}
}
$search = str_replace('"', '"', $search);
$navpath .= 'Mitgliederliste';
eval($TMemberlist->GetTemplate("CONTENT"));
eval($TFrame->GetTemplate());
示例8: or
==============================================
(c) 2000-2004 by ThWboard Development Group
download the latest version:
http://www.thwboard.de
This program is free software; you can
redistribute it and/or modify it under the
terms of the GNU General Public License as
published by the Free Software Foundation;
either version 2 of the License, or (at
your option) any later version.
==============================================
*/
define('THWB_NOSESSION_PAGE', true);
include "./inc/header.inc.php";
if (!$P->has_permission(P_CEVENT)) {
message('Fehlende Berechtigung', 'Fehler: Sie haben nicht die benötigte Berechtigung, um diese Seite zu benützen.');
}
$Tframe = new Template("templates/" . $style['styletemplate'] . "/frame.html");
$Tnewevent = new Template("templates/" . $style['styletemplate'] . "/newcalendarentry.html");
$navpath .= 'Neuer Kalendereintrag';
$event['day'] = isset($day) ? $day : '';
$event['month'] = isset($month) ? $month : '';
$event['year'] = isset($year) ? $year : '';
if (!isset($event['subject'])) {
$event['subject'] = '';
}
if (!isset($event['text'])) {
$event['text'] = '';
}
eval($Tnewevent->GetTemplate('CONTENT'));
eval($Tframe->GetTemplate());
示例9: CheckForUpdates
/**
* Show the notification that an update is available
*/
public function CheckForUpdates()
{
if (Config::Get('CHECK_RELEASE_VERSION') == true) {
$key = 'PHPVMS_LATEST_VERSION';
$feed = CodonCache::read($key);
if ($feed === false) {
$url = Config::Get('PHPVMS_API_SERVER') . '/version/get/json/';
# Default to fopen(), if that fails it'll use CURL
$file = new CodonWebService();
$contents = @$file->get($url);
# Something should have been returned
if ($contents == '') {
$msg = '<br /><b>Error:</b> The phpVMS update server could not be contacted.
Check to make sure allow_url_fopen is set to ON in your php.ini, or
that the cURL module is installed (contact your host).';
$this->set('latestnews', $msg);
return;
}
#$xml = @simplexml_load_string($contents);
$message = json_decode($contents);
if (!$message) {
$msg = '<br /><b>Error:</b> There was an error retrieving news. It may be temporary.
Check to make sure allow_url_fopen is set to ON in your php.ini, or
that the cURL module is installed (contact your host).';
$this->set('latestnews', $msg);
return;
}
CodonCache::write($key, $message, 'medium_well');
}
if (Config::Get('CHECK_BETA_VERSION') == true) {
$latest_version = $message->betaversion;
} else {
$latest_version = $message->version;
}
# GET THE VERSION THAT'S THE LATEST AVAILABLE
preg_match('/^[v]?(.*)-([0-9]*)-(.*)/', $latest_version, $matches);
list($FULL_VERSION_STRING, $full_version, $revision_count, $hash) = $matches;
preg_match('/([0-9]*)\\.([0-9]*)\\.([0-9]*)/', $full_version, $matches);
list($full, $major, $minor, $revision) = $matches;
$latest_version = $major . $minor . ($revision + $revision_count);
# GET THE CURRENT VERSION INFO INSTALLED
$installed_version = PHPVMS_VERSION;
preg_match('/^[v]?(.*)-([0-9]*)-(.*)/', $installed_version, $matches);
list($FULL_VERSION_STRING, $full_version, $revision_count, $hash) = $matches;
preg_match('/([0-9]*)\\.([0-9]*)\\.([0-9]*)/', $full_version, $matches);
list($full, $major, $minor, $revision) = $matches;
$installed_version = $major . $minor . ($revision + $revision_count);
#echo "CURRVERSION : $installed_version<br>AVAILVERSION: $latest_version<br>";
if ($installed_version < $latest_version) {
if (Config::Get('CHECK_BETA_VERSION') == true) {
$this->set('message', 'Beta version ' . $message->betaversion . ' is available for download!');
} else {
$this->set('message', 'Version ' . $message->version . ' is available for download! Please update ASAP');
}
$this->set('updateinfo', Template::GetTemplate('core_error.php', true));
}
/* Retrieve latest news from Feedburner RSS, in case the phpVMS site is down
*/
$key = 'PHPVMS_NEWS_FEED';
$feed_contents = CodonCache::read($key);
if ($feed_contents === false) {
$feed_contents = $file->get(Config::Get('PHPVMS_NEWS_FEED'));
CodonCache::write($key, $feed_contents, 'medium_well');
}
$i = 1;
$count = 5;
$contents = '';
$feed = simplexml_load_string($feed_contents);
foreach ($feed->channel->item as $news) {
$news_content = (string) $news->description;
$guid = (string) $news->guid;
$title = (string) $news->title;
$date_posted = str_replace('-0400', '', (string) $news->pubDate);
$contents .= "<div class=\"newsitem\">";
$contents .= '<a href="' . $guid . '"><b>' . $title . '</b></a><br />';
$contents .= $news_content;
$contents .= '<br /><br />Posted: ' . $date_posted;
$contents .= '</div>';
if ($i++ == $count) {
break;
}
}
$this->set('phpvms_news', $contents);
if (Config::Get('VACENTRAL_ENABLED') == true) {
/* Get the latest vaCentral News */
$contents = $file->get(Config::Get('VACENTRAL_NEWS_FEED'));
$feed = simplexml_load_string($contents);
$contents = '';
$i = 1;
$count = 5;
// Show the last 5
foreach ($feed->channel->item as $news) {
$news_content = (string) $news->description;
$date_posted = str_replace('-0400', '', (string) $news->pubDate);
$contents .= "<div class=\"newsitem\">\n\t\t\t\t\t\t\t\t\t<b>{$news->title}</b> {$news_content}\n\t\t\t\t\t\t\t\t\t<br /><br />\n\t\t\t\t\t\t\t\t\tPosted: {$date_posted}\n\t\t\t\t\t\t\t\t</div>";
if ($i++ == $count) {
break;
//.........这里部分代码省略.........
示例10: array
}
}
// Fetching all events...
$a_events = array();
$r_events = thwb_query("SELECT * FROM " . $pref . "calendar\n WHERE eventtime>='{$year}-{$month}-01' AND eventtime<='{$year}-{$month}-{$lastday}'\n AND eventactive='1'\n ORDER BY eventtime, eventtext");
while ($event = mysql_fetch_array($r_events)) {
$a_events[intval(substr($event['eventtime'], 8, 2)) - 1][] = $event;
}
// Creating Eventbox
$eventbox = '';
$r_calendar = mysql_query("SELECT eventid, eventtime, eventsubject FROM " . $pref . "calendar WHERE eventtime >= '{$a_current['year']}-{$a_current['month']}-{$a_current['day']}' ORDER BY eventtime LIMIT 1");
if (mysql_num_rows($r_calendar) > 0) {
$calendar = mysql_fetch_array($r_calendar);
$calendar['eventtime'] = make_date($calendar['eventtime']);
$calendar['eventsubject'] = parse_code($calendar['eventsubject']);
eval($Tcaleventbox->GetTemplate('eventbox'));
}
$boxcount = $lastday + $firstday - 1;
if ($boxcount % 7 > 0) {
$boxcount += 7 - $boxcount % 7;
}
$calendar = '<tr>';
for ($i = 1; $i <= $boxcount; $i++) {
$userbday = '';
$events = '';
if ($i < $firstday || $i >= $lastday + $firstday) {
eval($Tcalrow_empty->GetTemplate('calendar'));
} else {
$thisday = $i + 1 - $firstday;
if (isset($a_birthdays[$thisday - 1])) {
$userbday = implode($a_birthdays[$thisday - 1], ',<br>');
示例11: while
$a_stats['admin_board_text'] = $a_stats['admin_kategorien_text'] = $a_stats['admin_themen_text'] = $a_stats['admin_views_text'] = $a_stats['admin_beitrag_text'] = '';
}
// create $a_stats['admins']
$r_stats = thwb_query("SELECT userid, username FROM " . $pref . "user WHERE userisadmin = 1 AND usernodelete = 0 ORDER BY username ASC");
$a_stats['admins'] = '';
while ($datarow = mysql_fetch_array($r_stats)) {
$a_stats['admins'] .= '<a href="v_profile.php?userid=' . $datarow['userid'] . '" target="_blank">' . $datarow['username'] . '</a>, ';
}
$a_stats['admins'] = substr($a_stats['admins'], 0, -2);
mysql_free_result($r_stats);
unset($datarow);
// create $a_stats['uradmins']
$r_stats = thwb_query("SELECT userid, username FROM " . $pref . "user WHERE userisadmin = 1 AND usernodelete = 1 ORDER BY username ASC");
$a_stats['uradmins'] = '';
while ($datarow = mysql_fetch_array($r_stats)) {
$a_stats['uradmins'] .= '<a href="' . build_link('v_profile.php?userid=' . $datarow['userid']) . '" target="_blank">' . $datarow['username'] . '</a>, ';
}
$a_stats['uradmins'] = substr($a_stats['uradmins'], 0, -2);
mysql_free_result($r_stats);
unset($datarow);
// create $a_stats['newmember']
$r_stats = thwb_query("SELECT userid, username FROM " . $pref . "user ORDER BY userjoin DESC LIMIT 5");
$a_stats['newmember'] = '';
while ($datarow = mysql_fetch_array($r_stats)) {
$a_stats['newmember'] .= '<a href="' . build_link('v_profile.php?userid=' . $datarow['userid']) . '" target="_blank">' . $datarow['username'] . '</a>, ';
}
$a_stats['newmember'] = substr($a_stats['newmember'], 0, -2);
mysql_free_result($r_stats);
unset($datarow);
eval($t_stats->GetTemplate('stats'));
}
示例12: Template
$style['stdfont'] = '<span class="stdfont">';
$style['stdfontend'] = '</span>';
/*
################################################################################
Quicklinks[hack] By Morpheus
################################################################################
*/
$quicklinks = '';
$t_quicklinks = '';
if ($config['enable_quicklinks']) {
$TQuicklinks = new Template('./templates/' . $style['styletemplate'] . '/quicklinks.html');
$r_qlink = thwb_query("SELECT linkid, linkalt, linkcaption FROM " . $pref . "qlink");
while ($qlink = mysql_fetch_array($r_qlink)) {
$quicklinks .= "<A HREF=\"qlinks.php?id={$qlink['linkid']}\" title=\"{$qlink['linkalt']}\" target=_blank>[ {$qlink['linkcaption']} ]</a> ";
}
eval($TQuicklinks->GetTemplate("t_quicklinks"));
}
/*
################################################################################
permissions
################################################################################
*/
global $P;
if (isset($board['boardid'])) {
$P = new Permission($g_user['groupids'], $board['boardid']);
requires_permission(P_VIEW);
} else {
$P = new Permission($g_user['groupids']);
}
/*
################################################################################
示例13: CheckForUpdates
/**
* Show the notification that an update is available
*/
public function CheckForUpdates()
{
if (Config::Get('CHECK_RELEASE_VERSION') == true) {
$url = Config::Get('PHPVMS_API_SERVER') . '/version/get/xml/' . PHPVMS_VERSION;
# Default to fopen(), if that fails it'll use CURL
$file = new CodonWebService();
$contents = @$file->get($url);
# Something should have been returned
if ($contents == '') {
$msg = '<br /><b>Error:</b> The phpVMS update server could not be contacted.
Check to make sure allow_url_fopen is set to ON in your php.ini, or
that the cURL module is installed (contact your host).';
$this->set('latestnews', $msg);
return;
}
$xml = @simplexml_load_string($contents);
if (!$xml) {
$msg = '<br /><b>Error:</b> There was an error retrieving news. It may be temporary.
Check to make sure allow_url_fopen is set to ON in your php.ini, or
that the cURL module is installed (contact your host).';
$this->set('latestnews', $msg);
return;
}
$version = $xml->version;
if (Config::Get('CHECK_BETA_VERSION') == true) {
$version = $xml->betaversion;
}
$postversion = intval(str_replace('.', '', trim($version)));
$currversion = intval(str_replace('.', '', PHPVMS_VERSION));
if ($currversion < $postversion) {
if (Config::Get('CHECK_BETA_VERSION') == true) {
$this->set('message', 'A beta version ' . $version . ' is available for download!');
} else {
$this->set('message', 'Version ' . $version . ' is available for download! Please update ASAP');
}
$this->set('updateinfo', Template::GetTemplate('core_error.tpl', true));
}
/* Retrieve latest news from Feedburner RSS, in case the phpVMS site is down
*/
$contents = $file->get(Config::Get('PHPVMS_NEWS_FEED'));
$feed = simplexml_load_string($contents);
$contents = '';
$i = 1;
$count = 5;
// Show the last 5
foreach ($feed->channel->item as $news) {
$news_content = (string) $news->description;
$date_posted = str_replace('-0400', '', (string) $news->pubDate);
$contents .= "<div class=\"newsitem\">\n\t\t\t\t\t\t\t\t<b>{$news->title}</b> <br />{$news_content}\n\t\t\t\t\t\t\t\t<br /><br />\n\t\t\t\t\t\t\t\tPosted: {$date_posted}\n\t\t\t\t\t\t\t</div>";
if ($i++ == $count) {
break;
}
}
$this->set('phpvms_news', $contents);
if (Config::Get('VACENTRAL_ENABLED') == true) {
/* Get the latest vaCentral News */
$contents = $file->get(Config::Get('VACENTRAL_NEWS_FEED'));
$feed = simplexml_load_string($contents);
$contents = '';
$i = 1;
$count = 5;
// Show the last 5
foreach ($feed->channel->item as $news) {
$news_content = (string) $news->description;
$date_posted = str_replace('-0400', '', (string) $news->pubDate);
$contents .= "<div class=\"newsitem\">\n\t\t\t\t\t\t\t\t\t<b>{$news->title}</b> {$news_content}\n\t\t\t\t\t\t\t\t\t<br /><br />\n\t\t\t\t\t\t\t\t\tPosted: {$date_posted}\n\t\t\t\t\t\t\t\t</div>";
if ($i++ == $count) {
break;
}
}
$this->set('vacentral_news', $contents);
}
}
}
示例14: message
your option) any later version.
==============================================
*/
include "./inc/header.inc.php";
if (!$config['allowregister']) {
$navpath .= "User Registrierung » Fehler";
message('Registrierung nicht mölich!', 'Eine Registrierung ist derzeit leider nicht mölich.<br>Bitte versuchen Sie es zu einem späteren Zeitpunkt erneut.');
}
if ($g_user['userid']) {
$navpath .= 'User Registrierung';
message('Fehler', 'Sie sind bereits registriert.<br>Eine weitere Registrierung ist deshalb nicht möglich.');
}
if (is_flooding(FLOOD_REGISTER)) {
message('Fehler', 'IP wegen ' . $config['flood_login_count'] . ' Registrierungen für ' . $config['flood_login_timeout'] . ' Minuten gesperrt.');
}
if (!isset($accept) || !$accept) {
$rules = '';
$TRules = new Template('templates/' . $style['styletemplate'] . '/forumrules.html');
eval($TRules->GetTemplate("rules"));
$navpath .= "User Registrierung";
message("Forumregeln", $rules, 0, 0);
} else {
$Tframe = new Template("templates/" . $style['styletemplate'] . "/frame.html");
$Tregform = new Template("templates/" . $style['styletemplate'] . "/register.html");
$passwordfield = '';
$navpath .= "User Registrierung » Dateneingabe";
$TPasswordfield = new Template('./templates/' . $style['styletemplate'] . '/register_pwdfield.html');
eval($TPasswordfield->GetTemplate('passwordfield'));
eval($Tregform->GetTemplate("CONTENT"));
eval($Tframe->GetTemplate());
}
示例15: VALUES
}
if ($config["usebwordprot"] >= BWORD_POST) {
$post["posttext"] = check_banned($post["posttext"]);
}
if (isset($config['auto_close']) && $config['auto_close'] > 0) {
thwb_query("UPDATE " . $pref . "thread SET threadclosed = '1' WHERE threadtime < '" . (time() - ($config['auto_close'] + 1) * 86400) . "'");
}
if (isset($config['auto_delete']) && $config['auto_delete'] > 0) {
thwb_query("DELETE FROM " . $pref . "thread WHERE threadtime < " . (time() - $config['auto_delete'] * 86400) . "");
}
// neue nachricht posten
thwb_query("INSERT INTO " . $pref . "post (posttime, posttext, userid, threadid, postemailnotify, postsmilies, postcode, postip, postguestname)\n VALUES('{$ctime}',\n '" . addslashes(preparse_code($post['posttext'])) . "',\n '{$g_user['userid']}',\n '{$thread['threadid']}',\n '" . ($post['postemailnotify'] ? 1 : 0) . "',\n '" . ($post['postsmilies'] ? 1 : 0) . "',\n '" . ($post['postcode'] ? 1 : 0) . "',\n '" . addslashes($REMOTE_ADDR) . "',\n '" . $post['postguestname'] . "')");
// Replys um 1 erhöhen in der board datenbank
thwb_query("UPDATE " . $pref . "board SET\n boardlastpost='{$ctime}',\n boardposts=boardposts+1,\n boardlastpostby='" . addslashes($g_user['username']) . "',\n boardthreadtopic='" . addslashes($thread['threadtopic']) . "',\n boardthreadid={$thread['threadid']} WHERE boardid='{$board['boardid']}'");
if ($g_user['userid']) {
// Den postings wert des postenden users erhöhen
thwb_query("UPDATE " . $pref . "user SET userlastpost={$ctime}, userposts=userposts+1 WHERE userid='{$g_user['userid']}'");
}
// Replys um 1 erhöhen in der topic datenbank + time aktualisieren
thwb_query("UPDATE " . $pref . "thread SET threadtime='{$ctime}', threadreplies=threadreplies+1,\n threadlastreplyby='" . addslashes($g_user['username']) . "' WHERE threadid='{$thread['threadid']}'");
// email zeug
if ($config['use_email']) {
$TRegmail = new Template("./templates/mail/newreply.mail");
$r_email = thwb_query("SELECT DISTINCT\n user.useremail as useremail, thread.threadtopic as threadtopic\n FROM\n " . $pref . "post as post, " . $pref . "user as user, " . $pref . "thread as thread\n WHERE\n thread.threadid={$thread['threadid']} AND\n post.threadid={$thread['threadid']} AND\n post.userid=user.userid AND\n post.postemailnotify=1 AND\n user.userid<>{$g_user['userid']}");
while ($email = mysql_fetch_array($r_email)) {
$text = '';
eval($TRegmail->GetTemplate("text"));
@mail($email['useremail'], $config['board_name'] . " - Neue Antwort", $text, "From: {$config['board_admin']}");
}
}
header("Location: " . build_link("showtopic.php?threadid={$thread['threadid']}&time={$time}&pagenum=lastpage#bottom", true));