Print the Flag of the Arab Revolt! It seems flags are a trend now, so what better place to start an account? I thought bars could use a twist to them, so I found this flag.

Produce the following in the console output the fewest possible bytes:

+----------------------------------+
|XXXXX                             |
|XXXXXXXX                          |
|XXXXXXXXX-------------------------+
|XXXXXXXXXXX                       |
|XXXXXXXXXXX                       |
|XXXXXXXXX-------------------------+
|XXXXXXXX                          |
|XXXXX                             |
+----------------------------------+


This crude rendition of the flag is 36 x 10 characters. A trailing newline on the last line is optional. You may use any language you choose. If it is an obscure language, please post a link to the language in your answer.
SQL (PostgreSQL flavour), 284 244 232 210 175 bytes

A HUGE Thank You to @manatwork for essentially the whole thing now.
A nice verbose language that still came in under the byte size of the flag, with a bit of a margin :)
Basically builds the half of the flag with using parameters.  This is cross joined with 1 and -1 giving us both halfs of the flag and a means to order it by negating the number of #'s in the row.
SELECT rpad(rpad(L,X,'X'),35,P)||R FROM(VALUES('|',12,' ','|'),('|',10,'-','+'),('|',9,' ','|'),('|',6,' ','|'),('+',1,'-','+'))F(L,X,P,R),(values(-1),(1))G(O)ORDER BY(12-X)*O

Formatted and commented
SELECT rpad(rpad(L,X,'X'),35,P)||R --Build each row from parameters
FROM(VALUES           -- Parameters for each row
    ('|',12,' ','|'), -- Start Char, Num of #, Pad Char, End Char
    ('|',10,'-','+'),
    ('|',9,' ','|'),
    ('|',6,' ','|'),
    ('+',1,'-','+')
    )F(L,X,P,R),
    (values(-1),(1))G(O) -- Cross join with order modifier
ORDER BY(12-X)*O -- Order by modified number of #