本文整理汇总了PHP中Forms::Add方法的典型用法代码示例。如果您正苦于以下问题:PHP Forms::Add方法的具体用法?PHP Forms::Add怎么用?PHP Forms::Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Forms
的用法示例。
在下文中一共展示了Forms::Add方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: serialize
break;
}
$res['cache_contacts'] = serialize($im_arr);
} else {
$res['cache_contacts'] = serialize(array('qq' => $memberinfo['qq'], 'icq' => $memberinfo['icq'], 'skype' => $memberinfo['skype'], 'yahoo' => $memberinfo['yahoo'], 'msn' => $memberinfo['msn']));
}
}
$tradefield_res['prim_tel'] = $_POST['data']['prim_tel'];
$tradefield_res['prim_telnumber'] = $_POST['data']['prim_telnumber'];
$tradefield_res['prim_im'] = $_POST['data']['prim_im'];
$tradefield_res['prim_imaccount'] = $_POST['data']['prim_imaccount'];
$res['industry_id'] = PbController::getMultiId($_POST['industry']['id']);
$res['area_id'] = PbController::getMultiId($_POST['area']['id']);
$res['highlight'] = 0;
if (!empty($id)) {
$item_ids = $form->Add($id, $_POST['data']['formitem']);
$res['formattribute_ids'] = $item_ids;
$tradefield_res['trade_id'] = $id;
$res['modified'] = $time_stamp;
unset($res['member_id'], $res['company_id']);
$res = $trade->save($res, "update", $id, null, $conditions);
} else {
if ($g['max_offer'] && $now_offer_amount >= $g['max_offer']) {
flash('one_day_max');
}
$res['member_id'] = $the_memberid;
$res['company_id'] = $company_id;
$res['submit_time'] = $res['created'] = $res['modified'] = $time_stamp;
if (!empty($_POST['expire_days'])) {
if (array_key_exists($_POST['expire_days'], $trade_controller->getOfferExpires())) {
$res['expire_days'] = $_POST['expire_days'];
示例2: intval
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};
$item_ids = $form->Add($product_id, $_POST['data']['formitem'], 1, $form_type_id);
if ($item_ids) {