Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
надо править файл customer_survey.php.
// product detailed information view
if (isset($_GET["vote"]) && isset($productID)) //vote for a product
{
if (!isset($_SESSION["vote_completed"][ $productID ]) && isset($_GET["mark"]) && strlen($_GET["mark"])>0)
{
$mark = (float) $_GET["mark"];
if ($mark>0 && $mark<=5)
{
db_query("UPDATE ".PRODUCTS_TABLE." SET customers_rating=(customers_rating*customer_votes+'".$mark."')/(customer_votes+1), customer_votes=customer_votes+1 WHERE productID='".$productID."'") or die (db_error());
}
}
$_SESSION["vote_completed"][ $productID ] = 1;
}
// product detailed information view
if (isset($_GET["vote"]) && isset($productID)) //vote for a product
{
if (!isset($_GET["vote_completed"][ $productID ]) && isset($_GET["mark"]) && strlen($_GET["mark"])>0)
{
$mark = (float) $_GET["mark"];
if ($mark>0 && $mark<=5)
{
db_query("UPDATE ".PRODUCTS_TABLE." SET customers_rating=(customers_rating*customer_votes+'".$mark."')/(customer_votes+1), customer_votes=customer_votes+1 WHERE productID='".$productID."'") or die (db_error());
}
}
$_GET["vote_completed"][ $productID ] = 1;
}