function Playtrack($href,$file,$Trackcnt){ ?> return 1; } function PlayPopuptrack($href,$file,$Trackcnt){ ?> return 1; } function get_between($input, $start, $end) { $substr = substr($input, strlen($start)+strpos($input, $start), (strlen($input) - strpos($input, $end))*(-1)); return $substr; } function right($string,$chars) { $vright = substr($string, strlen($string)-$chars,$chars); return $vright; } function left($string,$chars) { $vleft = substr($string, 0,$chars); return $vleft; } function mid($string,$chars,$from) { $vmid = substr($string, $from-1,$chars); return $vmid; } function parseWord($userDoc) { $fileHandle = fopen($userDoc, "r"); $line = @fread($fileHandle, filesize($userDoc)); $lines = explode(chr(0x0D),$line); $outtext = ""; foreach($lines as $thisline) { $pos = strpos($thisline, chr(0x00)); if (($pos !== FALSE)||(strlen($thisline)==0)) { } else { $outtext .= $thisline." "; } } $outtext = preg_replace("/[^a-zA-Z0-9\s\,\.\-\n\r\t@\/\_\(\)]/","",$outtext); return $outtext; } function check_input($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); return $data; } function curPageName() { return substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1); } $curPage=curPageName(); $curPageName=$curPage; //--> function getChecksum($DBID,$mysqldb,$mysqlip,$mysqlusr,$mysqlpwd,$status,$CHK) { // Connect to database $CHK=check_input($CHK); $DBID=check_input($DBID); $status=check_input($status); $sel_count=0; $mem_checksum="nonreg access"; $success=""; //validate DBID ; if ($status>0 && $status<5 && $DBID!="") { $con=mysql_connect($mysqlip,$mysqlusr,$mysqlpwd) or die ("Cannot connect to Danno's database"); mysql_select_db($mysqldb,$con); $result = mysql_query("SELECT * FROM members WHERE mem_num = '$DBID' ") or die ("Error: " . mysql_error()); while($row = mysql_fetch_array($result)) { $sel_count++ ; $mem_checksumDB=$row['mem_checksum'];$success=$row['mem_type'];$sel_email=$row['mem_email'];} mysql_close($con); } if ($status==1&&$success=="AD"&&$CHK==$mem_checksumDB) {$mem_checksum=$mem_checksumDB;} if ($status==2&&($success=="AD"||$success=="MB")&&$CHK==$mem_checksumDB) {$mem_checksum=$mem_checksumDB;} if ($status==3&&($success=="AD"||$success=="MB"||$success=="RG")&&$CHK==$mem_checksumDB) {$mem_checksum=$mem_checksumDB;} if ($status==4&&($success=="NV")) {$mem_checksum=$mem_checksumDB;} if ($mem_checksum=="nonreg access") {$mem_checksum=generatePassword(12,4);} return $mem_checksum ; } function getChecksumAD($DBID,$mysqldb,$mysqlip,$mysqlusr,$mysqlpwd,$status) { // Connect to database $DBID=check_input($DBID); $status=check_input($status); $sel_count=0; $mem_checksum="nonreg access"; $success=""; //validate DBID ; if ($status>0 && $status<5 && $DBID!="") { $con=mysql_connect($mysqlip,$mysqlusr,$mysqlpwd) or die ("Cannot connect to Danno's database"); mysql_select_db($mysqldb,$con); $result = mysql_query("SELECT * FROM members WHERE mem_num = '$DBID' ") or die ("Error: " . mysql_error()); while($row = mysql_fetch_array($result)) { $sel_count++ ; $mem_checksumDB=$row['mem_checksum'];$success=$row['mem_type'];$sel_email=$row['mem_email'];} mysql_close($con); } if ($status==1&&$success=="AD") {$mem_checksum=$mem_checksumDB;} if ($status==2&&($success=="AD"||$success=="MB")) {$mem_checksum=$mem_checksumDB;} if ($status==3&&($success=="AD"||$success=="MB"||$success=="RG")) {$mem_checksum=$mem_checksumDB;} if ($mem_checksum=="nonreg access") {$mem_checksum=generatePassword(12,4);} return $mem_checksum ; } function generatePassword($length, $strength) { $vowels = 'aeuy'; $consonants = 'bdghjmnpqrstvz'; if ($strength & 1) { $consonants .= 'BDGHJLMNPQRSTVWXZ'; } if ($strength & 2) { $vowels .= "AEUY"; } if ($strength & 4) { $consonants .= '23456789'; } if ($strength & 8) { $consonants .= 'zZxX'; } $password = ''; $alt = time() % 2; for ($i = 0; $i < $length; $i++) { if ($alt == 1) { $password .= $consonants[(rand() % strlen($consonants))]; $alt = 0; } else { $password .= $vowels[(rand() % strlen($vowels))]; $alt = 1; } } return $password; } function DispRow($HRef,$P3,$P4,$P5,$P8,$W,$C) { $hreffile=$HRef ; $parts[3]=$P3;$parts[4]=$P4;$parts[5]=$P5;$parts[8]=$P8; ?>