• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP generateKey函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: init

 public function init($user, $pass, $host)
 {
     $this->_host = $host;
     $this->_user = $user;
     $this->_password = $pass;
     $this->_resource = 'moxl' . \generateKey(6);
     $this->_start = date(DATE_ISO8601);
     $sd = new \Modl\SessionxDAO();
     $s = $this->inject();
     $sd->init($s);
 }
开发者ID:Anon215,项目名称:movim,代码行数:11,代码来源:Sessionx.php


示例2: foursquareEncrypt

function foursquareEncrypt($plaintext)
{
    $key1 = generateKey();
    $key2 = generateKey();
    $upperLeft = "abcdefghiklmnopqrstuvwxyz";
    $upperRight = $key1;
    $lowerLeft = $key2;
    $lowerRight = "abcdefghiklmnopqrstuvwxyz";
    $_SESSION["key"] = $key1 . " " . $key2;
    return encode($plaintext, $upperLeft, $upperRight, $lowerLeft, $lowerRight);
}
开发者ID:WilliamRADFunk,项目名称:encryptor,代码行数:11,代码来源:foursquare.php


示例3: store

 public final function store()
 {
     $sess = \Session::start();
     // Generating the iq key.
     $id = \generateKey(6);
     $sess->set('id', $id);
     // We serialize the current object
     $obj = new \StdClass();
     $obj->type = get_class($this);
     $obj->object = serialize($this);
     $obj->time = time();
     //$_instances = $this->clean($_instances);
     $sess->set($id, $obj);
 }
开发者ID:movim,项目名称:moxl,代码行数:14,代码来源:Action.php


示例4: store

 public final function store()
 {
     $sess = \Session::start();
     //$_instances = $sess->get('xecinstances');
     // Set a new Id for the Iq request
     $session = \Sessionx::start();
     // Generating the iq key.
     $id = $session->id = \generateKey(6);
     // We serialize the current object
     $obj = new \StdClass();
     $obj->type = get_class($this);
     $obj->object = serialize($this);
     $obj->time = time();
     //$_instances = $this->clean($_instances);
     $sess->set($id, $obj);
 }
开发者ID:Hywan,项目名称:moxl,代码行数:16,代码来源:Action.php


示例5: playfairEncrypt

function playfairEncrypt($plaintext)
{
    $_SESSION["key"] = generateKey();
    return encode($plaintext, $_SESSION["key"]);
}
开发者ID:WilliamRADFunk,项目名称:encryptor,代码行数:5,代码来源:playfair.php


示例6: init

 public function init($user, $pass, $host, $domain)
 {
     $this->_port = 5222;
     $this->_host = $host;
     $this->_domain = $domain;
     $this->_user = $user;
     $this->_password = $pass;
     $this->_resource = 'moxl' . \generateKey(6);
     $this->_start = date(DATE_ISO8601);
     $this->_rid = rand(1, 2048);
     $this->_id = 0;
     $sd = new modl\SessionxDAO();
     $s = $this->inject();
     $sd->init($s);
 }
开发者ID:Nyco,项目名称:movim,代码行数:15,代码来源:Sessionx.php


示例7: checkCredentials

function checkCredentials($username, $password)
{
    global $db;
    $query = $db->prepare("SELECT * FROM users WHERE username = :username AND password = SHA1(:password)");
    $query->execute(array(":username" => $username, ":password" => $password));
    if ($query->fetchObject()) {
        return true;
    } else {
        return false;
    }
}
function clearPrevious($username)
{
    global $db;
    $db->prepare("DELETE FROM keystbl WHERE user = :username")->execute(array(":username" => $username));
}
if (!isset($_POST["username"]) || !isset($_POST["password"])) {
    echo json_encode(array("text" => "INVALID_LOGIN"));
} else {
    $username = $_POST["username"];
    $password = $_POST["password"];
    if (!checkCredentials($username, $password)) {
        echo json_encode(array("text" => "INVALID_LOGIN"));
    } else {
        clearPrevious($username);
        $token = generateKey();
        echo json_encode(array("text" => "LOGIN_SUCCESSFUL", "token" => $token));
        $query = $db->prepare("INSERT INTO keystbl(user, token) VALUES (:user, :token)");
        $query->execute(array(":user" => $username, ":token" => $token));
    }
}
开发者ID:TheMemSet,项目名称:HaberRipoff,代码行数:31,代码来源:login.php


示例8: register_first_user

function register_first_user()
{
    global $wpdb;
    //get database table prefix
    $table_prefix = mlm_core_get_table_prefix();
    $error = '';
    $chk = 'error';
    //most outer if condition
    if (isset($_POST['submit'])) {
        $username = sanitize_text_field($_POST['username']);
        $password = sanitize_text_field($_POST['password']);
        $confirm_pass = sanitize_text_field($_POST['confirm_password']);
        $email = sanitize_text_field($_POST['email']);
        $confirm_email = sanitize_text_field($_POST['confirm_email']);
        $firstname = sanitize_text_field($_POST['first_name']);
        $lastname = sanitize_text_field($_POST['last_name']);
        //Add usernames we don't want used
        $invalid_usernames = array('admin');
        //Do username validation
        $username = sanitize_user($username);
        if (!validate_username($username) || in_array($username, $invalid_usernames)) {
            $error .= "\n Username is invalid.";
        }
        if (username_exists($username)) {
            $error .= "\n Username already exists.";
        }
        if (checkInputField($username)) {
            $error .= "\n Please enter your username.";
        }
        if (checkInputField($password)) {
            $error .= "\n Please enter your password.";
        }
        if (confirmPassword($password, $confirm_pass)) {
            $error .= "\n Please confirm your password.";
        }
        //Do e-mail address validation
        if (!is_email($email)) {
            $error .= "\n E-mail address is invalid.";
        }
        if (email_exists($email)) {
            $error .= "\n E-mail address is already in use.";
        }
        if (confirmEmail($email, $confirm_email)) {
            $error .= "\n Please confirm your email address.";
        }
        //generate random numeric key for new user registration
        $user_key = generateKey();
        // outer if condition
        if (empty($error)) {
            $user = array('user_login' => $username, 'user_pass' => $password, 'user_email' => $email, 'first_name' => $firstname, 'last_name' => $lastname, 'role' => 'mlm_user');
            // return the wp_users table inserted user's ID
            $user_id = wp_insert_user($user);
            /* Send e-mail to admin and new user - 
               You could create your own e-mail instead of using this function */
            wp_new_user_notification($user_id, $password);
            //insert the data into fa_user table
            $insert = "INSERT INTO {$table_prefix}mlm_users\n\t\t\t\t\t\t   \t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tuser_id, username, user_key, parent_key, sponsor_key, leg, payment_status\n\t\t\t\t\t\t\t\t\t\t\t\t\t) \n\t\t\t\t\t\t\t\t\t\t\t\t\tVALUES\n\t\t\t\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'" . $user_id . "','" . $username . "', '" . $user_key . "', '0', '0', '0','1'\n\t\t\t\t\t\t\t\t\t\t\t\t\t)";
            // if all data successfully inserted
            if ($wpdb->query($insert)) {
                $chk = '';
                //$msg = "<span style='color:green;'>Congratulations! You have successfully registered in the system.</span>";
            }
        }
        //end outer if condition
    }
    //end most outer if condition
    //if any error occoured
    if (!empty($error)) {
        $error = nl2br($error);
    }
    if ($chk != '') {
        include 'js-validation-file.html';
        ?>
        <div class='wrap'>
            <h2><?php 
        _e('Create First User in Network', 'binary-mlm-pro');
        ?>
</h2>
            <div class="notibar msginfo">
                <a class="close"></a>
                <p><?php 
        _e('In order to begin building your network you would need to register the First User of the network. All other users would be registered under this First User.', 'binary-mlm-pro');
        ?>
</p>
            </div>
            <?php 
        if ($error) {
            ?>
                <div class="notibar msgerror">
                    <a class="close"></a>
                    <p> <strong><?php 
            _e('Please Correct the following Error(s)', 'binary-mlm-pro');
            ?>
:</strong> <?php 
            _e($error);
            ?>
</p>
                </div>
            <?php 
        }
//.........这里部分代码省略.........
开发者ID:EvandroEpifanio,项目名称:binary-mlm-pro,代码行数:101,代码来源:admin-create-first-user.php


示例9: generateKey

 } else {
     $leg = $_POST['leg'];
 }
 if ($leg != '0') {
     if ($leg != '1') {
         $error .= "\n You have enter a wrong placement.";
     }
 }
 //generate random numeric key for new user registration
 $user_key = generateKey();
 //if generated key is already exist in the DB then again re-generate key
 do {
     $check = mysql_fetch_array(mysql_query("SELECT COUNT(*) ck \n\t\t\t\t\t\t\t\t\t\t\t\t\tFROM " . WPMLM_TABLE_USER . " \n\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE `user_key` = '" . $user_key . "'"));
     $flag = 1;
     if ($check['ck'] == 1) {
         $user_key = generateKey();
         $flag = 0;
     }
 } while ($flag == 0);
 //check parent key exist or not
 if (isset($_GET['k']) && $_GET['k'] != '') {
     if (!checkKey($_GET['k'])) {
         $error .= "\n Parent key does't exist.";
     }
     // check if the user can be added at the current position
     $checkallow = checkallowed($_GET['k'], $leg);
     if ($checkallow >= 1) {
         $error .= "\n You have enter a wrong placement.";
     }
 }
 // outer if condition
开发者ID:juano2h,项目名称:binary-mlm-ecommerce,代码行数:31,代码来源:wpmlm-registration.php


示例10: HTML2PDF

     }
     $content .= "</tr>";
 }
 $content .= "</tbody>\n\t\t</table>\n\t\t<br>\n\t\t<br>\n\t\t<b><u>Proceso de revisión:</u></b> " . $_POST[TER_procesorevision] . "<br>\n\t\t<b><u>Fecha estimada de firma:</u></b> " . $_POST[TER_fechafirma] . "<br>\n\t\t<b><u>Depósito de seriedad:</u></b> " . $_POST[TER_deposito] . "<br>\n\t\t<b><u>Referencia:</u></b> Puede realizar el depósito de seriedad con la referencia: " . $_POST[TER_referencia] . ", a la cuenta de Banorte: 0806433934, CLABE: 072225008064339344, a nombre de: Préstamo Empresarial Oportuno S.A. de C.V. SOFOM ENR.<br>\n\t\t<br>\n\t\t\n\t\t<nobreak>\n\t\t<table cellspacing='0' style='width: 100%; text-align: left;'>\n\t\t\t<tr>\n\t\t\t\t<td style='width:50%;'>\n\t\t\t\t\tAtentamente<br><br>\n\t\t\t\t\t" . $_POST[TER_remitente] . "<br>\n\t\t\t\t\t" . $_POST[TER_puesto] . "<br>\n\t\t\t\t\tPréstamo Empresarial Oportuno, S.A. de C.V., SOFOM, E.N.R.<br>\n\t\t\t\t</td>\n\t\t\t\t<td style='width:50%;'>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t</nobreak>\n\t\t</page>";
 // convert to PDF
 require_once '../../html2pdf/html2pdf.class.php';
 try {
     $html2pdf = new HTML2PDF('P', 'Letter', 'es');
     $html2pdf->pdf->SetDisplayMode('fullpage');
     //$html2pdf->pdf->SetProtection(array('print'), 'spipu');
     $html2pdf->writeHTML($content, isset($_GET['vuehtml']));
     $ruta = "../../expediente/";
     $nombreoriginal = "TC" . $date . "-" . strtoupper($myroworg[organizacion]);
     $nombre = "T" . time() . "C" . rand(100, 999) . rand(10, 99) . ".pdf";
     $html2pdf->Output($ruta . $nombre, 'F');
     $clavearchivo = generateKey();
     //Verificar si ya hay archivo de TERMINOS Y CONDICIONES generado
     $sqlfile = "SELECT * FROM archivos WHERE id_tipoarchivo='10' AND id_oportunidad='" . $_POST[oportunidad] . "'";
     $rsfile = mysql_query($sqlfile, $db);
     $rwfile = mysql_fetch_array($rsfile);
     $archivoanterior = "../../expediente/" . $rwfile[nombre];
     if ($rwfile) {
         //Obtener referencia anterior
         $sqref = "SELECT * FROM `referencias` WHERE asignada=1 AND descartado=0 AND clave_oportunidad='" . $myrowopt[clave_oportunidad] . "' ORDER BY fecha_asignacion ASC LIMIT 1";
         $rsref = mysql_query($sqlref, $db);
         $rwref = mysql_fetch_array($rsref);
         unlink($archivoanterior);
         //Borrar archivo anterior
         $sqlarchivo = "UPDATE `archivos` SET `nombre`='{$nombre}', `fecha_modificacion`=NOW(), `aprobado`='0' WHERE `id_archivo` = '" . $rwfile[id_archivo] . "'";
         //Actualizar registro
         $sqlhistorial = "INSERT INTO `historialarchivos`(`id_historialarchivo`, `clave_archivo`, `id_oportunidad`, `id_expediente`, `actividad`, `motivo`, `fecha_actividad`, `usuario`) VALUES (NULL, '{$rwfile['clave_archivo']}', '{$_POST['oportunidad']}','3','Reemplazado', '', NOW(),'{$claveagente}')";
开发者ID:specimen90868,项目名称:crmprueba,代码行数:31,代码来源:insert_terminos.php


示例11: openConnection

<?php

include "DatabaseHandling.php";
$key = "";
$char = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
$conn = openConnection();
$longlink = "{$_POST['urllink']}";
$key = checkForDuplicateLinks($longlink, $conn);
if ($key === NULL) {
    $key = generateKey(6);
    $finalKey = checkForDuplicateKeys($key, $conn);
    addDataToDatabase($key, $longlink, $conn);
}
$myfile = fopen("{$key}", "w") or die("Unable to open file!");
$myfileToRead = fopen("check.php", "r") or die("Unable to open file!");
$txt = fread($myfileToRead, filesize("check.php"));
fclose($myfileToRead);
fwrite($myfile, $txt);
fclose($myfile);
$conn->close();
//header( 'Location: http://kclproject.esy.es/shorten/');
开发者ID:jaredkoh,项目名称:FinalYearProject,代码行数:21,代码来源:info.php


示例12: urldecode

$realm = !array_key_exists('realm', $_GET) ? $recruit_realm : urldecode($_GET['realm']);
$region = !array_key_exists('region', $_GET) ? $recriot_region : urldecode($_GET['region']);
// connect to mysql and select the database
$conn = mysql_connect(WHP_DB_HOST, WHP_DB_USER, WHP_DB_PASS) or die(mysql_error());
mysql_select_db(WHP_DB_NAME) or die(mysql_error());
if ($name == '') {
    print 'No name provided.';
    mysql_close($conn);
    exit;
}
if ($mode == '') {
    print 'No mode provided.';
    mysql_close($conn);
    exit;
}
$key = generateKey($name, $realm, $region);
if (trim($key) == '') {
    print 'Unique key not provided.';
    mysql_close($conn);
    exit;
}
if ($mode == 'gearlist') {
    $query = mysql_query("SELECT gearlist FROM " . WHP_DB_PREFIX . "recruit WHERE uniquekey='{$key}' AND cache > UNIX_TIMESTAMP(NOW()) - {$recruit_cache} LIMIT 1");
    list($list) = @mysql_fetch_array($query);
    if (mysql_num_rows($query) == 0 || trim($list) == '') {
        // nothing in the cache, so we need to query
        $xml_data = getXML(characterURL($name, $region, $realm));
        if (!($xml = @simplexml_load_string($xml_data, 'SimpleXMLElement'))) {
            print $language->words['invalid_xml'];
            mysql_close($conn);
            exit;
开发者ID:ubick,项目名称:lorekeepers.org,代码行数:31,代码来源:recruit.php


示例13: hillEncrypt

function hillEncrypt($plaintext)
{
    $sizeOfKey = rand(2, 9);
    $_SESSION["key"] = generateKey($sizeOfKey);
    return encode($plaintext, $_SESSION["key"], $sizeOfKey);
}
开发者ID:WilliamRADFunk,项目名称:encryptor,代码行数:6,代码来源:hill.php


示例14: generateKey

<?php

function generateKey($length = 10)
{
    $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
    $charactersLength = strlen($characters);
    $randomString = '';
    for ($i = 0; $i < $length; $i++) {
        $randomString .= $characters[rand(0, $charactersLength - 1)];
    }
    return $randomString;
}
$rankey = generateKey();
echo $rankey;
$con = mysqli_connect("localhost", "cl10-admin-uzl", "supernova", "cl10-admin-uzl");
$sql = "INSERT INTO `user`(`emailid`,`pwd`,`key`) VALUES ('{$_POST['email']}','{$_POST['pwd']}','{$rankey}')";
if (!mysqli_query($con, $sql)) {
    echo "Could not enter data" . mysqli_error($con);
}
开发者ID:RaakeshMadana,项目名称:locshare,代码行数:19,代码来源:keygen.php


示例15: generate


//.........这里部分代码省略.........
                         $description->addAttribute('maxptime', $matches[1]);
                         break;
                         // http://xmpp.org/extensions/xep-0338.html
                     // http://xmpp.org/extensions/xep-0338.html
                     case 'group':
                         $group = $this->jingle->addChild('group');
                         $group->addAttribute('xmlns', "urn:xmpp:jingle:apps:grouping:0");
                         $group->addAttribute('semantics', $matches[1]);
                         $params = explode(' ', $matches[2]);
                         foreach ($params as $value) {
                             $content = $group->addChild('content');
                             $content->addAttribute('name', trim($value));
                         }
                         break;
                         // http://xmpp.org/extensions/xep-0320.html
                     // http://xmpp.org/extensions/xep-0320.html
                     case 'fingerprint':
                         if ($this->content == null) {
                             $this->global_fingerprint['fingerprint'] = $matches[2];
                             $this->global_fingerprint['hash'] = $matches[1];
                         } else {
                             $fingerprint = $this->transport->addChild('fingerprint', $matches[2]);
                             $fingerprint->addAttribute('xmlns', "urn:xmpp:jingle:apps:dtls:0");
                             $fingerprint->addAttribute('hash', $matches[1]);
                         }
                         break;
                         // http://xmpp.org/extensions/inbox/jingle-dtls.html
                     // http://xmpp.org/extensions/inbox/jingle-dtls.html
                     case 'sctpmap':
                         $sctpmap = $this->transport->addChild('sctpmap');
                         $sctpmap->addAttribute('xmlns', "urn:xmpp:jingle:transports:dtls-sctp:1");
                         $sctpmap->addAttribute('number', $matches[1]);
                         $sctpmap->addAttribute('protocol', $matches[2]);
                         $sctpmap->addAttribute('streams', $matches[3]);
                         break;
                     case 'setup':
                         if ($this->content != null) {
                             $fingerprint->addAttribute('setup', $matches[1]);
                         }
                         break;
                     case 'pwd':
                         if ($this->content == null) {
                             $this->global_fingerprint['pwd'] = $matches[1];
                         } else {
                             $this->transport->addAttribute('pwd', $matches[1]);
                         }
                         break;
                     case 'ufrag':
                         if ($this->content == null) {
                             $this->global_fingerprint['ufrag'] = $matches[1];
                         } else {
                             $this->transport->addAttribute('ufrag', $matches[1]);
                         }
                         break;
                     case 'candidate':
                         $generation = "0";
                         $network = "0";
                         $id = generateKey(10);
                         if ($key = array_search("generation", $matches)) {
                             $generation = $matches[$key + 1];
                         }
                         if ($key = array_search("network", $matches)) {
                             $network = $matches[$key + 1];
                         }
                         if ($key = array_search("id", $matches)) {
                             $id = $matches[$key + 1];
                         }
                         if (isset($matches[11]) && isset($matches[13])) {
                             $reladdr = $matches[11];
                             $relport = $matches[13];
                         } else {
                             $reladdr = $relport = null;
                         }
                         $candidate = $this->transport->addChild('candidate');
                         $candidate->addAttribute('component', $matches[2]);
                         $candidate->addAttribute('foundation', $matches[1]);
                         $candidate->addAttribute('generation', $generation);
                         $candidate->addAttribute('id', $id);
                         $candidate->addAttribute('ip', $matches[5]);
                         $candidate->addAttribute('network', $network);
                         $candidate->addAttribute('port', $matches[6]);
                         $candidate->addAttribute('priority', $matches[4]);
                         $candidate->addAttribute('protocol', $matches[3]);
                         $candidate->addAttribute('type', $matches[8]);
                         if ($reladdr) {
                             $candidate->addAttribute('rel-addr', $reladdr);
                             $candidate->addAttribute('rel-port', $relport);
                         }
                         break;
                 }
             }
         }
     }
     // We reindent properly the Jingle package
     $xml = $this->jingle->asXML();
     $doc = new \DOMDocument();
     $doc->loadXML($xml);
     $doc->formatOutput = true;
     return substr($doc->saveXML(), strpos($doc->saveXML(), "\n") + 1);
 }
开发者ID:christine-ho-dev,项目名称:movim,代码行数:101,代码来源:SDPtoJingle.php


示例16: join_network_page


//.........这里部分代码省略.........
        if (checkInputField($email)) {
            $error .= "\n Please enter your email address.";
        }
        /*         * ***** check for the epin field ***** */
        if (isset($epin) && !empty($epin)) {
            if (epin_exists($epin)) {
                $error .= "\n ePin already issued or wrong ePin.";
            }
        }
        if ($mlm_general_settings['sol_payment'] == 1) {
            if (isset($_POST['epin']) && empty($_POST['epin'])) {
                $error .= "\n Please enter your ePin.";
            }
        }
        /*         * ***** check for the epin field ***** */
        /* if ( checkInputField($address1) ) 
                  $error .= "\n Please enter your address.";
        
                  if ( checkInputField($city) )
                  $error .= "\n Please enter your city.";
        
                  if ( checkInputField($state) )
                  $error .= "\n Please enter your state.";
        
                  if ( checkInputField($postalcode) )
                  $error .= "\n Please enter your postal code.";
        
                  if ( checkInputField($telephone) )
                  $error .= "\n Please enter your contact number.";
        
                  if ( checkInputField($dob) )
                  $error .= "\n Please enter your date of birth."; */
        //generate random numeric key for new user registration
        $user_key = generateKey();
        //if generated key is already exist in the DB then again re-generate key
        do {
            $check = $wpdb->get_var("SELECT COUNT(*) ck \n\t\t\t\t\t\t\t\t\t\t\t\t\tFROM {$table_prefix}mlm_users \n\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE `user_key` = '" . $user_key . "'");
            $flag = 1;
            if ($check == 1) {
                $user_key = generateKey();
                $flag = 0;
            }
        } while ($flag == 0);
        // outer if condition
        if (empty($error)) {
            // inner if condition
            if ($intro->num == 1) {
                $sponsor = $intro->user_key;
                $parent_key = $sponsor;
                // return the wp_users table inserted user's ID
                wp_update_user(array('ID' => $user_id, 'role' => 'mlm_user'));
                $username = $current_user->user_login;
                //get the selected country name from the country table
                $country = $_POST['country'];
                $sql = "SELECT name \n\t\t\t\t\t\tFROM {$table_prefix}mlm_country\n\t\t\t\t\t\tWHERE id = '" . $country . "'";
                $country1 = $wpdb->get_var($sql);
                //insert the registration form data into user_meta table
                $user = array('ID' => $user_id, 'first_name' => $firstname, 'last_name' => $lastname, 'user_email' => $email, 'role' => 'mlm_user');
                // return the wp_users table inserted user's ID
                $user_id = wp_update_user($user);
                /* add_user_meta( $user_id, 'user_address1', $address1, FALSE );  
                   add_user_meta( $user_id, 'user_address2', $address2, FALSE );
                   add_user_meta( $user_id, 'user_city', $city, FALSE );
                   add_user_meta( $user_id, 'user_state', $state, FALSE );
                   add_user_meta( $user_id, 'user_country', $country1, FALSE );
                   add_user_meta( $user_id, 'user_postalcode', $postalcode, FALSE );
开发者ID:sp1ke77,项目名称:unilevel-mlm-pro,代码行数:67,代码来源:join-network.php


示例17: railfenceEncrypt

function railfenceEncrypt($plaintext)
{
    $_SESSION["key"] = generateKey();
    return encode($plaintext, $_SESSION["key"]);
}
开发者ID:WilliamRADFunk,项目名称:encryptor,代码行数:5,代码来源:railfence.php


示例18: bitwiseEncrypt

function bitwiseEncrypt($plaintext)
{
    $_SESSION["key"] = generateKey(strlen($plaintext));
    return encode($plaintext, $_SESSION["key"]);
}
开发者ID:WilliamRADFunk,项目名称:encryptor,代码行数:5,代码来源:bitwise.php


示例19: define

<?php

define('IN_PHPBB', true);
$phpbb_root_path = defined('PHPBB_ROOT_PATH') ? PHPBB_ROOT_PATH : './../../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include $phpbb_root_path . 'common.' . $phpEx;
include $phpbb_root_path . 'guild/includes/constants.' . $phpEx;
include $phpbb_root_path . 'guild/includes/functions.' . $phpEx;
include $phpbb_root_path . 'guild/includes/wowarmoryapi.' . $phpEx;
$armory = new BattlenetArmory($GuildRegion, $GuildRealm);
$armory->setLocale($armoryLocale);
$armory->UTF8(TRUE);
$guild = $armory->getGuild($GuildName);
$members = $guild->getMembers();
// echo "<pre>";
// print_r($members);
// echo "</pre>";
if (!is_array($members)) {
    trigger_error("No roster array, armory not reachable", E_USER_ERROR);
    exit;
}
foreach ($members as $char) {
    $character = $char['character'];
    $query = "INSERT INTO\n\t\t\t\t\t" . $TableNames['roster'] . "\n\t\t\t\tSET\n\t\t\t\t\tuniquekey = '" . generateKey($character['name'], $db->sql_escape($character['realm']), "EU") . "',\n\t\t\t\t\tname = '" . $db->sql_escape($character['name']) . "',\n\t\t\t\t\trealm = '" . $db->sql_escape($character['realm']) . "',\n\t\t\t\t\tbattlegroup = '" . $db->sql_escape($character['battlegroup']) . "',\n\t\t\t\t\tguild = '" . $db->sql_escape($character['guild']) . "',\n\t\t\t\t\tguildRealm = '" . $db->sql_escape($character['guildRealm']) . "',\n\t\t\t\t\trank = '" . $char['rank'] . "',\n\t\t\t\t\tclass = '" . $character['class'] . "', \n\t\t\t\t\trace = '" . $character['race'] . "',\n\t\t\t\t\tgender = '" . $character['gender'] . "',\n\t\t\t\t\tlevel = '" . $character['level'] . "',\n\t\t\t\t\tachievementPoints = '" . $character['achievementPoints'] . "',\n\t\t\t\t\tthumbnail = '" . $db->sql_escape($character['thumbnail']) . "',\n\t\t\t\t\tthumbnailURL = '" . $db->sql_escape($character['thumbnailURL']) . "',\n\t\t\t\t\tactive = '1',\n\t\t\t\t\tfirstseen = NOW(),\n\t\t\t\t\tcache = NOW()\n\t\t\t\tON DUPLICATE KEY UPDATE\n\t\t\t\t\trealm = '" . $db->sql_escape($character['realm']) . "',\n\t\t\t\t\tbattlegroup = '" . $db->sql_escape($character['battlegroup']) . "',\n\t\t\t\t\tguild = '" . $db->sql_escape($character['guild']) . "',\n\t\t\t\t\tguildRealm = '" . $db->sql_escape($character['guildRealm']) . "',\n\t\t\t\t\trank = '" . $char['rank'] . "',\n\t\t\t\t\tclass = '" . $character['class'] . "', \n\t\t\t\t\trace = '" . $character['race'] . "',\n\t\t\t\t\tgender = '" . $character['gender'] . "',\n\t\t\t\t\tlevel = '" . $character['level'] . "',\n\t\t\t\t\tachievementPoints = '" . $character['achievementPoints'] . "',\n\t\t\t\t\tthumbnail = '" . $db->sql_escape($character['thumbnail']) . "',\n\t\t\t\t\tthumbnailURL = '" . $db->sql_escape($character['thumbnailURL']) . "',\n\t\t\t\t\tactive = '1',\n\t\t\t\t\tcache = NOW()\n\t\t\t\t";
    $result = $db->sql_query($query);
}
$db->sql_freeresult($result);
// Deactivate characters not seen last 12 hours
$query = "UPDATE " . $TableNames['roster'] . " SET active = 0 WHERE cache < DATE_SUB(NOW(),INTERVAL 12 HOUR)";
$result = $db->sql_query($query);
开发者ID:Clausi,项目名称:tenebrae,代码行数:30,代码来源:roster.php


示例20: NOW

     }
     $nombrecompleto = $_POST[CONapellido] . " " . $_POST[CONnombre];
     $fechanacimiento = $Anio . "-" . $_POST[CONdianac] . "-" . $_POST[CONmesnac];
     $sql = "UPDATE `contactos` SET `apellidos` = '{$_POST['CONapellido']}', `nombre` = '{$_POST['CONnombre']}', `nombre_completo` = '{$nombrecompleto}', `rep_legal`='{$_POST['CONrep_legal']}', `tipo_persona`='{$_POST['tipo_persona']}', `fecha_nacimiento` = '{$fechanacimiento}', `dia_cumpleanios` = '{$_POST['CONdianac']}', `mes_cumpleanios` = '{$_POST['CONmesnac']}', `puesto` = '{$_POST['CONpuesto']}', `telefono_oficina` = '{$_POST['CONdirecto']}', `telefono_celular` = '{$_POST['CONcelular']}', `titulo`='{$_POST['CONtitulo']}', `modifico` = '{$claveagente}', `fecha_modificacion` = NOW(), `hora_modificacion` = NOW() WHERE `id_contacto` = {$_POST['id']}";
     //echo $sql;
     //Actualizar Email
     if ($_POST[e]) {
         $sqlmail = "UPDATE `correos` SET `correo` = '{$_POST['CONemail']}' WHERE `id_correo` = {$_POST['e']}";
     } else {
         if ($_POST[CONemail]) {
             $sqlmail = "INSERT INTO `correos` (`id_correo`, `tipo_registro`, `clave_registro`, `tipo_correo`, `correo`, `capturo`, `fecha_captura`, `hora_captura`, `modifico`, `fecha_modificacion`, `hora_modificacion`, `observaciones`) VALUES (NULL, 'C', '{$clavecontacto}', 'Trabajo', '{$_POST['CONemail']}', '{$claveagente}', NOW(), NOW(), '{$claveagente}', NOW(), NOW(), '')";
         } else {
         }
     }
 } elseif ($_POST[operacion] == 'I') {
     $clavecontacto = generateKey();
     $nombrecompleto = $_POST[CONapellido] . " " . $_POST[CONnombre];
     $fechanacimiento = $Anio . "-" . $_POST[CONdianac] . "-" . $_POST[CONmesnac];
     $roles = $_POST[CONrep_legal];
     $rol = "";
     $sqlrelacion = "INSERT INTO `relaciones`(`id_relacion`, `clave_organizacion`, `clave_relacion`, `clave_contacto`, `id_rol`, `rol`, `usuario_captura`, `fecha_captura`) VALUES ";
     for ($i = 0; $i < count($roles); $i++) {
         $sqlrol = "SELECT * FROM roles WHERE id_rol = '" . $roles[$i] . "'";
         $resultrol = mysql_query($sqlrol, $db);
         $myrowrol = mysql_fetch_array($resultrol);
         $rol .= $roles[$i];
         $sqlrelacion .= "(NULL,'{$_POST['organizacion']}','{$clavecontacto}','{$_POST['organizacion']}','{$roles[$i]}','{$myrowrol['rol']}','{$claveagente}',NOW())";
         if ($i < count($roles) - 1) {
             $sqlrelacion .= ",";
         }
     }
开发者ID:specimen90868,项目名称:crmprueba,代码行数:31,代码来源:update.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP generateLanguageList函数代码示例发布时间:2022-05-15
下一篇:
PHP generateId函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap