Example #1
0
<?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");
Example #2
0
/**
 *      [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 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();
}
Example #3
0
require "room.share.php";
require PHPB2B_ROOT . 'libraries/page.class.php';
check_permission("offer");
$tpl_file = "offer";
$page = new Pages();
uses("trade", "tradefield", "product", "tag", "attachment", "form", "typeoption", "point", "industry", "area");
$attachment = new Attachment("pic");
$area = new Areas();
$industry = new Industries();
$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);
}
Example #4
0
<?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', 'query');
require "../libraries/common.inc.php";
require "../share.inc.php";
uses("product", "member", "message", "typeoption");
$pms = new Messages();
$typeoption = new Typeoption();
$member = new Members();
$product = new Products();
if (isset($_POST['id']) && !empty($_POST['do']) && !empty($_POST['title'])) {
    pb_submit_check('inquery');
    $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);
Example #5
0
 *      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']);
            $space_name = str_replace(' ', '', $space_name);
Example #6
0
 *      [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: 2234 $
 */
require "../libraries/common.inc.php";
require LIB_PATH . 'page.class.php';
require "session_cp.inc.php";
$_PB_CACHE['industry'] = cache_read("industry");
$_PB_CACHE['area'] = cache_read("area");
uses("market", "attachment", "typeoption", "area", "industry");
$attachment = new Attachment('pic');
$area = new Areas();
$industry = new Industries();
$market = new Markets();
$typeoption = new Typeoption();
$page = new Pages();
$conditions = null;
$tpl_file = "market";
if (isset($_POST['del']) && !empty($_POST['id'])) {
    $market->del($_POST['id']);
}
if (isset($_POST['check']) && !empty($_POST['id'])) {
    $ids = implode(",", $_POST['id']);
    $condition = " id in (" . $ids . ")";
    $sql = "update {$tb_prefix}markets set status=1 where " . $condition;
    $result = $pdb->Execute($sql);
}
if (isset($_POST['uncheck']) && !empty($_POST['id'])) {
    $ids = implode(",", $_POST['id']);
    $condition = " id IN (" . $ids . ")";
Example #7
0
/**
 * PHPB2B :  Opensource B2B Script (http://www.phpb2b.com/)
 * Copyright (C) 2007-2010, Ualink. All Rights Reserved.
 * 
 * Licensed under The Languages Packages Licenses.
 * Support : phpb2b@hotmail.com
 * 
 * @version $Revision: 1393 $
 */
require "../libraries/common.inc.php";
require "room.share.php";
uses("attachment", "typeoption");
$attachment = new Attachment('photo');
$member = new Members();
$member_controller = new Member();
$typeoption = new Typeoption();
$conditions = null;
if (isset($_POST['save'])) {
    pb_submit_check('member');
    $vals['office_redirect'] = $_POST['member']['office_redirect'];
    $vals['email'] = $_POST['member']['email'];
    if (empty($_POST['member']['email'])) {
        unset($vals['email']);
    }
    if (!empty($_FILES['photo']['name'])) {
        $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;
Example #8
0
/**
 *      [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: 2258 $
 */
require "../libraries/common.inc.php";
require "session_cp.inc.php";
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'])) {
Example #9
0
<?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: 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();
Example #10
0
 *
 *      @version $Revision: 2048 $
 */
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);
Example #11
0
 *      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 "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;
Example #12
0
 *
 *      @version $Revision: 2219 $
 */
require "../libraries/common.inc.php";
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();
Example #13
0
<?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: 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'])) {
Example #14
0
/**
 *      [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: 2223 $
 */
require "../libraries/common.inc.php";
require "room.share.php";
require LIB_PATH . 'time.class.php';
uses("job", "typeoption", "area", "industry");
check_permission("job");
$job = new Jobs();
$area = new Areas();
$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'));
Example #15
0
<?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: 2075 $
 */
require "../libraries/common.inc.php";
require "room.share.php";
require PHPB2B_ROOT . './libraries/page.class.php';
include CACHE_PATH . "cache_type.php";
uses("companynews", "typeoption");
check_permission("companynews");
$companynews = new Companynewses();
$typeoption = new Typeoption();
$tables = $companynews->getTable(true);
$tpl_file = "news";
$page = new Pages();
setvar("CompanynewsTypes", $_PB_CACHE['companynewstype']);
if (isset($company_id)) {
    $conditions = "company_id=" . $company_id;
}
if (!$company->Validate($companyinfo)) {
    flash("pls_complete_company_info", "company.php", 0);
}
if (isset($_GET['do'])) {
    $do = trim($_GET['do']);
    if (!empty($_GET['id'])) {
        $id = intval($_GET['id']);
    }
Example #16
0
/**
 * PHPB2B :  Opensource B2B Script (http://www.phpb2b.com/)
 * Copyright (C) 2007-2010, Ualink. All Rights Reserved.
 * 
 * Licensed under The Languages Packages Licenses.
 * Support : phpb2b@hotmail.com
 * 
 * @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'])) {
Example #17
0
/**
 *      [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 PHPB2B_ROOT . 'libraries/page.class.php';
require "session_cp.inc.php";
uses("job", "company", "member", "typeoption");
$job = new Jobs();
$page = new Pages();
$member = new Members();
$company = new Companies();
$typeoption = new Typeoption();
$conditions = null;
$table = array();
$job_status = explode(",", L('product_status', 'tpl'));
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";
Example #18
0
/**
 *      [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";
uses("news", "typeoption", "newstype");
require "session_cp.inc.php";
require CACHE_PATH . 'cache_type.php';
require LIB_PATH . 'snoopy.class.php';
$news = new Newses();
$newstype = new Newstypes();
$snoopy = new Snoopy();
$typeoption = new Typeoption();
$conditions = array();
$tpl_file = "news.gather";
if (isset($_POST['gather']) && !empty($_POST['rules'])) {
    set_time_limit(180);
    $rules = stripslashes($_POST['rules']);
    $tmp_rules = explode("\r\n", $rules);
    if (!empty($tmp_rules) && count($tmp_rules) == 4) {
        list($remote_url, $remote_url_match, $remote_title_match, $remote_content_match) = $tmp_rules;
    } else {
        flash();
    }
    $snoopy->fetchlinks($remote_url);
    $urls = array();
    $urls = $snoopy->results;
    if (empty($urls)) {
Example #19
0
 *
 *      @version $Revision: 2048 $
 */
define('CURSCRIPT', 'post');
require "../libraries/common.inc.php";
require "../share.inc.php";
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');