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


PHP F::msubstr方法代码示例

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


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

示例1: actionGetlogisticslist

 public function actionGetlogisticslist()
 {
     $organID = Commonmodel::getOrganID();
     //获取机构ID
     $criteria = new CDbCriteria();
     $criteria->select = "*";
     $criteria->order = "id DESC";
     $criteria->addCondition("OrganID=" . $organID);
     //查询条件:根据机构ID查询物流数据
     $count = Logistics::model()->count($criteria);
     $pages = new CPagination($count);
     $pages->applyLimit($criteria);
     $modeles = Logistics::model()->findAll($criteria);
     foreach ($modeles as $key => $value) {
         $data[$key]['ID'] = $value['ID'];
         $data[$key]['OrganID'] = $value['OrganID'];
         $data[$key]['Company'] = F::msubstr($value['LogisticsCompany']);
         $data[$key]['Description'] = F::msubstr($value['LogisticsDescription']);
         $data[$key]['LogisticsCompany'] = $value['LogisticsCompany'];
         $data[$key]['LogisticsDescription'] = $value['LogisticsDescription'];
         $data[$key]['CreateTime'] = date("Y-m-d H:i:s", $value['CreateTime']);
         $data[$key]['UpdateTime'] = $value['UpdateTime'];
         $data[$key]['Status'] = $value['Status'];
         $address = $this->getAddress($value['ID']);
         $data[$key]['Address'] = $address ? F::msubstr(substr($address, 0, -3)) : '';
         $data[$key]['AddressDetail'] = $address ? substr($address, 0, -3) : '';
         //$data[$key]['Address'] = Area::getCity($address['Province']) . Area::getCity($address['City']) . Area::getCity($address['Area']);
     }
     $rs = array('total' => $count, 'rows' => $data ? $data : array());
     //        var_dump($rs);exit;
     echo json_encode($rs);
 }
开发者ID:zwq,项目名称:unpei,代码行数:32,代码来源:LogisticsController.php

示例2: actionQuotelist

 public function actionQuotelist()
 {
     $userID = Commonmodel::getOrganID();
     $criteria = new CDbCriteria();
     if ($_GET) {
         if ($_GET['num']) {
             $criteria->addSearchCondition('ItemNum', "{$_GET['num']}", "AND");
         }
         if ($_GET['name']) {
             $criteria->addSearchCondition('ItemName', "{$_GET['name']}", "AND");
         }
     }
     $criteria->order = "t.UpdateTime DESC,t.ID DESC";
     //排序条件:t.UpdateTime,t.ID倒叙
     $criteria->addCondition("t.OrganID = {$userID}");
     $criteria->addCondition("t.Status = 0");
     $count = ServiceItems::model()->count($criteria);
     $pages = new CPagination($count);
     $pages->pageSize = $_GET['rows'];
     $pages->applyLimit($criteria);
     $model = ServiceItems::model()->findAll($criteria);
     foreach ($model as $key => $value) {
         $data[$key] = $value->attributes;
         $data[$key]['ItemNums'] = F::msubstr($value['ItemNum']);
         $data[$key]['ItemNames'] = F::msubstr($value['ItemName']);
         $data[$key]['ItemExplan'] = F::msubstr($value['ItemIntro']);
     }
     $rs = array('total' => $count, 'rows' => $data ? $data : array());
     echo json_encode($rs);
 }
开发者ID:zwq,项目名称:unpei,代码行数:30,代码来源:ServicemaininfoController.php

示例3: actionMaintainlist

 public function actionMaintainlist()
 {
     $userID = Commonmodel::getOrganID();
     $criteria = new CDbCriteria();
     $criteria->with = "owners";
     if ($_GET) {
         if ($_GET['name']) {
             $remind = $this->getRecord($_GET['name']);
             $criteria->addInCondition('t.ID', $remind);
         }
         if ($_GET['status']) {
             $criteria->addCondition("t.Status = {$_GET['status']}", "AND");
         }
         if ($_GET['date']) {
             $starttime = strtotime($_GET['date']);
             $endtime = (int) (strtotime($_GET['date']) + 60 * 60 * 24);
             $criteria->addBetweenCondition('t.MaintainDate', $starttime, $endtime, "AND");
         }
     }
     $criteria->order = "t.MaintainDate DESC,t.UpdateTime DESC";
     //排序条件:t.MaintainDate,t.UpdateTime倒叙
     $criteria->addCondition("t.OrganID = {$userID}", "AND");
     $count = MaintainRemind::model()->count($criteria);
     $pages = new CPagination($count);
     $pages->pageSize = $_GET['rows'];
     $pages->applyLimit($criteria);
     $model = MaintainRemind::model()->findAll($criteria);
     foreach ($model as $key => $value) {
         $data[$key]['ID'] = $value['ID'];
         if ($value['Status'] == '1') {
             $data[$key]['State'] = '待发送';
         } elseif ($value['Status'] == '2') {
             $data[$key]['State'] = '已发送';
         } else {
             $data[$key]['State'] = '取消发送';
         }
         $data[$key]['Status'] = $value['Status'];
         $data[$key]['MaintainDate'] = date('Y-m-d', $value['MaintainDate']);
         $data[$key]['MaintainTime'] = $value['MaintainDate'];
         $data[$key]['RemindContent'] = $value['RemindContent'];
         $data[$key]['Content'] = F::msubstr($value['RemindContent']);
         foreach ($value->owners as $owners_key => $owners_value) {
             $data[$key]['OldName'] .= $owners_value->Name . ",";
             $data[$key]['Name'] = F::msubstr(substr($data[$key]['OldName'], 0, -1));
         }
     }
     $rs = array('total' => $count, 'rows' => $data ? $data : array());
     echo json_encode($rs);
 }
开发者ID:zwq,项目名称:unpei,代码行数:49,代码来源:ServicemaintainController.php

示例4: getTitle

 /**
  * get item title
  * @return string
  */
 public function getTitle()
 {
     return CHtml::link(F::msubstr($this->title, '0', '15', 'utf-8'), array('/item/view', 'id' => $this->item_id), array('title' => $this->title));
 }
开发者ID:lhfcainiao,项目名称:basic,代码行数:8,代码来源:Item.php

示例5: array

                                <td>
                                    <?php 
        echo F::msubstr($model->organName);
        ?>
                                </td>
                                <td >
                                    <?php 
        echo F::msubstr($model->contactsName . ' ' . $model->telephone);
        ?>
                                </td>
                                <td ><?php 
        echo $model->cooperateType;
        ?>
</td>
                                <td ><?php 
        echo F::msubstr($model->remarks);
        ?>
</td>
                                <td ><?php 
        echo $model->customerType;
        ?>
</td>
                                <td >
                                    <?php 
        echo CHtml::link('修改', 'javascript:void(0)', array('id' => 'modify', 'modelid' => $model->id));
        ?>
||<?php 
        echo CHtml::link('删除', 'javascript:void(0)', array('id' => 'delete', 'modelid' => $model->id, 'key' => 'cont'));
        ?>
                                </td>
                            </tr>
开发者ID:zwq,项目名称:unpei,代码行数:31,代码来源:contacts.php

示例6: actionContact

 public function actionContact()
 {
     $OrganID = Commonmodel::getOrganID();
     //获取共享关系表中机构ID
     $ids = $this->getShareids();
     //获取用户表中所有经销商ID
     $users = User::getDealerID();
     foreach ($users as $user) {
         $identity[] = $user['id'];
     }
     //获取不在共享关系表中的机构信息
     $criteria = new CDbCriteria();
     $criteria->addInCondition('t.contact_user_id', $identity);
     //业务联系人属于经销商
     $criteria->addCondition("t.user_id = {$OrganID}", "AND");
     //当前机构下
     $criteria->addCondition("t.Status = 0", "AND");
     //未删除
     $criteria->addNotInCondition('t.contact_user_id', $ids);
     //业务联系人不在确定共享关系中
     $criteria->order = "t.create_time desc";
     //以添加时间倒序
     //通过机构名称模糊检索
     if ($_GET['name']) {
         $criteria->addSearchCondition('t.companyname', $_GET['name'], "AND");
     }
     //分页
     $count = BusinessContacts::model()->count($criteria);
     $pages = new CPagination($count);
     $pages->pageSize = $_GET['rows'];
     $pages->applyLimit($criteria);
     $model = BusinessContacts::model()->findAll($criteria);
     foreach ($model as $key => $value) {
         $data[$key]['id'] = $value['id'];
         $data[$key]['name'] = F::msubstr($value['name']);
         $data[$key]['sex'] = $value['sex'];
         $data[$key]['jiapart_ID'] = $value['jiapart_ID'];
         $data[$key]['companyname'] = F::msubstr($value['companyname']);
         $data[$key]['phone'] = F::msubstr($value['phone']);
         $data[$key]['address'] = F::msubstr(Area::getCity($value['province']) . Area::getCity($value['city']) . Area::getCity($value['area']));
     }
     $rs = array('total' => $count, 'rows' => $data ? $data : array());
     echo json_encode($rs);
 }
开发者ID:zwq,项目名称:unpei,代码行数:44,代码来源:BusinessshareController.php

示例7: foreach

        echo F::msubstr($cp);
        $cp = '';
        ?>
                                        </td>
                                        <td><?php 
        $dealerv = DealerVehicle::model()->findAll('userid =' . $model['userID']);
        foreach ($dealerv as $transports) {
            $cars .= GoodsBrand::getName($transports['businessCar']) . ' ' . GoodsBrand::getCar($transports['businessCarModel']) . ',';
        }
        echo F::msubstr($cars, 0, 0);
        $cars = '';
        ?>
                                        </td>
                                        <td>
                                            <?php 
        echo !empty($model['BusinessBrand']) ? F::msubstr($model['BusinessBrand'], 0, 0) : "暂无";
        ?>
                                        </td>
                                        <td>
                                            <?php 
        if (!empty($model['userID'])) {
            ?>
                                                <a target="_blank" href='<?php 
            echo Yii::app()->createUrl('servicer/servicequery/QueryProGoods/userID');
            echo '/' . $model['userID'];
            ?>
'>查看商品</a>
                                            <?php 
        } else {
            ?>
                                                暂无
开发者ID:zwq,项目名称:unpei,代码行数:31,代码来源:promotions.php

示例8:

</td>
									<td><?php 
        echo $product['goodsprice'];
        ?>
</td>
									<td><?php 
        echo $product['parts_level'];
        ?>
</td>
									<td>
											<?php 
        echo $product['OE'];
        ?>
									</td>
									<td><?php 
        echo F::msubstr($product['description'], 0, 0);
        //$product['youhui']
        ?>
</td>
								</tr>
								<?php 
        $i++;
        ?>
								<?php 
    }
    ?>
                                                                 </tbody>
                                                               </table>
								<?php 
} else {
    ?>
开发者ID:zwq,项目名称:unpei,代码行数:31,代码来源:shouqgoods.php

示例9: array

</td>
				<td >
					<?php 
        echo $goods['parts_level'];
        ?>
					
				</td>
				<td >
					<?php 
        echo $goods['senddays'];
        ?>
					
				</td>
				<td >
					<?php 
        echo F::msubstr($goods['description']);
        ?>
					
				</td>
				<td >
					<a class='y-align-m' href="<?php 
        echo Yii::app()->createUrl('maker/salesmanage/modify', array('id' => $goods['goodsID']));
        ?>
"><i class='icon-pencil-green display-ib'></i></a>
					<span class='y-align-m' ><i class='icon-red-cross display-ib' crowid="<?php 
        echo $goods['goodsID'];
        ?>
" style="cursor:pointer"></i></span>
				</td>
			</tr>
			<?php 
开发者ID:zwq,项目名称:unpei,代码行数:31,代码来源:salesinfo.php

示例10:

        ?>
</td>
									<td ><?php 
        echo $ser['serviceParkingDigits'];
        ?>
</td>
									<td ><?php 
        echo $ser['serviceTechnicianCount'];
        ?>
</td>
									<td ><?php 
        echo F::msubstr($insurance[$i]['insuranceService']);
        ?>
</td>
									<td ><?php 
        echo F::msubstr(Area::getCity($ser['serviceProvince']) . Area::getCity($ser['serviceCity']) . Area::getCity($ser['serviceArea']) . $ser['serviceAddress'], 0, 0);
        ?>
</td>
								</tr>
								<?php 
        $i++;
        $j++;
    }
    ?>
							</tbody>
						</table>
					</div>
					<div id="ctable3">3</div>
					<div id="ctable4"></div>
				</div>
			</div>		
开发者ID:zwq,项目名称:unpei,代码行数:31,代码来源:service.php

示例11: array

				<?php 
        echo F::msubstr($goods['Column4']);
        ?>
				<?php 
        if (isset($goods['value4']) && !empty($goods['value4'])) {
            ?>
				<?php 
            echo ":&nbsp;" . $goods['value4'];
            ?>
				<?php 
        }
        ?>
			</td>
			<td >
				<?php 
        echo F::msubstr($goods['Column5']);
        ?>
				<?php 
        if (isset($goods['value5']) && !empty($goods['value5'])) {
            ?>
				<?php 
            echo ":&nbsp;" . $goods['value5'];
            ?>
				<?php 
        }
        ?>
			</td>
			<td >
				<a class='y-align-m' href="<?php 
        echo Yii::app()->createUrl('maker/salesmanage/modify', array('id' => $goods['goodsID']));
        ?>
开发者ID:zwq,项目名称:unpei,代码行数:31,代码来源:paramsinfo.php

示例12:

						</td>
						<td ><?php 
        echo $goods['brand'];
        ?>
</td>
						<td ><?php 
        echo $goods['cp_name'];
        ?>
</td>
						<td ><?php 
        echo $goods['category'];
        ?>
</td>
						<td >
							<?php 
        echo F::msubstr($goods['oe']);
        ?>
						</td>
						<input type="hidden" value="<?php 
        echo $goods['goodsID'];
        ?>
" name="goodscatesrelation[]">
					</tr>
					<?php 
    }
    ?>
					<?php 
}
?>
				</tbody>
			</table>
开发者ID:zwq,项目名称:unpei,代码行数:31,代码来源:addgoodscate.php

示例13: actionCatelist

 /**
  * 品类列表
  */
 public function actionCatelist()
 {
     $user_id = Commonmodel::getOrganID();
     $criteria = new CDbCriteria();
     $criteria->select = "*";
     $criteria->condition = 'userID=' . $user_id;
     $criteria->order = 'id DESC';
     $count = MakeEmpowerCategory::model()->count($criteria);
     $pages = new CPagination($count);
     $pages->pageSize = $_GET['rows'];
     $pages->applyLimit($criteria);
     $models = MakeEmpowerCategory::model()->findAll($criteria);
     foreach ($models as $key => $val) {
         $cate[$key]['id'] = $val->id;
         $cate[$key]['cateName'] = F::msubstr($val->cateName);
         $cate[$key]['remarks'] = F::msubstr($val->remarks);
     }
     $userInfo['total'] = $count;
     $userInfo['rows'] = $cate ? $cate : array();
     // $record;
     echo json_encode($userInfo);
 }
开发者ID:zwq,项目名称:unpei,代码行数:25,代码来源:MakemarketingController.php

示例14: array

        } else {
            echo "无";
        }
        ?>
</td>
                                <td><?php 
        if ($model['QQ']) {
            echo $model['QQ'];
        } else {
            echo "无";
        }
        ?>
</td>
                                <td><?php 
        if ($model['memo']) {
            echo F::msubstr($model['memo']);
        } else {
            echo "无";
        }
        ?>
</td>
                                <td><?php 
        if ($model['customercategory']) {
            echo $model['customercategory'];
        } else {
            echo "无";
        }
        ?>
</td>
                                <td><?php 
        echo CHtml::link('修改', array("marketing/processcontact/id/{$model['id']}"), array('confirm' => '您确定要修改吗?'));
开发者ID:zwq,项目名称:unpei,代码行数:31,代码来源:businesscontacts.php

示例15: getGoodsList


//.........这里部分代码省略.........
                 // 信用排序
                 $sql .= " order by dg.Name DESC";
             } elseif ($orderby == 'pirec_big') {
                 //总价从高到低
                 //if ($IsPro) {
                 $sql .= " order by ppp DESC";
                 //                    } else {
                 //                        $sql.=" order by discount.PriceRatio*dg.Price DESC";
                 //                    }
             } elseif ($orderby == 'pirec_small') {
                 // 总价从低到高
                 //if ($IsPro) {
                 $sql .= " order by ppp ASC";
                 //                    } else {
                 //                        $sql.=" order by discount.PriceRatio*dg.Price ASC";
                 //                    }
             }
         }
     } else {
         if (!empty($params) && !is_array($params)) {
             return '参数传入错误';
         }
     }
     //echo $sql;exit;
     $count = count(DBUtil::queryAll($sql));
     $pages = new CPagination($count);
     $pages->pageSize = $rows == '' ? 12 : $rows;
     $offset = ($curpage - 1) * $pages->pageSize;
     $goodses = DBUtil::queryAll($sql . " LIMIT {$offset},{$pages->pageSize}");
     $data = array();
     foreach ($goodses as $key => $goods) {
         $price = self::getContactprice($goods['OrganID'], $params['serviceID']);
         $data[$key]['PriceRatio'] = $price['PriceRatio'] ? $price['PriceRatio'] : "100%";
         $data[$key]['ImageUrl'] = self::getNewImage($goods['ID'], $goods['OrganID']);
         $data[$key]['ID'] = $goods['ID'];
         $data[$key]['OrganID'] = $goods['OrganID'];
         $organInfo = self::getOrganName($goods['OrganID']);
         $data[$key]['OrganName'] = $organInfo['organName'];
         $data[$key]['Name'] = $goods['Name'];
         $data[$key]['goodsName'] = F::msubstr($goods['Name'], 0, 20);
         $data[$key]['gName'] = mb_substr($goods['Name'], 0, 30, 'utf-8');
         $data[$key]['Pinyin'] = $goods['Pinyin'];
         $data[$key]['Brand'] = $goods['Brand'];
         $data[$key]['goodsBrand'] = $goods['BrandID'];
         $data[$key]['GoodsNO'] = $goods['GoodsNO'];
         $data[$key]['OENO'] = $goods['OENO'];
         $data[$key]['Sales'] = $goods['Sales'];
         $data[$key]['OENOS'] = self::getOENOSByGoodsID($goods['ID']);
         $memolen = strlen($goods['Memo']);
         if ($memolen >= 60) {
             $data[$key]['Memo'] = $goods['Memo'] ? mb_substr($goods['Memo'], 0, 26, 'utf-8') . '…' : '';
         } else {
             $data[$key]['Memo'] = $goods['Memo'] ? $goods['Memo'] : '';
         }
         // 车型车系
         $vehs = explode('、', self::getVehicleByGoodsID($goods['ID']));
         //  'seriesName'=>'','makeId'=>'','makeName'=>'');
         //检索商品本身的适用车型,如果有子集的车型则显示有子集的车型
         $currv = self::getCurrentVehicle($arr, $goods['ID']);
         $data[$key]['Vehicle'] = self::getCurrentVehicle($arr, $goods['ID']);
         $data[$key]['Vehicle'] = $currv ? $currv : $vehs[0];
         $data[$key]['Vehicles'] = self::getVehicleByGoodsID($goods['ID']);
         $data[$key]['ListPrice'] = $goods['Price'];
         //参考价
         $data[$key]['Price'] = sprintf("%.2f", $goods['Price'] * $data[$key]['PriceRatio'] / 100);
         // 折扣价,小数点后面保留两位
         if ($goods['IsPro'] == 1) {
             if (!is_null($goods['ProPrice']) && $goods['ProPrice']) {
                 $data[$key]['ProPrice'] = $data[$key]['ProPrice'];
             }
             //                if (empty($goods['ProPrice']) || $goods['ProPrice'] == 0) {
             //                    $data[$key]['ProPrice'] = $data[$key]['Price'];
             //                    $data[$key]['Price'] = $data[$key]['Price'];
             //                    // 促销价
             //                } else {
             //                    $data[$key]['ProPrice'] = $goods['ProPrice'];           // 促销价
             //                    $data[$key]['Price'] = $goods['ProPrice'];
             //                }
         }
         $data[$key]['LogisticsPrice'] = $goods['LogisticsPrice'];
         // 物流价
         $data[$key]['CpName'] = $goods['CpNameTxt'];
         // 用于排序
         //            $listP[$key] = $data[$key]['Price']; // 参考价
         //            $disP[$key] = $data[$key]['Price'];    // 折扣价
         //            $logiP[$key] = $data[$key]['LogisticsPrice'];    // 物流价
         //            $proP[$key] = $data[$key]['ProPrice'];    // 物流价
         // $data[$key]['CpName'] = Commonmodel::getCategory($goods['CpName']);
         // $data[$key]['sutecar'] = F::msubstr($this->getcar($goods['ID']));
         // 商品属性
     }
     //        if ($orderby == 'pirec_big') {   //总价从高到低
     //            array_multisort($disP, SORT_DESC, $listP, SORT_DESC, $data, SORT_DESC);    // ,$proP,SORT_DESC
     //        } elseif ($orderby == 'pirec_small') { // 总价从低到高
     //            array_multisort($disP, SORT_ASC, $listP, SORT_ASC, $data, SORT_ASC);    // ,$proP,SORT_DESC
     //        }
     $data[0]['count'] = $count;
     //        var_dump($data);
     return $data;
 }
开发者ID:zwq,项目名称:unpei,代码行数:101,代码来源:DealerGoods.php


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