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


PHP Model_User::getAll方法代码示例

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


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

示例1: maskUserNamesAction

 /**
  * Maskuje nazwiska i adresy email uzytkownikow
  */
 public function maskUserNamesAction()
 {
     $oUser = new Model_User();
     $aUsers = $oUser->getAll();
     foreach ($aUsers as $aUser) {
         if (in_array($aUser['name'], array('Chodorowski', 'TestUser'))) {
             continue;
         }
         $oUser = new Model_User();
         $oUser->user_id = $aUser['user_id'];
         // pick random name
         $sName = chr(rand(65, 90));
         $sName .= chr(rand(97, 122)) . chr(rand(97, 122)) . chr(rand(97, 122)) . chr(rand(97, 122)) . chr(rand(97, 122));
         $sName .= chr(rand(97, 122)) . chr(rand(97, 122)) . chr(rand(97, 122)) . chr(rand(97, 122)) . chr(rand(97, 122));
         $oUser->name = $sName;
         $oUser->email = sprintf('%s.%s@catering.wsiz.wroc.pl', strtolower($aUser['fname']), strtolower($sName));
         // save
         if (!$oUser->save()) {
             break;
         }
         unset($oUser);
     }
     // foreach
     $this->indexAction('Maskowanie wykonane pomyslnie.');
 }
开发者ID:maxwroc,项目名称:PHP,代码行数:28,代码来源:Service.php

示例2: listAction

 /**
  * 自媒体列表
  */
 public function listAction()
 {
     $iPage = intval($this->getParam('page'));
     $aWhere = array();
     $aParam = $this->getParams();
     if (!empty($aParam['iUserID'])) {
         $aWhere['iUserID'] = $aParam['iUserID'];
     }
     if (!empty($aParam['iMediaType'])) {
         $aWhere['iMediaType'] = $aParam['iMediaType'];
     }
     if (!empty($aParam['sMediaName'])) {
         $aWhere['sMediaName LIKE'] = '%' . $aParam['sMediaName'] . '%';
     }
     if (!empty($aParam['iStatus'])) {
         $aWhere['iStatus'] = $aParam['iStatus'];
     } else {
         $aWhere['iStatus IN'] = '1,2,3';
     }
     if (!empty($aParam['iPut'])) {
         $aWhere['iPut'] = $aParam['iPut'];
     } else {
         $aWhere['iPut IN'] = '0,1';
     }
     $aList = Model_Media::getList($aWhere, $iPage, 'iStatus desc ,iMediaID desc');
     $useridArr = array();
     foreach ($aList['aList'] as $key => $val) {
         if ($val['iUserID'] > 0) {
             $useridArr[] = $val['iUserID'];
         }
     }
     if (count($useridArr) > 0) {
         $sUserid = '';
         $useridArr = array_unique($useridArr);
         $sUserid = implode(',', $useridArr);
         $sUserid = trim($sUserid, ',');
         $userData = Model_User::getAll(array('where' => array('iUserID IN' => $sUserid)));
         if (count($userData) > 0) {
             $data = array();
             foreach ($userData as $key => $value) {
                 $data[$value['iUserID']] = array('iUserID' => $value['iUserID'], 'sEmail' => $value['sEmail']);
             }
             $this->assign('userData', $data);
         }
     }
     $this->assign('aList', $aList);
     $this->assign('MediaType', Model_Media::$aType);
     $this->assign('aParam', $aParam);
 }
开发者ID:pancke,项目名称:yyaf,代码行数:52,代码来源:Media.php

示例3: explodeAction

    /**
     * 导出
     */
    public function explodeAction()
    {
        $uWhere = array();
        $aParam = $this->getParams();
        $userid = '';
        if (!empty($aParam['sRealName'])) {
            $uWhere['sRealName LIKE'] = '%' . $aParam['sRealName'] . '%';
            $data_user = Model_User::getAll(array('where' => $uWhere));
            $useridArr = array();
            foreach ($data_user as $val) {
                if ($val['iUserID'] != '') {
                    $useridArr[] = $val['iUserID'];
                }
            }
            if (count($useridArr) > 0) {
                $userid = implode(',', array_unique($useridArr));
            }
        }
        $aWhere = array();
        if (!empty($aParam['iUserID'])) {
            $aWhere['iUserID'] = $aParam['iUserID'];
        }
        if ($userid != '') {
            $aWhere['iUserID IN'] = $userid;
        }
        if (!empty($aParam['iPayment']) && $aParam['iPayment'] != '') {
            $aWhere['iPayment'] = $aParam['iPayment'];
        }
        if (!empty($aParam['iSource']) && $aParam['iSource'] != '') {
            $aWhere['iSource'] = $aParam['iSource'];
        }
        if (!empty($aParam['sRealName']) && $aParam['sRealName'] != '') {
            $aWhere['sRealName LIKE'] = '%' . $aParam['sRealName'] . '%';
        }
        if (!empty($aParam['iPayType']) && $aParam['iPayType'] != '') {
            $aWhere['iPayType'] = $aParam['iPayType'];
        }
        if (!empty($aParam['iPayStatus']) && $aParam['iPayStatus'] != '') {
            $aWhere['iPayStatus'] = $aParam['iPayStatus'];
        }
        $aList = Model_Finance::getAll(array('where', $aWhere));
        header("Content-type:application/vnd.ms-excel");
        header("Content-Disposition:filename=财务_" . date('Y-m-d', time()) . ".xls");
        $str_explode = "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /><title>导出</title><style>td{text-align:center;font-size:12px;font-family:Arial, Helvetica, sans-serif;border:#1C7A80 1px solid;color:#152122;width:100px;}table,tr{border-style:none;}.title{background:#7DDCF0;color:#FFFFFF;font-weight:bold;}</style></head><body>";
        $str_explode .= '<table cellspacing="0" cellpadding="3" rules="rows" border="1" id="" style="border-style:None;width:100%;border-collapse:collapse;">
							<tr>
								<th scope="col">用户名称/th>
								<th scope="col">收支情况</th>
								<th scope="col">事件来源</th>
								<th scope="col">申请人</th>
								<th scope="col">支付类型</th>
								<th scope="col">本次金额</th>
								<th scope="col">用户余额</th>
								<th scope="col">银行开户姓名</th>
								<th scope="col">开户银行</th>
								<th scope="col">支付帐号</th>
								<th scope="col">支付状态</th>
								<th scope="col">支付流水号</th>
								<th scope="col">备注</th>
								<th scope="col">时间</th>
							</tr>';
        foreach ($aList as $key => $val) {
            $row = Model_User::getDetail($val['iUserID']);
            $sUserRealName = isset($row) && $row['sRealName'] != '' ? $row['sRealName'] : '';
            $iPayment = isset($val['iPayment']) && $val['iPayment'] == '1' ? '收入' : '支出';
            $iSource = '';
            if ($val['iSource'] == '1') {
                $iSource = '自主充值';
            } elseif ($val['iSource'] == '2') {
                $iSource = '付款充值';
            } elseif ($val['iSource'] == '3') {
                $iSource = '拒单退款';
            } elseif ($val['iSource'] == '4') {
                $iSource = '取现';
            } elseif ($val['iSource'] == '5') {
                $iSource = '广告费用';
            }
            $sRealName = $val['sRealName'];
            $iPayType = '';
            if ($val['iPayType'] == '1') {
                $iPayType = '支付宝';
            } elseif ($val['iPayType'] == '2') {
                $iPayType = '微信';
            } elseif ($val['iPayType'] == '3') {
                $iPayType = '银行卡';
            }
            $iPayMoney = $val['iPayMoney'];
            $iUserMoney = $val['iUserMoney'];
            $sOpenName = $val['sOpenName'];
            $sBankName = $val['sBankName'];
            $sPayAccount = $val['sPayAccount'];
            $iPayStatus = isset($val['iPayStatus']) && $val['iPayStatus'] == '0' ? '未支付' : '已支付';
            $sPayOrder = $val['sPayOrder'];
            $sRemark = $val['sRemark'];
            $iCreateTime = date('Y-m-d H:i:s', $val['iCreateTime']);
            $str_explode .= '<tr>
								<td align="left">' . $sUserRealName . '</td>
//.........这里部分代码省略.........
开发者ID:pancke,项目名称:yyaf,代码行数:101,代码来源:Finances.php

示例4: explodeAction

    /**
     * 导出
     */
    public function explodeAction()
    {
        $aWhere = array();
        $aParam = $this->getParams();
        if (!empty($aParam['iType'])) {
            $aWhere['iType'] = $aParam['iType'];
        }
        if (!empty($aParam['iCoIndustry'])) {
            $aWhere['iCoIndustry'] = $aParam['iCoIndustry'];
        }
        if (!empty($aParam['sEmail'])) {
            $aWhere['sEmail LIKE'] = '%' . $aParam['sEmail'] . '%';
        }
        if (!empty($aParam['sMobile'])) {
            $aWhere['sMobile LIKE'] = '%' . $aParam['sMobile'] . '%';
        }
        if (!empty($aParam['iStatus'])) {
            $aWhere['iStatus'] = $aParam['iStatus'];
        } else {
            $aWhere['iStatus IN'] = '1,2';
        }
        $aList = Model_User::getAll(array('where' => $aWhere));
        header("Content-type:application/vnd.ms-excel");
        header("Content-Disposition:filename=用户_" . date('Y-m-d', time()) . ".xls");
        $str_explode = "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /><title>导出</title><style>td{text-align:center;font-size:12px;font-family:Arial, Helvetica, sans-serif;border:#1C7A80 1px solid;color:#152122;width:100px;}table,tr{border-style:none;}.title{background:#7DDCF0;color:#FFFFFF;font-weight:bold;}</style></head><body>";
        $str_explode .= '<table cellspacing="0" cellpadding="3" rules="rows" border="1" id="" style="border-style:None;width:100%;border-collapse:collapse;">
							<tr>
								<th scope="col">帐号类型</th>
								<th scope="col">登录帐号</th>
								<th scope="col">手机号</th>
								<th scope="col">联系人名称</th>
								<th scope="col">公司名称</th>
								<th scope="col">所属行业</th>
								<th scope="col">公司地址</th>
								<th scope="col">公司网站</th>
								<th scope="col">公司介绍</th>
								<th scope="col">微信</th>
								<th scope="col">QQ</th>
								<th scope="col">余额</th>
								<th scope="col">时间</th>
							</tr>';
        foreach ($aList as $key => $val) {
            $iType = isset($val['iType']) && $val['iType'] == '1' ? '自媒体' : '广告主';
            $sEmail = $val['sEmail'];
            $sMobile = $val['sMobile'];
            $sRealName = $val['sRealName'];
            $sCoName = $val['sCoName'];
            //行业
            $sCoIndustry = '';
            if ($val['sCoIndustry'] != '') {
                $rowlevel = Model_Domain::getAll(array('where' => array('iAutoID IN' => $val['sCoIndustry'])));
                //合作等级
                if (isset($rowlevel) && count($rowlevel) > 0) {
                    foreach ($rowlevel as $lrow) {
                        $sCoIndustry .= ' ' . $lrow['sName'];
                    }
                }
            }
            $sCoAddress = $val['sCoAddress'];
            $sCoWebsite = $val['sCoWebsite'];
            $sCoDesc = $val['sCoDesc'];
            $sWeixin = $val['sWeixin'];
            $sQQ = $val['sQQ'];
            $iMoney = $val['iMoney'];
            $iCreateTime = date('Y-m-d H:i:s', $val['iCreateTime']);
            $str_explode .= '<tr>
								<td align="left">' . $iType . '</td>
								<td align="left">' . $sEmail . '</td>
								<td align="left">' . $sMobile . '</td>
								<td align="left">' . $sRealName . '</td>
								<td align="left">' . $sCoName . '</td>
								<td align="left">' . $sCoIndustry . '</td>
								<td align="left">' . $sCoAddress . '</td>
								<td align="left">' . $sCoWebsite . '</td>
								<td align="left">' . $sCoDesc . '</td>
								<td align="left">' . $sWeixin . '</td>
								<td align="left">' . $sQQ . '</td>
								<td align="left">' . $iMoney . '</td>
								<td align="left">' . $iCreateTime . '</td>
							</tr>';
        }
        $str_explode .= '</table>';
        $str_explode .= "</body></html>";
        echo $str_explode;
    }
开发者ID:pancke,项目名称:yyaf,代码行数:88,代码来源:Member.php

示例5: explodeAction

    /**
     * 导出
     */
    public function explodeAction()
    {
        $uWhere = array();
        $aParam = $this->getParams();
        $userid = '';
        if (!empty($aParam['sUserRealName'])) {
            $uWhere['sRealName LIKE'] = '%' . $aParam['sUserRealName'] . '%';
            $data_user = Model_User::getAll(array('where' => $uWhere));
            $useridArr = array();
            foreach ($data_user as $val) {
                if ($val['iUserID'] != '') {
                    $useridArr[] = $val['iUserID'];
                }
            }
            if (count($useridArr) > 0) {
                $userid = implode(',', array_unique($useridArr));
            }
        }
        $aWhere = array();
        if (!empty($aParam['iUserID'])) {
            $aWhere['iUserID'] = $aParam['iUserID'];
        }
        if ($userid != '') {
            $aWhere['iUserID IN'] = $userid;
        }
        if (!empty($aParam['sAdName']) && $aParam['sAdName'] != '') {
            $aWhere['sAdName LIKE'] = '%' . $aParam['sAdName'] . '%';
        }
        if (!empty($aParam['iMediaType']) && $aParam['iMediaType'] != '') {
            $aWhere['iMediaType'] = $aParam['iMediaType'];
        }
        if (!empty($aParam['iAdType']) && $aParam['iAdType'] != '') {
            $aWhere['iAdType'] = $aParam['iAdType'];
        }
        if (!empty($aParam['iPayStatus']) && $aParam['iPayStatus'] != '') {
            $aWhere['iPayStatus'] = $aParam['iPayStatus'];
        }
        if (!empty($aParam['iStatus']) && $aParam['iStatus'] != '') {
            $aWhere['iStatus'] = $aParam['iStatus'];
        } else {
            $aWhere['iStatus IN'] = '1,2,3,4,5';
        }
        $aList = Model_Ad::getAll(array('where', $aWhere));
        foreach ($aList['aList'] as $key => $val) {
            //媒体类型
            if ($val['iMediaType'] == '1') {
                $aList['aList'][$key]['iMediaType'] = '公众号';
            } elseif ($val['iMediaType'] == '2') {
                $aList['aList'][$key]['iMediaType'] = '朋友圈';
            } elseif ($val['iMediaType'] == '3') {
                $aList['aList'][$key]['iMediaType'] = '新浪微博';
            } elseif ($val['iMediaType'] == '4') {
                $aList['aList'][$key]['iMediaType'] = '新闻论坛';
            }
            //广告类型
            if ($val['iAdType'] == '1') {
                $aList['aList'][$key]['iAdType'] = '硬广';
            } elseif ($val['iAdType'] == '2') {
                $aList['aList'][$key]['iAdType'] = '软广';
            } elseif ($val['iAdType'] == '3') {
                $aList['aList'][$key]['iAdType'] = '全部';
            }
            //支付状态
            if ($val['iPayStatus'] == '0') {
                $aList['aList'][$key]['iPayStatus'] = '未付款';
            } elseif ($val['iPayStatus'] == '1') {
                $aList['aList'][$key]['iPayStatus'] = '已付款';
            }
            //状态
            if ($val['iStatus'] == '1') {
                $aList['aList'][$key]['iStatus'] = '待审核';
            } elseif ($val['iStatus'] == '2') {
                $aList['aList'][$key]['iStatus'] = '审核通过';
            } elseif ($val['iStatus'] == '3') {
                $aList['aList'][$key]['iStatus'] = '审核未通过';
            } elseif ($val['iStatus'] == '4') {
                $aList['aList'][$key]['iStatus'] = '完成';
            } elseif ($val['iStatus'] == '5') {
                $aList['aList'][$key]['iStatus'] = '全未填写完成';
            }
            //城市
            if ($val['sCityID'] != '') {
                $data_City = Model_City::getAll(array('where' => array('iCityID IN' => $val['sCityID'])));
                $sCityID = '';
                if (count($data_City) > 0) {
                    foreach ($data_City as $val_City) {
                        $sCityID .= ',' . $val_City['sCityName'];
                    }
                }
                $aList['aList'][$key]['sCityID'] = $sCityID;
            }
            //媒体分类
            if ($val['sCatID'] != '') {
                $data_Cat = Model_Domain::getAll(array('where' => array('iAutoID IN' => $val['sCatID'])));
                $sCatID = '';
                if (count($data_Cat) > 0) {
                    foreach ($data_Cat as $val_City) {
//.........这里部分代码省略.........
开发者ID:pancke,项目名称:yyaf,代码行数:101,代码来源:Adsh.php

示例6: users

 public function users()
 {
     $this->view["users"] = Model_User::getAll();
     return View::factory('templates/admin/users/list', $this->view);
 }
开发者ID:Kapitonova,项目名称:codex,代码行数:5,代码来源:Admin.php

示例7: explodeAction

    /**
     * 导出
     */
    public function explodeAction()
    {
        $uWhere = array();
        $aParam = $this->getParams();
        $userid = '';
        if (!empty($aParam['sRealName'])) {
            $uWhere['sRealName LIKE'] = '%' . $aParam['sRealName'] . '%';
            $data_user = Model_User::getAll(array('where' => $uWhere));
            $useridArr = array();
            foreach ($data_user as $val) {
                if ($val['iUserID'] != '') {
                    $useridArr[] = $val['iUserID'];
                }
            }
            if (count($useridArr) > 0) {
                $userid = implode(',', array_unique($useridArr));
            }
        }
        $aWhere = array();
        if (!empty($aParam['iUserID'])) {
            $aWhere['iUserID'] = $aParam['iUserID'];
        }
        if ($userid != '') {
            $aWhere['iUserID IN'] = $userid;
        }
        if (!empty($aParam['iPayment']) && $aParam['iPayment'] != '') {
            $aWhere['iPayment'] = $aParam['iPayment'];
        }
        if (!empty($aParam['iSource']) && $aParam['iSource'] != '') {
            $aWhere['iSource'] = $aParam['iSource'];
        }
        if (!empty($aParam['sRealName']) && $aParam['sRealName'] != '') {
            $aWhere['sRealName LIKE'] = '%' . $aParam['sRealName'] . '%';
        }
        if (!empty($aParam['iPayType']) && $aParam['iPayType'] != '') {
            $aWhere['iPayType'] = $aParam['iPayType'];
        }
        if (!empty($aParam['iPayStatus']) && $aParam['iPayStatus'] != '') {
            $aWhere['iPayStatus'] = $aParam['iPayStatus'];
        }
        $aList = Model_AdMedia::getAll(array('where', $aWhere));
        header("Content-type:application/vnd.ms-excel");
        header("Content-Disposition:filename=资源订单_" . date('Y-m-d', time()) . ".xls");
        $str_explode = "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /><title>导出</title><style>td{text-align:center;font-size:12px;font-family:Arial, Helvetica, sans-serif;border:#1C7A80 1px solid;color:#152122;width:100px;}table,tr{border-style:none;}.title{background:#7DDCF0;color:#FFFFFF;font-weight:bold;}</style></head><body>";
        $str_explode .= '<table cellspacing="0" cellpadding="3" rules="rows" border="1" id="" style="border-style:None;width:100%;border-collapse:collapse;">
							<tr>
								<th scope="col">用户名称/th>
								<th scope="col">广告名称</th>
								<th scope="col">资源媒体名称</th>
								<th scope="col">广告位</th>
								<th scope="col">价格</th>
								<th scope="col">执行时间</th>
								<th scope="col">支付状态</th>
								<th scope="col">状态</th>
								<th scope="col">时间</th>
							</tr>';
        foreach ($aList as $key => $val) {
            $aAd = Model_Ad::getDetail($val['iAdID']);
            //资源
            $aMedia = Model_Media::getDetail($val['iMediaID']);
            $sMediaName = $aMedia['sMediaName'];
            //用户
            $aUser = Model_User::getDetail($val['iUserID']);
            $sEmail = $aUser['sEmail'];
            //广告位
            $aTitle = array(Model_Media::TYPE_WEIXIN => array('1' => '单图文报价', '2' => '第一条报价', '3' => '第二条报价', '4' => '其它位置价'), Model_Media::TYPE_FRIEND => array('1' => '转发报价', '2' => '直发报价'), Model_Media::TYPE_WEIBO => array('1' => '转发报价', '2' => '直发报价'));
            $iPos = '';
            if ($aAd['iMediaType'] != '') {
                $iPos = $aTitle[$aAd['iMediaType']][$val['iPos']];
            }
            //支付状态
            $iPayStatusName = '';
            if ($val['iPayStatus'] == '0') {
                $iPayStatusName = '未支付';
            } elseif ($val['iPayStatus'] == '1') {
                $iPayStatusName = '已支付';
            }
            $iMoney = $val['iMoney'];
            $iPlanTime = '';
            if ($val['iPlanTime'] != '' && $val['iPlanTime'] > 0) {
                $iPlanTime = date('Y-m-d H:i', $val['iPlanTime']);
            }
            //状态
            $iStatusName = '';
            if ($val['iStatus'] == '1') {
                $iStatusName = '等待接单';
            } elseif ($val['iStatus'] == '2') {
                $iStatusName = '等待执行';
            } elseif ($val['iStatus'] == '3') {
                $iStatusName = '执行中';
            } elseif ($val['iStatus'] == '4') {
                $iStatusName = '已完成';
            } elseif ($val['iStatus'] == '5') {
                $iStatusName = '拒绝接单';
            }
            $iCreateTime = date('Y-m-d H:i:s', $val['iCreateTime']);
            $str_explode .= '<tr>
//.........这里部分代码省略.........
开发者ID:pancke,项目名称:yyaf,代码行数:101,代码来源:Mediaorder.php


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