| Current Path : /home/zqegovsj/public_html/us3.supplierlist.com/member/master/ |
| Current File : /home/zqegovsj/public_html/us3.supplierlist.com/member/master/company.php |
<?php
$inc_path = "../../haibo/en/";$ua_sm_compile_dir = "webmaster/";
$ua_sm_compile_dir = "webmaster/";
require($inc_path."global.php");
require("session.php");
$tb_prefix = $_SESSION['Version']."_";
uses("company","trade","member","membertype","access");
$membertype = new Membertypes();
$access = new Accesses();
$trade = new Trades();
$member = new Members();
$company = new Companies();
$company_id = $company->field("id","member_id=".$_SESSION['MemberID']);
if (isset($_POST['CompanyEdit'])) {
$vals = array();
$vals['description'] = htmlspecialchars($_POST['company_des']);
if(!empty($company_id)){
$vals['modified'] = $time_stamp;
$company->save($vals, "update", $company_id, null, " and member_id=".$_SESSION['MemberID']);
} else {
$vals['member_id'] = $_SESSION['MemberID'];
$vals['created'] = $time_stamp;
$company->save($vals);
$last_company_id = $g_db->Insert_ID();
}
}
if(!empty($company_id)){
$company->primaryKey = "id";
$fields = $company->getFieldAliasNames();
$fields.= ",".$company->alias_cols.",AreaProvince.name AS CompanyProvince,AreaCity.name AS CompanyCity ";
$res = $company->read2($fields,$company_id,null," and Company.member_id=".$_SESSION['MemberID']);}
$res['CompanyDescription']= stripslashes($res['CompanyDescription']);
$res['CompanyDescription']=html_entity_decode($res['CompanyDescription']);
$res['CompanyMore']= stripslashes($res['CompanyMore']);
$res['CompanyMore']=html_entity_decode($res['CompanyMore']);
$res['CompanyIndexContent']= stripslashes($res['CompanyIndexContent']);
$res['CompanyIndexContent']=html_entity_decode($res['CompanyIndexContent']);
$res['CompanyMainProd']= stripslashes($res['CompanyMainProd']);
$res['CompanyMainProd']=html_entity_decode($res['CompanyMainProd']);
setvar("CompanyInfo",$res);
include("head.php");template("./newmember/company");?>