HOR-4527
This commit is contained in:
committed by
Julio Cesar Laura Avendaño
parent
abe71a6ffe
commit
0d533e19d9
@@ -1,17 +1,17 @@
|
||||
<?php
|
||||
|
||||
try {
|
||||
if (isset( $_REQUEST['status'] )) {
|
||||
$oServerConf = & ServerConf::getSingleton();
|
||||
if (isset($_REQUEST['status'])) {
|
||||
$oServerConf = ServerConf::getSingleton();
|
||||
/*you can use SYS_TEMP or SYS_SYS ON HEAR_BEAT_CONF to save for each workspace*/
|
||||
if ($_REQUEST['status']) {
|
||||
echo "ACTIVE (Thanks!)";
|
||||
$oServerConf->setHeartbeatProperty( 'HB_OPTION', 1, 'HEART_BEAT_CONF' );
|
||||
$oServerConf->unsetHeartbeatProperty( 'HB_NEXT_BEAT_DATE', 'HEART_BEAT_CONF' );
|
||||
$oServerConf->setHeartbeatProperty('HB_OPTION', 1, 'HEART_BEAT_CONF');
|
||||
$oServerConf->unsetHeartbeatProperty('HB_NEXT_BEAT_DATE', 'HEART_BEAT_CONF');
|
||||
} else {
|
||||
echo "INACTIVE";
|
||||
$oServerConf->setHeartbeatProperty( 'HB_OPTION', 0, 'HEART_BEAT_CONF' );
|
||||
$oServerConf->unsetHeartbeatProperty( 'HB_NEXT_BEAT_DATE', 'HEART_BEAT_CONF' );
|
||||
$oServerConf->setHeartbeatProperty('HB_OPTION', 0, 'HEART_BEAT_CONF');
|
||||
$oServerConf->unsetHeartbeatProperty('HB_NEXT_BEAT_DATE', 'HEART_BEAT_CONF');
|
||||
}
|
||||
} else {
|
||||
echo "Nothing to do";
|
||||
@@ -19,6 +19,5 @@ try {
|
||||
} catch (Exception $e) {
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($e, $token);
|
||||
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
|
||||
G::outRes(G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)));
|
||||
}
|
||||
|
||||
|
||||
@@ -6,28 +6,28 @@ global $RBAC;
|
||||
|
||||
$RBAC->allows(basename(__FILE__), basename(__FILE__));
|
||||
|
||||
if (isset( $_POST['form']['NW_TITLE'] )) {
|
||||
$action = (isset( $_POST['form']['ACTION'] )) ? trim( $_POST['form']['ACTION'] ) : 'test';
|
||||
$name = trim( $_POST['form']['NW_TITLE'] );
|
||||
if (isset($_POST['form']['NW_TITLE'])) {
|
||||
$action = (isset($_POST['form']['ACTION'])) ? trim($_POST['form']['ACTION']) : 'test';
|
||||
$name = trim($_POST['form']['NW_TITLE']);
|
||||
$inst = new Installer();
|
||||
|
||||
$isset = $inst->isset_site( $name );
|
||||
$isset = $inst->isset_site($name);
|
||||
|
||||
$new = ((! $isset)) ? true : false;
|
||||
$user = (isset( $_POST['form']['NW_USERNAME'] )) ? trim( $_POST['form']['NW_USERNAME'] ) : 'admin';
|
||||
$pass = (isset( $_POST['form']['NW_PASSWORD'] )) ? $_POST['form']['NW_PASSWORD'] : 'admin';
|
||||
$pass1 = (isset( $_POST['form']['NW_PASSWORD2'] )) ? $_POST['form']['NW_PASSWORD2'] : 'admin';
|
||||
$user = (isset($_POST['form']['NW_USERNAME'])) ? trim($_POST['form']['NW_USERNAME']) : 'admin';
|
||||
$pass = (isset($_POST['form']['NW_PASSWORD'])) ? $_POST['form']['NW_PASSWORD'] : 'admin';
|
||||
$pass1 = (isset($_POST['form']['NW_PASSWORD2'])) ? $_POST['form']['NW_PASSWORD2'] : 'admin';
|
||||
|
||||
$ao_db_drop = (isset( $_POST['form']['AO_DB_DROP'] )) ? true : false;
|
||||
$ao_db_drop = (isset($_POST['form']['AO_DB_DROP'])) ? true : false;
|
||||
|
||||
$ao_db_wf = (isset( $_POST['form']['AO_DB_WF'] )) ? $_POST['form']['AO_DB_WF'] : false;
|
||||
$ao_db_rb = (isset( $_POST['form']['AO_DB_WF'] )) ? $_POST['form']['AO_DB_WF'] : false;
|
||||
$ao_db_rp = (isset( $_POST['form']['AO_DB_WF'] )) ? $_POST['form']['AO_DB_WF'] : false;
|
||||
$ao_db_wf = (isset($_POST['form']['AO_DB_WF'])) ? $_POST['form']['AO_DB_WF'] : false;
|
||||
$ao_db_rb = (isset($_POST['form']['AO_DB_WF'])) ? $_POST['form']['AO_DB_WF'] : false;
|
||||
$ao_db_rp = (isset($_POST['form']['AO_DB_WF'])) ? $_POST['form']['AO_DB_WF'] : false;
|
||||
|
||||
$result = $inst->create_site( Array ('isset' => true,'name' => $name,'admin' => Array ('username' => $user,'password' => $pass
|
||||
),'advanced' => Array ('ao_db_drop' => $ao_db_drop,'ao_db_wf' => $ao_db_wf,'ao_db_rb' => $ao_db_rb,'ao_db_rp' => $ao_db_rp
|
||||
$result = $inst->create_site(array('isset' => true,'name' => $name,'admin' => array('username' => $user,'password' => $pass
|
||||
),'advanced' => array('ao_db_drop' => $ao_db_drop,'ao_db_wf' => $ao_db_wf,'ao_db_rb' => $ao_db_rb,'ao_db_rp' => $ao_db_rp
|
||||
)
|
||||
), ($action === 'create') ? true : false );
|
||||
), ($action === 'create') ? true : false);
|
||||
$result['result']['admin']['password'] = ($pass === $pass1) ? true : false;
|
||||
$result['result']['action'] = $action;
|
||||
//$json = new Services_JSON();
|
||||
@@ -35,37 +35,35 @@ if (isset( $_POST['form']['NW_TITLE'] )) {
|
||||
$ec->created=($new)?true:false;
|
||||
$ec->name=$name;
|
||||
$ec->message=($new)?"Workspace created":"Workspace already exists or Name invalid";*/
|
||||
echo Bootstrap::json_encode( $result );
|
||||
echo Bootstrap::json_encode($result);
|
||||
} else {
|
||||
global $RBAC;
|
||||
switch ($RBAC->userCanAccess( 'PM_SETUP_ADVANCE' )) {
|
||||
switch ($RBAC->userCanAccess('PM_SETUP_ADVANCE')) {
|
||||
case - 2:
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||
G::header( 'location: ../login/login' );
|
||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
|
||||
G::header('location: ../login/login');
|
||||
die();
|
||||
break;
|
||||
case - 3:
|
||||
case - 1:
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||
G::header( 'location: ../login/login' );
|
||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
||||
G::header('location: ../login/login');
|
||||
die();
|
||||
break;
|
||||
}
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
$c = new Configurations();
|
||||
$configPage = $c->getConfiguration( 'usersList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
|
||||
$configPage = $c->getConfiguration('usersList', 'pageSize', '', $_SESSION['USER_LOGGED']);
|
||||
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript( 'setup/newSite', false ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'setup/newSite' ); //adding a html file .html.
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript('setup/newSite', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('setup/newSite'); //adding a html file .html.
|
||||
// $oHeadPublisher->assign('CONFIG', $Config);
|
||||
// $oHeadPublisher->assign('FORMATS',$c->getFormats());
|
||||
$oHeadPublisher->assign( "SYS_LANG", SYS_LANG );
|
||||
$oHeadPublisher->assign( "SYS_SKIN", SYS_SKIN );
|
||||
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
$oHeadPublisher->assign("SYS_LANG", SYS_LANG);
|
||||
$oHeadPublisher->assign("SYS_SKIN", SYS_SKIN);
|
||||
|
||||
G::RenderPage('publish', 'extJs');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user