diff --git a/README.md b/README.md
index 02513b5..6f3f21e 100644
--- a/README.md
+++ b/README.md
@@ -2,3 +2,5 @@ EMR
===
EMR - Electronic Medical Record (for offshore vessels)
+
+You can create Patients and record his history and changes, we have a clean stock system to help you a best control.
diff --git a/files/.htaccess b/files/.htaccess
new file mode 100644
index 0000000..ba721c1
--- /dev/null
+++ b/files/.htaccess
@@ -0,0 +1,3 @@
+#Options +FollowSymLinks
+#RewriteEngine on
+#RewriteRule ^history history.php
\ No newline at end of file
diff --git a/files/authorization.php b/files/authorization.php
index 89ae045..a63b117 100755
--- a/files/authorization.php
+++ b/files/authorization.php
@@ -9,8 +9,10 @@
require_once 'database_engine/mysql_engine.php';
-$grants = array('guest' =>
- array()
+$grants = array('guest' => array(
+ 'crew' => new DataSourceSecurityInfo(true, false, false,false),
+ 'history' => new DataSourceSecurityInfo(true, false, false, false),
+ )
,
'defaultUser' =>
array('crew' => new DataSourceSecurityInfo(false, false, false, false),
@@ -94,7 +96,7 @@
'stock_refresh' => new DataSourceSecurityInfo(false, false, false, false))
);
-$appGrants = array('guest' => new DataSourceSecurityInfo(false, false, false, false),
+$appGrants = array('guest' => new DataSourceSecurityInfo(false, false,false,false),
'defaultUser' => new DataSourceSecurityInfo(false, false, false, false),
'admin' => new AdminDataSourceSecurityInfo(),
'medic' => new DataSourceSecurityInfo(true, true, true, true),
diff --git a/files/common_style.css b/files/common_style.css
index fef98e5..f092ef8 100755
--- a/files/common_style.css
+++ b/files/common_style.css
@@ -383,8 +383,6 @@ div.page_list
font-size: 8pt;
text-decoration: none;
position: relative;
- top: -10px;
- left: 5px;
}
div.page_navigator #current_page
diff --git a/files/components/advanced_search_page.php b/files/components/advanced_search_page.php
index 1e95062..0bc5460 100755
--- a/files/components/advanced_search_page.php
+++ b/files/components/advanced_search_page.php
@@ -288,7 +288,7 @@ protected function CreateEditorControl()
{
return new TextEdit(
StringUtils::ReplaceIllegalPostVariableNameChars($this->GetFieldName()) . // TODO move this logic to editors
- '_value');
+ '_value', 15);
}
protected function CreateSecondEditorControl()
diff --git a/files/components/captions.php b/files/components/captions.php
index 3331b37..ab336bf 100755
--- a/files/components/captions.php
+++ b/files/components/captions.php
@@ -14,7 +14,7 @@
if (isset($_GET['lang']))
{
$lang = substr($_GET['lang'], 0, 2);
- setcookie("lang", $lang, time()+3600);
+ setcookie("lang", $lang, time()+(60 * 60 * 24 * 60));
if (file_exists("components/lang.".$lang.".php"))
include_once("lang.".$lang.".php");
@@ -24,6 +24,7 @@
elseif (isset($_COOKIE['lang']))
{
$lang = substr($_COOKIE['lang'], 0, 2);
+ setcookie("lang", $lang, time()+(60 * 60 * 24 * 60));
if (file_exists("components/lang.".$lang.".php"))
include_once("lang.".$lang.".php");
else
@@ -55,6 +56,7 @@ public function GetEncoding() { return $this->pageEncoding; }
private function GetCaptionByName($name)
{
$result = eval('global $c'.$name.'; return $c'.$name.';');
+ if ($result == '') return $name;
return ConvertTextToEncoding($result, 'UTF-8', $this->pageEncoding);
}
diff --git a/files/components/default_lang.php b/files/components/default_lang.php
index 3594442..2fc279c 100755
--- a/files/components/default_lang.php
+++ b/files/components/default_lang.php
@@ -124,6 +124,53 @@
$cInlineEdit = 'Inline edit';
$cCancel = 'Cancel';
$cCommit = 'Commit';
-
-
+$cCrew = 'Crew';
+$cHistory = 'History';
+$cStock = 'Stock';
+$cStock_Expiry = 'Stock Expiry';
+$cStock_Refresh = 'Stock Refresh';
+$cOpen_in_new_page = 'Open in new page';
+$cFirst_Name = 'First Name';
+$cMiddle_Name = 'Middle Name';
+$cLast_Name = 'Last Name';
+$cDob = 'Dob';
+$cRank = 'Rank';
+$cSex = 'Sex';
+$cCompany = 'Company';
+$cAlcohol = 'Alcohol';
+$cSmoking = 'Smoking';
+$cAllergies = 'Allergies';
+$cMedication = 'Medication';
+$cImmunization = 'Immunization';
+$cInfo = 'Info';
+$cPid = 'Pid';
+$cY = 'Y';
+$cN = 'N';
+$cDate = 'Date';
+$cpatient = 'patient';
+$cComplaint = 'Complaint';
+$cExamination = 'Examination';
+$cDiagnose = 'Diagnose';
+$cmedicine = 'medicine';
+$cQty = 'Qty';
+$cPage = 'Page';
+$cCategory = 'Category';
+$cGeneric_Name = 'Generic Name';
+$cDescription = 'Description';
+$cMin_Stock = 'Min Stock';
+$cRemarks = 'Remarks';
+$cPacking = 'Packing';
+$cStock1 = 'Stock1';
+$cExpiry1 = 'Expiry1';
+$cStock2 = 'Stock2';
+$cExpiry2 = 'Expiry2';
+$cStock3 = 'Stock3';
+$cExpiry3 = 'Expiry3';
+$cStock4 = 'Stock4';
+$cExpiry4 = 'Expiry4';
+$cStock5 = 'Stock5';
+$cExpiry5 = 'Expiry5';
+$cBadUserCombination = "The username/password combination you entered was invalid.";
+$cEmptyUserName = 'The username field is empty';
+$cEmptyPassword = 'The password field is empty';
?>
diff --git a/files/components/error_utils.php b/files/components/error_utils.php
index 62acc41..3f92a40 100755
--- a/files/components/error_utils.php
+++ b/files/components/error_utils.php
@@ -75,7 +75,14 @@ public function GetContentEncoding() { return $this->parentPage->GetContentEncod
public function GetHeader() { return $this->parentPage->GetHeader(); }
public function GetMessage() { return $this->message; }
public function GetDescription() { return $this->description; }
-
+ public function GetShowPageList() {return false;}
+ public function GetPrinterFriendlyAvailable() {return false; }
+ public function GetExportToExcelAvailable() {return false;}
+ public function GetExportToWordAvailable(){return false;}
+ public function GetExportToXmlAvailable(){return false;}
+ public function GetExportToCsvAvailable(){return false;}
+ public function GetExportToPdfAvailable(){return false;}
+ public function GetShowUserAuthBar(){return false;}
public function Accept($renderer)
{
$renderer->RenderCustomErrorPage($this);
diff --git a/files/components/grid/columns.php b/files/components/grid/columns.php
index c73f2dc..20be950 100755
--- a/files/components/grid/columns.php
+++ b/files/components/grid/columns.php
@@ -280,13 +280,16 @@ private function GetSortCaption($currentOrderType = null)
switch($currentOrderType)
{
case otAscending:
- return ' ';
+ //return ' ';
+ return ' ';
break;
case otDescending:
- return ' ';
+ return ' ';
+ //return ' ';
break;
default:
- return ' ';
+ //return ' ';
+ return ' ';
break;
}
}
diff --git a/files/components/lang.es.php b/files/components/lang.es.php
new file mode 100644
index 0000000..a8da03f
--- /dev/null
+++ b/files/components/lang.es.php
@@ -0,0 +1,176 @@
+
+
No estas en sesión. Dirígete a Iniciar Sesión e intenta de nuevo.
+No tienes suficientes privilegios para ejecutar operaciones.
+';
+$cClientValidationsErrors = 'Errores:';
+$cSaveNewRecord = 'Insertar';
+$cBackToList = 'Volver a lista';
+$cInsertRecord = 'Insertar registro';
+$cRequiredField = 'Campo requerido';
+$cSave = 'Guardar';
+$cSetNull = 'Asignar vació';
+$cSetDefault = 'Asignar valor por defecto';
+$cAdvancedSearch = 'Búsqueda avanzada';
+$cSearchFor = 'Buscar por';
+$cAllConditions = 'Todas las condiciones';
+$cAnyCondition = 'Cualquier condición';
+$cApplyAdvancedFilter = 'Aplicar';
+$cResetAdvancedFilter = 'Reiniciar';
+$cPageList = 'Lista de páginas';
+$cApplySimpleFilter = 'Aplicar';
+$cResetSimpleFilter = 'Reiniciar';
+$cMasterRecord = 'Registro maestro';
+$cReturnFromDetailToMaster = 'regresar a lista';
+$cAddNewRecord = 'Agregar nuevo';
+$cDeleteSelected = 'Borrar seleccionado';
+$cPageNumbetOfCount = 'Pág.No. {$current_page} de {$page_count}';
+$cDelete = 'Borrar';
+$cExportToExcel = 'Exportar a Excel';
+$cExportToWord = 'Exportar a Word';
+$cExportToXml = 'Exportar a Xml';
+$cExportToCsv = 'Exportar a Csv';
+$cExportToPdf = 'Exportar a Pdf';
+$cPrintCurrentPage = 'Imprimir página actual';
+$cPrintAllPages = 'Imprimir todas las páginas';
+$cCurrentPage = 'Página actual';
+$cPrinterFriendly = 'Printer friendly';
+$cView = 'Ver';
+$cEdit = 'Editar';
+$cCopy = 'Copiar';
+$cKeepImage = 'Mantener';
+$cRemoveImage = 'Remover';
+$cReplaceImage = 'Reemplazar';
+$cFieldValueRequiredErrorMsg = 'El valor del campo "%s" es requerido';
+$cLoggedInAs = 'Inicio sesión como';
+$cYouAreNotLoggedIn = 'No ha iniciado sesión';
+$cNoDataToDisplay = 'No hay registros para mostrar';
+$cRefresh = 'Refrescar';
+$cBinaryDataCanNotBeExportedToXls = 'Datos binarios no pueden ser exportados';
+$cDetailPreview = 'Detalle de vista previa';
+$cShownFirstMofNRecords = 'Mostrar primero {$first_record_count} de {$total_record_count} registros';
+$cFullView = 'Vista completa ';
+$cRecordsMtoKFromN = 'Registros %s a %s de %s';
+$cLogin = 'Inicio de sesión';
+$cUsername = 'Usuario';
+$cPassword = 'Password';
+$cRememberMe = 'Recordarme';
+$cLoginTitle = 'Inicio de sesión';
+$cPrint = 'Imprimir';
+$cExport = 'Exportar';
+$cmore = 'más';
+$cCloseWindow = 'Cerrar ventana';
+$cBack = 'Volver';
+$cError = 'Error';
+$cShowErrorDetails = 'Mostrar detalles';
+$cCriticalErrorSuggestions = 'Un error inesperado ha ocurrido. esto puede ser debido a una de las siguientes razones:
+Intentas insertar datos incorrectos o ejecutar operaciones ilegales,
+La conección con el servidor se ha perdido.
+ ';
+$cNot = 'No';
+$cShowHideNavbar = 'Mostrar/Ocultar menu';
+$cFirst = 'Primero(a)';
+$cLast = 'Ultimo(a)';
+$cequals = 'igual';
+$cdoesNotEquals = 'no es igual';
+$cisLessThan = 'es menor que';
+$cisLessThanOrEqualsTo = 'es menor que o igual a';
+$cisGreaterThan = 'mas grande que';
+$cisGreaterThanOrEqualsTo = 'mas grande que o igual a';
+$cLike = 'Es Como';
+$cAnyField = 'Cualquier campo';
+$cbetween = 'entre';
+$cisBlank = 'esta en blanco';
+$cisNotBlank = 'no esta en blanco';
+$cAll = 'Todo';
+
+$cLogout = 'Salir de sesión';
+$cStartsWith = 'Comienza con';
+$cEndsWith = 'Termina con';
+$cContains = 'Contiene';
+$cSearchCondtitions = 'Condiciones de búsqueda';
+$cGuestAccessDenied = 'Acceso de invitado esta negada';
+$cUsernamePasswordWasInvalid = 'La combinación de usuario/password que entraste fue invalida.';
+
+$cErrorsDuringUpdateProcess = 'Un error ocurrió durante actualización:';
+$cErrorsDuringInsertProcess = 'Un error ocurrió durante inserción:';
+$cErrorsDuringDeleteProcess = 'Un error ocurrió durante borrado:';
+$cErrorsDuringDataRetrieving = 'Recuperando datos de errores:';
+
+$cFileSizeExceedMaxSizeForField = 'Tamaño máximo de archivo excedido para el campo %s (Tamaño actual del archivo: %s, Tamaño máximo del archivo: %s) ';
+$cImageSizeExceedMaxSizeForField = 'Tamaño máximo de imagen excedido para el campo %s (Dimensiones actuales de imagen: %dx%d, tamaño máximo de archivo: %dx%d) ';
+
+$cActions = 'Acciones';
+$cPleaseSelect = 'Por favor selecciona...';
+$cPrintOneRecord = 'Imprimir registro';
+
+$cChangePageSizeText = 'Total registros contados: {$row_count}.';
+$cChangePageSizeTitle = 'Cambiar contador de registros por página';
+$cCustomizePageSize = '{$rec_count_per_page} registros por página';
+$cRecordsPerPage = 'Registros por página';
+$cTotalPages = 'Páginas totales';
+$cUseCustomPageSize = 'Usar valor personalizado';
+
+$cEmptyFilter_MessageTitle = 'filtro esta vacío';
+$cEmptyFilter_Message = 'Por favor llenar al menos un campo de búsqueda.';
+$cAddNewRecordInline = 'Agregar en linea';
+$cInlineEdit = 'Edición en linea';
+$cCancel = 'Cancelar';
+$cCommit = 'Cometer';
+$cCrew = 'Pacientes';
+$cHistory = 'Historial';
+$cStock = 'Existencia';
+$cStock_Expiry = 'Existencia expirada';
+$cStock_Refresh = 'Actualizar Existencia';
+$cOpen_in_new_page = 'Abrir en nueva página';
+$cFirst_Name = 'Nombre';
+$cMiddle_Name = 'Segundo Nombre';
+$cLast_Name = 'Apellido';
+$cDob = 'FdN';
+$cRank = 'Puesto';
+$cSex = 'Genero';
+$cCompany = 'Compañía';
+$cAlcohol = 'Alcohol';
+$cSmoking = 'Fuma';
+$cAllergies = 'Alergias';
+$cMedication = 'Medicación';
+$cImmunization = 'Inmune';
+$cInfo = 'Información';
+$cPid = 'Pid';
+$cY = 'Si';
+$cN = 'No';
+$cDate = 'Fecha';
+$cpatient = 'Paciente';
+$cComplaint = 'Molestia';
+$cExamination = 'Revisión médica';
+$cDiagnose = 'Diagnostico';
+$cmedicine = 'Medicina';
+$cQty = 'Cant.';
+$cPage = 'Página';
+$cCategory = 'Categoría';
+$cGeneric_Name = 'Nombre Genérico';
+$cDescription = 'Descripción';
+$cMin_Stock = 'Existencia min.';
+$cRemarks = 'Observación';
+$cPacking = 'Embalaje';
+$cStock1 = 'Almacen1';
+$cExpiry1 = 'Expiración1';
+$cStock2 = 'Almacen2';
+$cExpiry2 = 'Expiración2';
+$cStock3 = 'Almacen3';
+$cExpiry3 = 'Expiración3';
+$cStock4 = 'Almacen4';
+$cExpiry4 = 'Expiración4';
+$cStock5 = 'Almacen5';
+$cExpiry5 = 'Expiración5';
+$cBadUserCombination = "La combinación de usuario/password capturada es invalida.";
+$cEmptyUserName = 'El campo "usuario" esta vacío';
+$cEmptyPassword = 'El campo "password" esta vacío';
+?>
diff --git a/files/components/lang.php b/files/components/lang.php
index a9028d5..2fc279c 100755
--- a/files/components/lang.php
+++ b/files/components/lang.php
@@ -124,5 +124,53 @@
$cInlineEdit = 'Inline edit';
$cCancel = 'Cancel';
$cCommit = 'Commit';
-
+$cCrew = 'Crew';
+$cHistory = 'History';
+$cStock = 'Stock';
+$cStock_Expiry = 'Stock Expiry';
+$cStock_Refresh = 'Stock Refresh';
+$cOpen_in_new_page = 'Open in new page';
+$cFirst_Name = 'First Name';
+$cMiddle_Name = 'Middle Name';
+$cLast_Name = 'Last Name';
+$cDob = 'Dob';
+$cRank = 'Rank';
+$cSex = 'Sex';
+$cCompany = 'Company';
+$cAlcohol = 'Alcohol';
+$cSmoking = 'Smoking';
+$cAllergies = 'Allergies';
+$cMedication = 'Medication';
+$cImmunization = 'Immunization';
+$cInfo = 'Info';
+$cPid = 'Pid';
+$cY = 'Y';
+$cN = 'N';
+$cDate = 'Date';
+$cpatient = 'patient';
+$cComplaint = 'Complaint';
+$cExamination = 'Examination';
+$cDiagnose = 'Diagnose';
+$cmedicine = 'medicine';
+$cQty = 'Qty';
+$cPage = 'Page';
+$cCategory = 'Category';
+$cGeneric_Name = 'Generic Name';
+$cDescription = 'Description';
+$cMin_Stock = 'Min Stock';
+$cRemarks = 'Remarks';
+$cPacking = 'Packing';
+$cStock1 = 'Stock1';
+$cExpiry1 = 'Expiry1';
+$cStock2 = 'Stock2';
+$cExpiry2 = 'Expiry2';
+$cStock3 = 'Stock3';
+$cExpiry3 = 'Expiry3';
+$cStock4 = 'Stock4';
+$cExpiry4 = 'Expiry4';
+$cStock5 = 'Stock5';
+$cExpiry5 = 'Expiry5';
+$cBadUserCombination = "The username/password combination you entered was invalid.";
+$cEmptyUserName = 'The username field is empty';
+$cEmptyPassword = 'The password field is empty';
?>
diff --git a/files/components/page.php b/files/components/page.php
index 03e8469..cd05ed4 100755
--- a/files/components/page.php
+++ b/files/components/page.php
@@ -1,4 +1,5 @@
GetOperation();
@@ -1009,6 +1009,10 @@ public function RenderText($text)
{
return ConvertTextToEncoding($text, GetAnsiEncoding(), $this->GetContentEncoding());
}
+
+ public function GetShowPageList() {
+ return false;
+ }
}
$Application = new Application();
diff --git a/files/components/security/security_info.php b/files/components/security/security_info.php
index 4bf1d51..8690c37 100755
--- a/files/components/security/security_info.php
+++ b/files/components/security/security_info.php
@@ -10,12 +10,22 @@
function GetCurrentUser()
{
// TODO : use SuperGlobals
- if (isset($_COOKIE['username']))
- return $_COOKIE['username'];
+ if (isset($_COOKIE['scplu'])) {
+ $uar= json_decode($_COOKIE['scplu']);
+ return decryptIt($uar->u);
+ //return $_COOKIE['username'];
+ }
else
return 'guest';
}
+
+function decryptIt( $q ) {
+ $cryptKey = 'qJB0rGtIn5UB1xG03efyCp';
+ $qDecoded = rtrim( mcrypt_decrypt( MCRYPT_RIJNDAEL_256, md5( $cryptKey ), base64_decode( $q ), MCRYPT_MODE_CBC, md5( md5( $cryptKey ) ) ), "\0");
+ return( $qDecoded );
+}
+
// TODO : remove this function
function GetUserGrantInfo($username, $tableName)
{
diff --git a/files/components/security/tablebased_auth.php b/files/components/security/tablebased_auth.php
index 012c49b..a8763e7 100755
--- a/files/components/security/tablebased_auth.php
+++ b/files/components/security/tablebased_auth.php
@@ -78,6 +78,7 @@ class TableBasedIdentityCheckStrategy
private $passwordFieldName;
private $passwordEncryption;
private $userIdFieldName;
+ private $captions;
private $dataset;
@@ -116,6 +117,8 @@ public function __construct($connectionFactory, $connectionOptions, $tableName,
public function CheckUsernameAndPassword($username, $password, &$errorMessage)
{
+
+ $captions= new Captions('UTF-8');
$this->dataset->AddFieldFilter(
$this->userNameFieldName,
new FieldFilter($username, '=', true));
@@ -129,13 +132,13 @@ public function CheckUsernameAndPassword($username, $password, &$errorMessage)
}
else
{
- $errorMessage = 'The username/password combination you entered was invalid.';
+ $errorMessage = $captions->GetMessageString('BadUserCombination');
return false;
}
}
else
{
- $errorMessage = 'The username/password combination you entered was invalid.';
+ $errorMessage = $captions->GetMessageString('BadUserCombination');
return false;
}
}
diff --git a/files/components/security/user_grants_manager.php b/files/components/security/user_grants_manager.php
index 70cb68b..3fc4831 100755
--- a/files/components/security/user_grants_manager.php
+++ b/files/components/security/user_grants_manager.php
@@ -57,6 +57,7 @@ private function ApplyApplicationGrants(IDataSourceSecurityInfo $userGrants, $us
$userAppGrants = $this->applicationGrants[$userName];
else
$userAppGrants = new DataSourceSecurityInfo(false, false, false, false);
+
return SecurityInfoUtils::Merge(array($userAppGrants, $userGrants));
}
diff --git a/files/components/templates/advanced_search_control.tpl b/files/components/templates/advanced_search_control.tpl
index c4085ef..ebae1e7 100755
--- a/files/components/templates/advanced_search_control.tpl
+++ b/files/components/templates/advanced_search_control.tpl
@@ -1,122 +1,89 @@
-GetHidden()} style="display: none; height: 0px;"{/if}>
+
+
-
-
diff --git a/files/components/templates/common/base_page_template.tpl b/files/components/templates/common/base_page_template.tpl
index 22f7ad5..4782273 100755
--- a/files/components/templates/common/base_page_template.tpl
+++ b/files/components/templates/common/base_page_template.tpl
@@ -2,7 +2,8 @@
GetPageDirection() != null} dir="{$Page->GetPageDirection()}"{/if}>
-
+
+
{$HeadMetaTags}
{$Page->GetCaption()}
+
+
+
@@ -54,6 +61,10 @@
+
+
+
+
{$Page->GetCustomPageHeader()}
+ {literal}
+
+ {/literal}
{$ContentBlock}
{$DebugFooter}
diff --git a/files/components/templates/common/list_page_template.tpl b/files/components/templates/common/list_page_template.tpl
index 9475067..4864f20 100755
--- a/files/components/templates/common/list_page_template.tpl
+++ b/files/components/templates/common/list_page_template.tpl
@@ -6,7 +6,7 @@
{/capture}
{capture assign="ContentBlock"}
-
+
{if not $Page->GetVisualEffectsEnabled()}
@@ -16,188 +16,154 @@
{/if}
{include file='common/site_header.tpl'}
-
-
- {if $Page->GetShowUserAuthBar() or
- $Page->GetShowPageList() or
- $Page->GetPrinterFriendlyAvailable() or
- $Page->GetPrinterFriendlyAvailable() or
- $Page->GetExportToExcelAvailable() or
- $Page->GetExportToWordAvailable() or
- $Page->GetExportToXmlAvailable() or
- $Page->GetExportToCsvAvailable() or
- $Page->GetExportToPdfAvailable()}
-
-
-
- {$Captions->GetMessageString('ShowHideNavbar')}
-
-
-
- {/if}
-
-
-
- {if $Page->GetShowUserAuthBar() or
- $Page->GetShowPageList() or
- $Page->GetPrinterFriendlyAvailable() or
- $Page->GetPrinterFriendlyAvailable() or
- $Page->GetExportToExcelAvailable() or
- $Page->GetExportToWordAvailable() or
- $Page->GetExportToXmlAvailable() or
- $Page->GetExportToCsvAvailable() or
- $Page->GetExportToPdfAvailable()}
-
-
- {if $Page->GetShowUserAuthBar()}
-
- {if $Page->IsCurrentUserLoggedIn()}
-
{$Captions->GetMessageString('LoggedInAs')} :
-
{$Page->GetCurrentUserName()}
-
{$Captions->GetMessageString('Logout')}
- {else}
-
{$Captions->GetMessageString('YouAreNotLoggedIn')}
-
{$Captions->GetMessageString('Login')}
- {/if}
+
+
+
+
+
+ {if $Page->GetMessage() != null && $Page->GetMessage() != ''}
+
+
×
+
Error: {$Page->GetMessage()}
{/if}
-
- {if $Page->GetShowPageList()}
-
-
-
{$Captions->GetMessageString('CurrentPage')}::
-
-{if $Page->HasRss()}
-
-
-{$Page->GetShortCaption()}
-
-{else}
-
{$Page->GetShortCaption()}
-{/if}
- {$PageList}
+
+
+
{$Page->GetCaption()}
- {/if}
-
- {if $Page->GetPrinterFriendlyAvailable()}
-
+
+ {if $Page->GetPrinterFriendlyAvailable() or
+ $Page->GetExportToExcelAvailable() or
+ $Page->GetExportToWordAvailable() or
+ $Page->GetExportToXmlAvailable() or
+ $Page->GetExportToCsvAvailable() or
+ $Page->GetExportToPdfAvailable()}
+
+ {if $Page->GetAdvancedSearchAvailable()}
+ {if isset($AdvancedSearch) and !empty($AdvancedSearch)}
+ {strip}
+
+
+ {$Captions->GetMessageString('AdvancedSearch')}
+ {if $IsAdvancedSearchActive} *{/if}
+
+ {if $IsAdvancedSearchActive}
+
+ {$Captions->GetMessageString('SearchCondtitions')}:
+
+ {foreach from=$FriendlyAdvancedSearchCondition item=FieldCondition}
+
+ {$FieldCondition.Caption}
+ {$FieldCondition.Condition}
+
+ {/foreach}
+
+
+
+ {$Captions->GetMessageString('SearchCondtitions')}:
+
+
+ {foreach from=$FriendlyAdvancedSearchCondition item=FieldCondition}
+ {$FieldCondition.Caption}: {$FieldCondition.Condition}
+ {/foreach}
+
+
+ {/if}
+ {/strip}
+ {/if}
+ {/if}
+ {if $Page->GetAdvancedSearchAvailable()}{$AdvancedSearch}{/if}
- {/if}
-
- {if $Page->GetExportToExcelAvailable() or $Page->GetExportToWordAvailable() or $Page->GetExportToXmlAvailable() or $Page->GetExportToCsvAvailable() or $Page->GetExportToPdfAvailable()}
-
-
-
{$Captions->GetMessageString('Export')}
-
+
+ {if $Page->GetExportToExcelAvailable() or $Page->GetExportToWordAvailable() or $Page->GetExportToXmlAvailable() or $Page->GetExportToCsvAvailable() or $Page->GetExportToPdfAvailable()}
+
+
+
+
+ {$Captions->GetMessageString('Export')}
+
+
+
+
+
+ {/if}
+ {if $Page->GetPrinterFriendlyAvailable()}
+
+
+
+ {$Captions->GetMessageString('Print')}
+
+
+
+
+ {/if}
+
- {/if}
-
-
- {/if}
-
-
-
-
- {if $Page->GetMessage() != null && $Page->GetMessage() != ''}
-
{$Page->GetMessage()}
- {/if}
-
+ {/if}
- {if $Page->GetAdvancedSearchAvailable()}{$AdvancedSearch}{/if}
-
- {if $Page->GetGridHeader() != ''}
-
- {$Page->GetGridHeader()}
-
- {/if}
- {if $Page->GetShowTopPageNavigator()}
- {$PageNavigator}
- {/if}
-
- {if $IsAdvancedSearchActive}
-
- {/if}
-
- {$ContentBlock}
-
- {if $Page->GetShowBottomPageNavigator()}
- {$PageNavigator2}
- {/if}
-
-
-
-
-{$Page->GetFooter()}
+
+ {if $Page->GetShowTopPageNavigator()}
+ {$PageNavigator}
+ {/if}
+
+
+ {$ContentBlock}
+
+
+ {if $Page->GetShowBottomPageNavigator()}
+ {$PageNavigator2}
+ {/if}
+
+
+
+ {if $Page->GetGridHeader() != ''}
+
+ {$Page->GetGridHeader()}
+
+ {/if}
+ {if $IsAdvancedSearchActive}
+
+ {/if}
+ {$Page->GetFooter()}
+
{/capture}
diff --git a/files/components/templates/common/site_header.tpl b/files/components/templates/common/site_header.tpl
index 0bf127b..016a7e0 100755
--- a/files/components/templates/common/site_header.tpl
+++ b/files/components/templates/common/site_header.tpl
@@ -1,2 +1,77 @@
-
-
+
+
+
+
+
+ {if $Page->GetCaption() !== 'Login'}
+ {if $Page->GetShowUserAuthBar()}
+
+ {/if}
+ {/if}
+
+
\ No newline at end of file
diff --git a/files/components/templates/delete/grid.tpl b/files/components/templates/delete/grid.tpl
index 5719b59..33be2bf 100755
--- a/files/components/templates/delete/grid.tpl
+++ b/files/components/templates/delete/grid.tpl
@@ -1,32 +1,53 @@
-
-
+
+
+
+
+
+
+
{$Title}
+
+
+ {if $Grid->GetErrorMessage() != ''}
+
+
×
+
{$Captions->GetMessageString('ErrorsDuringDeleteProcess')}
+ {$Grid->GetErrorMessage()}
+
+ {/if}
+ {section name=RowGrid loop=$ColumnCount}
+
+
{$Columns[$smarty.section.RowGrid.index]->GetCaption()}
+
+ {$Row[$smarty.section.RowGrid.index]}
+
+
+ {/section}
+
+
+
+
+
diff --git a/files/components/templates/edit/grid.tpl b/files/components/templates/edit/grid.tpl
index 0fbe827..1eb0d42 100755
--- a/files/components/templates/edit/grid.tpl
+++ b/files/components/templates/edit/grid.tpl
@@ -1,54 +1,91 @@
{include file='common/edit_validation_script.tpl'}
+
+
+
+
+
+
{$Title}
+
+
+
+ {$Captions->GetMessageString('ClientValidationsErrors')}
+
+
+ {if $Grid->GetErrorMessage() != ''}
+
+
×
+
{$Captions->GetMessageString('ErrorsDuringUpdateProcess')}
+ {$Grid->GetErrorMessage()}
+
+ {/if}
+
{$Captions->GetMessageString('RequiredField')} *
+
+ {foreach key=HiddenValueName item=HiddenValue from=$HiddenValues}
+
+ {/foreach}
+ {foreach item=column from=$Grid->GetEditColumns() name=Columns}
+
+ {assign var="num_cols" value=2}
+ {if $column->GetShowSetToNullCheckBox()}
+ {if $num_cols++}{/if}
+ {/if}
+ {if $column->GetAllowSetToDefault()}
+ {if $num_cols++}{/if}
+ {/if}
+
+
{$column->GetCaption()}
+ {if not $column->GetAllowSetToNull()}
* {/if}
+
+
+ {$Renderer->Render($column)}
+
-
-
-{foreach key=HiddenValueName item=HiddenValue from=$HiddenValues}
-
-{/foreach}
-
- {$Title}
+ {if $column->GetShowSetToNullCheckBox()}
+
+
+
+ IsValueNull()} checked="checked"{/if}/>{$Captions->GetMessageString('SetNull')}
+
+
+
+ {/if}
+ {if $column->GetAllowSetToDefault()}
+
+
+
+ {$Captions->GetMessageString('SetDefault')}
+
+
+
+ {/if}
+
+ {/foreach}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/files/components/templates/editors/check_box.tpl b/files/components/templates/editors/check_box.tpl
index 1cb1c59..b883398 100755
--- a/files/components/templates/editors/check_box.tpl
+++ b/files/components/templates/editors/check_box.tpl
@@ -1,9 +1,9 @@
{if $RenderText}
-{if !$CheckBox->GetReadOnly()}
- Checked()} checked="checked"{/if}>
-{else}
-{if $CheckBox->Checked()}
-
-{/if}
-{/if}
+ {if !$CheckBox->GetReadOnly()}
+ Checked()} checked="checked"{/if}>
+ {else}
+ {if $CheckBox->Checked()}
+
+ {/if}
+ {/if}
{/if}
\ No newline at end of file
diff --git a/files/components/templates/editors/check_box_group.tpl b/files/components/templates/editors/check_box_group.tpl
index 859efde..d212231 100755
--- a/files/components/templates/editors/check_box_group.tpl
+++ b/files/components/templates/editors/check_box_group.tpl
@@ -1,11 +1,18 @@
{if $RenderText}
-{if !$CheckBoxGroup->GetReadOnly()}
-{foreach key=Value item=Name from=$CheckBoxGroup->GetValues()}
- IsValueSelected($Value)} checked="checked"{/if} />{$Name}
-{/foreach}
-{else}
-{foreach key=Value item=Name from=$CheckBoxGroup->GetValues()}
-{if $CheckBoxGroup->IsValueSelected($Value)}{$Name} {/if}
-{/foreach}
-{/if}
+ {if !$CheckBoxGroup->GetReadOnly()}
+ {foreach key=Value item=Name from=$CheckBoxGroup->GetValues()}
+
+
+ IsValueSelected($Value)} checked="checked"{/if} />
+ {$Name}
+
+
+ {/foreach}
+ {else}
+ {foreach key=Value item=Name from=$CheckBoxGroup->GetValues()}
+ {if $CheckBoxGroup->IsValueSelected($Value)}
+ {$Name}
+ {/if}
+ {/foreach}
+ {/if}
{/if}
\ No newline at end of file
diff --git a/files/components/templates/editors/combo_box.tpl b/files/components/templates/editors/combo_box.tpl
index ee2f2c2..4b0c25c 100755
--- a/files/components/templates/editors/combo_box.tpl
+++ b/files/components/templates/editors/combo_box.tpl
@@ -1,5 +1,5 @@
{if $RenderText}
-{if !$ComboBox->GetReadOnly()}
+{if !$ComboBox->GetReadOnly()}
{if $ComboBox->ShowEmptyValue()}
{$ComboBox->GetEmptyValue()}
{/if}
diff --git a/files/components/templates/editors/datetime_edit.tpl b/files/components/templates/editors/datetime_edit.tpl
index e56c6f5..b7c76b2 100755
--- a/files/components/templates/editors/datetime_edit.tpl
+++ b/files/components/templates/editors/datetime_edit.tpl
@@ -1,7 +1,12 @@
{if !$DateTimeEdit->GetReadOnly()}
{if $RenderText}
-
-...
+
+
+
+ ...
+
+
+
{/if}
{if $RenderScripts}
{if $RenderText}
diff --git a/files/components/templates/editors/text_edit.tpl b/files/components/templates/editors/text_edit.tpl
index 149f170..21218dc 100755
--- a/files/components/templates/editors/text_edit.tpl
+++ b/files/components/templates/editors/text_edit.tpl
@@ -1,2 +1,2 @@
-{if not $TextEdit->GetReadOnly()} GetPasswordMode()}type="password"{/if} class="sm_text" id="{$TextEdit->GetName()}" name="{$TextEdit->GetName()}" value="{$TextEdit->GetHTMLValue()}" {if $TextEdit->GetSize() != null}size="{$TextEdit->GetSize()}" style="width: auto;"{/if} {if $TextEdit->GetMaxLength() != null}maxlength="{$TextEdit->GetMaxLength()}"{/if}>{else}
+{if not $TextEdit->GetReadOnly()} GetPasswordMode()}type="password"{/if} class="form-control sm_text" id="{$TextEdit->GetName()}" name="{$TextEdit->GetName()}" value="{$TextEdit->GetHTMLValue()}" {if $TextEdit->GetSize() != null}size="{$TextEdit->GetSize()}" style="width: auto;"{/if} {if $TextEdit->GetMaxLength() != null}maxlength="{$TextEdit->GetMaxLength()}"{/if}>{else}
{if !$TextEdit->GetPasswordMode()}{$TextEdit->GetValue()}{else}*************{/if}{/if}
diff --git a/files/components/templates/insert/grid.tpl b/files/components/templates/insert/grid.tpl
index 25b922a..f29e5f4 100755
--- a/files/components/templates/insert/grid.tpl
+++ b/files/components/templates/insert/grid.tpl
@@ -1,53 +1,95 @@
{include file='common/edit_validation_script.tpl'}
+
+
-
-
-{foreach key=HiddenValueName item=HiddenValue from=$HiddenValues}
-
-{/foreach}
-
-
- {$Title}: {$Captions->GetMessageString('InsertRecord')}
-
- {if $Grid->GetErrorMessage() != ''}
-
-
- {$Captions->GetMessageString('ErrorsDuringInsertProcess')}
- {$Grid->GetErrorMessage()}
-
-
+
+
+
+
{$Title}: {$Captions->GetMessageString('InsertRecord')}
+
+
+
+ {$Captions->GetMessageString('ClientValidationsErrors')}
+
+
+ {if $Grid->GetErrorMessage() != ''}
+
+
×
+
{$Captions->GetMessageString('ErrorsDuringInsertProcess')}
+ {$Grid->GetErrorMessage()}
+
+ {/if}
+
{$Captions->GetMessageString('RequiredField')} *
+
+ {foreach key=HiddenValueName item=HiddenValue from=$HiddenValues}
+
+ {/foreach}
+
+
+
+ {foreach item=column from=$Grid->GetInsertColumns() name=Columns}
+
+ {assign var="num_cols" value=2}
+ {if $column->GetShowSetToNullCheckBox()}
+ {if $num_cols++}{/if}
+ {/if}
+ {if $column->GetAllowSetToDefault()}
+ {if $num_cols++}{/if}
+ {/if}
+
+
{$column->GetCaption()}
+ {if not $column->GetAllowSetToNull()}
* {/if}
+
+
+ {$Renderer->Render($column)}
+
+
+ {if $column->GetShowSetToNullCheckBox()}
+
+
+
+ IsValueNull()} checked="checked"{/if}/>{$Captions->GetMessageString('SetNull')}
+
+
+
+ {/if}
+ {if $column->GetAllowSetToDefault()}
+
+
+
+ {$Captions->GetMessageString('SetDefault')}
+
+
+
{/if}
-{foreach item=column from=$Grid->GetInsertColumns() name=Columns}
-
- {$column->GetCaption()}{if not $column->GetAllowSetToNull()}* {/if}
- {$Renderer->Render($column)}
-
-{if $column->GetShowSetToNullCheckBox()}
- IsValueNull()} checked="checked"{/if}/>{$Captions->GetMessageString('SetNull')}
-{/if}
-
-
-{if $column->GetAllowSetToDefault()}
- IsValueSetToDefault()} checked="checked"{/if}/>{$Captions->GetMessageString('SetDefault')}
-{/if}
-
-
-{/foreach}
-
-
- * - {$Captions->GetMessageString('RequiredField')}
-
-
-
-
-
{$Captions->GetMessageString('ClientValidationsErrors')}
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+ {/foreach}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/files/components/templates/list/composite_page_navigator.tpl b/files/components/templates/list/composite_page_navigator.tpl
index 935af42..390d636 100755
--- a/files/components/templates/list/composite_page_navigator.tpl
+++ b/files/components/templates/list/composite_page_navigator.tpl
@@ -1,9 +1,9 @@
-
-{foreach item=SubPageNavigator from=$PageNavigator->GetPageNavigators()}
-
-{$Renderer->Render($SubPageNavigator)}
-
-{/foreach}
+
+ {foreach item=SubPageNavigator from=$PageNavigator->GetPageNavigators()}
+
+ {$Renderer->Render($SubPageNavigator)}
+
+ {/foreach}
diff --git a/files/components/templates/list/custom_page_navigator.tpl b/files/components/templates/list/custom_page_navigator.tpl
index 8374a83..1066515 100755
--- a/files/components/templates/list/custom_page_navigator.tpl
+++ b/files/components/templates/list/custom_page_navigator.tpl
@@ -1,11 +1,11 @@
-
{$PageNavigator->GetCaption()}:
-{foreach item=PageNavigatorPage from=$PageNavigatorPages}
-{if $PageNavigatorPage->IsCurrent()}
-
{$PageNavigatorPage->GetPageCaption()}
-{else}
-
{$PageNavigatorPage->GetPageCaption()}
-{/if}
-{/foreach}
+
{$PageNavigator->GetCaption()}:
+ {foreach item=PageNavigatorPage from=$PageNavigatorPages}
+ {if $PageNavigatorPage->IsCurrent()}
+
{$PageNavigatorPage->GetPageCaption()}
+ {else}
+
{$PageNavigatorPage->GetPageCaption()}
+ {/if}
+ {/foreach}
diff --git a/files/components/templates/list/grid.tpl b/files/components/templates/list/grid.tpl
index 13ac01a..fd5c530 100755
--- a/files/components/templates/list/grid.tpl
+++ b/files/components/templates/list/grid.tpl
@@ -18,9 +18,7 @@
{if $UseFilter}
{strip}
-
+ {$SearchControl}
{/strip}
{/if}
@@ -36,8 +34,8 @@
EnableHighlightRowAtHover('.grid');
{/if}
-
-
UseAutoWidth()} style="width: {$Grid->GetWidth()}"{/if}>
+
+
UseAutoWidth()} style="width: {$Grid->GetWidth()}"{/if}>
{if $Grid->GetShowAddButton() or $AllowDeleteSelected or $Grid->GetShowUpdateLink()}
{strip}
@@ -211,5 +209,5 @@
{/if}
-
+
{if $AllowDeleteSelected}{/if}
\ No newline at end of file
diff --git a/files/components/templates/list/page_navigator.tpl b/files/components/templates/list/page_navigator.tpl
index 91e9591..06cc4f7 100755
--- a/files/components/templates/list/page_navigator.tpl
+++ b/files/components/templates/list/page_navigator.tpl
@@ -1,38 +1,37 @@
-
-{if $PageNavigator->GetPageCount() > 1}
-
- {assign var="current_page" value=$PageNavigator->CurrentPageNumber()}
- {assign var="page_count" value=$PageNavigator->GetPageCount()}
- {assign var="current_page_info_template" value=$Captions->GetMessageString('PageNumbetOfCount')}
- {eval var=$current_page_info_template}
-
-
-{foreach item=PageNavigatorPage from=$PageNavigatorPages}
-{if $PageNavigatorPage->IsCurrent()}
- {$PageNavigatorPage->GetPageCaption()}
-{else}
- {$PageNavigatorPage->GetPageCaption()}
-{/if}
-{/foreach}
-
-{/if}
+
+ {if $PageNavigator->GetPageCount() > 1}
+
+
+ {/if}
-
{if ($PageNavigator->GetPageCount() > 1) | ( ($PageNavigator->GetPageCount() <= 1) & ($PageNavId == 1) )}
-{if $PageNavigator->GetRowsPerPage() == 0}
- {assign var="rec_count_per_page" value=$PageNavigator->GetRowCount()}
-{else}
- {assign var="rec_count_per_page" value=$PageNavigator->GetRowsPerPage()}
-{/if}
-{eval var=$Captions->GetMessageString('CustomizePageSize')}
-
-
+ {assign var="rec_count_per_page" value=$PageNavigator->GetRowsPerPage()}
+ {if $PageNavigator->GetRowsPerPage() == 0}
+ {$rec_count_per_page =$PageNavigator->GetRowCount()}
+ {/if}
+
+
+ {eval var=$Captions->GetMessageString('CustomizePageSize')}
+
- {assign var="row_count" value=$PageNavigator->GetRowCount()}
-
{eval var=$Captions->GetMessageString('ChangePageSizeText')}
-
-
-
+
{/if}
diff --git a/files/components/templates/login_control.tpl b/files/components/templates/login_control.tpl
index e1eae21..6b3d9cc 100755
--- a/files/components/templates/login_control.tpl
+++ b/files/components/templates/login_control.tpl
@@ -1,43 +1,48 @@
-
\ No newline at end of file
+
+
+
+
+
+ {$Captions->GetMessageString('Login')}
+
+ {if $LoginControl->CanLoginAsGuest()}
+ {strip}
+
+ {/strip}
+ {/if}
+
+
+
+
+
+
diff --git a/files/components/templates/login_page.tpl b/files/components/templates/login_page.tpl
index e82b4f2..1d0d452 100755
--- a/files/components/templates/login_page.tpl
+++ b/files/components/templates/login_page.tpl
@@ -1,8 +1,14 @@
{capture assign="ContentBlock"}
{include file='common/site_header.tpl'}
-
- {$Renderer->Render($LoginControl)}
+
+
+
+
+ {$Renderer->Render($LoginControl)}
+
+
+
{/capture}
diff --git a/files/components/templates/page_list.tpl b/files/components/templates/page_list.tpl
index f1d57b6..2ec313b 100755
--- a/files/components/templates/page_list.tpl
+++ b/files/components/templates/page_list.tpl
@@ -1,10 +1,7 @@
- {$Captions->GetMessageString('PageList')}
-
-{foreach item=PageLink from=$PageList->GetPages()}
-{if $PageLink->GetShowAsText()}
- {$PageLink->GetCaption()}
-{else}
- {$PageLink->GetCaption()}
-{/if}
-{/foreach}
-
+ {foreach item=PageLink from=$PageList->GetPages()}
+
+
+ {$PageLink->GetCaption()}
+
+
+ {/foreach}
diff --git a/files/components/templates/print/page.tpl b/files/components/templates/print/page.tpl
index c523595..b359869 100755
--- a/files/components/templates/print/page.tpl
+++ b/files/components/templates/print/page.tpl
@@ -34,6 +34,10 @@ td
{rdelim}
+
+
{$Page->GetCaption()}
{$Grid}
diff --git a/files/components/templates/search_control.tpl b/files/components/templates/search_control.tpl
index d1b17a8..07e671a 100755
--- a/files/components/templates/search_control.tpl
+++ b/files/components/templates/search_control.tpl
@@ -1,29 +1,42 @@
-
-
-{foreach key=Name item=Value from=$SearchControl->GetHiddenValues()}
-
-{/foreach}
-
-
- {$Captions->GetMessageString('SearchFor')}:  
-
-{foreach key=FieldName item=FieldCaption from=$SearchControl->GetFieldsToFilter()}
- GetActiveFieldName() == $FieldName} selected{/if}>{$FieldCaption}
-{/foreach}
-
-
-
-{foreach key=FilterTypeIndex item=FilterTypeName from=$SearchControl->GetFilterTypes()}
- GetActiveFilterTypeName() == $FilterTypeIndex} selected{/if}>{$FilterTypeName}
-{/foreach}
-
-
-
-
-
-
-
-
+
+
+
+
+ {foreach key=Name item=Value from=$SearchControl->GetHiddenValues()}
+
+ {/foreach}
+
+
+
+ {$Captions->GetMessageString('SearchFor')}:
+
+ {foreach key=FieldName item=FieldCaption from=$SearchControl->GetFieldsToFilter()}
+ GetActiveFieldName() == $FieldName} selected{/if}>{$FieldCaption}
+ {/foreach}
+
+
+
+
+ {foreach key=FilterTypeIndex item=FilterTypeName from=$SearchControl->GetFilterTypes()}
+ GetActiveFilterTypeName() == $FilterTypeIndex} selected{/if}>{$FilterTypeName}
+ {/foreach}
+
+
+
+
+
+
+
+
+ {$Captions->GetMessageString('ApplySimpleFilter')}
+
+
+ {$Captions->GetMessageString('ResetSimpleFilter')}
+
+
+
+
+