Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: v.7.01.04

Parašė ELŽ· 2011 Vas. 25 16:02:31
#4

9. With this code you can limit people from downloading if they have a score of zero.
Open downloads.php and search for (around line 28):

if (checkgroup($cdata['download_cat_access'])) {
$res = 1;
$result = dbquery("UPDATE ".DB_DOWNLOADS." SET
download_count=download_count+1 WHERE download_id='".$_GET['download_id']."'");
redirect($data['download_url']);
}

Replace with:

if (checkgroup($cdata['download_cat_access'])) {
$res = 1;
if (score_negative("DOWNL")) {
$result = dbquery("UPDATE ".DB_DOWNLOADS." SET
download_count=download_count+1 WHERE download_id='".$_GET['download_id']."'");
redirect($data['download_url']);
} else {
if (iMEMBER) {
$res = 0;
} else {
$result = dbquery("UPDATE ".DB_DOWNLOADS." SET
download_count=download_count+1 WHERE download_id='".$_GET['download_id']."'");
redirect($data['download_url']);
}}}



O kas cia?