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

PHP getUserData函数代码示例

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

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



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

示例1: getData

function getData(&$queryobj)
{
    $userqueryinfo = $queryobj["userinfo"];
    $machinequeryinfo = $queryobj["machineinfo"];
    $begin_ts = $queryobj["from_ts"];
    $end_ts = $queryobj["end_ts"];
    if ($begin_ts < 0) {
        $end_ts = time();
        $begin_ts = $end_ts + $begin_ts;
    } else {
        if ($begin_ts > $end_ts) {
            $end_ts = time();
        }
    }
    $alldata = array();
    if (0 !== sizeof($userqueryinfo)) {
        $user = $userqueryinfo["user"];
        $selections = $userqueryinfo["selection"];
        foreach ($selections as $product => $typeobj) {
            $alldata[$product] = getUserData($user, $product, $typeobj, $begin_ts, $end_ts);
        }
    }
    if (0 !== sizeof($machinequeryinfo)) {
        $alldata["_machineinfo_"] = getMachineData($machinequeryinfo, $begin_ts, $end_ts);
    }
    return $alldata;
}
开发者ID:sleepyycat,项目名称:WebFramework,代码行数:27,代码来源:readLog.php


示例2: createInvoice

function createInvoice($data)
{
    global $dbh;
    $userdata = getUserData($data['userid']);
    $recipient = $data['userid'];
    $address = json_encode(array($userdata[15], $userdata[14], $userdata[9], "{$userdata[10]} {$userdata[11]}", $userdata[12]));
    $products = json_encode($data['products']);
    $subTotal = 0;
    $invoicedate = date("Y-m-d H:i:s", strtotime($data['invoice_date']));
    $invoiceduedate = date("Y-m-d H:i:s", strtotime('+14 days', strtotime($data['invoice_date'])));
    foreach ($data['products'] as $product) {
        $subTotal += $product[2] * $product[1];
    }
    $tax = 0.21 * $subTotal;
    $grandTotal = $subTotal + $tax;
    $sth = $dbh->prepare("\n\tINSERT INTO invoice_invoices (invoice_recipient, invoice_date, invoice_products, invoice_status, invoice_subtotal, invoice_tax, invoice_total, invoice_duedate, invoice_adress, invoice_number, invoice_ordernum) VALUES (:invoice_recipient, :invoice_date, :invoice_products, '0', :invoice_subtotal, :invoice_tax, :invoice_total, :invoice_duedate, :invoice_adress, :invoice_number, :invoice_ordernum);");
    $sth->bindParam(':invoice_recipient', $recipient, PDO::PARAM_STR);
    $sth->bindParam(':invoice_products', $products, PDO::PARAM_STR);
    $sth->bindParam(':invoice_subtotal', $subTotal, PDO::PARAM_INT);
    $sth->bindParam(':invoice_tax', $tax, PDO::PARAM_INT);
    $sth->bindParam(':invoice_total', $grandTotal, PDO::PARAM_INT);
    $sth->bindParam(':invoice_adress', $address, PDO::PARAM_STR);
    $sth->bindParam(':invoice_date', $invoicedate, PDO::PARAM_STR);
    $sth->bindParam(':invoice_duedate', $invoiceduedate, PDO::PARAM_STR);
    $sth->bindParam(':invoice_number', $data['invoice_number'], PDO::PARAM_INT);
    $sth->bindParam(':invoice_ordernum', $data['order_number'], PDO::PARAM_INT);
    $sth->execute();
    sendMail($userdata['user_email'], "Uw Factuur van D3 Creative Agency", "Beste {$userdata[14]},<br/><br/><div>In je account <strong>{$userdata['user_login']}</strong> is een nieuwe factuur voor je aangemaakt met factuurnummer {$data['invoice_number']}. We hebben de factuur ook onderaan dit bericht toegevoegd.<br/><br/>Je hebt aangegeven gebruik te willen maken van overboeking. Let er op dat de factuur op tijd word betaald op om pauzering van je diensten te voorkomen.<br/><br/>Voor eventuele vragen kan je ons altijd bereiken via <a href=\"mailto:[email protected]\">[email protected]</a> of via de knop 'Contact' in je <a href=\"http://cp.thisisd3.com/contact/\">controlepaneel</a>.<br/></div><p>Met vriendelijke groet,<br/><br />D3 - Creative Agency<br /></p><br><br><hr><br><br>" . showInvoice($data['invoice_number']));
    global $invoiceCreateOk;
    $invoiceCreateOk = "Factuur is toegevoegd! En ge-e-mailed naar <i>{$userdata['user_email']}</i>";
}
开发者ID:xvilo,项目名称:Cpanel,代码行数:31,代码来源:functions.php


示例3: publishnews

 public function publishnews($id, $date)
 {
     $user = getUserData($this->loadModel('AuthenticationModel'));
     require 'application/views/_templates/header.json.php';
     if ($user != NULL) {
         $newsTeaser_model = $this->loadModel('NewsTeaserModel');
         $newsTeaser_model->publishNews($id, urlencode($date));
         $ver = $newsTeaser_model->getNewsVersions($id)[0]->version;
         require 'application/views/_templates/header.json.php';
         $output = array("type" => 'success', "id" => $id, "version" => $ver);
     } else {
         $output = array("type" => 'error');
     }
     require 'application/views/_templates/footer.json.php';
 }
开发者ID:Multimediajugend,项目名称:Website,代码行数:15,代码来源:json.php


示例4: eval_ccpc_getNoFormData

/**
 * eval_ccpc_getNoFormData - Récupère les informations non contenues dans le formulaire au cours d'une évaluation
 *
 * @category : eval_ccpc_functions
 * @param array $evaluationData Array contenant les informations relatives à l'évaluation
 * @param array $erreur Array contenant la liste des erreurs rencontrées avant execution de la fonction
 * @return array Array contenant les informations non contenues dans le formulaire et les erreurs rencontrés lors de l'execution de la fonction
 * 
 * @Author Ali Bellamine
 *
 * Contenu de l'array retourné :<br>
 *	['data'][identifiant du service où est affecté l'utilisateur]['date'] => (string) Date de remplissage de l'évaluation, sous forme de timestamp<br>
 *	['data'][identifiant du service où est affecté l'utilisateur]['promotion'] => (int) Identifiant de la promotion de l'utilisateur<br>
 *	['data'][identifiant du service où est affecté l'utilisateur]['debutStage'] => (string) Date de début de l'affectation de l'étudiant dans le service<br>
 *	['data'][identifiant du service où est affecté l'utilisateur]['finStage'] => (string) Date de fin de l'affectation de l'étudiant dans le service<br>
 *	['data'][identifiant du service où est affecté l'utilisateur]['service'] => (int) Identifiant du service<br>
 *	['data'][identifiant du service où est affecté l'utilisateur]['nbExternesPeriode'] => (int) Nombre d'étudiants actuellement enregistrés dans le service<br>
 *	['erreur'][identifiant du service où est affecté l'utilisateur][] => (array) Array contenant la liste des erreurs rencontrés
 *
 */
function eval_ccpc_getNoFormData($evaluationData, $erreur)
{
    global $db;
    $data = array();
    /**
    			On remplit l'array $data['date']
    		**/
    // Date
    $tempData['date'] = TimestampToDatetime(time());
    // On récupère les dates à tester
    $evaluationSettings = eval_ccpc_getSettings($evaluationData['id']);
    // Promotion de l'utilisateur
    if ($userData = getUserData($_SESSION['id']) && isset($tempData['promotion'])) {
        $tempData['promotion'] = $userData['promotion']['id'];
    } else {
        if ($userData = getUserData($_SESSION['id']) && !isset($tempData['promotion'])) {
            $tempData['promotion'] = 'NULL';
        } else {
            $tempErreur['LANG_ERROR_CCPC_NOPROMOTION'] = true;
        }
    }
    // Informations concernant le service et la durée du stage
    $sql = 'SELECT ae.service service, ae.dateDebut dateDebut, ae.dateFin dateFin
						FROM affectationexterne ae
						WHERE ae.dateDebut >= :dateDebutEval AND ae.dateFin >= :dateDebutEval AND ae.dateDebut <= :dateFinEval AND ae.dateFin <= :dateFinEval AND userId = :id';
    $res = $db->prepare($sql);
    $res->execute(array('dateDebutEval' => TimestampToDatetime($evaluationSettings['dateDebut']), 'dateFinEval' => TimestampToDatetime($evaluationSettings['dateFin']), 'id' => $_SESSION['id']));
    if ($res) {
        while ($res_f = $res->fetch()) {
            $data['data'][$res_f['service']]['debutStage'] = $res_f['dateDebut'];
            $data['data'][$res_f['service']]['finStage'] = $res_f['dateFin'];
            $data['data'][$res_f['service']]['service'] = $res_f['service'];
            $data['data'][$res_f['service']]['promotion'] = $tempData['promotion'];
            $data['data'][$res_f['service']]['date'] = $tempData['date'];
            $sql = 'SELECT count(*) nbExterne
								FROM affectationexterne
								WHERE (dateDebut >=  :dateDebutUser AND dateDebut <= :dateFinUser ) AND (dateDebut <= :dateDebutUser AND dateFin >= :dateDebutUser)';
            $res2 = $db->prepare($sql);
            $res2->execute(array('dateDebutUser' => $data['data'][$res_f['service']]['debutStage'], 'dateFinUser' => $data['data'][$res_f['service']]['finStage']));
            if ($res2_f = $res2->fetch()) {
                $data['data'][$res_f['service']]['nbExternesPeriode'] = $res2_f['nbExterne'];
            } else {
                $data['erreur'][$res_f['service']]['LANG_ERROR_CCPC_NONBEXTERNE'] = true;
            }
        }
    }
    return $data;
}
开发者ID:Galinijay,项目名称:PAS,代码行数:68,代码来源:fnDisplayEvaluation.php


示例5: passwordCheck

function passwordCheck($params)
{
    if (password_verify($params['senha'], $params['hash'])) {
        if (password_needs_rehash($params['hash'], PASSWORD_DEFAULT, ['cost' => 10])) {
            $hash = password_hash($params['senha'], PASSWORD_DEFAULT, ['cost' => 10]);
            defineNewHash($params['hash']);
        }
        session_unset($_SESSION['error']);
        //Chama o método de para recuperaros dados do usuário
        getUserData($params['email']);
        return true;
    } else {
        $_SESSION['error'] = 'Senha invalida.';
        return false;
    }
}
开发者ID:Calcio,项目名称:CursoPHPBasico,代码行数:16,代码来源:login.php


示例6: logUserIn

function logUserIn($name, $password, $keepLog = false)
{
    $name = secureString($name);
    $password = hashPassword(secureString($password), getUserData(array('name' => $name))['salt']);
    $userData = getUserData(array('name' => $name, 'password' => $password));
    if ($userData) {
        setSessionVar('login', true);
        setSessionVar('userID', $userData['id']);
        if ($keepLog) {
            setSessionVar('saveKeepLog', true);
        }
        return true;
    } else {
        return false;
    }
}
开发者ID:extendgears,项目名称:php-components,代码行数:16,代码来源:log.php


示例7: base

 function base()
 {
     //$this->load->model('leave_transactions_model','mods');
     //$result = $this->mods->getTransactionSummary(getUserId($this));
     //var_dump($result);
     //exit;
     $data = initializeData($this, "Profile");
     $data['data'] = getUserData($this);
     $data['title_here'] = $data['data'][0]->lname . ', ' . $data['data'][0]->fname . ' ' . $data['data'][0]->mname . ' (' . $data['data'][0]->empno . ')';
     //error_reporting(E_ALL);
     $sDept = $this->mod->getDeptOfEmployee(getUserId($this));
     $aDept = $this->mod->getObjectById('departments', 'id', $sDept[0]->department_id);
     $sStat = $this->mod->getStatOfEmployee(getUserId($this));
     $aStat = $this->mod->getObjectById('status', 'id', $sStat[0]->id);
     $sEmp = $this->mod->getEmpTypeOfEmployee(getUserId($this));
     $aEmp = $this->mod->getObjectById('emp_types', 'id', $sEmp[0]->id);
     //var_dump($aDept);
     //var_dump($aStat);
     //var_dump($aEmp);
     $data['leave_balance'] = $this->mod->getLeaveBalanceOfEmployee(getUserId($this));
     $data['own_department'] = $aDept[0]->department_name;
     $data['own_employment'] = $aEmp[0]->emp_description . ' (' . $aStat[0]->status_name . ')';
     /*function getEmpTypeOfEmployee($employee_id){   
           $query = $this->db->query("SELECT de.id FROM emp_types de,employment e,emp_types_stat d WHERE e.employee_id = {$employee_id} AND e.emp_types_stat_id = d.id AND d.emp_types_id = de.id");
           return $query->result();        
       }
       function getStatOfEmployee($employee_id){   
           $query = $this->db->query("SELECT s.id FROM status s,employment e,emp_types_stat d WHERE e.employee_id = {$employee_id} AND e.emp_types_stat_id = d.id AND d.status_id = s.id");
           return $query->result();        
       }
       
       
       function getDeptOfEmployee($employee_id){   
           $query = $this->db->query("SELECT department_id FROM employees WHERE id = {$employee_id}");
           return $query->result();        
       }
       function getRankOfEmployee($employee_id){   
           $query = $this->db->query("SELECT ranks_id FROM employees WHERE id = {$employee_id}");
           return $query->result();        
       } 
       function getRoleOfEmployee($employee_id){   
           $query = $this->db->query("SELECT roles_id FROM employees WHERE id = {$employee_id}");
           return $query->result();        
       } */
     renderPage($this, $this->table . '/base', $data);
 }
开发者ID:acelumaad,项目名称:leave-system,代码行数:46,代码来源:home.php


示例8: intval

        <div class="main-content">

            <form action="" method="post">
                <?php 
if (!empty($message)) {
    echo '<div class="form-item">' . $message . '</div>';
}
?>

                <form action="" method="post">

                    <?php 
$uid = intval($_GET['iuid']);
$investor = getInvestorById($uid);
$userverification = getUserData($_SESSION['uid']);
if (!$investor) {
    echo ' <div class="content-titles">Investor does not exist.</div>';
    exit;
}
?>
                    <form action="" method="post" enctype="multipart/form-data">
                        <div class="content-block">
                            <div
                                class="content-title"><?php 
echo $investor['company_name'];
?>
 <?php 
if ($investor['verified'] == True) {
    ?>
                                    <img src="images/4.png" title="Verified." "><?php 
开发者ID:aryalprakash,项目名称:rroute,代码行数:30,代码来源:edit_investor.php


示例9: getUserLink

function getUserLink($useid)
{
    global $_getUserLinkCache;
    $useid = intval($useid);
    if (isset($_getUserLinkCache[$useid])) {
        return $_getUserLinkCache[$useid];
    }
    $useData = getUserData($useid);
    if ($useData["useid"] == 0) {
        $str = '???';
        $_getUserLinkCache[$useid] = $str;
        return $str;
    }
    $str = '<span class="nowrap">' . getOnlineLamp($useData) . '<a href="' . url("user/" . strtolower($useData["useUsername"])) . '">' . $useData["useUsername"] . '</a></span>';
    $_getUserLinkCache[$useid] = $str;
    return $str;
}
开发者ID:brocococonut,项目名称:yGallery,代码行数:17,代码来源:formatting.php


示例10: getRoutersForUser

                <div class="my-routers content-block">
                    <div class="content-title"><?php 
if ($own_profile) {
    echo 'My';
} else {
    echo $user['first_name'] . "'s";
}
?>
 Routers</div>
                    <div class="form-item no-height">
                        <?php 
$routers = getRoutersForUser($uid);
if (!empty($routers)) {
    foreach ($routers as $router) {
        $u = getUserData($router['user_id']);
        ?>
                                <div class="router-user-photo">
                                    <a href="user.php?uid=<?php 
        echo $u['user_id'];
        ?>
">
                                        <?php 
        if (empty($u['photo'])) {
            ?>
                                            <img src="uploads/avatars/nophoto.jpg" alt="">
                                        <?php 
        } else {
            ?>
                                            <img src="uploads/avatars/<?php 
            echo $u['photo'];
开发者ID:smilingsenti,项目名称:rangeenroute,代码行数:30,代码来源:user.php


示例11: foreach

                echo LANG_ADMIN_SERVICES_NOM;
                ?>
</th>
						<th><?php 
                echo LANG_ADMIN_AFFECTATIONS_DATE_DEBUT;
                ?>
</th>
						<th><?php 
                echo LANG_ADMIN_AFFECTATIONS_DATE_FIN;
                ?>
</th>
						<th></th>
					</tr>
				<?php 
                foreach ($affectationsErreur as $affectationErreurId => $affectationErreurData) {
                    $userData = getUserData($_SESSION['affectations']['data']['insert'][$affectationErreurId]['etudiant']);
                    $serviceData = getServiceInfo($_SESSION['affectations']['data']['insert'][$affectationErreurId]['service']);
                    ?>
					<tr class = "bodyTR">
						<td><?php 
                    echo $userData['nom'] . ' ' . $userData['prenom'];
                    ?>
</td>
						<td><?php 
                    echo $serviceData['FullName'];
                    ?>
</td>
						<td><?php 
                    echo $_SESSION['affectations']['data']['insert'][$affectationErreurId]['dateDebut'];
                    ?>
</td>
开发者ID:alibell,项目名称:PAS,代码行数:31,代码来源:ajouter.php


示例12: header

require_once 'init.php';
if (!isSignin()) {
    $signin_url = 'signin.php';
    header("Location: {$signin_url}");
    exit;
}
$user_id = $_SESSION['user_id'];
//error_log("user id debug output" . $user_id, 4);
$db = connectDb();
$place = 0;
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    if (isset($_POST['place'])) {
        $place = $_POST['place'];
    }
}
$user_data = getUserData($db, $user_id);
$user_name = $user_data["user_name"];
$user_id = $user_data["id"];
$event_data = getEventData($db, $user_id);
$event_name = $event_data["event_name"];
$event_content = $event_data["content"];
$lastEvent = getLastEvent($db, $user_id);
$leName = "イベントがありません";
$last = "イベントがありません";
$lastId = $lastEvent["user_id"];
$lastEId = $lastEvent["id"];
if ($lastId == $user_id) {
    $last = $lastEvent["content"];
    $leName = $lastEvent["event_name"];
}
function h($str)
开发者ID:dhacks,项目名称:team-e,代码行数:31,代码来源:event2.php


示例13: getPassword

<?php

if ($_POST['uname'] != "") {
    #$password = getPassword($_POST['uname']);
    $userdata = getUserData($_POST['uname']);
    $password = $userdata['password'];
    if ($password == $_POST['pass']) {
        $expire = time() + 60 * 60;
        setcookie("name", $_POST['uname'], $expire);
        setcookie("gid", $userdata['gid'], $expire);
        #echo "cookie set for: [" . $_COOKIE['name'] . "]<br/>";
    } else {
        $login_failed = true;
    }
}
if ($_GET['logout']) {
    setcookie("name", "", time() - 3600);
    setcookie("gid", "", time() - 3600);
}
/*if ($_COOKIE['name'] != "") {
		echo "cookie set for: [" . $_COOKIE['name'] . "]<br/>";
}*/
function getUserData($username)
{
    try {
        $userarray = array();
        #echo "username: $username<br/>";
        $db = new PDO('mysql:dbname=michaeq6_mheartsj', 'michaeq6_mj', 'mj060708');
        $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        $stmt = $db->prepare("SELECT group_id FROM users WHERE name=?");
        $stmt->bindParam(1, $username);
开发者ID:abc2mit,项目名称:abc2mit.github.io,代码行数:31,代码来源:rsvp.php


示例14: checkid

 function checkid($realm, &$attributes)
 {
     logger('checkid: ' . $realm);
     logger('checkid attrs: ' . print_r($attributes, true));
     if (isset($_POST['cancel'])) {
         $this->cancel();
     }
     $data = getUserData();
     if (!$data) {
         return false;
     }
     $q = get_pconfig(local_channel(), 'openid', $realm);
     $attrs = array();
     if ($q) {
         $attrs = $q;
     } elseif (isset($_POST['attributes'])) {
         $attrs = array_keys($_POST['attributes']);
     } elseif (!isset($_POST['once']) && !isset($_POST['always'])) {
         return false;
     }
     $attributes = array();
     foreach ($attrs as $attr) {
         if (isset($this->attrFieldMap[$attr])) {
             $attributes[$attr] = $data[$this->attrFieldMap[$attr]];
         }
     }
     if (isset($_POST['always'])) {
         set_pconfig(local_channel(), 'openid', $realm, array_keys($attributes));
     }
     return z_root() . '/id/' . $data['channel_address'];
 }
开发者ID:TamirAl,项目名称:hubzilla,代码行数:31,代码来源:id.php


示例15: TimestampToDatetime

        ?>
</th>
						<th><?php 
        echo LANG_ADMIN_AFFECTATIONS_DATE_FIN;
        ?>
</th>
						<th></th>
					</tr>
					
					<?php 
        // Récupération de la liste des étudiants affectés au service
        $sql = 'SELECT userId idEtudiant, ae.id affectationId FROM affectationexterne ae INNER JOIN user u ON u.id = ae.userId WHERE ae.service = :service AND ae.dateDebut <= :now AND ae.dateFin >= :now ORDER BY u.promotion ASC, nom ASC, prenom ASC';
        $res = $db->prepare($sql);
        $res->execute(array('service' => $serviceInfo['id'], 'now' => TimestampToDatetime(time())));
        if ($res_f = $res->fetch()) {
            $userData = getUserData($res_f['idEtudiant']);
            ?>
								<tr style = "text-align: center;">
									<td><?php 
            echo $userData['prenom'];
            ?>
</td>
									<td><?php 
            echo $userData['nom'];
            ?>
</td>
									<td><?php 
            echo $userData['promotion']['nom'];
            ?>
</td>
									<td><?php 
开发者ID:Galinijay,项目名称:PAS,代码行数:31,代码来源:service.php


示例16: getProjectsInTrend

include_once 'app/users.php';
$projects = getProjectsInTrend();
if ($projects) {
    $added_array = array();
    foreach ($projects as $p) {
        if (in_array($p['project_id'], $added_array)) {
            continue;
        }
        $added_array[] = $p['project_id'];
        $project = getProjectById($p['project_id']);
        $title = $project['project_title'];
        $startup_amount = $project['startup_amount'];
        $raised_amount = 1500;
        $mark = $raised_amount * 100 / $startup_amount;
        $color_mark = 100 - $mark;
        $user = getUserData($project['created_by']);
        $reward = $project['reward'];
        $ppc = $project['per_product_cost'];
        $eq_pc = $project['equity_pc'];
        if (strlen($title) < 20) {
            $short_title = $title;
        } else {
            $short_title = substr($title, 0, 19) . '...';
        }
        ?>
        <div> 
        <div class="recent-project-item" style="float: left; margin:inherit">

            <?php 
        $image = getFeaturingImage($project['project_id']);
        if (!empty($image)) {
开发者ID:smilingsenti,项目名称:rangeenroute,代码行数:31,代码来源:home-tab-fundables.php


示例17: getUserData

            <div class=" <?php 
        echo $alignmessage;
        ?>
 ">
                <?php 
        echo $message['message'];
        ?>
            </div>
        </div>
    <?php 
    }
    ?>


    <div class="message-item" style="border-top: none;"><?php 
    $own = getUserData($_SESSION['uid']);
    $own_photo = $own['photo'];
    ?>
        <div class="answer-box" id="answer_<?php 
    echo $_GET['conv'];
    ?>
">
            <textarea name="message" id="message" placeholder="Enter Message."></textarea>

            <div class="router-user-photo answer-photo">
                <a href="user.php?uid=<?php 
    echo $own['user_id'];
    ?>
">
                    <?php 
    if (empty($own_photo)) {
开发者ID:aryalprakash,项目名称:rroute,代码行数:31,代码来源:message-details.php


示例18: header

 /* For Support Contact @
 /*                                    - [email protected]
 /* Release Date : 02 Feb 2011
 /* Licensed under GPL license:
 /* http://www.gnu.org/licenses/gpl.html
 */
include_once 'functions.php';
if (empty($_GET['qid'])) {
    header('Location:index.php');
} else {
    getSummary($pq, $db, $_GET['qid']);
}
$_SESSION['RESULTS']['total_blank'] = $_SESSION['RESULTS']['total_qstn'] - $_SESSION['RESULTS']['total_correct'] - $_SESSION['RESULTS']['total_wrong'];
$_SESSION['RESULTS']['time_unused'] = $_SESSION['RESULTS']['total_time'] * 60 - $_SESSION['RESULTS']['time_used'];
$_SESSION['RESULTS']['total_question'] = $_SESSION['RESULTS']['total_qstn'];
$_SESSION['RESULTS']['USER'] = getUserData($db, $_SESSION['RESULTS']['user']);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><?php 
echo SITETITLE;
?>
</title>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />	
<link rel="stylesheet" href="css/quiz.css" type="text/css" media="screen" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.corner.js"></script>
<!--[if IE]><script language="javascript" type="text/javascript" src="js/excanvas.min.js"></script><![endif]-->
<script type="text/javascript">
开发者ID:cloudsofy,项目名称:proquiz,代码行数:31,代码来源:summary.php


示例19: getUserAvatar

     $avatar = getUserAvatar("", $data["updUser"], true);
     $usernameData = getUserData($data["updUser"]);
     $username = $usernameData["useUsername"];
     $result = sql_query("SELECT `jouTitle`,LEFT(`jouEntry`,500) AS `jouText` FROM `journals` " . "WHERE `jouid` = '" . $data["updObj"] . "'");
     if (mysql_num_rows($result) > 0) {
         $title = mysql_result($result, 0, 0);
         $body = mysql_result($result, 0, 1);
         $url = url("journal/" . strtolower($username) . "/" . $data["updObj"]);
     }
     $caption = getIMG(url() . "images/emoticons/journal.png") . " " . sprintf(_UPD_JOURNAL, $user, "");
     break;
 case updTypeJournalPoll:
     $markAsReadOp = "mp";
     $user = getUserLink($data["updUser"]);
     $avatar = getUserAvatar("", $data["updUser"], true);
     $usernameData = getUserData($data["updUser"]);
     $username = $usernameData["useUsername"];
     $result = sql_query("SELECT `polSubject`,LEFT(`polComment`,500) AS `polText` FROM `polls` " . "WHERE `polid` = '" . $data["updObj"] . "'");
     if (mysql_num_rows($result)) {
         $title = mysql_result($result, 0, 0);
         $body = mysql_result($result, 0, 1);
         $url = url("poll/" . strtolower($username) . "/" . $data["updObj"]);
     }
     $caption = getIMG(url() . "images/emoticons/poll.png") . " " . sprintf(_UPD_POLL, $user, "");
     break;
 case updTypeAnnouncement:
     $markAsReadOp = "ma";
     $clubname = "[" . _UNKNOWN . "]";
     $result = sql_query("SELECT `cluName` FROM `clubs` " . "WHERE `cluid` = '" . $data["updUser"] . "' LIMIT 1");
     if (mysql_num_rows($result) > 0) {
         $clubname = mysql_result($result, 0);
开发者ID:brocococonut,项目名称:yGallery,代码行数:31,代码来源:p_updates.php


示例20: getVerified

function getVerified()
{
    global $db_con;
    if (empty($_FILES)) {
        return 'Please select file to upload';
    }
    if (move_uploaded_file($_FILES['verify_file']['tmp_name'], 'uploads/documents/' . $_FILES["verify_file"]['name'])) {
        $user = getUserData($_SESSION['uid']);
        $mail_header = "MIME-Version: 1.0\r\n";
        $mail_header .= "Content-type: text/html; charset=UTF-8\r\n";
        $mail_header .= "From: Rangeen Route <[email protected]>\r\n";
        $mail_header .= "Reply-to: Rangeen Route <[email protected]>\r\n";
        $recipient = '[email protected]';
        $subject = 'Verification documents received';
        $message = '<a href="' . SITE_URL . '/user.php?uid=' . $_SESSION['uid'] . '">' . $user['first_name'] . ' ' . $user['last_name'] . '</a> sent document. <br>';
        $message .= '<a href="' . SITE_URL . '/uploads/documents/' . $_FILES["verify_file"]['name'] . '">Download</a>';
        $message = '<html><body><p align="left">' . $message . '</p></body></html>';
        mail($recipient, $subject, $message, $mail_header);
        mail('[email protected]', $subject, $message, $mail_header);
        $q = "UPDATE `users` SET `verify_file` = '" . $_FILES["verify_file"]['name'] . "' WHERE `user_id` = " . $_SESSION['uid'];
        $db_con->query($q);
        return 'Your verification document has been sent.';
    } else {
        return "File uploading error!";
    }
}
开发者ID:smilingsenti,项目名称:rangeenroute,代码行数:26,代码来源:users.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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