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

PHP profile函数代码示例

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

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



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

示例1: profileDispatch

function profileDispatch($op)
{
    if (isset($_POST['undo'])) {
        $op = 'profile';
    }
    switch ($op) {
        case "profile":
            profile();
            break;
        case "modprofile":
            modprofile();
            break;
        case "saveprofile":
            saveprofile();
            break;
        case "newavatar":
            newavatar();
            break;
        case "upavatar":
            upavatar();
            break;
        case "renewalpwd":
            renewalpwd();
            break;
    }
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:26,代码来源:profile.php


示例2: edit

 function edit()
 {
     save_url();
     // Luu current_url vao session
     $user = check_login12(1, 2);
     $data = array('user' => $user, 'meta_title' => 'Manage Profile', 'template' => 'home/edit');
     $user_info = $this->mprofile->search_user($user['id']);
     if (!$user_info) {
         $data['error'] = 'User not found in database.';
         $data['template'] = 'home/notify';
         $this->load->view('home/frontend/layouts/home', isset($data) ? $data : NULL);
         return;
     }
     $data['user_info'] = $user_info;
     if ($this->input->post('submit')) {
         profile();
         if ($this->form_validation->run() == TRUE) {
             $u_info = info_user();
             $u_info['id'] = $user['id'];
             $this->mprofile->updateuser($u_info);
             $data['success'] = 'Cập nhật thông tin tài khoản thành công';
             $data['template'] = 'home/notify';
             $this->load->view('home/frontend/layouts/home', isset($data) ? $data : NULL);
             return;
         }
     }
     $this->load->view('home/frontend/layouts/home', isset($data) ? $data : NULL);
 }
开发者ID:HaiLeader,项目名称:quizz,代码行数:28,代码来源:profile.php


示例3: content

function content($page, $count = 0)
{
    global $langmessage, $menu, $message, $prefix, $out;
    $out = "";
    if ($message != "") {
        $out .= "<div class=\"LNE_message\">" . $message . "</div>\n";
    }
    switch ($_GET['do']) {
        case "search":
            $out .= "<h2 class=\"LNE_title\">{$langmessage['66']}</h2>\n";
            search(true);
            break;
        case "profile":
            $out .= profile();
            break;
        case "sitemap":
            $out .= showsitemap($langmessage, 1);
            break;
        case "login":
            $out .= loginform();
            break;
        default:
            $result = dbquery('SELECT * FROM ' . $prefix . 'paginas WHERE page="' . $page . '"');
            $row = fetch_array($result);
            if ($row['restricted'] != 0 && $row['restricted'] > $_SESSION['adminlevel']) {
                $out .= restrictedpage($row['restricted']);
            } else {
                $out .= markers(stripslashes(html_entity_decode($row['content'])));
            }
    }
    print $out;
}
开发者ID:squidjam,项目名称:LightNEasy,代码行数:32,代码来源:runtime.php


示例4: home

function home($twig)
{
    global $normalPages;
    global $mandatoryLogin;
    $allPages = $normalPages + $mandatoryLogin;
    if (isset($_GET['page']) && !in_array($_GET['page'], $allPages)) {
        echo $twig->render('404.twig');
    } else {
        if (isset($_GET['page']) && in_array($_GET['page'], $mandatoryLogin) && !isset($_SESSION['name'])) {
            echo $twig->render('500.twig');
        } else {
            if (isset($_SESSION['name'])) {
                profile($twig);
            } else {
                echo $twig->render('homepage.twig');
            }
        }
    }
}
开发者ID:nuieee,项目名称:casestudy-plat-shareup,代码行数:19,代码来源:index.php


示例5: array

     ############################################################################################
 ############################################################################################
 ##                                   Просмотр всех ссылок                                 ##
 ############################################################################################
 case 'all':
     $config['newtitle'] = 'Список всех ссылок';
     $total = DBM::run()->count('rekuser', array('rek_time' => array('>', SITETIME)));
     if ($total > 0) {
         if ($start >= $total) {
             $start = 0;
         }
         $reklama = DBM::run()->select('rekuser', array('rek_time' => array('>', SITETIME)), $config['rekuserpost'], $start, array('rek_time' => 'DESC'));
         foreach ($reklama as $data) {
             echo '<div class="b">';
             echo '<img src="/images/img/online.gif" alt="image" /> ';
             echo '<b><a href="' . $data['rek_site'] . '">' . $data['rek_name'] . '</a></b> (' . profile($data['rek_user']) . ')</div>';
             echo 'Истекает: ' . date_fixed($data['rek_time']) . '<br />';
             if (!empty($data['rek_color'])) {
                 echo 'Цвет: <span style="color:' . $data['rek_color'] . '">' . $data['rek_color'] . '</span>, ';
             } else {
                 echo 'Цвет: нет, ';
             }
             if (!empty($data['rek_bold'])) {
                 echo 'Жирность: есть<br />';
             } else {
                 echo 'Жирность: нет<br />';
             }
         }
         page_strnavigation('reklama.php?act=all&amp;', $config['rekuserpost'], $start, $total);
         echo 'Всего ссылок: <b>' . $total . '</b><br /><br />';
     } else {
开发者ID:visavi,项目名称:rotorcms4,代码行数:31,代码来源:reklama.php


示例6: output_build_reader_toolbar_mobile

function output_build_reader_toolbar_mobile($content)
{
    if ($_SERVER['URL_ARRAY'][3] == 'bio') {
        $is_bio = TRUE;
    } elseif ($_SERVER['URL_ARRAY'][1] == 'send') {
        $is_send = TRUE;
    } elseif (in_array('archives', $_SERVER['URL_ARRAY'])) {
        $is_archives = TRUE;
    } else {
        $is_plan = TRUE;
    }
    $planwatchlist = file_get_contents("{$_SERVER['USER_ROOT']}/watchedlist.txt");
    if ($is_send) {
        $_SERVER['PLANOWNER'] = $_SERVER['URL_ARRAY'][2];
        plan_get_owner_info($_SERVER['PLANOWNER']);
    }
    if (user_is_valid($_SERVER['USERINFO_ARRAY']['username'], $_SERVER['USERINFO_ARRAY']['userpass']) && $_SERVER['PLANOWNER'] && !strstr($content, '<h1>Plan Read Failed</h1>')) {
        profile('reader_toolbar', 'begin');
        if ($is_plan || $is_bio || $is_archives || $is_send && $_SERVER['URL_ARRAY'][2]) {
            // bio
            if ((file_exists("{$_SERVER['PWUSERS_DIR']}/{$_SERVER['PLANOWNER']}/bio.txt") || (strpos($_SERVER['PLANOWNER_REAL_LOCATION'], 'diaryland') || strpos($_SERVER['PLANOWNER_REAL_LOCATION'], 'livejournal'))) && !$is_bio) {
                $readertoolbar[] = "<a href='{$_SERVER['WEB_ROOT']}/read/{$_SERVER['PLANOWNER_REAL_LOCATION']}/bio'>bio</a>";
            }
            // send
            if ((strpos($_SERVER['PLANOWNER_REAL_LOCATION'], 'planworld.net') || strpos($_SERVER['PLANOWNER_REAL_LOCATION'], 'amherst.edu') || plan_is_local($_SERVER['PLANOWNER'])) && $_SERVER['PLANOWNER'] != $_SERVER['USER'] && !$is_send) {
                $send_files = files_list("{$_SERVER['USER_ROOT']}/sends", files_encode_safe_name("{$_SERVER['PLANOWNER']}") . "*");
                if (is_array($send_files)) {
                    $lastsend = formattime(filemtime("{$_SERVER['USER_ROOT']}/sends/" . end($send_files)));
                    if (strstr(end($send_files), '.new')) {
                        $lastsend .= " <b>NEW</b>";
                    }
                    $lastsend = "({$lastsend})";
                }
                $readertoolbar[] = "<a href='{$_SERVER['WEB_ROOT']}/send/{$_SERVER['PLANOWNER_REAL_LOCATION']}/'>send</a>";
            }
            // planread
            if ($is_send || $is_bio) {
                $readertoolbar[] = "<a href='{$_SERVER['WEB_ROOT']}/read/{$_SERVER['PLANOWNER_REAL_LOCATION']}/'>plan</a>";
            }
            // archives
            if (plan_has_archives($_SERVER['PLANOWNER_REAL_LOCATION'])) {
                if (!$is_archives) {
                    $readertoolbar[] = "<a href='{$_SERVER['WEB_ROOT']}/read/{$_SERVER['PLANOWNER']}/archives' >archives</a>";
                } else {
                    $readertoolbar[] = "<a href='{$_SERVER['WEB_ROOT']}/read/{$_SERVER['PLANOWNER']}' >plan</a>";
                }
            }
            // If the reader isn't watching the writer, offer the option
            if (!stristr($planwatchlist, $_SERVER['PLANOWNER']) && $is_plan) {
                $readertoolbar[] = "<span id='watch_link'><a href=\"javascript:loadXMLDoc('{$_SERVER['WEB_ROOT']}/lists/add_ajax/watched/!{$_SERVER['PLANOWNER_REAL_LOCATION']}:{$_SERVER['PLANOWNER_DISPLAY_NAME']}!',null,'planwatch');void(null);\" title='add {$_SERVER['PLANOWNER_DISPLAY_NAME']} to your watched list' >watch</a></span>";
            }
            // if writer isn't a blog or the same as reader, offer the option of
            // blocking, unblocking, allowing, or disallowing access to reader's plan
            if ($_SERVER['PLANOWNER'] != $_SERVER['USER'] && !strpos($_SERVER['PLANOWNER'], '://')) {
                // offer administrators a link to masquerade as writer
                // this is so it's easy to follow up on plan-reported bugs
                if (user_is_administrator() && file_exists("{$_SERVER['PWUSERS_DIR']}/{$_SERVER['PLANOWNER']}/userinfo.dat")) {
                    $readertoolbar[] = "<a href='{$_SERVER['WEB_ROOT']}/masq/on/{$_SERVER['PLANOWNER']}'>masq</a>";
                }
                if ($is_plan) {
                    $readertoolbar[] = "<a href='/lists/unread/{$_SERVER['PLANOWNER']}'>unread</a>";
                }
                if ($is_send) {
                    $readertoolbar[] = "<a href='/send/{$_SERVER['PLANOWNER']}/unread'>unread</a>";
                }
            }
            // make the links into a string for output.
            $readertoolbar = "<li class='toolbutton'>" . implode("</li><li class='toolbutton'>", $readertoolbar) . "</li>\n";
            $readertoolbar = str_replace("<li class='toolbutton'></li>", "", $readertoolbar);
            if (($lasttime = plan_get_last_update($_SERVER['PLANOWNER'])) && $is_plan) {
                $readertoolbar = "<li class='plan_data_block'>Last Update: " . formattime($lasttime) . "</li>" . $readertoolbar;
            }
            if ($lastlogin = plan_get_last_login($_SERVER['PLANOWNER'])) {
                if ($lastlogin > 1) {
                    $readertoolbar = "<li class='plan_data_block' id='lastaction'>Last Action: " . formattime($lastlogin) . "</li>" . $readertoolbar;
                }
            }
        }
        profile('reader_toolbar', 'end');
    }
    return $readertoolbar;
}
开发者ID:joshuawdavidson,项目名称:planwatch,代码行数:82,代码来源:output.php


示例7: bb_code

             echo '<div>';
             if (!empty($data['ban_type'])) {
                 echo 'Причина: ' . bb_code($data['ban_reason']) . '<br />';
                 echo 'Срок: ' . formattime($data['ban_term']) . '<br />';
             }
             switch ($data['ban_type']) {
                 case '1':
                     $stat = '<span style="color:#ff0000">Забанил</span>:';
                     break;
                 case '2':
                     $stat = '<span style="color:#ffa500">Изменил</span>:';
                     break;
                 default:
                     $stat = '<span style="color:#00cc00">Разбанил</span>:';
             }
             echo $stat . ' ' . profile($data['ban_send']) . '<br />';
             echo '</div>';
         }
         echo '<br /><input type="submit" value="Удалить выбранное" /></form>';
         page_strnavigation('banhist.php?act=view&amp;uz=' . $uz . '&amp;', $config['listbanhist'], $start, $total);
         echo 'Всего действий: <b>' . $total . '</b><br /><br />';
     } else {
         show_error('Истории банов еще нет!');
     }
 } else {
     show_error('Ошибка! Данный пользователь не найден!');
 }
 echo '<img src="/images/img/back.gif" alt="image" /> <a href="banhist.php">Вернуться</a><br />';
 break;
 ############################################################################################
 ##                                   Удаление банов                                       ##
开发者ID:visavi,项目名称:rotorcms4,代码行数:31,代码来源:banhist.php


示例8: switch

$action = $_REQUEST['action'];
switch ($action) {
    case 'players':
        echo json_encode(players());
        break;
    case 'update':
        echo json_encode(updateStats(time(), $_REQUEST['team1'], $_REQUEST['team2'], $_REQUEST['scores']));
        break;
    case 'reset':
        resetStats();
        break;
    case 'ranking':
        echo json_encode(ranking());
        break;
    case 'history':
        echo json_encode(history());
        break;
    case 'log':
        echo json_encode(gameLog());
        break;
    case 'match':
        if (isset($_REQUEST['team2'])) {
            echo json_encode(match($_REQUEST['team1'], $_REQUEST['team2']));
        } else {
            echo json_encode(bestMatch($_REQUEST['team1']));
        }
        break;
    case 'profile':
        echo json_encode(profile($_REQUEST['id']));
        break;
}
开发者ID:rebdrup,项目名称:foosball,代码行数:31,代码来源:api.php


示例9: snoop_list

function snoop_list($source = FALSE)
{
    profile('snoop_list');
    $snoop_filename = "{$_SERVER['USER_ROOT']}/stats/snoop.txt";
    if ($source == 'planwatch' || $source == 'homesnoop') {
        $ignore = "ignore_ajax";
    } else {
        $ignore = "ignore";
    }
    if (file_exists($snoop_filename)) {
        $snoop_a = file($snoop_filename);
        foreach ($snoop_a as $i => $snoop) {
            $snoop = trim($snoop);
            list($snooper, $snooptime) = explode(':', $snoop);
            if ($snooper != $_SERVER['USER'] && trim($snooper)) {
                if ($snooptime > $snoop_times[$snooper]) {
                    $snoop_times[$snooper] = $snooptime;
                }
            }
        }
        if (is_array($snoop_times)) {
            $snoopers_lastview = plan_get_last_view(array_keys($snoop_times));
            arsort($snoop_times);
            // for very old snoops, we test them once a day to make sure they're
            // still valid
            // TODO:(v4.5) improve and re-enable the snoop test
            //			if (filemtime("$_SERVER[USER_ROOT]/stats/snoop_lastcheck") < (time()-24*3600))
            //			{
            //				$test_snoops=TRUE;
            //				file_put_contents("$_SERVER[USER_ROOT]/stats/snoop_lastcheck",time());
            //			}
            foreach ($snoop_times as $snooper => $snooptime) {
                // the actual validity test gets called here
                //				if (($snooptime < (time()-(72*3600))) && $test_snoops)
                //				{
                //					$valid_snoop=snoop_test($snoopers[$j]);
                //				}
                //				else $valid_snoop=TRUE;
                // if everything's OK, add it to the list
                if ($snooptime) {
                    $snooptime_display = formattime($snooptime);
                    if (strstr($snooper, '@')) {
                        list($username, $host) = explode("@", $snooper);
                        $displayname = "{$username} <span style='font-size: 60%;'>@{$host}</span>";
                    } else {
                        $displayname = $snooper;
                    }
                    if ($snoopers_lastview[$snooper] < $snooptime) {
                        $read_status = 'unread';
                    } else {
                        $read_status = 'read';
                    }
                    if ($ignore == "ignore") {
                        $content .= "<li><a class='tool' target='_self' href='{$_SERVER['WEB_ROOT']}/snoop/{$ignore}/{$snooper}/{$source}'>&#x2612;</a>\n\t\t\t\t\t\t<a class='{$read_status}' href='{$_SERVER['WEB_ROOT']}/read/{$snooper}'>{$displayname}</a> <span style='font-size: 80%;'>{$snooptime_display}\n" . "  </span>\n" . "</li>\n";
                    } else {
                        $content .= "<li><a class='tool' target='_self' href='javascript:loadXMLDoc(\"{$_SERVER['WEB_ROOT']}/snoop/{$ignore}/{$snooper}/{$source}\",null,\"{$source}\");'>&#x2612;</a>\n\t\t\t\t\t\t\t<a class='{$read_status}' href='{$_SERVER['WEB_ROOT']}/read/{$snooper}'>{$displayname}  <span class='updatetime'>{$snooptime_display}\n</span></a>\n" . "</li>\n";
                    }
                }
            }
        } else {
            $content .= "<li class='unread'>no snoops found</li>\n";
        }
    }
    profile('snoop_list');
    return $content;
}
开发者ID:joshuawdavidson,项目名称:planwatch,代码行数:66,代码来源:snoop.php


示例10: profile

				<li><a href="../index.php"><img src="../image/hoome.png" height="30px"><span>Beranda</span></a></li>
				<li><a href="profile.php"><img src="../image/about.png" height="30px"><span style="display: block; opacity: 1; top: -40px;">Profile</span></a></li>
				<li><a href="help.php"><img src="../image/help.png" height="30px"><span>Bantuan</span></a></li>
			</ul>
		</div>
	</div><br/><br/>
	
	<div id="gambar_full">
		<img src="../profile/rini.jpg" width="400"/>
	</div>
	<div id="gambar_overlay"></div>
	
	<div id="badan_program">
		<div id="bada_program_kiri"><br/>
			<?php 
profile();
?>
		</div>
		<div id="bada_program_kanan">
			<br/>
			<div id="title_program">
				<h2>Data Master Supplier</h2>
			</div>
			<br/>
			<!-- Back !-->
			<div id="kmbl">
				<img src="../image/kmbli.png" height="30px" onclick="kembali()" />
			</div>
			<!-- sarching !-->
			<div id='search-box'>
				<form  id="cari" name="cari">
开发者ID:Andirohandi,项目名称:SistemInformasiInventory,代码行数:31,代码来源:data_master_supplier.php


示例11: profile

<img src="/images/img/edit.gif" alt="image" /> <b><?php 
echo profile($post['guest_user']);
?>
</b> <small>(<?php 
echo date_fixed($post['guest_time']);
?>
)</small><br /><br />

<div class="form">
	<form action="index.php?act=editpost&amp;id=<?php 
echo $id;
?>
&amp;start=<?php 
echo $start;
?>
&amp;uid=<?php 
echo $_SESSION['token'];
?>
" method="post">
		<textarea id="markItUp" cols="25" rows="5" name="msg"><?php 
echo $post['guest_text'];
?>
</textarea><br />
		<input value="Редактировать" type="submit" />
	</form>
</div><br />
开发者ID:visavi,项目名称:rotorcms4,代码行数:26,代码来源:edit.php


示例12: switch

{
    static $times;
    $len = [];
    switch ($display) {
        case false:
            $times[] = microtime(true);
            break;
        case true:
            $start_total = array_shift($times);
            foreach ($times as $stop) {
                $stop_total = $stop;
                $len[] = $stop_total - $start_total;
            }
            unset($times);
            return $len;
            break;
    }
}
register_tick_function('profile');
declare (ticks=1) {
    foreach ($_SERVER['argv'] as $arg) {
        "{$arg}:" . strlen($arg) . "\n";
    }
}
// (profile ( true ) );
print "---\n";
$i = 0;
foreach (profile(true) as $time) {
    $i++;
    print "Line {$i}:{$time}\n";
}
开发者ID:xiaobudongzhang,项目名称:lib,代码行数:31,代码来源:timelen.php


示例13: array

     if ($total > 0) {
         if ($start >= $total) {
             $start = 0;
         }
         $queryban = DB::run()->query("SELECT * FROM `spam` WHERE `spam_key`=? ORDER BY `spam_addtime` DESC LIMIT " . $start . ", " . $config['spamlist'] . ";", array(6));
         echo '<form action="spam.php?act=del&amp;ref=blog&amp;start=' . $start . '&amp;uid=' . $_SESSION['token'] . '" method="post">';
         echo '<div class="form">';
         echo '<input type="checkbox" id="all" onchange="var o=this.form.elements;for(var i=0;i&lt;o.length;i++)o[i].checked=this.checked" /> <b><label for="all">Отметить все</label></b>';
         echo '</div>';
         while ($data = $queryban->fetch()) {
             echo '<div class="b">';
             echo '<input type="checkbox" name="del[]" value="' . $data['spam_id'] . '" /> ';
             echo '<img src="/images/img/files.gif" alt="image" /> <b>' . profile($data['spam_login']) . '</b> <small>(' . date_fixed($data['spam_time'], "d.m.y / H:i:s") . ')</small></div>';
             echo '<div>Сообщение: ' . bb_code($data['spam_text']) . '<br />';
             echo '<a href="' . $data['spam_link'] . '">Перейти к сообщению</a><br />';
             echo 'Жалоба: ' . profile($data['spam_user']) . ' (' . date_fixed($data['spam_addtime']) . ')</div>';
         }
         echo '<br /><input type="submit" value="Удалить выбранное" /></form>';
         page_strnavigation('spam.php?act=blog&amp;', $config['spamlist'], $start, $total);
         if (is_admin(array(101, 102))) {
             echo '<img src="/images/img/error.gif" alt="image" /> <a href="spam.php?act=clear&amp;uid=' . $_SESSION['token'] . '">Очистить</a><br />';
         }
     } else {
         show_error('Жалоб еще нет!');
     }
     break;
     ############################################################################################
     ##                                 Удаление сообщений                                     ##
     ############################################################################################
 ############################################################################################
 ##                                 Удаление сообщений                                     ##
开发者ID:visavi,项目名称:rotorcms4,代码行数:31,代码来源:spam.php


示例14: profile

<?php

function profile()
{
    return array(1, '田中', '1988年8月8日', '埼玉県');
}
$deta = profile();
foreach ($deta as $key => $value) {
    if ($key == 0) {
        continue;
    }
}
//echo $deta[1].$deta[2].$deta[3];
echo $value;
开发者ID:SakiKamata,项目名称:Camp-Challenge,代码行数:14,代码来源:challenge3_5.php


示例15: switch

 switch ($act) {
     ############################################################################################
     ##                                    Главная страница                                    ##
     ############################################################################################
     case 'index':
         $total = DB::run()->querySingle("SELECT count(*) FROM `contact` WHERE `contact_user`=?;", array($log));
         if ($total > 0) {
             if ($start >= $total) {
                 $start = last_page($total, $config['contactlist']);
             }
             $querycontact = DB::run()->query("SELECT * FROM `contact` WHERE `contact_user`=? ORDER BY `contact_time` DESC LIMIT " . $start . ", " . $config['contactlist'] . ";", array($log));
             echo '<form action="contact.php?act=del&amp;start=' . $start . '&amp;uid=' . $_SESSION['token'] . '" method="post">';
             while ($data = $querycontact->fetch()) {
                 echo '<div class="b">';
                 echo '<div class="img">' . user_avatars($data['contact_name']) . '</div>';
                 echo '<b>' . profile($data['contact_name']) . '</b> <small>(' . date_fixed($data['contact_time']) . ')</small><br />';
                 echo user_title($data['contact_name']) . ' ' . user_online($data['contact_name']) . '</div>';
                 echo '<div>';
                 if (!empty($data['contact_text'])) {
                     echo 'Заметка: ' . $data['contact_text'] . '<br />';
                 }
                 echo '<input type="checkbox" name="del[]" value="' . $data['contact_id'] . '" /> ';
                 echo '<a href="/pages/private.php?act=submit&amp;uz=' . $data['contact_name'] . '">Написать</a> | ';
                 echo '<a href="/pages/perevod.php?uz=' . $data['contact_name'] . '">Перевод</a> | ';
                 echo '<a href="/pages/contact.php?act=note&amp;id=' . $data['contact_id'] . '">Заметка</a>';
                 echo '</div>';
             }
             echo '<br /><input type="submit" value="Удалить выбранное" /></form>';
             page_strnavigation('contact.php?', $config['contactlist'], $start, $total);
             echo 'Всего в контактах: <b>' . (int) $total . '</b><br />';
         } else {
开发者ID:visavi,项目名称:rotorcms4,代码行数:31,代码来源:contact.php


示例16: getContent

function getContent($pageId, $action, $userId, $permission, $recursed = 0)
{
    if ($action == "login") {
        if ($userId == 0) {
            ///Commented the requirement of login.lib.php because it is already included in /index.php
            //require_once("login.lib.php");
            $newUserId = login();
            if (is_numeric($newUserId)) {
                return getContent($pageId, "view", $newUserId, getPermissions($newUserId, $pageId, "view"), 0);
            } else {
                return $newUserId;
            }
            ///<The login page
        } else {
            displayinfo("You are logged in as " . getUserName($userId) . "! Click <a href=\"./+logout\">here</a> to logout.");
        }
        return getContent($pageId, "view", $userId, getPermissions($userId, $pageId, "view"), $recursed = 0);
    }
    if ($action == "profile") {
        if ($userId != 0) {
            require_once "profile.lib.php";
            return profile($userId);
        } else {
            displayinfo("You need to <a href=\"./+login\">login</a> to view your profile.!");
        }
    }
    if ($action == "logout") {
        if ($userId != 0) {
            $newUserId = resetAuth();
            displayinfo("You have been logged out!");
            global $openid_enabled;
            if ($openid_enabled == 'true') {
                displaywarning("If you logged in via Open ID, make sure you also log out from your Open ID service provider's website. Until then your session in this website will remain active !");
            }
            return getContent($pageId, "view", $newUserId, getPermissions($newUserId, $pageId, "view"), 0);
        } else {
            displayinfo("You need to <a href=\"./+login\">login</a> first to logout!");
        }
    }
    if ($action == "search") {
        require_once "search.lib.php";
        $ret = getSearchBox();
        if (isset($_POST['query'])) {
            $ret .= getSearchResultString($_POST['query']);
        } elseif (isset($_GET['query'])) {
            $ret .= getSearchResultString($_GET['query']);
        }
        return $ret;
    }
    if (isset($_GET['subaction']) && $_GET['subaction'] == 'getchildren') {
        if (isset($_GET['parentpath'])) {
            global $urlRequestRoot;
            require_once 'menu.lib.php';
            $pidarr = array();
            parseUrlReal(escape($_GET['parentpath']), $pidarr);
            $pid = $pidarr[count($pidarr) - 1];
            $children = getChildren($pid, $userId);
            $response = array();
            $response['path'] = escape($_GET['parentpath']);
            $response['items'] = array();
            foreach ($children as $child) {
                $response['items'][] = array($urlRequestRoot . '/home' . escape($_GET['parentpath']) . $child[1], $child[2]);
            }
            //echo json_encode($response);
            exit;
        }
    }
    if ($permission != true) {
        if ($userId == 0) {
            $suggestion = "(Try <a href=\"./+login\">logging in?</a>)";
        } else {
            $suggestion = "";
        }
        displayerror("You do not have the permissions to view this page. {$suggestion}<br /><input type=\"button\" onclick=\"history.go(-1)\" value=\"Go back\" />");
        return '';
    }
    if ($action == "admin") {
        require_once "admin.lib.php";
        return admin($pageId, $userId);
    }
    ///default actions also to be defined here (and not outside)
    /// Coz work to be done after these actions do involve the page
    $pagetype_query = "SELECT page_module, page_modulecomponentid FROM " . MYSQL_DATABASE_PREFIX . "pages WHERE page_id='" . escape($pageId) . "'";
    $pagetype_result = mysql_query($pagetype_query);
    $pagetype_values = mysql_fetch_assoc($pagetype_result);
    if (!$pagetype_values) {
        displayerror("The requested page does not exist.");
        return "";
    }
    $moduleType = $pagetype_values['page_module'];
    $moduleComponentId = $pagetype_values['page_modulecomponentid'];
    if ($action == "settings") {
        ///<done here because we needed to check if the page exists for sure.
        require_once "pagesettings.lib.php";
        return pagesettings($pageId, $userId);
    }
    if ($action == "widgets") {
        return handleWidgetPageSettings($pageId);
    }
    if ($recursed == 0) {
//.........这里部分代码省略.........
开发者ID:rubulh,项目名称:pragyan,代码行数:101,代码来源:content.lib.php


示例17: is_admin

         $start = 0;
     }
     $is_admin = is_admin();
     if ($is_admin) {
         echo '<form action="wall.php?act=del&amp;uz=' . $uz . '&amp;start=' . $start . '&amp;uid=' . $_SESSION['token'] . '" method="post">';
     } elseif ($uz == $log) {
         echo '<form action="wall.php?act=delete&amp;uz=' . $uz . '&amp;start=' . $start . '&amp;uid=' . $_SESSION['token'] . '" method="post">';
     }
     $querywall = DB::run()->query("SELECT * FROM `wall` WHERE `wall_user`=? ORDER BY `wall_time` DESC LIMIT " . $start . ", " . $config['wallpost'] . ";", array($uz));
     while ($data = $querywall->fetch()) {
         echo '<div class="b">';
         echo '<div class="img">' . user_avatars($data['wall_login']) . '</div>';
         if ($is_admin || $uz == $log) {
             echo '<span class="imgright"><input type="checkbox" name="del[]" value="' . $data['wall_id'] . '" /></span>';
         }
         echo '<b>' . profile($data['wall_login']) . '</b> <small>(' . date_fixed($data['wall_time']) . ')</small><br />';
         echo user_title($data['wall_login']) . ' ' . user_online($data['wall_login']) . '</div>';
         if ($uz == $log && $log != $data['wall_login']) {
             echo '<div class="right">';
             echo '<a href="private.php?act=submit&amp;uz=' . $data['wall_login'] . '">Приват</a> / ';
             echo '<a href="wall.php?uz=' . $data['wall_login'] . '">Стена</a> / ';
             echo '<noindex><a href="wall.php?act=spam&amp;id=' . $data['wall_id'] . '&amp;start=' . $start . '&amp;uid=' . $_SESSION['token'] . '" onclick="return confirm(\'Вы подтверждаете факт спама?\')" rel="nofollow">Спам</a></noindex></div>';
         }
         echo '<div>' . bb_code($data['wall_text']) . '</div>';
     }
     if ($is_admin || $uz == $log) {
         echo '<span class="imgright"><input type="submit" value="Удалить выбранное" /></span></form>';
     }
     page_strnavigation('wall.php?uz=' . $uz . '&amp;', $config['wallpost'], $start, $total);
 } else {
     show_error('Записок еще нет!');
开发者ID:visavi,项目名称:rotorcms4,代码行数:31,代码来源:wall.php


示例18: getProfileViewRegistrantsForm

function getProfileViewRegistrantsForm()
{
    if (isset($_GET['subsubaction'])) {
        if ($_GET['subsubaction'] == 'editregistrant' && (isset($_GET['useremail']) || isset($_POST['useremail']))) {
            $email = isset($_GET['useremail']) ? escape($_GET['useremail']) : escape($_POST['useremail']);
            return profile(getUserIdFromEmail($email), true);
        } elseif ($_GET['subsubaction'] == 'deleteregistrant' && isset($_GET['useremail'])) {
            deleteUserAccount(getUserIdFromEmail(escape($_GET['useremail'])));
        }
    }
    return getProfileRegistrantsList($_GET['subaction'] == 'editsiteregistrants');
}
开发者ID:nobelium,项目名称:pragyan,代码行数:12,代码来源:profile.lib.php


示例19: count

     echo ' (<a href="/blog/blog.php?cid=' . $cid . '&amp;start=' . $start . '">Обзор</a>)';
     echo '<hr />';
     $total = DB::run()->querySingle("SELECT count(*) FROM `blogs` WHERE `blogs_cats_id`=?;", array($cid));
     if ($total > 0) {
         if ($start >= $total) {
             $start = 0;
         }
         $queryblog = DB::run()->query("SELECT * FROM `blogs` WHERE `blogs_cats_id`=? ORDER BY `blogs_time` DESC LIMIT " . $start . ", " . $config['blogpost'] . ";", array($cid));
         echo '<form action="blog.php?act=delblog&amp;cid=' . $cid . '&amp;start=' . $start . '&amp;uid=' . $_SESSION['token'] . '" method="post">';
         while ($data = $queryblog->fetch()) {
             echo '<div class="b"><img src="/images/img/edit.gif" alt="image" /> ';
             echo '<b><a href="/blog/blog.php?act=view&amp;id=' . $data['blogs_id'] . '">' . $data['blogs_title'] . '</a></b> (' . format_num($data['blogs_rating']) . ')<br />';
             echo '<input type="checkbox" name="del[]" value="' . $data['blogs_id'] . '" /> ';
             echo '<a href="blog.php?act=editblog&amp;cid=' . $cid . '&amp;id=' . $data['blogs_id'] . '&amp;start=' . $start . '">Редактировать</a> / ';
             echo '<a href="blog.php?act=moveblog&amp;cid=' . $cid . '&amp;id=' . $data['blogs_id'] . '&amp;start=' . $start . '">Переместить</a></div>';
             echo '<div>Автор: ' . profile($data['blogs_user']) . ' (' . date_fixed($data['blogs_time']) . ')<br />';
             echo 'Просмотров: ' . $data['blogs_read'] . '<br />';
             echo '<a href="/blog/blog.php?act=comments&amp;id=' . $data['blogs_id'] . '">Комментарии</a> (' . $data['blogs_comments'] . ')<br />';
             echo '</div>';
         }
         echo '<br /><input type="submit" value="Удалить выбранное" /></form>';
         page_strnavigation('blog.php?act=blog&amp;cid=' . $cid . '&amp;', $config['blogpost'], $start, $total);
     } else {
         show_error('В данном разделе еще нет статей!');
     }
 } else {
     show_error('Ошибка! Данного раздела не существует!');
 }
 echo '<img src="/images/img/reload.gif" alt="image" /> <a href="blog.php">Категории</a><br />';
 break;
 ############################################################################################
开发者ID:visavi,项目名称:rotorcms4,代码行数:31,代码来源:blog.php


示例20: count

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP profile_check函数代码示例发布时间:2022-05-15
下一篇:
PHP product_prepare_head函数代码示例发布时间: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