<?php session_start(); require_once 'classes/class.user.php'; $user_home = new USER(); include_once "bill.php"; include_once "pdfDB.php"; if (!$user_home->is_logged_in()) { $user_home->redirect('index.php'); } $stmt = $user_home->runQuery("SELECT * FROM users WHERE id=:uid"); $stmt->execute(array(":uid" => $_SESSION['userSession'])); $row = $stmt->fetch(PDO::FETCH_ASSOC); if (isset($_POST['btnpdf'])) { $year = $_POST['year']; $month = $_POST['month']; $supcode = $_POST['supcode']; $unformateddate = $year . "-" . $month; if (!empty($_POST['supcode'])) { PDF::createAPDF($supcode, $unformateddate); } else { PDF::createAllPDF($unformateddate); } } ?> <!DOCTYPE html> <html> <title>Suppliers</title> <?php include "include/head.php"; ?>
<?php session_start(); require_once 'classes/class.user.php'; $user_home = new USER(); if (!$user_home->is_logged_in()) { echo ""; } if (!empty($_POST["supcode"])) { $uname = $_POST["supcode"]; $s = $user_home->runQuery("SELECT * FROM suppliers WHERE supplier_code= :uname"); $s->execute(array(":uname" => $uname)); $userRow = $s->fetch(PDO::FETCH_ASSOC); if ($s->rowCount() == 1) { echo "<span class='status-not-available'> Supplier code Not Available.</span>"; } else { echo "<span class='status-available'> Supplier code is Available.</span>"; } } if (!empty($_POST["username"])) { $uname = $_POST["username"]; $s = $user_home->runQuery("SELECT * FROM users WHERE username= :uname"); $s->execute(array(":uname" => $uname)); $userRow = $s->fetch(PDO::FETCH_ASSOC); if ($s->rowCount() == 1) { echo "<span class='status-not-available'> Username Not Available.</span>"; } // else{ // echo "<span class='status-available'> Username is Available.</span>"; // } }
<?php session_start(); require_once 'class.user.php'; $user = new USER(); if ($user->is_logged_in() != "") { $user->redirect('home.php'); } if (isset($_POST['btn-submit'])) { $email = $_POST['txtemail']; $stmt = $user->runQuery("SELECT userID FROM tbl_users WHERE userEmail=:email LIMIT 1"); $stmt->execute(array(":email" => $email)); $row = $stmt->fetch(PDO::FETCH_ASSOC); if ($stmt->rowCount() == 1) { $id = base64_encode($row['userID']); $code = md5(uniqid(rand())); $stmt = $user->runQuery("UPDATE tbl_users SET tokenCode=:token WHERE userEmail=:email"); $stmt->execute(array(":token" => $code, "email" => $email)); $message = "\n\t\t\t\t Hello , {$email}\n\t\t\t\t <br /><br />\n\t\t\t\t We got requested to reset your password, if you did this then just click the following link to reset your password, if not just ignore this email,\n\t\t\t\t <br /><br />\n\t\t\t\t Click the Following Link To Reset Your Password \n\t\t\t\t <br /><br />\n\t\t\t\t <a href='http://localhost/event_management/resetpass.php?id={$id}&code={$code}'>click here to reset your password</a>\n\n\t\t\t\t <br /><br />\n\t\t\t\t thank you :)\n\t\t\t\t "; $subject = "Password Reset"; $user->send_mail($email, $message, $subject); $msg = "<div class='alert alert-success'>\n\t\t\t\t\t<button class='close' data-dismiss='alert'>×</button>\n\t\t\t\t\tWe've sent an email to {$email}.\n Please click on the password reset link in the email to generate new password. \n\t\t\t \t</div>"; } else { $msg = "<div class='alert alert-danger'>\n\t\t\t\t\t<button class='close' data-dismiss='alert'>×</button>\n\t\t\t\t\t<strong>Sorry!</strong> this email not found. \n\t\t\t </div>"; } } ?> <!DOCTYPE html> <html> <head>
<?php session_start(); require_once 'classes/class.user.php'; $user = new USER(); $code = '0001'; $sql = "SELECT * FROM `suppliers` WHERE supplier_code = {$code}"; $getdata = $user->runQuery($sql); $getdata->execute(); if (!empty($code)) { if ($getdata->rowCount() > 0) { while ($row = $getdata->FETCH(PDO::FETCH_ASSOC)) { $name = $row['f_name'] . " " . $row['l_name']; $addr = $row['address_1']; $mobile = $row['mobile_no']; $email = $row['e_mail']; } } } ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Tsms | Details view</title> <!-- Tell the browser to be responsive to screen width --> <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"> <!-- Bootstrap 3.3.5 --> <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css"> <!-- Font Awesome -->
<?php require_once 'classes/class.user.php'; $user = new USER(); if (empty($_GET['id']) && empty($_GET['code'])) { $user->redirect('index.php'); } if (isset($_GET['id']) && isset($_GET['code'])) { $id = base64_decode($_GET['id']); $code = $_GET['code']; $stmt = $user->runQuery("SELECT * FROM users WHERE id=:uid AND token_Code=:token"); $stmt->execute(array(":uid" => $id, ":token" => $code)); $rows = $stmt->fetch(PDO::FETCH_ASSOC); if ($stmt->rowCount() == 1) { if (isset($_POST['btn-reset-pass'])) { $pass = $_POST['pass']; $cpass = $_POST['confirm-pass']; if ($cpass !== $pass) { $msg = '<div class="callout callout-warning"> <h4>Sorry!</h4> <p>Password Does not match.</p> </div>'; } else { $password = md5($cpass); $stmt = $user->runQuery("UPDATE users SET password=:upass WHERE id=:uid"); $stmt->execute(array(":upass" => $password, ":uid" => $rows['id'])); $msg = "<div class='alert alert-success'>\n <button class='close' data-dismiss='alert'>×</button>\n Password Changed.\n </div>"; header("refresh:5;index.php"); } } } else {
<?php require_once "../librairies/user.php"; $auth_user = new USER(); $stmt = $auth_user->runQuery("SELECT * FROM user ORDER BY login"); $stmt->execute(); $utilisateurs = $stmt->fetchAll(); if (isset($_POST['btn-edit'])) { $uname = strip_tags($_POST['ulogin']); $upass = strip_tags($_POST['upassword']); if ($upass == "") { $error[] = "Il manque le mot de passe !"; } else { if (strlen($upass) < 6) { $error[] = "Le mot de passe doit au moins contenir 6 caractères"; } else { try { if ($auth_user->updateUser($uname, $upass)) { $auth_user->redirect('editUser.php?joined'); } } catch (PDOException $e) { echo $e->getMessage(); } } } } ?> <!DOCTYPE> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<?php session_start(); require_once '../php-assets/class.user.php'; $user = new USER(); if ($user->is_loggedin() != "") { $user->redirect('advert-overview.php'); } if (isset($_POST['register-button'])) { $user_first_name = strip_tags(htmlentities($_POST['user-first-name'], ENT_COMPAT, 'UTF-8')); $user_last_name = strip_tags(htmlentities($_POST['user-last-name'], ENT_COMPAT, 'UTF-8')); $user_email = strip_tags($_POST['user-email']); $user_password = strip_tags($_POST['user-password']); try { $stmt = $user->runQuery("SELECT user_firstname, user_email FROM tbl_user WHERE user_firstname=:user_first_name OR user_email=:user_email"); $stmt->execute(array(':user_first_name' => $user_first_name, ':user_email' => $user_email)); $row = $stmt->fetch(PDO::FETCH_ASSOC); if ($row['user_email'] == $user_email) { $error[] = "Er is al een account aangemaakt met dit e-mail adres."; } else { if ($user->register($user_first_name, $user_last_name, $user_email, $user_password)) { $user->doLogin($user_email, $user_password); $user->redirect('advert-overview.php'); } } } catch (PDOException $e) { echo $e->getMessage(); } } ?> <!doctype html>
<?php session_start(); require_once 'classes/class.user.php'; $user_home = new USER(); require_once 'DB/dbupdates.php'; $dbupdates = new DBupdates(); if (!$user_home->is_logged_in()) { $user_home->redirect('index.php'); } $stmt = $user_home->runQuery("SELECT * FROM users WHERE id=:uid"); $stmt->execute(array(":uid" => $_SESSION['userSession'])); $row = $stmt->fetch(PDO::FETCH_ASSOC); $code = ""; $supname = ""; $supnic = ""; $apptearate = ""; $suppkgs = ""; $totincome = ""; $paid = ""; $remainbalance = ""; $formateddate = date('Y-m-d'); if (isset($_POST['search'])) { $code = $_POST['code']; if ($dbupdates->checkSupplierExist($code) == true) { $supname = $dbupdates->getSupplierName($code); $supnic = $dbupdates->getMyNIC($code); $apptearate = $dbupdates->thisMonthTeaRate(); $kgs1 = $dbupdates->getTodayMySupply($code); $kgs2 = $dbupdates->myTotalSupplyOfaMonth($code, $formateddate); $pay1 = $dbupdates->thisMonthPayForMe($code);
<!-- Main Header --> <header class="main-header"> <?php require_once 'classes/class.user.php'; $user_home = new USER(); $list = "SELECT message_id FROM message_temp WHERE date=CURDATE() AND approve=0"; $getdata = $user_home->runQuery($list); $getdata->execute(); $res1 = 0; if ($getdata->rowCount() > 0) { while ($data = $getdata->FETCH(PDO::FETCH_ASSOC)) { $res1 = $res1 + 1; } } $list = "SELECT supplier_code FROM today_supply WHERE date=CURDATE()"; $getdata = $user_home->runQuery($list); $getdata->execute(); $res2 = 0; if ($getdata->rowCount() > 0) { while ($data = $getdata->FETCH(PDO::FETCH_ASSOC)) { $res2 = $res2 + 1; } } ?> <!-- Logo --> <a href="home.php" class="logo"> <!-- mini logo for sidebar mini 50x50 pixels --> <span class="logo-mini"><b>T</b>SMS</span> <!-- logo for regular state and mobile devices --> <span class="logo-lg"><img src="dist/logo.png"></span> </a>
<?php session_start(); require_once 'classes/class.user.php'; $user_home = new USER(); require_once 'DB/dbupdates.php'; $dbupdates = new DBupdates(); if (!$user_home->is_logged_in()) { $user_home->redirect('index.php'); } $stmt = $user_home->runQuery("SELECT * FROM users WHERE id=:uid"); $stmt->execute(array(":uid" => $_SESSION['userSession'])); $row = $stmt->fetch(PDO::FETCH_ASSOC); ?> <!DOCTYPE html> <html> <title>Daily Update</title> <?php include "include/head.php"; ?> <script type="text/javascript" src="plugins/alert/dist/jquery-1.11.3.min.js"></script> <script type="text/javascript" src="plugins/alert/dist/sweetalert.min.js"></script> <script type="text/javascript" src="plugins/alert/dist/sweetalert-dev.js"></script> <script type="text/javascript"> // $(function(){ // swal("Sweet Alert hureeeeee!"); // }); </script> <?php
if (isset($_POST['uadmin'])) { $ustatut = 1; } else { $ustatut = 0; } if ($uname == "") { $error[] = "Il manque le nom d'utilisateur !"; } else { if ($upass == "") { $error[] = "Il manque le mot de passe !"; } else { if (strlen($upass) < 6) { $error[] = "Le mot de passe doit au moins contenir 6 caractères"; } else { try { $stmt = $user->runQuery("SELECT login FROM user WHERE login=:uname"); $stmt->execute(array(':uname' => $uname)); $row = $stmt->fetch(PDO::FETCH_ASSOC); if ($row['login'] == $uname) { $error[] = "Le nom d'utilisateur existe déjà !"; } else { if ($user->enregistrerUser($uname, $upass, $ustatut)) { $user->redirect('creerUser.php?joined'); } } } catch (PDOException $e) { echo $e->getMessage(); } } } }
<?php session_start(); require_once 'classes/class.user.php'; $user_home = new USER(); if (!$user_home->is_logged_in()) { $user_home->redirect('index.php'); } $stmt = $user_home->runQuery("SELECT * FROM users WHERE id=:uid"); $stmt->execute(array(":uid" => $_SESSION['userSession'])); $row = $stmt->fetch(PDO::FETCH_ASSOC); ?> <!DOCTYPE html> <html> <title>View Suppliers</title> <?php include "include/head.php"; ?> <div class="wrapper"> <?php include "include/header.php"; ?> <!-- Left side column. contains the logo and sidebar --> <aside class="main-sidebar"> <!-- sidebar: style can be found in sidebar.less --> <!-- sidebar: style can be found in sidebar.less --> <section class="sidebar">
<?php require_once "session.php"; require_once "class.user.php"; $auth_user = new USER(); $user_id = $_SESSION['user_session']; $stmt = $auth_user->runQuery("SELECT * FROM admin WHERE id=:user_id"); $stmt->execute(array(":user_id" => $user_id)); $userRow = $stmt->fetch(PDO::FETCH_ASSOC); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <meta name="apple-mobile-web-app-capable" content="yes"> <link href="css/bootstrap.min.css" rel="stylesheet"> <link href="css/bootstrap-responsive.min.css" rel="stylesheet"> <link href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600" rel="stylesheet"> <link href="css/font-awesome.css" rel="stylesheet"> <link href="css/style.css" rel="stylesheet"> <link href="css/pages/dashboard.css" rel="stylesheet"> <title>welcome - <?php print $userRow['username']; ?> </title> </head> <body> <div class="navbar navbar-fixed-top">
if (strlen($upass) < 4) { $error[] = "Password must be atleast 4 characters"; echo "Password must be atleast 4 characters"; return false; } else { if ($upass != $rpass) { $error[] = "Passwords must be the same"; echo "Passwords must be the same"; return false; } else { if ($sec != $val3) { echo "ERROR CODE VERIFICATION..."; return false; } else { try { $stmt = $login->runQuery("SELECT user_name FROM users WHERE user_name=:uname"); $stmt->execute(array(':uname' => $uname)); $row = $stmt->fetch(PDO::FETCH_ASSOC); if ($row['user_name'] == $uname) { $error[] = "sorry username or mail already taken !"; echo "sorry username or mail already taken !"; return false; } else { if ($login->register($uname, $upass, $code)) { //$login->redirect('../login/index.php?joined'); echo "DONE"; return true; } } } catch (PDOException $e) { echo $e->getMessage();
<?php require_once "../config/class.user.php"; $auth_user = new USER(); //example of request // http://127.0.0.1:8000/home/dashboardshow.php?btn-update=enable&type=load&userid=2239&clientid=1 if (isset($_GET['btn-update'])) { if (isset($_GET['type']) and $_GET['type'] == 'load') { $uid = strip_tags(filter_input(INPUT_GET, 'userid')); $cid = strip_tags(filter_input(INPUT_GET, 'clientid')); $sql = "SELECT * FROM clients WHERE id={$cid} and user_id={$uid}"; $stmt = $auth_user->runQuery($sql); $stmt->execute(); $results = $stmt->fetchAll(PDO::FETCH_ASSOC); } $file = 'saved_images/photo_UID:' . $uid . '_CID:' . $cid . '.jpg'; ?> <!DOCTYPE html> <html lang="es"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"> <!-- <meta name="viewport" content="width=device-width, initial-scale=1"> --> <meta name="description" content="Control Parental, Internet por fin segura"> <meta name="keywords" content="Parental control,Control parental,parental,control, seguridad, internet, niños, seguros, navegación, filtros, antivirus, internet segura, firewall, cortafuego, analisis, paginas, seguras"> <meta name="author" content="*****@*****.**"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <!--<meta name="viewport" content="width=device-width, initial-scale=1.0">-->
$error[] = "provide username !"; } else { if ($umail == "") { $error[] = "provide email id !"; } else { if (!filter_var($umail, FILTER_VALIDATE_EMAIL)) { $error[] = 'Please enter a valid email address !'; } else { if ($upass == "") { $error[] = "provide password !"; } else { if (strlen($upass) < 6) { $error[] = "Password must be atleast 6 characters"; } else { try { $stmt = $user->runQuery("SELECT username, email FROM admin WHERE username=:uname OR email=:umail"); $stmt->execute(array(':uname' => $uname, ':umail' => $umail)); $row = $stmt->fetch(PDO::FETCH_ASSOC); if ($row['username'] == $uname) { $error[] = "sorry username already taken !"; } else { if ($row['email'] == $umail) { $error[] = "sorry email id already taken !"; } else { if ($user->register($uname, $umail, $upass, $firstname, $lastname)) { $user->redirect('signup.php?joined'); } } } } catch (PDOException $e) { echo $e->getMessage();
<?php require_once "../config/session.php"; require_once "../config/class.user.php"; include_once 'phpqrcode/qrlib.php'; $auth_user = new USER(); $user_id_name = $_SESSION['user_session']; $user_id = $_SESSION['company_code']; if (isset($_POST['userid'])) { $uid = strip_tags($_POST['userid']); $_SESSION['user_id'] = $uid; $sql = "SELECT * FROM clients WHERE id={$uid}"; $stmt = $auth_user->runQuery($sql); $stmt->execute(); $results = $stmt->fetchAll(PDO::FETCH_ASSOC); $button = "UPDATE"; $action = "updateclient"; $actual_link = 'http://' . $_SERVER[HTTP_HOST] . '/home/dashboardshow.php' . '?btn-update=enable&type=load&userid=' . $user_id . '&clientid=' . $uid; // $photo = 'http://' . $_SERVER[HTTP_HOST] . '/home/saved_images/photo_UID:' . $user_id . '_CID:' . $uid . '.jpg'; // $logo = 'http://' . $_SERVER[HTTP_HOST] . '/home/tmp/image_UID:' . $user_id . '_CID:' . $uid . '.png'; //CREAMON UNA INSTANCIA DE QR $qr = new QrGenerator(); $imageName = $qr->qrGen($results, $actual_link); } else { if (isset($_SESSION['user_id'])) { // $uid = $_SESSION['user_id']; $sql = "SELECT * FROM clients WHERE id={$uid}"; $stmt = $auth_user->runQuery($sql); $stmt->execute(); $cuenta = $stmt->rowCount();
<?php require_once "__appconfig.php"; require_once "__pageconfig.php"; require_once "class.core.php"; require_once "class.user.php"; require_once "session.php"; //session_start(); $auth_user = new USER(); $user_id = $_SESSION['user_session']; $stmt = $auth_user->runQuery("SELECT * FROM logins WHERE user_id=:user_id"); $stmt->execute(array(":user_id" => $user_id)); $userRow = $stmt->fetch(PDO::FETCH_ASSOC); ?> <?php $home = $commands["home"]; $debug = isset($_GET['debug']) && !empty($_GET['debug']) ? max(1, intval($_GET['debug'])) : 0; ?> <!DOCTYPE html> <html> <head> <?php include "inc/head.php"; ?> <?php // include "inc/responsiveGridSystem.php"; ?> <?php googleAnalytics(GOOGLE_TRACKING_ID);
<?php session_start(); require_once 'classes/class.user.php'; $user_home = new USER(); if (!empty($_GET["delete_id"])) { $uname = $_GET["delete_id"]; for ($i = 0; $i < 4; $i++) { if (strlen($uname) != 4) { $uname = "0" . $uname; } } $s = $user_home->runQuery("DELETE FROM `today_supply` WHERE supplier_code= :uname"); $s->execute(array(":uname" => $uname)); $user_home->redirect('update.php'); }
<?php session_start(); require_once 'classes/class.user.php'; $user_home = new USER(); require_once 'DB/dbupdates.php'; include_once 'backup.php'; $dbupdates = new DBupdates(); if (!$user_home->is_logged_in()) { $user_home->redirect('index.php'); } $stmt = $user_home->runQuery("SELECT * FROM users WHERE id=:uid"); $stmt->execute(array(":uid" => $_SESSION['userSession'])); $row = $stmt->fetch(PDO::FETCH_ASSOC); if (isset($_POST['submit_1'])) { $v1 = $_POST['tr1']; $v2 = $_POST['tr2']; $v3 = $_POST['tr3']; $date = date('Y-m-d'); $startdate = substr($date, 0, 8) . "-01"; $nddate = substr($date, 0, 8) . "-30"; $getdata = $user_home->runQuery("SELECT * FROM settings WHERE date BETWEEN {$startdate} AND {$nddate}"); $getdata->execute(); if ($getdata->rowCount() > 0) { while ($row = $getdata->FETCH(PDO::FETCH_ASSOC)) { print_r($row); } } else { $getdata = $user_home->runQuery("UPDATE settings SET (date,approxi_tea_rate,fixed_tea_rate,max_loan_amount, edit_by) VALUES (" . $date . "," . $v1 . "," . $v2 . "," . $v3 . "," . $row['id'] . ")"); $getdata->execute(); }
<?php include_once "../php-assets/class.advert.php"; require_once "../php-assets/class.session.php"; require_once "../php-assets/class.user.php"; // Gathering the logged user's personal information $auth_user = new USER(); $user_id = $_SESSION['user_session']; $stmt = $auth_user->runQuery("SELECT * FROM tbl_user WHERE user_id=:user_id"); $stmt->execute(array(":user_id" => $user_id)); $userRow = $stmt->fetch(PDO::FETCH_ASSOC); // Creating a new advert $advert = new Advert(); // Checking if the logged user has already created an advert $check_user_has_advert = $auth_user->hasAdvert($userRow['user_id']); if ($check_user_has_advert === true) { $auth_user->redirect('advert-overview.php'); } if (isset($_POST['advert-create-button'])) { try { // Processing the given home and mobile telephone-numbers $mobile_phone_number = preg_replace('/\\s+/', '', $_POST['advert-mobile-number']); $home_phone_number = preg_replace('/\\s+/', '', $_POST['advert-home-number']); if (preg_match('/^(\\d{4})(\\d{3})(\\d{3})$/', $mobile_phone_number, $matches)) { $mobile_phone_number = $matches[1] . ' ' . $matches[2] . ' ' . $matches[3]; } if (preg_match('/^(\\d{3})(\\d{2})(\\d{2})(\\d{2})$/', $home_phone_number, $matches)) { $home_phone_number = $matches[1] . ' ' . $matches[2] . ' ' . $matches[3] . ' ' . $matches[4]; } $home_phone_number = "+32 " . $home_phone_number; $mobile_phone_number = "+32 " . $mobile_phone_number;
$error[] = "Enter email!"; } else { if (!filter_var($umail, FILTER_VALIDATE_EMAIL)) { $error[] = 'Enter valid email!'; } else { if ($upass == "") { $error[] = "Enter password!"; } else { if ($ubirth == "") { $error[] = "Enter your birthday!"; } else { if (strlen($upass) < 6) { $error[] = "Enter password at least 6 letters!"; } else { try { $stmt = $user->runQuery("SELECT user_name, user_email FROM user WHERE user_name=:uname OR user_email=:umail"); $stmt->execute(array(':uname' => $uname, ':umail' => $umail)); $row = $stmt->fetch(PDO::FETCH_ASSOC); if ($row['user_name'] == $uname) { $error[] = "This username exist!"; } else { if ($row['user_email'] == $umail) { $error[] = "This email exist!"; } else { if ($user->register($uname, $umail, $upass, $ubirth)) { $user->redirect('sign-up.php?joined'); } } } } catch (PDOException $e) { echo $e->getMessage();
<?php session_start(); require_once 'classes/class.user.php'; $user_home = new USER(); if (!$user_home->is_logged_in()) { $user_home->redirect('index.php'); } $stmt = $user_home->runQuery("SELECT * FROM users WHERE id=:uid"); $stmt->execute(array(":uid" => $_SESSION['userSession'])); $row = $stmt->fetch(PDO::FETCH_ASSOC); ?> <!DOCTYPE html> <html> <title>Suppliers</title> <?php include "include/head.php"; ?> <div class="wrapper"> <?php include "include/header.php"; ?> <!-- Left side column. contains the logo and sidebar --> <aside class="main-sidebar"> <!-- sidebar: style can be found in sidebar.less --> <!-- sidebar: style can be found in sidebar.less --> <section class="sidebar"> <!-- Sidebar user panel (optional) --> <!-- sidebar menu: : style can be found in sidebar.less -->
$strbarchartlabels = substr($strbarchartlabels, 0, -1); $strbarchartlabels = $strbarchartlabels . "]"; //CHARTs - line charts $arrRes1 = $dbdashboard->realTeaRatesOfLast6Months(); $arrRes2 = $dbdashboard->approxTeaRatesOfLast6Months(); $strlinechartRealTRate = "[" . $arrRes1[5] . "," . $arrRes1[4] . "," . $arrRes1[3] . "," . $arrRes1[2] . "," . $arrRes1[1] . "," . $arrRes1[0] . "]"; $strlinechartAppTRate = "[" . $arrRes2[5] . "," . $arrRes2[4] . "," . $arrRes2[3] . "," . $arrRes2[2] . "," . $arrRes2[1] . "," . $arrRes2[0] . "]"; //POP-UP 01 $popup11 = $dbdashboard->totalValueofLast365Days(); $popup12 = $dbdashboard->getThisMonthTotalSupply(); //POP-UP 2 $popup21 = $dbdashboard->getTodayTotalSupply(); if (!$user_home->is_logged_in()) { $user_home->redirect('index.php'); } $stmt = $user_home->runQuery("SELECT * FROM users WHERE id=:uid"); $stmt->execute(array(":uid" => $_SESSION['userSession'])); $row = $stmt->fetch(PDO::FETCH_ASSOC); $userlevel = $user_home->userPermission($row['id']); ?> <!DOCTYPE html> <html> <title>Dashboard</title> <?php include "include/head.php"; ?> <div class="wrapper"> <?php include "include/header.php"; ?>
<?php session_start(); require_once 'class.user.php'; $reg_user = new USER(); if ($reg_user->is_logged_in() != "") { $reg_user->redirect('home.php'); } if (isset($_POST['btn-signup'])) { $uname = trim($_POST['txtuname']); $email = trim($_POST['txtemail']); $upass = trim($_POST['txtpass']); $code = md5(uniqid(rand())); $stmt = $reg_user->runQuery("SELECT * FROM tbl_users WHERE userEmail=:email_id"); $stmt->execute(array(":email_id" => $email)); $row = $stmt->fetch(PDO::FETCH_ASSOC); if ($stmt->rowCount() > 0) { $msg = "\n\t\t <div class='alert alert-error'>\n\t\t\t\t<button class='close' data-dismiss='alert'>×</button>\n\t\t\t\t\t<strong>Sorry !</strong> email allready exists , Please Try another one\n\t\t\t </div>\n\t\t\t "; } else { if ($reg_user->register($uname, $email, $upass, $code)) { $id = $reg_user->lasdID(); $key = base64_encode($id); $id = $key; $message = "\t\t\t\t\t\n\t\t\t\t\t\tHello {$uname},\n\t\t\t\t\t\t<br /><br />\n\t\t\t\t\t\tWelcome to Coding Cage!<br/>\n\t\t\t\t\t\tTo complete your registration please , just click following link<br/>\n\t\t\t\t\t\t<br /><br />\n\t\t\t\t\t\t<a href='http://www.SITEURL.com/verify.php?id={$id}&code={$code}'>Click HERE to Activate :)</a>\n\t\t\t\t\t\t<br /><br />\n\t\t\t\t\t\tThanks,"; $subject = "Confirm Registration"; $reg_user->send_mail($email, $message, $subject); $msg = "\n\t\t\t\t\t<div class='alert alert-success'>\n\t\t\t\t\t\t<button class='close' data-dismiss='alert'>×</button>\n\t\t\t\t\t\t<strong>Success!</strong> We've sent an email to {$email}.\n Please click on the confirmation link in the email to create your account. \n\t\t\t \t\t</div>\n\t\t\t\t\t"; } else { echo "sorry , Query could no execute..."; } }
<?php require_once 'classes/class.user.php'; $user = new USER(); if (empty($_GET['id']) && empty($_GET['code'])) { $user->redirect('index.php'); } if (isset($_GET['id']) && isset($_GET['code'])) { $id = base64_decode($_GET['id']); $code = $_GET['code']; $statusY = "Y"; $statusN = "N"; $stmt = $user->runQuery("SELECT id,user_approved FROM users WHERE id=:uID AND token_code=:code LIMIT 1"); $stmt->execute(array(":uID" => $id, ":code" => $code)); $row = $stmt->fetch(PDO::FETCH_ASSOC); if ($stmt->rowCount() > 0) { if ($row['user_approved'] == $statusN) { $stmt = $user->runQuery("UPDATE users SET user_approved=:status WHERE id=:uID"); $stmt->bindparam(":status", $statusY); $stmt->bindparam(":uID", $id); $stmt->execute(); $msg = "\n\t\t <div class='alert alert-success'>\n\t\t\t\t <button class='close' data-dismiss='alert'>×</button>\n\t\t\t\t\t <strong>WoW !</strong> Your Account is Now Activated : <a href='index.php'>Login here</a>\n\t\t\t </div>\n\t\t\t "; } else { $msg = "\n\t\t <div class='alert alert-error'>\n\t\t\t\t <button class='close' data-dismiss='alert'>×</button>\n\t\t\t\t\t <strong>sorry !</strong> Your Account is allready Activated : <a href='index.php'>Login here</a>\n\t\t\t </div>\n\t\t\t "; } } else { $msg = "\n\t\t <div class='alert alert-error'>\n\t\t\t <button class='close' data-dismiss='alert'>×</button>\n\t\t\t <strong>sorry !</strong> No Account Found : <a href='signup.php'>Signup here</a>\n\t\t\t </div>\n\t\t\t "; } } ?> <!DOCTYPE html>
<?php require_once 'class.user.php'; $user = new USER(); if (empty($_GET['id']) && empty($_GET['code'])) { $user->redirect('index1.php'); } if (isset($_GET['id']) && isset($_GET['code'])) { $id = base64_decode($_GET['id']); $code = $_GET['code']; $stmt = $user->runQuery("SELECT * FROM tbl_users WHERE userID=:uid AND tokenCode=:token"); $stmt->execute(array(":uid" => $id, ":token" => $code)); $rows = $stmt->fetch(PDO::FETCH_ASSOC); if ($stmt->rowCount() == 1) { if (isset($_POST['btn-reset-pass'])) { $pass = $_POST['pass']; $cpass = $_POST['confirm-pass']; if ($cpass !== $pass) { $msg = "<div class='alert alert-block'>\n\t\t\t\t\t\t<button class='close' data-dismiss='alert'>×</button>\n\t\t\t\t\t\t<strong>Sorry!</strong> Password Doesn't match. \n\t\t\t\t\t\t</div>"; } else { $password = md5($cpass); $stmt = $user->runQuery("UPDATE tbl_users SET userPass=:upass WHERE userID=:uid"); $stmt->execute(array(":upass" => $password, ":uid" => $rows['userID'])); $msg = "<div class='alert alert-success'>\n\t\t\t\t\t\t<button class='close' data-dismiss='alert'>×</button>\n\t\t\t\t\t\tPassword Changed.\n\t\t\t\t\t\t</div>"; header("refresh:5;index1.php"); } } } else { $msg = "<div class='alert alert-success'>\n\t\t\t\t<button class='close' data-dismiss='alert'>×</button>\n\t\t\t\tNo Account Found, Try again\n\t\t\t\t</div>"; } }
<?php session_start(); require_once 'class.user.php'; $user_home = new USER(); if (!$user_home->is_logged_in()) { $user_home->redirect('index.php'); } $stmt = $user_home->runQuery("SELECT * FROM tbl_users WHERE userID=:uid"); $stmt->execute(array(":uid" => $_SESSION['userSession'])); $row = $stmt->fetch(PDO::FETCH_ASSOC); ?> <!DOCTYPE html> <html class="no-js"> <head> <title><?php echo $row['userEmail']; ?> </title> <!-- Bootstrap --> <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen"> <link href="bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet" media="screen"> <link href="assets/styles.css" rel="stylesheet" media="screen"> <!-- HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head>
<?php session_start(); require_once 'classes/class.user.php'; $user_home = new USER(); if (!$user_home->is_logged_in()) { $user_home->redirect('index.php'); } $stmt = $user_home->runQuery("SELECT * FROM users WHERE id=:uid"); $stmt->execute(array(":uid" => $_SESSION['userSession'])); $row = $stmt->fetch(PDO::FETCH_ASSOC); ?> <!DOCTYPE html> <html> <title>Suppliers</title> <?php include "include/head.php"; ?> <div class="wrapper"> <?php include "include/header.php"; ?> <!-- Left side column. contains the logo and sidebar --> <aside class="main-sidebar"> <!-- sidebar: style can be found in sidebar.less --> <!-- sidebar: style can be found in sidebar.less --> <section class="sidebar"> <!-- sidebar menu: : style can be found in sidebar.less -->
<?php require_once 'class.user.php'; $user = new USER(); if (empty($_GET['id']) && empty($_GET['code'])) { $user->redirect('index1.php'); } if (isset($_GET['id']) && isset($_GET['code'])) { $id = base64_decode($_GET['id']); $code = $_GET['code']; $statusY = "Y"; $statusN = "N"; $stmt = $user->runQuery("SELECT userID,userStatus FROM tbl_users WHERE userID=:uID AND tokenCode=:code LIMIT 1"); $stmt->execute(array(":uID" => $id, ":code" => $code)); $row = $stmt->fetch(PDO::FETCH_ASSOC); if ($stmt->rowCount() > 0) { if ($row['userStatus'] == $statusN) { $stmt = $user->runQuery("UPDATE tbl_users SET userStatus=:status WHERE userID=:uID"); $stmt->bindparam(":status", $statusY); $stmt->bindparam(":uID", $id); $stmt->execute(); $msg = "\n\t\t <div class='alert alert-success'>\n\t\t\t\t <button class='close' data-dismiss='alert'>×</button>\n\t\t\t\t\t <strong>WoW !</strong> Your Account is Now Activated : <a href='index1.php'>Login here</a>\n\t\t\t </div>\n\t\t\t "; } else { $msg = "\n\t\t <div class='alert alert-error'>\n\t\t\t\t <button class='close' data-dismiss='alert'>×</button>\n\t\t\t\t\t <strong>sorry !</strong> Your Account is allready Activated : <a href='index1.php'>Login here</a>\n\t\t\t </div>\n\t\t\t "; } } else { $msg = "\n\t\t <div class='alert alert-error'>\n\t\t\t <button class='close' data-dismiss='alert'>×</button>\n\t\t\t \n\t\t\t </div>\n\t\t\t "; } } ?> <!DOCTYPE html>