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


PHP Members::field方法代码示例

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


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

示例1: detail

 function detail()
 {
     global $viewhelper, $G, $pb_user;
     $positions = $titles = array();
     uses("trade", "member", "company", "tradefield", "form", "industry", "area", "meta");
     $offer = new Tradefields();
     $area = new Areas();
     $meta = new Metas();
     $industry = new Industries();
     $company = new Companies();
     $trade = new Trade();
     $trade_model = new Trades();
     $member = new Members();
     //$typeoption = new Typeoption();
     $form = new Forms();
     setvar("Genders", cache_read("typeoption", 'gender'));
     setvar("PhoneTypes", cache_read("typeoption", 'phone_type'));
     $viewhelper->setTitle(L("offer", "tpl"));
     $viewhelper->setPosition(L("offer", "tpl"), "index.php?do=offer");
     if (isset($_GET['title'])) {
         $title = trim($_GET['title']);
         $res = $trade_model->findByTitle($title);
         $id = $res['id'];
     }
     if (isset($_GET['id'])) {
         $id = intval($_GET['id']);
     }
     if (!empty($id)) {
         $trade->setInfoById($id);
         $info = $trade->info;
         if (empty($info['id'])) {
             flash("data_not_exists", '', 0);
         }
         $info['title_clear'] = $info['title'];
         $info['title'] .= ($G['setting']['offer_expire_method'] == 1 || $G['setting']['offer_expire_method'] == 3) && $info['expdate'] < $offer->timestamp ? "[" . L("has_expired", "tpl") . "]" : '';
         $info['title'] .= !empty($info['if_urgent']) ? "[" . L("urgent_buy", "tpl") . "]" : '';
         if ($info['expdate'] < $offer->timestamp && $G['setting']['offer_expire_method'] == 2) {
             flash("has_been_expired", URL, 0, $info['title_clear'] . " ");
         }
     } else {
         flash("data_not_exists", '', 0);
     }
     if ($info['status'] != 1) {
         flash("under_checking", null, 0, $info['title_clear'] . " ");
     }
     $trade_types = $trade->getTradeTypes();
     $viewhelper->setTitle($trade_types[$info['type_id']]);
     $viewhelper->setPosition($trade_types[$info['type_id']], "index.php?do=offer&action=lists&typeid=" . $info['type_id']);
     $trade_model->clicked($id);
     if ($info['require_point'] > 0) {
         //check member points
         if (empty($pb_user)) {
             flash("please_login_first", URL . "logging.php");
         }
         $point = $member->field("points", "id='" . $pb_user['pb_userid'] . "'");
         if ($point < $info['require_point']) {
             flash("not_enough_points", URL, 0, $info['require_point']);
         }
     }
     $form_vars = array();
     if (isset($info['formattribute_ids'])) {
         $form_vars = $form->getAttributes(explode(",", $info['formattribute_ids']));
     }
     setvar("ObjectParams", $form_vars);
     $info['pubdate'] = df($info['pubdate']);
     $info['expdate'] = df($info['expdate']);
     $info['image'] = pb_get_attachmenturl($info['picture']);
     $login_check = 1;
     if ($info['type_id'] == 1) {
         $login_check = $G['setting']['buy_logincheck'];
     } elseif ($info['type_id'] == 2) {
         $login_check = $G['setting']['sell_logincheck'];
     }
     if (!empty($info['member_id'])) {
         $member_info = $member->getInfoById($info['member_id']);
         $info['link_people'] = $member_info['last_name'];
         $info['space_name'] = $member_info['space_name'];
         $info['tel'] = $member_info['tel'];
         $info['address'] = $member_info['address'];
         $info['zipcode'] = $member_info['zipcode'];
         $info['fax'] = $member_info['fax'];
         $info['site_url'] = $member_info['site_url'];
         setvar("MEMBER", $member_info);
     }
     if (!empty($info['company_id'])) {
         $company_info = $company->getInfoById($info['company_id']);
         if (!empty($company_info)) {
             $info['companyname'] = $company_info['name'];
             $info['link_people'] = $company_info['link_man'];
             $info['address'] = $company_info['address'];
             $info['zipcode'] = $company_info['zipcode'];
             $info['site_url'] = pb_hidestr($company_info['site_url']);
             $info['tel'] = pb_hidestr($company_info['tel']);
             $info['fax'] = pb_hidestr($company_info['fax']);
         }
         setvar("COMPANY", $company_info);
     }
     setvar("LoginCheck", $login_check);
     $info['title'] = strip_tags($info['title']);
     $info['industry_names'] = $industry->disSubNames($info['industry_id'], null, true, "offer");
//.........这里部分代码省略.........
开发者ID:reboxhost,项目名称:phpb2b,代码行数:101,代码来源:offer_controller.php

示例2: trim

if (isset($_POST['do_action'])) {
    $action = trim($_POST['do_action']);
    switch ($action) {
        case "uploadify":
            uses("attachment");
            //check permission
            $fileElementName = 'Filedata';
            $attachment = new Attachment($fileElementName);
            $authed = false;
            $attachment->if_thumb_large = false;
            if (!empty($_COOKIE[$cookiepre . 'admin'])) {
                $tAdminInfo = authcode($_COOKIE[$cookiepre . 'admin'], "DECODE");
                $tAdminInfo = explode("\n", $tAdminInfo);
                if (!empty($tAdminInfo)) {
                    //check admin password
                    $adminPasswd = $member->field("userpass", array("username" => $tAdminInfo['username']));
                    if (pb_strcomp($tAdminInfo['userpass'], $adminPasswd)) {
                        $authed = true;
                    }
                }
            }
            $targetPath = PHPB2B_ROOT . $attachment->attachment_dir . DS . "swfupload" . DS . gmdate("Y") . gmdate("m") . DS . gmdate("d") . DS;
            if (!is_dir($targetPath)) {
                pb_create_folder($targetPath);
            }
            $orignal_fileinfo = get_pathinfo($_FILES[$fileElementName]['name']);
            $new_file_name = gmdate("His") . pb_radom() . "." . $orignal_fileinfo['extension'];
            $targetFile = str_replace('//', '/', $targetPath) . $new_file_name;
            if ($authed && is_uploaded_file($_FILES[$fileElementName]['tmp_name'])) {
                move_uploaded_file($_FILES[$fileElementName]['tmp_name'], $targetFile);
                $return['url'] = $absolute_uri . $attachment_url . "swfupload/" . gmdate("Y") . gmdate("m") . "/" . gmdate("d") . "/" . $new_file_name;
开发者ID:reboxhost,项目名称:phpb2b,代码行数:31,代码来源:ajax.php

示例3: flash

} else {
    flash("data_not_exists", '', 0);
}
if ($info['status'] != 1) {
    flash("under_checking", null, 0, $info['title']);
}
$trade_types = $trade->getTradeTypes();
$viewhelper->setTitle($trade_types[$info['type_id']]);
$viewhelper->setPosition($trade_types[$info['type_id']], "offer/list.php?typeid=" . $info['type_id']);
$trade_model->clicked($id);
if ($info['require_point'] > 0) {
    //check member points
    if (empty($pb_user)) {
        flash("please_login_first", URL . "logging.php");
    }
    $point = $member->field("points", "id='" . $pb_user['pb_userid'] . "'");
    if ($point < $info['require_point']) {
        flash("not_enough_points", URL, 0, $info['require_point']);
    }
}
if (isset($info['formattribute_ids'])) {
    $form_vars = $form->getAttributes(explode(",", $info['formattribute_ids']));
    setvar("ObjectParams", $form_vars);
}
$info['pubdate'] = df($info['pubdate']);
$info['expdate'] = df($info['expdate']);
$info['image'] = pb_get_attachmenturl($info['picture']);
$login_check = 1;
if ($info['type_id'] == 1) {
    $login_check = $_PB_CACHE['setting']['buy_logincheck'];
} elseif ($info['type_id'] == 2) {
开发者ID:renduples,项目名称:alibtob,代码行数:31,代码来源:detail.php


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