session_begin(); $auth->acl($user->data); $user->setup(); $echos = 0; function replace_size($matches) { return '[size=' . ceil(100.0 * (((double) $matches[1])/12.0)) . ':' . $matches[2] . ']'; } // Adjust user signatures $sql = 'SELECT user_id, user_sig, user_sig_bbcode_uid FROM ' . USERS_TABLE; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $bbcode_uid = $row['user_sig_bbcode_uid']; // Only if a bbcode uid is present, the signature present and a size tag used... if ($bbcode_uid && $row['user_sig'] && strpos($row['user_sig'], '[size=') !== false) { $row['user_sig'] = preg_replace_callback('/\[size=(\d*):(' . $bbcode_uid . ')\]/', 'replace_size', $row['user_sig']); $sql = 'UPDATE ' . USERS_TABLE . " SET user_sig = '" . $db->sql_escape($row['user_sig']) . "' WHERE user_id = " . $row['user_id']; $db->sql_query($sql); if ($echos > 200) { echo '
' . "\n"; $echos = 0; } echo '.'; $echos++; flush(); } } $db->sql_freeresult($result); // Now adjust posts $sql = 'SELECT post_id, post_text, bbcode_uid, enable_bbcode FROM ' . POSTS_TABLE; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $bbcode_uid = $row['bbcode_uid']; // Only if a bbcode uid is present, bbcode enabled and a size tag used... if ($row['enable_bbcode'] && $bbcode_uid && strpos($row['post_text'], '[size=') !== false) { $row['post_text'] = preg_replace_callback('/\[size=(\d*):' . $bbcode_uid . '\]/', 'replace_size', $row['post_text']); $sql = 'UPDATE ' . POSTS_TABLE . " SET post_text = '" . $db->sql_escape($row['post_text']) . "' WHERE post_id = " . $row['post_id']; $db->sql_query($sql); if ($echos > 200) { echo '
' . "\n"; $echos = 0; } echo '.'; $echos++; flush(); } } $db->sql_freeresult($result); // Now to the private messages $sql = 'SELECT msg_id, message_text, bbcode_uid, enable_bbcode FROM ' . PRIVMSGS_TABLE; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $bbcode_uid = $row['bbcode_uid']; // Only if a bbcode uid is present, bbcode enabled and a size tag used... if ($row['enable_bbcode'] && $bbcode_uid && strpos($row['message_text'], '[size=') !== false) { $row['message_text'] = preg_replace_callback('/\[size=(\d*):' . $bbcode_uid . '\]/', 'replace_size', $row['message_text']); $sql = 'UPDATE ' . PRIVMSGS_TABLE . " SET message_text = '" . $db->sql_escape($row['message_text']) . "' WHERE msg_id = " . $row['msg_id']; $db->sql_query($sql); if ($echos > 200) { echo '
' . "\n"; $echos = 0; } echo '.'; $echos++; flush(); } } $db->sql_freeresult($result); // Done $db->sql_close(); ?>ic/ppp Mageia Installer and base platform for many utilitiesThierry Vignaud [tv]
summaryrefslogtreecommitdiffstats
path: root/perl-install/share/advertising/drweb.pl
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-06-14 15:04:14 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-06-14 15:04:14 +0000
commit5e5fc918a9f78c9c838cd73cce58faef9197b947 (patch)
treed3a207ec8ba793d994b3a910ffd6091dbf0e0288 /perl-install/share/advertising/drweb.pl
parentd66ec6b2f6965e11749989545eb623409f4ec221 (diff)
downloaddrakx-5e5fc918a9f78c9c838cd73cce58faef9197b947.tar
drakx-5e5fc918a9f78c9c838cd73cce58faef9197b947.tar.gz
drakx-5e5fc918a9f78c9c838cd73cce58faef9197b947.tar.bz2
drakx-5e5fc918a9f78c9c838cd73cce58faef9197b947.tar.xz
drakx-5e5fc918a9f78c9c838cd73cce58faef9197b947.zip
(ask_fromW_real) make previous button be labeled "cancel" when needed
Diffstat (limited to 'perl-install/share/advertising/drweb.pl')
0 files changed, 0 insertions, 0 deletions