当前位置: 首页>>代码示例>>PHP>>正文


PHP Installer::isset_site方法代码示例

本文整理汇总了PHP中Installer::isset_site方法的典型用法代码示例。如果您正苦于以下问题:PHP Installer::isset_site方法的具体用法?PHP Installer::isset_site怎么用?PHP Installer::isset_site使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Installer的用法示例。


在下文中一共展示了Installer::isset_site方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testingNW

 public function testingNW($params)
 {
     if (isset($_POST['NW_TITLE'])) {
         $action = isset($_POST['action']) ? trim($_POST['action']) : 'test';
         $ao_db_drop = isset($_POST['AO_DB_DROP']) ? true : false;
         G::LoadClass('Installer');
         //G::LoadClass( 'json' );
         $name = trim($_POST['NW_TITLE']);
         $inst = new Installer();
         if ($inst->isset_site($name) && $ao_db_drop !== true) {
             $this->error = true;
             return;
         }
         $user = isset($_POST['NW_USERNAME']) ? trim($_POST['NW_USERNAME']) : 'admin';
         $pass = isset($_POST['NW_PASSWORD']) ? $_POST['NW_PASSWORD'] : 'admin';
         $pass1 = isset($_POST['NW_PASSWORD2']) ? $_POST['NW_PASSWORD2'] : 'admin';
         $ao_db_wf = isset($_POST['AO_DB_WF']) ? $_POST['AO_DB_WF'] : false;
         $ao_db_rb = isset($_POST['AO_DB_RB']) ? $_POST['AO_DB_RB'] : false;
         $ao_db_rp = isset($_POST['AO_DB_RP']) ? $_POST['AO_DB_RP'] : 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)), $action === 'create' ? true : false);
         $result['result']['admin']['password'] = $pass === $pass1 ? true : false;
         $result['result']['action'] = $action;
         $_SESSION['NW_PASSWORD'] = $pass;
         $_SESSION['NW_PASSWORD2'] = $pass1;
         //$json = new Services_JSON();
         //G::pr($result['result']['database']);G::pr($action);
         $dbWf = $result['result']['database']['ao']['ao_db_wf']['status'];
         $dbRb = $result['result']['database']['ao']['ao_db_rb']['status'];
         $dbRp = $result['result']['database']['ao']['ao_db_rp']['status'];
         $wsAction = $action != '' ? 1 : 0;
         if ($dbWf && $action) {
             $this->success = true;
             //echo $json->encode($result);
         } else {
             //the site does not available
             $this->error = true;
             $this->message = $result['result']['database']['ao']['ao_db_wf']['message'];
             //$this->message .= ', ' . $result['result']['database']['ao']['ao_db_rb']['message'];
             //$this->message .= ', ' . $result['result']['database']['ao']['ao_db_rp']['message'];
         }
     } else {
         $this->error = true;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:44,代码来源:newSiteProxy.php

示例2: isset

 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
 * Coral Gables, FL, 33134, USA, or email info@colosa.com.
 */
if (isset($_POST['form']['NW_TITLE'])) {
    $action = isset($_POST['form']['ACTION']) ? trim($_POST['form']['ACTION']) : 'test';
    G::LoadClass('Installer');
    G::LoadClass('json');
    $name = trim($_POST['form']['NW_TITLE']);
    $inst = new Installer();
    $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';
    $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;
    $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);
    $result['result']['admin']['password'] = $pass === $pass1 ? true : false;
    $result['result']['action'] = $action;
    //$json = new Services_JSON();
    /*$ec;
      $ec->created=($new)?true:false;
      $ec->name=$name;
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:newSite.php


注:本文中的Installer::isset_site方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。