function getInstance() { if (!isset(self::$instance[get_class()])) { self::$instance = new Companyfields(); } return self::$instance; }
<?php /** * [PHPB2B] Copyright (C) 2007-2099, Ualink Inc. All Rights Reserved. * The contents of this file are subject to the License; you may not use this file except in compliance with the License. * * @version $Revision: 2154 $ */ require "../libraries/common.inc.php"; require "room.share.php"; uses("industry", "companyfield"); $industry = new Industries(); $companyfield = new Companyfields(); $tpl_file = "card"; if (empty($companyinfo['name'])) { flash("pls_complete_company_info", "company.php", 0); } if (isset($_POST['save'])) { pb_submit_check("company"); $vals = array(); $vals['link_man'] = $_POST['company']['link_man']; $vals['tel'] = $company->getPhone($_POST['data']['telcode'], $_POST['data']['telzone'], $_POST['data']['tel']); $vals['fax'] = $company->getPhone($_POST['data']['faxcode'], $_POST['data']['faxzone'], $_POST['data']['fax']); $vals['name'] = strip_tags($_POST['company']['name']); $vals['mobile'] = strip_tags($_POST['company']['mobile']); $vals['email'] = $_POST['company']['email']; $vals['address'] = $_POST['company']['address']; $company->primaryKey = "id"; if (!empty($_POST['maplocation'])) { list($longi, $lati) = explode(",", $_POST['maplocation']); $pdb->Execute("REPLACE INTO {$tb_prefix}companyfields SET company_id=" . $companyinfo['id'] . ",map_longitude='{$longi}',map_latitude='{$lati}'");
* [PHPB2B] Copyright (C) 2007-2099, Ualink Inc. All Rights Reserved. * The contents of this file are subject to the License; you may not use this file except in compliance with the License. * * @version $Revision: 2154 $ */ require "../libraries/common.inc.php"; require "room.share.php"; require LIB_PATH . 'time.class.php'; require LIB_PATH . 'validation.class.php'; $validate = new Validation(); check_permission("company"); uses("industry", "area", "attachment", "companyfield", "typeoption"); $attachment = new Attachment('pic'); $area = new Areas(); $industry = new Industries(); $companyfield = new Companyfields(); $typeoption = new Typeoption(); $tpl_file = "company"; if (isset($_POST['do']) && !empty($_POST['data']['company'])) { pb_submit_check('data'); $vals = $_POST['data']['company']; $company->doValidation($vals); if (!empty($company->validationErrors)) { setvar("item", $vals); setvar("Errors", $validate->show($company)); template($tpl_file, true); } if (isset($companyinfo)) { if (empty($companyinfo['name'])) { $i18n = new L10n(); $space_name = $i18n->translateSpaceName($_POST['data']['company']['name']);