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

PHP getGUID函数代码示例

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

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



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

示例1: addUser

function addUser($baseURL, $database, $user, $email, $department, $role)
{
    $guid = getGUID();
    $statement = $database->prepare('INSERT INTO users ' . '(user, email, department, role) ' . 'VALUES (:user, :email, :department, :role)');
    $statement->bindValue(':user', $user, PDO::PARAM_STR);
    $statement->bindValue(':email', $email, PDO::PARAM_STR);
    $statement->bindValue(':department', $department, PDO::PARAM_INT);
    $statement->bindValue(':role', $role, PDO::PARAM_STR);
    $statement->execute();
    $uid = $database->lastInsertId();
    $statement = $database->prepare("INSERT INTO pwresets (token, users_id) " . "VALUES (:token, :users_id)");
    $statement->bindValue(':token', $guid, PDO::PARAM_STR);
    $statement->bindValue(':users_id', $uid, PDO::PARAM_INT);
    $result = $statement->execute();
    if ($result === false) {
        return $statement->errorInfo()[2];
    }
    $message = Swift_Message::newInstance();
    $message->setSender('noreply@' . $_SERVER['SERVER_NAME']);
    $message->setReturnPath('noreply@' . $_SERVER['SERVER_NAME']);
    $message->setFrom(array('noreply@' . $_SERVER['SERVER_NAME'] => 'noreply@' . $_SERVER['SERVER_NAME']));
    $message->setSubject('Holiday Management Registration - ' . $_SERVER['SERVER_NAME']);
    $message->setTo(array($email => $user));
    $message->setBody('You have been signed up for the holiday management system by your administrator.  ' . 'To complete your registration you must set a password on this system, this will also server to verify your ' . 'email address.  Please visit ' . $baseURL . 'pwreset/' . $guid . ' to verify this and setup the password.\\r\\n' . 'If this email was sent in error please visit ' . $baseURL . 'unsubscribe/' . $guid . ' to unsubscribe and we won\'t send' . ' you any more emails');
    $message->addPart('<html><head></head><body><p>You have been signed up for the holiday management system by your ' . 'administrator.  To complete your registration you must set a password on this system, this will also server to ' . 'verify your email address.  Please visit <a href="' . $baseURL . 'pwreset/' . $guid . '">here</a> to verify this and ' . 'setup the password.</p><p>If this email was sent in error please <a href="' . $baseURL . 'unsubscribe/' . $guid . '">' . 'unsubscribe and we won\'t send you any more emails</a></p></body></html>', 'text/html');
    $mailer = Swift_Mailer::newInstance(Swift_SmtpTransport::newInstance('localhost', 25));
    $mailer->send($message);
    return "";
}
开发者ID:greboid,项目名称:Holidays,代码行数:29,代码来源:users.php


示例2: getRequest

 public function getRequest(&$post)
 {
     $strSOAPheader = '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">' . '<SOAP-ENV:Header xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">' . '<wsse:Security soap:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' . '<wsse:UsernameToken>' . '<wsse:Username>' . $post['Username'] . '</wsse:Username>' . '<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">' . $post['Password'] . '</wsse:Password>' . '</wsse:UsernameToken>' . '</wsse:Security>' . '</SOAP-ENV:Header>' . '<SOAP-ENV:Body xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">' . '{SOAPBODY}' . '</SOAP-ENV:Body>' . '</SOAP-ENV:Envelope>';
     list($agentId) = explode('#', $post['AgentId']);
     $strSOAPBody = '<OTA_HotelResNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" EchoToken="' . getGUID() . '" ResStatus="' . $this->book_state . '" TimeStamp="' . $this->date_stamp . '">' . '<POS>' . '<Source>' . '<RequestorID Type="' . $this->request_type_id . '" ID="' . $agentId . '"/>' . '</Source>' . '</POS>' . '<HotelReservations>' . '<HotelReservation LastModifyDateTime="' . $this->date_stamp . '">' . '<UniqueID Type="14" ID="' . $post['ResID'] . '"/>' . $this->getRoomStay($post) . $this->getResGuests() . $this->getResGlobalInfo($post) . '</HotelReservation>' . '</HotelReservations>' . '</OTA_HotelResNotifRQ>';
     //FINAL REQUEST BUILDING.
     $post['request'] = array(str_replace('{SOAPBODY}', $strSOAPBody, $strSOAPheader));
 }
开发者ID:gkawin,项目名称:siteminder,代码行数:8,代码来源:cancel_model.php


示例3: saveData

function saveData($location)
{
    global $_FILE, $_POST;
    // Get connection to the DB
    $link = getConnection();
    // Generate global unique Game ID
    $guid = getGUID();
    // Insert Game Data for the Player
    $query = "INSERT INTO Uploads VALUES('" . (string) $guid . "', '" . (string) $_POST['name'] . "', '" . (string) $_POST['description'] . "', 'Aspect', '" . (string) $location . "');";
    $res = mysqli_query($link, $query);
    echo (string) mysqli_error($link);
}
开发者ID:moneypro,项目名称:ARISE,代码行数:12,代码来源:upload.php


示例4: nsf_parser

function nsf_parser($username, $password, $xml_url)
{
    $ch = curl_init();
    $timeout = 3600;
    curl_setopt($ch, CURLOPT_URL, $xml_url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    //    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
    $data = curl_exec($ch);
    //    $response  = curl_getinfo($ch);
    curl_close($ch);
    $xml = simplexml_load_string($data);
    if ($xml) {
        $trustDetail = $xml->applicantDetails->trust->trustDetail;
        $trustee = $xml->applicantDetails->trust->trustee;
        global $wpdb;
        $wp_hasher = new PasswordHash(8, TRUE);
        $sql = "SELECT * FROM wp_users  WHERE user_login = '{$username}' ";
        $resultuser = $wpdb->get_results($sql);
        if ($resultuser) {
            function getGUID()
            {
                if (function_exists('com_create_guid')) {
                    return com_create_guid();
                } else {
                    mt_srand((double) microtime() * 10000);
                    //optional for php 4.2.0 and up.
                    $charid = strtoupper(md5(uniqid(rand(), true)));
                    $hyphen = chr(45);
                    // "-"
                    $uuid = chr(123) . substr($charid, 0, 8) . $hyphen . substr($charid, 8, 4) . $hyphen . substr($charid, 12, 4) . $hyphen . substr($charid, 16, 4) . $hyphen . substr($charid, 20, 12) . chr(125);
                    // "}"
                    return $uuid;
                }
            }
            foreach ($resultuser as $results) {
                if ($wp_hasher->CheckPassword($password, $results->user_pass)) {
                    $unique = trim(getGUID(), '{}');
                    $result = $wpdb->insert('service_nsf', array('unique_code' => $unique, 'user_email' => "", 'fundName' => $trustDetail->name, 'numMembers' => '', 'stateLaw' => '', 'fundAddressCareOf' => '', 'fundAddressLevel' => '', 'fundAddressStreet' => $trustDetail->contactDetails->addressDetails[0]->addressLine1, 'fundAddressSuburb' => $trustDetail->contactDetails->addressDetails[0]->city, 'fundAddressState' => $trustDetail->contactDetails->addressDetails[0]->state, 'fundAddressPostcode' => $trustDetail->contactDetails->addressDetails[0]->postcode, 'teeMtgAddressLevel' => '', 'teeMtgAddressStreet' => '', 'teeMtgAddressSuburb' => '', 'teeMtgAddressState' => '', 'teeMtgAddressPostcode' => '', 'm1MemberNamePrefix' => $trustee->business->officeBearer[0]->persone->title, 'm1MemberGivenNames' => $trustee->business->officeBearer[0]->persone->givenNames, 'm1MemberFamilyName' => $trustee->business->officeBearer[0]->persone->surname, 'm1MemberDOB' => $trustee->business->officeBearer[0]->persone->dateOfBirth, 'm1MemberTFN' => '', 'm1AddressLevel' => '', 'm1AddressStreet' => $trustee->business->officeBearer[0]->contactDetails->addressDetails->addressLine1, 'm1AddressSuburb' => $trustee->business->officeBearer[0]->contactDetails->addressDetails->city, 'm1AddressState' => $trustee->business->officeBearer[0]->contactDetails->addressDetails->state, 'm1AddressPostcode' => $trustee->business->officeBearer[0]->contactDetails->addressDetails->postcode, 'm2MemberNamePrefix' => $trustee->business->officeBearer[1]->persone->title, 'm2MemberGivenNames' => $trustee->business->officeBearer[1]->persone->givenNames, 'm2MemberFamilyName' => $trustee->business->officeBearer[1]->persone->surname, 'm2MemberDOB' => $trustee->business->officeBearer[1]->persone->dateOfBirth, 'm2MemberTFN' => '', 'm2AddressLevel' => '', 'm2AddressStreet' => $trustee->business->officeBearer[1]->contactDetails->addressDetails->addressLine1, 'm2AddressSuburb' => $trustee->business->officeBearer[1]->contactDetails->addressDetails->city, 'm2AddressState' => $trustee->business->officeBearer[1]->contactDetails->addressDetails->state, 'm2AddressPostcode' => $trustee->business->officeBearer[1]->contactDetails->addressDetails->postcode, 'm3MemberNamePrefix' => $trustee->business->officeBearer[2]->persone->title, 'm3MemberGivenNames' => $trustee->business->officeBearer[2]->persone->givenNames, 'm3MemberFamilyName' => $trustee->business->officeBearer[2]->persone->surname, 'm3MemberDOB' => $trustee->business->officeBearer[2]->persone->dateOfBirth, 'm3MemberTFN' => '', 'm3AddressLevel' => '', 'm3AddressStreet' => $trustee->business->officeBearer[2]->contactDetails->addressDetails->addressLine1, 'm3AddressSuburb' => $trustee->business->officeBearer[2]->contactDetails->addressDetails->city, 'm3AddressState' => $trustee->business->officeBearer[2]->contactDetails->addressDetails->state, 'm3AddressPostcode' => $trustee->business->officeBearer[2]->contactDetails->addressDetails->postcode, 'm4MemberNamePrefix' => $trustee->business->officeBearer[3]->persone->title, 'm4MemberGivenNames' => $trustee->business->officeBearer[3]->persone->givenNames, 'm4MemberFamilyName' => $trustee->business->officeBearer[3]->persone->surname, 'm4MemberDOB' => $trustee->business->officeBearer[3]->persone->dateOfBirth, 'm4MemberTFN' => '', 'm4AddressLevel' => '', 'm4AddressStreet' => $trustee->business->officeBearer[3]->contactDetails->addressDetails->addressLine1, 'm4AddressSuburb' => $trustee->business->officeBearer[3]->contactDetails->addressDetails->city, 'm4AddressState' => $trustee->business->officeBearer[3]->contactDetails->addressDetails->state, 'm4AddressPostcode' => $trustee->business->officeBearer[3]->contactDetails->addressDetails->postcode, 't2NonMemberNamePrefix' => '', 't2NonMemberGivenNames' => '', 't2NonMemberFamilyName' => '', 't2NonMemberAddressLevel' => '', 't2NonMemberAddressStreet' => '', 't2NonMemberAddressSuburb' => '', 't2NonMemberAddressState' => '', 't2NonMemberAddressPostcode' => '', 'corpTeeName' => $trustee->business->businessDetail->businessName, 'corpTeeACN' => '', 'corpTeeAddressCareOf' => '', 'corpTeeAddressLevel' => '', 'corpTeeAddressStreet' => $trustee->business->contactDetails->addressDetails[1]->addressLine1, 'corpTeeAddressSuburb' => $trustee->business->contactDetails->addressDetails[1]->city, 'corpTeeAddressState' => $trustee->business->contactDetails->addressDetails[1]->state, 'corpTeeAddressPostcode' => $trustee->business->contactDetails->addressDetails[1]->postcode, 'd2NonMemberNamePrefix' => '', 'd2NonMemberGivenNames' => '', 'd2NonMemberFamilyName' => '', 'd2NonMemberAddressLevel' => '', 'd2NonMemberAddressStreet' => '', 'd2NonMemberAddressSuburb' => '', 'd2NonMemberAddressState' => '', 'd2NonMemberAddressPostcode' => '', 'chairmanTrustee' => ''));
                    return array('unique_code' => $unique);
                } else {
                    return array('username' => 'Invalid username or password1');
                }
            }
        } else {
            return array('username' => 'Invalid username or password ' . $result);
        }
    } else {
        return array('error' => 'no data found');
    }
}
开发者ID:Ezyva2015,项目名称:SMSF-Academy-Wordpress,代码行数:51,代码来源:parse_xml_nsf.php


示例5: generateToken

function generateToken()
{
    /*****************************************************************************************
     * Create and set a new token for CSRF protection
     * on initial entry or after form errors and we are going to redisplay the form.
     ******************************************************************************************/
    $salt = "";
    $tokenStr = "";
    $salt = sha1($_SERVER["HTTP_HOST"]);
    setcookie("token", "", time() - 42000);
    $_SESSION["salt"] = $salt;
    $_SESSION["guid"] = getGUID();
    $_SESSION["ip"] = $_SERVER["REMOTE_ADDR"];
    $_SESSION["time"] = time();
    $tokenStr = "IP:" . $_SESSION["ip"] . ",SESSIONID:" . session_id() . ",GUID:" . $_SESSION["guid"];
    $_SESSION["token"] = sha1($tokenStr . $_SESSION["salt"] . $_SESSION["salt"]);
    if (setcookie("token", $_SESSION["token"], time() + 86400)) {
        $_SESSION["usecookie"] = True;
    }
}
开发者ID:jeffreyhi1,项目名称:loginsystem-rd,代码行数:20,代码来源:form_token.php


示例6: AddToken

/**
 * Created by PhpStorm.
 * User: root
 * Date: 21/11/15
 * Time: 5:42 PM
 */
function AddToken($Data)
{
    include '../common/Models/Database.php';
    include '../common/helpers/QueryGenrator.php';
    $table = 'userinfo';
    $QueryGen = new QueryGenrator();
    $DB = new DatabaseModel();
    $data = array("AccessToken" => getGUID());
    $Email = $Data['Email'];
    $Password = $Data['Password'];
    $condition = "WHERE Email = '{$Email}' AND Password = '{$Password}'";
    $QueryCheck = $Query = $QueryGen->select($table, $DATA = "None", $condition);
    $CheckInfo = $DB->select($QueryCheck);
    if ($CheckInfo == ERROR_DATA_NOT_FOUND) {
        return ERROR_DATA_NOT_FOUND;
    }
    $Query = $QueryGen->update($table, $data, $condition);
    $DBEntry = $DB->update($Query);
    return $data['AccessToken'];
}
开发者ID:spandey2405,项目名称:onlinecoder,代码行数:26,代码来源:add_token.php


示例7: storeGameInfo

/**
* This method is used to store the ionformation about a Tweety game session. This information can later be
* used to find the top 10 scores, find game info about a particular session etc.
*
* @param player_name :: Name of the Player
* @param time_remaining :: Total time remaining in seconds
* @param score :: Total score at the end of the game
* @param num_correct :: Number of correct pairs selected
* @param num_incorrect :: Number of incorrect pairs selected
* @param profile_pic :: Profile Picture link of the player
*/
function storeGameInfo($player_name, $time_remaining, $score, $num_correct, $num_incorrect, $profile_pic)
{
    // Get connection to the DB
    $link = getConnection();
    // Generate global unique Game ID
    $guid = getGUID();
    // Insert Game Data for the Player
    $query = "INSERT INTO Scores(Game_ID, Player, Score, Time_Remaining, Num_Correct, Num_Incorrect, Profile_Pic) VALUES('" . (string) $guid . "'," . $player_name . ", " . $score . ", " . $time_remaining . ", " . $num_correct . ", " . $num_incorrect . ", " . $profile_pic . ");";
    $res = mysqli_query($link, $query);
    $affectedRows = mysqli_affected_rows($link);
    // log information based on result
    if ($affectedRows == 1) {
        if ($player_name == NULL) {
            $player_name = 'NOT_SPECIFIED';
        }
        logSuccess('gameSelectionLogs.html', 'Player <b>' . $player_name . '</b>\'s game data has been stored. Game ID: <b>' . $guid . '</b>.');
    } else {
        if ($player_name == NULL) {
            $player_name = 'NOT_SPECIFIED';
        }
        logError('gameSelectionLogs.html', 'Unable to store game data for Player <b>' . $player_name . '</b>. <b> ERROR: </b>' . (string) mysqli_error($link));
    }
}
开发者ID:vreddi,项目名称:twitterGame,代码行数:34,代码来源:scoreQueries.php


示例8: getGUID

/**
 * Generate a unique guid
 * 
 * @param int $length length of guid
 * @return string generated guid
 */
function getGUID($length = 8)
{
    $str = generateRandomString($length);
    $r = select_sql('SELECT * FROM allguids WHERE guid = ?', 's', $str);
    if ($r == array()) {
        insert_sql("INSERT INTO allguids(guid) VALUES(?)", 's', array($str));
        return $str;
    } else {
        return getGUID($length);
    }
}
开发者ID:nozols,项目名称:Slotopdracht_informatica,代码行数:17,代码来源:db.php


示例9: conexion

include "funciones.php";
$conn = conexion();
//Variables Alumno
@($id_alumno = getGUID());
@($id_alumno = substr($id_alumno, 1, length - 1));
@($nombre_alumno = $_POST['alumno_nombre']);
@($apellidos_alumno = $_POST['alumno_apellidos']);
@($edad_alumno = $_POST['alumno_edad']);
@($mail_alumno = $_POST['alumno_mail']);
@($grupo_alumno = $_POST['alumno_grupo']);
@($carrera_alumno = $_POST['alumno_carrera']);
@($tipo_usuario = 'Alumno');
@($contraseña_alumno = $_POST['alumno_contraseña']);
//
//Variables Maestro
@($id_maestro = getGUID());
@($id_maestro = substr($id_maestro, 1, length - 1));
@($nombre_maestro = $_POST['maestro_nombre']);
@($apellidos_maestro = $_POST['maestro_apellidos']);
@($edad_maestro = $_POST['maestro_edad']);
@($correo_maestro = $_POST['maestro_correo']);
@($estado_maestro = 'Activo');
@($materia_maestro = $_POST['maestro_materia']);
//
if ($nombre_alumno != '') {
    $Insert_Alumno = mysql_query("INSERT INTO alumno VALUES ('{$id_alumno}',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'{$nombre_alumno}',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'{$apellidos_alumno}',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{$edad_alumno},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'{$mail_alumno}',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'{$contraseña_alumno}',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'{$grupo_alumno}',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'{$carrera_alumno}',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'{$tipo_usuario}')", $conn);
    if ($Insert_Alumno) {
        session_start();
        $_SESSION["Alumno"] = "Alumno";
        header('Location: ../indexAlumno.php');
    } else {
开发者ID:Waskalle,项目名称:TPM-JMED,代码行数:31,代码来源:registrar.php


示例10: registrationAction

 public function registrationAction()
 {
     $ErrorMessage = '';
     $vEmail = '';
     $vFirstName = '';
     $vLastName = '';
     if (filter_input(INPUT_POST, 'registration_btn') !== NULL) {
         $vEmail = POSTStrAsSQLStr('email');
         $vFirstName = POSTStrAsSQLStr('firstname');
         $vLastName = POSTStrAsSQLStr('lastname');
         if (empty($ErrorMessage)) {
             if (!preg_match("/[\\x{0400}-\\x{04FF}\\x]{1,32}/u", $vFirstName)) {
                 $ErrorMessage = 'Имя пользователя должно содержать только символы кириллицы.';
             }
         }
         if (empty($ErrorMessage)) {
             if ($_POST['password'] != $_POST['password2']) {
                 //return AddAlertMessage('danger', 'Пароли не совпадают', '/auth/registration');
                 $ErrorMessage = 'Пароль и подтверждение пароля не совпадают.';
             }
         }
         if (empty($ErrorMessage)) {
             $vSecurimage = new Securimage();
             if (!$vSecurimage->check($_POST['CaptchaCodeEdt']) == true) {
                 $ErrorMessage = 'Вам нужно решить пример правильно.';
             }
         }
         if (empty($ErrorMessage)) {
             $sql = "select ID from Users where (Email = '{$vEmail}');";
             $user = $this->db->query($sql)->fetch();
             if (!empty($user['ID'])) {
                 //return AddAlertMessage('danger', 'Такой e-mail уже зарегистрирован', '/auth/registration');
                 $ErrorMessage = "Пользователь с такой эл. почтой уже существует.";
                 $vEmail = '';
             } else {
                 $vUniversalID = getGUID();
                 /*$this->db->prepare('INSERT INTO Users (PasswordHash, UserName, PhoneNumber, Email, EmailConfirmed, UniversalType, UniversalID) '
                           . 'VALUES (:ph, :un, :pn, :e, 1, 1, :uid)')->
                           execute(array('ph' => EncryptPassword(Tools::getValue('password')), 'un' => Tools::getValue('email'), 'pn' => Tools::getValue('phone'), 'e' => Tools::getValue('email'), 'uid' => $vUniversalID));
                   $id = $this->db->lastInsertId();
                   $this->db->prepare('INSERT INTO UserData (UserID, FirstName, LastName) VALUES (:ui, :fn, :ln)')->execute(array('ui' => $id, 'fn' => Tools::getValue('firstname'), 'ln' => Tools::getValue('lastname')));
                   */
                 $sql = "insert into Users(UniversalType, UniversalID, UserName, Email, EmailConfirmed, PasswordHash) " . "values(1, '{$vUniversalID}', '{$vEmail}', '{$vEmail}', 1, '" . EncryptPassword($_POST['password']) . "') " . "on duplicate key update " . "UniversalID = '{$vUniversalID}';";
                 $this->db->exec($sql);
                 $UserID = $this->db->lastInsertId();
                 $sql = "insert into UserData(UserID, FirstName, LastName) " . "values({$UserID}, '{$vFirstName}', '{$vLastName}') " . "on duplicate key update " . "UserID = {$UserID};";
                 $this->db->exec($sql);
                 if (LoginUsingUniversalID($vUniversalID)) {
                     return AddAlertMessage('success', 'Добро пожаловать!', '/');
                 } else {
                     return AddAlertMessage('danger', 'Ошибка при регистрации!', '/');
                 }
             }
         }
     }
     if (!empty($ErrorMessage)) {
         AddAlertMessage('danger', $ErrorMessage);
     }
     $this->view->setVars(array('Email' => $vEmail, 'FirstName' => $vFirstName, 'LastName' => $vLastName));
     $this->view->breadcrumbs = array(array('url' => '/auth/registration', 'title' => 'Регистрация'));
     $this->view->meta = array('meta_title' => 'Регистрация пользователя', 'meta_description' => 'Регистрация пользователя', 'meta_keywords' => '');
     $this->view->generate();
 }
开发者ID:AleksandrChukhray,项目名称:good_deals,代码行数:63,代码来源:AuthController.php


示例11: getGUID

?>
						</tbody>
					</table>
				</div>		
			</div>
			<div class="tab-pane" id="condensed">
				<div class="box-content">
					<form action="index.php?page=addoffer&mID=<?php 
echo $_REQUEST['mID'];
?>
" class='validate form-horizontal' method="post" name="addmerchant" enctype="multipart/form-data">
						<div class="control-group">
							<label for="title" class="control-label">Code</label>
							<div class="controls">
								<input type="text" name="code" value="<?php 
echo getGUID(6);
?>
" class='{required:true} span8'>
							</div>
						</div>
						<div class="control-group">
							<label for="title" class="control-label">Title</label>
							<div class="controls">
								<input type="text" name="title" value="<?php 
echo $_REQUEST['title'];
?>
" class='{required:true} span8'>
							</div>
						</div>
						<div class="control-group">
							<label for="title" class="control-label">Description</label>
开发者ID:Wings1986,项目名称:SMBeacon-IOS-Web,代码行数:31,代码来源:offer.php


示例12: insert_sql

<?php

require_once 'php/db.php';
insert_sql("INSERT INTO category(guid, name, description) VALUES(?,?,?)", 'sss', array(getGUID(8), $_GET['name'], $_GET['desc']));
开发者ID:nozols,项目名称:Slotopdracht_informatica,代码行数:4,代码来源:add_category.php


示例13: getGUID

function getGUID()
{
    if (function_exists('com_create_guid')) {
        return com_create_guid();
    } else {
        mt_srand((double) microtime() * 10000);
        //optional for php 4.2.0 and up.
        $charid = strtoupper(md5(uniqid(rand(), true)));
        $hyphen = chr(45);
        // "-"
        $uuid = chr(123) . substr($charid, 0, 8) . $hyphen . substr($charid, 8, 4) . $hyphen . substr($charid, 12, 4) . $hyphen . substr($charid, 16, 4) . $hyphen . substr($charid, 20, 12) . chr(125);
        // "}"
        return $uuid;
    }
}
$appguid = getGUID();
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" . PHP_EOL;
?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid><?php 
echo $appguid;
?>
</ProjectGuid>
    <OutputType>Exe</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace><?php 
echo $_PROG->name;
开发者ID:gitter-badger,项目名称:rDSN,代码行数:31,代码来源:csproj.template.php


示例14: insertObject

function insertObject($userId, $tableName, $values)
{
    global $con;
    global $systemColumns;
    $values_array = json_decode($values, true);
    foreach ($systemColumns as $systemColumn) {
        unset($values_array[$systemColumn]);
    }
    foreach ($values_array as $key => $value) {
        $sql[] = is_numeric($value) ? "{$key} = {$value}" : "{$key} = '" . $con->real_escape_string($value) . "'";
    }
    $guid = getGUID();
    $lastModifiedDatetime = time();
    $lastModifiedById = $userId;
    $isDeleted = "false";
    array_push($sql, "guid = '{$guid}'", "lastModifiedDatetime = '{$lastModifiedDatetime}'", "lastModifiedById = '{$lastModifiedById}'", "isDeleted = '{$isDeleted}'");
    $sqlclause = implode(",", $sql);
    $query = "INSERT INTO {$tableName} SET {$sqlclause};";
    if (runQuery($query)) {
        fetchObjectWithClause($tableName, "guid = '" . $guid . "'");
    }
}
开发者ID:rajishere,项目名称:jssync,代码行数:22,代码来源:dbBase.php


示例15: die

    die("Not valid information!");
}
// combine the OMOP required vocab ids with the user selected vocab ids
$allvocabids = $vocabids + $OMOPTypes;
$allvocabids = array_unique($allvocabids);
if ($CDMVersion == 4.5) {
    $Cred = $database_prodv4_credentials;
} else {
    $Cred = $database_prodv5_credentials;
}
$VocIds = implode(",", $allvocabids);
//$FName = implode("_", $vocabids).".zip";
if ($CDMVersion == 4.5) {
    $FName = "vocab_download_v4_5_" . getGUID() . ".zip";
} else {
    $FName = "vocab_download_v5_" . getGUID() . ".zip";
}
$shell_exec_string = 'nohup ' . $perl_dump_script_dir . 'dump.pl ' . $Cred . ' ' . $CDMVersion . ' ' . $zip_file_output_dir . $FName . ' ' . $VocIds . ' > /dev/null & echo $!';
$PID = shell_exec($shell_exec_string);
if (!$PID) {
    $e = oci_error($stid);
    sendErrorEmail("downloads.php shell_exec failed, exec_string=" . $shell_exec_string);
    header("Location:error.php?errorMessage=" . urlencode("Error: unable to generate export file"));
    die;
}
$insert_user_process_sql = "INSERT INTO VOCAB_DOWNLOAD.VOCABULARY_USER (\n        EMAIL_ADDRESS,\n        NAME,\n        ORGANIZATION,\n        ADDRESS,\n        CITY_NAME,\n        COUNTRY_NAME,\n        PHONE_NUMBER,\n        VOCABULARY_LIST,\n        PROCESS_ID,\n        TITLE,\n        STATE,\n        ZIP_CODE,\n\tFILE_NAME,\n        FILE_CREATION_JOB_RUNNING_FLAG\n    ) VALUES (\n        '" . $email . "',\n        '" . $name . "',\n        '" . $Organization . "',\n        '" . $Address . "',\n        '" . $City . "',\n        '" . $Country . "',\n        '" . $Phone . "',\n        '" . $VocIds . "',\n        " . $PID . ",\n        '" . $Title . "',\n        '" . $State . "',\n        '" . $Zip . "',\n        '" . $FName . "',\n        'Y'\n    )";
$stid_add_user_process = oci_parse($conn, $insert_user_process_sql);
if (!$stid_add_user_process) {
    $e = oci_error($conn);
    sendErrorEmail("downloads.php: oci_parse INSERT INTO VOCAB_DOWNLOAD.VOCABULARY_USER table failed, sql=" . $insert_user_process_sql . ", error message=" . $e['message']);
    header("Location:error.php?errorMessage=" . urlencode("Error: unable to log export file request"));
开发者ID:bpgriner01,项目名称:Vocab-download,代码行数:31,代码来源:downloads.php


示例16: dbNow

 }
 if (lg_debug) {
     $dbMsg .= "city = " . $city . "<br />\n";
 }
 /******************************************************************************************************************
  * Set $locked, $dateLocked and unlock $token
  ******************************************************************************************************************/
 $locked = "1";
 if (lg_debug) {
     $dbMsg .= "locked = 1<br />\n";
 }
 $dateLocked = dbNow();
 if (lg_debug) {
     $dbMsg .= "dateLocked = " . $dateLocked . "<br />\n";
 }
 $token = strtoupper(sha1(getGUID()));
 if (lg_debug) {
     $dbMsg .= "token = " . $token . "<br />\n";
 }
 /******************************************************************************************************************
  * Write new account to user's table in database
  ******************************************************************************************************************/
 addUser($dateRegistered, $userid, $passhash, $name, $email, $ip, $region, $city, $country, $useragent, $website, $news, $locked, $dateLocked, $token);
 if (lg_debug) {
     $dbMsg .= "Database insert occurred. Result = " . $numAffected . "<br />\n";
 }
 if ($numAffected == 1) {
     /******************************************************************************************************************
      * On success, $email user the unlock $token. Copy the webmaster
      ******************************************************************************************************************/
     if (lg_debug) {
开发者ID:jeffreyhi1,项目名称:loginsystem-rd,代码行数:31,代码来源:register.php


示例17: AddTaskForSendEmail_UseTemplate

function AddTaskForSendEmail_UseTemplate($AFromEmail, $AFromName, $AToEmail, $AToName, $ASubject, $AUseTemplate, $ATemplateParamsArray, $APriority = 50, $ABlindCopyToEmail = '', $ACopyToEmail = '')
{
    if (isset($ATemplateParamsArray)) {
        $vTemplateParamsArray = base64_encode(serialize($ATemplateParamsArray));
    } else {
        $vTemplateParamsArray = '';
    }
    $sql = "insert into Emails_ToSend(RecordGUID, CreateDate, FromEmail, FromName, ToEmail, ToName, CopyToEmail, BlindCopyToEmail, Subject, Body, UseTemplate, Priority) " . "values('" . getGUID() . "', '" . GetLocalDateTimeAsSQLStr() . "', '{$AFromEmail}', '{$AFromName}', '{$AToEmail}', '{$AToName}', '{$ACopyToEmail}', '{$ABlindCopyToEmail}', '{$ASubject}', '{$vTemplateParamsArray}', '{$AUseTemplate}', {$APriority});";
    GetMainConnection()->exec($sql);
    $vTemplateParamsArray = '';
    CURL_SpeedUp_SendEmail();
    //$YourSerializedData = base64_encode(serialize($theHTML));
    //$theHTML = unserialize(base64_decode($YourSerializedData));
}
开发者ID:AleksandrChukhray,项目名称:good_deals,代码行数:14,代码来源:global.php


示例18: getGUID

function getGUID()
{
    if (function_exists('com_create_guid')) {
        return com_create_guid();
    } else {
        mt_srand((double) microtime() * 10000);
        //optional for php 4.2.0 and up.
        $charid = strtoupper(md5(uniqid(rand(), true)));
        $hyphen = chr(45);
        // "-"
        $uuid = chr(123) . substr($charid, 0, 8) . $hyphen . substr($charid, 8, 4) . $hyphen . substr($charid, 12, 4) . $hyphen . substr($charid, 16, 4) . $hyphen . substr($charid, 20, 12) . chr(125);
        // "}"
        return $uuid;
    }
}
$guidString = getGUID();
$GUID = substr($guidString, 1, -1);
$guid = isset($_SESSION["step2-guid"]) ? $_SESSION["step2-guid"] : $GUID;
?>

	<div class="full-registration" ng-app="listpp" ng-controller="PhoneListCtrl">
		<div class="container">
      <div class="f-space15"></div>
      <div class="row">
        <div class="heading">CRUD Application using AngularJS, PHP and MySQL</div>
      </div>
      <hr />
			<div class="full-step3">
        <div class="row">
          <div class="col-sm-6 form-box">
            <div class="step3form-heading">Add a person</div>
开发者ID:ashwani-luhaniwal,项目名称:CRUD-App-using-AngularJS-PHP-MySQL,代码行数:31,代码来源:index.php


示例19: get_skin

function get_skin($user, $skinData)
{
    $tmp = tempnam("/tmp", "skin_");
    if (!file_put_contents($tmp, base64_decode($skinData))) {
        return FALSE;
    }
    $info = getimagesize($tmp);
    if ($info[0] != 64 || $info[1] != 32 && $info[1] != 64 || $info['mime'] != 'image/png') {
        error_log(print_r(getimagesize($tmp), true));
        return FALSE;
    }
    $link = newdb();
    $stmt = $link->prepare("SELECT skin FROM players WHERE player=?");
    $stmt->bind_param('s', $user);
    $stmt->execute();
    $stmt->bind_result($oldskin);
    $stmt->fetch();
    $stmt->free_result();
    if ($oldskin and is_readable("./Skins/" . $oldskin)) {
        unlink("./Skins/" . $oldskin);
    }
    $newskin = getGUID(false) . getGUID(false);
    $stmt = $link->prepare("UPDATE players SET skin=? WHERE player=?");
    $stmt->bind_param('ss', $newskin, $user);
    $stmt->execute();
    if (!rename($tmp, "./Skins/" . $newskin)) {
        return FALSE;
    }
    return TRUE;
}
开发者ID:betrok,项目名称:minecraft-master,代码行数:30,代码来源:functions.php


示例20: returnFailedAllocate

    }
    $cIngred5 = $cIngred5 - $rIngred5;
    $numValid++;
}
if ($numValid < 1) {
    returnFailedAllocate();
}
// echo "got past ingred compares\n";
$query = "UPDATE orderTable SET ing0=" . $cIngred0 . ", ing1=" . $cIngred1 . ", ing2=" . $cIngred2 . ", ing3=" . $cIngred3 . ", ing4=" . $cIngred4 . ", ing5=" . $cIngred5 . " WHERE orderID=\"0\"";
$result = mysqli_query($dbCon, $query);
if (!$result) {
    // echo "Error updating reserved ingredients\n";
    // echo mysqli_error($dbCon);
    returnFailedAllocate();
}
date_default_timezone_set("America/New_York");
$date = date_create();
$time = date_timestamp_get($date);
$barcode = getGUID();
$query = 'INSERT INTO orderTable (orderID, ing0, ing1, ing2, ing3, ing4, ing5, orderTime) VALUES ("' . $barcode . '", ' . $rIngred0 . ', ' . $rIngred1 . ', ' . $rIngred2 . ', ' . $rIngred3 . ', ' . $rIngred4 . ', ' . $rIngred5 . ', ' . $time . ')';
$result = mysqli_query($dbCon, $query);
if (!$result) {
    // echo "Error inserting new drink order\n";
    // echo mysqli_error($dbCon);
    returnFailedAllocate();
}
$createBarcodeImage = '/usr/local/bin/zint -b 92 --scale=10 -o /srv/http/barcodeImages/' . $barcode . '.png --data=' . $barcode;
exec($createBarcodeImage);
$expireTime = $time + 600;
$arr = array('barcode' => $barcode, 'expireTime' => $expireTime);
echo json_encode($arr);
开发者ID:beaverb1ll,项目名称:SeniorDesign_WebAPI,代码行数:31,代码来源:orderDrink.php



注:本文中的getGUID函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP getGalleryIndexURL函数代码示例发布时间:2022-05-15
下一篇:
PHP getGS函数代码示例发布时间: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