예제 #1
0
     die(errMod('DB Settings Could Not Be Write', 'danger'));
 } else {
     if (fputs($conc, $confList)) {
     } else {
         die(errMod('DB Settings Could Not Be Write', 'danger'));
     }
 }
 # Update Settings
 $setLethe = new lethe();
 $setLethe->onInstall = true;
 $setLethe->letheSettings();
 # Organization
 if (cntData("SELECT ID FROM " . $db_prefix . "organizations") == 0) {
     $orgLethe = new lethe();
     $orgLethe->onInstall = true;
     $orgLethe->addOrganization();
 }
 # User
 if (cntData("SELECT ID FROM " . $db_prefix . "users") == 0) {
     $opOr = $myconn->query("SELECT ID FROM " . $db_prefix . "organizations");
     $opOrRs = $opOr->fetch_assoc();
     $usrLethe = new lethe();
     $usrLethe->onInstall = true;
     $usrLethe->isMaster = 1;
     $usrLethe->auth_mode = 2;
     $usrLethe->isPrimary = 1;
     $usrLethe->OID = $opOrRs['ID'];
     $usrLethe->addUser();
 }
 # Main Cron
 $letChr = new Crontab();
예제 #2
0
    $ID = '';
} else {
    $ID = $_GET['ID'];
}
if (LETHE_AUTH_MODE != 2) {
    $ID = LETHE_AUTH_ORG_PRIVATE;
}
if ($page_sub2 == 'add') {
    if (!PRO_MODE) {
        header('Location: ?p=organizations/organization/edit');
    }
}
/* Add */
if (isset($_POST['addOrganization'])) {
    $lethe = new lethe();
    $lethe->addOrganization();
    $errText = $lethe->errPrint;
}
/* Edit */
if (isset($_POST['editOrganization'])) {
    $lethe = new lethe();
    $lethe->OID = LETHE_AUTH_MODE != 2 ? set_org_id : $ID;
    $lethe->editOrganization();
    $errText = $lethe->errPrint;
}
$pg_nav_buts = '<div class="nav-buts">
				<a href="?p=organizations/organization" class="btn btn-primary">' . letheglobal_list . '</a>
				</div>
				';
?>