//some code
return $result;
function func($data){
//some code
return $result;
}
//несусветная хрень по добычи $data по конкретному пользователю (а их много!)
//some code
return $result;
function echodata($funclist, $userdata, $jslist = array()){
//userdata [0 => uid, 1 => login, 2 => access, 3 => ip]
$uid = $userdata[0];
$login = $userdata[1];
$access = $userdata[2];
$ip = $userdata[3];
$echo = "";
for ($i = 0; $i <= count ($funclist) - 1; $i++){
require_once __DIR__."/server-scripts".$funclist[$i];
$sid = get_func_id($funclist[$i]);
$filefuncs = get_script_func($sid);
$data = array();
for ($ii = 0; $ii <= count($filefuncs) - 1;$ii++){
ob_start();
eval(str_replace("@", "$", $filefuncs[$ii].";"));
$result = ob_end_flush();
echo str_replace("@", "$", $filefuncs[$ii].";");
array_push($data, $result);
}
for ($ii = 0; $ii <= count($data) - 1; $ii++){
$echo .= "<div align='center'>".$data[$ii]."</div>";
}
}
for ($i = 0; $i <= count($jslist) - 1; $i++){
$p = "<script>";
foreach (file(__DIR__."/user-data/id_".$uid."/2.js", FILE_SKIP_EMPTY_LINES) as $pp){
$p .= $pp;
}
$p .= "</script>";
$echo .= $p;
}
$echo .= "<div name='userdivname' id='userdivid' align='center'></div>";
return $echo;
}