Bootstrap datetimepicker no action - php

I am trying to implement the bootstrap datetimepicker and am running into an issue where clicking on the input box doesn't trigger any action. I have double checked my imports along with the code itself following several tutorials, but I am not able to find the issue with my code. The imports I am using are as followed:
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link href="css/bootstrap-datetimepicker.min.css" rel="stylesheet">
<script src="js/bootstrap-datetimepicker.min.js"></script>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
I have downloaded the datetimepicker repo and have selected the css and js folder and moved them to the main directory.
The code I am calling for the label is as follows:
<div class="row">
<div class='col-sm-6'>
<input size="16" type="text" class="form-control" id="datetime" readonly>
<script type="text/javascript">
$("#datetime").datetimepicker({
format: 'yyyy-mm-dd hh:ii'
});
</script>
</div>
</div>
As I have stated the label doesn't have any action when clicked on. I am not sure if you need the whole webpage to understand my issue but I will post it below:
<?php
require('./includes/connection.php');
require('./includes/crypt.php');
require('functions.php');
session_start();
ob_start();
/**
* Created by PhpStorm.
* User: peri
* Date: 2019-04-07
* Time: 16:48
*/
if(isset($_GET['cancel'])) {
header('Location: messaging.php');
exit();
}
if(isset($_GET['confirm'])) {
if(isset($_GET['reason'])) {
//Encrypted text
$encrypted_text = encrypt_text($_GET['reason'], $key, $iv);
}
}
?>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link href="css/bootstrap-datetimepicker.min.css" rel="stylesheet">
<script src="js/bootstrap-datetimepicker.min.js"></script>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<title>New Appointment</title>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark align-center">
<a class="navbar-brand" href="#">EMR System</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse align-center" id="navbarNav">
<ul class="navbar-nav align-center">
<li class="nav-item">
<a class="nav-link" href="#">Home</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="#">Appointment <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Prescription</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Lab Tests</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Billing</a>
</li>
</ul>
</div>
<div class="navbar-collapse collapse order-3 dual-collapse2">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<img src="https://png.pngtree.com/element_our/sm/20180620/sm_5b29c1b6c8772.png" width="45px" height="45px">
</li>
</ul>
</div>
</nav>
<br>
<div class="container h-100">
<div class="row align-items-center h-100">
<div class="col-5 mx-auto">
<div class="card h-100 border-primary justify-content-center">
<div>
<?php
//Running query to fetch physician details
$row = get_physician_information_messaging($_SESSION['phy_ssn']);
//echo var_dump($row);
//$message = "test";
//insert_message($_SESSION['ssn'], $message, 0);
?>
<table class="table">
<thead class="thead-dark">
<tr>
<th scope="col" colspan="6">Physician Information</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">First Name:</th>
<td class="col-md-6"> <?php echo $row[0]?></td>
<th scope="row">Last Name:</th>
<td class="col-md-6"> <?php echo 'Dr. ' . $row[2]?></td>
</tr>
<tr>
<th scope="row">Phone Number:</th>
<td class="col-md-6"><?php echo $row[3] ?></td>
<th scope="row">Speciality:</th>
<td class="col-md-6"><?php echo $row[4] ?></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<br>
<div class="container h-100">
<div class="row align-items-center h-100">
<div class="col-12 mx-auto">
<div class="card h-100 border-primary justify-content-center">
<div>
<form method="get" action="new_appointment.php">
<table class="table">
<thead class="thead-dark">
<tr>
<th scope="col" colspan="2">Reason for visit</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div class="form-group">
<label for="visit_reason">Enter your reason for the visit. Be as descriptive as possible.</label>
<textarea class="form-control" id="visit_reason" rows="3" name="reason"></textarea>
</div>
</td>
</tr>
<tr>
<td>
<div class="container">
<div class="row">
<div class='col-sm-6'>
<input size="16" type="text" class="form-control" id="datetime" readonly>
<script type="text/javascript">
$("#datetime").datetimepicker({
format: 'yyyy-mm-dd hh:ii'
});
</script>
</div>
</div>
</div>
</td>
</tr>
<tr>
<td class="text-center">
<button type="submit" class="btn btn-success" name="confirm">Confirm</button>
<button type="submit" class="btn btn-danger" name="cancel">Cancel</button>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
Could someone point out my issue? (Note: All of the code I have used for the datetimepicker were copied pasted from tutorials which is another reason as to why I am puzzled.)

Related

issue with Jquery Tables

I was given support on a previous question regarding selecting a TR directly after the previous - problem I'm facing now is when I added this SECOND TR to the table structure I'm loosing all the functions of the Jquery DataTables from https://datatables.net/ like the search and the page counter ext... if I remove that second TR it works fine - what am I missing? what's conflicting?
The HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--IMPORT GREYBOX -->
<script type="text/javascript">
var GB_ROOT_DIR = "/greybox/";
</script>
<script type="text/javascript" src="greybox/AJS.js"></script>
<script type="text/javascript" src="greybox/gb_scripts.js"></script>
<link href="greybox/gb_styles.css" rel="stylesheet" type="text/css" />
<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.23/js/jquery.dataTables.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.23/css/jquery.dataTables.css">
<script src="https://cdn.jsdelivr.net/npm/#popperjs/core#2.5.4/dist/umd/popper.min.js" integrity="sha384-q2kxQ16AaE6UbzuKqyBE9/u/KzioAlnx2maXQHiDX9d4/zp8Ok3f+M7DPm+Ib6IU" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#4.6.0/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="css/main.css">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<script src="js/main.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#table_idh').DataTable();});
</script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand fa fa-car" href="#"><span style="color:orange;font-family: impact; margin-left: 5px;">MTC AUTO</span></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="index.php">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" id="addClient" href="addRecord.php" title="Add Client" rel="gb_page_center[500,500]">Add Client</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#">Disabled</a>
</li>
</ul>
<form action="inc/server.php?logout=true" method="POST">
<input type="button" disabled class="btn btn-primary m15" value="Hello <? echo $username; ?>">
<input type="submit" class="btn btn-warning m15" name="logout" value="Logout">
</form>
</div>
</nav>
<div class="container" style="margin-top: 95px;">
<table id="table_idh" class="display m95">
<thead>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Phone Number</th>
<th>Email</th>
<th>Date/Birth</th>
<th>Income</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<!-- Get Records From Db-->
<?php include 'inc/getRecords.php'; ?>
</tbody>
</table>
</div>
The Jquery
$(document).ready(()=> {
const $addClient = $('#addClient');
$addClient.hover(()=>{
$addClient.css({"color":"red","text-decoration":"underline"});
},()=> {
$addClient.css({"color":"black","text-decoration":"none"});
});
$('.trigger').on('click',(e) => {
$(e.target).closest('tr').next('tr').toggleClass('hide');
})
})
The Table Insert from database loop - that second TR is causing issue when I remove it I get all the functions back -
echo "
<tr>
<td class='trigger'>".$firstName."</td>
<td>".$lastName."</td>
<td>".$phone."</td>
<td><a href='mailto:".$email."'>".$email."</a></td>
<td>".$dob."</td>
<td>".$emp_income."</td>
<td>".$dateIn."</td>
</tr>
<tr class='hide'>
<td colspan=7>Address: ".$address." <br> Province: ".$prov." <br> Postal Code:
".$post." <br>RentOrOwn: ".$rent_or_own." <br>House Payment: ".$house_payment."<br>Shopping: ".$shopping."<br> Employer:".$emp_name."<br>Job Title: ".$emp_title."<br>Employment Time: ".$emp_time."<br>Downpayment: ".$downpayment." </td>
</tr>
";
Please use/load table activate code on the last.
$(document).ready(function() {
$('#table_idh').DataTable();
});
You can use it on the bottom of your page body.
And also load cdn.datatables.net files after load bootstrap files.
Footer/Bottom of the body will be best.
#### Solution ####
Solved the problem of colspan support by adding an "invisible" cell for every cell.
echo "
<tr>
<td class='trigger'>".$firstName."</td>
<td>".$lastName."</td>
<td>".$phone."</td>
<td><a href='mailto:".$email."'>".$email."</a></td>
<td>".$dob."</td>
<td>".$emp_income."</td>
<td>".$dateIn."</td>
</tr>
<tr class='hide' >
<td width='100%'>
Address: ".$address."
<br> Province: ".$prov."
<br> Postal Code: ".$post."
<br>RentOrOwn: ".$rent_or_own."
<br>House Payment: ".$house_payment."
<br>Shopping: ".$shopping."
<br> Employer:".$emp_name."
<br>Job Title: ".$emp_title."
<br>Employment Time: ".$emp_time."
<br>Downpayment: xxx".$downpayment."
</td>
<!-- hidden column 6 for proper DataTable applying -->
<td style='display: none'></td>
<td style='display: none'></td>
<td style='display: none'></td>
<td style='display: none'></td>
<td style='display: none'></td>
<td style='display: none'></td>
<td style='display: none'></td>
</tr>
";

Php and bootstrap code related to E-commerce website [duplicate]

This question already has answers here:
PHP parse/syntax errors; and how to solve them
(20 answers)
Closed 5 years ago.
Hi i am very new to PHP and Bootstrap. I developed a E-commerce website using php and Bootstrap.This application just adds and removes products to and fro into cart and also calculate the total price of all products and if a user have a coupon he can able to apply it 'off30' so,he will get a 30% discount on total price.I am going through error as Parse error: syntax error, unexpected end of file pointing the last line of below code. please help me to solve this error.
<?php
session_start();
error_reporting("E_ALL");
require_once("dbcontroller.php");
$conn = connectDB();
if(!empty($_GET["action"])) {
//echo $_GET["action"];
switch($_GET["action"]) {
case "add":
if(!empty($_POST["quantity"])) {
$productByCode = mysqli_query($conn,"SELECT * FROM tblproduct WHERE code='" . $_GET["code"] . "'");
$products = mysqli_fetch_array($productByCode);
$itemArray = array($products["code"]=>array('name'=>$products["name"], 'code'=>$products["code"], 'quantity'=>$_POST["quantity"], 'price'=>$products["price"]));
if(!empty($_SESSION["cart_item"])) {
if(in_array($products["code"],array_keys($_SESSION["cart_item"]))) {
foreach($_SESSION["cart_item"] as $k => $v) {
if($products[0]["code"] == $k) {
if(empty($_SESSION["cart_item"][$k]["quantity"])) {
$_SESSION["cart_item"][$k]["quantity"] = 0;
}
$_SESSION["cart_item"][$k]["quantity"] += $_POST["quantity"];
}
}
} else {
$_SESSION["cart_item"] = array_merge($_SESSION["cart_item"],$itemArray);
}
} else {
$_SESSION["cart_item"] = $itemArray;
}
}
break;
case "remove":
if(!empty($_SESSION["cart_item"])) {
foreach($_SESSION["cart_item"] as $k => $v) {
if($_GET["code"] == $k)
unset($_SESSION["cart_item"][$k]);
if(empty($_SESSION["cart_item"]))
unset($_SESSION["cart_item"]);
}
}
break;
case "empty":
unset($_SESSION["cart_item"]);
break;
}
}
if($_SERVER['REQUEST_METHOD'] == 'POST'){
$coupon = $_POST["coupon"];
$total = $_POST["total"];
if($coupon == "off30"){
$disc_item_total = $total*0.7;
}
else{
$disc_item_total = $total;
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>All In One</title>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="css/business-casual.css" rel="stylesheet">
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Josefin+Slab:100,300,400,600,700,100italic,300italic,400italic,600italic,700italic" rel="stylesheet" type="text/css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="brand">All In One</div>
<!-- Navigation -->
<nav class="navbar navbar-default" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- navbar-brand is hidden on larger screens, but visible when the menu is collapsed -->
<a class="navbar-brand" href="index.html">Business Casual</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li>
Home
</li>
<li>
About
</li>
<li>
Blog
</li>
<li>
<a id="btnEmpty" href="about.php?action=empty">Empty Cart</a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<?php
if(isset($_SESSION["cart_item"])){
$item_total = 0;
?>
<div class="container">
<div class="row">
<div class="box">
<div class="col-lg-12">
<hr>
<h2 class="intro-text text-center">
<strong>Products</strong>in Cart
</h2>
<hr>
</div>
<div class="col-md-6">
<table class="table table-hover">
<thead>
<tr>
<th>Name</th>
<th>Code</th>
<th>Quantity</th>
<th>Price</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php foreach ($_SESSION["cart_item"] as $item)
{
?>
<tr>
<td><strong><?php echo $item["name"]; ?></strong></td>
<td > <?php echo $item["code"]; ?></td>
<td > <?php echo $item["quantity"]; ?></td>
<td > <?php echo "Rs.".$item["price"]; ?></td>
<td > Remove Item</td>
</tr>
<?php
$item_total += ($item["price"]*$item["quantity"]);
}
?>
<tr>
<td colspan="3" align=right>Total:</td>
<td colspan="3"><b>Rs.=<?php $item_total;?></b></td>
</tr>
<tr>
<td colspan="3" align=right>Apply Coupon:</td>
<td>
<form action="" method="post">
<input type="text" id="coupon" name="coupon" value=""/>
<input type="hidden" name="total" value="<?php $item_total;?>">
</td>
<td>
<button type="submit" >Apply</button>
</form>
</td>
</tr>
<tr>
<td align=right colspan="3"> Discounted Amount:</td>
<td colspan="3"><b><?php "=Rs.".$disc_item_total; ?></b></td>
</tr>
</tbody>
<!--<?php echo $disc_item_total; ?>-->
</table>
<?php
}
?>
</div>
<div class="clearfix"></div>
</div>
</div>
<div class="row">
<div class="box">
<div class="col-lg-12">
<hr>
<h2 class="intro-text text-center">
<strong>Products</strong>
</h2>
<hr>
</div>
<?php
$product_array = mysqli_query($conn,"SELECT * FROM tblproduct ORDER BY id ASC");
//echo mysqli_num_rows($product_array);
if (!empty($product_array)) {
while($products = mysqli_fetch_array($product_array)){
?>
<div class="col-md-3 col-sm-6 hero-feature">
<div class="thumbnail">
<form method="post" action="about.php?action=add&code=<?php echo $products["code"]; ?>">
<div class="item active">
<img class="img-responsive img-full" src="img/a1.png" alt="">
</div>
<div class="caption">
<h4 class="pull-right"><?php echo "$".$products["price"]; ?></h4>
<h4><?php echo $products["name"]; ?></h4>
<div><input type="text" name="quantity" value="1" size="2" />
<p>
<input type="submit" value="Add to cart" class="btn btn-info" /></div>
</p>
</div>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
<!-- /.container -->
<footer>
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<p>Copyright © Your Website 2014</p>
</div>
</div>
</div>
</footer>
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
The if(!empty($product_array)) and while($products = .....) loops are not closed. It might be a good idea to start indenting your code so that way you can see when something is off, it really help keep track of opening and closing tags.

selenium cannot find element that is visible on page

Running PHP, Laravel and Selenium, using the Modelizer/Selenium package. I have a simple form (made with LaravelCollective) that has no hidden elements or fancy javascript.
The form and test code are posted below.
I get
1) can_search_by_city::testCanSearchByCity
Modelizer\Selenium\Exceptions\CannotFindElement: Cannot find element: Search by City isn't visible on the page
I've reviewed all the similar questions. Nothing that is not super-specific to another problem.
Here is my code and then my form...
$this->visit('/login')
->type($this->User->email, 'email')
->type('secret', 'password')
->press('Login')
->see('Searches')
->type('queensbury ny','address')
->type('100','distance')
->wait(20)
->click('Search by City')
->see('Glens Falls #81')
;
}
and then my form...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title> Welcome
- Elk RV Parking</title>
<!-- Fonts -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css" integrity="sha384-XdYbMnZ/QjLh6iI4ogqCTaIjrFk87ip+ekIjefZch0Y+PvJ8CDYtEs1ipDmPorQ+" crossorigin="anonymous">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:100,300,400,700">
<!-- Styles -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<style>
body {
font-family: 'Lato';
}
.fa-btn {
margin-right: 6px;
}
</style>
</head>
<body id="app-layout">
<nav class="navbar navbar-default navbar-static-top">
<div class="container">
<div class="navbar-header">
<!-- Collapsed Hamburger -->
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#app-navbar-collapse">
<span class="sr-only">Toggle Navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- Branding Image -->
<a class="navbar-brand" href="http://localhost:8000">
Elk RV Parking
</a>
</div>
<div class="collapse navbar-collapse" id="app-navbar-collapse">
<!-- Left Side Of Navbar -->
<ul class="nav navbar-nav">
<li>Home</li>
</ul>
<!-- Right Side Of Navbar -->
<ul class="nav navbar-nav navbar-right">
<!-- Authentication Links -->
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
Ed Greenberg <span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li><i class="fa fa-btn fa-sign-out"></i>Logout</li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="row">
<div class="col-md-10 col-md-offset-1">
<div class="panel panel-default">
<div class="panel-heading">Welcome to Elk RV Parking</div>
<div class="panel-body">
<h1>Searches</h1>
<h2>by distance from a city or address</h2>
<form method="POST" action="http://localhost:8000/search/address" accept-charset="UTF-8" id="search-by-city"><input name="_token" type="hidden" value="CBphF66rzzk3MbYiNpLK2EsC1jxqVAt6XwRQA9vo">
<input name="_token" type="hidden" value="CBphF66rzzk3MbYiNpLK2EsC1jxqVAt6XwRQA9vo">
<div class="row">
<div class="col-md-8">Enter a city, state, a state, an address, anything that Google Maps would properly search</div>
<div class="col=md-4">Distance</div>
</div>
<div class="row">
<div class="col-md-8"><input size="50" name="address" type="text" value=""></div>
<div class="col=md-4"><input name="distance" type="text"></div>
</div>
<div>
<div><input type="submit" value="Search by City"></div>
</div>
</form>
<h2>byLodge Number</h2>
<form method="POST" action="http://localhost:8000/search/lodgenumber" accept-charset="UTF-8" id="search-by-lodge-number"><input name="_token" type="hidden" value="CBphF66rzzk3MbYiNpLK2EsC1jxqVAt6XwRQA9vo">
<input name="_token" type="hidden" value="CBphF66rzzk3MbYiNpLK2EsC1jxqVAt6XwRQA9vo">
<div class="row">
<div class="col-md-8">Enter a lodge number</div>
</div>
<div class="row">
<div class="col-md-8"><input size="10" name="lodge_number" type="text" value=""></div>
</div>
<div class="row">
<div class="col-md-8"><input type="submit" value="Search by Lodge Number"></div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- JavaScripts -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.3/jquery.min.js" integrity="sha384-I6F5OKECLVtK/BL+8iSLDEHowSAfUo76ZL9+kGAgTRdiByINKJaqTPH/QVNS1VDb" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
</body>
</html>
My understanding is that Selenium looks for the element by it's value. In ths case, "Search by City". I don't see why it's not visible.
You may want to use press API to perform the required operation. As, based on the information available on Modelizer/Laravel-Selenium wiki, click looks for the name, id or text property of the anchor tag. Hence, you can try following:
$this->visit('/login')
->type($this->User->email, 'email')
->type('secret', 'password')
->press('Login')
->see('Searches')
->type('queensbury ny','address')
->type('100','distance')
->wait(20)
->press('Search by City')
->see('Glens Falls #81')

Issue in inserting data using PHP and MySQLi

My code is working fine, but the problem is I can't insert data with same userid. Like only I can add only row with userid same in row - how can I insert data with same rows?
I can't add same thing in next rows like userid = 1 email= test#test.com message=hello.
Like when I send from userid 1 message is = hello and email = hassan#test.com, but when I send it again with different message its not inserting into database and sending previous message.
<?php
//mysqli connectivity, select database
$connect= new mysqli("localhost","root","","demo") or die("ERROR:could not connect to the database!!!");
//extract all html field
extract($_POST);
if(isset($save))
{
//store textarea values in <pre> tag
$msg="$a";
//insert values in textarea table
$query="insert into textarea values('','$e','$msg')";
$connect->query($query);
echo "Data saved";
$query1="select * from textarea";
$result=$connect->query($query1);
while($row=$result->fetch_array())
{
$email = $row['email'];
$message1 =$row['message'];
}
$type = "xml";
$tos = preg_replace('#\s+#',',',trim($email));
$id = "id";
$pass = "pass";
$lang = "English";
$mask = "VOGUE";
// Data for text message
$to = "$tos";
$message = "$message1";
// Prepare data for POST request
$data = "id=".$id."&pass=".$pass."&msg=".$message."&to=".$to."&lang=".$lang."&mask=".$mask."&type=".$type;
// Send the POST request with cURL
$ch = curl_init('http://www.outreach.pk/api/sendsms.php/sendsms/url');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch); //This is the result from Outreach
curl_close($ch);
}
?>
<html>
<head>
<style>
input,textarea{width:250px}
textarea{height:200px}
input[type=submit]{width:150px}
</style>
<!--
* #Package: Ultra Admin - Responsive Theme
* #Subpackage: Bootstrap
* #Version: 1.0
* This file is part of Ultra Admin Theme.
-->
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<meta charset="utf-8" />
<title> Admin : Sms Send</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta content="" name="description" />
<meta content="" name="author" />
<link rel="shortcut icon" href="assets/images/favicon.png" type="image/x-icon" /> <!-- Favicon -->
<link rel="apple-touch-icon-precomposed" href="assets/images/apple-touch-icon-57-precomposed.png"> <!-- For iPhone -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/images/apple-touch-icon-114-precomposed.png"> <!-- For iPhone 4 Retina display -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/images/apple-touch-icon-72-precomposed.png"> <!-- For iPad -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/images/apple-touch-icon-144-precomposed.png"> <!-- For iPad Retina display -->
<!-- CORE CSS FRAMEWORK - START -->
<link href="assets/plugins/pace/pace-theme-flash.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/plugins/bootstrap/css/bootstrap-theme.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/fonts/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/animate.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/plugins/perfect-scrollbar/perfect-scrollbar.css" rel="stylesheet" type="text/css"/>
<!-- CORE CSS FRAMEWORK - END -->
<!-- OTHER SCRIPTS INCLUDED ON THIS PAGE - START -->
<!-- OTHER SCRIPTS INCLUDED ON THIS PAGE - END -->
<!-- CORE CSS TEMPLATE - START -->
<link href="assets/css/style.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/responsive.css" rel="stylesheet" type="text/css"/>
<!-- CORE CSS TEMPLATE - END -->
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class=" ">
<!-- START TOPBAR -->
<div class='page-topbar '>
<div class='logo-area'>
</div>
</div>
<!-- END TOPBAR -->
<!-- START CONTAINER -->
<div class="page-container row-fluid">
<!-- SIDEBAR - START -->
<div class="page-sidebar ">
<!-- MAIN MENU - START -->
<?php include('header.php'); ?>
<!-- MAIN MENU - END -->
</div>
<!-- SIDEBAR - END -->
<!-- START CONTENT -->
<section id="main-content" class=" ">
<section class="wrapper" style='margin-top:60px;display:inline-block;width:100%;padding:15px 0 0 15px;'>
<div class='col-lg-12 col-md-12 col-sm-12 col-xs-12'>
<div class="page-title">
<div class="pull-left">
<h1 class="title">Form Validations</h1> </div>
</div>
</div>
<div class="clearfix"></div>
<div class="col-lg-6">
<section class="box ">
<header class="panel_header">
<h2 class="title pull-left">Message Validations</h2>
</header>
<form method="post">
<table width="200" border="1">
<tr>
<td>Email</td>
<td><textarea type="text" name="e" /></textarea></td>
</tr>
<tr>
<td>Message</td>
<td><textarea placeholder="contents" name="a"></textarea></td>
</tr>
<tr>
<td colspan="2">
<input type="submit" value="Save" name="save"/>
<input type="submit" value="Display" name="disp"/>
</td>
</tr>
</table>
</form>
</section></div>
</section>
</section>
<!-- END CONTENT -->
<div class="page-chatapi hideit">
<div class="search-bar">
<input type="text" placeholder="Search" class="form-control">
</div>
<div class="chat-wrapper">
<h4 class="group-head">Groups</h4>
<ul class="group-list list-unstyled">
<li class="group-row">
<div class="group-status available">
<i class="fa fa-circle"></i>
</div>
<div class="group-info">
<h4>Work</h4>
</div>
</li>
<li class="group-row">
<div class="group-status away">
<i class="fa fa-circle"></i>
</div>
<div class="group-info">
<h4>Friends</h4>
</div>
</li>
</ul>
<h4 class="group-head">Favourites</h4>
<ul class="contact-list">
<li class="user-row" id='chat_user_1' data-user-id='1'>
<div class="user-img">
<img src="data/profile/avatar-1.png" alt="">
</div>
<div class="user-info">
<h4>Clarine Vassar</h4>
<span class="status available" data-status="available"> Available</span>
</div>
<div class="user-status available">
<i class="fa fa-circle"></i>
</div>
</li>
<li class="user-row" id='chat_user_2' data-user-id='2'>
<div class="user-img">
<img src="data/profile/avatar-2.png" alt="">
</div>
<div class="user-info">
<h4>Brooks Latshaw</h4>
<span class="status away" data-status="away"> Away</span>
</div>
<div class="user-status away">
<i class="fa fa-circle"></i>
</div>
</li>
<li class="user-row" id='chat_user_3' data-user-id='3'>
<div class="user-img">
<img src="data/profile/avatar-3.png" alt="">
</div>
<div class="user-info">
<h4>Clementina Brodeur</h4>
<span class="status busy" data-status="busy"> Busy</span>
</div>
<div class="user-status busy">
<i class="fa fa-circle"></i>
</div>
</li>
</ul>
<h4 class="group-head">More Contacts</h4>
<ul class="contact-list">
<li class="user-row" id='chat_user_4' data-user-id='4'>
<div class="user-img">
<img src="data/profile/avatar-4.png" alt="">
</div>
<div class="user-info">
<h4>Carri Busey</h4>
<span class="status offline" data-status="offline"> Offline</span>
</div>
<div class="user-status offline">
<i class="fa fa-circle"></i>
</div>
</li>
<li class="user-row" id='chat_user_5' data-user-id='5'>
<div class="user-img">
<img src="data/profile/avatar-5.png" alt="">
</div>
<div class="user-info">
<h4>Melissa Dock</h4>
<span class="status offline" data-status="offline"> Offline</span>
</div>
<div class="user-status offline">
<i class="fa fa-circle"></i>
</div>
</li>
<li class="user-row" id='chat_user_6' data-user-id='6'>
<div class="user-img">
<img src="data/profile/avatar-1.png" alt="">
</div>
<div class="user-info">
<h4>Verdell Rea</h4>
<span class="status available" data-status="available"> Available</span>
</div>
<div class="user-status available">
<i class="fa fa-circle"></i>
</div>
</li>
<li class="user-row" id='chat_user_7' data-user-id='7'>
<div class="user-img">
<img src="data/profile/avatar-2.png" alt="">
</div>
<div class="user-info">
<h4>Linette Lheureux</h4>
<span class="status busy" data-status="busy"> Busy</span>
</div>
<div class="user-status busy">
<i class="fa fa-circle"></i>
</div>
</li>
<li class="user-row" id='chat_user_8' data-user-id='8'>
<div class="user-img">
<img src="data/profile/avatar-3.png" alt="">
</div>
<div class="user-info">
<h4>Araceli Boatright</h4>
<span class="status away" data-status="away"> Away</span>
</div>
<div class="user-status away">
<i class="fa fa-circle"></i>
</div>
</li>
<li class="user-row" id='chat_user_9' data-user-id='9'>
<div class="user-img">
<img src="data/profile/avatar-4.png" alt="">
</div>
<div class="user-info">
<h4>Clay Peskin</h4>
<span class="status busy" data-status="busy"> Busy</span>
</div>
<div class="user-status busy">
<i class="fa fa-circle"></i>
</div>
</li>
<li class="user-row" id='chat_user_10' data-user-id='10'>
<div class="user-img">
<img src="data/profile/avatar-5.png" alt="">
</div>
<div class="user-info">
<h4>Loni Tindall</h4>
<span class="status away" data-status="away"> Away</span>
</div>
<div class="user-status away">
<i class="fa fa-circle"></i>
</div>
</li>
<li class="user-row" id='chat_user_11' data-user-id='11'>
<div class="user-img">
<img src="data/profile/avatar-1.png" alt="">
</div>
<div class="user-info">
<h4>Tanisha Kimbro</h4>
<span class="status idle" data-status="idle"> Idle</span>
</div>
<div class="user-status idle">
<i class="fa fa-circle"></i>
</div>
</li>
<li class="user-row" id='chat_user_12' data-user-id='12'>
<div class="user-img">
<img src="data/profile/avatar-2.png" alt="">
</div>
<div class="user-info">
<h4>Jovita Tisdale</h4>
<span class="status idle" data-status="idle"> Idle</span>
</div>
<div class="user-status idle">
<i class="fa fa-circle"></i>
</div>
</li>
</ul>
</div>
</div>
<div class="chatapi-windows ">
</div> </div>
<!-- END CONTAINER -->
<!-- LOAD FILES AT PAGE END FOR FASTER LOADING -->
<!-- CORE JS FRAMEWORK - START -->
<script src="assets/js/jquery-1.11.2.min.js" type="text/javascript"></script>
<script src="assets/js/jquery.easing.min.js" type="text/javascript"></script>
<script src="assets/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="assets/plugins/pace/pace.min.js" type="text/javascript"></script>
<script src="assets/plugins/perfect-scrollbar/perfect-scrollbar.min.js" type="text/javascript"></script>
<script src="assets/plugins/viewport/viewportchecker.js" type="text/javascript"></script>
<!-- CORE JS FRAMEWORK - END -->
<!-- OTHER SCRIPTS INCLUDED ON THIS PAGE - START -->
<script src="assets/plugins/jquery-validation/js/jquery.validate.min.js" type="text/javascript"></script> <script src="assets/plugins/jquery-validation/js/additional-methods.min.js" type="text/javascript"></script> <script src="assets/js/form-validation.js" type="text/javascript"></script> <!-- OTHER SCRIPTS INCLUDED ON THIS PAGE - END -->
<!-- CORE TEMPLATE JS - START -->
<script src="assets/js/scripts.js" type="text/javascript"></script>
<!-- END CORE TEMPLATE JS - END -->
<!-- Sidebar Graph - START -->
<script src="assets/plugins/sparkline-chart/jquery.sparkline.min.js" type="text/javascript"></script>
<script src="assets/js/chart-sparkline.js" type="text/javascript"></script>
<!-- Sidebar Graph - END -->
<!-- General section box modal start -->
<div class="modal" id="section-settings" tabindex="-1" role="dialog" aria-labelledby="ultraModal-Label" aria-hidden="true">
<div class="modal-dialog animated bounceInDown">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Section Settings</h4>
</div>
<div class="modal-body">
Body goes here...
</div>
<div class="modal-footer">
<button data-dismiss="modal" class="btn btn-default" type="button">Close</button>
<button class="btn btn-success" type="button">Save changes</button>
</div>
</div>
</div>
</div>
<!-- modal end -->
</body>
</html>
If your need duplicate rows, remove indexes from the table:
ALTER TABLE `textarea`
DROP INDEX `message`
DROP INDEX `user_id`
DROP INDEX `numb`
DROP PRIMARY KEY;
The above is one statement.
Please also read the manual

how to show jquery rating in html <list> tag in while loop using multiple tables

i want to show rating of each item or name of company with company name (driven from another table in database) in "li" tag of html (transporters.php). I have got the rating for each company page individually (transporters2.php) but i want to get all the ratings of all the companies or items in "li" tab so user can overview it and after clicking an "li" item it will show the profile of company "transporters2.php". Here are my two files transporters.php and transporters2.php and also their snapshots.
transporters.php and transporters2.php ,Mydatabase
Note: Both files are working correctly there is no syntax error, if an error occurs that might be occurred while posting the question thanks.
Transporters.php
<?php
include "header.php";
?>
<!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 charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<script src="../js/jquery.js" type="text/javascript"></script>
<link rel="stylesheet" href="../css/rating.css" />
<script type="text/javascript" src="../js/rating.js"></script><title>Transporters</title>
<!-- Bootstrap Core CSS -->
<link href="file:///C|/xampp/htdocs/bin/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="file:///C|/xampp/htdocs/bin/css/modern-business.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="file:///C|/xampp/htdocs/bin/font-awesome/css/font
awesome.min.css" rel="stylesheet" type="text/css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<link href="../css/example.css" rel="stylesheet" type="text/css" />
<link href="../css/style.css" rel="stylesheet" type="text/css" />
<script
src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">
</script>
</head>
<body>
<!-- Page Content -->
<div class="container">
<!-- Page Heading/Breadcrumbs -->
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Transporters
<small> Companies</small>
</h1>
<ol class="breadcrumb">
<li>Home
</li>
<li class="active">Transporters</li>
</ol>
</div>
</div>
<!-- /.row -->
<!-- Content Row -->
<div class="row">
<div class="col-lg-12"><?php
require("Config.php");
$sql =mysql_query("SELECT * FROM transporters");
?>
<ul style="list-style:none;">
<?php while($row=mysql_fetch_array($sql) )
{
$cid=$row['CompanyID'];
?>
<div class="panel-group" id="accordion">
<div class="panel panel-default">
<div class="panel-heading">
<li><div class="product" style="font: 10px verdana, sans-serif;margin: 0 auto 40px auto;width: 71px;height: 4px;margin-right: 75%;">
<div id="<?php echo $cid ?>" class="ratings" style="border: 1px solid #CCC;overflow: visible;padding: 10px;position: relative;width: 182px;height: 47px;float: left;margin-left: -195px;"><div class="star_1 ratings_stars ratings_vote"></div><div class="star_2 ratings_stars ratings_vote"></div><div class="star_3 ratings_stars ratings_vote"></div><div class="star_4 ratings_stars ratings_blank"></div><div class="star_5 ratings_stars ratings_blank"></div>
</div>
<a href='transporters2.php?CompanyID=<?php echo $cid;?>'><?php print $row['CompanyName']; ?>
</a></div>
</li>
</div>
</div>
</div>
<?php
}//end of while loop
?>
</ul>
</div>
</div>
<script>
function sendcompanyname()
{
var x= document.getElementById("cpn").value;
}
</script>
</body></html>
Transporters2.php
<?php
$db=mysqli_connect("localhost","root","","db1") or die("unable to connect");
include("header.php");
$cname;
if(isset($_GET['CompanyID'])){
$CompanyID = $_GET['CompanyID'];
$get_name= "SELECT * from `transporters` where `CompanyID`='$CompanyID'";
$run_name= mysqli_query($db,$get_name);
while($row_name=mysqli_fetch_array($run_name)){
$cname = $row_name['CompanyName'];}
}
include("settings.php");
connect();
$ids=array(1);
?>
<!DOCTYPE html>
<html>
<head>
<script src="../js/jquery.js" type="text/javascript"></script>
<link rel="stylesheet" href="../css/rating.css" />
<!--<script type="text/javascript" src="../js/rating.js"></script>-->
<script>
$(document).ready(function() {
$('.ratings_stars').hover(
// Handles the mouseover
function() {
$(this).prevAll().andSelf().addClass('ratings_over');
$(this).nextAll().removeClass('ratings_vote');
},
// Handles the mouseout
function(){
$(this).prevAll().andSelf().removeClass('ratings_over');
}
);
//send ajax request to rate.php
$('.ratings_stars').bind('click', function(){
var id=$(this).parent().attr("id");
var num=$(this).attr("class");
var poststr="id="+id+"&stars="+num;
$.ajax({url:"../bin/rate.php",cache:0,data:poststr,success:function(result){
document.getElementById(id).innerHTML=result;}
});
});
});
</script>
</head>
<body>
<!-- Page Content -->
<div class="container">
<!-- /.row -->
<div class="row">
<?php
for($i=0;$i<count($ids);$i++)
{
$rating_tableName = 'ratings';
$id=$CompanyID;
$q="SELECT total_votes, total_value FROM $rating_tableName WHERE id=$id";
$r=mysql_query($q);
if(!$r) echo mysql_error();
while($row=mysql_fetch_array($r))
{
$v=$row['total_votes'];
$tv=$row['total_value'];
$rat=$tv/$v;
}
$id=$CompanyID;
$j=$id;
echo'<div class="product">
Rate Item '.$j.'
<div id="rating_'.$id.'" class="ratings">';
for($k=1;$k<6;$k++){
if($rat+1>$k)$class="star_".$k."ratings_stars ratings_vote";
else $class="star_".$k." ratings_stars ratings_blank";
echo '<div class="'.$class.'"></div>';
}
echo' <div class="total_votes"><p class="voted"> Rating
<strong>'.#number_format($rat).'</strong>/5 ('.$v. 'vote(s) cast)
</div>
</div></div>';}
?>
<div class="col-lg-12">
<h2 class="page-header"><?php echo $cname;?></h2>
</div>
<!--<div class="col-md-3 col-sm-6">
<div class="panel panel-default text-center">
<div class="panel-heading">
<span class="fa-stack fa-5x">
<i class="fa fa-circle fa-stack-2x text-primary"></i>
<i class="fa fa-car fa-stack-1x fa-inverse"></i>
</span>
</div>
<div class="panel-body">
<h4>Show Drivers</h4>
<p>Show drivers of this company.</p>
<button id="popup" onclick="div_show()" class="btn btn
primary">Add</button>
</div>
</div>
</div>-->
<div class="col-md-3 col-sm-6">
<div class="panel panel-default text-center">
<div class="panel-heading">
<span class="fa-stack fa-5x">
<i class="fa fa-circle fa-stack-2x text-primary"></i>
<i class="fa fa-support fa-stack-1x fa-inverse"></i>
</span>
</div>
<div class="panel-body">
<h4>Show routes</h4>
<p>check which routes are following this company...</p>
<a href="routes.php?CompanyID=<?php echo $CompanyID;?>" class="btn btn
primary">show routes</a>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6">
<div class="panel panel-default text-center">
<div class="panel-heading">
<span class="fa-stack fa-5x">
<i class="fa fa-circle fa-stack-2x text-primary"></i>
<i class="fa fa-database fa-stack-1x fa-inverse"></i>
</span>
</div>
<div class="panel-body">
<h4>Schedule</h4>
<p>Check the timings of journey.</p>
Show Schedule
</div>
</div>
</div>
<div class="col-md-3 col-sm-6">
<div class="panel panel-default text-center">
<div class="panel-heading">
<span class="fa-stack fa-5x">
<i class="fa fa-circle fa-stack-2x text-primary"></i>
<i class="fa fa-database fa-stack-1x fa-inverse"></i>
</span>
</div>
<div class="panel-body">
<h4>Show Drivers Positions</h4>
<p>Check the positions of all drivers.</p>
<a href="positions.php" class="btn btn-primary">Show Drivers
Positions</a>
</div>
</div>
</div>
</div>
</div>
<!---END Page Content-->
</body>
</html>

Categories