query($sql); $count++; } } $updated = 1; } if ($bthDelete) { if (!empty($selectRecord)) { foreach ($selectRecord as $key => $value) { $sql = "DELETE FROM `".$page_tbname."` WHERE `id` = '$value'"; $db->query($sql); del_all_attachment($page_tbname,$value); } } $updated = 2; } if ($bthImport) { if ( !empty($_FILES["file"]) && !empty($_FILES["file"]["name"]) ) { if($clear_member==1){ $sql = "TRUNCATE TABLE `member`"; $db->query($sql); } $temp = explode(".", $_FILES["file"]["name"]); $ext = $temp[count($temp)-1]; if ( strtolower($ext) == "xls" || strtolower($ext) == "xlsx" ) { $file = "../../upload/import/".date("YmdHis").".".$ext; move_uploaded_file( $_FILES["file"]["tmp_name"], $file ); chmod ( $file, 0777 ); } } header("Location: import-xls.php?file=".$file ); exit; } if ($bthExport) { header("Location: download-xls.php?export_keyword=".$export_keyword."&export_levelone=".$export_levelone ); exit; } header("Location: ".$page_address_list."?keepSession=1&page=$page&updated=".$updated); exit; ?>