• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP print_date函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: print_versions

/**
 * @param $edit_page
 * @param $obsolete_flag
 */
function print_versions($edit_page, $obsolete_flag)
{
    $specmanagement_database_api = new specmanagement_database_api();
    $specmanagement_print_api = new specmanagement_print_api();
    $obsolote = false;
    if ($obsolete_flag) {
        $obsolote = null;
    }
    if ($edit_page) {
        $versions = version_get_all_rows_with_subs(helper_get_current_project(), null, null);
    } else {
        $versions = version_get_all_rows_with_subs(helper_get_current_project(), null, $obsolote);
    }
    for ($version_index = 0; $version_index < count($versions); $version_index++) {
        $version = $versions[$version_index];
        $current_type = $specmanagement_database_api->get_type_string($specmanagement_database_api->get_type_by_version($version['id']));
        $specmanagement_print_api->printRow();
        echo '<input type="hidden" name="version_ids[]" value="' . $version['id'] . '"/>';
        print_name($edit_page, $version);
        print_released($edit_page, $version_index, $version);
        print_obsolete($edit_page, $version_index, $version);
        print_date($edit_page, $version);
        print_type($edit_page, $current_type, $version);
        print_description($edit_page, $version);
        print_action($edit_page, $version);
        echo '</tr>';
    }
}
开发者ID:Cre-ator,项目名称:Whiteboard.SpecificationManagement-Plugin,代码行数:32,代码来源:manage_versions.php


示例2: extract_data

function extract_data($value)
{
    $htmlvalue = str_get_html($value);
    //print $htmlvalue;
    $link = $htmlvalue->find('li[class="first last"] a', 0);
    $title = $htmlvalue->find('li[class="first last"] a', 0);
    $description = $htmlvalue->find('li[class="first last"] a', 0);
    $date = $htmlvalue->find('span[class="date-display-single"]', 0);
    $processdate = substr($date->plaintext, -10);
    //print $link->href. "\n";
    //print $title->plaintext. "\n";
    //print $description->plaintext. "\n";
    $when = date_create_from_format('d/m/Y', $processdate);
    print_date($when);
    $data = array('link' => $link->href, 'title' => $title->plaintext, 'description' => $description->plaintext, 'date' => $when);
    scraperwiki::save(array('title'), $data);
}
开发者ID:flyeven,项目名称:scraperwiki-scraper-vault,代码行数:17,代码来源:aagbi_totw_element_browse.php


示例3: count

if (count($blank_invoices)) {
    ?>
	<h2>Blank invoices found</h2>
	We found the following <?php 
    echo count($blank_invoices);
    ?>
 blank invoices that were created from a recent "Subscription" bug:
	<ul>
		<?php 
    foreach ($blank_invoices as $blank_invoice) {
        ?>
		<li><?php 
        echo module_invoice::link_open($blank_invoice['invoice_id'], true);
        ?>
 created on <?php 
        echo print_date($blank_invoice['date_created']);
        ?>
</li>
		<?php 
    }
    ?>
	</ul>
	You can remove all these invoices manually, or click the button below to remove them automatically.
	<form action="" method="post">
		<input type="hidden" name="remove_duplicates" value="yes">
		<input type="submit" value="Remove these <?php 
    echo count($blank_invoices);
    ?>
 invoices">
	</form>
	<?php 
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:invoice_settings.php


示例4: pic_location

?>
">
                    <img class="img-responsive" src="<?php 
pic_location(11);
?>
" alt="">
                </a>
                <h3><a href="<?php 
pic_location(11);
?>
"><?php 
print_name(11);
?>
</a></h3>
                <p><?php 
print_date(11);
?>
</p>
            </div>
        </div>
        <!-- /.row -->

       

        <!-- Footer -->
        <footer>
            <div class="row">
                <div class="col-lg-12">
                    <p>Copyright &copy; Aaron Wisner 2014 [email protected]</p>
                </div>
            </div>
开发者ID:cgvarela,项目名称:parallella-examples,代码行数:31,代码来源:index.php


示例5: helper_get_tab_index

    } else {
        echo '<select ', helper_get_tab_index(), ' name="user_id">';
        print_user_option_list($t_tag_row['user_id'], ALL_PROJECTS, config_get('tag_create_threshold'));
        echo '</select>';
    }
} else {
    echo user_get_name($t_tag_row['user_id']);
}
?>
</td>
	<td><?php 
echo print_date(config_get('normal_date_format'), db_unixtimestamp($t_tag_row['date_created']));
?>
 </td>
	<td><?php 
echo print_date(config_get('normal_date_format'), db_unixtimestamp($t_tag_row['date_updated']));
?>
 </td>
</tr>

<!-- spacer -->
<tr class="spacer">
	<td colspan="5"></td>
</tr>

<!-- Description -->
<tr <?php 
echo helper_alternate_class();
?>
>
	<td class="category"><?php 
开发者ID:jin255ff,项目名称:company_website,代码行数:31,代码来源:tag_update_page.php


示例6: _l

        echo _l('(%s out of %s tickets)', ordinal($ticket['position']), $ticket['total_pending']);
    }
    ?>

	                    <input type="hidden" name="status_id" value="<?php 
    echo $ticket['status_id'];
    ?>
">
						<?php 
}))));
if ($ticket['last_message_timestamp']) {
    $fieldset_data['elements'][] = array('title' => _l('Date/Time'), 'fields' => array(function () use($ticket, $limit_time) {
        if ($ticket['last_message_timestamp'] < $limit_time) {
            echo '<span class="important">';
        }
        echo print_date($ticket['last_message_timestamp'], true);
        // how many days ago was this?
        echo ' ';
        $days = ceil(($ticket['last_message_timestamp'] + 1 - time()) / 86400);
        if (abs($days) == 0) {
            _e('(today)');
        } else {
            _e(' (%s days ago)', abs($days));
        }
        if ($ticket['last_message_timestamp'] < $limit_time) {
            echo '</span>';
        }
    }));
}
$fieldset_data['elements'][] = array('title' => _l('Subject'), 'fields' => array(function () use($ticket) {
    if ($ticket['subject']) {
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:ticket_admin_edit.php


示例7: get_enum_element

		<?php 
echo get_enum_element('reproducibility', $t_bug->reproducibility);
?>
	</td>

	<!-- Date Submitted -->
	<td>
		<?php 
print_date(config_get('normal_date_format'), $t_bug->date_submitted);
?>
	</td>

	<!-- Date Updated -->
	<td>
		<?php 
print_date(config_get('normal_date_format'), $t_bug->last_updated);
?>
	</td>

</tr>


<!-- spacer -->
<tr class="spacer">
	<td colspan="6"></td>
</tr>


<tr <?php 
echo helper_alternate_class();
?>
开发者ID:amjadtbssm,项目名称:website,代码行数:31,代码来源:bug_view_advanced_page.php


示例8: array

}, 'cell_class' => 'row_action');
$columns['newsletter_from'] = array('title' => 'Sent From', 'callback' => function ($newsletter) {
    ?>
 &lt;<?php 
    echo htmlspecialchars($newsletter['from_name']);
    ?>
&gt; <?php 
    echo htmlspecialchars($newsletter['from_email']);
    ?>
 <?php 
});
$columns['newsletter_date'] = array('title' => 'Sent Date', 'callback' => function ($newsletter) {
    if (!$newsletter['send_data'] || !$newsletter['send_data']['finish_time']) {
        echo _l('Never sent');
    } else {
        echo print_date($newsletter['send_data']['finish_time'], true);
    }
});
$columns['newsletter_to'] = array('title' => 'Sent To', 'callback' => function ($newsletter) {
    if ($newsletter['send_data']) {
        echo _l('%s of %s', (int) $newsletter['send_data']['total_sent_count'], (int) $newsletter['send_data']['total_member_count']);
    }
});
$columns['newsletter_views'] = array('title' => 'Views', 'callback' => function ($newsletter) {
    if ($newsletter['send_data']) {
        echo (int) $newsletter['send_data']['total_open_count'];
        echo ' ';
        if ($newsletter['send_data']['total_member_count'] > 0) {
            echo '(' . (int) ($newsletter['send_data']['total_open_count'] / $newsletter['send_data']['total_member_count'] * 100) . '%)';
        }
    }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:newsletter_list.php


示例9: html_set_rss_link

    html_set_rss_link($t_rss_link);
}
html_page_top1();
html_page_top2();
if (!current_user_is_anonymous()) {
    echo '<div class="quick-summary-left">';
    echo lang_get('open_and_assigned_to_me') . ': ';
    echo '<a class="subtle" href="view_all_set.php?type=1&amp;handler_id=' . auth_get_current_user_id() . '&amp;hide_status=' . RESOLVED . '">' . current_user_get_assigned_open_bug_count() . '</a>';
    echo '</div>';
    echo '<div class="quick-summary-right">';
    echo lang_get('open_and_reported_to_me') . ': ';
    echo '<a class="subtle" href="view_all_set.php?type=1&amp;reporter_id=' . auth_get_current_user_id() . '&amp;hide_status=' . RESOLVED . '">' . current_user_get_reported_open_bug_count() . '</a>';
    echo '</div>';
    echo '<div class="quick-summary-left">';
    echo lang_get('last_visit') . ': ';
    echo print_date(config_get('normal_date_format'), db_unixtimestamp(current_user_get_field('last_visit')));
    echo '</div>';
}
echo '<br />';
echo '<br />';
echo '<br />';
$t_news_rows = news_get_limited_rows($f_offset, $t_project_id);
$t_news_count = count($t_news_rows);
# Loop through results
for ($i = 0; $i < $t_news_count; $i++) {
    $t_row = $t_news_rows[$i];
    # only show VS_PRIVATE posts to configured threshold and above
    if (VS_PRIVATE == $t_row['view_state'] && !access_has_project_level(config_get('private_news_threshold'))) {
        continue;
    }
    print_news_entry_from_row($t_row);
开发者ID:renemilk,项目名称:spring-website,代码行数:31,代码来源:main_page.php


示例10: print_heading

                <?php 
print_heading(array('type' => 'h3', 'title' => 'Send Statistics'));
?>
                <table class="tableclass tableclass_form tableclass_full">
                    <tbody>
                    <tr>
                        <th class="width1"><?php 
_e('Start sending');
?>
</th>
                        <td>
                            <?php 
if ($start_time <= time()) {
    _e('Now');
} else {
    echo print_date($start_time, true);
}
?>
                        </td>
                    </tr>
                    <tr>
                        <th><?php 
_e('Sent To');
?>
</th>
                        <td id="sent_to">
                            <?php 
echo _l('%s of %s', (int) $send['total_sent_count'], (int) $send['total_member_count']);
?>
                        </td>
                    </tr>
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:newsletter_queue_watch.php


示例11: array

    </div>
    <?php 
}
if ($job_data && isset($job_data['job_discussion']) && $job_data['job_discussion'] == 2) {
    // disabled & shown.
    return;
}
if ($allow_new) {
    ?>
<div class="task_job_discussion_comments">
    <div class="info">
        <?php 
    echo $current_user_id ? module_user::link_open($current_user_id, true, array(), true) : 'Unknown';
    ?>
        <?php 
    echo print_date(time(), true);
    ?>
    </div>
    <textarea rows="4" cols="30" name="new_comment"></textarea> <br/>
    <input type="button" name="add" value="<?php 
    _e('Add Comment');
    ?>
" class="task_job_discussion_add small_button" data-jobid="<?php 
    echo $job_id;
    ?>
" data-taskid="<?php 
    echo $task_id;
    ?>
">
    <?php 
    $send_to_customer_ids = array();
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:comment_list.php


示例12: strtotime

        ?>
">
                <?php 
    }
    ?>
            <?php 
    $next_due = strtotime($recurring['next_due_date']);
    if (!$recurring['next_due_date'] || $recurring['next_due_date'] == '0000-00-00') {
        echo _l('(recurring finished)');
    } else {
        if ($next_due < time()) {
            echo '<span class="important">';
            echo print_date($recurring['next_due_date']);
            echo '</span>';
        } else {
            echo print_date($recurring['next_due_date']);
        }
    }
    //if($show_record_button){
    $days = ceil(($next_due + 1 - time()) / 86400);
    if (abs($days) == 0) {
        _e('(today)');
    } else {
        _e(' (%s days)', $days);
    }
    //}
    ?>
                <?php 
    if ($show_record_button) {
        ?>
                </a>
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:recurring_list.php


示例13: foreach

	<th class="sf_admin_text sf_admin_list_th ui-state-default ui-th-column"></th>
	<th class="sf_admin_text sf_admin_list_th ui-state-default ui-th-column">Fecha</th>
	<th class="sf_admin_text sf_admin_list_th ui-state-default ui-th-column">Monto</th>
</tr>
</thead>  
  <?php 
$_LIST_SIZE = 10;
foreach ($client->getMembershipFees() as $membership) {
    ?>
		<tr class="sf_admin_row ui-widget-content odd">
			<td class="sf_admin_text sf_admin_list_td"> 
  					<img alt="Checked" title="Checked" src="/sfDoctrinePlugin/images/tick.png">
			</td>
			<td class="sf_admin_text sf_admin_list_td">
				<?php 
    echo print_date($membership->getDate(), 'd-m-Y');
    ?>
			</td>
			<td class="sf_admin_text sf_admin_list_td">
			<?php 
    echo $membership->getAmount();
    ?>
			</td>
		</tr>
   <?php 
    $_LIST_SIZE--;
    if ($_LIST_SIZE <= 0) {
        break;
    }
}
?>
开发者ID:omarcl,项目名称:training-spot,代码行数:31,代码来源:_payments.php


示例14: get_form_element

    function get_form_element($element, $viewing_revision = false, $data_record = array())
    {
        $has_write_access = !$viewing_revision;
        // convert our data field to an element.
        $element['name'] = isset($element['name']) && !empty($element['name']) ? $element['name'] : 'data_field[' . $element['data_field_id'] . ']';
        $element['id'] = 'data_field_' . $element['data_field_id'] . '';
        $element['type'] = $element['field_type'];
        if (!isset($element['value'])) {
            $element['value'] = '';
        }
        if (!$has_write_access) {
            //$element['disabled'] = 'disabled';
            $element['class'] = 'data_field_view';
        }
        $highlight = false;
        $this->ajax_edit = false;
        $input_name = $element['name'];
        if (!$input_name) {
            return false;
        }
        if (isset($element['id']) && $element['id']) {
            $input_id = $element['id'];
        } else {
            $element['id'] = $input_name;
            $input_id = $input_name;
        }
        //if(!$value && isset($_REQUEST[$input_name]))$value = $_REQUEST[$input_name];
        if (!$element['value']) {
            $element['value'] = $element['default'];
        }
        if (!is_array($element['value'])) {
            //$value=htmlspecialchars($value);
        }
        if (!isset($element['class'])) {
            $element['class'] = '';
        }
        $attr = $attr_other = '';
        if ($has_write_access) {
            if ($element['type'] == 'radio' || $element['type'] == 'checkbox_list') {
                // hacky!
                if ($element['required']) {
                    $attr_other .= ' class="form_field form_field_required"';
                } else {
                    $attr_other .= ' class="form_field"';
                }
            } else {
                $element['class'] .= " form_field";
                if ($element['required']) {
                    $element['class'] .= " form_field_required";
                }
            }
            switch ($element['type']) {
                case 'date':
                    $element['class'] .= " date_field";
                    if (!isset($element['size']) || !$element['size']) {
                        $element['size'] = 8;
                    }
                    if (strtolower($element['value']) == 'now') {
                        $element['value'] = print_date(time());
                    }
                    break;
                case 'datetime':
                    $element['class'] .= " date_time_field";
                    if (!isset($element['size']) || !$element['size']) {
                        $element['size'] = 12;
                    }
                    if (strtolower($element['value']) == 'now') {
                        $element['value'] = print_date(time(), true);
                    }
                    break;
            }
        }
        switch ($element['type']) {
            case 'checkbox_list':
            case 'radio':
                $element['attributes'] = array();
                foreach (explode("\n", trim($element['field_data'])) as $line) {
                    $line = trim($line);
                    if (preg_match('/^attributes=/', $line)) {
                        $line = preg_replace('/^attributes=/', '', $line);
                        $element['attributes'] = explode("|", $line);
                        break;
                    }
                }
                break;
            case 'select':
                if (!isset($element['attributes']) || !is_array($element['attributes']) || !count($element['attributes'])) {
                    $element['attributes'] = array();
                    foreach (explode("\n", trim($element['field_data'])) as $line) {
                        $line = trim($line);
                        if (preg_match('/^attributes=/', $line)) {
                            $line = preg_replace('/^attributes=/', '', $line);
                            if (preg_match('#hook:([\\w_]+)$#', $line, $matches)) {
                                // see if we get anything back from this hook.
                                $attributes = array();
                                $attributes = hook_filter_var($matches[1], $attributes, $element);
                                if (is_array($attributes)) {
                                    $element['attributes'] = $attributes;
                                } else {
                                    $element['attributes'] = array('Unable to call hook: ' . $matches[1]);
//.........这里部分代码省略.........
开发者ID:sgh1986915,项目名称:php-crm,代码行数:101,代码来源:data.php


示例15: print_date

                                        <?php 
                echo $alert['warning'] ? '<span class="important">' : '';
                ?>
                                        <?php 
                echo $alert['days'];
                ?>
                                        <?php 
                echo $alert['warning'] ? '</span>' : '';
                ?>
                                    </td>
                                <td width="16%">
                                    <?php 
                echo $alert['warning'] ? '<span class="important">' : '';
                ?>
                                    <?php 
                echo print_date($alert['date']);
                ?>
                                    <?php 
                echo $alert['warning'] ? '</span>' : '';
                ?>
                                </td>
                                <?php 
                if (isset($alert['hide_key']) && $alert['hide_key']) {
                    ?>
                                <td width="10">
                                    <a href="#" class="ui-corner-all ui-icon ui-icon-trash" onclick="return hide_item('<?php 
                    echo $alert['hide_key'];
                    ?>
');">[x]</a>
                                </td>
                                <?php 
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:dashboard_alerts.php


示例16: _e

_e('To');
?>
</th>
                <th><?php 
_e('User');
?>
</th>
            </tr>
        </thead>
        <tbody>
            <?php 
foreach ($pagination['rows'] as $n) {
    ?>
                <tr>
                    <td><?php 
    echo print_date($n['sent_time']);
    ?>
</td>
                    <td><?php 
    echo htmlspecialchars($n['subject']);
    ?>
</td>
                    <td><?php 
    $headers = unserialize($n['headers']);
    if (isset($headers['to']) && is_array($headers['to'])) {
        foreach ($headers['to'] as $to) {
            echo $to['email'] . ' ';
        }
    }
    ?>
</td>
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:email_widget.php


示例17: get_finance


//.........这里部分代码省略.........
                     $foo['url'] = module_finance::link_open($foo['finance_id'], false);
                     $foo['credit'] = $foo['type'] == 'i' ? $foo['amount'] : 0;
                     $foo['debit'] = $foo['type'] == 'e' ? $foo['amount'] : 0;
                     if (!isset($foo['categories'])) {
                         $foo['categories'] = '';
                     }
                     if (!isset($foo['account_name'])) {
                         $foo['account_name'] = '';
                     }
                     $linked_finances[] = $foo;
                 }
             }
             // find any child invoice payments that are also linked to this parent finance
             foreach (get_multiple('invoice_payment', array('parent_finance_id' => $finance_id)) as $invoice_payments) {
                 if ($invoice_payments['payment_type'] == _INVOICE_PAYMENT_TYPE_NORMAL || $invoice_payments['payment_type'] == _INVOICE_PAYMENT_TYPE_OVERPAYMENT_CREDIT || $invoice_payments['payment_type'] == _INVOICE_PAYMENT_TYPE_CREDIT || $invoice_payments['payment_type'] == _INVOICE_PAYMENT_TYPE_REFUND) {
                     // copied from get_finances() method
                     $invoice_payments = module_invoice::get_invoice_payment($invoice_payments['invoice_payment_id']);
                     $invoice_payments = self::_format_invoice_payment($invoice_payments, $finance);
                     // hack to pull tax information from a linked invoice payment to replace current items tax if none is defined
                     if (!$finance['taxes'] && count($invoice_payments['taxes']) && $invoice_payments['amount'] == $finance['amount']) {
                         $finance['taxes'] = $invoice_payments['taxes'];
                         $finance['taxable_amount'] = $invoice_payments['taxable_amount'];
                         $finance['sub_amount'] = $invoice_payments['sub_amount'];
                     }
                     $linked_invoice_payments[$invoice_payments['invoice_payment_id']] = $invoice_payments;
                 }
             }
             if (isset($finance['invoice_payment_id']) && $finance['invoice_payment_id'] > 0) {
                 $invoice_payments = module_invoice::get_invoice_payment($finance['invoice_payment_id']);
                 if ($invoice_payments && ($invoice_payments['payment_type'] == _INVOICE_PAYMENT_TYPE_NORMAL || $invoice_payments['payment_type'] == _INVOICE_PAYMENT_TYPE_CREDIT || $invoice_payments['payment_type'] == _INVOICE_PAYMENT_TYPE_OVERPAYMENT_CREDIT || $invoice_payments['payment_type'] == _INVOICE_PAYMENT_TYPE_REFUND)) {
                     $invoice_payments = self::_format_invoice_payment($invoice_payments, $finance);
                     // hack to pull tax information from a linked invoice payment to replace current items tax if none is defined
                     if (!$finance['taxes'] && count($invoice_payments['taxes']) && $invoice_payments['amount'] == $finance['amount']) {
                         $finance['taxes'] = $invoice_payments['taxes'];
                         $finance['taxable_amount'] = $invoice_payments['taxable_amount'];
                         $finance['sub_amount'] = $invoice_payments['sub_amount'];
                     }
                     $linked_invoice_payments[$invoice_payments['invoice_payment_id']] = $invoice_payments;
                 } else {
                     if (!$invoice_payments) {
                         // todo: this shou;ldnt happen, fix!
                     }
                 }
             }
         }
         $finance['linked_invoice_payments'] = $linked_invoice_payments;
         $finance['linked_finances'] = $linked_finances;
     }
     if ($finance_id <= 0) {
         $finance = array('finance_id' => 0, 'parent_finance_id' => 0, 'transaction_date' => print_date(time()), 'name' => '', 'description' => '', 'type' => 'e', 'sub_amount' => 0, 'taxable_amount' => 0, 'tax_mode' => module_config::c('finance_default_tax_mode', 0), 'taxes' => array(), 'amount' => 0, 'currency_id' => module_config::c('default_currency_id', 1), 'category_ids' => array(), 'customer_id' => 0, 'job_id' => 0, 'invoice_id' => 0, 'job_staff_expense' => 0, 'user_id' => 0);
         if (isset($_REQUEST['from_job_id'])) {
             $job_data = module_job::get_job((int) $_REQUEST['from_job_id']);
             $finance['job_id'] = $job_data['job_id'];
             if ($job_data['customer_id']) {
                 $finance['customer_id'] = $job_data['customer_id'];
             }
             if (isset($_REQUEST['job_staff_expense']) && (int) $_REQUEST['job_staff_expense'] > 0) {
                 // we have a job staff expense, load up the job tasks for this staff member and find out the cost.
                 if (isset($job_data['staff_total_grouped'][$_REQUEST['job_staff_expense']])) {
                     $staff_member = module_user::get_user($_REQUEST['job_staff_expense']);
                     if ($staff_member && $staff_member['user_id'] == $_REQUEST['job_staff_expense']) {
                         // valid job found, load in the defaults.
                         $finance['name'] = $job_data['name'];
                         $finance['description'] = _l('Job Expense For Staff Member: %s', $staff_member['name'] . ' ' . $staff_member['last_name']);
                         $finance['type'] = 'e';
                         $finance['amount'] = $job_data['staff_total_grouped'][$_REQUEST['job_staff_expense']];
                         $finance['taxes'] = array();
                         $finance['job_staff_expense_id'] = $job_data['job_id'];
                         $finance['job_id'] = $job_data['job_id'];
                         $finance['currency_id'] = $job_data['currency_id'];
                         $finance['transaction_date'] = print_date($job_data['date_completed']);
                         $finance['user_id'] = $staff_member['user_id'];
                         $finance['job_staff_expense'] = $staff_member['user_id'];
                     }
                 }
             }
         }
         if (!$full) {
             return $finance;
         }
         if ($invoice_payment_id && $invoice_payment_id > 0) {
             $invoice_payment_data = module_invoice::get_invoice_payment($invoice_payment_id);
             if ($invoice_payment_data && $invoice_payment_data['invoice_id']) {
                 $finance = self::_format_invoice_payment($invoice_payment_data, $finance);
                 $finance['invoice_id'] = $invoice_payment_data['invoice_id'];
                 $finance['currency_id'] = $invoice_payment_data['currency_id'];
             }
         }
     }
     if (isset($finance['invoice_id']) && $finance['invoice_id']) {
         $new_finance = hook_handle_callback('finance_invoice_listing', $finance['invoice_id'], $finance);
         if (is_array($new_finance) && count($new_finance)) {
             foreach ($new_finance as $n) {
                 $finance = array_merge($finance, $n);
             }
         }
     }
     $finance['taxes'] = self::sanatise_taxes(isset($finance['taxes']) ? $finance['taxes'] : array(), isset($finance['taxable_amount']) ? $finance['taxable_amount'] : 0);
     return $finance;
 }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:101,代码来源:finance.php


示例18: print_date

                    echo print_date($job['date_start']);
                    //is there a renewal date?
                    if (isset($job['date_renew']) && $job['date_renew'] && $job['date_renew'] != '0000-00-00') {
                        _e(' to %s', print_date(strtotime("-1 day", strtotime($job['date_renew']))));
                    }
                    ?>

								    </td>
								    <td>
									    <?php 
                    if ($job['total_percent_complete'] != 1 && strtotime($job['date_due']) < time()) {
                        echo '<span class="error_text">';
                        echo print_date($job['date_due']);
                        echo '</span>';
                    } else {
                        echo print_date($job['date_due']);
                    }
                    ?>

								    </td>
								    <td>
                            <span class="<?php 
                    echo $job['total_percent_complete'] >= 1 ? 'success_text' : '';
                    ?>
">
                                <?php 
                    echo $job['total_percent_complete'] * 100 . '%';
                    ?>

                            </span>
								    </td>
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:website_admin_edit.php


示例19: foreach

    <tbody>
    <?php 
$c = 0;
foreach ($facebook_accounts as $facebook_account) {
    ?>
        <tr class="<?php 
    echo $c++ % 2 ? "odd" : "even";
    ?>
">
            <td class="row_action">
                <?php 
    echo module_social_facebook::link_open($facebook_account['social_facebook_id'], true, $facebook_account);
    ?>
            </td>
            <td>
                <?php 
    echo print_date($facebook_account['last_checked'], true);
    ?>
            </td>
            <!--<td>
                <?php 
    /*
     */
    ?>
            </td>-->
        </tr>
    <?php 
}
?>
  </tbody>
</table>
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:facebook_account_list.php


示例20: get_replace_fields

 /**
  * @param $invoice_id
  * @param $invoice_data
  * @return array
  *
  * todo: make this method call the other 'get_replace_fields' available in website/job/etc..
  */
 public static function get_replace_fields($invoice_id, $invoice_data = false)
 {
     if (!$invoice_data) {
         $invoice_data = self::get_invoice($invoice_id);
     }
     $customer_data = array();
     if ($invoice_data['customer_id']) {
         $customer_data = module_customer::get_replace_fields($invoice_data['customer_id'], $invoice_data['user_id']);
     }
     if (!is_array($customer_data)) {
         $customer_data = array();
     }
     $data = array_merge($customer_data, $invoice_data);
     // so we get total_amount_due and stuff.
     $data = array_merge($data, array('invoice_number' => htmlspecialchars($invoice_data['name']), 'project_type' => _l(module_config::c('project_name_single', 'Website')), 'print_link' => self::link_public_print($invoice_id), 'title' => module_config::s('admin_system_name'), 'invoice_paid' => $invoice_data['total_amount_due'] <= 0 ? '<p> <font style="font-size: 1.6em;"><strong>' . _l('INVOICE PAID') . '</strong></font> </p>' : '', 'is_invoice_paid' => $invoice_data['total_amount_due'] <= 0 ? 1 : '', 'date_create' => print_date($invoice_data['date_create']), 'due_date' => print_date($invoice_data['date_due'])));
     $data['total_amount'] = dollar($invoice_data['total_amount'], true, $invoice_data['currency_id']);
     $data['total_amount_due'] = dollar($invoice_data['total_amount_due'], true, $invoice_data['currency_id']);
     $data['total_amount_paid'] = dollar($invoice_data['total_amount_paid'], true, $invoice_data['currency_id']);
     $data['date_paid'] = print_date($invoice_data['date_paid']);
     $data['date_due'] = print_date($invoice_data['date_due']);
     $data['date_sent'] = print_date($invoice_data['date_sent']);
     $data['invoice_number'] = $invoice_data['name'];
     $data['invoice_url'] = module_invoice::link_public($invoice_id);
     $data['invoice_date_range'] = '';
     if ($invoice_data['date_renew'] != '0000-00-00') {
         $data['invoice_date_range'] = _l('%s to %s', print_date($invoice_data['date_create']), print_date(strtotime("-1 day", strtotime($invoice_data['date_renew']))));
     }
     if (isset($invoice_data['credit_note_id']) && $invoice_data['credit_note_id']) {
         $credit_invoice = module_invoice::get_invoice($invoice_data['credit_note_id'], true);
         $data['credit_invoice_number'] = htmlspecialchars($credit_invoice['name']);
     }
     $data['invoice_notes'] = '';
     // grab any public notes
     if (class_exists('module_note', false) && module_note::is_plugin_enabled()) {
         $notes = module_note::get_notes(array('public' => 1, 'owner_table' => 'invoice', 'owner_id' => $invoice_id));
         if (count($notes) > 1) {
             $data['invoice_notes'] .= '<ul>';
             foreach ($notes as $note) {
                 if ($note['public']) {
                     $data['invoice_notes'] .= '<li>';
                     $data['invoice_notes'] .= htmlspecialchars($note['note']);
                     $data['invoice_notes'] .= '</li>';
                 }
             }
             $data['invoice_notes'] .= '</ul>';
         } else {
             $note = array_shift($notes);
             $data['invoice_notes'] .= htmlspecialchars($note['note']);
         }
     }
     $job_names = $website_url = $project_names = $project_names_and_url = array();
     foreach ($invoice_data['job_ids'] as $job_id) {
         $job_data = module_job::get_job($job_id);
         if ($job_data && $job_data['job_id'] == $job_id) {
             $job_names[$job_data['job_id']] = $job_data['name'];
             if (module_config::c('job_invoice_show_date_range', 1)) {
                 // check if this job is a renewable job.
                 if ($job_data['date_renew'] != '0000-00-00') {
                     $data['invoice_date_range'] = _l('%s to %s', print_date($job_data['date_start']), print_date(strtotime("-1 day", strtotime($job_data['date_renew']))));
                 }
             }
             $fields = module_job::get_replace_fields($job_id, $job_data);
             foreach ($fields as $key => $val) {
                 if (!isset($data[$key]) || !$data[$key] && $val) {
                     $data[$key] = $val;
                 }
             }
             if ($job_data['website_id']) {
                 $website_data = module_website::get_website($job_data['website_id']);
                 if ($website_data && $website_data['website_id'] == $job_data['website_id']) {
                     if (isset($website_data['url']) && $website_data['url']) {
                         $website_url[$website_data['website_id']] = module_website::urlify($website_data['url']);
                         $website_data['name_url'] = $website_data['name'] . ' (' . module_website::urlify($website_data['url']) . ')';
                     } else {
                         $website_data['name_url'] = $website_data['name'];
                     }
                     $project_names[$website_data['website_id']] = $website_data['name'];
                     $project_names_and_url[$website_data['website_id']] = $website_data['name_url'];
                     $fields = module_website::get_replace_fields($website_data['website_id'], $website_data);
                     foreach ($fields as $key => $val) {
                         if (!isset($data[$key]) || !$data[$key] && $val) {
                             $data[$key] = $val;
                         }
                     }
                 }
             }
         }
     }
     if (isset($invoice_data['website_id']) && $invoice_data['website_id']) {
         $website_data = module_website::get_website($invoice_data['website_id']);
         if ($website_data && $website_data['website_id'] == $invoice_data['website_id']) {
             if (isset($website_data['url']) && $website_data['url']) {
                 $website_url[$website_data['website_id']] = module_website::urlify($website_data['url']);
//.........这里部分代码省略.........
开发者ID:sgh1986915,项目名称:php-crm,代码行数:101,代码来源:invoice.php



注:本文中的print_date函数示例整理自Github/MSDocs


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP print_date_range函数代码示例发布时间:2022-05-15
下一篇:
PHP print_custom_field_value函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap