コード例 #1
0
     }
     if (trim($_POST['author']) == '') {
         $error = 'Please enter Author';
     } else {
         $author = $_POST['author'];
     }
     if (trim($_POST['cron']) == '') {
         $error = 'Please enter CRON';
     } else {
         $cron = $_POST['cron'];
     }
 }
 $url = $account_id . '.adeptlms.com/api/v1/';
 $curl = $url . "authentication";
 $data = "email=" . $email . "&password=" . $password;
 $temp = $adept->postdata($curl, $data);
 $access_token = $temp->access_token;
 $language = $temp->language;
 $date = date('Y-m-d h:i:s', time());
 if ($temp->status == 200 || $temp->status == 'OK') {
     $adept_access_token_value = get_option('adept_access_token');
     if (!$adept_access_token_value) {
         add_option('adept_api_url', $url, '', 'yes');
         add_option('adept_email', $email, '', 'yes');
         add_option('adept_password', md5($password), '', 'yes');
         add_option('adept_account_id', $account_id, '', 'yes');
         add_option('adept_access_token', $access_token, '', 'yes');
         add_option('adept_language', $language, '', 'yes');
         add_option('adept_author', $author, '', 'yes');
         add_option('adept_cron', $cron, '', 'yes');
         register_activation_hook(__FILE__, 'my_activation');