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


PHP nice_date函数代码示例

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


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

示例1: mysqlDateTime

/**
* Format a given date or the current date to MySQL DATETIME type
*
* @return The formated date
*/
function mysqlDateTime($date)
{
    if (empty($date) || strtolower($date) == 'now') {
        return date('Y-m-d H:i:s');
    } else {
        return nice_date($date, 'Y-m-d H:i:s');
    }
}
开发者ID:OrifInformatique,项目名称:stock,代码行数:13,代码来源:MY_date_helper.php

示例2: import_index

 public function import_index()
 {
     if ($this->modules->users->is("dev_mode")) {
         $data_dwoo = new Dwoo_Data();
         $import_dir = ROOT_PATH . "test.interline.ua/storage/import";
         //xprintr($import_dir);
         $files = array();
         $allowed = array("xml", "zip", "csv", "DBF", "dbf");
         $dir = $this->dir_tree($import_dir);
         if ($dir) {
             foreach ($dir as $one) {
                 if (in_array(substr($one, -3), $allowed)) {
                     $tmpKeyDate = nice_date(filemtime($one));
                     $files[$tmpKeyDate["UNIX"]] = array("file" => $one, "date" => nice_date(filemtime($one)), "size" => $this->format_bytes(filesize($one)));
                 }
             }
         } else {
             $files = array();
         }
         ksort($files);
         $data_dwoo->assign("data", $files);
         jsonout(array("ok" => $this->dwoo->get("cms/import-index.php", $data_dwoo)));
     } else {
         jsonout(array("error" => "У вас недостаточно прав для доступа к импорту"));
     }
 }
开发者ID:nilBora,项目名称:MVC_interline,代码行数:26,代码来源:Import.php

示例3: forum_count

echo forum_count($row['id']);
?>
 Posts</span>
			<span class="item"><?php 
echo lang('topic_by');
?>
 <strong><?php 
echo $topic_author['styled_name'];
?>
</strong></span>
			<span class="item">
<?php 
if ($last_post) {
    ?>
				Last post was <?php 
    echo nice_date($last_post['time']);
    ?>
 <?php 
    echo lang('by');
    ?>
 <strong><?php 
    echo $last_post_udata['styled_name'];
    ?>
</strong>
<?php 
} else {
    ?>
				<?php 
    echo lang('none');
}
?>
开发者ID:nijikokun,项目名称:NinkoBB,代码行数:31,代码来源:sticky-topics.php

示例4: validation_errors

    echo '<div class="col-md-12">';
    echo '<div class="alert alert-danger" role="alert">';
    echo validation_errors();
    echo '</div>';
    echo '</div>';
    echo '</div>';
}
?>

        <div class="row">
          <div class="col-md-2">
            <div class="form-group">
              <label for="data_prazo">Data (dd/mm/aaaa)</label>
              <input type="text" class="form-control" id="data_prazo" name="data_prazo"
                value="<?php 
echo nice_date($prazo[0]->data_prazo, 'd/m/Y');
?>
">
            </div>
          </div>
          <div class="col-md-10">
            <div class="form-group">
              <label for="descricao">Descrição</label>
              <textarea class="form-control" id="descricao" name="descricao"><?php 
echo $prazo[0]->descricao;
?>
</textarea>
            </div>
          </div>
        </div>
开发者ID:rdconsolo,项目名称:osjuris,代码行数:30,代码来源:vprazosedita.php

示例5: validation_errors

    echo '<div class="col-md-12">';
    echo '<div class="alert alert-danger" role="alert">';
    echo validation_errors();
    echo '</div>';
    echo '</div>';
    echo '</div>';
}
?>

        <div class="row">
          <div class="col-md-2">
            <div class="form-group">
              <label for="data_andamento">Data (dd/mm/aaaa)</label>
              <input type="text" class="form-control" id="data_andamento" name="data_andamento"
                value="<?php 
echo nice_date($andamento[0]->data_andamento, 'd/m/Y');
?>
">
            </div>
          </div>
          <div class="col-md-9">
            <div class="form-group">
              <label for="descricao">Descrição</label>
              <textarea class="form-control" id="descricao" name="descricao"><?php 
echo $andamento[0]->descricao;
?>
</textarea>
            </div>
          </div>
          <div class="col-md-1">
            <div class="form-group">
开发者ID:rdconsolo,项目名称:osjuris,代码行数:31,代码来源:vandamentosedita.php

示例6: nice_date

/<?php 
        echo $number;
        ?>
/<?php 
        if ($folder == 'my_folder') {
            echo $this->uri->segment(4);
        }
        ?>
'">
		<span <?php 
        if ($type == 'inbox' && $tmp->readed == 'false') {
            echo "style=\"font-weight: bold\"";
        }
        ?>
><?php 
        echo nice_date($message_date);
        ?>
&nbsp;&nbsp;<img src="<?php 
        echo $this->config->item('img_path') . $arrow;
        ?>
.gif" />
		&nbsp;&nbsp;<?php 
        echo $senderName;
        ?>
		<?php 
        if ($folder == 'folder') {
            echo "(" . $this->Message_model->get_messages(array('type' => $type, 'number' => $number, 'uid' => $this->session->userdata('id_user')))->num_rows() . ")";
        } else {
            echo "(" . $this->Message_model->get_messages(array('type' => $type, 'number' => $number, 'id_folder' => $this->uri->segment(4), 'uid' => $this->session->userdata('id_user')))->num_rows() . ")";
        }
        ?>
开发者ID:sugengstiki,项目名称:Kalkun,代码行数:31,代码来源:message_list.php

示例7: base_url

<div class="row">
  <div class="col-md-12">
    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 class="panel-title">Dados do Processo</h3>
      </div>
      <div class="panel-body">
        <a href="<?php 
echo base_url('processos/consulta/' . $processo[0]->id_processos);
?>
"><?php 
echo $processo[0]->numero_processo;
?>
</a> |
        <?php 
echo $processo[0]->numero_interno;
?>
 |
        <?php 
echo nice_date($processo[0]->data_abertura, 'd/m/Y');
?>
 |
        <?php 
echo $processo[0]->localizacao;
?>
      </div>
    </div>
  </div>
</div>
开发者ID:rdconsolo,项目名称:osjuris,代码行数:29,代码来源:vdadosdoprocesso.php

示例8: pg_NumRows

        $error_qry = "{$query}";
        include "error.php";
    } else {
        echo "<p>" . pg_NumRows($result) . " sessions found</p>";
        echo "<table border=\"0\" align=center><tr>\n";
        echo "<th class=cols>Session #</th><th class=cols>Name</th>";
        echo "<th class=cols align=left>Start</th>";
        echo "<th class=cols align=left>Duration</th>";
        echo "</tr>";
        // Build table of sessions found
        for ($i = 0; $i < pg_NumRows($result); $i++) {
            $thissession = pg_Fetch_Object($result, $i);
            if ($i % 2 == 0) {
                echo "<tr bgcolor={$colors['6']}>";
            } else {
                echo "<tr bgcolor={$colors['7']}>";
            }
            echo "<td align=center>&nbsp;{$thissession->session_id}&nbsp;</td>\n";
            echo "<td>&nbsp;<a href=\"user.php?user_no={$thissession->user_no}\">{$thissession->fullname}";
            if ("{$thissession->fullname}" == "") {
                echo "{$thissession->username}";
            }
            echo "</a>&nbsp;</td>\n";
            echo "<td>" . nice_date($thissession->session_start) . "</td>\n";
            echo "<td>{$thissession->duration}</td>\n";
            echo "</tr>\n";
        }
        echo "</table>\n";
    }
}
echo "</table>\n</form>\n";
开发者ID:Br3nda,项目名称:wrms,代码行数:31,代码来源:sessionlist-form.php

示例9: set_value

            <label for="email"><span>Email address:</span>
                <input type="email" name="email" id="email" value="<?php 
echo set_value('email', $result['email']);
?>
" placeholder="Please enter patient's email" required>
                <?php 
echo form_error('email', "<div class='error'>", '</div>');
?>
            </label>
            <!--passcode is auto-generated in controller -->
            <label for="passcode"><span>Passcode:</span>
                <input type="text" name="passcode" id="passcode" value="<?php 
echo set_value('passcode', $result['passcode']);
?>
" required>
            </label>
            <label for="birthday"><span>Birthday:</span>
                <input type="date" name="birthday" id="birthday" value="<?php 
echo set_value('birthday', nice_date($result['birthday'], 'Y-m-d'));
?>
" placeholder="Please enter patient's birth date" required>
                <?php 
echo form_error('birthday', "<div class='error'>", '</div>');
?>
            </label>
            <input type="submit" value="" id="submit">
            </form>
        </div>
    </div>
<?php 
include APPPATH . 'views\\templates\\lab_footer.php';
开发者ID:soanni,项目名称:onclinic,代码行数:31,代码来源:update.php

示例10: harga

              <td><?php 
        echo $row->rekening;
        ?>
</td>
            </tr>
            <tr>
              <td class="bold">Transfer</td>
              <td><?php 
        echo harga($row->transfer);
        ?>
</td>
            </tr>
            <tr>
              <td class="bold">Daftar</td>
              <td><?php 
        echo nice_date(unix_to_human($row->daftar), 'd F Y');
        ?>
</td>
            </tr>
            <tr>
              <td class="bold">Status</td>
              <td>
                <?php 
        if ($row->stat === '1') {
            echo '<span class="label label-success">Aktif</span> ';
        } else {
            echo '<span class="label label-warning">Belum Aktif</span> ';
        }
        ?>
              </td>
            </tr>
开发者ID:mylastof,项目名称:bede,代码行数:31,代码来源:detail.php

示例11: foreach

                    <tr>
                        <th>Date</th>
                        <th>Name</th>
                        <th>Payment</th>
                        
                        
                    </tr>
                    </thead>
                    <tbody>

                    <?php 
foreach ($rows as $row) {
    ?>
                    <tr>
                        <td><?php 
    echo nice_date($row->timestamp_checkout, 'd M Y');
    ?>
</td>
                        <td><?php 
    echo $row->name;
    ?>
</td>
                        <td>$<?php 
    echo $row->payment_checkout;
    ?>
</td>
                        
                       
                    </tr>
                    <?php 
}
开发者ID:murtaza9000,项目名称:influence,代码行数:31,代码来源:payment_historyuser.php

示例12: foreach

                  <th>Data</th>
                  <th>Descrição</th>
                  <th></th>
                </tr>
              </thead>
              <tbody>
                <?php 
foreach ($prazos as $row) {
    ?>
                  <tr>
                    <td><a href="<?php 
    echo base_url('prazos/consulta/' . $row->id_processos . '/' . $row->id_prazos);
    ?>
">
                      <?php 
    echo nice_date($row->data_prazo, 'd/m/Y');
    ?>
</a></td>
                    <td><?php 
    echo $row->descricao;
    ?>
</td>

                    <td style="white-space:nowrap">
                      <a class="btn btn-default btn-xs"
                        href="<?php 
    echo base_url('prazos/edita/' . $row->id_processos . '/' . $row->id_prazos);
    ?>
">
                        <span class="glyphicon glyphicon-edit" aria-hidden="true" title="Editar"></span></a>
                      <a class="btn btn-default btn-xs"
开发者ID:rdconsolo,项目名称:osjuris,代码行数:31,代码来源:vprazos.php

示例13: extension

 public function extension()
 {
     $input_date = $this->extension_date;
     $better_date = nice_date($input_date, 'Y-m-d');
     $data = ['chawri_extension_sellers_id' => $this->session->userdata['user_data'][0]['users_id'], 'chawri_products_orders_id' => $this->products_id, 'chawri_extension_date' => $better_date, 'chawri_extension_reasons' => $this->extension, 'chawri_extension_current_date' => $date = date('Y-m-d H:i:s')];
     if ($this->db->insert('chawri_extension', $data)) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:sanchitrathee,项目名称:new_san,代码行数:11,代码来源:Mdl_products.php

示例14: foreach

 $xtable->set_attribute("style", "empty-cells: show; border-collapse: collapse; border: 1px solid {$colors['row1']} ;");
 $xtable->set_attribute("border", "1");
 // Create column headers for selected fields.
 $xthead = $xtable->new_child("thead", "");
 $xthr = $xthead->new_child("tr", "");
 $clone_tr = $doc->create_element("tr");
 foreach ($columns as $column) {
     $xth = $xthr->new_child("th", $column);
     $xth->set_attribute("class", "cols");
     $clone_td = $doc->create_element("td");
     $clone_td = $clone_tr->append_child($clone_td);
     $clone_td->set_attribute("class", "sml");
 }
 list($day, $month, $year) = explode('/', nice_date($from_date));
 $from_timestamp = mktime(0, 0, 0, $month, $day, $year);
 list($day, $month, $year) = explode('/', nice_date($to_date));
 $to_timestamp = mktime(0, 0, 0, $month, $day, $year);
 $j_from_date = GregorianToJD(date("n", $from_timestamp), date("j", $from_timestamp), date("Y", $from_timestamp));
 $j_to_date = GregorianToJD(date("n", $to_timestamp), date("j", $to_timestamp), date("Y", $to_timestamp));
 $temp_timestamp = $from_timestamp;
 $temp_date = getdate($from_timestamp);
 for ($day = 0; $day <= $j_to_date - $j_from_date; $day++) {
     $temp_timestamp = mktime($temp_date["hour"], $temp_date["minutes"], $temp_date["seconds"], $temp_date["mon"], $temp_date["mday"] + $day, $temp_date["year"]);
     $day_array[date("Y-m-d", $temp_timestamp)] = $day;
     $xth = $xthr->new_child("th", date("D d m y", $temp_timestamp));
     $xth->set_attribute("class", "cols");
     $clone_td = $doc->create_element("td");
     $clone_td = $clone_tr->append_child($clone_td);
     if (date("D", $temp_timestamp) == "Sat" || date("D", $temp_timestamp) == "Sun") {
         $clone_td->set_attribute("class", "sml row1");
     } else {
开发者ID:Br3nda,项目名称:wrms,代码行数:31,代码来源:work_summary.php

示例15: RenderDetails

 /** Overridden method from Request, just so we display the subset of
  * request data we are interested in for QAMS.
  */
 function RenderDetails($ef)
 {
     global $session, $bigboxcols, $bigboxrows;
     $html = "";
     $html .= $ef->BreakLine("Project Details");
     if (!$this->new_record) {
         $html .= $ef->DataEntryLine("W/R #", "{$this->request_id}" . " &nbsp; &nbsp; <b>Requested:</b> " . nice_date($this->request_on) . " &nbsp; &nbsp; <b>Status:</b> " . $this->status_desc);
         $html .= $ef->BreakLine("Quality Assurance Details");
     } else {
         // QA Model
         // This determines which default approvals are set up initially..
         $html .= $ef->DataEntryLine("QA Model", "", "lookup", "qa_model_id", array("_sql" => "SELECT * FROM qa_model", "_null" => "--- choose a model ---", "title" => "The QA model most appropriate to this project"));
         // PROJECT ROLES
         // These are specific important roles to be assigned to the project for QA
         // purposes. Note, we also consider that anyone who has been ALLOCATED to
         // this project is a valid QA Reviewer (client or internal).
         // Project Manager
         $html .= $ef->DataEntryLine("Project Mgr", "{$this->fullname}", "lookup", "project_manager", array("_sql" => SqlSelectRequesters($session->org_code), "_null" => "--- select a person ---", "title" => "The project manager in charge of this project."));
         // QA Mentor
         $html .= $ef->DataEntryLine("QA Mentor", "{$this->fullname}", "lookup", "qa_mentor", array("_sql" => SqlSelectRequesters($session->org_code), "_null" => "--- select a person ---", "title" => "The QA mentor helping with quality assurance on this project."));
     }
     $html .= $ef->DataEntryLine("Brief", "%s", "text", "brief", array("size" => 70, "title" => "A brief description of the project."));
     // Organisation drop-down
     if ($session->AllowedTo("Admin") || $session->AllowedTo("Support") || $session->AllowedTo("Contractor")) {
         $html .= $ef->DataEntryLine("Organisation", "{$this->org_name}", "lookup", "org_code", array("_sql" => SqlSelectOrganisations($this->org_code), "_null" => "--- select an organisation ---", "onchange" => "OrganisationChanged();", "title" => "The organisation that this work will be done for."));
     } else {
         if ($this->new_record) {
             $this->org_name = $session->org_name;
         }
         $html .= $ef->DataEntryLine("Organisation", "{$this->org_name}", "", "");
     }
     // Person within Organisation drop-down
     $html .= $ef->DataEntryLine("Person", "{$this->fullname}", "lookup", "requester_id", array("_sql" => SqlSelectRequesters($this->org_code), "_null" => "--- select a person ---", "onchange" => "PersonChanged();", "title" => "The client who is requesting this, or who is in charge of ensuring it happens."));
     // System (within Organisation) drop-down
     $html .= $ef->DataEntryLine("System", "{$this->system_desc}", "lookup", "system_id", array("_sql" => SqlSelectSystems($this->org_code), "_null" => "--- select a system ---", "onchange" => "SystemChanged();", "title" => "The business system that this project applies to."));
     // Urgency of Request
     $html .= $ef->DataEntryLine("Urgency", $this->urgency_desc, "lookup", "urgency", array("_type" => "request|urgency", "title" => "The urgency of the project, separate from the long-term importance"));
     // Importance of Request
     $html .= $ef->DataEntryLine("Importance", $this->importance_desc, "lookup", "importance", array("_type" => "request|importance", "title" => "The relative long-term importance of the project, separate from the urgency"));
     // Requested By Date
     $html .= $ef->DataEntryLine("Requested By", $this->requested_by_date, "date", "requested_by_date", array("title" => "The date that you would like this project completed by", "onblur" => "this.value=CheckDate(this)"));
     // Agreed Due Date
     $html .= $ef->DataEntryLine("Agreed Due", $this->agreed_due_date, "date", "agreed_due_date", array("title" => "The date that has been agreed that the project will be completed by / on", "onblur" => "this.value=CheckDate(this)"));
     // Detailed description
     $html .= $ef->DataEntryLine("Details", str_replace('%', '%%', html_format($this->detailed)), "textarea", "detailed", array("title" => "Full details of the project", "rows" => $bigboxrows, "cols" => $bigboxcols));
     return $html;
 }
开发者ID:Br3nda,项目名称:wrms,代码行数:50,代码来源:qams-project-defs.php


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