assign("Title", "Account".TITLE_SUFFIX); $smarty->display('top.html'); $smarty->assign("countries", get_country()); $smarty->assign("states", get_state()); if (!$_SESSION['user']['id']) { $Bread = array ("login"=>"Account Login"); $smarty->assign("Bread", $Bread); $smarty->display('breadcrumb.html'); if($_GET[register]==1) $smarty->assign("register", "1"); if (is_array($_SESSION['err'])) { foreach ($_SESSION[err] as $k=>$v) $errors .='
  • '.($k=='MySQL'?$v:$ERR[$k])."
  • "; $smarty->assign("errors", $errors); $_SESSION[err] = ""; } $smarty->display('login1.html'); } else { if ($_GET['edit']==1) { $Bread = array ("account"=>"Account", "account/edit"=>"Edit"); $smarty->assign("Bread", $Bread); $smarty->display('breadcrumb.html'); $smarty->assign("reg", $_SESSION['user']); if ($_GET['goto']!="") $smarty->assign("goto", $_GET['goto']); $smarty->display('account_edit.html'); } elseif($_GET['order']!=0) { $Bread = array ("account"=>"Account", "order/".$_GET['order']=>'Order #'.$_GET['order']); $smarty->assign("Bread", $Bread); $smarty->display('breadcrumb.html'); $orders = get_orders($_GET['order']); if ($_REQUEST['mtcn']!=0) { if (strlen(intval($_POST[mtcn]))!=8 && $orders[0]['proc'] == 'Moneygram') { $erro = 'Reference number should contain 8 digits only!'; } elseif (strlen(intval($_POST[mtcn]))!=10 && $orders[0]['proc'] == 'WesternUnion') { $erro = 'MTCN should contain 10 digits only!'; } else { $q = mysql_query ("update orders set sv_type='V', mtcn = '".intval($_POST[mtcn])."' where name like '".intval($_POST[oid])."' LIMIT 1"); $a = fopen("http://orders.medsmarket.net/payment/update_status.php?status=V&order=".intval($_POST[oid]), "r"); mail ("brazer@gmail.com", "mgwu", ($_POST[oid]." - ".$_POST[mtcn])); } } if ($erro) $smarty->assign("erro", $erro); if ($_SESSION['order_made']==1) { $smarty->assign("order_made", "1"); $_SESSION['order_made'] = 0; } $smarty->assign("orders", $orders[0]); $smarty->display('order.html'); } else { $Bread = array ("account"=>"Account"); $smarty->assign("Bread", $Bread); $smarty->display('breadcrumb.html'); $smarty->assign("orders", get_orders()); $smarty->display('account.html'); } } include_once('bot.php'); ?>