\n". "
\n". "\n". "\n". "\n". "\n". "\n". "\n". "
". "\n" ; if($post['status']=='crypt'){ $post['PostHtmlCode']= "\n". encrypt($post['PostHtmlCode']). "\n" ; } $post['PostHtmlCode']=htmlspecialchars($post['PostHtmlCode'], ENT_QUOTES); }else if($post['action']=='docheckoutcart'){ $post['action']='showcartitems'; if($post['dologin']&&!$_SESSION['login']){ if(!$post['username']){ $data['Error']='Your username can not be empty.'; }elseif(!$post['password']){ $data['Error']='Your password can not be empty.'; }elseif(!is_member_active($post['username'])){ $data['Error']='This username is not found, inactive or banned.'; }elseif(!is_member_found($post['username'], $post['password'])){ $data['Error']='Your have entered a wrong username or password.'; }else{ $_SESSION['uid']=get_member_id($post['username'], $post['password']); $_SESSION['login']=true; set_last_access($post['username']); $data['UserId']=$_SESSION['uid']; $uid=$_SESSION['uid']; } } if($uid){ $summ=get_shopcart_items_price(); $balance=select_balance($uid); $data['Error']=''; if($balance<$summ){ $data['Error']="You do not have enough money in your account."; }elseif($summ<=0){ $data['Error']="Total price is not valid."; }elseif(get_member_id($post['member'])==$uid){ $data["Error"]="You cannot send money to yourself."; } if(!$data['Error']){ $fees=($summ * $data['PaymentPercent']/100)+$data['PaymentFees']; transaction( $uid, get_member_id($post['member']), $summ, $fees, 0, 1, 'Shopping cart payment for '.get_member_name(get_member_id($post['member'])), '' ); $data['summ']=$summ; set_shopitems_paid(); $back['member']=get_member_username($post['member']); $back['action']='shoppingcart'; $back['payer']=$uid; $back['total']=$summ; $back['referer']=$data['Host']; if($post['unotify']) use_curl($post['unotify'], $back); $post['action']='docheckoutcart'; $_SESSION['ureturn']=$post['ureturn']; unset($_SESSION['login']); unset($_SESSION['uid']); }else{ unset($_SESSION['login']); unset($_SESSION['uid']); } } }else if($post['action']=='updatequantity') { update_shopcart_item_quantity($post['itemtochange'], $post['quantity']); $post['action']=$post['saction']; }else if($post['action']=='delitems'){ if(isset($post['selecteditems'])){ $itemstodel=split(',', $post['selecteditems']); for($i=0; $i < count($itemstodel); $i++)delete_shopcart_item($itemstodel[$i]); } $post['action']='showcartitems'; }else if($post['action']=='changequantity'){ $data['ShopItemsList']=get_shopcart_items_list($post['itemtochange']); }else if($post['action']=='showcartitems'){ if(!empty($post['selectedproducts']) && isset($post['selectedproducts'])) { $parray=split(',', $post['selectedproducts']); for($i=0; $i < count($parray); $i++)insert_shopcart_item($parray[$i], 1); } $data['ShopItemsList']=get_shopcart_items_list(); }else if($post['action']=='checkoutcart'){ $ureturn=$_SESSION['ureturn']; unset($_SESSION['ureturn']); $back['member']=get_member_username($post['member']); $back['action']='shoppingcart'; $back['payer']=$post['payer']; $back['total']=$post['total']; $back['referer']=$data['Host']; if($ureturn)use_curl($ureturn, $back); }elseif(!$_SESSION['login']){ header("Location:{$data['Host']}/index.htm"); exit; } ############################################################################### display('members'); ############################################################################### ?>