本文整理汇总了PHP中show_sbutton函数的典型用法代码示例。如果您正苦于以下问题:PHP show_sbutton函数的具体用法?PHP show_sbutton怎么用?PHP show_sbutton使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了show_sbutton函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: build
/**
* Generer alle lenkene
*/
public function build()
{
$ret = array();
$low = $this->page - $this->jump;
$high = $this->page + $this->jump;
for ($i = 1; $i <= $this->pages; $i++) {
// skal vi hoppe over lenken?
if ($i > 1 && $i < $this->pages && ($i < $low || $i > $high)) {
// finn sidetallet vi skal hoppe til (minus 1)
$n = $i > $high ? $this->pages - 1 : $low - 1;
// hopp kun over hvis det er mer enn én side
if ($n - $i >= 1) {
$i = $n;
$ret[] = show_sbutton("..", 'name="' . $this->name_safe . '" onclick="var v=prompt(\'Ønsket sidetall? (1-' . $this->pages . ')\', 0); if (v && v >= 1 && v <= ' . $this->pages . ') this.value = v; else return false"');
continue;
}
}
// aktiv side?
if ($i == $this->page) {
$ret[] = "[{$i}]";
} else {
$ret[] = $this->link($i);
}
}
return implode(" ", $ret);
}
示例2: show_sbutton
</tbody>
<table class="table center tablem">
<thead>
<tr>
<th>Begrunnelse</th>
</tr>
</thead>
<tbody>
<tr>
<td>Tomt felt resulterer i ingen begrunnelse.<br /><textarea name="begrunnelse" class="styled w300"></textarea></td>
</tr>
</tbody>
</table>
<table class="table center">
<thead>
<tr>
<th>Intern informasjon</th>
</tr>
</thead>
<tbody>
<tr>
<td>Tomt felt resulterer i ingen intern informasjon.<br /><textarea name="interninfo" class="styled w300"></textarea></td>
</tr>
</tbody>
</table>
<h1>Utfør</h1>
<p align="center">
' . show_sbutton("Fortsett") . '
</p>
</form>';
ess::$b->page->load();
示例3: page_training_show
/**
* Våpentrening
*/
protected function page_training_show()
{
// sett opp og test for anti-bot
$this->training_antibot = new antibot(login::$user->id, "training", 7);
if (MAIN_SERVER) {
$this->training_antibot->check_required();
}
// sett opp skjema
$this->training_form = \Kofradia\Form::getByDomain("training", login::$user);
// ventetid?
$wait = max(0, login::$user->player->data['up_weapon_training_next'] - time());
// skal vi trene våpenet?
if (isset($_POST['wt']) && $this->training_form->validateHashOrAlert(null, "Våpentrening")) {
// kan vi ikke trene nå?
if ($wait > 0) {
redirect::handle();
}
// finnes ikke valget?
$id = (int) postval("training_id");
if (!isset(self::$trainings[$id])) {
ess::$b->page->add_message("Du må velge et alternativ.", "error");
redirect::handle();
}
$opt = self::$trainings[$id];
// lagre valget for neste gang
ess::session_put("training_id", $id);
// har ikke nok cash?
if ($opt['price'] > login::$user->player->data['up_cash']) {
ess::$b->page->add_message("Du har ikke nok penger til å utføre våpentreningen.");
redirect::handle();
}
$f = self::TRAINING_MAX * $opt['percent'];
$next_old = login::$user->player->data['up_weapon_training_next'] ? ' = ' . login::$user->player->data['up_weapon_training_next'] : ' IS NULL';
// utfør våpentrening
$a = \Kofradia\DB::get()->exec("\n\t\t\t\tUPDATE users_players\n\t\t\t\tSET up_weapon_training = up_weapon_training + (1 - up_weapon_training) * {$f}, up_weapon_training_next = " . (time() + $opt['wait']) . ", up_cash = up_cash - {$opt['price']}\n\t\t\t\tWHERE up_id = " . login::$user->player->id . " AND up_cash >= {$opt['price']} AND up_weapon_training_next{$next_old}");
// ikke oppdatert?
if ($a == 0) {
ess::$b->page->add_message("Kunne ikke utføre våpentrening.", "error");
} else {
$this->training_antibot->increase_counter();
ess::$b->page->add_message("Du trente opp våpenet ditt og våpentreningen økte med " . game::format_num((1 - login::$user->player->data['up_weapon_training']) * $f * 100, 2) . " %.");
}
redirect::handle();
}
$training = login::$user->player->data['up_weapon_training'] * 100;
echo '
<div class="bg1_c xsmall">
<h1 class="bg1">Våpentrening<span class="left2"></span><span class="right2"></span></h1>
<div class="bg1">';
if ($wait > 0) {
echo '
<p class="c">Du må vente ' . game::counter($wait, true) . ' før du kan trene våpenet på nytt.</p>';
} else {
// vis alternativene
echo '
<form action="" method="post">
' . $this->training_form->getHTMLInput() . '
<table class="table tablemt center">
<thead>
<tr>
<th>Pris</th>
<th>Ventetid</th>
</tr>
</thead>
<tbody>';
$i = 0;
$match = ess::session_get("training_id") ?: 0;
foreach (self::$trainings as $id => $row) {
echo '
<tr class="box_handle' . (++$i % 2 == 0 ? ' color' : '') . '">
<td class="r"><input type="radio" name="training_id"' . ($match == $id ? ' checked="checked"' : '') . ' value="' . $id . '" />' . game::format_cash($row['price']) . '</td>
<td class="r">' . game::timespan($row['wait']) . '</td>
</tr>';
}
echo '
</tbody>
</table>
<p class="c">' . show_sbutton("Utfør", 'name="wt"') . '</p>
</form>';
}
echo '
<div class="progressbar p' . ($training < 28 ? ' levelcrit' : ($training < 35 ? ' levelwarn' : '')) . '">
<div class="progress" style="width: ' . round(min(100, $training)) . '%">
<p>Våpentrening: ' . ($training == 100 ? '100' : game::format_num($training, 2)) . ' %</p>
</div>
</div>
<p>Du har en <b>' . htmlspecialchars(login::$user->player->weapon->data['name']) . '</b> med <b>' . game::format_num(login::$user->player->data['up_weapon_bullets']) . '</b> ' . fword('kule', 'kuler', login::$user->player->data['up_weapon_bullets']) . '.</p>
<p>Våpentreningen din synker jevnlig i løpet av dagen, og du er nødt til å trene for å holde oppe våpentreningen din. Hvis våpentreningen din faller under 25 %, risikerer du å miste våpenet ditt.</p>
<p>Bedre våpentrening fører til:</p>
<ul class="spacer">
<li>Du forbedrer treffsikkerheten din</li>
<li>Du øker skuddtakten samtidig som treffsikkerheten forblir den samme</li>
</ul>
</div>
</div>';
}
示例4: step4
//.........这里部分代码省略.........
global $__server;
// er denne brukeren vervet?
if (isset($_COOKIE[$__server['cookie_prefix'] . "rid"])) {
$rid = $_COOKIE[$__server['cookie_prefix'] . "rid"];
// finnes denne brukeren?
$result = \Kofradia\DB::get()->query("SELECT up_id, up_u_id FROM users_players WHERE up_id = " . \Kofradia\DB::quote($rid));
if ($row = $result->fetch()) {
$recruiter = $row;
}
}
\Kofradia\DB::get()->beginTransaction();
// deaktiver kontroll av foreign key
\Kofradia\DB::get()->exec("SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0");
// opprett bruker
$time = time();
\Kofradia\DB::get()->exec("INSERT INTO users SET u_email = {$email}, u_pass = {$pass}, u_birth = {$birth}, u_tos_version = {$tos_version}, u_created_time = {$time}, u_created_ip = " . \Kofradia\DB::quote($_SERVER['REMOTE_ADDR']) . ", u_created_referer = {$referer}, u_recruiter_u_id = {$recruiter['up_u_id']}, u_recruiter_points_last = 0");
$u_id = \Kofradia\DB::get()->lastInsertId();
// opprett spiller og tilknytt brukeren
\Kofradia\DB::get()->exec("INSERT INTO users_players SET up_u_id = {$u_id}, up_name = {$user}, up_created_time = {$time}, up_recruiter_up_id = {$recruiter['up_id']}, up_b_id = {$bydel}");
$up_id = \Kofradia\DB::get()->lastInsertId();
\Kofradia\DB::get()->exec("UPDATE users SET u_active_up_id = {$up_id} WHERE u_id = {$u_id}");
// aktiver kontroll av foreign key
\Kofradia\DB::get()->exec("SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS");
// sett opp riktig rank plassering
#\Kofradia\DB::get()->exec("UPDATE users_players AS main, (SELECT COUNT(users_players.up_id)+1 AS pos, ref.up_id FROM users_players AS ref LEFT JOIN users_players ON users_players.up_points > ref.up_points AND users_players.up_access_level < {$_game['access_noplay']} AND users_players.up_access_level != 0 WHERE ref.up_id = $up_id GROUP BY ref.up_id) AS rp SET main.up_rank_pos = rp.pos WHERE main.up_id = rp.up_id");
\Kofradia\DB::get()->exec("INSERT INTO users_players_rank SET upr_up_id = {$up_id}");
ranklist::update();
// slett registrasjonsoppføringen
\Kofradia\DB::get()->exec("DELETE FROM registration WHERE id = {$this->id}");
\Kofradia\DB::get()->commit();
// send e-post
$email = new email();
$email->text = 'Hei,
Du har registrert deg som ' . $this->info['user'] . ' på Kofradia.
Velkommen til spillet!
--
www.kofradia.no';
$email->headers['X-SMafia-IP'] = $_SERVER['REMOTE_ADDR'];
$email->headers['Reply-To'] = "henvendelse@smafia.no";
$email->send($this->info['email'], "Velkommen til Kofradia");
ess::$b->page->add_message('Velkommen til Kofradia!<br /><br />Du er nå registrert som <b>' . $this->info['user'] . '</b> og automatisk logget inn.<br /><br />Sjekk ut menyen til venstre så ser du hva vi har å tilby i dag.<br /><br />Hvis du har noen spørsmål ta en titt under <a href="' . ess::$s['relative_path'] . '/node">hjelp</a> og ta evt. kontakt med <a href="support/">support</a> om du ikke finner svar på det du lurer på!<br /><br />Ikke glem og les gjennom <a href="' . ess::$s['relative_path'] . '/node/6">reglene for forumene</a> før du skriver i forumet. Lykke til i spillet!');
// hent antall medlemmer
$result = \Kofradia\DB::get()->query("SELECT COUNT(up_id) FROM users_players WHERE up_access_level < {$_game['access_noplay']} AND up_access_level != 0");
putlog("INFO", "%bNY SPILLER:%b (#{$up_id} - Nummer %b" . $result->fetchColumn(0) . "%b) %u{$this->info['user']}%u registrerte seg! {$__server['absolute_path']}{$__server['relative_path']}/p/" . rawurlencode($this->info['user']));
// logg inn brukeren
login::do_login($u_id, $this->info['pass'], LOGIN_TYPE_TIMEOUT, false);
// slett registrasjonsoppføringen fra session etc
$this->trash();
// sjekk om det er mulig multi
$result = \Kofradia\DB::get()->query("\n\t\t\t\t\tSELECT up_name\n\t\t\t\t\tFROM users_players, users\n\t\t\t\t\tWHERE u_online_ip = " . \Kofradia\DB::quote($_SERVER['REMOTE_ADDR']) . "\n\t\t\t\t\t\tAND u_id != {$u_id}\n\t\t\t\t\t\tAND u_active_up_id = up_id AND up_access_level != 0\n\t\t\t\t\t\tAND up_last_online > " . (time() - 86400 * 30) . "\n\t\t\t\t\tLIMIT 10");
if ($result->rowCount() > 0) {
$names = array();
while ($row = $result->fetch()) {
$names[] = $row['up_name'];
}
putlog("CREWCHAN", "%b%c4NY REGISTERT, MULIG MULTI:%c%b (#{$up_id}) %u{$this->info['user']}%u registrerte seg. Andre spillere på IP-en: " . implode(", ", $names) . ". {$__server['path']}/admin/brukere/finn?ip=" . rawurlencode($_SERVER['REMOTE_ADDR']));
}
// videresend til hovedsiden
redirect::handle("", redirect::ROOT);
}
}
echo '
<form action="registrer" method="post">
<input type="hidden" name="abort" />
<h1>Bekreftelse av betingelsene</h1>
<p class="h_right">' . show_sbutton("Avbryt registrering", 'onclick="return confirm(\'Er du sikker på at du vil AVBRYTE?\')"') . '</p>
</form>
<p>
På denne siden finner du en oversikt over betingelsene. Betingelsene er ikke lange og er kjapt å lese igjennom. Det er viktig at du er klar over innholdet i disse betingelsene og at du følger dem. Følger du ikke disse betingelsene vil brukeren din bli deaktivert. For å kunne opprette må du godta betingelsene.
</p>
<boxes />
<form action="registrer" method="post">
<input type="hidden" name="step" value="4" />
<p>
Betingelser:<br />
<div id="betingelser_content">' . game::$settings['tos']['value'] . '</div>
</p>
<p>
<input type="checkbox" name="betingelser" id="betingelser" /><label for="betingelser"> Jeg har lest gjennom og aksepterer betingelsene</label>
</p>
<p>
<input type="checkbox" name="alder" id="alder" /><label for="alder"> Jeg har fylt 13 år</label>
</p>
<p>
<input type="checkbox" name="forste_bruker" id="forste_bruker" /><label for="forste_bruker"> Jeg har ingen bruker som er aktivert fra før av</label> <span class="dark">(Hvis du allerede har en bruker, må du deaktivere den <u>før</u> du registrerer deg på nytt.)</span>
</p>
<p>
' . show_sbutton("Opprett bruker") . '
</p>
</form>
<form action="registrer" method="post">
<input type="hidden" name="abort" />
<p>
' . show_sbutton("Avbryt registrering", 'onclick="return confirm(\'Er du sikker på at du vil AVBRYTE?\')"') . '
</p>
</form>';
}
示例5: __construct
//.........这里部分代码省略.........
// vis html for svaret
echo $this->topic->forum->template_topic_reply($row);
}
}
// oppdatere sist sett?
$time = $last_time != 0 ? $last_time : $this->topic->info['ft_time'];
// legge til?
if (login::$logged_in && empty($this->topic->info['fs_time'])) {
\Kofradia\DB::get()->exec("INSERT IGNORE INTO forum_seen SET fs_ft_id = {$this->topic->id}, fs_u_id = " . login::$user->id . ", fs_time = {$time}");
} elseif (login::$logged_in && $time > $this->topic->info['fs_time']) {
\Kofradia\DB::get()->exec("UPDATE forum_seen SET fs_time = GREATEST(fs_time, {$time}) WHERE fs_ft_id = {$this->topic->id} AND fs_u_id = " . login::$user->id);
}
echo '
</div>';
// vis svarskjema
echo '
<div' . ($reply_form ? '' : ' style="display: none"') . ' id="container_reply">' . ($reply_form ? '
<boxes />' : '') . '
<form action="' . htmlspecialchars(game::address("topic", $_GET, array("replyid", "fs"), array("reply" => true))) . '" method="post"' . ($reply_form ? ' id="forum_scroll_here"' : '') . '>
<div class="section forum_reply_edit_c">
<h2>Svar</h2>
<dl class="dl_2x">
<dt>Innhold</dt>
<dd><textarea name="text" rows="20" cols="75" id="replyText">' . htmlspecialchars(postval("text")) . '</textarea></dd>';
// vise ekstra alternativer?
if (access::has("forum_mod") || $this->topic->forum->id >= 5 && $this->topic->forum->id <= 7) {
$no_concat = isset($_POST['no_concatenate']) || $_SERVER['REQUEST_METHOD'] != "POST" && $this->topic->forum->id >= 5 && $this->topic->forum->id <= 7;
$announce_text = $this->topic->forum->id >= 5 && $this->topic->forum->id <= 7 ? 'Legg til logg i spilleloggen til medlemmer av Crewet.' : 'Annonser på #kofradia kanalen';
echo '
<dt>Ekstra</dt>
<dd>' . (!$this->topic->forum->ff ? '
<input type="checkbox" name="announce" id="announce"' . (isset($_POST['announce']) ? ' checked="checked"' : '') . ' /><label for="announce"> ' . $announce_text . '</label><br />' : '') . '
<input type="checkbox" name="no_concatenate" id="no_concatenate"' . ($no_concat ? ' checked="checked"' : '') . ' /><label for="no_concatenate"> <u>Ikke</u> kombiner sammen med siste melding.</label>
</dd>';
}
echo '
</dl>
<p class="c">
' . show_sbutton("Legg til svar", 'name="post" accesskey="s" id="forum_reply_button_add"') . '
' . show_sbutton("Forhåndsvis", 'name="preview" accesskey="p" id="forum_reply_button_preview"') . '
</p>
</div>
<div id="reply_preview" class="forum">';
// forhåndsvise?
if (login::$logged_in && isset($_POST['preview'])) {
$data = array("ft_id" => $this->topic->id, "fr_text" => postval("text"), "fr_up_id" => login::$user->player->id, "up_name" => login::$user->player->data['up_name'], "up_access_level" => login::$user->player->data['up_access_level'], "up_points" => login::$user->player->data['up_points'], "upr_rank_pos" => login::$user->player->data['upr_rank_pos'], "up_forum_signature" => login::$user->player->data['up_forum_signature'], "up_profile_image_url" => login::$user->player->data['up_profile_image_url'], "fs_new" => \Kofradia\Forum\Category::$fs_check);
echo \Kofradia\Forum\Category::template_topic_reply_preview($data);
}
echo '</div>
</form>
</div>';
// linker i bunn
if (login::$logged_in) {
echo '
<form action="" method="post">
<input type="hidden" name="sid" value="' . login::$info['ses_id'] . '" />
<div class="forum_footer_links">';
// slette/gjenopprette lenker
if ($this->fmod || $this->topic->info['ft_up_id'] == login::$user->player->id) {
echo '
<p class="left">' . ($this->topic->info['ft_deleted'] == 0 ? '
<span class="red">' . show_sbutton("Slett emnet", 'name="delete" onclick="return confirm(\'Sikker?!\')"') . '</span>' : '
<span class="green">' . show_sbutton("Gjenopprett emnet", 'name="restore" onclick="return confirm(\'Sikker?!\')"') . '</span>') . '
</p>';
}
// alternativer
echo '
<p class="right">';
// reply lenke
if (!$reply_form && $this->topic->info['ft_deleted'] == 0 && ($this->topic->info['ft_locked'] == 0 || $this->fmod)) {
echo '
<a href="' . htmlspecialchars(game::address("topic", $_GET, array("replyid"), array("reply" => true))) . '" class="button forum_link_replyform" accesskey="r">Opprett svar</a>';
}
// signatur lenker
echo login::$user->data['u_forum_show_signature'] == 1 ? '
<a href="' . htmlspecialchars(game::address("topic", $_GET, array("show_signature"), array("hide_signature" => true))) . '" class="button">Skjul signaturer</a>' : '
<a href="' . htmlspecialchars(game::address("topic", $_GET, array("hide_signature"), array("show_signature" => true))) . '" class="button">Vis signaturer</a>';
echo '
</p>';
}
// sidetall
if ($pagei->pages > 1) {
echo '
<p class="center">' . $pagei->pagenumbers(game::address(PHP_SELF, $_GET, array("p", "replyid", "fs", "reply")), game::address(PHP_SELF, $_GET, array("p", "replyid", "fs", "reply"), array("p" => "_pageid_"))) . '</p>';
}
echo '
</div>
</form>
</div>
</div>';
// div javascript
// sørg for at meldingene blir oppdatert og at nye meldinger blr hentet hvis vi er på siste side
ess::$b->page->add_js_file(ess::$s['relative_path'] . "/js/forum.js");
ess::$b->page->add_js('
sm_scripts.report_links();');
ess::$b->page->add_js_domready('
var topic = new ForumTopic(' . $this->topic->id . ', ' . js_encode($id_list) . ', ' . js_encode($replies_last_edit) . ', ' . ($pagei->pages == $pagei->active ? 'true' : 'false') . ', ' . ($show_deleted ? 'true' : 'false') . ', ' . ($this->fmod ? 'true' : 'false') . ', ' . (int) $this->topic->info['ft_last_edit'] . ');' . ($reply_form ? '
topic.reply_form_show();' : ''));
$this->topic->forum->load_page();
}
示例6: CardsPoker
<p>Marker de kortene du ønsker å <u>beholde</u>.</p>
<p>';
$poker = new CardsPoker(explode(",", $cards));
$solve = $poker->solve();
if ($solve[0] == 0) {
$solve[2] = array($solve[3][0] => true);
}
foreach ($poker->active as $key => $card) {
echo sprintf('
<input type="checkbox" name="kort[]" value="%d" id="kort%d"%s /><label for="kort%d"><img src="%s" alt="%s" title="%s" class="spillekort" /></label>', $key, $key, isset($solve[2][$key]) ? '' : '', $key, htmlspecialchars(sprintf(KORT_URL, $card->num + 1, $card->group['name'])), ucfirst(htmlspecialchars($card->group['title'])) . ' ' . $card->sign(), ucfirst(htmlspecialchars($card->group['title'])) . ' ' . $card->sign());
}
$text = $poker->solve_text($solve);
echo '
</p>
<p>' . $text . '</p>
<p>' . show_sbutton("Fortsett", 'name="choose"') . '</p>
</form>
</div>
</div>';
}
// vise resultat?
if ($finish) {
echo '
<div class="bg1_c">
<h2 class="bg1">Resultat<span class="left2"></span><span class="right2"></span></h2>
<div class="bg1 c">
<div class="information">';
switch ($won[0]) {
case 0:
echo '
<p>Runden ble uavgjort.</p>';
示例7: show_sbutton
<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) {
// opprett søknad
\Kofradia\DB::get()->exec("INSERT INTO soknader_applicants SET sa_so_id = {$soknad['so_id']}, sa_up_id = " . login::$user->player->id . ", sa_added = " . time() . ", sa_status = 0");
$_base->page->add_message("Du har nå opprettet en søknad og kan redigere denne.");
redirect::handle();
} else {
echo '
<p class="c">Du har ikke opprettet noen søknad.</p>
<form action="" method="post">
<p class="c">' . show_sbutton("Opprett søknad", 'name="opprett"') . '</p>
</form>';
}
echo '
</div>
</div>
</div>';
$_base->page->load();
示例8: explode
$birth = explode("-", $row['u_birth']);
$td[] = '<td class="r">' . (empty($row['u_birth']) || $row['u_birth'] == "0000-00-00" ? 'Ikke registrert' : intval($birth[2]) . ". " . $_lang['months'][intval($birth[1])] . " " . $birth[0]) . '</td>';
}
if (isset($show['banko'])) {
$td[] = '<td><input type="radio" name="u1" value="' . $row['up_id'] . '" /></td>';
$td[] = '<td><input type="radio" name="u2" value="' . $row['up_id'] . '" /></td>';
}
echo '
<tr' . (++$i % 2 == 0 ? ' class="color"' : '') . '>
' . implode("\n\t\t\t\t", $td) . '
</tr>';
}
echo '
</tbody>
</table>';
// vise bankoverføringer?
if (isset($show['banko'])) {
echo '
<p>' . show_sbutton("Vis bankoverføringer") . '</p>';
}
echo '
</form>';
// flere sider?
if ($pagei->pages > 1) {
echo '
<p>Navigasjon: ' . $pagei->pagenumbers() . '</p>';
}
}
}
}
$_base->page->load();
示例9: show
/**
* Vis fengsel
*/
protected function show()
{
// er vi i fengsel nå?
if ($wait = $this->up->fengsel_wait()) {
ess::$b->page->add_js_domready('$("fengsel_dusor").focus();');
echo '
<div class="bg1_c xsmall">
<h1 class="bg1">Du er i fengsel<span class="left"></span><span class="right"></span></h1>
<p class="h_right"><a href="node/16">Hjelp</a></p>
<div class="bg1">
<p>Du befinner deg for øyeblikket i fengsel og slipper ut om ' . game::counter($wait, true) . '.</p>' . (!$this->up->is_nostat() ? '
<form action="" method="post">
<input type="hidden" name="sid" value="' . login::$info['ses_id'] . '" />
<input type="hidden" name="expire" value="' . $this->up->data['up_fengsel_time'] . '" />
<dl class="dd_right">
<dt>Dusør for å bryte deg ut</dt>
<dd><input type="text" class="styled w80" name="amount" id="fengsel_dusor" value="' . game::format_cash($this->up->data['up_fengsel_dusor']) . '" /></dd>
</dl>
<p class="c">' . show_sbutton($this->up->data['up_fengsel_dusor'] > 0 ? "Endre dusør" : "Sett dusør", 'name="dusor"') . '</p>
<p class="c">Spilleren som bryter ut mottar kun ' . self::DUSOR_PROFIT * 100 . ' % av dusøren.</p>
</form>' : '') . '
</div>
</div>';
}
// sortering
$sort = new sorts("sort");
$sort->append("asc", "Spiller", "up_name");
$sort->append("desc", "Spiller", "up_name DESC");
$sort->append("asc", "Wanted nivå", "up_wanted_level, up_fengsel_time DESC");
$sort->append("desc", "Wanted nivå", "up_wanted_level DESC, up_fengsel_time DESC");
$sort->append("asc", "Tid igjen", "up_fengsel_time");
$sort->append("desc", "Tid igjen", "up_fengsel_time DESC");
$sort->set_active(requestval("sort"), 5);
// hent folk i fengsel
$sort_info = $sort->active();
$pagei = new pagei(pagei::ACTIVE_GET, "side", pagei::PER_PAGE, 15);
$result = $pagei->query("\n\t\t\tSELECT up_id, up_name, up_access_level, up_fengsel_time, up_fengsel_num, up_fengsel_dusor, ROUND(up_fengsel_dusor * " . self::DUSOR_PROFIT . ") up_fengsel_dusor_get, up_wanted_level\n\t\t\tFROM users_players\n\t\t\tWHERE up_fengsel_time > " . time() . " AND up_access_level != 0\n\t\t\tORDER BY {$sort_info['params']}");
$num = $result->rowCount();
echo '
<div class="bg1_c ' . ($num == 0 ? 'xsmall' : 'xlarge') . '">
<h1 class="bg1">Fengsel<span class="left"></span><span class="right"></span></h1>
<p class="h_right"><a href="node/16">Hjelp</a></p>
<div class="bg1">
<form action="" method="post">
<p class="c dark">Ditt wanted nivå er på ' . game::format_number($this->up->data['up_wanted_level'] / 10, 1) . ' %.</p>';
if ($num == 0) {
echo '
<p class="c dark">Ingen er i fengselet for øyeblikket.</p>
<p class="c"><a href="' . htmlspecialchars(game::address("fengsel", $_GET)) . '" class="button">Oppdater</a></p>';
} else {
echo '
<table class="table center" width="100%">
<thead>
<tr>
<th>Spiller ' . $sort->show_link(0, 1) . '</th>
<th>Wanted<br />nivå ' . $sort->show_link(2, 3) . '</th>
<th>Utbrytning<br />sannsynlighet</th>
<th>Ca. poeng</th>
<th>Dusør</th>
<th>Tid igjen ' . $sort->show_link(4, 5) . '</th>
</tr>
</thead>
<tbody>';
$i = 0;
while ($row = $result->fetch()) {
$prefix = "";
$attr = new attr("class");
if (++$i % 2 == 0) {
$attr->add("color");
}
if (!$this->up->fengsel_check()) {
$attr->add("box_handle");
$prefix = '<input type="radio" name="up_id" value="' . $row['up_id'] . '_' . $row['up_fengsel_time'] . '_' . $row['up_fengsel_dusor'] . '" /> ';
}
$time = $row['up_fengsel_time'] - time();
$prob = self::calc_prob($time, $row['up_wanted_level'] / 10);
$points = self::calc_points($prob);
echo '
<tr' . $attr->build() . '>
<td>' . $prefix . game::profile_link($row['up_id'], $row['up_name'], $row['up_access_level']) . '</td>
<td class="c">' . game::format_number($row['up_wanted_level'] / 10, 1) . ' %</td>
<td class="c">' . game::format_number($prob, 1) . ' %</td>
<td class="c">' . game::format_num($points) . '</td>
<td class="r nowrap">' . game::format_cash($row['up_fengsel_dusor_get']) . '</td>
<td class="r">' . game::counter($time) . '</td>
</tr>';
}
echo '
</tbody>
</table>
<p class="c">' . (($wait = $this->up->fengsel_wait()) == 0 ? '
' . show_sbutton("Bryt ut", 'name="brytut"') : '
Du er i fengsel og slipper ut om ' . game::counter($wait, true) . '.
</p>
<p class="c">') . '
<a href="' . htmlspecialchars(game::address("fengsel", $_GET)) . '" class="button">Oppdater</a>
</p>';
//.........这里部分代码省略.........
示例10: foreach
$i = 0;
foreach ($search_from as $key => $item) {
if (++$i == count($search_from)) {
break;
}
echo '
<input type="radio" id="f_' . $key . '" name="f" value="' . $key . '"' . ($search_from_id == $key ? ' checked="checked"' : '') . ' /><label for="f_' . $key . '"> ' . htmlspecialchars($item[0]) . '</label>';
}
echo '
</dd>
<dt> </dt>
<dd><input type="radio" id="f_' . $key . '" name="f" value="' . $key . '"' . ($search_from_id == $key ? ' checked="checked"' : '') . ' onclick="$(\'u_name\').focus()" /><label for="f_' . $key . '"> Spesifiser: </label><input type="text" name="u" value="' . htmlspecialchars(postval("u")) . '" class="styled w100" id="u_name" onfocus="$(\'f_' . $key . '\').checked=true" /></dd>
</dl>
<h3 class="c">
' . show_sbutton("Utfør søk", 'name="search"') . '
</h3>
</div>
</form>';
// søke?
if (isset($_POST['search'])) {
$title_search = postval("title");
$text_search = postval("text");
// finn ut delene av spørringen
$title_parts = search_query($title_search);
$text_parts = search_query($text_search);
if (count($title_parts[0]) == 0 && count($text_parts[0]) == 0 && $search_from_id != 4) {
echo '
<h2>
Søkeresultater
</h2>
示例11: page_crew
//.........这里部分代码省略.........
' . implode('
', $items) . '
</div>
</div>';
}
echo '
<p class="c">' . $pagei->pagenumbers() . '</p>';
}
echo '
</div>';
} elseif ($subpage2 == "addlog" && access::has("forum_mod")) {
// legge til?
if (isset($_POST['notat'])) {
$notat = trim(postval("notat"));
$notat_bb = trim(game::bb_to_html($notat));
if (empty($notat_bb)) {
ess::$b->page->add_message("Notatet kan ikke være tomt.", "error");
} else {
// legg til i crewloggen
crewlog::log("user_add_note", page_min_side::$active_player->id, $notat);
ess::$b->page->add_message("Notatet ble registrert.");
redirect::handle(page_min_side::addr());
}
}
ess::$b->page->add_title("Nytt notat");
ess::$b->page->add_js_domready('$("notat_felt").focus();');
echo '
<div class="bg1_c">
<h1 class="bg1">Legg til notat i crewloggen<span class="left2"></span><span class="right2"></span></h1>
<div class="bg1">
<p>Notat: (Vil bli lagt til som vanlig logg i <a href="' . htmlspecialchars(page_min_side::addr(NULL)) . '">Crewloggen</a>.)</p>
<form action="" method="post">
<p><textarea name="notat" id="notat_felt" rows="10" cols="30" style="width: 98%; overflow: auto">' . htmlspecialchars(postval("notat")) . '</textarea></p>
<p>' . show_sbutton("Legg til notat") . '</p>
</form>
</div>
</div>';
} elseif ($subpage2 == "blokk") {
ess::$b->page->add_title("Blokkeringer");
$type = false;
if (isset($_GET['t'])) {
// kontroller type
$type_id = intval($_GET['t']);
// fant ikke?
if (!isset(blokkeringer::$types[$type_id])) {
ess::$b->page->add_message("Ugyldig type '.{$type_id}.'.", "error");
} else {
$type = blokkeringer::$types[$type_id];
// har vi tilgang til å gjøre noe med denne blokkeringen?
if (!access::has($type['access'])) {
ess::$b->page->add_message('Du har ikke tilgang til denne typen blokkering. (' . htmlspecialchars($type['title']) . ')', "error");
$type = false;
}
}
}
// vise en type blokkering?
if ($type) {
redirect::store(page_min_side::addr(NULL, "b=blokk&t={$type_id}"));
// sjekk om det er en aktiv blokkering for denne typen
$active = blokkeringer::check($type_id, page_min_side::$active_user->id);
if ($active) {
// hent informasjon om blokkeringen
$info = blokkeringer::get_info($active['ub_id']);
}
// handling: legg til blokkering
if (isset($_POST['add']) && $active) {
示例12: show_sbutton
<p align="center">
Din innsats: ' . game::format_cash($poker['cash']) . '
</p>
<p align="center">
<b>Marker de kortene du vil <u>beholde</u>:</b>
</p>
<div class="kort_wrapper">
<div class="kort kg_' . $kort[0][1] . '">' . $tegn[$kort[0][0]] . '<br />' . $farger[$kort[0][1]][1] . '<input type="checkbox" name="kort[0]" /></div>
<div class="kort kg_' . $kort[1][1] . '">' . $tegn[$kort[1][0]] . '<br />' . $farger[$kort[1][1]][1] . '<input type="checkbox" name="kort[1]" /></div>
<div class="kort kg_' . $kort[2][1] . '">' . $tegn[$kort[2][0]] . '<br />' . $farger[$kort[2][1]][1] . '<input type="checkbox" name="kort[2]" /></div>
<div class="kort kg_' . $kort[3][1] . '">' . $tegn[$kort[3][0]] . '<br />' . $farger[$kort[3][1]][1] . '<input type="checkbox" name="kort[3]" /></div>
<div class="kort kg_' . $kort[4][1] . '">' . $tegn[$kort[4][0]] . '<br />' . $farger[$kort[4][1]][1] . '<input type="checkbox" name="kort[4]" /></div>
<div style="clear: left"></div>
</div>
<p class="kort_submit">
' . show_sbutton("Fortsett!", 'name="fullfor"') . '
</p>
</form>
' . gevinster() . '
<script type="text/javascript">
<!--
poker.init();
// -->
</script>';
}
}
function gevinster()
{
global $gevinster;
$stats = array();
// hent total statistikk
示例13: show
protected function show($as_who = null)
{
$complete = $this->data['poker_state'] == self::STATE_COMPLETE;
if ($complete) {
$winner = $this->get_winner();
}
$is_starter = $as_who == self::SHOW_STARTER;
$has_challenger = $this->data['poker_state'] >= self::STATE_CHALLENGE;
$new = $this->data['poker_state'] == self::STATE_BEGIN;
$challenge = !$is_starter && $this->data['poker_state'] == self::STATE_CHALLENGE;
echo '
<div class="bg1_c small">
<h1 class="bg1">' . ($is_starter ? $new ? 'Nytt pokerspill' : 'Ditt pokerspill' : 'Din utfordring') . '<span class="left"></span><span class="right"></span></h1>
<div class="bg1">';
if ($new) {
echo '
<p>Du har nå startet et nytt pokerspill og fortsetter ved å velge de kortene du vil <u>beholde</u>. Når du har trykket fortsett kommer du opp på listen for utfordrere og andre kan spille mot deg.</p>
<form action="" method="post">
<input type="hidden" name="state1" value="' . $this->id . '" />';
} elseif ($challenge) {
$time_left = $this->data['poker_time_challenge'] + self::MAX_CHALLENGE_TIME - time();
echo '
<p>Du må fullføre din utfordring innen <b>' . game::counter($time_left, true) . '</b>. Dersom du ikke fullfører vil spillet automatisk velge kort for deg.</p>
<form action="" method="post">
<input type="hidden" name="state3" value="' . $this->id . '" />';
}
echo '
<dl class="dd_right center" style="width: 60%">
<dt>Tid siden start</dt>
<dd>' . game::timespan($this->data['poker_time_start'], game::TIME_ABS) . '</dd>' . ($has_challenger ? '
<dt>Tid siden utfordring</dt>
<dd>' . game::timespan($this->data['poker_time_challenge'], game::TIME_ABS) . '</dd>' : '') . '
<dt>Innsats</dt>
<dd>' . game::format_cash($this->data['poker_cash']) . '</dd>' . ($has_challenger ? '
<dt>Utfordrer</dt>
<dd><user id="' . $this->data['poker_' . ($is_starter ? 'challenger' : 'starter') . '_up_id'] . '" /></dd>' : '
<dt>Utfordrer</dt>
<dd>Ingen enda</dd>') . '
</dl>';
if ($complete || $has_challenger && access::has("admin")) {
echo '
<div class="poker_cards_section">
<p><b>Motstanderens kort:</b> ' . ($is_starter ? $this->text2 : $this->text1) . '</p>
<p>';
if ($is_starter) {
$this->list_cards($this->poker2, $this->solve2);
} else {
$this->list_cards($this->poker1, $this->solve1);
}
echo '
</p>
</div>';
}
echo '
<div class="poker_cards_section">
<p><b>Dine kort:</b> ' . ($is_starter ? $this->text1 : $this->text2) . '</p>' . ($challenge ? '
<p>Marker de kortene du ønsker å <u>beholde</u>.</p>' : '') . '
<p>';
if ($new || $challenge) {
ess::$b->page->add_js('sm_scripts.poker_parse();');
if ($new) {
$this->list_cards_selectable($this->poker1, $this->solve1);
} else {
$this->list_cards_selectable($this->poker2, $this->solve2);
}
} elseif ($is_starter) {
$this->list_cards($this->poker1, $this->solve1);
} else {
$this->list_cards($this->poker2, $this->solve2);
}
echo '
</p>
</div>';
if ($complete) {
if ($winner[0] == 1 && !$is_starter || $winner[0] == 2 && $is_starter) {
if ($winner[1]) {
echo '
<p class="poker_res_lost">Dere fikk samme kombinasjon, men motstanderen din hadde høyere highcard. Du tapte runden...</p>';
} else {
echo '
<p class="poker_res_lost">Motstanderen fikk bedre kombinasjon enn deg. Du tapte runden...</p>';
}
} elseif ($winner[0] != 0) {
if ($winner[1]) {
echo '
<p class="poker_res_won">Dere fikk samme kombinasjon, men du hadde høyere highcard og vant ' . game::format_cash($this->data['poker_prize']) . '!</p>';
} else {
echo '
<p class="poker_res_won">Du fikk bedre kombinasjon enn motstanderen og vant ' . game::format_cash($this->data['poker_prize']) . '!</p>';
}
} else {
echo '
<p class="poker_res_eq">Runden ble uavgjort.</p>';
}
} elseif ($new) {
echo (access::has("admin") ? '
<p class="c"><input type="checkbox" name="renew" id="renew"' . (isset($_POST['renew']) ? ' checked="checked"' : '') . '><label for="renew"> Ikke avslutt runden</label></p>' : '') . '
<p class="c">' . show_sbutton("Velg kort og åpne runden") . '</p>
</form>';
} elseif ($challenge) {
//.........这里部分代码省略.........
示例14: show
/**
* Vis banken
*/
protected function show()
{
ess::$b->page->add_js('
var user_bank = ' . js_encode(game::format_cash($this->up->data['up_bank'])) . ';
var user_cash = ' . js_encode(game::format_cash($this->up->data['up_cash'])) . ';');
ess::$b->page->add_js_domready('
$$(".bank_amount_set").each(function(elm)
{
var amount = elm.get("rel").substring(0, 4) == "bank" ? user_bank : user_cash;
var e_id = elm.get("rel").substring(5);
elm
.appendText(" (")
.grab(new Element("a", {"text":"alt"}).addEvent("click", function()
{
$(e_id).set("value", amount);
}))
.appendText(")");
});');
echo '
<div class="bg1_c small" style="width: 420px">
<h1 class="bg1">
Banken
<span class="left"></span><span class="right"></span>
</h1>
<p class="h_left">
<a href="' . ess::$s['rpath'] . '/node/31">Hjelp</a>
</p>
<p class="h_right">' . (!isset(login::$extended_access['authed']) ? '
<a href="banken?logout">Logg ut av banken</a>' : '') . '
<a href="banken?authc">Endre pass</a>
</p>
<div class="bg1" style="padding: 0 15px">
<!-- bankkonto informasjon -->
<div style="width: 50%; margin-left: -5px; float: left">
<h2 class="bg1">Bankkonto informasjon<span class="left2"></span><span class="right2"></span></h2>
<div class="bg1">
<dl class="dd_right">
<dt>Kontoeier</dt>
<dd>' . game::profile_link() . '</dd>
<dt>Bankfirma</dt>
<dd><a href="ff/?ff_id=' . $this->bank->id . '">' . htmlspecialchars($this->bank->data['ff_name']) . '</a></dd>
<dt><abbr title="Overføringstap">Overf.tap</abbr></dt>
<dd>' . $this->bank->overforingstap * 100 . ' %</dd>
<dt>Plassering</dt>
<dd>' . (!isset(game::$bydeler[$this->bank->data['br_b_id']]) ? '<span style="color: #777777">Ukjent</span>' : htmlspecialchars(game::$bydeler[$this->bank->data['br_b_id']]['name'])) . '</dd>
<dt>Balanse</dt>
<dd>' . game::format_cash($this->up->data['up_bank']) . '</dd>
</dl>
<p class="c">
<a href="javascript:void(0)" onclick="this.parentNode.style.display=\'none\'; document.getElementById(\'bank_stats\').style.display=\'block\'">Vis statistikk</a>
</p>
<div id="bank_stats" style="display: none">
<dl class="dd_right">
<dt>Sendt</dt>
<dd>' . game::format_number($this->up->data['up_bank_num_sent']) . ' stk</dd>
<dd>' . game::format_cash($this->up->data['up_bank_sent']) . '</dd>
</dl>
<dl class="dd_right">
<dt>Mottatt</dt>
<dd>' . game::format_number($this->up->data['up_bank_num_received']) . ' stk</dd>
<dd>' . game::format_cash($this->up->data['up_bank_received']) . '</dd>
</dl>
<dl class="dd_right">
<dt>Overskudd</dt>
<dd>' . game::format_cash($this->up->data['up_bank_profit']) . '</dd>
</dl>
<dl class="dd_right">
<dt><abbr title="Overføringstap">Overf.tap</abbr></dt>
<dd>' . game::format_cash($this->up->data['up_bank_charge']) . '</dd>
</dl>
<dl class="dd_right">
<dt>Renter</dt>
<dd>' . game::format_number($this->up->data['up_interest_num']) . ' stk</dd>
<dd>' . game::format_cash($this->up->data['up_interest_total']) . '</dd>
</dl>
</div>
<form action="" method="post">
<p class="c">' . show_sbutton("Bytt bank", 'name="switch"') . '</p>
</form>
</div>
</div>
<!-- send penger -->
<div style="width: 50%; margin-right: -5px; float: right">
<h2 class="bg1">Send penger<span class="left2"></span><span class="right2"></span></h2>
<div class="bg1">
<form action="" method="post">
<input type="hidden" name="sid" value="' . login::$info['ses_id'] . '" />
<input type="hidden" name="a" value="send" />
<dl class="dd_right dl_2x">
<dt>Mottaker</dt>
<dd><input type="text" name="mottaker" value="' . htmlspecialchars(postval("mottaker")) . '" class="styled w100" /></dd>
<dt>Kontakt?</dt>
<dd>
<select onchange="if(this.value==\'\')var name=prompt(\'Brukernavn?\');else var name=this.value;if(name)document.getElementsByName(\'mottaker\')[0].value=name;this.selectedIndex=0" style="width: 110px; overflow: hidden">
<option>Velg kontakt</option>';
//.........这里部分代码省略.........
示例15: show
protected function show()
{
// tittel på meldingstråden
ess::$b->page->add_title($this->thread->data_thread['it_title']);
// sett opp deltakere
$deltakere = array();
$c = access::has("crewet");
foreach ($this->thread->receivers as $row) {
if ($this->thread->data_rel && $this->thread->data_rel['ir_up_id'] == $row['ir_up_id']) {
continue;
}
$p = $row['ir_deleted'] != 0 || $row['up_access_level'] == 0 && (!access::has("crewet") || $row['u_access_level'] == 0 || $row['u_active_up_id'] != $row['ir_up_id']);
$deltakere[] = ($p ? '<span class="user_strike">' : '') . '<user id="' . $row['ir_up_id'] . '" />' . ($p ? '</span>' : '');
}
$deltakere_siste = array_pop($deltakere);
$this->add_receivers();
// overskrift
if ($this->thread->restrict || !$this->thread->can_reply_receivers) {
echo '
<h1>Melding: ' . htmlspecialchars($this->thread->data_thread['it_title']) . '</h1>';
} else {
echo '
<form action="" method="post">
<h1><span class="red">' . show_sbutton("Slett", 'name="slettalle" onclick="return confirm(\'Dette vil slette meldingstråden for alle deltakere. Denne handlingen kan ikke angres uten videre. Fortsette?\')"') . '</span> Melding: ' . htmlspecialchars($this->thread->data_thread['it_title']) . '</h1>
</form>';
}
// tittel og verktøy
echo '
<form action="innboks" method="post">
<p class="im_tools top h_right">
<a href="innboks' . ($this->thread->data_rel ? '' : '?user=' . urlencode($this->thread->data_rel['up_name'])) . '">Tilbake til meldinger</a>
<input type="hidden" name="it_id[]" value="' . $this->thread->id . '" />' . (!isset($_GET['reply']) && $this->can_reply ? '
' . show_sbutton("Opprett svar", 'name="reply" accesskey="s"', 'reply_link_form_show') : '') . ($this->thread->data_rel ? '
<span class="red">' . show_sbutton("Slett", 'name="slett" accesskey="d" onclick="return confirm(\'Er du sikker på at du vil slette meldingen?\')"') . '</span>' : '') . '
</p>
</form>';
// deltakere
if ($deltakere_siste) {
echo '
<p id="im_deltakere"><span id="im_deltakere_i">Deltakere: ' . (count($deltakere) > 0 ? implode(", ", $deltakere) . ' og ' : '') . $deltakere_siste . '</span></p>';
if (!$this->thread->can_reply_access) {
echo '
<p>Du har ikke mulighet til å svare i denne meldingen.</p>';
} elseif (!$this->thread->can_reply_receivers) {
echo '
<p>Det er ingen mottakere du kan svare til.</p>';
}
} else {
echo '
<p>Det er ingen andre deltakere enn deg selv i denne meldingstråden.</p>';
}
// flere sider?
if ($this->pagei->pages > 1) {
echo '
<p class="c">' . $this->pagei->pagenumbers(array("goto")) . '</p>';
}
// svarskjema
echo '
<div id="container_reply"' . (!isset($_GET['reply']) ? ' style="display: none"' : '') . '>
<form action="' . htmlspecialchars(game::address(PHP_SELF, $_GET, array(), array("reply" => true))) . '" method="post" onsubmit="this.onsubmit=function(){return false;}">
<div class="section" style="margin-top:0">
<h3>Skriv svar</h3>
<dl class="dd_auto_100">
<dt>Innhold</dt>
<dd><textarea name="melding" rows="10" cols="75" id="textContent">' . htmlspecialchars(postval("melding")) . '</textarea></dd>
<dt' . (isset($_POST['preview']) && isset($_POST['melding']) ? '' : ' style="display: none"') . ' id="previewDT">Forhåndsvisning</dt>
<dd' . (isset($_POST['preview']) && isset($_POST['melding']) ? '' : ' style="display: none"') . ' id="previewDD">' . (!isset($_POST['melding']) || empty($_POST['melding']) ? 'Tom melding?!' : game::bb_to_html($_POST['melding'])) . '</dd>
</dl>
<h3 class="c">
' . show_sbutton("Send melding", 'name="post" accesskey="s"') . '
' . show_sbutton("Forhåndsvis", 'name="preview" accesskey="p" id="reply_link_preview"') . '
</h3>
</div>
</form>
</div>';
// meldingene
echo '
<div id="innboks">';
// hent meldingene på denne siden
$result = $this->thread->get_messages($this->pagei->start, $this->limit);
$i = 0;
$last_id = 0;
while ($row = $result->fetch()) {
$e = $this->pagei->total - $i - ($this->pagei->active - 1) * $this->pagei->per_page;
if ($i == 0) {
$last_id = $row['im_id'];
}
echo $this->thread->reply_format($row, $e, $this->highlight_im_id == $row['im_id'], $i < $this->new);
$i++;
}
echo '
</div>';
if (!isset($_GET['reply']) && $this->can_reply || $this->thread->data_rel) {
echo '
<form action="innboks" method="post">
<input type="hidden" name="it_id[]" value="' . $this->thread->id . '" />' . ($this->thread->data_rel ? '
<p class="im_tools bottom left" id="im_mark"></p>' : '') . '
<p class="im_tools bottom">' . (!isset($_GET['reply']) && $this->can_reply ? '
' . show_sbutton("Opprett svar", 'name="reply" accesskey="s"', 'reply_link_form_show') : '') . ($this->thread->data_rel ? '
<span class="red">' . show_sbutton("Slett", 'name="slett" accesskey="d" onclick="return confirm(\'Er du sikker på at du vil slette meldingen?\')"') . '</span>' : '') . '
//.........这里部分代码省略.........