".mysql_error()); $row = mysql_fetch_assoc($res); if($column=="0") return $row; return $row[$column]; } // MySQL Fetch Assoc function fetchAssoc($sql) { global $link; $res = mysql_query ($sql,$link); if(!$res) die("Specified query failed, MySQL returned:
".mysql_error()); while($row=mysql_fetch_assoc($res)) $arr[ ]=$row; return $arr; } // MySQL Fetch Num function fetchNum($sql) { global $link; $res = mysql_query ($sql,$link); if(!$res) die("Specified query failed, MySQL returned:
".mysql_error()); $row = mysql_num_rows($res); return $row; } // MySQL Insert Record function recInsert($table,$keys,$values) { global $link; $sql = "INSERT INTO `$table` ($keys) VALUES ($values);"; $res = mysql_query ($sql,$link); if(!$res) die("Specified query failed, MySQL returned:
".mysql_error()); return $res; } // MySQL Update Record function recUpdate($table,$set,$where) { global $link; $sql = "UPDATE `$table` SET $set WHERE $where;"; $res = mysql_query ($sql,$link); if(!$res) die("Specified query failed, MySQL returned:
".mysql_error()); return $res; } // MySQL Delete Record function recDelete($table,$where) { global $link; $sql = "DELETE FROM `$table` WHERE $where;"; $res = mysql_query ($sql,$link); if(!$res) die("Specified query failed, MySQL returned:
".mysql_error()); return $res; } // Format Number function function FormatNumber($number) { if(strlen($number)==1) return "00000".$number; if(strlen($number)==2) return "0000".$number; if(strlen($number)==3) return "000".$number; if(strlen($number)==4) return "00".$number; if(strlen($number)==5) return "0".$number; } // Check Login function CheckLogin() { if($_SESSION['name']!="yes") die('You are not logged in system, please login to gain access.'); } // Check Login function SetAccess($trig) { $parts = explode("|",$_SESSION['level']); if($parts[$trig]!=$trig) die('Your user level doesnt allow you to access this area.'); } // Random Integer function RandomInt($size) { $feed = "0123456789abcdefghijklmnopqrstuvwxyz"; for ($i=0; $i < $size; $i++) { $rand_str .= substr($feed, rand(0, strlen($feed)-1), 1); } return $rand_str; } // Get Browser function GetBrowser() { $browser = array ("MSIE","OPERA","MOZILLA","NETSCAPE","FIREFOX","SAFARI"); $info[browser] = "OTHER"; foreach ($browser as $parent) { if ( ($s = strpos(strtoupper($_SERVER['HTTP_USER_AGENT']), $parent)) !== FALSE ) { $f = $s + strlen($parent); $version = substr($_SERVER['HTTP_USER_AGENT'], $f, 5); $version = preg_replace('/[^0-9,.]/','',$version); $info[browser] = $parent; $info[version] = $version; } } return $info; } // Convert Money to Points function mn2tp($in) { global $curr_mode; if($curr_mode=='points') $in=round(str_replace(',','',$in)).' pts'; if($curr_mode=='cents') $in=$in.''; return $in; } function turl($title) { $title = str_replace("#","",$title); $title = str_replace("%","",$title); $title = str_replace(" + ","-",$title); $title = str_replace(".","",$title); $title = str_replace("!","",$title); $title = str_replace("- ","",$title); $title = str_replace(" ","-",$title); $title = str_replace("'","",$title); $title = str_replace("`","",$title); $title = str_replace("(","",$title); $title = str_replace(")","",$title); return mb_strtolower($title,'UTF-8'); } function calcship($grams,$zone) { $total=0; // Zone 1 if($zone==1) { if($grams>0 ) $total=2.68; if($grams>20 ) $total=2.99; if($grams>50 ) $total=3.29; if($grams>100 ) $total=3.61; if($grams>200 ) $total=3.81; if($grams>350 ) $total=4.05; if($grams>500 ) $total=4.20; if($grams>750 ) $total=4.35; if($grams>1000) $total=4.55; if($grams>1500) $total=4.75; if($grams>2000) { $overs=ceil(($grams-2000)/500); $total=$total+($overs*0.20); } } // Zone 2 if($zone==2) { if($grams>0 ) $total=3.79; if($grams>20 ) $total=4.30; if($grams>50 ) $total=4.85; if($grams>100 ) $total=5.65; if($grams>200 ) $total=6.70; if($grams>350 ) $total=7.85; if($grams>500 ) $total=8.95; if($grams>750 ) $total=10.40; if($grams>1000) $total=12.70; if($grams>1500) $total=15.10; if($grams>2000) { $overs=ceil(($grams-2000)/500); $total=$total+($overs*2.36); } } // Zone 3 if($zone==3) { if($grams>0 ) $total=3.79; if($grams>20 ) $total=4.30; if($grams>50 ) $total=5.00; if($grams>100 ) $total=5.85; if($grams>200 ) $total=7.15; if($grams>350 ) $total=8.65; if($grams>500 ) $total=10.95; if($grams>750 ) $total=14.00; if($grams>1000) $total=20.05; if($grams>1500) $total=25.50; if($grams>2000) { $overs=ceil(($grams-2000)/500); $total=$total+($overs*4.94); } } return round($total,2); } function is_chrome() { return(eregi("chrome", $_SERVER['HTTP_USER_AGENT'])); } function ae_detect_ie() { if (isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)) return true; else return false; } ?> A Balkan Tale - Control v3.0



Welcome!
Web Platform Version v3.0








Login Error: Wrong username or password!"; else echo"
"; ?>
Username:
Password: