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


PHP fSession::get方法代码示例

本文整理汇总了PHP中fSession::get方法的典型用法代码示例。如果您正苦于以下问题:PHP fSession::get方法的具体用法?PHP fSession::get怎么用?PHP fSession::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在fSession的用法示例。


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

示例1: findAll

	/**
	 * Returns all checks on the system
	 * 
	 * @param  string  $sort_column  The column to sort by
	 * @param  string  $sort_dir     The direction to sort the column
	 * @return fRecordSet  An object containing all meetups
	 */
	static function findAll($sort_column = 'name', $sort_dir = 'desc')
	{
       return fRecordSet::build(
          __CLASS__,
          array('enabled=' => true,'user_id=|visibility=' => array(fSession::get('user_id'),0)),
          array($sort_column => $sort_dir)
          );
	}    
开发者ID:rberger,项目名称:Graphite-Tattle,代码行数:15,代码来源:Check.php

示例2: findActive

 static function findActive($check_id = NULL)
 {
     if (!is_null($check_id) && is_numeric($check_id)) {
         $filter = ' AND check_id=' . $check_id;
     } else {
         $filter = '';
     }
     return fRecordSet::buildFromSQL(__CLASS__, array('SELECT subscriptions.* FROM subscriptions WHERE user_id = ' . fSession::get('user_id') . $filter));
 }
开发者ID:nagyist,项目名称:Tattle,代码行数:9,代码来源:Subscription.php

示例3: index

 public function index()
 {
     $this->cache_control('private', 300);
     $this->current_language = fSession::get('last_language', 0);
     if (fMessaging::check('code', '/submit')) {
         $this->code = fMessaging::retrieve('code', '/submit');
     } else {
         $this->code = '';
     }
     $this->nav_class = 'submit';
     $this->render('submit/index');
 }
开发者ID:daerduoCarey,项目名称:oj,代码行数:12,代码来源:SubmitController.php

示例4: findUsersResults

 static public function findUsersResults()
 {
  return fRecordSet::buildFromSQL(
    __CLASS__,
    array('SELECT check_results.* FROM check_results JOIN subscriptions ON check_results.check_id = subscriptions.check_id and subscriptions.user_id = ' . fSession::get('user_id')));
  }
开发者ID:rberger,项目名称:Graphite-Tattle,代码行数:6,代码来源:CheckResult.php

示例5: if

                  <input id="dashboard-background_color" class="span3" type="text" size="30" name="background_color" value="<?=$dashboard->encodeBackgroundColor(); ?>" />
              </div>
            </div><!-- /clearfix -->            
	    <div class="clearfix">
             <label for="dashboard-refresh_rate">Refresh Rate<em>*</em> (in seconds)</label>
             <div class="input">
               <input id="dashboard-refresh_rate" class="span3" type="text" size="30" name="refresh_rate" value="<?=$dashboard->getRefreshRate(); ?>" />
             </div>
            </div>
            <div class="actions span4">
	      <input class="btn primary" type="submit" value="Save" />
              <input class="btn" type="submit" name="action::delete" value="Delete" />
              <a href="<?=Dashboard::makeUrl('view',$dashboard); ?>" class="btn">View</a>
              <div class="required"><em>*</em> Required field</div>
	      <input type="hidden" name="token" value="<?=fRequest::generateCSRFToken(); ?>" />
              <input type="hidden" name="user_id" value="<?=fSession::get('user_id'); ?>" />
            </div>
         </fieldset>
       </div>       
     </form>
    </div>
    <div class="span10">   
   <? if ($action == 'edit') { ?>
   <p class="info"><a href="<?=Graph::makeURL('add',$dashboard); ?>">Add Graph</a></p>
 <?php
   try {
	$graphs->tossIfEmpty();
	$affected = fMessaging::retrieve('affected', fURL::get());
	?>
    <div>
	<table class="zebra-striped">
开发者ID:nleskiw,项目名称:Graphite-Tattle,代码行数:31,代码来源:add_edit_dashboard.php

示例6: count

<?php

$section = 'categories';
$section_id = 25;
$sub = 'listGcategory';
$typeOfUser = fAuthorization::checkAuthLevel('super');
$where = "";
if (!$typeOfUser) {
    $where = " WHERE " . fSession::get('where_at');
}
?>
	
<?php 
$limit = fRequest::encode('limit', 'integer');
$page = fRequest::encode('p', 'integer');
if ($page < 1) {
    exit;
}
$start = ($page - 1) * $limit;
$categories = fRecordSet::buildFromSQL('EconomicUnitCategory', "SELECT * FROM economic_unit_categories {$where} LIMIT {$start},{$limit}", "SELECT count(*) FROM economic_unit_categories {$where}", $limit, $page);
if ($categories->count() == 0) {
    echo '<div class="notification information" >
		Por el momento no hay registros en <b> Categor&iacute;as de Geolocalización</b>.
		</div>';
} else {
    $p = new Pagination($categories->getPages(), $categories->getPage(), 3);
    $pagination = $p->getPaginationLinks();
    ?>
<center>
<table class="contenttoc" style="width:auto; float:left">
				<tr>
开发者ID:nevermind89x,项目名称:Mi-morelia,代码行数:31,代码来源:geolocation_category_list.php

示例7: elseif

	
// --------------------------------- //
} elseif ('add' == $action) {
  $subscription = new Subscription();

  //Load details of the check we are going to subscribe to
  $check = new Check($check_id);

  if (fRequest::isPost()) {	
    try {
      $subscription->populate();
      fRequest::validateCSRFToken(fRequest::get('token'));
      $subscription->store();
      fMessaging::create('affected',$manage_url , $check->getName());
      fMessaging::create('success', $manage_url, 
                         'The subscription to ' . $check->getName() . ' was successfully created');
      fURL::redirect($manage_url);
    } catch (fExpectedException $e) {
      fMessaging::create('error', fURL::get(), $e->getMessage());	
    }	
  } 

  include VIEW_PATH . '/add_edit_subscription.php';	
	
} else {
  $user = new User(fSession::get('user_id'));
  $subscriptions = $user->buildSubscriptions();

  include VIEW_PATH . '/list_subscriptions.php';	
}
开发者ID:rberger,项目名称:Graphite-Tattle,代码行数:29,代码来源:subscription.php

示例8:

              echo '<li' . ($current_url == $setting_list ? ' class="active"' : '') . '><a href="' . $setting_list . '" >Settings</a></li>' . "\n";
if (fAuthorization::checkAuthLevel('admin')) {
              $user_list = User::makeURL('list'); 
              echo '<li><a href="' . User::makeURL('list') . '" >Users</a></li>';
}              
?>
          </ul>
 <?php 
    if (is_numeric(fSession::get('user_id'))) {
        ?>
 <p class="pull-right">
     Logged in as <a href="<?php 
        echo User::makeUrl('edit', fSession::get('user_id'));
        ?>
"><?php 
        echo fSession::get('user_name');
        ?>
</a>
</p>
    <?php 
    }
    ?>
 
</div> 
        </div>
      </div>
<?php 
}
?>
<div class="container-fluid">
<?php 
开发者ID:nleskiw,项目名称:Graphite-Tattle,代码行数:31,代码来源:header.php

示例9: testGetNoValueDefault

 public function testGetNoValueDefault()
 {
     fSession::open();
     $this->assertEquals('default', fSession::get('key', 'default'));
 }
开发者ID:philip,项目名称:flourish,代码行数:5,代码来源:fSessionTest.php

示例10: catch

        try {
            $user->populate();
        } catch (fExpectedException $e) {
            fMessaging::create('error', fURL::get(), $e - getMessage());
        }
    }
    include VIEW_PATH . '/add_edit_user_settings.php';
} elseif ('delete' == $action) {
    try {
        $user = new User($user_id);
        if (fRequest::isPost()) {
            fRequest::validateCSRFToken(fRequest::get('token'));
            $user->delete();
            fMessaging::create('success', User::makeUrl('edit', $user), 'The user ' . $user->getName() . ' was successfully deleted');
            fURL::redirect(User::makeUrl('edit', $user));
        }
    } catch (fNotFoundException $e) {
        fMessaging::create('error', User::makeUrl('edit', $user), 'The line requested could not be found');
        fURL::redirect(User::makeUrl('edit', $user));
    } catch (fExpectedException $e) {
        fMessaging::create('error', fURL::get(), $e->getMessage());
    }
    include VIEW_PATH . '/delete.php';
} else {
    if (!fAuthorization::checkAuthLevel('admin')) {
        fURL::redirect(User::makeURL('edit', fSession::get('user_id')));
    } else {
        $users = User::findAll();
        include VIEW_PATH . '/list_users.php';
    }
}
开发者ID:nleskiw,项目名称:Graphite-Tattle,代码行数:31,代码来源:user.php

示例11:

<?php

require_once '../init.php';
$id_section = 10;
$section = 'user';
$sub = '';
require_once INCLUDES . 'header.php';
?>
			<!-- MAIN CONTAINER -->
			<div id="ja-container" class="wrap ja-r2">
				<div class="main clearfix">
					<?php 
$regions = fSession::get(SESSION_REGIONS);
print_r($regions);
?>
				</div>
			</div>
<?php 
require_once INCLUDES . 'footer.php';
开发者ID:nevermind89x,项目名称:Mi-morelia,代码行数:19,代码来源:index.php

示例12: if

	?>
<table class="zebra-striped">
          <thead>
		<tr>
    <th>Username</th>
    <th>Email</th>
    <th>Action</th>
       </tr></thead><tbody>    
	<?php
	$first = TRUE;
	foreach ($users as $user) {
		?>
    	<tr>
        <td><?php echo $user->prepareUsername() ?></td>
        <td><?php echo $user->prepareEmail() ?></td>
        <td><?php if (fSession::get('user_id') == $user->getUserId() || fAuthorization::checkAuthLevel('admin')) { echo '<a href="' . User::makeUrl('edit',$user) . '">Edit</a>'; } ?>
       <?php if (fAuthorization::checkAuthLevel('admin') || $user->getUserId() != 1) {
           ?> <a href="<?php echo User::makeUrl('delete',$user); ?>">Delete</a></td>
       <?php } ?>
        </tr>
    <?php } ?>
    </tbody></table>
    <?
} catch (fEmptySetException $e) {
	?>
	<p class="info">There are currently no Tattle users? <a href="<?php echo '<a href="'. User::makeUrl('add'); ?>">Add one now</a></p>
	<?php
}
?>
</div>
<?php $tmpl->place('footer') ?>
开发者ID:rberger,项目名称:Graphite-Tattle,代码行数:31,代码来源:list_users.php

示例13:

                  <h1>London<br/>Hackspace</h1>
            </div>
        </div><!-- end of hd -->
    <?php 
}
?>
    <!-- end of Header section -->

    <!-- Start of Main Body section -->
    <div id="bd">
        <?php 
if (!isset($hide_menu)) {
    ?>
            <?php 
    require 'menu.php';
    ?>
            <div id="non-menu-content" class="grid_10">
              <?php 
    if ($user && !fSession::get('suppress_profile_notification') && !$user->getHasProfile() && $page != 'edit') {
        ?>
                <div class="profile-alert alert alert-info alert-dismissable">
                  <button type="button" class="close" data-dismiss="alert" data-persist="suppress_profile_notification"
                    aria-hidden="true">&times;</button>
                  You haven't filled in your member profile details yet.
                  <a href="/members/profile_edit.php" class="alert-link">Complete your profile</a> to let other members know more about you.
                </div>
              <?php 
    }
    ?>
        <?php 
}
开发者ID:increpare,项目名称:hackspace-foundation-sites,代码行数:31,代码来源:header.php

示例14: if

	?>
<table class="zebra-striped">
          <thead>
		<tr>
    <th>Username</th>
    <th>Email</th>
    <th>Action</th>
       </tr></thead><tbody>    
	<?php
	$first = TRUE;
	foreach ($users as $user) {
		?>
    	<tr>
        <td><?=$user->prepareUsername(); ?></td>
        <td><?=$user->prepareEmail(); ?></td>
        <td><?php if (fSession::get('user_id') == $user->getUserId() || fAuthorization::checkAuthLevel('admin')) { 
                     echo '<a href="' . User::makeUrl('edit',$user) . '">Edit</a> | '; 
                     echo '<a href="' . Setting::makeURL('list','user',NULL,$user->getUserId()) . '">Settings</a>';
                   } ?>
       <?php if (fAuthorization::checkAuthLevel('admin') && $user->getUserId() != 1) {
           ?> <a href="<?=User::makeUrl('delete',$user); ?>">Delete</a></td>
       <?php } ?>
        </tr>
    <?php } ?>
    </tbody></table>
    <?
} catch (fEmptySetException $e) {
	?>
	<p class="info">There are currently no Tattle users? <a href="<?=User::makeUrl('add'); ?>">Add one now</a></p>
	<?php
}
开发者ID:nleskiw,项目名称:Graphite-Tattle,代码行数:31,代码来源:list_users.php

示例15: array

<?php

include 'inc/init.php';
fAuthorization::requireLoggedIn();
$breadcrumbs[] = array('name' => 'Alerts', 'url' => 'index.php', 'active' => false);
$page_num = fRequest::get('page', 'int', 1);
$offset = ($page_num - 1) * $GLOBALS['PAGE_SIZE'];
$results = NULL;
$latest_alerts = 'SELECT c.check_id,name,r.status,count(c.check_id) as count, r.timestamp ' . 'FROM subscriptions s ' . 'JOIN checks c ON s.check_id = c.check_id ' . 'JOIN check_results r ON s.check_id = r.check_id ' . 'WHERE r.timestamp >= DATE_SUB(CURDATE(),INTERVAL 1 DAY) ' . 'AND r.status IS NOT NULL ' . 'AND acknowledged = 0 ' . 'AND s.user_id = ' . fSession::get('user_id') . ' ' . 'GROUP BY c.check_id ' . 'LIMIT ' . $GLOBALS['PAGE_SIZE'] . ' ' . 'OFFSET ' . $offset . ';';
$results = $db->query($latest_alerts);
$alert_count = $results->countReturnedRows();
include 'inc/views/index.php';
开发者ID:nagyist,项目名称:Tattle,代码行数:12,代码来源:index.php


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