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; }
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:sem@thisisd3.com\">sem@thisisd3.com</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>"; }
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'; }
/** * 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; }
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; } }
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; } }
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); }
<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
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; }
<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'];
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>
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)
<?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);
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']; }
?> </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
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)) {
<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)) {
/* For Support Contact @ /* - proquiz@softon.org /* 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">
$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);
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 <*****@*****.**>\r\n"; $mail_header .= "Reply-to: Rangeen Route <*****@*****.**>\r\n"; $recipient = '*****@*****.**'; $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('*****@*****.**', $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!"; } }
<?php require 'models/connect.php'; require 'models/user_functions.php'; require 'models/comment_functions.php'; require 'models/redirect.php'; require 'models/show_bookcp_functions.php'; require 'models/message_functions.php'; require 'models/date.php'; // if note logged in , redirect to login page // better replace userid with profileid as a better fitting name if (!isset($_SESSION['userid'])) { redirect('login.php', ['ref' => 'profile'], ['uid'], 'force'); } // get user data from db $data = getUserData($_GET['uid']); if (!$data) { standardRedirect('404.php'); } $title = 'Προφίλ ' . $data['username']; $bookCopies = getUserBcopies($_GET['uid']); $comments = getProfileComments($_GET['uid']); require 'views/header.php'; require 'views/user/profile.php'; require 'views/footer.php';
<?php include 'includes/header.php'; require_once DIR_APP . 'projects.php'; require_once DIR_APP . 'users.php'; if (empty($_SESSION['logged_in'])) { redirect('index.php'); } if (isset($_POST['save_account'])) { updateAccount($_POST); } $user = getUserData($_SESSION['uid']); ?> <div class="inner-page-wrapper"> <div class="account inner-page content"> <?php include DIR_INCLUDE . 'left_nav.php'; ?> <div class="main-content"> <ul class="router-top-nav"> <li class="active"><a href="account.php">Account</a></li> <li><a href="privacy.php">Privacy</a></li> <li><a href="payment.php">Payment</a></li> <li><a href="report.php">Report</a></li> <li class="logout"><a href="logout.php">Logout</a></li>
* GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://opensource.org/licenses/gpl-3.0.html>;. * * @package OpenEMR * @author Karl Englund <*****@*****.**> * @link http://www.open-emr.org */ header("Content-Type:text/xml"); $ignoreAuth = true; require_once 'classes.php'; $p_id = $_REQUEST['patientID']; $token = $_REQUEST['token']; $xml_array = array(); if ($userId = validateToken($token)) { $user_data = getUserData($userId); $user = $user_data['user']; $emr = $user_data['emr']; $username = $user_data['username']; $password = $user_data['password']; $acl_allow = acl_check('patientportal', 'portal', $username); if ($acl_allow) { $patient = getPatientData($p_id); $xml_array['status'] = 0; $xml_array['reason'] = "Success patient processing record"; if ($patient) { $xml_array['Patient']['demographics'] = $patient; $ethencity_query = "SELECT option_id, title FROM list_options WHERE list_id = 'ethnicity' AND `option_id` = ?"; $patientData = $patient["ethnicity"]; $ethencity_result = sqlQuery($ethencity_query, array($patientData)); if ($ethencity_result) {
} if (!isset($agb)) { $registerErrors['agb'][] = 'Um ein Händlerkonto zu erstellen müssen Sie unsere AGB akzeptieren.'; } } if (empty($registerErrors)) { $success = registerUser($mail, $pw, $db); if ($success) { unset($_POST); $successMsg = 'Ihr Händlerkonto wurde erstellt. Sie erhalten in Kürze eine E-Mail. Sollten Sie diese nicht erhalten, stellen Sie bitte sicher auch im Spam-Ordner Ihres E-Mail Programms nachgeschaut zu haben.'; } } break; case 'login': if (isset($_POST['login_mail'], $_POST['login_password']) && !empty($_POST['login_mail']) && !empty($_POST['login_password'])) { $data = getUserData($_POST['login_mail'], $db); if ($data !== false) { // create the password $typedPassword = hash('sha512', $_POST['login_password'] . $data['user_salt']); if ($typedPassword == $data['user_hash']) { // Fill Session $_SESSION['user_id'] = $data['user_id']; $_SESSION['user_mail'] = $_POST['login_mail']; $_SESSION['user_role'] = $data['user_role']; $_SESSION['user_status'] = $data['user_status']; if (empty($data['contact_name']) || empty($data['contact_street']) || empty($data['contact_zip']) || empty($data['contact_city'])) { $_SESSION['has_contact'] = false; } else { $_SESSION['has_contact'] = true; } updateLastLogin($_SESSION['user_id'], $db);
<?php $posts = getAllBlogPostVerified(); if ($posts) { foreach ($posts as $post) { $user = getUserData($post['created_by']); ?> <div class="content-block"> <div class="content-left-colm project-details"> <div class="post-photo"> <?php if (empty($post['thumbnail_img'])) { echo '<a href="blog.php?id=' . $post['post_id'] . '"><img src="' . SITE_URL . '/uploads/avatars/nophoto.jpg" alt="">'; //echo '<img src=' . SITE_URL . '/uploads/avatars/nophoto.jpg.' . ' alt="">'; echo '</a>'; } else { $photo = $post['thumbnail_img']; echo '<a href="blog.php?id=' . $post['post_id'] . '"><img src="' . SITE_URL . '/uploads/images/blogposts/' . $photo . '" alt=""></a>'; } ?> <div class="name-block"><?php echo 'Author: ' . ucwords($user['display_name']); ?> </div> </div> </div> <div class="post-title"><a href="blog.php?id=<?php echo $post['post_id']; ?> "><?php echo ucwords($post['title']);
$p1 = $arr['password']; // Password $bg = secureForDB($_POST['backgroundUrl']); if (isset($_POST['saveBackgroundUrl']) && $bg == "") { $sets = getUserData($user, "settings"); if (!$sets == "") { $sets = str_replace("BG:" . getUserSetting($user, "BG"), ""); } mysql_query("UPDATE users SET settings = '{$sets}' WHERE username = '******'"); } elseif (isset($_POST['saveBackgroundUrl']) && !$bg == "") { $sets = getUserData($user, "settings"); $sets = str_replace("BG:" . getUserSetting($user, "BG"), "BG:" . $bg . ";", $sets); mysql_query("UPDATE users SET settings = '{$sets}' WHERE username = '******'"); } if (remote_file_exists($bg) && strstr($bg, "http://")) { $sets = getUserData($user, "settings"); if ($sets == "") { mysql_query("UPDATE users SET settings = 'BG~{$bg};' WHERE username = '******'"); } else { mysql_query("UPDATE users SET settings = '{$sets};BG~{$bg};' WHERE username = '******'"); } } $confirmpass = secureString($_POST['currpass']); $pass = md5(secureForDB($_POST['pass'])); $email = secureForDB($_POST['email']); if (isset($_POST['cnfrm'])) { if (isset($confirmpass)) { if (md5($confirmpass) == $p1) { if ($pass != "") { // Change password mysql_query("UPDATE users SET password = '******' WHERE username = '******'");
<script language="javascript" src="<?php echo BASE_URL; ?> includes/libs/flot/jquery.flot.tickrotor.js" type="text/javascript"></script> <script src="../assets/js/app.min.js"></script> <script> jQuery.noConflict(); </script> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-75068109-1', 'auto'); ga('send', 'pageview'); ga('set', 'userId', {{<?php $data = getUserData($_SESSION['gebruiker_id']); echo $data['voornaam'] . " " . $data['tussenvoegsel'] . " " . $data['achternaam']; ?> }}); var dimensionValue = '<?php $data = getUserData($_SESSION['gebruiker_id']); echo $data['voornaam'] . " " . $data['tussenvoegsel'] . " " . $data['achternaam']; ?> '; ga('set', 'dimension1', dimensionValue); </script> </div> </body> </html>
<h5>Controlepaneel opties</h5> <p><i>Deze optie is nog niet voor jou beschikbaar</i></p> <input disabled="" class="button-primary" type="submit" value="Opslaan" name="userdatasubmit"> </div> <div class="element"> <h5>E-mail voorkeuren</h5> <p><i>Deze optie is nog niet voor jou beschikbaar</i></p> <input disabled="" class="button-primary" type="submit" value="Opslaan" name="userdatasubmit"> </div> </div> </form> </div> </div> <?php } else { $userdata = getUserData($_GET['id']); ?> <div class="container"> <div class="row"> <form method="post"> <div class="eight columns"> <div class="element"> <h5>Account gegevens</h5> <!-- The above form looks like this --> <div class="row"> <div class="six columns"> <label for="userdetails-name">Naam</label> <input class="u-full-width" type="text" placeholder="Uw naam" id="userdetails-name" name="meta_key[full_name]" value="<?php echo $userdata[14]; ?> ">
function getUserInfo($id) { $usr_info = mysql_fetch_object(listAll("user", "WHERE id = '{$id}'")); $descripcion = getUserData($id, "2"); $user_img = getUserData($id, "1"); $direccion = getUserData($id, "3"); $ciudad = getUserData($id, "10"); $cp = getUserData($id, "4"); $pais = getUserData($id, "5"); $telefono = getUserData($id, "6"); $movil = getUserData($id, "7"); $fb = getUserData($id, "8"); $tw = getUserData($id, "9"); $exp = getUserData($id, "14"); $cam = getUserData($id, "11"); $lentes = getUserData($id, "12"); $equip = getUserData($id, "13"); $cover = getUserData($id, "16"); $user_pago = getUserData($id, "17"); if ($usr_info->gender == "H") { $gender = "Hombre"; } else { $gender = "Mujer"; } $paisf = listAll("paises", "WHERE iso = '{$pais->description}'"); $rs_paisf = mysql_fetch_object($paisf); $user['id'] = $usr_info->id; $user['user_type'] = $usr_info->user_type; $user['email'] = $usr_info->user; $user['descripcion'] = $descripcion->description; $user['user_img'] = $user_img->description; $user["name"] = $usr_info->name; $user['lastname'] = $usr_info->lastname; $user['dob'] = dateSpanish($usr_info->dob); $user['sex'] = $gender; $user['act'] = $usr_info->act; $dob = explode("-", $usr_info->dob); $user['ano'] = $dob[0]; $user['mes'] = $dob[1]; $user['dia'] = $dob[2]; $user['direccion'] = $direccion->description; $user['ciudad'] = $ciudad->description; $user['cp'] = $cp->description; $user['pais'] = utf8_encode($rs_paisf->nombre); $user['pais_ab'] = utf8_encode($rs_paisf->iso); $user['telefono'] = $telefono->description; $user['movil'] = $movil->description; $user['fb'] = $fb->description; $user['tw'] = $tw->description; $user['exp'] = $exp->description; $user['cam'] = $cam->description; $user['lentes'] = $lentes->description; $user['equip'] = $equip->description; $user["act_code"] = $usr_info->act_code; $user['user_cover'] = $cover->description; $user['user_pago'] = $user_pago->description; return $user; }
function saveUserData($dbmysql) { $level = getLevel($dbmysql); // Benutzerdaten speichern $sql_stmt = "UPDATE user SET EMail='" . $_POST['f_email'] . "', " . "Usergroup='0', " . "Vorname='" . $_POST['f_vorname'] . "', " . "Name='" . $_POST['f_name'] . "', " . "Adresse='" . $_POST['f_adresse'] . "', " . "PLZ='" . $_POST['f_plz'] . "', " . "Ort='" . $_POST['f_ort'] . "', " . "Telefon='" . $_POST['f_telefon'] . "', " . "Level='" . $level . "', " . "Geburtsdatum=STR_TO_DATE('" . $_POST['f_geburtsdatum'] . "','%d.%m.%Y') " . "WHERE User_ID=" . $_SESSION['userid']; if ($resupd = $dbmysql->query($sql_stmt)) { getUserData($dbmysql); } }