Hallo alle Mann, ich möchte meine V-ShoutBox erweitern.
- my Original ist so - 16.05.2017 | 10:41:41 Uhr
- & ich möchte es aber so haben - {TAG}, 16.{MON}.2017 | 10:41 Uhr
- desweiteren möchte ich das beim NickNamen noch ein DELETE Icon ist so das man nicht mehr in´s archiv muss.
Kann mir da bitte einer Weiterhelfen? :D
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | <?php defined ('main') or die ('no direct access'); // code by Lord|Schirmer // anzeige // 0 = alle besucher // 1 = nur registrierte personen $anzeige = 0; // antispam // 0 = aus // 1 = ein $antispam = 1; $title = $allgAr['title'].' :: Frontabschnitt Mitteilung'; $hmenu = 'Frontabschnitt Mitteilung'; $design = new design ( $title , $hmenu ); $design->header(); // start if (($anzeige == 1 && loggedin()) || $anzeige == 0) { // spalte time anlegen $erg = db_query("SHOW COLUMNS FROM `prefix_shoutbox` WHERE FIELD = 'time'"); if (!db_num_rows($erg)) { db_query("ALTER TABLE `prefix_shoutbox` ADD `time` BIGINT(20) NOT NULL DEFAULT '0'"); } // smilies anzeigen function smiliesshb() { global $lang; $zeilen = 5; $i = 0; $b = '<script language="JavaScript" type="text/javascript">function moreSmilies() {'; $b .= 'var x = window.open("about:blank", "moreSmilies", "width=250,height=200,left=100,top=100,status=no,scrollbars=yes,resizable=yes");'; $a = ''; $erg = db_query('SELECT `emo`, `ent`, `url` FROM `prefix_smilies`'); while ($row = db_fetch_object($erg)) { $b .= 'x.document.write ("<a href=\"javascript:opener.put_smilies(\'vshoutbox_textarea\',\' ' . addslashes(addslashes($row->ent)) . ' \')\">");'; $b .= 'x.document.write ("<img style=\"border: 0px; padding: 5px;\" src=\"include/images/smiles/' . $row->url . '\" title=\"' . $row->emo . '\"></a>");'; if ($i<0) { if($i%$zeilen == 0 AND $i <> 0) { $a .= '<br /><br />'; } $a .= '<a href="javascript:put_smilies(\'vshoutbox_textarea\',\' '.addslashes($row->ent).' \')">'; $a .= '<img style="margin: 2px;" src="include/images/smiles/' . $row->url . '" border="0" title="' . $row->emo . '"></a>'; } $i++; } $b .= ' x.document.write("<br /><br /><center><a href=\"javascript:window.close();\">' . $lang['close'] . '</a></center>"); x.document.close(); }</script>'; if ($i>0) { $a .= '<a class="button" href="javascript:moreSmilies();">Smilies</a>'; } $a = $b.$a; return ($a); } // template definieren $tpl = new tpl ('v_shoutbox.htm'); // name festsetzen if (loggedin()) { $vshoutbox_VALUE_name = $_SESSION['authname']; $disabled = 'disabled'; } else { $vshoutbox_VALUE_name = 'Nickname'; $disabled = ''; } // formular absenden und daten speichern if ((!empty($_POST['vshoutbox_submit']) && $antispam == 1 && $_POST['vshoutbox_antispam'] == $_SESSION['loesung']) || (!empty($_POST['vshoutbox_submit']) && $antispam == 0)) { if (loggedin()) { $vshoutbox_nickname = $_SESSION['authname']; } else { $vshoutbox_nickname = escape($_POST['vshoutbox_nickname'], 'string'); $vshoutbox_nickname = substr($vshoutbox_nickname, 0, 15); if (db_count_query("SELECT COUNT(*) FROM `prefix_user` WHERE `name` LIKE '%$vshoutbox_nickname%'") > 0) { $vshoutbox_nickname = '[STHM]_Gast'; } } $vshoutbox_textarea = escape($_POST['vshoutbox_textarea'], 'textarea'); $vshoutbox_textarea = preg_replace("/\[.?(url|b|i|u|img|code|quote)[^\]]*?\]/i", "", $vshoutbox_textarea); $vshoutbox_textarea = strip_tags($vshoutbox_textarea); if (!empty($vshoutbox_nickname) AND !empty($vshoutbox_textarea)) { db_query('DELETE FROM `prefix_shoutbox` WHERE nickname = "' . $vshoutbox_nickname . '" AND textarea = "' . $vshoutbox_textarea . '"'); db_query('INSERT INTO `prefix_shoutbox` VALUES ("" , "' . $vshoutbox_nickname . '" , "' . $vshoutbox_textarea . '" , "' . time() . '" )'); } } // ausgabe der shoutbox $erg = db_query('SELECT * FROM `prefix_shoutbox` ORDER BY `id` DESC LIMIT ' . (is_numeric($allgAr['sb_limit'])?$allgAr['sb_limit']:20)); $tpl->out(0); while ($row = db_fetch_object($erg)) { $erg1 = db_query('SELECT `id`, `avatar` FROM `prefix_user` WHERE `name` = "' . $row->nickname . '"'); if (db_num_rows($erg1)) { $row1 = db_fetch_object($erg1); if ($row1->avatar && file_exists($row1->avatar)) { $avatar = '<a href="?user-details-' . $row1->id . '" title=""><img src="' . $row1->avatar . '" alt="Avatar" border="0" width="60"></a>'; } else { $avatar = '<a href="?user-details-' . $row1->id . '" title=""><img src="include/images/avatars/wurstegal.jpg" alt="Avatar" border="0" width="60"></a>'; } } else { $avatar = '<img src="include/images/avatars/wurstegal.jpg" alt="Avatar" border="0" width="60">'; } $ar = array ( 'NAME' => $row->nickname, 'AVATAR' => $avatar, 'DATE' => $row->time==0?' ':date('d.m.Y | H:i:s \U\h\r', $row->time), 'TEXT' => preg_replace('/([^\s]{' . $allgAr['sb_maxwordlength'] . '})(?=[^\s])/', "$1\n", BBcode($row->textarea)), ); $tpl->set_ar_out($ar, 1); } $tpl->out(2); // ausgabe formular ja nach berechtigung if (has_right($allgAr['sb_recht'])) { if ($antispam == 1) { $zahl1 = mt_rand(1, 10); $zahl2 = mt_rand(1, 10); eval("\$_SESSION['loesung'] = {$zahl1} + {$zahl2};"); } $ar = array ( 'URL' => $menu->get_complete(), 'VALUE_NAME' => $vshoutbox_VALUE_name, 'DISABLED' => $disabled, 'SMILIES' => smiliesshb(), 'ANTISPAM' => $antispam, 'RECHNUNG' => ($antispam==1)?$zahl1 . ' + ' . $zahl2:'' ); $tpl->set_ar_out($ar, 3); } else { // ausgabe wenn mann nicht einlog ist echo '<div class="shb_login">Bitte erst einloggen um in der Shoutbox schreiben zu können!</div>'; } // ende $tpl->out(4); } $design->footer(); ?> |
MFG
BennY

betroffene Homepage: sthm.projekt-ab.de.w00cb272.kasserver.com/index.php?shoutbox