PDA

View Full Version : What hack is this from?


Lethal
06-03-2003, 08:20 AM
I ran into a problem when I was posting on my board and it points to this code in the newreply.php file.

$attid = array();
$atts = $DB_site->query("SELECT * FROM attachment_tmp WHERE threadid='$threadid' AND poststarttime='$poststarttime' AND userid='$bbuserinfo[userid]'");
while($att = $DB_site->fetch_array($atts)) {
$DB_site->query("INSERT INTO attachment (attachmentid,userid,dateline,filename,filedata,vi sible,postid) VALUES (NULL,$bbuserinfo[userid],".time().",'".addslashes($att[filename])."','".addslashes($att[filedata])."','$att[visible]','$postid')");
$attid[] = $DB_site->insert_id();
$DB_site->query("DELETE FROM attachment_tmp WHERE attachid='$att[attachid]'");
}
$attids = implode(",", $attid);
$attids = iif($attids=="",$attids=0,$attids);



My board is hacked pretty good and I went through all my hacks to see if I can find which one it was and had no luck. I must have installed one and decided not to use it and forgot to change this code back to the original. The error it gives is this:

Invalid SQL: SELECT * FROM attachment_tmp WHERE threadid='19' AND poststarttime='' AND userid='1'
mysql error: Table 'attachment_tmp' doesn't exist

mysql error number: 1146


the attachment_tmp table sounds so familiar. I know I have seen it somewhere before but can't figure it out. I am going to search again to see if I missed it somewhere. I tried searching all the attachment hacks here but no luck either. I thought it was firefly's attachment editor hack that I have installed but I didn't find that anywhere in the instructions. Any help would be much appreciated.

Xenon
06-03-2003, 09:24 AM
hmm i think it's either multiple attachmens (vb3 attachments..) or save attachments as files

Lethal
06-04-2003, 02:48 AM
TY TY it was vb3 attachments. I had installed this but it had an issue with vbportal so I just decided to wait for vb3 to come out and must have forgot to take that piece of code out. Thanks xenon.

Lethal
06-04-2003, 02:51 AM
I might post this over at vbportal.com and see if they can fix the problem with it, to make it work with vbportal.