echo function write_players2 team PHP_EOL заполнение списка замены ech

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
echo 'function write_players2(team)'.PHP_EOL;//заполнение списка замены
echo '{'.PHP_EOL;
echo 'document.getElementById(\'th_2\').innerHTML=\'замена\';'.PHP_EOL;
echo 'var s;'.PHP_EOL;
echo 'if (team==id_team1)'.PHP_EOL;
echo 'for (i=1;i<=count_t1_out;i++)'.PHP_EOL;
echo 'if (document.getElementById(\'player1\').value!=numbers_t1_out[i]) s=s+\'<option \'+\'value="\'+numbers_t1_out[i]+\'">\'+players_t1_out[i]+\'</option>\';'.PHP_EOL;
echo 'if (team==id_team2)'.PHP_EOL;
echo 'for (i=1;i<=count_t2_out;i++)'.PHP_EOL;
echo 'if (document.getElementById(\'player1\').value!=numbers_t2_out[i]) s=s+\'<option \'+\'value="\'+numbers_t2_out[i]+\'">\'+players_t2_out[i]+\'</option>\';'.PHP_EOL;
echo 'document.getElementById(\'td_2\').innerHTML=\'<select name="player2" id="player2">\'+s+\'</select>\';'.PHP_EOL;
echo '}'.PHP_EOL.PHP_EOL;