
Damit der Anreiz zum Hochladen von Bildern etwas erhöht wird, habe ich eine Belohnung in das Album eingebaut. Für das Hochladen eines Bildes gibt es dann 10 Punkte.
Suche in der album_upload.php:
Code: Alles auswählen
// --------------------------------
// Insert into DB
// --------------------------------
Code: Alles auswählen
$pic_points = '10';
Code: Alles auswählen
$sql = "UPDATE " . USERS_TABLE . "
SET user_new_pic = user_new_pic + 1
WHERE user_id <> " . $userdata['user_id'];
if ( !$status = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update pic message new/read status for user', '', __LINE__, __FILE__, $sql);
}
Code: Alles auswählen
$sql = "UPDATE " . USERS_TABLE . "
SET user_points = user_points + $pic_points
WHERE user_id = " . $userdata['user_id'];
if( !$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not obtain accounts information', "", __LINE__, __FILE__, $sql);
}
Code: Alles auswählen
$sql = "UPDATE " . VAULT_GENERAL_TABLE ."
SET config_value = config_value - $pic_points
WHERE config_name = 'bank_profit_sum'";
if( !$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not obtain update bank profit', "", __LINE__, __FILE__, $sql);
}
Code: Alles auswählen
$pic_points = '10';

Bye