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


PHP date_from_mysql函数代码示例

本文整理汇总了PHP中date_from_mysql函数的典型用法代码示例。如果您正苦于以下问题:PHP date_from_mysql函数的具体用法?PHP date_from_mysql怎么用?PHP date_from_mysql使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: parse_template

function parse_template($object, $body)
{
    if (preg_match_all('/{{{([^{|}]*)}}}/', $body, $template_vars)) {
        foreach ($template_vars[1] as $var) {
            switch ($var) {
                case 'invoice_guest_url':
                    $replace = site_url('guest/view/invoice/' . $object->invoice_url_key);
                    break;
                case 'invoice_date_due':
                    $replace = date_from_mysql($object->invoice_date_due, TRUE);
                    break;
                case 'invoice_date_created':
                    $replace = date_from_mysql($object->invoice_date_created, TRUE);
                    break;
                case 'invoice_total':
                    $replace = format_currency($object->invoice_total);
                    break;
                case 'invoice_paid':
                    $replace = format_currency($object->invoice_paid);
                    break;
                case 'invoice_balance':
                    $replace = format_currency($object->invoice_balance);
                    break;
                case 'quote_total':
                    $replace = format_currency($object->quote_total);
                    break;
                case 'quote_date_created':
                    $replace = date_from_mysql($object->quote_date_created, TRUE);
                    break;
                case 'quote_date_expires':
                    $replace = date_from_mysql($object->quote_date_expires, TRUE);
                    break;
                case 'quote_guest_url':
                    $replace = site_url('guest/view/quote/' . $object->quote_url_key);
                    break;
                default:
                    $replace = $object->{$var};
            }
            $body = str_replace('{{{' . $var . '}}}', $replace, $body);
        }
    }
    return $body;
}
开发者ID:lukasz-schab,项目名称:DeskdooInvoices,代码行数:43,代码来源:template_helper.php

示例2: foreach

<?php

foreach ($quote_notes_notes as $quote_note) {
    ?>
    <div class="alert alert-default">
        <p><strong><?php 
    echo date_from_mysql($quote_note->note_date, TRUE);
    ?>
</strong>&nbsp;
            <?php 
    echo $quote_note->note_author;
    ?>
			<?php 
    echo nl2br($quote_note->note);
    ?>
        </p>
    </div>
<?php 
}
开发者ID:atsolutions,项目名称:Decallab2,代码行数:19,代码来源:partial_notes.php

示例3: date_from_mysql

                                    <td class="text-right color-n">
                                        <?php 
echo date_from_mysql($quote->quote_date_created, TRUE);
?>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="text-right color-n">
                                        <?php 
echo lang('expires');
?>
: &nbsp;
                                    </td>
                                    <td class="text-right color-n">
                                        <?php 
echo date_from_mysql($quote->quote_date_expires, TRUE);
?>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="text-right color-n">
                                        <?php 
echo lang('total');
?>
: &nbsp;
                                    </td>
                                    <td class="text-right color-n">
                                        <?php 
echo format_currency($quote->quote_total);
?>
                                    </td>
开发者ID:quantumsized,项目名称:InvoicePlane,代码行数:31,代码来源:green.php

示例4: date_from_mysql

                                    <td class="text-right color-n">
                                        <?php 
echo date_from_mysql($invoice->invoice_date_created, TRUE);
?>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="text-right color-n">
                                        <?php 
echo lang('due_date');
?>
: &nbsp;
                                    </td>
                                    <td class="text-right color-n">
                                        <?php 
echo date_from_mysql($invoice->invoice_date_due, TRUE);
?>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="text-right color-n">
                                        <?php 
echo lang('amount_due');
?>
: &nbsp;
                                    </td>
                                    <td class="text-right color-n">
                                        <?php 
echo format_currency($invoice->invoice_balance);
?>
                                    </td>
开发者ID:quantumsized,项目名称:InvoicePlane,代码行数:31,代码来源:blue.php

示例5: date_from_mysql

    echo date_from_mysql($invoice->recur_start_date);
    ?>
                        </td>
                        <td>
                            <?php 
    echo date_from_mysql($invoice->recur_end_date);
    ?>
                        </td>
                        <td>
                            <?php 
    echo lang($recur_frequencies[$invoice->recur_frequency]);
    ?>
                        </td>
                        <td>
                            <?php 
    echo date_from_mysql($invoice->recur_next_date);
    ?>
</td>
                        <td>
                            <div class="options btn-group">
                                <a class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"
                                   href="#">
                                    <i class="fa fa-cog"></i> <?php 
    echo lang('options');
    ?>
                                </a>
                                <ul class="dropdown-menu">
                                    <li>
                                        <a href="<?php 
    echo site_url('invoices/recurring/stop/' . $invoice->invoice_recurring_id);
    ?>
开发者ID:lukasz-schab,项目名称:DeskdooInvoices,代码行数:31,代码来源:index_recurring.php

示例6: trans

?>
">
                </div>
            </div>

            <div class="form-group has-feedback">
                <label for="invoice_date_created"><?php 
echo trans('invoice_date');
?>
: </label>

                <div class="input-group">
                    <input name="invoice_date_created" id="invoice_date_created"
                           class="form-control datepicker"
                           value="<?php 
echo date_from_mysql(date('Y-m-d', time()), true);
?>
">
                    <span class="input-group-addon">
                        <i class="fa fa-calendar fa-fw"></i>
                    </span>
                </div>
            </div>

            <div class="form-group">
                <label for="invoice_password"><?php 
echo trans('invoice_password');
?>
</label>
                <input type="text" name="invoice_password" id="invoice_password" class="form-control"
                       value="<?php 
开发者ID:Thewafflication,项目名称:InvoicePlane,代码行数:31,代码来源:modal_copy_invoice.php

示例7: site_url

 <tr>
     <td>
         <span
             class="label <?php echo $quote_statuses[$quote->quote_status_id]['class']; ?>"><?php echo $quote_statuses[$quote->quote_status_id]['label']; ?></span>
     </td>
     <td>
         <a href="<?php echo site_url('quotes/view/' . $quote->quote_id); ?>"
            title="<?php echo lang('edit'); ?>">
             <?php echo $quote->quote_number; ?>
         </a>
     </td>
     <td>
         <?php echo date_from_mysql($quote->quote_date_created); ?>
     </td>
     <td>
         <?php echo date_from_mysql($quote->quote_date_expires); ?>
     </td>
     <td>
         <a href="<?php echo site_url('clients/view/' . $quote->client_id); ?>"
            title="<?php echo lang('view_client'); ?>">
             <?php echo $quote->client_name; ?>
         </a>
     </td>
     <td><?php echo $quote->quote_total_cost; ?> </td>
     <td><?php echo $quote->quote_nett_profit; ?></td>
     <td><?php echo $quote->quote_total_profit; ?></td>
     <td style="text-align: right; padding-right: 25px;">
         <?php echo format_currency($quote->quote_total); ?>
     </td>
     <td>
         <div class="options btn-group">
开发者ID:n0rp3d,项目名称:invoice,代码行数:31,代码来源:partial_quote_table.php

示例8: lang

</option>
						<?php 
}
?>
					</select>
				</div>
			</div>

			<div class="control-group">
				<label class="control-label"><?php 
echo lang('date');
?>
: </label>
				<div class="controls input-append date datepicker">
					<input type="text" name="payment_date" id="payment_date" value="<?php 
echo date_from_mysql($this->mdl_payments->form_value('payment_date'));
?>
" readonly>
					<span class="add-on"><i class="icon-th"></i></span>
				</div>
			</div>

			<div class="control-group">
				<label class="control-label"><?php 
echo lang('amount');
?>
: </label>
				<div class="controls">
					<input type="text" name="payment_amount" id="payment_amount" value="<?php 
echo format_amount($this->mdl_payments->form_value('payment_amount'));
?>
开发者ID:yalmasri,项目名称:fusioninvoice,代码行数:31,代码来源:form.php

示例9: lang

                    <th><?php echo lang('invoice'); ?></th>
                    <th><?php echo lang('created'); ?></th>
                    <th><?php echo lang('due_date'); ?></th>
                    <th><?php echo lang('client_name'); ?></th>
                    <th><?php echo lang('amount'); ?></th>
                    <th><?php echo lang('balance'); ?></th>
                    <th><?php echo lang('options'); ?></th>
                </tr>
            </thead>

            <tbody>
                <?php foreach ($invoices as $invoice) { ?>
                <tr>
                    <td><a href="<?php echo site_url('guest/invoices/view/' . $invoice->invoice_id); ?>"><?php echo $invoice->invoice_number; ?></a></td>
                    <td><?php echo date_from_mysql($invoice->invoice_date_created); ?></td>
                    <td><?php echo date_from_mysql($invoice->invoice_date_due); ?></td>
                    <td><?php echo $invoice->client_name; ?></td>
                    <td><?php echo format_currency($invoice->invoice_total); ?></td>
                    <td><?php echo format_currency($invoice->invoice_balance); ?></td>
                    <td>
                        <a href="<?php echo site_url('guest/invoices/view/' . $invoice->invoice_id); ?>" class="btn btn-small">
                            <i class="icon-eye-open"></i> <?php echo lang('view'); ?>
                        </a>

                        <a href="<?php echo site_url('guest/invoices/generate_pdf/' . $invoice->invoice_id); ?>" class="btn btn-small">
                            <i class="icon-print"></i> <?php echo lang('pdf'); ?>
                        </a>
                        
                        <?php if ($this->mdl_settings->setting('merchant_enabled') == 1 and $invoice->invoice_balance > 0) { ?><a href="<?php echo site_url('guest/payment_handler/make_payment/' . $invoice->invoice_url_key); ?>" class="btn btn-small btn-success"><i class="icon-white icon-ok"></i> <?php echo lang('pay_now'); ?></a><?php } ?>
                    </td>
                </tr>
开发者ID:jneto81,项目名称:FusionInvoice,代码行数:31,代码来源:invoices_index.php

示例10: lang

                <td><?php 
echo lang('quote_date') . ':';
?>
</td>
                <td><?php 
echo date_from_mysql($quote->quote_date_created, true);
?>
</td>
            </tr>
            <tr>
                <td><?php 
echo lang('expires') . ': ';
?>
</td>
                <td><?php 
echo date_from_mysql($quote->quote_date_expires, true);
?>
</td>
            </tr>
            <tr>
                <td><?php 
echo lang('total') . ': ';
?>
</td>
                <td><?php 
echo format_currency($quote->quote_total);
?>
</td>
            </tr>
        </table>
    </div>
开发者ID:fabian,项目名称:InvoicePlane,代码行数:31,代码来源:InvoicePlane.php

示例11: lang

    <?php $this->layout->load_view('layout/alerts'); ?>

    <div id="filter_results">
        <table class="table table-striped">

            <thead>
                <tr>
                    <th><?php echo lang('date'); ?></th>
                    <th><?php echo lang('invoice'); ?></th>
                    <th><?php echo lang('amount'); ?></th>
                    <th><?php echo lang('payment_method'); ?></th>
                    <th><?php echo lang('note'); ?></th>
                </tr>
            </thead>

            <tbody>
                <?php foreach ($payments as $payment) { ?>
                <tr>
                    <td><?php echo date_from_mysql($payment->payment_date); ?></td>
                    <td><?php echo $payment->invoice_number; ?></td>
                    <td><?php echo format_currency($payment->payment_amount); ?></td>
                    <td><?php echo $payment->payment_method_name; ?></td>
                    <td><?php echo $payment->payment_note; ?></td>
                </tr>
                <?php } ?>
            </tbody>

        </table>
    </div>

</div>
开发者ID:jneto81,项目名称:FusionInvoice,代码行数:31,代码来源:payments_index.php

示例12: lang

echo lang('client');
?>
</th>
								<th><?php 
echo lang('amount');
?>
</th>
							</tr>
						</thead>
						<tbody>
							<?php 
foreach ($recent_payments as $recent_payment) {
    ?>
							<tr>
								<td><?php 
    echo date_from_mysql($recent_payment->payment_date);
    ?>
</td>
								<td><?php 
    echo anchor('invoices/view/' . $recent_payment->invoice_id, $recent_payment->invoice_number);
    ?>
</td>
								<td><?php 
    echo $recent_payment->client_name;
    ?>
</td>
								<td><?php 
    echo format_currency($recent_payment->payment_amount);
    ?>
</td>
							</tr>
开发者ID:rumahkecil,项目名称:fusioninvoice-1,代码行数:31,代码来源:index.php

示例13: lang

				<div class="controls">
					<input type="text" name="client_name" id="client_name" style="margin: 0 auto;" data-provide="typeahead" data-items="8" data-source='' autocomplete="off" value="<?php 
echo $quote->client_name;
?>
">
				</div>
			</div>

			<div class="control-group">
				<label class="control-label"><?php 
echo lang('quote_date');
?>
: </label>
				<div class="controls input-append date datepicker">
					<input size="16" type="text" name="quote_date_created" id="quote_date_created" value="<?php 
echo date_from_mysql($quote->quote_date_created, TRUE);
?>
" readonly>
					<span class="add-on"><i class="icon-th"></i></span>
				</div>
			</div>
			
			<div class="control-group">
				<label class="control-label"><?php 
echo lang('invoice_group');
?>
: </label>
				<div class="controls">
					<select name="invoice_group_id" id="invoice_group_id">
						<option value=""></option>
						<?php 
开发者ID:yalmasri,项目名称:fusioninvoice,代码行数:31,代码来源:modal_copy_quote.php

示例14: if

                     <?php if ($quote->client_state) { echo $quote->client_state . ' '; } ?>
                     <?php if ($quote->client_zip) { echo $quote->client_zip . '<br>'; } ?>
                     <?php if ($quote->client_phone) { ?><abbr>P:</abbr><?php echo $quote->client_phone; ?><br><?php } ?>
                 </p>
             </td>
             <td style="width:40%;"></td>
             <td style="text-align: right;">
                 <table id="invoice-to-right-table">
                     <tbody>
                         <tr>
                             <td><?php echo lang('quote_date'); ?>: </td>
                             <td><?php echo date_from_mysql($quote->quote_date_created, TRUE); ?></td>
                         </tr>
                         <tr>
                             <td><?php echo lang('expires'); ?>: </td>
                             <td><?php echo date_from_mysql($quote->quote_date_expires, TRUE); ?></td>
                         </tr>
                         <tr>
                             <td><?php echo lang('total'); ?>: </td>
                             <td><?php echo format_currency($quote->quote_total); ?></td>
                         </tr>
                     </tbody>
                 </table>
             </td>
         </tr>
     </table>
 </div>
 <div id="invoice-items">
     <table class="table table-striped" style="width: 100%;">
         <thead>
             <tr>
开发者ID:rumahkecil,项目名称:FusionInvoice-3,代码行数:31,代码来源:default.php

示例15: lang

?>
">
                </div>
            </div>

            <div class="form-group has-feedback">
                <label for="invoice_date_created"><?php 
echo lang('invoice_date');
?>
: </label>

                <div class="input-group">
                    <input name="invoice_date_created" id="invoice_date_created"
                           class="form-control datepicker"
                           value="<?php 
echo date_from_mysql(date('Y-m-d', time()), TRUE);
?>
">
                    <span class="input-group-addon">
                        <i class="fa fa-calendar fa-fw"></i>
                    </span>
                </div>
            </div>

            <div class="form-group">
                <label for="invoice_password"><?php 
echo lang('invoice_password');
?>
</label>
                <input type="text" name="invoice_password" id="invoice_password" class="form-control"
                       value="<?php 
开发者ID:quantumsized,项目名称:InvoicePlane,代码行数:31,代码来源:modal_copy_invoice.php


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