<?php global $user, $GlobalConfig; if ($_REQUEST['warecode']) { if (!$_REQUEST['email'] || !$_REQUEST['phone']) { $note .= "Укажите e-mail или номер телефона<br>"; } if (!$_REQUEST['name']) { $note .= "Укажите Ф.И.О.<br>"; } if (!(int) $_REQUEST['yourprice']) { $note .= "Предложите Вашу цену<br>"; } if (!$_REQUEST['url']) { $note .= "Укажите ссылку на сайт с примером более низкой цены<br>"; } if (empty($_REQUEST['code']) || $_REQUEST['code'] != $_SESSION["security_code"]) { $note .= "Введенный вами код не совпадает с кодом указанным на картинке<br>"; } if (!$note) { $db = new DB_Mvideo(); $sql = "INSERT INTO yourprice\n (region_id, warecode, email, phone, name, yourprice, url, bonus_card, start_time) \n VALUES\n (" . (int) $GlobalConfig['RegionID'] . ", \n " . (int) $_REQUEST['warecode'] . ",\n '" . addslashes($_REQUEST['email']) . "', \n '" . addslashes($_REQUEST['phone']) . "', \n '" . addslashes($_REQUEST['name']) . "', \n " . (int) $_REQUEST["yourprice"] . ",\n '" . addslashes($_REQUEST['url']) . "',\n '" . addslashes($_REQUEST['bonus_card']) . "',\n NOW()\n )"; //echo $sql; $db->query($sql); $note = "Ваша заявка принята"; } header('Content-Type: text/html; charset=windows-1251'); echo $note; }
<?php $good = $_REQUEST['good']; $rid = $_REQUEST['rid']; if ($rid) { $db = new DB_Mvideo(); $db->query("update reviews_new set " . ($good == 1 ? "rew_good=rew_good+1, " : null) . "rew_total=rew_total+1 where rew_id=" . (int) $rid); // ставим куку setcookie("mvrew_" . $rid, 1, time() + 60 * 60 * 24 * 30, "/"); //30 дней } $html = "Спасибо. Ваш голос учтен."; $GLOBALS['_RESULT'] = array('html' => $html); echo $html;
*/ list($dev_id, $dev_name) = split(",", isset($_GET['device']) ? $_GET['device'] : ','); if ($appdb = new PDO('sqlite:/www/sites/newmvideo/data/iphone_app.sqlite')) { $appdb->Query("insert into app_stats values(datetime('now'), '{$_SERVER['REMOTE_ADDR']}', '{$dev_id}', '{$dev_name}')"); } error_log("" . date("Y/m/d H:i:s") . "\t" . $_SERVER['REMOTE_ADDR'] . "\t" . $_GET['device'] . "\n", 3, '/tmp/iphone_data_device.log'); if (isset($_GET['token'])) { error_log("" . date("Y/m/d H:i:s") . "\t" . $_SERVER['REMOTE_ADDR'] . "\t" . $_GET['device'] . "\t" . $_GET['token'] . "\n", 3, '/tmp/token.log'); if ($appdb = new PDO('sqlite:/www/sites/newmvideo/data/iphone_app.sqlite')) { $appdb->Query("insert into notification values(datetime('now'), '{$_SERVER['REMOTE_ADDR']}', '{$dev_id}', '{$dev_name}', '{$_GET[token]}')"); } exit; } // пїЅпїЅпїЅпїЅпїЅпїЅпїЅ , пїЅпїЅпїЅ пїЅпїЅпїЅ xml // пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅ пїЅпїЅпїЅпїЅпїЅ $db = new DB_Mvideo(); // пїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ - 1 $GlobalConfig["RegionID"] = 1; if (isset($_GET['region'])) { $GlobalConfig["RegionID"] = (int) $_GET['region']; } // пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ - 1 $category = 1; if (isset($_GET['category'])) { $category = (int) $_GET['category']; } if (isset($_GET['ids'])) { $ids = (int) $_GET['ids']; } // пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ switch ($category) {
<?php global $GlobalConfig, $tpl; $db = new DB_Mvideo(); $page = (int) $_REQUEST['page']; $type = (int) $_REQUEST['type']; $segment_name = $_REQUEST['segment_name']; $count = 0; if ($type == 1) { $limit = 6; $offset = ($page - 1) * $limit; $sql = "\n\t\t\t SELECT count(w.warecode) as cnt\n\t\t\t FROM segment_cache\n\t\t\t JOIN warez_" . $GlobalConfig['RegionID'] . " AS w ON w.warecode = segment_cache.warecode\n\t\t\t WHERE segment_cache.segment_name = '" . $segment_name . "'\n\t\t\t AND segment_cache.region_id=" . $GlobalConfig['RegionID'] . "\n\t\t\t"; $res = $db->query($sql); if ($row = @mysql_fetch_assoc($db->Query_ID)) { $count = $row['cnt']; } $sql = "\n SELECT DISTINCT\n\t w.warecode,\n\t\t w.FullName,\n\t\t m.MarkName,\n\t\t w.InetQty,\n\t\t Discounted,\n\t InetDiscounted,\n\t OldPrice,\n\t important\n\t\t FROM segment_cache\n\t\t JOIN warez_" . $GlobalConfig['RegionID'] . " AS w ON w.warecode = segment_cache.warecode\n\t\t JOIN marks AS m ON m.MarkID = w.mark\n\t\t WHERE segment_cache.segment_name = '" . $segment_name . "'\n\t\t AND segment_cache.region_id=" . $GlobalConfig['RegionID'] . "\n ORDER BY important DESC, InetQty DESC\n LIMIT 6\n\t\t OFFSET " . $offset . "\n\t "; } else { $limit = 4; $offset = ($page - 1) * $limit; $sql = "\n\t\t\t SELECT count(w.warecode) as cnt\n\t\t\t FROM segment_cache\n\t\t\t JOIN warez_" . $GlobalConfig['RegionID'] . " AS w ON w.warecode = segment_cache.warecode\n\t\t\t WHERE segment_cache.segment_name = '" . $segment_name . "_aks'\n\t\t\t AND segment_cache.region_id=" . $GlobalConfig['RegionID'] . "\n\t\t\t"; $res = $db->query($sql); if ($row = @mysql_fetch_assoc($db->Query_ID)) { $count = $row['cnt']; } $sql = "\n SELECT DISTINCT\n\t w.warecode,\n\t\t w.FullName,\n\t\t m.MarkName,\n\t\t w.InetQty,\n\t\t Discounted,\n\t InetDiscounted,\n\t OldPrice,\n\t important\n\t\t FROM segment_cache\n\t\t JOIN warez_" . $GlobalConfig['RegionID'] . " AS w ON w.warecode = segment_cache.warecode\n\t\t JOIN marks AS m ON m.MarkID = w.mark\n\t\t WHERE segment_cache.segment_name = '" . $segment_name . "_aks'\n\t\t AND segment_cache.region_id=" . $GlobalConfig['RegionID'] . "\n ORDER BY important DESC, InetQty DESC\n LIMIT 4\n\t\t OFFSET " . $offset . "\n\t "; } $db->query($sql); $num = 1; while ($row = @mysql_fetch_assoc($db->Query_ID)) { if ($row["MarkName"] && $row["FullName"]) {