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


PHP AT_date函数代码示例

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


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

示例1: blogs_news

function blogs_news()
{
    global $db, $enrolled_courses, $system_courses;
    $news = array();
    if ($enrolled_courses == '') {
        return $news;
    }
    $sql = "SELECT G.group_id, G.title, G.modules, T.course_id FROM " . TABLE_PREFIX . "groups G INNER JOIN " . TABLE_PREFIX . "groups_types  T USING (type_id) WHERE T.course_id IN {$enrolled_courses} ORDER BY G.title";
    $result = mysql_query($sql, $db);
    if ($result) {
        if (mysql_num_rows($result) > 0) {
            while ($row = mysql_fetch_assoc($result)) {
                if (strpos($row['modules'], '_standard/blogs') !== FALSE) {
                    // retrieve the last posted date/time from this blog
                    $sql = "SELECT MAX(date) AS date FROM " . TABLE_PREFIX . "blog_posts WHERE owner_type=" . BLOGS_GROUP . " AND owner_id={$row['group_id']}";
                    $date_result = mysql_query($sql, $db);
                    $row2 = mysql_fetch_assoc($date_result);
                    $last_updated = ' - ' . _AT('last_updated', AT_date(_AT('forum_date_format'), $row2['date'], AT_DATE_MYSQL_DATETIME));
                    $link_title = $row['title'];
                    $news[] = array('time' => $row2['date'], 'object' => $row, 'alt' => _AT('blogs'), 'course' => $system_courses[$row['course_id']]['title'], 'thumb' => 'images/home-blogs_sm.png', 'link' => '<a href="bounce.php?course=' . $row['course_id'] . SEP . 'p=' . urlencode('mods/_standard/blogs/view.php?ot=' . BLOGS_GROUP . SEP . 'oid=' . $row['group_id']) . '"' . (strlen($link_title) > SUBLINK_TEXT_LEN ? ' title="' . AT_print($link_title, 'blog_posts.title') . '"' : '') . '>' . AT_print(validate_length($link_title, SUBLINK_TEXT_LEN, VALIDATE_LENGTH_FOR_DISPLAY), 'blog_posts.title') . '</a>');
                }
            }
        }
    }
    return $news;
}
开发者ID:vicentborja,项目名称:ATutor,代码行数:26,代码来源:module_news.php

示例2: blogs_news

function blogs_news()
{
    global $db, $enrolled_courses, $system_courses;
    $news = array();
    if ($enrolled_courses == '') {
        return $news;
    }
    $sql = "SELECT G.group_id, G.title, G.modules, T.course_id FROM %sgroups G INNER JOIN %sgroups_types  T USING (type_id) WHERE T.course_id IN %s ORDER BY G.title";
    $rows_enrolled = queryDB($sql, array(TABLE_PREFIX, TABLE_PREFIX, $enrolled_courses));
    if (count($rows_enrolled) > 0) {
        foreach ($rows_enrolled as $row) {
            if (strpos($row['modules'], '_standard/blogs') !== FALSE) {
                // check for group membership before showing news.
                $sql = "SELECT member_id FROM %sgroups_members WHERE member_id=%d AND group_id= %d";
                $row_group_member = queryDB($sql, array(TABLE_PREFIX, $_SESSION['member_id'], $row['group_id']), TRUE);
                // check for course instructor, show blog news if so
                $sql = "SELECT member_id from %scourses WHERE member_id =%d";
                $row_instructor = queryDB($sql, array(TABLE_PREFIX, $_SESSION['member_id']));
                if (count($row_group_member) > 0 || count($row_instructor) > 0) {
                    // retrieve the last posted date/time from this blog
                    $sql = "SELECT MAX(date) AS date FROM %sblog_posts WHERE owner_type=%d AND owner_id=%d";
                    $row2 = queryDB($sql, array(TABLE_PREFIX, BLOGS_GROUP, $row['group_id']), TRUE);
                    $last_updated = ' - ' . _AT('last_updated', AT_date(_AT('forum_date_format'), $row2['date'], AT_DATE_MYSQL_DATETIME));
                    $link_title = $row['title'];
                    $news[] = array('time' => $row2['date'], 'object' => $row, 'alt' => _AT('blogs'), 'course' => $system_courses[$row['course_id']]['title'], 'thumb' => 'images/home-blogs_sm.png', 'link' => '<a href="bounce.php?course=' . $row['course_id'] . SEP . 'p=' . urlencode('mods/_standard/blogs/view.php?ot=' . BLOGS_GROUP . SEP . 'oid=' . $row['group_id']) . '"' . (strlen($link_title) > SUBLINK_TEXT_LEN ? ' title="' . AT_print($link_title, 'blog_posts.title') . '"' : '') . '>' . AT_print(validate_length($link_title, SUBLINK_TEXT_LEN, VALIDATE_LENGTH_FOR_DISPLAY), 'blog_posts.title') . '</a>');
                }
            }
        }
    }
    return $news;
}
开发者ID:genaromendezl,项目名称:ATutor,代码行数:31,代码来源:module_news.php

示例3: print_entry2

function print_entry2($row)
{
    global $page, $system_courses, $forum_info;
    static $counter;
    $counter++;
    $reply_link = '<a href="forum/view.php?fid=' . $row['forum_id'] . SEP . 'pid=';
    if ($row['parent_id'] == 0) {
        $reply_link .= $row['post_id'];
    } else {
        $reply_link .= $row['parent_id'];
    }
    $reply_link .= SEP . 'reply=' . $row['post_id'] . SEP . 'page=' . $page . '#post" >' . _AT('reply') . '</a>';
    ?>

	<li class="<?php 
    if ($counter % 2) {
        echo 'odd';
    } else {
        echo 'even';
    }
    ?>
">
		<a name="<?php 
    echo $row['post_id'];
    ?>
"></a>
		<div class="forum-post-author">
			<label class="title"><?php 
    echo htmlspecialchars(get_display_name($row['member_id']));
    ?>
</label><br />
		</div>

		<div class="forum-post-content">
			
			<div class="date">
                <p><?php 
    echo AT_date(_AT('forum_date_format'), $row['date'], AT_DATE_MYSQL_DATETIME);
    ?>
</p>
            </div>
            <div class="postheader"><h3><?php 
    echo AT_Print($row['subject'], 'forums_threads.subject');
    ?>
</h3></div>
				
			<div class="body">
				<p><?php 
    echo AT_print($row['body'], 'forums_threads.body');
    ?>
</p>
			</div>
		</div>
	</li>
<?php 
}
开发者ID:vicentborja,项目名称:ATutor,代码行数:56,代码来源:forum_post.php

示例4: _AT

    $list = $Backup->getAvailableList();
    echo '<tr><th colspan="4">' . $course['title'] . '</th></tr>';
    if (empty($list)) {
        ?>
			<tr>
				<td colspan="4"><?php 
        echo _AT('none_found');
        ?>
</td>
			</tr><?php 
        $num_backups++;
    } else {
        foreach ($list as $row) {
            echo '<tr onmousedown="document.form1[\'c' . $row['backup_id'] . '_' . $row['course_id'] . '\'].checked = true; rowselect(this);" id="r_' . $row['backup_id'] . '"><td><input type="radio" value="' . $row['backup_id'] . '_' . $row['course_id'] . '" name="backup_id" id="c' . $row['backup_id'] . '_' . $row['course_id'] . '" />';
            echo '<label for="c' . $row['backup_id'] . '_' . $row['course_id'] . '">' . $row['file_name'] . '</label></td>';
            echo '<td>' . AT_date(_AT('filemanager_date_format'), $row['date_timestamp'], AT_DATE_UNIX_TIMESTAMP) . '</td>';
            echo '<td align="right" class="hidecol480">' . get_human_size($row['file_size']) . '</td>';
            echo '<td class="hidecol480">' . AT_print($row['description'], 'backups.description') . '</td>';
            echo '</tr>';
            $num_backups++;
        }
    }
}
if (!$num_backups) {
    ?>
	<tr>
		<td colspan="4"><?php 
    echo _AT('none_found');
    ?>
</td>
	</tr>
开发者ID:genaromendezl,项目名称:ATutor,代码行数:31,代码来源:index.php

示例5: _AT

					<input type="submit" name="edit_cancel" value="<?php 
            echo _AT('cancel');
            ?>
" />
				</div>
				</form>
						
			<?php 
        } else {
            ?>
				<div class="row">
					<h4><?php 
            echo get_display_name($row['member_id']);
            ?>
 - <?php 
            echo AT_date(_AT('filemanager_date_format'), $row['date'], AT_DATE_MYSQL_DATETIME);
            ?>
</h4>
					<p><?php 
            echo nl2br(htmlspecialchars($row['comment']));
            ?>
</p>
						<?php 
            if ($row['member_id'] == $_SESSION['member_id'] || $current_file['member_id'] == $_SESSION['member_id']) {
                ?>
							<div style="text-align:right; font-size: smaller">
								<a href="<?php 
                echo url_rewrite('mods/_standard/file_storage/comments.php' . $owner_arg_prefix . 'id=' . $id . SEP . 'comment_id=' . $row['comment_id'] . '#c' . $row['comment_id']);
                ?>
"><?php 
                echo _AT('edit');
开发者ID:genaromendezl,项目名称:ATutor,代码行数:31,代码来源:comments.php

示例6: file

		}else{
		// if less than PHP version 5, read a text file to generate the menu
			$timezone_names = file("timezones.txt");
		}

		echo '<select name="time_zone">';
		foreach($timezone_names as $timezone_name){
			if($timezone_name == $_config{'time_zone'}){
				$selected = ' selected="selected"';
			}
			echo '<option'.$selected.'>'.$timezone_name.'</option>';
			$selected = '';
		}
		echo '</select>';
*/
echo AT_date(_AT('server_date_format'), '', AT_DATE_MYSQL_DATETIME);
?>
	</div>
    <?php 
// disable this setting on ATutorSpaces
if (!$this->service_installed) {
    ?>
        <div class="row">
            <?php 
    $timeout_arr = array(10, 15, 20, 30, 60, 120, 1440);
    ?>
            <label for="session_timeout"><?php 
    echo _AT('session_timeout');
    ?>
</label> (<?php 
    echo _AT('default');
开发者ID:genaromendezl,项目名称:ATutor,代码行数:31,代码来源:config_edit.tmpl.php

示例7: _AT

            echo '<strong>' . _AT('ongoing') . '</strong>';
        } else {
            if ($row['ue'] < time()) {
                echo '<strong>' . _AT('expired') . '</strong>';
            } else {
                if ($row['us'] > time()) {
                    echo '<strong>' . _AT('pending') . '</strong>';
                }
            }
        }
        ?>
</td>
			<td><?php 
        $startend_date_format = _AT('startend_date_format');
        echo AT_date($startend_date_format, $row['start_date'], AT_DATE_MYSQL_DATETIME) . ' ' . _AT('to_2') . ' ';
        echo AT_date($startend_date_format, $row['end_date'], AT_DATE_MYSQL_DATETIME);
        ?>
</td>

			<td  class="hidecol700"><?php 
        if ($row['result_release'] == AT_RELEASE_IMMEDIATE) {
            echo _AT('release_immediate');
        } else {
            if ($row['result_release'] == AT_RELEASE_MARKED) {
                echo _AT('release_marked');
            } else {
                if ($row['result_release'] == AT_RELEASE_NEVER) {
                    echo _AT('release_never');
                }
            }
        }
开发者ID:genaromendezl,项目名称:ATutor,代码行数:31,代码来源:index.php

示例8: AT_print

        echo '<td align="left" valign="middle">';
        if ($_GET['view'] != $row['message_id']) {
            echo $name;
        } else {
            echo '<strong>' . $name . '</strong>';
        }
        echo '</td>';
        echo '<td><label for="m' . $row['message_id'] . '">';
        if ($_GET['view'] != $row['message_id']) {
            echo '<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $row['message_id'] . '">' . AT_print($row['subject'], 'messages.subject') . '</a>';
        } else {
            echo '<strong>' . AT_print($row['subject'], 'messages.subject') . '</strong>';
        }
        echo '</label></td>';
        echo '<td valign="middle" align="left" nowrap="nowrap">';
        echo AT_date(_AT('inbox_date_format'), $row['date_sent'], AT_DATE_MYSQL_DATETIME);
        echo '</td>';
        echo '</tr>';
    }
} else {
    ?>
	<tr>
		<td colspan="5"><?php 
    echo _AT('none_found');
    ?>
</td>
	</tr>
<?php 
}
?>
</tbody>
开发者ID:genaromendezl,项目名称:ATutor,代码行数:31,代码来源:inbox.tmpl.php

示例9: get_human_size

                    $trans_count++;
                    if ($trans_count > 15) {
                        exit;
                        // INF loop safety thing..
                    }
                }
            }
            $translated_file_names[$list[$i]['index']] = $path_parts['dirname'] . $trans_name;
            if ($path_parts['dirname'] . $trans_name != $filename) {
                $files[strtolower($filename)] .= ' => ' . $trans_name;
            }
        }
        $files[strtolower($filename)] .= '</td>';
        $files[strtolower($filename)] .= '<td align="right">' . get_human_size($list[$i]['size']) . ' </td>';
        $files[strtolower($filename)] .= '<td>&nbsp;';
        $files[strtolower($filename)] .= AT_date(_AT('filemanager_date_format'), $list[$i]['mtime'], AT_DATE_UNIX_TIMESTAMP);
        $files[strtolower($filename)] .= '</td>';
        $files[strtolower($filename)] .= '</tr>';
    }
}
$sql = "SELECT max_quota, max_file_size FROM %scourses WHERE course_id=%d";
$row = queryDB($sql, array(TABLE_PREFIX, $_SESSION['course_id']), TRUE);
$my_MaxCourseSize = $row['max_quota'];
$my_MaxFileSize = $row['max_file_size'];
$course_total = dirsize($path);
if ($my_MaxCourseSize == AT_COURSESIZE_UNLIMITED) {
    $total_after = 1;
} else {
    if ($my_MaxCourseSize == AT_COURSESIZE_DEFAULT) {
        $my_MaxCourseSize = $MaxCourseSize;
        $total_after = get_human_size($my_MaxCourseSize - $course_total - $totalBytes);
开发者ID:genaromendezl,项目名称:ATutor,代码行数:31,代码来源:zip.php

示例10: _AT

						<?php 
            echo _AT('never');
            ?>
					<?php 
        } else {
            ?>
						<?php 
            //echo AT_date('%d/%m/%y - %H:%i', $row['last_login'], AT_DATE_MYSQL_TIMESTAMP_14);
            echo AT_date($startend_date_longs_format, $row['last_login'], AT_DATE_MYSQL_TIMESTAMP_14);
            ?>
					<?php 
        }
        ?>
				</td>
				<td><?php 
        echo AT_date($startend_date_longs_format, $row['creation_date'], AT_DATE_MYSQL_DATETIME);
        ?>
</td>
			</tr>
		<?php 
    }
    ?>
	</tbody>
<?php 
} else {
    ?>
	<tr>
		<td colspan="<?php 
    echo 9 + $col_counts;
    ?>
"><?php 
开发者ID:vicentborja,项目名称:ATutor,代码行数:31,代码来源:users.tmpl.php

示例11: AT_print

        echo $row['news_id'];
        ?>
" id="n<?php 
        echo $row['news_id'];
        ?>
" /></td>
				
				<td><label for="n<?php 
        echo $row['news_id'];
        ?>
"><?php 
        echo AT_print($row['title'], 'news.title');
        ?>
</label></td>
				<td><?php 
        echo AT_date(_AT('announcement_date_format'), $row['date'], AT_DATE_MYSQL_DATETIME);
        ?>
</td>
			</tr>
		<?php 
    } while ($row = mysql_fetch_assoc($this->result));
    ?>
	<?php 
} else {
    ?>
		<tr>
			<td colspan="3"><?php 
    echo _AT('none_found');
    ?>
</td>
		</tr>
开发者ID:vicentborja,项目名称:ATutor,代码行数:31,代码来源:index.tmpl.php

示例12: COUNT

<?php 
$sql = "SELECT content_id, COUNT(*) AS unique_hits, \n\t            SUM(counter) AS total_hits, \n\t            SEC_TO_TIME(SUM(duration)/SUM(counter)) AS average_duration, \n\t            SEC_TO_TIME(SUM(duration)) AS total_duration, last_accessed \n\t        FROM %smember_track \n\t        WHERE course_id=%d AND member_id=%d GROUP BY content_id ORDER BY total_hits DESC";
$rows_hits = queryDB($sql, array(TABLE_PREFIX, $_SESSION['course_id'], $_SESSION['member_id']));
if (count($rows_hits) > 0) {
    foreach ($rows_hits as $row) {
        if ($row['total'] == '') {
            $row['total'] = _AT('na');
        }
        echo '<tr>';
        echo '<td><a href=' . AT_BASE_HREF . url_rewrite('content.php?cid=' . $row['content_id']) . '>' . $contentManager->_menu_info[$row['content_id']]['title'] . '</a></td>';
        echo '<td>' . $row['total_hits'] . '</td>';
        echo '<td>' . $row['total_duration'] . '</td>';
        if ($row['last_accessed'] == '') {
            echo '<td>' . _AT('na') . '</td>';
        } else {
            echo '<td>' . AT_date(_AT('forum_date_format'), $row['last_accessed'], AT_DATE_MYSQL_DATETIME) . '</td>';
        }
        echo '</tr>';
    }
    //end while
    echo '</tbody>';
} else {
    if ($_SESSION['is_admin'] == 1) {
        $msg->printInfos('TRACKING_NO');
    }
    echo '<tr><td colspan="4">' . _AT('none_found') . '</td></tr>';
    echo '</tbody>';
}
?>
</tbody>
</table>
开发者ID:genaromendezl,项目名称:ATutor,代码行数:31,代码来源:my_stats.php

示例13: _AT

"  class="button"/></td>
</tr>
</tfoot>
<tbody>
<?php 
if (!$this->list) {
    ?>
	<tr>
		<td colspan="4"><?php 
    echo _AT('none_found');
    ?>
</td>
	</tr>
	<?php 
} else {
    foreach ($this->list as $row) {
        echo '<tr onmousedown="document.form[\'b' . $row['backup_id'] . '\'].checked = true; rowselect(this);" id="r_' . $row['backup_id'] . '">';
        echo '<td class="row1"><label><input type="radio" value="' . $row['backup_id'] . '" name="backup_id" id="b' . $row['backup_id'] . '" />';
        echo $row['file_name'] . '</label></td>';
        echo '<td>' . AT_date(_AT('filemanager_date_format'), $row['date'], AT_DATE_MYSQL_DATETIME) . '</td>';
        echo '<td align="right">' . get_human_size($row['file_size']) . '</td>';
        echo '<td>' . AT_print($row['description'], 'backups.description') . '</td>';
        echo '</tr>';
    }
    ?>
	<?php 
}
?>
</tbody>
</table>
</form>
开发者ID:genaromendezl,项目名称:ATutor,代码行数:31,代码来源:index.tmpl.php

示例14: str_replace

                $module_content = $obj->getContent($cid);
                if (!empty($module_content)) {
                    $module_contents .= '<div id="' . str_replace('/', '-', $key) . '" class="content-from-module">' . $module_content . '</div>';
                }
            }
            if ($module_contents != '') {
                $savant->assign('module_contents', $module_contents);
            }
        }
    }
} else {
    $infos = array('NOT_RELEASED', AT_date(_AT('announcement_date_format'), $released_status, AT_DATE_UNIX_TIMESTAMP));
    $msg->addInfo($infos);
    unset($infos);
}
$savant->assign('content_info', _AT('page_info', AT_date(_AT('inbox_date_format'), $content_row['last_modified'], AT_DATE_MYSQL_DATETIME), $content_row['revision'], AT_date(_AT('inbox_date_format'), $content_row['release_date'], AT_DATE_MYSQL_DATETIME)));
require AT_INCLUDE_PATH . 'header.inc.php';
//
// Mauro Donadio
//
$fp = @file_get_contents($content_row['text']);
// just for AContent content
if (strstr($fp, 'AContentXX')) {
    //$fp		= str_ireplace('<head>','<MAURO>',$fp);
    //<base href="http://www.w3schools.com/images/" target="_blank" />
    // a new dom object
    $dom = new DomDocument();
    libxml_use_internal_errors(TRUE);
    // load the html into the object
    $dom->loadHTML($fp);
    libxml_use_internal_errors(FALSE);
开发者ID:genaromendezl,项目名称:ATutor,代码行数:31,代码来源:content.php

示例15: print_entry

function print_entry($row) {
	global $page, $system_courses, $forum_info;
	static $counter;
	$counter++;

	$reply_link = '<a href="mods/_standard/forums/forum/view.php?fid='.$row['forum_id'].SEP.'pid=';
	if ($row['parent_id'] == 0) {
		$reply_link .= $row['post_id'];
	} else {
		$reply_link .= $row['parent_id'];
	}
	$reply_link .= SEP.'reply='.$row['post_id'].SEP.'page='.$page.'#post" >'._AT('reply').'</a>';

?>

	<li class="<?php if ($counter %2) { echo 'odd'; } else { echo 'even'; } ?>">
		<a name="<?php echo $row['post_id']; ?>"></a>
		<div class="forum-post-author">
			<a href="profile.php?id=<?php echo $row['member_id']; ?>" class="title"><?php echo htmlspecialchars(get_display_name($row['member_id'])); ?></a><br />
			<?php print_profile_img($row['member_id']); ?>
		</div>

		<div class="forum-post-content">
			<h3><?php echo AT_print($row['subject'], 'forums_threads.subject'); ?></h3>
			<div>
				<div class="forum-post-ctrl">
					<?php if (authenticate(AT_PRIV_FORUMS, AT_PRIV_RETURN)): ?>
						<?php echo $reply_link; ?> | <a href="mods/_standard/forums/edit_post.php?fid=<?php echo $row['forum_id'].SEP.'pid='.$row['post_id']; ?>"><?php echo _AT('edit'); ?></a> | <a href="mods/_standard/forums/forum/delete_thread.php?fid=<?php echo $row['forum_id'].SEP.'pid='.$row['post_id'].SEP.'ppid='.$row['parent_id'].SEP; ?>nest=1"><?php echo _AT('delete'); ?></a>
					<?php elseif (($row['member_id'] == $_SESSION['member_id']) && (($row['udate'] + $forum_info['mins_to_edit'] * 60) > time())): ?>
						<?php echo $reply_link; ?> | <a href="mods/_standard/forums/edit_post.php?fid=<?php echo $row['forum_id'].SEP.'pid='.$row['post_id']; ?>"><?php echo _AT('edit'); ?></a> <span>(<?php echo _AT('edit_for_minutes', round((($row['udate'] + $forum_info['mins_to_edit'] * 60) - time())/60)); ?>)</span>
					<?php elseif ($_SESSION['valid_user']): ?>
						<?php echo $reply_link; ?>
					<?php endif; ?>
				</div>
				<p class="date">&nbsp;&nbsp;<?php echo AT_date(_AT('forum_date_format'), $row['date'], AT_DATE_MYSQL_DATETIME); ?></p>

			</div>

			<div class="body">
				<p><?php echo AT_print($row['body'], 'forums_threads.body'); ?></p>
			</div>
		</div>
	</li>
<?php
}
开发者ID:radiocontrolled,项目名称:ATutor,代码行数:45,代码来源:forums.inc.php


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