function displayAdminControls($user) { if (!isset($user)) { $user = getSessionUser(); } if ($user->isAdmin()) { include "../views/adminButton.view.php"; } }
/** * Fonction vérifiant le password de l'admin. * @return bool : true si le password est bon, sinon false. */ function checkAdminPwd() { $userSession = getSessionUser(); $userMdpTest = new User(array("Mdp" => $_POST['mdpAdmin'])); $userMdpTest->setHashMdp(); if ($userSession->getDroit()[0]->getLibelle() and $userSession->getMdp() == $userMdpTest->getMdp()) { return true; } return false; }
function userHoldsRight($RightId, $SessionId) { global $Mysql; $UserId = getSessionUser($SessionId); $getUserRight = $Mysql->query("SELECT * FROM rights_assigned WHERE UserId='{$UserId}' AND RightId='{$RightId}'"); if ($getUserRight->num_rows == 0) { return false; } else { return true; } }
function printLogEntry($name, $gc, $type, $created, $log, $logId, $username, $logType, $difficulty, $terrain, $favorites, $finds, $country, $url, $sessionResults, $address, $district, $lat, $lon) { $type = determineTypeIcon($type); $difficulty = ratingToStars("D:", $difficulty); $terrain = ratingToStars("T:", $terrain); $district = districtToImage($country, $district); $country = countryToImage($country); $logType = determineLogTypeIcon($logType); $ratio = findsToRatio($finds, $favorites); $favorites = favoritesToHearts($favorites); $images = DB::queryFirstColumn("SELECT\n url\n FROM\n image\n WHERE\n image.log = %i", $logId); if (isset($lat) && isset($lon)) { $address = "<a href='http://maps.google.com/maps?q={$lat},{$lon}'>{$address}</a>"; } if (substr($created, 0, 10) == date('d.m.Y')) { echo "<div class='panel panel-primary'>"; } else { echo "<div class='panel panel-info'>"; } $favoritesRatio = ""; if ($favorites != "" && $ratio != "") { $favoritesRatio = "({$favorites} {$ratio})"; } if ($type != "") { echo "<div class='panel-heading'><a href='{$url}'><b>{$name}</b></a> <img src='res/icons/{$type}' width='20px' /> {$difficulty} {$terrain} {$favoritesRatio} {$country} {$district} {$address}</div>"; } else { echo "<div class='panel-heading'><b>{$name}</b></div>"; } echo "<div class='panel-body'>{$log}"; if (!empty($images)) { foreach ($images as $image) { echo '<img class="img-rounded img-padding" src="' . $image . '" />'; } } echo "</div>"; $urlencodedUsername = urlencode($username); if (in_array($gc, $sessionResults) && $username != getSessionUser()) { echo "<div class='panel-footer'><a class='u' href='index.php?username={$urlencodedUsername}'>{$username}</a> {$logType} {$created} (You <i class='fa fa-thumbs-up'></i> this one too.)</div>"; } else { echo "<div class='panel-footer'><a class='u' href='index.php?username={$urlencodedUsername}'>{$username}</a> {$logType} {$created}</div>"; } echo "</div>"; }
function editProfil() { $user = getSessionUser(); ?> <form class="form-horizontal" action="profil.page.php?to=edit" method="post"> <div class="form-group"> <label class="control-label col-sm-3" for="userName">Changement de pseudo:</label> <div class="col-sm-6"> <input type="text" class="form-control" id="userName" name="userName" value="<?php echo $user->getUserName(); ?> " placeholder="Votre pseudo"> </div> </div> <div class="form-group"> <label class="control-label col-sm-3" for="userName">Changement d'adresse mail:</label> <div class="col-sm-6"> <input type="email" class="form-control" id="email" name="email" value="<?php echo $user->getEmail(); ?> " placeholder="Votre email"> </div> </div> <div class="form-group"> <label class="control-label col-sm-3" for="Mdp">Changement de mot de passe:</label> <div class="col-sm-6"> <input type="password" class="form-control" id="Mdp" name="Mdp" placeholder="Entrez votre mot de passe"> </div> </div> <div class="form-group"> <label class="control-label col-sm-3" for="MdpBis">Réentrez votre changement de mot de passe :</label> <div class="col-sm-6"> <input type="password" class="form-control" id="MdpBis" name="MdpBis" placeholder="Réentrez votre mot de passe"> </div> </div> <div class="form-group"> <label class="control-label col-sm-3" for="Tel">Changer de numéro de téléphone:</label> <div class="col-sm-6"> <input type="text" class="form-control" id="Tel" name="Tel" value="<?php echo $user->getTel(); ?> " placeholder="Entrez votre numéro de téléphone"> </div> </div> <div class="form-group"> <div class="col-sm-offset-3 col-sm-10"> <div class="checkbox"> <label> <input type="checkbox" id="Private" name="Private" value="1" <?php if ($user->getIsPrivate() == 1) { ?> checked<?php } ?> >S'afficher en public </label> </div> </div> </div> <div class="form-group"> <label class="control-label col-sm-3" for="MdpActuel">Entrez votre mot de passe actuel : (obligatoire pour le changement) </label> <div class="col-sm-6"> <input type="password" class="form-control" id="MdpActuel" name="MdpActuel" placeholder="Entrez votre mot de passe actuel" required> </div> </div> <div class="form-group"> <div class="col-sm-offset-3 col-sm-6"> <button type="submit" class="btn-block btn-primary btn-lg" name="formulaire" id="formulaire">Soumettre</button> </div> </div> </form> <?php }
public function changeownpass() { if (isStudent()) { $this->kickOut(); } if ($_POST) { $this->form_validation->set_rules('password1', 'New Password', 'trim|required|xss_clean'); $this->form_validation->set_rules('password', 'Confirm Password', 'trim|required|xss_clean'); } if ($this->form_validation->run() == FALSE) { $errors = validation_errors(); if (!empty($errors)) { addError($errors); } } else { $username = getSessionUser(); $result = $this->users->changePassword($username, $this->input->post('password')); if ($result) { addSuccess(getTxt('CongratulationsChangedPassword') . " " . $username); } else { addError(getTxt('ProcessingError')); } } //List of CSS to pass to this view $data = $this->StyleData; $this->load->view('users/change_yourpassword', $data); }
$_SESSION['error'] = "Sign in!"; header('Location: form.php'); die; } $user = $_SESSION['username']; $user_id = $_SESSION['user_id']; if (!getSessionUser($user, $user_id)) { session_destroy(); header('Location: form.php'); die; } /* MESSAGE POST-IT */ print '<div id="post_it"></div>'; require_once 'request.php'; /* DEFINE VARS */ $sess = getSessionUser($user, $user_id); $get = getUser($user); $post = getAllPosts(); $profile = 'all'; $fulltag = ''; /* WHICH POSTS TO SHOW*/ if (isset($_GET['profile'])) { $profile = preg_replace("/[^a-zA-Z0-9@#]/", "", $_GET['profile']); if ($profile == 'all') { $post = getAllPosts(); } elseif ($profile == 'at' . $sess['username']) { $post = findAt($sess['username']); } elseif (!$profile == getUser($profile)) { print '<div class="post_it"><h3>'; print "There's no user with that name..."; print '</h3><button type="button" id="hide_btn" class="button">close</button></div>';
exit; } $userid = $result['userid']; $op = $result['op']; $task = $op['single_task']; if ($task['completed'] == 1) { header('location: index.php'); exit; } $sid = createNewSessionByUserid($userid); if (is_null($sid)) { header('location: index.php'); exit; } setcookie('sid', $sid, time() + 365 * 24 * 60 * 60); $user = getSessionUser($sid); if (is_null($user)) { setcookie('sid', '', time() - 3600); header('Location: index.php'); exit; } $css = array('home.css', 'task-completed.css'); include 'common/header.php'; include 'lib/op-with-tasks-view.php'; ?> <div class="container sections-wrapper"><div class="row"><div class="col-md-6 col-md-offset-3 col-sm-12"> <h2>Problem Reported!</h2> <p>The problem completing this task has been reported. <br/><br/>
<div class='panel-heading'>No geocaches with location data found</div> <div class='panel-body'>None of the geocaches you have found contain location data. Upload your finds <a href="upload.php">here</a>.</div> </div> </div> <div id="map" hidden="hidden"></div> <?php if (isEmbedded()) { ?> <script type="text/javascript"> $('#map').height($(window).height()); addStationsFromDb(<?php echo "'" . getSessionUser() . "'"; ?> ); </script> <?php } else { ?> <script type="text/javascript"> $('#map').height($(window).height() - 50); addStationsFromDb(<?php echo "'" . getSessionUser() . "'"; ?> ); </script> <?php } ?> </body> </html>
return: { 'status': 'success' // 'fail', 'nologin', 'missingdata', 'missingfield' } */ function finishWith($status, $sid = NULL) { exit(json_encode(array('status' => $status))); } if (!isset($_COOKIE["sid"])) { finishWith('nologin'); } include '../lib/db.php'; include '../lib/op-with-tasks-view.php'; init_db(); $user = getSessionUser($_COOKIE["sid"]); if (is_null($user)) { setcookie('sid', '', time() - 3600); finishWith('nologin'); } if (!isset($_POST['opid'])) { finishWith('missingopid'); } $opid = intval($_POST['opid']); $op = getOperationById($opid); $op_part_data = NULL; if (!is_null($op['data'])) { if (!isset($_POST['data'])) { finishWith('missingdata'); } $indata = json_decode($_POST['data']);
<meta name="mobile-web-app-capable" content="yes"> <link rel="apple-touch-icon" href="img/logo_icon.png"/> <link rel="apple-touch-icon-precomposed" href="img/logo_icon.png"/> <link rel="icon" sizes="192x192" href="img/logo_icon.png"> <link rel="icon" sizes="128x128" href="img/logo_icon.png"> <link rel="shortcut icon" type="image/png" href="/favicon.png"/> <link rel="stylesheet" href="css/foundation.css" /> <link rel="stylesheet" href="css/plantyCustom.css" /> <link rel="manifest" href="manifest.json"> <script src="js/vendor/modernizr.js"></script> <script src="js/planty.js"></script> <link rel="stylesheet" href="css/plantyCustom.css" /> </head> <body> <?php $user = getUser(getSessionUser()); ?> <div class="row"> <div class="large-12 columns"> <div class="row"> <div class="large-12 columns headerFix"> <nav class="top-bar" data-topbar> <ul class="title-area"> <li class="name"> <a href="index.php" alt="Planty"><img src="/img/logo_text.png" class="logoText"/></a> </li> <li class="toggle-topbar menu-icon"><a href="#" class="welcomeText">Welcome, <span><?php echo $user->name; ?>
$november = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $december = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $year = array(); $year[0] = $january; $year[1] = $february; $year[2] = $march; $year[3] = $april; $year[4] = $may; $year[5] = $june; $year[6] = $july; $year[7] = $august; $year[8] = $september; $year[9] = $october; $year[10] = $november; $year[11] = $december; $results = DB::query("SELECT DISTINCT\n month(log.created) as 'month',\n day(log.created) as 'day'\n FROM\n geocache, log, logtype, user, type\n WHERE\n geocache.id = log.geocache AND\n log.user = user.id AND\n type.id = geocache.type AND\n log.type = logtype.id AND\n (logtype.type = 'Found it' OR logtype.type = 'Attended' OR logtype.type = 'Webcam Photo Taken') AND\n user.username = %s\n ORDER BY\n log.created DESC,\n log.id DESC", getSessionUser()); $total = 0; foreach ($results as $row) { $month = $row['month'] - 1; $day = $row['day'] - 1; $year[$month][$day] = 1; $total++; } function printMonth($month) { foreach ($month as $day) { if ($day == '1') { echo '<td style="background-color: #D0F5A9;"><i class="fa fa-calendar-check-o"></i></td>'; } else { echo '<td style="background-color: #F5D0A9;"><i class="fa fa-calendar-minus-o"></i></td>'; }
echo "<tr>\n\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t<td><a href=\"index.php?a=30&b=2&idstatut=2&idsession=" . $idsession . "&iduser="******"id_user"] . "\"><button type=\"button\" class=\"btn bg-purple sm\" title=\"Mettre en liste d'attente\"><i class=\"fa fa-repeat\"></i></button></a></td>\n\t\t\t\t\t\t\t\t<td>" . $row["nom_user"] . " " . $row["prenom_user"] . "</td>\n\t\t\t\t\t\t\t\t<td>" . $affichage . "</td>\n </tr>"; } } ?> </tbody></table> <?php } } } ?> </div> </div> <?php // liste des user en liste d'attente $result = getSessionUser($idsession, 2); $nb = mysqli_num_rows($result); if ($nb > 0) { ?> <div class="box box-success"><div class="box-header"><h3 class="box-title">Liste des participants en liste d'attente <small class="badge bg-blue" data-toggle="tooltip" title="Classement par ordre d'arrivée, du plus ancien au plus récent"><i class="fa fa-info"></i></small></h3></div> <div class="box-body"><table class="table"> <thead> <th></th> <th>Nom, prenom</th> <!--<th>autres inscriptions (pdf)</th>--> </thead><tbody> <?php for ($i = 1; $i <= $nb; $i++) {
<?php require_once dirname(__FILE__) . "/settings.php"; require_once dirname(__FILE__) . "/lang/" . $langauge . ".php"; require_once dirname(__FILE__) . "/funcs.general.php"; require_once dirname(__FILE__) . "/class.RCAPI.php"; require_once dirname(__FILE__) . "/class.redcapAuth.php"; require_once dirname(__FILE__) . "/class.redcapportaluser.php"; require_once dirname(__FILE__) . "/class.mail.php"; require_once dirname(__FILE__) . "/class.htmlpage.php"; $PAGE = basename($_SERVER["SCRIPT_FILENAME"]); $start_time = microtime(true); // $end_time = microtime(true) - $start_time; //measure script time /* Start Session and determine if we are authenticated Authenticated means user+pass has matched, but does NOT mean the account is active */ session_start(); $loggedInUser = getSessionUser(); if (!empty($loggedInUser)) { // Check for logout if (isset($_GET['logout']) && $_GET['logout'] == 1) { logout("Goodbye!"); } }
<?php session_start(); include 'globalfunctions.php'; $SessionId = $_POST['CLICKA_currentSessionId']; $CurrentUserId = getSessionUser($SessionId); $FormId = getSessionVar($SessionId, "currentlySelectedForm"); $getForm = $Mysql->query("SELECT * FROM forms WHERE Id='{$FormId}'"); $rsForm = $getForm->fetch_assoc(); $BackgroundColour = $rsForm['BackgroundColour']; $FormBackground = $rsForm['FormBackground']; $getFormInputs = $Mysql->query("SELECT * FROM forms_inputs WHERE FormId='{$FormId}' ORDER BY SortNum ASC"); ?> <script type="text/javascript"> function scriptLoaded() { $('#formChosen').modal('hide'); document.getElementById('topbartext').innerHTML = "<button type=\"button\" class=\"btn btn-warning\" onclick=\"exitFormEntry()\" style=\"height:20px;padding-top:0px;\">Exit</button> Fill Out: <?php echo $rsForm['FormName']; ?> " document.getElementById('sidenav').style.display="none" document.body.style.backgroundColor = "#<?php echo $BackgroundColour; ?> "; document.getElementById('page-wrapper').style.marginLeft="0px" document.getElementById('page-wrapper').style.backgroundColor="#<?php echo $BackgroundColour;
/** * Created by PhpStorm. * User: Flavian Ovyn * Date: 15/10/2015 * Time: 15:24 */ require "../Library/constante.lib.php"; require "../Library/Fonctions/Fonctions.php"; initRequire(); initRequireEntityManager(); require "../Form/administration.form.php"; require "../Library/Page/administration.lib.php"; require "../Manager/User_ActivityManager.manager.php"; $configIni = getConfigFile(); startSession(); $user = getSessionUser(); $isConnect = isConnect(); if (!$isConnect or $user->getDroit()[0]->getLibelle() != "Administrateur") { header("Location:../"); } ?> <!doctype html> <html lang="fr"> <head> <meta charset="UTF-8"> <title>Administration</title> <link rel="icon" type="image/png" href="../Images/favicon.png" /> <link rel="stylesheet" type="text/css" href="../vendor/twitter/bootstrap/dist/css/bootstrap.css"> <link rel="stylesheet" type="text/css" href="../Style/general.css">
</dd></dl> </div> <div class="box-footer"> <a href="index.php?a=30&b=1&idsession=<?php echo $idsession; ?> "><button class="btn btn-default" type="submit"> <i class="fa fa-arrow-circle-left"></i> Retour aux inscriptions</button></a></div> </div></div> <!-- Fin DETAIL DE L'ATELIER--> <div class="col-lg-7"> <?php // liste des user inscrit a un atelier if ($act == 0) { $result2 = getSessionUser($idsession, $statutdatesession); } elseif ($act == 1) { $result2 = getSessionValidpresences($idsession, $iddate); } $nb = mysqli_num_rows($result2); if ($nb > 0) { ?> <form method="post" action="<?php echo $action; ?> "> <div class="box box-success"><div class="box-header"><h3 class="box-title">Liste des participants à cet session</h3></div> <div class="box-body"> <table class="table"> <thead><tr>
/** * *根据缓存用户名 获取用户权限 */ function getUserPower() { $loginName = getSessionUser(); $sql = "SELECT `user_power`,`login_name` FROM `tb_users` WHERE `login_name` = '" . $loginName . "'"; $result = mysql_query($sql, connectDB()); if (!is_bool($result)) { //存在数据 $user_power = mysql_fetch_array($result, MYSQL_ASSOC); return $user_power; } else { //不存在数据 返回 0 return NULL; } }
<div class="form-group"> <input class="form-control" name="username" placeholder="Username"> </div> </form> </div> </div> <?php } if (isset($_GET['username']) && $_GET['username'] != '' || getSessionUser() != "") { if (isset($_GET['username']) && $_GET['username'] != '') { $username = urldecode($_GET['username']); } else { $username = getSessionUser(); } if (getSessionUser() != "") { $sessionResults = DB::queryFirstColumn("SELECT\n geocache.gc\n FROM\n geocache, log, logtype, user, type\n WHERE\n geocache.id = log.geocache AND\n log.user = user.id AND\n type.id = geocache.type AND\n log.type = logtype.id AND\n logtype.type = 'Found it' AND\n user.username = %s AND\n month(curdate()) = month(created) AND\n day(curdate()) = day(created) AND\n year(curdate()) != year(created)\n ORDER BY\n log.created DESC,\n log.id DESC", getSessionUser()); } else { $sessionResults = array(); } $finds = DB::queryFirstField("SELECT finds FROM user WHERE username = %s", $username); echo "<div class='panel panel-info'>"; $month = date('m'); $day = date('d'); echo "<div class='panel-heading'>On this day of <b>{$username}</b> ({$finds})</div>"; echo "</div>"; } else { echo "<div class='panel panel-info'>"; $month = date('m'); $day = date('d'); echo "<div class='panel-heading'>On this day of all indexed users</div>"; echo "</div>";
</form> </div> </div> <div class='panel panel-info'> <div class='panel-heading'>Remove user from feed</div> <div class='panel-body'> <form class="form-inline"> <div class="form-group"> <div class="dropdown"> <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> Remove user <span class="caret"></span> </button> <ul class="dropdown-menu"> <?php $users = DB::queryFirstColumn("SELECT\n u2.username\n FROM\n user u1, feed, user u2\n WHERE\n feed.user = u1.id AND\n u1.username = %s AND\n u2.id = feed.feeduser", getSessionUser()); foreach ($users as $user) { echo '<li><a href="?removeUser='******'">' . $user . '</a></li>'; } ?> </ul> </div> </div> </form> </div> </div> </div> <script type="text/javascript">geolookup();</script> </body> </html>
<?php if (getSessionUser() == "") { header("Location: notLoggedIn.php"); }
$sql4 = "insert into tb_log(`iRequireId`,`sDesc`,`dtTime`,`sHandler`) values('{$data['require_id']}','{$sql}',NOW(),'{$user}')"; $stmt = $db->prepare($sql4); $stmt->execute(); $db = null; echo '{"require":' . json_encode($req_data2) . '}'; elog("sql = " . $sql); elog(" put require id " . $id . " success. msg = " . json_encode($req_data2)); } catch (PDOException $e) { echo '{"error":{"text":"' . $e->getMessage() . '"}}'; elog(" put require id " . $id . " error. data = " . json_encode($req_data2) . " msg = " . $e->getMessage(), 'error'); } }); $app->put('/del/require/:id', function ($id) use($app) { $data['word'] = ''; $data = $app->request()->put(); $loginName = getSessionUser(); $sql = "UPDATE `tb_require` SET `is_del` = '1', `require_del_user` = '" . $loginName . "', `require_del_reason` = '" . $data['word'] . "' WHERE `require_id` = " . $id; $sql2 = "UPDATE `tb_attribute` SET `att_is_del` = '1' WHERE `att_require_id` =" . $id; try { $db = getConnection(); $stmt = $db->prepare($sql); $stmt->execute(); //删除记录 $stmt = $db->prepare($sql2); $stmt->execute(); $db = null; echo '{"require":{"require_id":' . $id . '}}'; elog(" delete require id " . $id . " success. msg = require_id:" . $id); } catch (PDOException $e) { echo '{"error":{"text":"' . $e->getMessage() . '"}}'; elog(" delete require id " . $id . " error. msg = " . $e->getMessage(), 'error');
<div id="map" hidden="hidden"></div> <script type="text/javascript"> $('#map').height(500); addRecentStationsFromDb(<?php echo "'" . $username . "'"; ?> ); </script> </div> </div> <?php } $results = DB::query("SELECT\n geocache.name,\n geocache.gc,\n geocache.difficulty,\n geocache.terrain,\n geocache.favorites,\n geocache.finds,\n geocache.country,\n geocache.url,\n geocache.address,\n geocache.lat,\n geocache.lon,\n geocache.district,\n type.type AS type_type,\n log.created,\n DATE_FORMAT(log.created, '%d.%m.%Y') AS created_display,\n logtype.type,\n log.log,\n log.id AS id,\n user.username,\n user.id AS 'user.id'\n FROM\n geocache, log, logtype, user, type\n WHERE\n geocache.id = log.geocache AND\n log.user = user.id AND\n type.id = geocache.type AND\n log.type = logtype.id AND\n user.username LIKE '" . $username . "'\n ORDER BY\n created DESC,\n id DESC"); if (getSessionUser() != "") { $feedUserIds = DB::queryFirstColumn("SELECT\n feed.feeduser\n FROM\n user, feed\n WHERE\n user.id = feed.user AND\n user.username = %s", getSessionUser()); $sessionResults = DB::queryFirstColumn("SELECT\n geocache.gc\n FROM\n geocache, log, logtype, user, type\n WHERE\n geocache.id = log.geocache AND\n log.user = user.id AND\n type.id = geocache.type AND\n log.type = logtype.id AND\n (logtype.type = 'Found it' OR logtype.type = 'Attended' OR logtype.type = 'Webcam Photo Taken') AND\n user.username = %s", getSessionUser()); $found = false; foreach ($results as $row) { if (in_array($row['user.id'], $feedUserIds)) { $found = true; $name = $row['name']; $gc = $row['gc']; $created = $row['created_display']; $log = str_replace("/images/icons/", "https://www.geocaching.com/images/icons/", $row['log']); $logId = $row['id']; $username = $row['username']; $type = $row['type_type']; $difficulty = $row['difficulty']; $terrain = $row['terrain']; $country = $row['country']; $favorites = $row['favorites'];
<?php /** * Created by PhpStorm. * User: Flavian Ovyn * Date: 13/10/2015 * Time: 14:38 */ $page = getCurrentPage(); $userSession = getSessionUser(); $isIndex = ($page == '' or $page == "index"); ob_start(); ?> <nav class="navbar navbar-default navbar-fixed-top"> <div class="navbar-header col-lg-2 col-md-2 text-left"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <?php if ($isIndex) { $lien = "index.php"; $img = "Images/logo.png"; } else { $lien = "../index.php"; $img = "../Images/logo.png"; } echo "<img class='menulogo' src='{$img}' height='35px' width='35px' alt='logo' /><a class='navbar-brand' href='{$lien}'>EveryDayIdea</a>"; ?> </div>
?> <div class='panel panel-info'> <div class='panel-heading'>Empty feed</div> <div class='panel-body'>Your feed is empty, how about adding some users users <a href="settings.php">here</a>?</div> </div> <?php } ?> </div> </div> </div> </div> </div> <script> var username = "******"; $.getJSON("chartapi.php?data=thisYearData&username="******"chartapi.php?data=lastYearData&username="******"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], datasets : [ { fillColor : "rgba(220,220,220,0.5)", strokeColor : "rgba(220,220,220,0.8)", highlightFill: "rgba(220,220,220,0.75)", highlightStroke: "rgba(220,220,220,1)", data : lastYearData },
?> ">Reabrir Processo</a></li> </ul> </li> </ul> <ul class="nav navbar-nav navbar-right"> <li><a href="<?php echo site_url('processo/abrirConsulta'); ?> ">Consulta Processo</a></li> <li ><a href="<?php echo site_url('/usuario/'); ?> ">Cadastro Usuário<span class="sr-only">(current)</span></a></li> <li class="active"><a href="" data-toggle="modal" data-target="#sair" ><?php echo getSessionUser() == NULL ? 'Login' : 'Sair'; ?> <span class="sr-only">(current)</span></a></li> </ul> </div><!--/.nav-collapse --> </div> </nav> <br/> <div class="container"> <?php if ($this->session->flashdata("success")) { ?>
include "./Menu/menuGeneral.lib.php"; ?> </header> <div class="col-md-2 clearfix" id="sub-menu-left"> </div> <section class="col-lg-8 jumbotron"> <h1> <img class="jumbotitre" src="Images/bannieres/accueil.png" alt="logo" id='image-media'></h1> <p class="jumbotexte"> <?php if ($isConnect) { ?> Bienvenu(e) <?php echo getSessionUser()->getUserName(); ?> sur le site de EveryDayIdea <?php } else { ?> Bienvenu(e) sur le site de EveryDayIdea <?php } ?> </p> </section> <div class="col-lg-12"> <section class="row">
function earnPoints($plant) { $sql = "UPDATE users SET points=(points+:points) WHERE userID=:userID"; try { $creationDate = time(); $dbCon = getConnection(); $stmt = $dbCon->prepare($sql); $stmt->bindParam("points", $plant->points); $stmt->bindParam("userID", getSessionUser()); $stmt->execute(); } catch (PDOException $e) { echo '{"error":{"text":' . $e->getMessage() . '}}'; } }