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


PHP Functions::stringCut方法代码示例

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


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

示例1: Top

 public function Top($num)
 {
     $criteria = new CDbCriteria();
     $criteria->condition = "UserID = :userid";
     $criteria->params = array(':userid' => Yii::app()->user->ID);
     $criteria->limit = $num;
     $model = Mail::model()->findAll($criteria);
     $result = "";
     $result .= "<table cellpadding='5' cellspacing='0' border='0' style='border-collapse: collapse;'>";
     $result .= "<tr><td><b>Fecha</b></td><td><b>Boletin</b></td><td><b>Lista</b></td></tr>";
     foreach ($model as $customer) {
         $result .= "";
         $result .= "<tr>";
         $result .= "<td><a href='" . Yii::app()->createURL('/mail/mail/update/', array('id' => $customer->ID)) . "'>";
         $result .= date("d-m-Y", strtotime($customer->Date)) . "</a></td>";
         $result .= "<td><a href='" . Yii::app()->createURL('/mail/mail/update/', array('id' => $customer->ID)) . "'>";
         $result .= Functions::stringCut($customer->Name, 20) . "</td>";
         $result .= "<td><a href='" . Yii::app()->createURL('/mail/mail/update/', array('id' => $customer->ID)) . "'>";
         $result .= Functions::stringCut($customer->list->Name, 20) . "</td>";
         $result .= "</tr>";
     }
     $result .= "</table>";
     return $result;
 }
开发者ID:FranHurtado,项目名称:hotels,代码行数:24,代码来源:Mail.php

示例2: Top

 public function Top($num)
 {
     $criteria = new CDbCriteria();
     $criteria->condition = "UserID = :userid";
     $criteria->params = array(':userid' => Yii::app()->user->ID);
     $criteria->limit = $num;
     $model = Customer::model()->findAll($criteria);
     $result = "";
     $result .= "<table cellpadding='5' cellspacing='0' border='0' style='border-collapse: collapse;'>";
     $result .= "<tr><td><b>DNI</b></td><td><b>Cliente</b></td><td><b>Telefono</b></td></tr>";
     foreach ($model as $customer) {
         $result .= "<tr>";
         $result .= "<td><a href='" . Yii::app()->createURL('/customer/customer/update/', array('id' => $customer->ID)) . "'>" . Functions::stringCut($customer->DNI, 10) . "</a></td>";
         $result .= "<td><a href='" . Yii::app()->createURL('/customer/customer/update/', array('id' => $customer->ID)) . "'>" . Functions::stringCut($customer->FullName, 20) . "</a></td>";
         $result .= "<td><a href='" . Yii::app()->createURL('/customer/customer/update/', array('id' => $customer->ID)) . "'>" . Functions::stringCut($customer->Phone, 10) . "</a></td>";
         $result .= "</tr>";
     }
     $result .= "</table>";
     return $result;
 }
开发者ID:FranHurtado,项目名称:hotels,代码行数:20,代码来源:Customer.php

示例3: Top

 public function Top($num)
 {
     $criteria = new CDbCriteria();
     $criteria->condition = "UserID = :userid";
     $criteria->params = array(':userid' => Yii::app()->user->ID);
     $criteria->limit = $num;
     $model = Control::model()->findAll($criteria);
     $result = "";
     $result .= "<table cellpadding='5' cellspacing='0' border='0' style='border-collapse: collapse;'>";
     $result .= "<tr><td><b>Punto critico</b></td><td><b>Control</b></td></tr>";
     foreach ($model as $customer) {
         $result .= "<tr>";
         $result .= "<td><a href='" . Yii::app()->createURL('/APPC/point/update/', array('id' => $customer->ID)) . "'>" . Functions::stringCut($customer->point->Name, 25) . "</a></td>";
         $result .= "<td><a href='" . Yii::app()->createURL('/APPC/point/update/', array('id' => $customer->ID)) . "'>" . Functions::stringCut($customer->Name, 25) . "</a></td>";
         $result .= "</tr>";
     }
     $result .= "</table>";
     return $result;
 }
开发者ID:FranHurtado,项目名称:hotels,代码行数:19,代码来源:Point.php

示例4: Top

 public function Top($num)
 {
     $criteria = new CDbCriteria();
     $criteria->condition = "UserID = :userid";
     $criteria->params = array(':userid' => Yii::app()->user->ID);
     $criteria->limit = $num;
     $model = Book::model()->findAll($criteria);
     $result = "";
     $result .= "<table cellpadding='5' cellspacing='0' border='0' style='border-collapse: collapse;'>";
     $result .= "<tr><td><b>Entrada</b></td><td><b>Habitacion</b></td><td><b>Cliente</b></td></tr>";
     foreach ($model as $customer) {
         $result .= "<tr>";
         $result .= "<td><a href='" . Yii::app()->createURL('/booking/book/update/', array('id' => $customer->ID)) . "'>" . date("d-m-Y", strtotime($customer->Start)) . "</td>";
         $result .= "<td><a href='" . Yii::app()->createURL('/booking/book/update/', array('id' => $customer->ID)) . "'>" . Functions::stringCut($customer->room->Name, 20) . "</td>";
         $result .= "<td><a href='" . Yii::app()->createURL('/booking/book/update/', array('id' => $customer->ID)) . "'>" . Functions::stringCut($customer->customer->FullName, 20) . "</td>";
         $result .= "</tr>";
     }
     $result .= "</table>";
     return $result;
 }
开发者ID:FranHurtado,项目名称:hotels,代码行数:20,代码来源:Book.php


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