本文整理汇总了PHP中getval函数的典型用法代码示例。如果您正苦于以下问题:PHP getval函数的具体用法?PHP getval怎么用?PHP getval使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getval函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: HookImage_textDownload_progressAddtodownloadquerystring
function HookImage_textDownload_progressAddtodownloadquerystring()
{
if (getval("nooverlay", "") != "") {
return "&nooverlay=true";
}
return false;
}
示例2: set_page_info
protected function set_page_info()
{
// sett opp side informasjon
$this->pagei = new pagei(pagei::TOTAL, $this->num_messages, pagei::ACTIVE_GET, "side", pagei::PER_PAGE, $this->per_page);
$this->limit = $this->pagei->per_page;
// har vi nye meldinger?
if ($this->thread->data_rel && $this->thread->data_rel['ir_unread'] > 0) {
$this->pagei->__construct(pagei::ACTIVE, 1);
$this->limit = max($this->limit, $this->thread->data_rel['ir_unread']);
} elseif (isset($_GET['goto'])) {
$im_id = intval(getval("goto"));
// forsøk å finn meldingen
$ant = $this->thread->message_locate($im_id);
if (!$ant) {
ess::$b->page->add_message("Fant ingen melding med ID {$im_id}.", "error");
redirect::handle();
}
// finn ut hvilken side vi skal til
$side = ceil($ant / $this->per_page);
// gå til korrekt side
if ($this->pagei->active != $side) {
redirect::handle("innboks_les?id={$this->thread->id}&goto={$im_id}&side={$side}");
}
$this->highlight_im_id = $im_id;
}
}
示例3: HookResourceconnectViewResourceactions_anonymous
function HookResourceconnectViewResourceactions_anonymous()
{
if (getval("resourceconnect_source", "") == "") {
return false;
}
# Not a ResourceConnect result set.
global $lang, $title_field, $ref, $baseurl, $search, $offset, $scramble_key, $language, $resource;
# Generate access key
$access_key = md5("resourceconnect" . $scramble_key);
# Formulate resource link (for collections bar)
$view_url = $baseurl . "/pages/view.php?ref=" . $ref . "&k=" . substr(md5($access_key . $ref), 0, 10) . "&language_set=" . urlencode($language) . "&resourceconnect_source=" . urlencode($baseurl);
# Add to collections link.
$url = getval("resourceconnect_source", "") . "/plugins/resourceconnect/pages/add_collection.php?nc=" . time();
$url .= "&title=" . urlencode(get_data_by_field($ref, $title_field));
$url .= "&url=" . urlencode($view_url);
# Add back URL
$url .= "&back=" . urlencode($baseurl . "/pages/view.php?" . $_SERVER["QUERY_STRING"]);
# Add images
if ($resource["has_image"] == 1) {
$url .= "&thumb=" . urlencode(get_resource_path($ref, false, "col", false, "jpg"));
} else {
$url .= "&thumb=" . urlencode($baseurl . "/gfx/" . get_nopreview_icon($resource["resource_type"], $resource["file_extension"], true));
}
?>
<li><a target="collections" href="<?php
echo $url;
?>
">> <?php
echo $lang["action-addtocollection"];
?>
</a></li>
<?php
}
示例4: HookImage_textDownload_usageAddtodownloadquerystring
function HookImage_textDownload_usageAddtodownloadquerystring()
{
if (getval("nooverlay", "") != "") {
return "?nooverlay=true";
}
return "";
}
示例5: HookResourceConnectCollection_downloadInitialise
function HookResourceConnectCollection_downloadInitialise()
{
global $inside_plugin;
if (!isset($inside_plugin)) {
redirect("plugins/resourceconnect/pages/collection_download.php?collection=" . getval("collection", ""));
}
}
示例6: DisplayThemeBar
function DisplayThemeBar($theme1)
{
global $lang,$flag_new_themes,$contact_sheet,$theme_images,$allow_share,$n,$baseurl;
# Work out theme name
$themename=$theme1;
$theme_display=getval("theme_$n","off");
$themes=get_themes(array($theme1));
if (count($themes)>0)
{
?>
<div
onclick="
var theme_display=get_cookie('theme_<?php echo $n?>');
if (theme_display=='off'){var toggle_theme_display='on';} else { var toggle_theme_display='off';}
SetCookie('theme_<?php echo $n?>',toggle_theme_display,1000);
jQuery('#themebar_<?php echo htmlspecialchars(str_replace(array("\""," "),"",$themename)) ?>').slideToggle(0.2);
return false;">
<a href='#'><b><?php echo htmlspecialchars(stripslashes(i18n_get_translated(str_replace("*","",$themename)))) ?></b></a></div>
<div id="themebar_<?php echo htmlspecialchars(str_replace(array("\""," "),"",$themename)) ?>" style="display:<?php if ($theme_display == 'off'){echo 'none';} else {echo '';}?>" >
<?php
for ($m=0;$m<count($themes);$m++)
{ ?><br>
<a href="<?php echo $baseurl?>/pages/search.php?search=!collection<?php echo $themes[$m]["ref"]?>&bc_from=themes" title="<?php echo $lang["collectionviewhover"]?>"><?php echo htmlspecialchars(i18n_get_collection_name($themes[$m])) ?></a>
<?php
}
?><br><br></div><?php
}
}
示例7: HookImage_textTermsBeforeredirectchangeurl
function HookImage_textTermsBeforeredirectchangeurl()
{
global $url;
if (getval("nooverlay", "") != "") {
return $url . "&nooverlay=true";
}
return false;
}
示例8: HookPropose_changesCollection_editSavecollectionAdditionalfields
function HookPropose_changesCollection_editSavecollectionAdditionalfields()
{
global $propose_changes_always_allow;
if (!$propose_changes_always_allow) {
$propose_changes = getval("propose_changes", "") != "" ? 1 : 0;
return "propose_changes='{$propose_changes}',";
}
return "";
}
示例9: __construct
/**
* Construct
*/
public function __construct()
{
$this->forum = new \Kofradia\Forum\Category(getval("f"));
$this->forum->require_access();
$this->forum->add_title();
ess::$b->page->add_title("Ny forumtråd");
$this->show();
$this->forum->load_page();
}
示例10: HookFilterboxAllPreheaderoutput
function HookFilterboxAllPreheaderoutput()
{
if (getval('ajax', '') == '') {
return;
}
?>
<script type="text/javascript">
jQuery(document).ready(showHideFilterboxPanel);
</script>
<?php
}
示例11: HookPropose_changesResource_emailAdditional_email_collection
function HookPropose_changesResource_emailAdditional_email_collection($colrefs, $collectionname, $fromusername, $userlist, $message, $feedback, $access, $expires, $useremail, $from_name, $cc, $themeshare, $themename, $themeurlsuffix, $template, $templatevars)
{
global $propose_changes_always_allow;
if (!$propose_changes_always_allow) {
$propose_changes = getval("propose_changes", "") != "" ? 1 : 0;
if ($propose_changes) {
sql_query("update collection set propose_changes=1 where ref in ('{$colrefs}')");
}
}
return true;
}
示例12: HookResourceconnectPreviewNextpreviewregeneratekey
function HookResourceconnectPreviewNextpreviewregeneratekey()
{
if (getval("resourceconnect_source", "") == "") {
return false;
}
# Not a ResourceConnect result set.
global $ref, $k, $scramble_key;
# Create a new key when moving next/back for a given result set.
$access_key = md5("resourceconnect" . $scramble_key);
$k = substr(md5($access_key . $ref), 0, 10);
return $k;
}
示例13: HookEmbedvideoViewAfterresourceactions
function HookEmbedvideoViewAfterresourceactions()
{
global $embedvideo_resourcetype, $ffmpeg_preview_extension, $resource, $ref, $ffmpeg_preview_max_width, $ffmpeg_preview_max_height, $userfixedtheme, $baseurl, $lang;
if ($resource["resource_type"] != $embedvideo_resourcetype) {
return false;
}
# Not the right type.
?>
<?php
# FLV player - plays the FLV file created to preview video resources.
if (file_exists(get_resource_path($ref, true, "pre", false, $ffmpeg_preview_extension))) {
$flashpath = get_resource_path($ref, false, "pre", false, $ffmpeg_preview_extension, -1, 1, false, "", -1, false);
} else {
$flashpath = get_resource_path($ref, false, "", false, $ffmpeg_preview_extension, -1, 1, false, "", -1, false);
}
$flashpath = urlencode($flashpath);
$thumb = get_resource_path($ref, false, "pre", false, "jpg");
$thumb = urlencode($thumb);
# Choose a colour based on the theme.
# This is quite hacky, and ideally of course this would be CSS based, but the FLV player requires that the colour
# is passed as a parameter.
# The default is a neutral grey which should be acceptable for most user generated themes.
$theme = isset($userfixedtheme) && $userfixedtheme != "" ? $userfixedtheme : getval("colourcss", "greyblu");
$colour = "505050";
if ($theme == "greyblu") {
$colour = "446693";
}
?>
<li><a href="#" onClick="
if (document.getElementById('embedvideo').style.display=='block') {document.getElementById('embedvideo').style.display='none';} else {document.getElementById('embedvideo').style.display='block';}
if (document.getElementById('embedvideo2').style.display=='block') {document.getElementById('embedvideo2').style.display='none';} else {document.getElementById('embedvideo2').style.display='block';}
return false;">> <?php
echo $lang["embed"];
?>
</a></li>
<p id="embedvideo2" style="display:none;float:left;padding:10px 0 3px 0;"><?php
echo $lang["embed_help"];
?>
</p>
<textarea id="embedvideo" style="width:335px;height:200px;display:none;"><?php
if (!hook("replaceembedcode")) {
echo htmlspecialchars('
<object type="application/x-shockwave-flash" data="' . $baseurl . '/lib/flashplayer/player_flv_maxi.swf" width="' . $ffmpeg_preview_max_width . '" height="' . $ffmpeg_preview_max_height . '" class="Picture"><param name="allowFullScreen" value="true" /><param name="movie" value="' . $baseurl . '/lib/flashplayer/player_flv_maxi.swf" /><param name="FlashVars" value="flv=' . $flashpath . '&width=' . $ffmpeg_preview_max_width . '&height=' . $ffmpeg_preview_max_height . '&margin=0&buffer=10&showvolume=1&volume=200&showtime=1&autoplay=1&autoload=0&showfullscreen=1&showstop=1&playercolor=' . $colour . '&startimage=' . $thumb . '" /></object>
');
}
// end hook replaceembedcode
?>
</textarea>
<?php
return true;
}
示例14: __construct
/**
* Construct
*/
public function __construct()
{
$this->forum = new \Kofradia\Forum\Category(getval("id"));
$this->forum->require_access();
$this->forum->add_title();
// slette forumtråder?
if (isset($_POST['slett_emner']) && $this->forum->fmod) {
$this->delete_topics();
}
// vis forumet
$this->show_forum();
$this->forum->load_page();
}
示例15: __construct
/**
* Construct
*/
public function __construct()
{
access::no_guest();
ess::$b->page->add_title("Anti-bot sjekk");
// hvilken side vi skal sendes til
$this->redirect_url = getval("ret");
if (!$this->redirect_url) {
$this->redirect_url = ess::$s['relative_path'] . "/";
}
// sjekk etter anti-bot
$name = getval("name");
$this->antibot = antibot::get($name);
if (!$this->antibot->data) {
ess::$b->page->add_message("Anti-bot oppføringen er ikke opprettet.", "error");
$this->redirect();
}
// kuler?
if ($name == "kuler") {
// gjennomfør pre-check
if (!$this->antibot->kuler_precheck()) {
$this->redirect();
}
// sett lave ventetider
$this->update_delay = 2;
$this->retry_delay = 2;
}
redirect::store("sjekk?name=" . urlencode($this->antibot->name) . '&ret=' . urlencode($this->redirect_url));
// sjekk om anti-boten ikke krever sjekk
if (!$this->antibot->is_check_required()) {
$this->redirect();
}
// sjekk for ventetid
$this->check_wait();
// hent bildene
$this->load_images();
$this->form = \Kofradia\Form::getByDomain("anti-bot", login::$user);
// utføre sjekk?
if (isset($_POST['valider']) && isset($this->images) && !$this->wait) {
$this->check();
}
// nye bilder?
if (isset($_POST['new'])) {
$this->new_imgs();
}
// vis anti-boten
$this->show();
}