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


PHP num2str函数代码示例

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


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

示例1: initTpl

 protected function initTpl($params)
 {
     $contragent_id = $params['contragent_id'];
     $contragent = Model_Contragent::load($contragent_id);
     $start_from = toZendDate($params['start_from']);
     $start_till = toZendDate($params['start_till']);
     $deposit_from = Core_Balance::getDepositToDate($contragent->getId(), $start_from);
     $deposit_till = Core_Balance::getDepositToDate($contragent->getId(), $start_till);
     $transactions = $this->getTransactions($contragent->getId(), $params);
     $info = $this->prepareTransactions($transactions, $start_from, $start_till);
     //    Корректировка границ из-за того, что дата выписки не совпадает с датой транзакции
     $common_correction = $this->getCommonCorrection($contragent->getId(), $start_from, $start_till);
     $deposit_from += $info['deposit_from_correct'] + $common_correction;
     $deposit_till -= $info['deposit_till_correct'] - $common_correction;
     $lic_number = is_null($contragent->getAccount()) ? generateAccount($contragent->getId()) : $contragent->getAccount();
     $result = array('date_from' => $start_from->get(getTimeFormat('date')), 'date_till' => $start_till->get(getTimeFormat('date')), 'supplier.full_name' => $contragent->getFullName(), 'supplier.email' => $contragent->getEmail(), 'supplier.lic_number' => $lic_number, 'transactions.info' => $this->renderTransaction($info['transactions']), 'deposit.from' => HumanizePrice($deposit_from, true), 'deposit.till' => HumanizePrice($deposit_till, true), 'debet.total' => HumanizePrice($info['total_debet'], true), 'credit.total' => HumanizePrice($info['total_credit'], true), 'deposit.till.str' => HumanizePrice($deposit_till, true), 'deposit.till.rustr' => num2str($deposit_till), 'sign_and_stamp' => $this->renderSignAndStamp());
     return $result;
 }
开发者ID:bagermen,项目名称:Examples,代码行数:18,代码来源:Reconciliation.php

示例2:

<div class="column span-10 last" style="text-align: left; border: 1px solid #000000; border-bottom: none; border-left: none; padding: 3px;">
	<?=$ds->transfer?>
</div>

<div class="column span-8" style="text-align: left; border: 1px solid #000000; padding: 3px;">
	<b>Страховка</b>
</div>
<div class="column span-10 last" style="text-align: left; border: 1px solid #000000; border-left: none; padding: 3px;">
	<?=$ds->cif?>&nbsp;
</div>
<br><br>
<div class="column span-24 last" style="text-align: left; padding: 3px;">
	Додатково: <?=$ds->excursions?>
</div>
<div class="column span-24 last" style="text-align: left; padding: 3px;">
	Загальна вартість туристичних послуг (цифрами та прописом): <?=$ds->sum?> (<?=num2str($ds->sum)?>)
</div>
<div class="column span-24 last" style="text-align: left; padding: 3px;">
	Телефони (дом., моб.): <?$demander_info = get_client_info($demander->_clients_rid)?><?=$demander_info->phones?>
</div>

<div class="column span-12" style="text-align: left;margin-top: 30px;">
	ВІДПОВІДАЛЬНИЙ МЕНЕДЖЕР<br>
	<br>
	
	________________________/<?=get_curr_uname()?>/
	
	<br><br>
	М.П.
</div>
开发者ID:vsanth,项目名称:travelcrm,代码行数:30,代码来源:demand.php

示例3: fill_invoice

function fill_invoice($filename, $invoice_number = '', $invoice_date = '', $smi = '', $client_details = '', $product_list = '', $total = '', $count = '', $invoice_period = '', $contract_number = '', $contract_date = '')
{
    if ($invoice_number == '') {
        $invoice_number = '____';
    }
    $today = getdate();
    if ($invoice_date == '') {
        $invoice_date = $today[mday] . "." . $today[mon] . "." . $today[year];
    }
    if ($client_details == '') {
        $client_details = 'данные покупателя неизвестны';
    }
    if ($product_list == '') {
        $product_list = '<tr><td colspan=6> нет </td></tr>';
    }
    if ($total == '') {
        $total = 0;
    }
    if ($count == '') {
        $count = 0;
    }
    $content = loadFile($filename);
    $total_rub_text = "<b>" . capitalizefirst(num2str($total)) . "</b>";
    // replace placeholders
    $content = str_replace('{invoice_number}', $invoice_number, $content);
    $content = str_replace('{invoice_date}', $invoice_date, $content);
    $content = str_replace('{smi}', $smi, $content);
    $content = str_replace('{client_details}', $client_details, $content);
    $content = str_replace('{product_list}', $product_list, $content);
    $content = str_replace('{total}', $total, $content);
    $content = str_replace('{count}', $count, $content);
    $content = str_replace('{total_rub_text}', $total_rub_text, $content);
    $content = str_replace('{invoice_period}', $invoice_period, $content);
    $content = str_replace('{contract_number}', $contract_number, $content);
    $content = str_replace('{contract_date}', $contract_date, $content);
    // output content
    //pokazh($content);
    return $content;
}
开发者ID:laiello,项目名称:cartonbank,代码行数:39,代码来源:display-author_payments.php

示例4: foreach

                foreach ($dbh->query('SELECT s.id id,s.unit unit,
      (SELECT	code FROM units_default WHERE id=s.unit) unit_name FROM services_products s WHERE s.id=' . $dish['dish_id']) as $unit) {
                    $unit_name = $unit['unit_name'];
                }
                $i++;
                $text .= '<tr><td class="second right">' . $i . '&nbsp;&nbsp;</td><td class="second">
    &nbsp;&nbsp;' . $dish['dish_name'] . '</td><td class="second center">' . $unit_name . '</td><td class="second right">' . $dish['price'] . '&nbsp;&nbsp;</td><td class="second right">' . $dish['dish_qt'] . '&nbsp;&nbsp;</td><td class="second right">' . $dish['price'] * $dish['dish_qt'] . '&nbsp;&nbsp;</td></tr>';
                $unit_name = '';
            }
            foreach ($dbh->query('SELECT * FROM `payment_details_pay` WHERE op_id="' . $row['id'] . '"') as $pay) {
            }
        }
        //------------------------------------------------------------------------
        $text .= '</table>';
        $text .= '<div class="footer">';
        $text .= "Всего наименований " . $i . ", на сумму " . $row['price_all'] . " руб. <br><strong>" . first_up(num2str($row['price_all'])) . "</strong>";
        $text .= '</div><br><br>';
        $text .= '
<table>
  <tr>
  <td style="width:55px;" class="footer_right">Отпустил</td>
  <td style="border-bottom: 1px solid black;width:100px;"></td>
  <td style="width:15px;">&nbsp;&nbsp;&nbsp;&nbsp;</td>
  <td style="border-bottom: 1px solid black;width:150px; text-align:center;">' . $row['empl'] . '</td>
  <td style="width:15px;">&nbsp;&nbsp;&nbsp;&nbsp;</td>
  <td style="border-bottom: 1px solid black;width:150px; text-align:center;">' . $row['cashier_name'] . '</td>
  </tr>
  <tr>
    <td style="width:55px;"></td>
    <td style="width:100px; text-align:center;">(подпись)</td>
    <td style="width:15px;"></td>
开发者ID:koskjt,项目名称:koskjt,代码行数:31,代码来源:print.php

示例5: array

                        <th>员工卡号</th>
                        <th>状态</th>
                        <th>加入时间</th>
                        <th>管理员</th>
                        <th>允许点餐</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php 
$params = array(array(intval($_SESSION["cid"]), SQLSRV_PARAM_IN));
$sp = "{call web_get_canteen_user(?)}";
$rs = sp_execute($sp, $params);
//
foreach ($rs as $row) {
    $uids = num2str(userid_content, $row["uid"]);
    ?>
                        <tr>
                            <td>
                                <img src="<?php 
    echo strlen($row["HeadURL"]) > 0 ? $row["HeadURL"] : CFG_HTTP . CFG_USER_DEFAULT;
    ?>
" width="24px" height="24px;">
                            </td>
                            <td><?php 
    echo $row["Nickname"];
    ?>
</td>
                            <td><?php 
    echo $row["rname"];
    ?>
开发者ID:noikiy,项目名称:Bentley,代码行数:31,代码来源:canteen_user.php

示例6: VALUE

</table>
<center><table border=1 width=541><tr border=1><td width=29>№</td><td>Наименование</td><td width=74></center>Сумма</center></td></tr>';
for ($i = 0; $i < count($work) && $i < count($price); $i++) {
    $v = $i + 1;
    $html2 = $html2 . '<tr><td>' . $v . '</td><td>' . $work[$i] . '</td><td>' . $price[$i] . '</td></tr>';
    $summa = $summa + $price[$i];
    if (!isset($_GET['aktNumber'])) {
        $add_aktswork = $connect_db->prepare("INSERT INTO `aktswork` (`number`, `user`, `fiok`, `work`, `price`, `summa`) VALUE (?,?,?,?,?,?)");
        $add_aktswork->bind_param("isssii", $number, $user, $who, $work[$i], $price[$i], $pre_sum);
        $add_aktswork->execute();
        $add_aktswork->close();
    }
}
$html3 = '</tbody></table>
<table width=783><tr><td><br>Итоговая сумма к оплате: 
' . $summa . ',00 руб.<br>Сумма прописью: <b>' . num2str($summa) . '</b>
</td></tr><tr><td>Работы выполнены в полном объеме, в установленные сроки и с надлежащим качеством. Стороны претензий друг к другу не имеют. </td></tr></table>
<table width=783 height=95><tr><td><br /><br />Исполнитель: ______________</td><td><br /><br />Заказчик: ______________</td></tr></table>
<br /><br /><br /><br /><br /><br />';
$html = $html1 . $html2 . $html3;
$number++;
if (!isset($_GET['aktNumber'])) {
    $connect_db->query("UPDATE `number` SET `aktvyprab` = '{$number}'");
}
//echo $html;
/* Конвертим в PDF */
include "mpdf/mpdf.php";
$mpdf = new mPDF('utf-8', 'A4', '8', '', 10, 10, 7, 7, 10, 10);
/*задаем формат, отступы и.т.д.*/
$mpdf->charset_in = 'utf8';
/*не забываем про русский*/
开发者ID:max-gopher,项目名称:Journal,代码行数:31,代码来源:akt_vip_rab.php

示例7: set_canteen_session

/**
 * 将餐厅信息设置到session中
 * @param $row
 */
function set_canteen_session($row)
{
    $_SESSION["cid"] = $row["cid"];
    $_SESSION["cname"] = $row["cname"];
    $_SESSION["verticket"] = $row["verticket"];
    $_SESSION["verurl"] = $row["verurl"];
    $_SESSION["allow"] = $row["allow"];
    $_SESSION["cpicurl"] = $row["picurl"];
    $_SESSION["ctelnum"] = $row["telnum"];
    $_SESSION["roleid"] = $row["roleid"];
    //判断餐厅是否有二维码,没有则创建生成二维码
    if (strlen($row["verticket"]) < 1) {
        /* 根据餐厅编号生成带场景二维码 */
        $str = num2str(canteenid_content, $_SESSION["cid"]);
        $token = db_get_token_ticket(CFG_APPID, CFG_SECRET)["token"];
        $url = "https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token={$token}";
        $data = '{"action_name": "QR_LIMIT_STR_SCENE", "action_info": {"scene": {"scene_id":234, "scene_str":"' . $str . '"}}}';
        $data = json_decode(get_http_result($url, $data), true);
        //插入数据库,更新餐厅二维码信息
        $params = array(array(intval($_SESSION["cid"]), SQLSRV_PARAM_IN), array("" . $data["ticket"], SQLSRV_PARAM_IN), array("" . $data["url"], SQLSRV_PARAM_IN), array("", SQLSRV_PARAM_IN));
        sp_execute("{call web_set_canteen_verify(?,?,?,?)}", $params);
        $_SESSION["verticket"] = $data["ticket"];
    }
}
开发者ID:noikiy,项目名称:Bentley,代码行数:28,代码来源:mycanteen.php

示例8: num2str

            <?php 
echo num2str($sum);
if ($contract_num) {
    ?>
. 
              <?php 
    if ($sbr_nds) {
        ?>
                В том числе НДС 18% &mdash; <?php 
        echo num2str($sbr_nds);
        ?>
                <?php 
        if ($sbr_comm) {
            ?>
                  с суммы агентского вознаграждения ООО "Ваан" &mdash; <?php 
            echo num2str($sbr_comm);
            ?>
.
                <?php 
        }
        ?>
              <?php 
    } else {
        ?>
              <?php 
    }
    ?>
            <?php 
}
?>
            
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:30,代码来源:tpl.bank_jur_transfer.php

示例9: get_money_format

if ($doc_number != '') {
    $credit_pay = 1;
}
// Стоимость без скидки;
// Если у нас была скидка, то нам надо вычесть ее стоимость;
$work_summ = $warranty_data['summa'] - $warranty_data['summ_det'];
if ($rko_doc_data != '' && $credit_pay == 0) {
    // Скидку мы посчитали выше;
} else {
    $discount_sum = 0;
}
$numm_sum = get_money_format($warranty_data['summa']);
// Итоговая сумма к оплате;
$itog_sum = get_money_format($warranty_data['summa'] - $discount_sum);
// Сумма прописью;
$itog_sum_text = num2str($warranty_data['summa'] - $discount_sum);
?>
<style>
    body, html{
        font-family: 'Arial';
        /*page-break-inside: avoid;*/
        font-size: 0.8em;
    }
    table{
        font-size: 0.9em;
    }
    td{
        padding: 5px 5px 5px 5px;
    }
</style>
开发者ID:uvaron,项目名称:BDparser,代码行数:30,代码来源:print_warranty.php

示例10: pricelong

 public function pricelong($value)
 {
     return num2strL($value) . ' (' . num2str($value) . ')';
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:4,代码来源:DocGenFormatter.php

示例11: rgba

if (!isset($_SESSION['login'])) {
    echo '<script language="JavaScript" type="text/javascript">
<!-- 
location="' . $_SERVER['DOCUMENT_ROOT'] . 'index.php" 
//--> 
</script>';
}
require $_SERVER['DOCUMENT_ROOT'] . "/config.php";
$modal_title_start = '<div style="width: 100%; background: rgba(117, 192, 0, 0.7); color: #fff;"><center><h2 style="padding: 5px; margin: 5px 0 0 0;">';
$modal_title_end = '</h2></center></div>';
echo '<div><a class="fancybox fancybox.iframe" href="http://' . $_SERVER['HTTP_HOST'] . '/inc/add.php?addprintform"><img width="30px" height="30px" src="http://' . $_SERVER['HTTP_HOST'] . '/img/add.jpg" title="Добавить печатную форму" alt="Добавить печатную форму"></a></div>';
$nomer = 1;
$today = date("d.m.Y");
$who = 'Мне';
$sum = 1000;
$summa = $sum . ',00 руб.<br><b>' . num2str($sum) . '</b>';
$select_form = $connect_db->query("SELECT * FROM `form` WHERE `id_s` = 'akt_vip_rab'");
while ($fetch_form = $select_form->fetch_assoc()) {
    // Рисуем форму
    echo $modal_title_start . $fetch_form['name'] . $modal_title_end;
    echo '<div class="edit-form">';
    echo '<div class="buttom-form">
	<a class="fancybox fancybox.iframe" href="http://' . $_SERVER['HTTP_HOST'] . '/inc/edit.php?editaktviprab?id_s=' . $fetch_form['id_s'] . '"><img width="30px" height="30px" src="http://' . $_SERVER['HTTP_HOST'] . '/img/edit.jpg" title="Редактировать форму" alt="Редактировать форму"></a>';
    echo '</div>';
    echo '<div class="form">';
    $head = stripslashes($fetch_form['head']);
    //Удаляем экранирующие слеши
    // Замена шорткодов
    $search = array('#logo#', '#nomer#', '#today#', '#who#', '#summa#');
    // Кого меняем
    $replace = array($logo, $nomer, $today, $who, $summa);
开发者ID:max-gopher,项目名称:Journal,代码行数:31,代码来源:form.php

示例12: array

                        <th width="150px">创建日期</th>
                        <th width="226px">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php 
//查询全部餐厅信息
$_SESSION["uid"] = 4;
$tid = 0;
$params = array(array(intval($_SESSION["uid"]), SQLSRV_PARAM_IN), array($tid, SQLSRV_PARAM_IN));
$rs = sp_execute("{call web_get_topic_list(?,?)}", $params);
foreach ($rs as $row) {
    ?>
                        <tr>
                            <td id="<?php 
    echo num2str(CFG_ID_TOPIC, $row["tid"]);
    ?>
"><?php 
    echo $row["tname"];
    ?>
</td>
                            <td><?php 
    echo $row["authname"];
    ?>
</td>
                            <td align="right" style="padding-right:6px;"><?php 
    echo $row["vn"];
    ?>
</td>
                            <td><?php 
    echo is_object($row["cdt"]) ? $row["cdt"]->format("Y-m-d H:i:s") : "";
开发者ID:noikiy,项目名称:Bentley,代码行数:31,代码来源:topic.php

示例13: num2str

</h3>
            <img src="vo_qrcode.php?tids=<?php 
echo num2str(CFG_ID_TOPIC, $_SESSION["tid"]);
?>
&vids=<?php 
echo $_REQUEST["vids"];
?>
" width="300px" height="300px;">
            <h5>扫描上方二维码,查看语音【<?php 
echo $rs[0]["title"];
?>
】</h5>
            <h5 style="margin-top:10px; padding-left:200px;">
                <div style="float:left">链接:</div>
                <div id="clip_text_imgurl1" style="float:left"><?php 
echo CFG_HTTP . "mobile/tp_voice_detail.php?tids=" . num2str(CFG_ID_TOPIC, $_SESSION["tid"]) . "&vids=" . $_REQUEST["vids"];
?>
</div>
                <a class="copy" id="clip_btn_imgurl1" data-clipboard-target="clip_text_imgurl1"><div style="float:left">点击复制</div></a>
            </h5>
        </div>
    </div>
    <div class="fc"></div>
</div>
<?php 
include_once "footer.php";
?>
<script src="plugins/ZeroClipboard/ZeroClipboard.min.js"></script>
<script>
    $(function(){
        var clip_imgurl1 = new ZeroClipboard(document.getElementById("clip_btn_imgurl1"),{moviePath:"plugins/ZeroClipboard/ZeroClipboard.swf"});
开发者ID:noikiy,项目名称:Bentley,代码行数:31,代码来源:voice_qrcode.php

示例14: generateInvoice

 /**
  * НЕ ИСПОЛЬЗОВАТЬ - УСТАРЕЛ СМ generateInvoice2.
  * 
  * Генерация счета
  *
  * @todo: может перенести генерацию в очереди?
  * @todo: но тогда нужно организовать обратную связь.
  * 
  * @param type $user_info
  *
  * @return bool|\CFile
  */
 public function generateInvoice($user_info)
 {
     extract($this->options);
     $file = new CFile();
     $file_path = $this->getFilePath();
     $reserve_id = @$this->data['reserve_id'];
     if (!$file_path || !$reserve_id || empty($this->data)) {
         return false;
     }
     $data = $this->getCheckByReserveId($reserve_id);
     if (isset($data['payed_date']) && !empty($data['payed_date'])) {
         return false;
     }
     if (isset($data['check_file_id']) && $data['check_file_id'] > 0) {
         $file->Delete($data['check_file_id']);
     }
     if (!$data) {
         $data = array();
     }
     $this->data = array_merge($data, $this->data, $user_info);
     $data = $this->data;
     $bill_num = sprintf($bill_num_format, $data['reserve_id']);
     $data['bill_num'] = $bill_num;
     $data['date'] = date_text($data['date'], 'd');
     $data['price_txt'] = num2str(intval($data['price']));
     $data['price'] = number_format($data['price'], 2, ',', '');
     $data['title'] = sprintf($check_title, $bill_num);
     foreach ($data as $key => $value) {
         $data['$' . $key] = $value;
         unset($data[$key]);
     }
     $pdf = new odt2pdf($invoice_template);
     $pdf->setFolder(ABS_PATH . $templates_path);
     $pdf->convert($data);
     $content = $pdf->output(null, 'S');
     $len = strlen($content);
     if (!$len) {
         return false;
     }
     $file->path = $file_path;
     $file->table = $table_files;
     $file->size = $len;
     $file->src_id = $src_id;
     $file->name = basename($file->secure_tmpname($file->path, '.pdf'));
     $file->original_name = change_q_x(sprintf($check_org_filename, $bill_num));
     if (!$file->putContent($file->path . $file->name, $content)) {
         return false;
     }
     $this->data['check_file_id'] = $file->id;
     return $this->addCheck() ? $file : false;
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:63,代码来源:ReservesBank.php

示例15: date

<?php 
// Тут мы будем обрабатывать данные для вывода формы печати;
if (isset($_POST['rko_id']) && $_POST['rko_id'] != '') {
    $sql = "SELECT * FROM `rko` WHERE `id` = '" . $_POST['rko_id'] . "';";
    $rko_row = $db_rs->row($sql);
    // Собираем все переменные в кучу;
    if ($rko_row['print_doc_num'] != '') {
        $rko_id = $rko_row['print_doc_num'];
    } else {
        $rko_id = $rko_row['id'];
    }
    $rko_date = date('d.m.Y');
    $rko_receiver = $rko_row['selected_name'];
    $rko_reason = $rko_row['reason'];
    $rko_sum = num2str($rko_row['sum']);
    $rko_sum_int = $rko_row['sum'];
    switch ($_SESSION['company']) {
        case 'rem':
            $logo = '<img src="data:;base64,' . base64_encode(file_get_contents('http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . '/templates/images/icons/logo.png')) . '" width="80px"/>';
            $ip = 'ИП Ахметов Э.В.';
            $inn = '245905040088';
            $sc_address = 'Ленина, д.3 | Ватутина д.27 | Дуси Ковальчук д.266 | Бориса Богаткова д.208';
            $phone = '(383) 383-08-91';
            $web = 'www.remontof.net';
            break;
        case 'air':
            $logo = '<img src="data:;base64,' . base64_encode(file_get_contents('http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . '/templates/images/icons/air_logo.png')) . '" width="80px"/>';
            $ip = 'ИП Миллер Д.Л.';
            $inn = '540538154085';
            $sc_address = 'Ленина, д.3 Цоколь';
开发者ID:uvaron,项目名称:BDparser,代码行数:30,代码来源:print_rko.php


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