示例#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");
 }
示例#2
0
文件: job.php 项目: renduples/alibtob
 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';
 }
 $vals['industry_id'] = PbController::getMultiId($_POST['industry']['id']);
 $vals['area_id'] = PbController::getMultiId($_POST['area']['id']);
 if (!empty($id)) {
     $vals['modified'] = $time_stamp;
     $result = $job->save($vals, "update", $id, null, "member_id=" . $the_memberid);
 } else {
     if ($g['max_job'] && $now_job_amount >= $g['max_job']) {
         flash('one_day_max');
     }
     $vals['created'] = $vals['modified'] = $time_stamp;
     $vals['company_id'] = $companyinfo['id'];
     $vals['member_id'] = $the_memberid;
     $vals['cache_spacename'] = $pdb->GetOne("SELECT space_name FROM {$tb_prefix}members WHERE id=" . $the_memberid);
     $result = $job->save($vals);
 }
 if (!$result) {
     flash();
示例#3
0
 }
 $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;
     $attachment->upload_process();
     $vals['photo'] = $attachment->file_full_url;
 }
 $_POST['memberfield']['area_id'] = PbController::getMultiId($_POST['area']['id']);
 unset($vals['created']);
 unset($_POST['memberfield']['created']);
 $result = $member->save($vals, "update", $the_memberid);
 $memberfield->primaryKey = "member_id";
 $result = $memberfield->save($_POST['memberfield'], "update", $the_memberid);
 $member->clearCache($the_memberid);
 $member->updateMemberCaches($the_memberid);
 if (isset($_POST['personal']['resume_status'])) {
     $result = $pdb->Execute("REPLACE INTO {$tb_prefix}personals (member_id,resume_status,max_education) VALUE (" . $the_memberid . ",'" . $_POST['personal']['resume_status'] . "','" . $_POST['personal']['max_education'] . "')");
 }
 if (!$result) {
     flash('action_failed');
 } else {
     flash('success');
 }
示例#4
0
文件: add.php 项目: renduples/alibtob
<?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', 'add');
require "../libraries/common.inc.php";
require "../share.inc.php";
uses("market");
$market = new Markets();
if (isset($_POST['do']) && !empty($_POST['data']['market']['name'])) {
    pb_submit_check("data");
    $market->setParams();
    $market->params['data']['market']['industry_id'] = PbController::getMultiId($_POST['industry']['id']);
    $market->params['data']['market']['area_id'] = PbController::getMultiId($_POST['area']['id']);
    $result = $market->Add();
    if ($result) {
        flash('thanks_for_adding_market');
    } else {
        pheader("location:add.php");
    }
}
$viewhelper->setPosition(L("added_market_info", "tpl"));
render("market/add");
示例#5
0
     $message_info = 'msg_wait_check';
 }
 if (isset($_POST['id'])) {
     $id = intval($_POST['id']);
 }
 if (!empty($_FILES['pic']['name'])) {
     $attach_id = empty($id) ? "product-" . $the_memberid . "-" . ($product->getMaxId() + 1) : "product-" . $the_memberid . "-" . $id;
     $attachment->rename_file = $attach_id;
     $attachment->upload_process();
     $product->params['data']['product']['picture'] = $attachment->file_full_url;
 }
 $form_type_id = 2;
 $product->params['data']['product']['tag_ids'] = $tag->setTagId($_POST['data']['tag']);
 $product->params['data']['product']['cache_companyname'] = $companyinfo['name'];
 $product->params['data']['product']['industry_id'] = PbController::getMultiId($_POST['industry']['id']);
 $product->params['data']['product']['area_id'] = PbController::getMultiId($_POST['area']['id']);
 if (!empty($id)) {
     $item_ids = $form->Add($id, $_POST['data']['formitem'], 1, $form_type_id);
     $product->params['data']['product']['modified'] = $time_stamp;
     $product->params['data']['product']['formattribute_ids'] = $item_ids;
     $result = $product->save($product->params['data']['product'], "update", $id, null, $conditions);
 } else {
     if ($g['max_product'] && $now_product_amount >= $g['max_product']) {
         flash('one_day_max');
     }
     $product->params['data']['product']['member_id'] = $the_memberid;
     $product->params['data']['product']['company_id'] = $company_id;
     $product->params['data']['product']['created'] = $product->params['data']['product']['modified'] = $time_stamp;
     $result = $product->save($product->params['data']['product']);
     $new_id = $product->table_name . "_id";
     $product_id = $product->{$new_id};
示例#6
0
    }
}
if (isset($_POST['save']) && !empty($_POST['data']['expo']['name'])) {
    $expo->setParams();
    if (isset($_POST['id'])) {
        $id = intval($_POST['id']);
    }
    if (!empty($_POST['data']['begin_time'])) {
        $expo->params['data']['expo']['begin_time'] = Times::dateConvert($_POST['data']['begin_time']);
    }
    if (!empty($_POST['data']['end_time'])) {
        $expo->params['data']['expo']['end_time'] = Times::dateConvert($_POST['data']['end_time']);
    }
    $expo->params['data']['expo']['status'] = 1;
    $expo->params['data']['expo']['industry_id'] = PbController::getMultiId($_POST['industry']['id']);
    $expo->params['data']['expo']['area_id'] = PbController::getMultiId($_POST['area']['id']);
    if (!empty($id)) {
        if (!empty($_FILES['pic']['name'])) {
            $attachment->insert_new = false;
            $attachment->rename_file = "fair-" . $id;
            $attachment->upload_process();
            $expo->params['data']['expo']['picture'] = $attachment->file_full_url;
        }
        $expo->params['data']['expo']['modified'] = $time_stamp;
        $result = $expo->save($expo->params['data']['expo'], "update", $id);
    } else {
        $expo->params['data']['expo']['created'] = $expo->params['data']['expo']['modified'] = $time_stamp;
        if (!empty($_FILES['pic']['name'])) {
            $attachment->rename_file = "fair-" . ($fair->getMaxId() + 1);
            $attachment->upload_process();
            $expo->params['data']['expo']['picture'] = $attachment->file_full_url;
示例#7
0
        }
        $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));
    } else {
        $trade->params['data']['trade']['industry_id'] = PbController::getMultiId($_POST['industry']['id']);
        $trade->params['data']['trade']['area_id'] = PbController::getMultiId($_POST['area']['id']);
        $result = $trade->Add();
        if ($result) {
            $smarty->flash($msg, URL . "offer/detail.php?id=" . $trade->{$trade->table_name . "_id"});
        } else {
            $smarty->flash();
        }
    }
}
$trade_types = $trade->GetArray("SELECT * FROM " . $tb_prefix . "tradetypes");
foreach ($trade_types as $key => $val) {
    if ($val['parent_id'] == 0) {
        $set_types[$val['id']] = $val;
        foreach ($trade_types as $key1 => $val1) {
            if ($val1['parent_id'] == $val['id']) {
                $set_types[$val['id']]['child'][$val1['id']] = $val1;