Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 1.1.5.0
- * @ Author : DeZender
- * @ Release on : 09.06.2012
- * @ Official site : http://DeZender.Net
- *
- */
- class functions {
- function POST($arg) {
- global $db;
- return (!empty( $_POST[$arg] ) ? htmlspecialchars( $db->safesql( $_POST[$arg] ) ) : FALSE);
- }
- function GET($arg) {
- global $db;
- return (!empty( $_GET[$arg] ) ? htmlspecialchars( $db->safesql( $_GET[$arg] ) ) : FALSE);
- }
- function pass($pass) {
- $pass .= 'Scrin_Developer)';
- return md5( $pass );
- }
- function check_mail($email) {
- if (preg_match( '' . '/^[0-9a-zA-Z]([-_.]?[0-9a-z])*@[0-9a-zA-Z]([-.]?[0-9a-z])*\.[a-z]{2,3}$/', $email, $check )) {
- return TRUE;
- }
- return FALSE;
- }
- function error($error) {
- foreach ($error as $key) {
- echo $key . '<br/>';
- }
- }
- function ref_invest($user_id) {
- global $db;
- $pr = $db->super_query( '' . 'SELECT sum(user_invest) as sum FROM `users` WHERE user_ref=\'' . $user_id . '\'' );
- if (empty( $pr['sum'] )) {
- $invest = 0;
- } else {
- $invest = $pr['sum'];
- }
- return $invest;
- }
- function ref_proc($user_id) {
- $invest = $this->ref_invest( $user_id );
- if ($invest < 500) {
- $proc = 10;
- } else {
- if ($invest < 1000) {
- $proc = 11;
- } else {
- if ($invest < 2000) {
- $proc = 12;
- } else {
- if ($invest < 5000) {
- $proc = 13;
- } else {
- $proc = 14;
- }
- }
- }
- }
- return $proc;
- }
- function add_dep($dep_id, $user_id, $amount, $ps, $balance) {
- global $db;
- $dep = $db->super_query( '' . 'SELECT `dep_time` FROM `dep` WHERE `dep_id`=\'' . $dep_id . '\'' );
- $time = time( );
- $dep_end = 3600 * $dep['dep_time'] + $time;
- $db->query( '' . 'INSERT INTO `dep_us`( `dep_id`, `dep_start`, `dep_end`, `user_id`,`dep_sum`,`dep_system`)
- VALUES (\'' . $dep_id . '\',\'' . $time . '\',\'' . $dep_end . '\',\'' . $user_id . '\',\'' . $amount . '\',\'' . $ps . '\')' );
- $bonus = $this->bonus( $amount );
- $ref = $db->super_query( '' . 'SELECT `user_ref` FROM `users` WHERE `user_id`=\'' . $user_id . '\'' );
- $ref_id = $ref['user_ref'];
- $to_ref_proc = $this->ref_proc( $ref_id );
- $to_ref = $amount / 100 * $to_ref_proc;
- if ($ps == 'pm') {
- $db->query( '' . 'UPDATE `users` SET `user_money_p`=user_money_p+\'' . $to_ref . '\' WHERE `user_id`=\'' . $ref_id . '\'' );
- $db->query( '' . 'UPDATE `users` SET `user_money_p`=user_money_p+\'' . $bonus . '\' WHERE `user_id`=\'' . $user_id . '\'' );
- if ($balance == TRUE) {
- $db->query( '' . 'UPDATE `users` SET `user_money_p`=user_money_p-\'' . $amount . '\' WHERE `user_id`=\'' . $user_id . '\'' );
- }
- } else {
- $db->query( '' . 'UPDATE `users` SET `user_money_l`=user_money_l+\'' . $bonus . '\' WHERE `user_id`=\'' . $user_id . '\'' );
- $db->query( '' . 'UPDATE `users` SET `user_money_l`=user_money_l+\'' . $to_ref . '\' WHERE `user_id`=\'' . $ref_id . '\'' );
- if ($balance == TRUE) {
- $db->query( '' . 'UPDATE `users` SET `user_money_l`=user_money_l-\'' . $amount . '\' WHERE `user_id`=\'' . $user_id . '\'' );
- }
- }
- $db->query( 'UPDATE `stat` SET `info`=info+1 WHERE `st_id`=\'4\'' );
- $db->query( '' . 'UPDATE `stat` SET `info`=info+\'' . $amount . '\' WHERE `st_id`=\'2\'' );
- $db->query( '' . 'UPDATE `stat` SET `info`=info+\'' . $bonus . '\' WHERE `st_id`=\'3\'' );
- if ($balance == TRUE) {
- $db->query( '' . 'INSERT INTO `history`( `user_id`, `p_ps`, `sum`, `time`, `p_type`) VALUES (\'' . $user_id . '\',\'' . $ps . '\',\'' . $amount . '\',\'' . $time . '\',\'re' . $ps . '\')' );
- } else {
- $db->query( '' . 'INSERT INTO `history`( `user_id`, `p_ps`, `sum`, `time`, `p_type`) VALUES (\'' . $user_id . '\',\'' . $ps . '\',\'' . $amount . '\',\'' . $time . '\',\'' . $ps . '\')' );
- }
- $db->query( '' . 'INSERT INTO `history`( `user_id`, `p_ps`, `sum`, `time`, `p_type`) VALUES (\'' . $user_id . '\',\'' . $ps . '\',\'' . $bonus . '\',\'' . $time . '\',\'bonus\')' );
- $db->query( '' . 'UPDATE `users` SET `user_invest`=user_invest+\'' . $amount . '\' WHERE `user_id`=\'' . $user_id . '\'' );
- }
- ................................................................................
- .....................................
- ............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement