echo $lng[10][56]; ?> </b></td> </tr> <tr class="blue"> <td align="center" colspan="3"> <?php //requirements include "ajax.php"; $query = "select * from requirements where r_p_id=" . $r_p_id . " and r_parent_id=0 order by r_pos asc"; $rs = mysql_query($query) or die(mysql_error()); $cnt3 = 0; while ($row = mysql_fetch_array($rs)) { $cnt3++; $arr[] = $cnt3 . "|" . $row['r_id']; getTree2($row['r_id'], $cnt3, $arr); } ?> <script src="dhtmlxTree/codebase/dhtmlxcommon.js"></script> <script src="dhtmlxTree/codebase/dhtmlxtree.js"></script> <div id="treeboxbox_tree" style="width:620;height:<?php echo $cnt3 * 18.5 + 180; ?> "> <script> function myDragHandler(idFrom,idTo){ //if we return false then drag&drop be aborted //alert(idTo);
function getTree2($parentID, $cifri_otpred = "", &$arrXXX) { //echo $parentID."<br>"; $q = "select r_id, r_name from requirements where r_parent_id='" . $parentID . "' order by r_pos asc"; $rs = mysql_query($q) or die("..."); $broia4 = 1; while ($r = mysql_fetch_array($rs)) { $predai_natatak = $cifri_otpred . "." . $broia4; //echo ""; //echo "<br> ".$predai_natatak." ".$r[1]."<br>"; $arrXXX[] = $predai_natatak . "|" . $r[0]; $broia4++; getTree2($r[0], $predai_natatak, $arrXXX); } }