Location: PHPKode > projects > Esvon Personals > esvon-personals/inc/pages/reg.php
<?php

// --------------------------------------------------------------------------
//
// Esvon Classifieds v.4.0
// Copyright(C), Esvon LTD, 2001-2010, All Rights Reserved.
// E-mail: hide@address.com
//
// All forms of reproduction, including, but not limited to, internet posting, 
// printing, e-mailing, faxing and recording are strictly prohibited.
// One license required per site running Esvon Classifieds. 
// To obtain a license for using Esvon Classifieds, please register at
// http://www.esvon.com/pg/products/p_classifieds/
//
// --------------------------------------------------------------------------

if(!defined('SITE_PATH')) die('Access Denied');

if(!IsUser(0)) {

  if(!$_COOKIE['REG_FROM_URL']){ 
    $ref = (string)$_SERVER['HTTP_REFERER'];
    if($ref && !preg_match('/\?page=(?:order|reg|login)/',$ref)) {
      $v = parse_url(SITE_URL);
      if(strpos($ref,$v['host'])!==false && basename($ref)!='index.php'){ 
        setcookie('REG_FROM_URL', $ref, HW_TIME+3600);
      }
    }
  }

  // set initial payment plan
  $hw_pay_plan = (string)$_GET['hw_pay_plan'];
  $A_TERMS = hwGetPayPlans('SUB');
  if(!$hw_pay_plan){
    $pp_amt = count($A_TERMS);
    if($pp_amt==0) die('No price plans defined');
    elseif($pp_amt==1) $hw_pay_plan = key($A_TERMS); // only one
  }

  if(!$hw_pay_plan || !$A_TERMS[$hw_pay_plan]){
    header('Location: index.php?page=order&pg=priceplans&o_type=SUB');
    exit;
  }

  $_GET['hw_pay_plan'] = $hw_pay_plan;

}
else{ // User Logged In

  if(hwModGetState('Multi_Lang')=='A'){
    $ses_uid = (int)hwSessionGetVar('userid');
    Multi_Lang_Redirect('SELECT hw_lang_id FROM '.TBL_USER.' WHERE id="'.$ses_uid.'"');
  }

}

showRegProfilePage();


// functions

function showRegProfilePage(){

require SITE_PATH.'inc/class.user_member.php';

/*
class SiteMember2 extends SiteMember {

function ShowForm() {

  if(!isset($this->O_FS)) $this->initFSObject();

  if($this->UID){
    $pp = $this->db->one_data('SELECT hw_pay_plan FROM '.$this->TBL_USER.' WHERE id='.$this->UID);
    list($pp) = hwGetBasePlanFromStr($pp);
  }
  else{
    $a_sub_pp = $this->db->one_col_array('SELECT id FROM '.TBL_PAY_PLAN.' WHERE type="SUB" AND enabled=1 ORDER BY fee');
    $pp = (string)$_GET['hw_pay_plan'];
    if(!in_array($pp,$a_sub_pp)) $pp = isset($a_sub_pp[0]) ? $a_sub_pp[0] : 'SUB_FREE';
  }

  $A_TERMS = hwGetPayPlans('SUB');
  if(!$A_TERMS[$pp]['OPTS']['U_LOGO']) $this->O_FS->SetFieldProperty('ACTIVE','0','uf_logo');

  parent::ShowForm();
}

}
*/

$O_USER = new SiteMember;
$O_USER->ShowPage(true);

}

?>
Return current item: Esvon Personals