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


PHP format_date_time函数代码示例

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


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

示例1: phphoto_echo_galleries

function phphoto_echo_galleries($db)
{
    $gallery_sql = "\n        SELECT\n            id,\n            title,\n            description,\n            (SELECT COUNT(*) FROM image_to_gallery WHERE gallery_id = g.id) AS images,\n            \n            (SELECT MAX(changed) FROM\n                (\n                    (SELECT temp1.changed, temp1.id AS gallery_id FROM galleries temp1)\n                    UNION\n                    (SELECT temp2.changed, temp2.gallery_id FROM image_to_gallery temp2)\n                    UNION\n                    (SELECT (SELECT changed FROM images WHERE id = temp3.image_id) AS changed, temp3.gallery_id FROM image_to_gallery temp3)\n                ) temp\n                WHERE\n                    gallery_id = g.id\n            ) AS changed\n        FROM\n            galleries g\n        WHERE\n            active = TRUE\n            AND\n            (\n                SELECT COUNT(*) FROM image_to_gallery itg WHERE itg.gallery_id = g.id\n                AND\n                (\n                    SELECT COUNT(*) FROM images i WHERE i.id = itg.image_id AND active = TRUE\n                ) > 0\n            ) > 0\n        ORDER BY\n            " . GALLERY_SORT_COLUMN . "\n    ";
    $tag_sql = "\n        SELECT\n            id,\n            name,\n            description\n        FROM\n            tags t\n        WHERE\n            active = TRUE\n            AND\n            (\n                SELECT COUNT(*) FROM image_to_tag itt WHERE itt.tag_id = t.id\n                AND\n                (\n                    SELECT COUNT(*) FROM images i WHERE i.id = itt.image_id AND active = TRUE\n                ) > 0\n            ) > 0\n        ORDER BY\n            name\n    ";
    echo "\n<div class='header'>";
    echo "\n    <p><a href='" . GALLERY_INDEX_PAGE . "'>" . GALLERY_TITLE . "</a></p>";
    echo "\n</div>";
    echo "\n<div class='container'>";
    echo "\n    <h1>" . GALLERY_WELCOME . "</h1>";
    echo "\n    <div class='wrapper'>";
    foreach (phphoto_db_query($db, $gallery_sql) as $gallery) {
        echo "\n    <div class='gallery'>";
        echo "\n        <a href='" . CURRENT_PAGE . "?" . GET_KEY_GALLERY_ID . "={$gallery['id']}'>";
        echo "\n        <img class='thumbnail' src='image.php?" . GET_KEY_GALLERY_ID . "={$gallery['id']}' title='{$gallery['description']}' alt='{$gallery['title']}' />";
        echo "\n        <h1>" . format_string($gallery['title'], 30) . "</h1>";
        echo "\n        <h2>updated " . format_date_time($gallery['changed']) . "</h2>";
        echo "\n        <p>" . format_string($gallery['description']) . "</p>";
        echo "\n        </a>";
        echo "\n    </div>";
    }
    echo "\n    </div>";
    // echo links for the different tags
    $tags = array();
    foreach (phphoto_db_query($db, $tag_sql) as $tag) {
        array_push($tags, "<a href='" . CURRENT_PAGE . "?" . GET_KEY_TAG_ID . "={$tag['id']}' title='{$tag['description']}'>{$tag['name']}</a>");
    }
    if (count($tags) > 0) {
        echo "\n    <p>" . phphoto_text($db, 'section', 'tags') . ": " . implode(', ', $tags) . '</p>';
    }
    echo "\n</div>";
    phphoto_echo_gallery_footer("<a href='http://github.com/RiJo/phphoto'>" . GALLERY_NAME . ' v.' . GALLERY_VERSION . "</a>");
}
开发者ID:RiJo,项目名称:phphoto,代码行数:32,代码来源:gallery.php

示例2: gettext

        } else {
            if ($sort_dir == 'ASC') {
                echo "                    <a href=\"admin_viewlog.php?webtag={$webtag}&amp;sort_by=COUNT&amp;sort_dir=ASC&amp;group_by={$group_by}&amp;page={$page}\">", gettext("Count"), "</a>\n";
            } else {
                echo "                    <a href=\"admin_viewlog.php?webtag={$webtag}&amp;sort_by=COUNT&amp;sort_dir=DESC&amp;group_by={$group_by}&amp;page={$page}\">", gettext("Count"), "</a>\n";
            }
        }
    }
    echo "                  </td>\n";
}
echo "                </tr>\n";
if (sizeof($admin_log_array['admin_log_array']) > 0) {
    foreach ($admin_log_array['admin_log_array'] as $admin_log_entry) {
        $auto_update = false;
        echo "                <tr>\n";
        echo "                  <td align=\"left\" valign=\"top\" style=\"white-space: nowrap\"><span title=\"", format_date_time($admin_log_entry['CREATED']), "\">", format_date_time($admin_log_entry['CREATED']), "</td>\n";
        $entry_array = htmlentities_array($admin_log_entry['ENTRY']);
        switch ($admin_log_entry['ACTION']) {
            case CHANGE_USER_STATUS:
                $action_text = sprintf(gettext("Changed user status for '%s'"), $entry_array[0]);
                break;
            case CHANGE_FORUM_ACCESS:
                $action_text = sprintf(gettext("Changed forum access permissions for '%s'"), $entry_array[1]);
                break;
            case DELETE_ALL_USER_POSTS:
                $action_text = sprintf(gettext("Deleted all posts for '%s'"), $entry_array[0]);
                break;
            case CHANGE_USER_PASSWD:
                $action_text = sprintf(gettext("Changed password for '%s'"), $entry_array[0]);
                break;
            case ADD_BANNED_IP:
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:31,代码来源:admin_viewlog.php

示例3: gettext

echo "                  <table class=\"posthead\" width=\"95%\">\n";
echo "                    <tr>\n";
echo "                      <td align=\"left\" style=\"white-space: nowrap\" valign=\"top\" width=\"120\">", gettext("Address"), ":</td>\n";
echo "                      <td align=\"left\"><a href=\"links.php?webtag={$webtag}&amp;lid={$lid}&amp;action=go\" target=\"_blank\">", mb_strlen($link['URI']) > 35 ? htmlentities_array(mb_substr($link['URI'], 0, 35)) . '&hellip;' : htmlentities_array($link['URI']), "</a></td>\n";
echo "                    </tr>\n";
echo "                    <tr>\n";
echo "                      <td align=\"left\" style=\"white-space: nowrap\" valign=\"top\">", gettext("Submitted by"), ":</td>\n";
echo "                      <td align=\"left\">", isset($link['LOGON']) ? word_filter_add_ob_tags(format_user_name($link['LOGON'], $link['NICKNAME']), true) : gettext("Unknown user"), "</td>\n";
echo "                    </tr>\n";
echo "                    <tr>\n";
echo "                      <td align=\"left\" style=\"white-space: nowrap\" valign=\"top\">", gettext("Description"), ":</td>\n";
echo "                      <td align=\"left\">", word_filter_add_ob_tags($link['DESCRIPTION'], true), "</td>\n";
echo "                    </tr>\n";
echo "                    <tr>\n";
echo "                      <td align=\"left\" style=\"white-space: nowrap\" valign=\"top\">", gettext("Date"), ":</td>\n";
echo "                      <td align=\"left\">", format_date_time($link['CREATED']), "</td>\n";
echo "                    </tr>\n";
echo "                    <tr>\n";
echo "                      <td align=\"left\" style=\"white-space: nowrap\" valign=\"top\">", gettext("Clicks"), ":</td>\n";
echo "                      <td align=\"left\">{$link['CLICKS']}</td>\n";
echo "                    </tr>\n";
if (isset($link['RATING']) && is_numeric($link['RATING'])) {
    if ($link['VOTES'] == 1) {
        echo "                    <tr>\n";
        echo "                      <td align=\"left\" style=\"white-space: nowrap\" valign=\"top\">", gettext("Rating"), ":</td>\n";
        echo "                      <td align=\"left\">", format_number($link['RATING'], 1), " (1 ", gettext("Vote"), ")</td>\n";
        echo "                    </tr>\n";
    } else {
        echo "                    <tr>\n";
        echo "                      <td align=\"left\" style=\"white-space: nowrap\" valign=\"top\">", gettext("Rating"), ":</td>\n";
        echo "                      <td align=\"left\">", format_number($link['RATING'], 1), " ({$link['VOTES']} ", gettext("Votes"), ")</td>\n";
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:31,代码来源:links_detail.php

示例4: getString

</td>
		<td><a href="mailto:<?php 
echo $r['email'];
?>
"><?php 
echo $r['email'];
?>
</a></td>
	</tr>
	<tr>
		<td class="left"><?php 
echo getString('last_login');
?>
</td>
		<td><?php 
echo format_date_time($r['lastlogin'], " ");
?>
</td>
	</tr>
	<tr>
		<td class="left"><?php 
echo getString('bio');
?>
</td>
		<td colspan="2" height="167" class="text"><?php 
echo nl2br($r['bio']);
?>
</td>
	</tr>
	<?php 
if ($page['is_admin'] || $_GET['id'] == $_SESSION['user_id']) {
开发者ID:Rhenan,项目名称:intranet-1,代码行数:31,代码来源:view.php

示例5: ereg_replace

{
    return ereg_replace("[^0-9]", "", $in_str);
}
//$cid_str = (empty($_GET))? "0000000000": $_GET['phone'];		// bad
$cid_str = empty($_GET) ? "2125867000" : $_GET['phone'];
// Hilton
//$cid_str = (empty($_GET))? "4102242850": $_GET['phone'];		// Giant pharmacy
//$cid_str = (empty($_GET))? "4103533986": $_GET['phone'];		// cell
//$cid_str = (empty($_GET))? "4108498240": $_GET['phone'];
//$cid_str = (empty($_GET))? "4108498721": $_GET['phone'];
$lookup_str = cid_lookup(extr_digits($cid_str));
// given a phone no., returns data string
$query = "INSERT INTO `{$GLOBALS['mysql_prefix']}caller_id` (`call_str`, `lookup_vals`, `status`)  \n\tVALUES ( " . quote_smart(trim($cid_str)) . ", " . quote_smart(addslashes(trim($lookup_str))) . ", 0);";
$result = mysql_query($query) or do_error($query, 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__);
$retval = explode(";", $lookup_str);
$received = format_date_time(mysql_format_date(now()));
$sources = array("NA", "prior incidents", "Constituents data", "White pages");
$extra = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
$url = "http://{$_SERVER['HTTP_HOST']}:{$_SERVER['SERVER_PORT']}{$extra}/";
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<HEAD><TITLE>Tickets - Caller ID Module</TITLE>
	<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
	<META HTTP-EQUIV="Expires" CONTENT="0">
	<META HTTP-EQUIV="Cache-Control" CONTENT="NO-CACHE">
	<META HTTP-EQUIV="Pragma" CONTENT="NO-CACHE">
	<META HTTP-EQUIV="Content-Script-Type"	CONTENT="text/javascript">
	<META HTTP-EQUIV="Script-date" CONTENT="<?php 
print date("n/j/y G:i", filemtime(basename(__FILE__)));
开发者ID:sharedgeo,项目名称:TicketsCAD-SharedGeo-Dev,代码行数:31,代码来源:caller_id.php

示例6: while

		<th></th>
	</tr>
	<?php 
    while ($r = db_fetch($result)) {
        ?>
	<tr>
		<td><a href="view.php?id=<?php 
        echo $r["userid"];
        ?>
"><?php 
        echo $r["lastname"];
        ?>
, <?php 
        echo $r["firstname"];
        ?>
</a></td>
		<td class="r"><?php 
        echo format_date_time($r["createdOn"]);
        ?>
</td>
		<?php 
        echo deleteColumn("Delete user?", $r["userid"]);
        ?>
	</tr>
	<?php 
    }
} else {
    echo drawEmptyResult("No pending requests!");
}
echo drawTableEnd();
drawBottom();
开发者ID:joshreisner,项目名称:hcfa-cc,代码行数:31,代码来源:requests.php

示例7: GetSolutionTime

 function GetSolutionTime($solution)
 {
     $contest = WT_contest_by_id($solution['contest_id']);
     if ($contest['settings']['duration'] == 0) {
         return format_date_time($solution['timestamp']);
     } else {
         return Timer($solution['timestamp'] - $contest['settings']['timestamp']);
     }
 }
开发者ID:Nazg-Gul,项目名称:e-marsa,代码行数:9,代码来源:01CGMInformatics.php

示例8: array_slice

        if (in_array($current_folder, array(PM_FOLDER_SENT, PM_FOLDER_OUTBOX, PM_FOLDER_SAVED, PM_FOLDER_DRAFTS, PM_SEARCH_RESULTS))) {
            if (isset($message['RECIPIENTS']) && sizeof($message['RECIPIENTS']) > 0) {
                $recipients_display = array_slice($message['RECIPIENTS'], 0, 2);
                echo "                  <td align=\"left\" class=\"postbody\" valign=\"top\">";
                foreach ($recipients_display as $recipient) {
                    echo "                    <a href=\"user_profile.php?webtag={$webtag}&amp;uid={$recipient['UID']}\" target=\"_blank\" class=\"popup 650x500\">", word_filter_add_ob_tags(format_user_name($recipient['LOGON'], $recipient['NICKNAME']), true), "</a>\n";
                }
                if (sizeof($message['RECIPIENTS']) - 2 > 0) {
                    echo "&nbsp;", sprintf(gettext("and %d others"), sizeof($message['RECIPIENTS']) - 2);
                }
                echo "                  </td>\n";
            } else {
                echo "                  <td align=\"left\" class=\"postbody\" valign=\"top\">", gettext('Unknown User'), "</td>\n";
            }
        }
        echo "                  <td align=\"left\" class=\"postbody\" valign=\"top\">", format_date_time($message['CREATED']), "</td>\n";
        echo "                </tr>\n";
    }
}
echo "                <tr>\n";
echo "                  <td class=\"postbody\">&nbsp;</td>\n";
echo "                </tr>\n";
echo "              </table>\n";
echo "            </td>\n";
echo "          </tr>\n";
echo "        </table>\n";
echo "      </td>\n";
echo "    </tr>\n";
echo "    <tr>\n";
echo "      <td align=\"left\">&nbsp;</td>\n";
echo "    </tr>\n";
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:31,代码来源:pm_messages.php

示例9: mail_it

function mail_it($to_str, $text, $ticket_id, $text_sel = 1, $txt_only = FALSE)
{
    // 10/6/08, 10/15/08,  2/18/09, 3/7/09
    global $istest;
    /*
    Subject		A
    Inciden		B  Title
    Priorit		C  Priorit
    Nature		D  Nature
    Written		E  Written
    Updated		F  As of
    Reporte		G  By
    Phone: 		H  Phone: 
    Status:		I  Status:
    Address		J  Location
    Descrip		K  Descrip
    Disposi		L  Disposi
    Start/end	M
    Map: " 		N  Map: " 
    Actions		O
    Patients	P
    Host		Q
    911 contact	R				// 6/26/10
    */
    switch ($text_sel) {
        // 7/7/09
        case 1:
            $match_str = strtoupper(get_variable("msg_text_1"));
            // note case
            break;
        case 2:
            $match_str = strtoupper(get_variable("msg_text_2"));
            break;
        case 3:
            $match_str = strtoupper(get_variable("msg_text_3"));
            break;
    }
    if (empty($match_str)) {
        $match_str = " " . implode("", range("A", "R"));
    }
    // empty get all - force non-zero hit
    //	require_once("cell_addrs.inc.php");			// 10/22/08
    //	snap (__LINE__, count($cell_addrs));
    //	$cell_addrs = array( "vtext.com", "messaging.sprintpcs.com", "txt.att.net", "vmobl.com", "myboostmobile.com");		// 10/5/08
    //	if ($istest) {array_push($cell_addrs, "gmail.com");};
    $query = "SELECT * FROM `{$GLOBALS['mysql_prefix']}ticket` WHERE `id`='{$ticket_id}' LIMIT 1";
    $ticket_result = mysql_query($query) or do_error($query, 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__);
    $t_row = stripslashes_deep(mysql_fetch_array($ticket_result));
    //	dump($t_row);
    $eol = "\n";
    $locale = get_variable('locale');
    $message = "";
    $_end = good_date_time($t_row['problemend']) ? "  End:" . $t_row['problemend'] : "";
    //
    for ($i = 0; $i < strlen($match_str); $i++) {
        if (!($match_str[$i] == " ")) {
            switch ($match_str[$i]) {
                case "A":
                    break;
                case "B":
                    $message .= "Incident: " . $t_row['scope'] . $eol;
                    break;
                case "C":
                    $message .= "Priority: " . get_severity($t_row['severity']) . $eol;
                    break;
                case "D":
                    $message .= "Nature: " . get_type($t_row['in_types_id']) . $eol;
                    break;
                case "J":
                    $str = "";
                    $str .= empty($t_row['street']) ? "" : $t_row['street'] . " ";
                    $str .= empty($t_row['city']) ? "" : $t_row['city'] . " ";
                    $str .= empty($t_row['state']) ? "" : $t_row['state'];
                    $message .= empty($str) ? "" : "Addr: " . $str . $eol;
                    break;
                case "K":
                    $message .= empty($t_row['description']) ? "" : "Descr: " . wordwrap($t_row['description']) . $eol;
                    break;
                case "G":
                    $message .= "Reported by: " . $t_row['contact'] . $eol;
                    break;
                case "H":
                    $message .= empty($t_row['phone']) ? "" : "Phone: " . format_phone($t_row['phone']) . $eol;
                    break;
                case "E":
                    $message .= empty($t_row['date']) ? "" : "Written: " . format_date_time($t_row['date']) . $eol;
                    break;
                case "F":
                    $message .= "Updated: " . format_date_time($t_row['updated']) . $eol;
                    break;
                case "I":
                    $message .= "Status: " . get_status($t_row['status']) . $eol;
                    break;
                case "L":
                    $message .= empty($t_row['comments']) ? "" : "Disp: " . wordwrap($t_row['comments']) . $eol;
                    break;
                case "M":
                    $message .= get_text("Run Start") . ": " . format_date_time($t_row['problemstart']) . $_end . $eol;
                    break;
                case "N":
//.........这里部分代码省略.........
开发者ID:sharedgeo,项目名称:TicketsCAD-SharedGeo-Dev,代码行数:101,代码来源:functions.inc.php

示例10: html_get_frame_name

         $number = "<a href=\"messages.php?webtag={$webtag}&amp;msg={$thread['TID']}.1\" target=\"" . html_get_frame_name('right') . "\" title=\"" . gettext("Go to first post in thread") . "\">[</a>";
         $number .= "{$thread['LENGTH']}<a href=\"messages.php?webtag={$webtag}&amp;msg={$thread['TID']}." . thread_get_last_page_pid($thread['LENGTH'], $posts_per_page) . "\" target=\"" . html_get_frame_name('right') . "\" title=\"" . gettext("Go to last post in thread") . "\">]</a>";
     } else {
         $number = "<a href=\"messages.php?webtag={$webtag}&amp;msg={$thread['TID']}.1\" target=\"" . html_get_frame_name('right') . "\" title=\"" . gettext("Go to first post in thread") . "\">[</a>";
         $number .= "1<a href=\"messages.php?webtag={$webtag}&amp;msg={$thread['TID']}.1\" target=\"" . html_get_frame_name('right') . "\" title=\"" . gettext("Go to last post in thread") . "\">]</a>";
     }
     $latest_post = 1;
     if (!is_numeric($first_thread) && isset($selected_tid) && $selected_tid == $thread['TID']) {
         $first_thread = $thread['TID'];
         echo html_style_image('bullet current_thread', gettext("Thread Options"), "t{$thread['TID']}");
     } else {
         echo html_style_image('bullet bullet', gettext("Thread Options"), "t{$thread['TID']}");
     }
 }
 echo "</a>";
 $thread_time = format_date_time($thread['MODIFIED'], true);
 echo "</td>\n";
 echo "                      <td align=\"left\" valign=\"top\">";
 echo "<a href=\"messages.php?webtag={$webtag}&amp;msg={$thread['TID']}.{$latest_post}\" target=\"", html_get_frame_name('right'), "\" class=\"threadname\" data-tid=\"t{$thread['TID']}\"";
 echo "title=\"", sprintf(gettext("Thread #%s Started by %s. Viewed %s"), $thread['TID'], word_filter_add_ob_tags(format_user_name($thread['LOGON'], $thread['NICKNAME']), true), $thread['VIEWCOUNT'] == 1 ? gettext("1 time") : sprintf(gettext("%d times"), $thread['VIEWCOUNT'])), "\">";
 echo word_filter_add_ob_tags($thread['TITLE'], true), "</a> ";
 if (session::logged_in()) {
     if (isset($thread['INTEREST']) && $thread['INTEREST'] == THREAD_INTERESTED) {
         echo "", html_style_image('high_interest', gettext("High Interest")), " ";
     }
     if (isset($thread['INTEREST']) && $thread['INTEREST'] == THREAD_SUBSCRIBED) {
         echo "", html_style_image('subscribe', gettext("Subscribed")), " ";
     }
     if (isset($thread['RELATIONSHIP']) && $thread['RELATIONSHIP'] & USER_FRIEND) {
         echo "", html_style_image('friend', gettext("Friend")), " ";
     }
开发者ID:DeannaG65,项目名称:BeehiveForumMods,代码行数:31,代码来源:thread_list.php

示例11: word_filter_add_ob_tags

                 $message['TITLE'] = word_filter_add_ob_tags(mb_substr($message['TITLE'], 0, 20), true) . "&hellip;";
             } else {
                 $message['TITLE'] = word_filter_add_ob_tags($message['TITLE'], true);
             }
             // Limit displayed post content to 35 characters
             if (mb_strlen($message['CONTENT']) > 70) {
                 $message['CONTENT'] = word_filter_add_ob_tags(fix_html(mb_substr($message['CONTENT'], 0, 70)), true) . "&hellip;";
             } else {
                 $message['CONTENT'] = word_filter_add_ob_tags($message['CONTENT'], true);
             }
             if (thread_is_poll($search_result['TID']) && $search_result['PID'] == 1 || strlen($message['CONTENT']) < 1) {
                 echo "  <li><p><a href=\"messages.php?webtag={$webtag}&amp;msg={$search_result['TID']}.{$search_result['PID']}&amp;hightlight=yes\" target=\"", html_get_frame_name('right'), "\"><b>{$message['TITLE']}</b></a><br />";
                 echo "<span><b>", gettext("From"), ":</b> ", word_filter_add_ob_tags(format_user_name($search_result['FROM_LOGON'], $search_result['FROM_NICKNAME']), true), ", ", format_date_time($search_result['CREATED']), "</span></p></li>\n";
             } else {
                 echo "  <li><p><a href=\"messages.php?webtag={$webtag}&amp;msg={$search_result['TID']}.{$search_result['PID']}&amp;highlight=yes\" target=\"", html_get_frame_name('right'), "\"><b>{$message['TITLE']}</b></a><br />";
                 echo "{$message['CONTENT']}<br /><span><b>", gettext("From"), ":</b> ", word_filter_add_ob_tags(format_user_name($search_result['FROM_LOGON'], $search_result['FROM_NICKNAME']), true), ", ", format_date_time($search_result['CREATED']), "</span></p></li>\n";
             }
         }
     }
 }
 echo "</ol>\n";
 if (ceil($search_results_array['result_count'] / 20) > $page) {
     echo "", html_style_image('current_thread'), "&nbsp;<a href=\"search.php?webtag={$webtag}&amp;page=", $page + 1, "&amp;sort_by={$sort_by}&amp;sort_dir={$sort_dir}\">", gettext("Find more"), "</a><br />\n";
 }
 echo "<br />\n";
 echo "<form accept-charset=\"utf-8\" name=\"f_nav\" method=\"get\" action=\"search.php\" target=\"_self\">\n";
 echo "  ", form_input_hidden("webtag", htmlentities_array($webtag)), "\n";
 echo "  ", form_input_hidden("page", isset($page) ? htmlentities_array($page) : 1), "\n";
 echo "  <table cellpadding=\"2\" cellspacing=\"0\">\n";
 echo "    <tr>\n";
 echo "      <td align=\"left\" colspan=\"2\">", gettext("Sort Results"), ":</td>\n";
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:31,代码来源:search.php

示例12: visitor_log_browse_items


//.........这里部分代码省略.........
            }
        }
    }
    // Main query NULL column filtering
    if (sizeof($having_query_array) > 0) {
        $having_sql = sprintf("HAVING %s", implode(" OR ", $having_query_array));
    } else {
        $having_sql = "";
    }
    if (sizeof($where_query_array) > 0) {
        $where_sql = sprintf("WHERE %s", implode(" AND ", $where_query_array));
    } else {
        $where_sql = "";
    }
    // Sort direction specified?
    if (is_numeric($sort_by)) {
        $order_sql = "ORDER BY ENTRY_{$sort_by} {$sort_dir} ";
    } else {
        if (isset($column_sort_alias[$sort_by])) {
            $order_sql = "ORDER BY {$column_sort_alias[$sort_by]} {$sort_dir} ";
        } else {
            $order_sql = "ORDER BY {$sort_by} {$sort_dir}";
        }
    }
    // Limit the display to 10 per page.
    $limit_sql = "LIMIT {$offset}, 10";
    // Array to store our results in.
    $user_array = array();
    // Combine the profile columns with the main select SQL.
    $query_array_merge = array_merge(array($select_sql), $profile_entry_array, $profile_item_type_array, $profile_item_options_array);
    // Construct final SQL query.
    $sql = implode(",", $query_array_merge) . "{$from_sql} {$join_sql} ";
    $sql .= "{$where_sql} {$having_sql} {$order_sql} {$limit_sql}";
    if (!($result = $db->query($sql))) {
        return false;
    }
    // Fetch the number of total results
    $sql = "SELECT FOUND_ROWS() AS ROW_COUNT";
    if (!($result_count = $db->query($sql))) {
        return false;
    }
    list($user_count) = $result_count->fetch_row();
    // Check if we have any results.
    if ($result->num_rows == 0 && $user_count > 0 && $page > 1) {
        return visitor_log_browse_items($user_search, $profile_items_array, $page - 1, $sort_by, $sort_dir, $hide_empty, $hide_guests);
    }
    while (($user_data = $result->fetch_assoc()) !== null) {
        if (isset($user_data['LOGON']) && isset($user_data['PEER_NICKNAME'])) {
            if (!is_null($user_data['PEER_NICKNAME']) && strlen($user_data['PEER_NICKNAME']) > 0) {
                $user_data['NICKNAME'] = $user_data['PEER_NICKNAME'];
            }
        }
        if ($user_data['UID'] == 0) {
            $user_data['LOGON'] = gettext("Guest");
            $user_data['NICKNAME'] = gettext("Guest");
        } else {
            if (!isset($user_data['LOGON']) || is_null($user_data['LOGON'])) {
                $user_data['LOGON'] = gettext("Unknown user");
                $user_data['NICKNAME'] = "";
            }
        }
        if (isset($user_data['LAST_VISIT']) && is_numeric($user_data['LAST_VISIT'])) {
            $user_data['LAST_VISIT'] = format_date_time($user_data['LAST_VISIT']);
        } else {
            $user_data['LAST_VISIT'] = gettext("Unknown");
        }
        if (isset($user_data['REGISTERED']) && is_numeric($user_data['REGISTERED'])) {
            $user_data['REGISTERED'] = format_date_time($user_data['REGISTERED']);
        } else {
            $user_data['REGISTERED'] = gettext("Unknown");
        }
        if (!isset($user_data['AGE']) || !is_numeric($user_data['AGE'])) {
            $user_data['AGE'] = gettext("Unknown");
        }
        if (!($user_data['DOB'] = format_birthday($user_data['DOB']))) {
            $user_data['DOB'] = gettext("Unknown");
        }
        $user_data['TIMEZONE'] = timezone_id_to_string($user_data['TIMEZONE']);
        if (isset($user_data['LOCAL_TIME']) && is_numeric($user_data['LOCAL_TIME'])) {
            $user_data['LOCAL_TIME'] = format_date_time($user_data['LOCAL_TIME']);
        } else {
            $user_data['LOCAL_TIME'] = gettext("Unknown");
        }
        if (!isset($user_data['POST_COUNT']) || !is_numeric($user_data['POST_COUNT'])) {
            $user_data['POST_COUNT'] = 0;
        }
        if (!isset($user_data['POST_VOTE_TOTAL']) || !is_numeric($user_data['POST_VOTE_TOTAL'])) {
            $user_data['POST_VOTE_TOTAL'] = 0;
        }
        if (!isset($user_data['POST_VOTE_DOWN']) || !is_numeric($user_data['POST_VOTE_DOWN'])) {
            $user_data['POST_VOTE_DOWN'] = 0;
        }
        if (!isset($user_data['POST_VOTE_UP']) || !is_numeric($user_data['POST_VOTE_UP'])) {
            $user_data['POST_VOTE_UP'] = 0;
        }
        $user_data['POST_SCORES'] = sprintf(gettext("%d total, %d down - %d up"), $user_data['POST_VOTE_TOTAL'], $user_data['POST_VOTE_DOWN'], $user_data['POST_VOTE_UP']);
        $user_array[] = $user_data;
    }
    return array('user_count' => $user_count, 'user_array' => $user_array);
}
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:101,代码来源:visitor_log.inc.php

示例13: user_date

</option>
                <?php 
    }
}
?>
                </select></td>
    </tr><tr class="oddRow">
                            <td class="bldTxt" align="right" width="25%">Added Date :</td>
                            <td align="left" width="75%" class="txt"> <input name="added_date" type="text" class="txtfld datepicker" id="added_date" value="<?php 
echo user_date($added_date);
?>
" size="20"></td>
    </tr><tr class="evenRow">
                            <td class="bldTxt" align="right" width="25%">Datetime :</td>
                            <td align="left" width="75%" class="txt"> <input name="datetime" type="text" class="txtfld datetimepicker" id="datetime" value="<?php 
echo format_date_time($datetime, 1);
?>
" size="30"></td>
    </tr><tr class="oddRow">
                            <td class="bldTxt" align="right" width="25%">Status :</td>
                            <td align="left" width="75%" class="txt"> <select name="status" class="txtfld" id="status">
                    <option value="1" <?php 
if ($status == 1) {
    echo "selected='selected'";
}
?>
>Activate</option>
                    <option value="0"  <?php 
if ($status == 0) {
    echo "selected='selected'";
}
开发者ID:shahsankets,项目名称:codeBaker,代码行数:31,代码来源:products_addf.php

示例14: pm_display

function pm_display($message_data, $preview = false, $export_html = false)
{
    $webtag = get_webtag();
    forum_check_webtag_available($webtag);
    echo "<div align=\"center\">\n";
    echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n";
    echo "    <tr>\n";
    echo "      <td align=\"left\">\n";
    echo "        <table class=\"box\" width=\"100%\" cellpadding=\"0\">\n";
    echo "          <tr>\n";
    echo "            <td align=\"left\">\n";
    echo "              <table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n";
    echo "                <tr>\n";
    echo "                  <td align=\"left\">\n";
    echo "                    <table width=\"100%\" class=\"posthead\" cellspacing=\"1\" cellpadding=\"0\">\n";
    echo "                      <tr>\n";
    if ($export_html === true) {
        echo "                        <td width=\"1%\" align=\"right\" style=\"white-space: nowrap\"><span class=\"posttofromlabel\">&nbsp;", gettext("From"), ":&nbsp;</span></td>\n";
        echo "                        <td style=\"white-space: nowrap\" width=\"98%\" align=\"left\"><span class=\"posttofrom\">", word_filter_add_ob_tags(format_user_name($message_data['FROM_LOGON'], $message_data['FROM_NICKNAME']), true), "</span></td>\n";
    } else {
        echo "                        <td width=\"1%\" align=\"right\" style=\"white-space: nowrap\"><span class=\"posttofromlabel\">&nbsp;", gettext("From"), ":&nbsp;</span></td>\n";
        echo "                        <td style=\"white-space: nowrap\" width=\"98%\" align=\"left\"><span class=\"posttofrom\"><a href=\"user_profile.php?webtag={$webtag}&amp;uid={$message_data['FROM_UID']}\" target=\"_blank\" class=\"popup 650x500\">", word_filter_add_ob_tags(format_user_name($message_data['FROM_LOGON'], $message_data['FROM_NICKNAME']), true), "</a></span></td>\n";
    }
    if (isset($message_data['TYPE']) && $message_data['TYPE'] & PM_SAVED_DRAFT) {
        echo "                        <td align=\"right\" style=\"white-space: nowrap\"><span class=\"postinfo\"><i>", gettext("Not Sent"), "</i>&nbsp;</span></td>\n";
    } else {
        echo "                        <td align=\"right\" style=\"white-space: nowrap\"><span class=\"postinfo\">", format_date_time($message_data['CREATED']), "&nbsp;</span></td>\n";
    }
    echo "                      </tr>\n";
    echo "                      <tr>\n";
    echo "                        <td width=\"1%\" align=\"right\" style=\"white-space: nowrap\"><span class=\"posttofromlabel\">&nbsp;", gettext("Subject"), ":&nbsp;</span></td>\n";
    if (strlen(trim($message_data['SUBJECT'])) > 0) {
        echo "                        <td style=\"white-space: nowrap\" width=\"98%\" align=\"left\"><span class=\"posttofrom\">", word_filter_add_ob_tags($message_data['SUBJECT'], true), "</span></td>\n";
    } else {
        echo "                        <td style=\"white-space: nowrap\" width=\"98%\" align=\"left\"><span class=\"posttofrom\"><i>", gettext("No Subject"), "</i></span></td>\n";
    }
    echo "                      </tr>\n";
    echo "                      <tr>\n";
    echo "                        <td width=\"1%\" align=\"right\" style=\"white-space: nowrap\"><span class=\"posttofromlabel\">&nbsp;", gettext("To"), ":&nbsp;</span></td>\n";
    if (isset($message_data['RECIPIENTS']) && sizeof($message_data['RECIPIENTS']) > 0) {
        echo "                        <td style=\"white-space: nowrap\" width=\"98%\" align=\"left\"><span class=\"posttofrom\">";
        foreach ($message_data['RECIPIENTS'] as $recipient) {
            echo "                          <a href=\"user_profile.php?webtag={$webtag}&amp;uid={$recipient['UID']}\" target=\"_blank\" class=\"popup 650x500\">", word_filter_add_ob_tags(format_user_name($recipient['LOGON'], $recipient['NICKNAME']), true), "</a>";
        }
        echo "                  </td>\n";
    } else {
        echo "                        <td style=\"white-space: nowrap\" width=\"98%\" align=\"left\"><span class=\"posttofrom\">", gettext('Unknown User'), "</td>\n";
    }
    $message_data['CONTENT'] = message_apply_formatting($message_data['CONTENT']);
    $message_data['CONTENT'] = word_filter_add_ob_tags($message_data['CONTENT']);
    echo "                      </tr>\n";
    echo "                    </table>\n";
    echo "                  </td>\n";
    echo "                </tr>\n";
    echo "                <tr>\n";
    echo "                  <td align=\"left\">\n";
    echo "                    <table width=\"100%\">\n";
    echo "                      <tr>\n";
    echo "                        <td colspan=\"3\" align=\"left\">&nbsp;</td>\n";
    echo "                      </tr>\n";
    echo "                      <tr>\n";
    echo "                        <td class=\"postbody overflow_content\" align=\"left\">{$message_data['CONTENT']}</td>\n";
    echo "                      </tr>\n";
    if (isset($message_data['ATTACHMENTS']) && sizeof($message_data['ATTACHMENTS']) > 0) {
        if (($attachments_array = attachments_get($message_data['FROM_UID'], $message_data['ATTACHMENTS'])) !== false) {
            echo "              <tr>\n";
            echo "                <td class=\"postbody\" align=\"left\">\n";
            echo "                  <p><b>", gettext("Attachments"), ":</b><br />\n";
            foreach ($attachments_array as $attachment) {
                echo attachments_make_link($attachment), $attachment['thumbnail'] == 'N' ? "<br />\n" : "\n";
            }
            echo "                  </p>\n";
            echo "                </td>\n";
            echo "              </tr>\n";
        }
    }
    echo "                    </table>\n";
    echo "                    <table width=\"100%\" class=\"postresponse\" cellspacing=\"1\" cellpadding=\"0\">\n";
    echo "                      <tr>\n";
    echo "                        <td align=\"center\">\n";
    if ($preview === false) {
        if ($message_data['TYPE'] & PM_INBOX_ITEMS) {
            echo "", html_style_image('post', "Reply"), "&nbsp;<a href=\"pm_write.php?webtag={$webtag}&amp;reply_to={$message_data['MID']}\" target=\"", html_get_frame_name('main'), "\">", gettext("Reply"), "</a>&nbsp;\n";
            if (isset($message_data['RECIPIENTS']) && sizeof($message_data['RECIPIENTS']) > 1) {
                echo "", html_style_image('reply_all', "Reply All"), "&nbsp;<a href=\"pm_write.php?webtag={$webtag}&amp;replyall={$message_data['MID']}\" target=\"", html_get_frame_name('main'), "\">", gettext("Reply All"), "</a>&nbsp;\n";
            }
            echo "", html_style_image('forward', "Forward"), "&nbsp;<a href=\"pm_write.php?webtag={$webtag}&amp;fwdmsg={$message_data['MID']}\" target=\"", html_get_frame_name('main'), "\">", gettext("Forward"), "</a>&nbsp;\n";
        } else {
            if ($message_data['TYPE'] & PM_DRAFT_ITEMS) {
                echo "", html_style_image('edit', "Edit"), "&nbsp;<a href=\"pm_write.php?webtag={$webtag}&amp;editmsg={$message_data['MID']}\" target=\"", html_get_frame_name('main'), "\">", gettext("Edit"), "</a>&nbsp;\n";
            } else {
                if ($message_data['EDITABLE'] == 1) {
                    echo "", html_style_image('post', "Edit"), "&nbsp;<a href=\"pm_edit.php?webtag={$webtag}&amp;mid={$message_data['MID']}\" target=\"", html_get_frame_name('main'), "\">", gettext("Edit"), "</a>&nbsp;\n";
                }
                echo "", html_style_image('forward', "Forward"), "&nbsp;<a href=\"pm_write.php?webtag={$webtag}&amp;fwdmsg={$message_data['MID']}\" target=\"", html_get_frame_name('main'), "\">", gettext("Forward"), "</a>&nbsp;\n";
            }
        }
    }
    echo "                        </td>\n";
    echo "                      </tr>\n";
//.........这里部分代码省略.........
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:101,代码来源:pm.inc.php

示例15: drawName

function drawName($userID, $name, $date = false, $withtime = false, $separator = "<br>")
{
    global $_josh, $locale;
    $date = $date ? format_date_time($date, "", $separator) : false;
    return '
		<div class="user">
			<a href="http://' . $_josh["request"]["host"] . '/staff/view.php?id=' . $userID . '">' . drawImg($userID) . format_string($name, 20) . '</a>' . $date . '
		</div>';
}
开发者ID:joshreisner,项目名称:hcfa-cc,代码行数:9,代码来源:include.php


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