'; if($step4['left']) $s.='
'; if($step4['right']) $s.='
'; if(!$step4['right']) $s.='
'; if(!$step3['right']) $s.='
'; if($step3['right']) {$s.='
';} if($step3['left']) {$s.='
';} if(!$step3['left']) {$s.='
';} if(!$step2['right']) {$s.='
';} if($step2['right']) {$s.='
';} if($step2['left']) $s.='
'; if(!$step2['left']) $s.='
'; if(!$step1['right']){$s.='
';} if($step1['right']) {$s.='
';} if($step1['left']) {$s.='
Этаж 1 - Канализация
';} if(!$step1['left']) {$s.='
Этаж 1 - Канализация
';} ///////stenq//////// if(!$step4['fwd']) $s.='
'; if(!$step3['fwd']) $s.='
'; if(!$step2['fwd'])$s.='
'; if(!$step1['fwd']) $s.='
'; include"podzem_mod.php"; return $s; } function next_step($location, $vector) { global $rhar; $row=intval(substr($location, 0, 1)); $col=intval(substr($location, 1)); $cell=array(); // fwd $c=$col;$r=$row; if($vector==90) {$c=$col+1;} elseif($vector==180) {$r=$row-1;} elseif($vector==270) {$c=$col-1;} else {$r=$row+1;} $cell['fwd']=$r.$c; if($r>9 or $r<0 or $c>9 or $c<0 or !in_array($cell['fwd'], $rhar[$location])) {$cell['fwd']=false;} // left $c=$col;$r=$row; if($vector==90) {$r=$row+1;} elseif($vector==180) {$c=$col+1;} elseif($vector==270) {$r=$row-1;} else {$c=$col-1;} $cell['left']=$r.$c; if($r>9 or $r<0 or $c>9 or $c<0 or !in_array($cell['left'], $rhar[$location])) {$cell['left']=false;} // right $c=$col;$r=$row; if($vector==90) {$r=$row-1;} elseif($vector==180) {$c=$col-1;} elseif($vector==270) {$r=$row+1;} else {$c=$col+1;} $cell['right']=$r.$c; if($r>9 or $r<0 or $c>9 or $c<0 or !in_array($cell['right'], $rhar[$location])) {$cell['right']=false;} // back $c=$col;$r=$row; if($vector==90) {$c=$col-1;} elseif($vector==180) {$r=$row+1;} elseif($vector==270) {$c=$col+1;} else {$r=$row-1;} $cell['back']=$r.$c; if($r>9 or $r<0 or $c>9 or $c<0 or !in_array($cell['back'], $rhar[$location])) {$cell['back']=false;} return $cell; } ////////////// }