} // $viewpollresult .= '<input type="button" class="button2" onClick=popupWindow("' . "admin/create_poll_graph.php?topic_id=" . $topicid . '","win1",640,350,"yes","yes"); name="submit" value="Results" class="button" />'; if ($npoll > 1) { $viewpollresult .= '<br><a href="#" onClick=popupWindow("view_more_poll.php","win2",300,300,"yes","yes");>'; $viewpollresult .= ' <b class="whitetext">View more poll>></b>'; $viewpollresult .= '</a>'; } $polls .= '<form name="pollform" method="post" action="admin/save_poll_response2.php">'; $polls .= ' <input type="hidden" name="topicid" value="' . $topicid . '" >'; $polls .= $topic; $polls .= '<br>'; $polls .= $optlabel; $polls .= '<input type="submit" class="button2" name="submit" value="Vote" class="button" />'; $polls .= $viewpollresult; } else { $polls = '<b>No Polls available</b>'; } /* * Get the default stylesheets */ include 'admin/template.configuration.php'; $stylesheet = ' themes/' . $default_template_name . '/' . $default_template_stylesheet; $db->close(); $gerger->stop(); $pagegenerated = $gerger->display(); // Generate the page now $tpl = new template_parser('themes/templates/index.tpl.php'); $tags = array('{FULLSTORY}' => $fullstory, '{DATELINE}' => niceDate($headline[0]->dateline), '{ARTICLEID}' => ' ' . $headline[0]->articleID, '{HEADLINE}' => $headline[0]->title, '{AUTHOR}' => 'By ' . getArticle_authors_info($headline[0]->articleID, 'fullname') . '</p>', '{ARTICLE_BODY}' => makeAShortIntro(strip_tags($headline[0]->article_body)), '{PHOTO}' => $photo, '{VIEW_ARTICLE_URL}' => $my_profile[0]->homeaddress, '{OTHER_HEADLINES}' => $other_headlines, '{OTHER_TOPSTORIES}' => $other_topstories, '{OUR_SEGMENTS}' => $segments, '{TOPICID}' => $topicid, '{POLLS}' => $polls, '{POLL_LABELS}' => $optlabel, '{POLL_TOPIC}' => $topic, '{VIEW_POLL_RESULT}' => $viewpollresult, '{QUOTE_MESSAGE}' => $quote_message, '{QUOTE_AUTHOR}' => $quote_author, '{SUBSECTIONS}' => $subsections, '{ADVERTISEMENTS}' => $ads, '{ADS_148x300}' => $ads148x300, '{ADS_800x140}' => $ads800x140, '{PAGE_GENERATED}' => ' ' . $pagegenerated, '{SPONSORED_LINKS}' => $sponsoredlinks, '{SUBSECTIONS}' => $subsections, '{CATEGORY}' => $categorylist, '{FOOTER}' => 'themes/templates/footer.tpl.php', '{STYLESHEET}' => $stylesheet, '{ENGINE_ LINK}' => '<a href="http://www.google.com"><img src="images/logo_google.png"></a>'); $tpl->parse_template($tags); print $tpl->display();
* obtain list of the category */ $sql = "select * from category order by category_name ASC"; if (!($result = $db->query($sql))) { die('Error:' . $db->error()); } $categories = array(); while ($categories[] = $db->fetcharray()) { } $totalcategories = count($categories); $categorylist = ''; for ($i = 0; $i < $totalcategories - 1; $i++) { foreach ($categories as $field => $value) { if ($field == 'category_name') { $categorylist .= '<li><a href="' . VIEW_CATEGORY_URL . $categories[$i]->categoryID . '">' . $categories[$i]->category_name . '</a></li>'; } } } /* * Get the default stylesheets */ include 'admin/template.configuration.php'; $stylesheet = ' themes/' . $default_template_name . '/' . $default_template_stylesheet; $db->close(); $gerger->stop(); $pagegenerated = $gerger->display(); // Generate the page now $tpl = new template_parser('themes/templates/advertise.tpl.php'); $tags = array('{DATELINE}' => niceDate($headline[0]->dateline), '{ARTICLEID}' => $headline[0]->articleID, '{HEADLINE}' => $headline[0]->title, '{AUTHOR}' => 'By ' . getArticle_authors_info($headline[0]->articleID, 'fullname') . ' / BR</p>', '{ARTICLE_BODY}' => makeAShortIntro(strip_tags($headline[0]->article_body)), '{PHOTO}' => $photo, '{VIEW_ARTICLE_URL}' => $my_profile[0]->homeaddress, '{OTHER_HEADLINES}' => $other_headlines, '{OTHER_TOPSTORIES}' => $other_topstories, '{QUOTE_OF_THE_DAY}' => $quote, '{SUBSECTIONS}' => $subsections, '{ADS_148x300}' => $ads148x300, '{MESSAGE}' => $message, '{PAGE_GENERATED}' => ' ' . $pagegenerated, '{SPONSORED_LINKS}' => $sponsoredlinks, '{SUBSECTIONS}' => $subsections, '{CATEGORY}' => $categorylist, '{FOOTER}' => 'themes/templates/footer.tpl.php', '{STYLESHEET}' => $stylesheet); $tpl->parse_template($tags); print $tpl->display();
$bannerdata = $banner->view_banner('180x700'); $ads180x700 = ''; if ($bannerdata) { if (checkhttptext($bannerdata->banner_clickURL)) { $ads180x700 .= '<p><a href="' . $PHP_SELF . '?bannerID=' . $bannerdata->bannerID . '">'; $ads180x700 .= '<img src="' . makeRelativePath($bannerdata->banner_imageurl, 7) . '" border="0" ></a>'; $ads180x700 .= '</p>'; } else { $ads180x700 .= '<p><a href="' . $PHP_SELF . '?bannerID=' . $bannerdata->bannerID . '">'; $ads180x700 .= '<img src="' . makeRelativePath($bannerdata->banner_imageurl, 7) . '" border="0"></a>'; $ads180x700 .= '</p>'; } } /** * Get the clicked banner from the rotated banner... */ $bannerclick = new rotate_banner(); $bannerclick->getclicks($_REQUEST['bannerID']); /* * Get the default stylesheets */ include 'admin/template.configuration.php'; $stylesheet = ' themes/' . $default_template_name . '/' . $default_template_stylesheet; $db->close(); $gerger->stop(); $pagegenerated = $gerger->display(); // Generate the page now $tpl = new template_parser('themes/templates/segments_tpl.php'); $tags = array('{FULLSTORY}' => $fullstory, '{DATELINE}' => niceDate($headline[0]->dateline), '{ARTICLEID}' => $headline[0]->articleID, '{SEGMENT_TITLE}' => $data['segmentTitle'], '{SEGMENT_TOPIC}' => 'Topic: ' . $data['segmentTopic'], '{SEGMENT_ANCHOR}' => 'Anchor Man: ' . $data['segmentAnchor'], '{SEGMENT_BODY}' => makeAShortIntro($data['segmentContent']), '{SEGMENT_SCHEDULE}' => $data['segmentSchedule'], '{PHOTO}' => $photo, '{VIEW_ARTICLE_URL}' => $my_profile[0]->homeaddress, '{OTHER_HEADLINES_CAT}' => $other_headlines_cat, '{OTHER_SEGMENTS}' => $segments, '{OTHER_HEADLINES2}' => '$other_headlines2', '{OTHER_TOPSTORIES}' => $other_topstories, '{QUOTE_OF_THE_DAY}' => $quote, '{SUBSECTIONS}' => $subsections, '{ADVERTISEMENTS}' => $ads, '{ADS_148x300}' => $ads148x300, '{ADS_600x140}' => $ads600x140, '{ADS_180x700}' => $ads180x700, '{ADVERTISEMENTS2}' => $ads2, '{PAGE_GENERATED}' => ' ' . $pagegenerated, '{SPONSORED_LINKS}' => $sponsoredlinks, '{SUBSECTIONS}' => $subsections, '{CATEGORY}' => $categorylist, '{FOOTER}' => 'themes/templates/footer.tpl.php', '{STYLESHEET}' => $stylesheet); $tpl->parse_template($tags); print $tpl->display();