* The contents of this file are subject to the License; you may not use this file except in compliance with the License. * * @version $Revision: 2075 $ */ require "../libraries/common.inc.php"; require "room.share.php"; uses("templet"); check_permission("space"); $templet = new Templets(); if (!$company->Validate($companyinfo)) { flash("pls_complete_company_info", "company.php", 0); } if (isset($_POST['updateSpaceName']) && !empty($_POST['data']['space_name'])) { $space_name = trim($_POST['data']['space_name']); $i18n = new L10n(); $space_name = $i18n->translateSpaceName($space_name); $result = $member->updateSpaceName(array("id" => $the_memberid), $space_name); if ($result) { $member->clearCache($the_memberid); $member->updateMemberCaches($the_memberid); flash("success"); } } if (isset($_POST['save']) && !empty($_POST['data']['member']['styleid'])) { $templet_id = intval($_POST['data']['member']['styleid']); $pdb->Execute("UPDATE {$tb_prefix}members SET templet_id=" . $templet_id . " WHERE id=" . $the_memberid); $member->clearCache($the_memberid); $member->updateMemberCaches($the_memberid); flash("success"); } setvar("templet_id", $memberinfo['templet_id']);
function Add() { global $_PB_CACHE, $memberfield, $phpb2b_auth_key, $if_need_check; $error_msg = array(); if (empty($this->params['data']['member']['username']) or empty($this->params['data']['member']['userpass']) or empty($this->params['data']['member']['email'])) { return false; } $space_name = $this->params['data']['member']['username']; $userpass = $this->params['data']['member']['userpass']; $this->params['data']['member']['userpass'] = $this->authPasswd($this->params['data']['member']['userpass']); $i18n = new L10n(); if (empty($this->params['data']['member']['space_name'])) { $this->params['data']['member']['space_name'] = $i18n->translateSpaceName($space_name); } //Todo: $uip = pb_ip2long(pb_getenv('REMOTE_ADDR')); if (empty($uip)) { pheader("location:" . URL . "redirect.php?message=" . urlencode(L('sys_error'))); } $this->params['data']['member']['last_login'] = $this->params['data']['member']['created'] = $this->params['data']['member']['modified'] = $this->timestamp; $this->params['data']['member']['last_ip'] = pb_get_client_ip('str'); $email_exists = $this->checkUserExistsByEmail($this->params['data']['member']['email']); if ($email_exists) { flash("email_exists", null, 0); } $if_exists = $this->checkUserExist($this->params['data']['member']['username']); if ($if_exists) { flash('member_has_exists', null, 0); } else { $this->save($this->params['data']['member']); $key = $this->table_name . "_id"; if ($this->ins_passport) { $this->passport(array($this->{$key}, $this->params['data']['member']['username'], $userpass, $this->params['data']['member']['email']), "reg"); } $memberfield->primaryKey = "member_id"; $memberfield->params['data']['memberfield']['member_id'] = $this->{$key}; $memberfield->params['data']['memberfield']['reg_ip'] = $this->params['data']['member']['last_ip']; $memberfield->save($memberfield->params['data']['memberfield']); if (!$if_need_check) { $user_info['id'] = $this->{$key}; $user_info['username'] = $this->params['data']['member']['username']; $user_info['userpass'] = $userpass; $user_info['useremail'] = $this->params['data']['member']['email']; $user_info['lifetime'] = $this->timestamp + 86400; $user_info['is_admin'] = 0; $this->putLoginStatus($user_info); } } return true; }
* * Licensed under The Languages Packages Licenses. * Support : phpb2b@hotmail.com * * @version $Revision$ */ require "../libraries/common.inc.php"; require "room.share.php"; uses("templet"); check_permission("space"); $templet = new Templets(); if (empty($companyinfo)) { flash("pls_complete_company_info", "company.php", 0); } if (isset($_POST['updateSpaceName']) && !empty($_POST['data']['space_name'])) { $space_name = trim($_POST['data']['space_name']); $space_name = L10n::translateSpaceName($space_name); $result = $member->updateSpaceName(array("id" => $_SESSION['MemberID']), $space_name); if ($result) { flash("success"); } } if (isset($_POST['save']) && !empty($_POST['data']['member']['styleid'])) { $templet_id = intval($_POST['data']['member']['styleid']); $pdb->Execute("UPDATE {$tb_prefix}members SET templet_id=" . $templet_id . " WHERE id=" . $_SESSION['MemberID']); flash("success"); } setvar("templet_id", $memberinfo['templet_id']); $result = $templet->getInstalled($memberinfo['membergroup_id'], $memberinfo['membertype_id']); setvar("Items", $result); template("space");
$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']); $space_name = str_replace(' ', '', $space_name); $vals['cache_spacename'] = $space_name; $vals['first_letter'] = substr($space_name, 0, 1); $member->updateSpaceName(array("id" => $the_memberid), $space_name); if (isset($companyinfo['status']) && $companyinfo['status'] == 0) { $vals['name'] = strip_tags($_POST['data']['company']['name']); $vals['english_name'] = strip_tags($vals['english_name']); } } } $vals['employee_amount'] = $vals['employee_amount']; if (!empty($vals['found_date'])) { $vals['found_date'] = Times::dateConvert($vals['found_date']); } if (!empty($_POST['manage_type'])) {
$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)) { $space_name = L10n::translateSpaceName($_POST['data']['company']['name']); $space_name = str_replace(' ', '', $space_name); $vals['cache_spacename'] = $space_name; $vals['first_letter'] = $py->first_letter; $member->updateSpaceName(array("id" => $_SESSION['MemberID']), $space_name); if (isset($companyinfo['status']) && $companyinfo['status'] == 0) { $vals['name'] = strip_tags($_POST['data']['company']['name']); $vals['english_name'] = strip_tags($vals['english_name']); } } } $vals['employee_amount'] = $vals['employee_amount']; if (!empty($vals['found_date'])) { $vals['found_date'] = Times::dateConvert($vals['found_date']); } if (!empty($_POST['manage_type'])) {