上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:20k
源码类别:

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{BEEECC20-4D5F-4F8B-BFDC-5D9B6FBDE09D}#1.0#0"; "vsflex8.ocx"
  3. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
  4. Begin VB.Form Book_OverList 
  5.    Caption         =   "超龄资产报表"
  6.    ClientHeight    =   8595
  7.    ClientLeft      =   60
  8.    ClientTop       =   345
  9.    ClientWidth     =   11880
  10.    HelpContextID   =   505003
  11.    Icon            =   "超龄资产报表.frx":0000
  12.    LinkTopic       =   "Form1"
  13.    LockControls    =   -1  'True
  14.    MDIChild        =   -1  'True
  15.    ScaleHeight     =   8595
  16.    ScaleWidth      =   11880
  17.    Begin VB.PictureBox Pic_Title 
  18.       BackColor       =   &H00FFFFFF&
  19.       Height          =   825
  20.       Left            =   -7
  21.       Picture         =   "超龄资产报表.frx":1042
  22.       ScaleHeight     =   765
  23.       ScaleWidth      =   11835
  24.       TabIndex        =   1
  25.       Top             =   570
  26.       Width           =   11895
  27.       Begin MSComctlLib.ImageList ImageList1 
  28.          Left            =   4200
  29.          Top             =   60
  30.          _ExtentX        =   1005
  31.          _ExtentY        =   1005
  32.          BackColor       =   -2147483643
  33.          ImageWidth      =   16
  34.          ImageHeight     =   16
  35.          MaskColor       =   12632256
  36.          _Version        =   393216
  37.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  38.             NumListImages   =   8
  39.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  40.                Picture         =   "超龄资产报表.frx":35106
  41.                Key             =   "sz"
  42.             EndProperty
  43.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  44.                Picture         =   "超龄资产报表.frx":354A0
  45.                Key             =   "dy"
  46.             EndProperty
  47.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  48.                Picture         =   "超龄资产报表.frx":3583A
  49.                Key             =   "yl"
  50.             EndProperty
  51.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  52.                Picture         =   "超龄资产报表.frx":35BD4
  53.                Key             =   "bz"
  54.             EndProperty
  55.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  56.                Picture         =   "超龄资产报表.frx":35F6E
  57.                Key             =   "tc"
  58.             EndProperty
  59.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  60.                Picture         =   "超龄资产报表.frx":36308
  61.                Key             =   "bcgs"
  62.             EndProperty
  63.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  64.                Picture         =   "超龄资产报表.frx":366A2
  65.                Key             =   "mrlk"
  66.             EndProperty
  67.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  68.                Picture         =   "超龄资产报表.frx":36A3C
  69.                Key             =   "xsxm"
  70.             EndProperty
  71.          EndProperty
  72.       End
  73.       Begin VB.Label tsLabel 
  74.          AutoSize        =   -1  'True
  75.          BackColor       =   &H80000018&
  76.          BackStyle       =   0  'Transparent
  77.          Caption         =   "超龄资产报表"
  78.          BeginProperty Font 
  79.             Name            =   "宋体"
  80.             Size            =   12
  81.             Charset         =   134
  82.             Weight          =   700
  83.             Underline       =   0   'False
  84.             Italic          =   0   'False
  85.             Strikethrough   =   0   'False
  86.          EndProperty
  87.          ForeColor       =   &H00000000&
  88.          Height          =   240
  89.          Index           =   4
  90.          Left            =   555
  91.          TabIndex        =   2
  92.          Top             =   210
  93.          Width           =   1530
  94.       End
  95.    End
  96.    Begin VB.Timer Timer1 
  97.       Enabled         =   0   'False
  98.       Interval        =   1
  99.       Left            =   6533
  100.       Top             =   60
  101.    End
  102.    Begin VSFlex8Ctl.VSFlexGrid CxbbGrid 
  103.       Height          =   7215
  104.       Left            =   -7
  105.       TabIndex        =   0
  106.       Top             =   1440
  107.       Width           =   11895
  108.       _cx             =   5080
  109.       _cy             =   5080
  110.       Appearance      =   1
  111.       BorderStyle     =   1
  112.       Enabled         =   -1  'True
  113.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  114.          Name            =   "宋体"
  115.          Size            =   9
  116.          Charset         =   134
  117.          Weight          =   400
  118.          Underline       =   0   'False
  119.          Italic          =   0   'False
  120.          Strikethrough   =   0   'False
  121.       EndProperty
  122.       MousePointer    =   0
  123.       BackColor       =   -2147483643
  124.       ForeColor       =   -2147483640
  125.       BackColorFixed  =   -2147483633
  126.       ForeColorFixed  =   -2147483630
  127.       BackColorSel    =   -2147483635
  128.       ForeColorSel    =   -2147483634
  129.       BackColorBkg    =   -2147483636
  130.       BackColorAlternate=   -2147483643
  131.       GridColor       =   -2147483633
  132.       GridColorFixed  =   -2147483632
  133.       TreeColor       =   -2147483632
  134.       FloodColor      =   192
  135.       SheetBorder     =   -2147483642
  136.       FocusRect       =   1
  137.       HighLight       =   1
  138.       AllowSelection  =   -1  'True
  139.       AllowBigSelection=   -1  'True
  140.       AllowUserResizing=   0
  141.       SelectionMode   =   0
  142.       GridLines       =   1
  143.       GridLinesFixed  =   2
  144.       GridLineWidth   =   1
  145.       Rows            =   50
  146.       Cols            =   10
  147.       FixedRows       =   1
  148.       FixedCols       =   1
  149.       RowHeightMin    =   0
  150.       RowHeightMax    =   0
  151.       ColWidthMin     =   0
  152.       ColWidthMax     =   0
  153.       ExtendLastCol   =   0   'False
  154.       FormatString    =   ""
  155.       ScrollTrack     =   0   'False
  156.       ScrollBars      =   3
  157.       ScrollTips      =   0   'False
  158.       MergeCells      =   0
  159.       MergeCompare    =   0
  160.       AutoResize      =   -1  'True
  161.       AutoSizeMode    =   0
  162.       AutoSearch      =   0
  163.       AutoSearchDelay =   2
  164.       MultiTotals     =   -1  'True
  165.       SubtotalPosition=   1
  166.       OutlineBar      =   0
  167.       OutlineCol      =   0
  168.       Ellipsis        =   0
  169.       ExplorerBar     =   0
  170.       PicturesOver    =   0   'False
  171.       FillStyle       =   0
  172.       RightToLeft     =   0   'False
  173.       PictureType     =   0
  174.       TabBehavior     =   0
  175.       OwnerDraw       =   0
  176.       Editable        =   0
  177.       ShowComboButton =   1
  178.       WordWrap        =   0   'False
  179.       TextStyle       =   0
  180.       TextStyleFixed  =   0
  181.       OleDragMode     =   0
  182.       OleDropMode     =   0
  183.       DataMode        =   0
  184.       VirtualData     =   -1  'True
  185.       DataMember      =   ""
  186.       ComboSearch     =   3
  187.       AutoSizeMouse   =   -1  'True
  188.       FrozenRows      =   0
  189.       FrozenCols      =   0
  190.       AllowUserFreezing=   0
  191.       BackColorFrozen =   0
  192.       ForeColorFrozen =   0
  193.       WallPaperAlignment=   9
  194.       AccessibleName  =   ""
  195.       AccessibleDescription=   ""
  196.       AccessibleValue =   ""
  197.       AccessibleRole  =   24
  198.    End
  199.    Begin MSComctlLib.Toolbar GsToolbar 
  200.       Height          =   525
  201.       Left            =   9390
  202.       TabIndex        =   3
  203.       Top             =   30
  204.       Width           =   2475
  205.       _ExtentX        =   4366
  206.       _ExtentY        =   926
  207.       ButtonWidth     =   1455
  208.       ButtonHeight    =   926
  209.       Appearance      =   1
  210.       Style           =   1
  211.       ImageList       =   "ImageList1"
  212.       _Version        =   393216
  213.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  214.          NumButtons      =   3
  215.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  216.             Caption         =   "保存格式"
  217.             Key             =   "bcgs"
  218.             ImageKey        =   "bcgs"
  219.          EndProperty
  220.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  221.             Caption         =   "默认列宽"
  222.             Key             =   "hfmrgs"
  223.             ImageKey        =   "mrlk"
  224.          EndProperty
  225.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  226.             Caption         =   "显示项目"
  227.             Key             =   "szxsxm"
  228.             ImageKey        =   "xsxm"
  229.          EndProperty
  230.       EndProperty
  231.    End
  232.    Begin MSComctlLib.Toolbar SzToolbar 
  233.       Align           =   1  'Align Top
  234.       Height          =   555
  235.       Left            =   0
  236.       TabIndex        =   4
  237.       Top             =   0
  238.       Width           =   11880
  239.       _ExtentX        =   20955
  240.       _ExtentY        =   979
  241.       ButtonWidth     =   820
  242.       ButtonHeight    =   926
  243.       AllowCustomize  =   0   'False
  244.       Appearance      =   1
  245.       Style           =   1
  246.       ImageList       =   "ImageList1"
  247.       _Version        =   393216
  248.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  249.          NumButtons      =   6
  250.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  251.             Caption         =   "设置"
  252.             Key             =   "ymsz"
  253.             ImageKey        =   "sz"
  254.          EndProperty
  255.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  256.             Caption         =   "打印"
  257.             Key             =   "dy"
  258.             ImageKey        =   "dy"
  259.          EndProperty
  260.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  261.             Caption         =   "预览"
  262.             Key             =   "yl"
  263.             ImageKey        =   "yl"
  264.          EndProperty
  265.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  266.             Style           =   3
  267.          EndProperty
  268.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  269.             Caption         =   "帮助"
  270.             Key             =   "bz"
  271.             ImageKey        =   "bz"
  272.          EndProperty
  273.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  274.             Caption         =   "退出"
  275.             Key             =   "fh"
  276.             ImageKey        =   "tc"
  277.          EndProperty
  278.       EndProperty
  279.       BorderStyle     =   1
  280.       Begin VB.TextBox Txt_Bit 
  281.          Height          =   270
  282.          Left            =   5070
  283.          TabIndex        =   5
  284.          Text            =   "Text1"
  285.          Top             =   1230
  286.          Visible         =   0   'False
  287.          Width           =   1035
  288.       End
  289.    End
  290. End
  291. Attribute VB_Name = "Book_OverList"
  292. Attribute VB_GlobalNameSpace = False
  293. Attribute VB_Creatable = False
  294. Attribute VB_PredeclaredId = True
  295. Attribute VB_Exposed = False
  296. '******************************************************************
  297. '*    模 块 名 称 :超龄资产报表
  298. '*    功 能 描 述 :
  299. '*    程序员姓名  :徐衍民
  300. '*    最后修改人  :徐衍民
  301. '*    最后修改时间:2001/12/13
  302. '*    备        注:
  303. '******************************************************************
  304. Dim ReportTitle As String                '报表主标题
  305. Dim Card_Str As String                   '用户录入查询条件
  306. Dim rstemp As ADODB.Recordset            '打开数据集变量
  307. '以下为固定使用变量
  308. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  309. Dim GridCode As String                   '显示网格网格代码
  310. Dim GridInf() As Variant                 '整个网格设置信息
  311. Dim Tsxx As String                       '系统提示信息
  312. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  313. Dim Sjhgd As Double                      '网格数据行高度
  314. Dim Sfxshjwg As Boolean                  '是否显示合计网格
  315. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  316. Dim GridStr()  As String                 '网格列信息(字符型)
  317. Dim GridInt() As Integer                 '网格列信息(整型)
  318. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  319. Private Sub Form_Resize()                '根据窗体大小来调整网格,标题栏大小
  320.     
  321.     On Error Resume Next
  322.     
  323.     With CxbbGrid
  324.         .Width = Me.Width - 160
  325.         .Height = Me.Height - .Top - 400
  326.     End With
  327.     
  328.     With Pic_Title
  329.         .Width = Me.Width - 160
  330.     End With
  331.     
  332.     GsToolbar.Left = Me.Width - GsToolbar.Width - 160
  333. End Sub
  334. Private Sub Form_Load()                                                   '窗体装入
  335.      
  336.     '调入打印页面设置窗体
  337.     ReportTitle = "超龄资产报表"
  338.     XtReportCode = "Gdzc_Book_FAOver"
  339.     Load Dyymctbl
  340.      
  341.     '调整标题栏及网格、格式工具条位置
  342.     Pic_Title.Left = 40
  343.     Pic_Title.Top = SzToolbar.Top + SzToolbar.Height - 10
  344.     CxbbGrid.Left = Pic_Title.Left
  345.     CxbbGrid.Top = Pic_Title.Top + Pic_Title.Height + 20
  346.     
  347.     '调 入 网 格
  348.     GridCode = "Gdzc_Book_FAOver"
  349.     Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  350.      
  351.     Qslz = GridInf(1)
  352.     Sjhgd = GridInf(2)
  353.     Sfxshjwg = GridInf(7)
  354.     Szzls = CxbbGrid.Cols - 1
  355.     
  356.     Me.AutoRedraw = False
  357.     Window_State
  358.     
  359. End Sub
  360. Private Sub Form_Unload(Cancel As Integer)                                  '窗体卸载
  361.     
  362.     '卸载打印页面设置窗体
  363.     Unload Dyymctbl
  364. End Sub
  365. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)       '网格格式调整
  366.     
  367.     Select Case Button.Key
  368.         Case "bcgs"                                          '保存表格格式
  369.           Call Bcwggs(CxbbGrid, GridCode, GridStr)
  370.         Case "hfmrgs"                                        '恢复默认格式
  371.           Call Hfmrgs(CxbbGrid, GridCode, GridStr)
  372.         Case "szxsxm"                                        '设置显示项目
  373.           Call Szxsxm(CxbbGrid, GridCode)
  374.     End Select
  375. End Sub
  376. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  377.     
  378.     Select Case Button.Key
  379.         Case "ymsz"                                          '页面设置
  380.             Dyymctbl.Show 1
  381.         Case "yl"                                            '预 览
  382.             Call bbyl(True)
  383.         Case "dy"                                            '打 印
  384.             Call bbyl(False)
  385.         Case "fh"                                            '退 出
  386.             Unload Me
  387.         Case "bz"
  388.             SendKeys "{F1}"
  389.      End Select
  390.      
  391. End Sub
  392. Private Sub Timer1_Timer()                                 '在窗体激活后调入查询程序
  393.     Timer1.Enabled = False
  394. End Sub
  395. Private Sub Sub_Query()                                    '生成查询结果
  396.     
  397.     Dim Rec_Query As New ADODB.Recordset        '查询结果动态集
  398.     Dim Sqlstr As String                        '查询字符串
  399.     Dim Coljsq As Long                          '网格列计数器
  400.     Dim Jsqte As Integer                        '临时动态计数器
  401.     
  402.     Sqlstr = "SELECT Gdzc_Variation.CardCode, Gdzc_State.FAStateName, Gdzc_Sort.FASortName, " _
  403.         & "Gdzc_Card.FACode, Gdzc_Card.FAName, Gdzc_Card.SpecificationMode, " _
  404.         & "Gdzc_Card.MeasureUnit, Gdzc_Variation.FAQuantityOld, " _
  405.         & "Gdzc_Variation.FAQuantityNew, Gdzc_VariationMode.FAVariName, " _
  406.         & "Gdzc_Variation.FAValueOld, Gdzc_Variation.FAValueNew, Gdzc_Card.UseYears, " _
  407.         & "Gdzc_Card.BeginUseDate , Gdzc_Card.SetLocaNum, Gdzc_Variation.VariDate " _
  408.         & "FROM Gdzc_Variation INNER JOIN Gdzc_VariationMode ON " _
  409.         & "Gdzc_Variation.FAVariCode = Gdzc_VariationMode.FAVariCode LEFT OUTER JOIN " _
  410.         & "Gdzc_Sort ON Gdzc_Variation.FASortNew = Gdzc_Sort.FASortCode LEFT OUTER JOIN " _
  411.         & "Gdzc_State ON Gdzc_Variation.FAStateNew = Gdzc_State.FaStateCode LEFT OUTER JOIN " _
  412.         & "Gdzc_Card ON Gdzc_Variation.CardCode = Gdzc_Card.CardCode " _
  413.         & "WHERE (Gdzc_VariationMode.VariSort = 2) OR (Gdzc_Card.FactValue = 0) AND (Gdzc_Card.FAQuantity > 0) " _
  414.         & "ORDER BY Gdzc_Variation.CardCode"
  415.     Set Rec_Query = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  416.     With Rec_Query
  417.         CxbbGrid.Rows = CxbbGrid.FixedRows
  418.         CxbbGrid.Rows = CxbbGrid.FixedRows + .RecordCount
  419.         Jsqte = CxbbGrid.FixedRows
  420.     
  421.         Do While Not .EOF
  422.             If Jsqte >= CxbbGrid.Rows Then
  423.                 CxbbGrid.AddItem ""
  424.             End If
  425.             CxbbGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = Trim(!CardCode & "")                                        '卡片编号
  426.             CxbbGrid.TextMatrix(Jsqte, Sydz("002", GridStr(), Szzls)) = Trim(!FAStateName & "")                                     '是用状况
  427.             CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = Trim(!FASortName & "")                                      '资产类别
  428.             CxbbGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Trim(!FACode & "")                                          '资产编号
  429.             CxbbGrid.TextMatrix(Jsqte, Sydz("005", GridStr(), Szzls)) = Trim(!FAName & "")                                          '资产名称
  430.             CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = Trim(!SpecificationMode & "")                               '设备位号
  431.             CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = Trim(!Measureunit & "")                                     '计量单位
  432.             If Val(Abs(Val(!FAQuantityNew & "") - Val(!FAQuantityOld & "")) & "") <> 0 Then
  433.                 CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = Trim(Abs(Val(!FAQuantityNew & "") - _
  434.                                                                             Val(!FAQuantityOld & "")) & "")                         '资产数量
  435.             End If
  436.             CxbbGrid.TextMatrix(Jsqte, Sydz("009", GridStr(), Szzls)) = Trim(!FAVariName & "")                                      '变动方式
  437.             If Val(Abs(Val(!FAValueNew & "") - Val(!FAValueOld & ""))) <> 0 Then
  438.                 CxbbGrid.TextMatrix(Jsqte, Sydz("010", GridStr(), Szzls)) = Trim(Abs(Val(!FAValueNew & "") - _
  439.                                                                             Val(!FAValueOld & "")) & "")                            '资产原值
  440.             End If
  441.             CxbbGrid.TextMatrix(Jsqte, Sydz("011", GridStr(), Szzls)) = Trim(!Useyears & "")                                        '使用年限
  442.             CxbbGrid.TextMatrix(Jsqte, Sydz("012", GridStr(), Szzls)) = Trim(!BeginUsedate & "")                                    '开始使用日期
  443.             CxbbGrid.TextMatrix(Jsqte, Sydz("013", GridStr(), Szzls)) = Trim(!SetLocaNum & "")                                      '设备位号
  444.             CxbbGrid.TextMatrix(Jsqte, Sydz("014", GridStr(), Szzls)) = Trim(!varidate & "")                                        '变动日期
  445.             CxbbGrid.RowHeight(Jsqte) = Sjhgd
  446.             .MoveNext
  447.             Jsqte = Jsqte + 1
  448.         Loop
  449.     End With
  450.     
  451. End Sub
  452. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  453.     
  454.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  455.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  456.     Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  457.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  458.     ReDim Bbxbt(1 To Bbxbtgs)
  459.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  460.     
  461.     If Bbbwhgs <> 0 Then
  462.         ReDim Bbbwh(1 To Bbbwhgs)
  463.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  464.     End If
  465.     
  466.     Bbzbt = ReportTitle
  467.     Bbxbt(1) = " "
  468.     bbxbtzzxs(1) = 0                                     '报表行组织形式(0-居左 1-居中 2-居右)
  469.     
  470.     Call Scyxsjb(CxbbGrid)                               '生成报表数据
  471.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  472.   
  473.     If Not bbylte Then
  474.         Unload DY_Tybbyldy
  475.     End If
  476. End Sub
  477. '***********************************************************************************
  478. '[>>
  479. '填充网格
  480. Private Sub Window_State()
  481.     
  482.     If Me.AutoRedraw = False Then
  483.         Xt_Wait.Show
  484.         Xt_Wait.Refresh
  485.         
  486.         '加快显示速度
  487.         CxbbGrid.Redraw = False
  488.         
  489.         '生成查询结果
  490.         Call Sub_Query
  491.         
  492.         CxbbGrid.Redraw = True
  493.          
  494.         Xt_Wait.Hide
  495.     End If
  496.     Me.AutoRedraw = True
  497.     
  498. End Sub
  499. '<<]
  500. '***********************************************************************************