\n"; print_r($arr); echo "\n"; } include("const.php"); include($path_to_function."/dynamic_site_head_new.php"); include($path_to_function."/order_functions.php"); include($path_to_function."/partner_functions.php"); include($path_to_templates."function.php"); include("init.php"); include("lang_init.php"); if ($_SERVER['REMOTE_ADDR']!='81.17.208.4') { require($main_path."/error.php"); } #---------------------------------------------------------------------------------------------- #ВОССТАНОВЛЕНИЕ ПАРОЛЯ if ($_GET[restore_key]) { $res=pg_exec($pgconn_3, "SELECT *,'".date("Y-m-d H:i:s")."'::timestamp-send_restore_pass_time AS intervel FROM order_clients WHERE id=".$_GET[id]." and '".date("Y-m-d H:i:s")."'::timestamp-send_restore_pass_time<'02:00:00'"); //echo("SELECT *,'".date("Y-m-d H:i:s")."'::timestamp-send_restore_pass_time FROM order_clients WHERE id=".$_GET[id]); if (pg_numrows($res)) { $tmp=(array)pg_fetch_object($res,0); //print_r($tmp); //if (date("Y-m-d H:i:s")-$tmp[send_restore_pass_time]>10000000 || 1) { $original_str=md5($tmp[send_restore_pass_key].$tmp[id]); //echo("original_str=$original_str<>".$_GET[restore_key]); if ($original_str==$_GET[restore_key]) { //Регистрируем пользователя $_SESSION["id_client"] = $tmp[id]; $_SESSION["login"] = $tmp[login]; $_SESSION["sethash"] = md5($tmp[passwd].session_id()); $kabinet=8; if ($_GET[continue_order]) { // Если пользователь восстановил пароль при оформлении заказа - обновляем карзину pg_exec($pgconn_3, "BEGIN"); pg_exec($pgconn_3, "DELETE FROM basket WHERE cookie=-".$tmp[id]); pg_exec($pgconn_3, "UPDATE basket SET cookie=-".$tmp[id]." WHERE cookie=".$_GET[continue_order]); pg_exec($pgconn_3, "COMMIT"); } pg_exec($pgconn_3, "UPDATE order_clients SET send_restore_pass_key=0 WHERE id='".$_GET[id]."'"); } //} } } if($_POST['catalog_order']==1)//kernel of order catalog script { $report_id=50; include($path_to_templates.'mail_report.php'); } if($_POST['subscription']==1)//kernel of mail subscription script { $report_id=100; include($path_to_templates.'mail_report.php'); } #---add goods to basket if need, disposition here, because at left_column.php view mini basket with number goods and general amount if ($_POST['go']==1 && $_POST['idc']!=null && $_POST['ids']!=null && $_POST['plu']!=null && $kabinet==null) { $plu=$_POST['plu']; //set rusgoods_basket if no cook or not auth #if auth work with id_client, if not auth - with cook #if exists increment volume $res=pg_exec($pgconn_3, "SELECT volume FROM basket WHERE cookie=".$_COOKIE['rusgoods_basket']." and tradex_plu=$plu"); if ($res && pg_numrows($res)) { $goods_arr=(array) pg_fetch_object($res,0); $count_goods=$goods_arr['volume']; } else { $count_goods=0; } if ($count_goods==0) { pg_exec($pgconn_3, "INSERT INTO basket (cookie, tradex_plu, volume) VALUES (".$_COOKIE['rusgoods_basket'].", $plu, ".$_POST['ammount'].")"); } else { $count_goods++; pg_exec($pgconn_3,"UPDATE basket SET volume=".$count_goods." WHERE cookie=".$_COOKIE['rusgoods_basket']." and tradex_plu=$plu"); } } #------------------------------------------------------------------------------------------------- #number of goods in basket /*if ($_COOKIE['rusgoods_basket']) { $res=pg_exec($pgconn_3,"select count(id_basket) from basket where cookie=".$_COOKIE['rusgoods_basket']); $tmp_count=(array) pg_fetch_object ($res,0); $count_goods=$tmp_count['count']; }*/ if(!$_GET['delete_all']) { $count_goods = basket_item($_COOKIE['rusgoods_basket']); $basket_sum = basket_sum($_COOKIE['rusgoods_basket']); } else { $count_goods = 0; $basket_sum = 0; } #---------------------------------------------------------------------------------------------- include($path_to_templates."auth2.php"); include($path_to_templates."top.php"); include($path_to_templates."middle.php"); include($path_to_templates."bottom.php"); $arr=explode(" ",$proj_attr['project_update']); $date=explode("-",$arr[0]); $time=explode(".",$arr[1]); $time=explode(":",$time[0]); header ("Last-Modified: " . gmdate("D, d M Y H:i:s", mktime($time[0],$time[1],$time[2],$date[1],$date[2],$date[0])) . " GMT"); //header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); //header ("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); //header ("Cache-Control: no-cache, must-revalidate"); //header ("Pragma: no-cache"); if ($url_fail) header("HTTP/1.1 404 Not Found"); echo($content); if ($_SERVER['REMOTE_ADDR']=='62.61.12.18') { echo("Last-Modified: " . gmdate("D, d M Y H:i:s", mktime($time[0],$time[1],$time[2],$date[1],$date[2],$date[0])) . " GMT"); echo("POST:
"); debug($_POST); //echo("
GET:
"); //print_r($_GET); //echo("
SESSION:
"); //print_r($s_SESSION); echo("
FILES:
"); debug($_FILES); echo("
COOKIE:
"); debug($_COOKIE); //echo("
CURRENT USER:
"); //print_r($current_user); //debug($GLOBALS); //echo("
OTHER:
"); //echo("ids=$ids, idc=$idc, kabinet=$kabinet"); echo("SERVER
"); debug($_SERVER); } unset($_POST); //phpinfo(); ?>