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


PHP PVars::getObj方法代码示例

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


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

示例1: column_col3

 protected function column_col3()
 {
     $trip = $this->trip;
     $trip_data = $this->trip_data;
     $words = new MOD_words();
     $layoutbits = new MOD_layoutbits();
     $member = $this->model->getLoggedInMember();
     $google_conf = PVars::getObj('config_google');
     $Model = new Blog();
     $callback = $this->getCallbackOutput('BlogController', 'createProcess');
     // get the saved post vars
     // todo: grab from page model
     $vars = array();
     $request = PRequest::get()->request;
     $errors = array();
     $lang = array();
     //$tripIt = $Model->getTripFromUserIt($member->id);
     //$defaultVis = A PP_User::getSetting($User->getId(), 'APP_blog_defaultVis');
     // defaults to public then
     $defaultVis = false;
     if (!$member) {
         $isOwnTrip = false;
     } else {
         $isOwnTrip = $trip->IdMember == $member->id;
     }
     require 'templates/singletrip_details.php';
     require 'templates/singletrip.php';
     $shoutsCtrl = new ShoutsController();
     $shoutsCtrl->shoutsList('trip', $trip->trip_id);
 }
开发者ID:gpuenteallott,项目名称:rox,代码行数:30,代码来源:tripsingletrip.page.php

示例2: _languageOptions

function _languageOptions($words)
{
    $model = new FlaglistModel();
    $languages = $model->getLanguages();
    $langarr = array();
    foreach ($languages as $language) {
        $lang = new StdClass();
        $lang->Name = $language->Name;
        $lang->TranslatedName = $words->getSilent($language->WordCode);
        $lang->ShortCode = $language->ShortCode;
        $langarr[] = $lang;
    }
    usort($langarr, "cmpLang");
    $langOptions = '';
    $request_string = htmlspecialchars(implode('/', PVars::get()->request), ENT_QUOTES);
    $langOptions = '';
    foreach ($langarr as $language) {
        $abbr = $language->ShortCode;
        $png = $abbr . '.png';
        if (!isset($_SESSION['lang'])) {
            // hmm
        } else {
            $langOptions .= '<option value="' . PVars::getObj("env")->baseuri . 'rox/in/' . $abbr . '/' . $request_string . '" ' . ($_SESSION['lang'] == $abbr ? 'selected="selected"' : '');
            $langOptions .= '>' . $language->TranslatedName . ' (' . trim($language->Name) . ')</option>';
        }
    }
    return $langOptions;
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:28,代码来源:_languageselector.helper.php

示例3: formatFeedItem

 /**
  * TODO: source url?
  */
 protected function formatFeedItem($title, $message, $pubdate, $link, $author)
 {
     $phpdate = strtotime($pubdate);
     $pubdate = date("D, d M Y H:i:s", $phpdate) . " GMT";
     $rsstitle = $this->ww->RssTitle($title, $author);
     return "\r\n          <item>\r\n            <title>" . strip_tags($rsstitle) . "</title>\r\n            <description>" . strip_tags($message) . "</description>\r\n            <source url=\"http://www.bewelcome.org/\">BeWelcome</source>\r\n            <pubDate>" . $pubdate . "</pubDate>\r\n            <category>BeWelcome</category>\r\n               <guid>" . PVars::getObj('env')->baseuri . $link . "</guid>\r\n            <link>" . PVars::getObj('env')->baseuri . $link . "</link>\r\n            <author>" . $author . "</author>\r\n          </item>\r\n        ";
 }
开发者ID:gpuenteallott,项目名称:rox,代码行数:10,代码来源:rss.page.php

示例4: column_col3

    protected function column_col3()
    {
        $page_url = PVars::getObj('env')->baseuri . implode('/', PRequest::get()->request);
        echo '
<h3>Hellouniverse Calculator!</h3>
        ';
        if (!($mem_redirect = $this->layoutkit->formkit->getMemFromRedirect())) {
            // nothing, this is a fresh calculator page
        } else {
            // result from calculation
            echo '
<p>
Result from last calculation: ' . $mem_redirect->x . ' + ' . $mem_redirect->y . ' = ' . $mem_redirect->z . '
</p>
            ';
        }
        echo '
<p>
<form method="POST" action="' . $page_url . '">
' . $this->layoutkit->formkit->setPostCallback('HellouniverseController', 'calculatorCallback') . '
<input name="x"/> + <input name="y"/> = ?
<input type="submit" value="send"/>
</form>
</p>
        ';
    }
开发者ID:gpuenteallott,项目名称:rox,代码行数:26,代码来源:hellocalc.page.php

示例5: DBConnect

function DBConnect()
{
    global $_SYSHCVOL;
    CheckDBParams();
    $db = mysql_connect($_SYSHCVOL['MYSQLServer'], $_SYSHCVOL['MYSQLUsername'], $_SYSHCVOL['MYSQLPassword']);
    if (!$db) {
        $str = "bad mysql_connect " . mysql_error();
        error_log($str . $_SYSHCVOL['MYSQLServer']);
        bw_error($str);
    }
    if (!mysql_select_db($_SYSHCVOL['MYSQLDB'], $db)) {
        $str = "bad mysql_select_db " . mysql_error();
        error_log($str . " select db {$_SYSHCVOL['MYSQLDB']}");
        bw_error($str);
    }
    // Line to force use of UTF-8
    // Natively dabase is sio latin1
    mysql_query("SET NAMES 'utf8'");
    mysql_query("SET CHARACTER SET 'utf8'");
    mysql_query("SET collation_connection='utf8_general_ci'");
    global $i_am_the_mailbot;
    if ('auto' == PVars::getObj('db')->dbupdate && !(isset($_SYSHCVOL['NODBAUTOUPDATE']) ? $_SYSHCVOL['NODBAUTOUPDATE'] : true) && !(isset($i_am_the_mailbot) ? $i_am_the_mailbot : false)) {
        DBUpdateCheck();
    }
    // Adding a time limit
    set_time_limit(15);
    // No page must go longer than this number of seconds
    // mysql_query("SET CHARACTER SET 'utf8'", $db );
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:29,代码来源:bwdb.php

示例6: column_col3

    protected function column_col3()
    {
        $words = $this->words;
        $cnt_pictures = $this->cnt_pictures;
        $statement = $this->statement;
        $gallery = $this->gallery;
        $mem_redirect = $this->layoutkit->formkit->getMemFromRedirect();
        $page_url = PVars::getObj('env')->baseuri . implode('/', PRequest::get()->request);
        $formkit = $this->layoutkit->formkit;
        $callback_tag = $formkit->setPostCallback('GalleryController', 'updateGalleryCallback');
        if ($this->myself && $this->upload) {
            // Display the upload form
            require SCRIPT_BASE . 'build/gallery/templates/uploadform.php';
        }
        $this->thumbsize = 1;
        echo '<form method="POST" action="">' . $callback_tag;
        require SCRIPT_BASE . 'build/gallery/templates/imagefixedcolumns.list.php';
        if ($this->myself) {
            echo <<<HTML
        <p class="small">
            <input type="checkbox" name="selectAllRadio" class="checker" onclick="common.selectAll(this);">
            &nbsp;&nbsp;{$words->get('SelectAll')}
            &nbsp;&nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;&nbsp;
            {$words->get('GalleryWithSelected')}: &nbsp;&nbsp;&nbsp;&nbsp;

            <input name="gallery" type="hidden" value="{$gallery->id}">
            <input name="removeOnly" type="hidden" value="1">
            <input type="submit" name="button" value="{$words->getBuffered('GalleryRemoveImagesFromPhotoset')}" class="button" style="cursor:pointer"/>
            <a href="gallery/show/sets/{$this->gallery->id}/upload" class="button" /><img src="images/icons/picture_add.png">{$words->get('GalleryUploadPhotos')}</a>

        </p>
        </form>
HTML;
        }
    }
开发者ID:gpuenteallott,项目名称:rox,代码行数:35,代码来源:gallerysetdetails.page.php

示例7: body

 /**
  * content of the middle column - this is the most important part
  */
 protected function body()
 {
     // get the translation module
     $words = $this->getWords();
     $page_url = PVars::getObj('env')->baseuri . implode('/', PRequest::get()->request);
     $request = PRequest::get()->request;
     $callbacktag = $this->layoutkit->formkit->setPostCallback('GeoController', 'SelectorCallback');
     if (!($mem_redirect = $this->layoutkit->formkit->getMemFromRedirect())) {
         $locations_print = '';
     } elseif ($mem_redirect->location) {
         $Geo = new GeoController();
         $locations_print = $Geo->GeoSearch($mem_redirect->location, 40, false, $callbacktag);
     } else {
         $Geo = new GeoController();
         $locations_print = $Geo->GeoSearch(' ', 40, false, $callbacktag);
     }
     // Just for testing:
     // if (isset($_SESSION['GeoVars'])) var_dump($_SESSION['GeoVars']);
     // if (isset($_SESSION['GeoVars']['geonamename'])) var_dump($_SESSION['GeoVars']['geonamename']);
     // if (isset($request[2]) && $request[2] == 'save' && $mem_redirect->geolocation) {
     // $geolocation = $mem_redirect->geolocation;
     // list($geonameid, $geonamename) = preg_split('/[//]/', $geolocation);
     // $_SESSION['SignupBWVars']['geonameid'] = $geonameid;
     // $_SESSION['SignupBWVars']['geonamename'] = $geonamename;
     // print 'GEO SET';
     // } else {
     // print 'GEO NOT SET';
     // }
     require 'templates/popup.php';
 }
开发者ID:gpuenteallott,项目名称:rox,代码行数:33,代码来源:geopopup.page.php

示例8: _getBugreportLink

/**
 * used in footer
 */
function _getBugreportLink()
{
    $url = PVars::getObj("env")->baseuri . "feedback?";
    $url .= "IdCategory=1&amp;";
    $url .= "RequestURI=";
    $url .= urlencode('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
    return $url;
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:11,代码来源:footer.helper.php

示例9: __construct

 public function __construct()
 {
     $db = PVars::getObj('config_rdbms');
     if (!$db) {
         throw new PException('DB config error!');
     }
     $dao = PDB::get($db->dsn, $db->user, $db->password);
     self::$dao =& $dao;
 }
开发者ID:gpuenteallott,项目名称:rox,代码行数:9,代码来源:params.lib.php

示例10: menu_link

 function menu_link($link, $to, $msg, $src)
 {
     /* tiny helper function to make things look nicer -- guaka wished PHP had lambdas! */
     echo "        <span", factive($link, $to), ">";
     if (!empty($src)) {
         echo "<img src=\"" . PVars::getObj('env')->baseuri . $src;
     }
     echo "<a href='" . bwlink($to) . "'>", $msg, "</a></span>\n";
 }
开发者ID:gpuenteallott,项目名称:rox,代码行数:9,代码来源:menus.php

示例11: __construct

 private function __construct()
 {
     if (!($configDNSBlock = PVars::getObj('dnsblock') && isset($configDNSBlock->dns))) {
         // fallback
         $this->_dns_list = array('sbl.spamhaus.org', 'sbl-xbl.spamhaus.org');
     } else {
         $this->_dns_list = array_map('trim', explode(',', $configDNSBlock->dns));
     }
 }
开发者ID:gpuenteallott,项目名称:rox,代码行数:9,代码来源:dnsblock.lib.php

示例12: search_column_col3

 public function search_column_col3($sortorder, $queries, $mapstyle, $varsOnLoad, $varsGet, $TabAccomodation)
 {
     $google_conf = PVars::getObj('config_google');
     if ($mapstyle == "mapoff") {
         require 'templates/search_nomap.column_col3.php';
     } else {
         require 'templates/search.column_col3.php';
     }
 }
开发者ID:gpuenteallott,项目名称:rox,代码行数:9,代码来源:searchmembers.view.php

示例13: column_col3

    protected function column_col3()
    {
        // get translation module
        $layoutkit = $this->layoutkit;
        $words = $layoutkit->getWords();
        $model = $this->getModel();
        $page_url = PVars::getObj('env')->baseuri . implode('/', PRequest::get()->request);
        $formkit = $layoutkit->formkit;
        $callback_tag = $formkit->setPostCallback('NotifyController', 'NotifyAdminCallback');
        $formstart = '<form name="msgform" id="msgform" action="' . $page_url . '" method="post">';
        $formstart .= $callback_tag;
        $formend = '</form>';
        $widget = $layoutkit->createWidget(new NotifyAdminWidget());
        $widget->model = $model;
        $widget->items_per_page = 20;
        $widget->active_page = $this->active_page;
        $widget->visible_range = 2;
        ?>

        <div id="notes">
            <h3>Administer notes</h3>
            <form action="<?php 
        echo $page_url;
        ?>
" method="post">
                <?php 
        if ($widget->needsPagination()) {
            $widget->showPagination();
        }
        ?>
                <?php 
        $widget->render();
        ?>
                <?php 
        if ($widget->needsPagination()) {
            $widget->showPagination();
        }
        ?>
                <input type="hidden" name="action" value="delete"/>
                <?php 
        echo $callback_tag;
        ?>
                <input type="submit" name="button" value="Delete" id="button" />
            </form>
                <hr />
            <form action="<?php 
        echo $page_url;
        ?>
" method="post">
                <?php 
        $this->notesActions($callback_tag);
        ?>
            </form>
        </div>
        <?php 
    }
开发者ID:gpuenteallott,项目名称:rox,代码行数:56,代码来源:notifyadmin.page.php

示例14: _redirect

 private function _redirect($rel_url)
 {
     /*
     echo PVars::getObj('env')->baseuri.'<br>';
     echo PVars::getObj('env')->baseuri.implode('/', PRequest::get()->request).'<br>';
     echo PVars::getObj('env')->baseuri.$rel_url;
     */
     header('Location: ' . PVars::getObj('env')->baseuri . $rel_url);
     PPHP::PExit();
 }
开发者ID:gpuenteallott,项目名称:rox,代码行数:10,代码来源:lastcomments.ctrl.php

示例15: ShowOnline

 public function ShowOnline()
 {
     global $_SYSHCVOL;
     $words = new MOD_words();
     PVars::getObj('page')->title = $words->getBuffered('WhoIsOnLinePage');
     $TMembers = $this->_model->GetMembers();
     $TGuests = $this->_model->GetGuests();
     $TotMembers = $this->_model->GetTotMembers();
     require 'templates/showonline.php';
 }
开发者ID:gpuenteallott,项目名称:rox,代码行数:10,代码来源:online.view.php


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