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


PHP Common::jsonSuccess方法代码示例

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


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

示例1: run

 public function run($id = false, $model = false, $forceDelete = false)
 {
     $modelName = $this->model && is_string($this->model) ? $this->model : (request()->getParam('model') ? request()->getParam('model') : $this->controller->model);
     if ($id) {
         //delete one model
         $result = $this->controller->loadModel($modelName, $id)->delete();
         if (!request()->isAjaxRequest && $result) {
             $this->controller->redirect(user()->gridIndex);
         }
         Common::jsonSuccess(true);
     } else {
         $items = Common::getChecked('items');
         if ($items) {
             if (!$forceDelete) {
                 foreach ($items as $id) {
                     $this->controller->loadModel($modelName, $id)->delete();
                 }
             } else {
                 $criteria = new SDbCriteria();
                 $criteria->compare('id', $items);
                 CActiveRecord::model($modelName)->deleteAll($criteria);
             }
             Common::jsonSuccess(true);
         }
     }
     Common::jsonError("Ошибка");
 }
开发者ID:amanukian,项目名称:test,代码行数:27,代码来源:DeleteAction.php

示例2: deleteHotelFetursList

function deleteHotelFetursList()
{
    $hotelfeatureslist = new HotelFetursList();
    $hotelfeatureslist->setHotelFeatureListId($_REQUEST['id']);
    if ($hotelfeatureslist->deleteHotelFeatureList()) {
        Common::jsonSuccess("Hotel Features List Deleted Successfully");
    } else {
        Common::jsonError("Error");
    }
}
开发者ID:jcodesdotme,项目名称:pp,代码行数:10,代码来源:hotelfeturslist-controller.php

示例3: deleteMemberBankDetail

function deleteMemberBankDetail()
{
    $member_bank_details = new MemberBankDetails();
    $member_bank_details->setBankId($_REQUEST['id']);
    if ($member_bank_details->deleteMemberBankDetails()) {
        Common::jsonSuccess("Member Bank Details Deleted Successfully");
    } else {
        Common::jsonError("Error");
    }
}
开发者ID:jcodesdotme,项目名称:pp,代码行数:10,代码来源:memberbankdetails-controller.php

示例4: deleteAdministrator

function deleteAdministrator()
{
    $admin = new Administrators();
    $admin->setId($_REQUEST['id']);
    if ($admin->deleteAdministrator()) {
        Common::jsonSuccess("Adminstrators Deleted Successfully");
    } else {
        Common::jsonError("Error");
    }
}
开发者ID:jcodesdotme,项目名称:pp,代码行数:10,代码来源:administrators-controller.php

示例5: subscribe

function subscribe()
{
    $subscribe = new Subscribe();
    $subscribe->setValues($_REQUEST);
    if ($subscribe->newSubscribe()) {
        Common::jsonSuccess("Subscribe Successfully!");
    } else {
        Common::jsonError("Error");
    }
}
开发者ID:jcodesdotme,项目名称:pp,代码行数:10,代码来源:subscribe-controller.php

示例6: deleteRoomFeatures

function deleteRoomFeatures()
{
    $room_features = new RoomFeatures();
    $room_features->setRoomFeatureId($_REQUEST['id']);
    if ($room_features->deleteRoomFeatures()) {
        Common::jsonSuccess("Room Features Deleted Successfully");
    } else {
        Common::jsonError("Error");
    }
}
开发者ID:jcodesdotme,项目名称:pp,代码行数:10,代码来源:roomfeatures-controller.php

示例7: deleteCategory

function deleteCategory()
{
    $category = new Category();
    $category->setCategoryId($_REQUEST['id']);
    if ($category->deleteCategory()) {
        Common::jsonSuccess("Category Deleted Successfully");
    } else {
        Common::jsonError("Error");
    }
}
开发者ID:jcodesdotme,项目名称:pp,代码行数:10,代码来源:category-controller.php

示例8: deleteHotelFetursType

function deleteHotelFetursType()
{
    $hotelfeat_type = new HotelFetursType();
    $hotelfeat_type->setHotelFeatureTypeId($_REQUEST['id']);
    if ($hotelfeat_type->deleteHotelFeatureType()) {
        Common::jsonSuccess("Feturs Type Deleted Successfully");
    } else {
        Common::jsonError("Error");
    }
}
开发者ID:jcodesdotme,项目名称:pp,代码行数:10,代码来源:hotelfeturstype-controller.php

示例9: deleteCurrency

function deleteCurrency()
{
    $currency = new Currency();
    $currency->setCurrId($_REQUEST['id']);
    if ($currency->deleteCurrency()) {
        Common::jsonSuccess("Currency Deleted Successfully");
    } else {
        Common::jsonError("Error");
    }
}
开发者ID:jcodesdotme,项目名称:pp,代码行数:10,代码来源:currency-controller.php

示例10: deleteAccommodation

function deleteAccommodation()
{
    $accommodation = new Accommodation();
    $accommodation->setAccommodationId($_REQUEST['id']);
    if ($accommodation->deleteAccommodation()) {
        Common::jsonSuccess("Accommodation Deleted Successfully");
    } else {
        Common::jsonError("Error");
    }
}
开发者ID:jcodesdotme,项目名称:pp,代码行数:10,代码来源:accommodation-controller.php

示例11: updateSettings

function updateSettings()
{
    $sysSettings = new systemSetting();
    $get_edited = array();
    foreach ($_REQUEST as $k => $v) {
        $get_edited[$k] = $v;
    }
    $sysSettings->setValues($get_edited);
    if ($sysSettings->editSetting()) {
        Common::jsonSuccess("Settings Update Successfully!");
    } else {
        Common::jsonError("Error");
    }
}
开发者ID:jcodesdotme,项目名称:pp,代码行数:14,代码来源:settings-controller.php

示例12: adminLoginNow

function adminLoginNow()
{
    $username = $_REQUEST['login_user'];
    $password = $_REQUEST['login_password'];
    $admin = new administrator();
    $admin->setUsername($username);
    $data = $admin->getAdminFromUsername();
    if (count($data) > 0) {
        $admin->extractor($data);
        if ($admin->password() == md5($password)) {
            $session = new Sessions();
            $session->setAdminLoginSessions($admin->id(), $admin->name(), $admin->email());
            Common::jsonSuccess("Success");
        } else {
            Common::jsonError("Login Error");
        }
    } else {
        Common::jsonError("Login Error");
    }
}
开发者ID:jcodesdotme,项目名称:pp,代码行数:20,代码来源:login-controller.php

示例13: memberLogin

function memberLogin()
{
    $member = new Members();
    $member->setMemberUsername($_REQUEST['member_username_login']);
    $data = $member->getMemberByUsername();
    if (count($data) > 0) {
        $member->extractor($data);
        if (strcmp($member->memberPassword(), md5($_REQUEST['member_password_login'])) == 0) {
            $session = new Sessions();
            $session->setMemberLoginSessions($member->memberId(), $member->memberTitle(), $member->memberFirstName(), $member->memberLastName());
            Common::jsonSuccess("Success");
        } else {
            Common::jsonError("Login Error");
        }
    } else {
        Common::jsonError("Login Error");
    }
}
开发者ID:jcodesdotme,项目名称:pp,代码行数:18,代码来源:members-controller.php

示例14: loginClient

function loginClient()
{
    $username = $_REQUEST['client_username_log'];
    $password = $_REQUEST['client_password_log'];
    $client = new Clients();
    $session = new Sessions();
    $client->setClientUsername($username);
    $data = $client->getClientFromUsername();
    if (count($data) > 0) {
        $client->extractor($data);
        if (strcmp($client->clientPassword(), md5($password)) == 0) {
            $session->setClientLoginSessions($client->clientId(), $client->clientTitle(), $client->clientFirstName(), $client->clientLastName());
            Common::jsonSuccess("Success");
        } else {
            Common::jsonError("Login Error");
        }
    } else {
        Common::jsonError("Login Error");
    }
}
开发者ID:jcodesdotme,项目名称:pp,代码行数:20,代码来源:clients-controller_original.php

示例15: actionIsGuest

 public function actionIsGuest()
 {
     if (user()->isGuest) {
         Common::jsonSuccess(true);
     } else {
         Common::jsonSuccess(true, ['success' => false]);
     }
 }
开发者ID:amanukian,项目名称:test,代码行数:8,代码来源:AuthController.php


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