<?php
header("Cache-Control: no-store, no-cache, must-revalidate");
if ($ver=="wml") header ("Content-type:text/vnd.wap.wml; charset=utf-8");
else if ($ver=="xhtml") header("Content-Type:text/html; charset=UTF-8");
else header ("Content-type:text/vnd.wap.wml; charset=utf-8");
require("inc.php");
$link = connect_db();
list($row,$id,$ps,$fsize1,$fsize2) = check_login($link);
require("version.php");
$user=$row["user"];
$level=$row["level"];
$bal=$row['bal'];
$voteses=$row['voteses'];
$f = date("n");
$f1 = date("n");
$f2 = $f1 +1;
if($f2 == "13") {
$f3 = "01";
}
else{
$f3 = $f2;
}
$vaxt = date("y-$f3-01 00:00:00",time() +$timeadjust);
$d = date("m");
$d1 = date("m");
$d = str_replace("01","Yanvar",$d);
$d = str_replace("02","Fevral",$d);
$d = str_replace("03","Mart",$d);
$d = str_replace("04","Aprel",$d);
$d = str_replace("05","May",$d);
$d = str_replace("06","Iyun",$d);
$d = str_replace("07","Iyul",$d);
$d = str_replace("08","Avqust",$d);
$d = str_replace("09","Senytabr",$d);
$d = str_replace("10","Oktyabr",$d);
$d = str_replace("11","Noyabr",$d);
$d = str_replace("12","Dekabr",$d);
$d1 = str_replace("12","Yanvar",$d1);
$d1 = str_replace("01","Fevral",$d1);
$d1 = str_replace("02","Mart",$d1);
$d1 = str_replace("03","Aprel",$d1);
$d1 = str_replace("04","May",$d1);
$d1 = str_replace("05","Iyun",$d1);
$d1 = str_replace("06","Iyul",$d1);
$d1 = str_replace("07","Avqust",$d1);
$d1 = str_replace("08","Senytabr",$d1);
$d1 = str_replace("09","Oktyabr",$d1);
$d1 = str_replace("10","Noyabr",$d1);
$d1 = str_replace("11","Dekabr",$d1);
$k = mysql_query ("select max(vaxt) as mst from golos");
$k1 = mysql_fetch_array($k);
$finish_time = $k1['mst'];
$finish_time_start = strtotime($finish_time);
if ($ver=="wml"){
echo $xml;
echo $dtd;
echo "<wml>\n";
echo "<card title=\"Istifadechiler\">\n";
}
else{
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
echo "<head><link rel=\"stylesheet\" type=\"text/css\" href=\"css/css.css\"/>";
echo "<title>Shekilleriniz</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
}
switch($mod) {
default: if ($ver=="wml")echo "<p align=\"left\">\n";
else echo "<div align=\"center\">\n";
print $fsize1;
print "<b>Umumi Istifadechi Reytingi</b><br/>";
print "<b>1 ses = 2 bal</b><br/>";
echo "Qeyd: 1 ay erzinde en chox Ses Toplayan Shexs 1ci yer Super Moder, 2ci yer Killer, 3ci yer VIP vezifesi qazanacaq.<br/>\n";
echo "<b>Sesverme 1 ".$d." - 1 ".$d1." (00:00:00) arasinda davam edecek.</b><br/>\n";
echo "Sesvermede isthirak eden her bir istifadechiye gun erzinde maksimum 300 ses gondere bilersiniz.Diqqetli Olun.Sesvermeni son gune saxlamayin!!!<br/>\n";
echo "Super Moder 400 ses, Killer 200 ses, VIP 100 sesi minimal kechmelidir.<br/>\n";
echo "<a href=\"search.php?$ses&ref=$ref\">Nick Axtar ve Ses ver</a><br/>";
print $divide;
print $fsize2;
$userall = mysql_query ("select count(id) as num from users where `voteses` > 0;");
$usm = mysql_fetch_array($userall);
$num = $usm["num"];
if(!isset($s))$s=0;
$mx=round(($num/10)+0.45);
if($s>$mx)$s=$mx;
if($s==0)$s=1;
$ot=(($s-1)*10)+1;
$do=$s*10;
if($do>$num)$do=$num;
$o=$ot-1;
$n=$ot;
if($do==0)$n=$o;
echo $fsize1;
echo "•<a href=\"ses.php?go=golos&$ses&nk=$id&takep2\">Size Ses verdiler?</a><br/>";
echo "Gosterir: $n-$do /Cemi: $num<br/>\n";
echo $fsize2;
echo $divide;
$r = mysql_query ("select id,user,voteses from users order by voteses desc limit $o,$do");
for ($i=$ot;
$i<=$do;
$i++){
$arr = mysql_fetch_array($r);
$login=$arr['user'];
$usid=$arr['id'];
$voteses=$arr['voteses'];
print $fsize1;
echo ($i).") <a href=\"info2.php?$ses&nk=$usid&ref=$ref\">".$login."</a>|Ses: ";
echo "<a href=\"ses.php?go=golos&$ses&nk=$usid&takep2\">".$arr['voteses']."</a><br/>";
echo "<a href=\"users.php?mod=votes1&$ses&nk=$usid&ref=$ref\">1[ses]</a>|";
echo "<a href=\"users.php?mod=votes5&$ses&nk=$usid&ref=$ref\">5[ses]</a>|";
echo "<a href=\"users.php?mod=votes10&$ses&nk=$usid&ref=$ref\">10[ses]</a>|<br/><br/>";
print $fsize2;
}
$next=$s+1;
$prev=$s-1;
if ($num>$do) {
$ot=(($next-1)*10)+1;
$do=$next*10;
if($do>$num)$do=$num;
echo $divide;
echo $fsize1;
echo "<a href=\"users.php?$ses&s=$next&ref=$ref\">>>$ot-$do>></a><br/>\n";
echo $fsize2;
}
if($s>1) {
$ot=(($prev-1)*10)+1;
$do=$prev*10;
echo $fsize1;
echo "<a href=\"users.php?$ses&s=$prev&ref=$ref\"><<$ot-$do<<</a><br/>\n";
echo $fsize2;
}
break;
case 'votes1': $q1 = mysql_query("select * from users where id='".$nk."';");
$limit = mysql_fetch_array($q1);
$limit_ses = $limit['limit_ses'];
if($limit_ses>=1000){
if ($ver=="wml")echo "<p align=\"center\">\n";
else echo "<div align=\"center\">\n";
echo $fsize1;
echo "Her Bir istifadechiye gun erzinde cemi 1000 ses gondermek mumkundur.Novbeti Gun ses vermeye chalishin.";
print $fsize2;
}
else if ($row["bal"]<2) {
if ($ver=="wml")echo "<p align=\"center\">\n";
else echo "<div align=\"center\">\n";
echo $fsize1;
echo "Siz 2 Baliniz olmasa ses vere bilmersiniz!!!";
print $fsize2;
}
else if ($finish_time_start <time() and $finish_time !=0) {
if ($ver=="wml")echo "<p align=\"center\">\n";
else echo "<div align=\"center\">\n";
echo $fsize1;
echo "Sesvermenin vaxti bitmishdir!!!";
print $fsize2;
}
else {
$q = mysql_query("select user,voteses from users where id='".$nk."';");
$data = mysql_fetch_array($q);
$counter = $data['voteses'];
$login = $data['user'];
$counter2 = $counter+1;
mysql_query ("update users set voteses='".$counter2."' where id='".$nk."';");
$query = mysql_query("select ses from golos where user='".$nk."' and who = '".$id."';");
if (mysql_affected_rows() == 0) {
$query = mysql_query("select ses from golos where user='".$nk."' and who = '".$id."';");
$data = mysql_fetch_array($query);
$ses = $data['ses'];
$ses = $ses+1;
mysql_query ("INSERT INTO golos SET ses='".$ses."', user = '".$nk."', who = '".$id."', who_nick = '".$user."', vaxt = '".$vaxt."'");
$vaxt=gmdate("Y-m-d H:i ",time() +$timeadjust);
$tarix=gmdate("Y-m-d");
$rnd = rand(0,99999999);
$mes = "<b>Reytingde!</b> <b>$user</b> size 1 ses verdi.Umumi Ses: <b>$ses</b>. Sizde Sesvermede ishtirak edin.\n";
mysql_query("Insert into zapiski set klu4='".$rnd."', who ='".$user."', idwho ='".$id."', message = '".$mes."', towhom = '".$login."', idtowhom = '".$nk."', time = '".$vaxt."', readd = '0', topic = 'Reyting1', date='".$vaxt."'");
}
else{
$query = mysql_query("select ses from golos where user='".$nk."' and who = '".$id."';");
$data = mysql_fetch_array($query);
$ses = $data['ses'];
$ses = $ses+1;
mysql_query ("update golos SET ses='".$ses."' where user = '".$nk."' and who = '".$id."'");
$vaxt=gmdate("Y-m-d H:i ",time() +$timeadjust);
$tarix=gmdate("Y-m-d");
$rnd = rand(0,99999999);
$mes = "<b>Reytingde!</b> <b>$user</b> size 1 ses verdi.Umumi Ses: <b>$ses</b>. Sizde Sesvermede ishtirak edin.\n";
mysql_query("Insert into zapiski set klu4='".$rnd."', who ='".$user."', idwho ='".$id."', message = '".$mes."', towhom = '".$login."', idtowhom = '".$nk."', time = '".$vaxt."', readd = '0', topic = 'Reyting1', date='".$vaxt."'");
}
$bal=$row['bal'];
$bal=$bal-2;
mysql_query ("Update users set bal='".$bal."' where id='".$id."'");
$limit=1;
mysql_query ("Update users set limit_ses=limit_ses+'".$limit."' where id='".$nk."'");
if ($ver=="wml")echo "<p align=\"center\">\n";
else echo "<div align=\"center\">\n";
echo $fsize1;
echo "Sizin 1 Ses $login uchun Qebul Olundu!<br/>";
echo $fsize2;
}
break;
case 'votes5': $q1 = mysql_query("select * from users where id='".$nk."';");
$limit = mysql_fetch_array($q1);
$limit_ses = $limit['limit_ses'];
if($limit_ses>=1000){
if ($ver=="wml")echo "<p align=\"center\">\n";
else echo "<div align=\"center\">\n";
echo $fsize1;
echo "Her Bir istifadechiye gun erzinde cemi 1000 ses gondermek mumkundur.Novbeti Gun ses vermeye chalishin.";
print $fsize2;
}
else if ($row["bal"]<10) {
if ($ver=="wml")echo "<p align=\"center\">\n";
else echo "<div align=\"center\">\n";
echo $fsize1;
echo "Siz 10 Baliniz olmasa ses vere bilmersiniz!!!";
print $fsize2;
}
else if ($finish_time_start <time() and $finish_time !=0) {
if ($ver=="wml")echo "<p align=\"center\">\n";
else echo "<div align=\"center\">\n";
echo $fsize1;
echo "Sesvermenin vaxti bitmishdir!!!";
print $fsize2;
}
else {
$q = mysql_query("select user,voteses from users where id='".$nk."';");
$data = mysql_fetch_array($q);
$counter = $data['voteses'];
$login = $data['user'];
$counter2 = $counter+5;
mysql_query ("update users set voteses='".$counter2."' where id='".$nk."';");
$query = mysql_query("select ses from golos where user='".$nk."' and who = '".$id."';");
if (mysql_affected_rows() == 0) {
$query = mysql_query("select ses from golos where user='".$nk."' and who = '".$id."';");
$data = mysql_fetch_array($query);
$ses = $data['ses'];
$ses = $ses+5;
mysql_query ("INSERT INTO golos SET ses='".$ses."', user = '".$nk."', who = '".$id."', who_nick = '".$user."', vaxt = '".$vaxt."'");
$vaxt=gmdate("Y-m-d H:i ",time() +$timeadjust);
$tarix=gmdate("Y-m-d");
$rnd = rand(0,99999999);
$mes = "<b>Reytingde!</b> <b>$user</b> size 5 ses verdi.Umumi Ses: <b>$ses</b>. Sizde Sesvermede ishtirak edin.\n";
mysql_query("Insert into zapiski set klu4='".$rnd."', who ='".$user."', idwho ='".$id."', message = '".$mes."', towhom = '".$login."', idtowhom = '".$nk."', time = '".$vaxt."', readd = '0', topic = 'Reyting5', date='".$vaxt."'");
}
else{
$query = mysql_query("select ses from golos where user='".$nk."' and who = '".$id."';");
$data = mysql_fetch_array($query);
$ses = $data['ses'];
$ses = $ses+5;
mysql_query ("update golos SET ses='".$ses."' where user = '".$nk."' and who = '".$id."'");
$vaxt=gmdate("Y-m-d H:i ",time() +$timeadjust);
$tarix=gmdate("Y-m-d");
$rnd = rand(0,99999999);
$mes = "<b>Reytingde!</b> <b>$user</b> size 5 ses verdi.Umumi Ses: <b>$ses</b>. Sizde Sesvermede ishtirak edin.\n";
mysql_query("Insert into zapiski set klu4='".$rnd."', who ='".$user."', idwho ='".$id."', message = '".$mes."', towhom = '".$login."', idtowhom = '".$nk."', time = '".$vaxt."', readd = '0', topic = 'Reyting5', date='".$vaxt."'");
}
$bal=$row['bal'];
$bal=$bal-10;
mysql_query ("Update users set bal='".$bal."' where id='".$id."'");
$limit=5;
mysql_query ("Update users set limit_ses=limit_ses+'".$limit."' where id='".$nk."'");
if ($ver=="wml")echo "<p align=\"center\">\n";
else echo "<div align=\"center\">\n";
echo $fsize1;
echo "Sizin 5 Ses $login uchun Qebul Olundu!<br/>";
echo $fsize2;
}
break;
case 'votes10': $q1 = mysql_query("select * from users where id='".$nk."';");
$limit = mysql_fetch_array($q1);
$limit_ses = $limit['limit_ses'];
if($limit_ses>=1000){
if ($ver=="wml")echo "<p align=\"center\">\n";
else echo "<div align=\"center\">\n";
echo $fsize1;
echo "Her Bir istifadechiye gun erzinde cemi 1000 ses gondermek mumkundur.Novbeti Gun ses vermeye chalishin.";
print $fsize2;
}
else if ($row["bal"]<20) {
if ($ver=="wml")echo "<p align=\"center\">\n";
else echo "<div align=\"center\">\n";
echo $fsize1;
echo "Siz 20 Baliniz olmasa ses vere bilmersiniz!!!";
print $fsize2;
}
else if ($finish_time_start <time() and $finish_time !=0) {
if ($ver=="wml")echo "<p align=\"center\">\n";
else echo "<div align=\"center\">\n";
echo $fsize1;
echo "Sesvermenin vaxti bitmishdir!!!";
print $fsize2;
}
else {
$q = mysql_query("select user,voteses from users where id='".$nk."';");
$data = mysql_fetch_array($q);
$counter = $data['voteses'];
$login = $data['user'];
$counter2 = $counter+10;
mysql_query ("update users set voteses='".$counter2."' where id='".$nk."';");
$query = mysql_query("select ses from golos where user='".$nk."' and who = '".$id."';");
if (mysql_affected_rows() == 0) {
$query = mysql_query("select ses from golos where user='".$nk."' and who = '".$id."';");
$data = mysql_fetch_array($query);
$ses = $data['ses'];
$ses = $ses+10;
mysql_query ("INSERT INTO golos SET ses='".$ses."', user = '".$nk."', who = '".$id."', who_nick = '".$user."', vaxt = '".$vaxt."'");
$vaxt=gmdate("Y-m-d H:i ",time() +$timeadjust);
$tarix=gmdate("Y-m-d");
$rnd = rand(0,99999999);
$mes = "<b>Reytingde!</b> <b>$user</b> size 10 ses verdi.Umumi Ses: <b>$ses</b>. Sizde Sesvermede ishtirak edin.\n";
mysql_query("Insert into zapiski set klu4='".$rnd."', who ='".$user."', idwho ='".$id."', message = '".$mes."', towhom = '".$login."', idtowhom = '".$nk."', time = '".$vaxt."', readd = '0', topic = 'Reyting10', date='".$vaxt."'");
}
else{
$query = mysql_query("select ses from golos where user='".$nk."' and who = '".$id."';");
$data = mysql_fetch_array($query);
$ses = $data['ses'];
$ses = $ses+10;
mysql_query ("update golos SET ses='".$ses."' where user = '".$nk."' and who = '".$id."'");
$vaxt=gmdate("Y-m-d H:i ",time() +$timeadjust);
$tarix=gmdate("Y-m-d");
$rnd = rand(0,99999999);
$mes = "<b>Reytingde!</b> <b>$user</b> size 10 ses verdi.Umumi Ses: <b>$ses</b>. Sizde Sesvermede ishtirak edin.\n";
mysql_query("Insert into zapiski set klu4='".$rnd."', who ='".$user."', idwho ='".$id."', message = '".$mes."', towhom = '".$login."', idtowhom = '".$nk."', time = '".$vaxt."', readd = '0', topic = 'Reyting10', date='".$vaxt."'");
}
$bal=$row['bal'];
$bal=$bal-20;
mysql_query ("Update users set bal='".$bal."' where id='".$id."'");
$limit=10;
mysql_query ("Update users set limit_ses=limit_ses+'".$limit."' where id='".$nk."'");
if ($ver=="wml")echo "<p align=\"center\">\n";
else echo "<div align=\"center\">\n";
echo $fsize1;
echo "Sizin 10 Ses $login uchun Qebul Olundu<br/>";
echo $fsize2;
}
break;
}
print $fsize1;
echo "<a href=\"users.php?ver=$ver&id=$id&ps=$ps&ref=$ref\">Userler</a><br/>\n";
echo "<a href=\"enter.php?ver=$ver&id=$id&ps=$ps&ref=$ref\">Dehliz</a><br/>";
echo $fsize2;
if ($ver=="wml")echo "</p></card></wml>";
else echo "</div></body></html>";
mysql_close ($link);
?>