?
Path : /home/admin/public_html/old/backoffice/user/ |
Current File : /home/admin/public_html/old/backoffice/user/menu_bar.php |
<?php session_start(); $root_path="../"; include($root_path."header.php"); $db_tm = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, false); $template = new Template($user_tpl_path); foreach(${"_" . $_SERVER["REQUEST_METHOD"]} as $k=>$v) $$k=$v; $sql_01 ="SELECT * FROM $selitem where TB_NAME='$TB' "; $result_01 = $db_tm->sql_query($sql_01); $rows_01 = $db_tm->sql_fetchrow($result_01); $w = $rows_01[W]; $h = $rows_01[H]; $fileto = $rows_01[FILETO]; $path_to = $rows_01[PATH]; $sql_error = $db_tm->sql_error($result_01); $debug_text = ''; if ( $sql_error['message'] != '' ){ $debug_text .= '<br /><br />ผิดพลาดที่คำสั่ง SQL : ' . $sql_error['message']; echo $debug_text."<br>"; } $add_butt="OnClick=\"open_pop('".$w."','".$h."','".$path_to."/".$fileto."?flag=add&TB=".$TB."&TBTH=".$TBTH."&selitem=".$selitem."');\""; $del_butt="OnClick=\"send_del(parent.arr_data,'".$TBTH."','?flag=del&TB=".$TB."&TBTH=".$TBTH."&selitem=".$selitem."','".$TB."');\" "; $search="OnClick=\"open_pop('600','190','./search.php?TB=".$TB."&TBTH=".$TBTH."&selitem=".$selitem."');\" "; $fields_butt="OnClick=\"open_pop('550','350','".$php_path."/list_fields.php?TB=".$TB."&TBTH=".$TBTH."&selitem=".$selitem."&CURRENT_PATH=".$user_path."');\" "; $template->set_filenames(array('body' =>'menu_bar.tpl')); $template->assign_vars(array( "CUR_HOST_BACKEND"=>$cur_host_backend, "IMAGES_PATH"=>$images_path, "INCLUDES_PATH"=>$includes_path, "STYLE"=>STYLE, "ADD_BUTT"=>$add_butt, "DEL_BUTT"=>$del_butt, "SEARCH"=>$search, "TBTH"=>$TBTH, "FIELDS_BUTT"=>$fields_butt, )); $template->pparse('body'); ?>