[Help] Admin panel error

banned

Active Member
Joined
Jan 4, 2009
Messages
616
Reaction score
71
дава ми ето тая грешka в админпанела на дамиан сервера е сеасон 3 еписоде 1 има само един датабасе и тои е МуОнлине и сервера грешkaката е

Fatal error: Call to undefined function adonewconnection() in D:\xampp\htdocs\adminpanel\includes\damian.php on line 4

някакви идеи ?
 
Има грешка в function -> непозната е, ВОДИ си изводи сам!
 
<?
include_once("includes/adodb/adodb.inc.php");
if (!isset($DONT_LOAD_DB)) {
$db = &ADONewConnection('odbc');
$db->cacheSecs = 0; # cache 0 hours
$result = $db->Connect($db_name,$db_user ,$db_pass);
if (!$db) die("Connection failed");
$db->SetFetchMode(ADODB_FETCH_ASSOC);

}

function jump($location)
{
header('Location: '.$location.'');
}

function edit_character($post_character,$post_level,$post_resets,$post_zen,$post_gm,$post_strength,$post_agility,$post_vitality,$post_energy,$post_class)
{ require("config.php");
$sql_name_check = mssql_query("SELECT Name FROM Character WHERE Name='$post_character'");
$name_check = mssql_num_rows($sql_name_check);
$get_account = mssql_query("SELECT accountid from character where name='$post_character'");
$get_account_done = mssql_fetch_row($get_account);
$sql_online_check = mssql_query("SELECT ConnectStat FROM MEMB_STAT WHERE memb___id='$get_account_done[0]'");
$row2 = mssql_fetch_row($sql_online_check);
if (empty($post_character) || empty($post_level) || empty($post_zen) || empty($post_strength) || empty($post_agility) || empty($post_vitality) || empty($post_energy)){
echo "<img src=./images/warning.gif> Error: Some Fields Were Left Blank! <br><a href='javascript:history.go(-1)'>Go Back.</a>";}
elseif ($name_check <= 0){ echo "<img src=./images/warning.gif> Error: Character $post_character Doesn't Exist! <br><a href='javascript:history.go(-1)'>Go Back.</a>"; }
elseif ($row2[0] != 0){ echo "<img src=./images/warning.gif> Error: Character $post_character Must Be Logged Off! <br><a href='javascript:history.go(-1)'>Go Back.</a>"; }
elseif (ereg('[^0-9]', $post_level)){echo "<img src=./images/warning.gif> Error: Please Use Only Numbers At Level! <br><a href='javascript:history.go(-1)'>Go Back.</a>"; }
elseif (ereg('[^0-9]', $post_resets)){echo "<img src=./images/warning.gif> Error: Please Use Only Numbers At Resets! <br><a href='javascript:history.go(-1)'>Go Back.</a>"; }
elseif (ereg('[^0-9]', $post_zen)){echo "<img src=./images/warning.gif> Error: Please Use Only Numbers At Zen! <br><a href='javascript:history.go(-1)'>Go Back.</a>"; }
elseif (ereg('[^0-9]', $post_strength)){echo "<img src=./images/warning.gif> Error: Please Use Only Numbers At Strength! <br><a href='javascript:history.go(-1)'>Go Back.</a>"; }
elseif (ereg('[^0-9]', $post_agility)){echo "<img src=./images/warning.gif> Error: Please Use Only Numbers At Agiltiy! <br><a href='javascript:history.go(-1)'>Go Back.</a>"; }
elseif (ereg('[^0-9]', $post_vitality)){echo "<img src=./images/warning.gif> Error: Please Use Only Numbers At Vitality! <br><a href='javascript:history.go(-1)'>Go Back.</a>"; }
elseif (ereg('[^0-9]', $post_energy)){echo "<img src=./images/warning.gif> Error: Please Use Only Numbers At Energy! <br><a href='javascript:history.go(-1)'>Go Back.</a>"; }
else{
$execute_sql_script = mssql_query("Update character set [clevel]='$post_level',[resets]='$post_resets',[money]='$post_zen',[ctlcode]='$post_gm',[strength]='$post_strength',[dexterity]='$post_agility',[vitality]='$post_vitality',[energy]='$post_energy',[class]='$post_class' where name='$post_character'");
echo "<img src=./images/ok.gif> Character $post_character SuccessFully Edited!";


}


}



function edit_account($post_account,$post_pwd,$post_whpw,$post_idcode,$post_mode,$post_email,$post_squestion,$post_sanswer)
{
require("config.php");
$sql_account_check = mssql_query("SELECT memb___id FROM memb_info WHERE memb___id='$post_account'");
$account_check = mssql_num_rows($sql_account_check);
$sql_online_check = mssql_query("SELECT ConnectStat FROM MEMB_STAT WHERE memb___id='$post_account'");
$row2 = mssql_fetch_row($sql_online_check);
if (empty($post_account) || empty($post_pwd) || empty($post_idcode) || empty($post_email) || empty($post_squestion) || empty($post_sanswer)){echo "<img src=./images/warning.gif> Error: Some Fields Were Left Blank! <br><a href='javascript:history.go(-1)'>Go Back.</a>";}
elseif ($account_check <= 0){echo "<img src=./images/warning.gif> Error: Account $post_account Doesn't Exist! <br><a href='javascript:history.go(-1)'>Go Back.</a>"; }
elseif ($row2[0] != 0){echo "<img src=./images/warning.gif> Error: Account $post_account Must Be Logged Off! <br><a href='javascript:history.go(-1)'>Go Back.</a>"; }
elseif (ereg('[^0-9]', $post_idcode)){echo "<img src=./images/warning.gif> Error: Please Use Only Numbers At Personal ID! <br><a href='javascript:history.go(-1)'>Go Back.</a>"; }
else{
if($muweb['md5']==1){$sql_script_edit_account = "Update memb_info set [sno__numb]='$post_idcode',[memb__pwd2]='$post_pwd',[memb__pwd]=[dbo].[fn_md5]('$post_pwd','$post_account'),[bloc_code]='$post_mode',[mail_addr]='$post_email',[fpas_ques]='$post_squestion',[fpas_answ]='$post_sanswer' where memb___id='$post_account'";}
elseif($muweb['md5']==0){
$sql_script_edit_account = "Update memb_info set [sno__numb]='$post_idcode',[memb__pwd]='$post_pwd',[memb__pwd2]='$post_pwd',[bloc_code]='$post_mode',[mail_addr]='$post_email',[fpas_ques]='$post_squestion',[fpas_answ]='$post_sanswer' where memb___id='$post_account'";}
$updatewhpw =" update warehouse set pw='$post_whpw' where accountid='$post_account'";
$execute_sql_script = mssql_query($sql_script_edit_account);
$execute_updatewhpw = mssql_query($updatewhpw);
echo "<img src=./images/ok.gif> Account $post_account SuccessFully Edited!";

}


}

function modules(){
if(isset($_GET['admin'])){
$op = $_GET['admin'];
$g = chr(92);
$op = str_replace($g , "", $_GET['admin']);
$op = str_replace("/" , "", $op);
$op = str_replace("%00" , "\0", $op);
$op = str_replace("?" , "", $op);
$op = htmlspecialchars($op);
if (is_file("modules/".$op.".php")) {
include("modules/".$op.".php");

}
}
}



function items_names($filename='includes/items/item.txt') {

$handle = fopen("$filename", "r");

while (!feof($handle)) {
$userinfo = fscanf($handle, "%s\t%s\t%s\t%s\t%s\t%s\t%[a-zA-Z0-9\" ]\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n");
if ($userinfo) {
list ($index,$x,$y,$a,$sirial,$drop,$name,$level,$DamMin,$DamMax,$Speed,$Dur,$MagDur,$str,$agi,$dw,$bk,$elf,$mg) = $userinfo;
$index = preg_replace('/[^0-9]/', '', $index);
//if (!preg_match("/\/\//i", $index)) { continue; }
if (!$name) { $loop = ($index * 32); } else {

$add = $loop + $index;

if ($add >= 256) { $add = $add; }
//$hex = strtoupper(str_pad(dechex($add), 2 , "0", STR_PAD_LEFT));
$hex = strtoupper(sprintf("%02x",$add));
$name = preg_replace('/[^a-zA-Z0-9\ \-]/', '', $name);
$item[$hex] = array('name' => $name, 'x' => $x, 'y'=>$y,
'level' => $level, 'DamMin' => $DamMin,'DamMax' => $DamMax, 'str' => $str,
'agi' =>$agi,'dw' =>$dw,'elf' =>$elf,
'bk' =>$bk,'mg' =>$mg);
}
}

}
fclose($handle);
return $item;
}

function item_cut($string, $begin, $shortlength, $number=1)
{
$length = strlen($string);
if($length > ($shortlength * $number))
{
$end = $begin + $shortlength;
$flag = 0;
for($x=$begin; $x < $end; $x++)
{
if(@ord($string[$x]) <= 120) { $flag++; }
}
if($flag%2==1)
{
$end++;
}
$first_part = substr($string, 0, $end);
$last_part = substr($string, $end);
$newstring = $first_part. " " .$last_part;
$number++;

return item_cut($newstring, $end+1, $shortlength, $number);

}
else
{
return $string;

}
}

function left ($str, $howManyCharsFromLeft)
{
return substr ($str, 0, $howManyCharsFromLeft);
}

function right ($str, $howManyCharsFromRight)
{
$strLen = strlen ($str);
return substr ($str, $strLen - $howManyCharsFromRight, $strLen);
}

function mid ($str, $start, $howManyCharsToRetrieve = 0)
{
$start--;
if ($howManyCharsToRetrieve === 0)
$howManyCharsToRetrieve = strlen ($str) - $start;

return substr ($str, $start, $howManyCharsToRetrieve);
}
function exc_weapon($ee) {

if ($ee >= 32) { $exc_option .= "[ExcDmg+10%]/[IncHP+4%]<br>"; $ee=$ee-32; }
if ($ee >= 16) { $exc_option .= "[IncDmg+level/20]/[IncMana4%]<br>"; $ee=$ee-16; }
if ($ee >= 8) { $exc_option .= "[IncDmg+2%]/[DmgDec+4%]</option><br>"; $ee=$ee-8; }
if ($ee >= 4) { $exc_option .= "[IncSpeed +7]/[Reflect+5%]<br>"; $ee=$ee-4; }
if ($ee >= 2) { $exc_option .= "[IncLife+life/8][DefSucRate+10%]<br>"; $ee=$ee-2; }
if ($ee >= 1) { $exc_option .= "[IncMana+mana/8][IncZen+40%]<br>"; $ee=$ee-1; }

return $exc_option;
}


function optioner($IOP,$EOP) {
$bb = hexdec($IOP);

if ($EOP >= 64) { $opt = "+16"; $EOP=$EOP-64;
$io = 4; }
if ($EOP >= 1) { $option2 .= " EXC ITEM " . exc_weapon($EOP); }
if ($bb >= 128) {
$bb =$bb-128;
$skill = 'on';
}
if ($bb > 0) {
$bb = $bb/8;
$level = intval($bb)==0 ? "+0" : "+".intval($bb);
$levelout = intval($bb)==0 ? '0' : intval($bb);
$bb = round(($bb-intval($bb))*8);
if ($bb >= 4) {
$bb = $bb-4; //luck
$luck = 'on';
}
}
if ($bb == 1 ) {
$opt = $io != 4 ? "+4" : "+20";
$io = $io != 4 ? 1 : 5; }
elseif ($bb == 2) {
$opt = $io != 4 ? "+8" : "+24";
$io = $io != 4 ? 2 :6; }
elseif ($bb == 3) {
$opt = $io != 4 ? "+12" : "+28";
$io = $io != 4 ? 3: 7; }
$option=$level . $opt. ($luck == 'on' ? "+luck" : '') . ($skill == 'on' ? "+skill" : '');
$options = array($option,$option2,$levelout,$io,$skill,$luck,$EOP);
return $options;
}



function logout()
{
if(isset($_POST['logout'])){

unset($_SESSION["username"]);
unset($_SESSION["password"]);

}
}

function login()
{
require("config.php");
if(isset($_POST['username'])){

$username=stripslashes($_POST['username']);
$password=stripslashes($_POST['password']);
if(empty($username)){
echo "<center><table width=170 border=0 cellspacing=0 cellpadding=0><br>
<font alignt=center color=red face=Verdana size=3 style=font-size: 10pt><b>Моля въведете акаунт.</font>
</table></center>";
}
elseif(empty($password)){
echo "<center><table width=170 border=0 cellspacing=0 cellpadding=0><br>
<font alignt=center color=red size=3 face=Verdana style=font-size: 10pt><b>Моля въведете парола.</font>
</table></center>";
}


else{





if($username!=$login_account){
echo "<center><table width=170 border=0 cellspacing=0 cellpadding=0><br>
<font alignt=center color=red size=3 face=Verdana style=font-size: 10pt><b>Невалиден акаунт.</font>
</table></center>";}
elseif($password!=$login_password){
echo "<center><table width=170 border=0 cellspacing=0 cellpadding=0><br>
<font alignt=center color=red size=3 face=Verdana style=font-size: 10pt><b>Невалидна парола.</font>
</table></center>";}

elseif($username==$login_account and $password==$login_password){

$_SESSION['username'] = $username;
$_SESSION['password'] = $password;





}
}
}
}
?>
 
Гледам, че грешката идва от тук: $db = &ADONewConnection('odbc');..... poogledai!!