can 0 Denunciar post Postado Novembro 5, 2008 function templates_lista( $array_table, $str_insert_link, $num_list_type, $str_form_name, $str_form_action, $section, $num_codigo, $str_collapse_link = "" ) { #-- Objetos e Variáveis Globais -- global $obj_connect, $obj_date, $obj_status; global $str_module_name, $str_myself_name; global $str_base_dir, $str_base_url; #-- Atualizando Atributos da Classe -- $this->str_method_name = "templates_lista()"; $obj_connect->connect_num_rows(); if ( $obj_connect->num_rows_result > 0 ) { if ( $num_list_type ) { $this->str_html .= " <script type=\"text/javascript\" language=\"JavaScript\">function submit_".$str_form_name."() { document.".$str_form_name.".submit(); }</script>\n"; } $this->str_html .= " <table width=\"100%\">\n"; $this->str_html .= " <tr>\n"; foreach ( $array_table as $array_tmp_table ) { $this->str_html .= " <td class=\"listagem_titulo\" width=\"".$array_tmp_table[width]."\">".$array_tmp_table[title]."</td>\n"; } $str_scroll = " "; $visual_adjust = false; $num_height = ( $obj_connect->num_rows_result * 28 ) + 3; if ( $num_height > 250 ) { $num_height = ( 9 * 28 ) + 3; if ( $num_list_type == 1 || $num_list_type == 2 || $num_list_type == 3 ) { $str_scroll = " "; } else { $visual_adjust = true; } } if ( $num_list_type == 1 ) { $this->str_html .= " <td class=\"listagem_titulo\"><a href=\"java script:submit_".$str_form_name."()\"><img src=\"".$str_base_url.$this->array_images["icon_general_delete"]."\"></a>".$str_scroll."</td>\n"; } else if ( $num_list_type == 2 ) { $this->str_html .= " <td class=\"listagem_titulo\"><a href=\"java script:submit_".$str_form_name."()\"><img src=\"".$str_base_url.$this->array_images["icon_general_select"]."\"></a>".$str_scroll."</td>\n"; } else if ( $num_list_type == 3 ) { $this->str_html .= " <td class=\"listagem_titulo\" align=\"center\">Aprovar?</td>\n"; } else if ( $visual_adjust == true ) { $this->str_html .= " <td class=\"listagem_titulo\"> </td>\n"; } $this->str_html .= " </tr>\n"; $this->str_html .= " </table>\n"; $this->str_html .= " <div style=\"height: ".$num_height."px; overflow: auto; margin-bottom: 3px;\">\n"; $this->str_html .= " <table width=\"100%\">\n"; if ( $num_list_type ) { $this->str_html .= " <form name=\"".$str_form_name."\" action=\"".$str_myself_name."\" method=\"post\" enctype=\"multipart/form-data\">\n"; $this->str_html .= " <input type=\"hidden\" name=\"action_form\" value=\"".$str_form_action."\">\n"; if ( $num_codigo ) { $this->str_html .= " <input type=\"hidden\" name=\"codigo\" value=\"".$num_codigo."\">\n"; } if ( $section ) { $this->str_html .= " <input type=\"hidden\" name=\"section\" value=\"".$section."\">\n"; } } $str_color_style = "listagem_linha_01"; while ( $bool_fetch = $obj_connect->connect_fetch_array() ) { $this->str_html .= " <tr>\n"; foreach ( $array_table as $array_tmp_table ) { $obj_connect->array_result[$array_tmp_table[field]] = chop( $obj_connect->array_result[$array_tmp_table[field]] ); if ( $obj_connect->array_result[$array_tmp_table[field]] == "" ) { $obj_connect->array_result[$array_tmp_table[field]] = "Campo Vazio"; } if ( $array_tmp_table["link"] && $obj_connect->array_result[ATIVO] !== 0 ) { if ( $section ) { $str_tmp_section = "§ion=".$section; } else { $str_tmp_section = ""; } $this->str_html .= " <td class=\"".$str_color_style."\" width=\"".$array_tmp_table[width]."\"><a href=\"java script:go_url('".$str_myself_name."?action_form=".$array_tmp_table["link"].$str_tmp_section."&codigo=".$obj_connect->array_result[CODIGO]."');\">".$obj_connect->array_result[$array_tmp_table[field]]."</a></td>\n"; } else { $this->str_html .= " <td class=\"".$str_color_style."\" width=\"".$array_tmp_table[width]."\">".$obj_connect->array_result[$array_tmp_table[field]]."</td>\n"; } } if ( $num_list_type && $obj_connect->array_result[ATIVO] !== 0 ) { $this->str_html .= " <td class=\"".$str_color_style."\"><input type=\"checkbox\" name=\"array_select[".$obj_connect->array_result[CODIGO]."]\" value=\"true\" class=\"checkbox\"></td>\n"; } $this->str_html .= " </tr>\n"; if ( $str_color_style == "listagem_linha_01" ) { $str_color_style = "listagem_linha_02"; } else { $str_color_style = "listagem_linha_01"; } } if ( $num_list_type ) { $this->str_html .= " </form>\n"; } $this->str_html .= " </table>\n"; $this->str_html .= " </div>\n"; } if ( $str_collapse_link ) { $str_collapse_link = str_replace("<a href=\"","<a href=\"java script:go_url('",$str_collapse_link); $str_collapse_link = str_replace("\">","');\">",$str_collapse_link); $this->str_html .= " <div class=\"form_button\">".$str_collapse_link."</div>\n"; } if ( $str_insert_link ) { if( strpos( 'javascript', $str_insert_link ) ){ $str_insert_link = str_replace("<a href=\"","<a href=\"java script:go_url('",$str_insert_link); $str_insert_link = str_replace("\">","');\">",$str_insert_link); } $this->str_html .= " <div class=\"form_button\">".$str_insert_link."</div>\n"; } } Compartilhar este post Link para o post Compartilhar em outros sites
quintelab 91 Denunciar post Postado Novembro 5, 2008 Qual é a sua dúvida? Postou este código porque? Abraços... Compartilhar este post Link para o post Compartilhar em outros sites
desisto 0 Denunciar post Postado Novembro 6, 2008 bonito Compartilhar este post Link para o post Compartilhar em outros sites
quitZAUMMM 18 Denunciar post Postado Novembro 6, 2008 hUFHDSAUFHAUSHDFUAHDSFUAHDSFUASUDHFA .. tem nem oq comentar neh? =p Compartilhar este post Link para o post Compartilhar em outros sites
Salgado 4 Denunciar post Postado Novembro 6, 2008 Adicionei o BBCode CODE, assim pelo menos fica identado, apesar de não fazer a menor idéia do que ele pretendia. Compartilhar este post Link para o post Compartilhar em outros sites