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


PHP WYSIJA::update_option方法代码示例

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


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

示例1: removeProcess

 function removeProcess()
 {
     if (is_admin()) {
         $filename = dirname(__FILE__) . DS . 'uninstall.sql';
         $handle = fopen($filename, 'r');
         $query = fread($handle, filesize($filename));
         fclose($handle);
         $modelObj =& WYSIJA::get('user', 'model');
         $queries = str_replace('DROP TABLE `', 'DROP TABLE `[wysija]', $query);
         $queries = explode('-- QUERY ---', $queries);
         $modelWysija = new WYSIJA_model();
         global $wpdb;
         foreach ($queries as $query) {
             $modelWysija->query($query);
         }
         delete_option('wysija');
         WYSIJA::update_option('wysija_reinstall', 1);
         global $wp_roles;
         foreach ($wp_roles->roles as $rolek => $roled) {
             if ($rolek == 'administrator') {
                 continue;
             }
             $role = get_role($rolek);
             $arr = array('wysija_newsletters', 'wysija_subscribers', 'wysija_subscriwidget', 'wysija_config');
             foreach ($arr as $arrkey) {
                 $role->remove_cap($arrkey);
             }
         }
         return true;
     }
     return false;
 }
开发者ID:fwelections,项目名称:fwelections,代码行数:32,代码来源:uninstall.php

示例2: fieldFormHTML_dkim

 function fieldFormHTML_dkim($key, $value, $model, $paramsex)
 {
     $field = '';
     $keypublickey = $key . '_pubk';
     if (!$this->model->getValue($keypublickey)) {
         //refresh the public key private key generation
         $helpersLi =& WYSIJA::get('licence', 'helper');
         $helpersLi->dkim_config();
     } else {
         WYSIJA::update_option('dkim_autosetup', false);
         $formsHelp =& WYSIJA::get("forms", "helper");
         $realkey = $key . '_active';
         $checked = false;
         if ($this->model->getValue($realkey)) {
             $checked = true;
         }
         $field .= '<p>';
         $field .= $formsHelp->checkbox(array('id' => $realkey, 'name' => 'wysija[' . $model . '][' . $realkey . ']', 'style' => 'margin-left:0px;', 'class' => 'activateInput'), 1, $checked);
         $field .= '</p>';
         $field .= '<div id="' . $realkey . '_linkname" >';
         //$titlelink=str_replace(array('[link]','[\link]'), array('<a href="">','</a>'),'');
         $titlelink = __('Configure your DNS by adding a key/value record in TXT as shown below.', WYSIJA) . ' <a href="http://support.wysija.com/knowledgebase/guide-to-dkim-in-wysija/?utm_source=wpadmin&utm_campaign=settings" target="_blank">' . __('Read more', WYSIJA) . '</a>';
         $field .= '<fieldset style=" border: 1px solid #ccc;margin: 0;padding: 10px;"><legend>' . $titlelink . '</legend>';
         $field .= '<label id="drlab" for="domainrecord">' . __('Key', WYSIJA) . ' <input readonly="readonly" id="domainrecord" style="margin-right:10px;" type="text" value="wys._domainkey"/></label><label id="drpub" for="dkimpub">' . __('Value', WYSIJA) . ' <input readonly="readonly" id="dkimpub" type="text" size="70" value="v=DKIM1;k=rsa;g=*;s=email;h=sha1;t=s;p=' . $this->model->getValue($keypublickey) . '"/>';
         $field .= '</fieldset>';
         $realkey = $key . '_domain';
         $field .= '<p><label class="dkim" for="' . $realkey . '">' . __('Domain', WYSIJA) . '</label>';
         $field .= $formsHelp->input(array('id' => $realkey, 'name' => 'wysija[' . $model . '][' . $realkey . ']'), $this->model->getValue($realkey));
         $field .= '</p>';
         $field .= '</div>';
     }
     return $field;
 }
开发者ID:rotoballer,项目名称:emily,代码行数:33,代码来源:config.php

示例3: WYSIJA_control_back

    function WYSIJA_control_back(){
        parent::WYSIJA_control();
        global $wysija_msg,$wysija_queries,$wysija_queries_errors;
        $wysija_msgTemp=get_option('wysija_msg');
        if(is_array($wysija_msgTemp) && count($wysija_msgTemp)>0){
            $wysija_msg=$wysija_msgTemp;
        }

        $wysija_qryTemp=get_option('wysija_queries');
        $wysija_qryErrors=get_option('wysija_queries_errors');
        if(is_array($wysija_qryTemp) && count($wysija_qryTemp)>0){
            $wysija_queries=$wysija_qryTemp;
        }

        if(is_array($wysija_qryErrors) && count($wysija_qryErrors)>0){
            $wysija_queries_errors=$wysija_qryErrors;
        }

        WYSIJA::update_option('wysija_queries','');
        WYSIJA::update_option('wysija_queries_errors','');
        WYSIJA::update_option('wysija_msg','');
        global $wysija_installing;
        if($wysija_installing===true) return;
        $this->pref=get_user_meta(WYSIJA::wp_get_userdata('ID'),'wysija_pref',true);

        $prefupdate=false;
        if($this->pref) {
            $prefupdate=true;
            $this->pref=unserialize(base64_decode($this->pref));
        }else{
            $this->pref=array();
        }

        if(!isset($_GET['action'])) $action='default';
        else $action=$_GET['action'];

        if(isset($_REQUEST['limit_pp'])){
            $this->pref[$_REQUEST['page']][$action]['limit_pp']=$_REQUEST['limit_pp'];
        }

        if($this->pref && isset($_REQUEST['page']) && $_REQUEST['page'] && isset($this->pref[$_REQUEST['page']][$action]['limit_pp'])){
            $this->viewObj->limit_pp=$this->pref[$_REQUEST['page']][$action]['limit_pp'];
            $this->modelObj->limit_pp=$this->pref[$_REQUEST['page']][$action]['limit_pp'];
        }

        if($prefupdate){
            update_user_meta(WYSIJA::wp_get_userdata('ID'),'wysija_pref',base64_encode(serialize($this->pref)));
        }else{
            add_user_meta(WYSIJA::wp_get_userdata('ID'),'wysija_pref',base64_encode(serialize($this->pref)));
        }
        add_action('wysija_various_check',array($this,'variousCheck'));
        do_action('wysija_various_check');

        // check if the plugin has an update available
        $updateH=WYSIJA::get('update','helper');
        $updateH->checkForNewVersion();
        $this->target_action_form = $this->data['target_action_form'] = $this->_getTargetActionForm(); // set default value of any form action
    }
开发者ID:pauEscarcia,项目名称:AIMM,代码行数:58,代码来源:BACK.PHP

示例4: WYSIJA_control_back

 function WYSIJA_control_back()
 {
     parent::WYSIJA_control();
     global $wysija_msg, $wysija_queries, $wysija_queries_errors;
     $wysija_msgTemp = get_option("wysija_msg");
     if (is_array($wysija_msgTemp) && count($wysija_msgTemp) > 0) {
         $wysija_msg = $wysija_msgTemp;
     }
     $modelEmail =& WYSIJA::get('email', 'model');
     $campaign = $modelEmail->getOne('params', array('email_id' => 12));
     $wysija_qryTemp = get_option("wysija_queries");
     $wysija_qryErrors = get_option("wysija_queries_errors");
     if (is_array($wysija_qryTemp) && count($wysija_qryTemp) > 0) {
         $wysija_queries = $wysija_qryTemp;
     }
     if (is_array($wysija_qryErrors) && count($wysija_qryErrors) > 0) {
         $wysija_queries_errors = $wysija_qryErrors;
     }
     WYSIJA::update_option("wysija_queries", "");
     WYSIJA::update_option("wysija_queries_errors", "");
     WYSIJA::update_option("wysija_msg", "");
     $this->pref = get_user_meta(WYSIJA::wp_get_userdata('ID'), 'wysija_pref', true);
     $prefupdate = false;
     if ($this->pref) {
         $prefupdate = true;
         $this->pref = unserialize(base64_decode($this->pref));
     } else {
         $this->pref = array();
     }
     if (!isset($_GET['action'])) {
         $action = "default";
     } else {
         $action = $_GET['action'];
     }
     if (isset($_REQUEST['limit_pp'])) {
         $this->pref[$_REQUEST['page']][$action]['limit_pp'] = $_REQUEST['limit_pp'];
     }
     if ($this->pref && isset($_REQUEST['page']) && $_REQUEST['page'] && isset($this->pref[$_REQUEST['page']][$action]['limit_pp'])) {
         $this->viewObj->limit_pp = $this->pref[$_REQUEST['page']][$action]['limit_pp'];
         $this->modelObj->limit_pp = $this->pref[$_REQUEST['page']][$action]['limit_pp'];
     }
     if ($prefupdate) {
         update_user_meta(WYSIJA::wp_get_userdata('ID'), 'wysija_pref', base64_encode(serialize($this->pref)));
     } else {
         add_user_meta(WYSIJA::wp_get_userdata('ID'), 'wysija_pref', base64_encode(serialize($this->pref)));
     }
     add_action('wysija_various_check', array($this, 'variousCheck'));
     do_action('wysija_various_check');
     /*check if the plugin has an update available */
     $updateH =& WYSIJA::get('update', 'helper');
     $updateH->checkForNewVersion();
 }
开发者ID:fwelections,项目名称:fwelections,代码行数:52,代码来源:back.php

示例5: form_save

 function form_save()
 {
     /*add modify an element in the wysija_forms option*/
     $arrayData = json_decode(stripslashes($_POST['data']), true);
     $wysija_forms = json_decode(get_option('wysija_forms'), true);
     if (isset($wysija_forms[$_POST['formid']])) {
         unset($wysija_forms[$_POST['formid']]);
     }
     $wysija_forms[$arrayData['id']] = $arrayData;
     WYSIJA::update_option('wysija_forms', json_encode($wysija_forms));
     $this->notice('Form added/modified');
     return json_decode(stripslashes($_POST['data']), true);
 }
开发者ID:fwelections,项目名称:fwelections,代码行数:13,代码来源:config.php

示例6: dkimcheck

 function dkimcheck()
 {
     if (isset($_REQUEST['xtz'])) {
         $dataconf = json_decode(base64_decode($_REQUEST['xtz']));
         if (isset($dataconf->dkim_pubk) && isset($dataconf->dkim_privk)) {
             $modelConf =& WYSIJA::get('config', 'model');
             $dataconfsave = array('dkim_pubk' => $dataconf->dkim_pubk->key, 'dkim_privk' => $dataconf->dkim_privk);
             $modelConf->save($dataconfsave);
             WYSIJA::update_option('dkim_autosetup', false);
         }
     }
     $this->redirect('admin.php?page=wysija_config');
     return true;
 }
开发者ID:rotoballer,项目名称:emily,代码行数:14,代码来源:config.php

示例7: licok

 function licok()
 {
     parent::WYSIJA_control_back();
     $dt = get_option("wysijey");
     if (isset($_REQUEST['xtz']) && $dt == $_REQUEST['xtz']) {
         $dataconf = array('premium_key' => base64_encode(get_option('home') . time()), 'premium_val' => time());
         $this->notice(__("Premium version is valid for your site.", WYSIJA));
     } else {
         $dataconf = array('premium_key' => "", 'premium_val' => "");
         //$datadomain=unserialize(base64_decode($dt));
         $this->error(str_replace(array("[link]", "[/link]"), array('<a href="http://www.wysija.com/?wysijap=checkout&wysijashop-page=1&controller=orders&action=checkout&wysijadomain=' . $dt . '" target="_blank">', '</a>'), __("Premium licence does not exist for your site. Purchase it [link]here[/link].", WYSIJA)), 1);
     }
     WYSIJA::update_option("wysicheck", false);
     $modelConf =& WYSIJA::get("config", "model");
     $modelConf->save($dataconf);
     $this->redirect('admin.php?page=wysija_config#tab-premium');
 }
开发者ID:rotoballer,项目名称:emily,代码行数:17,代码来源:campaigns.php

示例8: install

 function install()
 {
     $values = array();
     if (!$this->testSystem()) {
         return false;
     }
     if (!$this->createTables()) {
         return false;
     }
     $this->moveData('themes');
     $this->moveData('dividers');
     $this->moveData('bookmarks');
     $this->recordDefaultUserField();
     $this->defaultSettings($values);
     $this->defaultList($values);
     $this->defaultCampaign($values);
     $helper_import =& WYSIJA::get('import', 'helper');
     $values['importwp_list_id'] = $helper_import->importWP();
     $this->createPage($values);
     $this->createWYSIJAdir($values);
     $this->create_default_subscription_form();
     $model_config =& WYSIJA::get('config', 'model');
     $model_config->add_translated_default();
     $model_email =& WYSIJA::get('email', 'model');
     $model_email->blockMe = true;
     $values['confirm_email_id'] = $model_email->insert(array('type' => '0', 'from_email' => $values['from_email'], 'from_name' => $values['from_name'], 'replyto_email' => $values['from_email'], 'replyto_name' => $values['from_name'], 'subject' => $model_config->getValue('confirm_email_title'), 'body' => $model_config->getValue('confirm_email_body'), 'status' => 99));
     $values['installed'] = true;
     $values['manage_subscriptions'] = true;
     $values['installed_time'] = time();
     $values['wysija_db_version'] = WYSIJA::get_version();
     $wptoolboxs =& WYSIJA::get('toolbox', 'helper');
     $values['dkim_domain'] = $wptoolboxs->_make_domain_name();
     if (get_option('wysija_reinstall', 0)) {
         $values['wysija_whats_new'] = WYSIJA::get_version();
     }
     $model_config->save($values);
     $this->testNLplugins();
     $helper_wp_tools =& WYSIJA::get('wp_tools', 'helper');
     $helper_wp_tools->set_default_rolecaps();
     global $wysija_installing;
     $wysija_installing = false;
     WYSIJA::update_option('wysija_reinstall', 0);
     return true;
 }
开发者ID:sontv1003,项目名称:fashionbeans,代码行数:44,代码来源:install.php

示例9: removeProcess

 function removeProcess()
 {
     // Remove the wysija folder in uploads.
     $helper_file = WYSIJA::get('file', 'helper');
     $upload_dir = $helper_file->getUploadDir();
     $is_writable = is_writable($upload_dir);
     if ($is_writable) {
         $helper_file->rrmdir($upload_dir);
     } elseif ($upload_dir != false) {
         return false;
     }
     $file_name = WYSIJA_DIR . 'sql' . DS . 'uninstall.sql';
     $handle = fopen($file_name, 'r');
     $query = fread($handle, filesize($file_name));
     fclose($handle);
     $queries = str_replace('DROP TABLE `', 'DROP TABLE `[wysija]', $query);
     $queries = explode('-- QUERY ---', $queries);
     $modelWysija = new WYSIJA_model();
     global $wpdb;
     foreach ($queries as $query) {
         $modelWysija->query($query);
     }
     //wysija_last_php_cron_call
     foreach ($this->options_delete as $option_key) {
         delete_option($option_key);
     }
     WYSIJA::update_option('wysija_reinstall', 1);
     global $wp_roles;
     foreach ($wp_roles->roles as $rolek => $roled) {
         if ($rolek == 'administrator') {
             continue;
         }
         $role = get_role($rolek);
         //remove wysija's cap
         $arr = array('wysija_newsletters', 'wysija_subscribers', 'wysija_config');
         foreach ($arr as $arrkey) {
             $role->remove_cap($arrkey);
         }
     }
     return true;
 }
开发者ID:duboisGeof,项目名称:deliciousMeals,代码行数:41,代码来源:uninstall.php

示例10: cron_check

 /**
  * check that there is no passed schedules that need to be executed now
  * @return void
  */
 public static function cron_check()
 {
     $cron_schedules = WYSIJA::get_cron_schedule('all');
     if (empty($cron_schedules)) {
         return;
     } else {
         $processes = WYSIJA::get_cron_frequencies();
         $updated_sched = false;
         foreach ($cron_schedules as $schedule => &$params) {
             $running = 0;
             $time_now = time();
             if (isset($params['running'])) {
                 $running = $params['running'];
             }
             //if the process has timedout we reschedule the next execution
             if ($running && $time_now > $running + $processes[$schedule]) {
                 //WYSIJA::setInfo('error','modifying next schedule for '.$proc);
                 $process_frequency = $processes[$schedule];
                 $next_schedule = $running + $process_frequency;
                 // if the next schedule is already behind, we give it 30 seconds before it can trigger again
                 if ($next_schedule < $time_now) {
                     $next_schedule = $time_now + 30;
                 }
                 $params = array('next_schedule' => $next_schedule, 'prev_schedule' => $running, 'running' => false);
                 $updated_sched = true;
             }
         }
         if ($updated_sched) {
             //WYSIJA::setInfo('error','updating scheds');
             WYSIJA::update_option('wysija_schedules', $cron_schedules, 'yes');
         }
     }
     $time_now = time();
     $processesToRun = array();
     foreach ($cron_schedules as $schedule => $scheduled_times) {
         $process_frequency = $processes[$schedule];
         if ((!$scheduled_times['running'] || (int) $scheduled_times['running'] + $process_frequency < $time_now) && $scheduled_times['next_schedule'] < $time_now) {
             $processesToRun[] = $schedule;
         }
     }
     $model_config = WYSIJA::get('config', 'model');
     $page_view_trigger = (int) $model_config->getValue('cron_page_hit_trigger');
     if (!empty($processesToRun) && $page_view_trigger === 1) {
         //call the cron url
         $cron_url = site_url('wp-cron.php') . '?' . WYSIJA_CRON . '&action=wysija_cron&process=' . implode(',', $processesToRun) . '&silent=1';
         $cron_request = apply_filters('cron_request', array('url' => $cron_url, 'args' => array('timeout' => 0.01, 'blocking' => false, 'sslverify' => apply_filters('https_local_ssl_verify', true))));
         wp_remote_post($cron_url, $cron_request['args']);
     }
 }
开发者ID:namwoody,项目名称:curry,代码行数:53,代码来源:base.php

示例11: _save_default_import_field_match

 /**
  * this save a default list of column matching to ease the import process, this is done only the first time when the
  * field is not populated yet
  */
 private function _save_default_import_field_match()
 {
     $import_fields = get_option('wysija_import_fields');
     if (!$import_fields) {
         $import_fields = array('fname' => 'firstname', 'firstname' => 'firstname', 'prenom' => 'firstname', 'nom' => 'lastname', 'name' => 'lastname', 'lastname' => 'lastname', 'lname' => 'lastname', 'ipaddress' => 'ip', 'ip' => 'ip', 'addresseip' => 'ip');
         WYSIJA::update_option('wysija_import_fields', $import_fields);
     }
 }
开发者ID:pablomarsan,项目名称:iftheme-docs,代码行数:12,代码来源:WJ_Import.php

示例12: dkim_config

 function dkim_config()
 {
     $helperToolbox =& WYSIJA::get("toolbox", "helper");
     $dkim_domain = $helperToolbox->_make_domain_name(admin_url('admin.php'));
     $res1 = $errorssl = false;
     if (function_exists('openssl_pkey_new')) {
         while ($err = openssl_error_string()) {
         }
         $res1 = openssl_pkey_new(array('private_key_bits' => 512));
         $errorssl = openssl_error_string();
     }
     if (function_exists('openssl_pkey_new') && $res1 && !$errorssl && function_exists('openssl_pkey_get_details')) {
         $rsaKey = array('private' => '', 'public' => '', 'error' => '');
         $res = openssl_pkey_new(array('private_key_bits' => 512));
         if ($res && !openssl_error_string()) {
             $privkey = '';
             openssl_pkey_export($res, $privkey);
             $pubkey = openssl_pkey_get_details($res);
             $dataconf = array('dkim_domain' => $dkim_domain, 'dkim_privk' => $privkey, 'dkim_pubk' => $pubkey['key']);
             $modelConf =& WYSIJA::get('config', 'model');
             $modelConf->save($dataconf);
         }
     } else {
         //fetch them through a request to wysija.com
         $data = $this->getDomainInfo();
         $httpHelp =& WYSIJA::get("http", "helper");
         $jsonResult = $httpHelp->request('http://www.wysija.com/?wysijap=checkout&wysijashop-page=1&controller=customer&action=checkDkim&data=' . $data);
         if ($jsonResult) {
             $decoded = json_decode($jsonResult);
             $dataconf = array('dkim_domain' => $dkim_domain, 'dkim_privk' => $decoded->dkim_privk, 'dkim_pubk' => $decoded->dkim_pubk->key);
             $modelConf =& WYSIJA::get('config', 'model');
             $modelConf->save($dataconf);
             WYSIJA::update_option('dkim_autosetup', false);
         } else {
             WYSIJA::update_option('dkim_autosetup', true);
         }
     }
 }
开发者ID:fwelections,项目名称:fwelections,代码行数:38,代码来源:licence.php

示例13: import_save


//.........这里部分代码省略.........
     if (!in_array('status', $datatoinsert)) {
         $datatoinsert['status'] = 'status';
     }
     $queryStart = 'INSERT IGNORE INTO [wysija]user (`' . implode('` ,`', $datatoinsert) . '`,`created_at`) VALUES ';
     //$linescount=count($csvArr);
     //detect the emails that are duplicate in the import file
     $emailsCount = array();
     $header_row = $csvArr[0];
     //we process the sql insertion 200 by 200 so that we are safe with the server
     $csvChunks = array_chunk($csvArr, 200);
     $csvArr = null;
     $j = 0;
     $linescount = 0;
     $dataNumbers = array('invalid' => array(), 'inserted' => 0, 'outof' => 0, 'list_added' => 0, 'list_user_ids' => 0, 'list_list_ids' => count($_REQUEST['wysija']['user_list']['list']), 'emails_queued' => 0);
     $ignored_row_count = 0;
     foreach ($csvChunks as $keyChunk => $arra) {
         foreach ($arra as $keyline => $emailline) {
             if (isset($emailline[$emailKey])) {
                 if (isset($emailsCount[$emailline[$emailKey]])) {
                     $emailsCount[$emailline[$emailKey]]++;
                     //$arra[$keyline]
                 } else {
                     $emailsCount[$emailline[$emailKey]] = 1;
                 }
             } else {
                 //if the record doesn't have the attribute email then we just ignore it
                 $ignored_row_count++;
                 unset($arra[$keyline]);
             }
         }
         $result = $this->_importRows($queryStart, $arra, $j, $datatoinsert, $emailKey, $dataNumbers);
         if ($result !== false) {
             $j++;
         } else {
             $try = 0;
             while ($result === false && $try < 3) {
                 $result = $this->_importRows($queryStart, $arra, $j, $datatoinsert, $emailKey, $dataNumbers);
                 $try++;
             }
             if ($result) {
                 $j++;
             } else {
                 $this->error(__('There seems to be an error with the list you\'re trying to import.', WYSIJA), true);
                 $this->redirect('admin.php?page=wysija_subscribers&action=import');
                 return false;
             }
         }
         $linescount = $linescount + $result;
     }
     if (!isset($_POST['firstrowisdata'])) {
         //save the importing fields to be able to match them the next time
         $importfields = get_option('wysija_import_fields');
         foreach ($_POST['wysija']['match'] as $key => $val) {
             if ($val != 'nomatch') {
                 $importfields[$header_row[$key]] = $val;
             }
         }
         WYSIJA::update_option('wysija_import_fields', $importfields);
     }
     //get a list of list name
     $model =& WYSIJA::get('list', 'model');
     $results = $model->get(array('name'), array('list_id' => $_REQUEST['wysija']['user_list']['list']));
     $listnames = array();
     foreach ($results as $k => $v) {
         $listnames[] = $v['name'];
     }
     $helperU =& WYSIJA::get('user', 'helper');
     $helperU->refreshUsers();
     foreach ($emailsCount as $emailkeycount => $countemailfile) {
         if ($countemailfile == 1) {
             unset($emailsCount[$emailkeycount]);
         }
     }
     if ($linescount < 0) {
         $linescount = 0;
     }
     $dataNumbers['ignored'] = $dataNumbers['outof'] - $dataNumbers['inserted'];
     $dataNumbers['ignored_list'] = $dataNumbers['list_user_ids'] * $dataNumbers['list_list_ids'] - $dataNumbers['list_added'];
     // $this->notice(sprintf(__('%1$s subscribers have been added to database. (%2$s were ignored)',WYSIJA),$dataNumbers['inserted'],$dataNumbers['ignored']));
     $ignored_row_count;
     //this contain some ignored row because the email attribute was not detected. I say there should be a message for those
     $this->notice(sprintf(__('%1$s subscribers added to %2$s.', WYSIJA), $dataNumbers['list_user_ids'], '"' . implode('", "', $listnames) . '"'));
     if (count($emailsCount) > 0) {
         $listemails = '';
         $m = 0;
         foreach ($emailsCount as $emailkeyalready => $occurences) {
             if ($m > 0) {
                 $listemails .= ', ';
             }
             $listemails .= $emailkeyalready . ' (' . $occurences . ')';
             $m++;
         }
         //$emailsalreadyinserted=array_keys($emailsCount);
         $this->notice(sprintf(__('%1$s emails appear more than once in your file : %2$s.', WYSIJA), count($emailsCount), $listemails), 0);
     }
     if (count($dataNumbers['invalid']) > 0) {
         $this->notice(sprintf(__('%1$s emails are not valid : %2$s.', WYSIJA), count($dataNumbers['invalid']), implode(', ', $dataNumbers['invalid'])), 0);
     }
     $this->redirect();
 }
开发者ID:sontv1003,项目名称:fashionbeans,代码行数:101,代码来源:subscribers.php

示例14: wysija_dismiss_license_notice

 function wysija_dismiss_license_notice()
 {
     WYSIJA::update_option('wysija_dismiss_license_notice', true);
 }
开发者ID:duboisGeof,项目名称:deliciousMeals,代码行数:4,代码来源:config.php

示例15: dkim_config

    function dkim_config(){


        //checkif the open ssl function for priv and ub key are present on that server
        $hToolbox = WYSIJA::get('toolbox','helper');
        $dkim_domain = $hToolbox->_make_domain_name(admin_url('admin.php'));
        $res1=$errorssl=false;
        if(function_exists('openssl_pkey_new')){
            while ($err = openssl_error_string());
            $res1=openssl_pkey_new(array('private_key_bits' => 1024));
            $errorssl=openssl_error_string();
        }

        if(function_exists('openssl_pkey_new') && $res1 && !$errorssl  && function_exists('openssl_pkey_get_details')){

            $rsaKey = array('private' => '', 'public' => '', 'error' => '');
            $res = openssl_pkey_new(array('private_key_bits' => 1024));

            if($res && !openssl_error_string()){
                // Get private key
                $privkey = '';
                openssl_pkey_export($res, $privkey);

                // Get public key
                $pubkey = openssl_pkey_get_details($res);


                $configData=array('dkim_domain'=>$dkim_domain,'dkim_privk'=>$privkey,'dkim_pubk'=>$pubkey['key'],'dkim_1024'=>1);

                $mConfig = WYSIJA::get('config','model');
                $mConfig->save($configData);
            }

        }else{//fetch them through a request to mailpoet.com
            $domainData=$this->getDomainInfo();
            $hHTTP = WYSIJA::get('http','helper');

            $jsonResult = $hHTTP->wp_request('http://www.mailpoet.com/?wysijap=checkout&wysijashop-page=1&controller=customer&action=checkDkimNew&data='.$domainData);

            //remotely connect to host
            if($jsonResult!==false){
                $decoded=json_decode($jsonResult);

                $configData=array('dkim_domain'=>$dkim_domain,'dkim_privk'=>$decoded->dkim_privk,'dkim_pubk'=>$decoded->dkim_pubk->key,'dkim_1024'=>1);

                $mConfig = WYSIJA::get('config','model');
                $mConfig->save($configData);
                WYSIJA::update_option('dkim_autosetup',false);

            }else{
                 WYSIJA::update_option('dkim_autosetup',true);
            }

        }

    }
开发者ID:pauEscarcia,项目名称:AIMM,代码行数:56,代码来源:LICENCE.PHP


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