Example #1
0
 function add()
 {
     global $viewhelper;
     if (isset($_POST['do']) && !empty($_POST['data']['market']['name'])) {
         pb_submit_check("data");
         $this->market->setParams();
         $this->market->params['data']['market']['industry_id'] = PbController::getMultiId($_POST['industry']['id']);
         $this->market->params['data']['market']['area_id'] = PbController::getMultiId($_POST['area']['id']);
         $result = $this->market->Add();
         if ($result) {
             flash('thanks_for_adding_market');
         } else {
             pheader("location:add.php");
         }
     }
     $viewhelper->setPosition(L("added_market_info", "tpl"));
     render("market/add");
 }
 function add()
 {
     global $smarty;
     using("message");
     $pms = new Messages();
     if (isset($_POST['do']) && !empty($_POST['friendlink'])) {
         pb_submit_check('friendlink');
         $data = $_POST['friendlink'];
         $result = false;
         $data['status'] = 0;
         $data['created'] = $data['modified'] = $this->friendlink->timestamp;
         $result = $this->friendlink->save($data);
         if ($result) {
             $pms->SendToAdmin('', array("title" => $data['title'] . L("apply_friendlink"), "content" => $data['title'] . L("apply_friendlink") . "\n" . $_POST['data']['email'] . "\n" . $data['description']));
             flash('wait_apply');
         }
     } else {
         flash();
     }
 }
Example #3
0
 function getpasswd()
 {
     if (isset($_POST['do'])) {
         pb_submit_check('data');
         $do = trim($_POST['do']);
         $username = trim($_POST['data']['username']);
         $userpass = trim($_POST['data']['password1']);
         if (!empty($userpass) && !empty($username)) {
             $user_exists = $this->member->checkUserExist($username, true);
             if (!$user_exists) {
                 flash("member_not_exists");
             } else {
                 $result = $this->member->dbstuff->Execute("UPDATE {$this->member->table_prefix}members SET userpass='******' WHERE id=" . $this->member->info['id'] . " AND status='1'");
                 if ($result) {
                     flash("reset_and_login", "logging.php");
                 }
             }
         }
     } else {
         flash();
     }
 }
Example #4
0
 function post()
 {
     require CLASS_PATH . "validation.class.php";
     $validate = new Validation();
     if (isset($_POST['save_service'])) {
         pb_submit_check('service');
         $vals = array();
         $vals['status'] = 0;
         $vals['member_id'] = 0;
         $vals['content'] = $_POST['service']['content'];
         if (isset($_POST['service']['nick_name'])) {
             $vals['nick_name'] = $_POST['service']['nick_name'];
         }
         $vals['email'] = $_POST['service']['email'];
         $vals['type_id'] = $_POST['service']['type_id'];
         $vals['created'] = $time_stamp;
         $vals['user_ip'] = pb_get_client_ip();
         $vals['title'] = $_POST['service']['title'];
         $this->service->doValidation($vals);
         if (!empty($this->service->validationErrors)) {
             setvar("item", $vals);
             setvar("Errors", $validate->show($service));
             render("service/index");
         } else {
             if (empty($vals['title'])) {
                 $vals['title'] = L("comments_and_suggestions", "tpl");
             }
             if ($this->service->save($vals)) {
                 flash('thanks_for_advise', URL);
             } else {
                 flash();
             }
         }
     } else {
         flash("pls_enter_your_advise", "index.php");
     }
 }
Example #5
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: 2115 $
 */
require "../libraries/common.inc.php";
require "room.share.php";
uses("adzone");
$tpl_file = "ads";
$adzone = new Adzones();
$payment = $pdb->GetArray("SELECT id,title FROM {$tb_prefix}payments WHERE available=1");
if (isset($_POST['do'])) {
    pb_submit_check('do');
    uses("order");
    $order = new Orders();
    $result = $adzone->read("*", intval($_POST['id']));
    if (!empty($result)) {
        $data['member_id'] = $the_memberid;
        $data['cache_username'] = $memberinfo['username'];
        $data['subject'] = $result['name'];
        $data['pay_id'] = $_POST['pay_id'];
        $data['pay_name'] = $_POST['pay_name'];
        $data['total_price'] = $result['price'];
        $new_trade_no = $order->Add($data);
        if (!empty($_POST['paynow'])) {
            //header('Cache-Control: no-cache, no-store, max-age=0, must-revalidate');
            pheader("Location:../purchase.php?do=pay&tradeno=" . $new_trade_no);
            exit;
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: 2075 $
 */
require "../libraries/common.inc.php";
require "room.share.php";
require PHPB2B_ROOT . './libraries/page.class.php';
uses("spread");
$spread = new Spreads();
$page = new Pages();
$tpl_file = "spread";
$conditions = "member_id=" . $the_memberid;
if (isset($_POST['save'])) {
    pb_submit_check('save');
    $record = $vals = array();
    if (isset($_POST['id'])) {
        $id = intval($_POST['id']);
    }
    $vals['keyword_name'] = $_POST['spread']['keyword_name'];
    $vals['title'] = $_POST['spread']['title'];
    $vals['target_url'] = $_POST['spread']['target_url'];
    $vals['content'] = $_POST['spread']['content'];
    if (!empty($id)) {
        unset($vals['created']);
        $updated = $spread->save($vals, "update", $id, null, $conditions);
    } else {
        $vals['created'] = $time_stamp;
        //default one week
        $vals['expiration'] = 7 * 86400 + $time_stamp;
Example #7
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: 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);
if (empty($res) || !$res) {
    flash('data_not_exists', 'product/', 0);
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: 2238 $
 */
require "../libraries/common.inc.php";
require "room.share.php";
uses("attachment", "typeoption", "area");
$attachment = new Attachment('photo');
$member = new Members();
$area = new Areas();
$member_controller = new Member();
$typeoption = new Typeoption();
$conditions = null;
if (isset($_POST['save'])) {
    pb_submit_check('member');
    //exception
    if (!$member->checkException($_POST['member'], array('email', 'office_redirect'))) {
        flash("sys_error");
    }
    $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->upload_dir = "profile" . DS . gmdate("Y") . gmdate("m") . DS . gmdate("d");
        $attachment->insert_new = false;
        $attachment->if_orignal = false;
        $attachment->if_watermark = false;
        $attachment->rename_file = "photo-" . $the_memberid;
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: 2098 $
 */
define('CURSCRIPT', 'getpasswd');
require "libraries/common.inc.php";
require "share.inc.php";
require LIB_PATH . "sendmail.inc.php";
uses("member");
$member = new Members();
if (isset($_POST['action'])) {
    pb_submit_check("data");
    $checked = true;
    $login_name = trim($_POST['data']['username']);
    $user_email = trim($_POST['data']['email']);
    if (!pb_check_email($user_email)) {
        setvar("ERRORS", L("wrong_email_format"));
        $checked = false;
    } else {
        $member->setInfoByUserName($login_name);
        $member_info = $member->getInfo();
        if (!$member_info || empty($member_info)) {
            setvar("ERRORS", L('member_not_exists'));
            setvar("postLoginName", $login_name);
            setvar("postUserEmail", $user_email);
            $checked = false;
        } elseif (!pb_strcomp($user_email, $member_info['email'])) {
Example #10
0
            flash("allow_refresh_day");
        }
        $vals['submit_time'] = $time_stamp;
        $vals['expire_days'] = 1;
        $vals['expire_time'] = $time_stamp + 24 * 3600 * $vals['expire_days'];
        $conditions[] = "status='1'";
        $result = $trade->save($vals, "update", $id, null, $conditions);
        if (!$result) {
            flash("action_failed");
        } else {
            flash("success");
        }
    }
}
if (isset($_POST['do']) && !empty($_POST['data']['trade'])) {
    pb_submit_check('data');
    $res = $_POST['data']['trade'];
    $now_offer_amount = $trade->findCount(null, "created>" . $today_start . " AND member_id=" . $the_memberid);
    if (isset($_POST['id'])) {
        $id = intval($_POST['id']);
    }
    if ($g['offer_check']) {
        $res['status'] = 0;
        $msg = 'msg_wait_check';
    } else {
        $res['status'] = 1;
        $msg = 'success';
    }
    if (!empty($_FILES['pic']['name'])) {
        $attach_id = empty($id) ? "offer-" . $the_memberid . "-" . ($trade->getMaxId() + 1) : "offer-" . $the_memberid . "-" . $id;
        $attachment->rename_file = $attach_id;
Example #11
0
 function inquery()
 {
     global $viewhelper, $pb_userinfo;
     using("member", "message", "typeoption");
     $typeoption = new Typeoptions();
     $member = new Members();
     $pms = new Messages();
     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'], $this->product->dbstuff->GetOne("SELECT username FROM {$this->product->table_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 {$this->product->table_prefix}products WHERE id=" . $pid;
     $res = $this->product->dbstuff->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", cache_read("typeoption", "im_type"));
         setvar("TelTypes", cache_read("typeoption", "phone_type"));
         setvar("item", pb_lang_split_recursive($res));
     }
     $viewhelper->setTitle($res['name']);
     $member_info = $this->product->dbstuff->GetRow("SELECT mf.first_name,mf.last_name,m.email as MemberEmail FROM {$this->product->table_prefix}members m LEFT JOIN {$this->product->table_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");
 }
Example #12
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: 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}'");
    }
    $result = $company->save($vals, "update", $companyinfo['id']);
    if ($result) {
Example #13
0
        $id = intval($_GET['id']);
    }
    if ($do == "edit") {
        $company->newCheckStatus($companyinfo['status']);
        if (!empty($id)) {
            $res = $companynews->read("Companynews.id AS ID,title AS Title,content AS Content,type_id,created AS CreateDate", $id);
            setvar("item", $res);
            setvar("ShowCaption", "none");
        }
        $tpl_file = "news_edit";
        vtemplate($tpl_file);
        exit;
    }
}
if (isset($_POST['save'])) {
    pb_submit_check('title');
    $vals = null;
    $vals['title'] = trim($_POST['title']);
    $vals['content'] = trim($_POST['content']);
    $vals['type_id'] = $_POST['type_id'];
    $now_companynews_amount = $companynews->findCount(null, "created>" . $today_start . " AND member_id=" . $the_memberid);
    if ($g['companynews_check']) {
        $vals['status'] = 0;
        $msg = 'msg_wait_check';
    } else {
        $vals['status'] = 1;
        $msg = 'success';
    }
    if (!empty($_POST['newsid'])) {
        $vals['modified'] = $time_stamp;
        unset($vals['created']);
Example #14
0
 function add()
 {
     global $G;
     require CLASS_PATH . "validation.class.php";
     $validate = new Validation();
     uses("trade", "member", "tradefield", "tag");
     $tag = new Tags();
     $offer = $tradefield = new Tradefields();
     $member = new Members();
     $trade = new Trades();
     if (isset($_POST['visit_post'])) {
         capt_check("capt_post_free");
         pb_submit_check('visit_post');
         $_POST['data']['trade']['title'] = pb_lang_merge($_POST['data']['multi']);
         $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");
         }
         if (!$validate->notEmpty($trade->params['data']['trade']['title'])) {
             $trade->validationErrors[] = L("title_cant_be_empty");
         }
         $trade->params['expire_days'] = $_POST['expire_days'];
         $if_check = $G['setting']['vis_post_check'];
         $msg = null;
         $words = $trade->dbstuff->GetArray("SELECT * FROM {$trade->table_prefix}words");
         if (!empty($words)) {
             foreach ($words as $word_val) {
                 if (!empty($word_val['title'])) {
                     str_replace($word_val['title'], "***", $trade->params['data']['trade']['title']);
                     str_replace($word_val['title'], "***", $trade->params['data']['trade']['content']);
                 }
             }
             $item['forbid_word'] = implode("\r\n", $tmp_str);
         }
         if ($if_check) {
             $trade->params['data']['trade']['status'] = 0;
             $msg = 'pls_wait_for_check';
         } else {
             $trade->params['data']['trade']['status'] = 1;
             $msg = 'success';
         }
         if (!empty($trade->validationErrors)) {
             setvar("item", am($trade->params['data']['trade'], $tradefield->params['data']['tradefield']));
             setvar("Errors", $validate->show($trade));
             render("offer/post");
         } else {
             $trade->params['data']['trade']['industry_id'] = implode(",", $_POST['industry']['id']);
             $trade->params['data']['trade']['area_id'] = implode(",", $_POST['area']['id']);
             $result = $trade->Add();
             if ($result) {
                 flash($msg);
             } else {
                 flash();
             }
         }
     }
 }
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 $
 */
define('CURSCRIPT', 'friendlink');
require "libraries/common.inc.php";
require "share.inc.php";
uses("setting", "message", "friendlink");
$pms = new Messages();
$friendlink = new Friendlinks();
$setting = new Settings();
if (isset($_POST['do']) && !empty($_POST['friendlink'])) {
    pb_submit_check('friendlink');
    $data = $_POST['friendlink'];
    $result = false;
    $data['status'] = 0;
    $data['created'] = $data['modified'] = $time_stamp;
    $result = $friendlink->save($data);
    if ($result) {
        $pms->SendToAdmin('', array("title" => $data['title'] . L("apply_friendlink"), "content" => $data['title'] . L("apply_friendlink") . "\n" . $_POST['data']['email'] . "\n" . $data['description']));
        $smarty->flash('wait_apply', URL);
    }
}
$viewhelper->setPosition(L("apply_friendlink", "tpl"));
formhash();
render("friendlink");
Example #16
0
    if ($do == "view" && !empty($id)) {
        $message_info = $pms->read("*", $id, null, $conditions);
        if (!$message_info || empty($message_info)) {
            flash();
        } else {
            $pdb->Execute("UPDATE {$tb_prefix}messages SET status=1 WHERE to_member_id=" . $_SESSION['MemberID'] . " AND id=" . $id);
            $message_info['pubdate'] = date("Y-m-d", $message_info['created']);
            setvar("item", $message_info);
            $tpl_file = "pms_detail";
            template($tpl_file);
            exit;
        }
    }
}
if (isset($_POST['send']) && !empty($_POST['pms'])) {
    pb_submit_check('pms');
    $vals = array();
    $vals = $_POST['pms'];
    $vals['type'] = 'user';
    if (is_int($_POST['to'])) {
        $to_memberid = intval($_POST['to']);
        $member_info = $pdb->GetRow("SELECT id,username FROM {$tb_prefix}members WHERE id='" . $to_memberid . "'");
    } else {
        $member_info = $pdb->GetRow("SELECT id,username FROM {$tb_prefix}members WHERE username='******'to'] . "'");
    }
    if (!$member_info || empty($member_info) || $member_info['id'] == $_SESSION['MemberID']) {
        flash();
    }
    $result = $pms->SendToUser($_SESSION['MemberName'], $member_info['username'], $vals);
    if (!$result) {
        flash();
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: 2048 $
 */
define('CURSCRIPT', 'post');
chdir('../');
require "libraries/common.inc.php";
require "share.inc.php";
require LIB_PATH . "validation.class.php";
uses("service");
$validate = new Validation();
$service = new Services();
if (isset($_POST['save_service'])) {
    pb_submit_check('service');
    $vals = array();
    $vals['status'] = 0;
    $vals['member_id'] = 0;
    $vals['content'] = $_POST['service']['content'];
    if (isset($_POST['service']['nick_name'])) {
        $vals['nick_name'] = $_POST['service']['nick_name'];
    }
    $vals['email'] = $_POST['service']['email'];
    $vals['type_id'] = $_POST['service']['type_id'];
    $vals['created'] = $time_stamp;
    $vals['user_ip'] = pb_get_client_ip();
    $vals['title'] = $_POST['service']['title'];
    $service->doValidation($vals);
    if (!empty($service->validationErrors)) {
        setvar("item", $vals);
Example #18
0
require "../libraries/common.inc.php";
require "room.share.php";
require LIB_PATH . 'page.class.php';
require CACHE_PATH . "cache_type.php";
uses("attachment", "album");
check_permission("album");
$attachment_controller = new Attachment('pic');
$attachment = new Attachments();
$album = new Albums();
$tpl_file = "album";
$page = new Pages();
if (empty($companyinfo)) {
    flash("pls_complete_company_info", "company.php", 0);
}
if (isset($_POST['do'])) {
    pb_submit_check('album');
    $vals = $_POST['album'];
    $vals['title'] = $title = trim($vals['title']);
    $vals['description'] = $description = trim($vals['description']);
    $now_album_amount = $attachment->findCount(null, "created>" . $today_start . " AND member_id=" . $_SESSION['MemberID']);
    if (!empty($_FILES['pic']['name'])) {
        $type_id = 1;
        $attach_id = empty($id) ? "album-" . $_SESSION['MemberID'] . "-" . ($album->getMaxId() + 1) : "album-" . $_SESSION['MemberID'] . "-" . $id;
        $attachment_controller->title = $title;
        $attachment_controller->description = $description;
        $attachment_controller->rename_file = $attach_id;
        $attachment_controller->upload_process($type_id);
    }
    if (!empty($id)) {
        if (empty($attachment_controller->id)) {
            $attachment_id = $pdb->GetOne("SELECT attachment_id FROM {$tb_prefix}albums WHERE id=" . $id);
Example #19
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("trade");
$trade = new Trade();
$trade_model = new Trades();
if (isset($_POST['del'])) {
    pb_submit_check('id');
    $ids = implode(",", $_POST['id']);
    $ids = "(" . $ids . ")";
    $sql = "DELETE FROM {$tb_prefix}favorites WHERE id IN " . $ids . " AND member_id=" . $_SESSION['MemberID'];
    $res = $pdb->Execute($sql);
    if (!$res) {
        flash("action_failed");
    }
}
if (isset($_POST['do']) && isset($_POST['id'])) {
    if ($trade_model->checkExist($_POST['id'])) {
        $sql = "INSERT INTO {$tb_prefix}favorites (target_id,member_id,type_id,created,modified) VALUE (" . $_POST['id'] . "," . $_SESSION['MemberID'] . ",1," . $time_stamp . "," . $time_stamp . ")";
        $result = $pdb->Execute($sql);
    }
    if ($result) {
        echo "<script language='javascript'>window.close();</script>";
Example #20
0
                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";
        template($tpl_file);
        exit;
    }
}
if (!empty($_POST['job']) && $_POST['save']) {
    $vals = $_POST['job'];
    pb_submit_check('job');
    $now_job_amount = $job->findCount(null, "created>" . $today_start . " AND member_id=" . $the_memberid);
    if (isset($_POST['id'])) {
        $id = $_POST['id'];
    }
    if (!empty($_POST['expire_time'])) {
        $vals['expire_time'] = Times::dateConvert($_POST['expire_time']);
    }
    $check_job_update = $g['job_check'];
    if ($check_job_update == "0") {
        $vals['status'] = 1;
        $message_info = 'msg_wait_success';
    } else {
        $vals['status'] = 0;
        $message_info = 'msg_wait_check';
    }
Example #21
0
 function add_post()
 {
     global $charset, $pb_user;
     if (empty($pb_user)) {
         die("<img src='" . STATICURL . "images/check_error.gif'/>" . iconv($charset, "UTF-8//IGNORE", L("please_login_first")));
     }
     $the_memberid = $pb_user['pb_userid'];
     $company_id = '';
     if (isset($_POST['do']) && isset($_POST['id'])) {
         pb_submit_check('do');
         if ($this->expo->checkExist($_POST['id']) && !$this->expo->dbstuff->GetOne("SELECT id FROM " . $fair->table_prefix . "expos WHERE member_id='" . $the_memberid . "' AND expo_id='" . $_POST['id'] . "'")) {
             $sql = "INSERT INTO {$this->expo->table_prefix}expomembers (expo_id,member_id,company_id,created,modified) VALUE (" . $_POST['id'] . "," . $the_memberid . "," . $company_id . "," . $this->expo->timestamp . "," . $this->expo->timestamp . ")";
             $result = $this->expo->dbstuff->Execute($sql);
             if (isset($_POST['is_ajax']) && $_POST['is_ajax']) {
                 die("<img src='" . STATICURL . "images/check_right.gif'/>" . iconv($charset, "UTF-8//IGNORE", L("action_successfully")));
             }
             echo "<script language='javascript'>window.close();</script>";
             exit;
         } else {
             if (isset($_POST['is_ajax']) && $_POST['is_ajax']) {
                 die("<img src='" . STATICURL . "images/check_error.gif'/>" . iconv($charset, "UTF-8//IGNORE", L("action_failed")));
             }
             flash("action_failed", '', 0);
         }
     }
 }
Example #22
0
$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");
    }
    if (!$validate->notEmpty($trade->params['data']['trade']['title'])) {
        $trade->validationErrors[] = L("title_cant_be_empty");
    }
    $trade->params['expire_days'] = $_POST['expire_days'];
    //$trade->params['data']['trade']['tag_ids'] = $tag->setTagId($_POST['data']['tag']);;
    $if_check = $_PB_CACHE['setting']['vis_post_check'];
    $msg = null;
    $words = $pdb->GetArray("SELECT * FROM {$tb_prefix}words");
    if (!empty($words)) {
Example #23
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 "room.share.php";
require LIB_PATH . 'passport.class.php';
$passport = new Passports();
if (isset($_POST['do']) || isset($_POST['action'])) {
    $do = trim($_POST['do']);
    $action = trim($_POST['action']);
    if ($do == "checkpasswd" || $action == "checkpasswd") {
        pb_submit_check('oldpass');
        $OldPassCheck = $member->checkUserPasswdById($_POST['oldpass'], $the_memberid);
        if ($OldPassCheck > 0) {
            $vals = array();
            $vals['userpass'] = $member->authPasswd(trim($_POST['newpass']));
            if (!empty($_POST['question']) && !empty($_POST['answer'])) {
                $vals['question'] = $_POST['question'];
                $vals['answer'] = $_POST['answer'];
            }
            $result = $member->save($vals, "update", $the_memberid);
            $passport->ucSingleUpdatePwd($the_membername, trim($_POST['newpass']));
            flash("success");
        } else {
            flash('old_pwd_error');
        }
    }