本文整理汇总了PHP中active函数的典型用法代码示例。如果您正苦于以下问题:PHP active函数的具体用法?PHP active怎么用?PHP active使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了active函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: active_blog
function active_blog($name)
{
if (uri_contains('impressum')) {
return '';
}
if (uri_contains('series') && ($name == 'uber' || $name == 'projekte')) {
return active($name);
}
if ($name == 'series' && !uri_contains('uber') && !uri_contains('projekte') && $name != 'uber' && $name != 'projekt') {
return active($name);
}
if (uri_contains('uber') && !uri_contains('series') && $name == 'articles') {
return 'active';
}
if (uri_contains('projekte') && !uri_contains('series') && $name == 'articles') {
return 'active';
}
if ($name == 'articles' && !uri_contains('projekte') && !uri_contains('uber') && !uri_contains('series')) {
return 'active';
}
return '';
}
示例2: active
><a href="?p=gestionnaires" title="Les gestionnaires">Les gestionnaires</a></li>
<li <?php
echo active('utilisateurs');
?>
><a href="?p=utilisateurs" title="Les utilisateurs">Les utilisateurs</a></li>
</ul>
</nav>
<h2>Références</h2>
<nav>
<ul class="nav nav-pills">
<li <?php
echo active('configuration');
?>
><a href="?p=configuration" title="Référence de configuration">Configurations</a></li>
<li <?php
echo active('conventions');
?>
><a href="?p=conventions" title="Conventions du framework W">Conventions</a></li>
<li><a href="../api/namespaces/W.html" title="Documentation de l'API">W :: API</a></li>
</ul>
</nav>
</aside>
<section id="content" class="language-php col-xs-12 col-lg-10">
<?php
require $file;
?>
</section>
</div>
<div class="row">
<footer class="col-xs-12">
<a href="http://wf3.fr" title="Site de la WebForce3">WF3</a>
示例3: active_calls_active_method
/** @test */
public function active_calls_active_method()
{
$activeMock = Mockery::mock(Active::class);
$activeMock->shouldReceive('active')->once()->with(['foo'], 'bar')->andReturn('baz');
App::shouldReceive('make')->once()->with('active')->andReturn($activeMock);
$result = active('foo', 'bar');
$this->assertEquals('baz', $result);
}
示例4: active
<li class="headingLi">Navigatie
<ul class="headingItem">
<li><?php
echo active("startpagina", "Startpagina", 1, "../images/");
?>
</li>
<li><?php
echo active("beginpagina", "Beginpagina", 0, "../images/");
?>
</li>
<li><?php
echo active("poll", "Poll", 0, "../images/");
?>
</li>
<li><?php
echo active("gastenboek", "Gastenboek", 0, "../images/");
?>
</li>
</ul>
</li>
<li class="headingLi">Admin
<ul class="headingItem">
<li><a href="?pagina=uitloggen" class="headingItemLink">Uitloggen</a></li>
</ul>
</li>
</ul>
<?php
}
?>
<ul class="heading">
<li class="headingLi">Beginpagina
示例5: array
include 'core/init.php';
include 'template/header.php';
?>
<section class="condition-area">
<div class="container">
<div class="row">
<div class="col-md-12">
<?php
$errors = array();
if (empty($_POST) === false) {
$username = $_POST['username'];
$password = $_POST['password'];
echo $username;
if (empty($username) === true || empty($password) === true) {
$errors[] = "Please Enter your Username and Password";
} elseif (user_exists($username) === false) {
$errors[] = "We can\\'t find this Username. Are you registerd member ?";
} elseif (active($username) === false) {
$errors[] = "Your Accout till now isn\\'t active";
}
}
print_r($errors);
?>
</div>
</div>
</div>
</section>
<?php
include 'template/footer.php';
示例6: die
<html lang="en">
<?php
include_once 'header.php';
include_once '../includes/functions.php';
if (!loggedinadmin()) {
die("<script>location.href = 'login.php'</script>");
}
if (isset($_GET['del'])) {
$no = $_GET['del'];
delete($no);
} elseif (isset($_GET['acpt'])) {
$no = $_GET['acpt'];
accept($no);
} elseif (isset($_GET['actv'])) {
$no = $_GET['actv'];
active($no);
} elseif (isset($_GET['inac'])) {
$no = $_GET['inac'];
inactive($no);
}
function delete($no)
{
require_once "../includes/sql.php";
$conexion = db_connect();
$sql = "DELETE FROM user WHERE user_id='" . $no . "'";
$result = $conexion->query($sql) or die("oopsy, error when tryin to delete ");
}
function accept($no)
{
require_once "../includes/sql.php";
$conexion = db_connect();
示例7: header
header("location:/inhome.php");
}
if (isset($_POST['nis_active_x'])) {
active($con, 'imp_notes', 'note_id', 1);
header("location:/imp_notes.php");
}
if (isset($_POST['isnt_active_x'])) {
active($con, 'imp_dates', 'dates_id', 0);
header("location:/imp_dates.php");
}
if (isset($_POST['sisnt_active_x'])) {
active($con, 'spec_list', 'spec_id', 0);
header("location:/inhome.php");
}
if (isset($_POST['nisnt_active_x'])) {
active($con, 'imp_notes', 'note_id', 0);
header("location:/imp_notes.php");
}
/*Search Engine
$k=$_GET['k'];
$terms= explode(" ", $k);
$query = "SELECT * FROM search WHERE";
foreach ($terms as $each){
$i++;
if($i==1){
$query.="keywords LIKE '%$each%' ";
}
else{
$query.="OR keywords LIKE'%$each%' ";
}
示例8: submod_add
function submod_add($id, $d)
{
$top = hlpbt('apps_add') . ' ';
if ($d) {
$ver = '_' . $d;
}
$j = 'sbm' . '_submds__x_';
$top .= lj('" title="' . nms(104), 'sbm' . '_submds____' . $id . '_deft', picto('update')) . ' ';
$top .= msqlink('system', 'default_apps') . ' ';
$top .= lj(active($d, ''), 'popup_submds__x__' . $id . '_add', 'defaults') . ' ';
$top .= lj(active($d, 'desk'), 'popup_submds__x_home_' . $id . '_add', 'home') . ' ';
$top .= lj(active($d, 'desk'), 'popup_submds__x_desk_' . $id . '_add', 'desk') . ' ';
$top .= lj(active($d, 'dev'), 'popup_submds__x_dev_' . $id . '_add', 'dev') . ' ';
$r = msql_read('system', 'default_apps' . $ver, '', 1);
$ra = array_flip(msq_cat($r, 1));
foreach ($ra as $va) {
$bt = picto('file', 32) . ' ' . $va;
$rb[$va] .= lj('sicon', 'popup_submds__x_' . $va . '_' . $id . '_adc', $bt) . ' ';
foreach ($r as $k => $v) {
$bt = picto($v[7], 32) . ' ' . $v[0];
if ($v[1] == $va) {
$rb[$va] .= lj('sicon', $j . $k . '_' . $id . '_ads_' . $d, $bt) . ' ';
}
}
}
return popup(nms(92) . ' Apps', $top . make_tabs($rb) . divc('clear', ''), 320);
}
示例9: foreach
<ul class="nav nav-sidebar">
<?php
foreach ($navigation as $nav) {
?>
<?php
if ($nav->shown) {
?>
<li class="<?php
echo active($nav->active);
?>
">
<a href="<?php
echo $nav->url;
?>
">
<i class="fa <?php
echo $nav->icon;
?>
"></i>
<span style="font-size: 9px;"><?php
echo $nav->title;
?>
</span>
</a>
</li>
<?php
}
?>
<?php
示例10: query
}
echo "</td>";
echo "<td>";
$active_yesterday = query(active($yesterday, $yesterday));
while ($row = mysql_fetch_assoc($active_yesterday)) {
echo $row['count'] . ' (' . $row['groupname'] . ')<br/>';
}
echo "</td>";
echo "<td>";
$active_7daysago = query(active($daysago7, $today));
while ($row = mysql_fetch_assoc($active_7daysago)) {
echo $row['count'] . ' (' . $row['groupname'] . ')<br/>';
}
echo "</td>";
echo "<td>";
$active_30daysago = query(active($daysago30, $today));
while ($row = mysql_fetch_assoc($active_30daysago)) {
echo $row['count'] . ' (' . $row['groupname'] . ')<br/>';
}
echo "</td>";
echo "</tr>";
mysql_free_result($active_today);
mysql_free_result($active_yesterday);
mysql_free_result($active_7daysago);
mysql_free_result($active_30daysago);
// denied access
echo "<tr>";
echo "<td>todo: devices denied access</td>";
echo "</tr>";
// newly registered
function registered($startday, $endday)
示例11: admin
function admin()
{
$qb = ses('qb');
$qda = ses('qda');
$qdu = ses('qdu');
$USE = ses('USE');
$auth = ses('auth');
$admin = $_GET['admin'] ? $_SESSION['admin'] = $_GET['admin'] : $_SESSION['admin'];
if ($_GET['set']) {
$_SESSION['set'] = $_GET['set'];
}
if ($USE != "") {
$hubname = rse("hub", $qdu . ' WHERE name="' . $qb . '"');
if (!$hubname) {
$hubname = $qb;
}
list($autologok, $userhub) = sql('name,hub', 'qdu', 'r', 'ip="' . hostname() . '"');
}
$rep = "params";
//verif_user
if ($USE != $qb && $USE != "" && $userhub) {
$hub = lka('/' . $USE, $USE);
} elseif ($USE != $qb && $USE != "" && $autologok != $USE && $autologok) {
$alert .= lkc('txtx', '/?log=on', 'autolog') . ' ';
} elseif ($USE == $qb && !$userhub && prmb(11) >= 4) {
$alert .= lkc("txtred", "/?log=create_hub", "create_hub!");
} elseif ($USE == "") {
$reta = lkc('txtx', htac('module') . 'Home', $qb) . br() . br() . loged($USE, $_SESSION['iq'], "", 7) . br();
}
//admin_menu
$aff = adminauthes();
if ($admin == "=") {
$_SESSION['set'] = $_GET['set'] = $USE ? "Global" : "User";
}
//defaults
if ($aff[$_GET['set']]) {
$admin = key($aff[$_GET['set']]);
}
$_SESSION['admin'] = $admin;
$goto = '/?admin=' . $admin;
//if(!$userhub){unset($aff['User']['mail']); unset($aff['User']['password']);}
//auto_select_category
foreach ($aff as $k => $v) {
if ($v[$admin]) {
$_SESSION['set'] = $k;
$curauth = $v[$admin];
}
$raf = array_merge_b($raf, array_keys($v));
}
if ($curauth === false) {
$curauth = 7;
}
//login
if ($USE) {
$w .= lkc('popw', htac('module') . 'Home', pictxt('home', $hubname)) . ' ';
$w .= btn("popbt", pictxt('user', $USE . ' ' . asciinb($auth)) . ' (' . nameofauthes($auth) . ')');
}
//fastmenu
$fmn = array('console', 'params', 'restrictions', 'apps', 'css', 'finder', 'templates', 'connectors', 'plugin', 'msql', 'tools', 'pictos', 'stats', 'update');
foreach ($raf as $v) {
if (in_array($v, $fmn)) {
$tit .= lkc(active($admin, $v), htac('admin') . $v, pictit(mimes_types($v), $v)) . ' ';
}
}
$reta .= divc('right', $w . $alert);
$tit .= lkc('txtit', htac('admin') . $admin, $admin) . ' ';
if ($admin != "=") {
$reta .= div('', $tit);
}
if ($auth >= 7 && $admin == 'update') {
$ret = adm_update();
}
if ($auth >= $curauth && $curauth) {
switch ($admin) {
//global
case 'console':
$ret = adm_console($auth);
break;
case 'apps':
require_once 'adminx.php';
$ret = adm_apps($_GET['set'], '', $_GET['dig']);
break;
case 'messages':
if ($qb == $USE or $auth >= $curauth) {
$ret = adm_messages();
} else {
$ret = contact(nms(84), 'txtcadr');
}
break;
case 'hubs':
$ret = adm_hubs($auth);
break;
case 'nodes':
$ret = adm_nodes($auth, $goto);
break;
case 'stats':
list($p, $o) = explode('/', $_GET['set']);
$ret = plugin('stats', $p, $o);
break;
case 'newsletter':
//.........这里部分代码省略.........
示例12: active
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">Autism Community</a>
</div>
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav side-nav">
<li <?php
echo active($params, 'article');
?>
><a href="./index.php"><i class="fa fa-pencil"></i> Articles</a></li>
<li <?php
echo active($params, 'video');
?>
><a href="#"><i class="fa fa-play"></i> Videos</a></li>
</ul>
<ul class="nav navbar-nav navbar-right navbar-user">
<li class="dropdown user-dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> <?php
echo $user->name;
?>
<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#"><i class="fa fa-user"></i> Profile</a></li>
<li><a href="#"><i class="fa fa-gear"></i> Settings</a></li>
<li class="divider"></li>
<li><a href="../../logout.php"><i class="fa fa-power-off"></i> Log Out</a></li>
</ul>
示例13: active
active('umum/register');
?>
"><a href="<?php
echo site_url('umum/register');
?>
">Register</a></li>
<?php
} else {
$user = $this->session->userdata('user');
?>
<li><a href="#">Welcome <b><?php
echo ucwords($user['username']);
?>
</b>!</a></li>
<li class="<?php
active('dashboard/index');
?>
"><a href="<?php
echo site_url('dashboard/index');
?>
">Dashboard</a></li>
<li><a href="<?php
echo site_url('umum/logout');
?>
">Logout</a></li>
<!-- <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Shortcut <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Senarai Buku</a></li>
<li><a href="#">Buku Baru</a></li>
<li><a href="#">Maklumat Akaun</a></li>
示例14: active
<a/>
</li>
<?php
}
}
?>
<li style="margin-top: 5px<?php
$page = active();
if ($page == 'favoris.php') {
echo '; background-color: #4e4e4e';
}
?>
">
<a href="favoris.php" <?php
$page = active();
if ($page == 'favoris.php') {
echo 'style="color: white"';
}
?>
><span class="glyphicon glyphicon-heart" style="margin-right: 15px; color: #D9534F"></span> Favorites</a>
</li>
<?php
} else {
?>
<li style="margin-top: 30px">
<a href="index.php"><span class="glyphicon glyphicon-lock" style="margin-right: 15px"></span> Locked</a>
</li>
<?php
}
?>
示例15: url
<a href="<?php
url('iterations-trigonometriques');
?>
" class="<?php
active('iterations-trigonometriques');
?>
">Itérations trigonométriques</a>
<a href="<?php
url('explorations-complexes');
?>
" class="<?php
active('explorations-complexes');
?>
">Explorations complexes</a>
<a href="<?php
url('distributions-aleatoires');
?>
" class="<?php
active('distributions-aleatoires');
?>
">Distributions aléatoires ?</a>
</div>
<div class="page-container">
<?php
include 'pages/' . $_GET['page'] . '.php';
?>
</div>
</div> <!-- / .container -->
</body>
</html>