Пример #1
0
require_once '../includes/functions.inc.php';
require_once '../includes/admin.inc.php';
$rid = isset($_SESSION['rid']) ? $_SESSION['rid'] : 0;
$uid = isset($_SESSION['uid']) ? $_SESSION['uid'] : 0;
$course = course_load($cid);
$user = user_load_from_name($username);
$profile_uid = $user['User_ID'];
$feeds_type = isset($_POST['feeds_type']) ? $_POST['feeds_type'] : '';
switch ($feeds_type) {
    case 'front':
        print front_page_listing(10, $uid, 'sort_post_date_descend', 'All courses');
        break;
    case 'course':
        print view_course($cid, $uid, 10);
        break;
    case 'course_week':
        print view_course_week($course_week['cid'], $course_week['week'], 10, $uid, 'sort_post_date_descend');
        break;
    case 'post':
        print view_post($pid, $uid, 1);
        break;
    case 'profile':
        print view_profile(10, $profile_uid, $uid, 'sort_post_date_descend');
        break;
    case 'profile_follow':
        print view_profile_follow(10, $profile_uid, $uid, 'sort_post_date_descend');
        break;
    case 'week':
        print view_week($week, 10, $uid, 'sort_post_date_descend');
        break;
}
Пример #2
0
        $profile["id1"] = array("namae" => "ミヤジマ", "tosi" => 22, "basyo" => "大阪府");
        $kekka1 = $profile["id1"];
        return $kekka1;
    } else {
        if ($AAA == "id2") {
            $profile["id2"] = array("namae" => "ヤマダ", "tosi" => 53, "basyo" => "兵庫県");
            return $profile["id2"];
        } else {
            if ($AAA == "id3") {
                $profile["id3"] = array("namae" => "アオキ", "tosi" => 60, "basyo" => "滋賀県");
                return $profile["id3"];
            }
        }
    }
}
$A = view_profile("id3");
foreach ($A as $key => $value) {
    print $key . ":" . "{$value}<br>";
}
/*
 $profile ["id1"] = array("namae" => "ミヤジマ","tosi" => 22,"basyo" => "大阪府");
 
 $profile ["id2"] = array("namae" => "ヤマダ","tosi" => 53,"basyo" => "兵庫県");

 $profile ["id3"] = array("namae" => "アオキ","tosi" => 60,"basyo" => "滋賀県");
 
 foreach($profile["id3"] as $key =>$value){

	print $key.":"."$value<br>";

Пример #3
0
<?php

function view_profile()
{
    echo "私の名前は宮嶋です" . "<BR>";
    echo "22歳です" . "<BR>";
    echo "大阪出身です" . "<BR>";
    return true;
}
$hantei = view_profile();
if ($hantei == true) {
    print "「この処理は正しく実行できました」";
} else {
    print "「正しく実行できませんでした」";
}
print $hantei;
Пример #4
0
<?php

function view_profile()
{
    echo "私の名前は宮嶋です" . "<BR>";
    echo "22歳です" . "<BR>";
    echo "大阪出身です" . "<BR>" . "<BR>";
}
for ($i = 1; $i < 11; $i++) {
    view_profile();
}
Пример #5
0
<?php

function view_profile()
{
    return array("id" => "4649", "namae" => "ミヤジマ", "tosi" => 22, "basyo" => "大阪府");
}
$hyouji = view_profile();
foreach ($hyouji as $key => $value) {
    if ($key == "id") {
        continue;
    } else {
        print $key . ":" . "{$value}<br>";
    }
}
Пример #6
0
<?php

//Paging for profile pages
require_once '../includes/functions.inc.php';
require_once '../includes/admin.inc.php';
$uid = isset($_SESSION['uid']) ? $_SESSION['uid'] : 0;
$count = isset($_POST['count']) ? $_POST['count'] : '';
$profile_uid = isset($_POST['profile_uid']) ? $_POST['profile_uid'] : '';
$page = isset($_POST['page']) ? $_POST['page'] : '';
print view_profile($count, $profile_uid, $uid, 'sort_post_date_descend', $page);
?>
<script type="text/javascript">
$("a.button.disabled").click(function(){
	openLogin();
});
$('#feeds [title]').qtip({
	style: {
		padding: 7,
		background: '#404041',
		color: 'white',
		fontSize: '10px',
		textAlign: 'center',
		border: {
			width: 2,
			color: 'white'
		},
		tip: 'topLeft',
		name: 'dark' // Inherit the rest of the attributes from the preset dark style
	},
	position: {
		corner: {