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


PHP initvar函数代码示例

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


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

示例1: __construct

 public function __construct(array $request = array(), array $opt = array())
 {
     parent::__construct($request, $opt);
     $this->fields = $this->defFields();
     $storeVar = isset($_GET['act']) && $_GET['act'] == 'list';
     // if true store the filter variables
     $init = array_key_exists('init', $this->request);
     $reset = array_key_exists('reset', $this->request);
     if ($init || $reset) {
         $storeVar = true;
     }
     $this->id = (int) initVar('id');
     $this->last_id = initVar('last_id');
     $this->act = initVar('act', 'list');
     $this->do_id = $_SESSION['do_id'];
     $this->mu_id = initvar('mu_id');
     $this->documentType = 'import_seap';
     $this->isDialog = false;
     // Cambia le azioni per edit / delete
     $this->parent_act = 'list';
     $this->order = PageVar('order', '1A', $init, false, $this->baseName, $storeVar);
     $this->registerAjaxFunction('checkImport');
     $this->registerAjaxFunction('confirmDeleteImport');
     $this->registerAjaxFunction('submitFormData');
 }
开发者ID:r3-gis,项目名称:EcoGIS,代码行数:25,代码来源:obj.import_seap.php

示例2: initvar

require "./common.php";
$thread = (int) initvar("t");
$action = (int) initvar("a");
if ($num == 0 || $ForumName == '') {
    header("Location: {$forum_url}?{$GetVars}");
    exit;
}
$phcollapse = "phorum-collapse-{$ForumTableName}";
$new_cookie = "phorum-new-{$ForumTableName}";
$haveread_cookie = "phorum-haveread-{$ForumTableName}";
$phflat = "phorum-flat-{$ForumTableName}";
if ($UseCookies) {
    if (!isset(${$phflat})) {
        ${$phflat} = $ForumFlat;
    }
    if (initvar("r") == 1) {
        $SQL = "Select max(id) as max_id FROM {$ForumTableName}";
        $q->query($DB, $SQL);
        $aryRow = $q->getrow();
        if (isset($aryRow['max_id'])) {
            $max_id = $aryRow['max_id'];
            ${$new_cookie} = $max_id;
            SetCookie($new_cookie, ${$new_cookie}, time() + 31536000);
            SetCookie($haveread_cookie, ${$new_cookie});
            //destroy session cookie
            unset(${$haveread_cookie});
        }
    }
    if (!isset(${$new_cookie})) {
        ${$new_cookie} = '0';
    }
开发者ID:carriercomm,项目名称:xmec,代码行数:31,代码来源:list.php

示例3: textwrap

        $p_subject = "Re: " . $qsubject;
    } else {
        $p_subject = $qsubject;
    }
    $parent = $id;
    if (!${$phflat}) {
        $quote = "{$qauthor} {$lWrote}:\n";
        $quote .= textwrap("\n{$qbody}", 63, "\n", "> ") . "\n";
        $quote = htmlspecialchars($quote);
        $quote_button = "<input type=\"hidden\" name=\"hide\" value=\"" . $quote . "\"><script language=\"JavaScript\"><!--\nthis.document.writeln('<input tabindex=\"100\" type=\"Button\" name=\"quote\" value=\"{$lQuote}\" onClick=\"this.form.body.value=this.form.body.value + this.form.hide.value; this.form.hide.value='+\"''\"+';\">');\n//--></script>";
    }
    $p_body = "";
} else {
    $caption = $lStartTopic;
    $p_subject = initvar("subject");
    $p_body = initvar("body");
}
$p_author = $author;
$p_email = $email;
if (isset($IsError) && $action) {
    echo "<p><strong>{$IsError}</strong>";
}
if ($AllowAttachments && $ForumAllowUploads == 'Y' && $ForumMaxUploads < 4) {
    $enctype = "multipart/form-data";
} else {
    $enctype = "application/x-www-form-urlencoded";
}
?>
<form action="<?php 
echo "{$post_page}.{$ext}";
?>
开发者ID:carriercomm,项目名称:Exult,代码行数:31,代码来源:form.php

示例4: recaptcha_version

function recaptcha_version()
{
    return '<h1>Recaptcha_XH</h1>' . "\n" . '<p>Version: ' . RECAPTCHA_VERSION . '</p>' . "\n" . '<p>Recaptcha_XH is powered by ' . '<a href="http://recaptcha.net/" target="_blank">' . 'reCAPTCHA</a>.</p>' . "\n" . '<p>Copyright &copy; 2011 Christoph M. Becker</p>' . "\n" . '<p style="text-align:justify">This program is free software: you can redistribute it and/or modify' . ' it under the terms of the GNU General Public License as published by' . ' the Free Software Foundation, either version 3 of the License, or' . ' (at your option) any later version.</p>' . "\n" . '<p style="text-align:justify">This program is distributed in the hope that it will be useful,' . ' but WITHOUT ANY WARRANTY; without even the implied warranty of' . ' MERCHAN&shy;TABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the' . ' GNU General Public License for more details.</p>' . "\n" . '<p style="text-align:justify">You should have received a copy of the GNU General Public License' . ' along with this program.  If not, see' . ' <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>' . "\n";
}
/**
 * Plugin administration
 */
if (!empty($recaptcha)) {
    // check requirements // RELEASE-TODO
    if (version_compare(PHP_VERSION, RECAPTCHA_PHP_VERSION) < 0) {
        $e .= '<li>' . sprintf($plugin_tx['recaptcha']['error_phpversion'], TETRIS_PHP_VERSION) . '</li>' . "\n";
    }
    foreach (array('pcre') as $ext) {
        if (!extension_loaded($ext)) {
            $e .= '<li>' . sprintf($plugin_tx['recaptcha']['error_extension'], $ext) . '</li>' . "\n";
        }
    }
    if (strtoupper($tx['meta']['codepage']) != 'UTF-8') {
        $e .= '<li>' . $plugin_tx['recaptcha']['error_encoding'] . '</li>' . "\n";
    }
    initvar('admin');
    initvar('action');
    $o .= print_plugin_admin('off');
    switch ($admin) {
        case '':
            $o .= recaptcha_version();
            break;
        default:
            $o .= plugin_admin_common($action, $admin, $plugin);
    }
}
开发者ID:bbfriend,项目名称:recaptcha_xh,代码行数:31,代码来源:admin.php

示例5: reset

    reset($attachments);
    // Attachment handling:
    if (!empty($attachments) && is_array($attachments) && empty($IsError)) {
        while (list($key, $attachment) = each($attachments)) {
            if ($attachment["name"]) {
                $IsError = add_attachment($attachment, $id);
            }
            if ($IsError) {
                break;
            }
        }
    }
    if (empty($IsError) && @is_array($attachments)) {
        // if it is not a new message and not float to top
        // send them to the message.
        initvar("more");
        if ($thread != $id && $ForumMultiLevel != 2) {
            $more = $thread + 1;
            $more = "&a=2&t={$more}";
        }
        Header("Location: {$forum_url}/{$list_page}.{$ext}?f={$num}{$more}{$GetVars}");
        exit;
    }
}
include phorum_get_file_name("header");
//////////////////////////
// START NAVIGATION     //
//////////////////////////
$menu = array();
if ($ActiveForums > 1) {
    // Forum List
开发者ID:carriercomm,项目名称:xmec,代码行数:31,代码来源:attach.php

示例6: htmlentities

$searchtext = $search;
$searchtext = htmlentities($searchtext);
if (!isset($fldauthor) && !isset($fldsubject) && !isset($fldbody)) {
    $fields[] = "subject";
    $fields[] = "body";
    $fldauthor = 0;
    $fldsubject = 1;
    $fldbody = 1;
} else {
    empty($fldauthor) ? $fldauthor = 0 : ($fields[] = "author");
    empty($fldsubject) ? $fldsubject = 0 : ($fields[] = "subject");
    empty($fldbody) ? $fldbody = 0 : ($fields[] = "body");
}
initvar("date", 30);
initvar("match", 1);
initvar("start_num", 0);
//////////////////////////
// START NAVIGATION     //
//////////////////////////
$menu = array();
if ($ActiveForums > 1) {
    // Forum List
    addnav($menu, $lForumList, "{$forum_page}.{$ext}?f={$ForumParent}{$GetVars}");
}
// New Topic
addnav($menu, $lStartTopic, "{$post_page}.{$ext}?f={$num}{$GetVars}");
// Go To Top
addnav($menu, $lGoToTop, "{$list_page}.{$ext}?f={$num}{$GetVars}");
// Log Out/Log In
if ($ForumSecurity) {
    if (!empty($phorum_auth)) {
开发者ID:carriercomm,项目名称:xmec,代码行数:31,代码来源:simple_search.php

示例7: phpversion

echo $phorumver;
?>
" />
<meta name="Phorum DB" content="<?php 
echo $DB->type;
?>
" />
<meta name="PHP Version" content="<?php 
echo phpversion();
?>
" />
<title>phorum<?php 
if (isset($ForumName)) {
    echo " - {$ForumName}";
}
echo initvar("title");
?>
</title>
<link rel="STYLESHEET" type="text/css" href="<?php 
echo phorum_get_file_name("css");
?>
" />
</head>
<body bgcolor="<?php 
echo empty($ForumBodyColor) ? $default_body_color : $ForumBodyColor;
?>
" link="<?php 
echo empty($ForumBodyLinkColor) ? $default_body_link_color : $ForumBodyLinkColor;
?>
" alink="<?php 
echo empty($ForumBodyALinkColor) ? $default_body_alink_color : $ForumBodyALinkColor;
开发者ID:carriercomm,项目名称:xmec,代码行数:31,代码来源:header.php

示例8: initvar

<?php

require_once XOX_BIN . '/newsletter/dummy.php';
require_once XOX_LIB . '/functions.php';
if (empty($form_title)) {
    $form_title = initvar('form_title', 'Title');
}
if (empty($form_text)) {
    $form_text = initvar('form_text', 'Text');
}
if (empty($form_links)) {
    $form_links = initvar('form_links', array('back' => 'javascript:history.back();'));
}
echo drawFormHeader($form_title, $form_text, 68, $form_links);
开发者ID:hexerei-software,项目名称:XOX-Framework,代码行数:14,代码来源:dlg.confirm.php

示例9: header

//   along with this program.                                                 //
////////////////////////////////////////////////////////////////////////////////
require "./common.php";
if ($phorum_user["moderator"] != true) {
    if (!$phorum_user) {
        header("Location: {$list_page}.{$ext}?f={$num}{$GetVars}");
    } else {
        header("Location: {$HTTP_REFERER}");
    }
    exit;
}
if (empty($i) || empty($t)) {
    header("Location: {$HTTP_REFERER}");
    exit;
}
$id = (int) initvar("i");
//Thats for all those ppl who likes to use different colors in different forums
if ($num != 0) {
    $table_width = $ForumTableWidth;
    $table_header_color = $ForumTableHeaderColor;
    $table_header_font_color = $ForumTableHeaderFontColor;
    $table_body_color_1 = $ForumTableBodyColor1;
    $table_body_font_color_1 = $ForumTableBodyFontColor1;
    $nav_color = $ForumNavColor;
} else {
    $table_width = $default_table_width;
    $table_header_color = $default_table_header_color;
    $table_header_font_color = $default_table_header_font_color;
    $table_body_color_1 = $default_table_body_color_1;
    $table_body_font_color_1 = $default_table_body_font_color_1;
    $nav_color = $default_nav_color;
开发者ID:carriercomm,项目名称:xmec,代码行数:31,代码来源:moderator.php

示例10: initvar

} else {
    $table_width = $default_table_width;
    $table_header_color = $default_table_header_color;
    $table_header_font_color = $default_table_header_font_color;
    $table_body_color_1 = $default_table_body_color_1;
    $table_body_font_color_1 = $default_table_body_font_color_1;
    $nav_color = $default_nav_color;
}
if (empty($target)) {
    if (isset($HTTP_REFERER)) {
        $target = $HTTP_REFERER;
    } else {
        $target = "{$forum_url}/{$forum_page}.{$ext}";
    }
}
initvar("phorum_auth");
//  $target=str_replace("phorum_auth=$phorum_auth", '', $target);
if (isset($logout)) {
    $SQL = "update {$pho_main}" . "_auth set sess_id='' where sess_id='{$phorum_auth}'";
    $q->query($DB, $SQL);
    unset($phorum_auth);
    SetCookie("phorum_auth", '');
    header("Location: {$target}");
    exit;
}
if (empty($forgotpass) && !empty($username) && !empty($password)) {
    $uid = phorum_check_login($username, $password);
    if ($uid) {
        $sess_id = phorum_session_id($_POST['username'], $_POST["password"]);
        phorum_login_user($sess_id, $uid);
        if (!strstr($target, "?")) {
开发者ID:carriercomm,项目名称:Exult,代码行数:31,代码来源:login.php

示例11: echo_data

        echo_data($image, $messages[$seed], $row_color_cnt);
    }
    //end of: if($seed!="0")
    if (@is_array($messages[$seed]["replies"])) {
        $count = count($messages[$seed]["replies"]);
        for ($x = 1; $x <= $count; $x++) {
            $key = key($messages[$seed]["replies"]);
            thread($key);
            next($messages[$seed]["replies"]);
        }
    }
}
@reset($headers);
$row = @current($headers);
if (is_array($row)) {
    if (!initvar("read")) {
        reset($threads);
        $rec = current($threads);
        while (is_array($rec)) {
            $thd = $rec["thread"];
            if (!isset($rec["tcount"])) {
                $rec["tcount"] = 0;
            }
            $tcount = $rec["tcount"];
            $threadtotal[$thd] = $tcount;
            $rec = next($threads);
        }
    } else {
        $threadtotal[$thread] = count($headers);
    }
    $topics["max"] = "0";
开发者ID:carriercomm,项目名称:xmec,代码行数:31,代码来源:multi-threads.php

示例12: addnav

                addnav($menu, $lSearch, "{$search_page}.{$ext}?f={$num}{$GetVars}");
                // Log Out/Log In
                if ($ForumSecurity) {
                    if (!empty($phorum_auth)) {
                        //      addnav($menu, $lLogOut, "login.$ext?logout=1");
                        addnav($menu, $lMyProfile, "profile.{$ext}?f={$f}&id={$phorum_user['id']}{$GetVars}");
                    } else {
                        addnav($menu, $lLogIn, "login.{$ext}");
                    }
                }
                $TopLeftNav = getnav($menu);
                //////////////////////////
                // END NAVIGATION       //
                //////////////////////////
                include "{$include_path}/form.php";
                include phorum_get_file_name("footer");
                exit;
            }
        }
    }
    // This will send email to the mailing list, if applicable,
    // and send email replies to earlier posters, if necessary.
    // Note that when posting to a mailing list, active moderation
    // does not apply.
    post_to_email();
}
if (initvar("attach")) {
    Header("Location: {$forum_url}/{$attach_page}.{$ext}?f={$num}&i={$id}{$GetVars}");
} else {
    Header("Location: {$forum_url}/{$list_page}.{$ext}?f={$num}{$more}{$GetVars}");
}
开发者ID:carriercomm,项目名称:xmec,代码行数:31,代码来源:post.php

示例13: array

<?php

// Blank out potentially dangerous per-forum values
$aryUnset = array('ForumId', 'ForumActive', 'ForumName', 'ForumDescription', 'ForumConfigSuffix', 'ForumFolder', 'ForumParent', 'ForumLang', 'ForumDisplay', 'ForumTableName', 'ForumModeration', 'ForumModEmail', 'ForumModPass', 'ForumEmailList', 'ForumEmailReturnList', 'ForumEmailTag', 'ForumCheckDup', 'ForumMultiLevel', 'ForumCollapse', 'ForumFlat', 'ForumStaffHost', 'ForumAllowHTML', 'ForumAllowUploads', 'ForumTableBodyColor2', 'ForumTableBodyFontColor2', 'ForumTableWidth', 'ForumNavColor', 'ForumNavFontColor', 'ForumTableHeaderColor', 'ForumTableHeaderFontColor', 'ForumTableBodyColor1', 'ForumTableBodyFontColor1');
reset($aryUnset);
while (list($key, $value) = each($aryUnset)) {
    if (isset(${$value})) {
        unset(${$value});
    }
}
initvar("ForumConfigSuffix");
initvar("ForumLang");
initvar("ForumModEmail");
initvar("ForumName");
initvar("ForumParent", 0);
开发者ID:carriercomm,项目名称:xmec,代码行数:15,代码来源:blankset.php

示例14: elseif

    } else {
        $old_message = ${$new_cookie};
    }
} else {
    if (isset($flat)) {
        ${$phflat} = $flat;
    } else {
        ${$phflat} = $ForumFlat;
    }
    if (isset($collapse)) {
        ${$phcollapse} = $collapse;
    } else {
        ${$phcollapse} = $ForumCollapse;
    }
}
if (initvar("admview") != 1) {
    $limitApproved = " and approved='Y'";
} else {
    $limitApproved = "";
}
if ($action != 0 && ($action == 1 || $action == 2)) {
    if ($DB->type == "sybase") {
        $limit = "";
        $q->query($DB, "set rowcount {$ForumDisplay}");
    } elseif ($DB->type == "postgresql") {
        $limit = "";
        $q->query($DB, "set QUERY_LIMIT TO 1");
    } else {
        $limit = " limit 1";
    }
    if ($ForumMultiLevel == 2) {
开发者ID:carriercomm,项目名称:xmec,代码行数:31,代码来源:read.php

示例15: initvar

initvar("done");
if ($action == "edit") {
    initvar("name");
    initvar("password");
    initvar("email");
    initvar("webpage");
    initvar("image");
    initvar("signature");
    initvar("icq");
    initvar("yahoo");
    initvar("aol");
    initvar("jabber");
    initvar("msn");
    initvar("done");
    initvar("Error");
    initvar("process");
}
//Thats for all those ppl who likes to use different colors in different forums
if ($f != 0) {
    $table_width = $ForumTableWidth;
    $table_header_color = $ForumTableHeaderColor;
    $table_header_font_color = $ForumTableHeaderFontColor;
    $table_body_color_1 = $ForumTableBodyColor1;
    $table_body_font_color_1 = $ForumTableBodyFontColor1;
    $nav_color = $ForumNavColor;
} else {
    $table_width = $default_table_width;
    $table_header_color = $default_table_header_color;
    $table_header_font_color = $default_table_header_font_color;
    $table_body_color_1 = $default_table_body_color_1;
    $table_body_font_color_1 = $default_table_body_font_color_1;
开发者ID:carriercomm,项目名称:xmec,代码行数:31,代码来源:profile.php


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