vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Store question/request (Mass donate) (https://vborg.vbsupport.ru/showthread.php?t=56149)

bgray 08-12-2003 11:18 PM

Store question/request (Mass donate)
 
Does anyone know if there is a hack to award everyone on your forum a certain amount of Lesane's store points at one time?

If so, does anyone know how it can be done?

Thanks!

Giveit2u43 08-13-2003 03:58 AM

I guess you could do some editing to the admin side of the lottery hack and just set it up to give a user a set amount?!

Orphen 08-13-2003 10:03 AM

Yes you can first you need to install.

Paycheck Hack for Lesane's Store by Eander

After that then you need to edit paycheck.php file.

When you edit it put this in you will be able to send it to all the default groups including regular users. If you need to get a certain group that you have added you can edit the file to add that group.


Code:

<?

/* Paycheck Hack By Eander
Save this as paycheck.php and upload it to your admin directory */
require("./global.php");

cpheader();

if (isset($action)==0) {
  echo "Nothing to see here. Have a nice day!";
}

if ($action=="pay1") {
?>
<form method=post action=paycheck.php?action=pay2>
Amount to pay: <input type=text name=amount><br>
Usergroups to pay:
<ul>
<li><input type=checkbox name=admins value=6 checked>Administrators
<li><input type=checkbox name=regus value=2 checked>Reg users
<li><input type=checkbox name=mods value=7 checked>Moderators
<li><input type=checkbox name=megas value=5 checked>Mega Moderators
</ul>
<input type=submit value="Pay Now">
<?
die;
}
elseif ($action=="pay2") {
        if (!$amount) {
                ?>You provided a null amount. <a href=javascript:history.go(-1)>Back</a><?
                die;
        }
        else {
                $who=get_defined_vars();
                if ($who["admins"]==6 or $who["regus"]==2 or $who["mods"]==7 or $who["megas"]==5) {
                        $myquery="UPDATE user SET storep=storep+$amount WHERE";
                        $myqueryadd="";
                        if ($who["admins"]==6) {
                                $myqueryadd.=" usergroupid=6";
                                $add=" OR";
                        }
                        if ($who["regus"]==2) {
                                $myqueryadd.=$add." usergroupid=2";
                                $add=" OR";
                        }
                        if ($who["mods"]==7) {
                                $myqueryadd.=$add." usergroupid=7";
                                $add=" OR";
                        }
                        if ($who["megas"]==5) {
                                $myqueryadd.=$add." usergroupid=5";
                        }
                        $payquery=$DB_site->query($myquery.$myqueryadd);
                        $checkquery=$DB_site->query("SELECT userid,username FROM user WHERE" . $myqueryadd);
                        for ($x=1;$checkrow=mysql_fetch_array($checkquery);$x++) {
                                $pmgivemessage="Dear " . $checkrow[username] . ",\n\nYour paycheck for helping administer these forums has been paid. You have been given $amount store points for your efforts. Keep up the good work!";
                                $sendpm=$DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title,message,dateline,messageread,folderid) VALUES (NULL,'$checkrow[userid]','$checkrow[userid]','$bbuserinfo[userid]','Your Paycheck','".addslashes($pmgivemessage)."',".time().",0,0)");
                                echo "PM sent to $checkrow[username] <br>";
                        }
                        echo "Success.";
                        die;
                }
                else {
                        echo "You didn't specify a usergroup to pay.";
                        die;
                }
        }
}
?>


bgray 08-13-2003 11:43 PM

Awesome! Thanks man!


All times are GMT. The time now is 07:40 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01018 seconds
  • Memory Usage 1,731KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete