本文整理汇总了PHP中get_ad函数的典型用法代码示例。如果您正苦于以下问题:PHP get_ad函数的具体用法?PHP get_ad怎么用?PHP get_ad使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_ad函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: delete_ad
function delete_ad($id)
{
$update = "UPDATE ads set deleted ='y' where id=" . $id;
$result = mysql_query($update);
if (!$result) {
echo "'Error deleting the ad from the database: " . $update . "<br>";
} else {
$ad = get_ad($id);
echo "<div class=\"center\"><h1>Success!</h1>" . "<h3>The ad for <span class=\"success\">" . $ad['name'] . "</span> has been deleted.</h3></div>";
}
}
开发者ID:ynotradio,项目名称:site,代码行数:11,代码来源:ads_fns.php
示例2: print_form
function print_form($db, $smarty, $print_ad = 0)
{
if ($print_ad) {
$print_ad = get_ad($db, $print_ad);
}
$add = get_all($db);
$smarty->assign('add', $add);
$smarty->assign('print_ad', $print_ad);
$smarty->assign('city', get_city($db));
$smarty->assign('category', get_category($db));
$smarty->display('form.tpl');
}
开发者ID:aic513,项目名称:Web-programming,代码行数:12,代码来源:functions.php
示例3: print_form
function print_form($db, $smarty, $print_ad = 0)
{
// функция вывода формы
$add_query = get_ad($db, $print_ad);
$row = mysqli_fetch_assoc($add_query);
$smarty->assign('print_ad', $row);
$add = array();
$add_query = get_all($db);
while ($row = mysqli_fetch_assoc($add_query)) {
$add[$row['id']] = $row;
}
$smarty->assign('add', $add);
$smarty->assign('cities', get_cities($db));
$smarty->assign('category', get_category($db));
$smarty->display('dz9-form.tpl');
}
开发者ID:aic513,项目名称:Web-programming,代码行数:16,代码来源:dz9-functions.php
示例4: WP_Query
$query = new WP_Query($args);
while ($query->have_posts()) {
$query->the_post();
echo '<div class="col-md-3 spotlight-posts">';
echo spotlight_post();
echo '</div>';
}
?>
</div>
<div class="container main">
<div class="row">
<div class="col-md-12">
<?php
get_ad('banner');
?>
<?php
global $exclude_posts;
?>
<div id="posts-wrapper">
<?php
get_standard_posts(array('show_ads' => 1));
?>
<?php
get_standard_posts(array('show_ads' => 0));
?>
</div>
开发者ID:jacobraccuia,项目名称:dailybeatmedia,代码行数:31,代码来源:home.php
示例5: get_ad
$(this).css({"background":"#fff"})
});
})
})
</script>
</div>
</div>
<div class="banner">
<div class="ibannerbox" >
<div id="kinMaxShow">
<?php
$_result = get_ad(4);
if (is_array($_result)) {
$i = 0;
$__LIST__ = $_result;
if (count($__LIST__) == 0) {
echo "";
} else {
foreach ($__LIST__ as $key => $va) {
$mod = $i % 2;
++$i;
?>
<div> <a href="<?php
echo $va["url"];
?>
"><img src="__ROOT__/<?php
echo $va["img"];
开发者ID:GStepOne,项目名称:CI,代码行数:31,代码来源:4019da96546c145cd286e6733f280125.php
示例6: add_code_line
if (isset($pageSet['image_widgit']) && $pageSet['image_widgit'] && isset($settings['SET_IMAGE_WIDGIT']) && $settings['SET_IMAGE_WIDGIT']) {
add_code_line('footer', '<script type="text/javascript">
$(document).ready(function() {
$(\'#ImageWidget\').fadeOut(\'slow\', function(){
$(\'#ImageWidget\').load("' . $settings['SET_SITEURL'] . 'cfajax.php",{widgit: 25}, function(){
$(\'#ImageWidget\').fadeIn(\'slow\');
});
});
});
</script>');
echo '<div id="ImageWidget" class="boxpanel"></div>';
}
?>
<div class="clear_both"></div>
<?php
get_ad('footer', 'footer_ad');
?>
</div>
<div id="footer">
<p><?php
get_site('copyright');
?>
</p>
<?php
if (getSettings('SET_HIDE_FEED')) {
?>
<div id="feed"><a href="<?php
get_url('feed.php');
?>
" title="<?php
echo _T("footer_feed_title");
开发者ID:xctcc,项目名称:congtu,代码行数:31,代码来源:footer.php
示例7: get_ad
<?php
//if(is_home()) {
get_ad('skin');
//}
?>
<div class="footer-bg-wrapper"><div class="footer-bg-img"></div></div>
<div id="footer_wrapper">
<div id="footer" class="container">
<div class="row">
<div class="col-md-8">
<div class="row">
<div class="col-md-4 col-sm-12">
</div>
<div class="col-md-8 col-sm-12 super-tight">
<div class="footer_bio"><p>Stemming from its roots as a Facebook group in 2012, TRC brings Toronto-area electronic music fans together as one community. The platform is an extension of this mission, providing a fully-integrated and unified ecosystem for electronic music fans to connect, and be the trusted source for local talent, events, and global music news through community-driven editorial and podcasting.</p></div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="sound_wave"></div>
<div class="copy">© <?php
echo date("Y");
?>
Toronto Rave Community. All Rights Reserved.
<a href="/privacy-policy">Privacy</a> | <a href="/terms-conditions">Terms & Conditions</a><a href=""></a></div>
</div>
</div>
</div>
<div class="col-md-4">
开发者ID:jacobraccuia,项目名称:dailybeatmedia,代码行数:31,代码来源:footer.php
示例8: header
header('Location: ' . $_SERVER['PHP_SELF']);
exit;
}
} elseif (isset($_GET['del_id'])) {
// Удаление объявления
if (delete_ad((int) $_GET['del_id']) === 1) {
header('Location: ' . $_SERVER['PHP_SELF']);
exit;
} else {
echo '<h2>Не удалось удалить. Объявление ' . (int) $_GET['del_id'] . ' не найдено.</h2>';
echo '<h2><a href="' . $_SERVER['PHP_SELF'] . '">Назад<a></h2>';
exit;
}
} elseif (isset($_GET['id'])) {
// Показать объявление
$ad = get_ad((int) $_GET['id']);
if ($ad) {
$ad_flag = 2;
} else {
$msg_ad_status .= 'Не удалось отобразить объявление ' . (int) $_GET['id'];
}
}
// Загрузка объявлений в массив для вывода на странице в виде таблицы
$ads = get_ads();
mysql_close($conn);
// Закрытие соединения с mysql
$smarty_dir = 'smarty/';
require $smarty_dir . '/libs/Smarty.class.php';
$smarty = new Smarty();
$smarty->compile_check = true;
//$smarty->debugging = true;
开发者ID:slastenovd,项目名称:test2,代码行数:31,代码来源:index.php
示例9: output
/**
* return content of an in a widget
*
* @since 1.2
* @param string $id slug of the display
*/
static function output($id = '')
{
// get placement data for the slug
if (empty($id)) {
return;
}
$item = explode('_', $id, 2);
if (isset($item[1])) {
$item_id = $item[1];
} elseif (empty($item_id)) {
return;
}
// return either ad or group content
if ($item[0] == 'ad') {
return get_ad(absint($item_id));
} elseif ($item[0] == 'group') {
return get_ad_group(absint($item_id));
} elseif ($item[0] == 'placement') {
return get_ad_placement($item_id);
}
return;
}
开发者ID:bruno-barros,项目名称:w.eloquent.light,代码行数:28,代码来源:widget.php
示例10: elseif
echo 200;
return;
} elseif ($op == 'upad') {
$adid = intval($_POST['adid']);
$ad = get_ad($adid);
$query = $_SGLOBAL['db']->query("SELECT id,seq FROM " . tname('ad4dev') . " WHERE seq>" . $ad['seq'] . " ORDER BY seq ASC LIMIT 1");
$ad1 = $_SGLOBAL['db']->fetch_array($query);
if ($ad1) {
updatetable('ad4dev', array('seq' => $ad1['seq']), array('id' => $ad['id']));
updatetable('ad4dev', array('seq' => $ad['seq']), array('id' => $ad1['id']));
echo 200;
}
return;
} elseif ($op == 'downad') {
$adid = intval($_POST['adid']);
$ad = get_ad($adid);
$query = $_SGLOBAL['db']->query("SELECT id,seq FROM " . tname('ad4dev') . " WHERE seq<" . $ad['seq'] . " ORDER BY seq DESC LIMIT 1");
$ad1 = $_SGLOBAL['db']->fetch_array($query);
if ($ad1) {
updatetable('ad4dev', array('seq' => $ad1['seq']), array('id' => $ad['id']));
updatetable('ad4dev', array('seq' => $ad['seq']), array('id' => $ad1['id']));
echo 200;
}
return;
} elseif ($op == 'checkpass') {
$serid = intval($_POST['serid']);
$setarr = array('applypass' => 3);
updatetable('apps', $setarr, array('id' => $serid));
echo 200;
return;
} elseif ($op == 'checkreject') {
开发者ID:shiyake,项目名称:php-ihome,代码行数:31,代码来源:dev_manage.php
示例11: shortcode_display_ad
/**
* shortcode to include ad in frontend
*
* @since 1.0.0
* @param arr $atts
*/
public function shortcode_display_ad($atts)
{
$id = isset($atts['id']) ? (int) $atts['id'] : 0;
// use the public available function here
return get_ad($id);
}
开发者ID:Tymvie,项目名称:advanced_ads_mod,代码行数:12,代码来源:plugin.php
示例12: next_ad
function next_ad($slot)
{
$redis = option('redis');
$key = slot_key($slot);
$id = $redis->rpoplpush($key, $key);
if (empty($id)) {
return null;
}
$ad = get_ad($slot, $id);
if (!empty($ad)) {
return $ad;
} else {
$redis->lrem($key, 0, $id);
next_ad();
}
}
开发者ID:karupanerura,项目名称:isucon4,代码行数:16,代码来源:index.php
示例13: foreach
foreach ($__LIST__ as $key => $vq) {
$mod = $i % 2;
++$i;
?>
<li><span>客服</span> <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=<?php
echo $vq["qq_num"];
?>
&site=qq&menu=yes"><img border="0" src="/p2p/Style/H/images/images/online.png" alt="点击这里给我发消息" title="点击这里给我发消息"/></a> </li><?php
}
}
} else {
echo "";
}
?>
<li><?php
echo get_ad(11);
?>
</li>
<?php
$_result = get_qq(2);
if (is_array($_result)) {
$i = 0;
$__LIST__ = $_result;
if (count($__LIST__) == 0) {
echo "";
} else {
foreach ($__LIST__ as $key => $vq) {
$mod = $i % 2;
++$i;
?>
<li style="border:none;"><span>电话:<?php
开发者ID:kinglong366,项目名称:p2p,代码行数:31,代码来源:cb6e053e31eae77baa8d17b42ff91420.php
示例14: infeed_ad_shortcode
function infeed_ad_shortcode()
{
ob_start();
echo get_ad('post-infeed');
$result = ob_get_contents();
ob_end_clean();
return $result;
}
开发者ID:jacobraccuia,项目名称:dailybeatmedia,代码行数:8,代码来源:post_queries.php
示例15: _T
?>
';" onfocus="if(this.value=='<?php
echo _T("site_search_text");
?>
')value=''" value="<?php
echo _T("site_search_text");
?>
" /><input type="submit" value="<?php
echo _T("site_search_button");
?>
" class="button" />
</form>
</div>
<?php
}
?>
<div id="nav">
<?php
get_page_menu();
?>
</div>
<div class="clear_both"></div>
</div>
<div id="content">
<?php
get_ad('header', 'top_ad');
// check for and output ads
show_feedback();
// check for any success/errors notes and output them
?>
<div id="msg"></div>
开发者ID:xctcc,项目名称:congtu,代码行数:31,代码来源:header.php
示例16: get_ad
// Update the topic view counter
$sql = "UPDATE " . TOPICS_TABLE . "
SET topic_views = topic_views + 1
WHERE topic_id = " . $topic_id;
$db->sql_query($sql);
}
// UPI2DB - BEGIN
if($user->data['upi2db_access'])
{
delete_read_posts($read_posts);
}
// UPI2DB - END
$viewtopic_banner_top = get_ad('vtt');
$viewtopic_banner_bottom = get_ad('vtb');
$template->assign_vars(array(
'VIEWTOPIC_BANNER_TOP' => $viewtopic_banner_top,
'VIEWTOPIC_BANNER_BOTTOM' => $viewtopic_banner_bottom,
)
);
if($can_reply)
{
if (!function_exists('generate_smilies_row'))
{
include_once(IP_ROOT_PATH . 'includes/functions_bbcode.' . PHP_EXT);
}
generate_smilies_row();
}
开发者ID:GabrielAnca,项目名称:icy_phoenix,代码行数:30,代码来源:viewtopic.php
示例17: _T
<b><?php
echo _T("site_index_Image_Formats");
?>
:</b> <?php
echo implode(", ", $imgFormats);
?>
<br />
<b><?php
echo _T("site_index_maximum_filesize");
?>
:</b> <?php
echo format_size($settings['SET_MAXSIZE']);
?>
</p>
<?php
get_ad('index', 'ad_index');
?>
<form enctype="multipart/form-data" action="upload.php" method="post" class="upform" name="upload" id="upload">
<input type="hidden" id="MAX_FILE_SIZE" name="MAX_FILE_SIZE" value="<?php
echo $settings['SET_MAXSIZE'];
?>
" />
<div class="upload_op">
<a id="linklocal" class="linklocal show" title="<?php
echo _T("site_index_local_image_upload_title");
?>
"><?php
echo _T("site_index_local_image_upload");
?>
</a>
<a id="linkremote" class="linkremote" title="<?php
开发者ID:xctcc,项目名称:congtu,代码行数:31,代码来源:index.php
示例18: array
$template->assign_block_vars('switch_show_random_quote', array());
}
if ($config['show_chat_online'] == true) {
$template->assign_block_vars('switch_ac_online', array());
}
if ($config['index_top_posters'] == true) {
if (!function_exists('top_posters')) {
@(include_once IP_ROOT_PATH . 'includes/functions_users.' . PHP_EXT);
}
$template->assign_block_vars('top_posters', array('TOP_POSTERS' => top_posters(8, true, true, false)));
}
}
// Display the index
$display = display_index($viewcatkey);
// check shoutbox permissions and display only to authorized users
$auth_level_req = isset($cms_config_layouts['shoutbox']['view']) && $cms_config_layouts['shoutbox']['view'] != AUTH_CMS_ALL_NO_BOTS ? $cms_config_layouts['shoutbox']['view'] : AUTH_ALL;
if (!empty($config['index_shoutbox']) && $user->data['user_level'] + 1 >= $auth_level_req && $user->data['session_logged_in'] && !$user->data['is_bot'] || !empty($config['index_shoutbox']) && $user->data['user_level'] == ADMIN) {
$template->assign_vars(array('S_SHOUTBOX' => true));
}
if (!$display) {
message_die(GENERAL_MESSAGE, $lang['No_forums']);
}
// Should the news banner be shown?
if ($config['xs_show_news']) {
include IP_ROOT_PATH . 'includes/xs_news.' . PHP_EXT;
$template->assign_block_vars('switch_show_news', array());
}
$forumindex_banner_top = get_ad('fit');
$forumindex_banner_bottom = get_ad('fib');
$template->assign_vars(array('FORUMINDEX_BANNER_TOP' => $forumindex_banner_top, 'FORUMINDEX_BANNER_BOTTOM' => $forumindex_banner_bottom));
full_page_generation('index_body.tpl', $lang['Forum'], '', '');
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:31,代码来源:forum.php
示例19: the_title
" target="_blank" data-shared="<?php
the_title();
?>
" data-social="Pinterest"><i class="fa fa-pinterest-square"></i>Pin</a></li>
<li class="social comment"><a href="#comments"><i class="fa fa-comment"></i>Comment</a></li>
</ul>
<div class="post-content cat-links cat-first-letter">
<?php
echo the_content();
?>
</div>
<div class="extras">
<?php
get_ad('post-bottom');
?>
</div>
<div class="extras">
<h3 class="section-title">About The Author</h3>
<div class="divider cat-background bottom_margins"></div>
<?php
author_biography($author_id);
?>
</div>
<div class="extras">
<h3 class="section-title">Related</h3>
<div class="divider cat-background bottom_margins"></div>
<?php
get_related_posts(array('category' => $category->term_id));
开发者ID:jacobraccuia,项目名称:dailybeatmedia,代码行数:31,代码来源:single.php
示例20: value
require "partials/_ads_form.php";
echo "</form>\n <div class=\"footnote\">** if any links are over 128 characters: use <a href=\"http://www.bit.ly\" target=_new>bit.ly</a> to shorten the url</div>";
} else {
$name = $_POST['name'];
$start_date = $_POST['start_date'];
$end_date = $_POST['end_date'];
$pic_url = $_POST['pic_url'];
$web_url = $_POST['web_url'];
$priority = $_POST['priority'];
if (!$name || !$start_date || !$end_date || !$pic_url || !$web_url || !$priority) {
echo '<div class="top-spacer_20 center error">Error - missing required value(s)</div>';
} else {
$result = update_ad($id, $name, $start_date, $end_date, $pic_url, $web_url, $priority);
if ($result) {
echo '<div class="top-spacer_20 center"><h1>Update was successful!</h1>';
display_ad(get_ad($id));
echo "</div>";
}
}
}
?>
<div class="top-spacer_20">
<a href="ad_view_all_active.php">View all Ads</a>
<p>
<a href="cp.php">Control Panel</a>
</div>
</div>
</div> <!-- end of row div -->
<?php
}
require "partials/_footer.php";
开发者ID:ynotradio,项目名称:site,代码行数:31,代码来源:ad_update.php
注:本文中的get_ad函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论