sql_table = $_CFG['SQL_TABLE']; $textlist->template_file = dirname(__FILE__).'/__template.php'; $textlist->path_server = $_CFG['path_server']; $textlist->autocreate_cells = false; } // Esli eto bil save dannih - sohranjajem shablon i sozdajem Otdelnuju SQL tablicu pod etot shablon*/ if (isSet($_POST['saved_data'])){ $textlist->add_on_save("category_id", $_CFG['current_category']['id']); $textlist->add_on_save("content", serialize($_POST)); $textlist->save_data($ERROR); if (@$ERROR){ unset($_GET['saved']); } else { create_update_mysql_table($_GET['edit'], $_CFG['SQL_TABLE'], @$_POST['uid_old']); } } if (!isset($_GET['edit']) or isset($_GET['from']) or isset($_GET['saved'])){ // Pokaz lista $my_list = new _with_edit(); $my_list->sql_table = $_CFG['SQL_TABLE']; $my_list->sql_where = " category_id=".$_CFG['current_category']['id']; $my_list->nosort = true; $my_list->sql_order = "title"; $my_list->unique_id = "wbg_products_templates"; if (@$_GET['edit']){ $my_list->style_where['id']['condition'] = "==".$_GET['edit']; $my_list->style_where['id']['insert'] = " style='background:#ffdb96'"; } $my_list->insert_cell("id","ID", null); $my_list->insert_cell("title", "Title", null, "nowrap width='100%'"); return $my_list->show_table(); } else { return $textlist->show_form($_GET['edit'], $ERROR); } } // >>> Glavnaja funkcija //==================================================== // [[[ Uzerskije funkcii function get_datetime($value){ return date("d.m.Y",$value); } // ]]] Uzerskije funkcii //==================================================== ?>