243 lines
12 KiB
PHP
243 lines
12 KiB
PHP
<?php
|
|
if (!empty($_SESSION['site301_edit']))
|
|
{
|
|
?>
|
|
|
|
|
|
<?php
|
|
// pobiera parametry z url
|
|
if (!empty($_GET['param']))
|
|
{
|
|
$paramArray = explode(',',$_GET['param']);
|
|
$getDevID = $paramArray[0];
|
|
$getRecID = $paramArray[1];
|
|
unset($paramArray);
|
|
if ($getRecID>0) $tbArray = sqlGetResAsArray("select WWD_ID,WWD_NAME from seg_water_drainage where WWD_ID=".$getRecID);
|
|
}
|
|
?>
|
|
|
|
|
|
<style>
|
|
|
|
.tree,
|
|
.tree ul {
|
|
margin:0 0 0 1em; /* indentation */
|
|
padding:0;
|
|
list-style:none;
|
|
color:#369;
|
|
position:relative;
|
|
}
|
|
|
|
.tree ul {margin-left:.5em} /* (indentation/2) */
|
|
|
|
.tree:before,
|
|
.tree ul:before {
|
|
content:"";
|
|
display:block;
|
|
width:0;
|
|
position:absolute;
|
|
top:0;
|
|
bottom:0;
|
|
left:0;
|
|
border-left:1px solid;
|
|
}
|
|
|
|
.tree li {
|
|
margin:0;
|
|
padding:0 1.5em; /* indentation + .5em */
|
|
line-height:2em; /* default list item's `line-height` */
|
|
font-weight:bold;
|
|
position:relative;
|
|
}
|
|
|
|
.tree li:before {
|
|
content:"";
|
|
display:block;
|
|
width:10px; /* same with indentation */
|
|
height:0;
|
|
border-top:1px solid;
|
|
margin-top:-1px; /* border top width */
|
|
position:absolute;
|
|
top:1em; /* (line-height/2) */
|
|
left:0;
|
|
}
|
|
|
|
.tree li:last-child:before {
|
|
background:white; /* same with body background */
|
|
height:auto;
|
|
top:1em; /* (line-height/2) */
|
|
bottom:0;
|
|
|
|
}
|
|
</style>
|
|
|
|
|
|
<div class="tag100">
|
|
<FORM ACTION="?pg=site301inf&dev=<?php echo $getDevID; ?>" METHOD="POST">
|
|
<div class="head_tag"><?php echo $lab_Tag_site301_012 ;?></div>
|
|
<div class="tag">
|
|
<br/>
|
|
|
|
<?php
|
|
$treeLevel_01 = sqlGetResAsArray("select WWD_ID,WWD_NAME from seg_water_drainage where WWD_PARENT_ID is null order by WWD_NAME");
|
|
?>
|
|
|
|
<p style="font-weight: bold;"><?php echo $lab_Field_site807_014; ?></p>
|
|
<ul class="tree">
|
|
<?php
|
|
for ($i=0; $i<count($treeLevel_01); $i++)
|
|
{
|
|
echo"<li>";
|
|
|
|
echo "<input type='radio' name='inCheck' value='".$treeLevel_01[$i]['WWD_ID']."'"; if ($treeLevel_01[$i]['WWD_ID']==$getRecID) echo "checked"; echo"> ".$treeLevel_01[$i]['WWD_NAME'];
|
|
|
|
//1
|
|
// =========================================================================================================================================================
|
|
unset($tb); $tb = sqlGetResAsArray("select WWD_ID,WWD_NAME from seg_water_drainage where WWD_PARENT_ID=".$treeLevel_01[$i]['WWD_ID']." order by WWD_NAME");
|
|
if (count($tb)>0)
|
|
{
|
|
echo "<ul>";
|
|
for($j=0; $j<count($tb); $j++)
|
|
{
|
|
echo"<li>";
|
|
echo "<input type='radio' name='inCheck' value='".$tb[$j]['WWD_ID']."'"; if ($tb[$j]['WWD_ID']==$getRecID) echo "checked"; echo"> ".$tb[$j]['WWD_NAME'];
|
|
|
|
//2
|
|
// =========================================================================================================================================================
|
|
unset($tb2); $tb2 = sqlGetResAsArray("select WWD_ID,WWD_NAME from seg_water_drainage where WWD_PARENT_ID=".$tb[$j]['WWD_ID']." order by WWD_NAME");
|
|
if (count($tb2)>0)
|
|
{
|
|
echo "<ul>";
|
|
for($j2=0; $j2<count($tb2); $j2++)
|
|
{
|
|
echo"<li>";
|
|
echo "<input type='radio' name='inCheck' value='".$tb2[$j2]['WWD_ID']."'"; if ($tb2[$j2]['WWD_ID']==$getRecID) echo "checked"; echo"> ".$tb2[$j2]['WWD_NAME'];
|
|
|
|
//3
|
|
// =========================================================================================================================================================
|
|
unset($tb3); $tb3 = sqlGetResAsArray("select WWD_ID,WWD_NAME from seg_water_drainage where WWD_PARENT_ID=".$tb2[$j2]['WWD_ID']." order by WWD_NAME");
|
|
if (count($tb3)>0)
|
|
{
|
|
echo "<ul>";
|
|
for($j3=0; $j3<count($tb3); $j3++)
|
|
{
|
|
echo"<li>";
|
|
echo "<input type='radio' name='inCheck' value='".$tb3[$j3]['WWD_ID']."'"; if ($tb3[$j3]['WWD_ID']==$getRecID) echo "checked"; echo"> ".$tb3[$j3]['WWD_NAME'];
|
|
|
|
//4
|
|
// =========================================================================================================================================================
|
|
unset($tb4); $tb4 = sqlGetResAsArray("select WWD_ID,WWD_NAME from seg_water_drainage where WWD_PARENT_ID=".$tb3[$j3]['WWD_ID']." order by WWD_NAME");
|
|
if (count($tb4)>0)
|
|
{
|
|
echo "<ul>";
|
|
for($j4=0; $j4<count($tb4); $j4++)
|
|
{
|
|
echo"<li>";
|
|
echo "<input type='radio' name='inCheck' value='".$tb4[$j4]['WWD_ID']."'"; if ($tb4[$j4]['WWD_ID']==$getRecID) echo "checked"; echo"> ".$tb4[$j4]['WWD_NAME'];
|
|
|
|
//5
|
|
// =========================================================================================================================================================
|
|
unset($tb5); $tb5 = sqlGetResAsArray("select WWD_ID,WWD_NAME from seg_water_drainage where WWD_PARENT_ID=".$tb4[$j4]['WWD_ID']." order by WWD_NAME");
|
|
if (count($tb5)>0)
|
|
{
|
|
echo "<ul>";
|
|
for($j5=0; $j5<count($tb5); $j5++)
|
|
{
|
|
echo"<li>";
|
|
echo "<input type='radio' name='inCheck' value='".$tb5[$j5]['WWD_ID']."'"; if ($tb5[$j5]['WWD_ID']==$getRecID) echo "checked"; echo"> ".$tb5[$j5]['WWD_NAME'];
|
|
|
|
//6
|
|
// =========================================================================================================================================================
|
|
unset($tb6); $tb6 = sqlGetResAsArray("select WWD_ID,WWD_NAME from seg_water_drainage where WWD_PARENT_ID=".$tb5[$j5]['WWD_ID']." order by WWD_NAME");
|
|
if (count($tb6)>0)
|
|
{
|
|
echo "<ul>";
|
|
for($j6=0; $j6<count($tb6); $j6++)
|
|
{
|
|
echo"<li>";
|
|
echo "<input type='radio' name='inCheck' value='".$tb6[$j6]['WWD_ID']."'"; if ($tb6[$j6]['WWD_ID']==$getRecID) echo "checked"; echo"> ".$tb6[$j6]['WWD_NAME'];
|
|
|
|
//7
|
|
// =========================================================================================================================================================
|
|
unset($tb7); $tb7 = sqlGetResAsArray("select WWD_ID,WWD_NAME from seg_water_drainage where WWD_PARENT_ID=".$tb6[$j6]['WWD_ID']." order by WWD_NAME");
|
|
if (count($tb7)>0)
|
|
{
|
|
echo "<ul>";
|
|
for($j7=0; $j7<count($tb7); $j7++)
|
|
{
|
|
echo"<li>";
|
|
echo "<input type='radio' name='inCheck' value='".$tb7[$j7]['WWD_ID']."'"; if ($tb7[$j7]['WWD_ID']==$getRecID) echo "checked"; echo"> ".$tb7[$j7]['WWD_NAME'];
|
|
echo"</li>";
|
|
}
|
|
echo"</ul>";
|
|
}
|
|
// =========================================================================================================================================================
|
|
echo"</li>";
|
|
}
|
|
echo"</ul>";
|
|
}
|
|
// =========================================================================================================================================================
|
|
echo"</li>";
|
|
}
|
|
echo"</ul>";
|
|
}
|
|
// =========================================================================================================================================================
|
|
echo"</li>";
|
|
}
|
|
echo"</ul>";
|
|
}
|
|
// =========================================================================================================================================================
|
|
echo"</li>";
|
|
}
|
|
echo"</ul>";
|
|
}
|
|
// =========================================================================================================================================================
|
|
echo"</li>";
|
|
}
|
|
echo"</ul>";
|
|
}
|
|
// =========================================================================================================================================================
|
|
echo"</li>";
|
|
}
|
|
echo"</ul>";
|
|
}
|
|
// =========================================================================================================================================================
|
|
|
|
echo"</li>";
|
|
|
|
}
|
|
|
|
?>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="tag_buttons">
|
|
<a class="btn btn-info btn-sm" style="text-decoration: none;" href="./?pg=site301inf&dev=<?php echo $getDevID;?>" role="button"><?php echo $lab_ButtonName_Cancel; ?></a>
|
|
<INPUT class='btn btn-success btn-sm' TYPE="SUBMIT" NAME="subSite301tree" VALUE="<?php echo $lab_ButtonName_Save; ?>">
|
|
</div>
|
|
</FORM>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<?php
|
|
}
|
|
else showFooterWarningAccessNotification($lab_FooterWarningAccessNotification_001);
|
|
?>
|