Example #1
0
    }
    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";
        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'];
Example #2
0
         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;
                 }
             }
         }
     }
     setvar("select_tradetypes", $set_types);
     if (!empty($_GET['typeid'])) {
         setvar("type_id", intval($_GET['typeid']));
     } else {
         setvar("type_id", $trade_info['type_id']);
     }
     $r1 = $industry->disSubOptions($trade_info['industry_id'], "industry_");
     $r2 = $area->disSubOptions($trade_info['area_id'], "area_");
     $trade_info = am($trade_info, $r1, $r2);
     setvar("item", $trade_info);
     $tpl_file = "offer_edit";
     template($tpl_file);
     exit;
     break;
 case "stat":
     $tpl_file = "tradestat";
     $amount = $trade->findAll("Trade.type_id AS TradeTypeId,COUNT(Trade.id) AS CountTrade", null, $conditions, "Trade.type_id", 0, 10, "Trade.type_id");
     foreach ($amount as $val) {
         $stats[$val['TradeTypeId']] = $val['CountTrade'];
     }
     setvar("UserTradeStat", $stats);
     setvar("ProductAmount", $product->findCount(null, $conditions, "Product.id"));
Example #3
0
     setvar("UserBrands", $tmp_arr);
 }
 setvar("Forms", $attrs = $form->getAttributes(0, 2));
 if (!empty($id)) {
     $productinfo = $product->read("*", $id, null, $conditions);
     if (empty($productinfo)) {
         flash("action_failed");
     } else {
         if (!empty($productinfo['picture'])) {
             $productinfo['image'] = pb_get_attachmenturl($productinfo['picture'], '../');
         }
         if (!empty($productinfo['tag_ids'])) {
             $tag->getTagsByIds($productinfo['tag_ids'], true);
             $productinfo['tag'] = $tag->tag;
         }
         $r1 = $industry->disSubOptions($productinfo['industry_id'], "industry_");
         $r2 = $area->disSubOptions($productinfo['area_id'], "area_");
         $productinfo = am($productinfo, $r1, $r2);
         setvar("Forms", $form->getAttributes(explode(",", $productinfo['formattribute_ids']), 2));
     }
 } else {
     $productinfo['industry_id'] = $companyinfo['industry_id'];
     $productinfo['area_id'] = $companyinfo['area_id'];
 }
 if (!empty($productinfo['country_id'])) {
     $productinfo['country'] = $countries[$productinfo['country_id']]['picture'];
 } else {
     $productinfo['country'] = "blank.gif";
 }
 setvar("item", $productinfo);
 $tpl_file = "product_edit";
Example #4
0
    }
}
if (isset($_GET['do'])) {
    $do = trim($_GET['do']);
    if (!empty($_GET['id'])) {
        $id = intval($_GET['id']);
    }
    if ($do == "del" && !empty($id)) {
        $result = $link->del($id);
    }
    if ($do == "edit") {
        $tpl_file = "friendlink.edit";
        if (!empty($id)) {
            $fields = "*";
            $link_info = $link->read($fields, $id);
            $r1 = $industry->disSubOptions($link_info['industry_id'], "industry_");
            $r2 = $area->disSubOptions($link_info['area_id'], "area_");
            $link_info = am($link_info, $r1, $r2);
            setvar("item", $link_info);
        }
        template($tpl_file);
        exit;
    }
}
if (isset($_POST['del']) && !empty($_POST['id'])) {
    $result = $link->del($_POST['id']);
    if (!$result) {
        flash();
    }
}
$amount = $link->findCount($conditions);
Example #5
0
    $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}");
    if (!empty($company_fields)) {
        $companyinfo = am($companyinfo, $company_fields);
    }
    $companyinfo['found_year'] = date("Y", (int) $companyinfo['found_date']);
    $r1 = $industry->disSubOptions($companyinfo['industry_id'], "industry_");
    $r2 = $area->disSubOptions($companyinfo['area_id'], "area_");
    $companyinfo = am($companyinfo, $r1, $r2);
    setvar("item", $companyinfo);
    unset($selected, $companyinfo);
}
template($tpl_file);