当前位置: 首页>>代码示例>>PHP>>正文


PHP Tags::setTagId方法代码示例

本文整理汇总了PHP中Tags::setTagId方法的典型用法代码示例。如果您正苦于以下问题:PHP Tags::setTagId方法的具体用法?PHP Tags::setTagId怎么用?PHP Tags::setTagId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Tags的用法示例。


在下文中一共展示了Tags::setTagId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: intval

    }
    $attachment->rename_file = "product-" . $time_stamp;
    if (isset($_POST['id'])) {
        $id = intval($_POST['id']);
    }
    if (!empty($id)) {
        $attachment->rename_file = "product-" . $id;
    }
    if (!empty($vals['content'])) {
        $vals['content'] = stripcslashes($vals['content']);
    }
    if (!empty($_FILES['pic']['name'])) {
        $attachment->upload_process();
        $vals['picture'] = $attachment->file_full_url;
    }
    $vals['tag_ids'] = $tag->setTagId($_POST['data']['tag']);
    if (!empty($id)) {
        $vals['modified'] = $time_stamp;
        $result = $product->save($vals, "update", $id);
    } else {
        $vals['created'] = $vals['modified'] = $time_stamp;
        $result = $product->save($vals);
    }
    if (!$result) {
        flash();
    }
}
if (isset($_POST['recommend'])) {
    foreach ($_POST['id'] as $val) {
        $commend_now = $product->field("ifcommend", "id=" . $val);
        if ($commend_now == "0") {
开发者ID:vuong93st,项目名称:w-game,代码行数:31,代码来源:product.php

示例2: intval

     $product->params['data']['product']['status'] = 1;
 } else {
     $product->params['data']['product']['status'] = 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;
开发者ID:renduples,项目名称:alibtob,代码行数:31,代码来源:product.php


注:本文中的Tags::setTagId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。