本文整理汇总了PHP中game::format_data方法的典型用法代码示例。如果您正苦于以下问题:PHP game::format_data方法的具体用法?PHP game::format_data怎么用?PHP game::format_data使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类game
的用法示例。
在下文中一共展示了game::format_data方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
<thead>
<tr>
<th>Bruker/spiller</th>
<th>Type blokkering</th>
<th>Ble utestengt</th>
<th>Utestengt til</th>
<th>Begrunnelse</th>
<th>Intern info</th>
</tr>
</thead>
<tbody>';
$i = 0;
while ($row = $result->fetch()) {
$access = access::has(blokkeringer::$types[$row['ub_type']]['access']);
echo '
<tr' . (++$i % 2 == 0 ? ' class="color"' : '') . '>
<td>' . game::profile_link($row['up_id'], $row['up_name'], $row['up_access_level']) . '</td>
<td>' . ($access ? '<a href="' . $__server['relative_path'] . '/min_side?u_id=' . $row['u_id'] . '&b=blokk&t=' . $row['ub_type'] . '">' : '') . htmlspecialchars(blokkeringer::$types[$row['ub_type']]['title']) . ($access ? '</a>' : '') . '</td>
<td>' . $_base->date->get($row['ub_time_added'])->format(date::FORMAT_SEC) . '</td>
<td>' . $_base->date->get($row['ub_time_expire'])->format(date::FORMAT_SEC) . '<br />
' . game::timespan($row['ub_time_expire'], game::TIME_ABS) . '</td>
<td>' . game::format_data($row['ub_reason'], "bb-opt", "Ingen begrunnelse oppgitt.") . '</td>
<td>' . game::format_data($row['ub_note'], "bb-opt", "Ingen begrunnelse oppgitt.") . '</td>
</tr>';
}
echo '
</tbody>
</table>
<p>' . $pagei->pagenumbers() . '</p>';
}
$_base->page->load();
示例2: intval
break;
case "text":
$rows = intval($info['params']->get("textarea_rows", 5));
$field = '<textarea name="sf_' . $key . '" rows="' . $rows . '" cols="60" style="width: 344px">' . htmlspecialchars($value) . '</textarea>';
$dl = false;
break;
}
if ($dl) {
echo '
<dl class="dd_right dl_2x">
<dt>' . htmlspecialchars($info['sf_title']) . (isset($errors[$key]) ? $errors[$key] : '') . '' . (!empty($info['sf_extra']) ? ' ' . game::format_data($info['sf_extra']) : '') . '</dt>
<dd>' . $field . (($post = $info['params']->get("post")) != "" ? ' ' . $post : '') . '</dd>
</dl>';
} else {
echo '
<p class="sf_p">' . htmlspecialchars($info['sf_title']) . (isset($errors[$key]) ? $errors[$key] : '') . '' . (!empty($info['sf_extra']) ? '<br />' . game::format_data($info['sf_extra']) : '') . '</p>
<p class="sf">' . $field . '</p>';
}
}
echo '
<p>
' . show_sbutton("Lagre", 'name="lagre"') . '
' . show_sbutton("Lagre og forhåndsvis", 'name="preview"') . '
' . show_sbutton("Lagre og send inn", 'name="send_inn"') . '
' . show_sbutton("Slett", 'name="slett"') . '
</p>
<p><i>Du kan trekke tilbake søknaden etter du har sendt den inn for å gjøre endringer innen fristen. Etter fristen vil du ikke kunne sende inn eller trekke tilbake søknaden.</i></p>
</form>';
}
}
} elseif (isset($_POST['opprett']) && login::$logged_in) {
示例3: blocked
/** Blokkert fra å utføre forumhandlinger */
protected function blocked($blokkering)
{
\ajax::html("Du er blokkert fra å utføre handlinger i forumet.<br />Blokkeringen varer til " . \ess::$b->date->get($blokkering['ub_time_expire'])->format(\date::FORMAT_SEC) . " (" . \game::counter($blokkering['ub_time_expire'] - time()) . ").<br />\n" . "<b>Begrunnelse:</b> " . \game::format_data($blokkering['ub_reason'], "bb-opt", "Ingen begrunnelse gitt."), \ajax::TYPE_INVALID);
}
示例4: trim
<?php
require "../../app/ajax.php";
// krev bruker
ajax::require_user();
// mangler verdier?
if (!isset($_POST['type']) || !isset($_POST['note']) || !isset($_POST['ref'])) {
ajax::text("ERROR:MISSING", ajax::TYPE_INVALID);
}
// blokkert fra å sende inn rapporteringer?
$blokkering = blokkeringer::check(blokkeringer::TYPE_RAPPORTERINGER);
if ($blokkering) {
ajax::html("Du er blokkert fra å sende inn rapporteringer. Blokkeringen varer til " . $_base->date->get($blokkering['ub_time_expire'])->format(date::FORMAT_SEC) . ".<br /><b>Begrunnelse:</b> " . game::format_data($blokkering['ub_reason'], "bb-opt", "Ingen begrunnelse gitt."), ajax::TYPE_INVALID);
}
// begrunnelse er tomt?
$note = trim($_POST['note']);
if (empty($note)) {
ajax::html("<p>Begrunnelsen kan ikke være tom!</p>", ajax::TYPE_INVALID);
}
// referanseid
$ref = intval($_POST['ref']);
// forsøk å legg til
switch ($_POST['type']) {
// privat melding
case "pm":
$result = rapportering::report_pm($ref, $note);
// fant ikke meldingen
if ($result === false) {
ajax::html("<p>Fant ikke meldingen.</p>", ajax::TYPE_INVALID);
} elseif ($result[0] === "dupe") {
ajax::html("<p>Du har allerede rapportert denne meldingen.</p>", ajax::TYPE_INVALID);
示例5: handle_specific_edit
//.........这里部分代码省略.........
// har vi en hendelse vi kan oppdatere?
if (!empty($data['notified_id'])) {
\Kofradia\DB::get()->exec("UPDATE users_log SET note = " . \Kofradia\DB::quote(urlencode($types[$type]) . ":" . urlencode($log)) . " WHERE id = {$data['notified_id']}");
}
ess::$b->page->add_message("Advarselen ble redigert.");
redirect::handle("crewlogg?lc_id={$lc['lc_id']}");
}
}
}
echo '
<div class="bg1_c small">
<h1 class="bg1">Rediger advarsel<span class="left2"></span><span class="right2"></span></h1>
<p class="h_left"><a href="crewlogg?lc_id=' . $lc['lc_id'] . '">« Tilbake</a></p>
<div class="bg1">
<dl class="dd_right">
<dt>Logg ID</dt>
<dd>' . $lc['lc_id'] . '</dd>
<dt>Handling</dt>
<dd>' . htmlspecialchars(crewlog::$actions_groups[$lc_action[1]]) . ': ' . htmlspecialchars($lc_action[4]) . '</dd>
<dt>Utført av</dt>
<dd><user id="' . $lc['lc_up_id'] . '" /></dd>' . ($lc['lc_a_up_id'] ? '
<dt>Påvirket spiller</dt>
<dd><user id="' . $lc['lc_a_up_id'] . '" /></dd>' : '') . '
<dt>Tidspunkt</dt>
<dd>' . ess::$b->date->get($lc['lc_time'])->format(date::FORMAT_SEC) . '</dd>
</dl>
<dl class="dd_right">
<dt>Kategori</dt>
<dd>' . $data['type'] . '</dd>
<dt>Prioritet</dt>
<dd>' . ($data['priority'] == 1 ? 'Lav' : ($data['priority'] == 3 ? 'Høy' : 'Moderator')) . '</dd>
<dt>Varslet?</dt>
<dd>' . (empty($data['notified']) ? 'Brukeren ble ikke varslet' : 'Brukeren ble varslet med logg') . '</dd>' . ($invalidated ? '
<dt>Ugyldig</dt>
<dd><b>Advarselen er trukket tilbake</b></dd>' : '') . '
</dl>
<p>Begrunnelse:</p>
<div class="crewlog_note">' . game::format_data($lc['lc_log']) . '</div>
<p>Intern informasjon:</p>
<div class="crewlog_note">' . game::format_data($data['note']) . '</div>';
if ($invalidated) {
echo '
<p>Denne advarselen er trukket tilbake og kan ikke redigeres.</p>';
} else {
echo '
<form action="" method="post">
<div class="hr"></div>
<p><b>Rediger advarsel:</b></p>
<dl class="dd_right">
<dt>Kategori</dt>
<dd>
<select name="type">';
$type = array_search($data['type'], crewlog::$user_warning_types);
if (isset($_POST['type']) && isset($types[$_POST['type']])) {
$type = (int) $_POST['type'];
}
if ($type === false) {
echo '
<option value="">Velg ..</option>';
}
foreach (crewlog::$user_warning_types as $key => $row) {
echo '
<option value="' . $key . '"' . ($key === $type ? ' selected="selected"' : '') . '>' . htmlspecialchars($row) . '</option>';
}
echo '
</select>
</dd>
<dt>Alvorlighet/prioritet</dt>
<dd>
<select name="priority">';
$priority = isset($_POST['priority']) && is_numeric($_POST['priority']) && $_POST['priority'] >= 1 && $_POST['priority'] <= 3 ? $_POST['priority'] : $data['priority'];
echo '
<option value="1"' . ($priority == 1 ? ' selected="selected"' : '') . '>Lav</option>
<option value="2"' . ($priority == 2 ? ' selected="selected"' : '') . '>Moderat</option>
<option value="3"' . ($priority == 3 ? ' selected="selected"' : '') . '>Høy</option>
</select>
</dd>
</dl>
<p>Begrunnelse:</p>
<p><textarea name="log" rows="10" cols="30" style="width: 98%">' . htmlspecialchars(postval("log", $lc['lc_log'])) . '</textarea></p>
<p>Intern informasjon:</p>
<p><textarea name="note" rows="10" cols="30" style="width: 98%">' . htmlspecialchars(postval("note", $data['note'])) . '</textarea></p>
<p class="c">' . show_sbutton("Oppdater advarsel", 'name="edit"') . '</p>
</form>
<form action="" method="post">
<p class="c">' . show_sbutton("Trekk tilbake advarsel", 'name="revoke" onclick="return confirm(\'Er du sikker på at du ønsker å trekke tilbake denne advarselen?\')"') . '</p>
</form>';
}
echo '
</div>
</div>';
break;
// ukjent
// ukjent
default:
ess::$b->page->add_message("Kan ikke redigere denne oppføringen.", "error");
redirect::handle("crewlogg?lc_id={$lc['lc_id']}");
}
ess::$b->page->load();
}
示例6: page_crew
//.........这里部分代码省略.........
<ul>' . $links . '
</ul>';
}
echo '
</div>
</div>';
// hent alle aktive blokkeringer
$result = \Kofradia\DB::get()->query("SELECT ub_type, ub_time_expire, ub_reason FROM users_ban WHERE ub_u_id = " . page_min_side::$active_user->id . " AND ub_time_expire > " . time() . " ORDER BY ub_time_expire");
if ($result->rowCount() > 0) {
echo '
<div class="bg1_c" style="width: 350px">
<h1 class="bg1">Aktive blokkeringer<span class="left2"></span><span class="right2"></span></h1>
<div class="bg1">
<table class="table tablem" style="width: 100%">
<thead>
<tr>
<th>Type</th>
<th>Dato</th>
<th>Begrunnelse</th>
</tr>
</thead>
<tbody>';
$i = 0;
while ($row = $result->fetch()) {
$type = blokkeringer::get_type($row['ub_type']);
$access = access::has($type['access']);
echo '
<tr' . (++$i % 2 == 0 ? ' class="color"' : '') . '>
<td>' . ($access ? '<a href="' . htmlspecialchars(page_min_side::addr(NULL, "b=blokk&t={$row['ub_type']}")) . '">' : '') . htmlspecialchars($type['title']) . ($access ? '</a>' : '') . '</td>
<td>
' . ess::$b->date->get($row['ub_time_expire'])->format(date::FORMAT_SEC) . '<br />
(' . game::timespan($row['ub_time_expire'], game::TIME_ABS | game::TIME_ALL, 5) . ')
</td>
<td>' . game::format_data($row['ub_reason'], "bb-opt", "Ingen begrunnelse gitt.") . '</td>
</tr>';
}
echo '
</tbody>
</table>
</div>
</div>';
}
}
} elseif ($subpage2 == "send_email") {
ess::$b->page->add_title("Send e-post");
// har tekst?
$show_form = true;
if (isset($_POST['text']) && !isset($_POST['edit'])) {
$subject = trim(postval("subject"));
$text = trim(postval("text"));
// mangler emne?
if (empty($subject)) {
ess::$b->page->add_message("Du må fylle ut emnefeltet.", "error");
} elseif (empty($text)) {
ess::$b->page->add_message("Du må fylle ut innholdet.", "error");
} else {
$email_subject = $subject;
$email_text = $text . "\n\n--\n" . login::$user->player->data['up_name'] . "\nwww.kofradia.no\n\nDenne meldingen ble sendt til " . page_min_side::$active_user->data['u_email'] . " som tilhører " . page_min_side::$active_player->data['up_name'];
// godkjent?
if (isset($_POST['send'])) {
// send e-posten
$email = new email();
$email->text = $email_text;
$email->headers['BCC'] = "henvendelse@smafia.no";
$email->headers['Reply-To'] = "henvendelse@smafia.no";
$email->send(page_min_side::$active_user->data['u_email'], $email_subject);
示例7: pub_publish
/**
* Publiser utgivelse
*/
protected function pub_publish(ff_avis_utgivelse $ffn)
{
// allerede publisert
if ($ffn->data['ffn_published'] != 0) {
ess::$b->page->add_message("Utgivelsen er allerede publisert.", "error");
redirect::handle();
}
// kontroller beskrivelse
$desc_plain = strip_tags(game::format_data($ffn->data['ffn_description']));
if (mb_strlen($desc_plain) < 30) {
ess::$b->page->add_message("Beskrivelsen for utgivelsen må inneholde minimum 30 bokstaver/tall før den kan publiseres.", "error");
redirect::handle();
}
// sjekk når siste publisering ble utført
$result = \Kofradia\DB::get()->query("SELECT ffn_published_time FROM ff_newspapers WHERE ffn_ff_id = {$this->ff->id} AND ffn_published != 0 ORDER BY ffn_published_time DESC LIMIT 1");
$last = $result->rowCount() > 0 ? $result->fetchColumn(0) : 0;
// har det gått lang nok tid?
$delay = ff_avis::FFN_PUBLISH_DELAY + $last - time();
if ($delay > 0) {
ess::$b->page->add_message("Du må vente " . game::timespan(ff_avis::FFN_PUBLISH_DELAY, game::TIME_FULL) . " mellom hver utgivelse som utføres. Gjenstår før neste utgivelse kan publiseres: " . game::timespan($delay, game::TIME_FULL) . ".", "error");
redirect::handle();
}
// hent artiklene med pris
$result = \Kofradia\DB::get()->query("SELECT ffna_id, ffna_up_id, ffna_title, ffna_price FROM ff_newspapers_articles WHERE ffna_ffn_id = {$ffn->id} ORDER BY ffna_title");
// for få artikler?
if ($result->rowCount() < 4) {
ess::$b->page->add_message("Utgivelsen må inneholde minimum 4 artikler for å bli publisert.", "error");
redirect::handle();
}
// kun eier
if (!$this->ff->access(1)) {
ess::$b->page->add_message("Kun " . htmlspecialchars($this->ff->type['priority'][1]) . " kan publisere utgivelsen.", "error");
redirect::handle();
}
// finn total pris for artiklene
$articles = array();
$articles_price = 0;
while ($row = $result->fetch()) {
$articles_price += $row['ffna_price'];
$articles[] = $row;
}
$total_price = $articles_price + ff_avis::FFN_PUBLISH_COST;
// godkjenne publisering?
if (isset($_POST['approve'])) {
$price = game::intval(postval("price"));
$sid = postval("sid");
// kontroller pris
if ($price != $total_price) {
ess::$b->page->add_message("Det ser ut som prisen har endret seg. Prøv på nytt.", "error");
} elseif ($sid != login::$info['ses_id']) {
ess::$b->page->add_message("Ugyldig.", "error");
} elseif ($total_price > 0 && $this->ff->data['ff_bank'] < $total_price) {
ess::$b->page->add_message("Det er ikke nok penger i firmabanken.", "error");
} else {
\Kofradia\DB::get()->beginTransaction();
// trekk fra pengene fra firmabanken
if ($total_price > 0 && !$this->ff->bank(ff::BANK_BETALING, $total_price, "Publisering av utgivelse: {$ffn->data['ffn_title']} (id: {$ffn->id})")) {
\Kofradia\DB::get()->commit();
// var tidligere rollback, men trenger ikke være det
ess::$b->page->add_message("Det er ikke nok penger i firmabanken.", "error");
} else {
// oppdater utgivelsen
\Kofradia\DB::get()->exec("UPDATE ff_newspapers SET ffn_published = 1, ffn_published_time = " . time() . ", ffn_published_up_id = " . login::$user->player->id . " WHERE ffn_id = {$ffn->id}");
// utbetal til journalistene
\Kofradia\DB::get()->exec("UPDATE users_players, ff_members, (SELECT ffna_up_id, SUM(ffna_price) AS ffna_sum, COUNT(ffna_price) AS ffna_count FROM ff_newspapers_articles WHERE ffna_ffn_id = {$ffn->id} AND ffna_price > 0 GROUP BY ffna_up_id) AS ref SET up_bank = up_bank + ffna_sum, up_bank_received = up_bank_received + ffna_sum, up_bank_profit = up_bank_profit + ffna_sum, up_bank_num_received = up_bank_num_received + ffna_count, up_log_new = up_log_new + ffna_count, ffm_earnings = ffm_earnings + ffna_sum WHERE ffna_up_id = up_id AND ffm_up_id = up_id AND ffm_ff_id = {$this->ff->id}");
// lagre overføringslogg
\Kofradia\DB::get()->exec("INSERT INTO bank_log (bl_sender_up_id, bl_receiver_up_id, amount, time) SELECT " . login::$user->player->id . ", ffna_up_id, ffna_price, " . time() . " FROM users_players, ff_newspapers_articles WHERE ffna_ffn_id = {$ffn->id} AND ffna_up_id = up_id AND ffna_price > 0");
// spillelogg
\Kofradia\DB::get()->exec("INSERT INTO users_log (time, ul_up_id, type, note, num) SELECT " . time() . ", ffna_up_id, " . gamelog::$items['bankoverforing'] . ", CONCAT(ffna_price, ':Utbetaling for avisartikkel.'), " . login::$user->player->id . " FROM users_players, ff_newspapers_articles WHERE ffna_ffn_id = {$ffn->id} AND ffna_up_id = up_id AND ffna_price > 0");
\Kofradia\DB::get()->commit();
// live-feed
livefeed::add_row('Avisutgivelsen <a href="' . ess::$s['relative_path'] . '/ff/avis?ff_id=' . $this->ff->id . '&ffn=' . $ffn->id . '">' . htmlspecialchars($ffn->data['ffn_title']) . '</a> ble publisert av <a href="' . ess::$s['relative_path'] . '/ff/?ff_id=' . $this->ff->id . '">' . htmlspecialchars($this->ff->data['ff_name']) . '</a>.');
ess::$b->page->add_message("Utgivelsen er nå publisert.");
redirect::handle();
}
}
}
echo '
<p class="c">Publiser utgivelse | <a href="avis?ff_id=' . $this->ff->id . '&u&ffn=' . $ffn->id . '">Tilbake</a></p>
<div class="section center w200">
<h2>Utgivelsesinformasjon</h2>
<dl class="dd_right">
<dt>Tittel</dt>
<dd>' . htmlspecialchars($ffn->data['ffn_title']) . '</dd>
<dt>Opprettet</dt>
<dd>' . ess::$b->date->get($ffn->data['ffn_created_time'])->format() . '</dd>
<dt>Salgspris</dt>
<dd>' . game::format_cash($ffn->data['ffn_cost']) . '</dd>
</dl>
</div>
<div class="section center w200">
<h2>Beskrivelse av utgivelsen</h2>' . (($d = $this->ff->format_description($ffn->data['ffn_description'])) != '' ? '
<div class="p">' . $d . '</div>' : '
<p>Ingen beskrivelse.</p>') . '
</div>
<form action="" method="post">
<input type="hidden" name="sid" value="' . login::$info['ses_id'] . '" />
//.........这里部分代码省略.........
示例8: content_build
/**
* Sett opp innhold til en enhet i noden
* @param array $unit
*/
public static function content_build($unit)
{
switch ($unit['ni_type']) {
case 1:
// bb
$content = '
<div class="p">' . game::format_data($unit['nir_content']) . '</div>';
break;
case 2:
// html
// html
case 3:
// htmleditor
$content = '
' . $unit['nir_content'];
break;
case 5:
// gallery_section
$content = '
<p>Not implementet.</p>';
break;
case 6:
// gallery_item
$content = '
<p>Not implementet.</p>';
break;
case 7:
// news
$params = new params($unit['nir_params']);
// hvilke tags?
$tags = new container($params->get("tags"));
$page_name = "ni_s_{$unit['ni_id']}";
$pageinfo = new pagei(PAGEI_ACTIVE_GET, $page_name, PAGEI_PER_PAGE, max(1, min(50, $params->get("per_page", 15))));
// hent nyhetene
if (count($tags->items) > 0) {
$tags_db = array_map(array(ess::$b->db, "quote"), $tags->items);
// filter via tags
$query = "n_id, n_title, n_content, n_userid, n_time, n_visible, n_type FROM news, news_tags WHERE n_visible > 0 AND n_id = nt_n_id AND nt_tagname IN (" . implode(", ", $tags_db) . ") GROUP BY n_id ORDER BY n_time DESC";
} else {
$query = "n_id, n_title, n_intro, LEFT(n_content, 5) AS n_content, n_userid, n_time, n_visible, n_type FROM news WHERE n_visible > 0 ORDER BY n_time DESC";
}
$result = $pageinfo->query($query);
$content = '';
if ($result->rowCount() == 0) {
$content .= '
<p>Ingen nyheter.</p>';
} else {
while ($row = $result->fetch()) {
$content .= '
<h2>' . htmlspecialchars($row['n_title']) . '</h2>
<p class="h_right">' . ess::$b->date->get($row['n_time'])->format() . '</p>
<div class="p">' . game::format_data($row['n_intro']) . '</div>';
// mer info?
if (mb_strlen($row['n_content']) > 0) {
$content .= '
<p><a href="' . game::address(PHP_SELF, $_GET, array(), array("show_n" => $row['n_id'])) . '">Les mer »</a></p>';
}
}
if (!$params->get("hide_select_page") && $pageinfo->pages > 1) {
$content .= '
<p>' . game::pagenumbers(game::address(PHP_SELF, $_GET, array($page_name)), game::address(PHP_SELF, $_GET, array($page_name), array($page_name => true)) . "=", $pageinfo->pages, $pageinfo->active) . '</p>';
}
}
break;
case 8:
// php include
$content = '
<p>Not implementet.</p>';
break;
default:
// plaintext
$content = '
<p>' . htmlspecialchars($unit['nir_content']) . '</p>';
}
return $content;
}
示例9: index
/**
* Vis oversikt
*/
protected function index()
{
// hent data som er blokkert
$result = \Kofradia\DB::get()->query("SELECT eb_id, eb_type, eb_value, eb_time, eb_up_id, eb_note FROM email_blacklist ORDER BY eb_value");
$data = array("address" => array(), "domain" => array());
while ($row = $result->fetch()) {
$data[$row['eb_type']][] = $row;
}
echo '
<div class="bg1_c xmedium">
<h1 class="bg1">Blokkering av e-post<span class="left"></span><span class="right"></span></h1>
<div class="bg1">
<p class="c"><a href="email_blacklist?new">Opprett ny blokkering »</a></p>
<p>Spesifikke e-postadresser som er blokkert:</p>';
if (count($data['address']) == 0) {
echo '
<p class="c">Ingen spesifikke e-postadresser er blokkert.</p>';
} else {
echo '
<form action="" method="post">
<table class="table center">
<thead>
<tr>
<th>E-postadresse</th>
<th>Lagt til</th>
<th>Av</th>
<th>Notat</th>
</tr>
</thead>
<tbody>';
$i = 0;
foreach ($data['address'] as $row) {
$note = game::format_data($row['eb_note']);
if (empty($note)) {
$note = ' ';
}
echo '
<tr class="box_handle' . (++$i % 2 == 0 ? ' color' : '') . '">
<td><a href="brukere/finn?email=' . urlencode($row['eb_value']) . '"><input type="radio" name="eb_id" value="' . $row['eb_id'] . '" />' . htmlspecialchars($row['eb_value']) . '</a></td>
<td class="r">' . ess::$b->date->get($row['eb_time'])->format() . '</td>
<td><user id="' . $row['eb_up_id'] . '" /></td>
<td>' . $note . '</td>
</tr>';
}
echo '
</tbody>
</table>
<p class="c">' . show_sbutton("Rediger", 'name="edit"') . ' <span class="red">' . show_sbutton("Slett", 'name="delete"') . '</span></p>
</form>';
}
echo '
<p>E-postdomener som er blokkert:</p>';
if (count($data['domain']) == 0) {
echo '
<p class="c">Ingen domener er blokkert.</p>';
} else {
echo '
<form action="" method="post">
<table class="table center">
<thead>
<tr>
<th>Domene</th>
<th>Lagt til</th>
<th>Av</th>
<th>Notat</th>
</tr>
</thead>
<tbody>';
$i = 0;
foreach ($data['domain'] as $row) {
$note = game::format_data($row['eb_note']);
if (empty($note)) {
$note = ' ';
}
echo '
<tr class="box_handle' . (++$i % 2 == 0 ? ' color' : '') . '">
<td><a href="brukere/finn?email=' . urlencode('*@' . $row['eb_value']) . '"><input type="radio" name="eb_id" value="' . $row['eb_id'] . '" />' . htmlspecialchars($row['eb_value']) . '</a></td>
<td class="r">' . ess::$b->date->get($row['eb_time'])->format() . '</td>
<td><user id="' . $row['eb_up_id'] . '" /></td>
<td>' . $note . '</td>
</tr>';
}
echo '
</tbody>
</table>
<p class="c">' . show_sbutton("Rediger", 'name="edit"') . ' <span class="red">' . show_sbutton("Slett", 'name="delete"') . '</span></p>
</form>';
}
echo '
</div>
</div>';
}
示例10: page_donate_handle
/**
* Behandle donasjon
*/
protected function page_donate_handle()
{
$amount = game::intval($_POST['donate']);
$note = trim(postval("note"));
// nostat?
if (access::is_nostat()) {
ess::$b->page->add_message("Du er nostat og har ikke tilgang til å donere til {$this->ff->type['refobj']}.", "error");
} elseif ($amount < 0) {
ess::$b->page->add_message("Beløpet kan ikke være negativt..", "error");
} elseif ($amount < 15000) {
ess::$b->page->add_message("Minstebeløp å donere er 15 000 kr.", "error");
} else {
// finn ut når vi donerte siste gang - kan ikke donere oftere enn en gang i timen
$result = \Kofradia\DB::get()->query("SELECT ffbl_time FROM ff_bank_log WHERE ffbl_ff_id = {$this->ff->id} AND ffbl_type = 3 AND ffbl_up_id = " . login::$user->player->id . " ORDER BY ffbl_time DESC LIMIT 1");
$last = $result->fetch();
if ($last && $last['ffbl_time'] + 3600 > time()) {
ess::$b->page->add_message("Du kan ikke donere oftere enn én gang per time. Du må vente " . game::counter($last['ffbl_time'] + 3600 - time()) . " før du kan donere på nytt.", "error");
} elseif ($amount > login::$user->player->data['up_cash']) {
ess::$b->page->add_message("Du har ikke nok penger på hånda til å donere " . game::format_cash($amount) . " til {$this->ff->type['refobj']}.", "error");
} elseif (isset($_POST['approve']) && validate_sid(false)) {
// forsøk å donere
$a = \Kofradia\DB::get()->exec("UPDATE ff, users_players SET ff_bank = ff_bank + {$amount}, up_cash = up_cash - {$amount} WHERE ff_id = {$this->ff->id} AND up_id = " . login::$user->player->id . " AND up_cash >= {$amount}");
// hadde ikke nok penger?
if ($a == 0) {
ess::$b->page->add_message("Du har ikke nok penger på hånda til å donere " . game::format_cash($amount) . " til {$this->ff->type['refobj']}.", "error");
} else {
// finn balanse
$result = \Kofradia\DB::get()->query("SELECT ff_bank FROM ff WHERE ff_id = {$this->ff->id}");
$balance = $result->fetchColumn(0);
// legg til logg
\Kofradia\DB::get()->exec("INSERT INTO ff_bank_log SET ffbl_ff_id = {$this->ff->id}, ffbl_type = 3, ffbl_amount = {$amount}, ffbl_up_id = " . login::$user->player->id . ", ffbl_time = " . time() . ", ffbl_balance = {$balance}, ffbl_note = " . \Kofradia\DB::quote($note));
// legg til i spillerinfo
\Kofradia\DB::get()->exec("UPDATE ff_members SET ffm_donate = ffm_donate + {$amount} WHERE ffm_up_id = " . login::$user->player->id . " AND ffm_ff_id = {$this->ff->id} AND ffm_status = 1");
ess::$b->page->add_message("Du donerte " . game::format_cash($amount) . " til {$this->ff->type['refobj']}.");
// legg til daglig stats
$this->ff->stats_update("money_in", $amount, true);
redirect::handle();
}
} elseif (!isset($_POST['skip'])) {
ess::$b->page->add_title("Donér til {$this->ff->type['refobj']}");
// vis skjema for godkjenning
echo '
<!-- donasjon -->
<div class="section w200">
<h2>Donér til ' . $this->ff->type['refobj'] . '</h2>
<p>Du er i ferd med å donére til ' . $this->ff->type['refobj'] . '.</p>
<p>Beløp: ' . game::format_cash($amount) . '</p>
<p>Melding/notat: ' . game::format_data($note, "bb-opt", "Uten melding") . '</p>
<form action="" method="post">
<input type="hidden" name="donate" value="' . $amount . '" />
<input type="hidden" name="note" value="' . htmlspecialchars($note) . '" />
<input type="hidden" name="sid" value="' . login::$info['ses_id'] . '" />
<p class="c">
' . show_sbutton("Utfør donasjon", 'name="approve"') . '
' . show_sbutton("Avbryt", 'name="skip"') . '
</p>
</form>
</div>';
$this->ff->load_page();
}
}
}
示例11: show
/** Vis henvendelsen */
protected function show()
{
// øk visningstelleren
$this->increase_view_counter();
echo '
<h1>Henvendelse</h1>
<p class="c"><a href="./">Tilbake</a></p>
<table class="table center tablemb">
<tbody>
<tr>
<th>Tittel</th>
<td>' . htmlspecialchars($this->data['su_title']) . '</td>
</tr>
<tr>
<th>Kategori</th>
<td>' . htmlspecialchars(support::$kategorier[$this->data['su_category']]['name']) . '</td>
</tr>' . (!$this->own ? '
<tr>
<th>Innsender</th>
<td><user id="' . $this->data['su_up_id'] . '" />' . ($this->data['new_up_id'] != $this->data['su_up_id'] ? '<br />
(Ny: <user id="' . $this->data['new_up_id'] . '" />)' : '') . '</td>
</tr>' : '') . '
<tr>
<th>Innsendt</th>
<td>' . ess::$b->date->get($this->data['su_time'])->format(date::FORMAT_SEC) . '<br />' . game::timespan($this->data['su_time'], game::TIME_ABS | game::TIME_PAST) . '</td>
</tr>
<tr>
<th>Status</th>';
if ($this->solved) {
echo '
<td>Avsluttet</td>';
} else {
// knapp for å avslutte henvendelsen
echo '
<td>
Åpen / under behandling<br />
<form action="" method="post">' . show_sbutton("Avslutt henvendelsen", 'name="close" style="margin-top: 3px"') . '</form>
</td>';
}
echo '
</tr>
</tbody>
</table>';
// vis skjema for å svare på henvendelsen
$this->show_reply_form();
// hent meldingene
$pagei = new pagei(pagei::PER_PAGE, 30, pagei::ACTIVE_GET, "side");
$result = $pagei->query("\n\t\t\tSELECT sum_up_id, sum_time, sum_text\n\t\t\tFROM support_messages\n\t\t\tWHERE sum_su_id = {$this->data['su_id']}\n\t\t\tORDER BY sum_time DESC");
if ($pagei->pages > 1) {
echo '
<p class="c">' . $pagei->pagenumbers() . '</p>';
}
ess::$b->page->add_css('.profile_link_imgfix img { vertical-align: top; margin-top: -2px }');
while ($row = $result->fetch()) {
echo '
<div class="bg1_c" style="width: 500px">
<h2 class="bg1">
<span style="float: left" class="profile_link_imgfix"><user id="' . $row['sum_up_id'] . '" /></span>
<span style="float: right; font-size: 10px">' . ess::$b->date->get($row['sum_time'])->format(date::FORMAT_SEC) . '</span>
<span class="left2"></span><span class="right2"></span>
</h2>
<div class="bg1">
<div class="p">' . game::format_data($row['sum_text']) . '</div>
</div>
</div>';
}
if ($pagei->pages > 1) {
echo '
<p class="c">' . $pagei->pagenumbers() . '</p>';
}
echo '
<div style="margin-bottom: 50px"></div>';
}
示例12: htmlspecialchars
<td>' . ($row['ds_reply_decision'] == 1 ? 'Fra: ' . htmlspecialchars($params['name_old']) . '<br />Til: ' . htmlspecialchars($params['name']) : 'Til: ' . htmlspecialchars($params['name'])) . '</td>
<td><user id="' . $row['ds_up_id'] . '" /><br />
' . ($row['ds_reply_decision'] == 1 ? 'Innvilget' : ($row['ds_reply_decision'] == -1 ? 'Avslått' : 'Under behandling')) . '</td>
</tr>';
}
echo '
</tbody>
</table>';
}
break;
}
// behandlet?
if ($soknad['ds_reply_decision'] != 0) {
echo '
<p>Søknaden ble <b>' . ($soknad['ds_reply_decision'] == -1 ? 'avslått' : 'godtatt') . '</b> ' . $_base->date->get($soknad['ds_reply_time'])->format() . ' av <user id="' . $soknad['ds_reply_up_id'] . '" />.</p>
<p><b>Begrunnelse for ' . ($soknad['ds_reply_decision'] == -1 ? 'avslag' : 'godtatt søknad') . ':</b><br />' . game::format_data($soknad['ds_reply_reason'], "bb-opt", "Ingen begrunnelse gitt.") . '</p>';
} elseif (!access::has($type['access'])) {
echo '
<p><u>Du har ikke tilgang til å behandle denne søknaden. Må behandles av en ' . access::name($type['access']) . '.</u></p>';
} else {
echo '
<form action="" method="post">
<p><b>Begrunnelse:</b> (Spilleren blir opplyst om denne begrunnelsen.)</p>
<p><textarea name="reason" rows="5" cols="40">' . htmlspecialchars(postval("reason")) . '</textarea></p>
<p>
' . show_sbutton("Godta søknad", 'name="approve"') . '
' . show_sbutton("Avslå søknad", 'name="decline"') . '
<a href="soknader" class="button">Avbryt</a>
</p>
</form>';
}
示例13: get_messages
/**
* Hent meldinger og data for meldingene
*/
public function get_messages(pagei $pagei, $show_deleted = false)
{
$result = $pagei->query("\n\t\t\tSELECT it_id, it_title, ir_unread, ir_restrict_im_time, ir_up_id, ir_deleted, ir_marked, COUNT(im_id) num_messages\n\t\t\tFROM inbox_threads\n\t\t\t\tJOIN inbox_rel ON it_id = ir_it_id\n\t\t\t\tJOIN users_players ON up_u_id = {$this->u->id} AND ir_up_id = up_id\n\t\t\t\tJOIN inbox_messages ON im_it_id = it_id AND im_deleted = 0 AND im_time <= ir_restrict_im_time\n\t\t\tWHERE 1" . ($show_deleted ? '' : ' AND ir_deleted = 0') . "\n\t\t\tGROUP BY it_id\n\t\t\tORDER BY (ir_unread != 0 AND ir_deleted = 0) DESC, ir_marked = 0, ir_restrict_im_time DESC");
// ingen meldinger?
if ($pagei->total == 0) {
return array();
}
// sett opp data for meldingene
$meldinger = array();
$prev = array();
while ($row = $result->fetch()) {
$row['up_prev'] = false;
$row['up_prev_other'] = false;
$row['id_text'] = '';
$row['receivers'] = array();
$row['receivers_ok'] = false;
$row['receivers_crew'] = true;
$prev[] = $row['it_id'];
$meldinger[$row['it_id']] = $row;
}
// hent alle deltakerene i meldingstrådene som skal listes opp
$result = \Kofradia\DB::get()->query("\n\t\t\tSELECT ir_it_id, ir_up_id, ir_unread, ir_views, ir_deleted, ir_restrict_im_time, ir_marked, COUNT(im_id) AS num_messages, up_access_level, up_u_id, u_access_level, u_active_up_id\n\t\t\tFROM inbox_rel\n\t\t\t\tJOIN (\n\t\t\t\t\tSELECT ir_it_id ref_it_id, MAX(ir_restrict_im_time) ref_ir_restrict_im_time\n\t\t\t\t\tFROM inbox_rel, users_players\n\t\t\t\t\tWHERE ir_it_id IN (" . implode(",", $prev) . ") AND up_id = ir_up_id AND up_u_id = {$this->u->id}\n\t\t\t\t\tGROUP BY ir_it_id\n\t\t\t\t\tORDER BY up_last_online DESC\n\t\t\t\t) ref ON ref_it_id = ir_it_id\n\t\t\t\tLEFT JOIN inbox_messages ON im_it_id = ir_it_id AND im_up_id = ir_up_id AND im_deleted = 0 AND im_time <= ref_ir_restrict_im_time\n\t\t\t\tLEFT JOIN users_players ON up_id = ir_up_id\n\t\t\t\tLEFT JOIN users ON u_id = up_u_id\n\t\t\tWHERE ir_it_id IN (" . implode(",", $prev) . ")\n\t\t\tGROUP BY ir_it_id, ir_up_id\n\t\t\tORDER BY up_name");
$c = access::has("crewet");
while ($row = $result->fetch()) {
$meldinger[$row['ir_it_id']]['receivers'][] = $row;
if ($row['ir_up_id'] != $this->u->player->id && $row['ir_deleted'] == 0 && ($row['up_access_level'] != 0 || $c && $row['u_access_level'] != 0 && $row['u_active_up_id'] == $row['ir_up_id'])) {
$meldinger[$row['ir_it_id']]['receivers_ok'] = true;
if ($meldinger[$row['ir_it_id']]['receivers_crew'] && !in_array("crewet", access::types($row['up_access_level']))) {
$meldinger[$row['ir_it_id']]['receivers_crew'] = false;
}
}
}
// hent spillerene som har skrevet siste melding (inkludert meg)
$im_id = array();
$result = \Kofradia\DB::get()->query("\n\t\t\tSELECT im_id, im_it_id, im_up_id, is_self\n\t\t\tFROM (\n\t\t\t\tSELECT im_id, im_it_id, im_up_id, IF(up1.up_u_id = {$this->u->id}, 1, 0) is_self\n\t\t\t\tFROM inbox_messages\n\t\t\t\t\tJOIN users_players up1 ON up1.up_id = im_up_id\n\t\t\t\t\tJOIN users_players up2 ON up2.up_u_id = {$this->u->id}\n\t\t\t\t\tJOIN inbox_rel ON im_it_id = ir_it_id AND ir_up_id = up2.up_id AND im_time <= ir_restrict_im_time\n\t\t\t\tWHERE im_it_id IN (" . implode(",", $prev) . ") AND im_deleted = 0\n\t\t\t\tORDER BY im_id DESC\n\t\t\t) AS ref\n\t\t\tGROUP BY im_it_id");
$others = array();
while ($row = $result->fetch()) {
$meldinger[$row['im_it_id']]['up_prev'] = array($row['is_self'], $row['im_up_id']);
$im_id[$row['im_id']] = $row['im_it_id'];
if ($row['is_self']) {
$others[] = $row['im_it_id'];
}
}
// skal vi hente tidligere avsender? (vi har svart sist)
if (count($others) > 0) {
// hent spillerene som har skrevet siste melding (ekskludert meg)
$result = \Kofradia\DB::get()->query("\n\t\t\t\tSELECT im_it_id, im_up_id\n\t\t\t\tFROM (\n\t\t\t\t\tSELECT im_it_id, im_up_id\n\t\t\t\t\tFROM inbox_messages\n\t\t\t\t\t\tJOIN users_players up1 ON up1.up_id = im_up_id AND up1.up_u_id != {$this->u->id}\n\t\t\t\t\t\tJOIN users_players up2 ON up2.up_u_id = {$this->u->id}\n\t\t\t\t\t\tJOIN inbox_rel ON im_it_id = ir_it_id AND ir_up_id = up2.up_id AND im_time <= ir_restrict_im_time\n\t\t\t\t\tWHERE im_it_id IN (" . implode(",", $others) . ") AND im_deleted = 0\n\t\t\t\t\tORDER BY im_id DESC\n\t\t\t\t) AS ref\n\t\t\t\tGROUP BY im_it_id");
$others = array();
while ($row = $result->fetch()) {
$meldinger[$row['im_it_id']]['up_prev_other'] = $row;
}
}
// hent innholdet til de siste meldingene
if (count($im_id) > 0) {
$result = \Kofradia\DB::get()->query("\n\t\t\t\tSELECT id_im_id, id_text FROM inbox_data WHERE id_im_id IN (" . implode(",", array_keys($im_id)) . ")");
$max = 50;
while ($row = $result->fetch()) {
$d = strip_tags(game::format_data($row['id_text']));
$d = preg_replace("/(^ +| +\$|\\r)/mu", "", $d);
$d = preg_replace("/(?<![!,.\\n ])\\n/u", ". ", $d);
$d = preg_replace("/\\n/u", " ", $d);
$d = preg_replace("/ +/u", " ", $d);
$d = trim($d);
if (mb_strlen($d) > $max) {
// TODO: Flytt funksjon til en klasse/funksjon så den kan gjenbrukes av andre sider
// forsøk å bryt på et mellomrom
$pos = mb_strpos($d, " ", $max - 10);
if ($pos !== false && $pos < $max) {
$d = mb_substr($d, 0, $pos) . " ...";
} else {
$d = mb_substr($d, 0, $max - 3) . "...";
}
}
$meldinger[$im_id[$row['id_im_id']]]['id_text'] = $d;
}
}
return $meldinger;
}
示例14: advarsel_input
//.........这里部分代码省略.........
<div id="advarsel_inactive"' . ($active ? ' class="hide"' : '') . '>
<p class="c"><a href="#">Legg til advarsel sammen med endringen</a></p>
</div>
<div id="advarsel_active"' . (!$active ? ' class="hide"' : '') . '>
<p class="c"><a href="#">Ikke legg til advarsel</a></p>
<div class="bg1_c" style="width: 400px">
<h1 class="bg1">Gi advarsel til brukeren<span class="left2"></span><span class="right2"></span></h1>
<div class="bg1">
<form action="" method="post">
<input type="hidden" name="a_active" id="a_active" value="' . ($active ? 1 : 0) . '" />
<dl class="dd_right">';
if ($kategori) {
if (!isset($types_name[$kategori])) {
throw new HSException("Ugyldig kategori.");
}
$html .= '
<dt>Kategori</dt>
<dd>' . htmlspecialchars($types[$types_name[$kategori]]) . '</dd>';
} else {
$html .= '
<dt>Kategori</dt>
<dd>
<select name="a_type">';
$type = isset($_POST['a_type']) && isset($types[$_POST['a_type']]) ? intval($_POST['a_type']) : false;
if ($type === false) {
$html .= '
<option value="">Velg ..</option>';
}
foreach ($types as $key => $row) {
$html .= '
<option value="' . $key . '"' . ($key === $type ? ' selected="selected"' : '') . '>' . htmlspecialchars($row) . '</option>';
}
$html .= '
</select>
</dd>';
}
$html .= '
<dt>Alvorlighet/prioritet</dt>
<dd>
<select name="a_priority">';
$priority = isset($_POST['a_priority']) && is_numeric($_POST['a_priority']) && $_POST['a_priority'] >= 1 && $_POST['a_priority'] <= 3 ? $_POST['a_priority'] : 2;
$html .= '
<option value="1"' . ($priority == 1 ? ' selected="selected"' : '') . '>Lav</option>
<option value="2"' . ($priority == 2 ? ' selected="selected"' : '') . '>Moderat</option>
<option value="3"' . ($priority == 3 ? ' selected="selected"' : '') . '>Høy</option>
</select>
</dd>
</dl>
<p>Begrunnelse for advarsel</p>
<p><textarea name="a_log" rows="10" cols="30" style="width: 98%">' . htmlspecialchars(postval("a_log")) . '</textarea></p>
<p><input type="checkbox" name="a_notify"' . ($_SERVER['REQUEST_METHOD'] == "POST" && !isset($_POST['a_notify']) ? '' : ' checked="checked"') . ' id="warning_notify" /><label for="warning_notify"> Gi brukeren informasjon om denne advarselen. Kun kategori og begrunnelse vil bli oppgitt til brukeren som en logg i hendelser.</label></p>
</form>
</div>
</div>';
// analyser advarsler
$lca_id = crewlog::$actions['user_warning'][0];
$pagei = new pagei(pagei::ACTIVE_GET, "side", pagei::PER_PAGE, 15);
$result = $pagei->query("\n\t\t\tSELECT lc_id, lc_up_id, lc_time, lc_log, lcd_data_int\n\t\t\tFROM log_crew\n\t\t\t\tJOIN users_players ON lc_a_up_id = up_id AND up_u_id = " . page_min_side::$active_user->id . "\n\t\t\t\tLEFT JOIN log_crew_data ON lcd_lc_id = lc_id AND lcd_lce_id = 5\n\t\t\tWHERE lc_lca_id = {$lca_id} AND (lcd_data_int IS NULL OR lcd_data_int = 0)\n\t\t\tORDER BY lc_time DESC");
$data = array();
while ($row = $result->fetch()) {
$data[$row['lc_id']] = $row;
}
// sett opp data
$data = crewlog::load_summary_data($data);
$html .= '
<div class="bg1_c ' . (count($data) == 0 ? 'xsmall' : 'xmedium') . '">
<h1 class="bg1">Tidligere advarsler<span class="left2"></span><span class="right2"></span></h1>
<div class="bg1">';
if (count($data) == 0) {
$html .= '
<p>Brukeren har ingen tidligere advarsler.</p>';
} else {
ess::$b->page->add_css('
.advarsel { border: 1px solid #292929; margin: 10px 0; padding: 0 10px }');
foreach ($data as $row) {
$priority = $row['data']['priority'] == 1 ? "lav" : ($row['data']['priority'] == 2 ? "moderat" : "høy");
$html .= '
<div class="advarsel">
<p><b>' . ess::$b->date->get($row['lc_time'])->format() . '</b>: ' . $row['data']['type'] . ' (alvorlighet: <b>' . $priority . '</b>):</p>
<ul>
<li>' . game::format_data($row['lc_log']) . '</li>
<li>Internt notat: ' . game::format_data($row['data']['note']) . '</li>
</ul>
<p>' . (empty($row['data']['notified']) ? 'Ble IKKE varslet.' : 'Ble varslet.') . ' Av <user id="' . $row['lc_up_id'] . '" /></p>
</div>';
}
// TODO: AJAX på sidevalg
$html .= '
<p class="c">' . $pagei->pagenumbers() . '</p>';
if ($pagei->pages > 1) {
$html .= '
<p class="c dark">(Sidene åpner i samme vindu, så pass på hvis du har fylt inn feltene ovenfor.)</p>';
}
}
$html .= '
</div>
</div>
</div>';
return $html;
}
示例15: show_sbutton
}
$_base->page->add_title("Slett");
// vis skjema
echo '
<h1 class="path_all">Slette revisjon: ' . $hierarchy . '</h1>
<p>Er du sikker på at du ønsker å slette denne revisjonen?</p>
<div class="warning">
<p>Revisjonen vil bli slettet permanent.</p>
</div>
<form action="" method="post">
<p><input type="checkbox" name="confirm" id="confirm_del" /><label for="confirm_del"> Bekreft</label></p>
<p>' . show_sbutton("Slett", 'name="do"') . ' <a href="' . $filurl . '" class="button">Avbryt</a></p>
</form>
<p>Lastet opp ' . $_base->date->get($revision->info['cfr_time'])->format(date::FORMAT_SEC) . ' av <user id="' . $revision->info['cfr_up_id'] . '" />.</p>';
// vis beskrivelse
$description = trim(game::format_data($revision->info['cfr_description']));
if (!empty($description)) {
echo '
<div class="p">' . $description . '</div>';
}
echo '
<p><a href="' . $revurl . '/raw"><b>Hent fil »</b></a></p>';
$_base->page->load();
}
// handling: sett aktiv revisjon
if ($subpage == "active") {
// allerede aktiv?
if ($revision->id == $file->info['cff_cfr_id']) {
$_base->page->add_message("Denne revisjonen er allerede aktiv.");
} else {
// sett som aktiv