<?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: 2048 $ */ define('CURSCRIPT', 'index'); require "../libraries/common.inc.php"; require "../share.inc.php"; uses("typeoption"); $typeoption = new Typeoption(); setvar("Salary", $typeoption->get_cache_type("salary")); render("job/index");
* * @version $Revision: 2075 $ */ require "../libraries/common.inc.php"; require PHPB2B_ROOT . './libraries/page.class.php'; require "session_cp.inc.php"; require LIB_PATH . "cache.class.php"; uses("service", "typeoption", "setting"); $page = new Pages(); $cache = new Caches(); $setting = new Settings(); $typeoption = new Typeoption(); $service = new Services(); $conditions = null; $tpl_file = "service"; setvar("Status", $typeoption->get_cache_type("common_status")); setvar("ServiceTypes", $typeoption->get_cache_type("service_type")); if (isset($_POST['save_client'])) { if (!empty($_POST['data']['setting'])) { $updated = $setting->replace($_POST['data']['setting'], 1); if ($updated) { $cache->writeCache("setting", "setting"); flash("success"); } } flash(); } if (isset($_POST['save']) && !empty($_POST['data']['service'])) { $vals = array(); $vals = $_POST['data']['service']; $vals['modified'] = $time_stamp;
$form = new Forms(); $point = new Points(); $tradefield = new Tradefields(); $tag = new Tags(); $trade = new Trades(); $trade_controller = new Trade(); $typeoption = new Typeoption(); $conditions = array(); $conditions[] = "member_id = " . $the_memberid; setvar("TradeTypes", $trade_controller->getTradeTypes()); setvar("TradeNames", $trade_controller->getTradeTypeNames()); $tmp_personalinfo = $memberinfo; setvar("MemberInfo", $tmp_personalinfo); $expires = $trade_controller->getOfferExpires(); setvar("TradeTypes", $trade_controller->getTradeTypes()); setvar("PhoneTypes", $typeoption->get_cache_type("phone_type")); setvar("ImTypes", $typeoption->get_cache_type("im_type")); setvar("OfferExpires", $expires); setvar("Countries", $countries = cache_read("country")); if (isset($company_id)) { setvar("CompanyId", $company_id); } $tMaxDay = !empty($_PB_CACHE['setting']['offer_refresh_lower_day']) ? $_PB_CACHE['setting']['offer_refresh_lower_day'] : 3; $tMaxHours = !empty($_PB_CACHE['setting']['offer_update_lower_hour']) ? $_PB_CACHE['setting']['offer_update_lower_hour'] : 24; $prod_info = array(); $conditions[] = "member_id='" . $the_memberid . "'"; if (!empty($company_info)) { $tmp_personalinfo['MemberTel'] = $company_info['tel']; $tmp_personalinfo['ContactEmail'] = $company_info['email'] ? $company_info['email'] : $tmp_personalinfo['email']; } if (isset($_GET['typeid'])) {
$vals['type'] = 'inquery'; $vals['title'] = $_POST['title']; $vals['content'] = implode("<br />", $_POST['inquery']); $result = $pms->SendToUser($pb_userinfo['pb_username'], $pdb->GetOne("SELECT username FROM {$tb_prefix}members WHERE id=" . intval($_POST['to_member_id'])), $vals); if (!$result) { flash("failed", '', 0); } else { flash("success", '', 0); } } $pid = intval($_GET['id']); $sql = "SELECT * FROM {$tb_prefix}products WHERE id=" . $pid; $res = $pdb->GetRow($sql); if (empty($res) || !$res) { flash('data_not_exists', 'product/', 0); } else { if (!empty($res['picture'])) { $res['imgsmall'] = "attachment/" . $res['picture'] . ".small.jpg"; $res['imgbig'] = "attachment/" . $res['picture']; $res['image'] = "attachment/" . $res['picture'] . ".small.jpg"; } else { $res['image'] = pb_get_attachmenturl('', '', 'small'); } setvar("ImTypes", $typeoption->get_cache_type("im_type")); setvar("TelTypes", $typeoption->get_cache_type("phone_type")); setvar("item", $res); } $viewhelper->setTitle($res['name']); $member_info = $pdb->GetRow("SELECT mf.first_name,mf.last_name,m.email as MemberEmail FROM {$tb_prefix}members m LEFT JOIN {$tb_prefix}memberfields mf ON mf.member_id=m.id WHERE m.id=" . $res['member_id']); setvar("CompanyUser", $member_info['first_name'] . $member_info['last_name']); render("product/inquery");
$key = $company->table_name . "_id"; $company_id = $company->{$key}; } $cfield_exits = $pdb->GetOne("SELECT company_id FROM {$tb_prefix}companyfields WHERE company_id={$company_id}"); $companyfield->primaryKey = "company_id"; if ($cfield_exits) { $companyfield->save($_POST['data']['companyfield'], "update", $company_id); } else { $_POST['data']['companyfield']['company_id'] = $company_id; $companyfield->save($_POST['data']['companyfield']); } $member->clearCache($the_memberid); $member->updateMemberCaches($the_memberid); flash($msg ? $msg : "success"); } setvar("MainMarkets", $typeoption->get_cache_type("main_market")); if (!empty($companyinfo['name'])) { list(, $companyinfo['telcode'], $companyinfo['telzone'], $companyinfo['tel']) = $company->splitPhone($companyinfo['tel']); list(, $companyinfo['faxcode'], $companyinfo['faxzone'], $companyinfo['fax']) = $company->splitPhone($companyinfo['fax']); $companyinfo["option_manage_type"] = $typeoption->get_cache_key_unique("manage_type", $companyinfo['manage_type']); $selected['markets'] = explode(",", $companyinfo['main_market']); setvar("SelectedMarket", $selected['markets']); $companyinfo["option_reg_fund"] = $typeoption->get_cache_key_unique("reg_fund", $companyinfo['reg_fund']); $companyinfo["option_year_annual"] = $typeoption->get_cache_key_unique("year_annual", $companyinfo['year_annual']); $companyinfo["option_position"] = $typeoption->get_cache_key_unique("position", $companyinfo['position']); $companyinfo["option_employee_amount"] = $typeoption->get_cache_key_unique("employee_amount", $companyinfo['employee_amount']); $companyinfo["option_economic_type"] = $typeoption->get_cache_key_unique("economic_type", $companyinfo['property']); if (!empty($companyinfo["picture"])) { $companyinfo["logo"] = pb_get_attachmenturl($companyinfo["picture"], "../"); } $company_fields = $pdb->GetRow("SELECT * FROM {$tb_prefix}companyfields WHERE company_id={$company_id}");
$do = trim($_GET['do']); $res = null; if (!empty($_GET['id'])) { $id = intval($_GET['id']); } if ($do == "edit") { if (!empty($id)) { $sql = "select * FROM {$tb_prefix}markets WHERE id=" . $id; $res = $pdb->GetRow($sql); $res['image'] = pb_get_attachmenturl($res['picture'], '../', 'small'); $r1 = $industry->disSubOptions($res['industry_id'], "industry_"); $r2 = $area->disSubOptions($res['area_id'], "area_"); $res = am($res, $r1, $r2); setvar("item", $res); } setvar("MarketStatus", $typeoption->get_cache_type("common_status")); setvar("AskAction", $typeoption->get_cache_type("common_option")); $tpl_file = "market.edit"; template($tpl_file); exit; } if ($do == "del" && !empty($id)) { $market->del($id); } } $amount = $market->findCount(); $page->setPagenav($amount); $result = $market->findAll("*", null, $conditions, "id desc", $page->firstcount, $page->displaypg); if (!empty($result)) { $count = count($result); for ($i = 0; $i < $count; $i++) {
$attachment->insert_new = false; $attachment->if_orignal = false; $attachment->if_watermark = false; $attachment->rename_file = "photo-" . $_SESSION['MemberID']; $attachment->upload_process(); $vals['photo'] = $attachment->file_full_url; } $result = $member->save($vals, "update", $_SESSION['MemberID']); $memberfield->primaryKey = "member_id"; $result = $memberfield->save($_POST['memberfield'], "update", $_SESSION['MemberID']); $member->clearCache($_SESSION['MemberID']); if (isset($_POST['personal']['resume_status'])) { $result = $pdb->Execute("REPLACE INTO {$tb_prefix}personals (member_id,resume_status,max_education) VALUE (" . $_SESSION['MemberID'] . ",'" . $_POST['personal']['resume_status'] . "','" . $_POST['personal']['max_education'] . "')"); } if (!$result) { flash('action_failed'); } else { flash('success'); } } setvar("Genders", $typeoption->get_cache_type('gender', null, array(-1))); setvar("Educations", $typeoption->get_cache_type('education')); setvar("OfficeRedirects", explode(",", L("office_redirects", "tpl"))); $personal = $pdb->GetRow("SELECT * FROM {$tb_prefix}personals WHERE member_id=" . $_SESSION['MemberID']); setvar("resume_status", $personal['resume_status']); setvar("max_education", $personal['max_education']); if (!empty($memberinfo['photo'])) { $memberinfo['image'] = pb_get_attachmenturl($memberinfo['photo'], "../", "small"); } setvar("item", $memberinfo); template("personal");
uses("member", "membergroup", "typeoption"); require LIB_PATH . 'time.class.php'; require PHPB2B_ROOT . 'libraries/page.class.php'; require CACHE_COMMON_PATH . "cache_type.php"; $G['membergroup'] = cache_read("membergroup"); $G['trusttype'] = cache_read("trusttype"); $typeoption = new Typeoption(); $membergroup = new Membergroup(); $member = new Members(); $page = new Pages(); $tpl_file = "member"; $conditions = array(); setvar("MembergroupOptions", $membergroup->getUsergroups()); setvar("Membergroups", $member_groups = $G['membergroup']); setvar("Membertypes", $member_types = $_PB_CACHE['membertype']); $genders = $typeoption->get_cache_type("gender"); foreach ($G['trusttype'] as $key => $val) { $tmp_trusttypes[$key] = $val['name']; } setvar("Trusttypes", $tmp_trusttypes); if (isset($_POST)) { if (isset($_POST['del'])) { $member->Delete($_POST['id']); flash("success"); } if (isset($_POST['check_in'])) { $vals['status'] = 1; if (!$member->save($vals, "update", $member_id)) { flash(); } }
* * @version $Revision: 2075 $ */ require "../libraries/common.inc.php"; require "session_cp.inc.php"; uses("membertype", "typeoption"); require PHPB2B_ROOT . './libraries/page.class.php'; require LIB_PATH . "cache.class.php"; require CACHE_PATH . "cache_membergroup.php"; $cache = new Caches(); $typeoption = new Typeoption(); $conditions = null; $page = new Pages(); $membertype = new Membertypes(); $tpl_file = "membertype"; setvar("MembertypeStatus", $typeoption->get_cache_type("common_option")); foreach ($_PB_CACHE['membergroup'] as $key => $val) { $membergroups[$key] = $val['name']; } setvar("Membergroups", $membergroups); if (isset($_POST['del']) && !empty($_POST['id'])) { $result = $membertype->del($_POST['id']); if (!$result) { flash(); } else { $cache->updateTypes(); } } if (isset($_POST['save'])) { $id = $_POST['id']; $vals = $_POST['data']['membertype'];
*/ define('CURSCRIPT', 'detail'); require "../libraries/common.inc.php"; require "../share.inc.php"; $positions = $titles = array(); uses("trade", "member", "company", "tradefield", "form", "typeoption", "industry", "area"); $offer = new Tradefields(); $area = new Areas(); $industry = new Industries(); $company = new Companies(); $trade = new Trade(); $trade_model = new Trades(); $member = new Members(); $typeoption = new Typeoption(); $form = new Forms(); setvar("Genders", $typeoption->get_cache_type('gender')); setvar("PhoneTypes", $typeoption->get_cache_type('phone_type')); $viewhelper->setTitle(L("offer", "tpl")); $viewhelper->setPosition(L("offer", "tpl"), "offer/"); if (isset($_GET['title'])) { $title = rawurldecode(trim($_GET['title'])); $res = $trade_model->findByTitle($title); $id = $res['id']; } if (isset($_GET['id'])) { $id = intval($_GET['id']); } if (!empty($id)) { $trade->setInfoById($id); $info = $trade->info; if (empty($info['id'])) {
* @version $Revision: 2075 $ */ require "../libraries/common.inc.php"; require "session_cp.inc.php"; require LIB_PATH . 'time.class.php'; require LIB_PATH . 'page.class.php'; require CLASS_PATH . 'xml.class.php'; uses("adzone", "ad", "attachment", "typeoption"); $tpl_file = "ad"; $attachment = new Attachment('attach'); $adzone = new Adzones(); $ads = new Adses(); $page = new Pages(); $typeoption = new Typeoption(); $conditions = array(); setvar("AdsStatus", $typeoption->get_cache_type("common_option")); setvar("Adzones", $adzone->findAll("id,name", null, null, "id desc")); if (isset($_POST['save'])) { $vals = $_POST['ad']; if (isset($_POST['id'])) { $id = intval($_POST['id']); } if (!empty($_FILES['attach']['name'])) { $aname = empty($id) ? $ads->getMaxId() + 1 : $id; $attachment->if_thumb = false; $attachment->if_thumb_large = false; $attachment->if_watermark = false; $attachment->insert_new = false; $attachment->rename_file = $vals['adzone_id'] . "-" . $aname; $attachment->upload_process(); $vals['source_url'] = URL . $attachment_dir . "/" . $attachment->file_full_url;
uses("expo", "member", "attachment", "typeoption", "area", "industry"); require PHPB2B_ROOT . 'libraries/page.class.php'; require CACHE_PATH . 'cache_type.php'; require "session_cp.inc.php"; require LIB_PATH . "time.class.php"; $attachment = new Attachment('pic'); $area = new Areas(); $industry = new Industries(); $expo = $fair = new Expos(); $page = new Pages(); $member = new Members(); $typeoption = new Typeoption(); $conditions = null; $tpl_file = "fair"; setvar("Expotypes", $_PB_CACHE['expotype']); setvar("ExpoStatus", $typeoption->get_cache_type("common_option")); setvar("AskAction", $typeoption->get_cache_type("common_option")); if (isset($_GET['do'])) { $do = trim($_GET['do']); if (!empty($_GET['id'])) { $id = intval($_GET['id']); } if ($do == "del" && !empty($id)) { $deleted = false; $result = $expo->del($id); if (!$result) { flash(); } } if ($do == "edit") { $tmp_info = null;
/** * [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: 2075 $ */ require "../libraries/common.inc.php"; require LIB_PATH . 'page.class.php'; require "session_cp.inc.php"; uses("order", "typeoption"); $order = new Orders(); $typeoption = new Typeoption(); $tpl_file = "order"; $page = new Pages(); setvar("Status", $typeoption->get_cache_type("common_status")); if (isset($_POST['status'])) { $id = $_POST['id']; $tmp_to = intval($_POST['status']); if (!empty($id)) { $result = $order->checkOrders($id, $tmp_to); } if (!$result) { flash(); } } if (isset($_POST['del']) && !empty($_POST['id'])) { $result = $order->del($_POST['id']); } if (isset($_GET['do'])) { $do = trim($_GET['do']);
$industry = new Industries(); $typeoption = new Typeoption(); $tpl_file = "job"; if (!$company->Validate($companyinfo)) { flash("pls_complete_company_info", "company.php", 0); } if (isset($_GET['do'])) { $do = trim($_GET['do']); if (isset($_GET['id'])) { $id = intval($_GET['id']); } if ($do == "del" && !empty($id)) { $job->del($id, "member_id=" . $the_memberid); } if ($do == "edit") { setvar("Genders", $typeoption->get_cache_type('gender')); setvar("Educations", $typeoption->get_cache_type('education')); setvar("Salary", $typeoption->get_cache_type('salary')); setvar("Worktype", $typeoption->get_cache_type('work_type')); if (!empty($id)) { $res = $job->read("*", $id, null, "Job.member_id=" . $the_memberid); if (empty($res)) { flash("action_failed"); } $res['expire_date'] = df($res['expire_time']); $r1 = $industry->disSubOptions($res['industry_id'], "industry_"); $r2 = $area->disSubOptions($res['area_id'], "area_"); $res = am($res, $r1, $r2); setvar("item", $res); } $tpl_file = "job_edit";
pheader("location:news.php?action=list"); } else { if ($g['max_companynews'] && $now_companynews_amount >= $g['max_companynews']) { flash('one_day_max'); } $vals['created'] = $time_stamp; $vals['member_id'] = $the_memberid; $vals['company_id'] = $company_id; $result = $companynews->save($vals); flash($msg); } } if (isset($_POST['del'])) { $result = $companynews->del($_POST['newsid'], $conditions); if ($result) { flash("success"); } else { flash("action_failed"); } } $amount = $companynews->findCount(null, $conditions); $page->setPagenav($amount); $fields = "title as CompanynewsTitle,status,created,type_id,id as CompanynewsId"; $result = $companynews->findAll($fields, null, $conditions, "id DESC", $page->firstcount, $page->displaypg); setvar("CheckStatus", $typeoption->get_cache_type("check_status")); for ($i = 0; $i < count($result); $i++) { $result[$i]['pubdate'] = df($result[$i]['created']); } setvar("Items", $result); setvar("ByPages", $page->pagenav); template($tpl_file);
* @version $Revision: 1393 $ */ require "../libraries/common.inc.php"; require APP_ROOT . './libraries/page.class.php'; require "session_cp.inc.php"; require LIB_PATH . 'time.class.php'; require CACHE_PATH . 'cache_type.php'; uses("product", "attachment", "tag", "typeoption"); $typeoption = new Typeoption(); $attachment = new Attachment('pic'); $tag = new Tags(); $product = new Products(); $page = new Pages(); $conditions = array(); $tpl_file = "product"; setvar("CheckStatus", $typeoption->get_cache_type("common_status")); setvar("BooleanVars", $typeoption->get_cache_type("common_option")); setvar("ProductSorts", $_PB_CACHE['productsort']); if (isset($_POST['save']) && !empty($_POST['data']['product']['name'])) { $result = false; $vals = array(); $vals = $_POST['data']['product']; if (isset($_POST['data']['company_name'])) { if (!pb_strcomp($_POST['data']['company_name'], $_POST['company_name'])) { $vals['company_id'] = $pdb->GetOne("SELECT id FROM {$tb_prefix}companies WHERE name='" . $_POST['data']['company_name'] . "'"); } else { $vals['company_id'] = $pdb->GetOne("SELECT id FROM {$tb_prefix}companies WHERE name='" . $_POST['company_name'] . "'"); } } if (isset($_POST['data']['username'])) { if (!pb_strcomp($_POST['data']['username'], $_POST['username'])) {
setvar("CheckStatus", $job_status); $tpl_file = "job"; if (isset($_GET['do'])) { $do = trim($_GET['do']); if (!empty($_GET['id'])) { $id = intval($_GET['id']); } if ($do == "del" && !empty($id)) { $job->del($_GET['id']); } if ($do == "view" && !empty($id)) { $tpl_file = "job.view"; $sql = "SELECT j.name,j.work_station,j.content,j.require_gender_id,j.peoples,j.require_education_id,j.require_age,j.salary_id,j.worktype_id,j.clicked,j.created,j.expire_time,c.name as cache_companyname,m.username as cache_username from {$tb_prefix}jobs as j LEFT JOIN {$tb_prefix}companies c ON j.company_id=c.id LEFT JOIN {$tb_prefix}members m ON j.member_id=m.id where j.id=" . $id; $result = $pdb->GetRow($sql); setvar("item", $result); setvar("Genders", $typeoption->get_cache_type("gender")); setvar("Educations", $typeoption->get_cache_type('education')); setvar("Worktypes", $typeoption->get_cache_type('work_type')); setvar("SalaryLevels", $typeoption->get_cache_type('salary')); template($tpl_file); exit; } } if (isset($_POST['pb_action'])) { if (!empty($_POST['id'])) { if ($_POST['pb_action'] == "none" || array_key_exists($_POST['pb_action'], $job_status)) { $result = $job->saveField("status", intval($_POST['pb_action']), $_POST['id']); } elseif ($_POST['pb_action'] == "del") { $result = $job->del($_POST['id']); } }
if (empty($sim)) { //content if (preg_match($remote_content_match, $temp, $match)) { $content = addslashes(trim($match[1])); } $u++; $sql[] = "('" . $title . "','" . $content . "','" . $_POST['data']['type_id'] . "'," . $time_stamp . ")"; } } else { //content if (preg_match($remote_content_match, $temp, $match)) { $content = addslashes(trim($match[1])); } $u++; $sql[] = "('" . $title . "','" . $content . "','" . $_POST['data']['type_id'] . "'," . $time_stamp . ")"; } } $sql = array_filter($sql); if (!empty($sql)) { $ins_str = "INSERT INTO {$tb_prefix}newses (title,content,type_id,created) VALUES " . implode(",", $sql); $result = $pdb->Execute($ins_str); } if ($result) { flash("success"); } else { flash(); } } setvar("NewstypeOptions", $newstype->getTypeOptions()); setvar("AskAction", $typeoption->get_cache_type("common_option")); template($tpl_file);
require LIB_PATH . "validation.class.php"; $validate = new Validation(); if (session_id() == '') { require_once LIB_PATH . "session_php.class.php"; $session = new PbSessions(); } uses("trade", "member", "tradefield", "tag", "typeoption"); $tag = new Tags(); $offer = new Tradefields(); $typeoption = new Typeoption(); $member = new Members(); $trade = new Trades(); $trade_controller = new Trade(); $tradefield = new Tradefields(); $expires = $trade_controller->getOfferExpires(); setvar("Genders", $typeoption->get_cache_type("gender", null, array("0", "-1"))); setvar("PhoneTypes", $typeoption->get_cache_type("phone_type")); setvar("ImTypes", $typeoption->get_cache_type("im_type")); $if_visit_post = $_PB_CACHE['setting']['vis_post']; if (!$if_visit_post) { $smarty->flash('visitor_forbid', URL, 0); } capt_check("capt_post_free"); if (isset($_POST['visit_post'])) { pb_submit_check('visit_post'); $trade->setParams(); $tradefield->setParams(); $if_title_exists = $trade->findByTitle($trade->params['data']['trade']['title']); if (!empty($if_title_exists)) { $trade->validationErrors[] = L("semilar_offer_post"); }