this is line 2871 in my functions.php
// ###################### Start bits2array #######################
// takes a bitfield and the array describing the resulting fields
function convert_bits_to_array(&$bitfield, $_FIELDNAMES)
{
$bitfield = intval($bitfield);
$arry = array();
foreach ($_FIELDNAMES AS $field => $bitvalue) {
if ($bitfield & $bitvalue)
{
$arry["$field"] = 1;
}
else
{
$arry["$field"] = 0;
}
}
return $arry;
}
and I added the thank you code right above the end of the file, here:
// ###################### thankyou #######################
function thankyou(){
global $DB_site, $stylevar, $vboptions, $vbphrase;
require_once('./global.php');
$latestcontributers = $DB_site->query("SELECT username, subscriptionlog.userid
FROM " . TABLE_PREFIX . "subscriptionlog AS subscriptionlog
LEFT JOIN " . TABLE_PREFIX . "user AS user
USING ( userid )
WHERE user.userid = subscriptionlog.userid
AND STATUS = '1'
ORDER BY regdate DESC
LIMIT 10");
$latest_str = "";
while ($contributer = $DB_site->fetch_array($latestcontributers))
{
eval ('$latest_str .= ", ' . fetch_template('thanksbit') . '";');
}
$latest_str = substr($latest_str , 2);
$latest_str = addslashes($latest_str);
$DB_site->query("UPDATE " . TABLE_PREFIX . "template SET template=\"$latest_str\", template_un=\"$latest_str\" WHERE title='thanks'");
}
/*================================================= =====================*\
|| ################################################## ##################
|| # Downloaded: 18:53, Tue Apr 27th 2004
|| # CVS: $RCSfile: functions.php,v $ - $Revision: 1.967 $
|| ################################################## ##################
\*================================================ ======================*/
?>
I couldnt post the whole file, it was too big
|