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:
|
<?php
$filename="pinwand.php";
require("./global.php");
require("./acp/lib/class_parse.php");
require('./acp/lib/class_parsecode.php');
$lang->load('POST,POSTINGS,PINWAND');
$position_x=00;
$position_y=00;
// Einstellungen Anzeige
$maxbreite=$style[tableinwidth];
$maxhoehe=700;
if (!checkpermissions('a_can_pinw_view')) access_error();
if (isset($_REQUEST['action'])) $action = $_REQUEST['action'];
else $action = '';
if (!$action) {
$mhentry = $maxhoehe.'px';
$mbentry = $maxbreite.'px';
$copyh = ($maxhoehe-30).'px';
$copynailh = ($maxhoehe-40).'px';
$result = $db->unbuffered_query("SELECT * FROM bb".$n."_pinwand ORDER BY pinid ASC");
for ($i=0; $i<mysql_num_rows($result); $i++) {
mysql_data_seek ($result, $i);
$row = mysql_fetch_row($result);
$x=rand(0,800);
$y=rand(30,$maxhoehe-100);
$pin=$row[3];
$zettelcol=$row[4];
$name=$row[1];
$userid=$row[2];
$text=$row[5];
$datum=$row[6];
$nail2left = ($x+78);
$nail2top = ($y-70);
$parse = new parse($docensor,75,$wbbuserdata['showimages'],$hilight,$usecode);
$text = $parse->doparse($text,1,0,1,1);
$date = formatdate($wbbuserdata['dateformat'], $datum);
$time = formatdate($wbbuserdata['timeformat'], $datum);
if (checkpermissions('a_can_pinwand_admin')){
$loeschen = '<a href="pinwand.php?action=delpin&pinid='.$row[0].$SID_ARG_2ND_UN.'"><img src="'.$style['imagefolder'].'/pinwand/muell.gif" width="25px" height="19px" border="0" alt="delete" title="delete" /></a>';
}else{
$loeschen = '';
}
$entrybit .='
<div id="top'.$i.'" style="width:200px; position:absolute; left:'.$x.'px; top:'.$y.'px; z-index:1;">
<div id="z'.$i.'" style="position:relative; left:0px; top:0px; z-index:1;" class="area'.$zettelcol.'">
<span class="smallfont"><b>'.$loeschen.$date.'</b><img src="'.$style['imagefolder'].'/spacer.gif" width="50px" height="1" border="0" alt="" /><span class="time">'.$time.'</span><br />'.$text.'<br /><br /><center><a href="profile.php?userid='.$userid.$SID_ARG_2ND_UN.'">'.$name.'</a></span></center>
</div>
<div id="layer2" style="width:25px; height:24px; position:absolute; left:88px; top:-10px; z-index:1;">
<a href="javascript:weg('.$i.')"><img src="'.$style['imagefolder'].'/pinwand/pin'.$pin.'.gif" border="0"></a>
</div>
</div>';
}
eval("\$tpl->output(\"".$tpl->get("pinwand")."\");");
exit();
}
if ($action == 'speichern') {
$pinnr = $_POST['pinnr'];
$zettelcolnr = $_POST['zettelcolnr'];
$text = stripcrap(wbb_trim($_POST['message']));
if ($text) {
$datum = time();
$result = $db->query_first("SELECT pinid FROM bb".$n."_pinwand WHERE text='$text' AND userid='$wbbuserdata[userid]' AND username='".addslashes($wbbuserdata['username'])."' ", 1);
if ($result['pinid']) {
header("Location: pinwand.php");
exit();
}else{
$db->query("INSERT INTO bb".$n."_pinwand (pin,zettelcol,username,userid,text,datum) VALUES ". "('$pinnr','$zettelcolnr','".addslashes($wbbuserdata['username'])."','$wbbuserdata[userid]','".addslashes($text)."','$datum')");
header("Location: pinwand.php");
}
} else {
$allowsmilies = 1;
$bbcode_buttons = getcodebuttons();
$pin_error=$lang->get("LANG_PINWAND_ERROR");
$note = '';
$note .= $lang->items['LANG_POSTINGS_HTML_NOT_ALLOW'];
$note .= $lang->items['LANG_POSTINGS_BBCODE_ALLOW'];
$note .= $lang->items['LANG_POSTINGS_SMILIES_ALLOW'];
$bbcode_smilies = getclickysmilies($smilie_table_cols, $smilie_table_rows);
eval("\$headinclude .= \"".$tpl->get("bbcode_script")."\";");
eval("\$editor = \"".$tpl->get("editor")."\";");
eval("\$tpl->output(\"".$tpl->get("pinwand_entry")."\");");
}
}
if ($action == 'add') {
$allowsmilies = 1;
$bbcode_buttons = getcodebuttons();
$note = '';
$note .= $lang->items['LANG_POSTINGS_HTML_NOT_ALLOW'];
$note .= $lang->items['LANG_POSTINGS_BBCODE_ALLOW'];
$note .= $lang->items['LANG_POSTINGS_SMILIES_ALLOW'];
$bbcode_smilies = getclickysmilies($smilie_table_cols, $smilie_table_rows);
eval("\$headinclude .= \"".$tpl->get("bbcode_script")."\";");
eval("\$editor = \"".$tpl->get("editor")."\";");
eval("\$tpl->output(\"".$tpl->get("pinwand_entry")."\");");
}
if ($action == 'delpin') {
$db->unbuffered_query("delete from bb".$n."_pinwand where pinid='".$_GET['pinid']."'");
header("Location: pinwand.php");
exit();
}
?> |