本文整理汇总了PHP中actionUrl函数的典型用法代码示例。如果您正苦于以下问题:PHP actionUrl函数的具体用法?PHP actionUrl怎么用?PHP actionUrl使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了actionUrl函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: access
function access($policy)
{
if (!is_array($policy)) {
$policy = explode(',', $policy);
}
$canAccess = false;
foreach ($policy as $p) {
switch ($p) {
case 'local':
if ($_SERVER['REMOTE_ADDR'] == '127.0.0.1') {
$canAccess = true;
}
break;
case 'internal':
$i = $_SERVER['REMOTE_ADDR'];
$f = CutSegment('.', $i);
if ($f == '10' && $_SERVER['HTTP_X_FORWARDED_FOR'] == '') {
$canAccess = true;
}
break;
case 'auth':
if ($_SESSION['uid'] > 0) {
$canAccess = true;
}
break;
}
}
if (!$canAccess) {
header('location: ' . actionUrl('signin', 'accounts'));
die;
}
return $canAccess;
}
示例2: MakeRequest
function MakeRequest($mode, $entityInfo)
{
$result = cqrequest('http://hubbub.at/ab', array(
'mode' => $mode,
'entity' => $entityInfo,
'callback' => actionUrl('abconfirm', 'endpoint', array(), true)));
return($result['data']);
}
示例3: getMenuLinks
static function getMenuLinks()
{
$items = array();
$items[] = array('icon' => 'building-o', 'title' => l10n('devices.index'), 'url' => actionUrl('index', 'devices'));
$items[] = array('icon' => 'hand-o-down', 'title' => l10n('events.manual'), 'url' => actionUrl('manual', 'events'));
$items[] = array('icon' => 'heartbeat', 'title' => l10n('radiator.minion'), 'url' => actionUrl('index', 'radiator'));
if (cfg('cameras')) {
$items[] = array('icon' => 'video-camera', 'title' => l10n('cam.index'), 'url' => actionUrl('index', 'cam'));
}
return $items;
}
示例4: ajax_cli
function ajax_cli()
{
$cmd = explode(' ', trim($_REQUEST['q']));
$method = array_shift($cmd);
if (substr($method, 0, 3) == 'hm.') {
print_r(HMRPC(substr($method, 3), $cmd));
if ($method == 'hm.setInstallMode') {
print 'You have 60 seconds to pair your device. After completing the pairing, click here to create an entry for it: <a href="' . actionUrl('pair', 'devices') . '">Pairing Complete</a>.';
}
} else {
profile_point('starting command');
eval(trim($_REQUEST['q']));
profile_point('command executed');
print chr(10);
print_r($GLOBALS['profiler_log']);
}
}
示例5: foreach
foreach($this->model->getMyGroups() as $grp)
$GLOBALS['group.options'][] = '<option value="'.$grp['lg_key'].'">'.$grp['lg_name'].'</option>';
include_once('templates/friendlist.php');
tmpl_friendlist($this->model->getFriends('req.rcv'), 'friends_rcv_rowcallback');
?><script>
function status_indicator(rowid, status)
{
if(status == null) status = '<img src="themes/default/ajax-loader.gif" align="absmiddle"/>';
$('#'+rowid+'_status').html(status);
}
function friend_ignore(rowid, dskey)
{
status_indicator(rowid);
$.post('<?= actionUrl('ajax_ignore', 'friends') ?>', {'key' : dskey}, function(data) {
$('#'+rowid).html(data);
});
}
function friend_accept(rowid, dskey)
{
status_indicator(rowid);
$.post('<?= actionUrl('ajax_accept', 'friends') ?>', {'key' : dskey, 'group' : $('#group_select_'+rowid+' option:selected').val() }, function(data) {
$('#'+rowid).html(data);
});
}
</script>
示例6: array
<?php
echo $this->_getSubmenu2();
?>
<?php
$adminModules = array(array('title' => 'Clients', 'icon' => '', 'url' => actionUrl('clients', 'devices')), array('title' => 'Device List', 'icon' => '', 'url' => actionUrl('show', 'devices')), array('title' => 'HM Command Line', 'icon' => '', 'url' => actionUrl('cli', 'devices')), array('title' => 'HM Pair Device', 'icon' => '', 'url' => actionUrl('pairhm', 'devices')), array('title' => 'Groups', 'icon' => '', 'url' => actionUrl('groups', 'devices')), array('title' => 'Modes', 'icon' => '', 'url' => actionUrl('modes', 'devices')));
?>
<ul>
<?php
foreach ($adminModules as $am) {
?>
<ol><a href="<?php
echo $am['url'];
?>
"><?php
echo htmlspecialchars($am['title']);
?>
</a></ol>
<?php
}
?>
</ul>
示例7: print
<?
if($_REQUEST['controller'] != 'signin') l10n_load('mvc/signin/l10n');
?>
<div class="paragraph padded_extra" style="width: 550px">
<?
/* fixme: Twitter Signin is broken
if($GLOBALS['config']['twitter']['enabled'] === true) $signInLinks[] = '<a class="btn" href="'.actionUrl('twitter', 'signin').'">Twitter</a>';
*/
if($GLOBALS['config']['facebook']['enabled'] === true) $signInLinks[] = '<a class="btn" href="'.actionUrl('fb', 'signin').'">Facebook</a>';
$signInLinks[] = '<a class="btn" href="'.actionUrl('google', 'signin').'">Google</a>';
$signInLinks[] = '<a class="btn" href="'.actionUrl('yahoo', 'signin').'">Yahoo</a>';
$signInLinks[] = '<a class="btn" onclick="$(\'#signinform\').html($(\'#signinform_openid\').html());">OpenID</a>';
$signInLinks[] = '<a class="btn" onclick="$(\'#signinform\').html($(\'#signinform_email\').html());">Email</a>';
print(implode(' ', $signInLinks));
?><br/><br/>
<div id="signinform">
<? include('mvc/signin/signin.ajax_'.getDefault($_SESSION['load_signin'], 'email').'form.php'); ?>
</div>
<div id="signinform_email" style="display:none">
<? include('mvc/signin/signin.ajax_emailform.php'); ?>
</div>
<div id="signinform_openid" style="display:none">
<? include('mvc/signin/signin.ajax_openidform.php'); ?>
</div>
<div style="margin-bottom: 8px; margin-top: 4px;">
<?
if($_REQUEST['controller'] == 'signin')
{
?>
示例8: htmlspecialchars
, $(this).is(':checked'))"/>
<label for="c_<?php
echo $ds['d_key'];
?>
"><?php
echo htmlspecialchars($ds['d_name'] . ' (' . first($ds['d_alias'], $ds['d_key']));
?>
)</label>
</div><?php
}
?>
<script>
function changeGroup(deviceKey, val)
{
$.post('<?php
echo actionUrl('group', 'devices');
?>
',
{ id : '<?php
echo htmlspecialchars($_REQUEST['id']);
?>
', device : deviceKey, 'inGroup' : (val ? 'Y' : 'N'), cmd : 'change' },
function(data) {
});
}
</script>
示例9: array
default:
if (!isset($this->devices['HM:' . $h['ADDRESS']])) {
// unknown device, make new dataset
$dds = array('d_bus' => 'HM', 'd_type' => $h['TYPE'], 'd_room' => 'unknown', 'd_name' => 'New ' . $h['TYPE'] . ' ' . date('Y-m-d H:i:s'), 'd_id' => $h['ADDRESS']);
$dds['d_key'] = o(db)->commit('devices', $dds);
$this->devices['HM:' . $h['ADDRESS']] = $dds;
}
$this->devices['HM:' . $h['ADDRESS']]['info'] = $h;
break;
}
}
foreach ($this->devices as $d) {
$di = array();
foreach ($d as $k => $v) {
$di[] = $k . '=' . $v;
}
?>
<div><?php
echo implode(', ', $di);
?>
</div><?php
}
?>
<script>
document.location.href = '<?php
echo actionUrl('show', 'devices');
?>
';
</script>
示例10: ABNewEntry
function ABNewEntry($entityDS, $commentText)
{
$entityDS['comment'] = $commentText;
$entityDS['email'] = md5($this->user->ds['u_email']);
$entityInfo = json_encode($entityDS);
// this is important: we need to prepare the endpoint API to give out
// the confirmation before we send the request to the AB, because the AB
// may hold the request until it's completed ITS confirmation request
// back to us!
h2_nv_store('abreq/'.$entityDS['_key'], array(
'abrequest' => 'pending',
'checksum' => md5($entityInfo)));
// now, make the request to add our info to the AB
$result = cqrequest('http://hubbub.at/ab', array(
'mode' => 'new',
'entity' => $entityInfo,
'callback' => actionUrl('abconfirm', 'endpoint', array(), true)));
return($result['data']);
}
示例11: implode
">
<div id="menu">
<?php
echo implode('', $mainMenu);
?>
</div>
<div id="header_outer">
<div style="float:right;padding:5px;"><a href="<?php
echo actionUrl('client_settings', 'devices', array('id' => 'client/' . $_SERVER['REMOTE_ADDR']));
?>
"><i class="fa fa-cog"></i></a></div>
<div id="header">
<a href="<?php
echo actionUrl('index', 'home');
?>
"><i class="fa fa-home"></i>
<span id="lefthdr">
Home Control <?php
echo $GLOBALS['pagetitle'];
?>
</span><span id="lefthdr2"></span>
</a>
</div>
</div>
<div id="content_outer">
<div id="msgheader"></div>
<div id="content">
<table width="100%">
示例12: setConfigData
->receive(function($ndata) {
setConfigData($ndata+getConfigData());
print(h2_uibanner(l10n('settings.saved'), true));
})
->display();
?></td>
</tr>
</table>
<br/><hr/>
Advanced options:
<a href="<?php
echo actionUrl('index', 'test');
?>
">run unit tests</a>
<script>
setInterval(function() {
$.post('<?php
echo actionUrl('ajax_servercheck', 'settings');
?>
', function(data) {
$('#server_status').html(data.server_status);
$('#ping_status').html(data.ping_status);
$('#memcache_status').html(data.memcache_status);
$('#s3_status').html(data.s3_status);
}, 'json');
}, 2000);
</script>
示例13: implode
echo $ent->key();
?>
">
<?php
echo implode('', $GLOBALS['group.options']);
?>
</select>
</div>
</td>
</tr><?
}
?></table><?
}
?>
<script>
function do_friend_request(id)
{
$('#frq_'+id).append(' <img src="themes/default/ajax-loader.gif" align="absmiddle">');
$.post('<?php
echo actionUrl('ajax_friend_request', 'friends');
?>
', { 'id': id, 'group' : $('#group_select_'+id+' option:selected').val() }, function(data) {
$('#frq_'+id).html(data);
});
}
$("button, input:submit, input:button, a.btn").button();
</script>
示例14: l10n
<?
?>
<br/>
<h2><?php
echo l10n('twitter.signing.in');
?>
...</h2>
<a href="<?php
echo actionUrl('index', 'settings');
?>
" class="btn"><?php
echo l10n('cancel');
?>
</a>
<!--<a href="<?php
echo $this->model->oAuthSignin();
?>
">Continue</a>-->
<script>
document.location.href = '<?php
echo $this->model->oAuthSignin();
?>
';
</script>
示例15: l10n
<div style="width: 800px;">
<div class="balloonhelp"><?php
echo l10n('ab.balloon');
?>
</div>
<br/>
<h2 style="padding-bottom: 8px;"><?php
echo l10n('ab');
?>
</h2>
<div id="mystatus">
<img src="themes/default/ajax-loader.gif" align="absmiddle"/>
<?php
echo l10n('ab.lookingyouup');
?>
</div>
</div>
<script>
setTimeout(function(){
$('#mystatus').load('<?php
echo actionUrl('ajax_abstatus', $this->name, array('r' => time()));
?>
'); }, 500);
</script>