本文整理汇总了PHP中parseDateTime函数的典型用法代码示例。如果您正苦于以下问题:PHP parseDateTime函数的具体用法?PHP parseDateTime怎么用?PHP parseDateTime使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了parseDateTime函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($array, $timezone = null)
{
$this->title = $array['title'];
if (isset($array['allDay'])) {
// allDay has been explicitly specified
$this->allDay = (bool) $array['allDay'];
} else {
// Guess allDay based off of ISO8601 date strings
$this->allDay = preg_match(self::ALL_DAY_REGEX, $array['start']) && (!isset($array['end']) || preg_match(self::ALL_DAY_REGEX, $array['end']));
}
if ($this->allDay) {
// If dates are allDay, we want to parse them in UTC to avoid DST issues.
$timezone = null;
}
// Parse dates
$this->start = parseDateTime($array['start'], $timezone);
$this->end = isset($array['end']) ? parseDateTime($array['end'], $timezone) : null;
// Record misc properties
/*foreach ($array as $name => $value) {
if (!in_array($name, array('title', 'allDay', 'start', 'end'))) {
$this->properties[$name] = $value;
}
}*/
$this->id = $array['id'];
$this->detalls = $array['detalls'];
$this->parcela = $array['parcela'];
$this->realitzada = (bool) $array['realitzada'];
}
示例2: fromRequest
public function fromRequest($array)
{
// transfore donnees Js en Pimcore
if (isset($array['dateRegister'])) {
$array['dateRegister'] = parseDateTime($array['dateRegister']);
}
return $array();
}
示例3: acquire
public function acquire()
{
if ($this->items == null) {
$result = mysql_query("SELECT `When` FROM lastchanges WHERE Section='{$this->section}'");
$row = mysql_fetch_row($result);
if ($row == false) {
throw new Exception("Chyba při získávání datumu poslední změny - sekce: {$this->section}");
}
} else {
$item = $this->items[0];
$result = mysql_query("SELECT `When` FROM lastchanges WHERE Section='{$this->section}' AND Item={$item}");
if (!($row = mysql_fetch_row($result))) {
$row = array("2000-01-01 00:00:00");
}
}
$dt = parseDateTime($row[0]);
$this->timestamp = $dt['stamp'];
}
示例4: getEventsForHome
function getEventsForHome()
{
$this->load->file('php/utils.php', false);
$all_shows = array();
$range_start = parseDateTime($_GET['start']);
$range_end = parseDateTime($_GET['end']);
if ($this->session->userdata('logged_in')) {
$session_data = $this->session->userdata('logged_in');
$usershows = $this->shows_model->get_user_shows($session_data['id']);
foreach ($usershows as $show) {
$showArray = array();
$url = 'http://services.tvrage.com/feeds/episode_list.php?sid=' . $show;
// $url = 'xmls/' . $show . '.xml';
$feed = file_get_contents($url);
$xml = simplexml_load_string($feed) or die("Error: Cannot create object");
$show_name = strval($xml->name);
$dom = new DOMDocument();
$dom->loadXML($feed);
$episodes = $xml->xpath('//episode');
foreach ($episodes as $episode) {
if (count($episode->xpath("parent::*/@no")) > 0) {
$season = (string) $episode->xpath("parent::*/@no")[0]->no;
$episodenr = (string) $episode->seasonnum;
array_push($showArray, array('title' => $show_name, 'start' => $episode->airdate, 'season' => $season, 'episodenr' => $episodenr));
}
}
foreach ($showArray as $array) {
// Convert the input array into a useful Event object
$event = new Event($array, null);
if ($event->isWithinDayRange($range_start, $range_end)) {
$all_shows[] = $event->toArray();
}
}
}
echo json_encode($all_shows);
} else {
//If no session, redirect to login page
redirect('login', 'refresh');
}
}
示例5: feed
public function feed()
{
//require file
require FCPATH . 'assets/js/fullcalendar/demos/php/utils.php';
//variable
$range_start;
$range_end;
$timezone = null;
$output_arrays = array();
// Short-circuit if the client did not give us a date range.
if (!isset($_POST['start']) || !isset($_POST['end'])) {
die("Please provide a date range.");
}
// Parse the start/end parameters.
// These are assumed to be ISO8601 strings with no time nor timezone, like "2013-12-29".
// Since no timezone will be present, they will parsed as UTC.
$range_start = $_POST['start'];
$range_end = $_POST['end'];
// Parse the timezone parameter if it is present.
if (isset($_GET['timezone'])) {
$timezone = new DateTimeZone($_GET['timezone']);
}
// Read and parse our events JSON file into an array of event data arrays.
$query = $this->holiday->getListForCalendar($range_start, $range_end);
if ($query->num_rows() > 0) {
foreach ($query->result_array() as $row) {
$data = array();
$data["title"] = $row["HName"];
$data["allDay"] = true;
$data["start"] = $row["HDate"];
$data["end"] = $row["HDate"];
$event = new Event($data, $timezone);
if ($event->isWithinDayRange(parseDateTime($range_start), parseDateTime($range_end))) {
$output_arrays[] = $event->toArray();
}
}
}
// Send JSON to the client.
echo json_encode($output_arrays);
}
示例6: get_free_time_events
function get_free_time_events()
{
// Require our Event class and datetime utilities
require plugin_dir_path(__FILE__) . '/php/utils.php';
$IDU_Type = $_GET['IDU_Type'];
$IDU = $_GET['IDU'];
//Salesforce connection setup
$server_base = $_SERVER['DOCUMENT_ROOT'];
define("SOAP_CLIENT_BASEDIR", "{$server_base}/wp-content/Force.com-Toolkit-for-PHP-master/soapclient");
require_once SOAP_CLIENT_BASEDIR . '/SforceEnterpriseClient.php';
require_once "{$server_base}/wp-content/Force.com-Toolkit-for-PHP-master/samples/userAuth.php";
ini_set("soap.wsdl_cache_enabled", "0");
$mySforceConnection = new SforceEnterpriseClient();
$mySoapClient = $mySforceConnection->createConnection(SOAP_CLIENT_BASEDIR . '/enterprise.wsdl.xml');
$mylogin = $mySforceConnection->login($USERNAME, $PASSWORD);
//Salesforce Query
$query = "SELECT Id,Free_Json_Times__c,Firstname,Lastname,C_ID__c From Contact WHERE Id='{$IDU}'";
//Salesforce Response
$response = $mySforceConnection->query($query);
//exit if nothing returned
if (count($response->records) == 0) {
exit;
}
foreach ($response->records as $record) {
$status = $record->Status__c;
$Leading_Type = $record->Leading_Type__c;
$json_free_time = $record->Free_Json_Times__c;
}
// die( $selected_time);
// die($json);
// Short-circuit if the client did not give us a date range.
if (!isset($_GET['start']) || !isset($_GET['end'])) {
die("Please provide a date range.");
}
// Parse the start/end parameters.
// These are assumed to be ISO8601 strings with no time nor timezone, like "2013-12-29".
// Since no timezone will be present, they will parsed as UTC.
$range_start = parseDateTime($_GET['start']);
$range_end = parseDateTime($_GET['end']);
// Parse the timezone parameter if it is present.
$timezone = null;
if (isset($_GET['timezone']) && $_GET['timezone'] != 'local') {
$timezone = new DateTimeZone($_GET['timezone']);
}
// if (isset($_GET['timezone'])) {
// $timezone = new DateTimeZone($_GET['timezone']);
// }
// Read and parse our events JSON file into an array of event data arrays.
$input_arrays = json_decode($json_free_time, true);
// die($selected_time);
// Accumulate an output array of event data arrays.
$output_arrays = array();
if (count($input_arrays) > 0) {
foreach ($input_arrays as $array) {
// // Convert the input array into a useful Event object
$event = new Event($array, $timezone);
// If the event is in-bounds, add it to the output
if ($event->isWithinDayRange($range_start, $range_end)) {
$output_arrays[] = $event->toArray();
}
}
}
// Send JSON to the client.
die(json_encode($output_arrays));
}
示例7: _getHTML
public function _getHTML()
{
$this->loadData();
$o_id = sprintf("%03d", $this->data->YID) . "–{$this->data->Year}";
$dt = parseDateTime($this->data->Created);
$created = date('j.n.Y', $dt['stamp']);
$html = <<<EOT
<table class="faktura" cellspacing="1" cellpadding="1">
\t<tr class="adresa1">
\t\t<td class="adresa1L"></td>
\t\t<td class="adresa1P">
\t\t\t<span>Bestellung Nr.: </span>{$o_id}<br />
\t\t\t<span>Bestelldatum: </span>{$created}
\t\t</td>
\t</tr>
\t<tr class="adresa2">
\t\t<td class="adresa2L">
\t\t\t<h3 class="adresa2Lh3">Lieferadresse:</h3>{$this->renderDeliveryAddress()}
\t\t</td>
\t\t<td class="adresa2P">
\t\t\t<h3 class="adresa2Lh3">Rechnungsadresse:</h3>{$this->renderInvoiceAddress()}
\t\t</td>
\t</tr>
\t<tr>
\t\t<td>
\t\t</td>
\t\t<td class="objinfo">
\t\t\t<strong>Zürich, {$created}</strong>
\t\t</td>
\t</tr>
\t<tr>
\t\t<td colspan="2" class="objinfo1">
\t\t\t<strong>Rechnung Nr. {$o_id}</strong>
\t\t</td>
\t</tr>
\t<tr>
\t\t<td colspan="2">
\t\t\t<table>
\t<tr class="polozkynadpis">
\t\t\t\t\t<td class="nfks">Stk.</td>
\t\t\t\t\t<td class="nfnm">Artikelbezeichnung</td>
\t\t\t\t\t<td class="nfcn">Preis pro Stk.</td>
\t\t\t\t\t<td class="nfck">Gesamt CHF</td>
\t\t\t\t</tr>
EOT;
$sw = 1;
$next_sw = array(1 => 2, 2 => 1);
$flds = array('Title', 'Code', 'Amount', 'Cost');
$i = 1;
foreach ($this->ordrows as $ordrow) {
$fval = array();
foreach ($flds as $fld) {
$fval[$fld] = htmlspecialchars($ordrow['rowdata']->{$fld});
}
$fval['CostTotal'] = htmlspecialchars($ordrow['rowdata']->Cost * $ordrow['rowdata']->Amount);
$props_a = array();
foreach ($ordrow['properties'] as $property) {
$props_a[] = htmlspecialchars($property['name']) . ': ' . htmlspecialchars($property['value']);
}
$fval['Properties'] = empty($props_a) ? '' : ', ' . implode(', ', $props_a);
$cost1_f = $this->formatCost($fval['Cost'], 'CHF');
$costT_f = $this->formatCost($fval['CostTotal'], 'CHF');
$html .= <<<EOT
\t\t\t\t<tr class="polozky">
\t\t\t\t\t<td class="fks">{$fval['Amount']}</td>
\t\t\t\t\t<td class="fnm">
\t\t\t\t\t\t<strong>{$fval['Title']}</strong><br />
\t\t\t\t\t\tArt.Nr. {$fval['Code']}{$fval['Properties']}
\t\t\t\t\t</td>
\t\t\t\t\t<td class="fcn">{$cost1_f}</td>
\t\t\t\t\t<td class="fck"><strong>{$costT_f}</strong></td>
\t\t\t\t</tr>
EOT;
$i++;
$sw = $next_sw[$sw];
}
$html .= <<<EOT
\t\t\t</table>
\t\t</td>
\t</tr>
EOT;
$delivery_specs = array('CHP' => 'per Post', 'DPD' => 'DPD', 'PSA' => 'Persönliche Sammlung');
$delivery = array_key_exists($this->data->Delivery, $delivery_specs) ? $delivery_specs[$this->data->Delivery] : $this->data->Delivery;
//if ($dcost = $this->data->DeliveryCost) $delivery .= " ({$this->formatCost($dcost, 'CHF')})";
$dcost = $this->data->DeliveryCost;
// způsob platby je spojen s doručením
$payment_specs = array('VPB' => 'Vorauskasse per Banküberweisung', 'PNN' => 'auf Rechnung', 'BAR' => 'Barzahlung');
$payment = array_key_exists($this->data->Payment, $payment_specs) ? $payment_specs[$this->data->Payment] : $this->data->Payment;
//if ($pcost = $this->data->PaymentCost) $payment .= " ({$this->formatCost($pcost, 'CHF')})";
$pcost = $this->data->PaymentCost;
$productscost = $this->data->ProductsTotalCost;
$products_and_delivery_cost = $productscost + $dcost;
$products_and_delivery_cost_f = $this->formatCost($products_and_delivery_cost);
if ($this->data->Payment === 'VPB' || $this->data->Payment === 'BAR') {
$paymentcost_str = <<<EOT
{$payment} Skonto 3% von {$products_and_delivery_cost_f} CHF
EOT;
//.........这里部分代码省略.........
示例8: loadData
protected function loadData()
{
if ($this->data === null && $this->id) {
$result = mysql_query("SELECT ID, Title, Code, ShortDesc, URL, PageTitle, LongDesc, Collection, OriginalCost, NewCost, WSCost, Photo, Discount, Sellout, Action, Novelty, Exposed, Active, LastChange FROM products WHERE ID={$this->id}");
if ($row = mysql_fetch_array($result)) {
$this->data = new Kiwi_DataRow($row);
$this->title = $this->data->Title;
$this->code = $this->data->Code;
$this->auto = $this->data->URL == '';
$this->url = $this->data->URL;
$this->htitle = $this->data->PageTitle;
$this->shortdesc = $this->data->ShortDesc;
$this->longdesc = $this->data->LongDesc;
$this->collection = $this->data->Collection;
$this->original_cost = $this->data->OriginalCost;
$this->new_cost = $this->data->NewCost;
$this->ws_cost = $this->data->WSCost;
$this->photo = $this->data->Photo;
$this->novelty = $this->data->Novelty;
$this->action = $this->data->Action;
$this->discount = $this->data->Discount;
$this->sellout = $this->data->Sellout;
$this->exposed = $this->data->Exposed;
$this->active = $this->data->Active;
$dt = parseDateTime($this->data->LastChange);
$this->lastchange = date('j.n.Y H:i', $dt['stamp']);
$result = mysql_query("SELECT ID, FileName FROM prodepics WHERE PID={$this->id} ORDER BY ID");
while ($row = mysql_fetch_array($result)) {
$this->photo_extra[$row['ID']] = array('FileName' => $row['FileName']);
}
$result = mysql_query("SELECT ID, FileName FROM prodipics WHERE PID={$this->id} ORDER BY ID");
while ($row = mysql_fetch_array($result)) {
$this->photo_illustrative[$row['ID']] = array('FileName' => $row['FileName']);
}
$code = mysql_real_escape_string($this->code);
$result = mysql_query("SELECT Count(*) FROM products WHERE Code='{$code}'");
if ($row = mysql_fetch_row($result)) {
$this->code_unique = $row[0] < 2;
} else {
throw new Exception("Chyba při ověřování unikátnosti kódu produktu");
}
$this->loadGroup();
} else {
throw new Exception("Neplatný identifikátor produktu");
}
}
}
示例9: checkCancelTime
/**
*/
function checkCancelTime()
{
return true;
$now = time();
$OrderDateEndHOSE = date('Y-m-d') . " " . changeMinute(SESSION_3_END, "+5") . ":30";
$arrOrderDateEndHOSE = parseDateTime($OrderDateEndHOSE);
$unixOrderDateEndHOSE = mktime($arrOrderDateEndHOSE[3], $arrOrderDateEndHOSE[4], $arrOrderDateEndHOSE[5], $arrOrderDateEndHOSE[1], $arrOrderDateEndHOSE[2], $arrOrderDateEndHOSE[0]);
$EndWorkingTime = date('Y-m-d') . " 17:00:00";
$arrEndWorkingTime = parseDateTime($EndWorkingTime);
$unixEndWorkingTime = mktime($arrEndWorkingTime[3], $arrEndWorkingTime[4], $arrEndWorkingTime[5], $arrEndWorkingTime[1], $arrEndWorkingTime[2], $arrEndWorkingTime[0]);
if ($unixOrderDateEndHOSE < $now && $now < $unixEndWorkingTime) {
return true;
} else {
return false;
}
}
示例10: _getHTML
//.........这里部分代码省略.........
\t\t\t<a href="{$self}{$tqs}l=all">Alles</a>
EOT;
}
$search = htmlspecialchars($this->getSearchBoxText());
$html .= <<<EOT
\t\t<div class="searchbox">
\t\t\t<input type="text" id="kclfc_sbox" name="search" value="{$search}" class="searchinp" />
\t\t\t<input type="submit" id="kclfc_sbtn" name="cmd" value="suchen" class="searchbtn" />
\t\t</div>
\t\t<br class="clear" />
\t\t</div>
EOT;
$disabled_str = sizeof($this->clients) == 0 ? ' disabled' : '';
$all_checked_str = $this->all_checked ? ' checked' : '';
$html .= <<<EOT
\t\t<div id="frame">
\t\t\t<table class="tab-seznam" cellspacing="0" cellpadding="0">
\t\t\t\t<tr>
\t\t\t\t\t<th><input type="checkbox" name="checkall" value="Vsechny"{$disabled_str} onclick="checkUncheckAll(document.getElementsByName('check[]'),this);Kiwi_Clients_Form.enableBtns(false);"{$all_checked_str} /></th>
\t\t\t\t\t<th>Name</th>
\t\t\t\t\t<th>Email</th>
\t\t\t\t\t<th></th>
\t\t\t\t\t<th>geändert</th>
\t\t\t\t\t<th>erstellt</th>
\t\t\t\t</tr>
EOT;
$sw = 1;
$next_sw = array(1 => 2, 2 => 1);
foreach ($this->clients as $client) {
if ($this->letter !== null) {
$clientname = $client->BusinessName ? $client->BusinessName : $client->SurName;
$ltr = mb_strtoupper(mb_substr($clientname, 0, 2));
if ($ltr != 'CH') {
$ltr = $this->removeDiaT1(mb_substr($ltr, 0, 1));
}
if ($ltr != $this->letter) {
continue;
}
}
$checked_str = isset($this->checked[$client->ID]) && $this->checked[$client->ID] ? ' checked' : '';
$clink = KIWI_EDIT_CLIENT . "?c={$client->ID}";
$mlink = KIWI_ESHOPMAIL_FORM . "?c={$client->ID}";
if ($client->BusinessName) {
$name = htmlspecialchars($client->BusinessName);
$email = htmlspecialchars($client->FirmEmail);
$clientstatus_icon = 'clientF';
$clientstatus_text = 'Firma';
} else {
$name = htmlspecialchars(($client->Title ? "{$client->Title} " : '') . "{$client->FirstName} {$client->SurName}");
$email = htmlspecialchars($client->Email);
$clientstatus_icon = 'clientP';
$clientstatus_text = 'Privatperson';
}
$clientstatus_str = <<<EOT
<img src="./image/{$clientstatus_icon}.gif" alt="" title="{$clientstatus_text}" />
EOT;
$dt = parseDateTime($client->LastChange);
$lastchange = date('j.n.Y H:i', $dt['stamp']);
$dt = parseDateTime($client->Created);
$created = date('j.n.Y H:i', $dt['stamp']);
$html .= <<<EOT
\t\t\t\t<tr class="t-s-{$sw}">
\t\t\t\t\t<td><input type="checkbox" name="check[]" value="{$client->ID}" onclick="Kiwi_Clients_Form.enableBtns(this.checked)"{$checked_str} /></td>
\t\t\t\t\t<td><a href="{$clink}">{$name}</a></td>
\t\t\t\t\t<td><a href="{$mlink}">{$email}</a></td>
\t\t\t\t\t<td>{$clientstatus_str}</td>
\t\t\t\t\t<td>{$lastchange}</td>
\t\t\t\t\t<td>{$created}</td>
\t\t\t\t</tr>
EOT;
$sw = $next_sw[$sw];
}
if (sizeof($this->checked) == 0) {
$disabled_str = ' disabled';
$but_class = 'but3D';
} else {
$disabled_str = '';
$but_class = 'but3';
}
$html .= <<<EOT
\t\t\t</table>
\t\t</div>
\t</div>
\t<div class="form2">
\t\t<fieldset>
EOT;
$html .= <<<EOT
\t\t\t<input type="submit" id="kclfc_cmd1" name="cmd" value="entfernen" class="{$but_class}"{$disabled_str} onclick="return Kiwi_Clients_Form.onDelete()" />
\t\t</fieldset>
\t</div>
</form>
EOT;
return $html;
}
示例11: loadData
protected function loadData()
{
if ($this->data == null && $this->id) {
$result = mysql_query("SELECT M.ID, X.NGID, M.Name, X.Count, X.ListMode, X.ShowPages, X.DetailLink, M.LastChange FROM modules AS M LEFT OUTER JOIN mod_news AS X ON M.ID=X.ID WHERE M.ID={$this->id}");
if ($row = mysql_fetch_assoc($result)) {
$this->data = new Kiwi_DataRow($row);
$this->name = $this->data->Name;
$this->perpage = (int) $this->data->Count;
$this->ngid = $this->data->NGID;
$this->listmode = $this->data->ListMode;
$this->showpages = $this->data->ShowPages != 0;
$this->detaillink = $this->data->DetailLink;
$dt = parseDateTime($this->data->LastChange);
$this->lastchange = date('j.n.Y H:i', $dt['stamp']);
} else {
throw new Exception("Neplatný identifikátor modulu");
}
}
if (!is_array($this->newsgroups)) {
$this->newsgroups = array();
$result = mysql_query("SELECT ID, Title FROM newsgroups ORDER BY Title");
while ($row = mysql_fetch_array($result)) {
$this->newsgroups[] = new Kiwi_DataRow($row);
}
}
}
示例12: _getHTML
public function _getHTML()
{
global $kiwi_config;
$oFCKeditor_content = new FCKeditor('knlrfc_content');
$oFCKeditor_content->Config['CustomConfigurationsPath'] = KIWI_DIRECTORY . 'fckcustom/fckconfig.js';
$oFCKeditor_content->Config['StylesXmlPath'] = KIWI_DIRECTORY . 'fckcustom/fckstyles.xml';
$oFCKeditor_content->Config['ToolbarStartExpanded'] = false;
// $oFCKeditor_content->BasePath = FCK_EDITOR_DIR; // defaultní hodnota
$oFCKeditor_content->Width = 720;
$oFCKeditor_content->Height = 296;
// $oFCKeditor_content->ToolbarSet = 'Kiwi';
$oFCKeditor_content->ToolbarSet = 'Default';
if ($this->id) {
$this->loadData();
$tname = htmlspecialchars($this->title);
$dt = parseDateTime($this->data->LastChange);
$lastchange = date('j.n. Y - H:i', $dt['stamp']);
} else {
$tname = 'neu';
$lastchange = null;
}
if ($this->read_only) {
$ro_disabled_str = ' disabled';
$D_str = 'D';
} else {
$ro_disabled_str = $D_str = '';
}
$self = basename($_SERVER['PHP_SELF']);
$qs = $this->consQS();
$title = htmlspecialchars($this->title);
$active_checked_str = $this->active ? ' checked' : '';
$oFCKeditor_content->Value = $this->content;
if ($this->title != '') {
$tname = $title;
} else {
$tname = 'Neu';
}
$html = <<<EOT
<form action="{$self}{$qs}" method="post">
\t<h2>Newsletter - {$tname} - [editieren]</h2>
\t<div class="levyV">
\t\t<div class="form3">
\t\t\t<fieldset id="knlrfc_fs">
EOT;
if ($lastchange !== null) {
$html .= <<<EOT
\t\t\t\t<div class="zmena">Zuletzt Aktualisiert: {$lastchange}</div>
EOT;
}
if ($this->read_only) {
$readonly_str = ' readonly';
$readonly_str2 = ' disabled';
$readonly_str3 = 'D';
$onchange_str = '';
$onchange_str2 = '';
} else {
$readonly_str = '';
$readonly_str2 = '';
$readonly_str3 = '';
$onchange_str = ' onchange="Kiwi_Newsletter_Form.onChange()" onkeydown="Kiwi_Newsletter_Form.onKeyDown(event)"';
$onchange_str2 = $onchange_str . ' onclick="Kiwi_Newsletter_Form.onChange()"';
}
$start = htmlspecialchars($this->start);
$html .= <<<EOT
\t\t\t\t<div id="frame">
\t\t\t\t\t<table class="tab-form" cellspacing="0" cellpadding="0">
\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t<td><span class="span-form2">Newsletter-Name :</span></td>
\t\t\t\t\t\t\t<td><input type="text" id="knlrfc_title" name="Nazev" value="{$title}" class="inpOUT" onfocus="this.className='inpON'" onblur="this.className='inpOUT'"{$onchange_str}{$readonly_str} /></td>
\t\t\t\t\t\t</tr>
\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t<td><span class="span-form2">Start :</span></td>
\t\t\t\t\t\t\t<td><input type="text" id="knlrfc_start" name="Start" value="{$start}" class="inpOUT" onfocus="this.className='inpON'" onblur="this.className='inpOFF'"{$onchange_str}{$readonly_str} /></td>
\t\t\t\t\t\t</tr>
\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t<td></td>
\t\t\t\t\t\t\t<td colspan="2"><input type="checkbox" id="knlrfc_active" name="Aktivni"{$active_checked_str}{$onchange_str2}{$readonly_str2} /> aktiv</td>
\t\t\t\t\t\t</tr>
EOT;
//TODO: reflect readonly
$content_html = $oFCKeditor_content->CreateHtml();
$html .= <<<EOT
\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t<td><span class="span-form2">Content :</span></td>
\t\t\t\t\t\t\t<td>{$content_html}</td>
\t\t\t\t\t\t</tr>
EOT;
$onback_js_arg = $this->redirectLevelUpLink();
if ($this->id) {
$preview = KIWI_NEWSLETTER_PREVIEW . '?nl=' . $this->id;
$previewHtml = <<<EOT
\t\t\t\t<div class="newsletter-preview"><a href="{$preview}" title="" target="_blank">Preview</a></div>
EOT;
} else {
$previewHtml = '';
//.........这里部分代码省略.........
示例13: header
//--------------------------------------------------------------------------------------------------
// This script reads event data from a JSON file and outputs those events which are within the range
// supplied by the "start" and "end" GET parameters.
//
// An optional "timezone" GET parameter will force all ISO8601 date stings to a given timezone.
//
// Requires PHP 5.2.0 or higher.
//--------------------------------------------------------------------------------------------------
header('Access-Control-Allow-Origin: *');
header("Content-Type: application/json");
$usuario = $_REQUEST['user'];
// Require our Event class and datetime utilities
require dirname(__FILE__) . '/utils.php';
$range_start = parseDateTime("2015-09-04");
//$_GET['start']
$range_end = parseDateTime("2015-09-24");
//$_GET['end']
// Short-circuit if the client did not give us a date range.
if (!isset($range_start) || !isset($range_end)) {
die("Please provide a date range.");
}
// Parse the start/end parameters.
// These are assumed to be ISO8601 strings with no time nor timezone, like "2013-12-29".
// Since no timezone will be present, they will parsed as UTC.
// Parse the timezone parameter if it is present.
$timezone = null;
if (isset($_GET['timezone'])) {
$timezone = new DateTimeZone($_GET['timezone']);
}
// Read and parse our events JSON file into an array of event data arrays.
$link = mysqli_connect("localhost", "sumaton", "3quipo3mpowerL4bs");
示例14: loadData
protected function loadData()
{
if ($this->data == null && $this->id) {
$result = mysql_query("SELECT ID, AGID, Title, Description, Picture, Link, LastChange FROM eshopactions WHERE ID={$this->id}");
if ($row = mysql_fetch_array($result)) {
$this->data = new Kiwi_DataRow($row);
$this->agid = $this->data->AGID;
$this->title = $this->data->Title;
$this->description = $this->data->Description;
$this->link = $this->data->Link;
$this->picture = $this->data->Picture;
$dt = parseDateTime($this->data->LastChange);
$this->lastchange = date('j.n.Y H:i', $dt['stamp']);
} else {
throw new Exception("Neplatný identifikátor akce");
}
}
if ($this->agtitle == '') {
$result = mysql_query("SELECT Title FROM actiongroups WHERE ID={$this->agid}");
if ($row = mysql_fetch_row($result)) {
$this->agtitle = $row[0];
} else {
throw new Exception("Neplatný identifikátor skupiny akcí!");
}
}
}
示例15: _getHTML
public function _getHTML()
{
$qs = $this->consQS();
if ($this->id) {
$this->loadRecord();
$tname = $name = htmlspecialchars($this->record->Name);
$url = htmlspecialchars($this->url);
$htitle = htmlspecialchars($this->htitle);
$description = str_replace("\r\n", "\r", htmlspecialchars($this->description));
$frontmenu_checked_str = $this->flags & self::FLAG_FRONTMENU ? ' checked' : '';
$dt = parseDateTime($this->record->LastChange);
$lastchange = date('j.n. Y - H:i', $dt['stamp']);
} else {
$name = '';
$tname = 'neu';
$url = '';
$htitle = '';
$description = '';
$frontmenu_checked_str = '';
$lastchange = null;
}
if ($this->read_only) {
$readonly_str = ' readonly';
$readonly_str2 = ' disabled';
$readonly_str3 = 'D';
$onchange_str = '';
$onchange_str3 = '';
$ro_disabled_str = ' disabled';
$D_str = 'D';
} else {
$readonly_str = $ro_disabled_str = $D_str = '';
$readonly_str2 = '';
$readonly_str3 = '';
$onchange_str = ' onchange="Kiwi_EShopItem_Form.onChange()" onkeydown="return Kiwi_EShopItem_Form.onKeyDown(event)"';
$onchange_str3 = ' onchange="Kiwi_EShopItem_Form.onChangeAuto()" onkeydown="Kiwi_EShopItem_Form.onKeyDownAuto(event)" onclick="Kiwi_EShopItem_Form.onChangeAuto()"';
}
$self = basename($_SERVER['PHP_SELF']);
$html = <<<EOT
<form enctype="multipart/form-data" action="{$self}{$qs}" method="post">
\t<h2>[Serie] - {$tname} - [editieren]</h2>
\t<div class="levyV">
\t\t<div class="form3">
\t\t\t<fieldset>
EOT;
if ($this->rights === true || $this->rights['EditURLs']) {
if ($this->auto) {
$checked_str = ' checked';
if ($readonly_str == '') {
$disabled_str = ' disabled';
} else {
$disabled_str = '';
}
} else {
$checked_str = '';
$disabled_str = '';
}
$ue_html = <<<EOT
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td><span class="span-form2">Automatische URL und Titel :</span></td>
\t\t\t\t\t\t<td colspan="2"><input type="checkbox" id="keifc_auto" name="Auto"{$onchange_str3}{$readonly_str}{$checked_str} /></td>
\t\t\t\t\t</tr>
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td><span class="span-form2">Serie URL :</span></td>
\t\t\t\t\t\t<td><input type="text" id="keifc_url" name="URL_rady" value="{$url}" class="inpOUT" onfocus="this.className='inpON'" onblur="this.className='inpOUT'"{$onchange_str}{$readonly_str}{$disabled_str} /></td>
\t\t\t\t\t</tr>
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td><span class="span-form2">HTML-Titel :</span></td>
\t\t\t\t\t\t<td><input type="text" id="keifc_htitle" name="htitle_rady" value="{$htitle}" class="inpOUT" onfocus="this.className='inpON'" onblur="this.className='inpOUT'"{$onchange_str}{$readonly_str}{$disabled_str} /></td>
\t\t\t\t\t</tr>
EOT;
} else {
$ue_html = '';
}
if ($lastchange != null) {
$html .= <<<EOT
\t\t\t\t<div class="zmena">Zuletzt Aktualisiert: {$lastchange}</div>
EOT;
}
if ($this->parent == 0) {
$back_disabled_str = ' disabled';
$back_disabled_D = 'D';
} else {
$back_disabled_str = '';
$back_disabled_D = '';
}
$html .= <<<EOT
\t\t\t\t<div id="frame2">
\t\t\t\t\t<table class="tab-form" cellspacing="0" cellpadding="0">
\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t<td><span class="span-form2">Bezeichnung :</span></td>
\t\t\t\t\t\t\t<td><input type="text" id="keifc_name" name="Nazev" value="{$name}" class="inpOUT" onfocus="this.className='inpON'" onblur="this.className='inpOFF'"{$onchange_str}{$readonly_str} /></td>
\t\t\t\t\t\t</tr>
\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t<td><span class="span-form2">Icon der Serie :</span></td>
EOT;
if ($this->icon) {
//.........这里部分代码省略.........