function pdp_get_bb_smileys($input, $val, $is_enabled, $show_smileys = true) { global $locale; return ' <input type="button" value="b" class="button" style="font-weight:bold;" onclick="addText(\'' . $input . '\', \'[b]\', \'[/b]\');" /> <input type="button" value="i" class="button" style="font-style:italic;" onclick="addText(\'' . $input . '\', \'[i]\', \'[/i]\');" /> <input type="button" value="u" class="button" style="text-decoration:underline;" onclick="addText(\'' . $input . '\', \'[u]\', \'[/u]\');" /> <input type="button" value="url" class="button" onclick="addText(\'' . $input . '\', \'[url]\', \'[/url]\');" /> <input type="button" value="mail" class="button" onclick="addText(\'' . $input . '\', \'[mail]\', \'[/mail]\');" /> <input type="button" value="img" class="button" onclick="addText(\'' . $input . '\', \'[img]\', \'[/img]\');" /> <input type="button" value="center" class="button" onclick="addText(\'' . $input . '\', \'[center]\', \'[/center]\');" /> <input type="button" value="small" class="button" onclick="addText(\'' . $input . '\', \'[small]\', \'[/small]\');" /> <input type="button" value="code" class="button" onclick="addText(\'' . $input . '\', \'[code]\', \'[/code]\');" /> <input type="button" value="quote" class="button" onclick="addText(\'' . $input . '\', \'[quote]\', \'[/quote]\');" />' . ($show_smileys ? '<div>' . displaysmileys($input) . '</div>' : '') . ($is_enabled ? '<div><label><input type="checkbox" name="disable_smileys" value="' . $val . '"' . ($val == '0' ? ' checked="checked"' : '') . ' /> ' . $locale['PDP041'] . '</label></div>' : ''); }
/** * The custom bbeditor * @param string $name * @param int $rows * @param int $cols * @param string $content * @return string */ function bbeditor($name, $rows = 5, $cols = 50, $content = "") { $b = "<table class='bbedit' cellpadding='0' cellspacing='0'>"; $b .= "<tr><td class='toolbar'>" . bbcode_buttons($name) . "<td></tr>"; $b .= "<tr><td class='editarea'><textarea id = '{$name}' rows = '{$rows}' cols = '{$cols}' name = '{$name}'>{$content}</textarea><td></tr>"; $b .= "<tr><td class='smilies'>" . displaysmileys($name) . "<td></tr>"; $b .= "</table>"; return $b; }
<table> <tr> <td>' . $lang_mssg["subj"] . ':</td> <td><input type="text" name="subject" size="20" value="' . $subject . '"></td> </tr><tr> <td>' . $lang_mssg["222"] . ':</td> <td><input type="text" name="to" size="20" value="' . $to . '"><br><b>'; echo $lang_added["must_username"]; echo '</b></td> </tr><tr> <td>' . $lang_mssg["mssgi"] . ':</td> <td><textarea rows="16" cols="45" name="message"></textarea></td> </tr><tr> <td>'; //addin the bbcode + smilys echo "\n <tr>\n<td width='145' class='tbl2'> </td>\n<td class='tbl2'>\n<input type='button' value='b' onClick=\"addText('message', '[b]', '[/b]');\">\n<input type='button' value='i' onClick=\"addText('message', '[i]', '[/i]');\">\n<input type='button' value='u' onClick=\"addText('message', '[u]', '[/u]');\">\n<input type='button' value='" . $lang_bbcode["url"] . "' onClick=\"addText('message', '[url]', '[/url]');\">\n<input type='button' value='" . $lang_bbcode["mail"] . "' onClick=\"addText('message', '[mail]', '[/mail]');\">\n<input type='button' value='" . $lang_bbcode["img"] . "' onClick=\"addText('message', '[img]', '[/img]');\">\n<input type='button' value='" . $lang_bbcode["center"] . "' onClick=\"addText('message', '[center]', '[/center]');\">\n<input type='button' value='" . $lang_bbcode["small"] . "' onClick=\"addText('message', '[small]', '[/small]');\">\n<input type='button' value='" . $lang_bbcode["code"] . "' onClick=\"addText('message', '[code]', '[/code]');\">\n<input type='button' value='" . $lang_bbcode["quote"] . "' onClick=\"addText('message', '[quote]', '[/quote]');\">\n</td>\n</tr>\n<td width='145'> </td>\n<td>\nColour Select :<select name='bbcolor' onChange=\"addText('message', '[color=' + this.options[this.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;\">\n<option value=''>" . $lang_bbcode["Default"] . "</option>\n<option value='maroon' style='color:maroon;'>" . $lang_bbcode["Maroon"] . "</option>\n<option value='red' style='color:red;'>" . $lang_bbcode["Red"] . "</option>\n<option value='orange' style='color:orange;'>" . $lang_bbcode["Orange"] . "</option>\n<option value='brown' style='color:brown;'>" . $lang_bbcode["Brown"] . "</option>\n<option value='yellow' style='color:yellow;'>" . $lang_bbcode["Yellow"] . "</option>\n<option value='green' style='color:green;'>" . $lang_bbcode["Green"] . "</option>\n<option value='lime' style='color:lime;'>" . $lang_bbcode["Lime"] . "</option>\n<option value='olive' style='color:olive;'>" . $lang_bbcode["Olive"] . "</option>\n<option value='cyan' style='color:cyan;'>" . $lang_bbcode["Cyan"] . "</option>\n<option value='blue' style='color:blue;'>" . $lang_bbcode["Blue"] . "</option>\n<option value='navy' style='color:navy;'>" . $lang_bbcode["Navy Blue"] . "</option>\n<option value='purple' style='color:purple;'>" . $lang_bbcode[""] . "</option>\n<option value='violet' style='color:violet;'>" . $lang_bbcode["Violet"] . "</option>\n<option value='black' style='color:black;'>" . $lang_bbcode["Black"] . "</option>\n<option value='gray' style='color:gray;'>" . $lang_bbcode["Gray"] . "</option>\n<option value='silver' style='color:silver;'>" . $lang_bbcode["Silver"] . "</option>\n<option value='white' style='color:white;'>" . $lang_bbcode["White"] . "</option>\n</select>\n</td>\n</tr>\n<tr>\n<td width='145'> </td>\n<td>\n" . displaysmileys("message") . "\n</td>\n</tr> "; //end echo '<tr> <td><button type="submit">' . $lang_mssg["send_mssg"] . '</button></td> </tr> </table> </form>'; } if ($action == compose2) { $subject or die($lang_mssg["_blank1"]); $message or die($lang_mssg["_blank2"]); $to or die($lang_mssg["_blank3"]); $date = date(YmdHis); if ($to == $PHP_PHAOS_USER) { // Changed by dragzone--- echo $lang_added["ad_msg-yourself"];
function comments($ctype, $cdb, $ccol, $cid, $clink) { global $db_prefix, $userdata, $rowstart, $locale; if ((iMEMBER || $settings['guestposts'] == "1") && isset($_POST['post_comment'])) { if (dbrows(dbquery("SELECT {$ccol} FROM " . DB_PREFIX . "{$cdb} WHERE {$ccol}='{$cid}'")) == 0) { header("Location:" . BASEDIR . "index.php"); } if (iMEMBER) { $comment_name = $userdata['user_id']; } elseif ($settings['guestposts'] == "1") { $comment_name = trim(stripinput($_POST['comment_name'])); $comment_name = preg_replace("(^[0-9]*)", "", $comment_name); if (isNum($comment_name)) { $comment_name = ""; } } $comment_message = trim(stripinput(censorwords($_POST['comment_message']))); $comment_smileys = isset($_POST['disable_smileys']) ? "0" : "1"; if ($comment_name != "" && $comment_message != "") { $result = dbquery("INSERT INTO " . DB_PREFIX . "comments VALUES('', '{$cid}', '{$ctype}', '{$comment_name}','{$comment_message}','1', '" . time() . "', '" . USER_IP . "')"); } redirect($clink); } opentable($locale['KOM100']); $result = dbquery("SELECT * FROM " . $db_prefix . "comments WHERE comment_type='G' AND comment_item_id='{$cid}' ORDER BY comment_datestamp DESC"); if (dbrows($result) != 0) { $i = 0; echo "<table cellpadding='0' cellspacing='1' width='98%' class='tbl-border'>\n"; while ($data = dbarray($result)) { echo "<tr>\n<td class='" . ($i % 2 == 0 ? "tbl1" : "tbl2") . "'><span class='comment-name'>\n"; $avatar = dbquery("SELECT * FROM " . $db_prefix . "users WHERE user_id='{$data['comment_name']}'"); $avatar1 = dbarray($avatar); echo ' <script> function profile() { opener.location.href="' . BASEDIR . 'profile.php?lookup=' . $data['comment_name'] . '"; window.close(); } </script> '; if ($avatar1['user_avatar'] != "") { echo '<a href="#" onClick="profile()"><img height="50" width="50" border ="0" src="' . IMAGES . 'avatars/' . $avatar1['user_avatar'] . '"></a>'; } else { echo '<a href="#" onClick="profile()"><img height="50" width="50" border="0" src="' . INFUSIONS . 'varcade/img/noav.gif"></a>'; } if ($data['comment_name']) { echo '<a href="#" onClick="profile()">' . $avatar1['user_name'] . '</a><br>'; } else { echo '<a href="#" onClick="profile()">' . $data['comment_name'] . '</a><br>'; } echo "</span><span class='small'>" . showdate("longdate", $data['comment_datestamp']) . ""; if (iADMIN) { echo "<br><a href='" . FUSION_SELF . "?deletemsg=" . $data['comment_id'] . "&&hideout=" . $data['comment_item_id'] . "'>" . $locale['KOM101'] . "</a>"; } echo "</span><br><HR>\n" . parsesmileys(parseubb($data['comment_message'])) . " </td>\n"; echo "</tr>\n"; $i++; } echo "</table>\n"; echo "<div align='center' style='margin-top:5px;'>\n</div>\n"; } else { echo "'" . $locale['KOM102'] . "'\n"; } if (iMEMBER || $settings['guestposts'] == "1") { echo $locale['KOM103']; echo "<form name='inputform' method='post' action='{$clink}'>\n<table align='center' cellspacing='0' cellpadding='0' width='98%' class='tbl2'>\n"; if (iGUEST) { echo "<tr><td>" . $locale['KOM104'] . "</td>\n</tr>\n<tr>\n<td><input type='text' name='comment_name' maxlength='30' class='textbox' style='width:100%;'></td>\n</tr>\n"; } echo "<tr>\n<td align='center'><textarea name='comment_message' rows='6' class='textbox' style='width:400px'></textarea><br>\n<input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onClick=\"addText('comment_message', '[b]', '[/b]');\">\n<input type='button' value='i' class='button' style='font-style:italic;width:25px;' onClick=\"addText('comment_message', '[i]', '[/i]');\">\n<input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onClick=\"addText('comment_message', '[u]', '[/u]');\">\n<input type='button' value='url' class='button' style='width:30px;' onClick=\"addText('comment_message', '[url]', '[/url]');\">\n<input type='button' value='mail' class='button' style='width:35px;' onClick=\"addText('comment_message', '[mail]', '[/mail]');\">\n<input type='button' value='img' class='button' style='width:30px;' onClick=\"addText('comment_message', '[img]', '[/img]');\">\n<input type='button' value='center' class='button' style='width:45px;' onClick=\"addText('comment_message', '[center]', '[/center]');\">\n<input type='button' value='small' class='button' style='width:40px;' onClick=\"addText('comment_message', '[small]', '[/small]');\">\n<input type='button' value='code' class='button' style='width:40px;' onClick=\"addText('comment_message', '[code]', '[/code]');\">\n<input type='button' value='quote' class='button' style='width:45px;' onClick=\"addText('comment_message', '[quote]', '[/quote]');\">\n<br><br>\n" . displaysmileys("comment_message") . "\n</tr>\n<tr>\n<td><br><br><center>\n<input type='submit' name='post_comment' value='" . $locale['KOM105'] . "' class='button'></td>\n</center>\n</tr>\n</table>\n</form>\n"; } else { echo $locale['KOM106'] . "\n"; } closetable(); }
function awec_get_bb_smileys($name, $msg, $no_smileys, $hide_smileys = false) { global $locale; if (defined('IN_FF')) { return ff_form_bb($name, $msg, '') . ' <input type="hidden" name="disable_smileys" />'; } $retval = ' <textarea name="' . $name . '" id="' . $name . '" rows="8" class="textbox" cols="60">' . $msg . '</textarea> <div> ' . "\n<input type='button' value='b' class='button' style='font-weight:bold;' onclick=\"addText('{$name}', '[b]', '[/b]');\">\n<input type='button' value='i' class='button' style='font-style:italic;' onclick=\"addText('{$name}', '[i]', '[/i]');\">\n<input type='button' value='u' class='button' style='text-decoration:underline;' onclick=\"addText('{$name}', '[u]', '[/u]');\">\n<input type='button' value='url' class='button' onclick=\"addText('{$name}', '[url]', '[/url]');\">\n<input type='button' value='mail' class='button' onclick=\"addText('{$name}', '[mail]', '[/mail]');\">\n<input type='button' value='img' class='button' onclick=\"addText('{$name}', '[img]', '[/img]');\">\n<input type='button' value='center' class='button' onclick=\"addText('{$name}', '[center]', '[/center]');\">\n<input type='button' value='small' class='button' onclick=\"addText('{$name}', '[small]', '[/small]');\">\n<input type='button' value='code' class='button' onclick=\"addText('{$name}', '[code]', '[/code]');\">\n<input type='button' value='quote' class='button' onclick=\"addText('{$name}', '[quote]', '[/quote]');\">\n</div>"; if (!$hide_smileys) { $retval .= ' <p> <label><input type="checkbox" name="disable_smileys"' . ($no_smileys ? ' checked="checked"' : '') . ' /> ' . $locale['EC112'] . '</label> </p>'; $retval .= ' <p> <fieldset> ' . displaysmileys($name) . ' </fieldset> </p>'; } return $retval; }