本文整理汇总了PHP中BBcode函数的典型用法代码示例。如果您正苦于以下问题:PHP BBcode函数的具体用法?PHP BBcode怎么用?PHP BBcode使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了BBcode函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
if (mysqli_num_rows($res_offer) > 0) {
$offers = '
<tr>
<td valign="middle" align="right"><span style="font-weight: bold;">My Offers:</span></td>
<td valign="top" align="left" >
<select name="offer">
<option class="body" value="0">My Offers</option>';
$message = '<option class="body" value="0">Your have no approved offers yet</option>';
while ($arr_offer = mysqli_fetch_assoc($res_offer)) {
$offers .= '<option class="body" value="' . (int) $arr_offer['id'] . '">' . htmlsafechars($arr_offer['offer_name']) . '</option>';
}
$offers .= '</select> If you are uploading one of your offers, please select it here so interested members will be notified.</td>
</tr>';
}
$HTMLOUT .= "\n <script type='text/javascript'>\n window.onload = function() {\n setupDependencies('upload'); //name of form(s). Seperate each with a comma (ie: 'weboptions', 'myotherform' )\n };\n </script>\n <div align='center'>\n <form name='upload' enctype='multipart/form-data' action='./takeupload.php' method='post'>\n <input type='hidden' name='MAX_FILE_SIZE' value='{$INSTALLER09['max_torrent_size']}' />\n <p>{$lang['upload_announce_url']}<b><input type=\"text\" size=\"80\" readonly=\"readonly\" value=\"" . $INSTALLER09['announce_urls'][0] . "\" onclick=\"select()\" /></b></p>";
$HTMLOUT .= "<table border='1' cellspacing='0' cellpadding='10'>\n <tr>\n <td class='heading' valign='top' align='right'>{$lang['upload_imdb_url']}</td>\n <td valign='top' align='left'><input type='text' name='url' size='80' /><br />{$lang['upload_imdb_tfi']}{$lang['upload_imdb_rfmo']}</td>\n </tr>\n <tr>\n <td class='heading' valign='top' align='right'>{$lang['upload_poster']}</td>\n <td valign='top' align='left'><input type='text' name='poster' size='80' /><br />{$lang['upload_poster1']}</td>\n </tr>\n <tr>\n <td class='heading' valign='top' align='right'>{$lang['upload_youtube']}</td>\n <td valign='top' align='left'><input type='text' name='youtube' size='80' /><br />({$lang['upload_youtube_info']})</td>\n </tr>\n <tr>\n <td class='heading' valign='top' align='right'><b>{$lang['upload_bitbucket']}</b></td>\n <td valign='top' align='left'>\n <iframe src='imgup.html' style='width:600px; height:48px; border:none' frameborder='0'></iframe>\n <br />{$lang['upload_bitbucket_1']}\n </td>\n </tr>\n <tr>\n <td class='heading' valign='top' align='right'>{$lang['upload_torrent']}</td>\n <td valign='top' align='left'><input type='file' name='file' id='torrent' onchange='getname()' size='80' /></td>\n </tr>\n <tr>\n <td class='heading' valign='top' align='right'>{$lang['upload_name']}</td>\n <td valign='top' align='left'><input type='text' id='name' name='name' size='80' /><br />({$lang['upload_filename']})</td>\n </tr>\n <tr>\n <td class='heading' valign='top' align='right'>{$lang['upload_tags']}</td> \n <td valign='top' align='left'><input type='text' name='tags' size='80' /><br />({$lang['upload_tag_info']})</td>\n </tr>\n <tr>\n <td class='heading' valign='top' align='right'>{$lang['upload_small_description']}</td>\n <td valign='top' align='left'><input type='text' name='description' size='80' /><br />({$lang['upload_small_descr']})</td>\n </tr>\n <tr>\n <td class='heading' valign='top' align='right'>{$lang['upload_nfo']}</td>\n <td valign='top' align='left'><input type='file' name='nfo' size='80' /><br />({$lang['upload_nfo_info']})</td>\n </tr>\n <tr>\n <td class='heading' valign='top' align='right'>{$lang['upload_description']}</td>\n <td valign='top' align='left' style='white-space: nowrap;'>" . BBcode(false) . "\n <br />({$lang['upload_html_bbcode']})</td>\n </tr>";
$s = "<select name='type'>\n<option value='0'>({$lang['upload_choose_one']})</option>\n";
$cats = genrelist();
foreach ($cats as $row) {
$s .= "<option value='" . (int) $row["id"] . "'>" . htmlsafechars($row["name"]) . "</option>\n";
}
$s .= "</select>\n";
$HTMLOUT .= "<tr>\n <td class='heading' valign='top' align='right'>{$lang['upload_type']}</td>\n <td valign='top' align='left'>{$s}</td>\n </tr>";
$HTMLOUT .= $offers;
$HTMLOUT .= $request;
$subs_list .= "<table border=\"1\"><tr>\n";
$i = 0;
foreach ($subs as $s) {
$subs_list .= $i && $i % 4 == 0 ? "</tr><tr>" : "";
$subs_list .= "<td style='padding-right: 5px'><input name=\"subs[]\" type=\"checkbox\" value=\"" . (int) $s["id"] . "\" />" . htmlsafechars($s["name"]) . "</td>\n";
++$i;
示例2: BBcode
<td class="ladder_header_r_txt" style="height: 26px; text-align: center; width: 49px;" > </td>
<td class="ladder_header_r_txt" style="height: 26px; width: 78px;" ></td>
<td class="ladder_header_e" style="width: 9px; height: 26px;" background="themes/phptG4/images/onglet_end.gif"> </td>
</tr>
<tr class="ladder_line" bgcolor="#3c3c46">
<td class="lad_site_back" ></td>
<td colspan="10" class="lad_rule">
<table border="0" cellpadding="5" cellspacing="5"><tr><td class="lad_rule">
';
if ($lad_while->reglement != "") {
echo BBcode($lad_while->reglement);
} else {
echo '- ' . $strLAD_nodata_rule . ' - ';
}
echo '<br /><br /></td>
</td></tr></table></td>
<td class="lad_site_back"></td>
</tr>
<tr class="ladder_back">
<td class="ladder_header_s" style="width: 9px; height: 26px;" ></td>
<td class="ladder_header_r" colspan="2" rowspan="1" style="width: 172px;"> ';
if ($close and $lad_ap != 'no' and $s_joueur) {
示例3: mysql_query
$desc = "";
}
$nbshoutboxpage2 = $nbshoutboxpage * $shoutlimit2 - $shoutlimit2;
$sqlx = "SELECT * FROM {$dbprefix}shoutbox ORDER BY id " . $desc . " LIMIT {$nbshoutboxpage2},{$shoutlimit2}";
$reqx = mysql_query($sqlx) or die('Erreur SQL !<br>' . $sqlx . '<br>' . mysql_error());
$i2 = '1';
while ($datax = mysql_fetch_array($reqx)) {
$contenu = $datax['contenu'];
if (!preg_match("#^(http\\:\\/\\/[a-z0-9\\-]+\\.([a-z0-9\\-]+\\.)?[a-z]+)#i", $contenu)) {
if (!preg_match('#\\[url=(http://)?(.*?)\\](.*?)\\[/url\\]#si', $contenu)) {
if (!preg_match('#\\[url\\](http://)?(.*?)\\[/url\\]#si', $contenu)) {
$contenu = wordwrap($contenu, 100, "<br>", 1);
}
}
}
$contenu = BBcode($contenu);
$contenu = stripslashes($contenu);
$date = strftime("%H:%M", $datax['date']);
if ($i2 == "1") {
echo "<tr>";
echo "<td class=shoutfiche>";
if ($grade['a'] == 'a' || $grade['b'] == 'b' || $grade['m'] == 'm') {
echo "<a href=\"?page=shoutbox&op=del&a=o&id=" . $datax['id'] . "\"><img src='images/f.gif' border='0' align=RIGHT /></a>";
}
echo "({$date}) <a href=\"?page=joueurs&id=" . id_joueur($datax['pseudo']) . "\"><b><font class=shoutpseudo>" . $datax['pseudo'] . "</font></b></a> :<br>{$contenu}</td>";
echo "</tr>";
$i2++;
} else {
if ($i2 == "2") {
echo "<tr>";
echo "<td class=shout2fiche>";
示例4: show_erreur_saisie
$erreur = 1;
$str .= "- {$strElementsSearchInvalide}<br>";
}
if ($erreur == 1) {
show_erreur_saisie($str);
} else {
$pseudo = "%" . $pseudo . "%";
$db->select("*");
$db->from("{$dbprefix}news WHERE (contenu LIKE '{$pseudo}') OR (titre LIKE '{$pseudo}') order by date DESC");
$res = $db->exec();
echo '<br>';
$rech_ps = 'NO';
while ($rech = $db->fetch($res)) {
if ($rech->titre != '' || $rech->titre != NULL) {
$rech_ps = 'OK';
$contenu = BBcode($rech->contenu);
$contenu = stripslashes($contenu);
$titre = stripslashes($rech->titre);
$date = strftime(DATESTRING1, $rech->date);
$date = "{$strLe} " . $date;
echo "<table width=500 border=0 cellpadding=0 cellspacing=0 class=bordure1><tr><td>";
echo "<table width=100% border=0 cellspacing=1 cellpadding=2>";
echo "<tr>";
echo "<td class=header><div style=\"clear: both\"><div style=\"float: left\"><a href=\"?page=news&id=" . $rech->id . "\"><img src=\"images/news/" . $rech->icone . "\" border=0 align=absmiddle><b> " . $titre . "</b></a></div>";
echo "</div></td></tr>";
echo "<tr>";
echo "<td class=text>" . $contenu;
echo "<br><br><span class=info><div style=\"clear: both\">";
echo "<div style=\"float: left\"><img src=\"images/icon_comment.gif\" border=0 align=absmiddle> <a href=\"?page=news&id=" . $rech->id . "\">{$strCommentaires} ? (" . nb_news_commentaires($rech->id) . ")</a> | <a href=\"?page=news&op=imprimer&header=nude&id=" . $news->id . "\" target=_blank><img src=\"images/print.gif\" border=0 align=absmiddle></a> | <a href=\"?page=news&op=envoyer&id=" . $news->id . "\"><img src=\"images/friend.gif\" border=0 align=absmiddle></a></div>";
echo "<div align=right>{$strPostePar} <b>" . show_joueur($rech->auteur, $op) . "</b> " . $date . "</div></span>";
echo "</div></td></tr>";
示例5: BBcode
<ul style="list-style:none; padding-left: 4px;">
<li><b>' . $_users[$resp['id_dueno']]['mensajes'] . '</b> mensajes</li>
<li><b>' . $_users[$resp['id_dueno']]['edad'] . '</b> años</li>
<li>Registrado el <b>' . $_users[$resp['id_dueno']]['fecha_reg'] . '</b></li>
</ul>
</div>
<div class="col-md-10">
<blockquote>
' . BBcode($resp['contenido']) . '
</blockquote>
<hr />
<p>
' . BBcode($_users[$resp['id_dueno']]['firma']) . '
</p>
</div>
</div>
</div>';
}
}
?>
</div>
</div>
</section>
<?php
include HTML_DIR . 'overall/footer.php';
示例6: BBcode
if (login($username, $password) && ($row[2] == $username || level($username) == 'admin') || level($username) == 'mod') {
print "\n<a href = 'manage.php?id=" . $row[0] . "&t_id=" . $id . "'>[Edita]</a>" . "\n<a href='manage.php?id=" . $row[0] . "&t_id=" . $id . "&delete=1'>[Elimina]</a>";
}
?>
<br />
<br />
<?php
//parte del messaggio
//print wordwrap (br($row [5]), 200 , "<br />");
print BBcode($row[5]);
//chiusura della div di topic
print "\n</div>";
// se la firma cè la visualizzo...altrimenti no
if ($row_info[5]) {
//stampo la firma dell'utente
print "\n<div id=\"user_firma\">" . "\n<center><b>.::Firma::.</b></center><br />" . BBcode($row_info[5]) . "</div>";
}
//chiusura della div di content
print "\n</div>";
}
//end while
if (level($username) == 'admin' || level($username) == 'mod') {
// blocca/chiudi topic
if (check_block_topic($id) == 0 || check_block_topic($id) == NULL) {
$block_topic = "\n<form method=\"POST\" action=\"viewtopic.php?id=" . $id . "\" />" . "\n<input type=\"hidden\" value=\"1\" name=\"block\" />" . "\n<input type=\"submit\" value=\"Chiudi Topic\" />" . "\n</form>\n";
} else {
$block_topic = "\n<form method=\"POST\" action=\"viewtopic.php?id=" . $id . "\" />" . "\n<input type=\"hidden\" value=\"1\" name=\"block\" />" . "\n<input type=\"submit\" value=\"Ri-Apri Topic\" />" . "\n</form>\n";
}
// setta topic come annuncio o importante (deselezionato annulla il set)
if (check_important_topic($id) == 0 && check_announcement_topic($id) == 0) {
$set_topic = "\n<form method=\"POST\" action=\"viewtopic.php?id=" . $id . "&set_topic=1\" />" . "\n<input type=\"radio\" name=\"set_topic\" value=\"null\" checked> Topic Normale" . "\n<input type=\"radio\" name=\"set_topic\" value=\"announcement\"> Setta il topic in forma Annuncio" . "\n<input type=\"radio\" name=\"set_topic\" value=\"important\" > Setta il topic in forma Importante" . "\n<input type=\"submit\" value=\"Setta topic\" />" . "\n</form>";
示例7: array
/*** generation commune ***/
$link = "<a href=\"" . $config['urlsite'] . "\" target=\"_blank\">" . $config['urlsite'] . "</a>";
$array1 = array("%nomsite%", "%urlsite%", "%link%");
$array2 = array($config['nomsite'], $config['urlsite'], $link);
$titre = str_replace($array1, $array2, $titre);
$contenu = str_replace($array1, $array2, $contenu);
$erreur = 0;
if (isset($email)) {
if ($config['mail'] != 'N') {
/*** génération de l'email ***/
$mail = new phpTMailer();
$from = joueur($s_joueur);
$mail->From = $from->email;
$mail->FromName = $from->pseudo;
$mail->Subject = $titre;
$body = BBcode($contenu);
$mail->Body = str_replace("SRC=\"images/smilies/", "SRC=\"" . $config['urlsite'] . "/images/smilies/", $body);
/*** generation de la messagerie ***/
for ($i = 0; $i < count($tab_destinataires); $i++) {
$to = joueur($tab_destinataires[$i]);
$mail->AddAddress($to->email);
}
if (!$mail->Send()) {
$erreur = 1;
}
} else {
show_erreur($strPasDeFonctionMail);
}
}
if (isset($messagerie)) {
$date = time();
示例8: array
$url = 'farben';
$ar = array('GASTNAME' => $var->check_var('ngast', 'Name Gäste', $row['ngast'], $url), 'GASTTEXT' => $var->check_var('tgast', 'Text Gäste', $row['tgast'], $url), 'USERNAME' => $var->check_var('nuser', 'Name User', $row['nuser'], $url), 'USERTEXT' => $var->check_var('tuser', 'Text User', $row['tuser'], $url), 'ADMINNAME' => $var->check_var('nadmin', 'Name Admin', $row['nadmin'], $url), 'ADMINTEXT' => $var->check_var('tadmin', 'Text Admin', $row['tadmin'], $url), 'NGAST' => $var->shfarben($var->shconfig('ngast'), 'Farbe: Name der Gäste', 'fngast', $row['fngast'], $url, 0), 'TGAST' => $var->shfarben($var->shconfig('tgast'), 'Farbe:Text der Gäste', 'ftgast', $row['ftgast'], $url, 0), 'NUSER' => $var->shfarben($var->shconfig('nuser'), 'Farbe:Name der User', 'fnuser', $row['fnuser'], $url, 0), 'TUSER' => $var->shfarben($var->shconfig('tuser'), 'Farbe:Text der User', 'ftuser', $row['ftuser'], $url, 0), 'NADMIN' => $var->shfarben($var->shconfig('nadmin'), 'Farbe:Name der Admins', 'fnadmin', $row['fnadmin'], $url, 0), 'TADMIN' => $var->shfarben($var->shconfig('tadmin'), 'Farbe:Text der Admins', 'ftadmin', $row['ftadmin'], $url, 0));
$tpl->set_ar_out($ar, 2);
}
if (escape($menu->get(1), 'string') == 'style') {
$erg = db_query('SELECT * FROM `prefix_shbox4config` WHERE id = "1"');
$row = db_fetch_assoc($erg);
$url = 'style';
$ar = array('AUSRICHTUNG' => $var->check_var('ausr', 'Eigene Ausrichtung', $row['ausr'], $url), 'HINTERGRUND' => $var->check_var('hgrund', 'Eigener Hintergrund', $row['hgrund'], $url), 'BBREITE' => $var->shfarben($var->shconfig('ausr'), 'Breite der Box in %', 'bbreite', $row['bbreite'], $url, 1), 'BAUS' => $var->shfarben($var->shconfig('ausr'), 'Ausrichtung der Box', 'baus', $row['baus'], $url, 2), 'HFNAME' => $var->shfarben($var->shconfig('hgrund'), 'Hintergrundfarbe vom Namen', 'hfname', $row['hfname'], $url, 0), 'HFTEXT' => $var->shfarben($var->shconfig('hgrund'), 'Hintergrundfarbe vom Text', 'hftext', $row['hftext'], $url, 0), 'HFINPUT' => $var->shfarben($var->shconfig('hgrund'), 'Hintergrundfarbe vom Eingabefeld', 'hfinput', $row['hfinput'], $url, 0));
$tpl->set_ar_out($ar, 3);
}
if (escape($menu->get(1), 'string') == 'show' || escape($menu->get(1), 'string') == '') {
$tpl->out(4);
$erg = db_query('SELECT * FROM `prefix_shbox4` ORDER BY `id` DESC');
while ($row = db_fetch_assoc($erg)) {
$ar = array('ID' => $row['id'], 'NAME' => $var->colorname($var->sh_usercheck($row['uid']), get_n($row['uid'])), 'TEXTNOBB' => $row['txt'], 'TEXT' => BBcode(substr($row['txt'], 0, 70)));
$tpl->set_ar_out($ar, 5);
}
$tpl->out(6);
}
/*
function showedit($gid) {
$ed = db_query('SELECT * FROM `prefix_shbox4` WHERE `id` = "' . $gid . '"');
$e = db_fetch_assoc($ed);
return '<form action="?shbox4admin-show-send-'.$gid.'" method="POST">
<tr>
<td style="background-color:#FF0000">' . $e['id'] . '</td>
<td style="background-color:#FF0000">' . get_n($e['uid']) . '</td>
<td style="background-color: #FF0000">' . date ('d.m.Y - H:i:s', $e['time'] ) . '</td>
<td style="background-color:#FF0000"><textarea name="edittxt" rows="2" cols="50" wrap="virtual">' . $e['txt'] . '</textarea></td>
<td style="background-color: #FF0000" align="center"><input name="subedit" type="submit" value="ändern" /></td>
示例9: phpTMailer
$the_manager = $db->fetch();
if ($config['mail'] != 'N') {
$mail = new phpTMailer();
$from = joueur($s_joueur);
$mail->From = $from->email;
$mail->FromName = $from->pseudo;
$mail->Subject = $strLeaveTeamtitle;
// formatage contenu + pseudo
$body = BBcode($strLeaveTeambody1 . $from->pseudo . $strLeaveTeambody2);
$mail->Body = str_replace("SRC=\"images/smilies/", "SRC=\"" . $config['urlsite'] . "/images/smilies/", $body);
/*** generation de la messagerie ***/
$to = joueur($the_manager->manager);
$mail->AddAddress($to->email);
}
$date = time();
$contenance = BBcode($strLeaveTeambody1 . $from->pseudo . $strLeaveTeambody2);
$db->insert("{$dbprefix}messages (emetteur,destinataire,titre,message,date)");
$db->values("'{$s_joueur}','{$the_manager->manager}','{$titre}','{$contenance}','{$date}'");
$db->exec();
/*** redirection ***/
js_goto("?page=equipes&id={$id}");
} elseif ($op == "leave") {
if ($is_manager) {
js_goto($PHP_SELF);
}
$db->delete("{$dbprefix}appartient");
$db->where("equipe = {$id}");
$db->where("joueur = {$s_joueur}");
$db->exec();
js_goto('?page');
} elseif ($op == "rejoindre") {
示例10: BBcode
if ($bd->rows($sql) > 0) {
$id_creator = $post['dueno'];
$sql2 = $bd->query("SELECT user, ext, online FROM Usuarios WHERE id='{$id_creator}'");
$user = $bd->recorrer($sql2);
$user_c = $user['user'];
$online = $user['online'];
// Usuario online
if ($user['online'] <= time()) {
$estado = 'Offline';
$colorEstado = '#FF0000';
} else {
$estado = 'Online';
$colorEstado = '#00FF00';
}
//Avatar Usuario
if (file_exists('uploads/avatar/' . $id_creator . '.' . $user['ext'])) {
$ruta = 'uploads/avatar/' . $id_creator . '.' . $user['ext'];
} else {
$ruta = 'uploads/avatar/user.png';
}
require 'core/libs/bbcode/BBcode.class.php';
$content = BBcode($post['content']);
$template->assign(array('content' => $content, 'post' => $post, 'user' => $user['user'], 'online' => $user['online'], 'estado' => $estado, 'color' => $colorEstado, 'image' => $ruta));
$bd->liberar($sql2);
}
$bd->liberar($sql);
$bd->close();
$template->display('posts/posts.tpl');
} else {
header('location:index');
}
示例11: stderr
stderr("{$lang['comment_error']}", "{$lang['comment_body']}");
}
$text = htmlsafechars($body);
$editedat = TIME_NOW;
if (isset($_POST['lasteditedby']) || $CURUSER['class'] < UC_STAFF) {
sql_query("UPDATE comments SET text=" . sqlesc($text) . ", editedat={$editedat}, editedby=" . sqlesc($CURUSER['id']) . " WHERE id=" . sqlesc($commentid)) or sqlerr(__FILE__, __LINE__);
} else {
sql_query("UPDATE comments SET text=" . sqlesc($text) . ", editedat={$editedat}, editedby=0 WHERE id=" . sqlesc($commentid)) or sqlerr(__FILE__, __LINE__);
}
header("Refresh: 0; url={$locale_link}.php?id=" . (int) $arr['tid'] . "{$extra_link}&viewcomm={$commentid}#comm{$commentid}");
die;
}
$HTMLOUT = '';
$HTMLOUT .= "<h1>{$lang['comment_edit']}'" . htmlsafechars($arr[$name]) . "'</h1>\r\n <form method='post' action='comment.php?action=edit&cid={$commentid}'>\r\n <input type='hidden' name='locale' value='{$name}' />\r\n <input type='hidden' name='tid' value='{$arr['tid']}' />\r\n <input type='hidden' name='cid' value='{$commentid}' />";
if ($INSTALLER09['BBcode'] && function_exists('BBcode')) {
$HTMLOUT .= BBcode(htmlsafechars($arr["text"]), FALSE);
} else {
$HTMLOUT .= "<textarea name='text' rows='10' cols='60'>" . htmlsafechars($arr["text"]) . "</textarea>";
}
$HTMLOUT .= '
<br />' . ($CURUSER['class'] >= UC_STAFF ? '<input type="checkbox" value="lasteditedby" checked="checked" name="lasteditedby" id="lasteditedby" /> Show Last Edited By<br /><br />' : '') . ' <input type="submit" class="btn" value="' . $lang['comment_doit'] . '" /></form>';
echo stdhead("{$lang['comment_edit']}'" . $arr[$name] . "'", true, $stdhead) . $HTMLOUT . stdfoot($stdfoot);
die;
} elseif ($action == "delete") {
if ($CURUSER['class'] < UC_STAFF) {
stderr("{$lang['comment_error']}", "{$lang['comment_denied']}");
}
$commentid = isset($_GET['cid']) ? $_GET['cid'] : 0;
$tid = isset($_GET['tid']) ? $_GET['tid'] : 0;
if (!is_valid_id($commentid)) {
stderr("{$lang['comment_error']}", "{$lang['comment_invalid_id']}");
示例12: defined
Date => 27.11.15
Seite/Sup. => http://www.ilch.de
http://www.nf-projekt.de
Kontakt => Masmann82@gmx.de
*/
defined('main') or die('no direct access');
include_once 'include/includes/class/shbox4class.php';
$tpl = new tpl('shbox4.htm');
$var = new ShBox4();
if ($var->shconfig('aktiv') == '1') {
$ILCH_HEADER_ADDITIONS .= '
<link rel="stylesheet" type="text/css" href="include/images/shbox4/shbox4.css" />
<script type="text/javascript" charset="utf-8" src="include/includes/js/shbox4.js" /></script>
<script type="text/javascript" src="include/includes/js/bbcode.js" /></script>
<script language="JavaScript" type="text/javascript" />
window.onload = "fetch()";
interval = window.setInterval("fetch();", ' . $var->shconfig('time') . ');
</script>';
if ($menu->get(0) == 'forum' || $menu->get(0) == 'gbook') {
$box = '<div id="shbox"></div>';
$ar = array('BOX' => $box, 'EIN' => '<p>!! Sperre !!</p>');
$tpl->set_ar_out($ar, 0);
} else {
$box = '<div id="shbox"></div>';
$ar = array('BOX' => $box, 'EIN' => $var->eingabe());
$tpl->set_ar_out($ar, 0);
}
} else {
echo '<center>' . BBcode($var->shconfig('aktivtext')) . '</center>';
}
echo '<p><a href="?shbox4-archiv">Archiv</a></p>';
示例13: stripslashes
echo "</tr>";
echo "<tr>";
echo "<td class=titlefiche style=\"white-space:normal\">{$str_faq_r}</td>";
echo "<td class=textfiche><textarea cols=60 rows=10 name=contenu wrap=virtual ONSELECT=\"storeCaret(this);\" ONCLICK=\"storeCaret(this);\" ONKEYUP=\"storeCaret(this);\">";
echo '' . $reponse . '</textarea></td>';
echo "</tr>";
echo '<tr><td class=footerfiche colspan=2 align=center><input type="hidden" name="id" value="' . $modifqr . '">';
echo "<input type=submit value=\"{$strModifier}\"></td></tr>";
echo "</table>";
echo "</td></tr></table>";
echo "</td></tr></table>";
echo "</form><br><br>";
/////////////////
$question = stripslashes($question);
$reponse = $reponse;
$reponse = BBcode($reponse);
$reponse = stripslashes($reponse);
/////////////////
$reponse = wordwrap($reponse, 110, "\n", 1);
echo "<table width=500 border=0 cellpadding=0 cellspacing=0 class=bordure1><tr><td>";
echo "<table width=100% border=0 cellspacing=1 cellpadding=2>";
echo "<tr>";
echo "<td class=header><div style=\"clear: both\"><div style=\"float: left\"><img src=\"images/icon_comment.gif\" border=0 align=absmiddle> {$question}</div>";
echo "</div></td></tr>";
echo '<tr><td class=text>' . $reponse . '</td></tr>';
echo '</td></tr></table>';
echo '</td></tr></table>';
///
}
if ($_GET['act'] == "Dup2") {
$modifqr = $_POST['id'];
示例14: header
$mc1->delete_value('latest_news_');
header("Refresh: 3; url=staffpanel.php?tool=news&mode=news");
stderr($lang['news_success'], $lang['news_edit_success']);
} else {
$HTMLOUT .= "<h1>{$lang['news_edit_item']}</h1>\n <form method='post' name='compose' action='staffpanel.php?tool=news&mode=edit&newsid={$newsid}'>\n <table border='1' cellspacing='0' cellpadding='5'>\n <tr><td><input type='text' name='title' value='" . htmlsafechars($arr['title']) . "' /></td></tr>\n <tr><td align='left' style='padding: 0px'>\n " . BBcode(htmlsafechars($arr["body"]), false) . "\n </td></tr>\n <tr><td colspan='2' class='rowhead'>{$lang['news_sticky']}<input type='radio' " . ($arr["sticky"] == "yes" ? " checked='checked'" : "") . " name='sticky' value='yes' />{$lang['news_yes']}<input name='sticky' type='radio' value='no' " . ($arr["sticky"] == "no" ? " checked='checked'" : "") . " />{$lang['news_no']}</td></tr>\n <tr><td colspan='2' class='rowhead'>{$lang['news_anonymous']}<input type='radio' " . ($arr["anonymous"] == "yes" ? " checked='checked'" : "") . " name='anonymous' value='yes' />{$lang['news_yes']}<input name='anonymous' type='radio' value='no' " . ($arr["anonymous"] == "no" ? " checked='checked'" : "") . " />{$lang['news_no']}</td></tr>\n <tr><td colspan='2' align='center'><input type='submit' value='{$lang['news_okay']}' class='btn' /></td></tr>\n </table>\n </form>\n";
echo stdhead($lang['news_stdhead'], true, $stdhead) . $HTMLOUT . stdfoot($stdfoot);
die;
}
}
//==Final Actions
if ($mode == 'news') {
$res = sql_query("SELECT n.id AS newsid, n.body, n.title, n.userid, n.added, n.anonymous, u.id, u.username, u.class, u.warned, u.chatpost, u.pirate, u.king, u.leechwarn, u.enabled, u.donor FROM news AS n LEFT JOIN users AS u ON u.id=n.userid ORDER BY sticky, added DESC") or sqlerr(__FILE__, __LINE__);
$HTMLOUT .= begin_main_frame();
$HTMLOUT .= begin_frame();
$HTMLOUT .= "<form method='post' name='compose' action='staffpanel.php?tool=news&mode=add'>\n <h1>{$lang['news_submit_new']}</h1><table border='1' cellspacing='0' cellpadding='5'>\n <tr><td><input type='text' name='title' value='' /></td></tr>\n";
$HTMLOUT .= "<tr>\n <td align='left' style='padding: 0px'>" . BBcode(false) . "</td></tr>";
$HTMLOUT .= "<tr><td colspan='2' class='rowhead'>{$lang['news_sticky']}<input type='radio' checked='checked' name='sticky' value='yes' />{$lang['news_yes']}<input name='sticky' type='radio' value='no' />{$lang['news_no']}</td></tr><tr><td colspan='2' class='rowhead'>{$lang['news_anonymous']}<input type='radio' checked='checked' name='anonymous' value='yes' />{$lang['news_yes']}<input name='anonymous' type='radio' value='no' />{$lang['news_no']}</td></tr>\n\n <tr><td colspan='2' class='rowhead'><input type='submit' value='{$lang['news_okay']}' class='btn' /></td></tr>\n\n </table></form><br /><br />\n";
while ($arr = mysqli_fetch_assoc($res)) {
$newsid = (int) $arr["newsid"];
$body = $arr["body"];
$title = $arr["title"];
$added = get_date($arr["added"], 'LONG', 0, 1);
$by = "<b>" . format_username($arr) . "</b>";
$hash = md5('the@@saltto66??' . $newsid . 'add' . '@##mu55y==');
$HTMLOUT .= "<table border='0' cellspacing='0' cellpadding='0'><tr><td class='embedded'>\n {$added}{$lang['news_created_by']}\n - [<a href='staffpanel.php?tool=news&mode=edit&newsid={$newsid}'><b>{$lang['news_edit']}</b></a>]\n - [<a href='staffpanel.php?tool=news&mode=delete&newsid={$newsid}&sure=1&h={$hash}'><b>{$lang['news_delete']}</b></a>]\n </td></tr></table>\n";
$HTMLOUT .= begin_table(true);
$HTMLOUT .= "<tr valign='top'><td class='comment'><b>" . htmlsafechars($title) . "</b><br />" . format_comment($body) . "</td></tr>\n";
$HTMLOUT .= end_table();
$HTMLOUT .= "<br />";
}
$HTMLOUT .= end_frame();
示例15: strftime
echo "<p class=title>.:: {$strMessagerie} ::.</p>";
$db->select("*");
$db->from("{$dbprefix}messages");
$db->where("id = '{$id}'");
$db->where("destinataire = {$s_joueur}");
$res = $db->exec();
$message = $db->fetch($res);
$db->update("{$dbprefix}messages");
$db->set("lu = '1'");
$db->where("id = '{$id}'");
$db->where("destinataire = {$s_joueur}");
$res = $db->exec();
if ($message) {
$date = strftime(DATESTRING1, $message->date);
$message->titre = stripslashes($message->titre);
$contenu = BBcode($message->message);
$contenu = stripslashes($contenu);
echo "<table border=0 cellpadding=0 cellspacing=0 class=bordure1><tr><td>";
echo "<table cellspacing=1 cellpadding=0 border=0 width=450>";
echo "<tr><td class=headerfiche>{$strMessage}</td></tr>";
echo "<tr><td>";
echo "<table cellspacing=0 cellpadding=3 border=0 width=100%>";
echo "<tr>";
echo "<td class=titlefiche>{$strDe} :</td>";
echo "<td class=textfiche colspan=2 width=85%>" . show_joueur($message->emetteur) . "</td>";
echo "</tr>";
echo "<td class=titlefiche>{$strDate} :</td>";
echo "<td class=textfiche colspan=2>{$strLe} " . $date . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td class=titlefiche>{$strTitre} :</td>";