GregFest Posted December 3, 2011 Posted December 3, 2011 It wont credit users second currency, anyone no why just wipes users second currency function credit_user_submit() { global $db,$ir,$c,$h,$userid,$set; if ( !in_array($ir['user_level'],array(2,3)) ) { echo 'You cannot access this area.<br />> <a href="'.gen_url('main',true,true).'">Goto Main</a>'; die($h->endpage()); } $_POST['user'] = ( isset($_POST['user'])&&is_numeric($_POST['user']) )?abs(intval($_POST['user'])):0; $_POST[$set['main_currency']] = ( isset($_POST[$set['main_currency']])&&is_numeric($_POST[$set['main_currency']]) )?abs(intval($_POST[$set['main_currency']])):0; $_POST[$set['second_currency']] = ( isset($_POST[$set['second_currency']])&&is_numeric($_POST[$set['second_currency']]) )?abs(intval($_POST[$set['second_currency']])):0; if ( (empty($_POST[$set['main_currency']]) && empty($_POST[$set['second_currency']])) OR empty($_POST['user']) ) { echo ' Something went horribly wrong, please go back and try again. <br /> > <a href="'.gen_url('users',true,true).'&action=creditform">Go Back</a> '; die($h->endpage()); } $d = $db->query('SELECT `username` FROM `users` WHERE `userid` = '.$_POST['user']); if ( $db->num_rows($d) == 0 ) { echo ' User doesn\'t seem to exist, Please go back and try again. <br /> > <a href="'.gen_url('users',true,true).'&action=creditform">Go Back</a> '; die($h->endpage()); } $db->query('UPDATE `users` SET `main` = `main` + '.$_POST[$set['main_currency']].', `second` = `second` + '.$_POST[$set['second_currency']].' WHERE `userid` = '.$_POST['user']); $un = $db->fetch_single($d); stafflog_add('Credited '.$un.' ['.$_POST['user'].'] '.money_formatter($_POST[$set['main_currency']]).' and/or '.number_format($_POST[$set['second_currency']]).' '.$set['second_currency'].'.'); echo $un.' ['.$_POST['user'].'] was credited with '.money_formatter($_POST[$set['main_currency']]).' and/or '.number_format($_POST[$set['second_currency']]).' '.$set['second_currency'].'. <br /> > <a href="'.gen_url('main',true,true).'">Goto Main</a> '; } function mcredit_user_form() { global $db,$ir,$c,$h,$userid,$set; if ( !in_array($ir['user_level'],array(2,3)) ) { echo 'You cannot access this area.<br />> <a href="'.gen_url('main',true,true).'">Goto Main</a>'; die($h->endpage()); } echo " <h3>Mass Payment</h3> You can give all users ".$set['main_currency']."/".$set['second_currency'].". <br /> <form action='".gen_url('users',true,true)."&action=masscreditsub' method='post'> ".$set['main_currency'].": <input type='text' name='".$set['main_currency']."' /> ".$set['second_currency'].": <input type='text' name='".$set['second_currency']."' /> <br /> <input type='submit' value='Credit User' /> </form> "; } function mcredit_user_submit() { global $db,$ir,$c,$h,$userid,$set; if ( $ir['user_level'] != 2 ) { echo 'You cannot access this area.<br />> <a href="'.gen_url('main',true,true).'">Goto Main</a>'; die($h->endpage()); } $_POST[$set['main_currency']] = ( isset($_POST[$set['main_currency']])&&is_numeric($_POST[$set['main_currency']]) )?abs(intval($_POST[$set['main_currency']])):0; $_POST[$set['second_currency']] = ( isset($_POST[$set['second_currency']])&&is_numeric($_POST[$set['second_currency']]) )?abs(intval($_POST[$set['second_currency']])):0; if ( empty($_POST[$set['main_currency']]) && empty($_POST[$set['second_currency']]) ) { echo ' Something went horribly wrong, please go back and try again. <br /> > <a href="'.gen_url('users',true,true).'&action=masscredit">Go Back</a> '; die($h->endpage()); } $db->query('UPDATE `users` SET `main` = `main` + '.$_POST[$set['main_currency']].', `second` = `second` + '.$_POST[$set['second_currency']]); stafflog_add('Credited all users '.money_formatter($_POST[$set['main_currency']]).' and/or '.number_format($_POST[$set['second_currency']]).' '.$set['second_currency'].'.'); echo " All Users credited. Click <a href='".gen_url('main',true,true)."&action=announce'>here to add an announcement</a> or <a href='".gen_url('main',true,true)."&action=massmailer'>here to send a mass mail</a> explaining why. "; die($h->endpage()); } Quote
Curt Posted December 3, 2011 Posted December 3, 2011 Is that a feature you added or something already implemented in the Redux version ?... If it was already part of the script when you bought it then you should be able to ask for support from the creators... mccodes.com Quote
GregFest Posted December 3, 2011 Author Posted December 3, 2011 already in the codes yeah i tried haven't gotten a reply Quote
GregFest Posted December 12, 2011 Author Posted December 12, 2011 any ideas on this anyone i am at a stand still Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.