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


PHP zb_rand_string函数代码示例

本文整理汇总了PHP中zb_rand_string函数的典型用法代码示例。如果您正苦于以下问题:PHP zb_rand_string函数的具体用法?PHP zb_rand_string怎么用?PHP zb_rand_string使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: zb_PhpConsoleCreateTemplate

 function zb_PhpConsoleCreateTemplate($name, $body)
 {
     $key = 'PHPCONSOLETEMPLATE:' . zb_rand_string(16);
     $newtemplatedata = array();
     $newtemplatedata['name'] = $name;
     $newtemplatedata['body'] = $body;
     $value = serialize($newtemplatedata);
     zb_StorageSet($key, $value);
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:9,代码来源:index.php

示例2: sendEmail

 /**
  * Stores message in email sending queue. Use this method in your modules.
  * 
  * @param string $email
  * @param string $subj
  * @param string $message
  * @param string $module
  * 
  * @return bool
  */
 public function sendEmail($email, $subj, $message, $module = '')
 {
     $result = false;
     $email = trim($email);
     $subj = trim($subj);
     $module = !empty($module) ? ' MODULE ' . $module : '';
     if (!empty($email)) {
         $message = trim($message);
         $filename = self::QUEUE_PATH . 'eml_' . zb_rand_string(8);
         $storedata['email'] = $email;
         $storedata['subj'] = $subj;
         $storedata['message'] = $message;
         $storedata = json_encode($storedata);
         file_put_contents($filename, $storedata);
         log_register('UEML SEND EMAIL `' . $email . '`' . $module);
         $result = true;
     }
     return $result;
 }
开发者ID:nightflyza,项目名称:Ubilling,代码行数:29,代码来源:api.email.php

示例3: sendMessage

 /**
  * Stores message in telegram sending queue. Use this method in your modules.
  * 
  * @param int $chatid
  * @param string $message
  * @param bool $translit
  * @param string $module
  * 
  * @return bool
  */
 public function sendMessage($chatid, $message, $translit = false, $module = '')
 {
     $result = false;
     $chatid = trim($chatid);
     $module = !empty($module) ? ' MODULE ' . $module : '';
     if (!empty($chatid)) {
         $message = str_replace(array("\n\r", "\n", "\r"), ' ', $message);
         if ($translit) {
             $message = zb_TranslitString($message);
         }
         $message = trim($message);
         $filename = self::QUEUE_PATH . 'tlg_' . zb_rand_string(8);
         $storedata = 'CHATID="' . $chatid . '"' . "\n";
         $storedata .= 'MESSAGE="' . $message . '"' . "\n";
         file_put_contents($filename, $storedata);
         log_register('UTLG SEND MESSAGE `' . $chatid . '`' . $module);
         $result = true;
     }
     return $result;
 }
开发者ID:nightflyza,项目名称:Ubilling,代码行数:30,代码来源:api.telegram.php

示例4: sendSMS

 /**
  * Stores SMS in sending queue 
  * 
  * @param string $number Mobile number in international format. Eg: +380506666666
  * @param string $message Text message for sending
  * @param bool $translit force message transliteration
  * @param string $module module that inits SMS sending
  * 
  * @return bool
  */
 public function sendSMS($number, $message, $translit = true, $module = '')
 {
     $result = false;
     $number = trim($number);
     $module = !empty($module) ? ' MODULE ' . $module : '';
     if (!empty($number)) {
         if (ispos($number, '+')) {
             $message = str_replace(array("\n\r", "\n", "\r"), ' ', $message);
             if ($translit) {
                 $message = zb_TranslitString($message);
             }
             $message = trim($message);
             $filename = self::QUEUE_PATH . 'us_' . zb_rand_string(8);
             $storedata = 'NUMBER="' . $number . '"' . "\n";
             $storedata .= 'MESSAGE="' . $message . '"' . "\n";
             file_put_contents($filename, $storedata);
             log_register('USMS SEND SMS `' . $number . '`' . $module);
             $result = true;
         }
     }
     return $result;
 }
开发者ID:nightflyza,项目名称:Ubilling,代码行数:32,代码来源:api.usms.php

示例5: sendSMS

 /**
  * Stores SMS in sending queue 
  * 
  * @param string $number Mobile number in international format. Eg: +380506666666
  * @param string $message Text message for sending
  * @param bool $translit force message transliteration
  * @return bool
  */
 public function sendSMS($number, $message, $translit = true)
 {
     $result = false;
     $number = trim($number);
     if (!empty($number)) {
         if (ispos($number, '+')) {
             $message = str_replace('\\r\\n', ' ', $message);
             if ($translit) {
                 $message = zb_TranslitString($message);
             }
             $message = trim($message);
             $filename = self::QUEUE_PATH . 'us_' . zb_rand_string(8);
             $storedata = 'NUMBER="' . $number . '"' . "\n";
             $storedata .= 'MESSAGE="' . $message . '"' . "\n";
             $result['number'] = $number;
             $result['message'] = $message;
             file_put_contents($filename, $storedata);
             log_register("USMS SEND SMS `" . $number . "`");
             $result = true;
         }
     }
     return $result;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:31,代码来源:api.usms.php

示例6: web_MigrationPrepare

 function web_MigrationPrepare($import_rawdata, $import_opts)
 {
     $import_rawdata = unserialize(base64_decode($import_rawdata));
     $import_opts = unserialize(base64_decode($import_opts));
     $cells = wf_TableCell('#');
     $cells .= wf_TableCell('[login]');
     $cells .= wf_TableCell('[password]');
     $cells .= wf_TableCell('[ip]');
     $cells .= wf_TableCell('[mac]');
     $cells .= wf_TableCell('[tariff]');
     $cells .= wf_TableCell('[cash]');
     $cells .= wf_TableCell('[phone]');
     $cells .= wf_TableCell('[mobile]');
     $cells .= wf_TableCell('[email]');
     $cells .= wf_TableCell('[credit]');
     $cells .= wf_TableCell('[creditex]');
     $cells .= wf_TableCell('[address]');
     $cells .= wf_TableCell('[realname]');
     $cells .= wf_TableCell('[contract]');
     $cells .= wf_TableCell('[ao]');
     $cells .= wf_TableCell('[down]');
     $cells .= wf_TableCell('[passive]');
     $rows = wf_TableRow($cells, 'row1');
     $regdata = array();
     $i = 0;
     foreach ($import_rawdata as $eachrow) {
         $i++;
         $cells = wf_TableCell($i);
         if ($import_opts['login_col'] != 'RANDOM') {
             $login = $eachrow[$import_opts['login_col']];
         } else {
             $login = 'mi_' . zb_rand_string(8);
         }
         $cells .= wf_TableCell($login);
         if ($import_opts['password_col'] != 'RANDOM') {
             $password = $eachrow[$import_opts['password_col']];
         } else {
             $password = zb_rand_string(10);
         }
         $cells .= wf_TableCell($password);
         $ip = $eachrow[$import_opts['ip_col']];
         $cells .= wf_TableCell($ip);
         if ($import_opts['mac_col'] != 'RANDOM') {
             $mac = $eachrow[$import_opts['mac_col']];
         } else {
             $mac = '14:' . '88' . ':' . rand(10, 99) . ':' . rand(10, 99) . ':' . rand(10, 99) . ':' . rand(10, 99);
         }
         $cells .= wf_TableCell($mac);
         $tariff = $eachrow[$import_opts['tariff_col']];
         $cells .= wf_TableCell($tariff);
         $cash = $eachrow[$import_opts['cash_col']];
         $cells .= wf_TableCell($cash);
         if ($import_opts['phone_col'] != 'NONE') {
             $phone = $eachrow[$import_opts['phone_col']];
         } else {
             $phone = '';
         }
         $cells .= wf_TableCell($phone);
         if ($import_opts['mobile_col'] != 'NONE') {
             $mobile = $eachrow[$import_opts['mobile_col']];
         } else {
             $mobile = '';
         }
         $cells .= wf_TableCell($mobile);
         if ($import_opts['email_col'] != 'NONE') {
             $email = $eachrow[$import_opts['email_col']];
         } else {
             $email = '';
         }
         $cells .= wf_TableCell($email);
         if ($import_opts['credit_col'] != 'ZERO') {
             $credit = $eachrow[$import_opts['credit_col']];
         } else {
             $credit = 0;
         }
         $cells .= wf_TableCell($credit);
         if ($import_opts['creditex_col'] != 'NONE') {
             $creditex = $eachrow[$import_opts['creditex_col']];
         } else {
             $creditex = '0';
         }
         $cells .= wf_TableCell($creditex);
         if ($import_opts['address_col'] != 'NONE') {
             $address = $eachrow[$import_opts['address_col']];
         } else {
             $address = '';
         }
         $cells .= wf_TableCell($address);
         if ($import_opts['realname_col'] != 'NONE') {
             $realname = $eachrow[$import_opts['realname_col']];
         } else {
             $realname = '';
         }
         $cells .= wf_TableCell($realname);
         if ($import_opts['contract_col'] != 'NONE') {
             $contract = $eachrow[$import_opts['contract_col']];
         } else {
             $contract = '';
         }
         $cells .= wf_TableCell($contract);
//.........这里部分代码省略.........
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:101,代码来源:index.php

示例7: createKey

 /**
  * installs new license key
  * 
  * @param $key string valid license key
  * 
  * @return bool
  */
 public function createKey($key)
 {
     $key = mysql_real_escape_string($key);
     if ($this->checkLicenseValidity($key)) {
         $keyname = 'AVLICENSE_' . zb_rand_string('8');
         $query = "INSERT INTO `ubstorage` (`id`, `key`, `value`) VALUES (NULL, '" . $keyname . "', '" . $key . "');";
         nr_query($query);
         log_register("AVARICE INSTALL KEY `" . $keyname . '`');
         return true;
     } else {
         log_register("AVARICE TRY INSTALL WRONG KEY");
         return false;
     }
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:21,代码来源:api.deploy.php

示例8: exportCSV

 /**
  * extracts data from agentPring cache for future export in CSV
  * 
  * @param int $agentid Existing agent ID in database
  * 
  * @return void
  */
 public function exportCSV($agentid)
 {
     $tmpArr = array();
     $result = '';
     if (!empty($this->altcfg)) {
         $altercfg = $this->altcfg;
     } else {
         global $ubillingConfig;
         $this->altcfg = $ubillingConfig->getAlter();
         $altercfg = $this->altcfg;
     }
     if (file_exists(self::EXPORT_PATH . 'report_agentfinance.prindataraw')) {
         $rawData = file_get_contents(self::EXPORT_PATH . 'report_agentfinance.prindataraw');
         $tmpArr = unserialize($rawData);
         $allservicenames = zb_VservicesGetAllNamesLabeled();
         $this->loadUserRealnames();
         $this->loadCashTypes();
         if (!empty($tmpArr)) {
             if (isset($tmpArr[$agentid])) {
                 if (!empty($tmpArr[$agentid])) {
                     //CSV header
                     $result .= __('ID') . ';' . __('Date') . ';' . __('Cash') . ';' . __('Login') . ';' . __('Full address') . ';' . __('Real Name') . ';' . __('Contrahent name') . ';' . __('Payment type') . ';' . __('Notes') . ';' . __('Admin') . "\n";
                     //CSV data
                     foreach ($tmpArr[$agentid] as $io => $each) {
                         $summ = str_replace('.', ',', $each['summ']);
                         //need for normal summ in excel
                         $result .= $each['id'] . ';' . $each['date'] . ';' . $summ . ';' . $each['login'] . ';' . @$this->alladdress[$each['login']] . ';' . @$this->userRealnames[$each['login']] . ';' . @$this->agentsNamed[$this->assigns[$each['login']]] . ';' . __(@$this->cashtypes[$each['cashtypeid']]) . ';' . zb_TranslatePaymentNote($each['note'], $allservicenames) . ';' . $each['admin'] . "\n";
                     }
                 }
             }
         }
     }
     $saveCsvName = self::EXPORT_PATH . 'report_agentfinance_' . $agentid . '_' . zb_rand_string(8) . '.csv';
     $result = iconv('utf-8', 'windows-1251', $result);
     file_put_contents($saveCsvName, $result);
     zb_DownloadFile($saveCsvName, 'csv');
     die;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:45,代码来源:api.assignreport.php

示例9: ts_SendSMS

/**
 * Stores SMS for some employee for further sending with watchdog run
 * 
 * @param int $employeeid
 * @param string $message
 * @return array
 * @throws Exception
 */
function ts_SendSMS($employeeid, $message)
{
    $query = "SELECT `mobile`,`name` from `employee` WHERE `id`='" . $employeeid . "'";
    $empData = simple_query($query);
    $mobile = $empData['mobile'];
    $employeeName = $empData['name'];
    $result = array();
    if (!empty($mobile)) {
        if (ispos($mobile, '+')) {
            $message = str_replace('\\r\\n', ' ', $message);
            $message = zb_TranslitString($message);
            $message = trim($message);
            $number = trim($mobile);
            $filename = 'content/tsms/ts_' . zb_rand_string(8);
            $storedata = 'NUMBER="' . $number . '"' . "\n";
            $storedata .= 'MESSAGE="' . $message . '"' . "\n";
            $result['number'] = $number;
            $result['message'] = $message;
            file_put_contents($filename, $storedata);
            log_register("TASKMAN SEND SMS `" . $number . "` FOR `" . $employeeName . "`");
        } else {
            throw new Exception('BAD_MOBILE_FORMAT');
        }
    }
    return $result;
}
开发者ID:carriercomm,项目名称:Ubilling,代码行数:34,代码来源:api.teskman.php

示例10: zb_NewMacShow

function zb_NewMacShow()
{
    global $ubillingConfig;
    $billing_config = $ubillingConfig->getBilling();
    $alter_config = $ubillingConfig->getAlter();
    $allarp = array();
    $sudo = $billing_config['SUDO'];
    $cat = $billing_config['CAT'];
    $grep = $billing_config['GREP'];
    $tail = $billing_config['TAIL'];
    $alter_conf = parse_ini_file(CONFIG_PATH . 'alter.ini');
    $leases = $alter_conf['NMLEASES'];
    $leasemark = $alter_conf['NMLEASEMARK'];
    $command = $sudo . ' ' . $cat . ' ' . $leases . ' | ' . $grep . ' "' . $leasemark . '" | ' . $tail . ' -n 200';
    $rawdata = shell_exec($command);
    $allusedMacs = zb_getAllUsedMac();
    $result = '';
    //fdb cache preprocessing
    $fdbData_raw = rcms_scandir('./exports/', '*_fdb');
    if (!empty($fdbData_raw)) {
        $fdbArr = sn_SnmpParseFdbCacheArray($fdbData_raw);
        $fdbColumn = true;
    } else {
        $fdbArr = array();
        $fdbColumn = false;
    }
    $cells = wf_TableCell(__('MAC'));
    if (!empty($fdbColumn)) {
        $cells .= wf_TableCell(__('Switch'));
    }
    if ($alter_config['MACVEN_ENABLED']) {
        $cells .= wf_TableCell(__('Manufacturer'));
    }
    $rows = wf_TableRow($cells, 'row1');
    if (!empty($rawdata)) {
        $cleardata = exploderows($rawdata);
        foreach ($cleardata as $eachline) {
            preg_match('/[a-f0-9]{2}:[a-f0-9]{2}:[a-f0-9]{2}:[a-f0-9]{2}:[a-f0-9]{2}:[a-f0-9]{2}/i', $eachline, $matches);
            if (!empty($matches)) {
                $allarp[] = $matches[0];
            }
        }
        $un_arr = array_unique($allarp);
        if (!empty($un_arr)) {
            if ($alter_config['MACVEN_ENABLED']) {
                //adding ajax loader
                $result .= wf_AjaxLoader();
            }
            foreach ($un_arr as $io => $eachmac) {
                if (zb_checkMacFree($eachmac, $allusedMacs)) {
                    $cells = wf_TableCell(@$eachmac);
                    if (!empty($fdbColumn)) {
                        $cells .= wf_TableCell(sn_SnmpParseFdbExtract(@$fdbArr[$eachmac]));
                    }
                    if ($alter_config['MACVEN_ENABLED']) {
                        $containerName = 'NMRSMCNT_' . zb_rand_string(8);
                        $lookupVendorLink = wf_AjaxLink('?module=macvendor&mac=' . @$eachmac . '&raw=true', wf_img('skins/macven.gif', __('Device vendor')), $containerName, false, '');
                        $lookupVendorLink .= wf_tag('span', false, '', 'id="' . $containerName . '"') . '' . wf_tag('span', true);
                        $cells .= wf_TableCell($lookupVendorLink, '350');
                    }
                    $rows .= wf_TableRow($cells, 'row3');
                }
            }
        }
    }
    $result .= wf_TableBody($rows, '100%', '0', 'sortable');
    return $result;
}
开发者ID:nightflyza,项目名称:Ubilling,代码行数:68,代码来源:api.networking.php

示例11: zb_RegPasswordProposal

/**
 * Returns new user password proposal
 * 
 * @return string
 */
function zb_RegPasswordProposal()
{
    $alterconf = rcms_parse_ini_file(CONFIG_PATH . "alter.ini");
    if (isset($alterconf['PASSWORD_GENERATION_LENGHT']) and isset($alterconf['PASSWORD_TYPE'])) {
        if ($alterconf['PASSWORD_TYPE']) {
            $password = zb_rand_string($alterconf['PASSWORD_GENERATION_LENGHT']);
        } else {
            $password = zb_rand_digits($alterconf['PASSWORD_GENERATION_LENGHT']);
        }
    } else {
        die(strtoupper('you have missed a essential option. before update read release notes motherfucker!'));
    }
    return $password;
}
开发者ID:nightflyza,项目名称:Ubilling,代码行数:19,代码来源:api.userreg.php

示例12: zb_BillingStats

/**
 * Collects billing stats
 * 
 * @param bool $quiet
 */
function zb_BillingStats($quiet = false)
{
    $ubstatsurl = 'http://stats.ubilling.net.ua/';
    $statsflag = 'exports/NOTRACK';
    //detect host id
    $hostid_q = "SELECT * from `ubstats` WHERE `key`='ubid'";
    $hostid = simple_query($hostid_q);
    if (empty($hostid)) {
        //register new ubilling
        $randomid = 'UB' . md5(curdatetime() . zb_rand_string(8));
        $newhostid_q = "INSERT INTO `ubstats` (`id` ,`key` ,`value`) VALUES (NULL , 'ubid', '" . $randomid . "');";
        nr_query($newhostid_q);
        $thisubid = $randomid;
    } else {
        $thisubid = $hostid['value'];
    }
    //detect stats collection feature
    $thiscollect = file_exists($statsflag) ? 0 : 1;
    //disabling collect subroutine
    if (isset($_POST['editcollect'])) {
        if (!isset($_POST['collectflag'])) {
            file_put_contents($statsflag, 'Im greedy bastard');
        } else {
            if (file_exists($statsflag)) {
                unlink($statsflag);
            }
        }
        rcms_redirect("?module=report_sysload");
    }
    //detect total user count
    $usercount_q = "SELECT COUNT(`login`) from `users`";
    $usercount = simple_query($usercount_q);
    $usercount = $usercount['COUNT(`login`)'];
    //detect tariffs count
    $tariffcount_q = "SELECT COUNT(`name`) from `tariffs`";
    $tariffcount = simple_query($tariffcount_q);
    $tariffcount = $tariffcount['COUNT(`name`)'];
    //detect nas count
    $nascount_q = "SELECT COUNT(`id`) from `nas`";
    $nascount = simple_query($nascount_q);
    $nascount = $nascount['COUNT(`id`)'];
    //detect payments count
    $paycount_q = "SELECT COUNT(`id`) from `payments`";
    $paycount = simple_query($paycount_q);
    $paycount = $paycount['COUNT(`id`)'];
    $paycount = $paycount / 100;
    $paycount = round($paycount);
    //detect ubilling actions count
    $eventcount_q = "SELECT COUNT(`id`) from `weblogs`";
    $eventcount = simple_query($eventcount_q);
    $eventcount = $eventcount['COUNT(`id`)'];
    $eventcount = $eventcount / 100;
    $eventcount = round($eventcount);
    //detect ubilling version
    $releaseinfo = file_get_contents("RELEASE");
    $ubversion = explode(' ', $releaseinfo);
    $ubversion = vf($ubversion[0], 3);
    $releasebox = wf_tag('span', false, '', 'id="lastrelease"');
    $releasebox .= wf_tag('span', true) . wf_tag('br');
    $updatechecker = wf_AjaxLink('?module=report_sysload&checkupdates=true', $releaseinfo . ' (' . __('Check updates') . '?)', 'lastrelease', false, '');
    $ubstatsinputs = zb_AjaxLoader();
    $ubstatsinputs .= wf_tag('b') . __('Serial key') . ': ' . wf_tag('b', true) . $thisubid . wf_tag('br');
    $ubstatsinputs .= wf_tag('b') . __('Use this to request technical support') . ': ' . wf_tag('b', true) . wf_tag('font', false, '', 'color="#076800"') . substr($thisubid, -4) . wf_tag('font', true) . wf_tag('br');
    $ubstatsinputs .= wf_tag('b') . __('Ubilling version') . ': ' . wf_tag('b', true) . $updatechecker . wf_tag('br');
    $ubstatsinputs .= $releasebox;
    $ubstatsinputs .= wf_HiddenInput('editcollect', 'true');
    $ubstatsinputs .= wf_CheckInput('collectflag', 'I want to help make Ubilling better', false, $thiscollect);
    $ubstatsinputs .= ' ' . wf_Submit('Save');
    $ubstatsform = wf_Form("", 'POST', $ubstatsinputs, 'glamour');
    $ubstatsform .= wf_CleanDiv();
    $statsurl = $ubstatsurl . '?u=' . $thisubid . 'x' . $usercount . 'x' . $tariffcount . 'x' . $nascount . 'x' . $paycount . 'x' . $eventcount . 'x' . $ubversion;
    $tracking_code = wf_tag('div', false, '', 'style="display:none;"') . wf_tag('iframe', false, '', 'src="' . $statsurl . '" width="1" height="1" frameborder="0"') . wf_tag('iframe', true) . wf_tag('div', true);
    if ($quiet == false) {
        show_window(__('Billing info'), $ubstatsform);
    }
    if ($thiscollect) {
        show_window('', $tracking_code);
    }
}
开发者ID:nightflyza,项目名称:Ubilling,代码行数:84,代码来源:api.workaround.php

示例13: catchFileUpload

 /**
  * Catches file upload in background
  * 
  * @return void
  */
 public function catchFileUpload()
 {
     if (wf_CheckGet(array('uploadfilephoto'))) {
         if (!empty($this->scope)) {
             $allowedExtensions = array("jpg", "gif", "png", "jpeg");
             $fileAccepted = true;
             foreach ($_FILES as $file) {
                 if ($file['tmp_name'] > '') {
                     if (!in_array(end(explode(".", strtolower($file['name']))), $allowedExtensions)) {
                         $fileAccepted = false;
                     }
                 }
             }
             if ($fileAccepted) {
                 $newFilename = zb_rand_string(16) . '_upload.jpg';
                 $newSavePath = self::STORAGE_PATH . $newFilename;
                 move_uploaded_file($_FILES['photostorageFileUpload']['tmp_name'], $newSavePath);
                 if (file_exists($newSavePath)) {
                     $uploadResult = wf_tag('span', false, 'alert_success') . __('Photo upload complete') . wf_tag('span', true);
                     $this->registerImage($newFilename);
                     rcms_redirect(self::MODULE_URL . '&scope=' . $this->scope . '&itemid=' . $this->itemId . '&mode=loader&preview=' . $newFilename);
                 } else {
                     $uploadResult = wf_tag('span', false, 'alert_error') . __('Photo upload failed') . wf_tag('span', true);
                 }
             } else {
                 $uploadResult = wf_tag('span', false, 'alert_error') . __('Photo upload failed') . ': ' . self::EX_WRONG_EXT . wf_tag('span', true);
             }
         } else {
             $uploadResult = wf_tag('span', false, 'alert_error') . __('Strange exeption') . ': ' . self::EX_NOSCOPE . wf_tag('span', true);
         }
         show_window('', $uploadResult);
         show_window('', wf_Link(self::MODULE_URL . '&scope=' . $this->scope . '&itemid=' . $this->itemId . '&mode=loader', __('Back'), false, 'ubButton'));
     }
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:39,代码来源:api.photostorage.php

示例14: zb_TicketsTAPCreate

/**
 * Creates new typical answer preset in database
 * 
 * @param string $taptext
 * 
 * @return void
 */
function zb_TicketsTAPCreate($taptext)
{
    $keyName = 'HELPDESKTAP_' . zb_rand_string(8);
    $storeData = base64_encode($taptext);
    zb_StorageSet($keyName, $storeData);
    log_register('TICKET TAP CREATE `' . $keyName . '`');
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:14,代码来源:api.ticketing.php

示例15: smsflyPushMessages

 /**
  * Sends all sms storage via sms-fly.com service
  * 
  */
 protected function smsflyPushMessages()
 {
     $result = '';
     $apiUrl = $this->settings['SMSFLY_GATEWAY'];
     $source = $this->safeEscapeString($this->settings['SMSFLY_SIGN']);
     $description = "Ubilling_" . zb_rand_string(8);
     $start_time = 'AUTO';
     $end_time = 'AUTO';
     $rate = 1;
     $lifetime = 4;
     $user = $this->settings['SMSFLY_LOGIN'];
     $password = $this->settings['SMSFLY_PASSWORD'];
     $allSmsQueue = $this->smsQueue->getQueueData();
     if (!empty($allSmsQueue)) {
         foreach ($allSmsQueue as $io => $eachsms) {
             $number = str_replace('+', '', $eachsms['number']);
             //numbers in international format without +
             $myXML = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
             $myXML .= "<request>";
             $myXML .= "<operation>SENDSMS</operation>";
             $myXML .= '		<message start_time="' . $start_time . '" end_time="' . $end_time . '" lifetime="' . $lifetime . '" rate="' . $rate . '" desc="' . $description . '" source="' . $source . '">' . "\n";
             $myXML .= "\t\t<body>" . $eachsms['message'] . "</body>";
             $myXML .= "\t\t<recipient>" . $number . "</recipient>";
             $myXML .= "</message>";
             $myXML .= "</request>";
             $ch = curl_init();
             curl_setopt($ch, CURLOPT_USERPWD, $user . ':' . $password);
             curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
             curl_setopt($ch, CURLOPT_POST, 1);
             curl_setopt($ch, CURLOPT_URL, $apiUrl);
             curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: text/xml", "Accept: text/xml"));
             curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
             curl_setopt($ch, CURLOPT_POSTFIELDS, $myXML);
             $result .= curl_exec($ch);
             curl_close($ch);
             //remove old sent message
             $this->smsQueue->deleteSms($eachsms['filename']);
         }
     }
 }
开发者ID:nightflyza,项目名称:Ubilling,代码行数:44,代码来源:api.senddog.php


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