本文整理汇总了PHP中getTimestamp函数的典型用法代码示例。如果您正苦于以下问题:PHP getTimestamp函数的具体用法?PHP getTimestamp怎么用?PHP getTimestamp使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getTimestamp函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: showStatus
public function showStatus()
{
if ($this->_sock !== null) {
return getTimestamp() . " Listening on {$this->_host}:{$this->_port}\n";
} else {
return getTimestamp() . " Not listening yet. Configured for {$this->_host}:{$this->_port}\n";
}
}
开发者ID:robertkeizer,项目名称:php-udp,代码行数:8,代码来源:Server.php
示例2: adicionar
public function adicionar($conexao, $acao, $oQue, $quem, $qual)
{
try {
$timestamp = getTimestamp();
$conexao->query()->from("logs")->save(array("acao" => $acao, "oque" => $oQue, "quem" => $quem, "qual" => $qual, "data" => getData($timestamp), "timestampData" => $timestamp));
} catch (Exception $e) {
throw $e;
}
}
开发者ID:saulor,项目名称:cpbquirophp,代码行数:9,代码来源:LogDAO.php
示例3: isContractOptionAvailable
function isContractOptionAvailable($playerData, $durationDays)
{
if (!isset($playerData['vertrag'])) {
throw new Exception('Property "vertrag" not set in player data');
} elseif (!isset($playerData['wiealt'])) {
throw new Exception('Property "wiealt" not set in player data');
} elseif (!isset($playerData['moral'])) {
throw new Exception('Property "moral" not set in player data');
} else {
return $playerData['vertrag'] < getTimestamp('+' . $durationDays . ' days') && ($playerData['wiealt'] + GAME_DAYS_TO_REAL_DAYS_RATIO * $durationDays) / 365 < 35 && $playerData['moral'] >= getMinMoraleRequired($durationDays);
}
}
开发者ID:FridgeProduction,项目名称:OpenSoccer,代码行数:12,代码来源:vertrag_verlaengern.php
示例4: setUp
public function setUp()
{
parent::setUp();
$this->adapter = $this->getMockForAbstractClass('DynamicTable\\Adapter\\GenericDBAdapter');
$this->adapter->setSelect('*');
$this->adapter->setFrom('users');
$this->adapter->setWhere("");
$this->adapter->setParams([]);
$this->table = new Table();
$this->table->setAdapter($this->adapter);
$this->table->setColumns(['id' => ['title' => 'ID', 'sql_id' => 'id', 'type' => Table::TYPE_INTEGER, 'filters' => [Table::FILTER_EQUAL], 'sortable' => true, 'visible' => false], 'string' => ['title' => 'String', 'sql_id' => 'string', 'type' => Table::TYPE_STRING, 'filters' => [Table::FILTER_LIKE, Table::FILTER_NULL], 'sortable' => true, 'visible' => true], 'integer' => ['title' => 'Integer', 'sql_id' => 'integer', 'type' => Table::TYPE_INTEGER, 'filters' => [Table::FILTER_BETWEEN], 'sortable' => true, 'visible' => true], 'float' => ['title' => 'Float', 'sql_id' => 'float', 'type' => Table::TYPE_FLOAT, 'filters' => [Table::FILTER_NULL], 'sortable' => true, 'visible' => true], 'boolean' => ['title' => 'Boolean', 'sql_id' => 'boolean', 'type' => Table::TYPE_BOOLEAN, 'filters' => [Table::FILTER_EQUAL, Table::FILTER_NULL], 'sortable' => true, 'visible' => true], 'datetime' => ['title' => 'DateTime', 'sql_id' => 'datetime', 'type' => Table::TYPE_DATETIME, 'filters' => [Table::FILTER_NULL], 'sortable' => true, 'visible' => true]]);
$this->table->setMapper(function ($row) {
$result = $row;
if ($row['datetime'] !== null) {
$result['datetime'] = $row['datetime'] . getTimestamp();
}
return $result;
});
}
开发者ID:gabizz,项目名称:dynamic-table,代码行数:19,代码来源:GenericDBAdapterTest.php
示例5: mysql_query
mysql_query("INSERT INTO login ( CODLOGIN, DTA, LOGIN, SENHA, PAPEL, OWNER, STATUS) VALUES ( '{$codlogin}', CURRENT_TIMESTAMP, '{$login}', '{$senha}', '{$administrador}{$gerente}{$guest}', '{$_SESSION['CODPESSOA']}', '{$status}' )");
mysql_query("INSERT INTO pessoa ( CODPESSOA, NOME, DTA, OWNER, SEXO, EMAIL) VALUES ( '{$codpessoa}', '{$nome_sobrenome}', CURRENT_TIMESTAMP, '" . $_SESSION['CODPESSOA'] . "', '" . $_POST['ISITEM'] . "', '{$email}' )");
mysql_query("INSERT INTO login_rel_pessoa ( `CODLOGIN`,`CODPESSOA`) VALUES ( '{$codlogin}', '{$codpessoa}')");
echo "<script>alert('* " . getLabel('LABEL_ADD_SUCESSO_LABEL', $_SESSION['LANGUAGE']) . "!)</script>";
echo "<script>window.location = 'index.php?actionType=gerenciar.usuarios';</script>";
}
}
} else {
$erro = getLabel('ERRO_PREENCHER_TODOS_CAMPOS', $_SESSION['LANGUAGE']);
}
$pi = "<form name='formCpf' method='post' action='index.php?actionType=gerenciar.usuarios.add'>";
$pi .= "<div class='ErroMessage'>* {$erro}!</div>";
$pi .= "<br/>";
$pi .= "<div style='margin-bottom: 3px;'></div>";
$pi .= "<div>";
$CODLOGIN = strtoupper(md5(getTimestamp()));
$pi .= "<input type='hidden' name='CODLOGIN' value='{$CODLOGIN}'/>";
$pi .= "</div>";
$pi .= "<div style='margin-bottom: 3px;'></div>";
$pi .= "<div class='EntradaTextForm'>";
if (!empty($_POST)) {
$pi .= "<input class='LiloginText' style='width: 250px' type='text' id='nome' name='nome' value='" . $_POST['nome'] . "' maxlength='70' placeholder='" . getLabel('LABEL_NAME', $_SESSION['LANGUAGE']) . "'/>";
} else {
$pi .= "<input class='LiloginText' style='width: 250px' type='text' id='nome' name='nome' value='' maxlength='70' placeholder='" . getLabel('LABEL_NAME', $_SESSION['LANGUAGE']) . "'/>";
}
$pi .= "</div>";
$pi .= "<div style='margin-bottom: 3px;'></div>";
$pi .= "<div class='EntradaTextForm'>";
if (!empty($_POST)) {
$pi .= "<input class='LiloginText' style='width: 250px' type='text' id='sobrenome' name='sobrenome' value='" . $_POST['sobrenome'] . "' maxlength='70' placeholder='" . getLabel('LABEL_SOBRENOME', $_SESSION['LANGUAGE']) . "'/>";
} else {
开发者ID:patryckgratao,项目名称:projeto-maravista,代码行数:31,代码来源:gerenciar.usuarios.add.php
示例6: genNewAtomDropDownMenu
if (isset($conceptTableInfo['SESSION'])) {
if (!isset($sessionAtom) || !isAtomInConcept($sessionAtom, 'SESSION')) {
echo '<div class="MenuItem" id="MenuBarLogout"><a href="index.php?Login"><span class=TextContent>Loginx</span></a></div>';
} else {
echo '<div class="MenuItem" id="MenuBarLogout"><a href="javascript:resetSession()"><span class=TextContent>Logout</span></a></div>';
}
}
if ($isDev) {
echo '<div class="MenuItem" id="MenuBarReset"><a href="javascript:resetDatabase()"><span class=TextContent>Reset</span></a></div>';
}
echo '</div>';
// .MenuBar
echo '</div>';
// #TopLevelInterfaces
genNewAtomDropDownMenu();
$timeStamp = getTimestamp($err);
// access database to see if it is there
if ($err) {
echo '<br/>Cannot access database. Make sure the MySQL server is running, or <a href="javascript:resetDatabase()">create a new database</span></a>.';
} else {
if (isset($_REQUEST['Login'])) {
echo '<div id=AmpersandRoot>';
Login();
echo '</dev>';
} else {
if (isset($_REQUEST['CheckLogin'])) {
echo '<div id=AmpersandRoot>';
CheckLogin();
echo '</dev>';
} else {
if (!isset($_REQUEST['interface']) || !isset($_REQUEST['atom'])) {
开发者ID:4ZP6Capstone2015,项目名称:ampersand-models,代码行数:31,代码来源:index.php
示例7: mysql_query
if (mysql_affected_rows() > 0) {
$upd1 = "UPDATE " . $prefix . "teams SET scout = " . $temp . " WHERE ids = '" . $cookie_team . "'";
$upd2 = mysql_query($upd1);
$_SESSION['scout'] = $temp;
$cookie_scout = $temp;
// PROTOKOLL ANFANG
$formulierung = __('Du hast einen Scout der Stufe %d eingestellt.', $temp);
$sql7 = "INSERT INTO " . $prefix . "protokoll (team, text, typ, zeit) VALUES ('" . $cookie_team . "', '" . $formulierung . "', 'Assistenten', '" . time() . "')";
$sql8 = mysql_query($sql7);
// PROTOKOLL ENDE
setTaskDone('change_workers');
} else {
$ch1 = "SELECT zeit FROM " . $prefix . "personal_changes WHERE team = '" . $cookie_team . "' AND personal = 'Scout'";
$ch2 = mysql_query($ch1);
$ch3 = mysql_fetch_assoc($ch2);
addInfoBox(__('Du kannst jeden Assistenten nur alle 22 Tage austauschen. Du musst also noch bis %s warten.', date('d.m.Y H:i', getTimestamp('+22 days', $ch3['zeit']))));
}
}
}
$sql1 = "SELECT scout FROM " . $prefix . "teams WHERE ids = '" . $cookie_team . "'";
$sql2 = mysql_query($sql1);
$sql3 = mysql_fetch_assoc($sql2);
?>
<div style="float:left; width:280px;">
<form action="/ver_personal.php" method="post" accept-charset="utf-8">
<p>
<input type="radio" name="scout" value="1" <?php
if ($sql3['scout'] == 1) {
echo 'checked="checked" ';
}
?>
开发者ID:FridgeProduction,项目名称:OpenSoccer,代码行数:31,代码来源:ver_personal.php
示例8: _
echo '<h1>' . _('Testspiel vereinbaren') . '</h1><p><strong>' . _('Zu spät:') . '</strong> ' . _('In dieser Saison können leider keine Testspiele mehr vereinbart werden.') . '</p>';
} elseif ($getkonto4 < Friendlies::getPrice($cookie_liga, $prefix)) {
echo '<h1>' . _('Testspiel vereinbaren') . '</h1><p><strong>' . _('Zu teuer:') . '</strong> ' . _('Im Moment hast Du leider nicht genügend Geld, um ein Testspiel vereinbaren zu können.') . '</p>';
} else {
$optionsStr = '';
$optionsStr .= '<h1>' . _('Testspiel vereinbaren') . '</h1>';
$optionsStr .= '<p><strong>' . _('Wichtig:') . '</strong> ' . __('Das Testspiel findet immer im Stadion des Anfragenden statt. Beide Teams müssen für ein Testspiel eine Entschädigung an den Verband zahlen, damit das Spiel genehmigt wird. Für Dich sind das %s €.', number_format(Friendlies::getPrice($cookie_liga, $prefix), 0, ',', '.')) . '</p>';
$optionsStr .= '<form action="/testspiel_anfrage.php" method="get" accept-charset="utf-8">';
$heute_tag = date('d', time());
$heute_monat = date('m', time());
$heute_jahr = date('Y', time());
$datum_spiel = mktime(23, 00, 00, $heute_monat, $heute_tag, $heute_jahr);
$nochMoeglicheTage = 0;
$optionsStr .= '<p><select name="datum" size="1" style="width:200px">';
for ($d = 2; $d < $gesp3_noch; $d++) {
$datum_spiel_temp = getTimestamp('+' . $d . ' days', $datum_spiel);
if (!in_array($datum_spiel_temp, $testspiel_tage)) {
$optionsStr .= '<option value="' . $datum_spiel_temp . '">' . date('d.m.Y', $datum_spiel_temp) . '</option>';
$nochMoeglicheTage++;
}
}
$optionsStr .= '</select>';
$optionsStr .= ' <input type="hidden" name="id" value="' . $sql3['team'] . '" /><input type="submit" value="' . _('Anfragen') . '"' . noDemoClick($cookie_id) . ' /></p>';
$optionsStr .= '</form>';
if ($nochMoeglicheTage == 0) {
echo '<h1>' . _('Testspiel vereinbaren') . '</h1><p>' . _('Eure Vereine haben keine freien Termine mehr für ein Testspiel.') . '</p>';
} else {
echo $optionsStr;
}
}
} else {
开发者ID:FridgeProduction,项目名称:OpenSoccer,代码行数:31,代码来源:manager.php
示例9: json_decode
$json_response = json_decode($json_response, true);
$json_response = $json_response['BookMyShow'];
foreach ($json_response['arrEvent'] as $event) {
if ($event['arrVenues'][0]['RegionCode'] != 'NCR') {
continue;
}
$event_name = trim(str_replace("'", "", $event['EventTitle']));
$event_description = htmlspecialchars(trim($event['EventSynopsis']), ENT_QUOTES);
$category_array = $event['GenreArray'];
$date = (int) $event['arrDates'][0]['ShowDateCode'];
$date_year = (int) ($date / 10000);
$date = $date % 10000;
$date_month = (int) ($date / 100);
$date = $date % 100;
$date = $date_year . "-" . $date_month . "-" . $date;
$date = getTimestamp(strtotime($date));
$lat = (double) $event['arrVenues'][0]['VenueLatitude'];
$lng = (double) $event['arrVenues'][0]['VenueLongitude'];
$venueName = $event['arrVenues'][0]['VenueName'];
$image = $event['BannerURL'];
$link = $event['FShareURL'];
if ($link == '') {
$link = $event['EventWebViewURL'];
}
$query = "INSERT INTO `events` (`name`,`description`,`start_time`,`link`,`venue`,`latitude`,`longitude`,`image_url`) VALUES ('{$event_name}','{$event_description}','{$date}','{$link}','{$venueName}','{$lat}','{$lng}','{$image}')";
if (mysqli_query($connection, $query)) {
$id = mysqli_insert_id($connection);
foreach ($category_array as $cat) {
$cat_id = array_search($cat, $static_categories);
$temp = (int) $cat_id;
$temp++;
开发者ID:prabhakar267,项目名称:HackIIITD-2015-events-guide-Server-side,代码行数:31,代码来源:get-data.php
示例10: setTaskDone
<?php
if ($loggedin == 1) {
setTaskDone('players_development');
echo '<table>';
echo '<thead>';
echo '<tr>';
echo '<th scope="col">' . _('MT') . '</th>';
echo '<th scope="col">' . _('Spieler') . '</th>';
echo '<th scope="col">' . _('Alter') . '</th>';
echo '<th scope="col">' . _('Datum') . '</th>';
echo '<th scope="col">' . _('Alt') . '</th>';
echo '<th scope="col">' . _('Neu') . '</th>';
echo '</tr>';
echo '</thead>';
echo '<tbody>';
$delOld_Timeout = getTimestamp('-28 days');
$delOld1 = "DELETE FROM " . $prefix . "spielerEntwicklung WHERE team = '" . $cookie_team . "' AND zeit < " . $delOld_Timeout;
$delOld2 = mysql_query($delOld1);
$sql1 = "SELECT a.spieler, a.zeit, a.staerkeNeu, a.staerkeAlt, b.vorname, b.nachname, b.position, b.wiealt FROM " . $prefix . "spielerEntwicklung AS a JOIN " . $prefix . "spieler AS b ON a.spieler = b.ids WHERE a.team = '" . $cookie_team . "' ORDER BY a.zeit DESC LIMIT " . $start . ", " . $eintraege_pro_seite;
$sql2 = mysql_query($sql1);
$blaetter3 = anzahl_datensaetze_gesamt($sql1);
while ($sql3 = mysql_fetch_assoc($sql2)) {
echo '<tr>';
echo '<td>' . $sql3['position'] . '</td>';
echo '<td class="link"><a href="/spieler.php?id=' . $sql3['spieler'] . '">' . $sql3['vorname'] . ' ' . $sql3['nachname'] . ' </a></td>';
echo '<td>' . floor($sql3['wiealt'] / 365) . '</td>';
echo '<td>' . date('d.m.Y', $sql3['zeit']) . '</td>';
if ($sql3['staerkeAlt'] == $sql3['staerkeNeu']) {
echo '<td colspan="2">' . _('Höhepunkt') . ' (' . number_format($sql3['staerkeNeu'], 1, ',', '.') . ')</td>';
} else {
echo '<td>' . number_format($sql3['staerkeAlt'], 1, ',', '.') . '</td>';
开发者ID:FridgeProduction,项目名称:OpenSoccer,代码行数:31,代码来源:entwicklung.php
示例11: acessoDireto
<?php
acessoDireto("ADMINISTRADOR;");
$erro = "";
if (!empty($_POST) && isset($_POST['ACTION'])) {
$codcentralemails = strtoupper(md5(getTimestamp()));
$titulo = trim(htmlentities(tratapost($_POST['titulo'])));
$status = trim(tratapost($_POST['status']));
$status == 'on' ? $status = 1 : ($status = 0);
mysql_query("INSERT INTO `central_emails`( `CODCENTRALEMAILS`, `TITULO`, `STATUS`, `OWNER`) VALUES ( '{$codcentralemails}', '{$titulo}','{$status}','" . $_SESSION['CODPESSOA'] . "')");
echo "<script>alert('* " . getLabel('LABEL_ADD_SUCESSO_LABEL', $_SESSION['LANGUAGE']) . "!')</script>";
echo "<script>window.location = 'index.php?actionType=gerenciar.emails';</script>";
exit;
} else {
$erro = getLabel('ERRO_PREENCHER_TODOS_CAMPOS', $_SESSION['LANGUAGE']);
}
$pi = "<form name='formCpf' method='post' action='index.php?actionType=gerenciar.emails.add'>";
$pi .= "<div class='ErroMessage'>* {$erro}!</div>";
$pi .= "<br/>";
$pi .= "<div style='margin-bottom: 3px;'></div>";
$pi .= "<div class='EntradaTextForm'>";
if (!empty($_POST)) {
$pi .= "<input class='LiloginText' style='width: 250px' type='text' id='titulo' name='titulo' value='" . $_POST['titulo'] . "' maxlength='70' placeholder='" . getLabel('LABEL_TITULO', $_SESSION['LANGUAGE']) . "'/>";
} else {
$pi .= "<input class='LiloginText' style='width: 250px' type='text' id='titulo' name='titulo' value='' maxlength='70' placeholder='" . getLabel('LABEL_TITULO', $_SESSION['LANGUAGE']) . "'/>";
}
$pi .= "</div>";
$pi .= "<div style='margin-bottom: 3px;'></div>";
$pi .= "<div>";
if (!empty($_POST)) {
$_POST['status'] == 'on' ? $pi .= "<input type='checkbox' name='status' checked='true'/> <span class='Userlabel'>" . getLabel('LABEL_ATIVO_TEXT', $_SESSION['LANGUAGE']) . "</span>" : ($pi .= "<input type='checkbox' name='status'/> <span class='Userlabel'>" . getLabel('LABEL_ATIVO_TEXT', $_SESSION['LANGUAGE']) . "</span>");
开发者ID:patryckgratao,项目名称:projeto-maravista,代码行数:31,代码来源:gerenciar.emails.add.php
示例12: acessoDireto
<?php
acessoDireto("ADMINISTRADOR;");
$erro = "";
if (!empty($_POST) && isset($_POST['ACTION'])) {
$codquarto = strtoupper(md5(getTimestamp()));
$codquartotipo = trim(htmlentities(tratapost($_POST['codquartotipo'])));
$nome = trim(htmlentities(tratapost($_POST['nome'])));
$status = trim(tratapost($_POST['status']));
$status == 'on' ? $status = 1 : ($status = 0);
mysql_query("INSERT INTO `quartos`( `CODQUARTO`, `NOME`, `STATUS`, `OWNER` ) VALUES ( '{$codquarto}', '{$nome}','{$status}','" . $_SESSION['CODPESSOA'] . "')");
mysql_query("INSERT INTO `quartos_rel_quartos_tipo`(`CODQUARTO`,`CODQUARTOTIPO`)VALUES('{$codquarto}','{$codquartotipo}')");
echo "<script>alert('* " . getLabel('LABEL_ADD_SUCESSO_LABEL', $_SESSION['LANGUAGE']) . "!')</script>";
echo "<script>window.location = 'index.php?actionType=gerenciar.quartos';</script>";
exit;
} else {
$erro = getLabel('ERRO_PREENCHER_TODOS_CAMPOS', $_SESSION['LANGUAGE']);
}
$pi = "<form name='formCpf' method='post' action='index.php?actionType=gerenciar.quartos.add'>";
$pi .= "<div class='ErroMessage'>* {$erro}!</div>";
$pi .= "<br/>";
$pi .= "<div style='margin-bottom: 3px;'></div>";
$pi .= "<div class='EntradaTextForm'>";
$quartos = mysql_query("SELECT * FROM quartos_tipo WHERE STATUS=1 ORDER BY NOME ASC");
if (mysql_num_rows($quartos) != 0) {
$pi .= "<select class='LiloginText' style='width: 250px' name='codquartotipo' id='codquartotipo' >";
while ($quarto = mysql_fetch_object($quartos)) {
if (!empty($_POST) && isset($_POST['ACTION'])) {
$_POST['codquartotipo'] == $quarto->CODQUARTOTIPO ? $pi .= "<option value='{$quarto->CODQUARTOTIPO}' selected>{$quarto->NOME}</option>" : ($pi .= "<option value='{$quarto->CODQUARTOTIPO}'>{$quarto->NOME}</option>");
} else {
$pi .= "<option value='{$quarto->CODQUARTOTIPO}'>{$quarto->NOME}</option>";
开发者ID:patryckgratao,项目名称:projeto-maravista,代码行数:31,代码来源:gerenciar.quartos.add.php
示例13: logLine
logLine(getTimestamp() . "," . memory_get_usage(), $memory_usage_log_file);
$last_memory_log_entry = time();
}
}
// for if the connection to the sql database gives out.
// TODO Find a better way to check the connection. I think on Shared Hosting Servers mysql_ping might be disabled which causes this to always reconnect.
// if (!mysql_ping($sql_connection)) {
// //here is the major trick, you have to close the connection (even though its not currently working) for it to recreate properly.
// mysql_close($sql_connection);
// logLine("__MySQL connection lost, reconnecting__\n");
// $sql_connection = mysql_connect($sugar_config['dbconfig']['db_host_name'], $sugar_config['dbconfig']['db_user_name'], $sugar_config['dbconfig']['db_password']);
// $sql_db = mysql_select_db($sugar_config['dbconfig']['db_name']);
// db_checked_query("SET time_zone='+00:00'");
// }
}
logLine(getTimestamp() . "Event loop terminated, attempting to login again\n");
sleep(1);
}
// TODO i've seen asteriskLogger crash due to a script executing too long error... It was on a pretty budget shared hosting server.
// Hasn't ever happened to me personally... but still something noteworthy.
exit(0);
// ******************
// Helper functions *
// ******************
function createCallId()
{
$query = "SELECT UUID() AS id";
$result = db_checked_query($query);
$row = $GLOBALS['db']->fetchByAssoc($result);
return $row['id'];
}
开发者ID:nitouser,项目名称:yaai,代码行数:31,代码来源:asteriskLogger.php
示例14: VALUES
$teams6 = "INSERT INTO " . $prefix . "spiele (team1, team2, liga, typ, simuliert, datum) VALUES ('keins', 'keins', 'keine', 'Pokal', 1, '" . time() . "')";
$teams7 = mysql_query($teams6);
// 1 leeres Spiel in die DB schreiben, damit Pokal-Auslosung immer abgebrochen wird
}
// TEAMS HOLEN ENDE
// SPIELPAARUNGEN ANFANG
$startzeit = getTimestamp('+' . intval(($naechste_runde - 1) * 4) . ' days', $startzeit);
// 1 abziehen, weil fuer den 1. Spieltag 0x86400 addiert werden muss
shuffle($teamliste);
for ($r1 = 0; $r1 <= round(count($teamliste) / 2 - 1); $r1++) {
// for-Schleife fuer Spielpaarungen: bei 32 Teams gibt es [0..15]
$temporaer_liga = 'Pokal_Runde_' . $naechste_runde;
$temporaer_team1 = $teamliste[$r1];
$temporaer_team2 = $teamliste[count($teamliste) - $r1 - 1];
// 0vs32, 1vs31, ..., 15vs16
$kennung = md5($temporaer_team1 . $temporaer_team2);
$ins1 = "INSERT INTO " . $prefix . "spiele (liga, datum, team1, team2, typ, kennung) VALUES ('" . $temporaer_liga . "', '" . $startzeit . "', '" . $temporaer_team1 . "', '" . $temporaer_team2 . "', 'Pokal', '" . $kennung . "')";
$ins2 = mysql_query($ins1);
if ($naechste_runde < 5) {
$ins1 = "INSERT INTO " . $prefix . "spiele (liga, datum, team1, team2, typ, kennung) VALUES ('" . $temporaer_liga . "', '" . getTimestamp('+1 day', $startzeit) . "', '" . $temporaer_team2 . "', '" . $temporaer_team1 . "', 'Pokal', '" . $kennung . "')";
$ins2 = mysql_query($ins1);
}
}
// SPIELPAARUNGEN ENDE
// POKALERGEBIS SETZEN ANFANG
foreach ($teamliste as $teamliste_pr) {
$yxcvjhsd1 = "UPDATE " . $prefix . "teams SET pokalrunde = " . $naechste_runde . " WHERE name = '" . $teamliste_pr . "'";
$yxcvjhsd2 = mysql_query($yxcvjhsd1);
// aktualisiere die erreichte Pokalrunde
}
// POKALERGEBIS SETZEN ENDE
开发者ID:FridgeProduction,项目名称:OpenSoccer,代码行数:31,代码来源:aa_pokal_auslosen.php
示例15: array
$spielplan = array();
while ($plan3 = mysql_fetch_assoc($plan2)) {
$spielplan[$plan3['spieltag']][] = array('%' . $plan3['team1'] . '%', '%' . $plan3['team2'] . '%');
}
$platzhalter = array('%1%', '%2%', '%3%', '%4%', '%5%', '%6%', '%7%', '%8%', '%9%', '%10%', '%11%', '%12%', '%13%', '%14%', '%15%', '%16%', '%17%', '%18%', '%19%', '%20%');
$counterStart = mktime(15, 0, 0, date('m', time()), date('d', time()), date('Y', time()));
$sql4 = "SELECT ids, land FROM " . $prefix . "ligen";
$sql5 = mysql_query($sql4);
while ($sql6 = mysql_fetch_assoc($sql5)) {
$counter = getTimestamp('+1 day', $counterStart);
$liga_id = $sql6['ids'];
$liga_land = mysql_real_escape_string($sql6['land']);
$sql7 = "SELECT name FROM " . $prefix . "teams WHERE liga = '" . $liga_id . "'";
$sql8 = mysql_query($sql7);
$mannschaften = array();
while ($sql9 = mysql_fetch_assoc($sql8)) {
$mannschaften[] = $sql9['name'];
}
shuffle($mannschaften);
foreach ($spielplan as $spieltag) {
foreach ($spieltag as $begegnung) {
$team1 = str_replace($platzhalter, $mannschaften, $begegnung[0]);
$team1 = mysql_real_escape_string($team1);
$team2 = str_replace($platzhalter, $mannschaften, $begegnung[1]);
$team2 = mysql_real_escape_string($team2);
$rein1 = "INSERT INTO " . $prefix . "spiele (liga, datum, team1, team2, typ, land) VALUES ('" . $liga_id . "', " . $counter . ", '" . $team1 . "', '" . $team2 . "', 'Liga', '" . $liga_land . "')";
$rein2 = mysql_query($rein1);
}
$counter = getTimestamp('+1 day', $counter);
}
}
开发者ID:FridgeProduction,项目名称:OpenSoccer,代码行数:31,代码来源:aa_spielplan_erstellen.php
示例16: MAX
</a></p>
<?php
// CHAT-SPERREN ANFANG
$blockCom1 = "SELECT MAX(chatSperre) FROM " . $prefix . "helferLog WHERE managerBestrafen = '" . $cookie_id . "'";
$blockCom2 = mysql_query($blockCom1);
if (mysql_num_rows($blockCom2) > 0) {
$blockCom3 = mysql_fetch_assoc($blockCom2);
$chatSperreBis = $blockCom3['MAX(chatSperre)'];
if ($chatSperreBis > 0 && $chatSperreBis > time()) {
addInfoBox(__('Du bist noch bis zum %1$s Uhr für die Kommunikation im Spiel gesperrt. Wenn Dir unklar ist warum, frage bitte das %2$s', date('d.m.Y H:i', $chatSperreBis), '<a class="inText" href="/wio.php">' . _('Support-Team') . '</a>'));
include 'zz3.php';
exit;
}
}
// CHAT-SPERREN ENDE
$timeout = getTimestamp('-1 day');
$sql1 = "SELECT COUNT(*) FROM " . $prefix . "supportRequests WHERE timeAdded > " . $timeout . " AND author = '" . $cookie_id . "'";
$sql2 = mysql_query($sql1);
$sql3 = mysql_result($sql2, 0);
if ($sql3 <= 5) {
?>
<form action="/support.php" method="post" accept-charset="utf-8">
<?php
if ($_SESSION['status'] == 'Admin' or $_SESSION['status'] == 'Helfer') {
?>
<p><label for="newVisibility"><?php
echo _('Wer soll die Anfrage sehen können?');
?>
</label><select name="visibility" id="newVisibility" size="1" style="width:200px">
<option value="0"><?php
echo _('Jeder User');
开发者ID:FridgeProduction,项目名称:OpenSoccer,代码行数:31,代码来源:supportAdd.php
示例17: strtoupper
$codguest = strtoupper(md5(getTimestamp() . $j . $_POST[$select_quarto_tipo]));
mysql_query("INSERT INTO `reservas_rel_guest`(`CODRESERVA`,`CODGUEST`,`REFERENCIA`)VAlUES('{$codreserva}','{$codguest}','{$i}')");
mysql_query("INSERT INTO `guest` (`CODGUEST`,`NOME`,`FAIXA_ETARIA`)VALUES('{$codguest}','" . $_POST[$quarto_text_name] . "','" . $_POST[$select_guest_faixa_etaria] . "')");
}
}
$nQuartos++;
}
}
$n_conhecimento = mysql_query("SELECT * FROM reservas");
(int) ($n = mysql_num_rows($n_conhecimento));
$n_conhecimento = $n + 1;
$n_conhecimento = compliteCod($n_conhecimento, $cod);
$codpessoa = strtoupper(md5(getTimestamp() . $codreserva));
$codlogin = strtoupper(md5(getTimestamp() . $codpessoa));
$codtelefone = strtoupper(md5(getTimestamp() . $codlogin));
$codvalor = strtoupper(md5(getTimestamp() . $codtelefone));
mysql_query("INSERT INTO `reservas_rel_valor` (`CODRESERVA`,`CODVALOR`)VALUES('{$codreserva}','{$codvalor}')");
mysql_query("INSERT INTO `valor` (`CODVALOR`,`ADULTO_PERC`,`ADULTO_PERC_MULT`,`ADULTO_VALOR`,`ADULTO_EXCEDENTE`,`CRIANCA_5_PERC`,`CRIANCA_5_PERC_MULT`,`CRIANCA_5_VALOR`,`CRIANCA_5_EXCEDENTE`,`CRIANCA_6A12_PERC`,`CRIANCA_6A12_PERC_MULT`,`CRIANCA_6A12_VALOR`,`CRIANCA_6A12_EXCEDENTE`,`CRIANCA_12_PERC`,`CRIANCA_12_PERC_MULT`,`CRIANCA_12_VALOR`,`CRIANCA_12_EXCEDENTE`,`VALOR_BRUTO`,`VALOR_DESC`,`VALOR_ACRESCIMO`,`ACRESCIMO_PERC`,`VALOR_SINAL`,`VALOR_TOTAL`,`FORMA_PGTO`,`PGTO_SINAL`,`PGTO_RESTANTE`,`STATUS`,`N_CONHECIMENTO`)VALUES('{$codvalor}','" . $_POST["ADULTO_PERC"] . "','" . $_POST["ADULTO_PERC_MULT"] . "','" . $_POST["ADULTO_VALOR"] . "','" . $_POST["ADULTO_EXCEDENTE"] . "','" . $_POST["CRIANCA_5_PERC"] . "','" . $_POST["CRIANCA_5_PERC_MULT"] . "','" . $_POST["CRIANCA_5_VALOR"] . "','" . $_POST["CRIANCA_5_EXCEDENTE"] . "','" . $_POST["CRIANCA_6A12_PERC"] . "','" . $_POST["CRIANCA_6A12_PERC_MULT"] . "','" . $_POST["CRIANCA_6A12_VALOR"] . "','" . $_POST["CRIANCA_6A12_EXCEDENTE"] . "','" . $_POST["CRIANCA_12_PERC"] . "','" . $_POST["CRIANCA_12_PERC_MULT"] . "','" . $_POST["CRIANCA_12_VALOR"] . "','" . $_POST["CRIANCA_12_EXCEDENTE"] . "','" . $_POST["VALOR_BRUTO"] . "','" . $_POST["VALOR_DESC"] . "','" . $_POST["VALOR_ACRESCIMO"] . "','" . $_POST["ACRESCIMO_PERC"] . "','" . $_POST["VALOR_SINAL"] . "','" . $_POST["VALOR_TOTAL"] . "','" . $_POST["FORMA_PGTO"] . "','" . $_POST["PGTO_SINAL"] . "','" . $_POST["PGTO_RESTANTE"] . "','0','" . $n_conhecimento . "')");
$login = $_POST["email"];
$senha = strtoupper(md5("12345"));
$existe_login = mysql_query("SELECT * FROM login WHERE LOGIN = '{$login}'");
if (mysql_num_rows($existe_login) == 0) {
mysql_query("INSERT INTO `reservas_rel_pessoa` (`CODRESERVA`,`CODPESSOA`)VALUES('{$codreserva}','{$codpessoa}')");
mysql_query("INSERT INTO `login` (`CODLOGIN`,`LOGIN`,`SENHA`,`PAPEL`,`STATUS`,`OWNER`) VALUES('{$codlogin}','{$login}','{$senha}','GUEST;','0','B4EC91ED6E6C92AC52099D19C0B1A40E')");
mysql_query("INSERT INTO `login_rel_pessoa`(`CODPESSOA`,`CODLOGIN`)VALUES('{$codpessoa}','{$codlogin}')");
mysql_query("INSERT INTO `pessoa` (`CODPESSOA`,`NOME`,`EMAIL`,`OWNER`) VALUES ('{$codpessoa}','" . $_POST["nome_empresa"] . "','" . $_POST["email"] . "','B4EC91ED6E6C92AC52099D19C0B1A40E')");
mysql_query("INSERT INTO `pessoa_rel_telefones` (`CODPESSOA`,`CODTELEFONE`)VALUES('{$codpessoa}','{$codtelefone}')");
mysql_query("INSERT INTO `telefones` (`CODTELEFONE`,`TELEFONE`,`STATUS`,`OWNER`)VALUES('{$codtelefone}','" . $_POST["telefone"] . "','1','B4EC91ED6E6C92AC52099D19C0B1A40E')");
} else {
$existe_login = mysql_fetch_object($existe_login);
$pessoa = mysql_query("SELECT pessoa.* FROM pessoa\r\t\t\tINNER JOIN login_rel_pessoa ON pessoa.CODPESSOA=login_rel_pessoa.CODPESSOA\r\t\t\tINNER JOIN login ON login_rel_pessoa.CODLOGIN=login.CODLOGIN\r\t\t\tWHERE login.CODLOGIN='{$existe_login->CODLOGIN}'");
开发者ID:patryckgratao,项目名称:projeto-maravista,代码行数:31,代码来源:gerenciar.reservas.externas.add.php
示例18: _
echo _('Nationaler Cup');
?>
</h1>
<p><?php
echo __('Für diesen Wettbewerb qualifizieren sich die 32 besten Teams aus %s, 16 davon durch ein Freilos. Von Liga 1 bis 4 - jeder hat die Chance auf den Cup-Sieg.', $temp_land);
?>
</p>
<p><?php
echo _('Es gibt eine Qualifikation und danach fünf Runden, die jeweils ausgelost werden. In einem KO-Spiel pro Runde ermitteln die Teams den Sieger, der dann die nächste Runde erreicht.');
?>
</p>
<?php
$temp = FALSE;
$tmp_dateiname = 'cache/cup_ergebnisse' . urlencode($temp_land) . '.html';
if (file_exists($tmp_dateiname)) {
if (filemtime($tmp_dateiname) > getTimestamp('+2 hours')) {
$tmp_liga_cache = file_get_contents($tmp_dateiname);
if (strlen($tmp_liga_cache) > 0) {
$ersatz_temp = '<strong>' . $cookie_teamname . '</strong>';
echo str_replace($cookie_teamname, $ersatz_temp, $tmp_liga_cache);
$temp = TRUE;
include 'zz3.php';
exit;
}
}
}
if ($temp == FALSE) {
$tmp_liga_cache = '';
// TEAM-IDS HOLEN ANFANG
$getteam1 = "SELECT ids, name, liga FROM " . $prefix . "teams WHERE cuprunde > 0";
$getteam2 = mysql_query($getteam1);
开发者ID:FridgeProduction,项目名称:OpenSoccer,代码行数:31,代码来源:cup.php
示例19: _
<th scope="col"><?php
echo _('Team');
?>
</th>
<th scope="col"><?php
echo _('Marktwert');
?>
</th>
</tr>
</thead>
<tbody>
<?php
$temp = FALSE;
$tmp_dateiname = 'cache/stat_wertvollste_teams' . $temp_liga . '.html';
if (file_exists($tmp_dateiname)) {
if (filemtime($tmp_dateiname) > getTimestamp('-1 day')) {
$tmp_liga_cache = file_get_contents($tmp_dateiname);
if (strlen($tmp_liga_cache) > 0) {
$ersatz_temp = '<strong>' . $cookie_teamname . '</strong>';
echo str_replace($cookie_teamname, $ersatz_temp, $tmp_liga_cache);
$temp = TRUE;
}
}
}
if ($temp == FALSE) {
$tmp_liga_cache = '';
$sql1 = "SELECT a.ids, a.name, SUM(b.marktwert) AS teamwert FROM " . $prefix . "teams AS a JOIN " . $prefix . "spieler AS b ON a.ids = b.team WHERE a.staerke > 1" . $temp_liga_query . " GROUP BY b.team ORDER BY teamwert DESC LIMIT 0, 20";
$sql2 = mysql_query($sql1);
$counter = 1;
while ($sql3 = mysql_fetch_assoc($sql2)) {
if ($counter % 2 == 1) {
开发者ID:FridgeProduction,项目名称:OpenSoccer,代码行数:31,代码来源:stat_wertvollste_teams.php
示例20: acessoDireto
<?php
acessoDireto("ADMINISTRADOR;");
$erro = "";
if (!empty($_POST) && isset($_POST['ACTION'])) {
$coddica = strtoupper(md5(getTimestamp()));
$ingles = trim(htmlentities(tratapost($_POST['ingles'])));
$espanhol = trim(htmlentities(tratapost($_POST['espanhol'])));
$portugues = trim(htmlentities(tratapost($_POST['portugues'])));
$ingles = str_replace("'", '‘', $ingles);
$espanhol = str_replace("'", '‘', $espanhol);
$portugues = str_replace("'", '‘', $portugues);
$status = trim(tratapost($_POST['status']));
$status == 'on' ? $status = 1 : ($status = 0);
mysql_query("INSERT INTO `dicas` (`CODDICA`,`INGLES`,`PORTUGUES`,`ESPANHOL`,`OWNER`,`STATUS`) VALUES('{$coddica}','{$ingles}','{$portugues}','{$espanhol}','" . $_SESSION['CODPESSOA'] . "','{$status}')");
echo "<script>alert('* " . getLabel('LABEL_ADD_SUCESSO_LABEL', $_SESSION['LANGUAGE']) . "!')</script>";
echo "<script>window.location = 'index.php?actionType=gerenciar.dicas';</script>";
exit;
} else {
$erro = getLabel('ERRO_PREENCHER_TODOS_CAMPOS', $_SESSION['LANGUAGE']);
}
$pi = "<form name='formCpf' method='post' action='index.php?actionType=gerenciar.dicas.add'>";
$pi .= "<div class='ErroMessage'>* {$erro}!</div>";
$pi .= "<br/>";
$pi .= "<div style='margin-bottom: 3px;'></div>";
$pi .= "<div style='margin-bottom: 3px;'></div>";
$pi .= "<div class='EntradaTextForm'>";
if (!empty($_POST) && isset($_POST['ACTION'])) {
$pi .= "<input class='LiloginText' class='LiloginText' style='width: 250px' type='text' id='ingles' name='ingles' value='" . $_POST['ingles'] . "' maxleng
|
请发表评论