function setNTSettings($post, $options)
 {
     $code = 'VB';
     $lcode = 'vb';
     foreach ($post as $ii => $pval) {
         if (isset($pval['apVBUName']) && $pval['apVBUName'] != '') {
             if (!isset($options[$ii])) {
                 $options[$ii] = array();
             }
             if (isset($pval['apVBUName'])) {
                 $options[$ii]['vbUName'] = trim($pval['apVBUName']);
             }
             if (isset($pval['nName'])) {
                 $options[$ii]['nName'] = trim($pval['nName']);
             }
             if (isset($pval['apVBPass'])) {
                 $options[$ii]['vbPass'] = '******' . nsx_doEncode($pval['apVBPass']);
             } else {
                 $options[$ii]['vbPass'] = '';
             }
             if (isset($pval['apVBURL'])) {
                 $options[$ii]['vbURL'] = trim($pval['apVBURL']);
             }
             if (isset($pval['vbInclTags'])) {
                 $options[$ii]['vbInclTags'] = $pval['vbInclTags'];
             } else {
                 $options[$ii]['vbInclTags'] = 0;
             }
             if (isset($pval['apVBMsgTFrmt'])) {
                 $options[$ii]['vbMsgTFormat'] = trim($pval['apVBMsgTFrmt']);
             }
             if (isset($pval['apVBMsgFrmt'])) {
                 $options[$ii]['vbMsgFormat'] = trim($pval['apVBMsgFrmt']);
             }
             if (isset($pval['catSel'])) {
                 $options[$ii]['catSel'] = trim($pval['catSel']);
             } else {
                 $options[$ii]['catSel'] = 0;
             }
             if ($options[$ii]['catSel'] == '1' && trim($pval['catSelEd']) != '') {
                 $options[$ii]['catSelEd'] = trim($pval['catSelEd']);
             } else {
                 $options[$ii]['catSelEd'] = '';
             }
             if (isset($pval['apDoVB'])) {
                 $options[$ii]['doVB'] = $pval['apDoVB'];
             } else {
                 $options[$ii]['doVB'] = 0;
             }
             $options[$ii] = nxs_adjRpst($options[$ii], $pval);
             if (isset($pval['delayDays'])) {
                 $options[$ii]['nDays'] = trim($pval['delayDays']);
             }
             if (isset($pval['delayHrs'])) {
                 $options[$ii]['nHrs'] = trim($pval['delayHrs']);
             }
             if (isset($pval['delayMin'])) {
                 $options[$ii]['nMin'] = trim($pval['delayMin']);
             }
             if (isset($pval['qTLng'])) {
                 $options[$ii]['qTLng'] = trim($pval['qTLng']);
             }
         } elseif (count($pval) == 1) {
             if (isset($pval['apDo' . $code])) {
                 $options[$ii]['do' . $code] = $pval['apDo' . $code];
             } else {
                 $options[$ii]['do' . $code] = 0;
             }
         }
     }
     return $options;
 }
Пример #2
0
 function setNTSettings($post, $options)
 {
     global $nxs_snapThisPageUrl;
     // $code = 'PN'; $lcode = 'pn';
     foreach ($post as $ii => $pval) {
         if (isset($pval['apPNUName']) && $pval['apPNUName'] != '') {
             if (!isset($options[$ii])) {
                 $options[$ii] = array();
             }
             if (isset($pval['apDoPN'])) {
                 $options[$ii]['doPN'] = $pval['apDoPN'];
             } else {
                 $options[$ii]['doPN'] = 0;
             }
             if (isset($pval['nName'])) {
                 $options[$ii]['nName'] = trim($pval['nName']);
             }
             if (isset($pval['apPNUName'])) {
                 $options[$ii]['pnUName'] = trim($pval['apPNUName']);
             }
             if (isset($pval['apPNPass'])) {
                 $options[$ii]['pnPass'] = '******' . nsx_doEncode($pval['apPNPass']);
             } else {
                 $options[$ii]['pnPass'] = '';
             }
             if (isset($pval['apPNBoard'])) {
                 $options[$ii]['pnBoard'] = trim($pval['apPNBoard']);
             }
             if (isset($pval['apPNDefImg'])) {
                 $options[$ii]['pnDefImg'] = trim($pval['apPNDefImg']);
             }
             if (isset($pval['catSel'])) {
                 $options[$ii]['catSel'] = trim($pval['catSel']);
             }
             if ($options[$ii]['catSel'] == '1' && trim($pval['catSelEd']) != '') {
                 $options[$ii]['catSelEd'] = trim($pval['catSelEd']);
             } else {
                 $options[$ii]['catSelEd'] = '';
             }
             if (isset($pval['apPNMsgFrmt'])) {
                 $options[$ii]['pnMsgFormat'] = trim($pval['apPNMsgFrmt']);
             }
             if (isset($pval['delayHrs'])) {
                 $options[$ii]['nHrs'] = trim($pval['delayHrs']);
             }
             if (isset($pval['delayMin'])) {
                 $options[$ii]['nMin'] = trim($pval['delayMin']);
             }
             if (isset($pval['qTLng'])) {
                 $options[$ii]['qTLng'] = trim($pval['qTLng']);
             }
         }
     }
     return $options;
 }
Пример #3
0
 function setNTSettings($post, $options)
 {
     global $nxs_snapThisPageUrl;
     //prr($post); die();
     foreach ($post as $ii => $pval) {
         // prr($pval);
         if (isset($pval['apBGUName']) && trim($pval['apBGUName']) != '' && isset($pval['apBGPass']) && trim($pval['apBGPass']) != '') {
             if (!isset($options[$ii])) {
                 $options[$ii] = array();
             }
             if (isset($pval['apDoBG'])) {
                 $options[$ii]['doBG'] = $pval['apDoBG'];
             } else {
                 $options[$ii]['doBG'] = 0;
             }
             if (isset($pval['catSel'])) {
                 $options[$ii]['catSel'] = trim($pval['catSel']);
             }
             if ($options[$ii]['catSel'] == '1' && trim($pval['catSelEd']) != '') {
                 $options[$ii]['catSelEd'] = trim($pval['catSelEd']);
             } else {
                 $options[$ii]['catSelEd'] = '';
             }
             if (isset($pval['nName'])) {
                 $options[$ii]['nName'] = trim($pval['nName']);
             }
             if (isset($pval['apBGUName'])) {
                 $options[$ii]['bgUName'] = trim($pval['apBGUName']);
             }
             if (isset($pval['apBGPass'])) {
                 $options[$ii]['bgPass'] = '******' . nsx_doEncode($pval['apBGPass']);
             } else {
                 $options[$ii]['bgPass'] = '';
             }
             if (isset($pval['apBGBlogID'])) {
                 $options[$ii]['bgBlogID'] = trim($pval['apBGBlogID']);
             }
             if (isset($pval['apBGMsgFrmt'])) {
                 $options[$ii]['bgMsgFormat'] = trim($pval['apBGMsgFrmt']);
             }
             if (isset($pval['apBGMsgTFrmt'])) {
                 $options[$ii]['bgMsgTFormat'] = trim($pval['apBGMsgTFrmt']);
             }
             if (isset($pval['bgInclTags'])) {
                 $options[$ii]['bgInclTags'] = $pval['bgInclTags'];
             } else {
                 $options[$ii]['bgInclTags'] = 0;
             }
             if (isset($pval['delayHrs'])) {
                 $options[$ii]['nHrs'] = trim($pval['delayHrs']);
             }
             if (isset($pval['delayMin'])) {
                 $options[$ii]['nMin'] = trim($pval['delayMin']);
             }
             if (isset($pval['qTLng'])) {
                 $options[$ii]['qTLng'] = trim($pval['qTLng']);
             }
         }
         //prr($options);
     }
     return $options;
 }
Пример #4
0
 function setNTSettings($post, $options)
 {
     $code = $this->ntInfo['code'];
     foreach ($post as $ii => $pval) {
         if (isset($pval['apPNUName']) && $pval['apPNUName'] != '') {
             if (!isset($options[$ii])) {
                 $options[$ii] = array();
             }
             if (isset($pval['apDoPN'])) {
                 $options[$ii]['doPN'] = $pval['apDoPN'];
             } else {
                 $options[$ii]['doPN'] = 0;
             }
             if (isset($pval['nName'])) {
                 $options[$ii]['nName'] = trim($pval['nName']);
             }
             if (isset($pval['apPNUName'])) {
                 $options[$ii]['pnUName'] = trim($pval['apPNUName']);
             }
             if (isset($pval['apPNPass'])) {
                 $options[$ii]['pnPass'] = '******' . nsx_doEncode($pval['apPNPass']);
             } else {
                 $options[$ii]['pnPass'] = '';
             }
             if (isset($pval['apPNBoard'])) {
                 $options[$ii]['pnBoard'] = trim($pval['apPNBoard']);
             }
             if (isset($pval['apPNDefImg'])) {
                 $options[$ii]['pnDefImg'] = trim($pval['apPNDefImg']);
             }
             if (isset($pval['isAttachVid'])) {
                 $options[$ii]['isAttachVid'] = $pval['isAttachVid'];
             } else {
                 $options[$ii]['isAttachVid'] = 0;
             }
             if (isset($pval['cImgURL'])) {
                 $options[$ii]['cImgURL'] = trim($pval['cImgURL']);
             }
             if (isset($pval['catSel'])) {
                 $options[$ii]['catSel'] = trim($pval['catSel']);
             } else {
                 $options[$ii]['catSel'] = 0;
             }
             if ($options[$ii]['catSel'] == '1' && trim($pval['catSelEd']) != '') {
                 $options[$ii]['catSelEd'] = trim($pval['catSelEd']);
             } else {
                 $options[$ii]['catSelEd'] = '';
             }
             if (isset($pval['apPNMsgFrmt'])) {
                 $options[$ii]['pnMsgFormat'] = trim($pval['apPNMsgFrmt']);
             }
             $options[$ii] = nxs_adjRpst($options[$ii], $pval);
             if (isset($pval['delayDays'])) {
                 $options[$ii]['nDays'] = trim($pval['delayDays']);
             }
             if (isset($pval['delayHrs'])) {
                 $options[$ii]['nHrs'] = trim($pval['delayHrs']);
             }
             if (isset($pval['delayMin'])) {
                 $options[$ii]['nMin'] = trim($pval['delayMin']);
             }
             if (isset($pval['qTLng'])) {
                 $options[$ii]['qTLng'] = trim($pval['qTLng']);
             }
         } elseif (count($pval) == 1) {
             if (isset($pval['apDo' . $code])) {
                 $options[$ii]['do' . $code] = $pval['apDo' . $code];
             } else {
                 $options[$ii]['do' . $code] = 0;
             }
         }
     }
     return $options;
 }
Пример #5
0
 function setNTSettings($post, $options)
 {
     global $nxs_snapThisPageUrl;
     $code = 'DL';
     $lcode = 'dl';
     foreach ($post as $ii => $pval) {
         if (isset($pval['apDLUName']) && $pval['apDLUName'] != '') {
             if (!isset($options[$ii])) {
                 $options[$ii] = array();
             }
             if (isset($pval['apDLUName'])) {
                 $options[$ii]['dlUName'] = trim($pval['apDLUName']);
             }
             if (isset($pval['nName'])) {
                 $options[$ii]['nName'] = trim($pval['nName']);
             }
             if (isset($pval['apDLPass'])) {
                 $options[$ii]['dlPass'] = '******' . nsx_doEncode($pval['apDLPass']);
             } else {
                 $options[$ii]['dlPass'] = '';
             }
             if (isset($pval['catSel'])) {
                 $options[$ii]['catSel'] = trim($pval['catSel']);
             }
             if ($options[$ii]['catSel'] == '1' && trim($pval['catSelEd']) != '') {
                 $options[$ii]['catSelEd'] = trim($pval['catSelEd']);
             } else {
                 $options[$ii]['catSelEd'] = '';
             }
             if (isset($pval['apDLMsgFrmt'])) {
                 $options[$ii]['dlMsgFormat'] = trim($pval['apDLMsgFrmt']);
             }
             if (isset($pval['apDLMsgTFrmt'])) {
                 $options[$ii]['dlMsgTFormat'] = trim($pval['apDLMsgTFrmt']);
             }
             if (isset($pval['apDoDL'])) {
                 $options[$ii]['doDL'] = $pval['apDoDL'];
             } else {
                 $options[$ii]['doDL'] = 0;
             }
             if (isset($pval['delayHrs'])) {
                 $options[$ii]['nHrs'] = trim($pval['delayHrs']);
             }
             if (isset($pval['delayMin'])) {
                 $options[$ii]['nMin'] = trim($pval['delayMin']);
             }
             if (isset($pval['qTLng'])) {
                 $options[$ii]['qTLng'] = trim($pval['qTLng']);
             }
         }
     }
     return $options;
 }
Пример #6
0
 function setNTSettings($post, $options)
 {
     $code = 'KT';
     $lcode = 'kt';
     foreach ($post as $ii => $pval) {
         if (!empty($pval['uName']) && !empty($pval['uPass'])) {
             if (!isset($options[$ii])) {
                 $options[$ii] = array();
             }
             if (isset($pval['uName'])) {
                 $options[$ii]['uName'] = trim($pval['uName']);
             }
             if (isset($pval['nName'])) {
                 $options[$ii]['nName'] = trim($pval['nName']);
             }
             if (isset($pval['uPass'])) {
                 $options[$ii]['uPass'] = '******' . nsx_doEncode($pval['uPass']);
             } else {
                 $options[$ii]['uPass'] = '';
             }
             if (isset($pval['list'])) {
                 $options[$ii]['list'] = trim($pval['list']);
             }
             if (isset($pval['catSel'])) {
                 $options[$ii]['catSel'] = trim($pval['catSel']);
             } else {
                 $options[$ii]['catSel'] = 0;
             }
             if ($options[$ii]['catSel'] == '1' && trim($pval['catSelEd']) != '') {
                 $options[$ii]['catSelEd'] = trim($pval['catSelEd']);
             } else {
                 $options[$ii]['catSelEd'] = '';
             }
             if (isset($pval['msgFrmt'])) {
                 $options[$ii]['msgFrmt'] = trim($pval['msgFrmt']);
             }
             if (isset($pval['msgTFrmt'])) {
                 $options[$ii]['msgTFrmt'] = trim($pval['msgTFrmt']);
             }
             if (isset($pval['apDoKT'])) {
                 $options[$ii]['doKT'] = $pval['apDoKT'];
             } else {
                 $options[$ii]['doKT'] = 0;
             }
             $options[$ii] = nxs_adjRpst($options[$ii], $pval);
             if (isset($pval['delayDays'])) {
                 $options[$ii]['nDays'] = trim($pval['delayDays']);
             }
             if (isset($pval['delayHrs'])) {
                 $options[$ii]['nHrs'] = trim($pval['delayHrs']);
             }
             if (isset($pval['delayMin'])) {
                 $options[$ii]['nMin'] = trim($pval['delayMin']);
             }
             if (isset($pval['qTLng'])) {
                 $options[$ii]['qTLng'] = trim($pval['qTLng']);
             }
         } elseif (count($pval) == 1) {
             if (isset($pval['apDo' . $code])) {
                 $options[$ii]['do' . $code] = $pval['apDo' . $code];
             } else {
                 $options[$ii]['do' . $code] = 0;
             }
         }
     }
     return $options;
 }
Пример #7
0
 function setNTSettings($post, $options)
 {
     global $nxs_snapThisPageUrl;
     $code = 'FF';
     $lcode = 'ff';
     foreach ($post as $ii => $pval) {
         if (isset($pval['apFFUName']) && $pval['apFFUName'] != '') {
             if (!isset($options[$ii])) {
                 $options[$ii] = array();
             }
             if (isset($pval['apFFUName'])) {
                 $options[$ii]['ffUName'] = trim($pval['apFFUName']);
             }
             if (isset($pval['nName'])) {
                 $options[$ii]['nName'] = trim($pval['nName']);
             }
             if (isset($pval['apFFPass'])) {
                 $options[$ii]['ffPass'] = '******' . nsx_doEncode($pval['apFFPass']);
             } else {
                 $options[$ii]['ffPass'] = '';
             }
             if (isset($pval['catSel'])) {
                 $options[$ii]['catSel'] = trim($pval['catSel']);
             }
             if ($options[$ii]['catSel'] == '1' && trim($pval['catSelEd']) != '') {
                 $options[$ii]['catSelEd'] = trim($pval['catSelEd']);
             } else {
                 $options[$ii]['catSelEd'] = '';
             }
             if (isset($pval['apFFMsgFrmt'])) {
                 $options[$ii]['ffMsgFormat'] = trim($pval['apFFMsgFrmt']);
             }
             if (isset($pval['grpID'])) {
                 $options[$ii]['grpID'] = trim($pval['grpID']);
             }
             if (isset($pval['attchImg'])) {
                 $options[$ii]['attchImg'] = $pval['attchImg'];
             } else {
                 $options[$ii]['attchImg'] = 0;
             }
             if (isset($pval['apDoFF'])) {
                 $options[$ii]['doFF'] = $pval['apDoFF'];
             } else {
                 $options[$ii]['doFF'] = 0;
             }
             if (isset($pval['delayHrs'])) {
                 $options[$ii]['nHrs'] = trim($pval['delayHrs']);
             }
             if (isset($pval['delayMin'])) {
                 $options[$ii]['nMin'] = trim($pval['delayMin']);
             }
             if (isset($pval['qTLng'])) {
                 $options[$ii]['qTLng'] = trim($pval['qTLng']);
             }
         }
     }
     return $options;
 }
Пример #8
0
 function setNTSettings($post, $options)
 {
     $code = 'DI';
     $lcode = 'di';
     foreach ($post as $ii => $pval) {
         if (!empty($pval['apDIUName']) && !empty($pval['apDIPass'])) {
             if (!isset($options[$ii])) {
                 $options[$ii] = array();
             }
             if (isset($pval['apDIUName'])) {
                 $options[$ii]['diUName'] = trim($pval['apDIUName']);
             }
             if (isset($pval['nName'])) {
                 $options[$ii]['nName'] = trim($pval['nName']);
             }
             if (isset($pval['apDIPass'])) {
                 $options[$ii]['diPass'] = '******' . nsx_doEncode($pval['apDIPass']);
             } else {
                 $options[$ii]['diPass'] = '';
             }
             if (isset($pval['apDIAPIKey'])) {
                 $options[$ii]['diAPIKey'] = trim($pval['apDIAPIKey']);
             }
             if (isset($pval['catSel'])) {
                 $options[$ii]['catSel'] = trim($pval['catSel']);
             } else {
                 $options[$ii]['catSel'] = 0;
             }
             if ($options[$ii]['catSel'] == '1' && trim($pval['catSelEd']) != '') {
                 $options[$ii]['catSelEd'] = trim($pval['catSelEd']);
             } else {
                 $options[$ii]['catSelEd'] = '';
             }
             if (isset($pval['diInclTags'])) {
                 $options[$ii]['diInclTags'] = $pval['diInclTags'];
             } else {
                 $options[$ii]['diInclTags'] = 0;
             }
             if (isset($pval['apDIMsgTFrmt'])) {
                 $options[$ii]['diMsgTFormat'] = trim($pval['apDIMsgTFrmt']);
             }
             if (isset($pval['apDIMsgFrmt'])) {
                 $options[$ii]['diMsgFormat'] = trim($pval['apDIMsgFrmt']);
             }
             if (isset($pval['apDoDI'])) {
                 $options[$ii]['doDI'] = $pval['apDoDI'];
             } else {
                 $options[$ii]['doDI'] = 0;
             }
             $options[$ii] = nxs_adjRpst($options[$ii], $pval);
             if (isset($pval['delayDays'])) {
                 $options[$ii]['nDays'] = trim($pval['delayDays']);
             }
             if (isset($pval['delayHrs'])) {
                 $options[$ii]['nHrs'] = trim($pval['delayHrs']);
             }
             if (isset($pval['delayMin'])) {
                 $options[$ii]['nMin'] = trim($pval['delayMin']);
             }
             if (isset($pval['qTLng'])) {
                 $options[$ii]['qTLng'] = trim($pval['qTLng']);
             }
         } elseif (count($pval) == 1) {
             if (isset($pval['apDo' . $code])) {
                 $options[$ii]['do' . $code] = $pval['apDo' . $code];
             } else {
                 $options[$ii]['do' . $code] = 0;
             }
         }
     }
     return $options;
 }
Пример #9
0
 function setNTSettings($post, $options)
 {
     $code = 'WP';
     $lcode = 'wp';
     foreach ($post as $ii => $pval) {
         if (isset($pval['apWPUName']) && $pval['apWPUName'] != '') {
             if (!isset($options[$ii])) {
                 $options[$ii] = array();
             }
             if (isset($pval['apWPURL'])) {
                 $options[$ii]['wpURL'] = trim($pval['apWPURL']);
             }
             if (substr($options[$ii]['wpURL'], 0, 4) != 'http') {
                 $options[$ii]['wpURL'] = 'http://' . $options[$ii]['wpURL'];
             }
             if (isset($pval['nName'])) {
                 $options[$ii]['nName'] = trim($pval['nName']);
             }
             if (isset($pval['apWPUName'])) {
                 $options[$ii]['wpUName'] = trim($pval['apWPUName']);
             }
             if (isset($pval['apWPPass'])) {
                 $options[$ii]['wpPass'] = '******' . nsx_doEncode($pval['apWPPass']);
             } else {
                 $options[$ii]['wpPass'] = '';
             }
             if (isset($pval['apWPMsgFrmt'])) {
                 $options[$ii]['wpMsgFormat'] = trim($pval['apWPMsgFrmt']);
             }
             if (isset($pval['apWPMsgTFrmt'])) {
                 $options[$ii]['wpMsgTFormat'] = trim($pval['apWPMsgTFrmt']);
             }
             if (isset($pval['catSel'])) {
                 $options[$ii]['catSel'] = trim($pval['catSel']);
             } else {
                 $options[$ii]['catSel'] = 0;
             }
             if ($options[$ii]['catSel'] == '1' && trim($pval['catSelEd']) != '') {
                 $options[$ii]['catSelEd'] = trim($pval['catSelEd']);
             } else {
                 $options[$ii]['catSelEd'] = '';
             }
             if (isset($pval['apDoWP'])) {
                 $options[$ii]['doWP'] = $pval['apDoWP'];
             } else {
                 $options[$ii]['doWP'] = 0;
             }
             $options[$ii] = nxs_adjRpst($options[$ii], $pval);
             if (isset($pval['delayDays'])) {
                 $options[$ii]['nDays'] = trim($pval['delayDays']);
             }
             if (isset($pval['delayHrs'])) {
                 $options[$ii]['nHrs'] = trim($pval['delayHrs']);
             }
             if (isset($pval['delayMin'])) {
                 $options[$ii]['nMin'] = trim($pval['delayMin']);
             }
             if (isset($pval['qTLng'])) {
                 $options[$ii]['qTLng'] = trim($pval['qTLng']);
             }
         } elseif (count($pval) == 1) {
             if (isset($pval['apDo' . $code])) {
                 $options[$ii]['do' . $code] = $pval['apDo' . $code];
             } else {
                 $options[$ii]['do' . $code] = 0;
             }
         }
     }
     return $options;
 }
Пример #10
0
 function setNTSettings($post, $options)
 {
     $code = 'DA';
     $lcode = 'da';
     foreach ($post as $ii => $pval) {
         if (isset($pval['uName']) && $pval['uName'] != '') {
             if (!isset($options[$ii])) {
                 $options[$ii] = array();
             }
             if (isset($pval['uName'])) {
                 $options[$ii]['daUName'] = trim($pval['uName']);
             }
             if (isset($pval['nName'])) {
                 $options[$ii]['nName'] = trim($pval['nName']);
             }
             if (isset($pval['uPass'])) {
                 $options[$ii]['daPass'] = '******' . nsx_doEncode($pval['uPass']);
             } else {
                 $options[$ii]['daPass'] = '';
             }
             if (isset($pval['catSel'])) {
                 $options[$ii]['catSel'] = trim($pval['catSel']);
             } else {
                 $options[$ii]['catSel'] = 0;
             }
             if ($options[$ii]['catSel'] == '1' && trim($pval['catSelEd']) != '') {
                 $options[$ii]['catSelEd'] = trim($pval['catSelEd']);
             } else {
                 $options[$ii]['catSelEd'] = '';
             }
             if (isset($pval['daTitleFormat'])) {
                 $options[$ii]['daTitleFormat'] = trim($pval['daTitleFormat']);
             }
             if (isset($pval['daTextFormat'])) {
                 $options[$ii]['daTextFormat'] = trim($pval['daTextFormat']);
             }
             if (isset($pval['apDoDA'])) {
                 $options[$ii]['doDA'] = $pval['apDoDA'];
             } else {
                 $options[$ii]['doDA'] = 0;
             }
             $options[$ii] = nxs_adjRpst($options[$ii], $pval);
             if (isset($pval['delayDays'])) {
                 $options[$ii]['nDays'] = trim($pval['delayDays']);
             }
             if (isset($pval['delayHrs'])) {
                 $options[$ii]['nHrs'] = trim($pval['delayHrs']);
             }
             if (isset($pval['delayMin'])) {
                 $options[$ii]['nMin'] = trim($pval['delayMin']);
             }
             if (isset($pval['qTLng'])) {
                 $options[$ii]['qTLng'] = trim($pval['qTLng']);
             }
         } elseif (count($pval) == 1) {
             if (isset($pval['apDo' . $code])) {
                 $options[$ii]['do' . $code] = $pval['apDo' . $code];
             } else {
                 $options[$ii]['do' . $code] = 0;
             }
         }
     }
     return $options;
 }
Пример #11
0
 function setNTSettings($post, $options)
 {
     global $nxs_snapThisPageUrl;
     $code = 'SU';
     $lcode = 'su';
     foreach ($post as $ii => $pval) {
         if (isset($pval['apSUUName']) && $pval['apSUUName'] != '') {
             if (!isset($options[$ii])) {
                 $options[$ii] = array();
             }
             if (isset($pval['apSUUName'])) {
                 $options[$ii]['suUName'] = trim($pval['apSUUName']);
             }
             if (isset($pval['nName'])) {
                 $options[$ii]['nName'] = trim($pval['nName']);
             }
             if (isset($pval['apSUPass'])) {
                 $options[$ii]['suPass'] = '******' . nsx_doEncode($pval['apSUPass']);
             } else {
                 $options[$ii]['suPass'] = '';
             }
             if (isset($pval['apSUCat'])) {
                 $options[$ii]['suCat'] = trim($pval['apSUCat']);
             }
             if (isset($pval['suInclTags'])) {
                 $options[$ii]['suInclTags'] = $pval['suInclTags'];
             } else {
                 $options[$ii]['suInclTags'] = 0;
             }
             if (isset($pval['apSUMsgFrmt'])) {
                 $options[$ii]['suMsgFormat'] = trim($pval['apSUMsgFrmt']);
             }
             if (isset($pval['catSel'])) {
                 $options[$ii]['catSel'] = trim($pval['catSel']);
             }
             if ($options[$ii]['catSel'] == '1' && trim($pval['catSelEd']) != '') {
                 $options[$ii]['catSelEd'] = trim($pval['catSelEd']);
             } else {
                 $options[$ii]['catSelEd'] = '';
             }
             if (isset($pval['apDoSU'])) {
                 $options[$ii]['doSU'] = $pval['apDoSU'];
             } else {
                 $options[$ii]['doSU'] = 0;
             }
             if (isset($pval['nsfw'])) {
                 $options[$ii]['nsfw'] = $pval['nsfw'];
             } else {
                 $options[$ii]['nsfw'] = 0;
             }
             if (isset($pval['delayHrs'])) {
                 $options[$ii]['nHrs'] = trim($pval['delayHrs']);
             }
             if (isset($pval['delayMin'])) {
                 $options[$ii]['nMin'] = trim($pval['delayMin']);
             }
             if (isset($pval['qTLng'])) {
                 $options[$ii]['qTLng'] = trim($pval['qTLng']);
             }
         }
     }
     return $options;
 }
Пример #12
0
 function setNTSettings($post, $options)
 {
     $code = 'FF';
     $lcode = 'ff';
     foreach ($post as $ii => $pval) {
         if (isset($pval['apFFUName']) && $pval['apFFUName'] != '') {
             if (!isset($options[$ii])) {
                 $options[$ii] = array();
             }
             if (isset($pval['apFFUName'])) {
                 $options[$ii]['ffUName'] = trim($pval['apFFUName']);
             }
             if (isset($pval['nName'])) {
                 $options[$ii]['nName'] = trim($pval['nName']);
             }
             if (isset($pval['apFFPass'])) {
                 $options[$ii]['ffPass'] = '******' . nsx_doEncode($pval['apFFPass']);
             } else {
                 $options[$ii]['ffPass'] = '';
             }
             if (isset($pval['catSel'])) {
                 $options[$ii]['catSel'] = trim($pval['catSel']);
             } else {
                 $options[$ii]['catSel'] = 0;
             }
             if ($options[$ii]['catSel'] == '1' && trim($pval['catSelEd']) != '') {
                 $options[$ii]['catSelEd'] = trim($pval['catSelEd']);
             } else {
                 $options[$ii]['catSelEd'] = '';
             }
             if (isset($pval['apFFMsgFrmt'])) {
                 $options[$ii]['ffMsgFormat'] = trim($pval['apFFMsgFrmt']);
             }
             if (isset($pval['grpID'])) {
                 $options[$ii]['grpID'] = trim($pval['grpID']);
             }
             if (isset($pval['attchImg'])) {
                 $options[$ii]['attchImg'] = $pval['attchImg'];
             } else {
                 $options[$ii]['attchImg'] = 0;
             }
             if (isset($pval['apDoFF'])) {
                 $options[$ii]['doFF'] = $pval['apDoFF'];
             } else {
                 $options[$ii]['doFF'] = 0;
             }
             $options[$ii] = nxs_adjRpst($options[$ii], $pval);
             if (isset($pval['delayDays'])) {
                 $options[$ii]['nDays'] = trim($pval['delayDays']);
             }
             if (isset($pval['delayHrs'])) {
                 $options[$ii]['nHrs'] = trim($pval['delayHrs']);
             }
             if (isset($pval['delayMin'])) {
                 $options[$ii]['nMin'] = trim($pval['delayMin']);
             }
             if (isset($pval['qTLng'])) {
                 $options[$ii]['qTLng'] = trim($pval['qTLng']);
             }
         } elseif (count($pval) == 1) {
             if (isset($pval['apDo' . $code])) {
                 $options[$ii]['do' . $code] = $pval['apDo' . $code];
             } else {
                 $options[$ii]['do' . $code] = 0;
             }
         }
     }
     return $options;
 }
Пример #13
0
 function setNTSettings($post, $options)
 {
     $code = 'SU';
     $lcode = 'su';
     foreach ($post as $ii => $pval) {
         if (isset($pval['apSUUName']) && $pval['apSUUName'] != '') {
             if (!isset($options[$ii])) {
                 $options[$ii] = array();
             }
             $isUPChanged = isset($pval['apSUPass']) && isset($options[$ii]['suPass']) && 'n5g9a' . nsx_doEncode($pval['apSUPass']) != $options[$ii]['suPass'] || !isset($options[$ii]['suPass']) || (isset($pval['apSUUName']) && isset($options[$ii]['suUName']) && $pval['apSUUName'] != $options[$ii]['suUName'] || !isset($options[$ii]['suUName']));
             if ($isUPChanged) {
                 $options[$ii]['suSvC'] = '';
             }
             if (isset($pval['apSUUName'])) {
                 $options[$ii]['suUName'] = trim($pval['apSUUName']);
             }
             if (isset($pval['nName'])) {
                 $options[$ii]['nName'] = trim($pval['nName']);
             }
             if (isset($pval['apSUPass'])) {
                 $options[$ii]['suPass'] = '******' . nsx_doEncode($pval['apSUPass']);
             } else {
                 $options[$ii]['suPass'] = '';
             }
             if (isset($pval['apSUCat'])) {
                 $options[$ii]['suCat'] = trim($pval['apSUCat']);
             }
             if (isset($pval['suInclTags'])) {
                 $options[$ii]['suInclTags'] = $pval['suInclTags'];
             } else {
                 $options[$ii]['suInclTags'] = 0;
             }
             if (isset($pval['apSUMsgFrmt'])) {
                 $options[$ii]['suMsgFormat'] = trim($pval['apSUMsgFrmt']);
             }
             if (isset($pval['catSel'])) {
                 $options[$ii]['catSel'] = trim($pval['catSel']);
             } else {
                 $options[$ii]['catSel'] = 0;
             }
             if (!empty($options[$ii]['catSel']) && $options[$ii]['catSel'] == '1' && trim($pval['catSelEd']) != '') {
                 $options[$ii]['catSelEd'] = trim($pval['catSelEd']);
             } else {
                 $options[$ii]['catSelEd'] = '';
             }
             if (isset($pval['apDoSU'])) {
                 $options[$ii]['doSU'] = $pval['apDoSU'];
             } else {
                 $options[$ii]['doSU'] = 0;
             }
             if (isset($pval['nsfw'])) {
                 $options[$ii]['nsfw'] = $pval['nsfw'];
             } else {
                 $options[$ii]['nsfw'] = 0;
             }
             $options[$ii] = nxs_adjRpst($options[$ii], $pval);
             if (isset($pval['delayDays'])) {
                 $options[$ii]['nDays'] = trim($pval['delayDays']);
             }
             if (isset($pval['delayHrs'])) {
                 $options[$ii]['nHrs'] = trim($pval['delayHrs']);
             }
             if (isset($pval['delayMin'])) {
                 $options[$ii]['nMin'] = trim($pval['delayMin']);
             }
             if (isset($pval['qTLng'])) {
                 $options[$ii]['qTLng'] = trim($pval['qTLng']);
             }
         } elseif (count($pval) == 1) {
             if (isset($pval['apDo' . $code])) {
                 $options[$ii]['do' . $code] = $pval['apDo' . $code];
             } else {
                 $options[$ii]['do' . $code] = 0;
             }
         }
     }
     return $options;
 }
 function setNTSettings($post, $options)
 {
     $code = 'LJ';
     $lcode = 'lj';
     foreach ($post as $ii => $pval) {
         if (isset($pval['apLJUName']) && $pval['apLJUName'] != '') {
             if (!isset($options[$ii])) {
                 $options[$ii] = array();
             }
             if (isset($pval['nName'])) {
                 $options[$ii]['nName'] = trim($pval['nName']);
             }
             if (isset($pval['ljSrv'])) {
                 $options[$ii]['ljSrv'] = trim($pval['ljSrv']);
             }
             if ($options[$ii]['ljSrv'] == 'DW') {
                 $server = 'dreamwidth.org';
             } else {
                 $server = 'livejournal.com';
             }
             if (isset($pval['apLJUName'])) {
                 $options[$ii]['ljUName'] = trim($pval['apLJUName']);
             }
             $options[$ii]['ljURL'] = 'http://' . $options[$ii]['ljUName'] . "." . $server;
             if (isset($pval['apLJPass'])) {
                 $options[$ii]['ljPass'] = '******' . nsx_doEncode($pval['apLJPass']);
             } else {
                 $options[$ii]['ljPass'] = '';
             }
             if (isset($pval['apLJMsgFrmt'])) {
                 $options[$ii]['ljMsgFormat'] = trim($pval['apLJMsgFrmt']);
             }
             if (isset($pval['apLJMsgTFrmt'])) {
                 $options[$ii]['ljMsgTFormat'] = trim($pval['apLJMsgTFrmt']);
             }
             if (isset($pval['catSel'])) {
                 $options[$ii]['catSel'] = trim($pval['catSel']);
             } else {
                 $options[$ii]['catSel'] = 0;
             }
             if (isset($pval['inclTags'])) {
                 $options[$ii]['inclTags'] = $pval['inclTags'];
             } else {
                 $options[$ii]['inclTags'] = 0;
             }
             if ($options[$ii]['catSel'] == '1' && trim($pval['catSelEd']) != '') {
                 $options[$ii]['catSelEd'] = trim($pval['catSelEd']);
             } else {
                 $options[$ii]['catSelEd'] = '';
             }
             if (isset($pval['commID'])) {
                 if (stripos($pval['commID'], '.') !== false) {
                     $pval['commID'] = CutFromTo($pval['commID'], '://', '.');
                 }
                 $options[$ii]['commID'] = trim($pval['commID']);
             }
             if (isset($pval['apDoLJ'])) {
                 $options[$ii]['doLJ'] = $pval['apDoLJ'];
             } else {
                 $options[$ii]['doLJ'] = 0;
             }
             $options[$ii] = nxs_adjRpst($options[$ii], $pval);
             if (isset($pval['delayDays'])) {
                 $options[$ii]['nDays'] = trim($pval['delayDays']);
             }
             if (isset($pval['delayHrs'])) {
                 $options[$ii]['nHrs'] = trim($pval['delayHrs']);
             }
             if (isset($pval['delayMin'])) {
                 $options[$ii]['nMin'] = trim($pval['delayMin']);
             }
             if (isset($pval['qTLng'])) {
                 $options[$ii]['qTLng'] = trim($pval['qTLng']);
             }
         } elseif (count($pval) == 1) {
             if (isset($pval['apDo' . $code])) {
                 $options[$ii]['do' . $code] = $pval['apDo' . $code];
             } else {
                 $options[$ii]['do' . $code] = 0;
             }
         }
     }
     return $options;
 }
Пример #15
0
 function setNTSettings($post, $options)
 {
     $code = 'VK';
     $lcode = 'vk';
     foreach ($post as $ii => $pval) {
         if (isset($pval['apVKAppID']) && $pval['apVKAppID'] != '') {
             if (!isset($options[$ii])) {
                 $options[$ii] = array();
             }
             if (isset($pval['apDoVK'])) {
                 $options[$ii]['doVK'] = $pval['apDoVK'];
             } else {
                 $options[$ii]['doVK'] = 0;
             }
             if (isset($pval['nName'])) {
                 $options[$ii]['nName'] = trim($pval['nName']);
             }
             if (isset($pval['apVKAppID'])) {
                 $options[$ii]['vkAppID'] = trim($pval['apVKAppID']);
             }
             if (isset($pval['uName'])) {
                 $options[$ii]['uName'] = trim($pval['uName']);
             }
             if (isset($pval['uPass'])) {
                 $options[$ii]['uPass'] = '******' . nsx_doEncode($pval['uPass']);
             } else {
                 $options[$ii]['uPass'] = '';
             }
             if (isset($pval['vkPh'])) {
                 $options[$ii]['vkPh'] = trim($pval['vkPh']);
             }
             if (isset($pval['apVKAuthResp'])) {
                 $options[$ii]['apVKAuthResp'] = trim($pval['apVKAuthResp']);
                 $options[$ii]['vkAppAuthToken'] = trim(CutFromTo($pval['apVKAuthResp'] . '&', 'access_token=', '&'));
                 $options[$ii]['vkAppAuthUser'] = trim(CutFromTo($pval['apVKAuthResp'] . "&", 'user_id=', '&'));
                 $hdrsArr = nxs_getVKHeaders($pval['url']);
                 $response = wp_remote_get($pval['url'], array('method' => 'GET', 'timeout' => 45, 'redirection' => 0, 'headers' => $hdrsArr));
                 if (is_wp_error($response)) {
                     echo "ERROR: <br/>";
                     prr($response);
                     return;
                 }
                 $contents = $response['body'];
                 $contents = utf8_decode($contents);
                 if (stripos($contents, '"group_id":') !== false) {
                     $options[$ii]['pgIntID'] = '-' . CutFromTo($contents, '"group_id":', ',');
                     $type = 'all';
                 }
                 if (stripos($contents, '"public_id":') !== false) {
                     $options[$ii]['pgIntID'] = '-' . CutFromTo($contents, '"public_id":', ',');
                     $type = 'all';
                 }
                 if (stripos($contents, '"user_id":') !== false) {
                     $options[$ii]['pgIntID'] = CutFromTo($contents, '"user_id":', ',');
                     $type = 'own';
                 }
             }
             if (isset($pval['catSel'])) {
                 $options[$ii]['catSel'] = trim($pval['catSel']);
             } else {
                 $options[$ii]['catSel'] = 0;
             }
             if ($options[$ii]['catSel'] == '1' && trim($pval['catSelEd']) != '') {
                 $options[$ii]['catSelEd'] = trim($pval['catSelEd']);
             } else {
                 $options[$ii]['catSelEd'] = '';
             }
             if (isset($pval['postType'])) {
                 $options[$ii]['postType'] = trim($pval['postType']);
             }
             if (isset($pval['attch'])) {
                 $options[$ii]['attch'] = $pval['attch'];
             } else {
                 $options[$ii]['attch'] = 0;
             }
             if (isset($pval['attchAsVid'])) {
                 $options[$ii]['attchAsVid'] = $pval['attchAsVid'];
             } else {
                 $options[$ii]['attchAsVid'] = 0;
             }
             if (isset($pval['apVKImgUpl'])) {
                 $options[$ii]['imgUpl'] = $pval['apVKImgUpl'];
             } else {
                 $options[$ii]['imgUpl'] = 0;
             }
             if (isset($pval['addBackLink'])) {
                 $options[$ii]['addBackLink'] = $pval['addBackLink'];
             } else {
                 $options[$ii]['addBackLink'] = 0;
             }
             if (isset($pval['msgFrmt'])) {
                 $options[$ii]['msgFrmt'] = trim($pval['msgFrmt']);
             }
             if (isset($pval['msgAFormat'])) {
                 $options[$ii]['msgAFormat'] = trim($pval['msgAFormat']);
             }
             $options[$ii] = nxs_adjRpst($options[$ii], $pval);
             if (isset($pval['delayDays'])) {
                 $options[$ii]['nDays'] = trim($pval['delayDays']);
             }
             if (isset($pval['delayHrs'])) {
                 $options[$ii]['nHrs'] = trim($pval['delayHrs']);
             }
             if (isset($pval['delayMin'])) {
                 $options[$ii]['nMin'] = trim($pval['delayMin']);
             }
             if (isset($pval['qTLng'])) {
                 $options[$ii]['qTLng'] = trim($pval['qTLng']);
             }
             if (isset($pval['url'])) {
                 $options[$ii]['url'] = trim($pval['url']);
                 if (substr($options[$ii]['url'], 0, 4) != 'http') {
                     $options[$ii]['url'] = 'http://' . $options[$ii]['url'];
                 }
                 $vkPgID = $options[$ii]['url'];
                 if (substr($vkPgID, -1) == '/') {
                     $vkPgID = substr($vkPgID, 0, -1);
                 }
                 $vkPgID = substr(strrchr($vkPgID, "/"), 1);
                 if (strpos($vkPgID, '?') !== false) {
                     $vkPgID = substr($vkPgID, 0, strpos($vkPgID, '?'));
                 }
                 $options[$ii]['vkPgID'] = $vkPgID;
                 //echo $vkPgID;
                 if (strpos($options[$ii]['url'], '?') !== false) {
                     $options[$ii]['url'] = substr($options[$ii]['url'], 0, strpos($options[$ii]['url'], '?'));
                 }
                 // prr($pval); prr($options[$ii]); // die();
             }
         } elseif (count($pval) == 1) {
             if (isset($pval['apDo' . $code])) {
                 $options[$ii]['do' . $code] = $pval['apDo' . $code];
             } else {
                 $options[$ii]['do' . $code] = 0;
             }
         }
     }
     return $options;
 }
Пример #16
0
 function setNTSettings($post, $options)
 {
     global $nxs_snapThisPageUrl;
     $code = 'GP';
     $lcode = 'gp';
     foreach ($post as $ii => $pval) {
         if (isset($pval['apGPUName']) && $pval['apGPUName'] != '') {
             if (!isset($options[$ii])) {
                 $options[$ii] = array();
             }
             if (isset($pval['apGPUName'])) {
                 $options[$ii]['gpUName'] = trim($pval['apGPUName']);
             }
             if (isset($pval['nName'])) {
                 $options[$ii]['nName'] = trim($pval['nName']);
             }
             if (isset($pval['apGPPass'])) {
                 $options[$ii]['gpPass'] = '******' . nsx_doEncode($pval['apGPPass']);
             } else {
                 $options[$ii]['gpPass'] = '';
             }
             if (isset($pval['apGPPage'])) {
                 $options[$ii]['gpPageID'] = trim($pval['apGPPage']);
             }
             if (isset($pval['gpCommID'])) {
                 $options[$ii]['gpCommID'] = trim($pval['gpCommID']);
             }
             if (isset($pval['catSel'])) {
                 $options[$ii]['catSel'] = trim($pval['catSel']);
             }
             if ($options[$ii]['catSel'] == '1' && trim($pval['catSelEd']) != '') {
                 $options[$ii]['catSelEd'] = trim($pval['catSelEd']);
             } else {
                 $options[$ii]['catSelEd'] = '';
             }
             if (isset($pval['postType'])) {
                 $options[$ii]['postType'] = $pval['postType'];
             }
             if (isset($pval['apGPMsgFrmt'])) {
                 $options[$ii]['gpMsgFormat'] = trim($pval['apGPMsgFrmt']);
             }
             if (isset($pval['apDoGP'])) {
                 $options[$ii]['doGP'] = $pval['apDoGP'];
             } else {
                 $options[$ii]['doGP'] = 0;
             }
             if (isset($pval['delayHrs'])) {
                 $options[$ii]['nHrs'] = trim($pval['delayHrs']);
             }
             if (isset($pval['delayMin'])) {
                 $options[$ii]['nMin'] = trim($pval['delayMin']);
             }
             if (isset($pval['qTLng'])) {
                 $options[$ii]['qTLng'] = trim($pval['qTLng']);
             }
         }
     }
     return $options;
 }
 function setNTSettings($post, $options)
 {
     $code = $this->ntInfo['code'];
     foreach ($post as $ii => $pval) {
         // prr($pval);
         if (isset($pval['apBGUName']) && trim($pval['apBGUName']) != '' && isset($pval['apBGPass']) && trim($pval['apBGPass']) != '') {
             if (!isset($options[$ii])) {
                 $options[$ii] = array();
             }
             if (isset($pval['apDoBG'])) {
                 $options[$ii]['doBG'] = $pval['apDoBG'];
             } else {
                 $options[$ii]['doBG'] = 0;
             }
             if (isset($pval['catSel'])) {
                 $options[$ii]['catSel'] = trim($pval['catSel']);
             } else {
                 $options[$ii]['catSel'] = 0;
             }
             if ($options[$ii]['catSel'] == '1' && trim($pval['catSelEd']) != '') {
                 $options[$ii]['catSelEd'] = trim($pval['catSelEd']);
             } else {
                 $options[$ii]['catSelEd'] = '';
             }
             if (isset($pval['nName'])) {
                 $options[$ii]['nName'] = trim($pval['nName']);
             }
             if (isset($pval['apBGUName'])) {
                 $options[$ii]['bgUName'] = trim($pval['apBGUName']);
             }
             if (isset($pval['apBGPass'])) {
                 $options[$ii]['bgPass'] = '******' . nsx_doEncode($pval['apBGPass']);
             } else {
                 $options[$ii]['bgPass'] = '';
             }
             if (isset($pval['apBGBlogID'])) {
                 $options[$ii]['bgBlogID'] = trim($pval['apBGBlogID']);
             }
             if (isset($pval['apBGMsgFrmt'])) {
                 $options[$ii]['bgMsgFormat'] = trim($pval['apBGMsgFrmt']);
             }
             if (isset($pval['apBGMsgTFrmt'])) {
                 $options[$ii]['bgMsgTFormat'] = trim($pval['apBGMsgTFrmt']);
             }
             if (isset($pval['bgInclTags'])) {
                 $options[$ii]['bgInclTags'] = $pval['bgInclTags'];
             } else {
                 $options[$ii]['bgInclTags'] = 0;
             }
             $options[$ii] = nxs_adjRpst($options[$ii], $pval);
             if (isset($pval['delayDays'])) {
                 $options[$ii]['nDays'] = trim($pval['delayDays']);
             }
             if (isset($pval['delayHrs'])) {
                 $options[$ii]['nHrs'] = trim($pval['delayHrs']);
             }
             if (isset($pval['delayMin'])) {
                 $options[$ii]['nMin'] = trim($pval['delayMin']);
             }
             if (isset($pval['qTLng'])) {
                 $options[$ii]['qTLng'] = trim($pval['qTLng']);
             }
         } elseif (count($pval) == 1) {
             if (isset($pval['apDo' . $code])) {
                 $options[$ii]['do' . $code] = $pval['apDo' . $code];
             } else {
                 $options[$ii]['do' . $code] = 0;
             }
         }
     }
     return $options;
 }
Пример #18
0
 function setNTSettings($post, $options)
 {
     $code = 'RD';
     $lcode = 'rd';
     foreach ($post as $ii => $pval) {
         if (!empty($pval['uName']) && !empty($pval['uPass'])) {
             if (!isset($options[$ii])) {
                 $options[$ii] = array();
             }
             if (isset($pval['uName'])) {
                 $options[$ii]['rdUName'] = trim($pval['uName']);
             }
             if (isset($pval['nName'])) {
                 $options[$ii]['nName'] = trim($pval['nName']);
             }
             if (isset($pval['uPass'])) {
                 $options[$ii]['rdPass'] = '******' . nsx_doEncode($pval['uPass']);
             } else {
                 $options[$ii]['rdPass'] = '';
             }
             if (empty($options[$ii]['rdSubRedditsList'])) {
                 $pass = substr($options[$ii]['rdPass'], 0, 5) == 'n5g9a' ? nsx_doDecode(substr($options[$ii]['rdPass'], 5)) : $options[$ii]['rdPass'];
                 $loginInfo = doConnectToRD($options[$ii]['rdUName'], $pass);
                 if (is_array($loginInfo)) {
                     $options[$ii]['rdSubRedditsList'] = doGetSubredditsFromRD();
                 }
             }
             if (isset($pval['rdSubReddit'])) {
                 $options[$ii]['rdSubReddit'] = trim($pval['rdSubReddit']);
             }
             if (isset($pval['catSel'])) {
                 $options[$ii]['catSel'] = trim($pval['catSel']);
             } else {
                 $options[$ii]['catSel'] = 0;
             }
             if ($options[$ii]['catSel'] == '1' && trim($pval['catSelEd']) != '') {
                 $options[$ii]['catSelEd'] = trim($pval['catSelEd']);
             } else {
                 $options[$ii]['catSelEd'] = '';
             }
             if (isset($pval['postType'])) {
                 $options[$ii]['postType'] = $pval['postType'];
             }
             if (isset($pval['rdTitleFormat'])) {
                 $options[$ii]['rdTitleFormat'] = trim($pval['rdTitleFormat']);
             }
             if (isset($pval['rdTextFormat'])) {
                 $options[$ii]['rdTextFormat'] = trim($pval['rdTextFormat']);
             }
             if (isset($pval['apDoRD'])) {
                 $options[$ii]['doRD'] = $pval['apDoRD'];
             } else {
                 $options[$ii]['doRD'] = 0;
             }
             $options[$ii] = nxs_adjRpst($options[$ii], $pval);
             if (isset($pval['delayDays'])) {
                 $options[$ii]['nDays'] = trim($pval['delayDays']);
             }
             if (isset($pval['delayHrs'])) {
                 $options[$ii]['nHrs'] = trim($pval['delayHrs']);
             }
             if (isset($pval['delayMin'])) {
                 $options[$ii]['nMin'] = trim($pval['delayMin']);
             }
             if (isset($pval['qTLng'])) {
                 $options[$ii]['qTLng'] = trim($pval['qTLng']);
             }
         } elseif (count($pval) == 1) {
             if (isset($pval['apDo' . $code])) {
                 $options[$ii]['do' . $code] = $pval['apDo' . $code];
             } else {
                 $options[$ii]['do' . $code] = 0;
             }
         }
     }
     return $options;
 }
 function setNTSettings($post, $options)
 {
     $code = 'YT';
     $lcode = 'yt';
     foreach ($post as $ii => $pval) {
         if (isset($pval['apYTUName']) && $pval['apYTUName'] != '') {
             if (!isset($options[$ii])) {
                 $options[$ii] = array();
             }
             if (isset($pval['apYTUName'])) {
                 $options[$ii]['ytUName'] = trim($pval['apYTUName']);
             }
             if (isset($pval['nName'])) {
                 $options[$ii]['nName'] = trim($pval['nName']);
             }
             if (isset($pval['apYTPass'])) {
                 $options[$ii]['ytPass'] = '******' . nsx_doEncode($pval['apYTPass']);
             } else {
                 $options[$ii]['ytPass'] = '';
             }
             if (isset($pval['apYTPage'])) {
                 $options[$ii]['ytPageID'] = trim($pval['apYTPage']);
             }
             if (isset($pval['ytGPPageID'])) {
                 $options[$ii]['ytGPPageID'] = trim($pval['ytGPPageID']);
             }
             if (isset($pval['catSel'])) {
                 $options[$ii]['catSel'] = trim($pval['catSel']);
             } else {
                 $options[$ii]['catSel'] = 0;
             }
             if ($options[$ii]['catSel'] == '1' && trim($pval['catSelEd']) != '') {
                 $options[$ii]['catSelEd'] = trim($pval['catSelEd']);
             } else {
                 $options[$ii]['catSelEd'] = '';
             }
             if (isset($pval['postType'])) {
                 $options[$ii]['postType'] = $pval['postType'];
             }
             if (isset($pval['apYTMsgFrmt'])) {
                 $options[$ii]['ytMsgFormat'] = trim($pval['apYTMsgFrmt']);
             }
             if (isset($pval['apDoYT'])) {
                 $options[$ii]['doYT'] = $pval['apDoYT'];
             } else {
                 $options[$ii]['doYT'] = 0;
             }
             $options[$ii] = nxs_adjRpst($options[$ii], $pval);
             if (isset($pval['delayDays'])) {
                 $options[$ii]['nDays'] = trim($pval['delayDays']);
             }
             if (isset($pval['delayHrs'])) {
                 $options[$ii]['nHrs'] = trim($pval['delayHrs']);
             }
             if (isset($pval['delayMin'])) {
                 $options[$ii]['nMin'] = trim($pval['delayMin']);
             }
             if (isset($pval['qTLng'])) {
                 $options[$ii]['qTLng'] = trim($pval['qTLng']);
             }
         } elseif (count($pval) == 1) {
             if (isset($pval['apDo' . $code])) {
                 $options[$ii]['do' . $code] = $pval['apDo' . $code];
             } else {
                 $options[$ii]['do' . $code] = 0;
             }
         }
     }
     return $options;
 }
Пример #20
0
 function setNTSettings($post, $options)
 {
     $code = 'GP';
     $lcode = 'gp';
     foreach ($post as $ii => $pval) {
         if (!empty($pval['apGPUName']) && !empty($pval['apGPPass'])) {
             if (!isset($options[$ii])) {
                 $options[$ii] = array();
             }
             if (isset($pval['apGPUName'])) {
                 $options[$ii]['gpUName'] = trim($pval['apGPUName']);
             }
             if (isset($pval['nName'])) {
                 $options[$ii]['nName'] = trim($pval['nName']);
             }
             if (isset($pval['apGPPass'])) {
                 $options[$ii]['gpPass'] = '******' . nsx_doEncode($pval['apGPPass']);
             } else {
                 $options[$ii]['gpPass'] = '';
             }
             if (isset($pval['apGPPage'])) {
                 $options[$ii]['gpPageID'] = trim($pval['apGPPage']);
             }
             if (isset($pval['gpCommID'])) {
                 $options[$ii]['gpCommID'] = trim($pval['gpCommID']);
             }
             if (isset($pval['catSel'])) {
                 $options[$ii]['catSel'] = trim($pval['catSel']);
             } else {
                 $options[$ii]['catSel'] = 0;
             }
             if ($options[$ii]['catSel'] == '1' && trim($pval['catSelEd']) != '') {
                 $options[$ii]['catSelEd'] = trim($pval['catSelEd']);
             } else {
                 $options[$ii]['catSelEd'] = '';
             }
             if (isset($pval['apGPCCats'])) {
                 $options[$ii]['gpCCat'] = trim($pval['apGPCCats']);
             }
             $options[$ii] = nxs_adjRpst($options[$ii], $pval);
             if (isset($pval['postType'])) {
                 $options[$ii]['postType'] = $pval['postType'];
             }
             if (isset($pval['apGPMsgFrmt'])) {
                 $options[$ii]['gpMsgFormat'] = trim($pval['apGPMsgFrmt']);
             }
             if (isset($pval['apDoGP'])) {
                 $options[$ii]['doGP'] = $pval['apDoGP'];
             } else {
                 $options[$ii]['doGP'] = 0;
             }
             if (isset($pval['delayDays'])) {
                 $options[$ii]['nDays'] = trim($pval['delayDays']);
             }
             if (isset($pval['delayHrs'])) {
                 $options[$ii]['nHrs'] = trim($pval['delayHrs']);
             }
             if (isset($pval['delayMin'])) {
                 $options[$ii]['nMin'] = trim($pval['delayMin']);
             }
             if (isset($pval['qTLng'])) {
                 $options[$ii]['qTLng'] = trim($pval['qTLng']);
             }
         } elseif (count($pval) == 1) {
             if (isset($pval['apDo' . $code])) {
                 $options[$ii]['do' . $code] = $pval['apDo' . $code];
             } else {
                 $options[$ii]['do' . $code] = 0;
             }
         }
     }
     return $options;
 }