• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_display_name函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: add_test

function add_test($test_id, $title)
{
	global $db, $msg;
	
	$no_error = true;
	
	$studs_take_num = get_studs_take_more_than_once($_SESSION["course_id"], $test_id);
	
	foreach ($studs_take_num as $member_id => $num)
	{
		if ($no_error) $no_error = false;
		$error_msg .= get_display_name($member_id) . ": " . $num . " times<br>";
	}
	
	if (!$no_error)
	{
		$f = array('ADD_TEST_INTO_GRADEBOOK',
						$title, 
						$error_msg);
		$msg->addFeedback($f);
	}

	if ($no_error)  // add into gradebook
	{
	    $_POST["selected_grade_scale_id"] = intval($_POST["selected_grade_scale_id"]);
		$sql_insert = "INSERT INTO ".TABLE_PREFIX."gradebook_tests (id, type, grade_scale_id)
		               VALUES (". $test_id. ", 'ATutor Test', ".$_POST["selected_grade_scale_id"].")";
		$result_insert = mysql_query($sql_insert, $db) or die(mysql_error());
	}
}
开发者ID:radiocontrolled,项目名称:ATutor,代码行数:30,代码来源:gradebook_add_tests.php


示例2: 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


示例3: addJob

 /**
  * Add a job posting to the database.
  * @param	string	job title
  * @param	string	description
  * @param	Array	categories id
  * @param   int     1 if public; 0 otherwise.
  * @param   string  Closing date for this job post, mysql TIMESTAMP format
  * @precondition	ATutor Mailer class imported.
  */
 function addJob($title, $description, $categories, $is_public, $closing_date)
 {
     require AT_INCLUDE_PATH . 'classes/phpmailer/atutormailer.class.php';
     global $addslashes, $db, $msg, $_config, $_base_href;
     if ($_SESSION['jb_employer_id'] < 1) {
         $msg->addError();
         //authentication error
         exit;
     } else {
         include AT_JB_INCLUDE . 'Employer.class.php';
         $employer = new Employer($_SESSION['jb_employer_id']);
         $employer_id = $employer->getId();
     }
     $title = $addslashes($title);
     $description = $addslashes($description);
     $is_public = isset($is_public) ? 1 : 0;
     $closing_date = $addslashes($closing_date);
     $approval_state = $_config['jb_posting_approval'] == 1 ? AT_JB_POSTING_STATUS_UNCONFIRMED : AT_JB_POSTING_STATUS_CONFIRMED;
     $sql = 'INSERT INTO ' . TABLE_PREFIX . "jb_postings (employer_id, title, description, is_public, closing_date, created_date, revised_date, approval_state) VALUES ({$employer_id}, '{$title}', '{$description}', {$is_public}, '{$closing_date}', NOW(), NOW(), {$approval_state})";
     $result = mysql_query($sql, $db);
     $posting_id = mysql_insert_id();
     //add to posting category table
     if (!empty($categories)) {
         foreach ($categories as $id => $category) {
             $category = intval($category);
             $sql = 'INSERT INTO ' . TABLE_PREFIX . "jb_posting_categories (posting_id, category_id) VALUES ({$posting_id}, {$category})";
             mysql_query($sql, $db);
             //send out notification if the person is subscribed to the category.
             $sql = 'SELECT m.member_id, m.email FROM ' . TABLE_PREFIX . 'jb_category_subscribes cs LEFT JOIN ' . TABLE_PREFIX . "members m ON cs.member_id=m.member_id WHERE category_id={$category}";
             $result = mysql_query($sql, $db);
             $post_link = $_base_href . AT_JB_BASENAME . 'view_post.php?jid=' . $posting_id;
             if ($result) {
                 while ($row = mysql_fetch_assoc($result)) {
                     $mail = new ATutorMailer();
                     $mail->AddAddress($row['email'], get_display_name($row['member_id']));
                     $body = _AT('jb_subscription_msg', $title, $this->getCategoryNameById($category), $post_link);
                     $body .= "\n\n";
                     $body .= _AT('jb_posted_by') . ": " . htmlentities_utf8($employer->getCompany()) . "\n";
                     $mail->FromName = $_config['site_name'];
                     $mail->From = $_config['contact_email'];
                     $mail->Subject = _AT('jb_subscription_mail_subject');
                     $mail->Body = $body;
                     if (!$mail->Send()) {
                         $msg->addError('SENDING_ERROR');
                     }
                     unset($mail);
                 }
             }
         }
     }
     if (!$result) {
         //TODO: db error message
         $msg->addError();
     }
 }
开发者ID:jorge683,项目名称:job_board,代码行数:64,代码来源:Job.class.php


示例4: add_test

function add_test($test_id, $title)
{
    global $msg;
    $no_error = true;
    $studs_take_num = get_studs_take_more_than_once($_SESSION["course_id"], $test_id);
    foreach ($studs_take_num as $member_id => $num) {
        if ($no_error) {
            $no_error = false;
        }
        $error_msg .= get_display_name($member_id) . ": " . $num . " times<br>";
    }
    if (!$no_error) {
        $f = array('ADD_TEST_INTO_GRADEBOOK', $title, $error_msg);
        $msg->addFeedback($f);
    }
    if ($no_error) {
        $sql_insert = "INSERT INTO %sgradebook_tests (id, type, grade_scale_id) VALUES (%d, 'ATutor Test', %d)";
        $result_insert = queryDB($sql_insert, array(TABLE_PREFIX, $test_id, $_POST["selected_grade_scale_id"]));
    }
}
开发者ID:genaromendezl,项目名称:ATutor,代码行数:20,代码来源:gradebook_add_tests.php


示例5: is_test_updatable

function is_test_updatable($gradebook_test_id)
{
    global $msg;
    $sql = "SELECT g.id, t.title FROM %sgradebook_tests g, %stests t WHERE g.id=t.test_id AND g.type='ATutor Test' AND g.gradebook_test_id = %d";
    $row = queryDB($sql, array(TABLE_PREFIX, TABLE_PREFIX, $gradebook_test_id), TRUE);
    $no_error = true;
    $studs_take_num = get_studs_take_more_than_once($_SESSION["course_id"], $row["id"]);
    foreach ($studs_take_num as $member_id => $num) {
        if ($no_error) {
            $no_error = false;
        }
        $error_msg .= get_display_name($member_id) . ": " . $num . " times<br>";
    }
    if (!$no_error) {
        $f = array('UPDATE_GRADEBOOK', $row['title'], $error_msg);
        $msg->addFeedback($f);
    }
    if ($no_error) {
        return true;
    } else {
        return false;
    }
}
开发者ID:genaromendezl,项目名称:ATutor,代码行数:23,代码来源:update_gradebook.php


示例6: is_test_updatable

function is_test_updatable($gradebook_test_id)
{
    global $db, $msg;
    $sql = "SELECT g.id, t.title FROM " . TABLE_PREFIX . "gradebook_tests g, " . TABLE_PREFIX . "tests t WHERE g.id=t.test_id AND g.type='ATutor Test' AND g.gradebook_test_id = " . $gradebook_test_id;
    $result = mysql_query($sql, $db) or die(mysql_error());
    $row = mysql_fetch_assoc($result);
    $no_error = true;
    $studs_take_num = get_studs_take_more_than_once($_SESSION["course_id"], $row["id"]);
    foreach ($studs_take_num as $member_id => $num) {
        if ($no_error) {
            $no_error = false;
        }
        $error_msg .= get_display_name($member_id) . ": " . $num . " times<br>";
    }
    if (!$no_error) {
        $f = array('UPDATE_GRADEBOOK', $row['title'], $error_msg);
        $msg->addFeedback($f);
    }
    if ($no_error) {
        return true;
    } else {
        return false;
    }
}
开发者ID:vicentborja,项目名称:ATutor,代码行数:24,代码来源:update_gradebook.php


示例7: foreach

<div class="table-panel">
	<table class="table table-bordered">
		<thead>
			<tr>
				<?php 
foreach ($headers as $header) {
    ?>
				<th class="<?php 
    echo get_sorting_class($header);
    ?>
" data-column="<?php 
    echo $header['column_name'];
    ?>
">
					<?php 
    echo get_display_name($header);
    ?>
				</th>
				<?php 
}
?>
			</tr>
		</thead>
		<tbody>
			<?php 
foreach ($body as $data) {
    ?>
			<tr>
				<?php 
    foreach ($headers as $header) {
        ?>
开发者ID:aneasystone,项目名称:eTable,代码行数:31,代码来源:table.php


示例8: _AT

    echo $_base_href;
    ?>
themes/<?php 
    echo $_SESSION['prefs']['PREF_THEME'];
    ?>
/images/profile.gif" alt="" border="0" class="pa_tool_image"/><?php 
    echo _AT('pa_set_profile_pic');
    ?>
</a>
		</div>
		<?php 
} else {
    ?>
		<div class="photo_actions">
			<p><?php 
    echo _AT('pa_uploaded_by') . ': ' . AT_print(get_display_name($this->photo_info['member_id']), 'members.full_name');
    ?>
</p>
		</div>
		<?php 
}
?>
	</div>
</div>

<script type="text/javascript">
jQuery(document).ready(function () {
	//the ATutor undo function
	var undo = function (that, targetContainer) {
					var markup = "<span class='flc-undo' aria-live='polite' aria-relevant='all'>" +
					  "<span class='flc-undo-undoContainer'><a href='#' class='flc-undo-undoControl'>[<?php 
开发者ID:vicentborja,项目名称:ATutor,代码行数:31,代码来源:pa_photo.tmpl.php


示例9: _AT

		<input type="submit" name="move" value="<?php echo _AT('move_to_inbox'); ?>"/>
	</td>
</tr>
</tfoot>
<tbody>
<?php if ($row = mysql_fetch_assoc($this->result)): ?>
	<?php do { ?>
		<?php if ($row['message_id'] == $_GET['view']): ?>
			<tr class="selected">
		<?php else: ?>
			<tr onmousedown="document.form['m<?php echo $row['message_id']; ?>'].checked = !document.form['m<?php echo $row['message_id']; ?>'].checked; rowselectbox(this, document.form['m<?php echo $row['message_id']; ?>'].checked, '');" id="r_<?php echo $row['message_id']; ?>_1">
		<?php endif; ?>
		<td><input type="checkbox" name="id[]" value="<?php echo $row['message_id']; ?>" id="m<?php echo $row['message_id']; ?>" <?php if (isset($_POST['id']) && in_array($row['message_id'], $_POST['id'])) { echo 'checked="checked"'; } ?> title="<?php echo _AT('delete').': '.AT_print($row['subject'], 'messages.subject');?>" onmouseup="this.checked=!this.checked" /></td>
		<?php

		$name = get_display_name($row['to_member_id']);

		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>';
开发者ID:radiocontrolled,项目名称:ATutor,代码行数:31,代码来源:sent_messages.tmpl.php


示例10: header

    $to = $_base_href . 'browse.php';
}
if (isset($_POST['cancel'])) {
    $msg->addFeedback('CANCELLED');
    header('Location: ' . $to);
    exit;
}
$row = array();
$id = intval($_REQUEST['id']);
if (isset($system_courses[$id], $system_courses[$id]['member_id'])) {
    $sql = "SELECT M.member_id, M.first_name, M.last_name, M.email FROM " . TABLE_PREFIX . "members M WHERE M.member_id={$system_courses[$id][member_id]}";
    $result = mysql_query($sql, $db);
    $row = mysql_fetch_assoc($result);
}
if ($row) {
    $instructor_name = get_display_name($row['member_id']);
    $instructor_email = AT_print($row['email'], 'members.email');
} else {
    $msg->addError('INST_INFO_NOT_FOUND');
    header('Location: ' . $to);
    exit;
}
if (isset($_POST['submit'])) {
    $missing_fields = array();
    $to_email = $_POST['email'];
    $_POST['subject'] = trim($_POST['subject']);
    $_POST['body'] = trim($_POST['body']);
    if ($_POST['subject'] == '') {
        $missing_fields[] = _AT('subject');
    }
    if ($_POST['body'] == '') {
开发者ID:vicentborja,项目名称:ATutor,代码行数:31,代码来源:contact_instructor.php


示例11: queryDB

 $result = queryDB($sql, array(TABLE_PREFIX, $now, $_POST['parent_id']));
 if ($subscriber_email_list) {
     require AT_INCLUDE_PATH . 'classes/phpmailer/atutormailer.class.php';
     if ($_POST['parent_name'] == '') {
         $_POST['parent_name'] = $_POST['subject'];
     }
     $_POST['parent_name'] = urldecode($_POST['parent_name']);
     foreach ($subscriber_email_list as $subscriber) {
         $mail = new ATutorMailer();
         $mail->AddAddress($subscriber['email'], get_display_name($subscriber['member_id']));
         $body = _AT('forum_new_submsg', $_SESSION['course_title'], get_forum_name($_POST['fid']), $_POST['parent_name'], AT_BASE_HREF . 'mods/_standard/forums/forum/view.php?fid=' . $_POST['fid'] . SEP . 'pid=' . $_POST['parent_id']);
         $body .= "\n----------------------------------------------\n";
         $body .= _AT('course') . ': ' . $_SESSION['course_title'] . "\n";
         $body .= _AT('forum') . ': ' . get_forum_name($_POST['fid']) . "\n";
         $body .= _AT('thread') . ': ' . $_POST['parent_name'] . "\n";
         $body .= _AT('posted_by') . ": " . get_display_name($_SESSION['member_id']) . "\n";
         $body .= $_POST['body'] . "\n";
         $mail->FromName = $_config['site_name'];
         $mail->From = $_config['contact_email'];
         $mail->Subject = _AT('thread_notify1') . ': ' . $_POST['parent_name'];
         $mail->Body = $body;
         if (!$mail->Send()) {
             $msg->addError('SENDING_ERROR');
         }
         unset($mail);
     }
 }
 if ($_REQUEST['subscribe']) {
     if ($_POST['parent_id'] != 0) {
         $this_id = $_POST['parent_id'];
         $subject = $_POST['parent_name'];
开发者ID:zort77,项目名称:ATutor,代码行数:31,代码来源:new_thread.php


示例12: htmlspecialchars

        echo htmlspecialchars($file_info['file_name']);
        ?>
</label>
				<?php 
        if ($file_info['description']) {
            ?>
					<p class="fm-desc"><?php 
            echo htmlspecialchars($file_info['description']);
            ?>
</p>
				<?php 
        }
        ?>
			</td>
			<td valign="top"><?php 
        echo get_display_name($file_info['member_id']);
        ?>
</td>
			<td valign="top">
				<?php 
        if ($_config['fs_versioning']) {
            ?>
					<?php 
            if ($file_info['num_revisions']) {
                if ($file_info['num_revisions'] == 1) {
                    $lang_var = 'fs_revision';
                } else {
                    $lang_var = 'fs_revisions';
                }
                ?>
						
开发者ID:vicentborja,项目名称:ATutor,代码行数:30,代码来源:index.php


示例13: mysql_query

 if (defined('AUTO_APPROVE_INSTRUCTORS') && AUTO_APPROVE_INSTRUCTORS) {
     $sql = "UPDATE " . TABLE_PREFIX . "members SET status=" . AT_STATUS_INSTRUCTOR . ", creation_date=creation_date, last_login=last_login WHERE member_id={$_SESSION['member_id']}";
     $result = mysql_query($sql, $db);
     $msg->addFeedback('ACCOUNT_APPROVED');
 } else {
     $_POST['description'] = $addslashes($_POST['description']);
     $sql = "INSERT INTO " . TABLE_PREFIX . "instructor_approvals VALUES ({$_SESSION['member_id']}, NOW(), '{$_POST['description']}')";
     $result = mysql_query($sql, $db);
     /* email notification send to admin upon instructor request */
     if (EMAIL_NOTIFY && $_config['contact_email'] != '') {
         $sql = "SELECT login, email FROM " . TABLE_PREFIX . "members WHERE member_id={$_SESSION['member_id']}";
         $result = mysql_query($sql, $db);
         if ($row = mysql_fetch_assoc($result)) {
             $email = $row['email'];
         }
         $tmp_message = _AT('req_message_instructor', get_display_name($_SESSION['member_id']), $_POST['description'], AT_BASE_HREF);
         require AT_INCLUDE_PATH . 'classes/phpmailer/atutormailer.class.php';
         $mail = new ATutorMailer();
         $mail->From = $email;
         $mail->AddAddress($_config['contact_email']);
         $mail->Subject = _AT('req_message9');
         $mail->Body = stripslashes($tmp_message);
         if (!$mail->Send()) {
             //echo 'There was an error sending the message';
             $msg->printErrors('SENDING_ERROR');
             exit;
         }
         unset($mail);
     }
     $msg->addFeedback('APPROVAL_PENDING');
 }
开发者ID:vicentborja,项目名称:ATutor,代码行数:31,代码来源:request_instructor.php


示例14: get_display_name

            echo $this->cats[$row['cat_id']];
            ?>
</a>
			<?php 
        }
        ?>
		</td>
		<td>
				<a href="<?php 
        echo AT_BASE_HREF;
        ?>
contact_instructor.php?id=<?php 
        echo $row['course_id'];
        ?>
"><?php 
        echo get_display_name($row['member_id']);
        ?>
</a>
		</td>
		<td>
			<?php 
        echo _AT($row['access']);
        ?>
		</td>
		<td class="hidecol700">
		 <?php 
        // insert enrolment link if allowed
        if (isset($row['enroll_link'])) {
            ?>
 
			- <small><?php 
开发者ID:genaromendezl,项目名称:ATutor,代码行数:31,代码来源:browse.tmpl.php


示例15: _AT

         $msg = _AT('from') . ': ' . get_display_name($row['from_member_id']) . "\r\n";
         $msg .= _AT('to') . ': ' . $my_display_name . "\r\n";
         $msg .= _AT('subject') . ': ' . $row['subject'] . "\r\n";
         $msg .= _AT('date') . ': ' . $row['date_sent'] . "\r\n";
         $msg .= _AT('body') . ': ' . $row['body'] . "\r\n";
         $msg .= "\r\n=============================================\r\n\r\n";
         $inbox_messages .= $msg;
     }
 }
 // sent messages
 if ($_POST['messages'] == 1 || $_POST['messages'] == 3) {
     $sql = "SELECT * FROM " . TABLE_PREFIX . "messages_sent WHERE from_member_id={$_SESSION['member_id']} ORDER BY date_sent";
     $result = mysql_query($sql, $db);
     while ($row = mysql_fetch_assoc($result)) {
         $msg = _AT('from') . ': ' . $my_display_name . "\r\n";
         $msg .= _AT('to') . ': ' . get_display_name($row['from_member_id']) . "\r\n";
         $msg .= _AT('subject') . ': ' . $row['subject'] . "\r\n";
         $msg .= _AT('date') . ': ' . $row['date_sent'] . "\r\n";
         $msg .= _AT('body') . ': ' . $row['body'] . "\r\n";
         $msg .= "\r\n=============================================\r\n\r\n";
         $sent_messages .= $msg;
     }
 }
 if ($inbox_messages && $sent_messages) {
     // add the two to a zip file
     require AT_INCLUDE_PATH . 'classes/zipfile.class.php';
     // for zipfile
     $zipfile = new zipfile();
     $zipfile->add_file($inbox_messages, _AT('inbox') . '.txt');
     $zipfile->add_file($sent_messages, _AT('sent_messages') . '.txt');
     $zipfile->close();
开发者ID:vicentborja,项目名称:ATutor,代码行数:31,代码来源:export.php


示例16: site_url

                            <tr class="dataTableHead">
                                <td >
                                    <a href="<?php 
        echo site_url("payment/billing_detail/{$student->student_id}");
        ?>
" target="_blank"> <?php 
        echo $student->child_key;
        ?>
 </a> 
                                </td>
                                <td >
                                    <a href="<?php 
        echo site_url("child/view/{$student->student_id}");
        ?>
" target="_blank"> <?php 
        echo get_display_name($student->name, $student->alias);
        ?>
 </a>
                                </td>
                                <td ><?php 
        echo format_money($student->invoice_amount - $student->invoice_balance, $current_currency);
        ?>
</td>
                                <td >
                                    <a href="<?php 
        echo site_url("payment/summary_of_account/{$student->student_id}");
        ?>
" getLink="<?php 
        echo site_url("payment/summary_of_account/{$student->student_id}");
        ?>
" class="backable_link da-button gray">Summary</a> 
开发者ID:soarmorrow,项目名称:ci-kindergarden,代码行数:31,代码来源:billing_summary.php


示例17: AT_print

            echo $comment_array['id'];
            ?>
" ><?php 
            echo AT_print($comment_array['comment'], 'photo_albums.comment');
            ?>
</span>
					</div>
					<?php 
        } else {
            ?>
					<div>
						<a href="profile.php?id=<?php 
            echo $comment_array['member_id'];
            ?>
"><strong><?php 
            echo AT_print(get_display_name($comment_array['member_id']), 'members.full_name');
            ?>
</a></strong>
						<?php 
            echo htmlentities_utf8($comment_array['comment'], true);
            ?>
					</div>
					<?php 
        }
        ?>
					<div class="comment_actions">
						<!-- TODO: if author, add in-line "edit" -->
						<?php 
        echo AT_date(_AT('forum_date_format'), $comment_array['created_date'], AT_DATE_MYSQL_DATETIME);
        ?>
						<?php 
开发者ID:genaromendezl,项目名称:ATutor,代码行数:31,代码来源:pa_profile_albums.tmpl.php


示例18: print_search_pages

function print_search_pages($result)
{
    global $count;
    foreach ($result as $items) {
        uasort($result, 'score_cmp');
        echo '<h5>' . $count . '. ';
        if (isset($items['forum_title'])) {
            //Forum
            if ($_SESSION['course_id'] != $items['course_id']) {
                echo '<a href="bounce.php?course=' . $items['course_id'] . SEP . 'p=' . urlencode('forum/view.php?fid=' . $items['forum_id'] . SEP . 'pid=' . $items['post_id'] . SEP . 'words=' . $_GET['words']) . '">' . $items['forum_title'] . ' - ' . $items['subject'] . '</a> ';
            } else {
                echo '<a href="' . url_rewrite('mods/_standard/forums/forum/view.php?fid=' . $items['forum_id'] . SEP . 'pid=' . $items['post_id'] . SEP . 'words=' . $_GET['words']) . '">' . $items['forum_title'] . ' - ' . $items['subject'] . '</a> ';
            }
            echo '</h5>' . "\n";
            echo '<p><small>' . $items['body'];
        } else {
            //Content
            if ($_SESSION['course_id'] != $items['course_id']) {
                echo '<a href="bounce.php?course=' . $items['course_id'] . SEP . 'p=' . urlencode('content.php?cid=' . $items['content_id'] . SEP . 'words=' . $_GET['words']) . '">' . $items['title'] . '</a> ';
            } else {
                echo '<a href="' . url_rewrite('content.php?cid=' . $items['content_id'] . SEP . 'words=' . $_GET['words']) . '">' . $items['title'] . '</a> ';
            }
            echo '</h5>' . "\n";
            echo '<p><small>' . $items['text'];
        }
        echo '<br /><small class="search-info">[<strong>' . _AT('keywords') . ':</strong> ';
        if (isset($items['keywords'])) {
            echo $items['keywords'];
        } else {
            echo '<strong>' . _AT('none') . '</strong>';
        }
        echo '. <strong>' . _AT('author') . ':</strong> ';
        if (isset($items['member_id'])) {
            echo AT_print(get_display_name($items['member_id']), 'members.login');
        } else {
            echo '<strong>' . _AT('none') . '</strong>';
        }
        echo '. <strong>' . _AT('updated') . ':</strong> ';
        echo AT_date(_AT('inbox_date_format'), isset($items['last_modified']) && $items['last_modified'] != '' ? $items['last_modified'] : $items['last_comment'], AT_DATE_MYSQL_DATETIME);
        echo ']</small>';
        echo '</small></p>' . "\n";
        $count++;
    }
}
开发者ID:vicentborja,项目名称:ATutor,代码行数:44,代码来源:search.inc.php


示例19: array

}
// Initialize all applicable tests array and all enrolled students array
$all_tests = array();
$all_students = array();
// generate test array
$sql = "(SELECT g.gradebook_test_id, g.id, g.type, t.title" . " FROM " . TABLE_PREFIX . "gradebook_tests g, " . TABLE_PREFIX . "tests t" . " WHERE g.type='ATutor Test'" . " AND g.id = t.test_id" . " AND t.course_id=" . $_SESSION["course_id"] . " ORDER BY title)" . " UNION (SELECT g.gradebook_test_id, g.id, g.type, a.title" . " FROM " . TABLE_PREFIX . "gradebook_tests g, " . TABLE_PREFIX . "assignments a" . " WHERE g.type='ATutor Assignment'" . " AND g.id = a.assignment_id" . " AND a.course_id=" . $_SESSION["course_id"] . " ORDER BY title)" . " UNION (SELECT gradebook_test_id, id, type, title" . " FROM " . TABLE_PREFIX . "gradebook_tests" . " WHERE course_id=" . $_SESSION["course_id"] . " ORDER BY title)";
$result = mysql_query($sql, $db) or die(mysql_error());
while ($row = mysql_fetch_assoc($result)) {
    $no_error = true;
    if ($row["type"] == "ATutor Test") {
        $studs_take_num = get_studs_take_more_than_once($_SESSION["course_id"], $row["id"]);
        foreach ($studs_take_num as $member_id => $num) {
            if ($no_error) {
                $no_error = false;
            }
            $error_msg .= get_display_name($member_id) . ": " . $num . " times<br>";
        }
        if (!$no_error) {
            $f = array('ADD_TEST_INTO_GRADEBOOK', $row['title'], $error_msg);
            $msg->addFeedback($f);
        }
    }
    if ($no_error) {
        array_push($all_tests, $row);
    }
}
// generate students array
$sql_students = "SELECT m.first_name, m.last_name, e.member_id FROM " . TABLE_PREFIX . "members m, " . TABLE_PREFIX . "course_enrollment e WHERE m.member_id = e.member_id AND e.course_id=" . $_SESSION["course_id"] . " AND e.approved='y' AND e.role!='Instructor'";
if ($order_col == "name") {
    $sql_students .= " ORDER BY m.first_name " . $order . ",m.last_name " . $order;
}
开发者ID:vicentborja,项目名称:ATutor,代码行数:31,代码来源:edit_marks.php


示例20: ob_start

}
global $db;
global $_base_path;
global $savant;
//Number of posts to display
$post_limit = 5;
ob_start();
// global $_course_id is set when a guest accessing a public course.
// This is to solve the issue that the google indexing fails as the session vars are lost.
global $_course_id;
if (isset($_SESSION['course_id'])) {
    $_course_id = $_SESSION['course_id'];
}
$forum_list = get_group_concat('forums_courses', 'forum_id', "course_id={$_course_id}");
if ($forum_list != 0) {
    $sql = "SELECT subject, post_id, forum_id, member_id FROM " . TABLE_PREFIX . "forums_threads WHERE parent_id=0 AND forum_id IN ({$forum_list}) ORDER BY last_comment DESC LIMIT {$post_limit}";
    $result = mysql_query($sql, $db);
    if (mysql_num_rows($result) > 0) {
        while ($row = mysql_fetch_assoc($result)) {
            echo '&#176; <a href="' . $_base_path . url_rewrite('forum/view.php?fid=' . $row['forum_id'] . htmlentities(SEP) . 'pid=' . $row['post_id']) . '" title="' . $row['subject'] . ': ' . htmlspecialchars(get_display_name($row['member_id'])) . '">' . AT_print(validate_length($row['subject'], 20, VALIDATE_LENGTH_FOR_DISPLAY), 'forums_threads.subject') . '</a><br />';
        }
    } else {
        echo '<strong>' . _AT('none_found') . '</strong>';
    }
} else {
    echo '<strong>' . _AT('none_found') . '</strong>';
}
$savant->assign('dropdown_contents', ob_get_contents());
ob_end_clean();
$savant->assign('title', _AT('forum_posts'));
$savant->display('include/box.tmpl.php');
开发者ID:vicentborja,项目名称:ATutor,代码行数:31,代码来源:posts.inc.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_div_parent函数代码示例发布时间:2022-05-15
下一篇:
PHP get_display_language函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap