📄 class.formhandler.editform.inc.php
字号:
$instance_sub_table = new Table($table_split[2], $table_split[3]); $split_select_list = $instance_sub_table -> Get_list ($this->DBHandle, $SPLIT_CLAUSE, null, null, null, null, null, null); if (!is_array($split_select_list)){ $num=0; }else{ $num = count($split_select_list); } if($num>0) { for($j=0;$j<$num;$j++) { if (is_numeric($table_split[7])){ $instance_sub_sub_table = new Table($table_split[8], $table_split[9]); $SUB_TABLE_SPLIT_CLAUSE = str_replace("%1", $split_select_list[$j][$table_split[7]], $table_split[11] ); $sub_table_split_select_list = $instance_sub_sub_table -> Get_list ($this->DBHandle, $SUB_TABLE_SPLIT_CLAUSE, null, null, null, null, null, null); $split_select_list[$j][$table_split[7]] = $sub_table_split_select_list[0][0]; } ?> <TR class="" bgcolor="<?php echo $this->FG_TABLE_ALTERNATE_ROW_COLOR[$j%2]?>" onMouseOver="bgColor='#C4FFD7'" onMouseOut="bgColor='<?php echo $this->FG_TABLE_ALTERNATE_ROW_COLOR[$j%2]?>'"> <TD vAlign=top class=tableBody> <font face="Verdana" size="2"> <b><?php echo $split_select_list[$j][$table_split[7]]?></b> : <?php echo $split_select_list[$j][0]?> </font> </TD> <TD align="center" vAlign=top class=tableBodyRight> <input onClick="sendto('del-content','<?php echo $i?>','<?php echo $table_split[1]?>_hidden','<?php echo $split_select_list[$j][1]?>');" title="Remove this <?php echo $this->FG_TABLE_EDITION[$i][0]?>" alt="Remove this <?php echo $this->FG_TABLE_EDITION[$i][0]?>" border=0 height=11 hspace=2 id=submit33 name=submit33 src="<?php echo Images_Path_Main;?>/icon-del.gif" type=image width=33 value="add-split"> </TD> </TR> <?php }//end_for }else{ ?> <TR bgcolor="<?php echo $this->FG_TABLE_ALTERNATE_ROW_COLOR[$j%2]?>" onMouseOver="bgColor='#C4FFD7'" onMouseOut="bgColor='<?php echo $this->FG_TABLE_ALTERNATE_ROW_COLOR[$j%2]?>'"> <TD colspan="2" align="<?php echo $this->FG_TABLE_COL[$i][3]?>" vAlign=top class=tableBody> <div align="center" class="liens"><?php echo gettext("No");?><?php echo $this->FG_TABLE_EDITION[$i][0]?></div></TD> </TR> <?php } ?> <TR> <TD class=tableDivider colspan=<?php echo $this->FG_TOTAL_TABLE_COL?>><IMG height=1 src="<?php echo Images_Path_Main;?>/clear.gif" width=1></TD> </TR> </TABLE></td> </tr> <TR class="bgcolor_016"> <TD class="editform_table3_td2"> <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%"> <TR> <TD height="4" align="right"></TD> </TR> </TABLE> </TD> </TR> </table><br> </TD> </TR> <TR> <!-- ******************* Select to ADD new instances ****************************** --> <TD class="form_head"> </TD> <TD align="center" valign="top" background="<?php echo Images_Path;?>/background_cells.gif" class="text"><br> <TABLE width="300" height=50 border=0 align="center" cellPadding=0 cellSpacing=0> <TR> <TD bgColor=#7f99cc colspan=3 height=16 style="PADDING-LEFT: 5px; PADDING-RIGHT: 5px" class="form_head"> <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%"> <TR> <TD class="form_head"><?php echo gettext("Add a new");?> <?php echo $this->FG_TABLE_EDITION[$i][0]?></TD> </TR> </TABLE> </TD> </TR> <TR> <TD class="form_head"> <IMG height=1 src="<?php echo Images_Path_Main;?>/clear.gif" width=1> </TD> <TD class="editform_table4_td1"> <TABLE width="97%" border=0 align="center" cellPadding=0 cellSpacing=0> <TR> <TD width="122" class="tableBody"><?php echo $this->FG_TABLE_EDITION[$i][0]?></TD> <TD width="516"><div align="center"> <input name="<?php echo $table_split[1]?>_hidden" type="hidden" value="" /> <SELECT name="<?php echo $table_split[1]?>[]" <?php echo $this->FG_TABLE_EDITION[$i][4]?> class="form_input_select"> <?php $split_select_list = $instance_sub_table -> Get_list ($this->DBHandle, null, null, null, null, null, null, null); if (count($split_select_list)>0) { $select_number=0; foreach ($split_select_list as $select_recordset){ $select_number++; if ($table_split[6]!="" && !is_null($table_split[6])){ if (is_numeric($table_split[7])){ $instance_sub_sub_table = new Table($table_split[8], $table_split[9]); $SUB_TABLE_SPLIT_CLAUSE = str_replace("%1", $select_recordset[$table_split[7]], $table_split[11] ); $sub_table_split_select_list = $instance_sub_sub_table -> Get_list ($this->DBHandle, $SUB_TABLE_SPLIT_CLAUSE, null, null, null, null, null, null); $select_recordset[$table_split[7]] = $sub_table_split_select_list[0][0]; } $value_display = $table_split[6]; $nb_recor_k = count($select_recordset); for ($k=1;$k<=$nb_recor_k;$k++){ $value_display = str_replace("%$k", $select_recordset[$k-1], $value_display ); } }else{ $value_display = $select_recordset[0]; } ?> <OPTION value='<?php echo $select_recordset[1]?>'> <?php echo $value_display?> </OPTION> <?php }// END_FOREACH }else{ echo gettext("No data found !!!"); }//END_IF ?> </SELECT> </div> </TD> </TR> <TR> <TD colspan=2 height=4></TD> </TR> <TR> <TD colspan="2" align="center" vAlign="middle"> <a href="#" onClick="sendto('add-content','<?php echo $i?>');"> <span class="cssbutton">ADD <?php echo $this->FG_TABLE_EDITION[$i][0]?></span></a> </TD> </TR> </TABLE> </TD> <TD class="form_head"><IMG height=1 src="<?php echo Images_Path_Main;?>/clear.gif" width=1></TD> </TR> <TR> <TD colspan=3 class="form_head"><IMG height=1 src="<?php echo Images_Path_Main;?>/clear.gif" width=1></TD> </TR> </TABLE> </TD> </TR> <?php } elseif (strtoupper ($this->FG_TABLE_EDITION[$i][3])==strtoupper ("INSERT")) { $table_split = split(":",$this->FG_TABLE_EDITION[$i][14]); ?> <TR> <!-- ******************** PARTIE EXTERN : INSERT ***************** --> <TD width="122" class="form_head"><?php echo $this->FG_TABLE_EDITION[$i][0]?></TD> <TD align="center" valign="top" background="<?php echo Images_Path;?>/background_cells.gif" class="text"><br> <!-- Table with list instance already inserted --> <table cellspacing="0" class="editform_table2"> <TR bgcolor="#ffffff"> <TD height=16 style="PADDING-LEFT: 5px; PADDING-RIGHT: 3px" class="form_head"> <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%"> <TR> <TD class="form_head"><?php echo $this->FG_TABLE_EDITION[$i][0]?> <?php echo gettext("LIST");?> </TD> </TR> </TABLE> </TD> </TR> <TR> <TD> <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%"> <TR> <TD bgColor=#e1e1e1 colspan=<?php echo $this->FG_TOTAL_TABLE_COL?> height=1><IMG height=1 src="<?php echo Images_Path_Main;?>/clear.gif" width=1></TD> </TR> <?php $SPLIT_CLAUSE = str_replace("%id", "$id", $table_split[4]); $instance_sub_table = new Table($table_split[2], $table_split[3]); $split_select_list = $instance_sub_table -> Get_list ($this->DBHandle, $SPLIT_CLAUSE, null, null, null, null, null, null); if (!is_array($split_select_list)){ $num=0; }else{ $num = count($split_select_list); } if($num>0) { for($j=0;$j<$num;$j++) { ?> <TR bgcolor="<?php echo $this->FG_TABLE_ALTERNATE_ROW_COLOR[$j%2]?>" onMouseOver="bgColor='#C4FFD7'" onMouseOut="bgColor='<?php echo $this->FG_TABLE_ALTERNATE_ROW_COLOR[$j%2]?>'"> <TD vAlign="top" align="<?php echo $this->FG_TABLE_COL[$i][3]?>" class="tableBody"> <font face="Verdana" size="2"> <?php if(!empty($split_select_list[$j][$table_split[7]])) { ?> <b><?php echo $split_select_list[$j][$table_split[7]]?></b> : <?php }?> <?php echo $split_select_list[$j][0]?> </font> </TD> <TD align="center" vAlign="top2" class="tableBodyRight"> <input onClick="sendto('del-content','<?php echo $i?>','<?php echo $table_split[1]?>','<?php echo $split_select_list[$j][1]?>');" alt="Remove this <?php echo $this->FG_TABLE_EDITION[$i][0]?>" border=0 height=11 hspace=2 id=submit33 name=submit33 src="<?php echo Images_Path_Main;?>/icon-del.gif" type=image width=33 value="add-split"> </TD> </TR> <?php }//end_for }else{ ?> <TR bgcolor="<?php echo $this->FG_TABLE_ALTERNATE_ROW_COLOR[$j%2]?>" onMouseOver="bgColor='#C4FFD7'" onMouseOut="bgColor='<?php echo $this->FG_TABLE_ALTERNATE_ROW_COLOR[$j%2]?>'"> <TD colspan="2" align="<?php echo $this->FG_TABLE_COL[$i][3]?>" vAlign="top" class="tableBody"> <div align="center" class="liens">No <?php echo $this->FG_TABLE_EDITION[$i][0]?></div></TD> </TR> <?php } ?> <TR> <TD class="tableDivider" colspan=<?php echo $this->FG_TOTAL_TABLE_COL?>><IMG height=1 src="<?php echo Images_Path_Main;?>/clear.gif" width=1></TD> </TR> </TABLE></td> </tr> <TR class="bgcolor_016"> <TD class="editform_table3_td2"> <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%"> <TR><TD height="4" align="right"></TD></TR> </TABLE> </TD> </TR> </table><br></TD> </TR> <TR> <!-- ******************* Select to ADD new instances ****************************** --> <TD class="form_head"> </TD> <TD align="center" valign="top" background="<?php echo Images_Path;?>/background_cells.gif" class="text"><br> <TABLE width="300" height=50 border=0 align="center" cellPadding=0 cellSpacing=0> <TR> <TD bgColor=#7f99cc colspan=3 height=16 style="PADDING-LEFT: 5px; PADDING-RIGHT: 5px" class="form_head"> <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%"> <TR> <TD class="form_head"><?php echo gettext("Add a new");?> <?php echo $this->FG_TABLE_EDITION[$i][0]?></TD> </TR> </TABLE> </TD> </TR> <TR> <TD class="form_head"> <IMG height=1 src="<?php echo Images_Path_Main;?>/clear.gif" width=1> </TD> <TD class="editform_table4_td1"> <TABLE width="97%" border=0 align="center" cellPadding=0 cellSpacing=0> <TR> <TD width="122" class="tableBody"><?php echo $this->FG_TABLE_EDITION[$i][0]?></TD> <TD width="516"><div align="left"> <?php if($this->FG_TABLE_EDITION[$i][4] == "multiline"){?> <textarea name=<?php echo $table_split[1]?> class="form_input_text" cols="40" rows="5"></textarea> <?php }else{?> <INPUT TYPE="TEXT" name=<?php echo $table_split[1]?> class="form_input_text" size="20" maxlength="20"> <?php }?> </TD> </TR> <TR> <TD colspan="2" align="center"> <a href="#" onClick="sendto('add-content','<?php echo $i?>');"> <span class="cssbutton">ADD <?php echo $this->FG_TABLE_EDITION[$i][0]?></span></a> </TD> </TR> <TR> <TD colspan=2 height=4></TD> </TR> <TR> <TD colspan=2> <div align="right"></div></TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -