function display_product($result) { $phpdate = strtotime($result['date']); $mysqldate = date('M j, Y', $phpdate); echo '<div class="col-sm-6 col-xs-6 col-md-2"> <div class="thumbnail">'; echo '<h4 style = "margin-top:2px;margin-bottom:10px;white-space: nowrap; overflow:hidden; text-overflow: ellipsis;">' . $result['name'] . '</h4> <img src="../' . $result['pic'] . '" alt="' . $result['name'] . '" style = "width: 155px; height:155px;"> <div class="caption"> <p style = "white-space: nowrap; overflow:hidden; text-overflow: ellipsis;">' . $result['description'] . '</p> <p>Location: ' . getfield('locations', 'location', 'id', $result['location']) . '</p> <p>Added By : ' . getfield('admin', 'firstname', 'id', $result['admin_id']) . '</p><p> on ' . $mysqldate . ' </p> <p><a href="edit_product.php?id=' . $result['id'] . '" style = "width:65px" class="btn btn-success" role="button">Edit</a> <a id = "delete_' . $result['id'] . '" class="btn_delete btn btn-danger" role="button">Delete</a></p> </div>'; echo '</div> </div>'; }
<?php require '../inc/core_inc.php'; require 'checksession_inc.php'; if (isset($_REQUEST['type']) && !empty($_REQUEST['type'])) { $type = $_REQUEST['type']; //Delete Products of the particular Type $id = getfield('items_type', 'id', 'type', 'sweets'); $query = "DELETE FROM `items` WHERE `type` = :type"; $sth = $dbh->prepare($query); $sth->bindParam(':type', $type, PDO::PARAM_STR); $sth->execute(); //Delete the type $query = "DELETE FROM `items_type` WHERE `type` = :type"; $sth = $dbh->prepare($query); $sth->bindParam(':type', $type, PDO::PARAM_STR); $sth->execute(); if ($sth->rowCount() == 1) { echo 'success'; } else { if ($sth->rowCount() == 0) { echo 'fail'; } } }
--> <?php require 'scripts/core.inc.php'; require 'scripts/connect.inc.php'; if (loggedin()) { $visitor_name = strtoupper(getfield('name')); $visitor_photo = getfield('photo'); $visitor_username = getfield('username'); $visitor_age = getfield('age'); $visitor_sex = strtoupper(getfield('sex')); $visitor_city = strtoupper(getfield('city')); $visitor_que = strtoupper(getfield('sec_que')); $visitor_ans = strtoupper(getfield('sec_ans')); $visitor_email = getfield('email'); $visitor_password = getfield('password'); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Profile</title> <link rel="stylesheet" type="text/css" href="stylesheet/profile.css"/> <script type="text/javascript" src="scripts/jquery-1.11.0.min.js"></script> <script type="text/javascript" src="scripts/photo.js"></script> <script type="text/javascript" src="scripts/effects.js"></script> </head> <body> <header>
$_SESSION['order_id'] = $dbh->lastInsertId(); } $_SESSION['sender_details'] = 1; header('location: placeorder_deliverydetails.php'); } else { header('Location: placeorder.php'); } } if (isset($_POST['name_recipient']) && isset($_POST['address_recipient_line1']) && isset($_POST['address_recipient_line2']) && isset($_POST['phone_recipient']) && isset($_POST['notify_recipient']) && isset($_POST['pincode_recipient']) && isset($_POST['delivery_date']) && isset($_POST['delivery_time']) && isset($_POST['delivery_message'])) { if (!empty($_POST['name_recipient']) && !empty($_POST['address_recipient_line1']) && !empty($_POST['address_recipient_line2']) && !empty($_POST['phone_recipient']) && !empty($_POST['notify_recipient']) && !empty($_POST['pincode_recipient']) && !empty($_POST['delivery_date']) && !empty($_POST['delivery_time']) && !empty($_POST['delivery_message'])) { if ($_POST['notify_recipient'] == 1) { $notify = 1; } else { $notify = 0; } $location = getfield('locations', 'location', 'id', $_SESSION['location']); $id = $_SESSION['order_id']; $query = "UPDATE `orders` SET `nameofrecipient` = :name, `addressofrecipient_line1` = :address_1,`addressofrecipient_line2` = :address_2, `locationofrecipient`= :location , `pincodeofrecipient` = :pincode,`phoneofrecipient` = :phone, `notifyrecipient` = :notify, `deliverydate` = :date, `deliverytime` = :time, `deliverymessage` = :message, `customize` = :customize WHERE `id` = :id"; $sth = $dbh->prepare($query); $sth->bindParam(':name', $_POST['name_recipient'], PDO::PARAM_STR); $sth->bindParam(':address_1', $_POST['address_recipient_line1'], PDO::PARAM_STR); $sth->bindParam(':address_2', $_POST['address_recipient_line2'], PDO::PARAM_STR); $sth->bindParam(':location', $location, PDO::PARAM_STR); $sth->bindParam(':pincode', $_POST['pincode_recipient'], PDO::PARAM_INT); $sth->bindParam(':phone', $_POST['phone_recipient'], PDO::PARAM_STR); $sth->bindParam(':notify', $notify, PDO::PARAM_INT); $sth->bindParam(':date', $_POST['delivery_date'], PDO::PARAM_STR); $sth->bindParam(':time', $_POST['delivery_time'], PDO::PARAM_INT); $sth->bindParam(':message', $_POST['delivery_message'], PDO::PARAM_STR); $sth->bindParam(':customize', $_POST['customize'], PDO::PARAM_STR); $sth->bindParam(':id', $id, PDO::PARAM_INT);
<?php require '../inc/core_inc.php'; require 'checksession_inc.php'; $admin_location = getfield('admin', 'location', 'id', $_SESSION['admin_id']); ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Admin</title> <! Bootstrap Css links> <link rel="stylesheet" type="text/css" href="../bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="../bootstrap/css/bootstrap-theme.min.css"> <!Alert Plugin links> <script src="../js/alert/lib/sweet-alert.min.js"></script> <link rel="stylesheet" href="../js/alert/lib/sweet-alert.css"> <style type = "text/css"> ul a{ font-weight:20px; } .control-label{ text-align:left; } form input[type=number]::-webkit-inner-spin-button, form input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0;
<table class = "table orderdetails_table"> <thead> <tr> <th min-width = "100px">Item</th> <th min-width = "50px" style = "text-align:center">Quantity</th> <th min-width = "150px" style = "text-align:center">Price</th> </tr> </thead> <tbody> <?php foreach ($_SESSION['cart'] as $key => $id) { echo ' <tr> <td min-width = "100px"><img class = "img-circle" width = "50px" src = "' . getfield('items', 'pic', 'id', $id) . '"><p>' . getfield('items', 'name', 'id', $id) . '</p></td> <td min-width = "50px" style = "text-align:center">' . $_SESSION['quantity'][$key] . '</td> <td min-width = "150px" style = "text-align:center"><span>₹ </span>' . $_SESSION['quantity'][$key] * getfield('items', 'price', 'id', $id) . '</td> </tr>'; } ?> <tr style = "font-size:16px;color:#B91845;font-weight:bold"> <td colspan = "2" style = "text-align:right;"> Net Payable: </td> <td style = "text-align:center;"><span>₹ </span><span id = "net_payable_final"><?php echo $_SESSION['cart_price']; ?> </span></td> </tr> <!Coupon Code block> <?php if (!isset($_SESSION['coupon_code'])) { ?>
<title>User Log In</title> <link href="_/css/bootstrap.css" rel="stylesheet"> <link href="_/css/mystyles.css" rel="stylesheet"> </head> <body id="register"> <section class="container"> <div class="content row"> <?php include "header.inc.php"; ?> <?php echo 'Hello ' . getfield('user_username') . ','; ?> <hr /> <div class="content row"> <section class="article col col-lg-5"> </section> </div> <?php include "footer.inc.php"; ?>
<?php ob_start(); //necessary while we redirect a page session_start(); //this is required to start session include 'prp_connect.php'; include 'prp_functions.php'; check_access(); //check if a session exists $Name = getfield('name'); $Email = getfield('email'); $Address = getfield('address'); $Country = getfield('country'); $Phone = getfield('phone'); $http_client_ip = $_SERVER['HTTP_CLIENT_IP']; $http_x_forwarded_for = $_SERVER['HTTP_X_FORWARDED_FOR']; $remote_addr = $_SERVER['REMOTE_ADDR']; if (!empty($http_client_ip)) { $ip_address = $http_client_ip; } else { if (!empty($http_x_forwarded_for)) { $ip_address = $http_x_forwarded_for; } else { $ip_address = $remote_addr; } } ?> <table width="100%" border="0" bgcolor="#e6e4da"> <tr> <td scope="col"><?php
<!DOCTYPE html> <html> <head> <title>LOGIN</title> </head> <body> <?php require 'core.inc.php'; require 'connection.php'; if (loggedin()) { $firstname = getfield('firstname'); $surname = getfield('surname'); echo "You're logged in, " . $firstname . " " . $surname . ".<br><br><a href = 'logout.php'>LOG OUT!</a><br>"; } else { require 'loginform.inc.php'; } ?> </body> </html>
} $pageURL .= "://"; if ($_SERVER["SERVER_PORT"] != "80") { $pageURL .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"]; } else { $pageURL .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]; } return $pageURL; } // Creat the table for the traking history $creattablehistory = mysql_query("CREATE TABLE IF NOT EXISTS System_history (ip varchar(80), time_stamp varchar(200),user_id varchar(25),URL varchar(500));"); if (!$creattablehistory) { echo "Error in History Traking Table Creation : " . mysql_error(); } // Fetch Clint IP $userip = $_SERVER['REMOTE_ADDR']; $URL = curPageURL(); $timestamp = $today = date("Y-m-d H:i:s"); // Check if he is logged in or not if (loggedin()) { $userid = getfield('id'); $insuery = mysql_query("INSERT INTO System_history (ip,time_stamp,user_id,URL) VALUES ('{$userip}','{$timestamp}','{$userid}','{$URL}')"); if (!$insuery) { echo "Error in History Traking Table Insert when user in on : " . mysql_error(); } } else { $insuery2 = mysql_query("INSERT INTO System_history (ip,time_stamp,user_id,URL) VALUES ('{$userip}','{$timestamp}','Anonymous','{$URL}')"); if (!$insuery2) { echo "Error in History Traking Table Insert when user in off : " . mysql_error(); } }
if ($_REQUEST['display'] == 1) { cart_items_display(); } } //Cart Number Update after cart operations if (isset($_REQUEST['cart_num']) && !empty($_REQUEST['cart_num'])) { if ($_REQUEST['cart_num'] == 1) { echo sizeof($_SESSION['cart']); } } // Cart Net Payable Update if (isset($_REQUEST['cart_pay']) && !empty($_REQUEST['cart_pay'])) { if ($_REQUEST['cart_pay'] == 1) { $_SESSION['cart_price'] = 0; foreach ($_SESSION['cart'] as $key => $id) { $_SESSION['cart_price'] = $_SESSION['cart_price'] + $_SESSION['quantity'][$key] * getfield('items', 'price', 'id', $id); } unset($_SESSION['coupon_code']); echo $_SESSION['cart_price']; } else { if ($_REQUEST['cart_pay'] == 2) { echo $_SESSION['cart_price']; } } //} } //Cart quantity update if (isset($_REQUEST['itemid']) && !empty($_REQUEST['itemid']) && isset($_REQUEST['quantity']) && !empty($_REQUEST['quantity'])) { foreach ($_SESSION['cart'] as $key => $val) { if ($val == $_REQUEST['itemid']) { $_SESSION['quantity'][$key] = $_REQUEST['quantity'];
<?php // // AJAX usen in bulding forms. // require 'core.inc.php'; require 'connect.inc.php'; $qryStatus = ""; // login status if (loggedin()) { global $userData; $userData = getfield('firstname, id', 'logindata', $conn); //test table. $query = "SELECT 1 FROM t" . $userData[1] . ";"; if ($query = $conn->query($query)) { //echo "table detected success"; } else { die("query fault while checking table. probably, table does not exist, please reach me at 7736600957"); } } else { die("Woah! you are not logged in. Login <a href=\"index.php\">here</a>"); //header('Location :'.$http_referer); } $title = ""; $data = ""; $fileName = "Untitled"; $resFileName = "Untitled"; $resStr = ""; $multQn = 0; $cbxQn = 0; $resJS1 = "";
<!--- Author Name: Ayush Sharma College: Arya College Of engineering & IT. Find eme at: ayush.sharma469@gmail.com www.github.com/ayusharma --> <?php require 'scripts/connect.inc.php'; require 'scripts/core.inc.php'; if (loggedin()) { $visitor_name = strtoupper(getfield('name')); $visitor_photo = getfield('photo'); $visitor_email = getfield('email'); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Connect</title> <link rel="stylesheet" type="text/css" href="stylesheet/connect.css"/> <script type="text/javascript" src="scripts/jquery-1.11.0.min.js"></script> <script type="text/javascript" src="scripts/effects.js"></script> </head> <body> <header> <div class="HeaderTitle"> <img src="images/logo.png" width="70" height="70" border="0"/>
<!--- Author Name: Ayush Sharma College: Arya College Of engineering & IT. Find eme at: ayush.sharma469@gmail.com www.github.com/ayusharma --> <?php require 'scripts/connect.inc.php'; require 'scripts/core.inc.php'; if (loggedin()) { $visitor_name = strtoupper(getfield('name')); $visitor_photo = getfield('photo'); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Available Doctors</title> <link rel="stylesheet" type="text/css" href="stylesheet/findadocresult.css"/> <script type="text/javascript" src="scripts/jquery-1.11.0.min.js"></script> <script type="text/javascript" src="scripts/effects.js"></script> </head> <body> <header> <div class="HeaderTitle"> <img src="images/logo.png" width="70" height="70" border="0"/> </div>
// Payumoney Post for payment // Merchant key here as provided by Payu $MERCHANT_KEY = "iP6YTC"; // Merchant Salt as provided by Payu $SALT = "aXQXERjl"; // End point - change to https://secure.payu.in for LIVE mode //$PAYU_BASE_URL = "https://test.payu.in"; $PAYU_BASE_URL = "https://secure.payu.in"; $posted = array(); $posted['key'] = $MERCHANT_KEY; $posted['txnid'] = $txnid; $posted['amount'] = $nettotal; $posted['productinfo'] = "Flowers"; $posted['firstname'] = getfield('orders', 'nameofsender', 'id', $_SESSION['order_id']); $posted['email'] = getfield('orders', 'emailofsender', 'id', $_SESSION['order_id']); $posted['phone'] = getfield('orders', 'phoneofsender', 'id', $_SESSION['order_id']); $posted['surl'] = "http://www.sendfreshflowers.co.in/payment_success.php"; $posted['furl'] = "http://www.sendfreshflowers.co.in/payment_fail.php"; // Hash Sequence $hashSequence = "key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3|udf4|udf5|udf6|udf7|udf8|udf9|udf10"; $hashVarsSeq = explode('|', $hashSequence); $hash_string = ''; foreach ($hashVarsSeq as $hash_var) { $hash_string .= isset($posted[$hash_var]) ? $posted[$hash_var] : ''; $hash_string .= '|'; } $hash_string .= $SALT; $hash = strtolower(hash('sha512', $hash_string)); $action = $PAYU_BASE_URL . '/_payment'; $posted['hash'] = $hash; $posted['service_provider'] = "payu_paisa";
<td><?php echo '#CMB20150' . $order_id; ?> </td> <td><?php $phpdate = strtotime($result['ordertime']); $mysqldate = date('M j, Y', $phpdate); echo $mysqldate; ?> </td> <td><?php $query1 = "SELECT `item_id` FROM `order_details` WHERE `order_id` = '{$order_id}'"; $sth1 = $dbh->query($query1); $count = $sth1->rowCount(); while ($result1 = $sth1->fetch(PDO::FETCH_ASSOC)) { echo getfield('items', 'name', 'id', $result1['item_id']); if ($count-- > 1) { echo ' & <br>'; } } ?> </td> <td><?php echo '<span> ₹ </span>' . $result['totalcost']; ?> </td> <td><?php if ($result['paymentstatus'] == 0) { echo 'Payment Failed!'; } else { echo 'Order Placed';
<ul class="nav navbar-nav"> <li id = "vieworders"><a href="admin_user.php">View Orders <span class="sr-only">(current)</span></a></li> <li id = "addproducts"><a href="admin_dashboard_editproduct.php">Products Dashboard</a></li> <?php if (getfield('admin', 'location', 'id', $_SESSION['admin_id']) == 273) { ?> <li id = "manageadmin"><a href="admin_manageadmin.php">Manage Admins</a></li> <?php } ?> </ul> <ul class="nav navbar-nav navbar-right"> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><span class="glyphicon glyphicon-user" style = "color:blue"></span> <?php echo getfield('admin', 'firstname', 'id', $_SESSION['admin_id']); ?> <span class="caret"></span></a> <ul class="dropdown-menu" role="menu"> <li><a href="#">Edit Profile</a></li> <li><a href="#">Account Settings</a></li> </ul> </li> <li><a href="logout.php">Signout</a></li> </ul> </div><!-- /.navbar-collapse --> </div><!-- /.container-fluid --> </nav>