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


PHP Crud::savePic方法代码示例

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


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

示例1: registerPushNotif

 public function registerPushNotif()
 {
     IMBAuth::checkOAuth();
     $app_id = addslashes($_POST['app_id']);
     $app_token = addslashes($_POST['app_token']);
     $app = new AppAccount();
     $app->getByID($app_id);
     if ($app->app_token != $app_token) {
         $json['status_code'] = 0;
         $json['status_message'] = "Token Mismatched";
         echo json_encode($json);
         die;
     }
     $acc_id = addslashes($_POST['acc_id']);
     $now = addslashes($_POST['now']);
     $ios = addslashes($_POST['ios']);
     $_GET['ios'] = $ios;
     $push_title = addslashes($_POST['push_title']);
     $push_msg = addslashes($_POST['push_msg']);
     $push_url = addslashes($_POST['push_url']);
     $push_img = addslashes($_POST['push_img']);
     $push_date = date("Y-m-d", strtotime(addslashes($_POST['push_date'])));
     $push_time = (int) addslashes($_POST['push_time']);
     $img = '';
     if ($push_img != '') {
         $img = Crud::savePic($push_img);
     }
     $push = new PushNotCamp();
     $push->camp_client_id = $app->app_client_id;
     $push->camp_img = $img;
     $push->camp_name = $push_title;
     $push->camp_title = $push_title;
     $push->camp_active = 1;
     $push->camp_start = $push_date;
     $push->camp_hour = $push_time;
     $push->camp_msg = $push_msg;
     $push->camp_url = $push_url;
     $push->camp_create_by = $acc_id;
     $push->camp_app_id = $app->app_id;
     $camp_id = $push->save();
     if ($camp_id) {
         $json['status_code'] = 1;
         if ($now) {
             //langsung do push
             $succ = Pusher::pushbyID($camp_id);
             $json['status_message'] = "Push Notifications Pushed";
             echo json_encode($json);
             die;
         } else {
             $json['status_message'] = "Push Notifications Registration Success";
             echo json_encode($json);
             die;
         }
     } else {
         $json['status_code'] = 0;
         $json['status_message'] = "Push Notifications Registration Failed";
         echo json_encode($json);
         die;
     }
 }
开发者ID:CapsuleCorpIndonesia,项目名称:apel-enak,代码行数:60,代码来源:CapsuleMe.php

示例2: parseToLLAccount

 public static function parseToLLAccount($VRO)
 {
     $ll = new LL_Account();
     $ll->macc_ll_customer_id = (string) $VRO->CustomerBody->CustomerID;
     $ll->macc_id = (string) $VRO->CustomerBody->CustomerID;
     if (!$ll->macc_id) {
         return 0;
     }
     /*
      * cek apa di database sudah ada
      */
     $ll->getByID($ll->macc_id);
     if ($ll->macc_id != "" || $ll->macc_id != 0) {
         $ll->load = 0;
     }
     /*
      * cek if ada fb_id atau foto
      */
     $macc_foto = addslashes($_POST['macc_foto']);
     $macc_fb_id = addslashes($_POST['macc_fb_id']);
     if ($macc_foto != "") {
         $ll->macc_foto = Crud::savePic($macc_foto);
     }
     if ($macc_fb_id != "") {
         $ll->macc_fb_id = $macc_fb_id;
     }
     //insert name
     $arrName = $VRO->CustomerBody->EntityInformation->Individual->Name;
     foreach ($arrName->Name as $obj) {
         $var = self::xml_attribute($obj, 'TypeCode');
         //pr($obj);
         //echo "var : ".$var;
         if ($var == "FamilyName") {
             $ll->macc_last_name = (string) $obj;
         }
         if ($var == "GivenName") {
             $ll->macc_first_name = (string) $obj;
         }
         if ($var == "PreferredName") {
             $ll->macc_prefered_name = (string) $obj;
         }
     }
     if ($_GET['test']) {
         echo "names : ";
         pr($ll);
     }
     //insert dob
     $arrTelp = $VRO->CustomerBody->EntityInformation->Individual->ContactInformation->Telephone;
     foreach ($arrTelp as $obj) {
         $var = self::xml_attribute($obj, 'TypeCode');
         if ($var == "Home") {
             $ll->macc_phone_home = (string) $obj->LocalNumber;
         }
         if ($var == "Mobile") {
             $ll->macc_phone = (string) $obj->LocalNumber;
         }
         if ($var == "Work") {
             $ll->macc_phone_work = (string) $obj->LocalNumber;
         }
     }
     if ($_GET['test']) {
         echo "telp : ";
         pr($ll);
     }
     //Address
     $arrAddress = $VRO->CustomerBody->EntityInformation->Individual->ContactInformation->Address;
     $ll->macc_address = (string) $arrAddress->AddressLine;
     $ll->macc_address_city = (string) $arrAddress->City;
     $ll->macc_address_territory = (string) $arrAddress->Territory;
     $ll->macc_address_postalcode = (string) $arrAddress->PostalCode;
     $ll->macc_address_country = (string) $arrAddress->Country;
     //email
     $arrEmail = $VRO->CustomerBody->EntityInformation->Individual->ContactInformation->EMail;
     foreach ($arrEmail as $obj) {
         $var = self::xml_attribute($obj, 'TypeCode');
         if ($var == "Home") {
             $ll->macc_email = (string) $obj->EMailAddress;
         }
     }
     if ($_GET['test']) {
         echo "email : ";
         pr($ll);
     }
     //PersonalSummary
     $personalSum = $VRO->CustomerBody->EntityInformation->Individual->PersonalSummary;
     foreach ($personalSum->attributes() as $a => $b) {
         //echo $a,'="',$b,"\"";
         //echo "IN $a $b";
         //echo "haloo ".$arrName->Name[$b];
         if ($a == "GenderType") {
             $ll->macc_gender = (string) $b;
         }
     }
     if ($_GET['test']) {
         echo "gender : ";
         pr($ll);
     }
     //insert dob
     $dob = (string) $VRO->CustomerBody->EntityInformation->Individual->PersonalSummary->BirthDate;
     $exp = explode("+", $dob);
//.........这里部分代码省略.........
开发者ID:CapsuleCorpIndonesia,项目名称:elang-combo,代码行数:101,代码来源:VRCustMapper.php

示例3: processAgent

 public static function processAgent($mode = "web")
 {
     $json = array();
     $json['err'] = "";
     $json['bool'] = 0;
     $json['status_code'] = 0;
     $json['status_message'] = "Failed";
     if ($mode == "web") {
         $rand = $_SESSION['rand'];
         $token = $_POST['token'];
         if ($rand != $token) {
             $json['err'] .= "Wrong Token<br>";
         }
     }
     //check username
     $ktp = addslashes($_POST['ktp']);
     if ($ktp == "") {
         $json['err'] .= "Ktp cannot be empty<br>";
     }
     //check username
     $npwp = addslashes($_POST['npwp']);
     //        if($npwp==""){
     //            $json['err'] .= "Npwp cannot be empty<br>";
     //        }
     //check username
     $bank_name = addslashes($_POST['bank_name']);
     if ($bank_name == "") {
         $json['err'] .= "Bank Name cannot be empty<br>";
     }
     //check username
     $account_nr = addslashes($_POST['account_nr']);
     if ($account_nr == "") {
         $json['err'] .= "Bank Name cannot be empty<br>";
     }
     //check username
     $account_name = addslashes($_POST['account_name']);
     if ($account_name == "") {
         $json['err'] .= "Bank Name cannot be empty<br>";
     }
     //check username
     $branch_name = addslashes($_POST['branch_name']);
     if ($branch_name == "") {
         $json['err'] .= "Bank Name cannot be empty<br>";
     }
     if ($mode == "web") {
         //check username
         $tos = addslashes($_POST['tos']);
         if ($tos == "") {
             $json['err'] .= "Please accept Terms of Service<br>";
         }
     }
     if ($json['err'] == "") {
         //process npwp or ktp
         if ($mode == "web") {
             $npwp_dipakai = $npwp;
         } else {
             if ($npwp != "") {
                 $npwp_dipakai = Crud::savePic($npwp);
             }
         }
         if ($mode == "web") {
             $ktp_dipakai = $ktp;
         } else {
             if ($ktp != "") {
                 $ktp_dipakai = Crud::savePic($ktp);
             }
         }
         $acc = new Account();
         $acc->getByID(Account::getMyID());
         $acc->admin_bank = $bank_name;
         $acc->admin_bank_acc = $account_nr;
         $acc->admin_bank_acc_name = $account_name;
         $acc->admin_bank_kcu = $branch_name;
         $acc->admin_ktp = $ktp_dipakai;
         $acc->admin_npwp = $npwp_dipakai;
         $acc->admin_isAgent = -1;
         $succ = $acc->save();
         if ($succ) {
             $_SESSION['account'] = $acc;
         }
         $json['bool'] = $succ;
         if ($succ) {
             $json['status_code'] = 1;
             $json['status_message'] = "Submission Successful, Waiting for Approval";
         }
     }
     //        $json['post'] = $_POST;
     echo json_encode($json);
     die;
 }
开发者ID:CapsuleCorpIndonesia,项目名称:apel-enak,代码行数:90,代码来源:AppearForm.php


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