2. Album status codes

2.1. Defined constants

2.1.1. Status: Hexadecimal position 1: 0x0000F

Table 2.1 Hexadecimal bit 1: status description (High level directory process status constants).
Row Name Value Comment Resulting action
1 NO_IMAGES -1 No media files in album’s directory

Nothing can be done.

First new media has to be added.

2 NO_PROCESSED_FILES, RPROC_FPROC_NOT_EXIST 0x00000 No media files in public and private directories. Public and private directories must be updated.
3 PROCESSED_FILES_ORIGINALS_KEPT 0x00001 Total media count in all public and private directories is equal to media count in location directory.

It is assumed that the media content is location and public/private directories are consistent. However, this is not yet a guarantee.

Check access dates of each location directory.

4 PROCESSED_FILES_ORIGINALS_ADD_REM 0x00002

Total media count in all location directory is different than in public and private directories

  1. New media files have been added,
  2. All media in locations directories have been removed, and new media have been added.
  3. Some media files have been removed from location directories.
  4. Some media files have been removed from location directories, and new media has been added or removed
  1. Processing needed: Check access dates of each location directory.
  2. Processing needed: Check access dates of each location directory.
  3. Nothing needs to be done.
  4. Processing needed: Check access dates of each location directory.
5 PROCESSED_FILES_ORIGINALS_REMOVED 0x00003 All media files in all location directories are removed (location directories are empty). Check access dates of each location directory.
6 LOCATION_DIR_HAS_CHANGED

0x00004

Bit 3

Media can be added or removed Used to determine type of update.
7 PUBLIC_DIR_HAS_CHANGED

0x00008

Bit 4

Media in public and/or private directories can be added or removed Used to determine type of update.
8 RESIZE_STAT_MASK 0x0000F Hexadecimal filter for obtaining value of first hexadecimal digit. Used to determine type of update.

For each location, the access times of the location directories (dirAccessTime) and public directories (resizedAccessTime) are compared with the access time of iminfo.xml file (iminfoAccessTime). If $dirAccessTime > $iminfoAccessTime than for that location the directory status is LOCATION_DIR_HAS_CHANGED. If $resizedAccessTime > $iminfoAccessTime than for that location the directory status is PUBLIC_DIR_HAS_CHANGED. Different location can have different status’ 🡺 the status of each directory is “binary or - ed”, i.e. in the decimal representation the numbers are added. A possible status code value is:

PROCESSED_FILES_ORIGINALS_ADD_REM | LOCATION_DIR_HAS_CHANGED | PUBLIC_DIR_HAS_CHANGED = b-0111=14

2.1.2. Status: Hexadecimal position 2: 0x000F0

Status indicator of:

  1. File fproc.txt (see row 1 in Table 2.2, and Section 3.1.1)
  2. Presence of media public/private and location directories (see row 2, and 3 in Table 2.2),
  3. File phpdefinition.xml (see row 4 in Table 2.2, and Section 3.1.3).
Table 2.2 Hexadecimal bit 2: status description (original intended for fproc.txt.
Row nr Name Value Comment
1 FPROC_STAT_EXIST 0x00010 File fproc.txt exists. This is checked by function rf_proc_stat.
2 FPROC_STAT_ALBUM_MEDIA_EXIST
0x00020
(0010)
There are media files: either in location, and or public / private directories. When this bit is set, also bit |F|F|F|●X●●|F| must be set (see also Table 4.8). This is checked by function CheckProcessStatus_X000FF.
3 FPROC_STAT_MEDIA_EXIST
0x00040
(0100)

There are media files either in location, and or public / private directories. Suggestion is to use it to indicate when there are media files in “simple” album structure (i.e. no phpdefinition.xml file, no structured and processed subdirectories.

This is checked by function CheckProcessStatus_X000FF.

4 FPROC_STAT_PHPDEF_EXIST 0x00080 (1000) File phpdefinition.xml exists (regular photo album). This is checked by function CheckProcessStatus_X000FF.
5 FPROC_STAT_MASK 0x000F0 (1111) Hexadecimal filter for obtaining value of second hexadecimal digit.
Table 2.3 Hexadecimal bit 2: status description of all possible values.
Value fproc exists Album media? General media phpdef. exists Comment

0000**** (15)

NO NO NO NO Has no meaning / empty album directory.

0001**** (1-16)

YES NO NO NO Has no meaning / empty album directory.

0010**** (2-32)

NO YES NO NO Has no meaning: general media bit must be set.

0011**** (3-48)

YES YES NO NO Has no meaning: general media bit must be set.

0100**** (4-64)

NO NO YES NO Album with only media, no description, no subdirectories.

0101**** (5-80)

YES NO YES NO Album with only media, no description, no subdirectories. Existence of file fproc.txt is not relevant

0110**** (6-96)

NO YES YES NO Has structured album media. Files fproc.txt and phpdefinition.xml probably accidentally removed or renamed.

0111**** (7-112)

YES YES YES NO Has structured album media. File phpdefinition.xml probably accidentally removed or renamed.

1000**** (8-128)

NO NO NO YES Probably preparing / creating new album. No media

1001**** (9-144)

YES NO NO YES Probably preparing / creating new album.

1010**** (10-160)

NO YES NO YES Has no meaning / empty album directory.

1011**** (11-176)

YES YES NO YES Has no meaning / empty album directory.

1100**** (12-192)

NO NO YES YES Album with only media, no subdirectories. Existence of files fproc.txt and phpdefinition.xml is not relevant.

1101**** (13-208)

YES NO YES YES Album with only media, no description, no subdirectories. Existence of files fproc.txt and phpdefinition.xml is not relevant.

1110**** (14-224)

NO YES YES YES Will result in updating album.

1111**** (15-240)

YES YES YES YES Normal situation for a fully processed album.

2.1.3. Status: Hexadecimal position 3: 0x00F00

Status code indicates how to update the information in file rproc.txt (info about deleted and or new media files).

Table 2.4 Hexadecimal bit 3: status description (original intended for rproc.txt): values higher than 1 indicate what info must be used for updating rproc.txt (1 code value per album).
Name Value Comment Resulting action
RPROC_STAT_EXIST 0x00100 [=256] File rproc.txt exists.  
RPROC_STAT_UPD_WITH_PUBPRIV_COUNT 0x00200 [=512] Info is used in media process status dialog message box (rproc tab). Information is used not for updating file rproc.txt, but for determining the message content in media process status dialog box (RPROC tab, see Fig. 2.2). For updating file rproc.txt, all iminfo file objects are used.
RPROC_STAT_UPD_WITH_LOC_IMAGE_COUNT 0x00400 [=1024] Info is used in media process status dialog message box (rproc tab).
RPROC_STAT_UPD_WITH_LOC_VIDEO_COUNT 0x00800 [=2048] Info is used in media process status dialog message box (rproc tab).
RPROC_STAT_MASK 0x00F00 Hexadecimal filter mask for obtaining value of third hexadecimal digit. Hexadecimal mask filter for 3rd digit.

2.1.4. Status: Hexadecimal position 4: 0x0F000

Status code will only change when file fproc.txt is deleted.

Table 2.5 Hexadecimal bit 4: status description: action code dictated by IMINFO.XML (🡺 code for each location directory)
Name Value Comment Resulting action
UPD_NOTHING 0x00000 Default value  
UPD_PUB_IMAGES 0x01000 [=4096] #Public images in iminfo.xml is larger than in public (Resized) directory. Update needed of public directory. Move or copy missing images to public.
UPD_PUB_VIDEOS 0x02000 [=8192] #Public videos in iminfo.xml is larger than in public (Resized) directory. Update needed of public directory. Move or copy missing videos to public.
UPD_PRV_IMAGES 0x04000 [=16384] #Private images in iminfo.xml is larger than in private (Resized/Private) directory Update needed of private directory. Move or copy missing images to private.
UPD_PRV_VIDEOS 0x08000 [=32768] #Private videos in iminfo.xml is larger than in private (Resized/Private) directory Update needed of private directory. Move or copy missing videos to private.

2.1.5. Status: Hexadecimal position 5: 0xF0000

Table 2.6 Hexadecimal bit 5: status description (1 code value per album).
Name Value Comment Resulting action
UPD_NOTHING 0x0**** Default value.  
RPROC_UPD_PUB_MEDIA 0x1**** #Public media in rproc.txt is larger than in public (Resized) directory. Update needed of public directory and iminfo.xml. Move or copy missing images to public dir.
RPROC_UPD_PRV_MEDIA 0x2**** #Private media in rproc.txt is larger than in private directory. Update needed of private directory and iminfo.xml. Move or copy missing videos to public dir.

2.1.6. Status: Summary

Table 2.7 Status summary.
Bit pos Name Value Comment
1 NO_PROCESSED_FILES, RPROC_FPROC_NOT_EXIST |F|F|F|F|0000| No media files in public and private directories.
1 PROCESSED_FILES_ORIGINALS_KEPT |F|F|F|F|0001| Total media count in all public and private directories is equal to media count in location directory.
1 PROCESSED_FILES_ORIGINALS_ADD_REM |F|F|F|F|0010|

Total media count in all location directory is different than in public and private directories:

  1. New media files have been added,
  2. All media in locations directories have been removed , and new media have been added.
  3. Media files have been removed from location directories.
  4. Media files have been removed from location directories, and new media has been added or removed
1 PROCESSED_FILES_ORIGINALS_REMOVED |F|F|F|F|0011| All media files in all location directories are removed (location directories are empty).
1 LOCATION_DIR_HAS_CHANGED |F|F|F|F|0100| Timestamp of location directory has changed (i.e. newer than timestamp of iminfo.xml. This means that media in the location directory can be added or removed.
1 PUBLIC_DIR_HAS_CHANGED |F|F|F|F|1000| Timestamp of public / private directory has changed ( i.e. newer than timestamp of iminfo.xml). This means that media in public and/or private directories can be added or removed.
2 FPROC_STAT_EXIST |F|F|F|0001|F| File fproc.txt exists. This is checked by function rf_proc_stat().
2 FPROC_STAT_ALBUM_MEDIA_EXIST |F|F|F|0010|F| There are media files: either in location, and or public / private directories. When this bit is set, also bit |F|F|F|●X●●|F| must be set (see also Table 4.8). This is checked by function CheckProcessStatus_X000FF().
2 FPROC_STAT_MEDIA_EXIST |F|F|F|0100|F| There are media files either in location, and or public / private directories. Suggestion is to use it to indicate when there are media files in “simple” album structure (i.e. no phpdefinition.xml file, no structured and processed subdirectories. This is checked by function CheckProcessStatus_X000FF().
2 FPROC_STAT_PHPDEF_EXIST |F|F|F|1000|F| File phpdefinition.xml exists (regular photo album). This is checked by function CheckProcessStatus_X000FF().
3 RPROC_STAT_EXIST |F|F|0001|F|F| File rproc.txt exists.
3 RPROC_STAT_UPD_WITH_PUBPRIV_COUNT |F|F|0010|F|F| Info is used in media process status dialog message box (rproc tab). Will result in update of rproc.txt.
3 RPROC_STAT_UPD_WITH_LOC_IMAGE_COUNT |F|F|0100|F|F| Info is used in media process status dialog message box (rproc tab). Will result in update of rproc.txt.
3 RPROC_STAT_UPD_WITH_LOC_VIDEO_COUNT |F|F|1000|F|F| Info is used in media process status dialog message box (rproc tab). Will result in update of rproc.txt.
4 UPD_NOTHING |F|0000|F|F|F| Default value.
4 UPD_PUB_IMAGES |F|0001|F|F|F| #Public images in iminfo.xml is larger than in public (Resized) directory. Will result in update of public/private directories.
4 UPD_PUB_VIDEOS |F|0010|F|F|F| #Public videos in iminfo.xml is larger than in public (Resized) directory. Will result in update of public/private directories.
4 UPD_PRV_IMAGES |F|0100|F|F|F| #Private images in iminfo.xml is larger than in private (Resized/Private) directory. Will result in update of public/private directories.
4 UPD_PRV_VIDEOS |F|1000|F|F|F| #Private videos in iminfo.xml is larger than in private (Resized/Private) directory. Will result in update of public/private directories.
5 UPD_NOTHING |0000|F|F|F|F| Default value.
5 RPROC_UPD_PUB_MEDIA |0001|F|F|F|F| #Public media in rproc.txt is larger than in public (Resized) directory. Will result in update of public/private directories.
5 RPROC_UPD_PRV_MEDIA |0010|F|F|F|F| #Private media in rproc.txt is larger than in private directory. Will result in update of public/private directories.

2.1.7. Transferred2SiteDir (transfer codes)

Each <media> tag in an iminfo.xml file has a sub-tag with key name <Transferred2SiteDir>. Possible values for this tag are given in Table 2.8. In a stable state, i.e. after an update the tag <Transferred2SiteDir> will have a positive value.

Table 2.8 Values for key Transferred2SiteDir in iminfo.xml. Negative values will result in media transfer action.
Name Value Comment Resulting action
TRANSFER_FIRST_TIME_SCHEDULED -100 Media is not transferred to site directory Transfer to public or private
TRANSFER2PRIVATE_AGAIN -2 Private media is deleted, but original is still available and will be transferred back. Transfer again to private directory.
TRANSFER2PUBLIC_AGAIN -1 Plubic media is deleted, but original is still available and will be transferred back. Transfer again to public directory.
TRANSFER_NONE 0 Media is not transferred to site directory (public or private). Nothing (ignore this media file) in generating album.
TRANSFER2PUBLIC 1 Media is transferred to public directory. Nothing
TRANSFER2PRIVATE 2 Media is transferred to private directory. Nothing

2.2. Resize status (?????)

What is the relation between rproc.txt and resize status of media?

Table 2.9 Combined status of iminfo.xml, rproc.txt, resize, and date.
iminfo.xml rproc.txt Resize status Dates Actions (admin user or local server)
OK OK 0x0001 OK No action required
OK Not OK 0x0001 OK Update rproc.txt
OK OK 0x0001 Not OK Check all media filenames in directories, iminfo.xml
OK Not OK 0x0001 Not OK

Update rproc.txt

Check all media filenames in directories, iminfo.xml

Not OK OK 0x0001 OK Update iminfo.xml
Not OK Not OK 0x0001 OK

Update iminfo.xml, and rproc.txt

This should not occur.

Not OK OK 0x0001 Not OK

Check all 🡺 update media

(Exchange of public and private media)

Not OK Not OK 0x0001 Not OK

Check all 🡺 update media

Addition or removal of media files.

2.3. Message codes for admin login dialog box

0xABC

2.4. Dialog message box: media process status

2.4.1. Tab creation functions

The dialog window with media processing status (see Fig. 2.2, Fig. 5.3, and Fig. 5.4) has different modes of display the status (stored in $dm variable). The different display modes of the media process dialog window are shown in Table 2.13. The content of the media process status tables is generated in the following functions:

Tab Process function See figure
Tab 1 (XML) check_mediacount_iminfo_files() Fig. 2.2
Tab 2 (RPROC) StatusInfoWindow() Fig. 2.3
Tab 3 (Dates) StatusInfoDirectoryAccessDates() Fig. 2.4
Tab 4 (New/Rem.media) StatusInfoNewOrDeletedMedia() Fig. 2.5
Table 2.10 PHP functions determining the content of the different tabs in media process dialog window as “normal user”. The meaning of the different display modii are given in Table 2.13.
Tab   prepareGalleryAjax.php media-update-progress.php (admin, album owner)
1 check_mediacount_iminfo_files() STAT_TABLE_MODE NA
2 StatusInfoWindow() No update needed detected: NO_STAT_DISPLAY_MODE
Update needed detected: STAT_TABLE_MODE
3 StatusInfoDirectoryAccessDates() STAT_TABLE_MODE
4 StatusInfoNewOrDeletedMedia() Not called
Table 2.11 PHP functions determining the content of the different tabs in media process dialog window as admin or album owner.
Tab   prepareGalleryAjax.php media-update-progress.php (admin, album owner)
1 check_mediacount_iminfo_files() Phase 1: STAT_TABLE_MODE  
Phase 2: NO_STAT_DISPLAY_MODE UPD_STAT_DISPLAY_MODE
2 StatusInfoWindow() STAT_DISPLAY_MODE UPD_STAT_DISPLAY_MODE
3 StatusInfoDirectoryAccessDates() STAT_TABLE_MODE UPD_STAT_DISPLAY_MODE
4 StatusInfoNewOrDeletedMedia() STAT_TABLE_MODE  
_images/Fig_DialogMsgBox_MediaProcessStatus_DivStruct.png

Fig. 2.1 Generic div stucture design of Media Process Dialog box.

2.4.2. Tab dialog message box for standard user and administrator

2.4.2.1. XML tab

_images/Fig_DialogMsgBox_MediaProcessStatus-NormalUser_Local.png
_images/Fig_DialogMsgBox_MediaProcessStatus_NormalUser(2).png
_images/Fig_DialogMsgBox_MediaProcessStatus_Admin(2).png
Website on local host (Access to manual website). Normal user (No access to manual website). Admin has access to manual.
_images/EmptyFigure.png

Fig. 2.2 Media Processing Status dialog window - tab 1. Left: website on local host. Center: “normal” user. Right: Admin user.

Table 2.12 XML tab column description.
Col Fully processed album Modified album
1

#xml pub (im) [=released]= #Resized img

XML: public cnt = released public cnt

#xml pub (im) [=released] <> #Resized img,

or XML: public cnt <> released public cnt

2

#xml pub (vid) [=released]= #Resized vid

XML: public cnt = released public cnt

#xml pub (vid) [=released] <> #Resized vid,

or XML: public cnt <> released public cnt

3

#xml priv (im) [=released]= #Private img

XML: private cnt = released private cnt

#xml priv (im) [=released] <> #Private img,

XML: private cnt <> released private cnt

4

#xml priv (vid) [=released]= #Private vid

XML: private cnt = released private cnt

#xml priv (vid) [=released] <> #Private vid

XML: private cnt <> released private cnt

2.4.2.2. RPROC tab

_images/Fig_DialogMsgBox_MediaProcessStatus_NUTab2_Local.png
_images/Fig_DialogMsgBox_MediaProcessStatus_NUTab2.png
_images/Fig_DialogMsgBox_MediaProcessStatus_AdminTab2.png
Website on local host (Access to manual website). Normal user (No access to manual website). Admin has access to manual.
_images/EmptyFigure.png

Fig. 2.3 Media Processing Status dialog window - tab 2. Left: website on local host. Center: “normal” user. Right: Admin user.

2.4.2.3. Dates tab

_images/Fig_DialogMsgBox_MediaProcessStatus_NUTab3.png
_images/Fig_DialogMsgBox_MediaProcessStatus_AdminTab3.png
_images/EmptyFigure.png

Fig. 2.4 Media Processing Status dialog window - tab 3. Left: “normal” user. Right: Admin user or local host

2.4.2.4. New/Removed media tab

_images/Fig_DialogMsgBox_MediaProcessStatus_NUTab4.png

Tab must be hided

_images/Fig_DialogMsgBox_MediaProcessStatus_AdminTab4.png
_images/EmptyFigure.png

Fig. 2.5 Media Processing Status dialog window - tab 4. Left: “normal” user. Right: Admin user or local host

2.4.3. Display modus definition

Table 2.13 Display modus ($dm) of media process dialog window in the directory thumbs overview webpage (see Fig. 4.6).
$dm Name of constant
Digit 1
Generate table
0: NO
1: YES
Digit 2
Dialog layout
0:No action btn
1: action btn
Digit 3
Echo mode
0: Direct echo
1: JSON echo
Digit 4
Dialog box
0: not visible
1: visible
Remark
01101 STAT_DISPLAY_MODE 1 1 0 1

Admin user / local server.

Tables are generated. Buttons are active. Dialog window is active.

01111 Not defined as constant 1 1 1 1 Admin user / local server + media update progress.
01011 UPD_STAT_DISPLAY_MODE 1 0 1 1

Admin user / local server.

Status info after updating media.

00110 NO_STAT_DISPLAY_MODE 0 1 1 0 Normal user, no indication that media processing update is needed. This is the most common situation.
00010 Not defined as constant 0 0 1 0 These values for $dm are not used.
00100 1 0
01000 STAT_TABLE_MODE 1 0 0 0 Normal user, there is indication that media processing update is needed (removal and or added media). Table is generated but not yet made visible.

2.4.4. statDialogB_htmlCode object - OBSOLETE

The variable $statDialogB_html is a 4-element array (one for each tab: see Table 2.10), where each element has the associative keys given in Table 2.14. $statDialogB_html has the same object definition as one of the associative key htmlStatCode_Object definitions of object infoDialogBox_Object. Each element contains the data for each tab in the media process status dialog box. The (object) variable is encoded to a JSON string and send back to the AJAX – XMLHttpRequest call (Javascript – Jquery), where it can be used to generate HTML code.

Table 2.14 statDialogB_htmlCode object definition: see also Table 4.19. statDialogB_htmlCode is part of infoDialogBox object.
Object key Data types Initialization Comment
DisplayModus O7777 INIT_STAT_DISPLAY_MODE Possible values: see Table 2.13.
htmlStringCode String “”

String with HTML code for each tab(4) in infoDialogBox: HTML code is generated:

  • in PHP code at the server side, or
  • updating innerHTML property of DOM element object at the client side.
CalledByFunction String “” Name of calling function for debug and development purposes.
dialogStatus Integer 0  
genTable Integer 0 (DisplayModus&01000)
jsList Array NULL Array with numerical key. Each element is a string with Javascript or Jquery commands to be executed.

2.5. filesystem.php

Listing 2.1 Macro definition part of file filesystem.php.
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?php
define('IMINFO_VERSION','20170525H2314');
define('DEBUG',true);
define('DEBUG_TEST',false);
define('RPROCFILE','rproc.txt');
define('FPROCFILE','fproc.txt');
define('LOCAL_ADDRESS','127.0.1.1');
define('VISITCNT_PER_EMAIL',50);
define('DS','/');
define('PUBLIC_DIR','Resized');
define('PRIVATE_DIR','Private');
define('MOVE_COPY_VIDEO','COPY');
define('MEDIA_FILES','*.{jpg,JPG,png,PNG,gif,GIF,webm,WEBM,mp4,MP4}');
define('IMAGE_FILES','*.{jpg,JPG,png,PNG,gif,GIF}');
define('VIDEO_FILES','*.{mp4,MP4,webm,WEBM}');
define('GALLERY_IMAGE_FILES','*-small.{jpg,JPG,png,PNG,gif,GIF}');
define('MEDIA_FILES_REGEX','/.*\.(jpg|JPG|png|PNG|gif|GIF|webm|WEBM|mp4|MP4)/');
define('IMAGE_FILES_REGEX','/.*\.(jpg|JPG|png|PNG|gif|GIF)/');
define('VIDEO_FILES_REGEX','/.*\.(mp4|MP4|webm|WEBM)/');
define('GAL_IMFILES_REGEX','/.*-small\.(jpg|JPG|png|PNG|gif|GIF)/');

define('NUMBER_OF_BITS_PER_DIGIT',4);
define('NO_PROCESSED_FILES',                 0x00000);
define('PROCESSED_FILES_ORIGINALS_KEPT',		0x00001);
define('PROCESSED_FILES_ORIGINALS_ADD_REM',	0x00002);//Orginals have been removed, new originals have been added.
define('PROCESSED_FILES_ORIGINALS_REMOVED',	0x00003);
define('LOCATION_DIR_HAS_CHANGED',				0x00004);//Access time of location dir more recent than access time of iminfo.xml file
define('PUBLIC_DIR_HAS_CHANGED',					0x00008);//Access time of Resized dir more recent than access time of iminfo.xml file
define('RESIZE_STAT_MASK',							0x0000F); 
define('RESIZE_STAT_MASK_2',						0x00003);
define('RESIZE_STAT_MASK_TIMECHANGE',			0x0000C);
define('RPROC_FPROC_NOT_EXIST',					0xFF00F);

define('FPROC_STAT_MASK',							0x000F0);
define('FPROC_STAT_EXIST',							0x00010);
define('FPROC_STAT_ALBUM_MEDIA_EXIST',			0x00020);
define('FPROC_STAT_MEDIA_EXIST',					0x00040);
define('FPROC_STAT_PHPDEF_EXIST',				0x00080);

define('RPROC_STAT_MASK', 							0x00F00);
define('RPROC_STAT_EXIST',							0x00100);
define('RPROC_STAT_UPD_WITH_PUBPRIV_COUNT',  0x00200);
define('RPROC_STAT_UPD_WITH_LOC_IMAGE_COUNT',0x00400);
define('RPROC_STAT_UPD_WITH_LOC_VIDEO_COUNT',0x00800);

define('UPD_NOTHING',   							0x00000);
define('UPD_MEDIA_MASK',							0x0F000);// Public and private update status
define('UPD_PUB_IMAGES',							0x01000);
define('UPD_PUB_VIDEOS',							0x02000);
define('UPD_PRV_IMAGES',							0x04000);
define('UPD_PRV_VIDEOS',							0x08000);

//define('PPUPD_IMAGES',0x1000);
//define('PPUPD_VIDEOS',0x2000);
//define('PPUPD_ALL_MEDIA',0x3000);
define('PUBLIC_PRIVATE_CHANGE',  0x04000); // NOT YET USED
define('NO_MEDIA_PROCESSING',    0x00);
define('ALL_MEDIA_PROCESSING',   0x01);
define('UPD_MEDIA_PROCESSING',   0x02);
define('MASK_MEDIA_PROCESSING',  0x0F);
define('RPROC_UPD_PUB_MEDIA',	   0x10000);
define('RPROC_UPD_PRV_MEDIA',		0x20000);
define('RPROC_UPD_MEDIA_MASK',	0xF0000);
define('MEDIA_UPDATE',true);
define('ADMIN_LOGIN_MASK',0xF0E0C);

define('OK',0);
define('REMOVE_RPROC',-1);
define('UPDATE_RPROC',-2);
define('UPDATE_PUBPRIV',-3);
define('BACKGROUND_COLOR_WARNING','#F90'); // ORANGE
define('BACKGROUND_COLOR_NOTIFY', '#FF0'); // YELLOW
define('BACKGROUND_COLOR_ALERT',  '#F00'); // RED
define('BACKGROUND_COLOR_OK',     '#0F0'); // GREEN
define('BACKGROUND_COLOR_NORMAL', '#FFF'); // WHITE
define('ADMINISTRATOR','admin');
define('UPDATE_IMINFO_NOFILE',		0x00);
define('UPDATE_IMINFO_EXISTS_OK',	0x01);
define('UPDATE_IMINFO_MEDIACOUNT',	0x02);
define('UPDATE_IMINFO_VERSION',		0x04);
define('UPDATE_IMINFO_MAXCOUNT', 	0x08);
define('UPDATE_IMINFO_IMAGEINFO',	0x10);
define('UPDATE_IMINFO_VIDEOINFO',	0x20);
define('UPDATE_IMINFO_MODUS_TXT', 001);
define('UPDATE_IMINFO_MODUS_XML', 002);
define('UPDATE_IMINFO_MODUS_KEEP_MODTIME',000);
define('UPDATE_IMINFO_MODUS_CHNG_MODTIME',010);
// NO MEDIA TRANSFER ACTION CODES
define('TRANSFER_NONE',0); // Media must not be transferred to either public or private directory
define('TRANSFER2PUBLIC',1); // Media is transferred to public directory:
define('TRANSFER2PRIVATE',2); // Media is transferred to private directory
// MEDIA TRANSFER ACTION CODES
define('TRANSFER2PUBLIC_AGAIN',-1); // Public media deleted. Original is available --> transfer again
define('TRANSFER2PRIVATE_AGAIN',-2); // Private media deleted. Original is available --> transfer again
define('TRANSFER_FIRST_TIME_SCHEDULED',-100);// Transfer new media
define('_FFMPEG','C:\Dany\Software\MultimediaProcessing\ffmpeg-20151116-git-1fe82ab-win64-static\bin\ffmpeg.exe');
define('CONST_SERVER_TIMEZONE',			'UTC');
define('CONST_SERVER_DATEFORMAT',		'YmdHis');
define('SYSTEM_ERROR_TMP_JSON',			0x0001);
define('SYSTEM_ERROR_TMP_MKDIR',			0x0002);
define('SYSTEM_ERROR_ALBUM_NO_DEF',		0x0010);
define('SYSTEM_ERROR_ALBUM_NO_MEDIA',	0x0020);
define('ECHO_MODE',0);
define('INIT_STAT_DISPLAY_MODE',			00000);
define('STAT_TABLE_MODE',					01000);
define('STAT_DISPLAY_MODE',				01101);
define('NO_STAT_DISPLAY_MODE',			00110);
define('UPD_STAT_DISPLAY_MODE',			01011);
define('JSON_SLEEP',125000);
define('TIME_RANK_PREFIX_LENGTH',4);
define('E_IMINFO_FS_W',-10); // File system write error: no permission, not enough memory,...) iminfo.xml not generated 
define('E_IMINFO_UPD_NOT_MODIFIED',-4); // iminfo.xml not modified
define('E_IMINFO_XML_2',-3); // Empty 'iminfo.xml' file
define('E_IMINFO_XML_1',-2); // No 'iminfo.xml' file
define('E_IMINFO_TXT_1',-1); // iminfo.xml not generated: no 'iminfo.txt' file.
define('E_IMINFO_TXT_2',0);  // iminfo.xml not generated: 'iminfo.txt' file is empty.
define('E_IMINFO_UPD_OK',1); // 'iminfo.xml' file exists and updated, original is renamed with timestamp
define('E_IMINFO_UPD_OK_B',2); // update of 'iminfo.xml' file is written to new file for test purpose
define('E_IMINFO_CRE_OK',3); // 'iminfo.xml' file is created from txt