'.$name.' ('.$user_id.'/'.$expert_id.')'; echo '

Ваш кабинет

'; echo ""; echo ""; echo ""; echo "
"; echo '
'; // ----------------------------------------------------------------------------------------- $farg[0]='#FFFFFF'; $farg[1]='#EDE8E1'; $fargval=1; echo '
'; echo '

Активность уникальных пользователей (Московское время с 10:00-09:59)

'; echo ''; echo ''; $link = mysql_connect (MYSQLADDRESS,MYSQLUSER,MYSQLPW); mysql_select_db(DATABASENAME); $sql="SELECT MIN(date) AS D FROM user_log"; $result = mysql_query($sql, $link) or die(mysql_error()); $line=mysql_fetch_array($result); $start_date = $line["D"]; $start_date ='2012-09-03'; while ($start_date<=date("Y-m-d")) { $from_date = date('Y-m-d', strtotime($start_date . ' - 0 day')).' 01:00:00'; $to_date = date('Y-m-d', strtotime($start_date . ' +1 day')).' 00:59:59'; $fargval=1; $sql="SELECT count(distinct(user_id)) as antal FROM user_log WHERE (action='login' OR action='autologin') AND date BETWEEN '$from_date' AND '$to_date' AND ip!='109.105.237.189'"; $result = mysql_query($sql, $link) or die(mysql_error()); $line=mysql_fetch_array($result); $login_antal = $line["antal"]; $sql="SELECT count(distinct(user_id)) as antal FROM user_log WHERE action='player' AND date BETWEEN '$from_date' AND '$to_date' AND ip!='109.105.237.189'"; $result = mysql_query($sql, $link) or die(mysql_error()); $line=mysql_fetch_array($result); $player_antal = $line["antal"]; $sql="SELECT count(distinct(user_id)) as antal FROM user_log WHERE action like 'replayer%' AND date BETWEEN '$from_date' AND '$to_date' AND ip!='109.105.237.189'"; $result = mysql_query($sql, $link) or die(mysql_error()); $line=mysql_fetch_array($result); $replayer_antal = $line["antal"]; $sql="SELECT count(distinct(user_id)) as antal FROM eo_click_log WHERE date BETWEEN '$from_date' AND '$to_date' AND ip!='109.105.237.189'"; $result = mysql_query($sql, $link) or die(mysql_error()); $line=mysql_fetch_array($result); $eo_click_antal = $line["antal"]; echo ''; echo ''; echo ''; if ($fargval==0) { $fargval=1; } else { $fargval=0; } $start_date = date('Y-m-d', strtotime($start_date . ' + 1 day')); } echo '
ДатаЛогинПроигрывательАвтоповторПереходы на Спецпредложение
'.$start_date.''.$login_antal.''.$player_antal.''.$replayer_antal.''.$eo_click_antal.'
'; echo '
'; // ----------------------------------------------------------------------------------------- $farg[0]='#FFFFFF'; $farg[1]='#EDE8E1'; $fargval=1; $link2 = mysql_connect (MYSQLADDRESS2,MYSQLUSER2,MYSQLPW2); mysql_query("SET NAMES 'cp1251'"); mysql_select_db(DATABASENAME2); echo '
'; echo '

Комиссии

'; echo ''; $expert_id = $_SESSION['expert_id']; $fargval=1; //$sql2="select goods_id, account_number, completion_date from ak_accounts WHERE ref='$eid_secure' AND status_id='5'"; $sql2="select goods_id, account_number, completion_date, price, ref, comm_paid_date from ak_accounts WHERE status_id='5' AND ref!=''"; $ak_result = mysql_query($sql2, $link2) or die(mysql_error()); while ($ak=mysql_fetch_array($ak_result)) { $goods_id = $ak["goods_id"]; $account_number = $ak["account_number"]; $completion_date = $ak["completion_date"]; $price = $ak["price"]; $ak_id_secure = $ak["ref"]; $comm_paid_date = $ak["comm_paid_date"]; $sql3="SELECT * FROM ak_goods WHERE goods_id='$goods_id'"; $ak_result2 = mysql_query($sql3, $link2) or die(mysql_error()); while ($ak_goods=mysql_fetch_array($ak_result2)) { $goods = $ak_goods["goods"]; $comm_fee_first = $ak_goods["comm_fee_first"]; $comm_fee_second = $ak_goods["comm_fee_second"]; } $sql="SELECT * FROM signups WHERE id_secure='$ak_id_secure'"; $result = mysql_query($sql, $link) or die(mysql_error()); while ($signup=mysql_fetch_array($result)) { $first = $signup["first"]; $last = $signup["last"]; $email = $signup["email"]; $expert = $signup["expert"]; } $printgoods = win2utf($goods); $commission_1 = $price * ($comm_fee_first/100); if(($expert==$expert_id) AND ($commission_1>0)) { echo ''; if ($fargval==0) { $fargval=1; } else { $fargval=0; } } } echo '
ИмяЕмайлЗаказТоварОписаниеДата оплатыЦена РубКомиссия РубКомиссия выплачена
'.$first.' '.$last.''.$email.''.$account_number.''.$goods_id.''.$printgoods.''.$completion_date.''.number_format($price, 2, '.', ' ').''.number_format($commission_1, 2, '.', ' ').''.$comm_paid_date.'
'; echo '

'; $sql="SELECT * FROM signups WHERE expert='$expert_id'"; $result = mysql_query($sql, $link) or die(mysql_error()); while ($line=mysql_fetch_array($result)) { $email = $line["email"]; $temp[] = $email; } $email_lista = implode(",",$temp); //echo $email_lista; $filename = "signups_".$expert_id.".csv"; $fh = fopen($filename, "w"); fwrite($fh,$email_lista); fclose($fh); // Count all $sql="SELECT COUNT(email) AS C FROM signups WHERE expert='$expert_id' AND active='Y' || expert='$expert_id' AND active=''"; $result = mysql_query($sql, $link) or die(mysql_error()); $line=mysql_fetch_array($result); $number = $line["C"]; $sql="SELECT COUNT(email) AS D FROM signups WHERE expert='$expert_id' AND active='Y'"; $result = mysql_query($sql, $link) or die(mysql_error()); $line=mysql_fetch_array($result); $activated = $line["D"]; $farg[0]='#FFFFFF'; $farg[1]='#EDE8E1'; $fargval=1; echo '

Зарегестрированные от вас слушатели

'; echo 'Щелкните правой кнопкой мыши, чтобы загрузить CSV-файл'; echo ''; echo ''; echo ''; $s_user_id = $user_id.'%'; $sql="SELECT * FROM signups WHERE expert='$expert_id' AND active='Y' || expert='$expert_id' AND active=''"; $result = mysql_query($sql, $link) or die(mysql_error()); while ($line=mysql_fetch_array($result)) { $id_secure = $line["id_secure"]; $first_name = $line["first"]; $last_name = $line["last"]; $email = $line["email"]; $active = $line["active"]; $ip_country = $line["ip_country"]; $confirmation_date = $line["confirmation_date"]; $date = $line["date"]; $logins = $line["logins"]; // echo ''; echo ''; if ($fargval==0) { $fargval=1; } else { $fargval=0; } } echo ''; echo ''; echo '
ИмяЕмайлСтрана День регистрацииДень подтверждения регистрацииАктивированЗаходов
'.$first_name.' '.$last_name.''.$email.''.$ip_country.''.$date.''.$confirmation_date.''.$active.''.$logins.'
 
Всего: '.$number.' ('.$activated.' активированных)
'; echo '
'; echo '

Всего зарегестрированных

'; echo ''; $link = mysql_connect (MYSQLADDRESS,MYSQLUSER,MYSQLPW); mysql_set_charset('utf8',$link); mysql_select_db(DATABASENAME); $fargval=1; $sql="SELECT COUNT(id_secure) AS antal, signups.ip_country AS ip, rupopups.popup_text AS country FROM signups INNER JOIN rupopups ON signups.ip_country=rupopups.popup_value GROUP BY ip_country ORDER BY rupopups.popup_text"; // WHERE expert='$expert_id' $result = mysql_query($sql, $link) or die(mysql_error()); while ($line=mysql_fetch_array($result)) { $antal = $line["antal"]; $ip = $line["ip"]; $country = $line["country"]; echo ''; if ($fargval==0) { $fargval=1; } else { $fargval=0; } } echo '
'.$country.''.$ip.''.$antal.'
'; mysql_close($link); //----------------------------------------------------------------------------------------------- echo '

'; echo '

Ссылка для регистрации

'; echo 'Ссылка для регистрации для использования в емайлах:

'; echo '
'; echo '

'; //----------------------------------------------------------------------------------------------- echo '

Банер

'; echo 'Используйте код внизу, чтобы вставить банер на ваш сайт:

'; echo '
'; echo '

'; echo '
'; echo '


'; //----------------------------------------------------------------------------------------------- $link = mysql_connect (MYSQLADDRESS,MYSQLUSER,MYSQLPW); mysql_select_db(DATABASENAME); $sql="SELECT * FROM sample_letters"; $result = mysql_query($sql, $link) or die(mysql_error()); while ($line=mysql_fetch_array($result)) { $id = $line["id"]; $product = $line["product"]; $headline = $line["headline"]; $messageblock = $line["message"]; $messageblock_html = $line["message_html"]; $link1 = $line["link1"]; $link2 = $line["link2"]; $link3 = $line["link3"]; $messageblock = str_replace("[expert_id]",$expert_id,$messageblock); $messageblock_html = str_replace("[expert_id]",$expert_id,$messageblock_html); echo '

'.$product.'

'; echo 'Здесь образец емайла, который вы можете отослать своим подписчикам. (TEXT)'; echo '

'; echo '
'; echo '

'; echo 'Здесь образец емайла, который вы можете отослать своим подписчикам. (HTML)'; echo '

'; echo '
'; echo '


'; } ?> =192 and $c<=239) $t.=$c208.chr($c-48); elseif ($c>239) $t.=$c209.chr($c-112); elseif ($c==184) $t.=$c209.$c209; elseif ($c==168) $t.=$c208.$c129; else $t.=$s[$i]; } return $t; } ?>