本文整理汇总了PHP中get_hook函数的典型用法代码示例。如果您正苦于以下问题:PHP get_hook函数的具体用法?PHP get_hook怎么用?PHP get_hook使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_hook函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: pages
public function pages()
{
$this->load->module('core')->set_meta_tags(lang('Search', 'filter'));
// Удалим из строки запроса /filter/pages
$segments = array_slice($this->uri->segment_array(), 2);
// Парсим строку запроса сгенерированную http_build_query обратно в массив.
$search_data = $this->parse_url($segments);
// Получаем ID страниц, которые подходят критериям поиска,
$ids = $this->search_items($search_data);
// если ничего не найдено, выводим соответствующее сообщение.
if (!$ids) {
$this->no_pages_found();
}
//exit
// Получаем данные страниц
$query = $this->_filter_pages($ids, $search_data);
// Сделаем пагинацию
$this->load->library('Pagination');
$config['base_url'] = site_url('filter/pages/' . http_build_query($search_data, '', '/'));
$config['total_rows'] = $this->_filter_pages($ids, $search_data, TRUE);
$config['per_page'] = $this->items_per_page;
$config['uri_segment'] = $this->uri->total_segments();
$config['first_link'] = lang("The first", 'filter');
$config['last_link'] = lang("Last", 'filter');
$config['cur_tag_open'] = '<span class="active">';
$config['cur_tag_close'] = '</span>';
$this->pagination->num_links = 5;
$this->pagination->initialize($config);
$pagination = $this->pagination->create_links();
if ($query->num_rows() > 0) {
$tpl = $this->default_tpl;
$pages = $query->result_array();
// Продублируем здесь хук core_return_category_pages,
// чтобы подключить к найденным страницам поля cfcm.
($hook = get_hook('core_return_category_pages')) ? eval($hook) : NULL;
// Если поиск производится по одной категории,
// то используем ее шаблон.
if (isset($search_data['category']) and count((array) $search_data['category']) == 1) {
$category = $this->lib_category->get_category($search_data['category']);
if ($category['tpl'] == '') {
$tpl = 'category';
} else {
$tpl = $category['tpl'];
}
}
$data = array('pages' => $pages, 'pagination' => $pagination, 'category' => $category);
if ($tpl == 'search') {
$data['items'] = $data['pages'];
}
$this->template->add_array($data);
$this->template->show($tpl);
} else {
$this->no_pages_found();
}
}
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:55,代码来源:filter.php
示例2: om_friends_del_friend
function om_friends_del_friend($friend_id)
{
global $forum_db, $forum_user;
$result = ($hook = get_hook('om_friends_fn_del_friend_start')) ? eval($hook) : null;
if ($result) {
return;
}
$query = array('DELETE' => 'om_friends', 'WHERE' => 'user_id = ' . $forum_user['id'] . ' AND friend_id = ' . $friend_id);
($hook = get_hook('om_friends_fn_add_friend_qr_add_friend')) ? eval($hook) : null;
$result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
}
开发者ID:keeshii,项目名称:punbb-extensions,代码行数:11,代码来源:functions.php
示例3: om_move_posts_load_cache
function om_move_posts_load_cache()
{
($hook = get_hook('om_move_posts_fn_load_cache_start')) ? eval($hook) : null;
if (!defined('OM_MOVE_POSTS_CACHE_LOADED') && file_exists(FORUM_CACHE_DIR . 'cache_om_move_posts.php')) {
include FORUM_CACHE_DIR . 'cache_om_move_posts.php';
}
// Regenerate cache only if it not exists
if (!defined('OM_MOVE_POSTS_CACHE_LOADED')) {
om_move_posts_generate_cache();
require FORUM_CACHE_DIR . 'cache_om_move_posts.php';
}
return $om_move_posts_max;
}
开发者ID:keeshii,项目名称:punbb-extensions,代码行数:13,代码来源:functions.php
示例4: get_new_password
function get_new_password()
{
global $settings;
if ($settings['admin_username'] == $_REQUEST['user'] && $settings['admin_password'] == $_REQUEST['old_pw']) {
$new_password = random_key(8, true);
$query = array('UPDATE' => 'settings', 'SET' => 'value="' . openld_hash($new_password) . '"', 'WHERE' => 'title="admin_password"');
($hook = get_hook('admin_login_get_password_settings_sql')) ? eval($hook) : null;
$db->query_build($query);
generate_settings_cache();
echo NEW_PASSWORD . ":" . $new_password;
} else {
error("Invalid password request");
}
}
开发者ID:Dawzz,项目名称:Open-Link-Directory,代码行数:14,代码来源:admin_login.php
示例5: index
function index()
{
// $this->cms_admin->get_langs();
//cp_check_perm('cp_site_settings');
$settings = $this->cms_admin->get_settings();
unset($settings['siteinfo']);
$locale = $this->db->select('identif')->where('default', 1)->get('languages')->row_array();
$this->load->library('SiteInfo', $locale['identif']);
$siteinfo = $siteinfo = $this->siteinfo->getSiteInfoData(TRUE);
if (is_array($siteinfo)) {
$this->template->add_array($siteinfo);
}
$this->template->add_array($settings);
$this->template->assign('templates', $this->_get_templates());
$this->template->assign('template_selected', $settings['site_template']);
// Передає змінну статусу роботів
$this->template->assign('robots_settings_status', $settings['robots_settings_status']);
$this->template->assign('robots_settings', $settings['robots_settings']);
$this->template->assign('robots_status', $settings['robots_status']);
$this->template->assign('work_values', array('yes' => lang("Yes", "admin"), 'no' => lang("No", "admin")));
$this->template->assign('site_offline', $settings['site_offline']);
$this->config->set_item('cur_lang', $this->load->module('core')->def_lang[0]['id']);
$this->template->assign('tree', $this->lib_category->build());
$this->template->assign('parent_id', $settings['main_page_cat']);
$this->template->assign('id', 0);
///++++++++++++++++++++
$langs = $this->db->get('languages')->result_array();
$lang_meta = array();
foreach ($langs as $lang) {
$meta = $this->db->where('lang_ident', $lang['id'])->limit(1)->get('settings_i18n')->result_array();
if (count($meta) > 0) {
$lang_meta[$lang['id']] = $meta[0];
} else {
$lang_meta[$lang['id']] = null;
}
}
$this->template->assign('langs', $langs);
$this->template->assign('meta_langs', $lang_meta);
//++++++++++++++++++++
($hook = get_hook('admin_show_settings_tpl')) ? eval($hook) : NULL;
// Load modules list
$notAvailableModules = array('mainsaas', 'saas');
$this->template->assign('modules', $this->db->where_not_in('name', $notAvailableModules)->get('components')->result_array());
$this->template->show('settings_site', FALSE);
}
开发者ID:RandomUsernameHere,项目名称:megainfo-corporate-cms,代码行数:45,代码来源:settings.php
示例6: fields
static function fields()
{
$return = ($hook = get_hook('ch_fn_generate_fields_cache_start')) ? eval($hook) : null;
if ($return != null) {
return;
}
$query = array('SELECT' => 'f. *', 'FROM' => 'fields AS f', 'ORDER BY' => 'f.id');
($hook = get_hook('ch_fn_generate_fields_cache_get_fields')) ? eval($hook) : null;
$result = App::$forum_db->query_build($query) or error(__FILE__, __LINE__);
$output = array();
while ($cur_row = App::$forum_db->fetch_assoc($result)) {
$output[] = $cur_row;
}
// Output fields list as PHP code
$fh = @fopen(FORUM_CACHE_DIR . 'cache_fields.php', 'wb');
if (!$fh) {
error('Unable to write fields cache file to cache directory. Please make sure PHP has write access to the directory \'cache\'.', __FILE__, __LINE__);
}
fwrite($fh, '<?php' . "\n\n" . 'define(\'FORUM_FIELDS_LOADED\', 1);' . "\n\n" . '$forum_fields = ' . var_export($output, true) . ';' . "\n\n" . '?>');
fclose($fh);
}
开发者ID:xSTRIGx,项目名称:PunBB.Extensions,代码行数:21,代码来源:cache.php
示例7: forum_mail
function forum_mail($to, $subject, $message, $reply_to_email = '', $reply_to_name = '')
{
global $forum_config, $lang_common;
// Default sender address
$from_name = sprintf($lang_common['Forum mailer'], $forum_config['o_board_title']);
$from_email = $forum_config['o_webmaster_email'];
($hook = get_hook('em_fn_forum_mail_start')) ? eval($hook) : null;
// Do a little spring cleaning
$to = forum_trim(preg_replace('#[\\n\\r]+#s', '', $to));
$subject = forum_trim(preg_replace('#[\\n\\r]+#s', '', $subject));
$from_email = forum_trim(preg_replace('#[\\n\\r:]+#s', '', $from_email));
$from_name = forum_trim(preg_replace('#[\\n\\r:]+#s', '', str_replace('"', '', $from_name)));
$reply_to_email = forum_trim(preg_replace('#[\\n\\r:]+#s', '', $reply_to_email));
$reply_to_name = forum_trim(preg_replace('#[\\n\\r:]+#s', '', str_replace('"', '', $reply_to_name)));
// Set up some headers to take advantage of UTF-8
$from = "=?UTF-8?B?" . base64_encode($from_name) . "?=" . ' <' . $from_email . '>';
$subject = "=?UTF-8?B?" . base64_encode($subject) . "?=";
$headers = 'From: ' . $from . "\r\n" . 'Date: ' . gmdate('r') . "\r\n" . 'MIME-Version: 1.0' . "\r\n" . 'Content-transfer-encoding: 8bit' . "\r\n" . 'Content-type: text/plain; charset=utf-8' . "\r\n" . 'X-Mailer: PunBB Mailer';
// If we specified a reply-to email, we deal with it here
if (!empty($reply_to_email)) {
$reply_to = "=?UTF-8?B?" . base64_encode($reply_to_name) . "?=" . ' <' . $reply_to_email . '>';
$headers .= "\r\n" . 'Reply-To: ' . $reply_to;
}
// Make sure all linebreaks are CRLF in message (and strip out any NULL bytes)
$message = str_replace(array("\n", ""), array("\r\n", ''), forum_linebreaks($message));
($hook = get_hook('em_fn_forum_mail_pre_send')) ? eval($hook) : null;
if ($forum_config['o_smtp_host'] != '') {
smtp_mail($to, $subject, $message, $headers);
} else {
// Change the linebreaks used in the headers according to OS
if (strtoupper(substr(PHP_OS, 0, 3)) == 'MAC') {
$headers = str_replace("\r\n", "\r", $headers);
} else {
if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
$headers = str_replace("\r\n", "\n", $headers);
}
}
mail($to, $subject, $message, $headers);
}
}
开发者ID:torepublicStartpageCode,项目名称:torepublic2,代码行数:40,代码来源:email.php
示例8: validate_search_action
function validate_search_action($action)
{
// A list of valid actions (extensions can add their own actions to the array)
$valid_actions = array('search', 'show_new', 'show_recent', 'show_user_posts', 'show_user_topics', 'show_subscriptions', 'show_forum_subscriptions', 'show_unanswered');
$return = ($hook = get_hook('sf_fn_validate_actions_start')) ? eval($hook) : null;
if ($return != null) {
return $return;
}
return in_array($action, $valid_actions);
}
开发者ID:heiswayi,项目名称:ishare-plus,代码行数:10,代码来源:search_functions.php
示例9: get_hook
<?php
($hook = get_hook('ark_pre_edit_cur_rank_fieldset_end')) ? eval($hook) : null;
?>
</fieldset>
<?php
($hook = get_hook('ark_edit_cur_rank_fieldset_end')) ? eval($hook) : null;
}
?>
</fieldset>
</form>
</div>
<?php
} else {
?>
<div class="frm-form">
<div class="ct-box">
<p><?php
echo $lang_admin_ranks['No ranks'];
?>
</p>
</div>
</div>
</div>
<?php
}
($hook = get_hook('ark_end')) ? eval($hook) : null;
$tpl_temp = forum_trim(ob_get_contents());
$tpl_main = str_replace('<!-- forum_main -->', $tpl_temp, $tpl_main);
ob_end_clean();
// END SUBST - <!-- forum_main -->
require FORUM_ROOT . 'footer.php';
开发者ID:vebnz,项目名称:lifelitup,代码行数:31,代码来源:ranks.php
示例10: move_link
move_link($req_id, $req_page, $_REQUEST['move_link_sql'], $_REQUEST['to_new_parent']);
} elseif (isset($_REQUEST['edit_cat_sql'])) {
edit_a_category($req_id, $req_page, $_REQUEST['cat_id']);
} elseif (isset($_REQUEST['edit_link_sql'])) {
edit_a_link($req_id, $req_page, $_REQUEST['edit_link_sql']);
} elseif (isset($_REQUEST['add_a_link'])) {
add_a_link($req_id);
} elseif (isset($_REQUEST['add_a_category'])) {
add_a_category($req_id);
} elseif (isset($_REQUEST['unaccept'])) {
unaccept_category($_REQUEST['unaccept']);
} elseif (isset($_REQUEST['unaccept_link'])) {
unaccept_link($_REQUEST['unaccept_link']);
}
($hook = get_hook('admin_browse_after_sql_ops')) ? eval($hook) : null;
//Now Dig for categories which content we will display later
$query = array('SELECT' => 'id, title, description', 'FROM' => 'categories', 'WHERE' => 'father_id=' . intval($req_id) . OPENLD_IF_ACTIVE_CATS);
($hook = get_hook('admin_browse_categories_sql_parent')) ? eval($hook) : null;
$categories_result = $db->query_build($query) or error(__FILE__, __LINE__);
//Dig for links
$query = array('SELECT' => '*', 'FROM' => 'links', 'WHERE' => 'category_id=' . $req_id . OPENLD_IF_ACTIVE_LINKS);
($hook = get_hook('admin_browse_sql_categories')) ? eval($hook) : null;
$links_result = $db->query_build($query) or error("can't dig links", __FILE__, __LINE__);
$start_limit = $settings['number_of_links_per_page'] * (intval($req_page) > 0 ? intval($req_page) - 1 : 0);
$query['ORDER BY'] = 'type DESC, "' . $settings['links_sorting_by'] . '"';
$query['LIMIT'] = $start_limit . ', ' . $settings['number_of_links_per_page'];
($hook = get_hook('admin_browse_sql_limit_categories')) ? eval($hook) : null;
//bad hook-name
$result_limit = $db->query_build($query) or error("can't dig links with result_limit", __FILE__, __LINE__);
$page = 'admin/admin_browse.php';
require OPENLD_ROOT . 'admin_footer.php';
开发者ID:Dawzz,项目名称:Open-Link-Directory,代码行数:31,代码来源:admin_browse.php
示例11: get_hook
<label for="fld<?php
echo ++$forum_page['fld_count'];
?>
"><span><?php
echo 'Cleartext';
?>
</span></label><br />
<span class="fld-input"><input type="text" id="fld<?php
echo $forum_page['fld_count'];
?>
" name="req_CLEARTEXT" size="10" required /></span>
</div>
</div>
<?php
}
?>
<div class="frm-buttons">
<span class="submit primary"><input type="submit" name="login" value="<?php
echo $lang_login['Login'];
?>
" /></span>
</div>
</form>
</div>
<?php
($hook = get_hook('li_end')) ? eval($hook) : null;
$tpl_temp = forum_trim(ob_get_contents());
$tpl_main = str_replace('<!-- forum_main -->', $tpl_temp, $tpl_main);
ob_end_clean();
// END SUBST - <!-- forum_main -->
require FORUM_ROOT . 'footer.php';
开发者ID:torepublicStartpageCode,项目名称:torepublic2,代码行数:31,代码来源:login.php
示例12: preg_replace
if (!isset($base_url)) {
// Make an educated guess regarding base_url
$base_url_guess = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://') . preg_replace('/:80$/', '', $_SERVER['HTTP_HOST']) . str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME']));
if (substr($base_url_guess, -1) == '/') {
$base_url_guess = substr($base_url_guess, 0, -1);
}
$base_url = $base_url_guess;
}
// Verify that we are running the proper database schema revision
if (defined('PUN') || !isset($forum_config['o_database_revision']) || $forum_config['o_database_revision'] < FORUM_DB_REVISION || version_compare($forum_config['o_cur_version'], FORUM_VERSION, '<')) {
error('Your PunBB database is out-of-date and must be upgraded in order to continue.<br />Please run <a href="' . $base_url . '/admin/db_update.php">db_update.php</a> in order to complete the upgrade process.');
}
// Load hooks
if (file_exists(FORUM_CACHE_DIR . 'cache_hooks.php')) {
include FORUM_CACHE_DIR . 'cache_hooks.php';
}
if (!defined('FORUM_HOOKS_LOADED')) {
if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) {
require FORUM_ROOT . 'include/cache.php';
}
generate_hooks_cache();
require FORUM_CACHE_DIR . 'cache_hooks.php';
}
require FORUM_ROOT . 'include/flash_messenger.php';
$forum_flash = new FlashMessenger();
// A good place to add common functions for your extension
($hook = get_hook('es_essentials')) ? eval($hook) : null;
if (!defined('FORUM_MAX_POSTSIZE_BYTES')) {
define('FORUM_MAX_POSTSIZE_BYTES', 65535);
}
define('FORUM_ESSENTIALS_LOADED', 1);
开发者ID:ZerGabriel,项目名称:punbb,代码行数:31,代码来源:essentials.php
示例13: run
function run($module)
{
$this->checkPerm($module);
$func = $this->uri->segment(5);
if ($func == FALSE) {
$func = 'index';
}
($hook = get_hook('admin_run_module_admin')) ? eval($hook) : NULL;
$this->load->module('core/core');
$args = $this->core->grab_variables(6);
$this->template->assign('SELF_URL', site_url('admin/components/cp/' . $module));
echo modules::run($module . '/admin/' . $func, $args);
}
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:13,代码来源:components.php
示例14: redirect
function redirect($destination_url, $message)
{
global $forum_db, $forum_config, $lang_common, $forum_user, $base_url, $forum_loader;
define('FORUM_PAGE', 'redirect');
($hook = get_hook('fn_redirect_start')) ? eval($hook) : null;
// Prefix with base_url (unless it's there already)
if (strpos($destination_url, 'http://') !== 0 && strpos($destination_url, 'https://') !== 0 && strpos($destination_url, '/') !== 0) {
$destination_url = $base_url . '/' . $destination_url;
}
// Do a little spring cleaning
$destination_url = preg_replace('/([\\r\\n])|(%0[ad])|(;[\\s]*data[\\s]*:)/i', '', $destination_url);
// If the delay is 0 seconds, we might as well skip the redirect all together
if ($forum_config['o_redirect_delay'] == '0') {
header('Location: ' . str_replace('&', '&', $destination_url));
}
// Send no-cache headers
header('Expires: Thu, 21 Jul 1977 07:30:00 GMT');
// When yours truly first set eyes on this world! :)
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
// For HTTP/1.0 compability
// Send the Content-type header in case the web server is setup to send something else
header('Content-type: text/html; charset=utf-8');
// Load the redirect template
if (file_exists(FORUM_ROOT . 'style/' . $forum_user['style'] . '/redirect.tpl')) {
$tpl_path = FORUM_ROOT . 'style/' . $forum_user['style'] . '/redirect.tpl';
} else {
$tpl_path = FORUM_ROOT . 'include/template/redirect.tpl';
}
($hook = get_hook('fn_redirect_pre_template_loaded')) ? eval($hook) : null;
$tpl_redir = forum_trim(file_get_contents($tpl_path));
($hook = get_hook('fn_redirect_template_loaded')) ? eval($hook) : null;
// START SUBST - <!-- forum_local -->
$tpl_redir = str_replace('<!-- forum_local -->', 'xml:lang="' . $lang_common['lang_identifier'] . '" lang="' . $lang_common['lang_identifier'] . '" dir="' . $lang_common['lang_direction'] . '"', $tpl_redir);
// END SUBST - <!-- forum_local -->
// START SUBST - <!-- forum_head -->
$forum_head['refresh'] = '<meta http-equiv="refresh" content="' . $forum_config['o_redirect_delay'] . ';URL=' . str_replace(array('<', '>', '"'), array('<', '>', '"'), $destination_url) . '" />';
$forum_head['title'] = '<title>' . $lang_common['Redirecting'] . $lang_common['Title separator'] . forum_htmlencode($forum_config['o_board_title']) . '</title>';
ob_start();
// Include stylesheets
require FORUM_ROOT . 'style/' . $forum_user['style'] . '/' . $forum_user['style'] . '.php';
$head_temp = forum_trim(ob_get_contents());
$num_temp = 0;
foreach (explode("\n", $head_temp) as $style_temp) {
$forum_head['style' . $num_temp++] = $style_temp;
}
ob_end_clean();
($hook = get_hook('fn_redirect_head')) ? eval($hook) : null;
$tmp_head = implode("\n", $forum_head) . $forum_loader->render_css();
$tpl_redir = str_replace('<!-- forum_head -->', $tmp_head, $tpl_redir);
unset($forum_head, $tmp_head);
// END SUBST - <!-- forum_head -->
// START SUBST - <!-- forum_redir_main -->
ob_start();
?>
<div id="brd-main" class="main basic">
<div class="main-head">
<h1 class="hn"><span><?php
echo $message . $lang_common['Redirecting'];
?>
</span></h1>
</div>
<div class="main-content main-message">
<p><?php
printf($lang_common['Forwarding info'], $forum_config['o_redirect_delay'], intval($forum_config['o_redirect_delay']) == 1 ? $lang_common['second'] : $lang_common['seconds']);
?>
<span> <a href="<?php
echo $destination_url;
?>
"><?php
echo $lang_common['Click redirect'];
?>
</a></span></p>
</div>
</div>
<?php
$tpl_temp = "\t" . forum_trim(ob_get_contents());
$tpl_redir = str_replace('<!-- forum_redir_main -->', $tpl_temp, $tpl_redir);
ob_end_clean();
// END SUBST - <!-- forum_redir_main -->
// START SUBST - <!-- forum_debug -->
if (defined('FORUM_SHOW_QUERIES')) {
$tpl_redir = str_replace('<!-- forum_debug -->', get_saved_queries(), $tpl_redir);
}
// End the transaction
$forum_db->end_transaction();
// END SUBST - <!-- forum_debug -->
// START SUBST - <!-- forum_include "*" -->
while (preg_match('#<!-- ?forum_include "([^/\\\\]*?)" ?-->#', $tpl_redir, $cur_include)) {
if (!file_exists(FORUM_ROOT . 'include/user/' . $cur_include[1])) {
error('Unable to process user include <!-- forum_include "' . forum_htmlencode($cur_include[1]) . '" --> from template redirect.tpl.<br />There is no such file in folder /include/user/.');
}
ob_start();
include FORUM_ROOT . 'include/user/' . $cur_include[1];
$tpl_temp = ob_get_contents();
$tpl_redir = str_replace($cur_include[0], $tpl_temp, $tpl_redir);
//.........这里部分代码省略.........
开发者ID:torepublicStartpageCode,项目名称:torepublic2,代码行数:101,代码来源:functions.php
示例15: strval
<li>
<?php
echo $db_version;
?>
</li>
<li>
<?php
echo ROWS_LABEL;
?>
<?php
echo strval($total_records);
?>
</li>
<li>
<?php
echo SIZE_LABEL;
?>
<?php
echo $total_size;
?>
</li>
</ul>
</li>
</ol>
</fieldset>
</div>
<?php
($hook = get_hook('admin_information_footer')) ? eval($hook) : null;
?>
</div>
</div>
开发者ID:Dawzz,项目名称:Open-Link-Directory,代码行数:31,代码来源:admin_information.php
示例16: elseif
</div>
</div>
<?php
} elseif (isset($_GET['term']) && $db->num_rows($search_results) == 0) {
?>
<div class="openld-block openld-form">
<h2>
<span>
<?php
echo SERCHED_FOR_LABEL;
?>
"<?php
echo openld_htmlspecialchars($_GET['term']);
?>
"
</span>
</h2>
<div class="openld-content">
<?php
($hook = get_hook('search_no_results_header')) ? eval($hook) : null;
?>
<?php
echo NO_MATCHES;
?>
<?php
($hook = get_hook('search_no_results_footer')) ? eval($hook) : null;
?>
</div>
</div>
<?php
}
开发者ID:Dawzz,项目名称:Open-Link-Directory,代码行数:31,代码来源:search.php
示例17: get_hook
<a href="admin_links.php?unaccept_link=<?php
echo $links['id'];
?>
'&page=<?php
echo $req_page;
?>
"><?php
echo UNACCEPT_LABEL;
?>
</a>
<?php
($hook = get_hook('admin_links_row_footer')) ? eval($hook) : null;
?>
</td>
<?php
($hook = get_hook('admin_links_row_tbody_tr_footer')) ? eval($hook) : null;
?>
</tr>
<?php
}
?>
</tbody>
</table>
<?php
echo link_pagination($links_result, $req_page, 'admin_links.php?page=#p');
} else {
echo NO_LINKS_HERE;
($hook = get_hook('admin_links_no_links')) ? eval($hook) : null;
}
($hook = get_hook('admin_links_after_sql_if')) ? eval($hook) : null;
}
开发者ID:Dawzz,项目名称:Open-Link-Directory,代码行数:31,代码来源:admin_links.php
示例18: captcha_check
/**
* captcha check
* @param type $code
* @return boolean
*/
function captcha_check($code)
{
($hook = get_hook('auth_captcha_check')) ? eval($hook) : NULL;
if (!$this->dx_auth->captcha_check($code)) {
return FALSE;
} else {
return TRUE;
}
}
开发者ID:RandomUsernameHere,项目名称:megainfo-corporate-cms,代码行数:14,代码来源:authapi.php
示例19: pun_repository_check_dependencies
function pun_repository_check_dependencies($inst_exts, $dependencies)
{
($hook = get_hook('pun_repository_check_dependencies_start')) ? eval($hook) : null;
if (empty($dependencies)) {
return false;
}
//print_r($dependencies);
if (isset($dependencies['dependency']) && is_string($dependencies['dependency'])) {
$dependencies = array($dependencies['dependency']);
} else {
$dependencies = reset($dependencies);
if (isset($dependencies['dependency']) && is_string($dependencies['dependency'])) {
$dependencies = array($dependencies['dependency']);
} else {
$dependencies = $dependencies['dependency'];
}
}
$unresolved = array();
foreach ($dependencies as $dependency) {
$dependency = preg_replace('~[^\\w_]~', '', $dependency);
// Add the dependency to the list of unresolved ones
if (!isset($inst_exts[$dependency])) {
$unresolved[] = $dependency;
}
}
($hook = get_hook('pun_repository_check_dependencies_end')) ? eval($hook) : null;
return compact('dependencies', 'unresolved');
}
开发者ID:torepublicStartpageCode,项目名称:torepublic2,代码行数:28,代码来源:pun_repository.php
示例20: output_xml
function output_xml($feed)
{
global $lang_common, $forum_config;
// Send XML/no cache headers
header('Content-Type: application/xml; charset=utf-8');
header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
echo '<?xml version="1.0" encoding="utf-8"?>' . "\n";
echo '<source>' . "\n";
echo "\t" . '<url>' . $feed['link'] . '</url>' . "\n";
($hook = get_hook('ex_add_new_xml_info')) ? eval($hook) : null;
$forum_tag = $feed['type'] == 'posts' ? 'post' : 'topic';
foreach ($feed['items'] as $item) {
echo "\t" . '<' . $forum_tag . ' id="' . $item['id'] . '">' . "\n";
echo "\t\t" . '<title><![CDATA[' . escape_cdata($item['title']) . ']]></title>' . "\n";
echo "\t\t" . '<link>' . $item['link'] . '</link>' . "\n";
echo "\t\t" . '<content><![CDATA[' . escape_cdata($item['description']) . ']]></content>' . "\n";
echo "\t\t" . '<author>' . "\n";
echo "\t\t\t" . '<name><![CDATA[' . escape_cdata($item['author']['name']) . ']]></name>' . "\n";
if (isset($item['author']['email'])) {
echo "\t\t\t" . '<email><![CDATA[' . escape_cdata($item['author']['email']) . ']]></email>' . "\n";
}
if (isset($item['author']['uri'])) {
echo "\t\t\t" . '<uri>' . $item['author']['uri'] . '</uri>' . "\n";
}
echo "\t\t" . '</author>' . "\n";
echo "\t\t" . '<posted>' . gmdate('r', $item['pubdate']) . '</posted>' . "\n";
($hook = get_hook('ex_add_new_xml_item_info')) ? eval($hook) : null;
echo "\t" . '</' . $forum_tag . '>' . "\n";
}
echo '</source>' . "\n";
}
开发者ID:ZerGabriel,项目名称:punbb,代码行数:33,代码来源:extern.php
注:本文中的get_hook函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论