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


PHP Security::shield方法代码示例

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


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

示例1: breakJSONObject

 public function breakJSONObject()
 {
     try {
         $queryCollection = "";
         $shield = new Security();
         $json_file = $_POST['jsonobject'];
         $json_file = str_replace('{"dt_objectTable":[', '{"dt_objectTable":', $json_file);
         $json_file = str_replace('{"dt_relatedTable":[', '{"dt_relatedTable":', $json_file);
         $json_file = str_replace('}]}', '}}', $json_file);
         if ($shield->shield($_POST['MODIFY_STATUS']) == "INS") {
             $fieldtarget = '{"fieldName":"ROADOFSPK","fieldValue":"0","fieldType":"numeric","fieldKey":"0"}';
             $additionalField = "";
             if ($shield->shield($_POST['CARA_BAYAR']) == "KREDIT") {
                 $additionalField .= '{"fieldName":"SISA_BAYAR","fieldValue":"' . $_POST["DP_SYSTEM"] . '","fieldType":"numeric"}';
                 $additionalField .= ',{"fieldName":"STATUS_PO","fieldValue":"1. INDENT","fieldType":"string"}';
                 $additionalField .= ',{"fieldName":"AR_AMOUNT","fieldValue":"' . $_POST["DP_SYSTEM"] . '","fieldType":"numeric"}';
             } else {
                 $additionalField .= '{"fieldName":"SISA_BAYAR","fieldValue":"' . $_POST["HARGA"] . '","fieldType":"numeric"}';
                 $additionalField .= ',{"fieldName":"AR_AMOUNT","fieldValue":"' . $_POST["HARGA"] . '","fieldType":"numeric"}';
             }
             $additionalField .= ',{"fieldName":"STATUS_SPK","fieldValue":"1","fieldType":"string"}';
             $additionalField .= ',{"fieldName":"STATUS_JUAL","fieldValue":"1. SPK","fieldType":"string"}';
             $additionalField .= ',{"fieldName":"STATUS_KIRIM","fieldValue":"N","fieldType":"string"}';
             $additionalField .= ',{"fieldName":"STATUS_ARK","fieldValue":"N","fieldType":"string"}';
             $additionalField .= ',{"fieldName":"CUSTOM_NO","fieldValue":"' . $shield->shield($_POST["NO_SPK"]) . '","fieldType":"string"}';
             $additionalField .= ',{"fieldName":"ROADOFSPK","fieldValue":"0","fieldType":"numeric"}';
             $json_file = str_replace($fieldtarget, $additionalField, $json_file);
         }
         //echo $json_file;
         // convert the string to a json object
         $jfo = json_decode($json_file);
         $relField = "";
         $relCount = 0;
         $relTables = $jfo->dt_objectTable->dt_relatedTables;
         foreach ($relTables as $relTbl) {
             $myTable = $relTbl->dt_relatedTable;
             $relTableName = $myTable->tableName;
             $relautonumFormat = $myTable->autonumFormat;
             $relModifyStatus = $myTable->modify_status;
             $dt_relFields = $myTable->dt_relfieldCollection;
             $queryCollection .= $this->generateQuery($dt_relFields, $relTableName, $relautonumFormat, $relModifyStatus, $relCount);
             $relCount = $relCount + 1;
         }
         $tableName = $jfo->dt_objectTable->tableName;
         $autonumFormat = $jfo->dt_objectTable->autonumFormat;
         $modifystatus = $jfo->dt_objectTable->modify_status;
         $dt_fields = $jfo->dt_objectTable->dt_fieldsCollection;
         $queryCollection .= $this->generateQuery($dt_fields, $tableName, $autonumFormat, $modifystatus, 0);
         //echo $queryCollection;
         $model = new object_Model();
         $result = $model->executeQuery($queryCollection);
         $weblog = new objectupdate();
         $result = $weblog->record_webaccess_log("DML : " . ${$modifystatus} . "-" . $tableName . "-" . $shield->shield($_POST["NO_SPK"]));
         header("Location: entry-spk");
     } catch (Exception $e) {
         throw new Exception($e->getMessage());
     }
 }
开发者ID:edosatriani,项目名称:greensys,代码行数:58,代码来源:object_Controller.php

示例2: init

 function init()
 {
     $init = new boot();
     if (isset($_GET['app'])) {
         if (empty($_GET['app'])) {
             header("Location: dashboard");
         }
         //$sr = $_GET['sr'];
         if (!isset($_SESSION['user-id'])) {
             $app_get = "login";
         } else {
             $security = new Security();
             $app_get = $security->shield($_GET['app']);
             $app_get_sub = $security->shield($_GET['sub_app']);
         }
         switch ($app_get) {
             case $app_get:
                 if (file_exists(LOCAL_DIR . "/apps/" . $app_get . "/" . $app_get . "_Controller.php")) {
                     $ldr = new autoloader($app_get);
                     if ($app_get_sub) {
                         $dynamic = "ajax_" . $app_get . "_Controller";
                     } else {
                         $dynamic = $app_get . "_Controller";
                         $weblog = new objectupdate();
                         $result = $weblog->record_webaccess_log("module : " . $app_get);
                     }
                     $object = new $dynamic();
                     if ($app_get == "object") {
                         $object->breakJSONObject();
                     }
                     if ($app_get == "ob_update") {
                         $object->breakJSONObject();
                     }
                 } else {
                     if ($app_get == "logout") {
                         //unset($_SESSION["user-id"]);
                         session_destroy();
                         //setcookie("user-id","", time()-3600);
                         header("Location: login");
                     } else {
                         $weblog = new objectupdate();
                         $result = $weblog->record_webaccess_log("Accessing wrong module");
                         header("Location: page-not-found");
                     }
                 }
                 break;
         }
     } else {
         $weblog = new objectupdate();
         $result = $weblog->record_webaccess_log("Accessing wrong module");
         header("Location: dashboard");
     }
 }
开发者ID:edosatriani,项目名称:greensys,代码行数:53,代码来源:Router.php

示例3: __construct

 public function __construct()
 {
     $model = new login_Model();
     $shield = new Security();
     if ($_GET["param"] == "exec") {
         $username = $_POST["username"];
         $myuserid = $shield->shield($username);
         $mypassword = $shield->shield($_POST["password"]);
         $datauser = $model->get_userinfo($myuserid, $mypassword);
     } else {
         $datauser = "[]";
     }
     require_once 'login_View.php';
 }
开发者ID:edosatriani,项目名称:greensys,代码行数:14,代码来源:login_Controller.php

示例4: init

 public function init($var)
 {
     if (isset($_GET['sr'])) {
         $sr = $_GET['sr'];
         if (!isset($_GET['app'])) {
             die(_GET_APP_DONT_EXIST);
         }
         //$class_methods = get_class_methods("appController");
         $security = new Security();
         $shield_var = $security->shield($_GET['app']);
         $class_methods = get_class_methods($shield_var . "_Controller");
         //var_dump($class_methods);
         foreach ($class_methods as $method_name) {
             //echo "$method_name\n";
             if ($sr == $method_name) {
                 /**
                  						($sr != "__construct") && _
                  						($sr != "__call") && _
                  						($sr != "__callStatic") && _
                  						($sr != "__get") && _
                  						($sr != "__set") && _
                  						($sr != "__isset") && _
                  						($sr != "__unset") && _
                  						($sr != "__sleep") && _
                  						($sr != "__get") && _
                  						($sr != "__wakeup") && _
                  						($sr != "__toString") && _
                  						($sr != "__invoke") && _
                  						($sr != "__destruct")) {
                  						**/
                 switch ($sr) {
                     // llama staticamente
                     //appController::$sr();
                     //appModel::$sr();
                     //AppView::$sr();
                     case $sr:
                         $var->{$sr}();
                         break;
                 }
                 // switch
             }
             // if
         }
         // for each
     } else {
         if (!isset($_GET['sr'])) {
             $var->main();
         }
     }
 }
开发者ID:edosatriani,项目名称:greensys,代码行数:50,代码来源:ControllerHandler.php

示例5: __construct

 public function __construct()
 {
     $model = new spk_Model();
     $userinfo = $model->userInformation();
     $shield = new Security();
     $modify_status = "INS";
     $readonlymode = "";
     if ($_GET['param'] != "") {
         $id = $shield->shield($_GET['param']);
         $dataspk = $model->get_spk($id);
         $modify_status = $model->modify_status;
     } else {
         $dataspk = "{}";
     }
     $autonumber = "";
     if ($modify_status == "INS") {
         $autonumbermode = $model->getConfiguration("100");
         if ($autonumbermode == "YES") {
             $autonumberformat = $model->getConfiguration("107");
             $autonumber = $model->AutoNumberWithFormat("TR_SALE_SPK", "NO_SPK", $autonumberformat . date("ym"), "4");
         } else {
             $autonumber = "";
         }
     } else {
         $readonlymode = "readonly";
     }
     $active_wilayah = $model->get_active_wilayah();
     $active_unittype = $model->get_active_unittype();
     $active_salestype = $model->get_active_salestype();
     $id = $shield->shield($_GET['param']);
     $active_defaultspv = $model->get_active_supervisor($id);
     $active_stocklocation = $model->get_active_stocklocation();
     $active_fincoy = $model->get_active_fincoy();
     $inquiry_filterfield = $model->get_inqury_filter();
     require_once 'spk_View.php';
 }
开发者ID:edosatriani,项目名称:greensys,代码行数:36,代码来源:spk_Controller.php

示例6: __construct

 public function __construct()
 {
     $model = new po_Model();
     $userinfo = $model->userInformation();
     $shield = new Security();
     $modify_status = "INS";
     $readonlymode = "";
     if ($_GET['param'] != "") {
         $id = $shield->shield($_GET['param']);
         $datapo = $model->get_spk($id);
         $modify_status = "UPD";
     } else {
         $datapo = "{}";
     }
     $autonumber = "";
     $active_fincoy = $model->get_active_fincoy();
     $outstanding_po = $model->outstanding_po();
     require_once 'po_View.php';
 }
开发者ID:edosatriani,项目名称:greensys,代码行数:19,代码来源:po_Controller.php

示例7: __construct

 public function __construct()
 {
     if ($_SERVER['HTTP_X_REQUESTED_WITH'] == "XMLHttpRequest") {
         $model = new spk_Model();
         $shield = new Security();
         switch ($_GET['mode']) {
             case "101":
                 $id = $shield->shield($_GET['param']);
                 $active_response = $model->get_active_unitcolour($id);
                 break;
             case "102":
                 $id = $shield->shield($_GET['param']);
                 $active_response = $model->get_active_supervisor($id);
                 break;
             case "103":
                 $id = $shield->shield($_GET['param']);
                 $id2 = $shield->shield($_GET['param2']);
                 $active_response = $model->get_active_koordinator($id, $id2);
                 break;
             case "104":
                 $id = $shield->shield($_GET['param']);
                 $id2 = $shield->shield($_GET['param2']);
                 $id3 = $shield->shield($_GET['param3']);
                 $id4 = $shield->shield($_GET['param4']);
                 $active_response = $model->get_active_sales($id, $id2, $id3, $id4);
                 break;
             case "105":
                 $id = $shield->shield($_GET['param']);
                 $id2 = $shield->shield($_GET['param2']);
                 $active_response = $model->get_active_unitprice($id, $id2);
                 break;
             case "106":
                 $id = $shield->shield($_GET['param']);
                 $active_response = $model->get_active_kecamatan($id);
                 break;
             case "107":
                 $id = $shield->shield($_GET['param']);
                 $active_response = $model->get_active_kelurahan($id);
                 break;
             case "108":
                 $id = $shield->shield($_GET['param']);
                 $id2 = $shield->shield($_GET['param2']);
                 $active_response = $model->run_inquiry($id, $id2);
                 break;
             case "109":
                 $id = $shield->shield($_GET['param']);
                 $active_response = $model->run_inquirydetail($id);
                 break;
         }
         echo $active_response;
     } else {
         echo "[{}]";
     }
 }
开发者ID:edosatriani,项目名称:greensys,代码行数:54,代码来源:ajax_do_Controller.php


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