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


PHP date::parse方法代码示例

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


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

示例1: draw

 function draw()
 {
     $object = $this->popMailbox();
     if (!$object) {
         $object = new date();
         $object->timestamp = time();
         $object->parse();
     }
     //if (!$object) $object = new date(); $object->timestamp = 0; $object->parse();
     $out .= "<select name=\"" . ($this->__prefix ? $this->__prefix . "_" : "") . $this->selector_day . "\">";
     $out .= "<option value=\"0\" " . ($object->string == "N/A" ? "selected" : "") . ">--</option>";
     for ($i = 1; $i < 32; $i++) {
         $out .= "\n\t<option value=\"" . $i . "\" " . ($object->day == $i ? "selected" : "") . ">" . $i . "</option>";
     }
     $out .= "</select>";
     $out .= "<select name=\"" . ($this->__prefix ? $this->__prefix . "_" : "") . $this->selector_month . "\">";
     $out .= "<option value=\"0\" " . ($object->string == "N/A" ? "selected" : "") . ">--</option>";
     for ($i = 1; $i < 13; $i++) {
         $out .= "\n\t<option value=\"" . $i . "\" " . ($object->month == $i ? "selected" : "") . ">" . $object->__months[$i] . "</option>";
     }
     $out .= "</select>";
     $out .= "<select name=\"" . ($this->__prefix ? $this->__prefix . "_" : "") . $this->selector_year . "\">";
     $out .= "<option value=\"0\" " . ($object->string == "N/A" ? "selected" : "") . ">--</option>";
     for ($i = 1970; $i < 2020; $i++) {
         $out .= "\n\t<option value=\"" . $i . "\" " . ($object->year == $i ? "selected" : "") . ">" . $i . "</option>";
     }
     $out .= "</select>";
     //$out .="<input type=\"text\" name=\"".($this->__prefix ? $this->__prefix."_" : "").$this->selector_hour."\" value=\"".$object->hour."\" size=\"2\"> : <input type=\"text\" name=\"".($this->__prefix ? $this->__prefix."_" : "").$this->selector_minutes."\" value=\"".$object->minutes."\" size=\"2\">";
     return $out;
 }
开发者ID:Esleelkartea,项目名称:arotz,代码行数:30,代码来源:dateselector.class.php

示例2: datestring

 function datestring($timestamp)
 {
     $d = new date();
     $d->timestamp = $timestamp;
     $d->parse();
     $this->timestamp = $timestamp;
     $this->string = $d->string;
 }
开发者ID:Esleelkartea,项目名称:arotz,代码行数:8,代码来源:datestring.class.php

示例3: scaffold

<?php

include "local.php";
$sf = new scaffold("pedidos");
$sf->open($r->pedido_id);
$p = new aworkspage();
if ($r->fecha_entrega_prevista_day) {
    $sfe = new scaffold("pedidos_eventos");
    $sfe->fromObject($r);
    $sfe->estado_viejo = $sf->estado;
    $d = new date();
    $d->day = $r->fecha_entrega_prevista_day;
    $d->month = $r->fecha_entrega_prevista_month;
    $d->year = $r->fecha_entrega_prevista_year;
    $d->parse();
    $sfe->fecha_entrega_prevista = $d->timestamp;
    $sfe->fecha = time();
    $sfe->idpedido = $r->pedido_id;
    $sfe->insert();
    if (!errorobject::hasErrors()) {
        $sf->estado = $sfe->estado_nuevo;
        $sf->fecha_entrega_prevista = $sfe->fecha_entrega_prevista;
        if ($sfe->estado_nuevo == 8) {
            $sf->fecha_entrega = time();
        }
        $sf->update();
        header("location:pedido.php?pedido_id=" . $r->pedido_id);
    } else {
        $p->addWidget(new infobox("Error", "Error en el formulario, compruebe los datos", false));
    }
}
开发者ID:Esleelkartea,项目名称:arotz,代码行数:31,代码来源:pedido_evento_add.php

示例4: header

if ($list[0]["id"] == "") {
    header("location:tracking.php?error=1&prefix=" . $r->prefix . "&suffix=" . $r->suffix);
    die;
}
$p = new aworkstrackpage();
$sf->open($list[0]["id"]);
$ew = new estadolistwidget();
$ew->drop($sf);
$d_pedido = new date();
$d_pedido->timestamp = $sf->fecha_pedido;
$d_pedido->parse();
$d_entrega_estimada = new date();
$d_entrega_estimada->timestamp = $sf->fecha_entrega_prevista;
$d_entrega_estimada->parse();
$d_entrega = new date();
$d_entrega->timestamp = $sf->fecha_entrega;
$d_entrega->parse();
$out .= "\n<br /><br /><center><div style=\"background:rgb(239,237,222);width:640px;padding:12px;border:outset 2px;\">\n<center><br />\n<h2>Pedido " . $sf->tracking . "</h2>\n<table style=\"width:560px;\"><tr><td style=\"width:220px;\">Pedido</td><td> <b>" . $sf->tracking;
$out .= "</td></tr><tr><td> Cliente </td><td><b>" . $sf->cliente;
$out .= "</td></tr><tr><td>  Referencia Cliente </td><td> <b>" . $sf->referencia;
$out .= "</td></tr><tr><td> Estado </td><td>" . $ew->draw();
$out .= "</td></tr><tr><td> Fecha Pedido</td><td>" . $d_pedido->string;
$out .= "</td></tr><tr><td> Fecha Entrega Estimada</td><td>" . $d_entrega_estimada->string;
$out .= "</td></tr><tr><td> Fecha Entrega</td><td>" . $d_entrega->string;
$out .= "</table>\n\n";
$p->addWidget(html::write($out));
$ev = new eventviewer();
$ev->drop($sf);
$p->addWidget($ev);
$p->addWidget(html::write("<br /><br /><br ></div>"));
$p->draw();
开发者ID:Esleelkartea,项目名称:arotz,代码行数:31,代码来源:tracking_pedido.php

示例5: draw

 function draw()
 {
     $o = $this->popMailBox();
     $id = $o->id;
     $es = new estadowidget();
     $es->drop($o);
     $out .= $es->draw();
     $sf = new scaffold("pedidos_eventos");
     $sf->__query = "SELECT * FROM pedidos_eventos WHERE idpedido=" . $id . " ORDER BY fecha DESC";
     $out .= "<div style=\"overflow:auto;border:inset 1px;background:white;height:250px;\">";
     $out .= "<table style=\"font-size:12px;\" class=\"eventos\"><thead><td>Fecha</td><td>Estado Antiguo</td><td>Estado Nuevo</td><td>Fecha Prevista</td><td>Descripci&oacute;n</td></thead>";
     foreach ($sf->getList() as $evento) {
         $d = new date();
         $d->timestamp = $evento["fecha"];
         $d->parse();
         $d2 = new date();
         $d2->timestamp = $evento["fecha_entrega_prevista"];
         $d2->parse();
         $ewa = new estadolistwidget();
         $ewn = new estadolistwidget();
         $o = new oobject();
         $o->estado = $evento["estado_viejo"];
         $ewa->drop($o);
         $o = new oobject();
         $o->estado = $evento["estado_nuevo"];
         $ewn->drop($o);
         $out .= "<tr><td style=\"width:110px\">" . $d->string . "</td><td style=\"width:158px;\">" . $ewa->draw() . "</td><td  style=\"width:158px;\">" . $ewn->draw() . "</td><td  style=\"width:110px;\">" . $d2->short_string . "</td><td style=\"font-size:9px;\">" . $evento["descripcion"] . "</td></tr>";
     }
     $out .= "</table>";
     $out .= "</div>";
     return $out;
 }
开发者ID:Esleelkartea,项目名称:arotz,代码行数:32,代码来源:widgets.php


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