<?php
if($_POST["pswd"]=="ea8a706c4c34a168"){
require_once('includes/configure.php');
$conn = mysql_connect(constant("DB_SERVER"),constant("DB_SERVER_USERNAME"),constant("DB_SERVER_PASSWORD"));
mysql_select_db(constant("DB_DATABASE"),$conn);
$px=$_POST["px"];
$sl=$_POST["number"];
if($px=="shunxu"){$sql="update ".constant("DB_PREFIX")."products set products_status='1' where products_status='0' order by products_id asc limit ".$sl;}
if($px=="suiji"){$sql="update ".constant("DB_PREFIX")."products set products_status='1' WHERE products_status='0' and products_id >= ((SELECT MAX(products_id) FROM ".constant("DB_PREFIX")."products)-(SELECT MIN(products_id) FROM ".constant("DB_PREFIX")."products)) * RAND() + (SELECT MIN(products_id) FROM ".constant("DB_PREFIX")."products)  LIMIT ".$sl;}
mysql_query($sql,$conn);
echo "ok";}
?>