- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
<script type="text/javascript">
var currentLeveler = 0;
var currentPrefix = 'povorot_';
var currentPart = 0;
var partsCount = [];
var oldPart, oldLeveler;
languagePrefix = "<?php echo $lang; ?>";
partsCount[0] = 5;
partsCount[1] = 4;
partsCount[2] = 3;
var levelersInfo = [[], [], []];
var levelerParts = [[], [], []];
var content = [];
<?php
while($row = mysql_fetch_array($tmp)){
$content[$row['block_id']] = $row['cont'];
echo "content[\"" .$row['block_id']. "\"] = '".$row['cont']."';\n";
}
for($j = 0; $j < 3; $j++)
for($i = 0; $i < 5; $i++){
$val1 = $content[$lang."_tech_leveler_info_".$j.$i];
$val2 = $content[$lang."_tech_part_info_".$j.$i];
echo "levelersInfo[".$j."].push('".$val1."');";
echo "levelerParts[".$j."].push('".$val2."');";
}
?>
$(document).ready(function () {
$.each($(".changeable"), function () {
$(this).html(content[$(this).attr("id")]);
});
});
</script>
Формируем js код, через PHP на основе данных из базы данных... или в жопку аякс