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


PHP retrieve函数代码示例

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


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

示例1: textile

 function textile($text, $lite = '')
 {
     if (get_magic_quotes_gpc() == 1) {
         $text = stripslashes($text);
     }
     $text = incomingEntities($text);
     $text = encodeEntities($text);
     $text = fixEntities($text);
     $text = cleanWhiteSpace($text);
     $text = getRefs($text);
     $text = noTextile($text);
     $text = image($text);
     $text = links($text);
     $text = span($text);
     $text = superscript($text);
     $text = footnoteRef($text);
     $text = code($text);
     $text = glyphs($text);
     $text = retrieve($text);
     if ($lite == '') {
         $text = lists($text);
         $text = table($text);
         $text = block($text);
     }
     /* clean up <notextile> */
     $text = preg_replace('/<\\/?notextile>/', "", $text);
     /* turn the temp char back to an ampersand entity */
     $text = str_replace("x%x%", "&amp;", $text);
     $text = str_replace("<br />", "<br />\n", $text);
     return trim($text);
 }
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:31,代码来源:textile2.php

示例2: cronNotify

function cronNotify()
{
    global $evtList;
    //initialize
    $todayT = time() + 43200;
    //today 12:00
    $todayD00 = date("Y-m-d", $todayT);
    //today
    $todayD30 = date("Y-m-d", $todayT + 2592000);
    //today + 30 days
    $sentTo = '';
    //set filter
    $filter = 'notify >= 0';
    //retrieve and process events
    retrieve($todayD00, $todayD30, '', $filter);
    if ($evtList) {
        foreach ($evtList as $date => &$events) {
            $daysDue = round((mktime(12, 0, 0, substr($date, 5, 2), substr($date, 8, 2), substr($date, 0, 4)) - $todayT) / 86400);
            foreach ($events as $evt) {
                if (($daysDue == $evt['rem'] or $date == $todayD00) and $evt['mde'] <= 1 and $evt['rml']) {
                    //due and mail addresses to notify
                    $sentTo .= notify($evt, $date, $daysDue) . "\n";
                    //send reminder email
                }
            }
        }
    }
    return $sentTo;
}
开发者ID:sanluca,项目名称:py-acqua-hw,代码行数:29,代码来源:notify.php

示例3: reminder_post

/**
 * reminder post
 *
 * @since 1.2.1
 * @deprecated 2.0.0
 *
 * @package Redaxscript
 * @category Reminder
 * @author Henry Ruhs
 */
function reminder_post()
{
    $emailValidator = new Redaxscript\Validator\Email();
    $captchaValidator = new Redaxscript\Validator\Captcha();
    /* clean post */
    if (ATTACK_BLOCKED < 10 && $_SESSION[ROOT . '/reminder'] == 'visited') {
        $email = clean($_POST['email'], 3);
        $task = $_POST['task'];
        $solution = $_POST['solution'];
    }
    /* validate post */
    if ($email == '') {
        $error = l('email_empty');
    } else {
        if ($emailValidator->validate($email) == Redaxscript\Validator\Validator::FAILED) {
            $error = l('email_incorrect');
        } else {
            if ($captchaValidator->validate($task, $solution) == Redaxscript\Validator\Validator::FAILED) {
                $error = l('captcha_incorrect');
            } else {
                if (retrieve('id', 'users', 'email', $email) == '') {
                    $error = l('email_unknown');
                } else {
                    /* query users */
                    $query = 'SELECT id, user, password FROM ' . PREFIX . 'users WHERE email = \'' . $email . '\' && status = 1';
                    $result = mysql_query($query);
                    if ($result) {
                        while ($r = mysql_fetch_assoc($result)) {
                            if ($r) {
                                foreach ($r as $key => $value) {
                                    ${$key} = stripslashes($value);
                                }
                            }
                            /* send reminder information */
                            $passwordResetRoute = ROOT . '/' . REWRITE_ROUTE . 'password_reset/' . $id . '/' . $password;
                            $passwordResetLink = anchor_element('external', '', '', $passwordResetRoute, $passwordResetRoute);
                            $toArray = array(s('author') => s('email'));
                            $fromArray = array($name => $email);
                            $subject = l('reminder');
                            $bodyArray = array('<strong>' . l('user') . l('colon') . '</strong> ' . $user, '<br />', '<strong>' . l('password_reset') . l('colon') . '</strong> ' . $passwordResetLink);
                            /* mailer object */
                            $mailer = new Redaxscript\Mailer($toArray, $fromArray, $subject, $bodyArray);
                            $mailer->send();
                        }
                    }
                }
            }
        }
    }
    /* handle error */
    if ($error) {
        if (s('blocker') == 1) {
            $_SESSION[ROOT . '/attack_blocked']++;
        }
        notification(l('error_occurred'), $error, l('back'), 'reminder');
    } else {
        notification(l('operation_completed'), l('reminder_sent'), l('login'), 'login');
    }
    $_SESSION[ROOT . '/reminder'] = '';
}
开发者ID:ITw3,项目名称:redaxscript,代码行数:70,代码来源:reminder.php

示例4: get_content

 public function get_content()
 {
     global $LANG;
     load_module_lang('search');
     $search = retrieve(REQUEST, 'q', '');
     $tpl = new FileTemplate('search/search_mini.tpl');
     $tpl->put_all(array('TEXT_SEARCHED' => !empty($search) ? stripslashes(retrieve(REQUEST, 'q', '')) : '', 'WARNING_LENGTH_STRING_SEARCH' => addslashes($LANG['warning_length_string_searched']), 'L_SEARCH' => $LANG['search'], 'U_FORM_VALID' => url(TPL_PATH_TO_ROOT . '/search/search.php#results'), 'L_ADVANCED_SEARCH' => $LANG['advanced_search'], 'U_ADVANCED_SEARCH' => url(TPL_PATH_TO_ROOT . '/search/search.php')));
     return $tpl;
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:9,代码来源:SearchModuleMiniMenu.class.php

示例5: search_mini

function search_mini($position, $block)
{
    global $LANG;
    load_module_lang('search');
    $search = retrieve(REQUEST, 'q', '');
    $tpl = new Template('search/search_mini.tpl');
    import('core/menu_service');
    MenuService::assign_positions_conditions($tpl, $block);
    $tpl->assign_vars(array('TITLE_SEARCH' => TITLE, 'SEARCH' => $LANG['title_search'], 'TEXT_SEARCHED' => !empty($search) ? stripslashes(retrieve(REQUEST, 'q', '')) : $LANG['search'] . '...', 'WARNING_LENGTH_STRING_SEARCH' => addslashes($LANG['warning_length_string_searched']), 'L_SEARCH' => $LANG['search'], 'U_FORM_VALID' => url(TPL_PATH_TO_ROOT . '/search/search.php#results'), 'L_ADVANCED_SEARCH' => $LANG['advanced_search'], 'U_ADVANCED_SEARCH' => url(TPL_PATH_TO_ROOT . '/search/search.php')));
    return $tpl->parse(TEMPLATE_STRING_MODE);
}
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:11,代码来源:search_mini.php

示例6: handler

 function handler($errstr, $errno, $errline = '', $errfile = '', $tpl_cond = '', $archive = false, $stop = true)
 {
     global $LANG;
     $_err_stop = retrieve(GET, '_err_stop', false);
     if (!empty($errstr)) {
         switch ($errno) {
             case E_TOKEN:
                 $this->_error_log($errfile, $errline, $errno, $errstr, $archive);
                 break;
             case E_USER_REDIRECT:
                 $this->_error_log($errfile, $errline, $errno, $errstr, $archive);
                 if (!$_err_stop) {
                     redirect($this->redirect . '/member/error' . url('.php?e=' . $errstr . '&_err_stop=1'));
                 } else {
                     die($errstr);
                 }
                 break;
             case E_USER_SUCCESS:
                 $errstr = sprintf($LANG['error_success'], $errstr, '', '');
                 $this->template->assign_vars(array('C_ERROR_HANDLER' . strtoupper($tpl_cond) => true, 'ERRORH_IMG' => 'success', 'ERRORH_CLASS' => 'error_success', 'L_ERRORH' => $errstr));
                 break;
             case E_USER_NOTICE:
             case E_NOTICE:
                 $errstr = sprintf($LANG['error_notice_tiny'], $errstr, '', '');
                 $this->template->assign_vars(array('C_ERROR_HANDLER' . strtoupper($tpl_cond) => true, 'ERRORH_IMG' => 'notice', 'ERRORH_CLASS' => 'error_notice', 'L_ERRORH' => $errstr));
                 break;
             case E_USER_WARNING:
             case E_WARNING:
                 $errstr = sprintf($LANG['error_warning_tiny'], $errstr, '', '');
                 $this->template->assign_vars(array('C_ERROR_HANDLER' . strtoupper($tpl_cond) => true, 'ERRORH_IMG' => 'important', 'ERRORH_CLASS' => 'error_warning', 'L_ERRORH' => $errstr));
                 break;
             case E_USER_ERROR:
             case E_ERROR:
                 $error_id = $this->_error_log($errfile, $errline, $errno, $errstr, true);
                 if ($stop) {
                     if (!$_err_stop) {
                         header('Location:' . $this->redirect . '/member/fatal.php?error=' . $error_id . '&_err_stop=1');
                         exit;
                     } else {
                         die($errstr);
                     }
                 }
         }
         if ($this->personal_tpl) {
             $this->set_default_template();
         }
         if ($archive) {
             return $this->_error_log($errfile, $errline, $errno, $errstr, $archive);
         }
         return true;
     }
 }
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:52,代码来源:errors.class.php

示例7: dir_list

function dir_list($path, $exts = '', $list = array())
{
    $path = dir_path($path);
    $files = glob($path . '*');
    foreach ($files as $v) {
        if (!$exts || preg_match("/\\.({$exts})/i", $v)) {
            $list[] = retrieve($v);
            if (is_dir($v)) {
                $list = dir_list($v, $exts, $list);
            }
        }
    }
    return $list;
}
开发者ID:bianle,项目名称:esmart,代码行数:14,代码来源:test.php

示例8: is_valid

 function is_valid()
 {
     global $Sql;
     if (!$this->is_available()) {
         return true;
     }
     $get_code = retrieve(POST, 'verif_code' . $this->instance, '', TSTRING_UNCHANGE);
     $user_id = substr(strhash(USER_IP), 0, 13) . $this->instance;
     $captcha = $Sql->query_array(DB_TABLE_VERIF_CODE, 'code', 'difficulty', "WHERE user_id = '" . $user_id . "'", __LINE__, __FILE__);
     $Sql->query_inject("DELETE FROM " . DB_TABLE_VERIF_CODE . " WHERE user_id = '" . $user_id . "'", __LINE__, __FILE__);
     if (!empty($captcha['code']) && $captcha['code'] == $get_code && $captcha['difficulty'] == $this->difficulty) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:16,代码来源:captcha.class.php

示例9: get_categ

function get_categ($id)
{
    $q3 = "select id,name from res_partner where id = {$id}";
    $a3 = retrieve($q3);
    $q = "select * from res_partner_category_rel where partner_id = {$id}";
    $a = retrieve($q);
    $c = [];
    $i = 0;
    foreach ($a as $v) {
        $cat = $v['category_id'];
        $q2 = "select id,name from res_partner_category where id = {$cat}";
        $a2 = retrieve($q2);
        if ($i == 0) {
            $cstr = $a2[0]['name'];
        } else {
            $cstr .= ' / ' . $a2[0]['name'];
        }
        $i++;
    }
    return $cstr;
}
开发者ID:korrio,项目名称:Folkrice-ERP,代码行数:21,代码来源:test.php

示例10: build_menu_from_form

 function build_menu_from_form(&$elements_ids, $level = 0)
 {
     $menu = null;
     $menu_element_id = $elements_ids['id'];
     $menu_name = retrieve(POST, 'menu_element_' . $menu_element_id . '_name', '', TSTRING_UNCHANGE);
     $menu_url = retrieve(POST, 'menu_element_' . $menu_element_id . '_url', '');
     $menu_image = retrieve(POST, 'menu_element_' . $menu_element_id . '_image', '');
     $array_size = count($elements_ids);
     if ($array_size == 1 && $level > 0) {
         $menu = new LinksMenuLink($menu_name, $menu_url, $menu_image);
     } else {
         $menu = new LinksMenu($menu_name, $menu_url, $menu_image);
         unset($elements_ids['id']);
         $array_size = count($elements_ids);
         for ($i = 0; $i < $array_size; $i++) {
             $menu->add(build_menu_from_form($elements_ids[$i], $level + 1));
         }
     }
     $menu->set_auth(Authorizations::build_auth_array_from_form(AUTH_MENUS, 'menu_element_' . $menu_element_id . '_auth'));
     return $menu;
 }
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:21,代码来源:links.php

示例11: build_menu_from_form

 function build_menu_from_form($elements_ids, $level = 0)
 {
     $menu = null;
     $menu_element_id = $elements_ids['id'];
     $menu_name = retrieve(POST, 'menu_element_' . $menu_element_id . '_name', '', TSTRING_UNCHANGE);
     $menu_url = retrieve(POST, 'menu_element_' . $menu_element_id . '_url', '');
     $menu_image = retrieve(POST, 'menu_element_' . $menu_element_id . '_image', '');
     $array_size = count($elements_ids);
     if ($array_size == 1 && $level > 0) {
         // If it's a menu, there's only one element;
         $menu = new LinksMenuLink($menu_name, $menu_url, $menu_image);
     } else {
         $menu = new LinksMenu($menu_name, $menu_url, $menu_image);
         // We unset the id key of the array
         unset($elements_ids['id']);
         $array_size = count($elements_ids);
         for ($i = 0; $i < $array_size; $i++) {
             // We build all its children and add it to its father
             $menu->add(build_menu_from_form($elements_ids[$i], $level + 1));
         }
     }
     $menu->set_auth(Authorizations::build_auth_array_from_form(Menu::MENU_AUTH_BIT, 'menu_element_' . $menu_element_id . '_auth'));
     return $menu;
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:24,代码来源:links.php

示例12: DataRetrieveHandler

function DataRetrieveHandler()
{
    global $l;
    $l = new llog();
    global $generalAuthKey;
    if (authorized($generalAuthKey)) {
        $l->a("Started DataRetrieveHandler<br>");
        $status = 0;
        $insertion = retrieve($_REQUEST['id']);
        //print_r($insertion);
        $status = $insertion['status'];
        $csum = Csum_import($insertion['csum']);
        if (check($status, true)) {
            echo $csum->len . '|' . $csum->md5 . '|' . $csum->sha . '|' . $csum->s512 . '|' . $insertion['data'];
        }
    }
}
开发者ID:achristensen3,项目名称:fracture-active,代码行数:17,代码来源:active.responders.php

示例13: load_module_lang

<?php

require_once '../kernel/begin.php';
load_module_lang('wiki');
define('TITLE', $LANG['wiki'] . ' - ' . $LANG['wiki_search']);
$bread_crumb_key = 'wiki_search';
require_once '../wiki/wiki_bread_crumb.php';
require_once '../kernel/header.php';
if (!$User->check_level(MEMBER_LEVEL)) {
    $Errorh->handler('e_auth', E_USER_REDIRECT);
}
$search_string = retrieve(GET, 'search', '');
$where_search = retrieve(GET, 'where', '');
$where_search = !(empty($where_search) || $where_search == 'contents') ? 'contents' : 'title';
$page = retrieve(GET, 'page', 1);
$page = $page <= 0 ? 1 : $page;
$Template->set_filenames(array('wiki_search' => 'wiki/search.tpl'));
$Template->assign_vars(array('L_SEARCH' => $LANG['wiki_search'], 'L_KEY_WORDS' => $LANG['wiki_search_key_words'], 'TARGET' => url('search.php?token=' . $Session->get_token()), 'KEY_WORDS' => $search_string, 'L_SEARCH_RESULT' => $LANG['wiki_search_result'], 'ARTICLE_TITLE' => $LANG['title'], 'RELEVANCE' => $LANG['wiki_search_relevance'], 'SELECTED_TITLE' => $where_search == 'title' ? 'checked="checked"' : '', 'SELECTED_CONTENTS' => $where_search != 'title' ? 'checked="checked"' : '', 'L_TITLE' => $LANG['title'], 'L_CONTENTS' => $LANG['content']));
if (!empty($search_string)) {
    $title_search = "SELECT title, encoded_title, MATCH(title) AGAINST('" . $search_string . "') AS relevance\n\t\tFROM " . PREFIX . "wiki_articles\n\t\tWHERE MATCH(title) AGAINST('" . $search_string . "') \n\t\tORDER BY relevance DESC";
    $contents_search = "SELECT a.title, a.encoded_title, MATCH(c.content) AGAINST('" . $search_string . "') AS relevance\n\t\tFROM " . PREFIX . "wiki_articles a\n\t\tLEFT JOIN " . PREFIX . "wiki_contents c ON c.id_contents = a.id\n\t\tWHERE MATCH(c.content) AGAINST('" . $search_string . "') \n\t\tORDER BY relevance DESC";
    $query = $where_search == 'title' ? $title_search : $contents_search;
    $query_rows = $where_search == 'title' ? "SELECT COUNT(*) FROM " . PREFIX . "wiki_articles WHERE MATCH(title) AGAINST('" . $search_string . "')" : "SELECT COUNT(*) \t\tFROM " . PREFIX . "wiki_articles a\n\t\tLEFT JOIN " . PREFIX . "wiki_contents c ON c.id_contents = a.id\n\t\tWHERE MATCH(c.content) AGAINST('" . $search_string . "')";
    $result = $Sql->query_while($query, __LINE__, __FILE__);
    $num_rows = $Sql->num_rows($result, $query_rows, __LINE__, __FILE__);
    import('util/pagination');
    $Pagination = new Pagination();
    $pages_links = $Pagination->display('search' . url('.php?search=' . $search_string . '&amp;where=' . $where_search . '&amp;page=%d'), $num_rows, 'page', 10, 3);
    if ($num_rows > 0) {
        $Template->assign_block_vars('search_result', array('PAGES' => !empty($pages_links) ? $pages_links : '&nbsp;'));
    } else {
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:search.php

示例14: Forum

                include_once '../forum/forum.class.php';
                $Forumfct = new Forum();
                $Forumfct->Unlock_topic($idt_get);
                redirect(HOST . DIR . '/forum/topic' . url('.php?id=' . $idt_get, '-' . $idt_get . $rewrited_title . '.php', '&'));
            }
        } else {
            $Errorh->handler('e_auth', E_USER_REDIRECT);
        }
    } else {
        $Errorh->handler('e_auth', E_USER_REDIRECT);
    }
} elseif (!empty($track) && $User->check_level(MEMBER_LEVEL)) {
    $Forumfct->Track_topic($track);
    redirect(HOST . DIR . '/forum/topic' . url('.php?id=' . $track, '-' . $track . '.php', '&') . '#go_bottom');
} elseif (!empty($untrack) && $User->check_level(MEMBER_LEVEL)) {
    $tracking_type = retrieve(GET, 'trt', 0);
    $Forumfct->Untrack_topic($untrack, $tracking_type);
    redirect(HOST . DIR . '/forum/topic' . url('.php?id=' . $untrack, '-' . $untrack . '.php', '&') . '#go_bottom');
} elseif (!empty($track_pm) && $User->check_level(MEMBER_LEVEL)) {
    include_once '../forum/forum.class.php';
    $Forumfct = new Forum();
    $Forumfct->Track_topic($track_pm, FORUM_PM_TRACKING);
    redirect(HOST . DIR . '/forum/topic' . url('.php?id=' . $track_pm, '-' . $track_pm . '.php', '&') . '#go_bottom');
} elseif (!empty($untrack_pm) && $User->check_level(MEMBER_LEVEL)) {
    include_once '../forum/forum.class.php';
    $Forumfct = new Forum();
    $Forumfct->Untrack_topic($untrack_pm, FORUM_PM_TRACKING);
    redirect(HOST . DIR . '/forum/topic' . url('.php?id=' . $untrack_pm, '-' . $untrack_pm . '.php', '&') . '#go_bottom');
} elseif (!empty($track_mail) && $User->check_level(MEMBER_LEVEL)) {
    include_once '../forum/forum.class.php';
    $Forumfct = new Forum();
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:action.php

示例15: define

<?php

define('NO_SESSION_LOCATION', true);
require_once '../kernel/begin.php';
require_once '../kernel/header_no_display.php';
if ($User->check_level(ADMIN_LEVEL)) {
    require_once 'media_cats.class.php';
    $media_categories = new MediaCats();
    $id_up = retrieve(GET, 'id_up', 0);
    $id_down = retrieve(GET, 'id_down', 0);
    $id_show = retrieve(GET, 'show', 0);
    $id_hide = retrieve(GET, 'hide', 0);
    $cat_to_del = retrieve(GET, 'del', 0);
    $result = false;
    if ($id_up > 0) {
        $result = $media_categories->move($id_up, MOVE_CATEGORY_UP);
    } elseif ($id_down > 0) {
        $result = $media_categories->move($id_down, MOVE_CATEGORY_DOWN);
    } elseif ($id_show > 0) {
        $result = $media_categories->change_visibility($id_show, CAT_VISIBLE, LOAD_CACHE);
    } elseif ($id_hide > 0) {
        $result = $media_categories->change_visibility($id_hide, CAT_UNVISIBLE, LOAD_CACHE);
    }
    if ($result) {
        $cat_config = array('xmlhttprequest_file' => 'xmlhttprequest_cats.php', 'administration_file_name' => 'admin_media_cats.php', 'url' => array('unrewrited' => 'media.php?id=%d', 'rewrited' => 'media-%d+%s.php'));
        $media_categories->set_display_config($cat_config);
        $Cache->load('media', RELOAD_CACHE);
        echo $media_categories->build_administration_interface(AJAX_MODE);
    }
}
require_once '../kernel/footer_no_display.php';
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:xmlhttprequest_cats.php


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