Esempio n. 1
0
 function ProvinceList($http_post_vars, $sess, $sortBy, $sortOrder, $hideInactive)
 {
     global $auth;
     $this->sess = $sess;
     $this->user = $auth->auth;
     $this->formArray["uid"] = $auth->auth["uid"];
     $this->user = $auth->auth;
     // must be Super-User to access
     $pageType = "1%%%%%%%%%";
     if (!checkPerms($this->user["userType"], $pageType)) {
         header("Location: Unauthorized.php" . $this->sess->url(""));
         exit;
     }
     $this->sess = $sess;
     $this->tpl = new rpts_Template(getcwd(), "keep");
     $this->tpl->set_file("rptsTemplate", "ProvinceList.htm");
     $this->tpl->set_var("TITLE", "Province List");
     $this->tpl->set_var("Session", $this->sess->url(""));
     $this->formArray["sortBy"] = $sortBy;
     $this->formArray["sortOrder"] = $sortOrder;
     $this->formArray["hideInactive"] = $hideInactive;
     foreach ($http_post_vars as $key => $value) {
         $this->formArray[$key] = $value;
     }
 }
Esempio n. 2
0
 function OwnerPersonList($sess, $sortKey, $sortOrder, $page)
 {
     global $auth;
     $this->sess = $sess;
     $this->user = $auth->auth;
     $this->formArray["uid"] = $auth->auth["uid"];
     $this->user = $auth->auth;
     $this->formArray["sortKey"] = "TRIM(Person.lastName), TRIM(Person.firstName), TRIM(Person.middleName)";
     $this->formArray["sortOrder"] = "asc";
     $this->formArray["page"] = 1;
     //if($sortKey!="")
     //	$this->formArray["sortKey"] = $sortKey;
     if ($sortOrder != "") {
         $this->formArray["sortOrder"] = $sortOrder;
     }
     if ($page != "") {
         $this->formArray["page"] = $page;
     }
     // must be Super-User to access
     $pageType = "1%%%%%%%%%";
     if (!checkPerms($this->user["userType"], $pageType)) {
         header("Location: Unauthorized.php" . $this->sess->url(""));
         exit;
     }
     $this->tpl = new rpts_Template(getcwd(), "keep");
     $this->tpl->set_file("rptsTemplate", "OwnerPersonList.htm");
     $this->tpl->set_var("TITLE", "Owner Person List");
 }
Esempio n. 3
0
 function ODList($http_post_vars, $sess, $odID, $page, $searchKey, $barangay, $formAction, $sortBy, $sortOrder, $viewArchives, $transactionCode = "", $mergeBasketCSV)
 {
     global $auth;
     $this->sess = $sess;
     $this->user = $auth->auth;
     $this->formArray["uid"] = $auth->auth["uid"];
     $this->user = $auth->auth;
     // must have atleast AM-EDIT access
     $pageType = "%1%%%%%%%%";
     if (!checkPerms($this->user["userType"], $pageType)) {
         header("Location: Unauthorized.php" . $this->sess->url(""));
         exit;
     }
     $this->tpl = new rpts_Template(getcwd(), "keep");
     $this->tpl->set_file("rptsTemplate", "ODList.htm");
     $this->tpl->set_var("TITLE", "Consolidation > RPU List");
     $this->sess = $sess;
     $this->formArray["odID"] = $odID;
     $this->formArray["page"] = $page;
     $this->formArray["searchKey"] = $searchKey;
     $this->formArray["barangay"] = $barangay;
     $this->formArray["sortBy"] = $sortBy;
     $this->formArray["sortOrder"] = $sortOrder;
     $this->formArray["viewArchives"] = $viewArchives;
     $this->formArray["transactionCode"] = $transactionCode;
     $this->formArray["formAction"] = $formAction;
     $this->formArray["mergeBasketCSV"] = $mergeBasketCSV;
     $this->formArray["viewArchivesTitle"] = "";
     $this->formArray["archiveValue"] = "";
     $this->formArray["odIDArray"] = "";
     foreach ($http_post_vars as $key => $value) {
         $this->formArray[$key] = $value;
     }
 }
Esempio n. 4
0
 function TreasurySettingsEncode($http_post_vars, $sess, $formAction, $masterTables)
 {
     global $auth;
     $this->sess = $sess;
     $this->user = $auth->auth;
     $this->formArray["uid"] = $auth->auth["uid"];
     $this->user = $auth->auth;
     $this->masterTables = $masterTables;
     // must be Super-User to access
     $pageType = "1%%%%%%%%%";
     if (!checkPerms($this->user["userType"], $pageType)) {
         header("Location: Unauthorized.php" . $this->sess->url(""));
         exit;
     }
     $this->tpl = new rpts_Template(getcwd(), "keep");
     $this->tpl->set_file("rptsTemplate", "TreasurySettingsEncode.htm");
     $this->tpl->set_var("TITLE", "Treasury Settings");
     $this->formArray = array("formAction" => $formAction, "message" => "", "cutOff" => "");
     foreach ($http_post_vars as $key => $value) {
         $this->formArray[$key] = $value;
     }
     if ($this->formArray["discountPeriod_month"] != "" && $this->formArray["discountPeriod_month"] != "") {
         $dateStr = putPreZero($this->formArray["discountPeriod_month"]) . "-" . putPreZero($this->formArray["discountPeriod_day"]);
         $this->formArray["discountPeriod"] = $dateStr;
     }
 }
Esempio n. 5
0
 function GeneralRevision($http_post_vars, $http_get_vars, $sess)
 {
     //,$formAction,$totalArchived,$totalCreated,$message,$barang
     global $auth;
     // this will attempt to count "latest active RPUs" that have NOT undergone general revision for the
     // past X number of days from today
     $this->countBackDays = 30;
     $this->countBackDaysTimeStr = strtotime("-" . $this->countBackDays . " days");
     $this->sess = $sess;
     $this->user = $auth->auth;
     $this->formArray["uid"] = $auth->auth["uid"];
     $this->user = $auth->auth;
     // must be Super-User to access
     $pageType = "1%%%%%%%%%";
     if (!checkPerms($this->user["userType"], $pageType)) {
         header("Location: Unauthorized.php" . $this->sess->url(""));
         exit;
     }
     $this->userID = $auth->auth["uid"];
     $this->tpl = new rpts_Template(getcwd(), "keep");
     $this->tpl->set_file("rptsTemplate", "GeneralRevision.htm");
     $this->tpl->set_var("TITLE", "General Revision");
     $this->tpl->set_var("Session", $this->sess->url(""));
     $this->formArray = array("formAction" => $http_get_vars["formAction"], "barangayID" => $http_get_vars["barangayID"], "totalArchived" => $http_get_vars["totalArchived"], "totalCreated" => $http_get_vars["totalCreated"], "message" => $http_get_vars["message"], "countBackDays" => $this->countBackDays, "countBackDaysTimeStr" => $this->countBackDaysTimeStr, "progressLog" => $http_get_vars["progressLog"], "timerStart" => $http_get_vars["timerStart"], "timerEnd" => $http_get_vars["timerEnd"]);
     foreach ($http_post_vars as $key => $value) {
         $this->formArray[$key] = $value;
     }
 }
Esempio n. 6
0
 function setPageDetailPerms()
 {
     if (!checkPerms($this->user["userType"], "%%%1%%%%%%")) {
         // hide Blocks if userType is not at least TM-Edit
         $this->hideBlock("TreasuryMaintenanceLink");
     } else {
         $this->hideBlock("TreasuryMaintenanceLinkText");
     }
 }
Esempio n. 7
0
 function setPageDetailPerms()
 {
     if (!checkPerms($this->user["userType"], "%1%%%%%%%%")) {
         // hide Blocks if userType is not at least AM-Edit
         $this->tpl->set_var("ownerViewAccess", "viewOnly");
     } else {
         $this->tpl->set_var("ownerViewAccess", "view");
     }
 }
Esempio n. 8
0
 function setPageDetailPerms()
 {
     if (!checkPerms($this->user["userType"], "%1%%%%%%%%")) {
         // hide Blocks if userType is not at least AM-Edit
         $this->hideBlock("TransactionsLink");
     } else {
         $this->hideBlock("TransactionsLinkText");
     }
 }
Esempio n. 9
0
function compileCoffee($filename)
{
    global $coffee;
    // Check if we can write to the javascript file
    $jsfile = str_replace('.coffee', '.js', $filename);
    if (!checkPerms($jsfile, 'w')) {
        die("Can't write to javascript file!");
    }
    // Compile
    $cmd = $coffee . " -c " . escapeshellarg(getcwd() . '/' . $filename);
    exec($cmd);
}
Esempio n. 10
0
 function setPageDetailPerms()
 {
     if (!checkPerms($this->user["userType"], "%1%%%%%%%%")) {
         // hide Blocks if userType is not at least AM-Edit
         $this->hideBlock("SearchAddOwnerPersonLink");
         $this->hideBlock("SearchAddOwnerCompanyLink");
         $this->hideBlock("PropertyInfoEncodeLink");
         $this->tpl->set_var("ownerViewAccess", "viewOnly");
         $this->tpl->set_var("removeOwnerDisabled", "disabled");
     } else {
         $this->tpl->set_var("ownerViewAccess", "view");
         $this->tpl->set_var("removeOwnerDisabled", "");
     }
 }
Esempio n. 11
0
 function RPTREncode()
 {
     global $auth;
     $this->sess = $sess;
     $this->user = $auth->auth;
     $this->formArray["uid"] = $auth->auth["uid"];
     $this->user = $auth->auth;
     // must have atleast TM-EDIT access
     $pageType = "%%%1%%%%%%";
     if (!checkPerms($this->user["userType"], $pageType)) {
         header("Location: Unauthorized.php" . $this->sess->url(""));
         exit;
     }
     $this->tpl = new Template(getcwd());
     $this->tpl->set_var("uname", $this->user["uname"]);
     $this->tpl->set_var("today", date("F j, Y"));
 }
Esempio n. 12
0
 function TransactionsHome($sess)
 {
     global $auth;
     $this->sess = $sess;
     $this->user = $auth->auth;
     $this->formArray["uid"] = $auth->auth["uid"];
     $this->user = $auth->auth;
     // must have atleast AM-EDIT access
     $pageType = "%1%%%%%%%%";
     if (!checkPerms($this->user["userType"], $pageType)) {
         header("Location: Unauthorized.php" . $this->sess->url(""));
         exit;
     }
     $this->tpl = new rpts_Template(getcwd(), "keep");
     $this->tpl->set_file("rptsTemplate", "TransactionsHome.htm");
     $this->tpl->set_var("TITLE", "AM : Transactions");
 }
Esempio n. 13
0
 function OwnersList($sess)
 {
     global $auth;
     $this->sess = $sess;
     $this->user = $auth->auth;
     $this->formArray["uid"] = $auth->auth["uid"];
     $this->user = $auth->auth;
     // must be Super-User to access
     $pageType = "1%%%%%%%%%";
     if (!checkPerms($this->user["userType"], $pageType)) {
         header("Location: Unauthorized.php" . $this->sess->url(""));
         exit;
     }
     $this->tpl = new rpts_Template(getcwd(), "keep");
     $this->tpl->set_file("rptsTemplate", "OwnerList.htm");
     $this->tpl->set_var("TITLE", "Owner List");
 }
Esempio n. 14
0
 function RPTOPBatchEncode($http_post_vars, $formAction = "", $sess)
 {
     global $auth;
     $this->sess = $sess;
     $this->user = $auth->auth;
     $this->formArray["uid"] = $auth->auth["uid"];
     $this->user = $auth->auth;
     // must have atleast AM-EDIT access
     $pageType = "%1%%%%%%%%";
     if (!checkPerms($this->user["userType"], $pageType)) {
         header("Location: Unauthorized.php" . $this->sess->url(""));
         exit;
     }
     $this->tpl = new rpts_Template(getcwd(), "keep");
     $this->tpl->set_file("rptsTemplate", "RPTOPBatchEncode.htm");
     $this->tpl->set_var("TITLE", "Encode RPTOP by Batch");
     $this->formArray = array("rptopID" => $rptopID, "rptopNumber" => "", "taxableYear" => "", "cityAssessor" => "", "citytreasurer" => "", "cityAssessorID" => "", "citytreasurerID" => "", "stepNumber" => "01", "limit" => 5, "formAction" => $formAction);
     foreach ($http_post_vars as $key => $value) {
         $this->formArray[$key] = $value;
     }
 }
Esempio n. 15
0
 function AssessmentSettingsEncode($http_post_vars, $sess, $formAction)
 {
     global $auth;
     $this->sess = $sess;
     $this->user = $auth->auth;
     $this->formArray["uid"] = $auth->auth["uid"];
     $this->user = $auth->auth;
     // must be Super-User to access
     $pageType = "1%%%%%%%%%";
     if (!checkPerms($this->user["userType"], $pageType)) {
         header("Location: Unauthorized.php" . $this->sess->url(""));
         exit;
     }
     $this->tpl = new rpts_Template(getcwd(), "keep");
     $this->tpl->set_file("rptsTemplate", "AssessmentSettingsEncode.htm");
     $this->tpl->set_var("TITLE", "Assessment Settings");
     $this->formArray = array("formAction" => $formAction, "message" => "");
     foreach ($http_post_vars as $key => $value) {
         $this->formArray[$key] = $value;
     }
 }
Esempio n. 16
0
 function PurgeReceipt($http_post_vars, $formAction = "", $sess)
 {
     global $auth;
     $this->sess = $sess;
     $this->user = $auth->auth;
     $this->formArray["uid"] = $auth->auth["uid"];
     $this->user = $auth->auth;
     // must have atleast TM-EDIT access
     $pageType = "%%%1%%%%%%";
     if (!checkPerms($this->user["userType"], $pageType)) {
         header("Location: UnauthorizedPopup.php" . $this->sess->url(""));
         exit;
     }
     $this->tpl = new rpts_Template(getcwd(), "keep");
     $this->tpl->set_file("rptsTemplate", "PurgeReceipt.htm");
     $this->tpl->set_var("TITLE", "TM : Purge Receipt");
     $this->formArray = array("formAction" => $formAction);
     foreach ($http_post_vars as $key => $value) {
         $this->formArray[$key] = $value;
     }
 }
Esempio n. 17
0
File: home.php Progetto: armic/erpts
 function setPageDetailPerms()
 {
     // Check Admin Permissions
     if (!checkPerms($this->user["userType"], "1%%%%%%%%%")) {
         $this->hideBlock("AdminModuleLink");
     } else {
         $this->hideBlock("AdminModuleText");
     }
     // Check Assessor's Module Permissions
     if (!checkPerms($this->user["userType"], "%%1%%%%%%%")) {
         $this->hideBlock("AssessorsModuleLink");
     } else {
         $this->hideBlock("AssessorsModuleText");
     }
     // Check Treasurer's Module Permissions
     if (!checkPerms($this->user["userType"], "%%%%1%%%%%")) {
         $this->hideBlock("TreasurersModuleLink");
     } else {
         $this->hideBlock("TreasurersModuleText");
     }
 }
Esempio n. 18
0
 function eRPTSSettingsEncode($http_post_vars, $sess, $formAction)
 {
     global $auth;
     $this->sess = $sess;
     $this->user = $auth->auth;
     $this->formArray["uid"] = $auth->auth["uid"];
     $this->user = $auth->auth;
     // must be Super-User to access
     $pageType = "1%%%%%%%%%";
     if (!checkPerms($this->user["userType"], $pageType)) {
         header("Location: Unauthorized.php" . $this->sess->url(""));
         exit;
     }
     $this->tpl = new rpts_Template(getcwd(), "keep");
     $this->tpl->set_file("rptsTemplate", "eRPTSSettingsEncode.htm");
     $this->tpl->set_var("TITLE", "eRPTS Settings");
     $this->formArray = array("lguName" => "", "lguType" => "", "chiefExecutiveDesignation" => "", "chiefExecutiveFirstName" => "", "chiefExecutiveMiddleName" => "", "chiefExecutiveLastName" => "", "assessorDesignation" => "", "assessorFirstName" => "", "assessorMiddleName" => "", "assessorLastName" => "", "treasurerDesignation" => "", "treasurerFirstName" => "", "treasurerMiddleName" => "", "treasurerLastName" => "", "provincialAssessorDesignation" => "", "provincialAssessorFirstName" => "", "provincialAssessorMiddleName" => "", "provincialAssessorLastName" => "", "provincialTreasurerDesignation" => "", "provincialTreasurerFirstName" => "", "provincialTreasurerMiddleName" => "", "provincialTreasurerLastName" => "", "ordinanceNo" => "", "ordinanceDate" => "", "formAction" => $formAction);
     foreach ($http_post_vars as $key => $value) {
         $this->formArray[$key] = $value;
     }
 }
Esempio n. 19
0
 function MergeOwnerPersonConfirm($sess, $http_post_vars)
 {
     global $auth;
     $this->sess = $sess;
     $this->user = $auth->auth;
     $this->formArray["uid"] = $auth->auth["uid"];
     $this->user = $auth->auth;
     // must be Super-User to access
     $pageType = "1%%%%%%%%%";
     if (!checkPerms($this->user["userType"], $pageType)) {
         header("Location: Unauthorized.php" . $this->sess->url(""));
         exit;
     }
     $this->tpl = new rpts_Template(getcwd(), "keep");
     $this->tpl->set_file("rptsTemplate", "MergeOwnerPersonConfirm.htm");
     $this->tpl->set_var("TITLE", "Merge Owner Confirm");
     $this->formArray = array("personID" => "", "formAction" => $formAction);
     foreach ($http_post_vars as $key => $value) {
         $this->formArray[$key] = $value;
     }
 }
Esempio n. 20
0
 function FinalDemandLetterPrint($sess, $ownerID, $http_post_vars)
 {
     global $auth;
     $this->sess = $sess;
     $this->user = $auth->auth;
     $this->formArray["uid"] = $auth->auth["uid"];
     $this->user = $auth->auth;
     // must have atleast TM-VIEW access
     $pageType = "%%%%1%%%%%";
     if (!checkPerms($this->user["userType"], $pageType)) {
         header("Location: Unauthorized.php" . $this->sess->url(""));
         exit;
     }
     $this->tpl = new rpts_Template(getcwd(), "keep");
     $this->tpl->set_file("rptsTemplate", "finalDemandLetter.xml");
     $this->tpl->set_var("TITLE", "TM : Final Demand Letter");
     $this->formArray["ownerID"] = $ownerID;
     $this->formArray["date"] = date("F d, Y");
     foreach ($http_post_vars as $key => $value) {
         $this->formArray[$key] = $value;
     }
 }
Esempio n. 21
0
 function ODDetails($http_post_vars, $sess, $odID)
 {
     global $auth;
     $this->sess = $sess;
     $this->user = $auth->auth;
     $this->formArray["uid"] = $auth->auth["uid"];
     $this->user = $auth->auth;
     // must have atleast AM-EDIT access
     $pageType = "%1%%%%%%%%";
     if (!checkPerms($this->user["userType"], $pageType)) {
         header("Location: Unauthorized.php" . $this->sess->url(""));
         exit;
     }
     $this->formArray["uid"] = $auth->auth["uid"];
     $this->tpl = new rpts_Template(getcwd(), "keep");
     $this->tpl->set_file("rptsTemplate", "ODDetails.htm");
     $this->tpl->set_var("TITLE", "Consolidation > RPU Details");
     $this->formArray["odID"] = $odID;
     foreach ($http_post_vars as $key => $value) {
         $this->formArray[$key] = $value;
     }
 }
Esempio n. 22
0
 function GeneralRevision($http_post_vars, $formAction, $totalArchived, $totalCreated, $sess)
 {
     global $auth;
     $this->sess = $sess;
     $this->user = $auth->auth;
     $this->formArray["uid"] = $auth->auth["uid"];
     $this->user = $auth->auth;
     // must be Super-User to access
     $pageType = "1%%%%%%%%%";
     if (!checkPerms($this->user["userType"], $pageType)) {
         header("Location: Unauthorized.php" . $this->sess->url(""));
         exit;
     }
     $this->userID = $auth->auth["uid"];
     $this->tpl = new rpts_Template(getcwd(), "keep");
     $this->tpl->set_file("rptsTemplate", "GeneralRevision.htm");
     $this->tpl->set_var("TITLE", "General Revision");
     $this->tpl->set_var("Session", $this->sess->url(""));
     $this->formArray = array("formAction" => $formAction, "totalArchived" => $totalArchived, "totalCreated" => $totalCreated);
     foreach ($http_post_vars as $key => $value) {
         $this->formArray[$key] = $value;
     }
 }
Esempio n. 23
0
 function setODListBlockPerms()
 {
     if (!checkPerms($this->user["userType"], "%1%%%%%%%%")) {
         $this->tpl->set_var("ownerViewAccess", "viewOnly");
         $this->tpl->set_var("odDetailsLinkLabel", "View");
     } else {
         $this->tpl->set_var("ownerViewAccess", "view");
         $this->tpl->set_var("odDetailsLinkLabel", "Edit");
     }
 }
Esempio n. 24
0
 function setMachineriesListBlockPerms()
 {
     if (!checkPerms($this->user["userType"], "%1%%%%%%%%")) {
         $this->tpl->set_block("MachineriesList", "EditMachineriesLink", "EditMachineriesLinkBlock");
         $this->tpl->set_var("EditMachineriesLinkBlock", "<s>Edit</s>");
     } else {
     }
 }
Esempio n. 25
0
 function setPageDetailPerms()
 {
     // hide Blocks from Treasurer
     $this->hideBlock("RPUIdentificationEncodeLink");
     $this->hideBlock("TDEncodeLink");
     $this->hideBlock("AddLandLink");
     $this->hideBlock("AddPlantsTreesLink");
     $this->hideBlock("AddImprovementsBuildingsLink");
     $this->hideBlock("AddMachineriesLink");
     $this->tpl->set_var("ownerViewAccess", "viewOnly");
     $this->tpl->set_var("removePropertyDisabled", "disabled");
     if (!checkPerms($this->user["userType"], "%%%1%%%%%%")) {
         // hide Blocks if userType is not at least TM-Edit
         $this->hideBlock("TreasuryMaintenanceLink");
     } else {
         $this->hideBlock("TreasuryMaintenanceLinkText");
     }
 }
Esempio n. 26
0
//require_once('collection/Collection.php');
require_once 'collection/Payment.php';
//require_once('collection/Due.php');
page_open(array("sess" => "rpts_Session", "auth" => "rpts_Challenge_Auth"));
$tpl = new rpts_Template();
$tpl->set_file(array(report => "collectionReport2Form.htm"));
global $auth;
$this->sess = $sess;
$this->user = $auth->auth;
$this->formArray["uid"] = $auth->auth["uid"];
$this->user = $auth->auth;
$tpl->set_var("uname", $this->user["uname"]);
$tpl->set_var("today", date("F j, Y"));
// must have atleast TM-VIEW access
$pageType = "%%%%1%%%%%";
if (!checkPerms($this->user["userType"], $pageType)) {
    header("Location: Unauthorized.php" . $this->sess->url(""));
    exit;
}
$tpl->set_block(report, LGUBLK, lguBlk);
$db = new DB_RPTS();
$sql = "select * from MunicipalityCity order by description;";
$db->query($sql);
for ($i = 0; $db->next_record(); $i++) {
    $tpl->set_var($db->Record);
    $tpl->parse(lguBlk, LGUBLK, true);
}
if ($municipalityCityID) {
    $tpl->set_var("selected_municipalityCityID_" . $municipalityCityID, "selected");
} else {
    $tpl->set_var("selected_municipalityCityID_" . $municipalityCityID, "");
Esempio n. 27
0
 function setRPTOPListBlockPerms()
 {
     if (!checkPerms($this->user["userType"], "%%%%1%%%%%")) {
         //
     } else {
         //
     }
 }
Esempio n. 28
0
function performTests()
{
    global $failed, $test_output, $action, $admin_db_failed, $public_db_failed, $admin_dsn, $public_dsn, $smarty, $global_dd, $alm_connect;
    $failed = false;
    $red = '<font color="red">FALL&Oacute;</font>';
    $green = '<font color="green">PAS&Oacute;</font>';
    # Old versions don't use admin_dsn public_dsn but simply a DSN constant
    if (!isset($admin_dsn)) {
        $admin_dsn = DSN;
    }
    if (!isset($public_dsn)) {
        $public_dsn = DSN;
    }
    $test_output .= "Probando conexion a base de datos (public)... ";
    unset($alm_connect[$public_dsn]);
    $db = almdata::connect($public_dsn);
    if (almdata::basicError($db, $public_dsn) || !$alm_connect[$public_dsn]) {
        $error_msg = almdata::basicError($db, $public_dsn);
        $test_output .= "{$red} <i>{$error_msg}</i><br/>";
        $failed = true;
        $public_db_failed = true;
    } else {
        $test_output .= "{$green}<br/>";
    }
    # Check admin connection last, so that we stay admin...
    $test_output = "Probando conexion a base de datos (admin)... ";
    unset($alm_connect[$admin_dsn]);
    $db = almdata::connect($admin_dsn);
    if (almdata::basicError($db, $admin_dsn) || !$alm_connect[$admin_dsn]) {
        $error_msg = almdata::basicError($db, $admin_dsn);
        $test_output .= "{$red} <i>{$error_msg}</i><br/>";
        $failed = true;
        $admin_db_failed = true;
    } else {
        $test_output .= "{$green}<br/>";
    }
    $test_output .= "Probando configuracion de PHP... ";
    if (get_cfg_var('short_open_tag') != 1) {
        $test_output .= "{$red} <i>short_open_tag = " . get_cfg_var('short_open_tag') . "</i><br/>";
        $failed = true;
    } else {
        $test_output .= "{$green}<br/>";
    }
    $test_output .= "Probando permisos de directorios... ";
    if (checkPerms($smarty->compile_dir) !== true) {
        $test_output .= "{$red} <i> {$smarty->compile_dir} = " . checkPerms($smarty->compile_dir) . "</i><br/>";
    }
    if (checkPerms($smarty->cache_dir) !== true) {
        $test_output .= "{$red} <i> {$smarty->cache_dir} = " . checkPerms($smarty->cache_dir) . "</i><br/>";
    }
    $logs_dir = ROOTDIR . '/logs';
    if (checkPerms($logs_dir) !== true) {
        $test_output .= "{$red} <i> {$logs_dir} = " . checkPerms($logs_dir) . "</i><br/>";
    }
    $files_dir = ROOTDIR . '/files';
    if (checkPerms($files_dir) !== true) {
        $test_output .= "{$red} <i> {$files_dir} = " . checkPerms($files_dir) . "</i><br/>";
    }
    if (checkPerms($smarty->compile_dir) === true && checkPerms($smarty->cache_dir) === true) {
        $test_output .= "{$green}<br/>";
    } else {
        $failed = true;
    }
    $test_output .= "Dónde está almidón? ";
    if (defined('ALMIDONDIR')) {
        $test_output .= '<font color="green">' . ALMIDONDIR . '</font><br/>';
    } else {
        $failed = true;
        $test_output .= $red;
    }
    $test_output .= "BD Almidonizada? ";
    list($type, $tmp) = preg_split('/:\\/\\//', $admin_dsn);
    if ($type == 'pgsql') {
        $sqlcmd = "SELECT relname FROM pg_class WHERE  pg_class.relkind = 'r' AND pg_class.relname LIKE 'alm_%'";
    } elseif ($type == 'mysql') {
        $sqlcmd = "SHOW TABLES LIKE 'alm_%';";
    }
    $data = new Data();
    $var = @$data->getList($sqlcmd);
    if (count($var) >= 5) {
        $test_output .= '<font color="green">' . print_r($var, 1) . '</font>';
    } else {
        #$failed = true;
        $test_output .= $red;
    }
    if ($failed) {
        $action = 'failed';
        $test_output .= '<br/><br/><font color="red">Por favor corregir antes de continuar con la instalaci&oacute;n</font>';
    }
}