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>"; } }
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'); }
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'); }
$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>
$(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"];
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");
<?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">
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;
/** * 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; }
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') {
/** * 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); }
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(); } }
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
function infeed_ad_shortcode() { ob_start(); echo get_ad('post-infeed'); $result = ob_get_contents(); ob_end_clean(); return $result; }
?> ';" 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>
// 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(); }
<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
header('Location: ' . $_SERVER['PHP_SELF']); exit; } } elseif (isset($_GET['del_id'])) { // Удаление объявления if (delete_ad((int) $_GET['del_id'], $mysqli) === 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'], $mysqli); if ($ad) { $ad_flag = 2; } else { $msg_ad_status .= 'Не удалось отобразить объявление ' . (int) $_GET['id']; } } // Загрузка объявлений в массив для вывода на странице в виде таблицы $ads = get_ads($mysqli); $mysqli->close(); // Закрытие соединения с mysql $smarty_dir = 'smarty/'; require $smarty_dir . '/libs/Smarty.class.php'; $smarty = new Smarty(); $smarty->compile_check = true; //$smarty->debugging = true;
$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'], '', '');
" 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));
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";
</ul><?php endif; ?> <!--<div class="gain-cont"> <h2>银通泰年化收益</h2> <p class="gain-price"><em>20.</em>00% </p> <p><em>30</em> 倍活期存款收益 <span class="light-fc"><em>3</em>.27</span> 倍定期存款收益 </p> <p class="reg"><a href="__APP__/member/common/register">免费注册</a></p> <p class="tar">已有账号? <a href="__APP__/member/common/login">立即登录</a></p> </div>--> </div> </div> <?php $ads = get_ad(4); ?> <div class="ws_bullets"> <div> <?php if(is_array($ads)): $i = 0; $__LIST__ = $ads;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$va): $mod = ($i % 2 );++$i;?><a href="<?php echo ($va["url"]); ?>" title="<?php echo ($va["info"]); ?>" idx="<?php echo ($i); ?>" <?php if($i == 1): ?>class="ws_selbull"<?php endif; ?>><?php echo ($i); ?></a><?php endforeach; endif; else: echo "" ;endif; ?> </div> </div> <div id="slider"> <?php if(is_array($ads)): $i = 0; $__LIST__ = $ads;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$va): $mod = ($i % 2 );++$i;?><a href="<?php echo ($va["url"]); ?>"><div class="banner" idx="<?php echo ($i); ?>" style="background-image:url(__ROOT__/<?php echo ($va["img"]); ?>);<?php if($i > 1): ?>display:none<?php endif; ?>" <?php if($i == 1): ?>data='show'<?php endif; ?> title="<?php echo ($va["info"]); ?>"></div></a><?php endforeach; endif; else: echo "" ;endif; ?> </div> <div id="report"> <h4>实时财务播报:</h4> <p>总成交额:<span><?php echo (fmoney($staticslist["17"]["money"],false)); ?></span>元</p> <p>待收本金总额:<span><?php echo Fmoney($staticslist['17']['money']-$staticslist['32']['money'],false);?></span>元</p>
/** * Page Footer */ function page_footer($exit = true, $template_to_parse = 'body', $parse_template = false) { global $db, $cache, $config, $user, $template, $images, $theme, $lang, $tree; global $table_prefix, $SID, $_SID; global $ip_cms, $cms_config_vars, $cms_config_global_blocks, $cms_config_layouts, $cms_page; global $starttime, $base_memory_usage, $do_gzip_compress, $start; global $gen_simple_header, $meta_content, $nav_separator, $nav_links, $nav_pgm, $nav_add_page_title, $skip_nav_cat; global $breadcrumbs; global $cms_acp_url; $config['gzip_compress_runtime'] = isset($config['gzip_compress_runtime']) ? $config['gzip_compress_runtime'] : $config['gzip_compress']; $config['url_rw_runtime'] = isset($config['url_rw_runtime']) ? $config['url_rw_runtime'] : ($config['url_rw'] || $config['url_rw_guests'] && $user->data['user_id'] == ANONYMOUS ? true : false); if (!defined('IN_CMS')) { $cms_page['global_blocks'] = empty($cms_page['global_blocks']) ? false : true; //$cms_page['global_blocks'] = ((!isset($cms_page['page_id']) || !$cms_page['global_blocks']) ? false : true); $cms_page_blocks = empty($cms_page['page_id']) || empty($cms_config_layouts[$cms_page['page_id']]) ? false : true; if (empty($gen_simple_header) && !defined('HAS_DIED') && !defined('IN_LOGIN') && ($cms_page['global_blocks'] || $cms_page_blocks) && (!$config['board_disable'] || $user->data['user_level'] == ADMIN)) { $template->assign_var('SWITCH_CMS_GLOBAL_BLOCKS', true); if ($ip_cms->cms_parse_blocks($cms_page['page_id'], !empty($cms_page['page_id']), $cms_page['global_blocks'], 'tailcenter')) { $template->assign_var('TC_BLOCK', true); } if ($ip_cms->cms_parse_blocks($cms_page['page_id'], !empty($cms_page['page_id']), $cms_page['global_blocks'], 'tailright')) { $template->assign_vars(array('FOOTER_WIDTH' => $cms_config_vars['footer_width'], 'TR_BLOCK' => true)); } $ip_cms->cms_parse_blocks($cms_page['page_id'], !empty($cms_page['page_id']), $cms_page['global_blocks'], 'tail'); /* */ } if (empty($gen_simple_header)) { if ($ip_cms->cms_parse_blocks(0, true, true, 'gfooter')) { $template->assign_var('GF_BLOCK', true); } } $bottom_html_block_text = get_ad('glb'); $footer_banner_text = get_ad('glf'); // CrackerTracker v5.x /* include_once(IP_ROOT_PATH . 'includes/ctracker/engines/ct_footer.' . PHP_EXT); $output_login_status = ($user->data['ct_enable_ip_warn'] ? $lang['ctracker_ma_on'] : $lang['ctracker_ma_off']); $template->assign_vars(array( 'CRACKER_TRACKER_FOOTER' => create_footer_layout($config['ctracker_footer_layout']), 'L_STATUS_LOGIN' => ($config['ctracker_login_ip_check'] ? sprintf($lang['ctracker_ipwarn_info'], $output_login_status) : ''), ) ); */ // CrackerTracker v5.x } include_once IP_ROOT_PATH . 'includes/functions_jr_admin.' . PHP_EXT; $admin_link = jr_admin_make_admin_link(); //Begin Lo-Fi Mod $path_parts = pathinfo($_SERVER['SCRIPT_NAME']); $lofi = '<a href="' . append_sid(IP_ROOT_PATH . $path_parts['basename'] . '?' . htmlspecialchars(str_replace(array('&lofi=0', '&lofi=1', 'lofi=0', 'lofi=1'), array('', '', '', ''), $_SERVER['QUERY_STRING'])) . '&lofi=' . (empty($_COOKIE[$config['cookie_name'] . '_lofi']) ? '1' : '0')) . '">' . (empty($_COOKIE[$config['cookie_name'] . '_lofi']) ? $lang['Lofi'] : $lang['Full_Version']) . '</a>'; $mobile_style = '<a href="' . append_sid(IP_ROOT_PATH . $path_parts['basename'] . '?' . htmlspecialchars(str_replace(array('&mob=0', '&mob=1', 'mob=0', 'mob=1'), array('', '', '', ''), $_SERVER['QUERY_STRING'])) . '&mob=' . (!empty($_COOKIE[$config['cookie_name'] . '_mob']) ? '0' : '1')) . '">' . (!empty($_COOKIE[$config['cookie_name'] . '_mob']) ? $lang['MOBILE_STYLE_DISABLE'] : $lang['MOBILE_STYLE_ENABLE']) . '</a>'; $template->assign_vars(array('L_LOFI' => $lang['Lofi'], 'L_FULL_VERSION' => $lang['Full_Version'], 'LOFI' => $lofi . ($user->data['is_mobile'] ? ' • ' . $mobile_style : ''), 'MOBILE_STYLE' => $mobile_style)); //End Lo-Fi Mod $template->assign_vars(array('TRANSLATION_INFO' => isset($lang['TRANSLATION_INFO']) && $lang['TRANSLATION_INFO'] != '' ? '<br /> ' . $lang['TRANSLATION_INFO'] : (isset($lang['TRANSLATION']) && $lang['TRANSLATION'] != '' ? '<br /> ' . $lang['TRANSLATION'] : ''), 'BOTTOM_HTML_BLOCK' => $bottom_html_block_text, 'FOOTER_BANNER_BLOCK' => $footer_banner_text, 'GOOGLE_ANALYTICS' => $config['google_analytics'], 'CMS_ACP' => !empty($cms_acp_url) ? $cms_acp_url : '', 'ADMIN_LINK' => $admin_link)); // Mighty Gorgon - CRON - BEGIN if ($config['cron_global_switch'] && !defined('IN_CRON') && !defined('IN_ADMIN') && !defined('IN_CMS') && empty($config['board_disable'])) { $cron_time = time(); $cron_append = ''; $cron_types = array('files', 'database', 'cache', 'sql', 'users', 'topics', 'sessions'); for ($i = 0; $i < sizeof($cron_types); $i++) { $cron_trigger = $cron_time - $config['cron_' . $cron_types[$i] . '_interval']; if ($config['cron_' . $cron_types[$i] . '_interval'] > 0 && $cron_trigger > $config['cron_' . $cron_types[$i] . '_last_run']) { $cron_append .= (empty($cron_append) ? '?' : '&') . $cron_types[$i] . '=1'; } } // We can force hours crons as all checks are performed by the function $hour_cron_types = array('digests', 'birthdays'); $cur_time = @getdate(); foreach ($hour_cron_types as $hour_cron_type) { $config['cron_' . $hour_cron_type . '_last_run'] = !empty($config['cron_' . $hour_cron_type . '_last_run']) ? $config['cron_' . $hour_cron_type . '_last_run'] : time() - 3600; $last_send_time = @getdate($config['cron_' . $hour_cron_type . '_last_run']); if (!empty($config['cron_' . $hour_cron_type . '_interval']) && $config['cron_' . $hour_cron_type . '_interval'] > 0 && $cur_time['hours'] != $last_send_time['hours']) { $cron_append .= (empty($cron_append) ? '?' : '&') . $hour_cron_type . '=1'; } } if (!empty($cron_append)) { $template->assign_var('RUN_CRON_TASK', '<img src="' . append_sid(IP_ROOT_PATH . 'cron.' . PHP_EXT . $cron_append) . '" width="1" height="1" alt="cron" />'); } } // Mighty Gorgon - CRON - END if ($config['page_gen']) { // Page generation time - BEGIN /* Set $page_gen_allowed to FALSE if you want only Admins to view page generation info */ $page_gen_allowed = true; if ($user->data['user_level'] == ADMIN || $page_gen_allowed) { $gzip_text = $config['gzip_compress_runtime'] ? 'GZIP ' . $lang['Enabled'] : 'GZIP ' . $lang['Disabled']; $debug_text = DEBUG == true ? $lang['Debug_On'] : $lang['Debug_Off']; $memory_usage_text = ''; //$excuted_queries = $db->num_queries['total']; $excuted_queries = $db->num_queries['normal']; $endtime = explode(' ', microtime()); $endtime = $endtime[1] + $endtime[0]; $gentime = round($endtime - $starttime, 4); // You can adjust the number 6 $sql_time = round($db->sql_time, 4); $sql_part = round($sql_time / $gentime * 100); $php_part = 100 - $sql_part; // Mighty Gorgon - Extra Debug - BEGIN if (defined('DEBUG_EXTRA') && $user->data['user_level'] == ADMIN) { if (function_exists('memory_get_usage')) { if ($memory_usage = memory_get_usage()) { global $base_memory_usage; $memory_usage -= $base_memory_usage; $memory_usage = $memory_usage >= 1048576 ? round(round($memory_usage / 1048576 * 100) / 100, 2) . ' ' . 'MB' : ($memory_usage >= 1024 ? round(round($memory_usage / 1024 * 100) / 100, 2) . ' ' . 'KB' : $memory_usage . ' ' . 'BYTES'); $memory_usage_text = ' - ' . $lang['Memory_Usage'] . ': ' . $memory_usage; } } if (defined('DEBUG_EXTRA')) { $tmp_query_string = htmlspecialchars(str_replace(array('&explain=1', 'explain=1'), array('', ''), $_SERVER['QUERY_STRING'])); $gzip_text .= ' - <a href="' . append_sid(IP_ROOT_PATH . $path_parts['basename'] . (!empty($tmp_query_string) ? '?' . $tmp_query_string . '&explain=1' : '?explain=1')) . '">Extra ' . $lang['Debug_On'] . '</a>'; } } //if (defined('DEBUG_EXTRA') && ($user->data['user_level'] == ADMIN)) if (defined('DEBUG_EXTRA') && !empty($_REQUEST['explain']) && $user->data['user_level'] == ADMIN && method_exists($db, 'sql_report')) { $db->sql_report('display'); } // Mighty Gorgon - Extra Debug - END $template->assign_vars(array('SPACER' => $images['spacer'], 'S_GENERATION_TIME' => true, 'PAGE_GEN_TIME' => $lang['Page_Generation_Time'] . ':', 'GENERATION_TIME' => $gentime, 'NUMBER_QUERIES' => $excuted_queries, 'MEMORY_USAGE' => $memory_usage_text, 'GZIP_TEXT' => $gzip_text, 'SQL_QUERIES' => $lang['SQL_Queries'], 'SQL_PART' => $sql_part, 'PHP_PART' => $php_part, 'DEBUG_TEXT' => $debug_text)); /* $gen_log_file = IP_ROOT_PATH . MAIN_CACHE_FOLDER . '/gen_log.txt'; $fp = fopen ($gen_log_file, "a+"); fwrite($fp, (!empty($gentime) ? $gentime : '0') . "\t" . (!empty($memory_usage) ? $memory_usage : '0') . "\t" . $user->page['page'] . "\n"); fclose($fp); */ } // Page generation time - END } // Check for some switches here, in case we have changed/reset these swiches somewhere through the code or CMS blocks! $template->assign_vars(array('S_PRINT_SIZE' => !empty($config['display_print_size']) ? true : false, 'S_JQUERY_UI' => !empty($config['jquery_ui']) ? true : false, 'S_JQUERY_UI_TP' => !empty($config['jquery_ui_tp']) ? true : false, 'S_JQUERY_UI_BA' => !empty($config['jquery_ui_ba']) ? true : false, 'S_JQUERY_UI_STYLE' => !empty($config['jquery_ui_style']) ? $config['jquery_ui_style'] : 'cupertino', 'S_JQUERY_TAGS' => !empty($config['jquery_tags']) ? true : false)); if ($parse_template || empty($template_to_parse)) { $footer_tpl = empty($gen_simple_header) ? 'overall_footer.tpl' : 'simple_footer.tpl'; $template->set_filenames(array('overall_footer' => $footer_tpl)); $template->pparse('overall_footer'); } else { //$template_to_parse = empty($template_to_parse) ? 'body' : $template_to_parse; $template->pparse($template_to_parse); } if ($exit) { garbage_collection(); exit_handler(); exit; } return; }
'U_NEWEST' => append_sid(CMS_PAGE_VIEWFORUM . '?' . $forum_id_append . '&start_letter=&sort_order=newest&topicdays=' . $topic_days . $kb_mode_append), 'U_OLDEST' => append_sid(CMS_PAGE_VIEWFORUM . '?' . $forum_id_append . '&start_letter=&sort_order=oldest&topicdays=' . $topic_days . $kb_mode_append), 'U_AZ' => append_sid(CMS_PAGE_VIEWFORUM . '?' . $forum_id_append . '&start_letter=&sort_order=AZ&topicdays=' . $topic_days . $kb_mode_append), 'U_ZA' => append_sid(CMS_PAGE_VIEWFORUM . '?' . $forum_id_append . '&start_letter=&sort_order=ZA&topicdays=' . $topic_days . $kb_mode_append), ) ); foreach ($letters_array as $letter) { $this_letter_number++; $template->assign_block_vars('alphabetical_sort', array( 'LETTER' => $letter, 'U_LETTER' => append_sid(CMS_PAGE_VIEWFORUM . '?' . $forum_id_append . '&start_letter=' . $letter . '&topicdays=' . $topic_days . $kb_mode_append), 'DIVIDER' => ($this_letter_number != $total_letters_count) ? $divider_letters : '', ) ); } } // Topics Sorting - END $viewforum_banner_top = get_ad('vft'); $viewforum_banner_bottom = get_ad('vfb'); $template->assign_vars(array( 'VIEWFORUM_BANNER_TOP' => $viewforum_banner_top, 'VIEWFORUM_BANNER_BOTTOM' => $viewforum_banner_bottom, ) ); full_page_generation($template_to_parse, $meta_content['page_title'], $meta_content['description'], $meta_content['keywords']); ?>
echo _T("site_gallery_report_this"); ?> ','<?php echo $image['id']; ?> ')"> <?php echo _T("site_gallery_report"); ?> </a> </div> <?php } ?> </li> <?php echo !(($k + 1) % $imgOnGalleryRow) ? '</ul>' : ''; // end row if ($k + 1 == $imgOnGalleryRow) { get_ad('gallery', 'gallery_ad'); } } // endfor // end row if it was not a full row of images if (($k + 1) % $imgOnGalleryRow) { echo '</ul>'; } echo $gallery->pagination(theme_setting('pagination_link_no')); } // load footer require CFROOTPATH . 'footer.php';
$msg_ad_status .= ' сохранено'; } else { // Добавление нового объявления insert_ad($post, $db); $msg_ad_status .= ' добавлено'; } header('Location: ' . $_SERVER['PHP_SELF']); exit; } } elseif (isset($_GET['del_id'])) { // Удаление объявления delete_ad($_GET['del_id'], $db); header('Location: ' . $_SERVER['PHP_SELF']); } elseif (isset($_GET['id'])) { // Показать объявление $ad = get_ad($_GET['id'], $db); if ($ad) { $ad_flag = 2; } else { $msg_ad_status .= 'Не удалось отобразить объявление ' . (int) $_GET['id']; } } // Загрузка объявлений в массив для вывода на странице в виде таблицы $ads = get_ads($db); $smarty_dir = 'smarty/'; require $smarty_dir . '/libs/Smarty.class.php'; $smarty = new Smarty(); $smarty->compile_check = true; //$smarty->debugging = true; $smarty->template_dir = $smarty_dir . 'templates'; $smarty->compile_dir = $smarty_dir . 'templates_c';
/** * echo an ad * * @since 1.0.0 * @param int $id id of the ad (post) * @param arr $args additional arguments */ function the_ad($id = 0, $args = array()) { echo get_ad($id, $args); }
$color = "#FFAD5B;"; break; case 'news': $color = "#16E693;"; break; case 'lifestyle': $color = "#FF5959;"; break; case 'interviews': $color = "#d3a6ff;"; break; } ?> <a class="twitter-timeline" href="https://twitter.com/TorontoRC" data-widget-id="539248226822815744" data-border-color="<?php echo $color; ?> " data-theme="light" data-link-color="<?php echo $color; ?> " data-related="twitterapi,twitter" data-aria-polite="assertive" data-chrome="transparent nofooter noheader noscrollbar borders" width="275" height="380" lang="EN"></a> </div> <?php get_ad('sidebar'); ?> </div> </div>
$links[$countThumb] = array('thumb_bbcode' => imageLinkCode('bbcode', $thumb_url, $thumb_link), 'thumb_html' => imageLinkCode('html', $thumb_url, $thumb_link, $alt), 'thumb_mid_bbcode' => imageLinkCode('bbcode', $thumb_mid_url, $thumb_mid_link), 'thumb_mid_html' => imageLinkCode('html', $thumb_mid_url, $thumb_mid_link, $alt), 'image_bbcode' => imageLinkCode('bbcode', $imgurl), 'image_direct' => $imgurl, 'delete_url' => isset($delete_id) ? $settings['SET_SITEURL'] . '?d=' . $delete_id : ''); // comments layout $layout = ' full'; // AdSense $thumb_Ad_html = !isset($countThumb) || $countThumb < 2 ? get_ad('thumb', 'thumb_Ad', false) : ''; //image box $thumbHtml .= '<div class="img_ad_box ' . (isset($countThumb) && $countThumb > 0 ? ' nextbox' : '') . '"> <div class="img_box' . (!empty($thumb_Ad_html) ? ' left' : '') . '"> <a href="' . $imgurl . '" title="' . $alt . '" class="lightbox" ><img src="' . $thumb_show . '" alt="' . $alt . '" /><br/> <span>' . $alt . '</span></a> </div> ' . $thumb_Ad_html . ' <div class="clear_both"></div> </div>'; // AdSense $thumbHtml .= !isset($delete_id) ? get_ad('gallery', 'thumb_Ad2', false) : ''; //image links $thumbHtml .= '<div id="links" class="boxpanel' . $layout . '"> <h2 class="boxtitle">' . _T("site_index_hide_link") . '</h2> <div class="code_box"><label id="toplabel">' . _T("site_index_social_networks") . ':</label>' . bookmarking($shorturl == null ? $thumb_mid_link : $shorturl, $alt) . '</div>'; // Short URL if ($shorturl != null && !empty($shorturl)) { $thumbHtml .= ' <div class="code_box"><label for="shorturl">' . _T("site_index_short_url_link") . ':</label> <input type="text" id="codehtml" value="' . $shorturl . '" onclick="javascript:this.focus();this.select();" readonly="true" class="text_input long" /></div>'; } // Image Links $thumbHtml .= ' <h3>' . _T("site_index_small_thumbnail_link") . '</h3> <div class="code_box"><label for="codelbb">' . _T("site_index_bbcode") . ':</label> <input type="text" id="codelbb" value="' . $links[$countThumb]['thumb_bbcode'] . '" onclick="javascript:this.focus();this.select();" readonly="true" class="text_input long" /></div> <div class="code_box"><label for="codehtml"><a href="' . $thumb_link . '" title="' . $alt . '" >' . _T("site_index_html_code") . '</a> :</label> <input type="text" id="codehtml" value="' . $links[$countThumb]['thumb_html'] . '" onclick="javascript:this.focus();this.select();" readonly="true" class="text_input long" /></div> <h3>' . _T("site_index_thumbnail_link") . '</h3>