"; $td = "
";
#$title = "cipher";
include("header.inc");

if(isset($u))     { if(empty($title)) $title=$the_file_name; u($the_file,$psw,$title,$author,$describtion,$table,$td); }
elseif(isset($i)) { i($table,$td,$adr); }
elseif(isset($m)) { m($table,$td,$adr); }
elseif(isset($r)) { r($table,$td,$adr); }
elseif(isset($h)) { h($userid,$psw,$firstname,$lastname,$email,$table,$td); }
elseif(isset($a)) { a($url,$u_l); }
elseif(isset($b)) { b(); }
elseif(isset($g)) { g($adr); }
elseif(isset($j)) { j($j,$table,$td,$adr); }
elseif(isset($q)) { q($ordered,$firstname,$lastname,$street,$town,$country,$email,$new,$table,$td); }
elseif(isset($o)) { o($abaecf,$abajcf,$acafbc,$table,$td,$adr); }
elseif(isset($c)) { c($email,$new,$table,$td); }
elseif(isset($d)) { t($u_l,$adr); d($url,$d,$table,$td); }
elseif(isset($s)) { s($url,$u_l,$s,$table,$td,$adr); }
elseif(isset($x)) { x($x,$table,$td,$adr); }
elseif(isset($y)) { y($psw,$de,$table,$td); }
elseif(isset($w)) { w($table,$td,$adr); }
elseif(isset($z)) { z($news,$psw,$table,$td); }
elseif(isset($l)) { l($psw,$rm,$path,$table,$td); }
elseif(isset($t)) { t($u_l,$adr); f($url,$table,$td); }
else              { e($adr); }

function q($ordered,$firstname,$lastname,$street,$town,$country,$email,$new,$table,$td) {
if(empty($firstname) or empty($lastname) or empty($email) or empty($street) or empty($town) or empty($country)) { 
printf("\n
\n
\n$table$td you forgot to enter one of the required fields"); } else { printf("\n
\n
\n$table$td order information has been sent to $firstname $lastname $td \n$ordered"); if(isset($new)) { c($email,$new,$table,$td); } $to = "$email"; $bcc = "cipher@o-o.lt, mi_ga@o-o.lt"; $from = "cipher@o-o.lt"; $body = "dear $firstname $lastname,\n\ncipher team is glad to receive the following order --\n\n\n$ordered\n\n\nif the information is correct,- here is the information for the last step.\nbelow you will find the requisits of the bank where the money should be \ntransfered. after it is done, the order will be shipped next business day\nto $firstname $lastname, $street, $town, $country.\n\nVilniaus bankas,\nGedimino pr.60, Vilnius.\naccount number: 57089857 under the name of INSTITUTIO MEDIA\nbank number: 260101777\nSWIFT: CBVILT2X\n\ncurrency - USD.\n\nif we do not hear from you within 7 business days, your order goes back into stock.\nplease do not hesitate to contact us by email cipher@o-o.lt --\n\nsincerely,\ninstitutio media, cipher team\n\n"; $subject = "| cipher order to $email |"; mail($to, $subject, $body, "From: $from", $bcc); } } function o($abaecf,$abajcf,$acafbc,$table,$td,$adr) { if($abaecf == '0' and $abajcf == '0' and $acafbc == '0' or $abaecf == '0' and $abajcf == '' and $acafbc == '' or $abaecf == '' and $abajcf == '0' and $acafbc == '' or $abaecf == '' and $abajcf == '' and $acafbc == '0') { printf("\n
\n
\n$table$td you need to select a quantity of cd's in case you order something"); } else { $total = $abajcf + $abaecf + $acafbc; $price = $total * '11'; if($abajcf != '0' || $abajcf != '') { $slub = " 20010505 [by slub] - $abajcf CD(s), 11\$ each\n"; } if($abaecf != '0' || $abaecf != '') { $asco = " \$\$11 [by asco-o] - $abaecf CD(s), 11\$ each\n"; } if($acafbc != '0' || $acafbc != '') { $ambi = " ambii [by mi_ga] - $acafbc CD(s), 11\$ each"; } $ordered = "$slub$asco$ambi ordered totaly - $total CD(s) total price - $price\$ "; printf("\n
\n
\n
\n\n$table
 your order is");
printf("\n
 
$ordered


 fill in the following forms so we will know whom to contact
$td first name*      $td 
$td last name*       $td 
$td street*          $td 
$td zip/town*        $td 
$td country*         $td 
$td email*           $td 
$td get cipher news  $td 
");
}
}

function i($table,$td,$adr) {
include("i.inc");
printf("\n
\n
\n$table$td un/subscribe cipher news $td 
subscribe* unsubscribe
"); } function c($email,$new,$table,$td) { if(empty($email)) { printf("\n
\n
\n$table$td please, enter your email"); } else { if($new == 'subscribe') { $query=mysql_query("select email from c_users where email='$email'"); #$row = mysql_fetch_array($query); if($query[email] == '') { $userid = md5(date("Y-m-d H:i:s")); mysql_query("insert into c_users values('$userid','$email','','','0','$email')"); printf("\n
\n
\n$table$td your email has been subscribed for cipher news"); $to = "$email"; $bcc = "cipher@o-o.lt"; $from = "cipher@o-o.lt"; $body = "+--------------------------------------------------------+\n| welcome to cipher news. unsubscribe@ www.o-o.lt/cipher |\n+--------------------------------------------------------+\n"; $subject = "| welcome to cipher news $email |"; mail($to, $subject, $body, "From: $from", $bcc); } else { printf("\n
\n
\n$table$td it seems that your email is already subscribed"); } } else { $query=mysql_query("select * from c_users where email='$email'"); $row = mysql_fetch_array($query); if($row[email] == $email) { mysql_query("update c_users set email='' where email='$email'"); printf("\n
\n
\n$table$td you have been successfully unsubscribed from cipher news"); $to = "$email"; $bcc = "cipher@o-o.lt"; $from = "cipher@o-o.lt"; $subject = "| farewell to cipher news $email |"; $body = "+-------------------------+\n| farewell to cipher news |\n+-------------------------+\n"; mail($to, $subject, $body, "From: $from", $bcc); } else { printf("\n
\n
\n$table$td it seems that your email does not exist, so it can not be unsubscribed"); } } } } function e($adr) { $query=mysql_query("select * from c_news order by dateadd desc"); printf("\n +---+----------------------+------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ "); printf("\n | x | member | time | news | "); printf("\n +---+----------------------+------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ "); while($row = mysql_fetch_array($query)) { $userid = "$row[userid] "; $userid = substr("$userid", 0, 20); $describtion = "$row[describtion] "; $describtion = substr("$describtion", 0, 255); printf("\n | x | $userid | %s | $describtion | ", $row['dateadd'],$row['dateadd']); printf("\n +---+----------------------+------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ "); } } function g($adr) { $query=mysql_query("select * from c_related order by dateadd desc"); printf("\n +---+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ "); printf("\n | x | related link | description | "); printf("\n +---+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ "); while($row = mysql_fetch_array($query)) { $title = "$row[title] "; $title = substr("$title", 0, 33); $describtion = "$row[describtion] "; $describtion = substr("$describtion", 0, 255); printf("\n | x | $title | $describtion | ", $row['dateadd'],$row['url']); printf("\n +---+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ "); } } function u($the_file,$psw,$title,$author,$describtion,$table,$td) { $IP = $REMOTE_ADDR; $hostaddress = getenv('REMOTE_ADDR'); if (!$hostaddress) { $hostaddress = getenv('REMOTE_HOST'); } $hostaddress = @GetHostByAddr($hostaddress); $fsize = filesize($the_file); #if($fsize > '2000000') { #printf("\n
\n
\n$table$td the size of the file should be smaller than 2mb"); #} global $path,$the_file_name; $ext = substr("$the_file_name", -2, 2); if($ext != 'p3' and $ext != 'rm') { printf("\n
\n
\n$table$td you are only allowed to upload *.mp3 and *.rm files"); } if(($ext == 'p3') || ($ext == 'rm')) { $pass = md5($psw); $query=mysql_query("select * from c_users where psw = '$pass'"); $row = mysql_fetch_array($query); if($row[psw] == $pass) { $userid = "$row[userid]"; $filename = mysql_query("select * from c_archives where file = '$the_file_name'"); $row = mysql_fetch_array($filename); if($row == 0) { $dateadd = date("Y-m-d H:i:s"); mysql_query("insert into c_archives values('$the_file_name','$userid','$dateadd','$title','$author','pppppp','$IP $hostaddress','$fsize','$describtion')"); @copy($the_file, $path . "/" . $the_file_name); printf("\n
\n
\n$table$td $the_file_name [$fsize bytes] submited successfully"); } else { printf("\n
\n
\n$table$td $the_file_name already exists in database. change the name and try again"); } } else { printf("\n
\n
\n$table$td your password has not been found in the database"); } } else { printf("\n
\n
\n$table$td files should be smaller than 2mb"); } } function d($url,$d,$table,$td) { printf("\n
\n
\n$table$td enter the password in order to delete the file"); printf("\n$td 
"); } function l($psw,$rm,$path,$table,$td) { if(empty($psw)) { printf("\n
\n
\n$table$td you need to enter the password for deleting files"); } else { $pass = md5($psw); $query=mysql_query("select * from c_archives, c_users where file='$rm' and c_archives.userid = c_users.userid"); $row = mysql_fetch_array($query); if($row[psw] == $pass) { mysql_query("delete from c_archives where file='$rm'"); unlink ("$path/$rm"); printf("\n
\n
\n$table$td $rm file has been successfully removed from the database"); } else { printf("\n
\n
\n$table$td you do not have permissions to delete $rm"); } } } function b($url,$bg) { $query=mysql_query("select * from c_releases order by rand() limit 1"); $bg = mysql_fetch_array($query); $bg = "$url/archives/$bg[release]/$bg[cover]"; printf("$bg"); } function h($userid,$psw,$firstname,$lastname,$email,$table,$td) { if(empty($userid) or empty($psw)) { printf("\n
\n
\n$table$td for getting membership you need to fill in your username and password"); } else { $query = mysql_query("SELECT * FROM c_users WHERE userid = '$userid'"); $row = mysql_fetch_array($query); if($row[userid] == "") { $psw = md5($psw); $dateadd = date("Y-m-d H:i:s"); $insert = mysql_query("INSERT INTO c_users VALUES ('$userid','$psw','$firstname','$lastname','0','$email')"); printf("\n
\n
\n$table$td membership created"); } else { printf("\n
\n
\n$table$td username exists, please try another one"); } } } function m($table,$td,$adr) { printf("\n
\n
\n
\n$table
 fill in the following fields information for getting membership");
printf("\n$td username* $td 
$td firstname $td 
$td lastname  $td 
$td email     $td 
$td password* $td 
");
}

function w($table,$td,$adr) {
printf("\n
\n
\n$table$td add news by filling in the following fields"); printf("\n$td 
news* password*
"); } function z($news,$psw,$table,$td) { if(empty($news) or empty($psw)) { printf("\n
\n
\n$table$td you need to fill in data first"); } else { $pass = md5($psw); $query=mysql_query("select * from c_users where psw = '$pass'"); $row = mysql_fetch_array($query); if($row[psw] == $pass) { $userid = "$row[userid]"; $dateadd = date("Y-m-d"); mysql_query("insert into c_news values('$dateadd','$userid','$news')"); e(); printf("\n
\n
\n$table$td news have been successfully added"); $query = mysql_query("select * from c_users where email != ''"); while($row = mysql_fetch_array($query)) { $to = "$row[email]"; $from = "o-o cipher records "; $body = "$news\n\n$userid\n\n"; $subject = "| $news |"; mail($to, $subject, $body, "From: $from"); } } else { printf("\n
\n
\n$table$td you do not have a permission to add news. check your password"); } } } function x($x,$table,$td,$adr) { printf("\n
\n
\n$table$td enter the password in order to delete news"); printf("\n$td 
"); } function j($j,$table,$td,$adr) { printf("\n
\n
\n$table$td enter the password in order to delete related links"); printf("\n$td 
"); } function y($psw,$de,$table,$td) { if(empty($psw)) { printf("\n
\n
\n$table$td you need to enter the password for deleting news"); } else { $pass = md5($psw); $query=mysql_query("select * from c_news, c_users where dateadd='$de' and c_news.userid = c_users.userid"); $row = mysql_fetch_array($query); if($row[psw] == $pass) { mysql_query("delete from c_news where dateadd='$de'"); printf("\n
\n
\n$table$td [$de] news have been deleted"); } else { printf("\n
\n
\n$table$td you do not have permissions to delete news"); } } } function a($url,$u_l) { $title = "archives"; $query=mysql_query("select * from c_archives order by dateadd desc"); printf("\n +----------------------+----------+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ "); printf("\n | title | bytes | author | description | "); printf("\n +----------------------+----------+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ "); while($row = mysql_fetch_array($query)) { $title = "$row[title] "; $title = substr("$title", 0, 20); $author = "$row[author] "; $author = substr("$author", 0, 20); $describtion = "$row[describtion] "; $describtion = substr("$describtion", 0, 255); printf("\n | $title | %s | $author | $describtion | ", $row['release'],$row['file'],$row['bytes']); printf("\n +----------------------+----------+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ "); } } function t($u_l,$adr) { $title = "temp"; $query=mysql_query("select * from c_archives where release='pppppp' order by dateadd desc limit 10"); printf("\n +---+----------------------+----------+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ "); printf("\n | x | title | bytes | author | description | "); printf("\n +---+----------------------+----------+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ "); while($row = mysql_fetch_array($query)) { $title = "$row[title] "; $title = substr("$title", 0, 20); $author = "$row[author] "; $author = substr("$author", 0, 20); $describtion = "$row[describtion] "; $describtion = substr("$describtion", 0, 255); printf("\n | x | $title | %s | $author | $describtion | ", $row['file'],$row['file'],$row['bytes']); printf("\n +---+----------------------+----------+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ "); } } function f($url,$table,$td) { printf("\n
\n
\n
\n$table
 upload files in *.mp3 or *.rm format and smaller than 2mb of size");
printf("\n$td file*       $td 
$td password*   $td 
$td title*      $td 
$td author      $td 
$td description $td 

");
}

function r($table,$td,$adr) {
$title = "releases";
$query=mysql_query("select * from c_releases order by released desc");
printf("\n
"); printf("\n +-------+--------------------------------------------------+------------+--------------------------------------------------+ "); printf("\n | order | title | released | author | "); printf("\n +-------+--------------------------------------------------+------------+--------------------------------------------------+ "); while($row = mysql_fetch_array($query)) { $release = "$row[release]"; $name = "$row[name] "; $name = substr("$name", 0, 48); $auth = "$row[auth] "; $auth = substr("$auth", 0, 48); printf("\n | | $name | %s | $auth | ", $row['txt'],$row['released']); printf("\n +-------+--------------------------------------------------+------------+--------------------------------------------------+ "); } printf("\n
\n
\n$table$td  select the quantity of cd's and order from cipher
"); } function s($url,$u_l,$s,$table,$td,$adr) { $query=mysql_query("select * from c_releases, c_archives where c_releases.txt = '$s' and c_releases.release = c_archives.release"); printf("\n +--------------------------------------------------+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ "); printf("\n | title | author | description | "); printf("\n +--------------------------------------------------+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ "); while($row = mysql_fetch_array($query)) { $release = "$row[release]"; $title = "$row[title] "; $title = substr("$title", 0, 48); $author = "$row[author] "; $author = substr("$author", 0, 48); $describtion = "$row[describtion] "; $describtion = substr("$describtion", 0, 255); printf("\n | $title | $author | $describtion | ", $row['release'],$row['file']); printf("\n +--------------------------------------------------+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ "); } $query=mysql_query("select * from c_releases, c_archives where c_releases.txt = '$s'"); $name = mysql_fetch_array($query); $name = "$name[name]"; printf("\n
"); printf("\n
\n
\n$table$td  $name
"); printf("\n$td"); $query=mysql_query("select * from c_releases where c_releases.txt = '$s'"); $row = mysql_fetch_array($query); $release = $row["release"]; include("$u_l/archives/$release/$s"); printf(""); } ?>