* @copyright Activeunit Inc 2001-2004 * @version 1.1 */ //Define('CATEGORIES_PRODUCT','shop/'); /* $params = array( 'ivp_method' => 'check', 'ivp_store' => '18636', 'ivp_authkey' => 'wMLg^mT8KQ#HQxvs', 'order_ref' => 'BBF793B0B0263270A6B28F1C235A23850B75535D5634209A595B5041CBFFA3E3' ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://secure.telr.com/gateway/order.json"); curl_setopt($ch, CURLOPT_POST, count($params)); curl_setopt($ch, CURLOPT_POSTFIELDS,$params); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); $results = curl_exec($ch); curl_close($ch); print_r($results); $results = json_decode($results,true); $ref= trim($results['order']['ref']); $url= trim($results['order']['url']); if (empty($ref) || empty($url)) { # Failed to create order } exit; $params = array( 'ivp_method' => 'create', 'ivp_store' => '18636', 'ivp_authkey' => 'wMLg^mT8KQ#HQxvs', 'ivp_cart' => 'Order-1111', 'ivp_test' => '1', 'ivp_amount' => '100.00', 'ivp_currency' => 'AED', 'ivp_desc' => 'Description', 'return_auth' => 'http://beyondboxes.net/return.php', 'return_can' => 'http://beyondboxes.net/return.html', 'return_decl' => 'http://beyondboxes.net/return.html' ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://secure.telr.com/gateway/order.json"); curl_setopt($ch, CURLOPT_POST, count($params)); curl_setopt($ch, CURLOPT_POSTFIELDS,$params); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); $results = curl_exec($ch); curl_close($ch); print_r($results); $results = json_decode($results,true); $ref= trim($results['order']['ref']); $url= trim($results['order']['url']); if (empty($ref) || empty($url)) { # Failed to create order } exit; */ include_once("./config.php"); $file=basename($_SERVER["REQUEST_URI"]); $ext=strtolower(substr($file, -3)); if ($ext=='jpg' || $ext=='gif' || $ext=='css') { header ("HTTP/1.0: 404 Page not found\n"); exit; } if (preg_match("/\?(.*?)$/", $_SERVER["REQUEST_URI"], $matches)) { $redir_qry=$matches[1]; } $file=preg_replace("/\.htm.*$/","",$file); if ($file!='') { $fake_doc=$file; } include_once("./config.php"); // use this array for URL conversion rules $requests=array( // E-Shop '/\/'.str_replace('/','\\/',quotemeta(CATEGORIES_PRODUCT)).'/is' => '?(application:{action=parse})', '/\/register\/([a-z0-9\-]+)\.html/'=>'?(application:{action=customer}customers:{action=\1,instance=usual})', '/\/entertainment\.html/'=>'?(application:{action=customer}customers:{action=entertainment,instance=usual})', '/\/entertainers\.html/'=>'?(application:{action=customer}customers:{action=entertainers,instance=usual})', '/\/learn-activity\.html/'=>'?(application:{action=customer}customers:{action=customer,instance=usual})', '/\/talent-activity\.html/'=>'?(application:{action=customer}customers:{action=artist,instance=usual})', '/\/registration\/([a-z0-9\-]+)\.html/'=>'?(application:{action=customer}customers:{action=registration,id=\1,instance=usual})', '/\/bhangradance\.html/'=>'?(application:{action=customer}customers:{action=bhangradance,instance=usual})', '/\/experienceentertainment\.html/'=>'?(application:{action=customer}customers:{action=experienceentertainment,instance=usual})', '/\/privatedanceclasses\.html/'=>'?(application:{action=customer}customers:{action=privatedanceclasses,instance=usual})', '/\/success\.html/'=>'?(application:{action=customer}customers:{action=ordersuccess,instance=usual})', '/\/TheGirlPowerRetreat\.html/'=>'?(application:{action=customer}customers:{action=aurahomestay,instance=usual})', // 'register/\/([a-z0-9\_]+)-([a-z0-9]+)-([a-z0-9]+)\.html/'=>'?(application:{action=customer}customers:{register1=confirmation, id=\1})', '/\/register\/([a-z0-9\-]+)\/([a-z0-9\-]+)\.html/'=>'?(application:{action=customer}customers:{action=\1,activation_code=\2,instance=usual})', '/\/customer\/orders\/(\d+)\.html/'=>'?(application:{action=customer}customers:{action=orders,instance=usual}orders:{action=view,id=\1})', '/\/myaccount\.html/'=>'?(application:{action=customer1}customers:{action=settings,instance=usual})', '/\/myaccount\/([a-z0-9\-]+)\.html/'=>'?(application:{action=myaccounts}myaccount:{action=\1,instance=usual})', '/\/myaccount\/([a-z0-9\-]+)\/([a-z0-9\-]+)\.html/'=>'?(application:{action=myaccounts}myaccount:{action=\1,instance=usual,id=\2})', '/\/search\/([a-z0-9\-]+)\.html/'=>'?(application:{action=searchs}search:{action=\1,instance=usual})', '/\/settings\.html/'=>'?(application:{action=customer1}customers:{action=settings,instance=usual})', // Update Profile Page // '/\/products\/([a-z0-9\-]+)\.html/'=>'?(application:{action=product}products:{action=\1,instance=usual})', // '/\/products\/([a-z0-9\-]+)\/([a-z0-9\-]+)\.html/'=>'?(application:{action=product}products:{action=\1,instance=usual,id=\2})', '/\/myaccount1\/([a-z0-9\-]+)\/([a-z0-9\-]+)\.html/'=>'?(application:{action=myaccounts1}myaccount:{action=\1,instance=usual,id=\2})', '/\/blogs\.html/'=>'?(application:{action=blogs}blogs:{action=blogs,instance=usual,mode=new})', // '/\/myaccount\/([a-z0-9\-]+)\.html/'=>'?(application:{action=myaccounts}myaccount:{action=\1,instance=usual})', '/\/view\/([a-z0-9\-]+)\.html/'=>'?(application:{action=customer}customers:{action=view,cust_id=\1,instance=usual})', '/\/category\/([a-z0-9\-]+)\.html/'=>'?(application:{action=product}products:{action=category,id=\1,instance=usual})', '/\/(cart|checkout|customer)\.html/'=>'?(application:{action=\1})', '/\/all-products\.html/is' => '?(application:{action=categories, mode=view})', '/\/new-products\.html/is' => '?(application:{action=categories, mode=new})', '/\/on-sale\.html/is' => '?(application:{action=categories, mode=onsale})', '/\/search\.html/'=>'?(application:{action=search})', // '/\/crm\.html/'=>'?(application:{action=crms}crm:{action=view,instance=usual})', '/\/crm\/([a-z0-9\-]+)\.html/'=>'?(application:{action=crms}crm:{action=view,id=\1,instance=usual})', '/\/crm\/([a-z0-9\-]+)\/([a-z0-9\-]+)\.html/'=>'?(application:{action=crms}crm:{action=\1,instance=usual,id=\2})', '/\/todos\.html/'=>'?(application:{action=crms}crm:{action=todos,instance=usual})', '/\/todos\/([a-z0-9\-]+)\.html/'=>'?(application:{action=crms}crm:{action=todos,id=\1,instance=usual})', '/\/todosedit\/([a-z0-9\-]+)\.html/'=>'?(application:{action=crms}crm:{action=todosedit,id=\1,instance=usual})', // '/\/todosedit\/([a-z0-9\-]+)\/([a-z0-9\-]+)\.html/'=>'?(application:{action=crms}crm:{action=todosedit,id=\1,todos_id=\2,instance=usual})', '/advanced_search\.html/'=>'?(application:{action=search}search:{action=advanced})', '/photo-contest-page\.html/'=>'?(application:{action=users_pictures})', '/contest-photos\.html/'=>'?(application:{action=users_pictures}users_pictures:{view_mode=list})', '/add_to_list\.html/'=>'?(application:{action=newslist})', '/blog\.html/'=>'?(application:{action=blog})', '/blog\/([0-9]+)\.html/'=>'?(application:{action=blog}blog:{view_mode=view_one, id=\1})', '/\/gifts\.html/'=>'?(application:{action=gifts})', '/\/welcome\.html/'=>'?(application:{action=customer}customers:{action=demolist,instance=usual})', // CMS '/\/newsletter\.html/is' => '?(application:{action=newsletter})', '/\/login\.html/'=>'?(application:{action=customer}customers:{mode2=1})', "/\/show-(\w+)\.html/is" => '?(application:{action=\1})', "/\/docs\/(\d+)\.html/is" => '?(application:{action=docs, doc_id=\1})', "/\/gallery\/(\d+)\/(\d+)\.html/is" => '?(application:{action=product}products:{action=view_gallery, product_id=\2, image_id=\1})', "/\/([\w-]+)\.html/is" => '?(application:{action=docs, doc_name=\1})' ); foreach($requests as $key=>$value) { if (!$found && preg_match($key, $_SERVER["REQUEST_URI"], $matches)) { $link=$value; for($i=1;$iparseLinks(""); preg_match("", $param_str, $matches); $pd=$matches[1]; } else { header ("HTTP/1.0 404 Not Found"); echo "The page cannot be found. Please use this link to continue browsing."; exit; } include_once("index.php"); ?>