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


PHP site::Content方法代码示例

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


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

示例1: number_format

        $text .= _CONTRACT_PRINT_SIGNUP . ThaiDate::Mid($contract['signup_date']) . _CONTRACT_PRINT_TO . ThaiDate::Mid($contract['expire_date']) . _CONTRACT_PRINT_EXPIRE;
        $text .= _CONTRACT_PRINT_RENT . number_format($contract['cost'], 0) . _CONTRACT_PRINT_BAHT . _CONTRACT_PRINT_TEXT3;
        $text .= '</span><br/>';
        $text .= '<span style="margin-left:35px;">' . _CONTRACT_PRINT_TEXT4 . '</span><br/>';
        $text .= '<span style="margin-left:35px;">' . _CONTRACT_PRINT_TEXT5 . '</span><br/>';
        $text .= '<span style="margin-left:35px;">' . _CONTRACT_PRINT_TEXT6 . '</span><br/>';
        $text .= '<span style="margin-left:35px;">' . _CONTRACT_PRINT_TEXT7_1 . number_format($contract['deposite'], 0) . _CONTRACT_PRINT_TEXT7_2 . '</span><br/>';
        $text .= '<span style="margin-left:35px;">' . _CONTRACT_PRINT_TEXT8 . '</span><br/>';
        $text .= '<span style="margin-left:35px;">' . _CONTRACT_PRINT_TEXT9 . '</span><br/>';
        $text .= '<span style="margin-left:35px;">' . _CONTRACT_PRINT_TEXT10 . '</span><br/>';
        $text .= '<span style="margin-left:35px;">' . _CONTRACT_PRINT_TEXT11 . '</span><br/>';
        $text .= '<span style="margin-left:35px;">' . _CONTRACT_PRINT_TEXT12 . '</span><br/>';
        $data = array('id' => _CONTRACT_PASS . $contract['cus_id'] . $contract['object_id'] . $contract['emp_id'] . '-' . $contract['contract_id'], 'head' => _CONTRACT_PRINT_HEAD, 'singup' => _CONTRACT_TIME . ThaiDate::Full($contract['signup_date']), 'expire' => $expire, 'contract_type' => _CONTRACT_HEAD . $type['type_name'], 'text' => $text, 'personal' => _CONTRACT_PRINT_PERSONAL, 'own' => _CONTRACT_PRINT_OWN);
        $printButton = '<div style="position:fixed;top:10px;right:10px;"><input type="button" name="print" value="Print" onClick="javascript:window.print()">
				<input type="button" name="close" value="Close" onClick="javascript:window.close()"></div>';
        $content = site::Content('contract', $data);
        $targetDirectory = "document/";
        $targetName = "contract";
        $targetID = $contract['cus_id'] . $contract['object_id'] . $contract['emp_id'] . $contract['contract_id'];
        $targetExtension = ".html";
        $fileName = $targetName . '_' . $targetID . $targetExtension;
        $isFile = fopen($targetDirectory . $fileName, 'w');
        fputs($isFile, $printButton);
        fputs($isFile, $content);
        fclose($isFile);
        ?>
<script>
$(document).ready(function(){
	$('#register_cancel').click(function(){
		$(this).href('contract=edit&id=<?php 
        echo $_GET['id'];
开发者ID:Kem-Store,项目名称:university-rental,代码行数:31,代码来源:edit.php

示例2: array

<?php

echo site::Content('contract', array('id' => '123456'));
开发者ID:Kem-Store,项目名称:university-rental,代码行数:3,代码来源:menu6.php

示例3: number_format

        $tableConteact .= '<td style="border-top:#333 solid 2px;">' . number_format($totalMoney, 0) . _CONTRACT_PRINT_BAHT . '</td>';
        $tableConteact .= '</tr>';
        $UnitMoney = array('', _MONEY_1, _MONEY_2, _MONEY_3, _MONEY_4, _MONEY_5, _MONEY_6, '', _MONEY_7);
        $ThaiMoney = array(_MONEY_ONE, _MONEY_TWO, _MONEY_TREE, _MONEY_FOUR, _MONEY_FIVE, _MONEY_SIX, _MONEY_SEVEN, _MONEY_EIGHT, _MONEY_NINE);
        $lenMoney = strlen($totalMoney);
        $stringMoney = NULL;
        for ($iloop = 0; $iloop < $lenMoney; $iloop++) {
            $tmp = substr(strrev($totalMoney), $iloop, 1);
            if ($tmp != 0) {
                if ($iloop == 0) {
                    $stringMoney = $ThaiMoney[$tmp - 1] . '' . $stringMoney;
                } elseif ($iloop == 1) {
                    $stringMoney = $UnitMoney[8] . $UnitMoney[$iloop] . $stringMoney;
                } else {
                    $stringMoney = $ThaiMoney[$tmp - 1] . $UnitMoney[$iloop] . $stringMoney;
                }
            }
        }
        $tableConteact .= '<tr><td align="right" colspan="2">' . $stringMoney . _CONTRACT_PRINT_BAHT . '</td>';
        $tableConteact .= '</tr>';
        $tableConteact .= '</table>';
        $data = array('head' => _CONTRACT_PRINT_HEAD, 'date' => _REPORT4_DATE . ThaiDate::Full(time()), 'report_type' => _REPORT3_HEAD1 . $type['type_name'] . _REPORT3_HEAD2 . $date, 'text' => $tableConteact, 'personal' => _REPORT_SIGN);
        $content = site::Content('report1', $data);
        $targetDirectory = "document/";
        $fileName = 'report4_' . $type['type_id'] . '-' . $key . '.html';
        $isFile = fopen($targetDirectory . $fileName, 'w');
        fputs($isFile, $printButton);
        fputs($isFile, $content);
        fclose($isFile);
    }
}
开发者ID:Kem-Store,项目名称:university-rental,代码行数:31,代码来源:selected.php

示例4: number_format

        $listMoney .= _PAYMENT_PAYRENT;
    } else {
        $listMoney .= _PAYMENT_DEPOSITE;
    }
    $listMoney .= '</span></td>';
    $listMoney .= '<td align="right" valign="middle"><span style="margin-left:40px;">' . number_format($payment['amount'] + $payment['charge'], 2) . '</span></td></tr>';
    if ($payment['pay_date'] > $dueDate) {
        $dueDate = $payment['pay_date'];
    }
    $moneyTotal += $payment['amount'] + $payment['charge'];
}
$listMoney .= '</table>';
$data = array('head' => _CONTRACT_PRINT_HEAD, 'today' => _INVOICE_DAY . ThaiDate::Full(time()), 'invoice' => _INVOICE_HEAD, 'contract_id' => '<strong>' . _INVOICE_CONTRACT_NUMBER . '</strong> ' . $contract['cus_id'] . $contract['object_id'] . $contract['emp_id'] . '-' . $contract['contract_id'], 'object_id' => '<strong>' . _CONTRACT_PRINT_OBJECT . $type['type_name'] . '</strong> ' . $type['type_id'] . $idObject, 'name' => '<strong>' . _REGISTER_FULLNAME . '</strong> ' . $customer['fullname'], 'address' => '<strong>' . _REGISTER_ADDRESS . '</strong> ' . $customer['address'], 'due_date' => '<strong>' . _INVOICE_PAY_DUE . '</strong> ' . ThaiDate::Full($dueDate), 'pay_head' => '<strong>' . _INVOICE_PAY_HEADTOTAL . '</strong>', 'list' => $listMoney, 'pay_total' => '<strong>' . _INVOICE_PAY_TOTAL . '</strong>', 'pay_money_total' => '<strong>' . number_format($moneyTotal, 2) . '</strong>', 'personal' => _INVOICE_PAY_MONEY);
$printButton = '<div style="position:fixed;top:10px;right:10px;"><input type="button" name="print" value="Print" onClick="javascript:window.print()">
				<input type="button" name="close" value="Close" onClick="javascript:window.close()"></div>';
$content = site::Content('invoice', $data);
$targetDirectory = "document/";
$targetName = "invoice";
$targetID = $contract['cus_id'] . $contract['object_id'] . $contract['emp_id'] . $contract['contract_id'];
$targetExtension = ".html";
$fileName = $targetName . '_' . $targetID . $targetExtension;
$isFile = fopen($targetDirectory . $fileName, 'w');
fputs($isFile, $printButton);
fputs($isFile, $content);
fclose($isFile);
?>
<script>
$(document).ready(function(){
	$('#register_cancel').click(function(){
		$(this).href('contract=edit&id=<?php 
echo $_GET['id'];
开发者ID:Kem-Store,项目名称:university-rental,代码行数:31,代码来源:print.php


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