コード例 #1
0
ファイル: checkout.php プロジェクト: shwetavyas/ClickArt
function findPrice($tempVal)
{
    $ooClass = new OOClass();
    $result = $ooClass->callingPriceCheckout($tempVal);
    global $totalPrice;
    $totalPrice = $totalPrice + $result;
    if ($result != "") {
        echo '<h4 style="color:#FE980F">$' . $result . '</h4>';
    }
}
コード例 #2
0
ファイル: featureItems.php プロジェクト: shwetavyas/ClickArt
function findPublisher()
{
    $ooClass = new OOClass();
    $dbc = $ooClass->dbConnect();
    static $num2 = 1;
    $query = "Select * from paintings where painting_id= '{$num2}'";
    $num2 = $num2 + 1;
    $data = mysqli_query($dbc, $query);
    if (mysqli_num_rows($data) == 1) {
        $row = mysqli_fetch_array($data);
        $publisher = $row['publisher'];
        return $publisher;
    }
}
コード例 #3
0
function findImagePriceCategoryLandscapes($num2)
{
    $ooClass = new OOClass();
    $dbc = $ooClass->dbConnect();
    // static $num2 = 1;
    $query = "Select * from paintings where painting_id= '{$num2}' AND paintingtype = 'landscapes'";
    // $num2 = $num2 + 1;
    $data = mysqli_query($dbc, $query);
    if (mysqli_num_rows($data) == 1) {
        $row = mysqli_fetch_array($data);
        $price = $row['price'];
        if (!empty($price)) {
            //return $price;
            ?>
		<div class="col-sm-3">
				<div class="product-image-wrapper">
					<div class="single-products">
						<div class="productinfo text-center"> 
						<?php 
            //findImageCategory();
            $result = $ooClass->callingImageCategoryLandscapes($num2);
            if (!empty($result)) {
                echo '<img src="collection/' . $result . '" alt="" />';
                //echo "string ".$result;
            }
            echo '<h2>Price: $' . $price . '</h2>';
            //echo '<a href="#" class="btn btn-default add-to-cart"><i class="fa fa-shopping-cart"></i>Add to cart</a>';
            ?>
						</div>
											
					</div>
				</div>
			</div>
			<?php 
        }
    }
}
コード例 #4
0
ファイル: registration.php プロジェクト: shwetavyas/ClickArt
<?php

// Insert the page header
$page_title = 'Registration Form';
require_once 'header.php';
require_once 'OOClass.php';
require_once 'appvars.php';
define('GW_UPLOADPATH', 'image/');
// Connect to the database
$ooClass = new OOClass();
$dbc = $ooClass->dbConnect();
if (isset($_POST['submit'])) {
    $firstname = $_POST['firstname'];
    $lastname = $_POST['lastname'];
    $email = $_POST['email'];
    $password1 = $_POST['password1'];
    $password2 = $_POST['password2'];
    $phone = $_POST['phone'];
    $photo = $_FILES['photo']['name'];
    $category = $_POST['category'];
    if (!empty($email) && !empty($password1) && !empty($password2) && $password1 == $password2) {
        // Make sure someone isn't already registered using this username
        $target = GW_UPLOADPATH . $photo;
        move_uploaded_file($_FILES['photo']['tmp_name'], $target);
        $query = "SELECT * FROM allusers WHERE email = '{$email}'";
        $data = mysqli_query($dbc, $query);
        if (mysqli_num_rows($data) == 0) {
            // The username is unique, so insert the data into the database
            $query = "INSERT INTO allusers (firstname, lastname, email, password, phone, photo, category) VALUES ('{$firstname}', '{$lastname}', '{$email}', SHA('{$password1}'), '{$phone}', '{$photo}', '{$category}')";
            mysqli_query($dbc, $query);
            //echo "Query: ".$query;
コード例 #5
0
ファイル: artist.php プロジェクト: shwetavyas/ClickArt
        echo '<p class="error">Some error found.</p>';
        //$username = "";
        //}
    } else {
        echo '<p class="error">You must enter all of the data</p>';
    }
}
mysqli_close($dbc);
?>

<?php 
require_once 'headerTopArtlover.php';
?>

<?php 
$ooClass = new OOClass();
$dbc = $ooClass->dbConnect();
$tempEmailPic = $_SESSION['email'];
$query = "Select photo from allusers where email= '{$tempEmailPic}'";
$data = mysqli_query($dbc, $query);
if (mysqli_num_rows($data) == 1) {
    $row = mysqli_fetch_array($data);
    $result = $row['photo'];
    echo '<img id="profilePic" src="image/' . $result . '" alt="" />';
}
?>

<style>
  #profilePic{
    position: absolute;
    top: 175px;
コード例 #6
0
ファイル: userProfile.php プロジェクト: shwetavyas/ClickArt
<?php

require_once 'startsession.php';
$page_title = 'Friends';
require_once 'header.php';
require_once 'connectvars.php';
require_once 'OOClass.php';
$ooClass = new OOClass();
if (isset($_POST['submit'])) {
    //setting the values of username and password
    $ooClass->setEmail($_POST['email']);
    $ooClass->setPassword($_POST['password']);
    //Connecting to the fbsql_database
    $dbc = $ooClass->dbConnect();
    //Authentication
    $ooClass->authentication3();
}
?>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
 


<?php 
//define('GW_UPLOADPATH', 'image/');
if ($ooClass->isUserLoggedIn()) {
    $dbc = $ooClass->dbConnect();
    $tempEmail = $_SESSION['email'];
    $query = "Select * from allusers where email = '{$tempEmail}'";
    $result = mysqli_query($dbc, $query);
    $row = mysqli_fetch_array($result);
コード例 #7
0
ファイル: logout.php プロジェクト: shwetavyas/ClickArt
<?php

require_once 'startsession.php';
require_once 'OOClass.php';
$ooClass = new OOClass();
if ($ooClass->isUserLoggedIn()) {
    // Delete the session vars by clearing the $_SESSION array
    $_SESSION = array();
    // Destroy the session
    session_destroy();
}
// Delete the user ID and username cookies by setting their expirations to an hour ago (3600)
setcookie('user_id', '', time() - 3600);
setcookie('username', '', time() - 3600);
// Redirect to the home page
$home_url = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/home.php';
header('Location: ' . $home_url);
コード例 #8
0
ファイル: home.php プロジェクト: shwetavyas/ClickArt
<?php

require_once 'OOClass.php';
// Start the session
session_start();
//Making the instance of LogMeIn class
$ooClass = new OOClass();
if (isset($_POST['submit']) && !isset($_POST['phone'])) {
    //setting the values of username and password
    $ooClass->setEmail($_POST['email']);
    $ooClass->setPassword($_POST['password']);
    //Connecting to the fbsql_database
    $dbc = $ooClass->dbConnect();
    //Authentication
    $ooClass->authentication();
}
//  if ($ooClass->isUserLoggedIn()==false) {
// echo '<p style="font-weight: bold;color: #FF0000">' . $ooClass->printError() . '</p>';
?>

   
    
   
    <link href="css/main.css" rel="stylesheet"> 

  <style>
    #chatNowId{
       visibility: hidden;
    }

    #shopNowId{