<?php
  
IF (DB::GET_COLUMN("SELECT COUNT(`ID`) FROM `PHOTOS_DIR` WHERE `USER_ID` = '".$user['ID']."' AND `PRIVATE` = '3' AND `NAME` = 'Вложения' AND `ID_DIR` = '0' LIMIT 1") == 0) {
  
  DB::GET_ADD("INSERT INTO `PHOTOS_DIR` (`USER_ID`, `PRIVATE`, `NAME`, `ID_DIR`) VALUES ('".$user['ID']."', '3', 'Вложения', '0')");
  
}

IF (DB::GET_COLUMN("SELECT COUNT(`ID`) FROM `PHOTOS_DIR` WHERE `USER_ID` = '0' AND `PRIVATE` = '0' AND `NAME` = 'Системная папка' AND `ID_DIR` = '0' LIMIT 1") == 0) {
  
  DB::GET_ADD("INSERT INTO `PHOTOS_DIR` (`USER_ID`, `PRIVATE`, `NAME`, `ID_DIR`) VALUES ('0', '0', 'Системная папка', '0')");
  
}
  
?>