本文整理汇总了PHP中getEntry函数的典型用法代码示例。如果您正苦于以下问题:PHP getEntry函数的具体用法?PHP getEntry怎么用?PHP getEntry使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getEntry函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getRoomEventList
function getRoomEventList(array $rooms, $start, $end)
{
$entries = array();
$timed_entries = array();
foreach ($rooms as $room) {
$events_room = checktime_Room($start, $end, $room['area_id'], $room['room_id']);
if (isset($events_room[$room['room_id']])) {
foreach ($events_room[$room['room_id']] as $entry_id) {
$event = getEntry($entry_id);
if (count($event)) {
$a = '';
if ($event['time_start'] < $start) {
$a .= __('started') . ' ' . date('H:i d-m-Y', $event['time_start']);
$event['time_start'] = $start;
}
if ($event['time_end'] > $end) {
if ($a != '') {
$a .= ', ';
}
$a .= 'slutter ' . date('H:i d-m-Y', $event['time_end']);
$event['time_end'] = $end;
}
if ($a != '') {
$event['entry_name'] .= ' (' . $a . ')';
}
$timed_entries[$event['time_start']][$event['entry_id']] = $event['entry_id'];
$entries[$event['entry_id']] = $event;
}
}
}
}
return array('timedEntries' => $timed_entries, 'allEntries' => $entries);
}
开发者ID:hnJaermuseet,项目名称:JM-booking,代码行数:33,代码来源:roomlist.php
示例2: updateEntry
function updateEntry($hash, $editor_hash, $text, $title, $description)
{
$db = connectDB();
$query = "\nUPDATE " . DB_TABLE . "\nSET text_content = :text ,\n\ttitle = :title ,\n\tdescription = :desc ,\n\tdate_edited = CURRENT_TIMESTAMP\nWHERE hash = :hash \nAND editor_hash = :ehash ";
$params = array(":hash" => $hash, ":ehash" => $editor_hash, ":text" => $text, ":title" => $title, ":desc" => $description);
$rowCount = execute($db, $query, $params);
close($db);
if ($rowCount > 0) {
return getEntry($hash);
} else {
return null;
}
}
开发者ID:Klazen108,项目名称:gm_fiddle,代码行数:13,代码来源:dbinc.php
示例3: getPage
function getPage($page)
{
$entries = scandir("data");
array_pop($entries);
natsort($entries);
$entries = array_reverse($entries);
$entries = array_values($entries);
$pageOfEntries = array_slice($entries, $page * 25, 25);
$body = "";
foreach ($pageOfEntries as $entry) {
if ($entry = getEntry($entry)) {
$body .= "{$entry} <hr />";
}
}
return $body;
}
开发者ID:Voker57,项目名称:gshare,代码行数:16,代码来源:gshare.php
示例4: getEntries
function getEntries($type = Null, $limit = Null)
{
$entries = array();
$dir = opendir(ENTRIES_DIRECTORY);
$count = 0;
while ($entryFile = readdir($dir)) {
if ($entryFile[0] == '.') {
//Dont show hidden files
continue;
}
$entryName = str_replace('.php', Null, $entryFile);
$entry = getEntry($entryName);
if ($type && $entry->type != $type) {
continue;
}
$entries[$entry->date] = $entry;
$count++;
}
krsort($entries);
if ($limit) {
$entries = array_slice($entries, 0, $limit, True);
}
return $entries;
}
开发者ID:danialbehzadi,项目名称:tehlug,代码行数:24,代码来源:functions.php
示例5: requireModel
<?php
/// Copyright (c) 2004-2012, Needlworks / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
require ROOT . '/library/preprocessor.php';
requireModel('blog.entry');
requireModel('blog.response.remote');
requireModel('blog.sidebar');
define('__TEXTCUBE_NO_ENTRY_CACHE__', true);
$entries = array();
if (is_null($entry = getEntry($blogid, $suri['id'], true))) {
$entry = getEntry($blogid, $suri['id'], false);
}
if (!is_null($entry)) {
if (isset($entry['appointed'])) {
$entry['published'] = $entry['appointed'];
}
if (isset($entry['category']) && $entry['category'] >= 0) {
$entry['categoryLabel'] = getCategoryLabelById($blogid, $entry['category']);
}
$entries[0] = $entry;
}
unset($entry);
require ROOT . '/interface/common/blog/begin.php';
require ROOT . '/interface/common/blog/entries.php';
$pageTitle = _t('미리보기') . ' - ' . $pageTitle;
require ROOT . '/interface/common/blog/end.php';
开发者ID:ragi79,项目名称:Textcube,代码行数:28,代码来源:index.php
示例6: chr
'BEGIN:STANDARD'.chr(10).
'DTSTART:16011028T030000'.chr(10).
'RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10'.chr(10).
'TZOFFSETFROM:+0200'.chr(10).
'TZOFFSETTO:+0100'.chr(10).
'END:STANDARD'.chr(10).
'BEGIN:DAYLIGHT'.chr(10).
'DTSTART:16010325T020000'.chr(10).
'RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3'.chr(10).
'TZOFFSETFROM:+0100'.chr(10).
'TZOFFSETTO:+0200'.chr(10).
'END:DAYLIGHT'.chr(10).
'END:VTIMEZONE'.chr(10);*/
echo 'BEGIN:VTIMEZONE' . chr(10) . 'TZID:Europe/Oslo' . chr(10) . 'BEGIN:DAYLIGHT' . chr(10) . 'TZOFFSETFROM:+0100' . chr(10) . 'TZOFFSETTO:+0200' . chr(10) . 'DTSTART:19810329T020000' . chr(10) . 'RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU' . chr(10) . 'TZNAME:CEST' . chr(10) . 'END:DAYLIGHT' . chr(10) . 'BEGIN:STANDARD' . chr(10) . 'TZOFFSETFROM:+0200' . chr(10) . 'TZOFFSETTO:+0100' . chr(10) . 'DTSTART:19961027T030000' . chr(10) . 'RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU' . chr(10) . 'TZNAME:CET' . chr(10) . 'END:STANDARD' . chr(10) . 'END:VTIMEZONE' . chr(10);
$entryObj = new EntryTemplate();
while ($R = mysql_fetch_assoc($Q)) {
$entry_array = getEntry($R['entry_id']);
templateAssignEntry('entryObj', $entry_array);
echo 'BEGIN:VEVENT' . chr(10) . 'SEQUENCE:' . $entryObj->rev_num . chr(10) . 'TRANSP:TRANSPARENT' . chr(10) . 'UID:JMBOOKING-' . $entryObj->entry_id . '-' . time() . chr(10) . 'DTSTART;TZID=Europe/Oslo:' . date('Ymd', $entryObj->time_start) . 'T' . date('His', $entryObj->time_start) . chr(10) . 'DTEND;TZID=Europe/Oslo:' . date('Ymd', $entryObj->time_end) . 'T' . date('His', $entryObj->time_end) . chr(10) . 'CREATED;TZID=Europe/Oslo:' . date('Ymd', $entryObj->time_created) . 'T' . date('His', $entryObj->time_created) . chr(10) . 'DTSTAMP;TZID=Europe/Oslo:' . date('Ymd') . 'T' . date('His') . chr(10);
//echo date('Y-m-d H:i', strtotime('2008-10-09 08:55 GMT'));
/*
$days =
echo 'DURATION:P0DT0H0M'.($entryObj->time_end - $entryObj->time_start).chr(10);
*/
echo 'SUMMARY:' . utf8_encode(htmlspecialchars_decode($entryObj->entry_name, ENT_QUOTES)) . chr(10) . 'DESCRIPTION:' . $systemurl . '/entry.php?entry_id=' . $entryObj->entry_id . ' \\n' . utf8_encode('BID: ' . $entryObj->entry_id) . '\\n' . utf8_encode('Type: ' . $entryObj->entry_type) . '\\n' . utf8_encode('Kunde: ' . $entryObj->customer_name) . '\\n' . utf8_encode('Vert(er): ' . $entryObj->user_assigned_names) . '\\n' . utf8_encode('Antall voksne: ' . $entryObj->num_person_adult) . '\\n' . utf8_encode('Antall barn: ' . $entryObj->num_person_child) . '\\n';
if ($entryObj->program_id_name != '') {
echo utf8_encode('Fast program: ' . $entryObj->program_id_name) . '\\n';
}
echo '\\n' . utf8_encode('Programbeskrivelse:\\n' . str_replace("\n", '\\n', str_replace("\r", '', htmlspecialchars_decode($entryObj->program_description, ENT_QUOTES)))) . '\\n' . chr(10) . 'LOCATION:' . utf8_encode(implode(', ', $entryObj->rooms)) . ' (' . $entryObj->area . ')' . chr(10) . 'END:VEVENT' . chr(10);
}
echo 'END:VCALENDAR' . chr(10);
开发者ID:HNygard,项目名称:JM-booking,代码行数:31,代码来源:entry_ical.php
示例7: mysql_query
$Q_next_entries = mysql_query($SQL);
if (!mysql_num_rows($Q_next_entries)) {
echo '<i>Ingen</i>' . chr(10);
} else {
echo '<span style="color:green">Flyttes til kunde 1:</span><br>';
echo '<table style="border-collapse: collapse;">' . chr(10);
echo ' <tr>' . chr(10);
echo ' <td class="border"><b>' . _('Starts') . '</b></td>' . chr(10);
echo ' <td class="border"><b>' . _('Name') . '</b></td>' . chr(10);
echo ' <td class="border"><b>' . _('Where') . '</b></td>' . chr(10);
echo ' <td class="border"><b>' . _('Contact person') . '</b></td>' . chr(10);
echo ' <td class="border"><b>' . _('Phone') . '</b></td>' . chr(10);
echo ' <td class="border"><b>' . _('E-mail') . '</b></td>' . chr(10);
echo ' </tr>' . chr(10);
while ($R_entry = mysql_fetch_assoc($Q_next_entries)) {
$entry = getEntry($R_entry['entry_id']);
if (count($entry)) {
echo ' <tr>' . chr(10);
echo ' <td class="border"><b>' . date('d-m-Y H:i', $entry['time_start']) . '</b></td>' . chr(10);
echo ' <td class="border"><a href="entry.php?entry_id=' . $entry['entry_id'] . '">' . $entry['entry_name'] . '</a></td>' . chr(10);
echo ' <td class="border">';
$area = getArea($entry['area_id']);
if (count($area)) {
echo $area['area_name'] . ' - ';
}
$rooms = array();
foreach ($entry['room_id'] as $rid) {
if ($rid == '0') {
$rooms[] = _('Whole area');
} else {
$room = getRoom($rid);
开发者ID:HNygard,项目名称:JM-booking,代码行数:31,代码来源:admin_customer_merge.php
示例8: bookingsystemet
}
if (count($_GET['entry_id']) > 50) {
$section = 'tobemade_ready';
include "include/invoice_menu.php";
echo '<div class="error">Du forsøker å sende mer enn 50 bookinger til regnskap på likt. ' . 'Dette blir sannsynligvis for mye for bookingsystemet (klarer ikke så mange i en PDF), så forsøket er blitt stoppet.<br /><br />' . 'Velg et mindre antall og forsøk igjen.</div>';
exit;
}
$ignore_errors = false;
if (isset($_GET['ignore_errors']) && $_GET['ignore_errors'] == '1') {
$ignore_errors = true;
}
$entry_errors = false;
$entries = array();
$entry_ids_url = array();
foreach ($_GET['entry_id'] as $id) {
$tmp_entry = getEntry($id);
$id = $tmp_entry['entry_id'];
$entries[$id] = $tmp_entry;
$entry_ids_url[] = 'entry_id[]=' . $id;
$checkInvoice = checkInvoicedata($tmp_entry);
if (count($checkInvoice[0]) && !$ignore_errors) {
if (!$entry_errors) {
$section = 'tobemade_ready';
include "include/invoice_menu.php";
$entry_errors = true;
echo '<span class="hiddenprint">';
$Q_area = mysql_query("select id as area_id, area_name from mrbs_area order by area_name");
$num_area = mysql_num_rows($Q_area);
$counter_area = 0;
echo '<span style="font-size: 0.8em;">Filtrer på anlegg: ';
while ($R = mysql_fetch_assoc($Q_area)) {
开发者ID:hnJaermuseet,项目名称:JM-booking,代码行数:31,代码来源:invoice_export.php
示例9: array
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
include_once "glob_inc.inc.php";
if (!isset($_GET['confirm_id'])) {
$confirm = array();
} else {
$confirm = getConfirm($_GET['confirm_id']);
}
if (!count($confirm)) {
print_header($day, $month, $year, $area);
echo '<h1>' . _('Confirmation') . '</h1>' . chr(10);
echo _('Can not find confirmation from the confirmation ID you gave.');
exit;
}
$entry = getEntry($confirm['entry_id']);
if (!count($entry)) {
print_header($day, $month, $year, $area);
echo '<h1>' . _('Confirmation') . '</h1>' . chr(10);
echo _('Error.');
exit;
}
$user = getUser($confirm['user_id']);
if (!count($user)) {
print_header($day, $month, $year, $area);
echo '<h1>' . _('Confirmation') . '</h1>' . chr(10);
echo _('Error.');
exit;
}
print_header($day, $month, $year, $area);
echo '<h1>' . _('Confirmation') . ', ' . $entry['entry_name'] . '</h1>' . chr(10);
开发者ID:HNygard,项目名称:JM-booking,代码行数:31,代码来源:entry_confirm_view.php
示例10: chr
$vare->addChild('vare_id', '5');
$vare->addChild('tid', $entry['time_start']);
$vare->addChild('antall', $entry['num_person_child']);
}
if($entry['num_person_adult'] > 0)
{
$vare = $varer->addChild($entry['entry_id'].'_voksen');
$vare->addChild('vare_id', '6');
$vare->addChild('tid', $entry['time_start']);
$vare->addChild('antall', $entry['num_person_adult']);
}
}*/
$xml = '<?xml version="1.0" standalone="yes"?>' . chr(10);
$xml .= '<varer area="6" area_name="Vitenfabrikken">' . chr(10);
while ($R = mysql_fetch_assoc($Q)) {
$entry = getEntry($R['entry_id']);
if ($entry['num_person_child'] > 0) {
$xml .= ' <vare from="' . $entry['entry_id'] . '_barn">' . chr(10);
$xml .= ' <vareid>5</vareid>' . chr(10);
$xml .= ' <tid>' . $entry['time_start'] . '</tid>' . chr(10);
$xml .= ' <antall>' . $entry['num_person_child'] . '</antall>' . chr(10);
$xml .= ' </vare>' . chr(10);
}
if ($entry['num_person_adult'] > 0) {
$xml .= ' <vare from="' . $entry['entry_id'] . '_voksen">' . chr(10);
$xml .= ' <vareid>6</vareid>' . chr(10);
$xml .= ' <tid>' . $entry['time_start'] . '</tid>' . chr(10);
$xml .= ' <antall>' . $entry['num_person_adult'] . '</antall>' . chr(10);
$xml .= ' </vare>' . chr(10);
}
}
开发者ID:hnJaermuseet,项目名称:JM-booking,代码行数:31,代码来源:export_xml.php
示例11: sendTrackback
function sendTrackback($blogid, $entryId, $url)
{
global $defaultURL, $blog;
requireModel('blog.entry');
requireModel('blog.keyword');
$entry = getEntry($blogid, $entryId);
if (is_null($entry)) {
return false;
}
$link = "{$defaultURL}/{$entryId}";
$title = htmlspecialchars($entry['title']);
$entry['content'] = getEntryContentView($blogid, $entryId, $entry['content'], $entry['contentformatter'], getKeywordNames($blogid));
$excerpt = str_tag_on(UTF8::lessen(removeAllTags(stripHTML($entry['content'])), 255));
$blogTitle = $blog['title'];
$isNeedConvert = strpos($url, '/rserver.php?') !== false || strpos($url, 'blog.naver.com/tb') !== false || strpos($url, 'news.naver.com/tb/') !== false || strpos($url, 'blog.empas.com') !== false || strpos($url, 'blog.yahoo.com') !== false || strpos($url, 'www.blogin.com/tb/') !== false || strpos($url, 'cytb.cyworld.nate.com') !== false || strpos($url, 'www.cine21.com/Movies/tb.php') !== false;
if ($isNeedConvert) {
$title = UTF8::convert($title, 'EUC-KR');
$excerpt = UTF8::convert($excerpt, 'EUC-KR');
$blogTitle = UTF8::convert($blogTitle, 'EUC-KR');
$content = "url=" . rawurlencode($link) . "&title=" . rawurlencode($title) . "&blog_name=" . rawurlencode($blogTitle) . "&excerpt=" . rawurlencode($excerpt);
$request = new HTTPRequest('POST', $url);
$request->contentType = 'application/x-www-form-urlencoded; charset=euc-kr';
$isSuccess = $request->send($content);
} else {
$content = "url=" . rawurlencode($link) . "&title=" . rawurlencode($title) . "&blog_name=" . rawurlencode($blogTitle) . "&excerpt=" . rawurlencode($excerpt);
$request = new HTTPRequest('POST', $url);
$request->contentType = 'application/x-www-form-urlencoded; charset=utf-8';
$isSuccess = $request->send($content);
}
if ($isSuccess && checkResponseXML($request->responseText) === 0) {
// $url = POD::escapeString(UTF8::lessenAsEncoding($url, 255));
$trackbacklog = new TrackbackLog();
$trackbacklog->entry = $entryId;
$trackbacklog->url = POD::escapeString(UTF8::lessenAsEncoding($url, 255));
$trackbacklog->add();
// POD::query("INSERT INTO {$database['prefix']}TrackbackLogs VALUES ($blogid, '', $entryId, '$url', UNIX_TIMESTAMP())");
return true;
}
return false;
}
开发者ID:hinablue,项目名称:TextCube,代码行数:40,代码来源:blog.response.remote.php
示例12: getDefaultCenterPanel
//.........这里部分代码省略.........
array_push($recents, array('title' => $trackback['subject'], 'date' => $trackback['written'], 'link' => $ctx->getProperty('uri.blog') . "/" . $trackback['entry'] . "#trackback" . $trackback['id'], 'category' => 'trackback'));
}
$sort_array = array();
foreach ($recents as $uniqid => $row) {
// Sorting.
foreach ($row as $key => $value) {
if (!array_key_exists($key, $sort_array)) {
$sort_array[$key] = array();
}
$sort_array[$key][$uniqid] = $value;
}
}
if (!empty($sort_array)) {
array_multisort($sort_array['date'], SORT_DESC, $recents);
}
$recents = array_slice($recents, 0, 14);
?>
<div id="shortcut-collection">
<h4 class="caption"><span><?php
echo _t('바로가기');
?>
</span></h4>
<ul>
<li class="newPost"><a class="newPost" href="<?php
echo $ctx->getProperty('uri.blog');
?>
/owner/entry/post"><span><?php
echo _t('새 글 쓰기');
?>
</span></a></li>
<?php
if ($latestEntryId !== 0) {
$latestEntry = getEntry($blogid, $latestEntryId);
if (!is_null($latestEntry)) {
?>
<li class="modifyPost"><a href="<?php
echo $ctx->getProperty('uri.blog');
?>
/owner/entry/edit/<?php
echo $latestEntry['id'];
?>
"><?php
echo _f('최근글(%1) 수정', htmlspecialchars(Utils_Unicode::lessenAsEm($latestEntry['title'], 10)));
?>
</a></li>
<?php
}
}
if ($ctx->getProperty('service.reader') == true) {
?>
<li class="rssReader"><a href="<?php
echo $ctx->getProperty('uri.blog');
?>
/owner/network/reader"><?php
echo _t('RSS로 등록한 이웃 글 보기');
?>
</a></li>
<?php
}
if (Acl::check("group.administrators")) {
?>
<li class="deleteCache"><a href="<?php
echo $ctx->getProperty('uri.blog');
?>
/owner/center/dashboard/cleanup" onclick="cleanupCache();return false;"><?php
开发者ID:webhacking,项目名称:Textcube,代码行数:67,代码来源:index.php
示例13: sendTrackback
function sendTrackback($blogid, $entryId, $url)
{
importlib('model.blog.entry');
importlib('model.blog.keyword');
$context = Model_Context::getInstance();
$entry = getEntry($blogid, $entryId);
if (is_null($entry)) {
return false;
}
$link = $context->getProperty('uri.default') . "/" . $entryId;
$title = htmlspecialchars($entry['title']);
$entry['content'] = getEntryContentView($blogid, $entryId, $entry['content'], $entry['contentformatter'], getKeywordNames($blogid));
$excerpt = str_tag_on(Utils_Unicode::lessen(removeAllTags(stripHTML($entry['content'])), 255));
$blogTitle = $context->getProperty('blog.title');
$isNeedConvert = strpos($url, '/rserver.php?') !== false || strpos($url, 'blog.naver.com/tb') !== false || strpos($url, 'news.naver.com/tb/') !== false || strpos($url, 'blog.empas.com') !== false || strpos($url, 'blog.yahoo.com') !== false || strpos($url, 'www.blogin.com/tb/') !== false || strpos($url, 'cytb.cyworld.nate.com') !== false || strpos($url, 'www.cine21.com/Movies/tb.php') !== false;
if ($isNeedConvert) {
$title = Utils_Unicode::convert($title, 'EUC-KR');
$excerpt = Utils_Unicode::convert($excerpt, 'EUC-KR');
$blogTitle = Utils_Unicode::convert($blogTitle, 'EUC-KR');
$content = "url=" . rawurlencode($link) . "&title=" . rawurlencode($title) . "&blog_name=" . rawurlencode($blogTitle) . "&excerpt=" . rawurlencode($excerpt);
$request = new HTTPRequest('POST', $url);
$request->contentType = 'application/x-www-form-urlencoded; charset=euc-kr';
$isSuccess = $request->send($content);
} else {
$content = "url=" . rawurlencode($link) . "&title=" . rawurlencode($title) . "&blog_name=" . rawurlencode($blogTitle) . "&excerpt=" . rawurlencode($excerpt);
$request = new HTTPRequest('POST', $url);
$request->contentType = 'application/x-www-form-urlencoded; charset=utf-8';
$isSuccess = $request->send($content);
}
if ($isSuccess && checkResponseXML($request->responseText) === 0) {
$trackbacklog = new TrackbackLog();
$trackbacklog->entry = $entryId;
$trackbacklog->url = Utils_Unicode::lessenAsEncoding($url, 255);
$trackbacklog->add();
return true;
}
return false;
}
开发者ID:webhacking,项目名称:Textcube,代码行数:38,代码来源:remoteresponse.php
示例14: array_values
$method = "create";
} else {
if (isset($_POST['update'])) {
$method = "update";
}
}
}
}
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
//split request URI, remove empty elements, and rebase array to 0
$arr = array_values(array_filter(split("/", $_SERVER['REQUEST_URI'])));
$arr_size = count($arr);
if ($arr_size >= 2 && $arr[$arr_size - 2] === 'gm') {
//gm & hash
$hash = $arr[$arr_size - 1];
$entry = getEntry($hash);
$input = $entry->getTextContent();
$title = $entry->getTitle();
$desc = $entry->getDescription();
$method = "display";
} else {
if ($arr_size >= 2 && $arr[$arr_size - 3] === 'gm') {
//gm & hash & editor hash
$hash = $arr[$arr_size - 2];
$editor_hash = $arr[$arr_size - 1];
$entry = getEntryForEdit($hash, $editor_hash);
$input = $entry->getTextContent();
$title = $entry->getTitle();
$desc = $entry->getDescription();
$method = "edit";
}
开发者ID:Klazen108,项目名称:gm_fiddle,代码行数:31,代码来源:index.php
示例15: array
<?php
/// Copyright (c) 2004-2012, Needlworks / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
$IV = array('POST' => array('templateId' => array('int', 'default' => 0), 'isSaved' => array('bool', 'default' => false), 'entryId' => array('int', 'default' => 0)));
require ROOT . '/library/preprocessor.php';
requireModel('blog.entry');
requireStrictRoute();
if (!is_null($entry = getEntry($blogid, $_POST['templateId']))) {
if (!$_POST['isSaved']) {
$entry['category'] = 0;
$entry['visibility'] = 0;
$entry['published'] = 'UNIX_TIMESTAMP()';
$id = addEntry($blogid, $entry);
} else {
if ($_POST['entryId'] == 0) {
Respond::ResultPage(1);
}
$id = $_POST['entryId'];
}
// Delete original attachments.
deleteAttachments($blogid, $id);
if (copyAttachments($blogid, $_POST['templateId'], $id) === true) {
$result = array("error" => "0", "title" => $entry['title'], "content" => $entry['content'], "entryId" => $id);
Respond::PrintResult($result);
}
}
Respond::ResultPage(1);
开发者ID:ragi79,项目名称:Textcube,代码行数:29,代码来源:index.php
示例16: redir
if ($num = postNewEntry($_POST['uri'], $_POST['title'], $_POST['desc'])) {
redir("/?e={$num}");
}
} else {
$page = "Something's not right";
}
} elseif (int_esc($_GET['p'])) {
$page = getPage($_GET['p']);
if (getPagesCount() > $_GET['p']) {
$nextpage = "| <a href='{$r}/?p='" . ($_GET['p'] + 1) . "'>25 older entries »</a>";
}
if ($_GET['p'] > 0) {
$prevpage = "<a href='{$r}/?p='" . ($_GET['p'] - 1) . "'>«25 newer entries</a> |";
}
} elseif (int_esc($_GET['e'])) {
$page = getEntry($_GET['e']) . getComments($_GET['e']) . "\n\t<form action='{$r}/?ac={$_GET['e']}' method='post'>\n\t<fieldset>\n\t<label for='name'>Your name:</label> <input type='text' name='name' id='name' size='20' /> <br />\n\t<label for='text'>Comment: (<a href='http://textile.thresholdstate.com/'>textile</a> enabled):</label> <textarea name='text' id='text' rows='10' cols='40'></textarea> <br />\n\t<input type='submit' value='Submit' />\n\t</fieldset>\n\t</form>";
} else {
$page = "<h1> Post new link </h1>\n\t<form action='{$r}/?a=new-uri' method='post'>\n\t<fieldset>\n\t<label for='uri'>gnunet:// URI:</label> <input type='text' name='uri' id='uri' size='50' /> <br />\n\t<label for='title'>Link title:</label> <input type='text' name='title' id='title' size='50' /> <br />\n\t<label for='desc'>Description (<a href='http://textile.thresholdstate.com/'>textile</a> enabled):</label> <textarea name='desc' id='desc' rows='10' cols='40'></textarea> <br />\n\t<input type='submit' value='Submit' />\n\t</fieldset>\n\t</form>";
$page .= getPage(0);
}
if (!$_COOKIE['style'] || !file_exists("styles/{$_COOKIE['style']}")) {
$_COOKIE['style'] = 'dark.css';
}
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n <html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>\n <head> <title>GNUnet file sharing v2</title>\n <link href='{$r}/styles/{$_COOKIE['style']}' rel='stylesheet' type='text/css' />\n <meta http-equiv='Content-Type' content='text/xhtml;charset=utf-8' />\n </head>\n <body>\n <p>{$prevpage} <a href='{$r}/'>Main page</a> {$nextpage}</p>\n {$page}\n <p>Style: ";
$styles = scandir("styles");
array_shift($styles);
array_shift($styles);
foreach ($styles as $style) {
echo "<a href='{$r}/?ss={$style}'>{$style}</a> ";
}
echo "</p>\n </body>\n </html>";
开发者ID:Voker57,项目名称:gshare,代码行数:31,代码来源:index.php
示例17: exchangesync_analyzeSync
function exchangesync_analyzeSync($entries, $cal_ids, $cal, $user, $user_id)
{
global $alert_admin, $alerts;
global $systemurl;
global $sync, $entryObj, $entries_sync;
global $area;
foreach ($entries as $entry) {
// Checking for previous sync
if (isset($sync[$entry['entry_id']])) {
// Okey, this entry has been synced to this user before
// Check if it is deleted in Exchange
$this_sync = $sync[$entry['entry_id']];
if (!isset($cal_ids[$this_sync['exchange_id']])) {
// So, the user or somebody has deleted the element in Exchange
printout('Err! Calendar element for entry ' . $entry['entry_id'] . ' is deleted in Exchange! Alerting user and creates a new one.');
$entry_sync = true;
// Deleting from sync, this will keep the changed appointment in the users Exchange calendar but also create a new one
mysql_query("DELETE FROM `entry_exchangesync`\n\t\t\t\t\tWHERE\n\t\t\t\t\t\t`exchange_id` = '" . $this_sync['exchange_id'] . "'\n\t\t\t\t\t");
printout_mysqlerror();
// Alert user
emailSend($user_id, 'Slettet avtale i kalender', exchangesync_getUsermsgDeleted($entry));
// Alert admin
$alert_admin = true;
$alerts[] = 'User ' . $user_id . ' has deleted a calendar item.';
} else {
// Check if it is changed in Exchange
if ($cal_ids[$this_sync['exchange_id']] != $this_sync['exchange_changekey']) {
// So, the user or something has changed the element in Exchange
printout('Err! Calendar element for entry ' . $entry['entry_id'] . ' is changed in Exchange! Alerting user and creates a new one.');
$entry_sync = true;
// Deleting from sync, this will keep the changed appointment in the users Exchange calendar but also create a new one
mysql_query("DELETE FROM `entry_exchangesync`\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t`exchange_id` = '" . $this_sync['exchange_id'] . "'\n\t\t\t\t\t\t");
printout_mysqlerror();
// Alert user
emailSend($user_id, 'Endret avtale i kalender', exchangesync_getUsermsgChanged($entry));
// Alert admin
$alert_admin = true;
$alerts[] = 'User ' . $user_id . ' has edited a calendar item.';
} else {
// Okey, no changes in Exchange
// Is there anything changed in JM-booking?
// TODO: Is it possible to only check relevant fields?
if ($this_sync['entry_rev'] < $entry['rev_num']) {
// Create a new calendar element and delete the old one
// (no updates)
$entry_sync = true;
} else {
// No changes anywhere, do nothing
$entry_sync = false;
}
}
}
} else {
// Not synced in this period of time before
// => check the others too
$entry_sync = true;
}
/*
*/
if ($entry_sync) {
$entries_sync[$entry['entry_id']] = getEntry($entry['entry_id']);
}
unset($entry_sync);
unset($sync[$entry['entry_id']]);
}
}
开发者ID:hnJaermuseet,项目名称:JM-booking,代码行数:66,代码来源:exchangesync.php
示例18: define
<?php
/// Copyright (c) 2004-2011, Needlworks / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
define('__TEXTCUBE_MOBILE__', true);
$IV = array('POST' => array('password' => array('string', 'default' => null)));
require ROOT . '/library/preprocessor.php';
requireView('mobileView');
$entry = getEntry($blogid, $suri['id']);
if (!is_null($entry) && isset($_POST['password']) && $entry['password'] == $_POST['password']) {
setcookie('GUEST_PASSWORD', $_POST['password'], time() + 86400, "{$blogURL}/");
header("Location: {$blogURL}/{$suri['id']}");
} else {
printMobileErrorPage(_text('비밀번호 확인'), _text('패스워드가 틀렸습니다.'), "{$blogURL}/{$suri['id']}");
}
开发者ID:hinablue,项目名称:TextCube,代码行数:16,代码来源:index.php
示例19: publishEntries
function publishEntries()
{
global $database;
$blogid = getBlogId();
$closestReservedTime = Setting::getBlogSettingGlobal('closestReservedPostTime', INT_MAX);
if ($closestReservedTime < Timestamp::getUNIXtime()) {
$entries = POD::queryAll("SELECT id, visibility, category\n\t\t\tFROM {$database['prefix']}Entries \n\t\t\tWHERE blogid = {$blogid} AND draft = 0 AND visibility < 0 AND published < UNIX_TIMESTAMP()");
if (count($entries) == 0) {
return;
}
foreach ($entries as $entry) {
$result = POD::query("UPDATE {$database['prefix']}Entries \n\t\t\t\tSET visibility = 0 \n\t\t\t\tWHERE blogid = {$blogid} AND id = {$entry['id']} AND draft = 0");
if ($entry['visibility'] == -3) {
if ($result && setEntryVisibility($entry['id'], 2)) {
$updatedEntry = getEntry($blogid, $entry['id']);
if (!is_null($updatedEntry)) {
fireEvent('UpdatePost', $entry['id'], $updatedEntry);
setEntryVisibility($entry['id'], 3);
}
}
} else {
if ($result) {
setEntryVisibility($entry['id'], abs($entry['visibility']));
$updatedEntry = getEntry($blogid, $entry['id']);
if (!is_null($updatedEntry)) {
fireEvent('UpdatePost', $entry['id'], $updatedEntry);
}
}
}
}
$newClosestTime = POD::queryCell("SELECT min(published)\n\t\t\tFROM {$database['prefix']}Entries\n\t\t\tWHERE blogid = {$blogid} AND draft = 0 AND visibility < 0 AND published > UNIX_TIMESTAMP()");
if (!empty($newClosestTime)) {
Setting::setBlogSettingGlobal('closestReservedPostTime', $newClosestTime);
} else {
Setting::setBlogSettingGlobal('closestReservedPostTime', INT_MAX);
}
}
}
开发者ID:hinablue,项目名称:TextCube,代码行数:38,代码来源:blog.entry.php
示例20: date
}
echo date('d.m.Y', $start);
echo '</title></head>';
echo '<body background="img/infoskjerm-bg.png" style="margin: 0px; padding: 0px;">' . chr(10);
$Q_room = mysql_query("select id as room_id, room_name from `mrbs_room` where area_id = '" . $area . "' and hidden = 'false'");
$rooms = array();
while ($R_room = mysql_fetch_assoc($Q_room)) {
$rooms[$R_room['room_id']] = $R_room['room_name'];
}
$entries = array();
$timed_entries = array();
foreach ($rooms as $room_id => $room) {
$events_room = checktime_Room($start, $end, $area, $room_id);
if (isset($events_room[$room_id])) {
foreach ($events_room[$room_id] as $entry_id) {
$event = getEntry($entry_id);
if (count($event)) {
$entries[$event['entry_id']] = $event;
if ($event['time_start'] < $start) {
$event['time_start'] = $start;
}
$event['time_start'] = round_t_down($event['time_start'], $resolution);
$timed_entries[$event['time_start']][$event['entry_id']] = $event['entry_id'];
}
}
}
}
echo '<table width="1024" style="border-collapse: collapse;">' . chr(10);
echo ' <tr>' . chr(10);
echo ' <td height="135px">' . chr(10);
echo ' <tr>' . chr(10);
开发者ID:HNygard,项目名称:JM-booking,代码行数:31,代码来源:infoskjerm.php
注:本文中的getEntry函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论