Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Siuntinio kategorija

Parašė Use Google· 2009 Rugp. 26 11:08:15
#1

openside("Naujausi epizodai");
$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,5"
);
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();




Kaip pakeisti sita panele, kad prie siuntinio skliaustuose rodytu kurioje kategorijoje jis yra?

Parašė VilleR· 2009 Rugp. 26 11:08:38
#2

openside("Siuntiniai");
$result = dbquery("SELECT * FROM ".$db_prefix."download_cats WHERE ".groupaccess('download_cat_access')." ORDER BY download_cat_name");
$rows = dbrows($result);
if ($rows != 0) {
$counter = 0; $columns = 2;
while ($data = dbarray($result)) {
if ($counter != 0 && ($counter % $columns == 0)) echo "";
$num = dbcount("(download_cat)", "downloads", "download_cat='".$data['download_cat_id']."'");
echo "<a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat_id']."'>".$data['download_cat_name']."</a> <span class='small2'>($num)</span>";
echo "<br>" ;
$counter++;
}
echo "";
} else {
echo "<center><br>\n".$locale['430']."<br><br></center>\n";
}
closeside();



Imk :)

Redagavo VilleR· 2009 Rugp. 26 11:08:47

Parašė Use Google· 2009 Rugp. 26 12:08:46
#3

zUinas parašė:
...
Kaip pakeisti sita panele, kad prie siuntinio skliaustuose rodytu kurioje kategorijoje jis yra?

Man reikia pakeisti ta panele, kuria as parasiau, kad prie siuntinio joje rodytu skliaustuose kokioje kategorijoje jis yra, o ne siuntiniu kategoriju paneles.

Redagavo Use Google· 2009 Rugp. 26 12:08:11

Parašė Žmogus· 2009 Rugp. 26 12:08:42
#4

WHERE download_cat = '6'

openside("Naujausi epizodai");
$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')." WHERE download_cat = '6' ORDER BY download_datestamp DESC LIMIT 0,5"
);
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();




Kur 6 keisk į savo skaičių

Redagavo Žmogus· 2009 Rugp. 26 12:08:43

Parašė Kelmas· 2009 Rugp. 26 12:08:43
#5

openside("Naujausi epizodai");
$result = dbquery("SELECT download_cat, download_id, download_cat_name, download_title FROM ".$db_prefix."downloads
INNER JOIN ".$db_prefix."download_cats ON download_cat = download_cat_id
WHERE ".groupaccess('download_cat_access')." ORDER BY download_datestamp DESC LIMIT 5");

if (dbrows($result)) {

while ($data = dbarray($result)) 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'>".trimlink($data['download_title'], 23)."</a> (Kategorija: <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."' title='".$data['download_cat_name']."' class='side'>".trimlink($data['download_cat_name'], 23)."</a>)<br>\n";

} else {
echo "<center>".$locale['004']."</center>\n";
}



Redagavo Kelmas· 2009 Rugp. 26 12:08:50

Parašė Use Google· 2009 Rugp. 26 13:08:35
#6

Dragelis parašė:
openside("Naujausi epizodai");
$result = dbquery("SELECT download_cat, download_id, download_cat_name, download_title FROM ".$db_prefix."downloads
INNER JOIN ".$db_prefix."download_cats ON download_cat = download_cat_id
WHERE ".groupaccess('download_cat_access')." ORDER BY download_datestamp DESC LIMIT 5");

if (dbrows($result)) {

while ($data = dbarray($result)) 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'>".trimlink($data['download_title'], 23)."</a> (Kategorija: <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."' title='".$data['download_cat_name']."' class='side'>".trimlink($data['download_cat_name'], 23)."</a>)<br>\n";

} else {
echo "<center>".$locale['004']."</center>\n";
}



Ačiū :)

Parašė iSound· 2009 Rugp. 26 13:08:28
#7

Dragelis pamiršo darašyti apačioje closeside();

Parašė Deiviux.eu· 2009 Rugp. 26 14:08:38
#8

DeeJay ta prasme taip:


openside("Naujausi epizodai");
$result = dbquery("SELECT download_cat, download_id, download_cat_name, download_title FROM ".$db_prefix."downloads
INNER JOIN ".$db_prefix."download_cats ON download_cat = download_cat_id
WHERE ".groupaccess('download_cat_access')." ORDER BY download_datestamp DESC LIMIT 5");

if (dbrows($result)) {

while ($data = dbarray($result)) 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'>".trimlink($data['download_title'], 23)."</a> (Kategorija: <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."' title='".$data['download_cat_name']."' class='side'>".trimlink($data['download_cat_name'], 23)."</a>)<br>\n";

} else {
echo "<center>".$locale['004']."</center>\n";
}

closeside();