本文整理汇总了PHP中Model_User::getDetail方法的典型用法代码示例。如果您正苦于以下问题:PHP Model_User::getDetail方法的具体用法?PHP Model_User::getDetail怎么用?PHP Model_User::getDetail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Model_User
的用法示例。
在下文中一共展示了Model_User::getDetail方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: explodeAction
/**
* 导出资源数据
*/
public function explodeAction()
{
$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';
}
$aList = Model_Media::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">报价1</th>
<th scope="col">报价2</th>
<th scope="col">报价3</th>
<th scope="col">报价4</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>
<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) {
$id = $val['iMediaID'];
$row = Model_User::getDetail($val['iUserID']);
$sRealName = isset($row) && $row['sRealName'] != '' ? $row['sRealName'] : '';
$iMediaType = '';
if ($val['iMediaType'] == '1') {
$iMediaType = '微信';
} elseif ($val['iMediaType'] == '2') {
$iMediaType = '微博';
} elseif ($val['iMediaType'] == '3') {
$iMediaType = '朋友圈';
} elseif ($val['iMediaType'] == '4') {
$iMediaType = '新闻';
}
$sMediaName = $val['sMediaName'];
$sOpenName = $val['sOpenName'];
$iFollowerNum = $val['iFollowerNum'];
$sFollowerImg = Util_Uri::getDFSViewURL($val['sFollowerImg'], 130, 130);
$sAvatar = Util_Uri::getDFSViewURL($val['sAvatar'], 130, 130);
$sQRCode = Util_Uri::getDFSViewURL($val['sQRCode'], 130, 130);
$iPrice5 = $val['iPrice5'];
$iPrice6 = $val['iPrice6'];
$iPrice7 = $val['iPrice7'];
$iPrice8 = $val['iPrice8'];
$iReadNum = $val['iReadNum'];
$iScore = $val['iScore'];
$iRecommendLevel = $val['iRecommendLevel'];
$iPersonCharge = $val['iPersonCharge'];
$iAuditperson = $val['iAuditperson'];
$rowattr = Model_Domain::getDetail($val['iAttribute']);
$iAttribute = isset($rowattr['sName']) ? $rowattr['sName'] : '';
//属性
$sWxLink = $val['sWxLink'];
$rowver = Model_Domain::getDetail($val['iVerifyState']);
$iVerifyState = isset($rowver['sName']) ? $rowver['sName'] : '';
//认证
$sIntroduction = $val['sIntroduction'];
$sTypeInfo = $val['sTypeInfo'];
$sCooperateLevelInfo = '';
if ($val['sCooperateLevelInfo'] != '') {
$rowlevel = Model_Domain::getAll(array('where' => array('iAutoID IN' => $val['sCooperateLevelInfo'])));
//.........这里部分代码省略.........
示例2: 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>
//.........这里部分代码省略.........
示例3: explodeAction
//.........这里部分代码省略.........
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) {
$sCatID .= ',' . $val_City['sName'];
}
}
$aList['aList'][$key]['sCatID'] = $sCatID;
}
//资源广告内容
$rowAd = array();
if ($val['iMediaType'] == Model_Media::TYPE_WEIXIN) {
$rowAd = Model_AdWeixin::getDetail($val['iAdID']);
$iPosID = $rowAd['iAdPos'];
} elseif ($val['iMediaType'] == Model_Media::TYPE_FRIEND) {
$rowAd = Model_AdFriend::getDetail($val['iAdID']);
$iPosID = $rowAd['iAdPos'];
} elseif ($val['iMediaType'] == Model_Media::TYPE_WEIBO) {
$rowAd = Model_AdWeibo::getDetail($val['iAdID']);
$iPosID = $rowAd['iAdPos'];
} elseif ($val['iMediaType'] == Model_Media::TYPE_NEWS) {
$rowAd = Model_AdNews::getDetail($val['iAdID']);
$iPosID = $rowAd['iAdPos'];
}
$aList['aList'][$key]['Media'] = $rowAd;
//广告位
$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' => '直发报价'));
if ($val['iMediaType'] != '') {
$iPos = $aTitle[$val['iMediaType']][$iPosID];
$aList['aList'][$key]['sPos'] = $iPos;
}
}
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>
</tr>';
foreach ($aList as $key => $val) {
$row = Model_User::getDetail($val['iUserID']);
$sUserRealName = isset($row) && $row['sRealName'] != '' ? $row['sRealName'] : '';
$iCreateTime = date('Y-m-d H:i:s', $val['iCreateTime']);
$iPlanTime = isset($val['iPlanTime']) && $val['iPlanTime'] != '' ? date('Y-m-d H:i:s', $val['iPlanTime']) : '';
$str_explode .= '<tr>
<td align="left">' . $sUserRealName . '</td>
<td align="left">' . $val['sAdName'] . '</td>
<td align="left">' . $val['iPlanMinMoney'] . '</td>
<td align="left">' . $val['iPlanMaxMoney'] . '</td>
<td align="left">' . $val['iPlanTime'] . '</td>
<td align="left">' . $val['iMediaType'] . '</td>
<td align="left">' . $val['iAdType'] . '</td>
<td align="left">' . $val['sCatID'] . '</td>
<td align="left">' . $val['sCityID'] . '</td>
<td align="left">' . $val['iTotalMoney'] . '</td>
<td align="left">' . $val['iPayStatus'] . '</td>
<td align="left">' . $val['iStatus'] . '</td>
<td align="left">' . $iCreateTime . '</td>
</tr>';
}
$str_explode .= '</table>';
$str_explode .= "</body></html>";
echo $str_explode;
}
示例4: editAction
/**
* 用户修改
*/
public function editAction()
{
if ($this->_request->isPost()) {
$aUser = $this->_checkData('update');
if (empty($aUser)) {
return null;
}
$aUser['iUserID'] = intval($this->getParam('iUserID'));
$aOldUser = Model_User::getDetail($aUser['iUserID']);
if (empty($aOldUser)) {
return $this->showMsg('用户不存在!', false);
}
if ($aOldUser['sEmail'] != $aUser['sEmail'] && $aOldUser['iStatus'] > 0) {
if (Model_User::getUserByEmail($aUser['sEmail'])) {
return $this->showMsg('用户已经存在!', false);
}
}
if (1 == Model_User::updData($aUser)) {
//判断余额是否变化
if (intval($aOldUser['iMoney']) != intval($aUser['iMoney'])) {
//邮件
$sTitle = Model_Kv::getValue('user_credit_email_title');
$sContent = Model_Kv::getValue('user_credit_email_content');
$sTitler = Model_Kv::getValue('user_crediter_email_title');
$sContentr = Model_Kv::getValue('user_crediter_email_content');
$email = 'viven@51wom.com';
$Money = intval($aUser['iMoney']) - intval($aOldUser['iMoney']);
Util_Mail::send($aUser['sEmail'], $sTitle, $sContent, array($Money));
Util_Mail::send($email, $sTitler, $sContentr, array($aUser['sEmail'], $Money));
}
//判断利率是否变化
if ($aOldUser['iRate'] != $aUser['iRate']) {
Model_Media::query("UPDATE t_media SET iRate= {$aUser['iRate']} WHERE iUserID={$aUser['iUserID']}");
}
return $this->showMsg('用户信息更新成功!', true);
} else {
return $this->showMsg('用户信息更新失败!', false);
}
} else {
$iUserID = intval($this->getParam('id'));
$aUser = Model_User::getDetail($iUserID);
$this->assign('aUser', $aUser);
$this->assign('aBusiness', Model_Domain::getPairDomain(Model_Domain::TYPE_CO_INDUSTRY));
//行业
}
}
示例5: chgpwdAction
/**
* 修改密码
*/
public function chgpwdAction()
{
if ($this->isPost()) {
$aParam = $this->getParams();
$aErr = array();
if (empty($aParam['sNewPassword']) || !Util_Validate::isLength($aParam['sNewPassword'], 6, 12)) {
$aErr['sNewPassword'] = '登录密码长度为6-12个字符';
}
if ($aParam['sNewPassword'] != $aParam['sRePassword']) {
$aErr['sRePassword'] = '登录密码两次输入不一致';
}
$aUser = Model_User::getDetail($this->aCurrUser['iUserID']);
if (Model_User::makePassword($aParam['sOldPassword']) != $aUser['sPassword']) {
$aErr['sOldPassword'] = '原登录密码输入错误 ';
}
if (!empty($aErr)) {
return $this->showMsg($aErr, false);
}
$sNewPassword = Model_User::makePassword($aParam['sNewPassword']);
Model_User::updData(array('sPassword' => $sNewPassword, 'iUserID' => $aUser['iUserID']));
return $this->showMsg('登录密码修改成功!', true);
} else {
$this->assign('iTabID', 3);
$this->setMeta('mcenter_page', array('sTitle' => '自媒体中心 - 修改登录密码'));
}
}
示例6: wpayAction
/**
* 支付详情
*/
public function wpayAction()
{
$iAdID = intval($this->getParam('id'));
$aAd = Model_Ad::getDetail($iAdID);
if (empty($aAd) || $aAd['iUserID'] != $this->aCurrUser['iUserID']) {
return $this->show404();
}
if ($aAd['iTotalMoney'] == 0) {
return $this->show404('订单价格不能为0!');
}
$aUser = Model_User::getDetail($this->aCurrUser['iUserID']);
$this->assign('aAd', $aAd);
$this->assign('aUser', $aUser);
$this->assign('sTopMenu', 'aadd');
$this->setMeta('ad_add', array('sTitle' => '添加推广计划 - 支付详情'));
}
示例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>
//.........这里部分代码省略.........
示例8: editAction
/**
* 用户修改
*/
public function editAction()
{
if ($this->_request->isPost()) {
$aUser = $this->_checkData('update');
if (empty($aUser)) {
return null;
}
$aUser['iUserID'] = intval($this->getParam('iUserID'));
$aOldUser = Model_User::getDetail($aUser['iUserID']);
if (empty($aOldUser)) {
return $this->showMsg('用户不存在!', false);
}
if ($aOldUser['sEmail'] != $aUser['sEmail'] && $aOldUser['iStatus'] > 0) {
if (Model_User::getUserByEmail($aUser['sEmail'])) {
return $this->showMsg('用户已经存在!', false);
}
}
if (1 == Model_User::updData($aUser)) {
return $this->showMsg('用户信息更新成功!', true);
} else {
return $this->showMsg('用户信息更新失败!', false);
}
} else {
$iUserID = intval($this->getParam('id'));
$aUser = Model_User::getDetail($iUserID);
$this->assign('aUser', $aUser);
$this->assign('aBusiness', Model_Domain::getPairDomain(Model_Domain::TYPE_CO_INDUSTRY));
//行业
}
}
示例9: addokAction
/**
* 发布成功
*/
public function addokAction()
{
$iMediaID = (int) $this->getParam('id');
$aMedia = Model_Media::getDetail($iMediaID);
if (empty($iMediaID)) {
return $this->show404();
}
if (empty($aMedia)) {
return $this->show404($aMedia['']);
}
$aUser = Model_User::getDetail($aMedia['iUserID']);
$title = Model_Kv::getValue('media_go_email_title');
$content = Model_Kv::getValue('media_go_email_content');
$eamil1 = 'key@51wom.com';
$eamil2 = 'david@51wom.com';
Util_Mail::send($eamil1, $title, $content, array($aUser['sEmail'], $aMedia['sMediaName']));
Util_Mail::send($eamil2, $title, $content, array($aUser['sEmail'], $aMedia['sMediaName']));
$aType = Model_Media::$aType;
$this->assign('sType', $aType[$aMedia['iMediaType']]);
$this->assign('aMedia', $aMedia);
$this->assign('sTopMenu', 'madd');
$this->setMeta('media_add', array('sTitle' => '添加媒体 - 发布成功'));
}
示例10: successAction
public function successAction()
{
$iOrderID = $this->getParam('id');
$aData = Model_Finance::getDetail($iOrderID);
$aUser = Model_User::getDetail($aData['iUserID']);
//支付成功发送邮件到公司媒介专员
$sTitle = Model_Kv::getValue('tixing_zhifu_email_title');
$sContent = Model_Kv::getValue('tixing_zhifu_email_content');
$email = 'viven@51wom.com';
Util_Mail::send($email, $sTitle, $sContent, array($aUser['sEmail'], $aData['iPayMoney']));
$this->assign('aData', $aData);
}
示例11: finishAction
/**
* 投放完成(结算)
*
* @return boolean
*/
public function finishAction()
{
$iAutoID = intval($this->getParam('id'));
$aAdMedia = Model_AdMedia::getDetail($iAutoID);
if (empty($aAdMedia)) {
return $this->showMsg('数据出错了', false);
}
if ($aAdMedia['iStatus'] != Model_AdMedia::STATUS_CONFIRM_EFFECT) {
return $this->showMsg('你已经处理过了', false);
}
$aAd = Model_Ad::getDetail($aAdMedia['iAdID']);
Model_AdMedia::begin();
Model_AdMedia::updStatus($iAutoID, Model_AdMedia::STATUS_FINISHED);
Model_Finance::updMoney($aAdMedia['iMUserID'], array('iPayment' => Model_Finance::PAYMENT_IN, 'iSource' => Model_Finance::SOURCE_AD_CASH_IN, 'iPayType' => Model_Finance::TYPE_NO, 'iMoney' => $aAdMedia['iMoney']));
Model_AdMedia::commit();
// 邮件通知
$sTitle = Model_Kv::getValue('ad_approve_preview_email_title');
$sContent = Model_Kv::getValue('ad_approve_preview_email_content');
// 短信通知
$iTempID = Util_Common::getConf(6, 'aSmsTempID');
$aUser = Model_User::getDetail($aAdMedia['iMUserID']);
$aMedia = Model_Media::getDetail($aAdMedia['iMediaID']);
Util_Mail::send($aUser['sEmail'], $sTitle, $sContent, array($aMedia['sEmail']));
Util_Sms::sendTemplateSms($aUser['sMobile'], array($aMedia['sEmail']), $iTempID);
// echo $sTitle, "\n", $sContent, "\n", $aUser['sEmail'], $aUser['sMobile'], $iTempID;
return $this->showMsg('操作成功', true);
}
示例12: pay
/**
* 充值
*
* @param unknown $sType
* @param unknown $sOrderID
* @param unknown $iMoney
* @param unknown $aArg
*/
public static function pay($sOrderID, $iPayMoney, $aArg)
{
Model_Finance::begin();
$aArg['sMyOrder'] = $sOrderID;
$sType = $sOrderID[0];
$iOrderID = substr($sOrderID, 1);
if ($sType == self::ORDER_AD) {
// 广告
$aAd = Model_Ad::getDetail($iOrderID);
if ($aAd && $aAd['iPayStatus'] == 0) {
$aUser = Model_User::getDetail($aAd['iUserID']);
if (ENV_SCENE == 'dev') {
$iPayMoney = $aAd['iTotalMoney'] - $aUser['iMoney'];
}
$iPayID = self::payAd($aUser, $aAd, $iPayMoney, $aArg);
} elseif ($aAd && $aAd['iPayStatus'] == 1) {
$iPayID = $aAd['iPayID'];
} else {
$iPayID = 0;
}
} else {
$aArg['iPayment'] = Model_Finance::PAYMENT_IN;
$aArg['iSource'] = Model_Finance::SOURCE_SELF_CASH_IN;
$aFinance = Model_Finance::getDetail($iOrderID);
if ($aFinance && $aFinance['iPayStatus'] == 0) {
$aUser = Model_User::getDetail($aFinance['iUserID']);
if (ENV_SCENE == 'dev') {
$iPayMoney = $aFinance['iPayMoney'];
}
$aArg['iMoney'] = $iPayMoney;
$iPayID = self::updMoney($aUser, $aArg, $iOrderID);
} else {
$iPayID = $iOrderID;
}
}
Model_Finance::commit();
return $iPayID;
}
示例13: firstAction
/**
* 首次发布广告或自媒体
*/
public function firstAction()
{
$iUserID = (int) $this->getParam('id');
$aUser = Model_User::getDetail($iUserID);
if (empty($aUser) || $aUser['iFirst'] >= 3) {
return $this->showMsg('已处理', true);
}
Model_User::updData(array('iUserID' => $iUserID, 'iFirst' => 3));
return $this->showMsg('已处理', true);
}