本文整理汇总了PHP中get_ad函数的典型用法代码示例。如果您正苦于以下问题:PHP get_ad函数的具体用法?PHP get_ad怎么用?PHP get_ad使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_ad函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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>";
}
}
示例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');
}
示例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');
}
示例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>
示例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"];
示例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");
示例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">
示例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;
示例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;
}
示例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') {
示例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);
}
示例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();
}
}
示例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
示例14: infeed_ad_shortcode
function infeed_ad_shortcode()
{
ob_start();
echo get_ad('post-infeed');
$result = ob_get_contents();
ob_end_clean();
return $result;
}
示例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>