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


PHP Text::Truncate方法代码示例

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


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

示例1: EmployeeDAO

            <?php 
$employeeDAO = new EmployeeDAO($dataConnector->sqlserverConnection);
$employeeArray = $employeeDAO->RetrieveRecordArray();
foreach ($employeeArray as $employee) {
    $attributes = "";
    if ($employee->empID == $reading->assinaturaDatacopy) {
        $attributes = "selected='selected'";
    }
    echo "<option " . $attributes . " value=" . $employee->empID . ">" . $employee->firstName . " " . $employee->middleName . " " . $employee->lastName . "</option>";
}
?>
            </select>
        </label>

        <label>Assinatura <?php 
echo $clientName->Truncate(75);
?>
<br/>
            <input type="text" style="width:460px;" name="assinaturaCliente" value="<?php 
echo $reading->assinaturaCliente;
?>
" />
        </label>

        <label>Observações<br/>
            <textarea name="obs" style="width:460px;height:50px;" ><?php 
echo $reading->observacao;
?>
</textarea>
        </label>
开发者ID:renatosans,项目名称:contratos,代码行数:30,代码来源:editar.php

示例2: ExpenseDAO

}
// Localiza todos as despesas que pertencem ao chamado
$expenseDAO = new ExpenseDAO($dataConnector->mysqlConnection);
$expenseDAO->showErrors = 1;
$productionInputDAO = new ProductionInputDAO($dataConnector->mysqlConnection);
$productionInputDAO->showErrors = 1;
$expenseArray = $expenseDAO->RetrieveRecordArray("codigoChamado=" . $serviceCallId);
if (sizeof($expenseArray) == 0) {
    echo "<tr>";
    echo "    <td colspan='3' align='center'>Nenhum registro encontrado!</td>";
    echo "</tr>";
    exit;
}
foreach ($expenseArray as $expense) {
    $nomeItem = new Text($expense->nomeItem);
    $descricao = $expense->quantidade . " " . $nomeItem->Truncate(60);
    $codigoInsumo = $expense->codigoInsumo;
    if (!empty($codigoInsumo)) {
        $productionInput = $productionInputDAO->RetrieveRecord($codigoInsumo);
        $inputTypeArray = $productionInputDAO->RetrieveInputTypes();
        $descricao = $inputTypeArray[$productionInput->tipoInsumo];
    }
    ?>
    <tr>
        <td>
            <?php 
    echo $descricao;
    ?>
        </td>
        <td>
            <?php 
开发者ID:renatosans,项目名称:contratos,代码行数:31,代码来源:GetServiceCallExpenses.php

示例3: BusinessPartnerDAO

    <label class="left" style="width:99%; text-align: left; <?php 
echo $searchMethod != 1 ? "display:inline;" : "display:none;";
?>
">Cliente<br/>
        <select name="businessPartnerCode" style="width: 98%;" >
            <?php 
$businessPartnerDAO = new BusinessPartnerDAO($dataConnector->sqlserverConnection);
$businessPartnerDAO->showErrors = 1;
$clientArray = $businessPartnerDAO->RetrieveRecordArray("CardName IS NOT NULL ORDER BY CardName");
foreach ($clientArray as $client) {
    $informacaoAdicional = "";
    if ($client->cardName != $client->cardFName) {
        $informacaoAdicional = " (" . $client->cardFName . ")";
    }
    $clientInfo = new Text($client->cardName . $informacaoAdicional);
    echo "<option value=" . $client->cardCode . ">" . $clientInfo->Truncate(85) . "</option>";
}
?>
        </select>
    </label>
    <div style="clear:both; <?php 
echo $searchMethod != 1 ? "display:inline;" : "display:none;";
?>
">
        <br/>
    </div>
    <label class="left" style="width:99%; text-align: left; <?php 
echo $searchMethod == 1 || $searchMethod == 2 ? "display:inline;" : "display:none;";
?>
">Modelo<br/>
        <input type="text" name="model" style="width:98%;height:25px;" value="" ></input>
开发者ID:renatosans,项目名称:contratos,代码行数:31,代码来源:ContractFilterDialog.php

示例4: Text

        <hr noshade="noshade" style="width:260px; color:white;" />
        <?php 
foreach ($contractArray as $contract) {
    $contractNum = str_pad($contract->numero, 5, '0', STR_PAD_LEFT);
    $clientName = new Text(BusinessPartnerDAO::GetClientName($dataConnector->sqlserverConnection, $contract->pn));
    $contractStatus = ContractDAO::GetStatusAsText($contract->status);
    $subContractArray = $subContractDAO->RetrieveRecordArray("contrato_id=" . $contract->id);
    $typeEnumeration = "";
    foreach ($subContractArray as $subContract) {
        if (!empty($typeEnumeration)) {
            $typeEnumeration .= ', ';
        }
        $typeEnumeration .= $subContract->siglaTipoContrato;
    }
    $contractTypes = new Text($typeEnumeration);
    $tags = $contractNum . ' ' . $clientName->Truncate(50) . ' ' . $contractTypes->Truncate(20) . ' ' . $contractStatus;
    echo '<a style="float:left; text-align:center;" class="contractIcon" rel="' . $contract->id . '" rev="' . $tags . '" >';
    echo '<img src="' . $pathImg . '/document.png" alt="" style="width:50px; height:50px;" /><br/>';
    echo $contractNum;
    echo '</a>';
}
?>
    </div>
    -->

    <div id="lista" class="corner ui-corner-all" >
        <img src="<?php 
echo $pathImg;
?>
/loading.gif" />
    </div>
开发者ID:renatosans,项目名称:contratos,代码行数:31,代码来源:contratos.php

示例5: BusinessPartnerDAO

        <select name="businessPartnerCode" style="width: 98%;" >
            <?php 
$businessPartnerDAO = new BusinessPartnerDAO($dataConnector->sqlserverConnection);
$businessPartnerDAO->showErrors = 1;
$clientArray = $businessPartnerDAO->RetrieveRecordArray("CardName IS NOT NULL ORDER BY CardName");
foreach ($clientArray as $client) {
    $attributes = "";
    if ($client->cardCode == $businessPartnerCode) {
        $attributes = "selected='selected'";
    }
    $informacaoAdicional = "";
    if ($client->cardName != $client->cardFName) {
        $informacaoAdicional = " (" . $client->cardFName . ")";
    }
    $clientInfo = new Text($client->cardName . $informacaoAdicional);
    echo "<option " . $attributes . " value=" . $client->cardCode . ">" . $clientInfo->Truncate(85) . "</option>";
}
?>
        </select>
        </label>
        <div style="clear:both;">
            <br/>
        </div>

        <label class="left" style="width: 99%;">Equipamento<br/>
        <select name="equipmentCode" style="width: 80%;" ></select>
        <input type="button" id="btnEquipmentInfo" value="?" style="width: 30px; height: 30px;" ></input>
        </label>
        <div style="clear:both;">
            <br/><br/><br/>
        </div>
开发者ID:renatosans,项目名称:contratos,代码行数:31,代码来源:AddSubContractItem.php

示例6: CreateArticle

 public static function CreateArticle($Data)
 {
     $CommentsKey = md5(uniqid(rand(), true));
     $Title = $Data['subject'];
     $Body = $Data['postCommand_detail'];
     $Short = Text::Truncate($Body, 150);
     $Image = 'Core/News/' . $Data['imageName'];
     $Poster = $_SESSION['username'];
     $Date = date('Y-m-d H:i:s');
     $Statement = News::$DBConnection->prepare('INSERT INTO news (title, short_description, full_description, posted_by, post_date, post_miniature, comments_key) VALUES(:title, :sd, :fd, :pb, :pd, :pm, :ck)');
     $Statement->bindParam(':title', $Title);
     $Statement->bindParam(':sd', $Short);
     $Statement->bindParam(':fd', $Body);
     $Statement->bindParam(':pb', $Poster);
     $Statement->bindParam(':pd', $Date);
     $Statement->bindParam(':pm', $Image);
     $Statement->bindParam(':ck', $CommentsKey);
     $Statement->execute();
 }
开发者ID:Expecto,项目名称:FreedomCore,代码行数:19,代码来源:News.FreedomCore.php

示例7:

                            <a href="<?php 
    echo 'Frontend/' . $currentDir . '/editar.php?itemGroup=' . $itemGroup . '&itemCode=' . $encodedId;
    ?>
" >
                                <?php 
    echo $inventoryItem->itemCode;
    ?>
                            </a>
                        </td>
                        <td >
                            <a href="<?php 
    echo 'Frontend/' . $currentDir . '/editar.php?itemGroup=' . $itemGroup . '&itemCode=' . $encodedId;
    ?>
" >
                                <?php 
    echo $description->Truncate(55);
    ?>
                            </a>
                        </td>
                        <td >
                           <?php 
    echo $itemGroupArray[$inventoryItem->itemGroup];
    ?>
                        </td>
                        <td >
                           <?php 
    echo $inventoryItem->durability;
    ?>
                        </td>
                    </tr>
            <?php 
开发者ID:renatosans,项目名称:contratos,代码行数:31,代码来源:listar.php

示例8: Text

        $numero = str_pad($contract->numero, 5, '0', STR_PAD_LEFT);
        $status = ContractDAO::GetStatusAsText($contract->status);
        $divisao = new Text($contract->divisao);
        echo $numero . '(' . $status . ')' . ' ' . $divisao->Truncate(12);
    }
    ?>
                        </td>
                        <td align="center" >
                           <?php 
    echo $mailing->diaFaturamento;
    ?>
                        </td>
                        <td >
                            <?php 
    $destinatarios = new Text($mailing->destinatarios);
    echo $destinatarios->Truncate(20);
    ?>
                        </td>
                        <td align="center" >
                            <a alt="<?php 
    echo $mailing->businessPartnerCode;
    ?>
" rel="<?php 
    echo $mailing->contrato_id;
    ?>
" rev="<?php 
    echo $mailing->subContrato_id;
    ?>
" class="mailingPreview" >
                                <span class="ui-icon ui-icon-info"></span>
                            </a>
开发者ID:renatosans,项目名称:contratos,代码行数:31,代码来源:listar.php

示例9: GetAccessories

        <fieldset style="width:650px;">
            <legend>Dados</legend>
            Número série Fabricante: <?php 
echo $equipment->manufacturerSN;
?>
<br/><br/>
            Nosso número de série: <?php 
echo $equipment->internalSN;
?>
<br/><br/>
            Descrição do equipamento: <?php 
echo $equipment->itemName;
?>
<br/><br/>
            Cliente(Business Partner): <span style="color:darkorange;font-weight:bold;" ><?php 
echo $clientName->Truncate(60);
?>
</span><br/><br/>
            Endereço: <?php 
echo $address;
?>
<br/><br/>
            Local de instalação: <?php 
echo $equipment->instLocation;
?>
<br/><br/>
            Acessórios: <?php 
echo GetAccessories($equipment->insID);
?>
<br/><br/>
            Histórico: <br/><?php 
开发者ID:renatosans,项目名称:contratos,代码行数:31,代码来源:editar.php

示例10: Text

?>

    <form name="fDados" action="Frontend/custoIndireto/acaoDespesaDistribuida.php" method="post" >
        <input type="hidden" name="acao" value="store" />
        <input type="hidden" name="indirectCostId" value="<?php 
echo $indirectCostId;
?>
" />

        <label class="left" style="width: 99%;">Chamado<br/>
        <select name="serviceCallId" style="width: 96%;">
            <option selected='selected' value="0"></option>
            <?php 
foreach ($serviceCallArray as $serviceCall) {
    $subject = new Text($serviceCall->defeito);
    $serviceCallInfo = str_pad($serviceCall->id, 5, '0', STR_PAD_LEFT) . ' - ' . $subject->Truncate(34);
    echo "<option value=" . $serviceCall->id . " >" . $serviceCallInfo . "</option>";
}
?>
        </select>
        </label>
        <div style="clear:both;">
            <br/><br/>
        </div>

        <div class="left" style="width:99%; text-align: center;">
            <input id="btnOK" type="button" value="OK" style="width:50px; height:30px;"></input>
        </div>
    </form>

<?php 
开发者ID:renatosans,项目名称:contratos,代码行数:31,代码来源:AddDistributedExpense.php

示例11: Text

    exit;
}
foreach ($serviceCallArray as $serviceCallId) {
    $serviceCall = $serviceCallDAO->RetrieveRecord($serviceCallId);
    $subject = new Text($serviceCall->defeito);
    $serialNumber = EquipmentDAO::GetSerialNumber($dataConnector->sqlserverConnection, $serviceCall->codigoCartaoEquipamento);
    ?>
        <tr>
            <td >
                <?php 
    echo str_pad($serviceCall->id, 5, '0', STR_PAD_LEFT);
    ?>
            </td>
            <td >
                <?php 
    echo $subject->Truncate(34);
    ?>
            </td>
            <td >
                <?php 
    echo $serialNumber;
    ?>
            </td>
            <td >
                <?php 
    echo $serviceCall->dataAbertura;
    ?>
            </td>
            <td>
                <a rel="<?php 
    echo $serviceCall->id;
开发者ID:renatosans,项目名称:contratos,代码行数:31,代码来源:GetDistributedExpenses.php

示例12: foreach

    $equipmentCode = $supplyRequest->codigoCartaoEquipamento;
    $requestItemArray = $requestItemDAO->RetrieveRecordArray("pedidoConsumivel_id=" . $supplyRequest->id);
    $description = "";
    foreach ($requestItemArray as $requestItem) {
        if (!empty($description)) {
            $description .= ' , ';
        }
        $description .= $requestItem->quantidade . ' ' . $requestItem->nomeItem;
    }
    if (empty($description)) {
        $description = "Nenhum item encontrado";
    }
    $requestDescription = new Text($description);
    echo '<tr>';
    echo '<td><a href="Frontend/_consumivel/editar.php?id=' . $supplyRequest->id . '&equipmentCode=' . $equipmentCode . '" >' . $supplyRequest->data . '</a></td>';
    echo '<td><a href="Frontend/_consumivel/editar.php?id=' . $supplyRequest->id . '&equipmentCode=' . $equipmentCode . '" >' . $requestDescription->Truncate(30) . '</a></td>';
    echo '<td><a rel="' . $equipmentCode . '" class="detailsLink" ><span class="ui-icon ui-icon-info"></span></a></td>';
    echo '</tr>';
}
?>
            </tbody>
            </table>
        </div>
    </div>
    <div class="portlet">
        <div class="portlet-header">Contratos a reajustar</div>
        <div class="portlet-content">
            <div style="clear:both;"><br/></div>
            <table border="0" cellpadding="0" cellspacing="0" class="sorTable">
            <thead>
                <tr>
开发者ID:renatosans,项目名称:contratos,代码行数:31,代码来源:principal.inc.php


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