Parašė mXt· 2007 Rugp. 29 13:08:49
#1
Tai va, gal kas pades man sugalvoti, kaip priversti situos du kodus veikti su pro_download_system? Zinau, kad reikia zaisti su SQL, bet visada gaunu
Unknown column 'prodownloads_cat_access' in 'where clause'
Ši panelė neturi turinio
Kodai, kuriuos reikia priversti veikti:
openside(Naujausi Siuntiniai);
$result = dbquery(
"SELECT td.*,tdc.* FROM ".$db_prefix."downloads td
INNER JOIN ".$db_prefix."download_cats tdc ON td.download_cat=tdc.download_cat_id
WHERE ".groupaccess('download_cat_access')." ORDER BY download_datestamp DESC LIMIT 0,10"
);
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['download_title'], 23);
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>$itemsubject</a><br>\n";
}
} else {
echo "<center>".$locale['004']."</center>\n";
}
closeside();
ir:
openside("populiariausi siuntiniai");
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_count DESC LIMIT 0,5");
if (dbrows($result) != 0) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
while($data = dbarray($result)) {
$itemsubject = trimlink($data['download_title'], 23);
echo "<tr>\n<td class='small'><img src='".THEME."images/bullet.gif'> <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>$itemsubject</a></td>\n
<td align='right'>".$data['download_count']."</td>\n</tr>\n";
}
echo "</table>";
} else {
echo "<center>".$locale['004']."</center>\n";
}
closeside();
DB Prefixai is pro_download_system:
$inf_newtable_[1] = "prodownloads (
id int(10) NOT NULL auto_increment,
cat int(10) NOT NULL default '0',
name varchar(255) NOT NULL default '',
beschreibung text NOT NULL,
copyright varchar(255) NOT NULL default '',
lizenz_id int(10) NOT NULL default '0',
lizenz_okay char(1) NOT NULL default '',
lizenz_packet char(1) NOT NULL default '',
lizenz_url varchar(255) NOT NULL default '',
link_extern varchar(255) NOT NULL default '',
down varchar(255) NOT NULL default '',
bild varchar(255) NOT NULL default '',
downloads int(10) NOT NULL default '0',
user_id smallint(5) unsigned NOT NULL default '0',
datestamp int(10) NOT NULL default '0',
status char(1) NOT NULL default 'N',
PRIMARY KEY (`id`)
) TYPE=MyISAM;";
$inf_newtable_[2] = "prodownload_cats (
cat int(10) NOT NULL auto_increment,
top_cat int(10) NOT NULL default '0',
name varchar(50) NOT NULL default '',
beschreibung varchar(255) NOT NULL default '',
PRIMARY KEY (`cat`)
) TYPE=MyISAM;";
$inf_newtable_[3] = "prodownloads_bewertungen (
did int(10) NOT NULL default '0',
user_id smallint(5) unsigned NOT NULL default '0',
vote_opt char(1) NOT NULL default '',
PRIMARY KEY (`did`,`user_id`)
) TYPE=MyISAM;";
$inf_newtable_[4] = "prodownloads_kommentare (
id int(10) NOT NULL auto_increment,
did int(10) NOT NULL default '0',
user_id smallint(5) unsigned NOT NULL default '0',
comment_name varchar(255) NOT NULL default '',
text text NOT NULL,
datestamp int(10) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM;";
$inf_newtable_[5] = "prodownloads_lizenz (
`id` int(10) NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '',
`text` text NOT NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM;";
$inf_newtable_[6] = "prodownloads_settings (
id smallint(6) NOT NULL auto_increment,
titel varchar(255) NOT NULL default 'Professional Download v0.2-beta',
pmsystem char(2) NOT NULL default '0',
neupm smallint(5) unsigned NOT NULL default '1',
defektpm smallint(5) unsigned NOT NULL default '1',
maxfilesize varchar(30) NOT NULL default '1048576',
maxupfilesize varchar(30) NOT NULL default '2097152',
bild text NOT NULL,
down text NOT NULL,
downbereich tinyint(3) unsigned NOT NULL default '101',
uploadbereich tinyint(3) unsigned NOT NULL default '102',
uploadsaktivieren tinyint(3) unsigned NOT NULL default '103',
kommentare tinyint(3) unsigned NOT NULL default '101',
bewertungen tinyint(3) unsigned NULL default '101',
PRIMARY KEY (`id`)
) TYPE=MyISAM;";
$inf_insertdbrow_[1] = "prodownloads_settings VALUES (1, 'DOWNLOADS', '0', 1, 1, '1048576', '2097152', 'jpg,jpeg,gif,png,psd,JPG,JPEG,GIF,PNG,PSD', 'zip,rar,tar,exe,ZIP,RAR,TAR,EXE', '101', '102', '103', '101', '101')";
Laukiu pagalbos
Redagavo mXt· 2007 Rugp. 29 13:08:06