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


PHP getEntry函数代码示例

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


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


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