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


PHP fix_time函数代码示例

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


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

示例1: open_search_boxes_list

function open_search_boxes_list()
{
    $boxes = open_search_fetch();
    $out = '';
    if ($boxes['num_rows'] > 0) {
        $out = '<ul class="open_search_edit">' . "\n";
        for ($i = 0; $i < count($boxes) - 1; $i++) {
            $out .= "\t" . '<li>';
            $out .= rounded_corners_top(array('color' => 'blue_deluxe'), true);
            $out .= '<br style="clear:both" />';
            $out .= '<h3><span class="box_link" id="link_' . $boxes[$i]['id'] . '"><img src="' . IMAGE_URL . 'plus.gif" alt="Expandera/Kollapsa" id="image_' . $boxes[$i]['id'] . '" /></span> <a href="javascript:window.external.AddSearchProvider(\'http://www.hamsterpaj.net/open_search/?type=' . $boxes[$i]['id'] . '\');">' . $boxes[$i]['name'] . '</a></h3>';
            $out .= '<div class="open_search_box_info" id="box_' . $boxes[$i]['id'] . '">' . "\n";
            $out .= '<p>' . $boxes[$i]['Description'] . '</p>' . "\n";
            $out .= 'Tillagd: ' . fix_time($boxes[$i]['timestamp']) . ' <a href="javascript:window.external.AddSearchProvider(\'http://www.hamsterpaj.net/open_search/?type=' . $boxes[$i]['id'] . '\');">Lägg till bland dina sökmotorer</a>';
            $out .= '</div>';
            $out .= '<br style="clear:both" />';
            $out .= rounded_corners_bottom(array('color' => 'blue_deluxe'), true);
            $out .= '</li>' . "\n";
        }
        $out .= '</ul>' . "\n";
    } else {
        $out .= 'Det finns inga söklådor!' . "\n";
    }
    return $out;
}
开发者ID:Razze,项目名称:hamsterpaj,代码行数:25,代码来源:open_search.lib.php

示例2: render_entries

function render_entries($entries, $options)
{
    $content .= '<ul class="group_entries">' . "\n";
    foreach ($entries as $entry) {
        $options['user_id'] = $entry['user_id'];
        $content .= message_top($options);
        $content .= '<div style="border-bottom: 1px solid #ababab;">' . "\n";
        $content .= '<span class="timestamp">' . fix_time($entry['timestamp']) . '</span>' . "\n";
        $content .= '<h2 style="display: inline;">' . $entry['header'] . '</h2> - <a href="/traffa/profile.php?id=' . $entry['user_id'] . '">' . $entry['username'] . '</a> ' . "\n";
        $content .= $entry['gender'];
        $content .= date_get_age($entry['birthday']);
        $content .= '<p>' . "\n";
        $content .= nl2br(html_entity_decode($entry['content'])) . "\n";
        $content .= '</p>' . "\n";
        $content .= '</div>' . "\n";
        // ----START----
        $content .= $_GET['action'] != 'show' ? '<a href="/hamsterpaj/hamsterblogg.php?action=show&id=' . $entry['id'] . '">Kommentera &raquo;</a>' : '<a href="/hamsterpaj/hamsterblogg.php">&laquo; Tillbaka</a>';
        // ----END------
        $content .= message_bottom();
        if ($options['enable_comments'] == true) {
            $content .= rounded_corners_top();
            $content .= '<label>Kommentera:</label>' . "\n";
            $content .= comments_input_draw($entry['id'], 'hamsterblog');
            $content .= rounded_corners_bottom();
            $content .= '<div style="clear: both;"></div>' . "\n";
            $content .= comments_list($entry['id'], 'hamsterblog');
        }
    }
    $content .= '</ul>' . "\n";
    return $content;
}
开发者ID:KuBe-zz,项目名称:hamsterpaj,代码行数:31,代码来源:hamsterblog.lib.php

示例3: warnings_render_table

function warnings_render_table($result, $highlight_time)
{
    if (!isset($time) || !is_numeric($time)) {
        $highlight_time = time() - 604800;
    }
    $out .= '<table style="border: 0px;"><tbody>';
    $out .= '<tr><td><strong>Varnad</strong></td><td><strong>Av</strong></td><td><strong>Tidpunkt</strong></td><td><strong>Anledning</strong></td></tr>' . "\n";
    while ($data = mysql_fetch_assoc($result)) {
        $found_something = true;
        $out_later .= $data['timestamp'] > $highlight_time ? '<tr class="_warning_row_active" background: ' . $within_a_week_color . ';">' : '<tr class="_warning_row">' . "\n";
        $out_later .= '<td class="_warning" valign="top" style="text-align: left"><strong>
		<a href="/traffa/user_facts.php?user_id=' . $data['user_user_id'] . '">' . $data['user_username'] . '</a></strong>' . "\n";
        $out_later .= '<td class="_warning" valign="top"><strong>
		<a href="/traffa/user_facts.php?user_id=' . $data['admin_user_id'] . '">' . $data['admin_username'] . '</a></strong>' . "\n";
        $out_later .= '<td class="_warning" valign="top">
		' . fix_time($data['timestamp']) . '</td>' . "\n";
        $out_later .= '<td class="_warning" valign="top">
		' . nl2br($data['reason']) . '</td>' . "\n";
        $out_later .= '</tr>' . "\n";
    }
    $out .= $out_later;
    $out .= '</tbody></table>';
    if ($found_something) {
        return $out;
    } elseif (!$found_something) {
        return "<h2>Hittade inget i databasen :(</h2>";
    }
}
开发者ID:Rambutan,项目名称:hamsterpaj,代码行数:28,代码来源:warnings.lib.php

示例4: gather_hours

function gather_hours($dates, $start_times, $end_times, $venues, $hours_worked)
{
    for ($i = 0; $i < count($dates); $i++) {
        $start_times[$i] = fix_time($start_times[$i]);
        $end_times[$i] = fix_time($end_times[$i]);
        if (valid_entry($dates[$i], $start_times[$i], $end_times[$i], $hours_worked[$i])) {
            $hours .= "," . $dates[$i] . ":" . $start_times[$i] . "-" . $end_times[$i] . ":" . $hours_worked[$i];
        }
    }
    return substr($hours, 1);
}
开发者ID:billgoad,项目名称:rmhc-homebase,代码行数:11,代码来源:volunteerLog.php

示例5: viewPosts

function viewPosts($mode = 'normal', $criteria = NULL)
{
    //Visar alla inlägg
    $query = makeQuery($mode, $criteria);
    $result = mysql_query($query) or die('Ett fel har upstått:<br/>' . mysql_error());
    $genderlabels['P'] = 'Pojke';
    $genderlabels['F'] = 'Flicka';
    while ($data = mysql_fetch_assoc($result)) {
        $userage = date_get_age($data['birthday']);
        if ($data['gender'] == 'P') {
            $divbg = 'blue_faded_div';
        } elseif ($data['gender'] == 'F') {
            $divbg = 'pink_faded_div';
        } else {
            $divbg = 'grey_faded_div';
        }
        if (isset($_SESSION['login']['username'])) {
            if (preg_match("/" . $_SESSION['login']['username'] . "/i", $data['text'])) {
                $divbg = 'orange_faded_div';
            } elseif ($_SESSION['login']['username'] == $data['username']) {
                $divbg = 'green_faded_div';
            }
        }
        echo '<div class="' . $divbg . '" style="repeat-x; margin-top: 10px; border: 1px solid #CCCCCC;">' . "\n";
        echo '<table class="body" style="width: 100%;"><tr><td style="vertical-align: top; width: 75px;">' . "\n";
        if ($data['image'] == 1 || $data['image'] == 2) {
            echo insert_avatar($data['userid']);
        } else {
            echo '<img src="/images/noimage.png" style="width: 75px; height: 75px; border: 1px solid #cccccc;" alt="Ingen visningsbild"/>' . "\n";
        }
        echo '</td><td style="vertical-align: top;">';
        echo fix_time($data['timestamp']) . ' (inlägg #' . $data['id'] . ') <a style="text-decoration:none;" href="javascript:#;" onclick="javascript:document.gbform.message.value=document.gbform.message.value+\'' . $data['username'] . ' : \';document.gbform.message.focus();">[^]</a><br/>' . "\n";
        echo '<a href="' . $hp_url . '/traffa/profile.php?id=' . $data['userid'] . '">' . "\n";
        echo '<b>' . $data['username'] . '</b></a> ' . "\n";
        echo birthdaycake($data['birthday']) . ' ' . "\n";
        echo $genderlabels[$data['gender']];
        if ($userage > 1) {
            echo ' ' . $userage . 'år' . "\n";
        }
        if (strlen($data['geo_location']) > 1) {
            echo ' från ' . htmlentities($data['geo_location']) . "\n";
        }
        echo '<br/>' . "\n";
        echo setsmilies($data['text']) . "\n";
        echo '</td></tr></table>' . "\n";
        echo '</div>' . "\n";
    }
    //while-satsen för att skriva ut inlägg
}
开发者ID:Razze,项目名称:hamsterpaj,代码行数:49,代码来源:klotterplank.php

示例6: edit

 public function edit()
 {
     $this->assign("time_list", $time_list);
     $this->assign('type_data', $this->type_data);
     $this->assign('warn_data', $this->warn_data);
     $id = $_REQUEST['id'];
     $model = M('Todo');
     $where['user_id'] = get_user_id();
     $where['id'] = $id;
     $vo = $model->where($where)->find();
     $vo['start_time'] = fix_time($vo['start_time']);
     $vo['end_time'] = fix_time($vo['end_time']);
     $this->assign('vo', $vo);
     $this->display();
 }
开发者ID:uwitec,项目名称:semoa,代码行数:15,代码来源:TodoAction.class.php

示例7: mysql_query

$result = mysql_query($query) or die(report_sql_error($query));
//	echo '<p>sql-frågan: ' . $query . '</p>';
echo '<table class="admin_log">';
echo '	<tr>';
echo '		<td class="event" >Händelse</td>';
echo '		<td class="comment" >Info</td>';
echo '		<td class="time" >Tidpunkt</td>';
echo '		<td class="admin" >Admin</td>';
echo '		<td class="user" >Användare</td>';
echo '		<td class="item" >Item id</td>';
echo '	</tr>';
while ($data = mysql_fetch_assoc($result)) {
    echo '<tr>';
    echo '	<td class="event" >' . $data['event'] . '</td>';
    echo '	<td class="comment" >' . $data['value'] . '</td>';
    echo '	<td>' . fix_time($data['timestamp']) . '</td>';
    echo '	<td>' . ($numeric ? $data['admin_id'] : get_username_by_id($data['admin_id'])) . '</td>';
    echo '	<td>' . ($numeric ? $data['user_id'] : get_username_by_id($data['user_id'])) . '</td>';
    echo '	<td>' . $data['item_id'] . '</td>';
    echo '</tr>';
}
echo '</table>';
echo rounded_corners_bottom();
ui_bottom();
//functions used in this script
function get_userid_by_name($username)
{
    //hämta användarid
    $query = 'SELECT id FROM login WHERE username = "' . $username . '"';
    $result = mysql_query($query) or die(report_sql_error($query));
    if ($data = mysql_fetch_assoc($result)) {
开发者ID:Rambutan,项目名称:hamsterpaj,代码行数:31,代码来源:log_view.php

示例8: edit

 public function edit()
 {
     $widget['jquery-ui'] = true;
     $widget['date'] = true;
     $widget['uploader'] = true;
     $widget['editor'] = true;
     $this->assign("widget", $widget);
     $id = $_REQUEST['id'];
     $model = M('Schedule');
     $where['user_id'] = get_user_id();
     $where['id'] = $id;
     $vo = $model->where($where)->find();
     $vo['start_time'] = fix_time($vo['start_time']);
     $vo['end_time'] = fix_time($vo['end_time']);
     $this->assign('vo', $vo);
     $this->display();
 }
开发者ID:2ger,项目名称:trunk,代码行数:17,代码来源:ScheduleAction.class.php

示例9: list_entries

function list_entries($recipient, $entries, $offset = 0, $filter = 0)
{
    global $hp_includepath;
    if ($offset < 1 || !is_numeric($offset)) {
        $offset = 0;
    }
    $list_sql = 'SELECT gb.id, gb.timestamp, gb.message, gb.sender, gb.read, gb.answered, gb.forum_post, login.username, info.image, ';
    $list_sql .= 'info.birthday, info.gender, is_private, zip_codes.* ';
    $list_sql .= 'FROM traffa_guestbooks AS gb, login, userinfo AS info, zip_codes ';
    if ($filter > 0) {
        $list_sql .= 'WHERE (';
        $list_sql .= '(gb.recipient ="' . $recipient . '" AND gb.sender = "' . $filter . '") ';
        $list_sql .= 'OR (gb.recipient = "' . $filter . '" AND gb.sender = "' . $recipient . '") ';
        $list_sql .= ') AND login.id = gb.sender AND info.userid = gb.sender AND zip_codes.zip_code = info.zip_code ';
    } else {
        $list_sql .= 'WHERE gb.recipient = "' . $recipient . '" AND zip_codes.zip_code = info.zip_code ';
    }
    $list_sql .= 'AND login.id = gb.sender AND info.userid = gb.sender AND deleted = 0 ';
    if (isset($_SESSION['login']['id'])) {
        $list_sql .= 'AND (gb.is_private = 0 OR gb.sender = ' . $_SESSION['login']['id'] . ' OR gb.recipient = ' . $_SESSION['login']['id'] . ') ';
    } else {
        $list_sql .= 'AND gb.is_private = 0 ';
    }
    if ($filter > 0) {
        $list_sql .= 'ORDER BY gb.id DESC';
    } else {
        $list_sql .= 'ORDER BY gb.id DESC LIMIT ' . $offset . ', ' . GUESTBOOK_MESSAGES_PER_PAGE;
    }
    $list_result = mysql_query($list_sql) or die(report_sql_error($list_sql));
    if ($filter == 0) {
        echo '<p class="subtitle">Gästbok - ' . cute_number($entries) . ' inlägg</p>' . "\n";
    } else {
        echo '<p class="subtitle">Gästbok - Visar historik</p>' . "\n";
    }
    if ($offset > 0) {
        echo ' - sida ' . intval($offset / GUESTBOOK_MESSAGES_PER_PAGE + 1) . ' av ' . intval($entries / GUESTBOOK_MESSAGES_PER_PAGE + 1);
    }
    echo '</p>' . "\n";
    $unread = array();
    if (true) {
        while ($entry = mysql_fetch_assoc($list_result)) {
            if ($entry['read'] != 1) {
                rounded_corners_top(array('color' => 'orange_deluxe', 'id' => 'gb_entry_' . $entry['id']));
            } else {
                rounded_corners_top(array('color' => 'blue_deluxe', 'id' => 'gb_entry_' . $entry['id']));
                $button_color = 'blue_';
            }
            echo '<div class="entry_picture">' . "\n";
            if ($entry['image'] == 1 || $entry['image'] == 2) {
                echo ui_avatar($entry['sender']);
            }
            echo '</div>' . "\n";
            echo '<div class="entry_main">' . "\n";
            echo '<div class="entry_info">' . "\n";
            echo '<span class="gb_private" id="gb_private_' . $entry['id'] . '_label">';
            echo $entry['is_private'] == 1 ? 'Detta inlägg är privat' : '';
            echo '</span>' . "\n";
            echo '<span class="gb_unanswered" id="gb_unanswered_' . $entry['id'] . '_label">';
            echo $entry['answered'] != 'Y' ? 'Obesvarat' : '';
            echo '</span>' . "\n";
            echo '<span class="timestamp">Skrevs ' . fix_time($entry['timestamp']) . '</span>';
            echo '<a href="/traffa/profile.php?id=' . $entry['sender'] . '">' . $entry['username'] . '</a>' . "\n";
            echo $entry['gender'] == 'm' ? ' Pojke' : '';
            echo $entry['gender'] == 'f' ? ' Flicka' : '';
            echo $entry['birthday'] != '0000-00-00' ? ' ' . date_get_age($entry['birthday']) . ' år' : '';
            echo strlen($entry['spot']) > 0 ? ' från <a style="cursor: pointer;" onclick="window.open(\'http://www.hitta.se/LargeMap.aspx?ShowSatellite=false&pointX=' . $entry['y_rt90'] . '&pointY=' . $entry['x_rt90'] . '&cx=' . $entry['y_rt90'] . '&cy=' . $entry['x_rt90'] . '&z=6&name=' . $entry['username'] . '%20i%20' . urlencode($entry['spot']) . '\', \'user_map_3\', \'location=false, width=750, height=500\');">' . $entry['spot'] . '</a>' : '';
            echo '</div>' . "\n";
            echo '<p>' . "\n";
            echo setsmilies(nl2br($entry['message']));
            //			preint_r($entry);
            echo '</p>' . "\n";
            echo '</div>' . "\n";
            echo '<div class="entry_controls">' . "\n";
            echo $recipient == $_SESSION['login']['id'] && $entry['sender'] != $_SESSION['login']['id'] ? '<a href="/hamsterpaj/abuse.php?report_type=guestbook_entry&reference_id=' . $entry['id'] . '" class="abuse_button"><img src="http://images.hamsterpaj.net/abuse.png" /></a> ' . "\n" : '';
            echo $recipient == $_SESSION['login']['id'] && $entry['sender'] != $_SESSION['login']['id'] ? '<button class="' . $button_color . 'button_70" onclick="gb_block_user(\'' . $entry['username'] . '\');">Blockera</button> ' . "\n" : '';
            echo $recipient == $_SESSION['login']['id'] || $entry['sender'] == $_SESSION['login']['id'] ? '<button id="gb_private_' . $entry['id'] . '" class="' . $button_color . 'button_80" onclick="gb_private(' . $entry['id'] . ');"' . ($entry['is_private'] == 1 ? ' style="display: none;"' : '') . '>Privatisera</button> ' . "\n" : '';
            echo $recipient == $_SESSION['login']['id'] && $entry['sender'] != $_SESSION['login']['id'] ? '<button id="gb_unprivate_' . $entry['id'] . '" class="' . $button_color . 'button_90" onclick="gb_unprivate(' . $entry['id'] . ');"' . ($entry['is_private'] == 1 ? '' : ' style="display: none;"') . '>Avprivatisera</button> ' . "\n" : '';
            echo '<button class="' . $button_color . 'button_70" onclick="gb_history(' . $recipient . ', ' . $entry['sender'] . ');">Historik</button> ' . "\n";
            echo '<button class="' . $button_color . 'button_60" onclick="gb_goto(' . $entry['sender'] . ');">Gå till</button> ' . "\n";
            echo $recipient == $_SESSION['login']['id'] && $entry['sender'] != $_SESSION['login']['id'] ? '<button class="' . $button_color . 'button_60" onclick="gb_remove(' . $entry['id'] . ', \'' . $entry['username'] . '\', \'' . fix_time($entry['timestamp']) . '\');">Ta bort</button> ' . "\n" : '';
            echo $recipient == $_SESSION['login']['id'] && $entry['sender'] != $_SESSION['login']['id'] ? '<button class="' . $button_color . 'button_50" onclick="gb_answer(\'' . $entry['username'] . '\', ' . $entry['sender'] . ', ' . $entry['id'] . ');">Svara</button> ' . "\n" : '';
            echo '</div>' . "\n";
            if ($entry['read'] != 1) {
                rounded_corners_bottom(array('color' => 'orange_deluxe'));
            } else {
                rounded_corners_bottom(array('color' => 'blue_deluxe'));
            }
            if ($entry['read'] == 0) {
                array_push($unread, $entry['id']);
            }
        }
    } else {
        while ($list_data = mysql_fetch_assoc($list_result)) {
            if ($list_data['read'] == 1) {
                echo '<div style="background: #f7f7f7">' . "\n";
            } else {
                echo '<div style="background: #ffc777">' . "\n";
            }
            echo '<table class="body"><tr><td style="width: 80px; vertical-align: top;">' . "\n";
            if ($list_data['image'] == 1 || $list_data['image'] == 2) {
//.........这里部分代码省略.........
开发者ID:Razze,项目名称:hamsterpaj,代码行数:101,代码来源:guestbook-functions.php

示例10: strip_tags

echo '<td><b>' . $contactlabel1 . '</b></td>';
echo '<td><b>' . $contactlabel2 . '</b></td>';
echo '</tr>';
echo '<tr>';
echo '<td>' . strip_tags($userdata['traffa']['firstname']) . '</td>';
echo '<td>' . $contactalias1 . '</td>';
echo '<td>' . $contactalias2 . '</td>';
echo '</tr>';
echo '<tr>';
echo '<td><b>Blev medlem:</b></td>';
echo '<td><b>Loggade senast in:</b></td>';
echo '<td><b>Längd:</b></td>';
echo '</tr>';
echo '<tr>';
echo '<td>' . date('Y-m-d', $userdata['login']['regtimestamp']) . '</td>';
echo '<td>' . fix_time($userdata['login']['lastlogon']) . '</td>';
echo '<td>' . $userdata['traffa']['height'] . 'cm</td>';
echo '</tr>';
echo '</table>';
echo '</div>';
if ($userdata['userinfo']['irl'][0] == 1) {
    echo '<img src="/images/irlsthlm05.png" style="width: 100px; height: 20px; border: 1px solid #cccccc; margin: 2px;" />';
}
if ($userdata['userinfo']['irl'][1] == 1) {
    echo '<img src="/images/miniirlgbg05.png" style="width: 100px; height: 20px; border: 1px solid #cccccc; margin: 2px;" />';
}
if ($userdata['userinfo']['irl'][2] == 1) {
    echo '<img src="/images/regnirl.png" style="width: 100px; height: 20px; border: 1px solid #cccccc; margin: 2px;" />';
}
$query = 'SELECT m.groupid, l.name FROM groups_list AS l, groups_members AS m WHERE ';
$query .= 'l.groupid = m.groupid AND m.userid = "' . $_GET['id'] . '" AND m.approved = "1" LIMIT 10;';
开发者ID:Razze,项目名称:hamsterpaj,代码行数:31,代码来源:profile.old.php

示例11: discussion_forum_tillagg_callback

function discussion_forum_tillagg_callback($matches)
{
    $output .= '<div class="post_addition">Tillägg av <a href="/traffa/quicksearch.php?username=' . $matches[1] . '">' . $matches[1] . '</a>';
    $output .= ' ' . strtolower(fix_time($matches[2])) . '<br />' . $matches[3] . '</div>' . "\n";
    return $output;
}
开发者ID:Rojk,项目名称:hamsterpaj,代码行数:6,代码来源:discussion_forum.lib.php

示例12: query_cache

<?php

include '../../include/core/common.php';
$query = 'SELECT * FROM music_guess_songs ORDER BY id DESC LIMIT 1, 15';
$songs = query_cache(array('query' => $query));
header('Content-type: application/xml; charset=utf-8');
//header('Content-type: text/plain');
echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
echo '<playlist version="0" xmlns="http://xspf.org/ns/0/">' . "\n";
echo '<trackList>' . "\n";
foreach ($songs as $song) {
    $song['song'] = strtolower($song['song']);
    $song['artist'] = strtolower($song['artist']);
    $song['timestamp'] = strtolower(fix_time($song['timestamp']));
    $search = array('å', 'ä', 'ö', '\'', '"');
    $replace = array('a', 'a', 'o', '', '');
    $song['song'] = str_replace($search, $replace, $song['song']);
    $song['artist'] = str_replace($search, $replace, $song['artist']);
    $song['timestamp'] = str_replace($search, $replace, $song['timestamp']);
    /*
    $song['song'] = htmlentities($song['song']);
    $song['artist'] = htmlentities($song['artist']);
    $song['timestamp'] = htmlentities($song['timestamp']);
    */
    echo '<track>' . "\n";
    echo '<location>http://images.hamsterpaj.net/music_guess_mp3/' . $song['secret_id'] . '.mp3</location>' . "\n";
    echo '<image>http://images.hamsterpaj.net/mattan/album_pic.jpg</image>' . "\n";
    echo '<annotation>' . $song['timestamp'] . ', ' . $song['artist'] . ' - ' . $song['song'] . '</annotation>' . "\n";
    echo '</track>' . "\n";
}
echo '</trackList>' . "\n";
开发者ID:Razze,项目名称:hamsterpaj,代码行数:31,代码来源:latest_15.xml.php

示例13: implode

        $output .= '		<td class="admin" >Admin</td>';
        $output .= '		<td class="user" >Användare</td>';
        $output .= '		<td class="item" >Item id</td>';
        $output .= '	</tr>';
        break;
    case 'csv':
        $output .= implode("\t", array('Handelse', 'Info', 'Tidpunkt', 'Admin', 'Anvandare', 'Itemid')) . "\n";
        break;
}
while ($data = mysql_fetch_assoc($result)) {
    switch ($format) {
        case 'styled':
            $output .= '<tr>';
            $output .= '	<td class="event" >' . $data['event'] . '</td>';
            $output .= '	<td class="comment" >' . $data['value'] . '</td>';
            $output .= '	<td>' . fix_time($data['timestamp']) . '</td>';
            $output .= '	<td>' . ($numeric ? $data['admin_id'] : get_username_by_id($data['admin_id'])) . '</td>';
            $output .= '	<td>' . ($numeric ? $data['user_id'] : get_username_by_id($data['user_id'])) . '</td>';
            $output .= '	<td>' . $data['item_id'] . '</td>';
            $output .= '</tr>';
            break;
        case 'csv':
            $row = array('event' => $data['event'], 'comment' => $data['value'], 'timestamp' => date('Y-m-d H:i', $data['timestamp']), 'admin' => $numeric ? $data['admin_id'] : get_username_by_id($data['admin_id']), 'user' => $numeric ? $data['user_id'] : get_username_by_id($data['user_id']), 'item_id' => $data['item_id']);
            //$row = array_map('md5', $row);
            $output .= '' . implode("\t", $row) . '' . "\n";
            break;
    }
}
if ($format == 'styled') {
    $output .= '</table>';
    $output .= rounded_corners_bottom();
开发者ID:Rojk,项目名称:hamsterpaj,代码行数:31,代码来源:log_view.php

示例14: confirm

    echo '<a href="/avatar.php?id=' . $userinfo['login']['id'] . '&refuse&admin" ';
    echo 'onclick="return confirm(\'Är du säker på att du vill ta bort denna bild?\');" ';
    echo '/><strong>Ta bort avatar</strong></a>';
}
if ($_SESSION['login']['userlevel'] >= USERLEVELS_EDIT_PRESENTATION) {
    echo ' <strong><a href="/admin/edit_presentation.php?id=' . $userinfo['login']['id'] . '">Ändra presentation</a></strong> ';
}
if ($_SESSION['login']['userlevel'] >= 3) {
    echo '<input type="button" value="Ta bort" onclick="if(confirm(\'Vill du ta bort den här knäppgöken?\')){window.location=\'/remove_user.php?userid=' . $userinfo['login']['id'] . '\';}" />' . "\n";
}
if ($_SESSION['login']['userlevel'] >= 3) {
    echo '<h1>Aiight, snabbkoll vad för shit användaren hittat på på sajten</h1>' . "\n";
    echo '<h2>Senast skickade gästboksinlägg</h2>' . "\n";
    $query = 'SELECT * FROM traffa_guestbooks WHERE sender = "' . $userinfo['login']['id'] . '" AND is_private != 1 ORDER BY id DESC LIMIT 5';
    $result = mysql_query($query) or die(report_sql_error($query, __FILE__, __LINE__));
    while ($data = mysql_fetch_assoc($result)) {
        echo '<strong>' . fix_time($data['timestamp']) . '</strong>' . "\n";
        echo '<p>' . htmlspecialchars($data['message']) . '</p>' . "\n";
    }
    echo '<h2>Senaste inläggen i forumet</h2>' . "\n";
    $query = 'SELECT * FROM posts WHERE author = "' . $userinfo['login']['id'] . '" ORDER BY id DESC LIMIT 5';
    $result = mysql_query($query) or die(report_sql_error($query, __FILE__, __LINE__));
    while ($data = mysql_fetch_assoc($result)) {
        echo '<strong>' . fix_time($data['timestamp']) . '</strong>' . "\n";
        echo '<p><a href="' . posts_url_get($data['id']) . '">' . htmlspecialchars($data['content']) . '</a></p>' . "\n";
    }
}
?>
  <div style="clear: both;"></div>
  </div>
开发者ID:Razze,项目名称:hamsterpaj,代码行数:30,代码来源:admin_controls.php

示例15: message_top

                $out .= message_top($options);
                $out .= '<span class="timestamp">' . fix_time($event['timestamp']) . '</span>' . "\n";
                $out .= '<a href="/traffa/profile.php?id=' . $event['friend_id'] . '">' . $event['username'] . '</a> ' . "\n";
                $genders = array('f' => 'F', 'm' => 'P');
                $out .= $genders[$event['gender']];
                $out .= date_get_age($event['birthday']) > 0 ? date_get_age($event['birthday']) : '';
                $out .= '<p>Tjoho, läs min senaste bloggning: <a href="' . $event['url'] . '">' . $event['label'] . '</a><br />Och glöm för sablen inte att kommentera!</p>' . "\n";
                $out .= message_bottom();
                break;
            case 'photos':
                $photos = photos_fetch(array('id' => substr($event['url'], 22), 'limit' => 1));
                if (!isset($photos)) {
                } else {
                    $options['user_id'] = $event['friend_id'];
                    $out .= message_top($options);
                    $out .= '<span class="timestamp">' . fix_time($event['timestamp']) . '</span>' . "\n";
                    $out .= '<a href="/traffa/profile.php?id=' . $event['friend_id'] . '">' . $event['username'] . '</a> ' . "\n";
                    $genders = array('f' => 'F', 'm' => 'P');
                    $out .= $genders[$event['gender']];
                    $out .= date_get_age($event['birthday']) > 0 ? date_get_age($event['birthday']) : '';
                    $out .= photos_list_mini($photos);
                    $out .= '<p>Jag är en cool kis, så jag ladda precis upp ett foto. Titta på det och kommentera vetja :) <a href="' . $event['url'] . '">' . $event['label'] . '</a></p>' . "\n";
                    $out .= message_bottom();
                }
                break;
        }
    }
    $out .= '</ul>' . "\n";
}
ui_top($ui_options);
echo $out;
开发者ID:Rojk,项目名称:hamsterpaj,代码行数:31,代码来源:friends_log.php


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